« first day (1579 days earlier)      last day (3383 days later) » 

1:15 PM
Hey guys, I have posted a question and got downvoted for no apparent reason. I am a rather new user when it comes to posting questions. Could anyone provide feedback on how I could improve my question? Or is that frowned upon?
 
@MicheldeNijs sure, post it here.
@MicheldeNijs nvm found it stackoverflow.com/questions/28454543/overlapping-points - yeah it has several content issues
Namely - the code is not minimal to produce the question and there is a link to your site rather than showing it in place
 
@BenjaminGruenbaum can you very breifly explain what the 'quasiParserGenerator' is? I'm having a hard time understanding it from the chunks of garbled mess in the readme
 
@NickDugger you give it a general impression of what a new programming language looks like via a template string and it returns an interpreter for that new programming language.
 
Ohhh... that's really funky, but really cool
 
Yeah, really really cool for sure :D
I literally sent Mark Miller an email saying "This is awesome." when he sent it on ESDiscuss
 
1:18 PM
@BenjaminGruenbaum I wasn't really sure how I could present my problem. I provided a JSFiddle example, would that be a better thing to post instead of my own site? I wasn't going for any page hits or something, I just needed a place to host it for easy access.
 
@NickDugger it generates code that is able to parse a given grammar
 
It shows such potential for template strings. I love how they - like with generators went for the more general solution rather than templating in most languages.
I love Mark Miller, he's so smart but not at all a douche.
A rare commodity
Also - he gets security and concurrency which is great
 
but does he get monads
 
1:25 PM
@RoelvanUden I find it funny that people consider monads arcane knowledge (aside from the fact that I was obviously joking)
 
Do you mean Archaic, or are you gonna stick with Arcane?
 
@NickDugger Why would I mean "archaic"?
 
Why would you mean Arcane? Is Harry actually a wizard?
 
Fine, ya got me there. I've always just associated the word with wizardry and harry potter
 
1:36 PM
sounds just like monads eh. wizardry and all that
 
hey team, I am getting some JSON but it is formatted vertical can JSON.NET compress it all to one line?
 
I don't know about JSON.NET, but it should be possible. Why?
 
> compress to one line
 
aye... what's ALL in it? ;)
 
@JoJo Yes, it can, but this is a .NET question. Mind the room you're in ;-)
 
1:42 PM
when I try and client side bind it does not work..
well its reall a JSON question since I am getting it back in the message, can I force it to be all on single string?
 
If your parser can't parse multiline JSON, fix your parser
 
Sure, but it's still C#. In your serialize call, just add , Formatting.None
 
thats what I am think Jan
 
Or use JSON.parse on the JS side.
 
ty I will look at JSON.parse, have not used it before
 
1:44 PM
It's the build-in JSON parser ;-)
Shim it if you need to target IE8 (IIRC)
 
What were you using instead???
 
well on the backend JSON.net but the control wont take the results unless I mannually move to JSON rows all onto one string.. so to answer your Q nothing on the front-end
 
heya! got a question. I've got an webapp which checks a value with a server, how can I keep checking that value until it changes? Or do i have to "push" a value change to the app?
 
"nothing" is not a valid answer and "a custom solution" is a bad answer as well ;-)
 
@HuubS Welcome to the JavaScript chat! Please review the room pseudo-rules. Please don't ask if you can ask or if anyone's around; just ask your question, and if anyone's free and interested they'll help.
 
1:47 PM
@HuubS learn websockets
 
@HuubS websockets or SSE
 
@JanDvorak argh.. what is the correct solution?
 
thanks :)
 
not to mention I think there are issues around this value in the string.. lol
"DisabledUntil": "1900-01-01T00:00:00",
 
To what extent should I provide code examples in a question? I made a JSFiddle that pretty much resembles my current project and has the same problems in it, is it better to just post a JSFiddle link or still provide code?
 
1:49 PM
@JoJo If you want to parse JSON in javascript... JSON.parsce
@MicheldeNijs just a fiddle link will not suffice
 
@JoJo JS dates go to 1970 IIRC, not any further.
Oh, nevermind, they go further.
It's .NET that blows up in your face at some point.
 
jQuery.parseJSON() is pry better.. ;)
 
@JanDvorak Is it better to provide the same code I used in my JSFiddle?
 
@JoJo it isn't
@MicheldeNijs make sure to include just enough code to reproduce the issue, not your entire code base
@JoJo hell, even IE8 can JSON.parse, not to mention web browsers...
 
kk
JSON.parse it is then
I see the JSON (alert(response);) is breaking on this LastName":"Moran-Carpentino
does dash do something in JSON?
 
