« first day (1819 days earlier)      last day (3130 days later) » 

1:04 PM
Somebody broke the coffee machine D:
 
D:
 
$(document).bind('keydown', 'alt+r', function() {
    alert("Works");
});
Somebody thinks that this function will run when you press alt+r ._.
1
Q: jQuery Keyboard Shorcuts misfiring

VickiI am trying to have a button that can use keyboard shortcuts. With the button below I would like to be able to push "ALT + R" to use the button. But what is happening is if you push either ALT or R it runs when I want it to only run if they are pressed together. http://jsfiddle.net/qx62t4zd/ ...

 
user5020521
@Cereal what do you mean???
 
@Riccardo990 the last parameter of your method call was + true.
 
One of the higher ups is running around the office screaming "I NEED A KOREAN QUICK" and we're all losing it xD
 
user5020521
1:09 PM
I attempted to concatenate a string in order to pass a parameter function to a php delete page
 
user5020521
@Cereal have I failed to do it?
 
@FlorianMargaine 2.9
 
@Riccardo990 xmlhttp.open("POST", url + "?idRecord", + true);
The last parameter is + true
That's inherently confusing
 
crl
What is the best shortcut for 'toggle comment'?
!!ctrl+shift+c or ctrl+/?
 
@crl ctrl+shift+c
 
1:15 PM
ctrl + /
 
crl
with which hand do you do it?
 
Both
 
crl
hmm you can definitely need just one hand to do it
 
user5020521
@Cereal how can be concatenated properly?
 
crl
hmm bad color choice
 
user5020521
1:18 PM
I need to add a parameter inside the open
 
@Riccardo990 You're not concatenating anything
 
user5020521
coma after the +?
 
oh sweet jesus
 
crl
@Cereal you using the left ctrl?
 
user5020521
@Cereal so I'm really wrong
 
user5020521
1:19 PM
my intention was to add a parameter by the + operator
 
pydeb setup install
...
pydem setup uninstall
ERR: [PermissionError] Permission denied
State of tooling in packaging is legendary
 
crl
@Cereal answer now!
 
@crl You're not my real dad!
 
1:21 PM
@crl Yes, left control
 
crl
ok :)
 
@Riccardo990 You're just calling a function in that snippet. The only concatenation going on is the second parameter. There's no need for a + in the third parameter.
Is pastie.org doing a redirect loop for anyone else?
 
user5020521
so I just remove it
 
Yes.
 
user5020521
@Cereal thank you and now that I have that parameter I'm passing it to a php deletion page
 
1:25 PM
> php deletion page
nice
 
Someone has finally deleted php
 
user5020521
before the prepare I declare that $idRecord = $_POST['idRecord']
 
yay! no more bitching about PHP :)
 
hello I have a query about js : I have parseUrl.dataJSON object and in that object there is a json response but in string format how would I get json data from those string response.
 
user5020521
I'm sorry guys just a type error
 
1:26 PM
!!tell Dipak mdn json.parse
 
{"lang":{},"currency":{},"user_id":52,"user_type":3,"user_email":"laxman@mailina‌​tor.com","username":"lax","iplocation":{"statusCode":"OK","statusMessage":"","ipA‌​ddress":"103.240.34.199","countryCode":"IN","countryName":"India","regionName":"G‌​ujarat","cityName":"Ahmedabad","zipCode":"380028","latitude":"23.0333","longitude‌​":"72.6167","timeZone":"+05:30"}}
 
user5020521
and inside the DELETE FROM table WHERE id = $_POST['idRecord']
 
user5020521
am I right?
 
this is json data in string format.
 
1:27 PM
That seems unsafe
Does that seem unsafe to anyone else?
 
I had tried to use json.parse but in console.log it shows me [object object ] how could i access data?
 
That seems unsafe
 
@rlemon lol
 
@Dipakchavda if you see [object object] then you've successfully parsed
@Dipakchavda You access it like any other javascript object
 
