Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
It's the ampersand that you need to urlencode()...
-
It matches case-insensitively strings that start with a letter a through z followed by 2 to 19 of either of the following things: word characters (as defined by the current locale), a space (ASCII 0x20) or an underscore, followed by end of string.
-
You could also check out suPHP.
-
Weird path problem when calling a PHP script from the command line
Daniel0 replied to fchristant's topic in Linux
That's not necessarily when you pass the file path to the interpreter and run that instead. -
My guess would be that count($obj2->mBrand) evaluates to 0 meaning the last for loop doesn't run.
-
You can create as many objects as you want as long as you have sufficient memory. By the way: http://en.wikipedia.org/wiki/Indent_style Pick one and use it.
-
There is some library called PHPExcel or something like that. I never tried it though.
-
Yup. Google knows everything.
-
Imagine doing the Gutmann method on that.
-
I'm studying computer science. A lot comes from reading stuff online though.
-
Yes there is, but now you're looking at popularity compared to other things as opposed to looking at an isolated element. Have a look at the binomial proportion confidence interval or the bayesian average.
-
See: http://en.wikipedia.org/wiki/Arithmetic_mean
-
That's about as good advice as suggesting depressed people to commit suicide. Technically it'll get rid of the depression, but it isn't exactly a real solution to the problem.
-
Assuming that the domain name remains the same and that the certificate is not yet expired, that shouldn't be a problem.
-
http://php.net/apc
-
Is it beneficial to your education to learn Java? (I suppose learning new languages never hurts, but I mean given the employment goals afterwards) Well, I don't really think so. As it is right now, I have no aspirations of working in the industry unless I can get something that's more focused on theory. It's the language they chose to use for their "Object Oriented Programming and Design" course so I don't have a choice either way right now. Personally, I don't like Java. It seems way too over-engineered. Want to read lines from a file and write lines to a file? public ArrayList<String> getLines(String filename) throws FileNotFoundException, IOException{ ArrayList<String> lines = new ArrayList<String>(); BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(filename))); while(reader.ready()) { lines.add(reader.readLine()); } reader.close(); return lines; } public void saveLines(Collection<String>, String filename) throws IOException { File file = new File(filename); if (!file.exists()) { file.createNewFile(); } BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file))); for (String s : lines) { writer.write(s + "\n"); } writer.close(); } I suppose it's "good design" or whatever, but it doesn't make it less tedious having to write half a book each time you want to do something.
-
The university decided that I wanted to learn Java, so well....
-
No, actually they're not required for reading data (though it doesn't support the FILTER_SESSION). See filter_input. As for writing, that shouldn't happen to $_POST (though I see people doing it regardless) and having to write to $_SESSION is a design flaw, though it can be abstracted away using something like Zend_Session or something you've written yourself. Even if you can read POST data using filter_input(), you should still actually pass the data as a parameter to the consumers to ensure portability and decoupling.
-
Because it tightly couples things and makes it much easier to screw up and maintain in the long run. That's why I'd rather see it removed from PHP entirely; it's not obvious to the beginner why it's a bad idea.
-
"Normal" screen resolution - wide monitor - what is best??
Daniel0 replied to scanreg's topic in Miscellaneous
The optimal screen resolution is the monitor's native resolution. What exactly do you mean with "stretched"? -
You should be happy, not sorry, that the globals aren't working. I promise you, it makes more problems than it solves.
-
That's because the game is full of Rambos sprinting around. That's hardly the knife's fault. It's not like Taliban in Afghanistan is whining about their opponents having night and thermal vision either. "Boo hoo, my bank robbery failed because the SWAT team had snipers, assault rifles, flashbangs, etc. and I only had a pistol." The entire point is that you're supposed to be better equipped and employ better tactics than your opponents. The latter is something this game severely lacks. I don't think I've been in a single match where people actually tried cooperating. Everybody is just running around for themselves minding their own business. You see, if people actually played together, they'd say "yo, this roopurt dude is lurking in the corners with his knife" but that doesn't happen. As for aiming with a thumb stick, that's your fault for choosing an inferior platform
-
You learn to organize your stuff properly so you don't have to use things like that Seriously, here are things I would do to PHP 6 if it was my decision: 1) Remove the global keyword and remove all the super globals. 2) Stop letting people do stupid stuff like using undefined variables and accessing non-existent array indices, i.e. bump it from a notice to a fatal error.
-
JavaScript Minification what are your opinions on it?
Daniel0 replied to Ninjakreborn's topic in Miscellaneous
That's why you let phing (or something similar) do it for you so you don't have to do it manually each time.