Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - QwazyWabbit

Pages: 1 ... 61 62 63 64 65 66 67 68 69 70 [71] 72 73 74 75 76 77 78 79 80 81 ... 84
Politics / Re: The Official Obama Bashing Thread
« on: February 08, 2009, 06:18:38 PM »
He's not a communist, he's a socialist. :)

Politics / Re: Outstanding non-biased report by usa broadcast corp.
« on: February 01, 2009, 02:49:37 PM »
Israel even went so far as to forcibly remove settlers from the west bank. The Palestinians thanked them with rockets.

The two-state solution is unworkable. Palestine does not exist and never has existed.

There can never be a free Palestine as long as the Arab states deny Israel's right to exist.

Politics / Re: The evidence of american's worldwide hypocrisy.
« on: February 01, 2009, 02:41:13 PM »
I think Rick Astley is Canadian or British, isn't he?

As for what America stands for... it stands for everyone's right to be critical of all actions of the administration, no matter who is in power. It stands for the freedom to do what you want in life, as long as you don't harm other people in the process.

Americans have cured more diseases and have advanced technology further than any other civilization before them. They have done it all by shear freedom of action and the belief that individual freedom is more important than the collective.

Germany had Hitler. Italy had Mussolini. Japan had Tojo and the war cabinet. The Soviets had Stalin and a succession of dictators and impotent administrators. America, with the help of a few allies, defeated them all when there was nobody else left standing. We did it while rebuiiding Germany and a ravaged Europe while the Europeans went on 6 week vacations in the south of France.

The whole European Union wouldn't even have been possible without American aid and the Nuclear Umbrella they enjoyed at very little cost to them and at great cost to the United States.

The entire outlook on the Earth as a living ecosystem and the entire knowledge of Earth climate is the direct result of American technology in space and NOAA. No other country has anywhere near the number of research satellites in orbit as the US. GPS is an American invention.

Now that America has no more monolithic external enemies to defeat, we can stand down from defense.

America only fucks up when we try to play the game the way it has been played in Europe and South America, with corruption and duplicity. When people stop bribing and paying off corrupt politicians world wide, when global corporations stop paying off for the rights to do business, then we can stop playing this silly game of who's best.

When the world gets itself into trouble and nobody else has the power and the resources to come to the rescue, they all look to America for help... and come begging for handouts. Then they point at the ugly Americans when the jobs done.

Next time, when the tanks are in Berlin and the Europe is burning, look somewhere else. We'll be over here watching TV.

Quake / Re: to console (dos prompt)
« on: February 01, 2009, 02:17:16 PM »
If it's a true quote all parts of it are important since they are a whole. You might shorten it to one sentence but G.C. was pretty succinct as it was. You might find something shorter if you look.

Trouble Shooting / Re: Need help with a C++ program...
« on: February 01, 2009, 09:45:21 AM »

As for quadz.. wtf is ruby? lol

"Ruby, don't take your love to town."

Trouble Shooting / Re: Need help with a C++ program...
« on: February 01, 2009, 08:40:56 AM »
In that case an arrayless version might be:

Code: [Select]
int main (int argc, char * const argv[])
string number;

cout << "Enter exactly 7 digits" << endl;
cin >> number;
if (number.length() > 7)
cout << "Too many digits!" << endl;
cout << number << endl;

The cin class only returns once the stream is filled by the user and the termination key is pressed. I have never used it to capture chars, but there may be a member of that class that can do that for you.  If that is the case you can copy char into the string array and loop while char is not "\n". Then evaluate the length of the filled string. Making the string number into an int number is left as an exercise for the student. :)

Trouble Shooting / Re: Need help with a C++ program...
« on: January 31, 2009, 12:59:39 PM »
Reaper, it looks like you never tested your sample. It won't compile as-is and the digit test always fails.

Here is a new program in valid C++ that does what Nautica described. It uses isdigit() from the C runtime.
Code: [Select]
#include <iostream>
#include <cstdlib>
#include <string>

using namespace std;

