« first day (1696 days earlier)      last day (3258 days later) » 

12:10 AM
> fatal error: unexpectedly found nil while unwrapping an Optional value
Great type system
 
12:28 AM
Nice, found a remote code execution in this online interpreter
 
congrats!
 
1:17 AM
The two site founders, Jeff Atwood and Joel Spolsky, had very different ideas what kind of questions should be on topic for SO. I half expected you to end this with Atwood creating a Chamber of Secrets. — BSMP 2 days ago
^ this is a good idea. Can we create a chamber of secrets for stackoverflow?
then we can open it someday and destroy it and look heroic
 
user1596138
1:29 AM
HOLY SHIT
 
user1596138
I moved 618 miles and the latitude at home was 41.1586, the latitude in my new town, 618 miles away, is also 41.1586.
 
user1596138
@Loktar ^ Columbia City IN to Bellevue NE, identical no shit
 
user1596138
The town's latitudes that is, not the houses.
 
user1596138
I didn't even move 0.0001 North or South haha
 
Code: struct Bar: Equatable {}
 
1:58 AM
<stdin>:180:9: error: binary operator '!=' cannot be applied to two Int operands
println(x != y)
        ^
<stdin>:180:9: note: overloads for '!=' exist with these partially matching parameter lists: (Int, Int)
println(x != y)
Hrm
 
2:11 AM
In an object constructor, can I shortcut this.x = 0; this.y = 0; this.z = 0; with this = {x: 0, y: 0, z: 0}?
 
no
 
2:32 AM
@Jhawins lol thats nuts man
 
2:56 AM
@oldmud0 this.x = this.y = this.z = 0;
 
@royhowie it's about a programming tool?
 
@SomeKittens isn't that more for super user?
either way, I don't think that's valid HTML: stackoverflow.com/a/2373171/2476755
 
> software tools commonly used by programmers
on topic, but a bit odd. I wouldn't expect syntax highlighting to work with invalid code
 
 
2 hours later…
5:05 AM
@royhowie That popular answer is wrong. HTML5 specifies unquoted attribute as the first option, before single and double quote.
 
@AwalGarg ko, gotcha
 
5:24 AM
 
What do you guys prefer? backbone or any framework like angular or es6 modules?
 
@mr
@mr_green i'd prefer angular but angular 2 will be comming out soon... which is whole lot different from version 1.
 
@Mr_Green I've heard Angular is pretty neat
 
If I were to build something in Angular 1.x now I would put some effort into decoupling myself as much as possible from the framework to make a future move to Angular 2.x easier (this is a good idea anyway btw)
 
5:29 AM
I've heard that Angular is the best and the worst. And that was just today.
 
I like that Backbone for being lightweight, but it's extremely verbose and I wouldn't personally use it without Marionette
 
what is this babel then?
 
And I would consider React for rendering if going that way
 
@ivarni what do you mean "decoupling myself?". is that mean using minimal dependency of angular 1?
 
@KeonKim Keeping your core application logic separated from your controllers/services and just let them delegate to framework-agnostic code
 
5:36 AM
Babel or angularjs ?
I think they are not related.. still reading
 
@ won't that make the application heavier? I mean putting angular and jquery together is already heavy enough...
@ivarni
 
Imagine I have an object like this:
var testObject = {test:1,test2:2,supportInformation:{supportInfo:{supportInfo:"Yesy"}}}
I wont to filter out the supportInfo , only its length is > 0
how to do this in _.js ?
 
@KeonKim See stackoverflow.com/questions/26682705/… and I'm not sure what you mean by heavier or how JQuery comes into play
 
if(testObject.supportInformation.supportInfo.supportInfo)
 
delete testObject.supportInformation.supportInfo.supportInfo;
 
5:43 AM
@Mr_Green: I have a question here, what if testObject.supportInformation is undefined? Is there any way in which _.js can do this check ?
 
I am not sure of that
 
