« first day (669 days earlier)      last day (4279 days later) » 

12:04 AM
Hi, I have no question today because i didn't work today
 
12:20 AM
 
Hey all. I'm desperately trying to find a swipe menu implentation (like path, sparrow) that reveals a navigation underneath the content. Does anyone know of any good examples?
I saw a couple of days ago that was perfect, but for the life of me I can't find it again!
 
 
2 hours later…
1:55 AM
A Meatloaf Public service announcement
ohh he is so getting added to the meme list.
 
2:24 AM
anyone home?
 
@hanleyhansen me
 
yay!
i need help =/
@Nile have you ever used highcharts?
 
@hanleyhansen No i have not.
 
Ok so i am trying to replicate a web service. This is the web service:
http://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json
And this is what I got:
http://vndm.rtdsllc.com:8086/rtds/webservice.php
This is where I am trying to use it:
http://vndm.rtdsllc.com:8086/rtds/examples/stocks/examples/basic-line.htm
 
@hanleyhansen word o/
 
2:28 AM
I am getting an error on line 415 of the js file. Line 415 is this:
'a': langWeekdays[day].substr(0, 3), // Short weekday, like 'Mon'
 
what's the error?
 
Error is this:
Uncaught TypeError: Cannot call method 'substr' of undefined
 
@hanleyhansen it's substring, not substr
 
ahh the php mess to js conundrum
 
@rlemon yeah =/
 
2:29 AM
however the error here is undefined
 
@Nile jquery
 
langWeekdays[day] is undefined
 
@hanleyhansen what about it? I dont think jQ has a custom substring function?
 
47 secs ago, by rlemon
langWeekdays[day] is undefined
this is the root of the problem methinks
i could call any function on that object and it would still say the same thing iirc
 
but my webservice is returning the same crap there's is!
 
2:31 AM
well that is what the error says :P
sorry
programming is fun aint it?
 
anyways, i have to go.
 
@rlemon i know you can help me figure this out!
 
Tim
I am new to javascript. If I am trying to declare an object literal that contains another object what is the syntax that I need to use? Something like this:
var prop = {thing: 1, style:{styleThing:2}}; Or am I way off?
 
@hanleyhansen with the power of google behind me... github.com/highslide-software/highcharts.com/issues/557
 
Tim
or is this even possible? would I need to instead declare the style object first?
 
2:35 AM
@rlemon i'm already including their exporting file
 
> renderTo : '#container'
try this
 
may i ask a quetion here?
 
yes
 
var prop= {'thing':1, 'style':{'styleThing':2}}; give a try
 
Tim
Thanks jjpd
 
2:37 AM
i dont want to detract from someone elses question tho. its to do with jquery. i am locked out of asking questions thats why ive come here
 
well ask, if it's stupid question i'll just ignore it and move on
@hanleyhansen hrmm. this sounds like a main site Q
sorry
I am reading the docs and it looks like you are doing it right.
 
well i cant get some code to work. im trying to set the id attributes of td elements :


$("td").each(function(index){

this.attr('id', index);
// console.log($(this).attr("id"));

});
 
@rlemon what are you reading? link me.
 
@hanleyhansen ur console.log( langWeekdays[day]) gives correct value?
 
@jjpd that is in the script itself.
 
2:40 AM
@jjpd ^^ what he said
 
@jskye well... first you need to google the difference between a attribute and a property
$("td").each(function(index){
// 'this' refers to a HTML "Element" and not a jQuery object...
this.id = index;
// or
// if you want to do this with jQuery (which is overkill... learn js)
// $(this).prop('id', index);
});

Learn Javascript Videos

Apr 27 at 15:10, 1 minute total – 7 messages, 1 user, 0 stars

Bookmarked Apr 27 at 15:13 by rlemon

 
ok thanks. i will
 
hope this helps :)
 
thanks rlemon
 
@jskye always remember, jQuery is a tool for helping you develop JavaScript rapidly (call it a RAD rool .. Rapid Application Development) - however you do need to learn proper Javascript prior to using one of it's toolkits. This is just a suggestion. spending a week watching these vids, and reading articles will not make you a master, but will aid in your efforts for web development.
@jskye and if you ever get bored... rlemon.github.com/lememe (does not work in ie ;P )
 
