Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
Uh... use an XML parser to parse XML. Look up what "XML namespaces" is.
-
how can i get people to not think my site is a scam
Daniel0 replied to silverglade's topic in Miscellaneous
You just need to make sure it's not parsed to a clickable link. You can put it in [nobbc] or tags to prevent that. Example: http://www.google.com -
http://en.wikipedia.org/wiki/Nested_set_model
-
how can i get people to not think my site is a scam
Daniel0 replied to silverglade's topic in Miscellaneous
Yeah, that's why I wanted the URL to his website. -
how can i get people to not think my site is a scam
Daniel0 replied to silverglade's topic in Miscellaneous
What's your website's URL? -
You just need to echo the $res1 variable.
-
Though untested, this should do it in Θ(n): $res = array(); for ($i = 0, $size = 0, $max = count($lines); $size <= 5000; ++$i) { for ($j = $i; $j < $max; $j += 50) { $res[] = $lines[$j]; ++$size; } }
-
Make Any Webpage Look Like It Was Made By A 13 Year-Old In 1996
Daniel0 replied to Lamez's topic in Miscellaneous
I still like Notepad though I have always found it to bad Notepad didn't support syntax highlighting, intellisense, and auto-indentiation. How about such a simple thing as being able to figure out that LF is a line break? It's the only editor I've ever known that doesn't support LF style line breaks. -
I'm slightly impressed with how you're as familiar with oni-kun's history here because 1) you're a fairly new member, 2) oni-kun's account history (warnings, bans, etc.) isn't public. oni-kun is constantly trolling. A while ago he was banned. He started whining and his ban was lifted after a month. Soon after he started again and was given a final warning. He still continued and yesterday happened to be the day when he was banned. So no, he was not just banned for this topic. Besides, like it or not, "free speech" doesn't apply here. Free speech only prevents your government from passing censorship laws. If you visit someone and keep acting like a douche, they can tell you to leave their house/apartment. If you visit someone's website and keep acting like a douche, they can tell you to leave the website. In both cases they can force you to do it as well.
-
Furthermore, strip_tags will have no effect after htmlentities has been used on the string. Not that a MySQL database is vulnerable to anything HTML related though.
-
VIP INTERACTIVE SITE CREATOR - INSTALL HELP NEEDED
Daniel0 replied to cherilavelle's topic in Third Party Scripts
10 minutes. -
How does reading the fucking manual have anything to do with being male or female?
-
No, it would be pretty fucked up if Comcast tried changing the internet protocol.
-
Because he got promoted.
-
"Don't try to argue with idiots. They'll bring you down to their level and beat you with experience." -- Someone whose name I can't be bothered to look up.
-
Right, as I said, you need to use "Remove Topic" to remove a topic. The "[X] Remove" thing is for removing posts. SMF allows you to remove a topic that way iff it's the only post in the topic. That's how SMF designed it to work for some reason.
-
Which button are you using when you're trying to delete it from within the thread? The one with the red X or the one on the bottom where "Mark Solved" also is? Use the one on the bottom.
-
The fact that many people often have difficulty finding one would indicate otherwise.
-
Are you familiar with the saying "you get what you pay for"?
-
coder, programmer (n): an organism that can turn caffeine into code. I guess I'm no coder/programmer then
-
You could read the changelog. http://php.net/changelog
-
Here is my take on a very simple one: <?php function math_rpn($expr) { $stack = array(); $getOps = function() use (&$stack) { if (count($stack) < 2) { throw new Exception('Invalid expression: not enough elements on stack'); } $op2 = array_pop($stack); $op1 = array_pop($stack); return array($op1, $op2); }; $tok = strtok($expr, ' '); do { switch ($tok) { case '+': array_push($stack, array_sum($getOps())); break; case '-': list($op1, $op2) = $getOps(); array_push($stack, $op1 - $op2); break; case '*': list($op1, $op2) = $getOps(); array_push($stack, $op1 * $op2); break; case '/': list($op1, $op2) = $getOps(); array_push($stack, $op1 / $op2); break; case '^': list($op1, $op2) = $getOps(); array_push($stack, pow($op1, $op2)); break; default: array_push($stack, $tok); break; } } while ($tok = strtok(' ')); if (count($stack) !== 1) { throw new Exception('Invalid expression: end stack doesn\'t have exactly one element.'); } return $stack[0]; } echo math_rpn('1 2 + 5 * 2 /');
-
How do you then handle 354 + 3? Or is it all separated by a space, but having an Assembler background I don't see how that could work as how would I know I had to read 1 byte, 2 bytes, 3 bytes? It's stack based: 354 - adds 354 to the stack 3 - adds 3 to the stack, now it contains: 354 3 + - pops an element from the stack and adds it. the stack now contains 357 If you traverse an abstract syntax tree in pre-order and just output the nodes to the screen instead of doing something with them, you'll get reverse polish notation.
-
Sorry but, no it isn't. It may be to you, but not in the general sense. It is entirely possible being good at your job without making it your entire life.