why does this fail on firefox:
let aboutBatman = (({
    name:{ first:firstName, last:lastName },
    profile:{ orphan=void 0,superpowers=void 0,abilities='none' }
  })  => {return {firstName,lastName,orphan,superpowers,abilities}});
SyntaxError: missing : after property id
 
you can do something like this

if(testObject && testObject.supportInformation.supportInfo.supportInfo)
 
@Mr_Green: Thanks! .
 
@vamsiampolu you are using = in an object
use : instead
`profile:{ orphan=void 0,superpowers=void 0,abilities='none' }`

**should be**

`profile:{ orphan:void 0,superpowers:void 0,abilities:'none' }`
 
5:50 AM
@Mr_Green default_values syntax is different for object when destructuring?
 
I think one of you is talking about ES5 and the other one is talking about ES6 but I could be mistaken
 
im trying to figure out this ES6 thing
 
haha ok
I admit I don't know ES6 syntax
 
im watching these videos,they have ? based refutable destructuring in the video,mdn says that does not exist(i trust mdn on this one)
 
@vamsiampolu No, they are mostly the same. Object destructure does not change colon to equal.
And, it should be called ES2015.
 
6:01 AM
ok
why the new name,are they planning ES2016?
 
They renamed ES7 to ES2016
they're aiming for a yearly release schedule going forwards
 
Yearly?! That's impossible.
 
so,spec speed > implementaion speed(its june and no one is a 100%,can they maintain,fix bugs and optimize before ES2016)
 
@Sheepy I'm pretty sure I heard it being stated at JSConf that that was the idea behind rename to ES2015/ES2016
But I don't have a written source
 
@ivarni I think the intention is true. I can't find a concrete note either, but it is mentioned from multiple sources. But I don't understand why. Why yearly and why they think it'd be feasible. It this going to be like browser version?
 
6:19 AM
@Sheepy I think the feature sets for each new version would need to be way smaller, and it would definetely make the need for transpiling more or less constant if that's the way it's going to be
 
I guess we can do nothing but to see how it works out.
 
i heard somewhere that mozilla has been working on these features for nearly ten years now,should they one feature at a time in the spec instead of doing feature sets...it would give them a chance to figure out how people are using them
 
@Sheepy I think it was Sebastian McKenzie who talked about it but I can't find his slides anywhere yet and no video either
@Sheepy Yup, though it makes it even more tempting for me to push harder for using Babel at my current project
 
@vamsiampolu Not exactly. Mozilla started with ES4 many (10+) years ago. But it is abandoned by all other browsers due to political or other reasons. ES5 is a fresh start, and ES6 inherits something from ES4 but is not ES4.
Must Babel be run in Node? I can manually modify uglifyjs and uglifycss to run in any js shell, but I can't even download browser.js without npm.
 
6:37 AM
@Sheepy They have a REPL that seems to run in the browser
 
@ivarni Good idea. That seems to be the easy way. I got a 1.8MB js file. Thanks. :D
 
i think they have a flag of some kind for node,but their support is different features than chrome
 
7:12 AM
What is the shortcut to move to console tab in chrome ? ELt's say Im in Network tab and I want to go to Console tab ? ( not the bottom console window)?
 
what is the advantage of using await async ? than promise
 
Should I close this or not ?
0
Q: How do I stop error propagation in JQuery's $.Deferred()?