2:48 AM
thanks for your help. i will definately go backover javascript now. and give your meme thing a go too :)
is the hulk of you btw?
 
ugghhhhh
 
?
Java?
 
@ErikReppen care to give my problem a go?
 
Sure, what's wrong?
@hanleyhansen Unless it's Java. In that case, no.
 
Ok so i am trying to replicate a web service. This is the web service:
http://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json
And this is what I got:
http://vndm.rtdsllc.com:8086/rtds/webservice.php
This is where I am trying to use it:
http://vndm.rtdsllc.com:8086/rtds/examples/stocks/examples/basic-line.htm
@ErikReppen not java lol
i'm trying to use highcharts @ErikReppen but i'm getting an error on line 415.
 
3:05 AM
Okay, so there's nothing in that object. It's supposed to be day of the week?
 
@ErikReppen i'm feeding them the timestamp you see in my webservice. highcharts is taking that timestamp and converting it into a date object. after they do the conversion they try to find the day of the week and that error is being returned. Yet when i use their web service instead of mine it all works fine. But if you compare the outputs of the web services they are giving the same timestamp.
 
@hanleyhansen are you sure you're putting strings in those properties? new Date(1124064000000) for instance, doesn't return a string.
But it logs like one.
 
i'm not doing anything. Their code is. I'm just passing in the timestamp.
 
jquery.com is not opening on my system
 
@jjpd Site's not down.
Are you passing the timestamp as a string or number?
 
3:12 AM
@ErikReppen technically all i'm doing is returning it from the web service. in the web service it is a php string but then it get's json_encoded before it gets sent down the wire.
 
Okay, so what call should I look for the JSON in?
NM. Probably the only one on the page.
@hanleyhansen This doesn't look right: "callback([[1123804800000,46.1], <br \/>[1124064000000,47.68], <br \/>[1124150400000,46.25],
 
@ErikReppen I was just testing stuff. Try it now. Do i need to have the callback in there?
 
Is it supposed to get executed as JavaScript? Something in your PHP is converting line breaks to BRs.
line-break HTML is still dropping in.
 
@ErikReppen how should i line break in php for it to work?
check it no
 
If it's supposed to be an array, it should look like this:

[[1123804800000,46.1], [1124064000000,47.68], [1124150400000,46.25],..
There's no enclosing array brackets. And you've got a trailing comma now.
It's an array of 2-element arrays: [ [ 'element1', 'element2' ] , [ 'element1', 'element2' ] ] <-- like that
@hanleyhansen Is there an API doc somewhere for what you're supposed to pass in?
 
3:26 AM
@ErikReppen i'm trying to fix this trailing comma.
 
What are the members of an object? I'm assuming Properties and Methods?
 
It comes in as a string so JS could fix it pretty easily.
 
@ErikReppen i got the comma working. but still nothing. =(
 
@W3Geek Yeah, we tend to call everything properties in JS with methods explicitly meaning properties that are functions.
 
@ErikReppen but now i'm not even getting a JS error
 
3:34 AM
Huh? I've never heard of a property called a functions in Object before? Properties are like variables and methods are like functions.
 
@hanleyhansen Now it's a string. Do you control anything on the front end? You would want to use JSON.parse(jsonData) to convert it to an array.
 
@ErikReppen no i don't touch anything on the front end.
@ErikReppen got it!
i don't need to use the php function json_encode(). working fine now. check it out:
http://vndm.rtdsllc.com:8086/rtds/examples/stocks/examples/basic-line.htm
 
can you serve as JSON or something?
There you go.
 
@ErikReppen Thanks for all your help! You're the man!
 
@hanleyhansen No prob. You can see the request action easily in Chrome dev tools.
 
3:40 AM
@ErikReppen how so?
 
network and then XHR tab for ajax requests.
 
sweet! that really helps!! thanks!
 
[wrench icon]/developer tools/network-tab/XHR <tab at bottom>
 
question
let's say i wanted it to update dynamically do i need to do a setinterval()?
 
Not sure how it handles redraws but if you could just keep dropping those args back in then yes, setInterval would be the ticket.
 
3:43 AM
i want to make it so if the database changes the chart gets updated. make sense?
is set interval my only option?
i don't wanna keep trying and trying if the data hasn't changed. how can i make it so ajax knows when to pull data again? i only wanna redraw when the data has changed.
 
Well you can poll from the client-side but I know there's push-notification techniques for getting the client to react to messenging from the server. Not sure how that's implemented though.
 
any idea what it's called? that would be my next goal with this little project.
 
Comet is one approach:
http://en.wikipedia.org/wiki/Comet_(programming)
 
interesting. thanks! you've been a life saver tonight. really appreciate it. guess i'll be reading up on ajax push next and trying to get that to work.
 
Yeah, I've been meaning to look into it too. Polling feels kind of clumsy.
 
3:52 AM
agreed. i'll see what i can find. i'm done for the night though. thanks again. good night.
 
@IvoWetzel latency compensation in javascript, any recommended libraries?
@Loktar ;_;
 
4:08 AM
@hanleyhansen You need to implement server side events
@hanleyhansen : Look at this article: dsheiko.com/weblog/html5-and-server-sent-events
 
err how is this question any kind of valid stackoverflow.com/q/11963922/995876
 
@Esailija its not :/
 
 
1 hour later…
5:18 AM
and a morning starts
with this
 
0
Q: Two different registraton forms for buddypress

TomasI have to different user types on my buddypress site, athletes and coaches. Is their any way to have two different registration forms on buddypress? The ultimate solution would be to have a dropdown menu and when the user chooses their selection relevant to them (for example athlete) the xprofil...

 
5:33 AM
0
Q: Best Javascript animation Library

user5507I am thinking a creating some web based animations for my Computer Science Course. I think of using JavaScript. Which is the best library available to create animations. I need a library which is easy to use and get best results. In your opinion whether there are any other methods (technologies,...

 
5:56 AM
I am going to miss u people !!
nawwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
 
hi
 
@Karan hello
 
@Abhishek can u help me on javascript question
 
@Karan yes
 
@Abhishek how to disable jquery $ variable in declaring jqueyr
jquery*
 
6:04 AM
jQuery.noConflict();
 
Thanks man
have u try JavaScript for games...?
 
6:39 AM
yeah
made a raycaster
then realised i am jus too noob in JS
 
2
Q: I want to create a new language

AzderI want to create a new general purpose language that will compile to JavaScript and I'd like to be able to write it in that same JavaScript. I wouldn't go much into detail about why, but how can I do it. Currently I have professionaly coded in JS, Java, Groovy, PL/SQL, PHP among the rest, so I'm...

 
@Abhishek hi
 
@AamirKhan hello , happy independence day
 
@Abhishek same to u
:)
@Abhishek i am creating check boxes dynamically like This
all check boxes comes horizontally i need to have new line after every check boxes
 
7:08 AM
and ?
 
need to have new line
handler.appendChild(myCheckBoxUnchecked+'<br/>');
this is not working
 
7:41 AM
i have a question which really worth posting, but after digging around stackoverflow, google and bing i still could not find an answer for it, though there is must discussion about it.
i wish to discover which action is taken upon clicking an html element.
i know that the element is bound to some sort of javasript, but i cannot figure to which function it is bound.
i have tried to get the onclick attribute of the element, but it is null
 
Hello everyone
 
hello
 
 
1 hour later…
9:02 AM
@* i am going to miss yall tomorrow
and later today , see you all :-)
bbl
 
9:29 AM
Does anyone in here have some serious experience with AJAX? I'm after some advice at the moment, rather than actual code...
 
9:52 AM
Go ahead and ask your question, Dan.
 
Well, fuck. I overslept. ...how?
 
ok cool...
I'm being tasked with making a WordPress site, but for various reasons it needs to be a one page style site...the thing is, it's going to have three posts types, like mini blogs. I need to be able to load a set amount of posts to begin with (say 5 of each) and then call additional posts when the user wants them...
I'm wondering how easy this will be with AJAX and what args I could pass, like a category or to order posts by date. Then I'm wondering what happens to the "old" posts - can I get rid of them somehow?
 
10:08 AM
Okay so in regards to how easy it will be, that's totally up to you. Start here: codex.wordpress.org/…
Basically, you will want to build a file (controller) that the view (html, css, and javascript) will make requests to using AJAX, right?
 
yep, sounds right.
But I will need to keep loading posts, and I can't have a huge page as a result.
 
Well you'll need to have some pretty solid js on the front-end managing assets
 
Would I just "hide" previous posts or can I use AJAX to actual get rid of them?
 
When you load a post, add the element into a limited-size buffer. When you see the buffer is full, delete the oldest one.
How does xhr have something to do with DOM manipulation?
 
you can remove the old posts with javascript. It can be as easy as $('.post:gt(10)').remove() with jQuery
 
10:13 AM
Or, instead or constantly running useless selectors, use an appropriate data-structure, so that you can also do smarter manipulation.
 
ah, this sounds good. Sadly I don't get to spend much time with jQuery so I don't know this. I'm usually writing CSS or PHP.
 
AJAX = Asynchronous JavaScript and XML, which is actually something called XHR - XMLHttpRequest, which is a simple...http request.
 
Yep, I've done a bit of it. I'm following a little tutorial as we speak, just to refresh myself.
I wasn't aware I could get rid of the older posts though. I need some way to manage the content or it will be a total failure....
Shall I read up on remove()? And the buffer...what am I looking for?
 
one sec, I'll mock up an example
 
@Zirak if speed is not an issue, I just stick to whatever is more readable, which is by "useless selectors". I don't even cache $(this) (which I could).
 
10:16 AM
living on the wild side
 
haha : )
 
