267 Posted Topics
Re: join lines 18 and 19 in your code please | |
Re: <input type="submit" name="submit" value="submit" onclick="this.disabled=true" /> | |
Re: var x = prompt('enter your name'); alert('hello '+ x); | |
How I can passing quantifier as variable in this regexp `str.match(/^(\-)?\d+( (\-)?\d+){3}$/)` | |
Re: in line 11 `<input type="submit" onClick="runMe">` change to `<input type="submit" onclick="runMe()" />` | |
Re: Something like this: #include<iostream> using namespace std; const int cnt=5; int main () { int k[cnt]; int sum=0; for(int i=0; i<cnt; i++) { cin >> k[i]; sum+=k[i]; } cout << "sum: " << sum << endl; system ("PAUSE"); return 0; } | |
Re: I solved your project syntax, but alghoritm not correct // EasterProject #include<iostream> using namespace std; int main() { int intyear, intEasterDate, intEasterMonth; int a, b, c, d, e, f, g, h, i, j, k, m, p; do { cout<< "What's the year? \n"; cin>> intyear; cout<<"Easter Month is \n"; if … | |
Re: Your sql query `$log=mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' ");` ignored upper/lower letters and considers "e"=="é" etc, i recommended this: `$log=mysql_query("SELECT * FROM users WHERE username LIKE BINARY '$username' AND password LIKE BINARY '$password' ");` | |
Re: Very easy in MySQL query: `$sql = "SELECT DATEDIFF('2012-08-02','".date('Y-m-d')."')";` | |
Re: function my_opendir($dir) { if ($handle = opendir($dir)) { echo "<ul>Directory handle: $dir<br />Entries:"; while (false !== ($entry = readdir($handle))) { if($entry=="."||$entry=="..") { continue; } echo "<li>"; if(is_dir($dir.$entry)) { my_opendir($dir.$entry); } else { echo $entry; } echo "</li>"; } echo "</ul>"; closedir($handle); } } | |
Re: $incr = 0; function my_increment() { global $incr; $my_string = "Bla-bla-bla"; $my_increment = str_pad($incr, 4, "0", STR_PAD_LEFT); // how many digits you need (eg.4) $incr++ ; return $my_string.$my_increment; } | |
| |
Re: shortly: `<td>First Party*:</td><td><input type="text" name="firstparty" value="<?=(isset($firstparty)&&!is_null($firstparty))?$firstparty:"";?>"/></td>` | |
Re: Maybe try this (line 26): `echo isset($email[$j])?$email[$j]:"";` | |
Re: It can be written concisely #include <iostream> using namespace std; class Calculator { public: void add(int i, int a); void subtract(int i, int a); void mult(int i , int a); void divide(int i, int a); void modulo(int i , int a); void menu(); void driver(); void driver2(); int a,x,y,result; char … | |
Re: #include <iostream> int main () { int b,m,n; std::string s; std::cout<<"Input decimal number.\nInput \"0\" = end.\n\n"; do { std::cout<<"dec: "; std::cin>>n; m=n; std::cout <<"hex: "<< std::hex << n << '\n'; std::cout <<"oct: " << std::oct << n << '\n'; while(n>0){ s+=(n%2)+48; n/=2; } std::cout<<"bin: "; while(s.size()>0){ std::cout<<s[(s.size()-1)]; s=s.substr(0,(s.size()-1)); } std::cout<<"\n\n"; … |
The End.