« first day (1649 days earlier)      last day (3301 days later) » 

8:03 AM
@JustSteveKing Use a recent jQuery version.
Older versions don't like large negative offsets
1.4. is ancient
 
@JanDvorak jQuery mobile version 1.4 is the latest stable though?
 
@JustSteveKing wat?
jQuery != jQuery mobile
 
@JanDvorak I am using jQuery mobile for the swipe events, I am using the latest version of jQuery
:22843997 I ticked the JS box to include latest jQuery though lol
 
sorry, misread
 
@JanDvorak However on investigation I found this :
> jQuery JavaScript Library v1.11.2
So I will manually add jQuery
However on my desktop where I am building this I have the same issue
 
8:10 AM
1.11.2 is fairly recent though?
 
I use 2.1.1 all the time
 
ok... WTH are you doing at L13?
 
@JustSteveKing Line 13
 
You scroll the slider to the left, then remove its first item and put it to the back?
 
8:12 AM
Yes to create an infinate scroll?
So the slider constantly scrolls
IS there a better way to do it?
(I am open to ideas)
 
@JustSteveKing the most solid way is have the slider look like this DOM wise:
5-1-2-3-4-5-1
 
Perhaps you meant to clone it, in which case you're leaking memory (left and right, literally)
 
When you scroll from 5 to 1 or from 1 to 5, you instantly jump to the right element in the chain
 
I didn't mean to clone it, simply just move the first item to the back and the last item to the front
 
@JustSteveKing but then the rest moves to the left within the slider
 
8:14 AM
This is small scall I will be building this dynamically using 200+ slides so I want to make sure the concept works
 
I found that using generators was a decent way of doing something similar while making a slot-machine, but I guess support for generators aren't rolled out to enough browsers at the moment
 
@MadaraUchiha this is harder to pull off if you don't know how large the slides are and they can differ in size
 
@JustSteveKing Have you considered just using reveal.js?
 
... and you don't know the slider size until at client-side
 
@ivarni I haven't heard of reveal.js if I am honest - I am relatively new to JS in general
 
8:17 AM
@JustSteveKing It's a pretty good library for slide-decks, even had support for gestures last time I looked at it
 
@ivarni A slide deck is more along the lines of what I need tbh - this is going to be a mobile product view
 
@JustSteveKing reveal.js is meant for presentations, so it might not be a good fit for a product view
 
@ivarni If it does the job?
 
@JustSteveKing Sure, but it comes with a ton of stuff you probably don't need, a product view is a bit simpler than a slide-deck
 
The only issue I can see with reveal is that it is a single direction scroll. I need more of a multi direction so forward and back
It is the style I need but perhaps not the right tool for the job
What sliders do you use?
I just need something animated with touch support - perhaps building my own isn't the best idea?
 
8:26 AM
@JustSteveKing It goes both ways, and up/down for that matter, lab.hakim.se/reveal-js/#/2
 
@ivarni I guess I should have a play?
 
morning
 
@JustSteveKing I've only used reveal.js for presentations and talks, I am not sure it supports touch but I know that it can be made to support camera gestures. It's not something you'll be able to use out of the box for a product view though
 
It is something I may have to work on
 
When you were talking about slides earlier I assumed a different context :)
 
8:28 AM
I think my best bet would be a content slider?
 
Yes, probably.
 
Do you know of any good ones? I tried searching but there seems to be alot of content sliders out there!
 
*a lot
 
@JanDvorak Not really
 
@JustSteveKing I just googled and found jssor.com/demos/full-width-slider.html but I've never used one so I wouldn't know
 
8:30 AM
alots don't have content sliders
 
cloneNode doesn't care how large things are.
And knowing the offsets for all slides in advance is pretty simple.
 
@MadaraUchiha sure, but you should care how many things you need to clone and when to warp
 
@JanDvorak Just the first and the last.
 
@MadaraUchiha Not if they're smaller than the slider
 
@ivarni Thanks for your help :)
 
8:32 AM
Guys i have a question about jqgrid , can any of you help ?
 
@MadaraUchiha My situation (past): A strip of advertisings, that should scroll by one ad per timeout, plus up/down arrows. Ads can be of different heights, and the strip should span the vertical space below the menu up to the end of the content. Unless it's possible to fit all ads into the strip, then it won't scroll at all.
!!welcome joseph
 
@joseph 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 sorry, 'll just ask then
:)
 
