255 Posted Topics

Member Avatar for queenc

You are declaring insertseek1 as a normal function but then calling it from an object ($db) that doesn't exist in this context. Just do this: [CODE=PHP]$res=insertseek1($user,$pss);[/CODE]

Member Avatar for death_oclock
0
47
Member Avatar for akim_atl

clock() will get the number of "ticks" since your program started. If this statement is executed at the same point in the program several times (likely), you will see repetition. time() is the better choice, if not for randomness, then just for commonality.

Member Avatar for h3xc0de
0
80
Member Avatar for smb1384

A waveform is made up of digital samples or frames. You don't need to do this operation in real time, rather you can calculate the length of each sample and set how ever many you need to "low".

Member Avatar for death_oclock
0
91
Member Avatar for tavy88

What exactly do you mean by "online practice"? But check out this thread: [URL="http://www.daniweb.com/forums/thread67837.html"]C / C++ FAQ's and Practice problems[/URL]. Yes, thats the C++ forum, but most of the problems can be done just as well in java.

Member Avatar for tavy88
0
102
Member Avatar for dragon@dragon64
Member Avatar for dragon@dragon64
0
263
Member Avatar for ditty

Pdf files aren't encoded in plain text; if they were there would be no point to having another file type.

Member Avatar for death_oclock
0
99
Member Avatar for MSK 7

I don't think AJAX would be the best choice, instead use javascript to change the button's style.display value. If you don't know how to do this, I suggest this [URL="http://www.informit.com/library/library.aspx?b=STY_JavaScript_24_hours"]javascript tutorial[/URL] (it covers this topic directly). It is always better to actually learn something about a language instead of just …

Member Avatar for death_oclock
0
126
Member Avatar for gulad75

So, what code have you done already, and what are your problems? (In case you haven't heard, we won't do your homework)

Member Avatar for Freaky_Chris
0
184
Member Avatar for emhmk1

Google "php image gallery" or something along those lines. Plenty of results come up.

Member Avatar for emhmk1
0
116
Member Avatar for jencinas69

Use a database to store car info (names, image files, etc.) as well as the number of votes that car has gotten. When a car gets a vote, just increase this number by 1.

Member Avatar for almostbob
0
103
Member Avatar for RexxX
Member Avatar for mumblejum

Create a counter of how many "levels" of braces you are in. What do you mean by reposition? To see if they are part of a block, look at the statement before the opening brace. If it is a for loop, if statement, etc. then it is valid.

Member Avatar for StuXYZ
0
441
Member Avatar for rEhSi_123

Why use getche? As well as being compiler-specific, it is not very c++-like to use such functions. [URL="http://cplusplus.com/doc/tutorial/basic_io.html"]Here[/URL] is some info on how C++ does i/o.

Member Avatar for death_oclock
0
94
Member Avatar for chadlong41

Specifically for this purpose, you would likely use [URL="http://us2.php.net/serialize"]serialize[/URL] and its opposite, unserialize, to store an object as text.

Member Avatar for death_oclock
0
113
Member Avatar for chadlong41

Using <?= is shorthand for printing whatever is between the tags. I don't understand your problem, however. Do you have PHP code stored in a database that you would want to execute?

Member Avatar for death_oclock
0
80
Member Avatar for khr2003

mktime likely uses a more complex algorithm for computing the timestamp, it would have to include leapyears for example. If you want to let PHP handle dates, use it for creating the timestamp and for decoding it. If you want to use your own algorithm, you must use that at …

Member Avatar for prawin@123
0
191
Member Avatar for serdas

Put this: [CODE=PHP]if (!$user_check) { die('Invalid query: ' . mysql_error()); } [/CODE] in between this: [CODE=PHP]$user_check = mysql_query("SELECT userdb_user_name FROM default_userdb WHERE userdb_user_name='$reciever'"); [/CODE] and this: [CODE=PHP] $user_check = mysql_num_rows($user_check); [/CODE] and tell us what is displayed.

Member Avatar for serdas
0
174
Member Avatar for marksmania
Member Avatar for csurfer
0
98
Member Avatar for patharianidhi

Using .inc files is a bad idea in terms of security. If a user tries to view that file directly and the server doesn't interpret it through PHP, the user will be able to see your code!

Member Avatar for diafol
0
132
Member Avatar for Phil++

Returning 1 (or some value > 0) is a common way of reporting that the program did not execute correctly.

Member Avatar for death_oclock
0
514
Member Avatar for vinwin
Member Avatar for vinwin
0
78
Member Avatar for Justmehere

You could probably pull it off with some clever javascript. That solution would be more inline and portable than a mandatory plugin anyway.

Member Avatar for Justmehere
0
120
Member Avatar for lonely_girl

Do not use goto: in C applications. It is very bad coding practice (see [URL="http://en.wikipedia.org/wiki/Spaghetti_code"]spaghetti code[/URL]). Instead, use control structures like conditional statements, loops, etc.

Member Avatar for lonely_girl
0
136
Member Avatar for jakx12

[URL="http://us2.php.net/mysql_fetch_array"]mysql_fetch_array[/URL] returns an array, just a the name implies, so this statement: [CODE=PHP]$new_Number_value = $query_results_Number++;[/CODE] is trying to increment an array? You want some thing like this: [CODE=PHP]$new_Number_value = $query_results_Number["Number"]++;[/CODE]

Member Avatar for jakx12
0
93
Member Avatar for Anshulpareek

Learn [URL="http://www.winprog.org/tutorial/"]WinAPI[/URL] or MFC.

