« first day (1688 days earlier)      last day (3266 days later) » 

1:00 PM
@Catgocat I think it's fine to require unflagged requirements at the end or beginning
 
@JanDvorak did you found the problem ?
 
but flags should be accepted in any order
@ZahidSaeed yes, and I told it to you
 
How do I solve it ?
I didn't understand
 
@JanDvorak Should I only accept [flags] [arguments] [flags] or [flags] [argument] [flags] [argument2] [flags] [argument3] too ?
 
...
lol it is difficult to be Jan :P
 
1:01 PM
@JanDvorak Can you send code example ?
 
combo 3x!
@Catgocat how much code are you willing to spend?
KISS
 
@JanDvorak I just want something that is normal among all the other command line applications.
 
@JanDvorak where is the problem ? Is it in PHP code or js code ?
 
@ZahidSaeed both
 
Then please send me fixed code
 
1:04 PM
@ZahidSaeed no
 
I can't figure out the problem.
 
@ZahidSaeed are you in college?
 
But tell me the logic
Yes
 
@ZahidSaeed what subjects do you study?
 
I'll try to fix my code @JanDvorak
 
1:05 PM
@ZahidSaeed I did
 
@AwalGarg Maths, Physics, Computer
 
@ZahidSaeed maybe this might help php.net/manual/en/function.array-push.php
 
@JanDvorak But I didn't understand. Can you explain it in easy words ?
 
@ZahidSaeed HTTP is stateless. You can't send a request multiple times and expect the backend to remember the state of the last script (atleast not like that).
 
@AwalGarg GET is stateless. POST is not.
 
1:06 PM
@MadaraUchiha well... in his code, the logic still applies
 
I see
Then how do I fix it ?
 
@ZahidSaeed stringify your array and send it at once or whatever.
 
Stringify ?
 
or create a formdata object and append everything to it
 
9 mins ago, by Jan Dvorak
@ZahidSaeed send the entire array at once
 
1:07 PM
How do I send it at once ?
 
@ZahidSaeed you were given a lot of hints and explanations.
Please go and read the relevant manual entries
 
the jQuery docs will tell you
 
var fd = new FormData();
array.forEach(function (val, i) { fd.append(i, val); });
xhr.send(fd);
 
or just dump the array to jQuery
 
!!s/the.+to//
 
1:09 PM
@AwalGarg or just dump jQuery (source)
 
@AwalGarg var fd = $.reduce(arr, (fd, val, i) => fd.append(i, val), new FormData()); :P
 
@MadaraUchiha -1 not enough jquery
:P
 
@AwalGarg ^
 
I didn't knew that jQuery can even send complete Array :D
 
@AwalGarg you're inconsistent
 
1:10 PM
gist: jQuery.reduce - a jQuery plugin for functional programming, 2010-10-27 19:48:47Z
/*
	jQuery.reduce - a jQuery plugin for functional programming
	@author	John Hunter
	created	2010-09-17
	use: $.reduce(arr, fnReduce, valueInitial);
	fnReduce is called with arguments: [valueInitial, value, i, arr]
	
	reduce will never be jQuery core - its not prototype :p (http://dev.jquery.com/ticket/1886)
*/
(function ($) {
	
	$.reduce = function(arr, fnReduce, valueInitial) {
		if (Array.prototype.reduce) {
			return Array.prototype.reduce.call(arr, fnReduce, valueInitial);
		}
		
		$.each(arr, function(i, value) {
			valueInitial = fnReduce.call(null, valueInitial, value, i, arr);
		});
		return valueInitial;
	};

})(jQuery);
 
:D
@JanDvorak you are missing the joke
 
Wow ! Thank you guys ! :)
It works now !
 
Please tell me you didn't use the code I just posted XD
 
No I didn't
 
...
 
1:11 PM
No
Remember you said ?
HTTP is stateless. You can't send a request multiple times and expect the backend to remember the state of the last script (atleast not like that).
 
@ZahidSaeed so you study "Computer" as in what? What do they teach you in computer?
 
And I also didn't knew that ajax can also send complete array
@AwalGarg Thanks a lot
Actually I just completed my 12 grade exams
Now I'm waiting for my result :)
 
@ZahidSaeed Do they teach you programming?
 
There was C language in computer books
I didn't have to worry because I know much of the PHP
 
1:14 PM
@ZahidSaeed Did you study pointers?
 
Array Pointers ?
 
@ZahidSaeed whatever they call it in TurboC, yes.
 
Yes I know them
from PHP
 
...
 
Believe me I didn't open my computer book for whole year
 
1:16 PM
PHP doesn't have pointers...
 