No, looks perfectly fine to me. It's not like someone would send 1; foo -- in the post request
 
@Awal @Caprica @Cereal : following is my code what I had done.
var obj = JSON.stringify(_jsonObj, function (key, val) {
    var _jsObj = JSON.parse(val);
    console.log(_jsObj);
});
but now I don't know how to fetch all value like user_id, user_name,
etc.
 
I already told you
 
@Dipakchavda @Cereal already told you
 
!!tell dipakchavda mdn property accessor
 
user5020521
1:31 PM
cereal what do you think about what I wrote above?
 
user5020521
am I on the right route?
 
Yes. And you should be on the left one
 
@Riccardo990 You're currently vulnerable to malicious code injection
 
crl
the right one is the only one left
 
@Awal @Caprica @Cereal : its shows me an error. [object Object] SyntaxError: Unexpected token o
 
user5020521
1:33 PM
how can I prevent from being vulnerable
 
user5020521
am I right?=
 
@Awal @Caprica @Cereal : when I had tried to access like _jsObj.user_id
 
@Riccardo990 Delete php
 
I'm going to scream
 
I need some logical help in node js/express js
 
user5020521
1:34 PM
@copy just deleted
 
@copy teehee, that's nice
 
user5020521
I'm just googling around in SO
 
user5020521
to avoid to piss @Cereal off
 
user5020521
I don't even want him to scream
 
suppose I have three functions with in a function and I would like to async 3 of them so that they run at the same time but when all 3 is complete I have to respond back to front end angular
how can I do that?
 
crl
1:35 PM
Can we create commands reusing existing commands?
 
@Cereal hey little kid, calm down. lemme call your mom
 
crl
like !!learn googleso google site:stackoverflow.com \w+
 
@AwalGarg You try helping them, then
 
I got the solution I guess
 
@Awal @Caprica @Cereal : I had tried a lot but still not getting any solution.
 
1:36 PM
@Dipakchavda put your code and input/expected output in a fiddle at jsfiddle.net and link here
Hard to say what you want right now
@Cereal how about... no
 
crl
!!google "3+4"
 
!!> 3+4
 
crl
sorry
 
@Cereal 7
 
1:38 PM
weow
 
crl
@Cereal I prefer to pass by google
 
btw @Cereal just to friendly reminder, you aren't required to help anyone here.
 
@Awal @Caprica @Cereal : I am create php application which have feature of chatting and I am accessing php user session in nodejs.
 
what
 
that is a code which is part of that.
 
1:38 PM
@AwalGarg No, but I feel obligated to help when they get shit on on monday, then show up for the rest of the week anyway
 
crl
"I am create"
hi create, ok sorry, I'm stopping trolling
 
Is it a php app or a nodejs app
 
php+nodejs app+redis+mysql
php is used only to access user session.
 
@Dipakchavda sorry but that doesn't make any sense. Also, are you a BCA/B.Tech student/passout?
 
undefined:1
[object Object]
^
SyntaxError: Unexpected token o
at Object.parse (native)
at Object.<anonymous> (/var/www/html/whizchat/nodejs/server.js:63:27)
at Object.stringify (native)
at Server.<anonymous> (/var/www/html/whizchat/nodejs/server.js:62:20)
at Server.<anonymous> (/var/www/html/whizchat/nodejs/node_modules/engine.io/lib/server.js:369:22)
at Server.<anonymous> (/var/www/html/whizchat/nodejs/node_modules/socket.io/lib/index.js:258:16)
at Server.emit (events.js:98:17)
at HTTPParser.parser.onIncoming (http.js:2109:12)
this is actual error when I tried to access parsed objet.
 
1:40 PM
!!tell dipak mdn property accessor
 
Looks like someone JSON.parsed twice :)
 
pls
 
this is actual piece of code.
 
1 message moved to Trash can
@Dipakchavda Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq. For posting large code blocks, use a paste site like gist.github.com, hastebin.com or pastie.org
 