Member Avatar for Duoas
0
44
Member Avatar for swetharvss

There are a few ways to do this. For one, let us define i as any index of the 1D array. The corresponding row of this element is [CODE=C]r = i / 25;[/CODE] The column is [CODE=C]c = i % 25;[/CODE] Alternatively (would likely be faster too), have three counters: …

Member Avatar for swetharvss
0
134
Member Avatar for Demonisya
Member Avatar for lonely_girl

You can use a tm structure for the date of birth, convert it with mktime(), and subtract that from time(). Then convert your answer back into a tm struct.

Member Avatar for csurfer
0
1K
Member Avatar for deepugtm

1. Get a more recent compiler 2. [URL="http://openil.sourceforge.net/download.php"]DevIL[/URL] works well (you may need to learn some WinAPI stuff depending on how much control you really want)

Member Avatar for deepugtm
0
94
Member Avatar for subhas.236

Why don't you explain why you need to do this? It is likely there are much better ways of doing whatever it is, unless you are trying to provide a very low level service.

Member Avatar for death_oclock
0
107
Member Avatar for are_nice

Your post describes each step perfectly. Computer generates a number, user makes a guess, computer tells what range the number it is in, and so on. If you're problem is writing the code, learn some c++ first.

Member Avatar for Nick Evan
0
69
Member Avatar for riahc3

Have an array for each possible number, have each element be a flag as to whether the number at that index has been generated.

Member Avatar for Salem
0
183
Member Avatar for thorster

That looks like a good implementation to me, and without the comments its really quite short and sweet.

Member Avatar for Ancient Dragon
0
2K
Member Avatar for simonrangus

If you can't find it, make it yourself. It's not too difficult. Use an existing image library (DevIL works well, covers almost any format). Then get the image data and apply a rotation. Google/Wikipedia will have the math you need for rotation.

Member Avatar for death_oclock
0
61
Member Avatar for drjay1627

A simple solution (but will give more flexibility): define two arrays, one with source characters and the other with destination characters to replace those with. Arrays are matched by indices. Just make sure there are no repeats or decryption may not work correctly.

Member Avatar for drjay1627
0
161
Member Avatar for niall_heavey

Sounds like [URL="http://www.pages.drexel.edu/~weg22/can_tut.html"]edge detection[/URL] would help.

Member Avatar for Nick Evan
0
81
Member Avatar for nicolemcgrgr50

Open your php.ini file, look for the values of SMTP and smtp_port. Change these to the appropriate server and port. If you can't access php.ini (hosted site) use ini_set() like the error suggested.

Member Avatar for cwarn23
0
125
Member Avatar for death_oclock

Visual C (2008) is acting as if I never included a header file (wave.h) that I am using, but the #include statement is definitely there. Here's my main (BPM analyze.c): [CODE=C]#include "stdafx.h" #include "common.h" #include "sound.h" #include "wave.h" int main(int argc, char* argv[]) { SAMPLE samples[2]; unsigned int i, j; …

Member Avatar for Aia
0
135
Member Avatar for mohan_198505

Even if you could use scanf for your purposes, it is better to use fgets anyway.

Member Avatar for Aia
0
116
Member Avatar for winrawr

And your origional question seemed to be about whether or not you could include <string> multiples: well all the standard headers use #ifndef too! Cool, right?

Member Avatar for cikara21
0
87
Member Avatar for lonely_girl

What is the problem with using || ? It is a completely valid part of the C language. There might be some obscure way of doing the same comparison without it, but it would be useless to even try it.

Member Avatar for lonely_girl
0
145
Member Avatar for smhnaji

The first article you posted has a very concise description of this layout. It describes the class architecture you will use (study object oriented programming in PHP), including the use of abstract, super, and sub classes. It also defines the most common and most helpful methods to define for each …

Member Avatar for death_oclock
0
120
Member Avatar for slnvpraveen
Member Avatar for Pabs666

Use fgets to read one line, strtok to split each line between spaces, sscanf to break apart each value. Do this all in a loop to read multiple lines.

Member Avatar for Ancient Dragon
0
95
Member Avatar for Manutebecker

Good point. With both under your belt, not only will it strengthen your overall programming knowledge, the flexibility it would give you would be more impressive on a resume.

Member Avatar for Manutebecker
0
112
Member Avatar for Wassa76

Use [URL="http://cplusplus.com/reference/clibrary/cstdio/fgets.html"]fgets[/URL] to read one line, [URL="http://cplusplus.com/reference/clibrary/cstring/strtok.html"]strtok[/URL] to split it on spaces, '=', etc.

Member Avatar for Wassa76
0
63
Member Avatar for bemo55

That would be the correct way to call it. The function would still not work as planned, as you set hours to zero inside calctotal. The function itself should be something like: [CODE=C]float calctotal(float hours) { // got rid of: int hours=0; if (hours < 3 && hours > 0) …

Member Avatar for death_oclock
0
98
Member Avatar for atman

If you have to use array notation, also consider using a static variable instead of a parameter: [CODE]void enter(int *p_arr) { static int insert = 0; printf("\nplease enter the number:"); scanf("%d", &insert); p_arr[i++]=insert; }[/CODE]

Member Avatar for atman
0
122
Member Avatar for mohan_198505

If you don't know how to open the file, read about fopen, fclose, etc. If you don't know how to read the information, read about fgets, fread, sscanf, etc.

Member Avatar for death_oclock
0
92
Member Avatar for serdas

What is the program you are using? What type of SQL server are you using? Have you learned programming in PHP?

Member Avatar for lordspace
0
176

The End.