« first day (879 days earlier)      last day (4059 days later) » 

5:03 AM
How do you make a plumber cry ? And why ?
@BenjaminGruenbaum I'm afraid I can't let you do that, Benjamin Gruenbaum
 
Dbz
YES
@Twiz, you are a master of the search engine
 
@ThiefMaster I'm sorry to ask, but I don't see why this was closed again stackoverflow.com/questions/15312584/…
 
@Dbz haha well, I actually had to use that earlier today, so it was even easier to gogole
 
@Dbz oh i misunderstood you hehe
 
Dbz
5:09 AM
@andho and @twiz , I thank you both. Seriously, thanks a lot guys
 
gud mrng @all
 
Dbz
Crap. Didn't work though
 
@BenjaminGruenbaum Were you serious?
 
@twiz Dead serious, he is facing a specific issue related to programming
I'm sure he's not the first guy to run into this problem and that people who'll see it might be able to help him
 
@BenjaminGruenbaum yea it definitely pisses me off to see questions like that closed, but I understand why... I just think the reasoning is stupid
 
5:12 AM
It is a "practical, answerable problems that are unique to the programming profession", it's " practical, answerable questions based on actual problems that you face"
Seems like a good fit to the FAQ, I don't understand why it was closed
 
As always with anything, official rules are meaningless, and the actual rule becomes "Must involve code"
 
Personally, I'm probably just pissed to see a fellow developer suffer because of trade sanctions
He's not even selling anything :/
 
seriously... fuck Iran... or fuck Google... I duno, who should I hate? haha
 
errr I mean the U.S.
 
Dbz
5:14 AM
@twiz, is this supposed to stop the selection of multiple selectables- because it isn't working for me =/
 
I'm from Israel, my country and Iran are not friends, but that's between governments that doesn't mean that as people we should hate each other
 
@Dbz what do you mean by a selectable?
 
I'm sure if someone from google saw this, they would help him
 
Dbz
@twiz jQueryUI selectable
 
@BenjaminGruenbaum Yea, never known of a government I didn't hate...
 
Dbz
5:16 AM
@twiz if you're willing to check it out, I'm working on my options.html page : github.com/Dbz/WebCache
 
@Dbz fuck jQUI... That shit is like a virus... haha
 
Lol, it's a necessary evil. I just think all this fighting is stupid :)
 
@BenjaminGruenbaum necessary is a strong word....
 
More like a somewhat useful evil
No one really wants a government, they just want a police force and shit
It doesn't all need to be one in the same
 
5:18 AM
It's more than just a police force lol, governments do a lot of stuff
 
hi,how to get before 7 days date from present date
 
Hi @all
 
It's just the foreign policy that's fucked up here, well, internal policy sometimes too
 
Dbz
@steve, if you're using a get date function that can return in seconds, just add 7 days worth of seconds?
 
@BenjaminGruenbaum Yea, I know there are a lot of things governments do, but doesn't mean it all needs to be centralized to the extent it is
 
5:19 AM
That's a very broad statement. I don't think there's a problem with the concept of government, just with a lot of current implementations :)
They don't follow the spec
 
From the above image, I am trying to get accrued value from variable Store. How to do that?
I tried Store.data.items[0].data.accrued
 
@BenjaminGruenbaum Maybe its just my perspective in the U.S... Its kind of like everyone forgot that states are supposed to have rights for a reason.
 
not working. Showing as undefined
 
With a smaller country that might not be such a big deal
 
@Mr_Green waht library are you using? That doesn't sound like an object you'd use
 
5:22 AM
Extjs
but I think it doesn't matter
 
@twiz The population of Israel is less than the population of NY city
 
Any idea how to extract accrued value from it?
@BenjaminGruenbaum
 
@Mr_Green your code looks right, why does it say constructor for the object type?
 
data.items[0].data.accrued
 
@Mr_Green try a smaller subset
 
5:24 AM
Of course, I get the impression that Israel has a lot of different and distinct cultures, which I assume causes a lot of problems under a single government.
 
