Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
4
Posts with Upvotes
3
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
~14.2K People Reached
Favorite Tags

35 Posted Topics

Member Avatar for OmniX

I've always used a hash similar to the following: [code] function HASHITBAY_BE($toHash) { $maxLength = 42; //maximum length of the salt $hashMethod = 'whirlpool' //encryption method... $saltLength = strlen($toHash)*3; if($saltLength > $maxLength) $saltLength = $maxLength; if($saltLength < 10) $saltLength = 10; $salt = saltGen($saltLength); $hash = hash($hashMethod, $toHash . $salt); …

Member Avatar for Stefano Mtangoo
2
2K
Member Avatar for chaines51

Ok, so I have a very basic (low footprint) logging system. However, one thing I cannot figure out is, if I write a log to [icode]fatal()[/icode], then I want the script to quit executing, period. Is there anyway to do this?

0
58
Member Avatar for achiman

You can't change anything about the page once it is loaded with PHP. It would require javascript to do that.

Member Avatar for achiman
0
103
Member Avatar for Narayan15

That's because Javascript is client side, while PHP is server side. What exactly are you trying to do here?

Member Avatar for Narayan15
0
260
Member Avatar for restrictment

Hmm... as I am a bit of a Grammar Nazi, here are some spelling mistakes you made :P In your opening paragraph , you say "the village were". This should be "The village where". In the stats page, it says "You currently have ## attribute pojnts"... Should be "attribute points" …

Member Avatar for restrictment
1
358
Member Avatar for panam72
Member Avatar for levsha
Member Avatar for venkat0904
0
181
Member Avatar for AdventDeo

Generally, if you go two days without ANY kind of reply: Nobody who frequents the board knows how to do it. :P I personally have never needed to export to excel and retain color...

Member Avatar for chaines51
0
112
Member Avatar for beshoyatef

Your first loop is behaving as expected. There are multiple problems with the second loop. [code] for (int i = 0; i < array.length; ++i) { array[i] = random.nextInt(arr[i]); System.out.println(array[i] + " "); } [/code] starting with the first line [icode]array[i] = random.nextInt(arr[i]);[/icode] I'm not sure what you're trying to …

Member Avatar for beshoyatef
0
106
Member Avatar for red999

To start off with, based on your example, I'm not sure you've got the general idea of inheritance. In general, you want to inherit from another class if the class you're building has all the attributes of the class you're inheriting from, plus some unique to this child class. If …

Member Avatar for mrnutty
0
109
Member Avatar for phouse512

No you can't have a variable number of columns. The way I would go about it is to create a new table for your etc_items column, and just have it have 2 or more columns as needed, one being user_id, which should be a foreign key to the user_id field …

Member Avatar for Designer_101
0
109
Member Avatar for tiger86

It's completely plausible, as long as you're not trying to mix the two into the same file (it'd still be possible, just inefficient, as it'd have to be processed twice). And, it depends on what kind of site you're trying to build. For example, if you're building a 'web-app' where …

Member Avatar for codejoust
0
272
Member Avatar for niche1

[url]http://www.php.net/manual/en/function.strtotime.php[/url] is where that comes from. It's actually a really cool function.

Member Avatar for chaines51
0
71
Member Avatar for .11

Ok, so why does [icode]curr = curr.getNext()[/icode] point to itself, exactly? Do you only have one element in your list?

Member Avatar for .11
0
129
Member Avatar for leoeroy

after numCount++; but before you close that loop, just add if(numCount%10 == 0) System.out.println(""); // or System.out.print("\n");

Member Avatar for leoeroy
0
108
Member Avatar for Bhuddha

