« first day (587 days earlier)      last day (4360 days later) » 

1:00 PM
what do you mean constrain?
ooohhhh i think i understand.
ok so you forget everything you've done.
check rotation (clock or counter clock) from angle vs previous angle (on mouse move)
then add and remove values on steps.
 
you guys know any good webased irc client?
 
Make your own ! or use freenode
 
1:29 PM
why does HTML5 canvas starts to lag after sometime on iOS ?
 
hi guys
i have json like below
{
"selected_stores": {
"row_0": "123"
}
}
i want to add one more element into json
like below
{
"selected_stores": {
"row_0": "123",
"row_1": "145"
}
}
i tried
selected_stores_jsonObj.selected_stores.push(selected_row_data)
selected_stores_jsonObj.selected_stores[0].push(selected_row_data)
but not working
any help??
 
Hey all
 
@Abhishek ok so I could never grasp the concept for the angular rotations within a container.
got any tuts?
 
@gowri you are doing it wrong
 
@rlemon sorry i didnt quite understood what u said there ?
 
1:38 PM
assuming selected_stores_jsonObj.selected_stores will return {
"row_0": "123"
}
 
@alFReDNSH: Thanks for the notification. What i did wrong
 
ok so you know your scroll wheel you just made...
 
then if you want to add another key value to object, like you sida, you should be doing this:
selected_stores_jsonObj.selected_stores.row_1 = "145"
 
well imagine that in HTML not canvas.
<div class="scroll-wheel">
      <div class="handle"></div>
</div>

.scroll-wheel {
    background-color: #ccc;
    height: 128px;
    width: 128px;
    border-radius: 64px;
    position: relative;
}
.scroll-wheel .handle {
    background-color: #eee;
    height: 32px;
    width: 32px;
    border-radius: 16px;
    position: absolute;
    top: 8px;
    left: 48px;
}
so now its sitting at 12 oclock.
i want to make it function like yours.
 
i try this
 
1:41 PM
i'm sure there is a tut outlining how to do the angles and shit relative to the container.
 
@gowri also can do this: selected_stores_jsonObj.selected_stores['row_1'] = "145"
 
Oh that
well its simple mathematics
you just need to find out the center of the container.
or rotation
 
selected_stores_jsonObj['selected_stores']['row_1'] = 145;
 
then atan2(y,x);
gives you the angle
 
lol
 
1:42 PM
i will get u a tut dw
i am the worst tutor ever (x
 
@alFReDNSH: thats great !
Thank you so much
 
@rlemon got the link ?
 
i have another issue
 
yup
 
I am actually trying to re-create something i saw in Iron Man 2
 
1:46 PM
@gowri welcome man, can read about objects in here developer.mozilla.org/en/JavaScript/Reference/Global_Objects/…
@Abhishek its gotta be cool!
 
while converting json obj into string using jQuery.param
 
string like this selected_stores%5Brow_0%5D=1502%3A%3A3232&selected_stores%5Brow_2%5D=%7B%22row_2‌​%22%3A%223366%22%7D
 
youtube.com/watch?v=CDFp_qZBBgg better displayed here
 
Is there any reason that getting the width of the viewport in ems using JS would get a different result than the value given through CSS?
 
1:52 PM
how do you get it in ems
 
get the width of a div that has had its width set to 1em
 
@alFReDNSH: Thanks for helping JSON.stringify solved my problem
 
*set using CSS
 
right, you know em is relative to parent?
 
@Abhishek ok what next :P jsfiddle.net/rlemon/btguf/17
his example he just rotates the image.
I have to move it relative to the center position?
 
1:54 PM
in what way? Do I need to make the div at the top of the page or something?
 
once you have got the angle
as you are doing it with CSS just
applly the css transform rule to rotate it :-)
 
0
Q: Is there any javascript mvc framework integrating sqlite

LunatikzxIn the light of another answer i got on the marvellous website, i am now looking for a solid javascript framework with a SQLite integrated in it. Is there any Javascript framework with sqlite integrated. The app im gonna do is offline on pc and mobile. ANy other solution for a multi platform ...

 
div {
	font-size: 0.9em;
}

<div>
	<div>
		<div>
		font size is like 0.729 em here
		</div>
	</div>
</div>
in other words, em sucks and you should not use it :)
 
by the way thanks for the idea @rlemon i think i am an idiot who gave up using CSS (XD) and jumped to canvas :P
 
I'm trying to use it for responsive web design, it's still a good idea to use then, right?
It just so happens that I then to use some JS to make part of it easier to use
 
1:56 PM
?
 
use media queries then with px
 
I hear everywhere that ems are better than px, and that seems to fit so far. Other than relative sizing, what are the benefits?
 
@rlemon just wondering , do you wanna collab on this ??
cause i have no clue how to do the stuff i am doing on linux and kinda that would be good :-)
 
relative sizing is not a benefit as you saw in the example above
 
Sorry, poor wording, I mean the lack of relative sizing
so what are the benefits of px?
 
1:59 PM
that you have full control and know what you get
you can change it according to media queries as well
 