LinkskuI thought fail() would stop error propagation, but that doesn't seem to happen. Here's what I have: someAsynTask() .then(function(){ 1/0; }) .fail(function(){ console.log('Error handled.'); }) .then(function(){ console.log('test'); // not printed (expected it to print) })...

 
and what is the purpose that generators are meant to solve, they aren't another way to write promises ?
 
No, it's an enumerable.
If you need to generate numbers to infinity, it makes a lot more sense to use a generator and calculate one number at a time, return it, and wait for a request for the next. That's the principle.
We just (ab)use it to pump promises.
The advantage of await/async is to write synchronous looking code. You have no nesting, promises, etc. Not explicitly at least. It's clearer and easier to read/maintain/reason about.
 
I suppose you could also use them to work with streams instead of listening on "data" events
 
7:26 AM
ok
 
generators are scary,because they are very stateful with yield and they dont run like normal functions
you might not be sure what the value is after a particular yield,is it the default or the value passed in
 
@argentum47 Generator supports supplier/consumer patterns, such as in data streaming. They do not solve the same problems as promise, which is about deferred/triggered callback.
 
@vamsiampolu Generates are quite normal. They have a next function etc. All ES environment really does is hide the finer details of iterating over a generator. There is no reason why you can't explicitly write the details down yourself if you preer that.
 
since I know a bit about ruby, I find yield to be cool.. one example could be
var tmpl = yield fs.readFile('template.html'), mardown = yield fs.readFile('markdown.md') and then maybe Handlebars.compile(tmpl, markdown). if that makes sense.
 
7:55 AM
Is there anyone who might know why my string "förd" turns into "f\xf6rd" when I try to send it in a text body of a HTTP request? It turns out the same in the request string (in my debugger) if I write 'f\u00F6rd'. If it makes any difference I'm using Google App's UrlFetchApp.
 
@Gemtastic I think we need more details. Where did you see the \xf6, for example, or how do you send the request, whether you are using any library to transform the data.
 
I see it in the debugger of the code editor in google sheets.
I am not using any library at all; the body is a JSON object stringified:
var object = '{' +
'"term": "förd"' +
'}';
 
Good. And how did you send the request? Native XMLHttpRequest?
 
> If it makes any difference I'm using Google App's UrlFetchApp.
 
how can I change this to module pattern pastie.org/10229003
 
8:02 AM
var url = 'http://www.myurl.com';

var params = {
    "contentType": "text/json; charset=utf-8",
    "method" : "GET",
    "payload" : object
};

var result = UrlFetchApp(url, params);
I'm on a mac if that has any importance here in regards to encoding
 
!!> decodeURI('f\xf6rd')
 
@SomeGuy "förd"
 
is codewars acting strange today? It's timing me out on a solution that takes 0.09 seconds on my machine.
 
It's probably converted because the request is being encoded before being sent
 
Hmm, then why do I get an error message there?
 
8:06 AM
What error message?
 
"Unexpected token"
 
@Gemtastic Can you decode/unescape the received data from the server side?
 
which comes from that Elastic search (which is what I'm querying) isn't accepting the object
No, I can't touch the server side unfortunately since we've bought a service for this...
I can query other things just fine, just not this with a foreign letter in it
 
@Gemtastic The main problem, I think, is that UrlFetchApp (or the json convertor) is helpfully escaping unsafe characters, but the receiving party is not unescaping it.
 
@Sheepy Sounds likely.
 
8:10 AM
Either that or the receiving party does not allow these characters.
 
It accepts the same query through curl
 
UrlFetchApp seems to accept a parameter that will disable character escaping.
 
scottcheng.github.io/cropit how are they doing this thing
 
@argentum47 Is this not like asking how do builders build a house or how an artist paint a painting?
 
Add an else if branch to your existing if/else statement. If the number put into the function is not a number at all, instead of return true; or return false;, the function should return a string that tells the user that their input isn't a number. (This string can say whatever you like.)
where is the syntax error?
 
8:20 AM
1 message moved to Trash can
@Harish Please don't post unformatted code - hit Ctrl+K before sending, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
wait, the bot is autodetecting unformatted code now?
 
@Sheepy there is like a general concept behind building these isn't it ? Although I think I have to read the code to understand it .. I was asking if anyone knew the general concept.
 
1 message moved to Trash can
@Harish Please don't post unformatted code - hit Ctrl+K before sending, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
1 message moved to Trash can
@Harish Please don't post unformatted code - hit Ctrl+K before sending, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
@CapricaSix I'm hitting the Ctrl+K
 
no, you're not
this is what formatted code looks like
var isEven = function(number) {
// Your code goes here!
if(NaN(number){
return "input isn't a number;
}
else if(number){
return "input is a number";
}

else{
return "input is a number";
}

};
 
8:24 AM
@FlorianMargaine ok.
 
see the difference?
and you have several syntax errors
 
@argentum47 The general concept is to figure out the requirements, design, build, and test. Not sure how useful that is. There are many details. There are user input, data input, data conversion, model display, control, and I think special logic like aspect control.
@Gemtastic Any luck with the UrlFetchApp parameter?
 
@Harish you have 2 syntax errors
and you're using NaN wrongly... you probably want isNaN
 
@FlorianMargaine where?
 
@Harish it's 10 lines of code, I'll let you find them :)
but hey, you have the exact count at least.
 
8:29 AM
@FlorianMargaine I got one sytex error on first if.
where is the second?
 
@Harish find it. Or use an IDE
 
I'm not using IDE
 
@Harish fix the first one and the second will reveal itself
 
@Harish Press F12. A tool will popup. There is a tab called 'console'. Paste your code and run it.
In Firefox you can also find ScratchPad from the menu, which is a very basic but serviceable editor that has highlight and also allow you to run code.
 
@Harish Perhaps you should. IDEs help catch errors. You appear to need that help.
 
8:31 AM
I kinda missed this weekend's talk(s?). Is there any place where I can rewatch the hangout?
 
@RoelvanUden I'm doing it without IDE.
 
@Harish And I'm helping you how to debug and find errors without IDE. There are also online IDEs, if you prefer.
 
@Sheepy ok
 
@Harish Is there any reason why you don't want an IDE?
 
8:34 AM
@FlorianMargaine I probably should've checked the g+ community before asking here. Didn't see it get posted. Thanks
 
@RoelvanUden I'm learning it.
 
@Sheepy Not yet, I'm bad at googling; I never find what I'm looking for :/
 
You learn faster when you don't spend a lot of time on trivial crap that will come naturally after it being pointed out a few times.
 
@RoelvanUden ok.
 
@RoelvanUden That's what it feels like I'm doing right now. :P
 
8:36 AM
@Gemtastic developers.google.com/apps-script/reference/url-fetch/… search in-page for "escap". You should find an advanced parameter called "escaping".
 
Thank you so much!
 
@Harish Learning IDE takes time, true. But once you get it working for you, you will save time. Lots of time.
 
1 message moved to Trash can
@Harish Please don't post unformatted code - hit Ctrl+K before sending, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
@Harish You still have invalid syntax. else if what? IDEs help. Truly.
 
why its not formatted here.
 
8:41 AM
@RoelvanUden the else if is not the problem...
 
Though now I learned that the string already encoded before it gets put in O.o
 
the problem is before that :)
 
@Harish You need to use Stackoverflow syntax to markup your code.
 
@FlorianMargaine Oh sure I didn't even see the stupid quotes.
There are tons of problems in that code though. I don't usually see syntax issues because IDEs help and I can't be bothered to look for such crap. I'll focus on real problem.
 
yeah, I can understand
 
8:42 AM
I often heard a misconception: pros don't use IDE. True, pros don't need IDE, but that doesn't mean they don't like IDE.
 
you could also use real languages that don't let you care about syntax
i.e. lisp
 
i have very little reputation to talk, and to ask another question
i only can ask this one
 
Lisp need an IDE more than any other languages lol
 
0
Q: JavaScript master detail panel - how to pass ajax object?

user2262511I am getting response to a Ajax request with returned object as data with let says 10-15 parameters. Now I am adding for each item a table row in master page, how can I pass this data for each item when clicked on other side of details function without making another ajax call or adding all para...

 
Elitism jerks who're all like "IDEs make your skills weaker!" never had to do with real problems in real code.
 
8:44 AM
Did anybody here play with the stack exchange API (besides me) ?
 
@RoelvanUden depends on what you call "IDE" I guess
plenty of people had to do with real problems in real code using ST
@DenysSéguret barely
 
Once you've tacked on syntax highlighting, autocompletes, linters, etc, it's pretty much an IDE.
 
1 message moved to Trash can
@Harish Please don't post unformatted code - hit Ctrl+K before sending, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
Perhaps they mix up "IDE" with "frameworks that is virtually a new language"?
 
var isEven = function(number) {
  // Your code goes here!
    if(isNaN(number)){
      return "input isn't a number;
  }
  else if(isNaN){
      return "input is a number";
  }

  else{
      return "input is a number";
  }

};
 
8:45 AM
@FlorianMargaine I wonder what would be the right way to get all answer scores. List all answers by last_activity_date and repeat ?
 
@Harish yay! you did it!
 
@Harish Ah. Now the code is formatted.
 
@DenysSéguret all the answers?
 
Today's trash can looks interesting though
 
@Sheepy I know it now
 
8:46 AM
@FlorianMargaine Yes
 
@DenysSéguret yeah, handle pagination and rate limitation
 
That's what @aioobe does for the stack rating
 
where is the error now?
 
I'd say 2 places, and another logic error
 
@FlorianMargaine but how to manage new votes ? Is last_activity_date updated when the score changes ? (@aioobe can you answer that ?)
 
8:47 AM
@Harish The logic doesn't make any sense. Not to mention you're testing the truthiness of a function in one case.
 
    :23746954
var isEven = function(number) {
    if(number / 2 === 0)
    	return "is even";

    	return "-1";
    };
 
@DenysSéguret ah, good question
 
@user2262511 shh.... spoiler alert
 
@user2262511 You get points for trying, but, wrong. :P
 
@user2262511 and it's slightly wrong (edit distance: 1)
 
8:48 AM
Assignment instead of comparison, is number really a number, why not modulo?
 
modified it
 
@Harish Remember the Firefox ScratchPad I told you? With its highlighting, one of the lines will look different from the others. Or, if you try to run the code, you will get the line number in the error message.
 
@user2262511 hint: what's 2/2? What's 0/2?
 
anyway i need to focus on my stuff
stringy.json is not working
 
!!> 2/2
 
8:50 AM
@Kippie 1
 
var isEven = function(number) {
  // Your code goes here!
    if(number % 2 === 0){
      return "input isn't a number;
  }
  else if(number % 2 != 0){
      return "input isn't  a number";
  }

  else{
      return "input is a number";
  }

};
now what is the problem here?
 
Quotes.
 
return number % 2 === 0; ....
 
And more.
 
I am going to scare everyone now..
close your eyes, it's coming...
 
8:53 AM
Also, morning :)
 
@Harish hint: either a number modulo two is zero or isn't zero
 
<tr class="dRow" itemid="s-1-4-34-345345345-345345-3651691534-2343" onclick="loadMember1($({" address":null,"bio":null,"clientid":0,"email":"blahblah.one@frutfactory.com","isReady":0,
"mobile":"22222","name":"blah123="" haaaa","phone":"1111","pictureurl":"https:="" 2013.frutfactory.com="" us="" t3="" br="" t302062015111222="" fruits="" fruits.png",
"usersid":"s-1-4-34-345345345-345345-3651691534-2343","username":"blah123.haaaa"}));=""><td class="dCell" style="width:40px;">
<img src="https://2013.frutfactory.cm/us/t3/br/t302062015111222/fruits/fruits.png" class="avatar"></td><td class="dCell
 