I think instead of: [code]$sent = mail($to, $subject, $firstname, $charname, $class, $level, $age, $timezone, $raidavail, $mmoexp, $charlink, $s2_q1, $s2_q2, $s2_q3, $s2_q4, $s2_q5, $s2_q6, $s2_q7, $s2_q8, $s3_q1, $s3_q2, $s3_q3, $s3_q4, $s3_q5, $s3_q6, $s3_q7, $headers) ; [/code] You want [code] $sent = mail($to, $subject, $firstname . $charname . $class . $level . …

Member Avatar for phouse512
0
112
Member Avatar for ytregnn

[QUOTE=ytregnn;1044257]Thanks for your reply. What part of the code would you like to see? I can post parts of it here to you.[/QUOTE] I would strongly recommend against that, seeing as the product you purchased is not open source.

Member Avatar for diafol
0
91
Member Avatar for halona

You should be using [icode]String.equals()[/icode], or, in this case [icode]!String.equals()[/icode] so, your example would then be: [code] if(!response.equals("User Not Found"); //blah blah, rest of code [/code]

Member Avatar for chaines51
0
111
Member Avatar for ayan2587

Constant space doesn't necessarily mean no temporary values, it just means that as the function scales (IE, your array grows to 7,8,9,etc values), that more space is not used.

Member Avatar for chaines51
0
84
Member Avatar for gunbuster363

[url]http://perldoc.perl.org/perlretut.html[/url] Is a good overview of perl regular expression syntax. If you're looking for something that matches the format <p id="DIGITS HERE"> BLAH BLAH </p>, Then the regular expression would be: "<p\s*id=\"(\d*)\"\s*>(.*)</p>" A brief explanation of this: \s means any whitespace, which is useful incase some weird html writer decided …

Member Avatar for pritaeas
0
147
Member Avatar for chaines51

Ok, so my question is this. If I had two tables, quizzes, and users, where each user 'has many' quizzes, then one could simply just add a user_id column to the quizzes table to create this link. However, how would I implement a has many-has many relationship? For example, I'm …

Member Avatar for zmariow
0
91
Member Avatar for chaines51

Here's the problem: I have a folder /tests/ which contains all my unit tests. I want the test runner to be able to go and include all of the unit test classes from that directory, and then run all the tests in those classes. So the first part of the …

Member Avatar for sureronald
0
82
Member Avatar for born_to_code

I'm pretty sure he means the mathematical intersection of two sets? IE: str1: abcdefghi str2:ghiablkj the intersection would be a,b,g,h,i so, all letters that are in both strings. Now, problems: 1.) You try to send the temp array to cout, but you never put a null character in it, so …

Member Avatar for Tom Gunn
0
1K
Member Avatar for rciprogrammer

This link should help: [url]http://c-faq.com/stdio/undofreopen.html[/url] You used fopen, not freopen, but the concept is the same.

Member Avatar for rciprogrammer
0
6K
Member Avatar for veru

As for syntax problems, lets start from the top. [icode] #include<iostream.h>[/icode] You shouldn't use the .h version anymore, as it is no longer in the standard. There are compilers that don't even have it anymore (VS 2008, for example). because of that, you then need to add [icode]using namespace std;[/icode], …

Member Avatar for chaines51
0
108
Member Avatar for esesili

That one took me a while to find. Your problem is the line: [code=c++]for (int k =0; k<=length-1; k++)[/code] because you assume within this loop that [icode]k+1[/icode] is a valid index in the array, this needs to be [code=c++]for (int k =0; k<length-1; k++)[/code] because [icode]length[/icode] is NOT a valid …

Member Avatar for chaines51
0
107
Member Avatar for chaines51

Is there ANY standards compliant way to get unbuffered input from the console without the characters being automatically displayed? because, although I can reset the buffer on cin to 0 with [icode]cin.rdbuf->pubsetbuf(0,0)[/icode], when I do this, it outputs all characters twice (because it outputs them by default once?) The reason …

Member Avatar for chaines51
0
437
Member Avatar for pltndragon

in the future, please use [ code] [/ code] tags, as it makes your code so much more readable. Formatted here [code]#include <iostream> using namespace std; //Function prototype int *arrAllocator(int); int numElements; int num; int count; //Loop counter int main() { int *values; //To point to the numbers //Get an …

Member Avatar for pltndragon
0
423
Member Avatar for esesili

the parameter inside the square brackets when initializing an array represents the LENGTH of an array, not the highest index.

Member Avatar for tux4life
0
101
Member Avatar for chaines51

I have a class (String) that I want to be able to implicitly convert to a char. How would I go about doing this? I know to do it the other way around, I just add a constructor that just takes a char as a parameter, but to convert from …

Member Avatar for chaines51
0
172
Member Avatar for mrnutty

Also, if you think about it, it is still returning the remainder. 3/4 is .75, or 0 r 3. the same applies for all numbers greater than three. ie 3/5 is .6 or 0 r 3.

Member Avatar for chaines51
0
282
Member Avatar for Vermillion

Not to take over this guy's thread, but a question about syntax of Templates, is there any real difference between [icode]<class T>[/icode] and [icode]<typename T>[/icode]?

Member Avatar for ShawnCplus
0
116
Member Avatar for chaines51

OK. So, [URL="http://www.difranco.net/cop2220/op-prec.htm"]here[/URL] is a link to a table of operator precedence. At the bottom, it talks about the increment and decrement operators, saying that they have a high (the highest) precedence, but the actual action doesn't take place until later... so what good does the higher precedence do? Also, …

Member Avatar for vmanes
0
112
Member Avatar for chaines51

I'm wondering if this is even possible in C++. Here's what I did in java a while back: [code=java] class Suit { public static Suit Hearts = new Suit("Hearts"); public static Suit Clubs = new Suit("Clubs"); public static Suit Diamonds = new Suit("Diamonds"); public static Suit Spades = new Suit("Spades"); …

Member Avatar for ArkM
0
168
Member Avatar for chaines51

I've always been curious: in VS, and most other IDEs, you are allowed to do something like this: [code=c++] //in file class.h class blah { //prototypes, members, blah, blah blah } //in file class.cpp #include "class.h" //method definitions... etc. //in file main.cpp #include "class.h" int main { //do stuff with …

Member Avatar for VernonDozier
0
117

The End.