Sir when i return time using the time func. Of js i get hrs., mins, secs. But how to determine am/pm?
 
I'm not a sir
 
8:40 AM
I am putting in place a server side paging using jqgrid, most examples on the net have the query that queries the database hard coded directly in the remote file , for example url:'server.php' , in server.php file . My problem is that i want my query to be customized. My question is , what is the best way to send the query as a parameter to the remote php file on the server ? and does jqgrid have options for that ?
 
!!mdn date
 
@JanDvorak
OK no problem can't you answer
@JanDvorak ?????
 
@RaviPrakash Date is in 24-hour format...
 
@JanDvorak
How to write it as am or pm? Please!
 
8:46 AM
it's in 24 hour format, come on
what's the difference between 24hour format and am/pm ?
 
@RaviPrakash hint: a range check will do
 
@GNi33
24 hr format: 13:00
12 he format: 1 pm
 
if(h>12) h-=12;
 
exactly
^ that's the gist, yeah
 
@JanDvorak
Expert, give an example plz!
 
8:49 AM
@RaviPrakash Please make an attempt first
 
@RaviPrakash the code just got posted, it's not much more than that
 
@JanDvorak
OK. :)
Have you visited India
 
AM/PM is weird. 0:00 is 12:00 AM, 1:00 is 1:00 AM, 12:00 is 12:00 PM and 13:00 is 1:00 PM
@RaviPrakash nope.
 
@JanDvorak

I m from India . and u?
 
I'm not. Also, please don't use txtspk
 
8:52 AM
@RaviPrakash just for the record, how old are you?
 
pedo alert
 
@GNi33
13 year old
 
@Neoares seriously?
 
JK
 
not that funny
 
8:54 AM
:'(
 
@GNi33 I m 13, and u?
 
I'm old, twice your age
I'm sure you'll figure out the AM/PM stuff if you just have a go at it
 
Oh I must be really, really old....
If 26 is old.
 
@GNi33 OK SIR!
I m very interested about JS,HTML,PHP
 
I said "no txtspk". One more "u" and I'll have to use my shoes
 
8:58 AM
kek
 
Wow. Full capital.
 
@RaviPrakash Also, I am not a sir. Also, please don't shout.
 
@JanDvorak I think I already said that to him yesterday (sigh)
 
@JanDvorak From where are you? Genius developer!
 
Oh well. Last warning from now on ahead
 
8:59 AM
!!nudge 20 GET OUTTA THERE
 
@MadaraUchiha Nudge #2 registered.
 
I am a parakeet
 
@Sheepy Well there could be some programmers :)
 
no.
 
@JanDvorak The same guy got kicked like 5 times yesterday
Don't bother
 
9:04 AM
This time it shall be because of a missing apostrophe in "I m" and because of all caps.
 
7 messages moved to bin
@JanDvorak Oh, I already kicked
 
So it was you who kicked before I did :-)
 
Nice. I was flagging it. I always spend too much time writing comments...
 
wat
 
9:06 AM
I should start bookmarking these rooms
 
I want to get a list of hotkeys and commands first...
 
same
 
@Zirak what do you mean what happened? There has never been anything there before?
 
9:08 AM
yeah?
 
It was created today. With just a "Hello World". So I wanted to know why.
 
@Zirak We talked about creating a list of canonical questions there yesterday
 
@ivarni Technically I am an Analyst. Who write too much code. If we get a baby, next year I may be Unemployed.
 
I'm planning to find time to make a pull request during the weekend
 
oh, I think I misinterpreted your question
 
@Zirak that was my suggestion as well
 
Wow, I didn't know we have FAQ in tag info!
 
yesterday, by ivarni
@SecondRikudo Would the tag wiki be a good place to have it? It's already full of links in the first place
 
@MadaraUchiha Why though? The tag description has a chance to be visited by more people. If it's just to create something for ourselves, then...that's okay I guess. But any reason?
 
@Zirak One reason I could see is that anyone can make a pull request on github but not everyone can edit a tag wiki
 
9:19 AM
@MadaraUchiha nudge GET OUTTA THERE
 
hi everyone. anyone can help me in java script array
 
@neerajkirola 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.
 
@zirak
hi everyone. anyone can help me in java script array
 
Read the message you were just sent
 
Ditto
 
9:25 AM
data available in this format:

[lat1, long1], [lat2, long2], [lat2, long2] .. so on

data required in this form:

['lat1,long1', 'lat12,long2', 'lat3,long3', 'lat4,long4', 'lat5,long5']
 