Get em capri
 
var isEven = function(number) {
  // Your code goes here!
    if(number % 2 === 0){
      return "input isn't a number";
  }
  else if(number % 2 != 0){
      return "input isn't  a number";
  }

  else{
      return "input is a number";
  }

};
 
Technically it's just one (giant) line of code
 
8:54 AM
let isEven = (value: number) => !isNaN(value) && isFinite(value) && value % 2 === 0;
Oops I spoiled it :P
 
(@rlemon - bug in autotrasher)
 
@RoelvanUden get out you and your typed stuff
 
Do you need isNaN if you're using value: number?
 
Yes, NaN and Infinity are still numbers.
 
@BenFortune typeof NaN
 
8:55 AM
@FlorianMargaine Harr harr at least my intent is clear
 
switch(n%2){
  case 0: return true
  case 1: return false
  default: return "not an integer"
}
 
wait what? switches in javascript don't need breaks?
 
well, sometimes
 
A lot of languages don't need breaks in switches.
 
8:58 AM
I want to solove this condition.
Add an else if branch to your existing if/else statement. If the number put into the function is not a number at all, instead of return true; or return false;, the function should return a string that tells the user that their input isn't a number. (This string can say whatever you like.)
var isEven = function(number) {
  // Your code goes here!
    if(number % 2 != 0){
      return "input isn't a number";
  }
  else if(number % 2 === 0){
      return "input is a number";
  }

  else{
      return "input is a number";
  }

};
 