@Abhishek ok... so if I know center x/y and I know the angle... and I know the relative distance from the center point I want to move... how do I control the movement :P
I don't want to rotate anything.. the tut you show has it all done in css with rotations. I wanna do it in css with top/left positioning.
 
ems just seem easier for mobile development though, with this being the first problem I've come across, otherwise they've been great to work with.
 
Oh
 
@Esailija em was powerful like 4 years ago.. now most browsers scale px too.
 
y = Radius * Math.sin(angle);
x = Radius * Math.cos(angle);

/* these values are relative to position */
 
2:02 PM
right, dunno what problems you would have had with px
rlemon do you mean with zooming
 
yes
 
Let me do it for ya
 
sorry i missed the top half of the discussion. i may be way off. :P
 
I know what 16px is but I will have no fucking idea what xx em is
unless I actually look at the calculated px value
our designer used ems with li { font-size: 0.88em; }
guess what I needed a nested list and got bitten badly
:d
 
I don't normally deal with styling too much, so I guess I can have a crack at using px, it just seems to go against a lot of the stuff that I read
 
2:05 PM
my reaction was
wow google has expired ssl or something
it didn't show green lock on google page
here is some reading against em github.com/styleguide/css
search for pixels vs. ems
 
@rlemon there you are jsfiddle.net/darkyen/btguf/18
 
@Esailija you can see em like a reference to the 'last sized parent'
 
Sam
@Abhishek is it just me, or is the angle offset by pi / 4
 
where ?
 
I know, but the value of xx em doesn't say anything at all without context
it could be 4px, it could be 40px
 
2:09 PM
@Sam it is
 
30em could be 4px, 0.4 em could be 100px
 
Rleamon oh lord
 
fuck that
 
i didn't saw that
 
YEs but it's way more accessible
And way easier to use after a time
 
2:10 PM
px scales with zooms as well
 
o_O i dont get why is it doing so
It doesnt on what i made O_o o_O
 
It seems like fixed width sites are good candidates for px, but fluid sites are better working with ems
 
if you are using a browser that can't zoom px then yes
 
jsfiddle.net/darkyen/btguf/19 @rlemon DYK ? you dont need to have to make the <div> for display
pseudo elements do the job for you :D :D
and they do it in a very epic manner <3
 
what about "rem"
 
2:16 PM
if the font size here increses when you press ctrl+scrollwheelup, then you have a browser where em has no benefits
> All modern browsers except IE6 will now scale pages correctly, regardless of the type of CSS units used.
 
@Abhishek jsfiddle.net/rlemon/btguf/21 but my cursor is still off from the handle... the handle should be in line with the cursor angle...
 
anyway, why are you using ems in javascript
 
The current reason (although I might use it more than once) is to re-scale some aspects of a website when an iOS device changed orientation
 
French servers ? Here almost everyone is from America...
 
2:20 PM
WTF, i sign up and it makes me follow them on twitter then says "Sorry come back tomorrow ..."
 
More specifically, an embedded google map
 
SCAM!
 
And OVH...
 
@DieVarDump no, OVH's opening in montréal
 
right and why can't you use px for that
 
2:21 PM
> Désolé revenez demain...
 
I've just always read/been told that ems are better for scaling? :P
 
@rlemon i understand that and thats what i am wondering
 
So I could use px
 
why the cuff is the angle offset by PI / 4 ?
 
@FlorianMargaine OVH force you to follow them on twitter to test.... it's... silly
 
2:22 PM
it's free :/
 
yeah for font-size
you were trying to get the screen size?
 
'Désolé revenez demain...'
it's from 10 to ... 10:20
 
I can get the screen size. I then wanted to check if it was larger than 66ems, which I class as a "large" screen in my CSS
 
HANNN it's like ' 90 servers ' for today
 
how much is 66ems
 
2:25 PM
And the users talking about it on twitter are all french
 
60% of the screen width?
 
no, I have different layouts for different sized screens (See goldilocksapproach.com), and I wanted to resize something according the which "rule" it fell under in the CSS
 
well whatever you are resizing, needs to be under same em relativeness as the reference 1em div element
 
The height of a map on the page is set to 70% the height of the viewport (in px, no problems). There's also a "map help" that will be shown on the side of the map on larger screens, and below on smaller screens. I'm trying to get the width of the screen so I can put the map help to the side (if on a large screen)
 
2:33 PM
 
lol
 
9 upvotes... my third best answer
with least effort
 
lol
 
12 upvotes.. my second best answer now :D
holy shit
 
and @rlemon need to troll again :D
 
2:36 PM
what?!
he asked for JS... i gave him JS
i said it was for the luls
 
> umm, he asked for Javascript....
 
i want to give him a jQUery solution :/
 
haha
 
i wanted to write a plugin for him :/
 
by the way
\> 1
shouldn't it be > 2
 
2:38 PM
How dumb does the OP feel after asking that
nope
length > 1 or length >=2
 
I TEST IT
 
for some strange reason.
 
@rlemon you also lock the person :/
cause ur code eats up the backspace!!
 
@Abhishek +1
 
lol
 
