64,152 Solved Topics
Remove Filter ![]() | |
I need to display all the comments from the comments database table where the $msg_id_fk = $msg_id from the messages table and I need it in a while loop [CODE] $comment_results = mysql_query("SELECT * FROM comments WHERE msg_id_fk='$msg_id' ORDER BY com_id ASC"); while ($row = mysql_fetch_array($comment_results)){ $msg_id_fk=$row['msg_id_fk']; $comment=$row['comment']; } $message_results … | |
i'm newby to C++. Small code as follows: [code] int main(int argc, char* argv[]) { cout << "function main() .." << '\n'; char ch1; int int1; cin >> ch1; cin >> int1; cout << ch1 << '\n'; cout << int1 << '\n'; return 0; } [/code] when i run the … | |
Hi I am looking for a php code formatter that has to has two features: formatting arrays, so an array like this: [CODE]array ('key_of_first_value' => 'value','another_key' => 'value1', 'test_key' => 'value2');[/CODE] to this (note that the sign => is aligned among all array elements): [CODE]array ( 'key_of_first_value' => 'value', 'another_key' … | |
I need to retrieve the records which are between the selected days(TWO dates are of two different fields in DB) i tried this in php and its working [CODE]SELECT * FROM guest_info where check_in = '$check_in' and check_out= '$check_out'; [/CODE] but when i insert "between" noting happens [CODE]SELECT * FROM … | |
Hi Is it possible to execute normal php code under zend framework php. As far as i have heard php is a MVC model style coding. But i have not done MVC programming in php. I have an appplication where i need small modification. I have done some programming in … | |
I have an eclipse application from which i trigger an Swing widget.On click of a button on the SWT composite a window pops out which contains the Swing Table. Now i want a button on this Swing page to show up an eclipse workbench window. Any idea on how I … | |
Hello, I'm new to programming forums so go easy on me :) I'm working on an assignment for school. I have to read a quiz.dat file which cotains info in the format of: TTTTTFFFFFTTTTT TTTTTFFFFF TTTTJoe Jones TTTTTFFFFFT TTFMary Jane ... ... etc. The first line being the answer key … | |
Can someone please tell me why I might be getting a access violation when doing the following for a double linked list: [CODE=C++] ~DLList() { while(!isEmpty()) //isEmpty is working.. removeHead(); } bool isEmpty() { if(head == NULL && tail == NULL) return true; else return false; } char * removeHead() … | |
ok so i am trying to do a little phone book. i have a class that has information on the individual, the main would read from a file of individuals and ask if the user wants to add or remove , and the last one is array of individuals..here is … | |
So guys for the sake of simplicity lets say i am developing a huge matrix multiplication program using C and i made a data structure which is able to represent this huge matrix into miniature blocks the down side is that this representation of block takes much more memory than … | |
I'm making a game as my project in school. I'm having a problem regarding double buffering, im trying to draw an image (drawImage(,,,,)) into the double buffered image, I can't seem to make it work help please =D [CODE] public void render() { if(doubleBufferImage==null){ doubleBufferImage = createImage(PANEL_WIDTH,PANEL_HEIGHT); // Set Size … | |
[CODE] private void testFunc() { int[] arrayParam = new int[88]; arrayParam[2] = 67; calledFunc(arrayParam); Console.WriteLine("testFunc Done"); } private void calledFunc(int[] intArray) { Console.WriteLine(intArray[2]); //if new array declared, values not changed in testFunc intArray = new int[66]; intArray[2] = 33; intArray[5] = 55; } [/CODE] If calledFunc simply changes array values, … | |
hi, here is my code having return method that working correctly when i print it from inside of the method, but if i call from main method its shows only one output instead all results.. [CODE]public class SearchCompare{ .... public String process(){ String showResult=null; ... .. for (String found: names.keySet()) … | |
Sir, I am using the following code in my vb.net while using that code it will show me syntax error. [CODE]Private Sub updateinfo() Dim con As OleDbConnection Dim cmd As OleDbCommand Try con = New OleDbConnection(connectionString) cmd = New OleDbCommand("UPDATE [Lani] SET [First Name] = '" & txtfirst.Text & "', … | |
Will the new WPF 4 support multi-touch development on the HP TouchSmart computers? I know there is HP TouchSmart Developer kit, but it doesn't support the express editions of Visual Studio, and Visual Studio is kind of pricey. | |
Hello, it's my first post and I'm not sure if is the right place. I want to integrate some contact form into my website, but every page I have diferent email address and ID, 2 or 3 page it's ok, I can do manually, but it will be hundreds of … | |
I posted a snippet about using a microcontroller as a mouse, and it works great, but it moves the mouse as a stepper motion. How would I go about making it velocity driven? Like when I tilt the accelerometer further, the faster the mouse moves. I've seen it on youtube, … | |
In trying:[CODE]string var1 = Something"; Console.WriteLine("{0} ... \{", var1);[/CODE] to get: Something ...{ I get an error: Unrecognized escape sequence. Without the backslash I get an error: Input string was not in a correct format. Using "{0} ... \x7B" doesn't work: Input string was not in a correct format. (\x78 … | |
When I try to compile this: [code=C++] //Player Class Definitions #include <iostream> #include "player.h" using namespace std; player::player() { health = 100; level = 1; potions = 10; enemiesDefeated = 0; } int player::attack(int *enemyHealth) { srand(time(NULL)); int randomNumber = rand() % 100; *enemyHealth = *enemyHealth - randomNumber; } int … | |
Hello, What I am trying to do is edit the variable of a class through a separate class function. I have tried to do things like [code=C++] int player::attack(int *enemy) { srand(time(NULL)); int randomNumber = rand() % 100; *consolePlayer.health = *consolePlayer.health - randomNumber; } [/code] and I get the error … | |
Hey Guys, I have a quick question. I want to make sure I am doing this right, according to my understanding of the PHP manual. Here's my question: If I have an "address" input field for my form and a user inputs their address and then this information is passed … | |
delete this, solved, had to do with how a variable was declared | |
I have three files: main.cpp [CODE]#include "CMain.h" int WINAPI WinMain(HINSTANCE hIn...) { return 0; }[/CODE] CMain.cpp [CODE]#include "CMain.h" using namespace Program; LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { switch(msg) { case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hwnd, msg, wParam, lParam); } return 0; } CMain::CMain(void) { … | |
im trying to install my youtube clone script i brought from Vshare.com on my server and this is the error message i keep getting. Warning: fopen(../include/config.php) [function.fopen]: failed to open stream: Is a directory in /home/poetryba/public_html/install/install_collect_info.php on line 86 Warning: fputs(): supplied argument is not a valid stream resource in … | |
Hello I'm creating a game engine. In order to draw everything correctly I need to sort a vector (vector<game_object*>) by each contents z value I miserably failed to do it with std's sort() so Id like to know what's the most efficient way I could sort this vector [If its … | |
[URL="http://i41.tinypic.com/n2ef5k.jpg"]Screenshot.[/URL] Hello, I have a problem already for like a week and I seriously can't get out of it. Take a look at the screen shot. The server sends a packet to the client to spawn an NPC. If you look to the top commandline-window, the client does recv the … | |
I am fairly new to PHP-MYsql and HTML programming. So Please bear with me, I'm trying to create a function which will produce an array of 'Fields in a Table' and combine that array with an array of 'Column Headings' to produce an associative array like this; $labels= array('IDno' => … | |
So I have the following implementation of linked list: [CODE=c] #ifndef LINKED_LIST #define LINKED_LIST struct Student { char* name; char* surrname; char* signin_number; char* grade; char* date; struct Student* next; }; struct Student* begin = NULL; void push_back(struct Student* student) { struct Student* temp = NULL; if(begin == NULL) { … | |
#include <iostream> using namespace std; int main() { int list[12] = {8,1,11,4,2,9,10,5,3,12,6,7}; cout<<list; return 0; } I run the above code and get this: 0x22fef0Press any key to continue . . . Please help!!! New with C and new with Dev-C++ which my University wants us to use... Running from … | |
Hey Everyone, I am getting an error with a PHP script made using the Authorize.net AIM (Advanced Integration Method) API for my donation form. I have gone over the code dozens of times and still do not know why it is not working. Everything works except the most important part...it … | |
I need to create some kind of web interface that will allow users to view all of our conference room Outlook calendars/availability at one time. From there, they should be able to select a date/time and automatically bring up a new appointment in their Outlook client and schedule a meeting … | |
Hello DaniWebbers, I've got several href's that take the user to different forms. However, in order to have access to the forms, they have to log in. So when they click the link, they are redirected to a login page if they have not already logged in, otherwise they are … | |
Hello. I am creating a template class derived from another template class to basically mimic the behavior of the STL stack for a school project. I am getting a compile time error when try to use a variable named "copy" when testing the overloaded '=' (defined in the base class) … | |
I'll do my best to be as clear as possible about what I'm trying to do. In short, I'd like to know if a switch statement can check multiple variables simultaneously (I have a feeling it can't, but I'd like to confirm). If it can't, can someone recommend a way … | |
hi everyone, i'm new in c#, so i have some questions: i have this piece of code: [code=c#]Graphics gfx = this.CreateGraphics(); Pen myPen = new Pen(Color.Azure, 1.0f); Rectangle myRec = new Rectangle(10, 10, 30, 30); gfx.DrawRectangle(myPen, myRec);[/code] and i want the rectangle myRec appear on the form1 when i press … | |
Does anybody know of any libraries or scripts or even code snippets that can generate HTML code from a diff or comparison of the contents of two files? I know of the HtmlDiff class in difflib, but the format it outputs is not the one I want (it puts both … | |
I'm trying to declare a vector as a global variable, and am getting a linker error. I read up on linker problems with multi-file projects, pretty sure I've included the proper headers, used extern, and #ifdef properly, but I can't get it yet. Here is what we have: [CODE] //in … | |
hi i have a problem with datagridview. I have about 5 datagridviews displaying different items. Now my issue is that how will i know which datagridview the user selected and add from that datagridview only? at the moment the user can add from different datagridviews because the first row of … | |
hi everyone, i'm new in c# and events handling techniques, and i have a problem: how can i call paint event inside of mouseclick event? [code=c#] private void Form1_MouseClick(object sender, MouseEventArgs e) { Form1_Paint(?, ?); //i need something like this... } [/code] i want to move rectangle(paint event moves it, … | |
I got a simple javascript function in my asp.net page that just checks to see if one value is smaller than the other. The condition value is 15000.00 and i'm comparing it to 920.00 Why does it evaluate to false? [CODE] var moo= 15000.00; var orig= 920.00; var bool = … | |
Hi I have a problem with this code. I'm trying to save a values in the database.. When I click the save button the table is being updated and showing the new values I entered. But the problem is it is not actually saved in the database, when I re-run … | |
l have got a table populated with data. l need to export and append the contents of the table to an existing table. l have got an auto_increment column which l need to change so it starts at 100 not one | |
I am trying to create a rational numbers program from scratch (I'm a brand new student basically), and I have all my inputs working right now. My problem lies within my showFraction() function, but I can't figure out how to fix it. It should output the inputs from the user … | |
Hello peepz..Please try to look at my codes and read every comments i put there..I hope someone could help me with it..Especially those it graduates and higher level to me..I'm only first year college student..We're on visual c++..This is the link to my codes, please [url=http://ke14.emenace.com/Files.zip]download[/url] and post the solved … | |
Hello All! How can I automatically change permissions just for files in current directory and not for other directories. I suppose that 'chmod -R 664 .' will change permission to all current directory content.. | |
I found this code somewhere on the net... But i dunno how to stop this...Its keeps animating and i dont know when will this stop... [CODE]#include <stdio.h> #include <time.h> void sleep ( long milli ) { clock_t end, current = clock(); for( end = current + milli; current < end; … | |
Hi guys, I have one form contains img title and img name, also in database named as gallary. my prob is i cant store the name of img with extension using file field. plz, guide me. //admin.php <?php $con = mysql_connect("localhost","root",""); $db = mysql_select_db('admin'); $title = $_POST['title']; $file = $_POST['file2']; … | |
I started a comments page on my website and the comments work fine and go through. But after you submit the comment the out put displays like this on my webpage: comments: "heartbeaker" by: jamika @ 12:30:00 am on March 11, 2010. Fear<br /> There are two flip sides, to … | |
[CODE]x = self.spinbox37.value() * 40 y = self.spinbox38.value() * 40 printer = str(self.comboBox4.currentText()) print_cmd = 'echo "IN;PU" x "," y | lpr -P %s %s' self.LCDNumber18.display(x) self.LCDNumber19.display(y) #print_cmd = 'echo "IN;PU2100,11300;" | lpr -P %s %s' os.system(print_cmd % (printer, ""))[/CODE] In the above line I'm trying to use the x … | |
hi I'm new to outlook add ins. i developed an outlook 2007 add in project and added a setup project so i will be able to install the add in to other computers. when i install the add in (using the installer from the setup project) it works fine on … |
The End.