« first day (549 days earlier)      last day (3239 days later) » 

17:03
posted on October 31, 2014 by kbironneau

/* by gumibogyo */

@PatsyIssa pft, you assume it takes a long time to create those
mostly they are copy/paste from old shit
I wrote a simple code which resize a div on mousemove event.
but this is making chrome to stuck sometimes
Is there any other way instead of using mousemove?
user652649
jsfiddle it
17:17
I will fix it with the power of my porn stache
@mikedidthis request for an alteration
add a porn stache to my skeleton
<3
@rlemon request denied
will do it another day. Just finishing purify and calling it quits.
but... bow chikka wowow
17:22
http://www.commitstrip.com/en/2014/10/31/a-coder-nightmare/?utm_source=rss&utm_medium=rss&utm_campaign=a-coder-nightmare
CommitStrip - Blog relating the daily life of web agencies developers
A coder nightmare
CommitStrip
1414776107
works fine in fiddle.. no lagging :|
but still if there is a way to optimize it, then it will be great
well don't always listen for move
register the move and unregister it on the mousedown/up events
ahh yeah.. thanks :)
.on('mousedown', function() {
  .on('mousemove', resize);
}).on('mouseup', function() {
  .off('mousemove', resize);
});
I'd also add a time delay so you are not making micro adjustments
using delta time so you only act every 100ms or something
but that might have a bad visual effect
just an idea
ok I will think on that..
17:29
var div = resize.div = resize.div || document.createElement('div');
this line is a little crazy
yeah actually I am using resize.div somewhere else in the project
var template = document.createElement('div');
template.className = 'overlay';
// later
var div = template.cloneNode();
and I want to make sure that it has a div in it.
div = resize.div = resize.div
it is hard to read and maintain
I would think of another way
if(!resize.div){
    resize.div = document.createElement('div');
}
^ this I think is readable
user652649
that helps because reduces browser's task, and you get a better result
ok thanks.. I will check that
user652649
not getting it
user652649
can you believe that of 7 hsl 2 rgb functions i tested, none worked?
user652649
17:51
the wheel was actually a square
posted on October 31, 2014

Piled Higher & Deeper by Jorge Cham www.phdcomics.com title: "The Oxford Comma Explained" - originally published 10/31/2014 For the latest news in PHD Comics, CLICK HERE!