like Store.data, and go one by one
 
tried the same but it is showing undefined whenever I add items[0]
I tried also small
That's why I know that something is wrong at items[0]
 
check items.length
 
Dbz
Cool, so- I found some code online that should work for me
 
Being ugly isn't illegal. Yet.
 
Dbz
5:25 AM
However, it's not.
It's dead simple
$("#selectable").selectable({
      selecting: function(event, ui){
            if( $(".ui-selected, .ui-selecting").length > 1){
                  $(ui.selecting).removeClass("ui-selecting");
            }
      }
});
 
ok @andho
 
Dbz
@andho, might you have an idea why it's not running?
 
@copy Quick python question, how common is documentation? Should I document parameters of methods, etc?
 
it is showing 0 :/ @andho
 
@copy @BenjaminGruenbaum copy found a good purpose for government...
 
5:26 AM
In JavaScript I only document what's not obvious but in Java you're expected to create JavaDoc for most/all methods
 
with the level of verbosity in Java, JavaDoc should be next to useless
 
On contrary, Java is not very expressive
 
but it's not, so there is something wrong with it
 
Premature optimization, that’s like a fart. Premature abstraction is like taking a dump on another developer’s desk. Chris Eric
 
So I installed Nginx, and I changed the default route, but I still only see Welcome to nginx!, suggestions?
 
Dbz
5:38 AM
@andho , and @twiz , thanks guys, I'm off. But thanks =]
 
@Dbz I want to do this in the server side
 
Dbz
wat
 
I hate stupid specifications and their authors =(
 
6:28 AM
Typical SO question today
Hi, I'm doing for(var i=0;i<10;i++){alert(i);} but I want it to go from 20 to 30 and not 0 to 9, how can I do this? Thanks
 
God I hate nginx
I can never get it setup, everytime, 403 error.
 
@BenjaminGruenbaum I downvote these, maybe even close them (NARQ or 2LOC)
 
If you want to go somewhere, goto is the best way to get there. [ken]
 
@Jack you're like the guardian angel of that question :P
4
A: Get id as a number in javascript..?

Benjamin GruenbaumUse parseInt and process it on their HTML, var result = parseInt(x.innerHTML) * parseInt(y.innerHTML) If you don't need to support browsers priot to IE9, you should use textContent instead of innerHTML. If your numbers might be floats you should check out parseFloat instead If you need to be...

The problem with questions like that one is that I go answer it with the best intent to help a user and it ends up getting 7 answers :P
 
6:45 AM
@BenjaminGruenbaum Welcome to the world of FGITW questions. Usually I just ignore them, or watch the others race to be the first, then upvote the best instead anyways :-)
 
codepen.io/mehulghai/details/pHKBg <- somebody ripped my demo off
even with the info -_-
gosh...
 
watching that is an end of FREE LICENCED demos from me... and no more codepens
 
@JanDvorak Didn't know it was a term :P
 
sadly hes my senior @ College
 
6:46 AM
!!/google fastest gun in the west stackoverfow meta
 
Yeah, I can google :P
Off to walk the dawg
 
@BenjaminGruenbaum It sure seems like that ;-)
 
@Jack Why the fallback to 0 ?
 
@BenjaminGruenbaum Excellent question
Imagine that the text content is an empty string
And .innerText is not defined.
parseInt(null, 10) == NaN
 
6:58 AM
Isn't NaN what you'd expect when trying to multiply an empty string with something?
 
That's debatable I guess.
 
!!> ""*""
 
Or, for that matter, multiply anything that isn't two numbers?
 
@JanDvorak 0
 
That's casting though, "" is just cast to int and its int value is 0
 
6:59 AM
@BenjaminGruenbaum I differentiate between empty string and string without a number though.
 
!!> "1a"*"2b"
 
@JanDvorak "NaN"
 
But there is a number... :-)
 
lol
 
