« first day (1453 days earlier)      last day (3513 days later) » 

8:00 AM
><
 
@cedric.salaun 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.
 
I have an .ajax request, in which i have to send 3 arrays through my post. the problem is, the arrays are initialized this way : var array1 = []; AND, before the request, data MAY BE pushed into it... but not always... i have to be able to send "empty arrays" with my query... how can i do?
If arrays are empty, the ajax query does NOT send them, even if i put them in the data part...
 
épic first post ever :D
 
@Julo0sS in what form are you sending the data? JSON?
 
@Julo0sS why you cant do a simple if array empty before call the .ajax ?
 
8:06 AM
!!>JSON.stringify('[]')
 
@AwalGarg "\"[]\""
 
see?
 
....  $("body").event.......... function(){
    var array1 = [];
    var array2 = [];
    if(someConditions){array1.push(someVar);}
    if(someOtherConditions){array2.push(someVar);}
    $.ajax({
        type : 'POST',
        url : './php/utils/getSomeData.php',
        data : {'array1':array1,'array2':array2},
        dataType : 'json',
        error : function(response){},
        success : function(response){}
    });
}
this is the "idea"
 
format please
 
tag pls?
 
8:08 AM
!!tell Jul format
 
@Jul Format your code - hit Ctrl+K before sending and see the faq
 
::poof::
 
y not send json string?
I see you are using php at the backend, which can decode it on the server.
 
yeh i use php, but the fact is that, when i come into my php file, if my array2 is empty, the array2 is NOT SET, when i look in the post, only array1 is sent...
 
You are not listening...
 
8:11 AM
i'm reading...
i'll try ;)
 
> dataType: 'json'
 
yeah, this only means that the data i'll get BACK from my php IS json
 
yes
 
yes but array in js..
 
and you should thus send in JSON itself.
anyways, with a language like PHP at backend, I would never trust sending anything other than a properly parsed string.
 
8:15 AM
JSON.stringify ?
 
8:25 AM
ok, with stringify i send "[]" to my php... now i have to convert these "strings" to arrays... replace "[" by "(" then $tab = theString? any other idea?
 
@Julo0sS Google, "php json"
 
@AwalGarg you want to know if version control is important?
why do you think every single line of code I write is under git? for fun?
 
!!tell Julo0sS google php parse json
 
!!summon 43899
 
8:36 AM
@Zirak bug ^
 
hrm?
 
she doesn't join the room
 
oh. erm, poop. Without the error log I can't know much. Why isn't inspecting the error log a command?
Try again? :D
!!summon 43899
 
@FlorianMargaine actually, I just want to know how much git will benefit me when I am just learning to code.
no production work, just learning experimenting and things.
 
@AwalGarg a fuck tonne.
 
8:39 AM
and how?
 
@AwalGarg everybody uses git, so you'll have to learn it
the sooner the better
 
"learning experimenting and things" is a lot of what I do
 
also, coming back and forth between versions of code is useful, especially when experimenting
 
@AwalGarg one place for all your experiments. Learning to split experiments into chunks / commits. Being able to share said experiments easily. A visual log of what you have done etc.
 
hmm, nice
 
8:40 AM
And not losing them.
So much rage over losing work...
 
just redo the work
noob
 
haha
 
I have a lenovo thinkpad
I love playing with the little button in the middle of the keyboard to move the mouse...
 
@FlorianMargaine copy loves that too
 
well, I am gonna try git, so now other than learning js and some other languages, I also have git to learn. But I guess it would be a short course.
 
8:42 AM
hahaha
 
basically, my "{} to learn" list is lengthening exponentially ;p
 
git is learn as you go. Use a GUI if the command line is scary.
 
The more you learn, the more you realise how much shit you still have to learn
7
 
@Zirak yes completely
 
@AwalGarg lisp* ?
 
8:44 AM
no, lisp uses (), not {}
 
@darkyen00 haha nope.
 
you'll never learn...
 
@FlorianMargaine yeah wondering if he confused them both.. ps i know list uses () not {}
 
lisp. Not list.
 
^^
 
8:45 AM
list is []
...
 
list is love
 
what the heck is {} ?
its a block
 
list is in redis
 
list is life
 
a dictionary
 
8:46 AM
has all the words
 
{


}
not a dictionary
 
NaD?
 
@FlorianMargaine no
 
yes
 
8:47 AM
bi-weekly annually
 
depends
 
this is currently how we build
 
+
 
8:47 AM
6
 
42
 
congratulations, you just mastered dc
 
ok this git branch thing is pretty interesting xD
 
$ dc
4
2
+
p
6
 
!!afk $ git branch experiment
 
