|
More site info...
Programming | Forum profile
|
|
Forum profile page for Programming on http://www.linuxquestions.org.
This report page is the aggregated overview from a single forum: Programming, located on the Message Board at http://www.linuxquestions.org.
This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period.
Additional forum profile information for "Programming" on the Message Board at http://www.linuxquestions.org is also shown in the following ways:
1) Latest Active Threads
2) Hot Threads for Last Week
Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.
|
|
|
|
|
Posting activity on Programming:
|
|
Week
|
Month
|
3 Months
|
|
Threads:
|
276
|
839
|
2,365
|
|
Post:
|
906
|
2,575
|
7,697
|
|
|
Programming Posting activity graph:
|
Top authors during last week:
user's latest post:
Need help in bash scripting in...
Published (2009-11-25 10:51:00)
break does what it says. look at select and case in the bash manual. even better, look at dialog or Xdialog
user's latest post:
How to remove lines and parts of...
Published (2009-11-25 02:46:00)
@OP, you probably should read up the docs for a start. for you first question and with your sample data, you can just do a split(), then remove the first column Code: for line in open("file"): print ' '.join(line.split()[1:]) to remove first 5 characters Code: print line[4:] these are just the basics. so read up the docs, then try to do the third problem. Regex expression?? NO NEED.
user's latest post:
SHELL SCRIPT for multiple SCRIPTS
Published (2009-11-25 12:13:00)
It might be better to source the second script rather than passing it something to execute (an accident waiting to happen.) It seems there two unrelated tasks here, though. The normal way to determine file type is with file (as finer detail than bcdspl- is apparently needed.) Kevin Barry
user's latest post:
Needed Help in PHP? - Page 2 -...
Published (2009-11-22 03:53:00)
Shall I try with what you said before.. i tried all the stuffs but things dint work
user's latest post:
how to write a device driver for...
Published (2009-11-25 15:20:00)
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate. Please continue here: http://www.linuxquestions.org/questi...driver-769396/
user's latest post:
struct inside a struct
Published (2009-11-25 15:16:00)
Quote: Originally Posted by primenu The two variables of switch class are : Channel *Input_Channel[]; Channel *Output_Channel[]; That needs some explanation. You are declaring two arrays of unspecified size and each element of each array is a pointer to an object of type Channel. Where are the actual arrays defined (since the size isn't specified, what you showed doesn't actually define either array)? Where are all those pointers...
user's latest post:
SHELL SCRIPT for multiple SCRIPTS
Published (2009-11-25 11:51:00)
Or the secondary script could output an assignment statement (like foo=bar) which the first script could execute ...
user's latest post:
nOOb inheritance question
Published (2009-11-25 22:46:00)
I think I get this, but feel free to tell me if I'm wrong. If I have icon.h: Code: #include <wx/wx.h> class Icon : public wxFrame { public: Icon(const wxString& title); }; and icon.cpp: Code: #include "icon.h" Icon::Icon(const wxString& title) : wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(250, 150)) { SetIcon(wxIcon(wxT("web.xpm"))); Centre(); } I understand...
user's latest post:
Python, C++ or Ruby - Page 4 -...
Published (2009-11-19 16:33:00)
Quote: Originally Posted by pixellany careful---I think you meant to say: "A purist with possible evangelical tendencies" You're right...my fingers slipped
|
|
|
|
Latest active threads on Programming::
Started 12 hours, 4 minutes ago (2009-11-27 09:08:00)
by David the H.
You need to put spaces between the parentheses.
Code:
ORDERIDARRAY=( $( cat temp-array.txt) )
And you probably don't need to mess with IFS unless there's a possibility of spaces appearing in the individual entries.
More on arrays here:
http://www.tldp.org/LDP/abs/html/arrays.html
Bash version 4 also has a new "mapfile" builtin that reads lines from a file into array entries...
Started 17 hours, 23 minutes ago (2009-11-27 03:49:00)
by graemef
I don't fully understand how you are trying to implement the collision code. I don't see where the size of the object is coming from. Here is the basic idea that I would use. Throughout this assumes that the image is a rectangle.
First a small image:
Code:
#####
#####
#####
#####
X####
The # indicate the size of the image, whilst the X indicates the bottom...
Started 1 day, 10 hours ago (2009-11-26 10:15:00)
by theNbomr
In Linux, devices (like serial ports), are abstracted as files. To use them, you use the same paradigm as used for accessing files: open(), read() write(), close(), etc. For serial ports, you also use the termios interface to set parameters such as bit rate, word size, parity, and especially terminal oriented processing performed by the device driver, such as end-of-line processing.
For ...
Started 12 hours, 11 minutes ago (2009-11-27 09:01:00)
by ntubski
Quote:
Originally Posted by icecubeflower
nevermind
I don't mind; I'm just replying to take this off the 0-reply list so it stops auto-bumping.
Started 12 hours, 16 minutes ago (2009-11-27 08:56:00)
by sycamorex
Welcome to LQ.
What have you done so far to solve this problem?
Started 17 hours, 17 minutes ago (2009-11-27 03:55:00)
by rikijpn
It's very simple. You just test on an "if" line whether the pattern was found or not, then you do echo or printf to print a message. Something like
Code:
if [ `grep someword somefile|wc -l` -gt 0 ] ; then echo "pattern found"; else echo "pattern not found"; fi
If you have to put it like right in the file, just use sed and replace the string by itself plus some line.
Started 13 hours, 56 minutes ago (2009-11-27 07:16:00)
by salasi
you might want to look here , where you seem to have been more succesful in writing an actual question.
Started 13 hours, 56 minutes ago (2009-11-27 07:16:00)
by mknirsch
The mouse (pointer) generates events when it moves, when it crosses window borders and when buttons are pressed.
When one wants to obtain the final pointer position XQueryPointer() is a good function to call.
ButtonPress and ButtonRelease events are fired when the pointer buttons are presses and released. A mouse ( pointing device) can have many buttons, these buttons are mapped on a bit...
Started 14 hours, 44 minutes ago (2009-11-27 06:28:00)
by timmeke
If you don't want to spend much time coding, I suggest you take an existing php+mysql supporting CMS.
There are plenty of free CMS available.
Started 1 day, 6 hours ago (2009-11-26 14:28:00)
by bigearsbilly
well,
all process memory is reclaimed on exit, so for a simple fire and forget app
it's not such a big worry.
you could delete but as the prog is about to die anyway it's a waste of keystrokes!
remember tutorials generally get you up and running with
minimal checks and safety devices.
otherwise the examples get too long.
|
|
Hot threads for last week on Programming::
Started 6 days, 17 hours ago (2009-11-21 04:00:00)
by your_shadow03
I have the following error messages in apache logs :
Code:
[Sat Nov 21 14:25:12 2009] [error] [client 10.14.236.169] PHP Warning: fgets(): supplied argument is not a valid stream resource in /var/www/notice.php on line 70, referer: http://<IP>/notice.php
any idea what is this all about?
Started 1 week, 3 days ago (2009-11-17 13:02:00)
by Komakino
This gets asked a lot
And I hate to say it, but there's not going to be a definitive answer! The truth is eventually you'll end up learning several languages anyway, and it's probably fair to say that once you know one language you can easily pick up others.
For what it's worth I would discount Ruby. Don't get me wrong, I think it's a great language but it's lacking documentation (in ...
Started 1 week, 1 day ago (2009-11-19 13:57:00)
by manu-tm
Started 5 days, 14 hours ago (2009-11-22 07:01:00)
by ghostdog74
show input examples and output.
Started 1 week, 3 days ago (2009-11-17 18:28:00)
by ghostdog74
show your entire code. show your input data, describe your output.
Started 4 days, 3 hours ago (2009-11-23 17:59:00)
by Sergei Steshenko
Quote:
Originally Posted by jmite
Does anybody know if someting like this is valid in C++?
This assumes that class Foo has already been defined.
Code:
int size;
cin >> size;
Foo theArray[size];
for (int i=0; i<size; i++){
Foo theArray[i] = new Foo;
}
I'm still pretty fresh when it comes to pointers, ...
Started 1 week, 2 days ago (2009-11-17 21:26:00)
by gilead
You could try this:
Code:
#/bin/bash
if [[ "$1" = "" || "$2" = "" ]]
then
echo NO ARGS
exit 1
fi
diff -s <(md5sum $1 | awk '{print $1}') <(md5sum $2 | awk '{print $1}')
The output is a little messy, it talks about file descriptors instead of the file names.
I'd suggest reading the Advanced Bash Scripting Guide , it's got a range of techniques and good explanations...
Started 2 days, 15 hours ago (2009-11-25 05:30:00)
by druuna
Hi,
When using grep it sometimes happens that the grep statement itself is also caught, but not always.
Change count=`ps aux|grep programtostart|wc -l` to
count=`ps aux | grep "[p]rogramtostart"| wc -l` or count=`ps aux | grep programtostart | grep -v grep |wc -l`
Hope this helps.
PS: count is now 0 (zero) when the process is not found.
Started 3 days, 9 hours ago (2009-11-24 11:18:00)
by Guitarist88
There are a lot of great books about using the Qt GUI toolkit. Coming on here asking for someone to do the work for you or tell you how to do everything, essentially, sounds like you have no initiative. Get one of the books... Also, Qt's own documentation is very helpful. There are many examples and tuturials you can work through.
http://doc.trolltech.com/4.3/tutorial.html
Started 6 days, 15 hours ago (2009-11-21 06:09:00)
by anurag4u
Hi All,
Currently I have a very old application based on 8-bit color depth on Xsun on Solaris platform which displays gray images.
At present its working fine but I want to improve the image quality by going to 24-bit mode, so that I can get more shades of gray color.
I am a newbie in Xlib programming so don't know how to get gray color for my image in 24-bit color depth.
In 8...
|
|