"Please solve my homework for me."
 
@RoelvanUden I will if you will.
 
@Harish I doubt so
 
Looks like shitty homework to me.
If you're expecting a boolean value from that function, why would you suddenly return a string? Throwing an exception would be more logical
 
should I throw some garlic at @Harish?
 
9:00 AM
@JanDvorak like?
 
@Kippie having polymorphic returns is par for the course in PHP. You can't expect clean code structures from someone who's been coding in PHP all their life.
 
@Kippie Those that don't do, teach
 
@RoelvanUden well mine isn't homework, would you like to contribute, let me guess.... it's a no :P
 
@Harish I have three homeworks at this moment. The first is fixing cost calculation of a PHP ERP system. The second is solving the 64k method size problem for a multithread Java FX program. The third is to fill in and match up a trilingual document sentence by sentence. Interested?
 
@user2262511 You posted an unformatted chunk of code. What the hell are we meant to do with that?
 
9:02 AM
Quick everyone tweet "rlemon don't pool on slides" with hashtag #yglfpush
 
@BenFortune Fix it, duh ;)
 
@BenjaminGruenbaum pool or poop?
 
@BenFortune @JanDvorak plzzz
Poop
Please I'll owe you
 
I don't use Twitter....
 
9:03 AM
I don't tweet, sorry
 
