« first day (108 days earlier)      last day (4833 days later) » 

5:00 PM
@Shikiryu correct, echo is a language construct in PHP, and hence has no return value...
 
Then, what's the point of pointing that out here =_=
alright, a much better example.
 
documentation by convention rather than need...
 
Running
nl2br('Kevin\nvan\nZonneveld');
Should return
'Kevin\nvan\nZonneveld'
yay \o/
 
yes
shouldn't var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '' : '<br>'; be var breakTag = (is_xhtml || typeof is_xhtml === 'undefined') ? '<br />' : '<br>';? According to PHP's convention at least...?
wow, that's stupid...
 
I think I'll buy a Tonidoplug next month... Just to have a real SVN server
Oh, time to go
See you tomorrow
 
5:07 PM
see ya
 
later
@Shikiryu Why not just use svnserve?
 
See you guys
@Shikiryu or git Or use my company's favourite, bazaar!
 
String.prototype.indexOfAfter = function(what) {
    return this.indexOf(what) + what.length;
}

'foobar'.indexOfAfter('foo'); // 3
 
uhh, ok...
+16 more to a bronze in OOP!!! Getting close!
 
@Nyuszika7H I'm going to hurt you
 
5:13 PM
ircmaxell, New Jersey, USA
18k 2 9 39
 
@Raynos very funny :P
 
for (var i in string) alert String.charAt(i) // error String.charAt("indexOfAfter") is not defined
 
+16 to OOP, +22 to PHP5, +38 to arrays, +41 to Security, +46 to Performance...
 
@Raynos Huh?
 
How do you make that link?
@Nyuszika7H you must know extending prototypes breaks for loops right
 
@Raynos yep I know. this is why I like PHP better… it does things another way.
 
Basically, post this link: stackoverflow.com/users/419970/raynos
 
@Nyuszika7H then don't extend it!
 
@Nyuszika7H: Like anything, there are multiple different approaches. Each has advantages and disadvantages...
 
@ircmaxell oh is it different from tag to tag what defines bronze it's either 100 or 50 ?
 
5:16 PM
It may be why you like PHP better, but it doesn't make it better...
it's +100 for a tag that has at least 100 questions...
Silver is +400, gold is +1000
 
@ircmaxell fixed
 
Never extend a native prototype. If you want to do that then just subclass it.
@Nyuszika7H read the .sub source on how to subclass a constructor
 
@Raynos jQuery? It redirects to .submit(). Did you mean jQuery.sub()?
 
@Raynos, imho SharePoint Visual Designer, at least, is a worser evil than Dreamweaver. Proof: it is the rebranded spawn of MS FrontPage.
 
fair enough...
 
5:20 PM
SharePoint itself is just a bunch of click-to-configure ASP.NET webapps. From what I've heard, @Raynos would utterly hate it.
 
lol
 
@Nyuszika7H yes
 
@Raynos It's only able to clone jQuery AFAIK.
 
@Nyuszika7H hence I tell you to read the source and see how they do it. The source is a good way to extend native objects
 
hi everybody!
 
5:30 PM
hey
 
can I make a question?
 
5:45 PM
@haltman Sure, fire away.
 
@haltman you should totally drop whatever it is you're about to ask and use jQuery. :P
3
 
ROTFL
 