did you ever iterate over a array?
 
Anyone got any recommendations on a nice Raspberry PI case?
 
@neerajkirola [[1,2],[3,4],[5,6]].map( function(e){ return ""+e; } ); Like this?
 
@shee
@Sheepy ['lat1,long1', 'lat12,long2', 'lat3,long3', 'lat4,long4', 'lat5,long5'] like this...
 
yeah, you have your code now
 
9:37 AM
@Sheepy pfft, total noob solution
[[1,2],[3,4],[5,6]].reduce(function (ret, item) {
    if (item.length % 2 !== 4 ^ 4) {
        ret.push(item);
    };
    return ret;
}, []).filter(function (item) {
    return (item % 4 >>> 12) !== 'undefined';
}).map(function (item) {
    return item.slice().reduce(function (ret, cord) {
        return ret + ',' + cord;
    });
});
This is pro code
The more reduce the better
 
there is my code var locdest = [];
for (var i=0; i < driverlocationresult.length; i++) {
locdest.push(driverlocationresult[i].location.join(',') );

}
 
@Zirak \(。✪‿✪。)/ You are a Hero!
 
@neerajkirola Looks like you solved it then
 
Yeah, looks like same with my code.
Except the .location part.
 
i am able to create array but i need blank space before each element of array
 
9:41 AM
@neerajkirola Now I am lost. Nevermind, it seems you can handle it.
 
i cant that's why i m asking
i cant wrap my head around the issue
 
I was kicked out.
 
Because you spoke like a child younger child than you claim to be
 
I am a parakeet
 
@neerajkirola Well, I didn't see a space in your example output. Can you give a real example?
 
9:47 AM
@JanDvorak Sorry ;)

I have a question :
I want to auto-post a html form every 5 seconds using setInterval()
 
@sheepy ['23.4343,77.432342', '24.4343,78.432342', '22.4343,67.432342', '25.4343,68.432342', '33.4343,79.499342']
 
@RaviPrakash You don't
 
@neerajkirola And the space is at...?
 
['23.4343,77.432342', '24.4343,78.432342', '22.4343,67.432342', '25.4343,68.432342', '33.4343,79.499342'] @Sheepy
 
> Email bugs to <scrot_sucks@linuxbrit.co.uk>
 
9:48 AM
@JanDvorak Means..? Why?
 
From scrot --help. teehee.
 
['23.4343,77.432342', '24.4343,78.432342', '22.4343,67.432342', '25.4343,68.432342', '33.4343,79.499342']
i created space but some formatting issue on stackover flow
chat
@Sheepy
 
@RaviPrakash You definitely don't want to submit it. Sending it through AJAX as a backup for client failures might be useful but 5 seconds is very short
 
@JanDvorak Aaha! Nice idea
 
@neerajkirola Hmm, can you use an underscore instead?
 
9:51 AM
@RaviPrakash It's not. What kind of data is it that needs to be protected against tab closures?
 
Today I just started working for the first time on console of chrome browser with some java script code. coming from python background, Is javascript memory model same working on console? i mean python memory model is dictionaries of dictionaries.
 
@JanDvorak
What is "tab closures "?
 
@RaviPrakash such as when you press CTRL+F4
!!afk food
 
@overexchange JS is hopeless in term of memory. Each JS reference and function may be duplicated many times in name of speed.
 
9:55 AM
@JanDvorak I'll try(i am not at computer now).

My important Q:

How to monitor position like Google maps, using HTML5 GEO Location, more accurately, using watchPosition
 
When I say >>> a = 6 in python a refers to an object of type int what about JS? is every thing an object in JS?
 
And actual memory presentation of an object can change, in real time. Not surprising, when an object's inheritance chain can be changed in real time.
@overexchange When you do that in JS, JS cast that thing to int32. Otherwise, numbers are numbers, there is no int or short or double.
 
How to monitor position like Google maps, using HTML5 GEO Location, more accurately, using watchPosition
 
In python, a = lambda y: y*y*y - x here a refers to an object of class function what about func f(){} in JS?
 
By the way, beware that the browser may use int64 or uint64, however all bitwise is limited to 32 bit because of spec.
 
10:00 AM
ok
 
@overexchange

Ok
 
Also be careful around fractions, 0.1 + 0.2 != 0.3 because floating point
 
@overexchange There is no class in JS. Everything is object. function f(){} is a function object that inherits the Function object.
@ivarni I think that happens to most languages?
 