(1)First thing coming to mind !== readable. Buffers are used everywhere. (2)What does caching this, which isn't even in the example, have to do with it?
 
Some of the posts will have several images so loading times may be relevant, but not hugely? Staying on the same page is still going to be fairly quick I imagine..?
 
Dan, before you even start coding I think you should spend some time planning...
Do you know exactly what feeds you will be making?
 
@Zirak caching $(this) is a speed optimisation. I assume that "not running useless selectors" is a speed optimisation.
 
10:18 AM
And it's not just about deletion. Manipulation is also important. Look a bit into the future, and a way to grab and manipulate this item or that element, without reliance on jquery, is a good thing.
 
@Dan Not to say you aren't planning right now.
 
Yeah...caching this is an optimization. So is caching the result of a db query. But what does that have to do with your example?
 
Yes, I've got my planned content. That's why I'm pretty concerned.
 
Okay so how about looking at the project at the small scale if you have a big plan
so start with one feed
 
All this is because the client wants to run music across the site, so we cannot change pages...and I don't even want to try and connect WP to flash... : \
The feeds vary in complexity. The easiest one displays one post at a time. The user will click "next" and the next post will load..perhaps in a slider or something.
 
10:21 AM
@Zirak it just shows that I don't really care about speed.
 
so yeah I would actually mock up exactly what it will do
if it has a slider, you should plan on it, or else it's hard to approach the problem
 
I'm not talking about speed!
I'm talking about using proper data-structures, instead of what appears to be the the default position of "let's use hashes and arrays for EVERYTHING"
 
Well, yes. It will be in a slider. There will be a gallery showing 4 posts at a time. and lastly a blog, with 1 - 4 posts per month. This will be the hardest because it will need to display the archives too.
 
hei hei hei.. chat creatures :D
 
These are three custom post types, for those of you that use WP
I'm less concerned about how I'll display this though, rather how I'll get the content...
 
10:24 AM
are you familiar with the $.ajax() or $post() methods
 
Basically, no. Hence my panic. I've used jQuery for animations and making stuff more or whatever, but not for getting content.
Would you mind checking the principals of this tutorial I'm using? wp.tutsplus.com/tutorials/…
 
Okay yeah they do cover one way of going about this. Without testing it, I assume it works.
 