1:55 PM
why am I getting this error when I have this sitetagger url in my policy?
[Report Only] Refused to load the script 'http://www.sitetagger.co.uk/10086/sitetagger.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-inline' 'unsafe-eval' 'sitetagger.co.uk' localhost:35730 0.0.0.0:35730".
 
17
Q: Unable to access JSON property with "-" dash

user1902467I am unable to retrieve a value from a json object when the string has a dash character: { "profile-id":1234, "user_id":6789 } If I try to reference the parsed jsonObj.profile-id it returns ReferenceError: "id" is not defined but jsonObj.user_id will return 6789 I don't have a way to modify t...

 
@JoJo a dash is fine inside strings. response.last-name, of course, does not work, tthough.
 
@SuperUberDuper google cross origin policy
wait, why am I telling you - you could have googled the error and figured it out.
 
Isn't CSP != CORS?
 
Oh yeah, then not only he could have googled it he would have gotten a better answer :P
 
2:00 PM
:D
 
Most of the time when people ask about "violates" with an error message in the console it's cross origin policy not content security policy. BTW CORS is just a solution to trying to do cross origin sharing.
 
"trying"?
 
And failing :D
 
At least CORS does its job when it comes to stopping unwanted "sharing" :)
 
hi friends can you help me out to understand this stackoverflow.com/q/28456044/3556874
 
2:05 PM
ok
 
they should have called it Cross Origin Request Stopping though
 
i have alredy posted an answer which i think is correct, if you can tell me i am wrong or right?
i would just like to understand where i am wrong
 
Good day
 
@NaeemShaikh your answer has formatting issues.
 
@BenjaminGruenbaum yes, but i will delete it if i m wrong.. can you see if what i answered is wrong..
 
2:09 PM
It doesn't really explain anything.
 
Love this
!!> typeof null;
 
@Eugene "object"
 
And angular.isObject(null); // false
Who to trust? :D
 
I initialize variable force=forcebase+modifyForce , now i increment force upto 20 like force++ , now if i change forcebase++ op wants force should become 21
 
2:11 PM
@ivarni Okey. My bad.
 
Why is my own task runner so much faster than gulp? >_<
 
@RoelvanUden gulp and grunt are crazy slow. Just so you know - it's another reason why I always write my own builds.
 
Yeah, now I really notice. I just integrated stuff into a main pipeline.
 
Fez might be nice but it's pretty abandoned (does just dependency tracking).
 
And holy shit, it cut down build times from 2s to 150ms, and increments from ~300ms to ~20ms
And the dependencies went down a lot :P
 
2:24 PM
Yup
 
okay dumb question. Is there some better way to include scripts in the index.html file downloaded from bower?
 
What are you using for your build?
@corvid use npm and not bower - problem solved :D
 
brfs, browserify, chokidar, glob, jshint, less, phonegap, uglify-js, watchify
 
you can use NPM for front-end dependencies? Angular seems to suggest it is best to use bower
 
@corvid yes yo ucan
 
2:25 PM
Sure, I'd even recommend a front-end build system. Bower is great to manage dependencies, but you still want to bundle files up etc.
 
@RoelvanUden now just try to use bluebird to move things with glob into maps and Rx to stream things - it'll make your build like 10 times more readable than gulp
 
@RoelvanUden you mean like minifying them and all of that? I just want to avoid manually inputting all my dependencies and js files, that seems more prone to error than some automated approach
 
Hehe, I have no interest in making it more complex at the moment. Just using CPS
@corvid Sure, but consider something like:
 
It'll make it less complex, and likely faster, but sure :D
 
2:27 PM
function uglify(sourceDir, destDir){
    return glob(sourceDir +"*.js").map(uglifyFile).reduce(concat).map(writeTo(destDir));
}
Or something like that.
 
Then a task can go ahead and read your config, bundle them up, etc.
@BenjaminGruenbaum Muh :-P
 
Would that require something like grunt, or can it be done with express and node.js just as well?
 
So pretty :D This is so much more readable than cps
 
Might be a v4 for me to do it that way :P
Gotta get this v3 into production first. The gulp shit is constantly freaking out
(stupid gulp)
 
I agree :D
 
2:33 PM
It even fails to properly stream a read-only file :-P
"So, I read this read-only file and decided to copy read-only flag to the destination file, even though it's a browserified output. So next time I try to browserify again, I can't write to it because I'll go boo-boo because the destination file is read-only!" -- Gulp
Thanks Gulp. Very helpful.
 
I've edited my post, are there any other points I should improve my post with? Are the provided code samples good enough to recreate a working sample?
-1
Q: Drag and drop overlapping points

Michel de NijsI have a graph plotted with a multitude of lines, a rather big figure overlapping the lines and ontop of that is a point that is capable of being drag and dropped all over the plot by the user. The problem I'm facing currently is that as soon as the user drags and drops the point straight ontop...

 
@MicheldeNijs That's a lot of code. Did you just copy/paste your entire codebase there?
 