@Nathan can you explain me with other word pls. my english is not so perfect :(
 
@haltman I'm sorry, I was just joking. What is your question?
 
I do not know if it's correct room it's a jquery question..
 
5:51 PM
@haltman go ahead and ask anyway
 
@haltman Yes it's correct. jQuery is a JavaScript library.

JavaScript

Topic: Anything JavaScript, ECMAScript including Node, React, ...
 
it is?
 
ah ok ^_^' well the question I have just posted on stack site..
 
@haltman link it, but in a separate message ^_^
 
wow. I thought Javascript was a jQuery plugin. You know, the $.JS.run('myjscode'); call...
4
 
5:53 PM
I'm not sure to use ajax in the correct way :(
 
@ircmaxell LOL
 
hehehe :-D
 
sorry jquery
 
@haltman just post the link to your question
 
5:55 PM
@haltman post it in a separate message and it will be like this:
 
@Nyuszika7H: I think I should make that a real jQuery plugin, and host it on one of my sites: serverslowdown.com :-D
 
0
Q: jquery/ajax general question about limits and cache management

haltmanHi there, I'm trying to renew my company intranet using jquery, ajax and php. General aspect of the site is a drop down menu at the top loaded into a div and a content div where i load pages clicked on drop-down menu. The problem come out when inside content i load a page which inside have a tab...

 
jQuery.JS = {
    run: function(code) {
        return eval(code);
    }
}
 
excuse I do not understand your answer :(
 
@haltman it's another joke. Everyone's funny today.
 
5:58 PM
ah ok LOL
 
Good!
 
@haltman it was a response to @ircmaxell
 
lol
 
@haltman in answer to "The question is it correct load data when requested instead of pre-load it and show them when called as seen in a lot of example in the web? " - it depends how much data you have.
In many cases for navigation menus, you should just send it all in case the user wants it.
For example, Youtube sends you a whole bunch of extra stuff hoping you'll click it after watching the video.
 
@Nyuszika7H: we should totally make than an official plugin...
 
6:03 PM
@Nathan I have a menu with for tabs that each one load a page with a form with more less 20 fileds is it too much?
 
@ircmaxell +1
@haltman it depends on a LOT of conditions. How fast are your users' Internet connections? How often will they switch tabs?
But it sounds kind of like each "tab" is more like a full "page" and the users might expect a short delay to retrieve the new page.
 
if you see code of my other posts linked here you can see my crazy code
 
hehehe
 
function doNothing() {
    /* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
rotfl
 
6:07 PM
@Nyuszika7H that's funny! LOL
 
it all depends upon the comment characters
 
jQuery.fn.doNothing = function() {
    $('<div>', { id: 'jQueryDisclaimerDiv' }).hide().prependTo('body').load('http://unxutils.sourceforge.net/StdDisclaimer.html p:first', function(data) { alert(data); $('#jQueryDisclaimerDiv').remove(); });
    $.alertComments('MODE=eachLoop', $.arrayFromComments(
        // A:/> format C:
        // Are you sure? (Y/N) Y
        // Preparing to format…
        // (1 minute later) Broken text
        // F?rmat??n? ?as s?c?es?f?l.
        // (2 minutes later) More broken text
 
The proof
Java is just as good/bad as PHP
 
@haltman do you have a different <form> inside each tab, or one <form> around them all?
 
I couldn't ever reproduce the PHP number bug
 
6:14 PM
@Nathan one different for each tab with different page loaded and php page posted
 
@haltman answered your question
 
upvotes @Nyuszika7H for mentioning more jQuery!
 
@Nathan in this link you can find my code for tab
0
Q: jquery/ajax Problem with tab menu

haltmanHi everybody, I've created a menu tab that dinamically load content, I have seen a lot of examples, all works in similar way, load all tabs contents hide all content except clicked one. My pages work in different way (not better), load data only when requested, I create 2 arrays one for tab and ...

@Nyuszika7H thanks for your answer! is it easy to use and flexible?
 
@haltman yep, just check the docs I've linked
 
ok I'll do it for sure! ;-)
@Nyuszika7H excuse me can I do ajax call with it?
 
6:25 PM
@haltman Yes, the link in the docs points to the Ajax part. Check it out. Also, click View Source to view its source.
 
@haltman I answered too about the bigger question.
0
A: jquery/ajax general question about limits and cache management

NathanI guess the answer to "is it correct load data when requested instead of pre-load it and show them when called?" is "which will the user prefer when switching to a different tab?" no delay (all content loaded during initial page load) short delay (ajax lookup of the new tab's content) a full pa...

 
@Nathan thanks for answering! about cache and multile ajax calls how can you prevent/check it?
 
ES6 Harmony:
 
@haltman if you don't use any ajax it's not a problem, right?
 
@Nathan so how can i modify my form without ajax calls?
 
6:36 PM
@haltman the old-fashioned way?
 
@haltman PHP…
 
1. Server sends HTML to client
2. Client posts form data back to server
 
so bye bye ajax?
 
@haltman I can't really see everything you're doing but it looks like it might be too complicated.
 
yes like all my staff LOL
 
6:39 PM
If you can get it to work without Ajax, it will be a lot easier to add some tasteful Ajax where it really improves things.
 
in my page use php only for check and store data, the communication between html and php by ajax
may be I' working in the worst way I m trying to understand that :(
 
here's a blog rant about overuse/correct use of Ajax... I haven't honestly read it and don't necessarily endorse the whole thing, but it might help.
 
@Nathan thanks good link I read it with attention!
 
Heh, when i was little my nickname was "88 Nate".
Nathan, Fairbanks, Alaska
888 2 15
 
@Nathan don't say or do anything on stack overflow from now on, and you'll be known here as 888 Nate :)
 
6:50 PM
@Greg No more! I've upvoted two of your answers @Nathan, now you're known as 898 Nate. :P
 
@Nyuszika7H spoilsport :(
 
haha. Maybe that was a ploy by Nathan to get some more points?
 
no, I'm trying not to get addicted to points!
 
Thanks for help guys! I have to prepare my dinner now! take care ciao!
 
@haltman you're welcome. What's for dinner?
 
6:52 PM
minestrone ->vegetable soup!
 
@Nathan 908 Nate! You should really get some downvotes. :P
 
@haltman yum. have a good one!
 
I better get some food now too
 
@Nathan thanks! ciao a have nice day/night!
 
@Nathan 918 Nate! :P
 
6:55 PM
ahhh... ruined but thanks @Nyuszika7H
 
@Nathan You'll reach 1000 rep soon!
 
@Nyuszika7H not if I keep making in-jokes at newbies!
 
@Nathan huh? :D
 
Quick question (guess you have a bit more experience than me in that area) When writing a CV and not knowing who exactly will read it (e.g. you only know the company's name, since it's a posting on jobvite). What should I write instead of the usual "Dear XYZ,"?
 
@IvoWetzel Unknown, Anonymous?
 
6:58 PM
@Nyuszika7H oh actually I got 2 stars for telling haltman to drop that and use jQuery so I guess that behavior is endorsed :D
 
@Nathan one is from me :P
 
@IvoWetzel I never know what to put. "To whom it may concern," is one traditional thing but I don't like it much.
"Dear Sir or Madam," also sounds like spam.
 
@IvoWetzel Or maybe the company's name?
 
I think the company's name would be good.
 
> Dear Microsoft, … – by Ivo Wetzel
 
6:59 PM
Yea, guess I gonna go with that then
 
> Dear Ivo Wetzel, I'm not Microsoft!! I'm Bill Gates! – by Bill Gates in reply to Ivo Wetzel
 
@Nyuszika7H *Steve Ballmer
 
> Dear Bill Gates, first, sorry for the earlier. … – by Ivo Wetzel
 
> Dear Ivo Wetzel, I'm not Bill Gates! I'm Steve Ballmer. – by Steve Ballmer in reply to Ivo Wetzel
 
7:01 PM
But odds of the first CV-tosser knowing that meme are slim.
 
I rather keep it... formal... it's also my first CV ever...
Already looks strange with the German postal stuff in the header
 
@ircmaxell this book is great (Being Geek) very quick and insightful read
well pt1 anyway
the main part i was interested in
 
ahhh
found some further contact info in another posting of the same job
ugh open office.. would you please be so kind and keep the English spell checker selected...
 
Yeah
I liked part 2 a lot
Really helpful where I'm at in my career.
I only need +4 more...
 
7:22 PM
@IvoWetzel link 2 cv?
"To those who it may concern"
 
Already found out the guys name
 
"Dear valued employee of company X" for extra cheese.
When your done throw it out here. We'll proof read it for you.
 
by "JavaScript" I think you mean "jQuery". s/JavaScript/jQuery/g please.
"you spelled Ovoid Weasel wrong"
 
I love breaking the mold of what's possible with a bunch of hackery
 
(y)
 
7:33 PM
0
A: mysql triggers simulating assertions

ircmaxellWell, the problem is that MySQL doesn't have an equivalent of a STOP ACTION command. So basically, the work arounds are quite dirty: One way is that you can violate a foreign key constraint inside the trigger to bubble an error and cancel the insert: CREATE TABLE stop_action ( id INT NOT N...

Basically simulating an assertion by violating a constraint on another table... Gotta love bastardized code
 
@ircmaxell that reminds me of this answer to the first question I asked on SO.
4
A: How do I include empty rows in a single GROUP BY DAY(date_field) SQL query?

BlorgbeardHow about something like this? SELECT COUNT(incident_id) AS "Calls", MAX(open_time), days.open_day FROM ( select datepart(dd,dateadd(day,-6,getdate())) as open_day union select datepart(dd,dateadd(day,-5,getdate())) as open_day union select datepart(dd,dateadd(day,-4,getdate())) as...

I had to do the same thing with MS Access (shudder) yesterday, only worse. The cool part was using a Cartesian product on purpose.
 
@IvoWetzel omg.. fluff looks likemy answer
 
nice
 
1
Q: Are there currently any engines for compiling JavaScript to an standalone app with graphics support?

LoktarIve seen things like Mozilla Rhino, or using V8 internally. What I am really looking for however is a solution where I can basically write standalone Canvas apps for the PC. Titanium was ok, but I didn't like the end result. Basically Im looking for the ability to write PC client apps with graphi...

its an older question, but i was just randomly browsing your repo's and saw fluff
 
@Loktar Beware though... it's extremely unfinished and untested :D
As OpenGL is a bitch
 
7:39 PM
@Nathan: My first was similar, and Access issue as well!
2
Q: Batch Inserts And Prepared Query Error

ircmaxellOk, so I need to populate a MS Access database table with results from a MySQL query. That's not hard at all. I've got the program written to where it copies a template .mdb file to a temp name and opens it via odbc. No problem so far. I've noticed that Access does not support batch inserting...

 
@all good examples of jQuery.deferred please :)
 
meh thats fine @IvoWetzel its a great starting point, funny a few friends and I were talking about doing something close to it. We were basically talking about using canvas rendering/v8 to make compiled apps.
 
@ircmaxell nice.
 
Damn $.when means I can rewrite my entire ajax queue into a two line jQuery statement :)
 
Actually, I gave up on trying that
 
7:43 PM
@Loktar That would be awesome
Dunno if it's a good starting point though :P I had 0 C++ experience when I started writing the thing...
 
What I do now, is export to CSV natively in PHP, then open a COM Excel object, open the CSV, read from the CSV and insert into a table, then port that over to Access. The whole thing takes a fraction of a second to complete. Dam JETSQL piece o garbage
 
is it fair to say you need at least a couple of years of experience to write a good C++ program (of the size&caliber of what fluff is trying to be)
 
what is fluff trying to be?
 
well i mean more from a config aspect
i have no idea how to integrate v8 with anything, and havent looked into it at all
 
@ircmaxell Nothing atm :P Just a proof of concept
 
7:45 PM
but yeah taking the rendering from webkit, mixing with v8 and making executables would be awesome
 
Well, what's the concept?
 
then you could def monetize js games.
 
@Loktar Feel free to ask me about that then, documentation on the topic of integrating V8 is very sparse
 
thanks, appreciate it
 
@ircmaxell Using V8 + OpenGL as a standalone game engine
 
7:47 PM
hrm
I wonder, could you build a canvas - like API in OpenGL to act as the middle-ground?
so to the JS code, it just looks like a normal HTML5 cnavas object
 
that would be great if you could
my whole idea was to make a game thats possible to monetize via steam/impulse/etc
 
Cairo would be better I guess
 
Cairo?
 
the drawing library
 
im checking out some of your stuff right now, my attempt at a js game engine is slow so far.
namely your eufloria game
i even named it appropriatly lol
 
8:05 PM
I can't stand people spreading bad information (especially when it happens as often as this):
0
A: Securing fetched data with PHP

MarcEncode everything from user input / database you want to display in the browser with htmlentities() to avoid XSS.

 
8:26 PM
nearly done with the CV...
 
‮Hello, world!
 
8:44 PM
done...
and now tell me that I've written a ton of BS :D
 
@IvoWetzel You've written a ton of bulls**t. :P
 
@CodingKitten Tell me that I will get the job instantly :(
 
@IvoWetzel now I can write some new fancy regex for HTML, Firefox exploded
 
>_>
 
:kitten say @IvoWetzel You will get the job instantly.
@IvoWetzel I think adding a message like you need X rep to do this would be nice.
 
8:59 PM
todays should be "today's"
 
@Ivo: would you agree with this answer from a Python perspective (I only know enough Py to be dangerous):
1
A: where in class hierarchy should instance methods be written?

ircmaxellThe thing that you need to take into account is the Single Responsibility Principle. Basically, each class should be responsible for one "thing", and should completely encapsulate that one responsibility. And you should only inherit where the responsibility is extended. You should always be ab...

 
in-depth should be hyphenated
 
@Nathan I see... how could I write today's wrong -.-"
 
@Nathan: what's that referring to?
 
wut?
I just lost my carefully written comment
 
9:05 PM
Where do you see in-depth?
 
@ircmaxell on Ivo's CV
 
Ahhhh
I was going to say...
 
@Nathan come to Sandbox
 
@Ivo: that's not a CV, but a cover-letter...?
 
only the cover so far yes
 
9:07 PM
Ivo, phrases functioning as adjectives are normally hyphenated, like "in-depth", "self-taught", "multi-player", and "cross-engine-compatible". "Reusable" is one word though.
 
did I save it as cv?
 
Ahhh, ok
 
Also, use .hasOwnProperty()!
 
@Nathan Ah ok thanks :)
 
yes sorry the cover letter
 
9:07 PM
@IvoWetzel cv.pdf
 
And the last paragraph is a little grammatically awkward
 
Guess my German is screwing me up here...
It is indeed, hm
 
Yeah doesn't German make huge phrases into words, like FreakingAwesomeGame?
er, Freakingawesomejquerylibrary?
 
not always... it's really really complicated...
And the like to change the rules every 5 years or so
> I would be proud to bring in my knowledge of JavaScript and HTML5 technologies to your team and help it develop the next generation of underlying technologies for Zynga's games.
better?
 
yes, that's better
 
9:11 PM
Don't fear correcting me, my English is self-taught too...
 
hehehe
it's quite good in general, yet alone for being self-taught...
 
:)
My parents took me out of school in 7th grade, so I only had around 2 years of English
And man was my English bad back then...
 
lol
I've dealt with a lot of non-native English speakers over the years (a LOT). And honestly I have to remind myself that you're German...
 
Hm... I blame the intertubez!
 
lol
 
9:18 PM
95% of what I read/listen to is in English
 
Yeah, most people in our profession/sector are like that...
 
It gets really bad when you start using English words instead of their German counterparts... at random
 
I can imagine!
 
Especially when you can't remember the German word for something -.-"
 
I know doing that in Spanish, I can only imagine it in German
LOL
 
9:21 PM
I attended a virtual conference with the Symfony team last summer and was amazed at how French they sounded. They write [English] very well but their accents were HARD to understand in speech!
 
And I really find it a lot easier to express myself in English at times
 
Yeah, some are like that. Especially Brittish people...
 
Reading and trying to understand jQuery.Deferred. Bad move.
 
@Raynos Yeah looks like some Engrish in the docs. Are you reading the source?
 
@Nathan @ircmaxwell Now imagine being a non-native English speaker trying to understand that, that's even harder
 
9:23 PM
Quite true
AND THERE IS NO W!!!
 
Indeed...
I must admit, I always read maxwell...
 
yeah I can imagine. And then there's sarcasm and humor, which would be even harder...
 
I know, people do. But it's a pet peave of mine
it's maxell like the tape/recordable-media company...
 
aha...
 
listened to a Maxell or two back in the day
 
9:25 PM
@Nathan yes. Fucking heck its rage. I dont understand any of it
 
@Raynos Link?
 
@IvoWetzel jquery.core look at .when, .Deferred, ._Deferred check github
 
I thought Deferred was a plugin?
 
@Nathan native in 1.5
 
oh
 
9:26 PM
$.JS.run('function foo(bar) { alert(bar); }').run('foo("MUAHAHAHA");');
 
maybe try reading the tests instead? Are there some?
 
@Nathan might be. I'll try that. I'm slowly going through the source
 
check out our talk with the kitten :P
 
Just wait until ive read, understood, commented, documented and blogged the source :P
 

Sandbox

Where you can play with regular chat features (except flagging...
 
9:28 PM
it'll be easier to read
Might even make one of those live talks ontop of source.
 
yah video/screencast tour with some demonstration in jsfiddle would be great.
 
Apparently the expect people to not extend natives
			for( var methodName in promiseMethods ) {
					obj[ methodName ] = deferred[ methodName ];
				}
 
@Nathan that will take me the rest of the day
 
Or one with you dancing and singing the source code along with a soundtrack would also be good
 
@IvoWetzel I know :) bug report!
 
9:30 PM
Yes!
 
God this code is a piece of unreadable shit
 
heh
 
And he's not reading my code this time!
 
yay it's not too bad to have a promisemaker, but I also don't like the way they designed it too much
 
for (var methodName in promiseMethods) {
                obj[methodName] = promiseMethods[methodName] && deferred[promiseMethods[methodName]];
            }
@IvoWetzel he did fix that one by checcking hasownproperty in an unreadable manner
Mention testing somewhere :P
odds are without the paper they put you on debugging & testing to see whether your competant before they let you touch code
@IvoWetzel you know that's a cover letter right? :) not a CV.
 
9:37 PM
Yes
 
@IvoWetzel for future reference black out your address and your phone number
 
Oh yeah, that would have been a good idea :P
 
@IvoWetzel wait your real name is "Ivo Wetzel" ? Are you kidding me?
6
 
lmao
 
9:39 PM
I mean is that actaully your full name?
It must be a nickname right?
Use your full name on your cover letter!
 
OK, gonna change it to BonsaiDen then
 
@IvoWetzel sorry that was rude.
 
In the end... it all depends on the cover and my projects
 
God damn do I have jQuery.Deferred already.
 
9:53 PM
does .done() make a difference for "success" && "complete" handlers ?
didn't try so far
 
Good night! :)
 
good night
 
@jAndy it passes the correct paramaters I think .done fires on either
 
or, better asked
 
@jAndy wiat I fail
 
9:57 PM
$.ajax().done(fnc).fail(fnc) equals $.ajax().when(fnc, fnc) ?
 
@jAndy don't know, can you call .when on an ajax object?
 
sure
.when() fakes two functions, success and fail callbacks
 
@jAndy does yeah but when is defined as $.when
 

« first day (108 days earlier)      last day (4833 days later) »