« first day (319 days earlier)      last day (4630 days later) » 

1:07 AM
RT @jsgoodies: node-webgl; a webgl lib for node: http://js.gd/1zc
RT @grorgwork: requestAnimationFrame support landed in OS X WebKit (was already in Chrome builds for a while) http://t.co/MGDsF2r (remem ...
 
1:19 AM
RT @grorgwork: And you can now transition + animate SVG properties via CSS http://t.co/qo0IXUo
 
1:30 AM
anyone in here?
It's me, Zak
 
good evening
 
hi there...
could u help me with a regexp question?
 
perhaps, my regexp skill is about 3/10
so no guarantees :)
 
what is the regexp for anything except "only whitespaces"
 
^\s*$
you can test it here: regexpal.com
that regexp matches a string which is only whitespace
 
1:41 AM
Hmm..
[^\s]*
 
sure
my idea was, block anything that matches the regex, yours is allow anything that matches the regex
 
Mattle, I think yours will be true if it is only whitespaces and I think he wants it to show true if there isn't only whitespaces
 
right?
agreed
 
Yeah
Either or =)
 
yeah
so how can I reverse it
 
1:43 AM
[^\s]*
 
our examples are both
yeah
use Chaos'
 
thank you...I'm having a really hard time learning this on my own for some reason
 
regexpal.com can be a fast way to test things and has a little quick reference on the right
 
Do you want an explaination?
 
while you're learning
 
1:44 AM
Nice
 
if you're willing to give one I'd love it!
oh btw...how can I write [^\s]* as javascript compliant?
 
link to Mozilla Developer's Network docs on regex usage in javascript ^
 
Square brackets indicate a set [abc] means it will match "a" or "b" or "c". If you put a ^ at the beginning like [^abc] then it will match anything except "a" or "b" or "c". We know that \s means any white space, so [^\s]* means any series of whitespace
err means any series of non whitespace
 
and the asterisk?
 
Asterisk means 0 or more occurences
 
1:48 AM
of previous character
 
* = zero more more
+ = one ore more
Yeah, what mattle said
 
how does [^\s]* need to be escaped for javascript?
 
Nope...
Do something like this
(from memory, so bare with me)
var myTestString = "foo bar not white space";
if (myTestString.match(/[^\s]*/)) { alert('not white space'); }
Actually... that has a hole in the logic, should be
 
yup
 
if (myTestString.match(/^[^\s]*$/)) { alert('not white space'); }
 
1:54 AM
ahh yes
missed that
 
Me too =P
 
what is that extra parenthesis at the end for?
 
wrapping if statement and match() call
 
ahhh
of course
my bad
 
the / are delimiters marking the start and end of the regular expression
 
1:56 AM
the two slashes "/" indicate the start and end of the regexpression.
 
:)
explain all the things!
 
not working for me...keeps returning "true"
here is my code
 
You'll soon find yourself wanting to do something like /regexp/g where g indicates a global search
 
myField.add( Validate.Format, { pattern: /[^\s]*/ });
 
Where are you using this?
I mean, where are you actually using the regexp?
 
1:59 AM
I'm using LiveValidate
to validate a form field
 
Never used it
You may not need to specify the slashes..
 
there's nothing special to it...it just uses standard javascript regexps to validate forms
 
You may need to send the regexp as a string, so something like
"^[^\\s*]*$"
 
I'm using other regexps and they all work fine
without being strings
 
Hmm..
 
2:00 AM
yeah, from their documentation: f2.add( Validate.Format, { pattern: /live/i } );
so standard regex format w/o quotes
 
for example: this works perfectly myField_2.add(Validate.Format, { pattern: /^[a-z0-9]+$/i, failureMessage: "Letters and numbers only please." });
 
oh i see
one moment
 
Try /[^\s]+/, that has the same logic
 
this one fails to match words with spaces in between words
 
I don't want to match space in between words
 
2:06 AM
Try the one I just mentioned, it caters for that
 
just spaces only
 
oh, no spaces at all?
ok
 
no, spaces are fine as long as there are non-spaces somewhere
just no "ONLY whitespaces"
 
that one will not match "ssdfsdf sdfsdf"
 
/[^\s]+/ this works perfectly!
thank you
 
2:08 AM
ok
:)
 
what is the difference between /[^\s]+/ and /[^\s]*/
 
one or more of the proceeding
 
You mean, what is the difference between ^[^\s]*$ and /[^\s]/+? The first one doesn't allow any spaces any where, the second one allows spaces as long as there is at least 1 non space character in the string.
 
thank you very much! you've brought Danceplanet one step closer to completion..is there some way I can award karma?
 
Yep
Pass it on =P
 
2:11 AM
* golfclap *
 
thank u to both mattle and Chaos!
 
What's Danceplanet?
 
its a website I'm working on...its a dancing game
 
Okay cool
gl
 
any cool projects u guys are working on?
 