// this function receives user input as a string and checks
// for valid digits. If all valid decimal digits, return the string,
// else return an empty string.
string getnumber(void)
string number; //declares string
int i; //declares int for the loop

cin>>number;    // input a string

i = 0; // initialize loop variables close to top of the loop
while(i < number.length()) //go through all the letters except the termination character
if(!isdigit(number[i])) // are all valid digits 0 thru 9?
return "\0"; // invalid digit found, return empty string
return number; // return a valid number string

// call the getnumber function 7 times and print the results
int main(int argc, char *argv[])
int i;
const int maxnum = 7;
int count; //count the valid numbers returned
string number[maxnum];

count = 0;
for(i = 0; i < maxnum; i++)
cout << "Enter a number : ";
number[i] = getnumber();
if(number[i] == "\0")
cout << "That isn't a decimal number!!\n";
cout<<"\n"<<i<<" valid numbers received:\n";
for (i = 0; i < count; i++)
cout<<number[i]; // print the numbers
return 0;

This code is tested and works in OS/X, Windows and Linux.

Trouble Shooting / Re: Need help with a C++ program...
« on: January 29, 2009, 09:47:43 PM »
Hey hows everyone been..?

Haven't been around the Q2 community for awhile and what better way
to come back then to ask for help  ;D

Anyway, I'm having a bit of trouble with the following code.

You are to input 7 numbers then print, however if you input anything other than a number
higher than 7 it says it's to high. I need user input to type in any 7 numbers from 0-9
then print all 7 on one line. If they input more than 7, it's to give an error then exit.

Heres what I have thus far.

Code: [Select]
#include <iostream.h>

int main()
   const int x = 7;
   int count[x];
   int num;
   for (int num=0; num<7; num++)
                     cout << "Enter exactly 7 numbers" << endl;

                     cout<<"Too many numbers entered "<<endl;
                     cout << "\nThats it."<<endl;
                     cout<<"\ninputs: " << count[num] <<"\n";

Any help would be greatly appreciated.

p.s. hey console.. ltns :)

It's a bit unclear to me what you are really trying to accomplish. You are initializing an array of 7 ints, (count[ x ], where x = 7, arrays always begin with index 0) and then you are accepting inputs to num but then your loop breaks on the first entry. You are also redefining num as int num in the loop after it was already defined as int in the local variables. Redefining variables this way is a Bad Practice at best and a fatal error to a proper C++ compiler.

Are you inputting 7 NUMBERS in 7 lines or are you inputting 7 digits on a line? If the latter, you don't really need the array. Also, the variable x is not needed unless you are intending to parameterize that value as a non-constant. You also put the prompt for 7 numbers inside the loop, causing it to be sent 7 times if the loop executes that many times, I am not sure that is your intent. Your return(0) is also in the wrong place, it should come after the closing brace of the for() loop.

You also have a potential buffer overflow: you cin>>count[num] and then test to see if num is greater than 7. If num were greater than 7 at that point, you would already have written user input outside the space allocated for the count array, clobbering any data nearby. Potentially fatal to your program or an intermittent bug to say the least.

All the solutions offered so far, while requiring C++ to implement, are not strictly C++ nor good examples of what you have described but failed to code. Kren.Z' solution covers the buffer overflow issue but prompts for corrections not described in your "specification" of what the module is supposed to do. Reaper's solution pulls in string.h (not proper C++) It should be <string>. Reaper also calls istream::getline without proper argument specifying the size of the buffer, leading to a potiential buffer overflow. Reaper's code also uses "ASCII" constants and modern C++ is Unicode or ought to be and strings are of type _T and you should forget all about ASCII and char arrays when writing C++ for portability.

Your choice of count, to receive the "numbers" but use of num to count the numbers left me feeling upside down.

All in all the whole thing left me a little confused about what you are really trying to accomplish. :)

/dev/random / Re: Another Rodney King?
« on: January 22, 2009, 02:21:29 PM »
Accidental killing of a human being involving reckless disregard in California is manslaughter. Probably a 3 to 5 year sentence. Not sure, might be less. It is not murder unless the D.A. charges it as such but then he has to prove forethought to get 1st degree or heat of passion to get 2nd degree. My guess is manslaughter charge and upon conviction, a light sentence or probation. Probably a nice civil suit in there as well.

