« first day (822 days earlier)      last day (4118 days later) » 

5:00 AM
even if you have some language that takes 3 bytes per char in UTF-8, it would probably take less than UTF-16 because of all the markup is in ASCII
 
pfft... oops
turns out I never tried utf-8!
dumb
Hahahaha, I auto associated utf-8 with ANSI for some reason.
...gah, wait that didn't work. In the editor it looks good, but in firefox (even in source view) it messes up the characters
 
yea
you are still probably telling firefox that your page is in iso-8859-1/ansi/windows-1252
it's important to say what is the "mess" you see because that's not mess to me
it's important debug information
 
you're right, it thinks it's iso-8859-1
that's what the info claims
does the meta information actually dictate the decoding of the page?
 
so I think you see "č" instead of č
 
yes, the special characters are replaced by 2 characters sometimes
 
5:09 AM
you dictate the encoding of the page in the http content type header
I mean, decoding
the browser will use that decoding to decode the page
but right now the browser is using iso-8859-1 to decode your UTF-8 page
you want the browser to use UTF-8 to decode your UTF-8 page
are you using php or just html or what?
 
for this it's just html
 
if you are just using html, you could use <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
inside the head tag
 
that's what I just did, and perfect, worked
 
yeah so in the real world you always need to tell someone what encoding you are using
and also use that encoding
so there's 2 sides.. the real encoding and the told encoding
when the told encoding isn't told... programs guess and that can fail
 
for some reason I didn't realize that actually dictated encoding. The reason being that when the page was UTF-16, I tried telling it other encodings via meta, and it just ignored it.
 
5:12 AM
probably because utf-16 has BOM
 
well I had a page encoded as UTF-16BE as well
either way, all is well in hobbitown, thanks!
 
notepads tend to write BOM regardless
always check hex dump of a file
cheers
 
speaking of hobbitown, did you see The Hobbit?
 
nope :PD
 
@GorchestopherH, you're from NZ?
 
5:15 AM
@phenomnomnominal no, just saying nonsence
 
Oh, not actually from Matamata then haha
 
If I were, I would never not say "all is well in Hobbitown"
currently I say it rather infrequently
Well, once again you gents are capital, thanks heaps!
 
how would you most quickly match the part of the string that doesn't match this regex? /[controller]\.js$/i
 
what does that mean
 
would it be easiest to just /^(a-z0-9_*)[controller]\.js$/i and match on that?
 
5:20 AM
and why do you have [controller]
 
because it's optional
 
do you know what [] does in a regex?
it's the same as [contrle]
 
this is the part where I just blush quietly to myself and open regular-expressions.info isn't it?
 
one character out of c, o, n, t, r, l, e
you probably want (?:controller)?
 
aye
that was what I had in mind >.>
 
5:21 AM
the ? at the end is not a question mark but part of regex
 
Yeah, I recognized that
? - matches one or zero times
 
yes
but (?:) is a non-capturing group
 
well, it's greedy too
Aye
 
well if it was non greedy it would never match anything
?:P
 
Actually I probably want (?:controller){0,1}\.js$ for what I'm thinking
so if you had ControllerController.js it would return as Controller
 
5:24 AM
{0,1} is same as ?
 
ok good
this is why I rubberduck with people smarter than I :p
 
controller is case sensitive here
ControllerController.js wouldn't match
 
even if I hit it with a trailing i?
 
(?:[cC]ontroller)? would match
 
so I probably want /^(a-zA-Z0-9_)*(?:[cC]ontroller)?\.js$/i ?
 
5:27 AM
well if you are using /i
then you can just use /^(a-z0-9_)*(?:controller)?\.js$/i
 
So, my current javascript guru has this amazing javascript-improvement/debugger site called jslint.com. And he it keeps pointing out the same error in my code, but I don't understand the problem at all.
It this I should have this"function () {" instead of "function() {".
He is the Man. And he seems to think that space between the word function and the brackets are important. Does anyone know Why?
This is, apparently, not a style thing. It is important somehow programattically.
 
readability?
 
so that the code doesn't look like shit with everyone writing different amount of space all over the place
no, it's purely style thing
 
Oh, you think? That would make me happier.
To be fair.
He just uses the word "Error" and not "Warning", so perhaps I took the whole thing too far.
 
jslint just enforces your code to be in the certain and same style
 
5:39 AM
All right then. I wished I had asked earlier. I've been combing Google for a while now. Thanks all.
 
6:37 AM
0
Q: Using an Array of Objects to Store Quiz Questions/Answers