2:14 AM
my current project is a budget planning web app for a financial institution
 
Okay those that work wants me to do =)\
Ncie
 
no side projects?
 
Yeah, a not-for-profit thing that I want to get up... (can't tell you yet =)).
I like learning about html5 + js gaming engines
 
sounds....mysterious
Danceplanet is done entirely in JS...I'm using this animation zachstronaut.com/projects/rotate3di
 
nice
 
2:17 AM
Cool
Could you do something like this ;)
 
thats awesome...the problem with complex JS animation like that is performance is TERRIBLE in firefox
but it looks great in Chrome and Safari
 
i'm lucky, was able to roll out chrome frame to all the IE users (99%) at work
sanity ensued
 
lol
love it
microsoft needs to bunble that with IE
 
It only really displays well in IE9, IE8 and before don't have hardware support =/
Chrome has it though =)
 
are u talking about the cube or chrome panel?
 
2:29 AM
The cube
 
yeah...the problem is firefox though
I wish Mozilla would stop messing around and fix it
 
I haven't used ff for a while, but apparently they're doing quick release cycles and their UI is now up to scratch.. I think their latest version have hardware support too... I guess not if it's not working for you
 
I'm on version 7 beta and no such luck with the hardware support...its still slower than hell
They do work on their UI alot...its not good cause they should be spending their time on the horrible JS performance and harware support
 
v8 ftw
 
how is the JS performance mattle?
 
2:42 AM
of chrome's js engine?
dang good :)
 
although IE has really been making strides in js perf
 
chrome is excellent...I'm worried about Firefox
 
yeah, ff uses spidermonkey
js engine
which is also improving
i'm loving the jquery template plugin currently
contributed to jquery by MS if I'm not mistaken
 
what does it do?
 
2:46 AM
markup wrapped in special script tags with binding expressions for dynamic data
for example
pulling in JSON encoded data and passing it to a markup template
 
interesting
 
it's super easy
 
3:10 AM
if you feel like reading about jquery templates : blog.reybango.com/2010/07/09/…
 
reading it now...
 
3:41 AM
hello friends....
 
evening
 
 
6 hours later…
Tom
9:52 AM
I've got a bit of a problem with javascript running after I've reloaded an asp.net Update panel... does anyone have any knowledge of this kind of thing?
 
posted on August 31, 2011

The Mobilism conference is still nine months away. If you can’t wait that long for good advice on the mobile web, you could come to one of our workshops. On 28th and 29th of September we’ll go to Frankfurt, where we’ll settle down for two days in the Pulse Club to discuss the mobile web with you. Mobilism workshops are a two-day affair where at least half of the time is sp

0
Q: Cross Site Scripting (XSS) error

Guy ThomasMy website seems to producing a Cross Site Scripting (XSS) error. I would appreciate advice on how to cure it. As ususal the key question is what have I just changed? The answer is added Facebook 'Like' buttons to my web pages. I am wondering if there is a conflict with the Google+1 code that ...

 
 
2 hours later…
11:48 AM
0
Q: How to construct a chart from a table?

user35680Good day! Very grateful for any help! How to write a script (php or javascript) which will work as a constructor of charts, where input values ​​are the values ​​from the table, which is derived from the database to the page? The input data in the chart will be data from MS SQL tables. (Dis...

 
12:07 PM
0
Q: Google maps API, callback is a method of object

IncognitoI've ripped out every single line of code here with the exception of this: show = foo.show = function () { alert("test"); }; Now, it works if I run the maps API in this way: foo.display = function() { this.elem = document.getElementById('fooBox'); var script = document.createEle...

 
12:38 PM
It just occurred to me to Google "PHP: The Good Parts", and I found, amazingly, PHP: The Good Parts
I wonder if it's as good as JavaScript: The Good Parts
 
Is it by crockford
 
Nope
Oh, he's from PEI, Canada. He can't be that good ;-)
Hah, from an Amazon review:
> If there's any modern programming language that's more synonymous with bad architecture and poor real-world practices than JavaScript, it's PHP.
 
o/
 
That said, the Amazon reviews are not generally positive.
 
:P
who can be positive about PHP
 
12:47 PM
I could be positive about a book about PHP (and, actually, I'm pretty positive about PHP in general)
But apparently the author of PHP: TGP thinks that pretty much all of the language is Good Parts.
Which, of course, is patently wrong
 
xd
 
So, I think, my suggestion stands that somebody should write a "Good Parts" for PHP. It'll just be a new edition.
Or, perhaps, something more akin to "Elegant JavaScript" - a free e-book of sorts
 
eloquent PHP <trollface />
 
Elegant/Eloquent... similar concepts
 
PHP's main issue is the API.
For instance, all the crap like the PDF drivers should be extensions accessible through their own things, not have a function-call from anywhere.
The common rant about standard in-order and case convention is a must.
Deprecate all harmful features.
 

« first day (319 days earlier)      last day (4630 days later) »