Questions Tagged With programminghttp://linuxexchange.org/tags/programming/?type=rssquestions tagged <span class="tag">programming</span>enSun, 13 Jul 2014 15:46:20 -0400I'm a mechanical engineer and I've a big interview coming up as a developer in a big IT company.. what should I prepare??http://linuxexchange.org/questions/3364/im-a-mechanical-engineer-and-ive-a-big-interview-coming-up-as-a-developer-in-a-big-it-company-what-should-i-prepare<p>The company expects at least 1 programming language, I'm aware of C but I'm not proficient. What kind of questions I can expect in technical round and which are the toughest programs in C that they may ask? Somebody please suggest me or send me some useful link. Thanx</p>_pathakSun, 13 Jul 2014 15:46:20 -0400http://linuxexchange.org/questions/3364/im-a-mechanical-engineer-and-ive-a-big-interview-coming-up-as-a-developer-in-a-big-it-company-what-should-i-preparequestionisanswerjavascriptprogrammingCan I request a super user that I have dealt with before for a new question?http://linuxexchange.org/questions/3197/can-i-request-a-super-user-that-i-have-dealt-with-before-for-a-new-question<p>Greetings,</p> <p>I have had terrific advice from a super user regarding other questions and would like to have him view my latest dilemma. Is there anyway to send a request for his purview? If so, may I have the steps to do so? I am exceptionally challenged by Xandros KDE that I have yet to understand how to untar, as well as many other functions. Unfortunately most of the directions are from the advanced desktop which I am unable to get due to not having a ksmserver kicker that I am unable to install. Now that I have bored you into a coma, I shall stop babbling and hope for an answer. Either way I wish health and happiness to you and yours!</p>xxfoolFri, 13 Sep 2013 03:17:43 -0400http://linuxexchange.org/questions/3197/can-i-request-a-super-user-that-i-have-dealt-with-before-for-a-new-questionprogrammingSize of the Library/Executable is high in LINUXhttp://linuxexchange.org/questions/2556/size-of-the-libraryexecutable-is-high-in-linux<p>HI All,</p> <p>We have a 32bit Gui application created using C++. We ported the application from Solaris to Linux. Issue we are facing is the size of the library and executable is very large in LINUX compared to Solaris.</p> <p>Red Hat Enterprise Linux 5.4 is the Linux version we using.</p> <p>Please find a sample dynamic library created. We would like to know the following behavior of LINUX is normal or not.</p> <p>Consider we created two files <a href="http://test1.cc">test1.cc</a> and <a href="http://test2.cc">test2.cc</a>. Both having a single line of code.</p> <p>a-2720@N530 /data1/users/a-2720/samp :ls -lrt <a href="http://test1.cc">test1.cc</a> <a href="http://test2.cc">test2.cc</a> -rw-rw-r-- 1 a-2720 mcs 21 May 18 06:16 <a href="http://test1.cc">test1.cc</a> -rw-rw-r-- 1 a-2720 mcs 21 May 18 06:16 <a href="http://test2.cc">test2.cc</a></p> <p>a-2720@N530 /data1/users/a-2720/samp :cat <a href="http://test1.cc">test1.cc</a></p> <pre><code>#include&lt;iostream.h&gt; </code></pre> <p>a-2720@N530 /data1/users/a-2720/samp :cat <a href="http://test2.cc">test2.cc</a></p> <pre><code>#include&lt;iostream.h&gt; </code></pre> <p>Thus the files have only only one line inside them</p> <p>I created a Shared library using these files.</p> <h2>SOLARIS</h2> <p>CC -c -library=iostream -g -mt <a href="http://test1.cc">test1.cc</a></p> <p>CC -c -library=iostream -g -mt <a href="http://test2.cc">test2.cc</a></p> <p>CC -G -h <a href="http://libtestsolaris.so">libtestsolaris.so</a> test1.o test2.o -o <a href="http://libtestsolaris.so">libtestsolaris.so</a> -library=iostream </p> <p>a-2720@N530 /data1/users/a-2720/samp :ls -lrt test1.o test2.o <a href="http://libtestsolaris.so">libtestsolaris.so</a></p> <p>-rw-rw-r-- 1 a-2720 mcs 20944 May 18 06:16 test1.o</p> <p>-rw-rw-r-- 1 a-2720 mcs 20944 May 18 06:16 test2.o</p> <p>-rwxrwxr-x 1 a-2720 mcs 7384 May 18 06:16 <a href="http://libtestsolaris.so">libtestsolaris.so</a></p> <h2>LINUX</h2> <p>CC -m32 -c -library=iostream -g -mt <a href="http://test1.cc">test1.cc</a></p> <p>CC -m32 -c -library=iostream -g -mt <a href="http://test2.cc">test2.cc</a></p> <p>CC -m32 -G -h <a href="http://libtestlinux.so">libtestlinux.so</a> test1.o test2.o -o <a href="http://libtestlinux.so">libtestlinux.so</a> -library=iostream </p> <p>/data1/users/adarsh/samp :ls -lrt test1.o test2.o <a href="http://libtestlinux.so">libtestlinux.so</a></p> <p>-rw-r--r-- 1 adarsh ifo 20220 May 18 06:44 test1.o</p> <p>-rw-r--r-- 1 adarsh ifo 20220 May 18 06:44 test2.o</p> <p>-rwxr-xr-x 1 adarsh ifo 41680 May 18 06:44 <a href="http://libtestlinux.so">libtestlinux.so</a></p> <p>Here we can see that the Linux shared library are in much bigger size than solaris once. Please note that the source file for </p> <p>these libraries are same. Our application uses thousand of files having these header files and hence a notable difference in size occurs.</p> <p>We would like to know this size difference is a normal behavior of LINUX.</p> <h2>System Details</h2> <p>/data1/users/adarsh/samp :cat /etc/*-release Red Hat Enterprise Linux Server release 5.4 (Tikanga)</p> <p>/data1/users/adarsh/samp :uname -a Linux N280 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux</p> <p>Thanks in advance.</p> <p>Sanush Chacko</p>1234567890Wed, 18 May 2011 23:47:55 -0400http://linuxexchange.org/questions/2556/size-of-the-libraryexecutable-is-high-in-linuxsolarisprogrammingc++linuxis there is any IDE or GUI available to work with CASSANDRA DATABASE with PHP?http://linuxexchange.org/questions/1393/is-there-is-any-ide-or-gui-available-to-work-with-cassandra-database-with-php<p>we are doing project currently on php and we want to use cassandra no sql database and is there is any API available like MYSQL? LAMP</p>selvakumarThu, 28 Oct 2010 18:18:01 -0400http://linuxexchange.org/questions/1393/is-there-is-any-ide-or-gui-available-to-work-with-cassandra-database-with-phpprogramming[SOLVED] PyGTK + Glade - Application not going full-screen.http://linuxexchange.org/questions/1315/solved-pygtk-glade-application-not-going-full-screen<p>I am writing an application, and when designing the interface in Glade, at a previous point, I set the default size and "size request" to 800x600. I figured it would be better to run the application full-screen (as it is going to be deployed on a small, embedded system with a 7" monitor).</p> <p>Note, I could not get the application to go to 800x600 by setting the "default size" alone, I also had to set the "size request".</p> <p>So, I took away the "default size" and "size request" and called the fullscreen() function on my top-level, gtk.Window object. For whatever reason though, the window does not go full-screen. I am calling the function right after I assign the widget to a varable. Any ideas?</p> <pre><code>toplevel = gladeFile.get_widget("toplevel") toplevel.show_all() toplevel.fullscreen() </code></pre> <p><strong>SOLVED</strong></p> <p>In Glade, on the top-level gtk.Window widget, I had to set "Resizable" to "Yes".</p>indienickThu, 26 Aug 2010 23:21:16 -0400http://linuxexchange.org/questions/1315/solved-pygtk-glade-application-not-going-full-screenprogrammingRe: Count files on remote server - shell script questionhttp://linuxexchange.org/questions/1215/re-count-files-on-remote-server-shell-script-question<p>Hello,</p> <p>I want to do following by shell script. I have 2 linux servers backup and appl.</p> <ol> <li>From appl check \doc dir of backup server has any new files (created today)</li> <li>If \doc dir has today's created files, then check all files has today's time stamp or partial files were created today.</li> <li>I want to print the result on the screen.</li> </ol> <p>I tried few things but as the files are on remote server, I am not able to create the correct script.</p> <p>Thanks, Dip</p>dipMon, 16 Aug 2010 22:32:44 -0400http://linuxexchange.org/questions/1215/re-count-files-on-remote-server-shell-script-questionprogrammingWhich live CD has all the tools for programmers?http://linuxexchange.org/questions/1138/which-live-cd-has-all-the-tools-for-programmers<p>I am trying to introduce some computer science students to the world Of Linux programing. Instead of asking them to install Linux distribution on their systems, I have advised them to run it through Live CD or through VMWare, for obvious reasons. </p> <p>Now I am looking for a Live CD which has tools required for programming installed in it. They are just beginners so their main requirement is GCC, Vim, GDB and make. But additional tools won't hurt either, like git, doxygen.</p> <p>So which distribution of Live CD would you recommend? </p> <p>Thanks for your time.</p>user-729Sun, 25 Jul 2010 08:20:05 -0400http://linuxexchange.org/questions/1138/which-live-cd-has-all-the-tools-for-programmerslivecdprogrammingProcessing passed arguments in scripthttp://linuxexchange.org/questions/1130/processing-passed-arguments-in-script<p>I'm trying to decide between short and long options, such as:</p> <p>-h </p> <p>vs.</p> <p>--help</p> <p>Obviously there are packages that deal with this, particularly in shell and perl programming.</p> <p>Getopts, Getopts::Std, and Getopts::Long</p> <p>I would prefer to use both, both -h and --help being a call for a help/usage function, but that requires quite a bit more effort.</p> <p>So my question is, what are the pros and cons of both, while I like the readability of the long notation, it's also nice and cleaner to be able to use just the simple single character flags.</p>rfelsburgFri, 23 Jul 2010 15:37:51 -0400http://linuxexchange.org/questions/1130/processing-passed-arguments-in-scriptprogrammingscriptingsystem-administrationbashconfigurationelisp slime and common lisphttp://linuxexchange.org/questions/1009/elisp-slime-and-common-lisp<p>I want to pass the output I get from the emacs function (read-event) onto a clisp process running in emacs through slime. Any help much appreciated.</p>slothcheetahThu, 08 Jul 2010 08:13:14 -0400http://linuxexchange.org/questions/1009/elisp-slime-and-common-lispprogrammingHow to Start process automaticallyhttp://linuxexchange.org/questions/1005/how-to-start-process-automatically<p>Hi,</p> <p>I want to start process automatically For Ex:-</p> <p>To start snort it need the root user, So here I need a script which will start snort automatically without asking the root user or password.So that I can start snort from anywhere as same as root</p> <p>Please help me ....</p> <p>Kind Regards</p> <p>Khirod Patra</p>khirodWed, 07 Jul 2010 16:02:16 -0400http://linuxexchange.org/questions/1005/how-to-start-process-automaticallyprogrammingC language text editor availabilityhttp://linuxexchange.org/questions/974/c-language-text-editor-availability<p>I have an interest in learning C and want to use the Linux platform to do that. While I'm not planning on doing anything large I just want to have an editor that understands the language keywords and provides highlighting at a minimum. Any sort of formatting enhancements would be a plus. What sort of text editors are out there that may fulfill this need?</p>Chris StewartFri, 02 Jul 2010 16:49:13 -0400http://linuxexchange.org/questions/974/c-language-text-editor-availabilitycprogrammingWhich netbooks have hardware well supported by Ubuntu?http://linuxexchange.org/questions/940/which-netbooks-have-hardware-well-supported-by-ubuntu<p>I want a basic machine to do some Internet browsing, email, Twitter/Facebook, and to learn C/Python on. I would prefer to keep it under $300 and therefore I'm looking at a netbook. Can anyone recommend a netbook that has hardware well supported by Ubuntu?</p>Chris StewartWed, 30 Jun 2010 02:05:00 -0400http://linuxexchange.org/questions/940/which-netbooks-have-hardware-well-supported-by-ubuntuubuntunetbookprogramminghardwareClue 8.2 Spanish - Norwegian - Spanishhttp://linuxexchange.org/questions/858/clue-82-spanish-norwegian-spanish<p>1) I have bought the program seen above as an one user license. and got all relevant keys to install the program. User Name: xxxx Program Key: xxxx-yyyyy-zzzzzz Dictionary Key xxxxx-yyyyy-zzzzz</p> <p>On my windows OS it works fine, but as I have decided to use only Linux (Ubantu) I have to solve some problems. After one month I got a message that my 30 days test period has come to an end. </p> <p>I used Wine to install the program. I have tried to delete it and have reinstalled it, no success. I have been in touch with Clue - They did not have no solution except to copy the map for Clue from Programs in Windows to my program map in Ubuntu after installing. No success.</p> <p>2) When I used Clue for the first 30 days I had an other problem. In Norway we have three special letter; æ, ø and å (ae - o with a slash going trough - a with a little o standing over). It was impossible to write words in Norwegian who include one of this three letters.</p> <p>In Clue "options" where this letters occur it is correct. Writing e-mail it works fine. I am using a K1801U from Fuijtsu Siemens as a keyboard.</p>Kjell Arne TvetmarkenTue, 15 Jun 2010 18:36:21 -0400http://linuxexchange.org/questions/858/clue-82-spanish-norwegian-spanishprogrammingWhere can I get a simple Linux IDE (Integrated Development Environment)?http://linuxexchange.org/questions/851/where-can-i-get-a-simple-linux-ide-integrated-development-environment<p>I have an answer for this one ... wanted to share.</p> <p>The question comes up with some regularity. For me it came up because I was teaching a beginner to code in C / C++ on his Ubuntu box, but they had already been spoiled by limited exposure to a Windows IDE.</p> <blockquote> <p>You mean you have type gcc at the command line ... and then you have to type the program name to execute it? Why can't I just hit a button?</p> </blockquote> <p>The answer is that IMHO, teaching a development environment to a beginner before you teach them C makes things harder, not easier. So what you want for a beginner is something as dirt simple as possible, that does not interpose itself between them and their code.</p> <p>I attach my answer ... and am eager for other contributions.</p>pcardoutMon, 14 Jun 2010 05:46:32 -0400http://linuxexchange.org/questions/851/where-can-i-get-a-simple-linux-ide-integrated-development-environmentprogrammingProgramming logic questionhttp://linuxexchange.org/questions/832/programming-logic-question<p>I'm looking for a high level view of how to get a program to tail a file continuously, not at intervals, and actually act on the data it has...whiles till continuously monitoring the file.</p> <p>I'm running into a mental block trying to figure out how to keep the program monitoring, which a while(1=1) loop would certainly accomplish, but how do you act on the data you've gathered, while still monitoring the file...</p> <p>If you exit the loop to act on the data, how do you still keep tabs on where you are in the file, it seems to me these need to be done in parallel...what am I missing?</p> <p>If you need a more concise or clear answer please let me know, I'm having a hard time getting my mind wrapped around this. Thoughts?</p> <p>Thanks,</p> <p>-Rob</p>rfelsburgThu, 10 Jun 2010 20:55:39 -0400http://linuxexchange.org/questions/832/programming-logic-questionprogramminglogsscriptinglinuxbash defeated??http://linuxexchange.org/questions/80/bash-defeated<p>Ubuntu Breezy 5.10 (don't suggest an upgrade - it works!)</p> <p>I'm trying to set up a script which updates some software on the hard drive from a directory on a USB Flash drive.</p> <p>After I've plugged in the USB drive and seen it recognised by automount:</p> <p>ls -l /vol/USBDISKB </p> <p>OK - shows me the directory and files.</p> <p>-BUT_</p> <p>#!/bin/bash if [ -d /vol/USBDISKB ]; then echo "Found USB drive" else echo "Not found: USB drive!" fi</p> <p>doesn't see the USB drive. :-((</p> <p>P.S. I tried to edit so it looks like code. Really.</p> <p>18/04/10 08:54 GMT Well! I don't know are am pretty stupid but I don't seem able to add a comment in response. All I seem able to do is edit my original post :(</p> <p>The obvious typos you can put down to my newbieness.</p> <p>If you are interested on following this question there has developed a much bigger thread here:</p> <p><a href="http://www.linuxquestions.org/questions/linux-software-2/bash-defeated-802372/" rel="nofollow">LQ Thread</a></p>fopeteslFri, 16 Apr 2010 10:55:41 -0400http://linuxexchange.org/questions/80/bash-defeatedbashautoloaderscriptingprogramming