@Sheepy If they use floats, yes
 
I heard of ceating objects by instantiating a class or type. How does object come into existence without instantiation? Because class gives you a type abstraction can have some properties and behaviour.
am talking about java class
 
10:05 AM
@Sheepy no i need only space
 
@neerajkirola We only need you to show where the spaces should be, because I am uncertain where you need them.
@overexchange Java is very different from JS. Java is typed. Java has int. Java has class and has immutable hierarchy.
 
@overexchange Java isn't javascript. And an object is simply some blob in memory, it's a thing we can manipulate, it doesn't have to come from some abstract crap
Google a bit for prototypical inheritance
 
['23.4343,77.432342',<> '24.4343,78.432342',<> '22.4343,67.432342', <>'25.4343,68.432342', <>'33.4343,79.499342'] @Sheepy i need space here <>
 
yes I am listening to proto inherit right now
 
@overexchange In JS, you create new object in many ways. For example {} creates a new object. Object.create(parent) creates an object with parent as the prototype.
@neerajkirola Uh, you mean you want the whole thing as a string, instead of as an array?
 
10:08 AM
@neerajkirola That's just the representation of the array in the console or whatever, it doesn't matter...
 
!!> Infinity === Infinity -1;
 
@jAndy true
 
css also follows proto typical inheritance in nested html elements
 
@overexchange Yes! You can say that!
 
no i need this data as array @Sheepy
 
10:10 AM
@neerajkirola Then as Zirak said, the space is just display format, not actual array data.
 
In python,It is runtime that decides which object is bound to which type like func = lambda y: y*y - x binds with type function
 
And if you want to apply a formatting, you get a string, not an array.
 
JS also be ing a dynamic language should also have type system(hierarchy) known by runtime
atleast in python this is the type hierarchy
 
ok. thanks @Sheepy @Zirak
 
@overexchange JavaScript: (function(){}).__proto__ === Function.prototype
 
10:14 AM
5
Q: Xenophobic email sent by a senior colleague. What's an appropriate reaction?

Provolone DolceA friend of mine has been written off sick and her absence has prompted a senior colleague (not her boss, but someone significantly more senior than she is) to send her the following very bizarre email to express his displeasure. My friend is Spanish and her national origin is used in a very dir...

Wow, what an assbag.
 
@overexchange Search js object hierarchy and you'll see something like this.
Wait, no, those are windows object hierarchy...
 
@Sheepy oh prototype is synonym of blueprint or class that talks about properties+behaviour
 
@BenFortune kek, I'm spanish and that's so offensive
 
@overexchange It's close. But there is a few differents. When a JS object inherits, it doesn't copy from the prototype. So if the prototype has an array field, every children must reassign the field otherwise they all share the same array. And most languages does not allow changing blueprint.
(Because of early attempts to mimic class based languages, it can be a messy graph...)
 
10:22 AM
I will get my required intro of java script from [link1] (youtube.com/view_play_list?p=92D70E98B0336AB2 ) and link2
But am looking for some course that built some good application amidst a course.
later I can plan to build my own app using JS
 
I don't know. I start with w3school, many years ago (when it was at it worse, seriously.) Then it is all Google.
 
stackoverflow > w3shcool
 
THE
10:46 AM
why is my overflow not working on my tbody here ? jsfiddle.net/wxdgf4pr
it works on #fruitcratebody but not on tbody
 
hello everyone
could someone take a look on this link?stackoverflow.com/questions/29795153/…
i know it has to do with kendo ui components...but i think the problem is not completly related with that
i´m really stuck
because i don´t understand the problem, i need someone to teach me
 
