« first day (959 days earlier)      last day (4214 days later) » 

06:00
You want data = {firstName: 1, lastName: 2}. You're creating data = [{firstName: 1}, {lastName: 2}]
!!/tell David jquery serialize
Oooh riots at a NZ prison.
so with the sendArray I would just get rid of that?
if you want to build this object yourself (you don't have to), data={}; if(...){data.firstName = sth}
@JanDvorak than on my other end would I use the array->{'firstname'}?
06:05
@DavidBiga also, instead of data: {info:sendArray}, use data: sendArray (or data: data, with my naming scheme).
@JanDvorak okay changed to ....data: sendArray ,... and on other end
$checkArray = json_decode($_POST['sendArray'],true);

$sql="UPDATE TaxiCompany set firstname =:firstname WHERE username = :user";
$sth=$DBH->prepare($sql);
$sth->execute(array(':firstname' => $checkArray[0]['firstname'],':user' => $_SESSION['userActive']));
Without these fixes, the useful data would be at checkArray['info'][0]['firstName']and checkArray['info'][1]['lastName'] (if firstName was sent), which is kinda stupid.
well wait, so what is it now though? just array['firstname'][0]?
Just checkArray['firstname']
I tried but no value, should I be decoding it?
I am at moment
06:10
um... pastebin please. javascript and php
preferably with logging commands and their ouptut
What's a good movie editor on OS X, gf wants to know, she says iMovie is too confusing
Vegas Pro...that is probably way more confusing though
@DavidBiga you didn't fix the other form inputs. It's probably crashing while trying to serialize the form. Use $.serialize and discard short inputs server-side.
Lol wait I am not using the other form inputs though, I know that I am just testing the first one until it works than I will change
where should I use the .seralize?
06:16
Also, if some string's length is longer than 1, the string is definitely not a single space.
at the end before sending? so $(sendArray).seralize?
instead of the entire block. Read the documentation.
@JanDvorak You are just on a smack down arnt you?
I am pointing out the things you should fix.
I appreaciate it :)
so wait serialize the entire thing?
06:18
correct :-)
its still not working :"(
what was the short input you where talking about?
I'm gonna start learning Objective-C just cause
I like it man its great for IPhone development, well thats the only thing its for :)
I used to develop in Flash for IPhone but not enough support and can't access natively really.
I was talking about this condition: if ($(".firstname").val().length > 1 && $(".firstname").val() != " "). The server should handle that, not the client. Also note the second half of the condition is always true if the first is.
@XCritics i've heard the language and the API are pretty bad.
I made an app for iOS before, it didn't seem too bad
06:22
@JanDvorak no it will not because if there is a value it will be a space so if that space is there it wont go through
It has a model feel to it, you declare your variables in another file, which is weird
Or so it seems
Namely, it lacks any proper layout manager
@JanDvorak so why can't I get the value
@DavidBiga your condition discards any single-character input. A space is a single character.
06:24
@JanDvorak I see
Anybody know a good alternative to 1channel or icefilms
perhaps you were testing with a single character?
@XCritics youtube?
@JanDvorak no I type in david on the input feild and made sure to log it
and it showed up as object{'firstname':'david'}
so thats getting sent over to my php end
oh, wait, sorry
data:sendArray uses URL-serialisation, not JSON-serialization, so it is either data: {sendArray: JSON.stringify(sendArray)} on the client-side or $_POST['firstname'] on the server side
the latter option is probably preferable
06:29
praise Jesus it works!
I could give you hugs and kisses right now
I'm always open for hugs and kisses
@XCritics XOXOX
haha
Got my gf watching a beginners guide to iMovie lol
Ha
okay well goodnight everyone its 2 in the morn, Jan I really appreciate you helping me!! Your the best :)
06:32
I agree with the previous post
!!s/one|Jan/$&,/g
@JanDvorak @XCritics @XCritics @Jan,Dvorak @XCritics Okay well goodnight everyone, it's 2 in the morning, Jan, I really appreciate you helping me!! You're the best :) (source) (source) (source) (source) (source)
!!/s/!!/!/
@JanDvorak Invalid command /s/!!/!/
06:35
@phenomnomnominal @JanDvorak Invalid command /s/!/!/ (source)
I can't stand trying to answer JS questions, every question is some sort of framework, does nobody use vanilla anymore? Sigh..
@XCritics You're one of us now.
@XCritics what's wrong with jQuery?
@phenomnomnominal hahaha
06:36
@XCritics You're against BenjaminGruenbaum now.
Nothing wrong with jQuery, and I don't mind jQuery questions, it's just annoying trying to filter through the JS questions for some good ol' vanilla JS
The jQuery questions are all the same.
Yeah it's starting to seem like that...
My x plugin isn't working, fix it.
I don't really know any other languages, other than HTML to feel comfortable offering answers, so this is quite annoying..
Backbone, Knockout, paperJS, jQuery, Fancybox, Vert.x, Jqgrid
Give me a break
06:40
Questions have been trending towards the specific. "My flexigrid doesn't work when I run it through Backbone after using a Lamson server to pass data through a Rails app and back to some Knockout bindings, and there's this ache in my left thigh"
2
@XCritics PHP is one big ball of "please don't use mysql_. It's deprecated. Oh and you've got a nice huge injection vulnerability here".
@Zirak LOL
I'm gonna make a sick youtube app, just cause I'm sooooo booorrredddd
Frankly, "PLZZZ DBG MY HOMEWRK" is all too common in every language tag.
Will it be fair if I add an answer to my own bountied question saying "what I have now is good as it'll ever be"?
@Zirak hahahahahha
06:45
@Zirak no (NAA), but I've just noticed I forgot to drop you an upvote :-)
I need ideas, I can't see myself using Rails 3 in the near future, it doesn't really interest me, and as my app grew it seemed to get more confusing to manage, I love Node.js soooo much but I have done all my projects that I set to do, I guess I need to finish that sockets based thing I was making, but other than that x.x
I'm gonna learn how to make a user-script
Write an adventure game. They're always fun.
Well, unless you make them suck.
Don't.
Ok I'm gonna do that
I should make a MUD with sockets
!!fruitlessly work on that thing or switch partitions
I've had to write one in a language I didn't know in five days. The game is done, but it lacks pretty much everything.
06:49
@Zirak fruitlessly work on that thing
!!s/everythi/everything
@XCritics Y U NO MAEK SENSE!? Could not understand s/everythi/everything
...I will defy that order!
looks anxiously towards the bot screen
@XCritics Why do people hate on the trailing slash
@Zirak you promised to make it optional
Never
People who omit it deserve the suffering and madness that follows
06:52
(I'll be back)
oh, well. But you should
@Zirak How do you listen for the hooks for chat messages, you said open developer tools and look for a socket thing
I see no such thing
@XCritics refresh
06:55
@JanDvorak I see something for when a user joins the chat, but I don't see how it listens for messages
@XCritics open that websocket
after a few messages, open it again
That's under the network tab right?
correct
All I see is
/chat/17/messages, with an id and time
Test
reopen the socket view
it doesn't autorefresh
06:59
Test
Say something
done
err, "something"
lol
Am I looking in the right spot
@XCritics click the websocket open
Ooooo, I see what you mean, I thought you meant the websockets button at the bottom, cause when I clicked it it had nothing in here, but now it does
Now hell the hell do I bind to this with a user-script so I can read data :P
!!/tell xcritics google site:userscripts.org sojschathighlight
 $.post("/ws-auth", fkey({roomid: /\d+/.exec(location)[0] }), function (data) {
      var socket = new WebSocket(data.url + "?l=99999999999");
      socket.addEventListener('message', highlight);
  });
@phenomnomnominal Just curious, since this is your userscript, what's the purpose behind this $.post?
@XCritics it obtains the socket URL based on the room ID
The ?l=999999999999?
Probably a cachebreaker
and last thing, the fkey?
nvm
It's a function but
07:11
Hi to all
good afternoon
Hi to all
The l parameter is some thing the chat uses. I think it's a "last message id" indicator, so when you do a low number it grabs all messages starting from that message id.
The fkey is an authentication key.
When you send a message or read or anything, there needs to be a match between the cookies and the fkey.
@QuestionGenerator hi hi hi
@Zirak So you have to do your whole script inside of that $.post if you wanna react to chat?
Hi @JanDvorak...how is 2day?
You really don't know how to use functions
07:13
Haha I do, but I mean, it all has to start there
Yeah, everything needs to be called from what gives you input, of course
I was what I was asking
@QuestionGenerator I don't know him, sorry
@XCritics maybe you could declare the function outside $.post, and then just reference it from within.
I know that, read my clarification of my question above ^ :P
test
Hi @JanDvorak...I just asking about you... how is today?
07:17
@Loktar are you enjoying Chrome OS so far?
Is this a bot? It's really fucking annoying
@QuestionGenerator oh. Thanks, fine.
@XCritics LOL
@XCritics Sadly, it's not a bot.
@JanDvorak...can you solve my solutions?
@QuestionGenerator how does a solution need to be solved?
07:19
Brilliant.
He didn't even ask any question yet.
And yes, I'm really laughing out loud ;-)
Solve my solution is what got me lol
I'm not laughing tat QG's comment, Octavian's reply is what got me :-)
07:21
hi all!
@javawarrior 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.
Ok, i need help with flash
Oh @JanDvorak.. i think you laugh my comment....its k
If anyone here knows flash, but it can be for any language, really.
I'm having trouble determining where two laser beams meet up
07:23
@javawarrior that thing on a camera so that you can shoot in the dark?
I need help in file manager in opencart...
So it's a mathematical question.
@javawarrior You mean, two straight lines?
Yes
Using the law of sines
function meetup(la1:laser,la2:laser):Point
{
	//what we'll do is we'll calculate for one side, then use the laser angle and length to find the point

	var ang3:Number=(Math.PI)-(Math.sin(la1.angle)+Math.sin(la2.angle));
	/*this is the third angle. Now that we have this, all we need is
	the length of that angle's side and we can get the 'matcher'*/
	var side3:Number = Math.sqrt(Math.pow(la1.x - la2.x,2)+Math.pow(la1.y - la2.y,2));
	/*Now we get the matcher by doing simple equation*/
	var matcher:Number = side3 / Math.sin(ang3);
07:23
That's a simple equation
oh lawd
In Euclidean geometry, the intersection of a line and a line can be the empty set, a point, or a line. Distinguishing these cases and finding the intersection point have use, for example, in computer graphics, motion planning, and collision detection. The number and locations of possible intersections between two lines and the number of possible lines with no intersections (parallel) with a given line are the distinguishing features of non-Euclidean geometry. Mathematics First we consider the intersection of two lines L_1\, and L_2\, in 2-dimensional space, with line L_1\, being define...
Edit your message, format it (hit Ctrl+K)
when i tried using that code, the beam went all wonky
can you provide solution for this ...
@JanDvorak... i need help in opencart...is there idea about it...
@QuestionGenerator sorry, no expertise in opencart
07:25
@javawarrior Dude. you have two lines: y1 = ax + b and y2 = mx + n
please don't ping people randomly
It's finding mx + n = ax + b
zirak, my lines are angle point
Oh well good @JanDvorak...any other room for opencart let me know about it
What does that mean?
07:26
i have an angle and a point
I use sine and cosine to calculate stuff
many games use it
many games can be wrong or misunderstood
I just want this answered
I understand you...
You at least want a vector
07:28
 1 var test = function (data) {
  2   console.log(data);
  3
  4   $.post("/ws-auth", fkey({roomid: /\d+/.exec(location)[0] }), function (data) {
  5     var socket = new Websocket(data.url + "?l=99999999999");
  6     socket.addEventListener('message', function (data) { init(data) });
  7   });
  8
  9
 10 }
 11
 12
 13
 14 var script = document.createElement('script');
 15 script.type = 'text/javascript';
 16 script.textContent = '(' + test.toString() + ')();';
 17 document.body.appendChild(script);
i just want a point to tell me where they meet up
I'm just goofin right now, why would I get Websocket is not defined?
i'm trying to use law of sines
But I think you're clipping up your angles
Because the point isn't amorphic
@XCritics It might not be available just then.
07:29
i use pi
and i don't clip them
no rounding
...well that should solve everything
@javawarrior What's the reference line for both?
I mean logically. How do I draw this...
reference line?
@OctavianDamiean Works in phenoms script
07:30
Explain please.
hey anybody familiar with openlayers.js ?
@badbetonbreakbutbedbackbone no
Now search that response inside your name ;-)
07:32
Zirak, what are you trying to say
You have beta and alpha, and you calculate using them, but what you need is the angles Beta and Alpha* OR alpha and Beta*
See the problem?
oh
i do have Beta and Alpha*
Are you sure they're on the same y?
07:34
they don't need to be on the same Y if you use the law of sines
Because the general point is alpha
But if you try to make a triangle by connecting alpha and beta, you clip beta and enlarge alpha
@JayPatel 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.
@phenomnomnominal bro, why would I get Websocket is not defined, I'm totally copying your script (and I disabled yours for no cross-issues) gist.github.com/Gacnt/d100733e0ab62ae6b2eb
07:36
I am just checking out this feature here. @CapricaSix
I mean chat @stackoverflow.
Zinak
it works like this
they will always be on the same y
Are you certain?
...then how can you claim that?
zirak, it's laggy here
i am trying to solve this problem
could you explain how to solve it in javascript maybe?
07:39
This is your problem. You're trying to work with alpha1 and beta1, and you think you're working with alpha and beta.
I don't know how they make games using angle/point. But I wouldn't do it like that.
@XCritics, you suck at copying
oooh
i see
in a way
@phenomnomnominal ah fack
My bad homie
07:40
w*bs*cket
@javawarrior use vectors.
If you have to do it, I'd project it to their algebraic meaning somehow, then you'd have ax + b = mx + n, which is very nice.
You have the angle so you have the slope. You have a point so you have the equation.
@phenomnomnominal Curious, how did you find that fkey function in that minified shit show
!!/google polar to cartesian
07:42
@XCritics, It's part of Chrome
y = tan(alpha) * (x - x1) + y1
Oh realllllyyy
ok
zirak
@XCritics, look at the View menu
k now what
07:43
@XCritics I just looked at the portions of the code that were relevant to sending/receiving messages.
@XCritics ooooh
Sorry bro
I thought you meant the full screen thing from before
oh lol
Yeah I just stole it from the bot
LOL
@Zirak But how seriously, that minified text
You unminify it
07:45
I love living in the world of yesterday
I always wondered if that was a thing but never got around to googling it
@Zirak, or use Chrome
assumed it was
@phenomnomnominal damn, and I've given you credit when I stole it from you
oh, wait, I stole something different. NVM
07:46
gdzg
test
@JanDvorak haha oh nice
Yeah you used the script injection bit right?
right
but I think I'll use unsafeWindow instead from now on
chrome doesnt have it
Tampermonkey does
I don't use the native userscript functionality
07:49
alternatively, var w = unsafeWindow || window might work
Writing userscripts is such a pain haha
test

Sandbox

Where you can play with regular chat features (except flagging...
Good idea
Caprica is lonely
07:54
Is there people in there to talk to me :(
!!should I go to bed
@XCritics No
yay ive managed to find the content
clap
Just one.
That's all you deserve.
08:00
@Zirak all this dragging and dropping of the userscript into the browser must have gotten annoying for you
The bot isn't a userscript
Oh I thought it was
What is it then o.O?
It's a 179kb bookmarklet
No
08:03
No
1 message moved to Trash can
No
I talked to a guy who does not have a college degree but worked at a company for a few years and he seemed to be little bit jealous about my college degree that I am going to get in 1 year
COOL BRO
Except that he's now had more real world experience, and degrees mean pretty much nothing.
and he thinks college teaches you abstract idea behind programming but does not teaches you real world programming
so I asked "what are examples of real world programming?" and he said "You know, finding bugs, setting up development environment"
08:05
@O0oO0oOO0ooO As someone who's been in both situations, he's right
He's 100% right
Who cares?
A degree get's you the first job
After that, no one will give a shit
Good afternoon
@O0oO0oOO0ooO What's the biggest codebase you've worked with?
08:07
Oh you're legit good, I didn't realise. Make sure that's on your CV
Cunty vagina
I'll ask again...who cares?
@O0oO0oOO0ooO Do you enjoy what you do?
@Zirak Sorry?
If so, fuck him. If not, find something else.
Good morning to everyone
08:19
@Zirak Yes, I enjoy programming
@O0oO0oOO0ooO I also enjoy programming
I like trains
Who doesn't!
I like railroad intersections
I like legos
and smoking
which I'm going to do.
08:33
I don't like smoking. It's unhealthy.
hmm then I like bill gates
08:56
Bill gates ?
I wonder even if bill gates uses internet explorer ?
probably just pays someone to do it for him

« first day (959 days earlier)      last day (4214 days later) »