Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
75% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #1K
~24.8K People Reached
Favorite Tags
Member Avatar for ItecKid

How to check if a vector is NULL? [code=c++] vector <int> test; [/code] How to check if this is NULL? [code] if (test == NULL) [/code] returns compiler errors.

Member Avatar for Lucaci Andrew
0
5K
Member Avatar for ItecKid

Hello, I am attempting to write the merge sort algorithm which will generate a vector of 20 random integers and then sort them. The problem is, it does not output the sorted list, it merely outputs a series of zero's and one's. My code is as follows, any help is …

Member Avatar for Calbert21
0
415
Member Avatar for Hoff123

The code can do the talking. main.cpp [CODE] #include "test.h" #include <iostream> #include <string> #define NL "\n" //"NL" = "New Line"(move the pointer to the next line) #define SL "\n\n" //"SL" = "Skip Line"(move the pointer 2 lines) int main() { Cool_Object.cool_function(); return 0; } [/CODE] test.h [CODE] #ifndef TEST_H …

Member Avatar for ItecKid
0
222
Member Avatar for ItecKid

Hello all, I am trying to understand the concept of pipe-ing input/output through a C program. I wrote this simple code: [CODE] #include <stdio.h> #include <stdlib.h> void in_read (int *foo) { read (0, foo, 1); } void in_write (int foo) { write (1, &foo, 1); } int main (int argc, …

Member Avatar for histrungalot
0
183
Member Avatar for ItecKid