No, that's required to get my problem working. :( I've got more functions, but those are not required to recreate the same problem.
 
I guess you need to debug more before asking here...
SO is not a replacement for taking your time to debug
 
I'm not really debugging, but I am having a hard time turning my problem into a question you guys can make any sense of.
 
2:38 PM
in the meantime ... cv-pls too much code
 
Ah, thanks anyway for the help and feedback. I'll go back to experimenting more!
 
Moment of bork here guys
Is it possible to send GET paramters along with an XHR without having to URL encode it myself?
Stack Overflow is filled with "oh yeah, just get url + '?param=' + yourParam"
 
@SecondRikudo jQuery can do that
 
@JanDvorak And without jQuery?
 
then I think not
 
2:49 PM
Is it possible to paste text with a button?
 
The browser really doesn't want you to touch the client clipboard
 
Yeah I understand that but is it possible?
 
I hope not.. sounds like a security issue
 
read: no
userscripts can push data to the clipboard, however
 
@JanDvorak you can interact with the clipboard with JavaScript
Oh, paste text
No, that's likely not possible
 
2:54 PM
@SecondRikudo link?
 
Nice one, but it does need user initiation.
 
3:07 PM
How can I fit a head rest to an ordinary office high back chair?
 
@SuperUberDuper Duct tape.
or jQuery.
$('.chair').append('<headrest />')
 
3:31 PM
hi all
 
wouldn't it be $("chair.ordinary")?
 
need some help.... sending back a json_encode(php_array) to an ajax query. But looks like it isnt readable ? success : function(response){console.log(response.length);} gives me undefined...
 
@Julo0sS console.log(arguments) there and see what all you're getting back
 
but just console.log(response) gives me the right [Object-object]
 
if you've set the data type to JSON, it will be a parsed object rather than a string
 
3:34 PM
@Julo0sS use a real browser
or console.dir the response.
 
response from my call is {"test":[{"test_id":"1","test_name":"name"},{"test_id":"2","test_name":"name2"}]‌​}
@darkyen00 firefox is still a "real" browser isnt it?^^
 
if it has a builtin (mail|ftp|irc) client, it's not a browser
 
w
 
what u pref developer tools for developing app using ionic?
brackets, sublime, jboss, eclipse, webstorm ? which is the best?
 
posted on February 11, 2015

var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); try { var pageTracker = _gat._getTracker("UA-3727700-1"); pageTracker._trackPageview(); } catch(err) {} Only 36 hours left to get the COOLEST shirt in history!

 
user1596138
3:47 PM
 
user1596138
Chrome has built in FTP.
 
@machei Whatever is comfortable for you.
 
@Jhawins that would be the best tag.
My world makes a lot of sense, at least the parts I bother to acknowledge. :P
 
@SecondRikudo where can I get a cheap head rest?
 
Can the function (input) => input.map((it) => ((it % 2) ? it * 2 : it / 2)); be simplified any further?
 
3:52 PM
why would I do:
arr.join(' ') || ''
 
user1596138
@SuperUberDuper ...you tell me
 
user1596138
[1,2].join(' ')
 
user1596138
Durrr
 
user1596138
Random javascript
 
@ssube a binary shift based on the % response could be better do you not think so ?
well true
 
3:56 PM
@darkyen00 problem is you can't do a negative shift so you still need the two different operators
 
@darkyen00 no. That would require more code (shift left or right), break floats, etc.
 
@dystroy that inability of -ve shift :-(
 
The only solution I see would be awfully slow (exp)
 
exp ?
can you elaborate ?
 
@dystroy I think any clever arithmetic is larger than the ternary
 
4:02 PM
@ssube yes (and stupid too)
[1,2,3,4,5].map(function(it){ return it/Math.pow(2, 1-2*(it%2)) })
 
anyone could tell me what could be the problem to stop a "setInterval(function,timer)" to work?
 
@Julo0sS too many possible bugs, make a fiddle
Then ES6 (or ES7) power operator would make it clean...
 
-3
Q: How to track an IP adress on Omegle?

Nicky SmitsI use omegle a lot and want to create a little enhancement suite. I want to track someone's IP adress using a chrome extension. With wireshark I can find the UDP packets and thus determine the IP adress of the stranger. How would I find out the ip adress on Omegle? Each time I enter a new conver...

obviously they need a visual basic gui to track the killer's IP
 
user1596138
Oh shit
 
user1596138
I sent a flow chart to explain my point in an "argument"..
 
user1596138
4:08 PM
This is just going to make them madder lmao
 
user1596138
@dystroy What's the operator?
 
It's going to be **, I think
 
I think so, but I can't find it again...
 
why would express deprecate arrays for paths?
seems easier than regexp
 
bocoup.com/weblog/… is all I can find
 
4:11 PM
:sigh:
 
user1596138
If only we hadn't already used ^ lol
 
^ for exponentation is one of the worst things ever
 
user1596138
Haha
 
@dystroy found it :)
 