Are you familiar with sql?
 
When the buffer's full, you can remove the oldest item, which will be limited_buffer[0]
 
10:30 AM
@Zirak I'm just having a good, hard look at it..
@MatthewBlancarte My SQL is ok, I can structure a query so I can pull the posts I want.
 
okay so you should just start with that
 
@Zirak I agree that's a valid concern, but using arrays for deques (shift/pop or push/unshift) works fine as long as performance is not an issue. In this case, I decided to not use a backing array as it was not necessary.
 
guys I'm sorry to barge in like this, but I've been banging my head to the wall for quite a while now, I'm creating a Javascript component that mimics something like this eniram.fi/files/eniram/Products/DTA_main_screen.png
the thing on the right
I'm trying to find if someone did something like that so I can learn
now the only thing I need
is the name of such thing
 
@JanDvorak Do I have to punch you with it to make you understand? A buffer is the better structure for this intention. THIS DOES NOT DO WITH PERFORMANCE.
 
I just can't find the correct keyword so search for
 
10:33 AM
@MatthewBlancarte In that tutorial he pulls in the WP functions so he can use standard queries, is that not possible? Either way this won't matter, I can work out that code myself.
 
English isn't my native language
the best I can come up with is "scrolling gauge"
 
@Adnan terve!
 
@Olli, moro!
 
If you are famliar with jquery and js, then picking up the $.ajax method should take you no time
 
@Dan Here's an example: jsfiddle.net/nAHb8
 
10:36 AM
and if you can build one or more controllers to handle the requests being made by that method, then you can integrate your dom elements to interact with the buffer patter @zirak provided you
 
And if you want to know the underlying magic, I wrote a short tutorial about it: gist.github.com/3086939
 
@Zirak I'll read it. I see you've mastered the English language :P
@Zirak And this is cool - thank you to taking the time to write this for me.
 
Yeah. I was pissed when I wrote it. And np, I <3 data-structures.
 
@MatthewBlancarte ok cool, I'll check out that page on the tuts site too. Looks like this is possible!
@Zirak Do you work for someone...?
 
any one have worked on Phonegap
 
10:40 AM
yup, I have
 
Jesus, my Lord and Saviour. With His holy hand, I can smite all those who oppose me, AND WATCH THEM BURN AND DIE! MUAHAHAHAHA
 
but only briefly, to do a quick Android app
 
I clean his underwear every morning.
 
@Zirak (facepalm) I guess I was wondering if you'd be for hire if this project goes downhill...
 
A flattering thought, but no thanks. Only when rain is made of fire will I voluntarily work with WP
 
10:44 AM
adele did set fire to the rain, so now you will voluntarily work with WP.
3
 
Like ^
Anyway, I wasn't talking about doing anything for "free" lol
 
@Adnan any idea on how to integrate StatusBarNotification in phonegap ?
 
Anyway, never mind. Thank you for taking the time to write to me. I hope I can work my way through it. I wonder if I can understand it in about a month...
 
Voluntarily === done by free (as in speech) choice. Also, setting fire to something !== being made by fire. I can burn wood, that doesn't mean wood is made out of fire.
 
10:47 AM
@Zirak you can always develop your own content management system (full of data structures. They will belong there).
 
Too much time, too few fucks given.
4
 
@Adnan i have tried that but not getting last part Usage part and do i need to add plugin in xml in plugin file am i right? how can i use it in index.html
 
@Zirak ......
could someone help me with CSS image scaling issue
 
str = str.match( /\(([^\)]+)\)/g );
what's wrong with this?
nothing
why does node.js throw an error there?
 
@Khan, sorry, not much experience there. All I did was a very simple contact modification homework app
@Olli, what's wrong?
 
10:59 AM
@Adnan it's ok thanx
 
@Adnan I would like to image automatically scale depending browser window. It should also work on mobile devices. And the image should be in aspect ratio, not too wide.
 
@Olli, let's start with the easy one
keeping the aspect ratio is simply done by modifying either the width or height, but not both
so if your image is 1000x2000
and you specify "height: 1000px;"
width will automatically be rendered as 500px
keeping the aspect ratio
I'm talking about CSS of course
 