user1822824For a quiz web app, I decided the best way to store quiz questions, answers, and other user data related to the question was to use an array of objects for the quiz. I'm not sure if this is the best way to go about it since static information such as the questions and answers will be mixed with u...

 
Hello guys, can i include variables in the header of site and use it in any javascript file consider the header is always loaded on every page. for example <script type="text/javacript"> var obj = {'base_url' : 'http://url.com', etc etc}</script> Then call in any page like this, obj.base_url Is this possible?
 
7:00 AM
Yeah, as long as the object is declared before any of the other files load
 
7:32 AM
Hi guys, my new workplace is using javascriptmvc.com javascript MVC to develop their apps. I come from a background where we develop wordpress sites and we don't build full blown javascript apps. I really need some help. Are there any good places to start learning Javascript MVC. (I find their docs a little overwhelming). Thank you for your guidance
 
8:01 AM
hi
 
guys would you please help me in this
1
Q: asp.net DropDown does not change selected item clientside

DevjoshOn my ASP.Net page i used js plugin from here. i got nice custom form elements suiting the look and feel of my site. Later i Noticed that when i applied the Styled css class on my asp.net dropdown list controls and set it's AutoPostback property to false, i can not see the selected value changing...

 
Thanks florian
 
8:16 AM
0
Q: TinyMCE issue in WordPress 3.5?

Merianos NikosAfter the wordpress upgrade in version 3.5 I have an issue with TinyMCE. When I try to add a link, at the time of the "click" in the "link button" on the TinyMCE editor I get the following error in my browser console. Uncaught TypeError: Object function (a,c,d){var e=a.split(".")[0],f;a=a.spl...

 
> Serial upvoting reversed
hahaha
 
Hahaha, rlemon said that'd happen
 
yeah I thought so too
I'll have the pleasure to reach 10k twice!
 
8:31 AM
0
Q: how to make an infinite map with html and js

MimiEAMI don't exactly know how to ask this question, but basically I was wondering if someone could explain to me how to implement a seemingly dynamic infinite map like the one at http://wordsquared.com/ Thank you

 
8:50 AM
That's how you get to transform a non-malicious cracking attack into a malicious cracking attack. You get a web hero killed and summon the really dangerous web creatures.
Those vicious vicious web creatures won't stop until they have the very last it of information from your servers.
 
9:06 AM
Justice rage
 
Good morning.
 
9:51 AM
@tereško there you go :)
 
you are my hero , @FlorianMargaine
 
I know, I know
1 message moved to recycle bin
@noob1992 in case you don't understand, we don't want to talk about your linux problems here.
once in a while is fine, but spamming like you are is not
 
I was invited to a different room .
 
@rlemon you should definitely install varnish.
 
That's because your messages were binned.
 
9:57 AM
0
A: Div style is undefined (Javascript)

