569 Posted Topics

Member Avatar for pwolf
Member Avatar for Nautical.RB

@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 …

Member Avatar for phorce
0
382
Member Avatar for NardCake

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?

Member Avatar for mark5rockzz_1
0
356
Member Avatar for Ravic85

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.

Member Avatar for phorce
-1
220
Member Avatar for Ravic85

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?

Member Avatar for rubberman
0
228
Member Avatar for ifraq
Member Avatar for Danny_3

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 …

Member Avatar for phorce
0
454
Member Avatar for phorce

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?

Member Avatar for pritaeas
0
102
Member Avatar for maurice.tracey.7
Member Avatar for filipgothic

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?

Member Avatar for filipgothic
0
263
Member Avatar for Khalessi

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; } } …

Member Avatar for Khalessi
0
219
Member Avatar for Labdabeta

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

Member Avatar for mike_2000_17
0
394
Member Avatar for lilwizz770

What do you mean 'Frequency of Age'? Frequency means something else.. Do you know the how frequent a particular age is given?

Member Avatar for diafol
0
198
Member Avatar for marethamogale

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 …

Member Avatar for phorce
0
176
Member Avatar for blueguy777

`$cust_id = $tmp[4];` will always be at position 4. What is the exact problem you're having?

Member Avatar for Atli
0
3K
Member Avatar for Tko_1

Files that are stored on the server, or, local machine? What do you mean "had no success" - What happened? Errors?

Member Avatar for Tko_1
0
203
Member Avatar for Lewis_1

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?

Member Avatar for Lewis_1
0
271
Member Avatar for FazeLessWhite

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 …

Member Avatar for rubberman
0
262
Member Avatar for gogs85

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?

Member Avatar for gogs85
0
340
Member Avatar for andrew.mendonca.967

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?

Member Avatar for phorce
0
4K
Member Avatar for blueguy777

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?

Member Avatar for blueguy777
0
328
Member Avatar for anestistsoukalis

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.

Member Avatar for mmcdonald
0
199
Member Avatar for Ancient Dragon

I'm having the same problem!! If I upload two images, only one will upload..

Member Avatar for Ancient Dragon
0
276
Member Avatar for chrisschristou

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];`

Member Avatar for chrisschristou
0
200
Member Avatar for PerplexedB

` 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.

Member Avatar for pritaeas
0
155
Member Avatar for usama sadaqat

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: …

Member Avatar for sepp2k
0
156
Member Avatar for robin.aditta1

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"); ?

Member Avatar for simplypixie
0
686
Member Avatar for Paul_17

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

Member Avatar for Paul_17
0
2K
Member Avatar for phorce
Member Avatar for dom246
0
87
Member Avatar for phorce

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 …

Member Avatar for mike_2000_17
0
8K
Member Avatar for kingkong123

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, …

Member Avatar for deceptikon
0
227
Member Avatar for everton.retweets

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.

Member Avatar for everton.retweets
0
208
Member Avatar for everton.retweets

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 …

Member Avatar for phorce
0
750
Member Avatar for phorce

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(); } }; …

Member Avatar for iamthwee
0
153
Member Avatar for phorce

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 …

Member Avatar for mike_2000_17
0
189
Member Avatar for Himanshu Chawla

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` …

Member Avatar for Himanshu Chawla
0
285
Member Avatar for pritaeas

One thing I don't like/agree with is this: ![6aa64fae3f4217234af3109222f1884f](/attachments/large/3/6aa64fae3f4217234af3109222f1884f.png "6aa64fae3f4217234af3109222f1884f") 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 …

Member Avatar for diafol
0
1K
Member Avatar for ProDev7
Member Avatar for ProDev7
0
144
Member Avatar for phorce

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 …

Member Avatar for Sagarika12313
0
406
Member Avatar for christinetom

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 …

Member Avatar for Kenney_1
0
3K
Member Avatar for Ceejayyy

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.

Member Avatar for Ancient Dragon
0
140
Member Avatar for kyle.santelices.31

In `checkLogin.php` you could try putting: `session_start();` since everywhere you use sessions, should include this.

Member Avatar for kyle.santelices.31
0
2K
Member Avatar for Chinney
Member Avatar for gurungb03

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?

Member Avatar for diafol
0
289
Member Avatar for nira9

@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 …

Member Avatar for stevie.whalen
0
267
Member Avatar for Abo0od

Why are you not including the following: #include <iostream> using namespace std; It compiles fine entering ^^ on GCC

Member Avatar for Moschops
0
266
Member Avatar for phorce

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 …

Member Avatar for Moschops
0
233
Member Avatar for kanoy83
Member Avatar for Olagsfark

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 …

Member Avatar for phorce
0
219
Member Avatar for willscarlet

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 …

Member Avatar for XtrmJosh
0
631

The End.