- Upvotes Received
- 4
- Posts with Upvotes
- 3
- Upvoting Members
- 3
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
35 Posted Topics
Re: 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); … | |
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? | |
Re: You can't change anything about the page once it is loaded with PHP. It would require javascript to do that. | |
Re: That's because Javascript is client side, while PHP is server side. What exactly are you trying to do here? | |
Re: 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" … | |
![]() | Re: and please make sure to use code tags. |
Re: Could you post an example code of what you did, so we can see where you went wrong? Thanks, Cody | |
Re: 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... | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: [url]http://www.php.net/manual/en/function.strtotime.php[/url] is where that comes from. It's actually a really cool function. | |
Re: Ok, so why does [icode]curr = curr.getNext()[/icode] point to itself, exactly? Do you only have one element in your list? | |
Re: after numCount++; but before you close that loop, just add if(numCount%10 == 0) System.out.println(""); // or System.out.print("\n"); | |
Re: 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 . … | |
Re: [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. ![]() | |
Re: 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] | |
Re: 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. | |
Re: [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 … | |
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 … | |
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 … | |
Re: 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 … | |
Re: This link should help: [url]http://c-faq.com/stdio/undofreopen.html[/url] You used fopen, not freopen, but the concept is the same. | |
Re: 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], … | |
Re: 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 … | |
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 … | |
Re: 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 … | |
Re: the parameter inside the square brackets when initializing an array represents the LENGTH of an array, not the highest index. | |
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 … | |
Re: 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. | |
Re: 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]? | |
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, … | |
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"); … | |
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 … |
The End.