Hi,
I'm looking for PHP script samples of websites. I'm just done reading a text book on PHP and I want to check out some of the various implementations.
Thanks
Can anyone please suggest some good C++ coverage tool. I am basically looking tool that really works fine when it comes to unit testing. The tool should work in the linux environment
Hi everyone!
Out of curiosity about reverse engineering, I am thinking of writing a simple program (in C++) that takes an executable as input and produces the names of all the functions that were a part of source program of that executable.
Any pointers on how should I go about it?
Step-by-step approach would be much appreciated!
In Java, I want to download some data asynchronously in a Thread (or Runnable) object, and have the Thread put it's data into an Object I've declared within my main Thread.
How could I do this please?
What is the "computer science" term for the practice of assigning a special meaning to one of a type's values. For example a numeric variable called "amount_to_transfer" where the special value "0" means "entire account balance" or a date value "spouse_date_of_birth" where "1/1/1800" means "unmarried".
I happen to feel that this is quite a bad "smell", but I'd like to have a name for it, and if possible, some blog post or article about why it's bad and how to fix it.
Hey, take this as a challange, my informatics professor made it in less than 10 rows, it work perfectly and its very efficient. I'd like to "surprise" him giving a better/shorted version of it. Ofcourse i wouldn't take the credits, hah, u can trust in me.
It's a simple anagras finder! If you can.. write it in c++! thanks!
#include<stdio.h>
#include<math.h>
int main ()
{
FILE *fp;
fp=fopen("output","w");
float t,y=0,x=0,e=5,f=1,w=1;
for (t=0;t<10;t=t+0.01)
{
if( y==inf && y== nan)
break;
fprintf(fp,"%lf\t%lf\n",y,x);
y = y + ((e*(1 - x*x)*y) - x + f*cos(w*t))*t;
x = x + y*t;
}
return (0);
}
why is the ouput giving infinite and NAN values?
Public Class A
{
public A()
{
system.out.println("con call");
}
static
{
system.out.println("static call");
}
{
system.out.println("ins call");
}
Public static void main(string[] args)
{
new A();
new A();
}
Hi
My web hosting provider does not permit to use curl FOLLOWLOCATION option so I'm trying to
do it manually by using the header function.
My problem is that I need to keep my PHP script running and to be able to get the redirected URL data for parsing.
How do I do that?
Hi,
The title says it all. But I don't know if I should go for static methods, just a header, a class, or something else?
What would be best practice? But, I don't want to have an instance of a utility class.
I want to add functions like:
Uint32 MapRGB (int r, int g, int b);
const char* CopyString(const char* char);
// etc. You know: utility methods...
Why is it that
class swi22
{
public static void main(String[] args)
{
int a=98;
switch(a)
{
default:{ System.out.println("default");continue;}
case 'b':{ System.out.println(a); continue;}
case 'a':{ System.out.println(a);}
}
System.out.println("Switch Completed");
}
}
gives error as: continue outside of loop
I'm trying to decide if upgrading is viable given all the libraries we are using. The problem is some of these plugins arent being developed anymore so I'm not sure which of them is compatible with 1.4
Any thoughts on how to best approach this given legacy dependencies on older plugins?
hi, i've got two lists A and B, B = A + C - D. All elements are unique, no duplicates. How do i get the lists of:
(1) the new items added, C
(2) the old items removed, D
C and D aren't more than 10000 elements or so.
This is pretty strange.
I have a class in Classes folder of my project (a .h file and a .m file).
When I try to import it like so
#import <myClass.h>
I get an error saying "no such file or directory".
It is definitely there. What could be going on?
I'm currently using QDataStream to serialize my classes. I have quite a few number of my own classes that I serialize often. Should I derive QDataStream to create my own DataStream class? Or is there a better pattern than this? Note that these custom classes are used by many of our projects, so maybe doing so will make coding easier.
Another way to phrase this question is: when a framework provides you with a serialization class, how do you handle serializing your own custom-type classes such that you don't have to remember how to serialize them everytime.
I have this block in a switch case statement that when selected, just breaks and presents me with the main menu again.
System.out.println("Choose a competitor surname");
String competitorChoice2 = input.nextLine();
int lowestSpeed = Integer.MAX_VALUE;
int highestSpeed = 0;
for(int j = 0; j < clipArray.length; j++) {
if(clipArray[j] != null) {
if(competitorChoice2.equals(clipArray[j].getSurname())) {
if(clipArray[j].getSpeed() > clipArray[highestSpeed].getSpeed()) {
highestSpeed = j;
}
}
}
}
for(int i = 0; i < clipArray.length; i++) {
if(clipArray[i] != null) {
if(competitorChoice2.equals(clipArray[i].getSurname())) {
if(clipArray[i].getSpeed() < clipArray[lowestSpeed].getSpeed()) {
lowestSpeed = i;
}
}
}
}
for(int h = lowestSpeed; h < highestSpeed; h++ ) {
System.out.println(""+clipArray[h].getLength());
}
I have an array of objects and each object has a surname and a speed.
I want the user to choose a surname and display the speeds of all of their clips from lowest to highest.
when I select this option it just breaks and brings me back to the main menu