@JanDvorak That's because Number("2b") is NaN
Number("") is 0, for some reason, probably the same reason null+null is
!!>null+null
 
7:00 AM
@BenjaminGruenbaum 0
 
!!> Number.valueOf.call(null)
 
@JanDvorak "TypeError: Cannot convert null to object"
 
@JanDvorak Obviously, since
!!>typeof null
 
@BenjaminGruenbaum "object"
 
(I'm kidding of course, it's a primitive value type according to the spec)
 
7:01 AM
c'mon, ever heard of null=>window?
 
Number.valueOf.call(window) === window :)
 
!!>(function(){return this===5}).call(5)
 
@BenjaminGruenbaum true
 
Oh snap, the bot runs in strict mode :) (otherwise it's false)
 
@BenjaminGruenbaum but...
 
7:08 AM
@andho run it in the browser window
 
@BenjaminGruenbaum true
 
yeah but...it should be true right
is it a backwards compatibility thing
 
Only in strict mode, in non-strict mode it gets effected by autoboxing
It gets wrapped in an object (well, not really but yeah)
 
says Number { }
with a console.log(this)
 
!!>(new Number(6)) === 6
 
7:11 AM
@BenjaminGruenbaum false
 
LMFAO
0
Q: Any new method to enhance user performance ??? like tableless approach using div?

RajthilakRecently i heard about TABLE LESS APPROACH METHODOLOGY to speed up page load speed , for using low bandwidth.. any other methodology is there to enhance user performance and user interface ???

 
!!>(new Number(6)+1) === 7
 
@andho true
 
boxing and unboxing ftw
 
well
hehe
 
7:15 AM
!!>" 5 " * " 5 "
 
@BenjaminGruenbaum 25
 
Whitespace, it works even if I have hundreds of it
This is probably one of the things python does better than JS, then again I'm very careful with my types so it was not really an issue before
 
!!>Number(Array(1001).join(" ")+"5")
 
@JanDvorak "Exception: too many items"
 
wat?
!!> Array(1001).join(" ")
 
7:18 AM
@JanDvorak "Exception: too many items"
 
!!> Number(Array(51).join(" ")+"5")
 
@BenjaminGruenbaum 5
 
moreover, it works in my browser
 
Ok guys
I programmed my first thing
It wont work though.....
"use strict"

function symaxis(a, b) {
	var d = -1*b/a*2;
	console.log("D = "+d)
	var axis = (d);
	return [axis]

function vertex (a, b, c)
	var e = (c-b*b);
	var f = (a*a*a*a);
	var g = e/f
	console.log("G = "+g)
	var vertexfin = (g);
	return [vertexfin]
}
Ok so what did I do wrong?
 
@BrandonGelfand what is the problem? -.-
 
7:22 AM
It wont work....
Did I mess up?
 
why won't it work
 
What's symaxis and vertex?
 
symetrical axis
 
Vertex as in what? a vertex in a graph? A vector?
 
vertex of the parabola
 
7:23 AM
Oh :) I love math
 
the y axis m8
how do I get it to run?
I cant get it to in dreamweaver...
 
Isn't it like -b/2a or something?
oh wait, that's what you're doing, it seems correct
Except when you're returning [axis] you're returning an array wrapping the value
You'd probably just like to return axis
 
return = axis ?
 
return axis;
Or more compactly:
function symAxis(a,b){
    return -b/(2*a);
}
 
@BenjaminGruenbaum i think the code is not running.
 
7:26 AM
"use strict"

function symaxis(a, b) {
	var d = -1*b/a*2;
	console.log("D = "+d)
	var axis = (d);
	return axis;

function vertex (a, b, c)
	var e = (c-b*b);
	var f = (a*a*a*a);
	var g = e/f;
	console.log("G = "+g)
	var vertexfin = (g);
	return vertexfin;
}
ok i revised it
syntax error line 10
 
You're missing } and { in places
 
what am I doing wrong?
 
@BrandonGelfand what browser is this?
 
dreamweaver
the viewer inside it
 