Sudhirchange: for(var div in divs) { to for(div in divs) {

please, hurt him.
 
Sir yes sir
 
heh, he deleted.
and this guy has 24k rep...
 
"to" is not a keyword in javascript
 
@FlorianMargaine WHA!?
 
nobody said that rep count is an objective measure of skill
 
10:07 AM
From the comments :
"IE version less than 9 does not support this property"
Do I miss something ?
 
he meant the getElementsByClassName method
 
OK... that makes sense...
 
That never works
unless it is by index [0]
 
running "Install package" doesn't do anything
do I have to download the plugin or something?
oh! it showed up
after 2 minutes
hmmm there isn't phpcs though.
 
Did you restart Sublime?
Some packages require a restart.
 
10:16 AM
I can't find it at all in the packages list
 
so I couldn't install it
 
Package Control is installed right?
 
yeah
maybe I have to add another repository channel?
 
I can't find that package in the package listing.
It looks like it just isn't in there.
 
10:18 AM
k
how do I install this effin plugin then? github.com/benmatselby/sublime-phpcs
meh, going with the manual install
 
You could add the package repository yourself.
 
it's just the github repo?
 
That is Package Control -> Add Repository
I think so, yes.
 
oh cool
the Install Package window takes some time to appear...
 
10:20 AM
still hasn't appeared yet.
 
It's probably reloading the package list.
Same here.
Maybe there's some server side issues.
 
It just showed up for me.
There's some server issues I reckon.
 
yeah
it showed up after 4 minutes
 
> 8:52 UTC Network performance is impacted due to a significant increase in traffic. Working towards a resolution.
 
10:24 AM
and since I was doing something else, I clicked somewhere else and it removed the window.
 
That's from GitHub.
 
ah, github.
they often have problems :/
 
They'll probably have to upgrade their infrastructure.
Did it snow in Grenoble, Florian?
 
@OctavianDamiean it's snowing since this morning, and hasn't stopped
 
lol
Yesterday we had like 20 to 30cm snowfall and it is expected to snow the next nine days starting this afternoon. :/
 
10:37 AM
rofl
we only have 3 days of snow expected
but right now it's like... a storm
 
hi.. could anybody help me to clarify the JSON.stringfy? What it does exactly? please
 
Soon I'm going to swim to work. :D
 
Hello, Could anybody help me to cleare the value of a 'textarea' using jQuery? I have used $('#abc').val(''); Not working, also used html(), text.
 
@jerryjones $('#abc').val() = ""; (or) document.getElementById('abc').value = '';
 
°¯¯¯¯¯°
 
10:41 AM
We had a lot of snow this night, but we should be in the clear the next 5 days :D
 
@Vinay This - $('#abc').val() = "" - ain't going to work ...
 
@octaviandamiean ..oops sorry then .. but i guess the second option would work... Thanks. am a newbie too
 
0
Q: Fastest way to break string into object

AmberlampsIn more or less complex applications I often see something like that: Namespace.load("Namespace.Module.Elements"); I am guessing that load() loads stuff from a given path dynamically. Since we can not just use window["Namespace.Module.Elements"] we have to break down that string to its structu...

 
if my json.stringify values are like {a:1, b:2} like this. If i want to add one more value to the exisiting one like {a:1, b:2,3, c:4, d:4, e:3,2}
How to add a another value in the existing json.stringify?
 
@Vinay You parse the JSON string back, modify it and stringify it afterwards.
 
10:52 AM
var obj = JSON.parse(JSON.stringify({a:1, b:2}))
obj.c = 4;
obj.d = 4;
obj.e = 3.2;
JSON.stringify(obj);
 
Just like that.
 
@octaviandamiean i dont have any idea about json. but i got a task to finish that....
 
JSON is awesome, think of it as the sliced bread of the internet.
You don't need a masters degree to handle sliced bread. ;)
 
@phenomnomnominal Thanks.. will try to do that...
 
I think I have moved on from youtube video tutorials to learning on my own
 
11:04 AM
cheezburger.com/6963756032 (don't cheat) It's an easier version of Petals Around the Rose
 
@Zirak Abhishek already showed it some months ago, sorry :>
 
Figured...damn internet.
"Petals Around the Rose" was really annoying...
 
I feel really noobish still living in my parents house with out a job .
 
You should feel worse that this is the place you pour these things to
 
Do you have a job ?
 
11:15 AM
I don't need a job, I'm a burrito
 
Damn, I have no idea how to solve that puzzle ._.
 
Well who do you live with ?
 
Other burritos
 
You live with other programmers huh ?
 
Programmers are not burritos
 
11:16 AM
Not a 100%.
 
!!> "Programmers" === "Burritos"
 
@AndréSilva Petals, or the cheezburger one?
 
I want a job.
3
 
@Zirak cheez
 
Stop thinking about numbers as quantifiers, and start thinking about them as just lines, variables.
 
11:17 AM
dude... you're in high school.
 
Yes but I'm 20. Which is not good.
 
petals around the rose looks like a real effin pain
 
I hated it. Had a lucky streak so I was able to figure it out, but after doing that I just looked at it and thought "this was stupid"
 
I hate puzzles like "What's the next number? 2 3 10 12 13 ?"
 
Yeah they are retarded and have infinite solutions
 
11:22 AM
It is logical ater you solve it, but no logical at all when you're trying to find a solution...
 
The horrible breed is the ones with geometric shapes
 
By the way, if anyone can solve the example puzzle I gave...
 
:(
Yeah..
 
Yeah it wasn't too tricky
 
11:24 AM
I know... when I first got that puzzle I thought it was good though..
 
@Zirak Depends in you think base 10 is natural or not. For me it wasn't obvious...
 
Still trying to solve the cheezburger puzzle
 
Oh my, I just read tonight's new noob1992 stories in this channel's backlog.
 
What's the cheezburger puzzle?
 
@dystroy Because you grew up in another planet, where they have 17 fingers
 
11:25 AM
@AndréSilva in case you're bored, the answer is in the comments.
 
@ThiefMaster, isn't he a treat?
 
That guy is almost as bad as the guy I told to run rm -rf /* after asking some stupid question on IRC a few years ago.
 
20 mins ago, by Zirak
http://cheezburger.com/6963756032 (don't cheat) It's an easier version of Petals Around the Rose
 
@FlorianMargaine I can't see the comments. Some facebook things are blocked.
At least here at work
 
After that he complained that he had root on a friend's server and just nuked it. #fail
 
11:25 AM
Oh yeah easy
 
What are you talking about?@ThiefMaster
 
@AndréSilva Another hint: Look at the ones with the repeated numbers.
 
Nothing to see - just go on. Learn for your classes. :)
 
Remember that the squiggly lines you call numbers are variables
 
And I managed to get Arch Linux running and Installed Gnome
 
11:27 AM
@Zirak So lines and repeated numbers..
9:27am here and I already feel retarded..
 
What?@ThiefMaster
 
you can find the answer without actually finding out what the real answer is
 
question_hash[batch_question_id] = ((batch_answer_id || batch_answer_checkbox)) will give the value of 3
I want to add another value like the following:
question_hash[batch_question_id] = ((batch_answer_id || batch_answer_checkbox) && (batch_build_id)) will give the value of 4
I want to show the values like 3,4? but its only show 4 and its ignored the value of 3. where am i doing mistake? could anybody clarify? thanks..
 
As I'm a programmer, I can't find it but I'd have the Groucho method : "get me a four year old child" '(marx-brothers.org/info/quotes.htm)
 
11:34 AM
I'm almost giving up on this f-cking puzzle.
When I see a pattern, in a matter of seconds, I discard because stop making sense..
 
What's up guys. I'm after a little help with a jQuery $.each()...
I'm selecting each table row with some divs in... $('tr').children('.val-string').children('input').each(function(key, value) { }); ... and I want to retrieve each 'tr' where the INPUT value != "null"
Any suggestions?
 
key = document.getElementById("tr").value; value != null;
??
 
$('tr').children('.val-string').children('input').each(function(index, element) { $(element).val() !== "null" })
 
I'd thought about putting an if($(this).val() !== "null") within the $.each(), I'm guessing there's no way to prepend it to the actual $.each() then?
 
@Zirak How in hell did you solve it ?
I give up -_-
 
11:42 AM
For real? You want the answer?
 
Trying to solve for 30 minutes already..
I have no idea and getting frustated with the puzzle. :(
 
Well, you still have half an hour?
 
>.> Ok...
 
Think about the question.
 
Is "new Array(n)" still allowed? If I need twenty elements. But everyone seems to hate the "new"
 
11:43 AM
People with very little concept about numbers can solve it
 
Yeah.. nothing to do with math..
 
And the only information you are given is numbers
Form over function in this case.
 
Thanks for the help @phenomnomnominal / @noob1992
 
I think phenomnomnominal code was better since it was Jquery mine was DOM and JavaScript
 
11:46 AM
So @noob1992, just curious, do you think jQuery isn't JavaScript?
 
The Document Object Model yes. I think it is old. Jquery is new .
 
jQuery == Javascript
 
0
Q: how to add another value to the existing JSON object in ruby on rails and Javascript?

VinayIn the model i have like, def question_hash_string @question_hash_string || '{}' end def question_hash ActiveSupport::JSON.decode question_hash_string end In the Javascript, var question_hash_element = document.getElementById('enr_rds_batch_update_question_hash_string'); var ...

 
Jquery is a JavaScript Library
 
:( I'm getting angry at this.
 
11:50 AM
there is only jQuery
 
I think the answer for this retarded puzzle is 4 but I have no way to confirm that..
 
@AndréSilva, what is your reasoning
 
@AndréSilva I think it's 2
 
That is totaly awsome because the "this" keyword made the difference
 
But I doubt most kids would find this on their own.
 
11:53 AM
:)
 
Because the second column sequence..
 
It is 2
 
Fuck--'
WHY
 
Reeeeaaaaalllly wanna know?
 
Once you find the mapping, you can notice an interesting property, but then, even for kids...
 
11:54 AM
Yes.
 
the kid still has to count
 
Count the holes.
 
What holes..
FUCK YOU
 
In the numbers
 
FUCK THIS PUZZLe
AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH
 
11:54 AM
@AndréSilva look at the left part as a drawing, not as a number
 
Fuck everything. I'm going to smoke TNT...
 
but it works too if you look for the mapping digit->number
 
I was looking for freaking patterns..
All the years of study, all the hard work.. Resumed in getting frustated at a kid puzzle.. Fuck this shit.
 
you can also rewrite it as a[8]+a[8]+a[0]+a[9]=6 ... and then solve the system
it works too the hard way
 
Man... I hate this.
Really.
I'm going to smoke brb --'
 

« first day (822 days earlier)      last day (4118 days later) »