user652649
18:18
@rlemon i'm not sure what approach to choose to express a percentage
function setAmount(Float $zeroTo1)
function setAmount(Integer $zeroTo100)
both are valid, but which is suggested?
very generally talking
hrm
that is tough. I like the 0-1 but it is a multiplier at that point and not a "percentage"
isn't percentage 0-100 always?
In mathematics, a percentage is a number or ratio expressed as a fraction of 100. It is often denoted using the percent sign, "%", or the abbreviation "pct." A percentage is a dimensionless number (pure number). For example, 45% (read as "forty-five percent") is equal to 45/100, or 0.45. A related system which expresses a number as a fraction of 1,000 uses the terms "per mil" and "millage". Percentages are used to express how large or small one quantity is relative to another quantity. The first quantity usually represents a part of, or a change in, the second quantity. For example, an increase...
user652649
good point :D
0-100 it seems
user652649
for example, why css opacity goes from 0 to 1, while
user652649
saturation and luminosity of hsl() go from 0 to 100?
18:23
CSS is horribly inconsistent
user652649
i guess i will go with 0-100 anyway
user652649
since other ranges i have go from 0 to 360 and 0 to 255
user652649
looks more consistent
user652649
there's a thing that often i had to do but i always forget how i did it
user652649
and it's happening again
18:28
o/
user652649
lol
\o
sup baldo
user652649
\o
I ain't bald O.o
@PatsyIssa You're relatively bold.
18:30
Not even a bit bro
just follically challenged!
no, Patsy is a bold patsy
lol
Like for realz I just shave my head ;p
he thinks he is a cat sometimes
you got a legit doge?
18:35
nah, thats just his halloween costume. hes really a 150lb newfie :p
My cat's in heat
I m considering tossing her in the freezer
you could just get her fixed
She's 7 months old, first time she goes in heat
snip snip soon
know whats worse than a cat in heat? 2 cats in heat
Yeah I have another, praying to zeus she doesn't go in heat at the same time
2 cats and a dog
18:38
we had 3 cats: mom and 2 of her daughters. after the mom went into heat for the 2nd time, one of the daughters went into heat. so it was like non-stop cat in heat.
The sounds they make are just ridiculous
and they are constantly humping your shoes
*everything
We're off to see Patsy! The wonderful Patsy of OZ!
user image
7
18:42
hahahahahahahahahh'
user652649
@rlemon in a circle, i want to reduce a number representing a degree to fit the 0-359 range. a good version of this:
user652649
!!>function setdegrees(val){ while(val >= 360) val = val - 360; return val; }; setdegrees(400);
@WesleyCrushed 40
user652649
#suckingatmath
Math.min(Math.max(n,359),0)
something like that
user652649
18:44
nope?
user652649
i want it that if you pass setdegrees(360) it returns 0
user652649
setdegrees(360*5) still returns 0
why would it return anything else ;p
might want to divide it by 360 in your function then
return n > 360 || n < 0 ? 0 : n;
18:46
It looks like he's trying to convert to degrees ;p
user652649
basically, 400deg is a complete circumference plus 40 degrees
user652649
i want it to return 40
ahh
gotcha
and what do you want 360 * 5 to return
user652649
18:48
360*5 are 5 complete circumferences, so 0
Isn't it doing that already?
so if val > 359 then val % 360 else val?
user652649
!!>function setdegrees(val){ while(val >= 360) val = val - 360; return val; }; setdegrees(400);
@WesleyCrushed 40
user652649
this works, but sucks :P
user652649
18:50
@cimmanon correct. man that was so obvious lol
user652649
that still works with 5 * 360?
function setDeg(n) {
  if( n < 360 ) return n;
  return n - ( Math.floor(n/360) * 360 );
}
setDeg(400); // 40
setDeg(360*5); // 0
user652649
@cimmanon yes
first check I dont' think is needed :/
function setDeg(n) {
  return n - ( Math.floor(n/360) * 360 );
}
user652649
18:51
% returns the rest of the division, which is 0
boom
!!> function setDeg(n) { return n - ( Math.floor(n/360) * 360 ); } [400,500,360*5,18].map(setDeg);
@rlemon [40,140,0,18]
user652649
@rlemon this is simpler:
user652649
return v >= 360 ? v % 360 : v;
user652649
thanks @cimmanon my neurons aren't good anymore
18:54
np
1
Q: Optimizing for critical rendering path when using bootstrap

Jad JoubranWould it be possible to optimize for the critical rendering path (similar to what Google and Facebook are doing) if I am using Bootsrap 3? Facebook just inlined the styles that are related to the header and sidebars. Google inlined all the styles because they do not have much styles for the home...