@ZahidSaeed so you know "much of the PHP" as well?
 
I read it just 1 day before the exam
 
@ZahidSaeed what are php traits?
 
Who said PHP don't have array pointers ?
 
@ZahidSaeed PHP doesn't have pointers
What you call "array pointer" isn't an actual memory pointer.
 
1:17 PM
Which pointers are you talking about ?
 
I think you are confusing them with references @ZahidSaeed
 
PHP can index an array (which is actually kinda surprising given the mess PHP arrays are), but that's it
PHP's references are a mess, too
 
They are called pointers ?
 
a pointer = a number representing a memory location
 
Yes
That's what I was talking about
 
1:19 PM
PHP's reference = "when storing to any variable pointing to this z-var, overwrite this z-var instead of creating a new one"
 
I read they are called as array pointers
 
@ZahidSaeed can you tell me how to return a reference from a function in PHP?
 
Reference to ?
 
@ZahidSaeed are you referring to &$var?
 
like $x = foo(); // say foo returns a variable named $y
$x = 5;
now $y should be 5
 
1:21 PM
Where $y comes from?
 
it could be a object property or in global scope or whatever
 
fun fact: if you have only two variables pointing to the same z-var, you can actually tell using one of them to tell if the other one was garbage collected. Worse, it can change the behavior unpredictably based on when GC runs in actual code.
 
if foo() is returning a value then it will be assigned to $x
But then you are overwriting the $x to 5
So $x would be equal to 5
 
correct, I want foo to return a reference instead so that overwriting $x also overwrites $y
 
how about I start kicking people for teaching PHP here?
 
1:24 PM
You have 30 minutes and google to answer this question.
 
You can put an argument in foo() like foo($y)
@JanDvorak lol
 
no
 
@JanDvorak Bet I can kick 'em faster than you
 
go ahead
 
Hey ok ok
 
1:25 PM
@AwalGarg keybase.io ?
 
@FlorianMargaine what you wrote in lisp which had to do something with pgp
 

PHP

Support group for those afflicted with PHP. Don't ask to ask, ...
 
@Catgocat getopt
 
@FlorianMargaine right, thanks
 
@AwalGarg you do know it's not finished right?
 
1:27 PM
what does that name mean @FlorianMargaine?
@FlorianMargaine I don't :(
 
@AwalGarg what do you want to do with it?
 
1 message moved to Trash can
@ZahidSaeed Please don't post unformatted code - hit Ctrl+K before sending, and see the faq.
 
The name is a Jupiter's satellite name iirc
 
@CapricaSix bull's eye!
 
And a Greek deity too
 
1:29 PM
how about this @AwalGarg
function foo($x){
$y = $x;
return $y;
}
$x = foo($x);
$x = 5;
 
Huh
It was his third
Ah well
@FlorianMargaine I wonder how that works
I can see it connects to a native COM port
But where is that COM port defined?
Another project?
 
