569 Posted Topics
Re: @down-voter - Please could you explain why this post has been downvoted? | |
Re: @Anima Gives you some great recommendations, with regards to Python. Python is easy to learn and is becoming a lot more popular in commercial sense. Some programmers that have been developing for many, many years are taking up Python now because it offers such a high commercial gain; even if … | |
Re: I don't get what you mean by "code generation"? Please can you be a bit more specific about this. Are you talking more of say a drop down menue saying "Switch statement" and it'll generate a switch statement? Or.. A GUI where you drop buttons and it generats the code? | |
Re: Did you not ask this in C++? :S Choose which language you're going to work in.. Better still, build it in one language and make an interface in different languages? Don't re-invent code in multiple languages, unless you absolutely have to. | |
Re: Could you not just read the values inside a char array and then tokenise it? It's very unclear, I don't understand really what you want to do. Is it possible to show the type of data in the file you're trying to process? | |
Re: OAuth can seem like a daunting task to implement, although, can be worth-while. First of all: **Choose the return type** What I mean by this is: How do you want the data to be processed? Should you use XML or JSON? It's entirely up to you, you might specifiy what … | |
Loading DaniWeb today was very slow.. Been like it most of the day and I have just been able to get on. mhm. Anyone else? | |
Re: What is contained in `company[i][j]` there isn't a lot to go on from this. | |
Re: What have you done to understand the problem? Do you expect someone to do your problem? If it's "simple" and "not hard" then surly you would be able to do this yourself? | |
Re: No.. A 2D array will still allocate 1D block of memory.. It's just how you access this.. For example: rows = 13; cols = 10; int* values; values = new int[rows*cols]; for(unsigned i=0; (i < rows); i++) { for(unsigned j=0; (j < cols); j++) { values[i*cols+j] = 0.0; } } … | |
Re: I disagree that Tex/LaTeX is a 'Legacy' language.. I agree that there should be a place for it, but, that's a different topic. Anyway, I'd say stick your question in Computer Science | |
Re: What do you mean 'Frequency of Age'? Frequency means something else.. Do you know the how frequent a particular age is given? ![]() | |
Re: Because I'm learning Python at the moment, I'm going to give you a start.. Something like this: import string import random def FlipCoin(): coin = ['heads', 'tails']; return random.choice(coin); def main(): heads = 0; tails = 0; for x in range(0, 100): print FlipCoin(); main(); I'm sure that you can … | |
Re: `$cust_id = $tmp[4];` will always be at position 4. What is the exact problem you're having? | |
Re: Files that are stored on the server, or, local machine? What do you mean "had no success" - What happened? Errors? | |
Re: Hey Lewis, I don't unerstand what you mean exactly.. It's only working with one of your input fields? Do you mean that only one result from the database is showing? | |
Re: I'm sure many will agree, facial recognition is a hard task to acomplish; particularly in C++ as this (without any libraries) would require you to build such from the ground upwards in order to give come close to an expected outcome, which is why most researchers use Matlab etc.. That … | |
Re: EDIT: It's because you're trying to regiester a session. You should probably just use: if(!isset($_SESSION['email'])) { // redirect } OR if(!session_register($email)){ // error on line 3 Bleh. Please tell us what the purpose of 'login_success.php' is? | |
![]() | Re: Can I just ask.. Why are you reading the words in twice? This cannot be right.. Could you not just read the words into an array, and then perform the word count / unique word count in separate functions? |
Re: I have no idea what you are trying to do here. You have two 1D arrays, do you want to merge these arrays so they become a 2D array? | |
Re: For a start off: This really isn't a PHP related question since it has more to do with CSS. I don't know why you're using PHP, unless, you are generating or rendering the image. Post some code, otherwise, we cannot help. | |
Re: I'm having the same problem!! If I upload two images, only one will upload.. | |
Re: I'm no expert on this function, but shouldn't it be: `echo number_format((int)$row_total, 2,'.','');` Since you are denoting an array `$row_total[blah];` | |
Re: ` if ($return === false) {` Has to be: ` if ($return == false) {` What you are saying in your first argument is that: `$return` is the `type` of `false` Attempt to use just `==` and post what happens. I believe this is the case for here. | |
Re: What don't you understand? You are creating a pointer to an array and trying to output the size, this is not allowed sice the compiler does not know what the pointer is pointing to. In your cose, you woud not not need a pointer, it would just work lik this: … | |
Re: Should this: $result = mysql_query("SELECT cat.Name, sub.Name FROM sub_categories sub, categories cat WHERE cat.Id = sub.CategoryId AND sub.id=$categoryId;"); Be: $result = mysql_query("SELECT cat.Name, sub.Name FROM sub_categories sub, categories cat WHERE cat.Id = sub.CategoryId AND sub.id=$categoryId"); ? | |
Re: It looks like it doesn't know what `$Telephone = $_POST['Telephone'];` is since you are not posting `Telephone` you are posting: `Phone` so do this: $Telephone = $_POST['Telephone']; $id=isset($_POST['$Telephone']) ? trim($_POST["$Telephone"]) : ""; // has to be : $Telephone = $_POST['Phone']; $id=isset($Telephone) ? trim($Telephone) : ""; This should work | |
I believe there is a function which returns the max value for a double, however, I do not need this. I'm converting the following function: public void StaticCompress(short[] samples, float param) { for (int i = 0; i < samples.Length; i++) { int sign = (samples[i] < 0) ? -1 … | |
Re: This makes no sense.. What do you mean: >> Then convert these strings to there numerical values. 1,2,3,4,5. How would I do this? Do you mean the the place where they are in the array? i.e "0", "1".... Or do you mean: `blueone` then becomes `blue`=>`one` and then from there, … | |
Re: Do you have your own class? If not, remove the `public` from it and just do the following: `ft_xss($str)` Where `$str` is the string you want to pass. Its difficult to say though, since you've only provided half of the function and therefore cannot determine the return type. | |
Re: First off, that is really badly laid out.. What the hell is going on there? Second of all: What it is you're trying to do? I.e. `add in the error validation, When the form is submitted, a new list of Country names is populating the dropdown box.` I don't understand … | |
I might be a bit tired, but why does the following not work? class Signal { public: Signal() { } protected: std::vector<double> data; }; class Something : public Signal { public: Something() { data.resize(100); } }; class Parser : public Signal { public: Parser() { std::cout << this->data.size(); } }; … ![]() | |
I basically have two classes: `Signal` and `Parser` they both have differences, however, they each share the data that `Signal` has. I want to incorperate Method Chaining into the class, so my classes (at the moment look like the following): class Signal { Signal() { } Signal& Parse() { return … | |
Re: Your default constructor is the definition in which you will initialise your objects from. (in main *usually*) Your default constructor looks like the following: P.S. It is also worth noting that the class name should always be capitialised as this is a good coding practise, so, `Book` instead of `book` … | |
Re: One thing I don't like/agree with is this:  1) It seems like a popularity constest. I'm all of recognising peoples achievements in this way but, really, really? 2) What's to stop someone looking at a particular forum, seeing who is the most active / experienced and then them … ![]() | |
Re: Where did this come from? I have not seen coding like this, at all. | |
Earlier today I could not sign in and it told me my username + password combonation wasn't right. But, I had not changed it? It worked after I re-set my password. Nothing changed on my account, so I don't think I've been "Hacked" Any ideas? P.S. now I'm getting a … | |
Re: You need to do some research on Templates. This clearly would not work in main because there is no way at run-time to determine what types are the variables. (In this example, anyway). The correct thing would be to do the following: #include <iostream> #include <cstdlib> #include <string> using namespace … | |
Re: Are you for real? DO YOUR WORK!! Click [Here](http://www.rapidtables.com/convert/electric/watt-to-kwh.htm) For the onversion formular, literally will take you 2 seconds to write this. | |
Re: In `checkLogin.php` you could try putting: `session_start();` since everywhere you use sessions, should include this. | |
Re: Remember, Google / DaniWeb are your friends. | |
Re: As @prit has said, you should pick something YOU enjoy. Saying that, have you thought about the idea of online compilers / text editors? Using PHP and Ajax to maybe have a real-time text editor online where multiple people could get involved? ![]() | |
Re: @diafol makes good points here. You have to remember that Java and PHP are completely different languages, so, it's really difficult to suggest which one will be better, because it hugely depends on the situations and the development projects. Let's assume that you were developing for the web, using a … | |
Re: Why are you not including the following: #include <iostream> using namespace std; It compiles fine entering ^^ on GCC | |
I'm working on a project that generates roughly between 13x512 values in which I compare at run-time. So the program outflow will be sort of as follows: - Program executes - Extracts (1) 12x512 - Extracts (2) 12x512 - Compares (1) to (2) - Extract (3) - Compares (3) to … | |
Re: Where do you define the variable `$target`? | |
Re: Please could you include an example to your problem? It's kind of hard to find out where you are going wrong, but, here is an example (of what I assume you are trying to do): // Test.h class Test { public: Test(); // constructor void doSomethingCreative(); }; And then your … | |
Re: Wow.. Where to begin (lol). It compiles, atleast ;-) I don't really get your question, but, I assume you're looking for some hints about OO and your code. So I will aim to try my best to offer you some, but, others may have more to offer. First off, we'll … |
The End.