4:12 PM
stupid math derps overloading bitwise operators
 
gtg
cya l8er all
 
Hello everyone, I'm struggling in an url rewrite rule... Is there anyone good with url rewiting? I need to fix this path :
http : //127.0.0.1/projects/wp-deal/media/resizer/710x475/r/127.0.0.1/projects/wp-deal/wp-content/uploads/2014/12/photo.png
So it becomes :
http : //127.0.0.1/projects/wp-deal/wp-content/uploads/2014/12/photo.png
 
user1596138
@NaourassDerouichi What have you tried
 
@Jhawins Sorry I'm new to mod-rewrite... here's what I've tried so far:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /projects/wp-deal/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /projects/wp-deal/index.php [L]
</IfModule>
 
outstanding
 
4:28 PM
I finally got that the reason it did nothing was that it was sound based... Still no sound on my computer ^^
 
:(
 
Hi guys
$("#logged").each(function() {
            if(dz.logged) {
                $(this).show();
            }
            else {
                $(this).hide();
            }
        });
missing formal argument wot?
 
$("#logged").each(
Are you aware only one element can have a given id ?
 
@rlemon oh my god
 
inorite!
 
4:32 PM
I also tried the $.each($("#logged"), function() {blah}); but nuh
 
each is an iterator
you have one item
 
$("#logged").toggle(dz.logged);
!!jquery toggle
 
check that link ^
 
4:34 PM
Yes but does it will turn off all elements with this id?
 
you can only have one element with that id
 
Am I in mind jail or what ?
 
id's cannot be repeated in a document. if you have, that is wrong.
 
@dystroy no, your monkey scares them
I turned off the lights in my office, dimmed my laptop, and am sitting in the corner because I have a migraine
but my coffee is cold and I need to warm it
but the outside world is loud and bright
:(
 
So IDs cannot be repeated, classes can correct?
 
yes
 
crl
ids can be repeated but it shouldn't be done
 
@rlemon wow that is awesome!
 
4:39 PM
inorite!
look how many hearts and comments it has
for something that is new
o.O
 
dayum
top pen 2015
 
It's basically a polished version of this: najle.com/idaft/idaft
 
and not flash
 
@Retsam ah well that kills some of the coolness imo
 
does anybody aware of use socket.io for mysal database changes in node js?
 
4:45 PM
I think I know what you are trying to say?
does anybody use socket.io to update a mysql db in node?
 
no
i want to listen
 
your question doesn't make sense, rephrase it
you want to observe the db for changes and update a client via websockets?
 
if any insert , update, delete has been occurred on the database side i want to notify it via socket
yes
 
if that is the case, don't. just broadcast it to all clients when you're updating the db.
 
4:48 PM
var z = $(".guestonly"); console.log(z); missing : after ID. I tried to google what the problem is and I have no clue. I'm pretty sure you know what's up
 
problem is elsewhere
that is valid code
 
o.O
SyntaxError: missing : after property id
How then? o.O
 
do you see a : on that line?
show more of the code
 
^
harder/faster/stronger code plis
 
^
 
4:49 PM
load: {
    var z = $(".guestonly");
    console.log(z);
    /*for(var l=0;l<$(".loggedonly").length;l++) {
        $(".loggedonly")[l].toggle(dz.logged);
    }
    for(var g=0;g<$(".guestonly").length;g++) {
        $(".guestonly")[g].toggle(!dz.logged);
    }*/
}
 
lol I dont think you meant to point at that haha
 
@Loktar That's almost what she said
 
are you trying to use it as a label?
or are you trying to use 6to5?
or another es6 transpiler?
 
imgur.com/gallery/0t9p8lM suddenly I want to buy beseige
 
I'm trying to hide all guest elements and show all logged elements if the user is logged in
 
4:50 PM
ok, show more of the code
 
whats using load: ?
what is that a part of
 
I think I know your problem
but if you are trying to use it as a label, then idk
 
@SterlingArcher LOLOL wtf
 
load: function() { /* likely the issue */
 
are you serious with that omg
 
4:51 PM
lol wtf
 
I'm losing it man lol that game is all over imgur and it's too much
 
you are right o.O
 
@Loktar there is a reddit thread with like ten of them
@Loktar @SterlingArcher youtube.com/watch?v=Apv_WFBXivs
 
hahah wow
 
that is neato, Object Rest/Spread Properties for ECMAScript
 
@SterlingArcher lmfao
 

« first day (1579 days earlier)      last day (3383 days later) »