Hello all, First off, I am not here to debate the merit of storing PDF as a blob in MySQL. I know this is not optimal solution, but this is the requirement that I have to work with. The upload appears to be successful, (Field in the database is filled …

Member Avatar for cereal
0
2K
Member Avatar for ItecKid

Hello, everyone, Next semester, I will be taking a course in Java programming language, and was wondering if anyone knew of a good IDE that runs in the Red Hat/Fedora environment. (Preferably something installed through YUM.) I tried a Google search on this, yet the only thing I seem to …

Member Avatar for Computerphile
0
382
Member Avatar for ItecKid

I have this code. pthread_create does not through an error message, however it does not execute it's argument function. See comments in code for better description [code=c] void * moveFiles (void * arg); int main (int argc, char **argv) { pthread_t * tid; int rc = 0; /*variables count and …

Member Avatar for ItecKid
0
2K
Member Avatar for ItecKid

Hello, I am trying to read through a UNIX directory in C and write all the filenames to an array. However, the array is not being populated with any value. Here is a snippet of relevant code: [code=c] char **files = {NULL}; struct stat fileinfo; int count = 0; int …

Member Avatar for nezachem
0
108
Member Avatar for ItecKid

*EDIT-I know strtok doesn't actually 'return' a segfault-I realize after submitting topic that is poor wording. Hello, I am having a problem with the C function strtok, as follows: [code=c] void function_name (char * cmd) /* Gathered from another function using readline. Assume 'ls -l' in this example */ { …

Member Avatar for abhimanipal
0
800
Member Avatar for ItecKid

Hello, I am trying to structure query to execute MySQL fulltext search. I have creates simple table as follows: CREATE TABLE IF NOT EXISTS `entries` ( `id` int(3) NOT NULL auto_increment, `doc` text collate utf8_unicode_ci, PRIMARY KEY (`id`), FULLTEXT KEY `doc` (`doc`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ; And …

Member Avatar for mwasif
0
93
Member Avatar for ItecKid

Hello, I have two different tables I need to extract data from. They are linked by a number, that is to say the value of the field 'number' in table 1 is the same value as the value of the field 'num' in table 2. I can select data from …

Member Avatar for urtrivedi
0
131
Member Avatar for MadSkyrim

Hi all, I need a perl script that can open files (given in command line arguments) and extract/print out any dates or times found in it. The format of the dates and times can be any reasonable format. The problem I have is I don't know how to print out …

Member Avatar for MadSkyrim
0
166
Member Avatar for ItecKid

Hello, I am attempting to use JavaScript to 'highlight' text by changing it's background color: [code] <div id="foo" onMouseOver="highlight(this);"></div> [/code] In JavaScript: [code] function highlight (word) { document.getElementById (word.id).bgColor="blue"; } [/code] This produces no effect. I also have an onClick event in the same div, can I not have onClick …

Member Avatar for ItecKid
0
2K
Member Avatar for ItecKid

Hello, I have written a 'predictive text' widget using JavaScript/AJAX. When user enters a string of letters into form, the list of possible matches is displayed under the form. This works well and good, now I am trying to make it so that when the user clicks on a certain …

Member Avatar for Taywin
0
746
Member Avatar for ItecKid

Hello, I am new to PHP language, but not to programming or Regular expressions. I am using [code]preg_match_all ($pattern, $file, $matches)[/code] in my code, where $pattern contains two groups of capturing parentheses. I understand that each element of $matches[1] is an element captured by the first group of parentheses, and …

Member Avatar for cwarn23
0
76
Member Avatar for lastlight

Howdy all, For some reason I just can't get my modules imported into my CGI script and run in a browser. It will print the HTML fine in a command prompt call, but the browser gives an "Internal Error 500." Error in Firefox & IE: Server error! The server encountered …

Member Avatar for ItecKid
0
159
Member Avatar for ItecKid

Hello, all, I am writing an x86 function that is called, with arguments, from a C program. Which registers does x86 store these arguments in?

Member Avatar for Salem
0
60
Member Avatar for ItecKid

Hello, Question regarding the connect function (in Socket), how to specify a specific port? The function only accepts two arguments, the socket and the ip. I have multiple devices on the same ip but different ports that I need to connect to, how to do this in Perl? Thanks.

Member Avatar for Abinila
-1
106
Member Avatar for SpyrosMet

My problem is the array Field which is considered by the compiler as undeclared. I declared the array in main and i'm trying to access it through the following .cpp file. animals.cpp : [CODE]#include <cstdlib> #include "organisms.h" #include "animals.h" // class's header file // class constructor Animals::Animals() { } void …

Member Avatar for SpyrosMet
0
128
Member Avatar for pcpp

hello , i am starting to program my project in c++ i need help in direction. my project is like wikpedia . i should enter about 3 value in each catagory (3*7) . the search will be by pressing some value and then a list will open with all the …

Member Avatar for VernonDozier
0
100
Member Avatar for Nikhar
Member Avatar for Nikhar
0
64
Member Avatar for chrisname

So I decided to learn Perl yesterday, and I'm writing a Perl script to try and parse HTML files (not using regexps for the actual parsing). Anyway; I have this subroutine to iterate over each argument in @ARGV and, if one of them is an existing file, return it's filename …

Member Avatar for chrisname
0
141
Member Avatar for mubdea
Member Avatar for jonsca
-2
237
Member Avatar for Stefano Mtangoo

Please help me to setup my development enviroment on Mandriva 2010. I used to MINGW and Codeblocks then Codelite. So I would be happy to have some IDE full bundled with GCC. I have googled but nope, nothing comes. Iam posting at codeblocks forum too :)

Member Avatar for ItecKid
0
98
Member Avatar for ItecKid

Hello, I am trying to send e-mail using Perl and Net::SMTP::SSL. However, I receive errors when running this script (example from documentation): [code=perl] #!/usr/bin/perl -w use Net::SMTP::SSL; sub send_mail { my $to = $_[0]; my $subject = $_[1]; my $body = $_[2]; my $from = 'me@gmail.com'; my $password = 'MySuperSecretPassword'; …

Member Avatar for simfex
0
653
Member Avatar for Vindhyaauri

Hello, I'm a newbie here and also to Perl... Have a big task of finding the lines of the form from a file ATOM 1 N LYS A 257 -5.036 -29.330 -27.709 1.0041.51 N ATOM 2 CA LYS A 257 -3.873 -29.331 -26.757 1.00 41.55 C . . . ....n …

Member Avatar for d5e5
-1
435
Member Avatar for Happy Family

struct date{ int y; int m; int d; long int calculate_date(/*struct variable */) { //.... } }; void main () {/*here how to call function and define struct var*/ }

Member Avatar for Narue
-1
82
Member Avatar for anna2

I have this exercise that i need some help with !! • Write the function fahrenheit that returns the Fahrenheit equivalent (as a float value) of a temperature value in Celsius. The function has one integer parameter for the temperature in Celsius. [Hint: Tf = (9/5)*Tc+32; Tc = temperature in …

Member Avatar for ItecKid
0
99
Member Avatar for ItecKid

Hello all, I am trying to write a clustering algorithm where, given location of certain points (I.e, latitude and longitude) I need to choose 50 of these to be cluster centers such that the diameter of each cluster is minimized. To that end, I believe that the program should choose …

Member Avatar for ItecKid
0
109
Member Avatar for zobadof

[code] #include <iostream> #include <iomanip> { void DispalyStoreItems (); int ChoosingItems (); double calculateChange ( int , int ); { int cost; DispalyStoreItems (); cost = ChoosingItems (); calculateChange ( int pay , int cost ); system ("PAUSE"); return 0; void DispalyStoreItems () { std::cout <<"Code" << setw (10) << …

Member Avatar for Nick Evan
-1
162