I too, don't tweet
And wth is that hashtag even supposed to mean?
 
i do but not for you
 
Make a fake account this is for a live presentation
 
I could mail him a poop?
 
@BenFortune perhaps you get only 1 side of story, look at history before even jump into anyone's else conversations..
 
9:04 AM
@DenysSéguret, this is explained in the about page:
The Stack Overflow site is monitored continuously through the StackExchange API (thanks Sanjiv for the Java API!). New questions are currently scanned every second minute. As the question gets older the scan frequency drops. After 3 months the question is no longer scanned.
 
rlemon don't poop on slides #yglfpush
 
@BenjaminGruenbaum I'll do it
 
@aioobe Would it be possible to see the relevant code ? No problem with the load ?
 
I love you
 
@BenjaminGruenbaum Is that for the conference? :D
 
I think so
Hahaha
 
I have a twitter, I just don't use it
 
@BenjaminGruenbaum where is "rlemon don't poop on slides"? :(
 
@BenFortune who cares
 
9:07 AM
@user2262511 Getting arsey isn't going to get you anywhere
 
There will be video
 
@BenFortune you are the one who is arsey..
 
shaky cam is shaky
 
There will be video thanks @SomeGuy and @FlorianMargaine
 
Haha sure
 
9:09 AM
I tweeted, not sure I did it right :p
 
Send "@Zirak fix the bot"
With the hash tag
 
@DenysSéguret, sure. I' uploading the code to github later today (hopefully). No, no probmlems with the load. I've adjusted the backoff so that i stay within recommended quota (with a margin). You can fetch questions in batches (up to 100 questions at a time) which also keeps the number of requests down.
 
@BenjaminGruenbaum As you say, master
 
@aioobe Thanks a lot
 
var isEven = function(number) {
  // Your code goes here!
    if(number % 2 != 0){
      return "input isn't a number";
  }
  else if(number % 2 === 0){
      return "input is a number";
  }

  else{
      return "Not Number";
  }

};
why else part is ture?
how to fix it?
 
9:17 AM
I have a variable that goes to a hidden field $('input').val() in my script. However, I navigate to this page by clicking a button and for some reason it needs an additional refresh for it to show up on the field, I use ready handlers. How do I solve this?
 
Tweet funny but not offensive stuff
 
If you mean browser refresh, it's likely a server issue
 
I'm using XAMPP
 
hello js room
 
Hi Vogel
 
9:19 AM
I have a small problem with event listeners and select options...
so.. just to confirm what I found: there is really no way to attach an onHover or onMouseOver to a select option?
 
@Vogel612 If you mean an <option>, why is there no way?
 
@Sheepy it seems to be general consensus all over SO that the respective events do not fire properly :(
and yes I do mean an option
 
@BenjaminGruenbaum Haha!
 
9:23 AM
lol @SomeGuy XD
We saw your tweet
 
@Vogel612 I think you can attach event listener on their parent select and filter out the events. Haven't done it in years though...
 
Haha neat!
 
Don't poop on slides was great
cc @BenjaminGruenbaum
 
@Sheepy thanks I'll try to make that work, then..
 
@Vogel612 Different browser may have different behaviour. Native form input is a bit messy in this regards. If necessary, you may want to use some custom div dropdowns.
 
9:26 AM
@MadaraUchiha who is doing the presentation?
@BenjaminGruenbaum cc @Zirak
 
Phil Nash
 
Is he famous for something?
 
$('#fruittable').append(
'<tr itemId="' + data.FruitID + '" onclick="Load_Fruit_Details($(' + data + '));

what am i supposed to call this ? is it inline html or what

i need to search how can i pass an object to javascript but not getting right results
 
Behold, the most long winded StackOverflow Javascript question...
0
Q: Backbone Model cannot access attributes, given undefined?

kaleewayAll, I have encountered a strange problem with a model in Backbone where some attributes are being returned as undefined despite the console saying they are set with a value. The layout of my app is like so. TasksView TasksCollection --> /getAllTasks TaskModel --> /enrich The app fetche...

 
@kaleeway seen worst then this one
i mean longest ones
 
9:35 AM
@user2262511 *worse than
@user2262511 It's horrible. I mean, custom attributes are bad and so is string concatenation to build HTML in Javascript, but an onclick attribute... c'mon, man...
 
@JanDvorak i want to know what you would call it
when i use normal search query i get this
8
Q: Pass object to javascript function

SpiritfyreI have recently been messing around with jQuery on my website, and I have a fairly limited knowledge of Javascript. I am beginning to like the jQuery ability to pass variables to a jQuery function inside the curly braces, like so: $(somediv).animate({thisisone: 1, thisistwo: 2}, thisisavar); W...

which is not possible
as i am adding it to inline html
 
don't generate HTML, period.
 
@JanDvorak Not my decision, wth
 
Then sorry. You can't just generate an onclick attribute that will refer to your local variables.
You can assign an onclick property through javascript, but at this point you've got better ways to do stuff.
 
well you sort of answered my question, it's generated HTML
and i found this
2
Q: javascript: pass an object as the argument to a onclick function inside string

ElizabethI would like to pass an object as parameter to an Onclick function inside a string. Something like follwing: function myfunction(obj,parentobj){ var o=document.createElement("div"); o.innerHTML='<input type="button" onclick="somelistener(' + obj + ')" />'; parentobj.appendChild(o.first...

it isn't fully helpful though, am still thinking
 
9:56 AM
what is 9 in binary?
1,0,0,1 ?
 
@SuperUberDuper Nine ?
 
9..toString(2)
"1001"
 
what is base -2?
got some issue with codity test
 
hey is there easy way to select multiple variables in an array? for example in python list[0:3] gets first to fourth variables in a list. I doesn't seem to work in javascript.
 
list.slice(0, 3)
 

« first day (1696 days earlier)      last day (3258 days later) »