Politics / Re: Jews attacking Gaza
« on: January 15, 2009, 06:10:54 PM »
Arafat. :)

Trouble Shooting / Re: Coders Please Read...
« on: January 06, 2009, 09:37:48 PM »
Is there an advantage to that vs. just doing a block of or I suppose you don't end up chasing every block he appears on but grabbing whole groups like that could grab some collateral innocents, yes?

/dev/random / Re: Amazing Facts.
« on: January 01, 2009, 01:09:28 AM »
Did you know 74% of all statistics are made up on the spot?
Only 2% of individuals are able to discern which ones are not.

Tech Junkie Lounge / Re: windows vs. linux system call complexity
« on: December 18, 2008, 03:53:06 PM »
SYSTEM calls or FUNCTION calls? The images are too small to be useful.
Yep, one diagram has more lines and bubbles than the other but what are the functions in the bubbles?
What percentage of the total functions called are critical to serving the page vs. simply logging the activity?
What proportion of the total take "untrustworthy" user input?
If you can't control the input to the functions then you cannot exploit them.

Is it easier to analyze 50 functions for exploitation or 200 functions? Yes, if one assigns some "probability" to a function's exploitability then as a system 200 calls of any type can be less secure but one can also assign a zero probability to some of them (knowing they are not vulnerable) but an attacker may not be able to "know" that, he would have to spend time looking for vulnerabilities in more functions, not just randomly pick one. He has more cherries in the basket but he doesn't know which ones are sweetest until he tries them.

I also see a lot of cascade lines in the Apache diagram where there is a series of calls (10+) in a row before some terminus, would it be possible to pass arguments into the initial function in that chain such as to cause a failure in the 7th function that could allow an attacker some advantage that looking at the individual functions would not reveal?

Simply counting "calls" is not a valid metric for assessing the securability or stability of a system. It makes it hard to TEST the system but it doesn't invalidate the quality of the system if it is properly tested. If such were the case, the F-117A wouldn't fly.

Jokes / Re: Funny videos
« on: December 09, 2008, 03:40:35 AM »
Video on the cheater. Has to be a setup.

"I think we got a cheater, man."

Tried, convicted, sentenced, expelled in 10 seconds on "I think". Where's the evidence? On the parking lot pavement.

Laying hands on the player and tossing him on the ground: Assault and Battery. At least 4 counts.
Laying hands on his equipment: Theft. Grand theft.
Picking him up and expelling him from the building by force or threat of force: Kidnapping.
Destroying his computer on the parking lot pavement: Vandalism, willful destruction of property.
Instigation of group assault on an individual: Disorderly conduct. Criminal conspiracy.
Keeping his gear after the fact: Unlawful conversion, theft.

3 Felonies and at least two misdemeanors in real life for a game.
Mob rule at it's finest.

The kid had grounds for suing the host organization, the individuals and the owner of the property for loss of his gear plus punitive damages. The complete absence of uniformed security on the premises to prevent the organizers from doing exactly what they did shows negligence on the part of the organization and its members and the owners of the site.

That would seem to imply you also doubt there's anything genetic responsible for heterosexual attraction?

True. Maybe there is, maybe there isn't. I've yet to see anyone pinpoint where any animals instinctual actions reside. Speaking in terms of an animals instincts, that would make homosexuals genetically deficient since their natural instincts prevent them from propagating their own genes, wouldn't it? That's the same thing the Nazi's said about jews, homosexuals, and various other races anyway... so I'm going to go ahead and use this twisted brand of logic to call you a Nazi. :dohdohdoh: God damn, I should be a criminal defense lawyer!

Godwin's Law.

Thread is officially dead. :)
Zeig Heil!

Pages: 1 ... 61 62 63 64 65 66 67 68 69 70 [71] 72 73 74 75 76 77 78 79 80 81 ... 84