@BenjaminGruenbaum help him figure it out using the error msgs
 
7:27 AM
function symaxis(a, b) {
    	var d = -1*b/a*2;
    	console.log("D = "+d)
    	var axis = (d);
    	return axis;
} // <- this
to terminate the function
 
can is still use a and b inputs from same thing?
 
Dreamweaver is very heavy and bloated, you can open notepad++ or sublimetext or something much more lightweight
 
cause it is using the same a and b for both of them
 
okay dreamweaver is not very helpful with debugging javascript @BrandonGelfand
 
After that, you could call console.log(symaxis(5,10)) and see the results :)
@BrandonGelfand In that case you'd like a parabola object :)
 
7:28 AM
"use strict"

function symaxis(a, b) {
var d = -1*b/a*2;
console.log("D = "+d)
var axis = (d);
return axis;
} //

function vertex (a, b, c) {
var e = (c-b*b);
var f = (a*a*a*a);
var g = e/f;
console.log("G = "+g)
var vertexfin = (g);
return vertexfin;
}
ok no erros now
 
you can run it in a browser console, or node.js, or put it in a javascript file and load in an html script.
I think the easiest for you to do in this case is run in a browser console
 
errors
 
When we have a bunch of variables/actions that describe a noun, we usually create an object for it
You're making good progress though :) Good work
 
$(function() {
	$("input").on("change", function() {
		var a = $("#a").val();
		var b = $("#b").val();
		var c = $("#c").val();
		var sol = solve(a, b, c);
		$("#axis").html(sol[0]);
		$("#vertexfin").html(sol[1]);
	});
});
 
also, you are missing a couple of semicolons (;) at the end of some lines. Javascript allows this. I prefer to put the semicolons. either way, it should be consistent. you should put it, or you shouldn't in all lines
 
7:29 AM
right?
 
browser console will give you more helpful error messages like "SyntaxError: Unexpected token var"
 
@andho You should put it, it's not a matter of preference, JavaScript has a lot of quirks with semicolon completion it can bite you in the ass
 
where do do that?
 
@BrandonGelfand Not sure what solve is
Anyway, I got to go, I got class in 30 minutes, ttyl
 
its the button
 
7:31 AM
@BenjaminGruenbaum yeah but there is actually a movement towards semicolon-less javascript -.- :S
 
@andho how do I do the part where they input the numbers?
 
@andho Some people just want to watch the world burn
 
@BrandonGelfand with regards to the above code?
 
the original one
does that work with this one:
$(function() {
	$("input").on("change", function() {
		var a = $("#a").val();
		var b = $("#b").val();
		var c = $("#c").val();
		var sol = solve(a, b, c);
		$("#axis").html(sol[0]);
		$("#vertexfin").html(sol[1]);
	});
});
"use strict"

function symaxis(a, b) {
	var d = -1*b/a*2;
	console.log("D = "+d)
	var axis = (d);
	return axis;
} //

function vertex (a, b, c) {
	var e = (c-b*b);
	var f = (a*a*a*a);
	var g = e/f;
	console.log("G = "+g)
	var vertexfin = (g);
	return vertexfin;
}
 
assuming that solve function returns an array, it looks good
 
7:34 AM
so, heres the awkward question
I don't know how to make it run....
 
$('input') will be a problem as that captures all the inputs currently in the DOM
 
what do you suggest instead?
 
you want to capture the change event on #a, #b and #c right?
 
#a #b #c are the inputs
so yes
 