yes, but how can I set it to automatically scale depending on window size
 
You could look into responsive web design layouts, this should be done with CSS, and perhaps media queries?
 
@FlorianMargaine What error?
 
11:03 AM
no error, I just mis copy pasted
I was just missing a / at the end of my regex
actually, it was there, but it was escaped
dunno why it ended up like this <<
 
@Olli, check this out cssgrid.net
 
@Dan If I would specify different image size for all different window sizes, it would take very much of code.
 
I've used it to avoid making a separate mobile UI for a small monitoring utility
 
@Adnan but I'm just creating intro page for a site, so it wouldnt need any complicated
I would just the image automatically scale for window size
Isn't that possible?
 
@Olli There are more efficient ways of writing it. I think you can use 100% width on an image and let the container it's in decide the size. That container can be adjusted to reflect the width of the browser window
 
11:07 AM
just set "width: 10%" for example
 
I'd go %...
 
:D
 
but that causes problems
In some screen sizes it's acceptable it to be whole window width
but in big window size it cannot be whole window size
body {
	width:100%;
	height:100%;
	margin:20px;
	font-size:12px;
}

#container {
	height:100%;
	width:100%;
	position:relative;
	display:block;
}

#container img {
	width:80%;
}
I have that kind of code
what I should change there
 
@Olli still on this eh? still wont hard code the dimensions in pixels?
 
Have you tried setting a maximum size? I think you need to set the container div to a max-width otherwise the image could get way to big
 
11:12 AM
@Olli, there's no "magical solution"
 
@Dan That was quite good tip! I tried and it works very fine
 
@Olli, is this what you're looking for? jsfiddle.net/zq24F
try to resize the window
 
@Adnan As Dan suggested, I think it is better to set container div to 90% as its width
then it works correclty
at least on my compuiter
 
did you check the fiddle?
 
yes I checked, why would I then said so
 
11:18 AM
well good luck then, I think Dan's suggestion is the best in your case then
 
is it possible to adjust how long is space betewen the text and line in html A tag
?
if thats too hard question, heres another one: why this wont' work? .first, .second, .third, a{
color:black;
position:static;
}
a element color won't change to black
 
Hi, who can answer at this ? stackoverflow.com/questions/11968433/… :)
 
already got the a problem work, but the first problem still wont know slution
 
@Olli That can fix some weird issues on the iPad too. Without min width I've found full width style layouts can render quote badly. I'm not exactly a fan of the iPad though..
 
@Dan You mean max-width instead of min-width?
 
11:31 AM
@Olli, are you talking about the underline when you hover over the link?
 
no, for the iPad I meant min-width
Like a 100% width div with background image, and then a 960px wide div inside. Sometimes the outer one won't fill the browser window properly.
 
@Adnan no, the underline appears as default in links. And IE shows the "j" letter quite not very good way, so I would like to give some space between the line and the letters
 
It's been a while though..
 
@Dan , ok but you told me to use max-width
 
I see this chat room has turned into CSS now haha
 
11:32 AM
what min-width I should use then
 
@Olli Yes, but I'm talking about something different, sorry to confuse you.
 
@Olli, which line?
 
I suggest you read up on the CSS rules and responsive layouts. I'm just doing it myself. For my current project I'm going to try and code responsive rather than fixed 980px or something..
 
Actually it's underline
@Dan ok... but I just tried the page with my 9.7" Android tablet and it displayed perfectly there. Even css3 rounded corners etc :)
 
@Olli, :|
 
11:34 AM
just hate Windows IE
@Adnan I mean the underline what comes below the link text?
it comes automatically even if you do not hover your mouse
 
@Olli, you don't have much control over that. You can, however, add a custom border
text-decoration:none;
then
bottom-border: black solid 1px;
finally add the padding that you want
padding-bottom: 4px;
 
ok...
Does overflow-hidden have good browser compatibility
 
@Olli, this chat isn't your Google box
4
 
ok
 

« first day (669 days earlier)      last day (4279 days later) »