11:01 AM
_.find(content,{fieldLabel:_defaultLabel,'operators') returns the entire object in the content array instead of just returning the operators property on it
I have [{fieldLabel,operator},...],I pass this through the above operation,should I get operators only?
 
@vamsiampolu That's not how I read underscorejs.org/#find
 
Im using the lodash shorthand method
 
@vamsiampolu It's basically the same as underscore: lodash.com/docs#find
oh wait no
 
@vamsiampolu Nope. Look at the examples again.
find returns the matching object, the examples pass it through result to get the property itself
 
just changed the code
 
11:11 AM
I've read the doc for lodash find 4 times now and I still don't understand what they're trying to tell me about property name and the predicate
 
I think they are documenting advanced usage,I dont understand it completely myself but they seem to have a _.matchesProperty to check if an object in an array has certain properties with the given values
they get the result of the find and pass it through _.result and get the property required
 
on mousesover i want to display the menu here is the code
 
I got it the otherway around,these things generate the find/filter comparision function that we usually create
_.matchesProperty(path,value) takes a string(or an Array,this is not clear to me yet) and creates a function that compares it to see if it is equal to the value
 
thank you @BenFortune
thats a timely help @BenFortune
 
11:27 AM
Something like ((path,value) => {obj => obj[path] == value;}) for _.matchesProperty(too lazy to write the whole thing out)
 
11:44 AM
ugh Avengers. So good.
 
omg y no spoiler alert
 
@BenFortune i want to display that dropdown when i hover on an 50X 50 image , can you help me ?
 
I want to discover it's good myself
 
you can't spoil an opinion.
 
you, sir, have ruined my life
 
11:51 AM
finally
 
I especially liked the part where all the umbrellas were on fire and the elephants became scared
 
that was the best bit
 
12:06 PM
i want to display a dropdown div content when i hover on an 50X 50 image , can anyone help me
here is the code
 
12:37 PM
@Loktar Wow, really? I didn't know I joined chat that early!
I joined on 28 Oct 2010
Didn't speak for quite a while, though
 
so you're 4 now?
I think most people didn't speak for quite some time after they "joined"
 
Haha I guess so
 
euggh, forgot my coffee for a hour, now it's cold
 
@SomeKittens Thought about it, realised I wouldn't have a decent way to distribute it (firebase only covers up to 100mb, don't know of anything substantially better)
@KendallFrey Me me me, I started arguing with people the second I joined chat
 
THE
:|
 
12:40 PM
Hi
 
THE
comn name best table js plugin !! you got 1 minute
 
I think the first person I ever spoke to in chat was @RyanKinal
Or maybe Incognito
 
@Zirak he said people
 
@Mosho I'm Soylent!
 
Ooh, I forgot to link you to that AI generating puns thing, @Zirak!
 
THE
12:43 PM
well ignore me and talk about aliens then ??
 
Yes you did forget
 
@THE soylent isn't aliens
it's people
 
I'm reading Kim Binsted's thesis from decades ago, and it's blowing my mind. Generating puns is such a great topic http://www2.hawaii.edu/~binsted/papers/BinstedRitchieAAAI1994.pdf
 
@SomeGuy That looks neat! Do you know of any current implementations?
 
THE
Please tell me am mad
 
user2620028
12:48 PM
No. Actually I am mad.
 
you're mad?
 
user2620028
Yes. I am.
 
@Zirak Nope. I haven't looked too hard yet, though
 
Aug 5 '11 at 12:20, by The Awesome One
Anyone here know how long an AJAX request could hold on for?
 
Aug 4 '11 at 14:46, by The Awesome One
Does anyone on here use JavaScript to solve Project Euler's problems?
 
12:49 PM
How did I forget you went by "The Awesome One"?
 
I guess he wasn't the first after all :p
Shhhhh
 
user2620028
I did used to try project eueler questions in js :D
 
I'm mad, help
pls
 
@NickDugger No, HatterIsMad is mad
 
no u
 
12:51 PM
@HatterisMad I was wondering because everyone on the website seemed to be using C or C++
And I'd constantly run into floating point errors
 
5 hours ago, by Second Rikudo
 
C/C++ have floating point errors, too. They also use IEEE-754
 
So that leaves Java as the master race with BigDecimal and BigInteger :)
 
Right, but I was looking for a way to get accurate calculations in JS, not C/C++
 
Yes. The only four languages in the universe are C, C++, Java and JavaScript.
 
12:54 PM
you forgot Javanese
 
chavanese
 
Sometimes it seems that everything else compiles to either Java ByteCode or transpiles to Javascript :p
 
@Mosho It's pronounced "Tentacle porn"
 
@ivarni you forget CIL
 
12:57 PM
in PHP, May 3 '11 at 16:04, by Zirak
@Neal - Most generic way is to echo memorable stuff out during operations (e.g. in if statements), like "The Ninja infiltrated the base" after a write check.
 
For the record: I was not being serious
 
How embarrassing, I forgot I was in the php room for a long time before I hit js
 
Speaking of floating point errors, is using github.com/MikeMcl/bignumber.js still a good way around them?
 
you need to fix your code if floating-point errors are a problem
 

« first day (1649 days earlier)      last day (3301 days later) »