you can either give all of them the same class, eg. 'myinput' and capture the 'change' event with $('.change'), or you can use $('#a, #b, #c') to capture all of them by id
so you would have:
....
$('#a, #b, #c').on('change', function() {
....
 
7:38 AM
$(function() {
$('#a, #b, #c').on('change', function() {
var a = $("#a").val();
var b = $("#b").val();
var c = $("#c").val();
var sol = solve(a, b, c);
$("#axis").html(sol[0]);
$("#vertexfin").html(sol[1]);
});
});
right?
 
please keep formatting
but yeah that's right
the content of #axis and #vertexfin should change if value of either #a, #b or #c changes
 
$(function() {
	$('#a, #b, #c').on('change', function() {
		var a = $("#a").val();
		var b = $("#b").val();
		var c = $("#c").val();
		var sol = symaxis (a, b);
		var sol = vertex (a, b, c);
		$("#axis").html(sol[0]);
		$("#vertexfin").html(sol[1]);
	});
});
"use strict"

function symaxis (a, b) {
	var d = -1*b/a*2;
	console.log("D = "+d)
	var axis = (d);
	return axis;
} //

function vertex (a, b, c) {
	var e = (c-b*b);
	var f = (a*a*a*a);
	var g = e/f;
	console.log("G = "+g)
	var vertexfin = (g);
	return vertexfin;
}
right? @andho
 
yeah? any problem with this?
 
yeah...
how do i run it?
 
also, don't use "use strict" in global scope. also it's missing the semicolon. It's not a bad thing in itself. but it might cause problems with other libraries that doesn't use "use strict"
 
7:46 AM
so I should just delete it?
 
is that all your code, or do you have an html file that loads this javascript file or something?
 
nope thats it
I need to write some html now right?
 
where are your inputs?? :)
inputs are HTML
 
oh hi
 
<!doctype html>
<html manifest="cache.manifest">
<head>
	<title>Solver</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel="stylesheet" type="text/css" href="style.css">
	<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="js/solver.js"></script>
	<script type="text/javascript" src="js/ui.js"></script>
</head>
<body>
	<table>
		<tr class="var-entry">
			<td class="label">
				a:
			</td>
			<td>
				<input type="number" id="a">
that look right?
the id, is that the one with or without the #
without right?
 
7:51 AM
whoa, use pastebin or something for code that is too long
 
sorry...
 
yeah looks good
 
CACHE MANIFEST
#v1.0
js/jquery-1.9.1.min.js
js/ui.js
js/solver.js
style.css
 
and one of the files like solver.js contains your javascript code right
 
table {
	width: 100%;
}
tr {
	width: 100%;
	font-size: 23px;
	height: 25px;
}

input {
	width: 100%;
	font-size: 23px;
	height: 25px;
}
yep
 
7:52 AM
yeah that should work
 
do I need cache.manifest ?
should I use it?
I need it right?
 
An Irishman, a homosexual and a Jew walk into a bar. What a fine example of an integrated community
 
you don't need it
 
how do I make a site in dreamweaver?
like one to test this thing on
 
i don't use dreamweaver
and that thing should work as it is
 
8:00 AM
HTML pages should be made in a text editor, not in a WYSIWYG tool
 
it would have been smart to add a submit button......
@andho does it need a sumbit button?
submit*
 
haha only if you want to submit
i gotta do some stuff, cya
 
wait
how do I make one?
a submit button
@andho
@JanDvorak
 
<input type="submit" value="Submit" />
 
8:05 AM
but you need to enclose all your form elements in a <form> tag
 
nothing anywhere else right?
 
learn about HTML forms
 
because there are some attributes in form that you need, and it's better than asking these things here
maybe this
i don't know if that's the best thing
 
NOOOOO
IT DOESNT WORK
DAMN IT
 
8:08 AM
Whether it works or not is dependent on a number of factors
 
Gee thanks, never would have guessed....
 
Including "do you really need a submit button there?"
Can you answer that at least?
 
it wont work....
what did i do wrong?
<input type="submit" value="Submit" />
does it need to be inside the table?
 
Simplicity is prerequisite for reliability. [Edsger W. Dijkstra]
 
8:24 AM
if ejs and jade got in a bar fight, who would win and why?
 
the bartender. He holds a shotgun.
 
That's what I thought. Do people really still use those things ?
 
shotguns?
 
Na, you edited. Silly template engines. I can at least see the point of jade but ejs looks like something for people not knowing web technologies.
 
what do you use?
I dabbled in jade and was about to check out ejs
I am working on some code to just replace everything with microsoft paint, its more my speed but until then I am just going to have to rub my face across the keyboard and troubleshoot it
 
8:40 AM
@phenomnomnominal Hm... If there are 14 versions of your script why the release version is 0.0.7? Are you a fan of James Bond?
 
<button>Submit Yo</button>
 
@VisioN, I only upped the number when I changed something, instead of just trying to fix something
 
@phenomnomnominal I made my first JS program!
 
@phenomnomnominal is James Bond
 
GUESS WHAT ELSE!
IT WONT RUN!!!!!! OOOHHH IT FEELS SO NICE TO MAKE SOMETHING THAT DOESNT WORK :/
 
8:42 AM
Make a js fiddle and I will try to help you fix it
Also, yes, I'm James Bond.
2
 
Please desist your caps abuse
 
link ^ ^ ^@phenomnomnominal
 
I'm on my phone, I'll look later.
 
-_-
I need to go to bed.....
@phenomnomnominal say @BrandonGelfand
then tell me whts wrong so I know
I gtg to bed
my mom is gonna decapitate me if i don't.....
SHE HAS A BLADE!! GOTTA GO!
 
Well you'll either wake up to an answer, or you won't. I'm actually busy right now.
 
8:46 AM
Ok, Thanks @phenomnomnominal
Ur james bond though so u can be in 2 places at once @phenomnomnominal :D :D :D
Night
My dog is passing gas, and I am not joking either....
 
James Bond is not a wizard.
 
god smells like I am in a sewer.......
 
@BrandonGelfand Yeah, of course we should know everything about it :)
 