1:41 PM
@CapricaSix thanks
 
It is piece of shit, actually.
 
@CapricaSix you are so slow today
 
undefined:1
[object Object]
 ^
SyntaxError: Unexpected token o
    at Object.parse (native)
    at Object.<anonymous> (/var/www/html/whizchat/nodejs/server.js:63:27)
    at Object.stringify (native)
    at Server.<anonymous> (/var/www/html/whizchat/nodejs/server.js:62:20)
    at Server.<anonymous> (/var/www/html/whizchat/nodejs/node_modules/engine.io/lib/server.js:369:22)
    at Server.<anonymous> (/var/www/html/whizchat/nodejs/node_modules/socket.io/lib/index.js:258:16)
    at Server.emit (events.js:98:17)
 
~% echo Starting ...
Starting ../..
 
Is this redundant to do?
  let insertAsset = function (collection, asset, transform) {
    return new Promise((resolve, reject) => {
      Assets.getText(asset, function (err, result) {
        if (err) {
          reject(err);
        } else {
          EJSON.parse(result).reduce(function (p, data) {
            return p.then(() => new Promise((innerResolve, innerReject) => {
              collection.insert(transform(data)), (err, result) => err ? reject(err) : resolve(result);
            }));
          }, Promise.resolve()).then(resolve).catch(reject);
 
1:43 PM
@Awal @Caprica @Cereal : I have not parced json data two times because dataJSON response type is string.
 
@Dipakchavda Yet the error message is telling you that that's exactly what you've done
 
crl
EJSON.parse or JSON.parse?
 
TIL you can pass a function to stringify
 
@Cereal except that that's not what he meant to do here
 
@crl Basically the same thing, the only difference being EJSON can also parse things like Dates
 
1:46 PM
{
    action: 'write',
    id: 'iurrv1rv8qjrb7sdb69io2mqi0',
    data: 'lang|O: 4: "I18n": 11: {
        s: 19: "\u0000CActiveRecord\u0000_new";b: 0;s: 26: "\u0000CActiveRecord\u0000_attributes";a: 9: {
            s: 2: "id";s: 1: "9";s: 9: "i18n_flag";s: 44: "ac84a0fd7788953be215d0c39e0f6475c5e02708.png";s: 9: "i18n_name";s: 5: "en_gb";s: 9: "i18n_code";s: 5: "en-gb";s: 14: "i18n_full_name";s: 10: "English-UK";s: 10: "is_default";s: 1: "1";s: 9: "is_active";s: 1: "1";s: 10: "created_at";s: 19: "2015-05-18 17:29:30";s: 10: "updated_at";s: 19: "2015-06-29 11:52:18";
 
This is actual repsonse I had get.
 
Regarding ng-transclude What is the meaning of transclude in english? , there is no such word. I know what it does but what is the meaning?
 
so now may be you may get proper idea. response type of object ane dataJson having response type is string.
 
@AwalGarg Well no
 
1:47 PM
Transclusion means the inclusion of the content of one document within another document by reference. In Wikipedia transclusion, the MediaWiki software will refer to the content of one page, the template, for inclusion into the content of any other page, the target page. Similar to the way any page name can become a link by placing its name in double square brackets, any page name can become a template by placing it in double curly braces, {{Namespace:Pagename}}. Changes made to the template are then automatically reflected on all pages into which that page has been transcluded (though a purge...
 
and I'm a fork-lift operator for another 3 years \o/
 
Thank you.
 
@Awal @Caprica @Cereal : Hope you may get my point of concern. because all code post on pastebin or jsfiddle is not possible me.
 
@rlemon certified in forking?
 
@RoyiNamir In the context of ng-transclude it means inject this content at this location, that's the best simple description I can come up with
 
1:48 PM
var server = require("http").createServer(function (req, res) {
	var parseUrl = url.parse(req.url, true).query;
	res.writeHead(200, {'Content-type': "text/plain"});
	res.end(sessionHandler.run(parseUrl));
	var obj = JSON.parse(parseUrl.dataJSON);
	console.log(obj.user_id);
});
 
@SterlingArcher yes
 
Here, now shoo
 
all classes
 
Noice
Didn't even know that was a thing but noice
 
@ivarni Thank you.
 
1:49 PM
@Cereal your tolerance skills are exemplary of being exemplary
 
@rlemon FriiiidddaaAAY
 
undefined
^
SyntaxError: Unexpected token u
at Object.parse (native)
at Server.<anonymous> (/var/www/html/whizchat/nodejs/server.js:51:20)
at Server.<anonymous> (/var/www/html/whizchat/nodejs/node_modules/engine.io/lib/server.js:369:22)
at Server.<anonymous> (/var/www/html/whizchat/nodejs/node_modules/socket.io/lib/index.js:258:16)
at Server.emit (events.js:98:17)
at HTTPParser.parser.onIncoming (http.js:2109:12)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:122:23)
at Socket.socket.ondata (http.js:1967:22)
It shows me an error @Cereal
 
@SterlingArcher in Ontario (likely everywhere else in NA) you need a license or at the very least a certification to operate a forklift
it is a 2 hours course
not very interesting
 
I had write your same code but there is no difference in my and your code @Cereal
 
Oh, I thought you just winged it tbh lol
 
1:50 PM
@RoyiNamir The example in the docs are really overly simplified but it basically is used within the example directive template to transclude the value of the {text} into a pane
It takes a bit of playing with to fully understand
 
@SterlingArcher most people do - but if an accident happens, there is no insurance.
 
@Dipakchavda The error is not where you're saying, then
 
lol family guy where Peter drove a forklift...
hilarious
 
Well I guess it could be
 
it is a joke anyways, I only use the forklift like 10 times a year
we tend to get our materials in bulk
 
1:52 PM
any recommendations for low-profile CPU coolers?
 
@Cereal : server.js indicate piece of code which I had wrote.
 
@Dipakchavda Is parseUrl.dataJSON equal to 'undefined' by any chance
 
no it shows me reponse.
 
what is it
 
wait I shall post.
 
1:53 PM
@tereško window
@Loktar low-profile CPU cooler, suggest for @tereško :D
 
crl
that reminds me my CPU is 42°C big maximum, can't fucking make it hotter, oh wait I'll run Kendalll's yesterday's script
 
@Loktar is my hardware guy. anyone with that many games knows his cooling.
 
I have no recommendations, I use water cooling
I'm using an h100i right now
 
:( great
make me look like an asshole.
thanks.
 
lol
its pretty low profile
 
1:55 PM
Hey guys I've written a small jquery block to sent an custom event to google analytics but it is not working can anyone check if I coded comething wrong. I'm not so sure about the on load thing. here is the script

$('.footer-ad').on('load', function() {
				__gaTracker('send', 'event', 'Adblock', 'Unblocked');
			});
 
:P
 
not the mounted fans though
 
@Loktar I was looking at it, but that thing costs around €100
 
1 message moved to Trash can
 
yeah you may not even need that one though
 
1:55 PM
use a paste service.
 
depends on the CPU, I have a 9590 so I wanted to make sure it was cool
 
1 message moved to Trash can
 
:)
 
stop posting walls of json
use a paste service, please
 
@Dipakchavda That's what parseUrl.dataJSON is equal to? Exactly that?
 
1:56 PM
the h60 is about half that price
 
yes you may find one object dataJSON.
that is it.
 
Can anyone take a small look?
 
@iSaumya does the load event fire?
 
but yeah honestly I generally go with the stock fans, the 9590 has to be water cooled though.
 
add a console.log inside and check
 
1:57 PM
I guess yes
 
@rlemon : I am not doing wasting of time I am trying to expain and shows all response to @Cereal.
 
why not?
 
@iSaumya don't guess. add a log and check
 
@rlemon: you may get my point.
 
ok gv me3 a moment
checking the log
 
1:57 PM
@Dipakchavda and we have rules. don't post walls of code in here, use a service and paste a link to it
 
!!> JSON.parse('{"lang":{},"currency":{},"user_id":52,"user_type":3,"user_email":"la‌​xman@mailinator.com","username":"lax","iplocation":{"statusCode":"OK","statusMess‌​age":"","ipAddress":"103.240.34.199","countryCode":"IN","countryName":"India","re‌​gionName":"Gujarat","cityName":"Ahmedabad","zipCode":"380028","latitude":"23.0333‌​","longitude":"72.6167","timeZone":"+05:30"}}').user_id
 
@Cereal 52
 
@Dipakchavda ^
 
@Cereal : parseUrl.dataJSON having value which is type of string and store JSON Object.
 
@KendallFrey ^ lol Dipa
 
@rlemon you are right man. it's not fire4ing
what the hell! What I did wrong?
 
@iSaumya so now you're 50% there. check out what is possible for the load event
 
anyone here who have used mongoose?
I need a simple logical help
 
well, I dont wanna use ready() as I read that it slows down site, so can you give me an alternative?
 
I am trying to make pagination happen. Suppose when the page loads I'm sending 10 results now what I want to do is when the next request is made I will send the date-time of that post and the new request should return back with posts older than that or newer than that depending upon the request
 
2:00 PM
I dont get it what I'm doing wrong with the load call?
 
> The load event is sent to an element when it and all sub-elements have been completely loaded. This event can be sent to any element associated with a URL: images, scripts, frames, iframes, and the window object.
please refer to the docs when you run into problems
 
@iSaumya ready does not slows down anything. That's the way it is used, that can slow down things.
 
the load(ed) event isn't available for random elements
 
@AwalGarg
 
ok so you guys are suggesting me to use the ready() ?
 
2:01 PM
no
there is no loaded event for random elements
 
No that was just a comment on what you said.
 
How can I do that?
 
> This event can be sent to any element associated with a URL: images, scripts, frames, iframes, and the window object.
you can only use load/loaded on elements associated with a url
 
@Dipakchavda Yes. I showed you that it works. There's something else wrong with your code.
 
I just wanna push the google analytics call when page is loded
thats it
so what should I use?
 
2:02 PM
do you understand how the dom is parsed?
in what order things load?
 
With a promise, is there a less verbose way to just pass a node style callback?
 
@RanganathanSwamy I think you do not understand what this chat is for. Your question is way too broad.
 
Okay sorry dievardump
I am just asking for a logical help
 
You already know what you want to do
 
2:04 PM
Yes I know what I want to do, but the syntax is problem
 
just use a package
lazy++
 
rlemon packages slow down the response time right?
 
lol
why would it?
a package is just someone elses code in place of writing it yourself
often contributed on by the community
 
because in the end it will be making use of the functions of that package
 
and why would they inherently be slow?
 
2:05 PM
so a call will be made to that package's api and then the actual work will take place
 
@Cereal : you are right I got your point. Thanks but what did happen when fetch string type of json response and give me an error? That is now issue.
But Let me try to find pin error.
Thank you @cereal
 
\o/
brb finding scotch
 
@Cereal pass some my way
 
@Loktar well the full situation is like this: I am making a Corsair 250D build. Found a place where to get a cheap tray-only i5-4590 (not a "k" part). But if I go with that approach, I need to get a nice-enough and cheap-enough cooler to put on it (250D has a small window just over the mobo). Nothing excessive, just good enough so it does not look like someone took a dump on the mobo.
 
A dump also wouldn't cool very well
 
2:08 PM
might actually heat it up a bit
 
Expert speaking
 
oh .. and I didn't go with an AMD build, because there are no good AMD boards for miniITX
 
I had a mini-itx amd setup
cpu melted
 
Was on a node 304
 
2:11 PM
node 304 is a NAS-type case .. that was a strange choice of a platform
 
But it's so sexy
 
user5020521
@Cereal I finally made it
 
user5020521
$myId = intval($_POST['idRecord']);
 
user5020521
$del = $dbh->prepare("DELETE FROM tagesroma WHERE id= " . $myid );
 
user5020521
thank you man
 
2:14 PM
function foo() { return 123; }
sweet.
@MadaraUchiha ctrl + enter works now
 
Speaking of which, why is there a delete method accessible to the user
 
well, works in dev mode
so you will all get it in a few hours
 
what is difference between $('textarea', this) and $('textarea') ?
 
this is the context you look in
it is the same difference as document.querySelectorAll('textarea') and elm.querySelectorAll('textarea');
 
user5020521
there is del method that captures a parameter inside an ajax request in the javascript
 
2:17 PM
@rlemon I got it, tnx
 
@tereško nice, I've always wanted to do a mini itx build
 
@Riccardo990 are you talking with me?
 
@Loktar same here, which is why I decided to push for it
 
crl
@ivarni nothing shocking, if your html has some scripts/links urls
 
@crl This was from fs.readFileSync...
 
2:25 PM
Speaking of forklifts.. @SterlingArcher
 
O.o
 
I have clicked a link to an app that should serve as a guide to an upcoming festival. Instead of an expected Google play page I got an alert saying "soon".
 
user5020521
@Sajad also with you
 
@Cereal what a shame
this is becoming WAY too common place
 
2:28 PM
Reddit's like "It was just an argument, it's not a school shooting"
as if that makes it better
 
o dayem shots fired elon
 
@5parc 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.
 
@Loktar really??
 
2:30 PM
lol yeah pretty crazy
 
I suppose it is kinda neat. but seems completely overkill
 
yeah for sure
it would be nice for a tablet, imo
 
@rlemon that's nsfw :O
 
lol how?
 
i can guarantee those safety standards are not up to code :P
(☞゚ヮ゚)☞
 
2:34 PM
huffingtonpost.com/entry/… article is boring. comment section is fucking gold for once
> Coming from the girl who is apparently "harder to pull out of than Iraq"...not gonna listen.
 
@rlemon lmao she was named after a racetrack?
 
crl
!!caniuse httponly
 
OMG
hit t
life-changer
 
crl
there's just one repo tho
 
2:40 PM
that's been there, @rlemon :)
More: help.github.com/articles/using-keyboard-shortcuts Github Keyboard Shortcuts (not Rebecca Black).
 
@SterlingArcher I so badly wanna partake in this imgur.com/gallery/aLTVJ
 
kiddie-larp?
 
No you don't, I would get in too deep and probably murder a kid by accident
 
@Luggage yes
 
> HOW DARE YOU TALK BACKETH TO YON CAMP COUNSEOR :vicious beating:
And that's the story of why I theoretically shouldn't larp with children
!!afk vape
 
2:43 PM
lol
 
I misread that as rape regularly
 
i always read it as lcars
dunno why
 
How do you pronounce that
 
@SterlingArcher we get it bro
 
@Cereal L Cars
 
2:44 PM
vape
l cars
I mean
No, no I don't get it
 
LCARS is just flat design.
with class="rounded" if using foundation
if my client pisses me off again, i'm applying lcars.css
 
@Riccardo990 I got it, tnx
 
Not for me (yet)
@rlemon Did you release already?
 
@MadaraUchiha no
trying to pop off as many issues as I can
will build + release at lunch
 
2:51 PM
time ot make regex to validate icd10 codes.. can't find one online
wow, canada implemented icd10 in 2000.
15 years ahead in healthcare bureaucracy
 
Weird question, but does anyone know of a way to make a chain of events where it iterates a list of properties but propogates once at a time in a promise?
 
Rephrase, please. I might be able to help
 
Doesn't a promise imply asynchronous?
 
@corvid are you saying, instead of synchronously iterating an object's properties, process each object property asynchronously through promises?
 

« first day (1819 days earlier)      last day (3130 days later) »