199,114 Archived Topics
Remove Filter ![]() | |
Hi people, I need help to produce a VHDL behavioral code for my final year project, I need to create a 256 point radix-2 fft processor on a spartan-3A DSP FPGA and I am so stuck using modelsim and XILINX 10.1, I have reached to this point the code is … | |
hi .. I want to display an error if the user didn't enter the id or the password in the Text fild.. but nothing happed when I compare it to null .. or to "" .. is there any way to do this? I also tried to compare it with … | |
At the moment Im developing a java application but Im having a problem. Im using a JFrame that takes different JPanels, I mean i change its ContentPane for another JPanel everytime i want to show new information. Im using a database too, im reading data from it im writing them … | |
int fun(int(*)()); int main() { fun(main); cout<<"in main"<<endl; return 0; } fun(int (*p)()) { cout<<"in fun"<<endl; return 0; } the output is.... in fun in main how and in which manner is "main" being passed in the fun function argument in main function. does this way of passing automatically mean … | |
For some reason, I can't even get a simple "Hello World" to print out in terminal. I'm using Borland C++ Builder 6. The Form1 window comes up but nothing is written in it. No errors, just a blank page. | |
Anyone who knows how to apply this in php scripting? the scripts in this site can be xecuted in mysql console but I can't get it working in php script in the website im studying. I want to create a tree like this: [URL="http://sitepointstatic.com/graphics/sitepoint_numbering.gif"]http://sitepointstatic.com/graphics/sitepoint_numbering.gif[/URL] | |
I have written a script for scraping a web site, and it works fine. What does not work fine, is when I try to use the write function, to write the results to a txt-file. I am trying to run this: import BeautifulSoup, urllib2, re, time import codecs path='C:/Users/Me/Documents/Python' outfile=open(r'C:/Users/Steinar/Documents/Python/Vegvesen/vegresultat.txt', … | |
Hello everyone, I'm learning Python and I have a few questions about Dictionaries and sorting them by a value other than the key. Lets say, for example, I have a Dictionary full of data that needs to be sorted on the 3rd value instead of the key. How would I … | |
I was wondering if I can create an arraylist with info already in it... Ex... ArrayList playerinfo = [P0,[[1,2,3],[4,5,6]]] If that makes sense. The info I want in the arraylist will always be the same, as it will be what I am using to test my program. However I need … | |
Sample code for taking input from Shell demonstrating string and int input For simple programs or testing purpose its not always required to take input thru GUI. | |
Long story sort, I'm making a thread in c++ that starts a timer. When a user starts playing the game, it starts the thread, and when user logs out - thread stops. - thus giving me the total time played. Problem: When using the code to start the thread - … | |
I am wanting to create a drop down menu that displays one value in a database inside the form, but passes another value when the form is submitted. For example I have a table named users with entries: ----------------------------------- ID | UserName ----------------------------------- 1 BobG ----------------------------------- 2 JaneD I want … | |
How can we filter categories (checkbox) like this: [url]http://tp.jobscentral.com.sg/pubsearchjobs.php[/url] ![]() | |
I am making a PHP blog library. I am new to web development and only really programme in C++ or Python. So, I have probably done something really stupid, but this code doesn't work: [CODE] <?php class Blog { public $version = 1.0; public $mysql = NULL; public $servername = … | |
Hi, I am trying to match phone numbers, and want only having format xxx-xxxx. Here is what i have written so far : [CODE]sub OfficePhoneNumber { my @numbers = @_; my $number; my @results; foreach $number (@numbers) { if ($number =~ m/(^\d{3}-\d{4}$)/) { push @results, $number; } } return @results; … | |
I want to calculate average of grades of each student with SQL command but I encounter problem with this code. I have 3 tables related to each other and want to calculate average of student grades. This is my SQL string but it dose not work. What is the problem … | |
I have a file of the following format: a 1 a 2 a 3 b 4 b 5 b 6 c 7 c 8 c 9 Here is my code: [CODE]def file_to_dict(fname): f = open("file.txt") d = {} for line in f: columns = line.split(" ") letters = columns[0] numbers … | |
I am trying to determine if a word is a palindrome or not using queues, but I am receiving the wrong results. I have tried several things to get it to work using the boolean variable isPalin. Will someone lead me to the right direction please? I have been trying … | |
I am taking a Class on Java, and sadly the professor is not all that good. But we have a project to do... I have got to a point where I need to pull info out of an arraylist... But it is an arraylist that is made up of arraylists. … | |
Is it possible to overwrite internal javascript? I am working for a non profit as an internship and they want to escape a template that almost all of the non profits in that organization have to use, the catch is the template is written in Javascript if it is possible … | |
I know it's a lot of code but any help anyone can give would be amazing. Basically when I re-write out to the binary file it must not be working because when I try to print it it only prints the record I updated. [code] void updateRecord() { int key; … | |
Hi all; I am so new in C.I have problem about array .I want to remove same element in array but i dont know how can i do. Can anyone help me example : 1,2,3,5,67,31,13,5,2,1,1,4, the program should produce -->>1,2,3,5,67,13,31 | |
i have to write a rock paper scissors program in python, but every time i run my code... [CODE]def rockPaperScissors(): import random computerIndex = random.randint(1,3) if computerIndex == 1: computer = "rock" elif computerIndex == 2: computer = "scissors" else: computer = "paper" player = raw_input("rock, paper or scissors :") … | |
Hi, may anybody tell me what "initializes the interpreter" mean in detail? Does this function starts a new process or thread of the python interpreter in the background or what does this call do?? Hopefully somebody can give me a little hint :) Jonny | |
Thanks to a friend I was able to code a sub that opens a StreamReader and Writer. The Reader reads a *.txt file and the Writer modifies it line by line as it's entered into the memory then writes it to a temporary file which is then copied over the … | |
Hi there, This is my first time working with an unsafe language, so naturally my first code would be full of memory-related bugs. I still have no idea how I ought to approach some of the problems I've been getting, and I've been resisting asking for help as much as … | |
As part of my program, I have defined and initialized a structure. But when I compile it, gcc gives me the following error on all the initialization " initializer element is not constant". Anyone know why this is the case? [code] struct RECORD { char* username; char* password; char* type; … | |
Hi, I have a solution set up in .Net with a website. Each page is written in aspx and each code behind file are in the format of aspx.cs. For some reason when I build the solution it builds successfully although does not compile these code behind files to a … | |
Hello there~ Well, straight for the problem: I have a class with a private vector that stores pointers: [code]class MyClass{ private: vector<myOtherCls*> myVector; public: //using the following till now: vector<myOtherCls*>& getContainer(); };[/code] [code]class myOtherCls{ public: void someGetFunc(); };[/code] Now I dont want to use [icode]getContainer()[/icode] but rather he Subscript-Operator. [code]MyClass … | |
Hey everyone, I have a job interview coming up and despite the fact that most of the job is in C++, they want me to do the interview test in C which I have no experience in, not to mention my C++ is kinda rusty. Now I would normally have … | |
I keep getting this message Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/j/a/c/jackattacksite/html/register.php on line 80 Here's the code: [CODE=php] // Connect to database include_once "scripts/connect_to_mysql.php"; $emailCHecker = mysql_real_escape_string($email1); $usernameChecker = mysql_real_escape_string($username); $emailCHecker = eregi_replace("`", "", $emailCHecker); $usernameChecker = eregi_replace("`", " ", $usernameChecker); // Database … | |
hai, i want to select only parent checkbox. then automatically check all child checkboxes. i mean checkall checkboxes at once. using javascript[CODE] <SCRIPT LANGUAGE = "JavaScript"> <!-- function modify_boxes(to_be_checked,total_boxes){ for ( i=0 ; i < total_boxes ; i++ ){ if (to_be_checked){ document.forms[0].chkboxarray[i].checked=true; } else{ document.forms[0].chkboxarray[i].checked=false; } } } --> </SCRIPT> … | |
Hi all, I want to take this code: [CODE]list_in_list = [[1,5,13,30,-4], [1,5,10,30,-4], [1,5,15,30,-4], [1,5,9,30,-4], [1,5,16,30,-8]][/CODE] and sort it by the 3rd item in each sublist (list_in_list[x][2]) I'd like to do it by the highest number so my output would be: [CODE]sorted_list_in_list = [[1,5,16,30,-8],[1,5,15,30,-4], [1,5,13,30,-4],[1,5,10,30,-4], [1,5,9,30,-4]][/CODE] Any help or suggestions? | |
I have a dictionary like {"a":["b", "c", "d"], "b":["h", "i", "j"], "c":["k", "l", "m"]. I need to write a function that returns True if a requested key has requested value. Also, if "a" has "b" and "b" has "h", "i", and "j", then "a" has "b", "c", "d", "h", "i", … ![]() | |
Hello. I have a question about Const Int and Points I have this code [code] const int j=18; int *k= (int)&j; *k=110; printf("Data: %d -> %d; %d : %d-> %d\n", &j, j, k, &k, *k); [/code] this well return for me [b]Data: 2280676 -> 18; 2280676 : 2280672-> 110[/b] but … | |
Problem: Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: `void getScore()` should ask the user for a test score, store it in a reference parameter variable, and validate it. This … | |
If I have two lines of text: HOOK HOOK HOOK what is the syntax to grep just the first line without the second? and the second without the first? | |
I am new to programming (but not to the concepts) and I need to process some .csv files. Here's what I have: The files containing Cartesian coordinates, XYZ of various "polygons." (They are cell perimeters of a mouse embryo) The polygons are in quotes because they are not closed, and … | |
I wonder if it is possible to send text file which is just at this moment prepared and it would be best if the file coud be send without creating on disc. For example I would like to have on my web [code]<a href="day.php">this day</a>[/code] and when you click on … | |
Hi, I have a checkbox list with a list of books. Depending on the user, some of these books were already chosen. Let's suppose that I have a list of the following books: Programming ASP.NET Learning ASP.NET Beginning Web Development ASP.NET for Dummies But the books the user A chose … | |
The line I get an error on is this: [CODE]List accDetails = (List)tm.get(accNo)[/CODE] "tm" is a TreeMap, and "accNo" is a value in it. accNo is a String. I get a build error like this: java.lang.String cannot be cast to java.util.List I have no idea what to do here, I've … | |
So I finally get to the end of this evil program, and then it won't compile because it says "type double not expected". Here is my error message in its entirety: program 3 item.cpp(111) : error C2062: type 'double' unexpected program 3 item.cpp(121) : error C2062: type 'double' unexpected program … | |
please can someone tell me the source code of a c program? the program is "create a c program to print the employee pay revision list using arrays and functions and structure" please do reply fast as i need help urgently | |
hi guys, just want to ask if it is possible to check which link on the page receives a focus? For example, i got Links name A1, A2, A3, A4 and A5. How to check which link is currently receiving the focus? is it possible to do? thanks ... | |
I want to use the function preg_match_all to catch data in a web page ------------------------------------------------------------------------------------------ int preg_match_all ( string $pattern , string $subject , array &$matches [, int $flags [, int $offset ]] ) Searches subject for all matches to the regular expression given in pattern and puts them in … | |
hello, my problem is: i have a function that i pass a pointer to so that it can update a variable for me. when this function is called normally the variable updates and everything works fine. BUT when i call this function *as a seperate thread*, and pass it the … | |
Hi, index.php posts data to process.php I want users to remain in index.php when they summit their form. I have seen this in some websites but don't know hot it done. Can anyone help me? Thanks | |
i have looked and looked for this and so far all the code i've downloaded simply doesnt work. this code (below) works fine - however it opens up the "save file Dialog" and requires that the user select the path to save the .html file. how can i by-pass that … | |
can somebody explain the behaviour of the statement printf("%d"); is it any where depends on the statements that present before or after it. i have some satatements that allocates memory dynamically. its printing one of that value. is there any proper reason for undefined behaviour. | |
A function that takes a string and returns the number of words in the string. An example of using pointers in Pascal. |
The End.