2:39 PM
if( .length > 1 ) ... so when length is 2, return false
ok I get it
 
:o
 
his validation is kinda funny
how hard is it to write parseInt(x, 10) between 1 and 12
inclusive
 
lol
 
@Esailija upvote after upvote on that answer :D
 
yea it's my second best answer
:DD
the simpler and stupider question, the more free rep
 
2:42 PM
have one from me too :D
 
damn, I got a free 50 rep for that js answer :P
 
yep, great that it's not even working properly :D
 
my almost most upvoted answer is this one
7
A: Create an array from a string

Florian MargaineWhat you're looking for is the split() method. "4~2,6~7".split(',') // ['4~2', '6~7']

 
LOL at the answer below
 
2:44 PM
19
A: Convert PEM to PPK file format

Ryan KinalUse PuTTYGen Creating and Using SSH Keys Overview vCloud Express now has the ability to create SSH Keys for Linux servers. This function will allow the user to create multiple custom keys by selecting the "My Account/Key Management" option. Once the key has been created the user will be requir...

 
direct link to w3schools, without anything else, could it be any worse?
 
One more plz? :-P
 
yeah, that too :D
 
hahaha
 
@RyanKinal there you go :)
 
2:44 PM
Hooray!
 
@FlorianMargaine jsfiddle.net/rlemon/83Y72/3 really fuck with your UX
 
rep - sharing in here? nice :D
 
@rlemon man, there are applications that really do this.
 
@RyanKinal the answer now looks uber badass after I copied all the text from your "i'll just post this link as an answer and get 18+ upvotes for it"
 
2:46 PM
@rlemon I don't know what you're talking about :-P
 
lol @Esailija +15
 
LOL
 
good guy rlemon
 
@Esailija bwahahaha i think he's going with my answer :P
I think this is a valid answer as well for me. I could use rlemon's logic to prevent users to enter invalid months or years. — Sung 4 mins ago
 
2:47 PM
lol what a dumbass
 
you should edit :)
because your current answer is... well...
 
well look at this
var monthFrom = $(this).find(".monthFrom").text();
var yearFrom = $(this).find(".yearFrom").text();
var monthTo = $(this).find(".monthTo").text();
var yearTo = $(this).find(".yearTo").text();
.text()?
 
lol
i'm not touching it anymore :P
 
how would I integrate with that
i'm not even sure how his code can work
 
there is a lot of that out there. programming by coincidence .
 
2:49 PM
-1
Q: Backbone/JQuery, ExtJs 4.... is there something else worth looking?

ChepechIm currently evaluating a front-end architecture for a big app that will be developed by a team of about 6 developers + 1 web designer so that said, having a robust SVN friendly architecture is a must. So far I'm evaluating this two options: A mixture of JQuery/UI/Mobile + Backbone/Underscore +...

 
if I edit my answer people can remove their upvotes
can't risk that
or wait
is it that you can't change it to downvote unless it's edited?
 
that's it :)
don't edit, why would you?
 
alright, guys. you all have a great weekend!
see you
 
still need people looking at / testing and reporting on this :P
 
2:54 PM
how do people come up with this brian.io/lawnchair
"lawnchair" wtf
 
at it's current state it is still nice to use for copying small amounts of text for answers.
 
it's not putting anything on my clipboard
 
if I write alibrary it will be called kQuery (one better than j)
really? browser / os?
 
windows 7 / google chrome 19
 
and ffs i had it stripping all tags now it's not... i think i pushed the wrong code again :(
@Esailija strange. works for me at home and at work on chrome ubuntu/windows.
 
2:56 PM
Error in event handler for 'contextMenus': ReferenceError: txt is not defined
    at chrome-extension://kccjpflpjembfcjdbklnbppoehampnom/background.html:189:12
    at contextMenus:31:17
    at [object Object].dispatch (event_bindings:200:28)
    at Object.<anonymous> (event_bindings:118:49)
 
yea i probably pushed the wrong code :<
ffs robbie
 
:<
 
it's annoying because I have to repackage it every time.
 
# [](#copy-as-markdown)Copy As Markdown

##
[](#chrome-extension)Chrome Extension

Pretty simple usage and description:

Select some text (preferrably a block of text, like an entire blog article), right click, click on "Copy As Markdown"

Now the Markdown version of your selected text _should_ be in your clipboard. Paste them anywhere you wish!

[click here](github.com/rlemon/CopyAsMarkdown/blob/development/packaged/…) to install.

There are some bugs in the HTML to Markdown converter. I am working on these.
 
so the code may be right... but the package is old?
 
2:58 PM
I just clicked the install link
maybe that's old?
 
@FlorianMargaine and no, not perfect... I have found some bugs and reported some.
 
am back :D
to anny you all lol
 
looks fine, except for the titles
 
:P it's a work in progress.. but i think once it's done it will be cool.
nested lists have issues.
blockquotes have issues.
 
also, update system.
 
2:59 PM
tonnes of tags should be just plain stripped.
spans are not neede.... divs should be treated block elements but i cannot be sure? so i'll strip them.
 

« first day (587 days earlier)      last day (4360 days later) »