what the dog passing gas or the sewer?
or the code?
 
@dystroy What a stupid question, as well as most answers...
@BrandonGelfand dog+sewer
 
8:50 AM
yeah, its retched
well GN all
or GM
whtever it is where u ppl live....
 
@VisioN All the answers look the same for me, why are they stupid ? I voted to close and I'd vote to delete if there is no comment from OP.
 
@phenomnomnominal found a possible co-founder in San diego
so happy :D
ttyl @phenomnomnominal
 
@dystroy eval eval eval eval
 
You don't need to ping me every 2 seconds dude.
 
sorry.....
gn..
 
8:52 AM
@VisioN I thought it was interesting to explain why OP's code wasn't working. eval most often shouldn't be used but it can't be and so it's better to tell where the error is.
Personally I use eval instead of JSON.parse in one of my applications because it lets me have NaN in my big numbers arrays (scientific application)
 
@phenomnomnominal ping :D
 
@dystroy you know, the more I read new questions the more I despair of it. Nothing interesting.. all are toooo localized...
 
@Raynos shhh :)
 
@dystroy welcome to stackoverflow
 
@VisioN Someday I think I'll stop answering...
 
8:55 AM
if you want interesting questions
 
@dystroy ... and most interesting are already answered.
 
then go somewhere else :)
 
@VisioN A solution is to learn a new language. Sometimes interesting stuff happens on
 
I recommend you challenge yourself with interesting problems and do lots of open source
 
@Raynos you're not right. even now sometimes we can find really interesting questions
 
8:56 AM
Yes, every 2 or 3 days a question is fun and we're enlightened
 
For sure
but they are rare
and its simply not efficient
 
Regarding JSON and eval, this recent one was fun :
1
Q: JSON syntax error: 'unexpected number' or 'JSON.parse: expected ',' or '}' after property value in object'

GVelascohI receive this response from a POST request using $.ajax(): {"command": 6,"log_size":50,"log":[{"type": 30,"tag": "*NETEVENT*","sensors": "0D","ti": 1047161877,"to": 0},{"type": 30,"tag": " __START__","sensors": "00","ti": 0000011410,"to": 0},{"type": 30,"tag": "*NETEVENT*","sensors": "0A","ti":...

 

« first day (879 days earlier)      last day (4059 days later) »