@FlorianMargaine test it and see how it works because dystroy told me his server can't intercept it :/
@ZahidSaeed test it and tell me if it works (it won't)
 
@AwalGarg ah, it's basically encrypting with gpg before sending to miaou
 
@FlorianMargaine initial handshake?
 
1:32 PM
The extension is just the plumbing to communicate between miaou and the native app
Initial handshake? What do you mean?
 
how are the keys communicated?
oh wait
umm, nvm
 
Not handled there.
 
@FlorianMargaine your roadmap seems to be mostly complete?
 
@AwalGarg yeah... I should just remove the gmail part entirely
 
ok
 
1:36 PM
The miaou part works, but you have to install the extension in Dev mode
 
@FlorianMargaine do you still encrypt/decrypt via popup?
 
@MadaraUchiha yep
Well, the popup gets the unencrypted messages, but doesn't communicate it to miaou, only with the native app
 
@FlorianMargaine Then needs moar UI
Type message, next to the send button there's some sort of UI to select for whom you want to encrypt (if at all)
And the message should be encrypted as you send it
The other side should detect encrypted messages with own key and decrypt them on the spot (maybe adding a green lock to let the user know it was originally encrypted)
 
@MadaraUchiha you mean in miaou tab?
 
what is wrong with this line ....
$title.attr( { "style" : "text-align: 'center' background-color: 'white' " + ( ( instance.settings.direction == 'rtl' ) ? "right" : "left" ) } );
 
1:41 PM
Everything
 
But you're missing a semicolon before background-color
 
Very crude, but something like that
 
@MadaraUchiha so in miaou tab
 
@FlorianMargaine Yeah, in the tab.
 
1:42 PM
@MadaraUchiha the problem is that miaou can then get the unencrypted message too
 
@FlorianMargaine Eh?
 
crl
and the undesencrypted one too
 
How can miaou get the decrypted message? It's all local DOM
 
@FlorianMargaine thanks
 
@MadaraUchiha local Dom executes miaou scripts too
 
1:44 PM
@FlorianMargaine still something wrong with it though, doesn't change bg color
 
@FlorianMargaine On demand only then, without saving anything to DOM
 
@MadaraUchiha "without saving anything to the DOM"?
 
@FlorianMargaine alert for example
 
lol
"Needs moar UI" -> alert? :P
 
@FlorianMargaine Needs moar UI -> I don't need to copy/paste giant blocks of GPG to read my message
Clicking something and having it open in the popup is fine too (if possible)
 
1:46 PM
@MadaraUchiha you don't. There's an UI in the popup
 
microsoft technet uses synchronous xhrs :(
 
trying to get the background to set but it won't what is wrong with it ..
$title.attr( { "style" : "text-align: 'center'" + ( ( instance.settings.direction == 'rtl' ) ? "right" : "left" ) } );
sorry wrong one ....
$title.attr( { "style" : "text-align: 'center'" + ( ( instance.settings.direction == 'rtl' ) ? "right" : "left" ) } );
 
@havingagoatit missing space. Also, if this is jQuery, use css()
 
it is code from a jquery plugin called multipushmenu , i wouldn't want to change it I am just trying to change the background color of h2
this is ow what ive got
$title.attr( { "style" : "text-align: 'center', background-color:'#fff'" + ( ( instance.settings.direction == 'rtl' ) ? "right" : "left" ) } );
 
@havingagoatit For the love of God, please use classes and have CSS applied to those classes
 
2:00 PM
@MadaraUchiha not going to happen buddy it is a well known querry plugin as i just said and wouldn't mess with it as it works flawlessly ! I just want to change background color using the sytax methodology that the creators used
 
document.write also works
 
very clever
 
This gif perfectly reflects my face right now
 
kick awal?
 
2:02 PM
xD
 
ok, who flagged that?
 
@JanDvorak one guess
There are, like, 4 people alive in this chat right now
 
who flagged what?
 
identicons flagging tyson
 
not the same guess as mine
 
2:07 PM
hey guys
 
yeah, but which message was flagged?
 
@AwalGarg My gif
 
@AwalGarg ...... tyson .. neil degrasse tyson
 
lol
 
anybody knows what a passphase is in git ?
 
2:08 PM
@AlexanderSolonik passphrase is not a git term
 
google does
 
Although
 
!!tell AlexanderSolonik google git passphrase
 
did you google before asking
 
2:12 PM
!!tell AlexanderSolonik google git passphrase
 
i've already linked the docs
 
There. That's it :P
 
@CapricaSix Thanks my friend :D
<3
 
@MadaraUchiha invite me one more time to a trash can, I will personally come to Israel to damage your computer.
 
2:14 PM
1 message moved to Trash
 
@AwalGarg You're welcome to try. Mortal.
 
come at me bro
 
:(
@MadaraUchiha your imagination is mortal, not me :P
@rlemon you are already is so many rooms I can't even invite troll you :P
@MadaraUchiha try that endpoint again? seems to be sped up
code in history of this message
 
I'd love to see a fight between @AwalGarg and @MadaraUchiha with awal screaming "INVITE ME ONE MORE TIME MOTHERFUCKER, ONE MORE TIME"... and then slowly moving to daft punk song... " one more time..."
And then Awal and Madara dancing together
"One more time..."
With the movie in background
 
@FlorianMargaine has a great imagination ! LOL
 
2:23 PM
I have many other ways to troll him, actually.
 
And then Awal transforms the movie into a Bollywood movie by dancing like at the end of a Bollywood movie
And Madara just follows...
 
oh god no
!!afk brb
 
Yeah, I'd love to see that
And now I have some chores to do, cya
 
2:57 PM
`/(\w+), (\w+)/.exec("pear, spaghetti, something, strawberries")`. Why does this regex match all the words, followed by a comma and a space, whereas
`/\w+, \w+/.exec("pear, spaghetti, something, strawberries")` matches the first ones it finds. How do the parenthesis achieve that ?
 
@StevensHaen I don't believe you, put it on regex101 and show us
 
@AwalGarg You can just copy/paste in the console, see that I'm speaking the truth
 
@StevensHaen It is not doing what you thing it is doing in the console
!!> /(\w+), (\w+)/.exec("pear, spaghetti, something, strawberries")
 
@AwalGarg ["pear, spaghetti","pear","spaghetti"]
 
^ see this
 
3:07 PM
!!> /\w+, \w+/.exec("pear, spaghetti, something, strawberries")
 
@StevensHaen ["pear, spaghetti"]
 
see?
 
My question is how do the parenthesis make it look for the same pattern in the whole string, as opposed to just quitting on 1 word, 1 comma, 1 whitespace 1 word
 
@StevensHaen happy now?
:)
 
!!> /(\w+), (\w+)/.exec('pear, spaghetti, 1, 2')
 
3:09 PM
@FlorianMargaine ["pear, spaghetti","pear","spaghetti"]
 
maybe it's clearer here?
 
@StevensHaen the parenthesis don't, read the response of the bot properly
exec returns the match, and then capturing groups. The first array is of length 3, not 4 (as you might think it is)
 
Why does it keep looking for the same pattern with the parenthesis and not quitting on the first match?
 
!!> /(\w+), (\w+)/g.exec("pear, spaghetti, something, strawberries")
 
@FlorianMargaine ["pear, spaghetti","pear","spaghetti"]
 
3:10 PM
@FlorianMargaine use match
 
yeah :(
too lazy
 
exec returns an iteratorish thingy
 
@StevensHaen it does quit on the first match
read carefully the result
 
I'm not using "g"
 
... you are not listening to us
 
3:11 PM
@StevensHaen I know. Read carefully the result.
 
Ok I see now
 
^ more details here
 
crl
3:23 PM
!!> var s='pear, spaghetti, 1, 2', r=/(\w+), (\w+)/g, x; while ((x= r.exec(s)) !== null) {console.log(x[0]); }
 
@crl "ReferenceError: assignment to undeclared variable x"
@crl "undefined" Logged: "pear, spaghetti","1, 2"
 
!!write my own tfidf or use node natural ?
 
@Abhishrek "SyntaxError: missing ; before statement"
@Abhishrek use node natural
 
3:36 PM
such image :-O
@rlemon your demo of motion detection + metaballs on this video === awesome
 
too much background noise
wouldn't work
 
hmm
it'd be damn cool though when they collaborate on moves
 
yea for sure, unfortunately my motion detection is super cheap (literally just check for pixel differences between frames)
so all motion is picked up, I have no way to hold objects that are in motion and only display them.
 
Hi everyone. I'm really new to web development, and have a quick question. I am making a simple web app that helps users find a pair of pants that fits based on their favorite pair they own. I'm using a free firebase setup for my database. I'd like to incorporate amazon product advertising in order to allow users to find where to buy the results that match, however I'm unable to put server-side code (required for the Amazon product advertising API) on the firebase hosting setup.
 
@JackHarding 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.
 
3:50 PM
how about this though ?
 
Does anyone know what the best (hopefully free) solution would be for me to incorporate product search/returns on the web app?
 
How to propose to ecma to add eventemitter class to core?
 
4:03 PM
go on the discussion groups
 
crl
4:18 PM
best amazing crazy title ever unbelievable
 
4:32 PM
needs more jpeg
 
very weird
my twitter account signed back in for some reason
@AwalGarg comon mate
 
@FlorianMargaine I want to do it without any npm module.. for the experience you know.
 
@Abhishrek just a sec, proposing inclusion of eventemitter on esdiscuss
 
rlemon.on('slide', poop);  // just make sure these are in  your suggestions ... please
 
no
Hi,

I propose the inclusion of the node/io EventEmitter class[1] in core targeting ES7.

Reasoning:
The .on/.emit model is very popular[2] in the ECMAScript land, and it suits the language a lot. We use events pretty much everywhere in the JS land.
It makes sense for the standard EventEmitter class used commonly to be included in core. With ES6 classes, userland code classes extending[3] the EventEmitter class would be pretty common and useful even in environments like browsers.

Notes:
I think the `.once` method from the node/io EventEmitter class _could_ be left out from standard impleme
 
4:39 PM
2017 ?
 
should I submit?
@BenjaminGruenbaum ^ here?
@Abhishrek I am not sure es7 is targetted to 2017
:(
 
@SomeKittens Haha is that a thing?
 
Thankfully, that's a parody
 
4:48 PM
 
fine, I am sending it :(
 
@darkeyn ^^
!!afk brb
 
wtf why wont this remove the class ...
$(".navbtn").hover(function () {
        $('.nav-toggle').addClass('hover');
        $('.nav-toggle').removeClass('hover');



    });
.nav-toggle.hover  {
  transform: scale(1.1);
  transition: all .2s ease-in-out;
}
 
any idea why codepen doesn't support files ?
 
4:59 PM
!!tell Catgocat google man getopt
 

« first day (1688 days earlier)      last day (3266 days later) »