^ friend asking in case anyone knows the answer
user652649
@mikedidthis i'm not sure if i get it but i probably do
hi all
Is anyone using node?
I need help with browserify
Morning HTML / CSS / WebDesign / Some JS people
user652649
18:57
@mikedidthis nazi/german zombie?
could be any soldier, really
user652649
morning @PeeHaa
Yep!
I didn't go full nazi as I didn't want to offend anyone.
@mikedidthis I expected a NAZI! Now I am offended!!!11
:)
so in your heart, it really is a nazi? :p
19:01
Totally
user652649
@mikedidthis can you split it in half like Two-Face, one german, the other media3.s-nbcnews.com/j/msnbc/Components/Photo/_new/…?
nothing wrong with that.
@mikedidthis now it's on like Donkey Kong
user652649
@mikedidthis sorry for suggesting you more work xD
it would be more offensive if the other half was a jew :p
user652649
19:03
nah @cimmanon @Purify is half english half german, hence my sugg :D
oh i see
@rlemon O.o already printed dafuq :P
You move fast
I don't fuck around
user652649
ahhaahahhaahdsigfads
19:04
how long do you think it takes to print something?
user652649
he also cut it
must have really slow printers over there :p
It's not the act of printing, it's getting the idea
just got a fax.
Dear FIRST NAME,
I am ...
dayum google, that is a pretty neat effect
user652649
user652649
who wrote this made this mistake:
$s = max(0, min($s, 100));
$l = max(0, min($l, 100));
user652649
which is a range of 101
user652649
and it screws up everything
user652649
any idea how to fix it?
user652649
the hell is fmod() dear god
19:21
@WesleyCrushed Huh? How?
Looks perfectly fine to me, 0-100
user652649
well i meant that works fine with 0-99, but stops working at 100
@WesleyCrushed Eh? That shouldn't happen either.
$s = 100 is valid (and will stay 100)
user652649
anyway 0 to 100 it's 101 numbers. i thought it could have been that the problem
HSL accepts 0-100
So no, not really
What is the problem though?
user652649
returned rgb is wrong
19:24
(I don't have PHP installed on this machine, can you set up an 3v4l.org to demonstrate it?)
user652649
try 50,100,100
user652649
kk wait
user652649
it works now, i must have fixed it introducing $h = $h >= 360 ? $h % 360 : $h;
user652649
yea, it works. lol
@rlemon damn that was quick!
@WesleyCrushed no more today, I am going out for a beer.
user652649
19:31
@mikedidthis have fun! :D
TS beers tonight?!
TS BEERS?!?!?!
This dude killed it wow http://t.co/TXfahGiVaT
@rlemon sadly not, off to the pub to play pool with the lady.
:(
playing pool like you have sex?
everything in but the balls
user652649
ahahahah
buh-dum-tsh
19:33
Sorry man, next saturday?
sounds like a date
I'll drunk TS with you while drunk robo with wes :D
deal
I will drunk avatar or something
download robo!
user652649
im not getting why you don't want to download robo so firmly
user652649
19:36
but ok :(
maybe he is bad at vidya
no more games until I finish borderlands 2.
I am chapter 11/12.
well get off yer ass and finish it
yes sir!
@mikedidthis what lvl you at
I got a lvl 40 smth zero
woooot
I got the normal naga epic
that shit looks nice
30$ O.o the fuck
that's not bad
@PatsyIssa lvl 17 with the brute iirc.
ping me when you play (excep this weekend)
I have been doing just the story quests and have to go back and do the side quests just to beat chapter 11.
Can't, its on my xbox :(
@WesleyCrushed Can be simplified to $h = $h % 361
19:41
ohhhh
user652649
@SecondRikudo @cimmanon ^ :D
user652649
@SecondRikudo correct
No, wait
That's not correct actually
What's wrong with $h = $h % 360 @WesleyCrushed?
user652649
19:44
yes that
@WesleyCrushed mangiare un cazzo™
user652649
@rlemon it's "mangia un cazzo" xD
!!learn eaditaly "<>mangia un cazzo"
@rlemon Command eaditaly learned
user652649
19:46
@SecondRikudo why the hell did we made it so complicated? lol
user652649
@SecondRikudo even shorter $h %= 360; !
Yes
!!learn eadhebrew "<>תאכל זין™"
@SecondRikudo That didn't make much sense. Use the !!/help command to learn more.
@SecondRikudo Command eadhebrew learned
php needs to go die in a fire. this is seriously the worst part of my job: dredging through php that looks as though it was written by someone who read too many java books and makes factories for its factories or whatever.
@cimmanon Don't blame the language for the incompetence of the developer.
PHP isn't the best language around
But its code doesn't have to be ugly.
That's up to the developer
@cimmanon Our Java code lokes exactly the same
user652649
19:52
i use factories only when i have circular dependencies. makes sense? xD
That doesn't make Java a bad language.
There are plenty other things that make Java a crappy language :D
@WesleyCrushed Factories make sense when you want to control the instantiation of an object.
user652649
i meant like a mediator pattern
user652649
don't know the actual name
hey, php doesnt have to look like java to be bad. its easy for even good developers to write lousy php. that is something to fault the language
hater's gonna hate, potater's gonna poate
19:59
public function getActionParams()
{
return $_GET;
}
user652649
lol
thats not even our code, thats in yii
@rlemon modified confetti by any chance? wondering what effect the hashmap has on performance
user652649
@cimmanon ever worked with magento?
@WesleyCrushed go away!!!
you scared the bejeezus outa me with that magento crap
user652649
20:03
?
user652649
lol
user652649
when you start reverse engineer magento's source you feel like you are traveling into a black hole
halloween trick i bet
user652649
there's no beginning and no end
user652649
and result is outcome of utter random
20:03
@WesleyCrushed there's your problem... if you have to do that, sunthin`s wrong
@CSᵠ no got drunk
@rlemon ossm!
user652649
@CSᵠ sometimes it's the only way to understand how things works
/me beer+cola
@WesleyCrushed WTF WOULD YOU EVEN DO THAT BRO?
20:05
@WesleyCrushed but but.. magento? really? got nothing bettr to do?
like.... drink a glass of water
or smell the air outside
go piss
user652649
magento has like 100, maybe more, files containing only "class MyVerySpecificException extends Exception {}"
or any other pointless thing really...
user652649
@PeeHaa i had to, then i gave up
@WesleyCrushed I especially like all the magic Mage::SuperStatic stuff going in there
user652649
dear god
20:09
Also IIRC all that XML magic was also pretty horrible
XML for templating or something like that?
user652649
@CSᵠ or get ebola. it's probably less deadly
user652649
@PeeHaa i don't remember anything. i formatted brain sectors that were damaged by magento
Good good :)
user652649
sometimes my client calls me saying that paypal doesn't work
@WesleyCrushed let's not get there, if you were to get ebola for looking at magento you'd raise the ebola infestation worldwide for 2014 by 100%
:P
user652649
20:11
i don't know how but magento is capable of autodestroying itself
user652649
i hired a company that assert to understand magento. they are just pretending to xD but i don't give a f. as long i don't have to touch magento
user652649
my client is mentally sick, i told him plenty of time to let me start some ad hoc code. he is worried to lose customers
user652649
it's really hard to convince a client that not necessarily code written by ebay is good
user652649
/me goes back to fmod()
user652649
20:31
@SecondRikudo -405deg -> 315deg
!!> -405 % 360
@SecondRikudo -45
That's correct
And I'm pretty sure HSL will accept a negative value
-45 gives a magenta in my browser
So that matches your 315
You can do something like
$h = $h % 360;
$h < 0 ? $h + 360 : $h;
If you care that much.
Although you really should refactor that part out into a function
You need to do it more than once, don't you?
@SecondRikudo ++
user652649
that function suck @SecondRikudo
20:36
@WesleyCrushed it seems there are a bunch that call themselves 'magento experts' and 'wordpress experts'
user652649
$modObj = $obj->setHSL(-45, 100, 50);
print_r($modObj->getRGB());
$modObj = $obj->setHSL(315, 100, 50);
print_r($modObj->getRGB());
they also charge a lot
user652649
gives different results
and i also f. hate that and that mentality
@WesleyCrushed That's why you do it once and get it over with though
Why do you need to convert though?
20:38
@WesleyCrushed explain this again, like you would want an old person to understand it
user652649
@SecondRikudo not understanding what you mean
I'd imagine that most things can handle HSL as well
@WesleyCrushed Write the function, abstract the conversion, and forget about it.
user652649
it's already like that
user652649
i use hsl2rgb internally
A stupid question over here
How do you pronounce " f' " in English?
(In my language it is pronounced "f tag", is it the same?)
20:42
It's "f unicorns" actually
:P
user652649
<f></f>
user652649
!!google english alphabet pronounce
it's "fhh"
anyone working on angularjs
1
Q: Unable to get references of the elements which are defined inside ng-switch/ng-include condition

N-JOYI am facing a wierd issue with angularjs switch condition. Here is my HTML code: <div data-component="dropdown" ng-switch on="1"> <div class="btn-group " ng-switch-when="1"> <input id="inputField" type="text" readonly="readonly" /> <button id="inputButton" class="btn i...

20:45
@ORBOTInc. Yes
f tag
Thanks!
Y U ASK IN TWO ROOMS?!
:(
:( :(
user652649
:( :( :(
:( :( :( :(
user652649
:( :( :( :( :(
20:46
:(:( ( :( ( :( ( :(
user652649
you had one job
ONE JOB!!!
user652649
xD
:flips table:
20:48
wtf?
@WesleyCrushed I recorded some clouds :P
#vaperMasterRace
user652649
so i'm creating a color class @SecondRikudo i was thinking i could represent the color internally as rgb and hsl2rgb / rgb2hsl internally, but it's not gonna work because i want $color->setHSL(50,100,100)->getHSL() to return 50,100,100, not 0 0 100 as it does now
user652649
that for black and white only
@WesleyCrushed In that case, saving as HSL is your best bet
Although, I don't think that all RGB colors can be accurately represented with HSL.
so close to five...
user652649
20:51
@SecondRikudo yea, hsl2rgb returns float,float,float
user652649
if i round them i can't revert back to the original hsl
ew
rgb can't be floats
user652649
i round on request, in the getRGB() method
user652649
but that's wrong
user652649
i should store the color as hsl internally
user652649
20:59
luckily i designed the class in a way i have to modify just few private methods for this change <3

« first day (549 days earlier)      last day (3239 days later) »