8:49 AM
rm -rf txt-cocoonjs/www/*

cd txt-cocoonjs
git pull origin master
cd ..
cd txt-frontend-common
git pull origin master
#specially build for cocoonjs which adds the services required for cocoonjs in angluar
grunt build:cocoonjs

mv ./dist ../txt-cocoonjs/www/

cocoonjs run
and i think this is a crappy solution :x
 
@darkyen00 this is what I have for an extension github.com/Ralt/phpdbg-ext/blob/master/Makefile
as long as the makefile is not very much complicated, just roll with it
I should learn to refactor makefiles...
 
especially since the ./txt-frontend-common

has folders like

script
    services
        web
        cocoonjs
        chrome
        windows8
@FlorianMargaine there is only a single line difference into both of your commands
 
hence the:
3 mins ago, by Florian Margaine
I should learn to refactor makefiles...
 
please do
btw make file looks like a better solution :P [then messing with grunt :-(]
but oh well grunt is un avoidable
 
@copy hi
 
9:02 AM
grunt is crap
 
nope
 
when i run command grunt serve then it conflicts with xcode sdk core services framework event class .. it thrown error me...
 
its radio active crap of justin beiber
 
@BadgerGirl Hi
 
its better to create sdk for this kind of technologies
 
9:04 AM
lol
idk about that but writing stuff in grunt looks horrific to me
 
gulp!
 
@darkyen00 see this pastie.org/9630597
:@
now i demanding windows machine for angular dev
i don't want any installation which violate other installable files
 
why do I have to provide a message everytime I commit something...
 
so that the commit log shows why you commited
 
mostly, if I have committed, I know why I did.
but yeah, it is helpful sometimes
 
9:09 AM
you will forget
 
Is there any easy way of ordering a table by a column numerically, without using a plugin that is. jsfiddle.net/11ojdxzz need to order by 'Delay' and some of the number values are two digits and I just can't think how to approach it
 
@Shaun you mean order it on a click of some ui button, right? or just order before the details are filled in from the for loop?
 
@Tirth dont' visual studio is bloddy hell broken
 
@AwalGarg just have it ordered when it's generated
 
@darkyen00 why
 
9:13 AM
it has 5 different places for MSBuild :D depending on which version you are compiling ... hit and trail :D
 
hahahaha
 
@Shaun then you order the array itself.
 
Visual Studio i like only for pure C# dev
 
@AwalGarg that's just static data
just an example
it will be filled with real db data which isn't organised eventually
 
i demanding new machine without any sdk installed in it actually
 
9:15 AM
@Shaun I meant, create a new array from the original array with array.sort() and then generate data according to the new array.
 
@AwalGarg got an example? ^^
 
!!tell Shaun mdn sort
 
^read that, there is the example
 
thanks
 
9:16 AM
np
 
9:30 AM
@BenjaminGruenbaum sorry to bother you on your trip, but I'm getting this error and searching I came across this:
Did you manage to figure it out? — Benjamin Gruenbaum Apr 24 at 13:11
so, did you manage to figure it out? :P
 
you should send him an e-mail
 
I figured he is more likely to visit this room than his work email :X
 
hi there guys
 
hi
 
I can give you his phone number
 
9:32 AM
I know you can
 
100
 
guys I have downloaded a template for web. In this template, there is a php script to send email. In this script there is a validate() function, in which there is a variable $return_array. one of its value is $return_array['success'] that could be '0' or '1'. In another file, a javascript one, there is a click() function, that manages the value of 'success' in the php script doing if(html.success == '1')...but it does not work as expected, infact it is always '0'...what do I need to check?
 
Check out SO main
 
I know it will get 5 CVs
 
Yeah, waste their time not ours
 
9:43 AM
lol
 
harro guise
 
@Sippy english, please
 
@JanDvorak Engrish?
 
@Sippy not good enough
 
shit.
15 hours ago, by rlemon
user image
@rlemon Jesus christ, man ..
 
9:52 AM
@Sippy rlemon is afk: i.imgur.com/kv29YZ8.png
 
I dunno if I wanna click that.
 
it's just a huge boob
@Sippy lmao, holy shit
3.25 years is 1186 days
 
Hahahha
@rlemon You need a vacation dude... :D
 
what a loser :D
 
9:56 AM
@ircmaxell 7 rep too much
 
quick, let's downvote him!
 
lol
 
@ircmaxell Oh wow.
 
@ircmaxell what the shit
 
How do you get that many consecutive days?
 
9:57 AM
you've been here every single day for almost 4.5 years
 
[yes-you-do]
 
@Kippie OCD!
 
hey, why doesn't it do the magic thing :(
 
that is commendable
 
9:57 AM
Anyways, time for lunch!
 
@ircmaxell Did you get a prize for that?
 
I haven't been this consistent with anything in my life
 
@Sippy no, not yet at least
 
@ircmaxell I think you need one. Lol
 
then start a meta thread on it.
 
9:58 AM
I will!
 
10:11 AM
Any good game to time pass?
 
@Mr_Green That new LOTR game is pretty good
 
@Mr_Green message something funny to botguard@google.com
anyways, I have to give an analogy to a 10year about webservers. Is a mobile phone a good one? Any better alternative?
 
What?
 
...?
he is asking how does the google.com page always show up?
 
10:20 AM
Is he asking how the internet works? About the client/server model? Web-severs in specific?
 
nope
web servers in specific
 
Also, disconnect the ethernet cable (or whatever) and google isn't likely to show up
 
(from what I inferred)
 
So he knows how the internet works and the client/server model
(because most web-developers don't know either)
 
@Zirak no, and he doesn't want to listen
here in India, computers running all time long are rare to spot for a 10 year.
 
10:22 AM
@copy I'm done
 
He thinks computers are made to start, work, and shutdown.
 
lol
 
So I told him that's not how Google's servers work.
but kids have no brain
 
Or servers in general
 
oh, so just uptime
 
10:23 AM
yes
 
Then tell him that it's like a hospital.
 
so I thought I would tell him that the same way a mobile phone is up all time, recieves all calls, and you pick them all up, is pretty much the same way a server runs.
(ofcourse battery is a factor)
 
Your own house can stay vacant, but a hospital must be staffed at all times.
 
hmm, nice
 
-4
Q: java code on room heating simulation

simarneet bindraExercise 1: Room Heating Simulation For the purposes of this simulation, assume the following: If the temperature inside a room is t, and the temperature outside it is e, in any one time period the loss of temperature in the room due to heat exchange through its walls is (t-e)*f where f is a fact...

Just an assignment walloftext
 
10:25 AM
@Cerbrus ewewew
@Zirak You can do the request/response analogy quite easily with a hospital as well, I like that one.
 
...
...nvm
 
@BadgerGirl Skype
 
@Hi All, Good afternoon.
Hi All, Can anyone helps me regarding
While writing karma test case for my angular custom service then I am getting this error
Error: [$injector:unpr] Unknown provider
And I have injected all related dependencies
into my test file
 
Sounds like something that can very well be resolved on stackoverflow.com
 
10:42 AM
you keep copying the same thing lol
 
I got it working awal :p
 
np
 
mind taking a quick look at this?
 
this? sure?
 
jsfiddle.net/pk3tB/2 what needs to be modified so it only checks the delay column if it's less than 6
and
that's the wrong link
 
10:44 AM
where is the delay column?
;p
 
the 3rd column ^^'
 
revision 77????????????????????????????????????????? waaaaaaaaaaaaaaaaaaaat???????/
 
I don't know where 77 came from o.o
 
dude, jsfiddle is not your hosting server.
;p
anyways
 
is that 77 versions of that fiddle or my 77th fiddle :p
 
10:46 AM
@Shaun 77 versions.
 
ah
 
and that is a lot!
 
i got it from stack voerflow and i've modified it slightly
cause it was relevant, but the code isn't clear to me
still not sure where 77 came from :'3
 
kk don't worry.
 
@Shaun In that case, you should make a fork, rather than edit the existing fiddle
 
10:49 AM
hmm, you need to assign classes to those td's.
also, what should that fiddle be giving the output according to you?
 
@AwalGarg is that the only way to do it? cause in my actual code the td's are generated
it looks like to me it searches any number iin the table if it's less than 6
so the first column causes them to all go red
but i could be wrong
 
@Shaun Gaaaaaaay
 
not this guy ;3
 
u prolly wrong
 
prolly
 
10:52 AM
to select some particular thing, you need to assign it a particular identity.
You can't expect the JS engine to think for you.
Because JS is JavaScript, not Jon Skeet.
@Sippy didn't get the joke? ;p
 
@AwalGarg Is he a pornstar?
 
@Sippy He is some guy without any life... keeps stalking everyone on SO.
 
@AwalGarg lolwat
 
@AwalGarg I thought maybe you could search it by the columns number
 
keeps answering questions, keeps accumulating rep... bla bla
 
10:55 AM
instead of by value
 
@AwalGarg No I just don't like Shaun ;D
 
he loves me really
 
@Shaun indeed, but that is not how things should work.
 
@AwalGarg but it does work? ;p
or will it cause problems
 
@Shaun yes it will cause problems. sooner or later.
 
10:56 AM
ah i see
@AwalGarg what if the th had an id?
 
@Shaun there is no th in your code
 
It sees the 2k39 as 2 on parseFloat, which is below 6, that's why they're all red, was that the intention?
 
@Shaun If you used mvc you could use gridmvc and not have this issue.
nerd.
 
@ircmaxell all that effort and no "Legendary"
 
@AwalGarg if I had one I mean
in my actaul code theres one
 
10:57 AM
... then again "Legendary" is explicitly design for people who don't have a job
 
@Shaun post the actual code. I dunno where the th is, how it is associated and things.
 
@tereško precisely that
 
not the actual code but ends up being the same thing
 
What is the problem with this then?
 
@Magikaas It's only meant to search by the delay column
 
10:59 AM
Or rather, what should it do?
 
not by the first
 
Aha
 
:p
 
hold on for a sec now
 
Would nth-child work?
 

« first day (1453 days earlier)      last day (3513 days later) »