« first day (1906 days earlier)      last day (3049 days later) » 

12:00 AM
change the number '4' to whatever day you want to signify a new week
for monday, it's 0
it's not the best code ever, but fiddle with it a bit and you'll get what you need
it's not that hard
 
Thanks, now it displays week nr 1. But in what country does the week start with a Thursday?
Because this seems to be the common solution to finding the week nr
hence my confusion
 
First "proper" knife. (read: first time applying scales). Got the wood from a tree from my backyard. https://t.co/COQ2cAp7OM
I'm so proud of my shitty little shiv
 
crl
I hope it's possible to get the bounding rect of a text selection
what kind of browser supports document.selection, smells like IE
 
crl
12:46 AM
gah.. I wish we could have multiple ranges in selection
 
1:14 AM
sherlock so good
 
@FlorianMargaine yes, github.com/luggage66
time to learn lisp.
 
@rlemon Looks really good; can definitely see improvement
 
2:03 AM
Where is @SomeKittens?
 
@ndugger thanks.
 
@BadgerCat He disappeared after a kick fiasco where everyone got really mad and we all cried
 
Also @JanDvorak
If any of you died, I'd notice after 19 days
and @monners
 
hi all, I was wondering if theres a simple javascript (pure js) code that'll allow me to pair a hoverover state with the html's background color?
 
2:43 AM
@FlorianMargaine While I'm not sure what benefit it has, your data structure (simple types in path-like keys) maps well to redis. That could be a natural cache.
 
2:55 AM
@ndugger I wonder who the kicker was :p
 
3:19 AM
my new youtube channel for playing games.
I used your awesome image as my profile pic :p
 
@Loktar subbed.
 
@AwalGarg I lost 20 rep after posting there lol..
 
3:43 AM
I never knew HTTP is that much pain :-|
 
@Loktar I just don't get it... codepen.io/kmck/details/PZbXzP
look at the source code for that
3 libs! 3! I can't even.
 
haha
 
it's like 15 lines of vanilla code
 
@rlemon I could write an identical pen with the same number of lines that he wrote, and without the 3 libraries... lol
 
4:04 AM
Is there something that allows discovery and connection between cordova apps ?
 
Hello everyone!
I'm in need of some advice.
I'm currently working on a very simple website, planning on using AngularJS for live data queries from my server ( on a LAMP stack, not using node ). In any case, before I get to doing any dirty work, I'm trying to build a template I can work with.
I'm primarily planning on using AngularJS, as explained. Though I'm having a real hard time not resorting to JQuery for many UI-related solutions.
This being stated, I AM trying to make use of CSS3 as much as possible.
Website is being hosted at
I'm also using Bootstrap as a base for designing.
So my main question being, is that at the moment I'm using Bootstrap's "fixed" navbar helper, but rather than something so static -- I want to switch to a fixed navbar AFTER a user scrolls down x pixels on my page. I also want to add a bottom border, and possibly scale the contents of the navbar.
So, do I use the JQuery .scroll function? Or should is there an Angular solution to this?
 
I find it strange that you're having a hard time not resorting to jQuery, when I find it hard to ever justify needing it.
 
Well, I've only just jumped into the MVC paradigm of front end web development all-together. I've been using JQuery primarily for the greater portion of the past year.
 
MVC has nothing to do with jquery
Also, for the sake of pedanticism, Angular isn't MVC
 
My point exactly, as explained.
Ah
In any event, any ideas?
is a greenhorn
 
4:15 AM
Don't use jQuery. Angular comes with a slim version of something similar for dom selection, and you don't need jQuery for animations, etc.
 
What should I do to track scrolling?
 
The browser already has an API for this; jQuery is just a slow, bloated layer of abstraction on top of it
 
Ah, just found my answer with a quick Google. I figured anything possible in JQuery, was capable in vanilla JS -- just didn't know how easy it was.
Thanks!
 
@neet_jn You might find this helpful microjs.com
 
@pootis, checking it out now. Thanks for the source!
 
4:39 AM
@ton.yeung Duly noted!
 
5:04 AM
user image
3
 
5:18 AM
lolwut
 
5:37 AM
@rlemon lol
 
5:48 AM
There once was a CO leak in my house from water heater.
 
5:59 AM
@pootis teehee
 
@AwalGarg ris
 
6:56 AM
Anyone here worked with Stripe API?
 
7:20 AM
Goooood morning.
Gotta stay optimistic now my vacation's over.
 
7:51 AM
Stay strong!
@AwalGarg response comes normally, but much much slower. Again, only Chrome iOS on iPhone no other browser :/
 
8:02 AM
@ndugger You open to PR's? I made your views configurable and compatible with express.
 
@BenFortune you might as well just open a PR.
 
Can I get a partial pull from git?
 
@BenjaminGruenbaum Yeah probably :p
 
@Mr_Green "partial" pull?
 
yes
so before pulling from origin, I want to see a diff of my working directory and the origin
so that I can pull whatever the code is necessary to me
Currently, the origin holds settings which will work only on external server but not on localsystem server.
 
8:16 AM
@Mr_Green git fetch
Don't hold configuration in your source code.
 
thanks will read about that
 
8:29 AM
Guys, I don't really understand where is heading Microsoft on browsers. Is Edge going to replace IE or not ?
 
Yes.
Every older version of IE is being deprecated. IE11 sticks around for a while to support enterprise legacy apps that require some kind of IE. Moving forward, Edge is to be the de-facto Windows browser.
 
Nobody seem to use it.
 
crl
I do, for tests o,ly :) it's quite less buggy than chrome, still more buggy than FF (on the rich text/selection API)
 
Everyone on W10+ gets Edge by default. Companies usually enforce IE-only policies for as long as they can, so until IE11 is completely gone, that'll keep up.
 
I can't see Edge on my GA at all, does it identify as 11?
 
8:35 AM
Edge identifies as a bunch of things, including Mozilla and Chrome. It also includes an 'Edge' identifier. I imagine if the sniffer is incorrect, it may be identified as Chrome.
 
crl
user agents are bitches
 
(They did that intentionally so UA sniffing would serve content for Chrome, which Edge is capable of handling, too)
 
The fact they didn't decide to name it IE12 (or whatever) will make it harder to tell to our customers that it's what replaces IE and that we'll remove support for IE...
 
Tell them that Microsoft Thinks IE sucks so badly that they're just starting over, with a "cutting Edge new browser"
 
crl
why doesn't this work.. jsfiddle.net/crl/h82nxqx6/2
gonna ave to use setStart/setEnd maybe
 
8:51 AM
@RoelvanUden I was just being dumb and looking under "Microsoft Explorer" :)
Google Analytics correctly identifies it as just "Edge"
 
@Luggage I'm not sure introducing an external dependency like redis in a git extension is wise. Besides, the system is mostly a one-user system, so scaling is not really important.
 
@FlorianMargaine did you see my question
from last night
 
@Mosho ah yes
about that
when you say "maybe XY"
it's probably a good idea to include what you actually want to do.
 
morning
 
9:07 AM
@FlorianMargaine right. I want to use chords, so I got this: vim.org/scripts/script.php?script_id=2425
it works nicely, but I want to map, for example, af to f and f to t
but that means af also maps to t and I have no f anymore
 
if you first remap f to t, and then af to f
isn't that good?
 
@BenjaminGruenbaum time to inspect TCP packets :D
or actually the headers
 
@FlorianMargaine I don't think it matters
af still becomes f after timeoutlen and then t, regardless of the order I set them up
 
@AwalGarg headers look fine. It all looks fine. The packets arrive really slowly.
 
@BenjaminGruenbaum is any other connection active on the port from which client sends the request?
also, link to website?
 
9:20 AM
@AwalGarg preprod4.tipranks.com and no
 
-3
A: How to select top 10 in Access query?

TONY*DOESN'T WORK! :D * *DOESN'T WORK! :D *

Or delete-vote
 
@BenjaminGruenbaum :/ file a bug with chromium?
 
@AwalGarg it's not chrome, chrome on iOS is actually just a UIWebView wrapped in a chrome like interface :/
 
@BenjaminGruenbaum yeah, I know that. but good luck filing a bug with iOS :D
 
9:28 AM
:/
 
hi all
 
Guys i need One Help
 
@Mosho can't help, sorry
 
@DineshKanivu how much are you willing to pay?
 
9:29 AM
Hey
its a small issue
 
pay small amount
 
I can solve it for $500.
paid upfront.
 
no no
its a small front end issue
 
hehe
what's the problem?
 
worth of 10 Dollar
 
9:30 AM
why would we be entitled to help you?
 
If you Can help Do sir
 
because we're the nicest people on the interwebs, didn't you get the memo?
 
@DineshKanivu jsfiddle.net/hfbwbz3k/1 yo indian brother here for your help come again
 
or else Leave it Sir
 
I'll do it for €100
 
9:31 AM
@AwalGarg thanks
 
@DineshKanivu ...
 
I need to fit that Image inside the Container
 
alright, just tell us what the problem is
 
its a CSS sprite Image
 
how should it fit?
 
9:32 AM
@DineshKanivu ignore florian he doesn't even know how to write code
 
It's amazing how people can be respectful and disrespectful at the same time.
 
@MadaraUchiha Hi
 
@AwalGarg Indeed. Code just appears when Florian is near a PC.
 
@AwalGarg Can you Look iinto it
 
like that?
 
9:34 AM
No Sir
 
@GNi33 Cool sprites image...
 
Here is the Question jsfiddle.net/hfbwbz3k
 
that's not a question though
 
I use a Sprite Image.. and it need to fit in the Container
 
@DineshKanivu like this: jsfiddle.net/hfbwbz3k/4?
 
9:35 AM
and that's what I did. be a little more precise in your problem description please
 
@DineshKanivu what have you tried?
 
@MadaraUchiha "Sir"
 
@GNi33 Did u see this ? jsfiddle.net/hfbwbz3k .. Here image is Coming out the Container.
 
be respectful madara
 
9:36 AM
@AwalGarg No need to call me "Sir", peasant.
 
@MadaraUchiha you should call dinesh sir that's how you be respectful
 
want like this
 
@AwalGarg I fart in your general direction.
I ask of you all to remember the help vampirism rules.
@DineshKanivu I'll ask again, what have you tried?
 
wow madara so unprofessional, wait I will report you to the Internet Consortium of Chat Trolls And Cops
 
9:39 AM
its CSS
i have tried CSS and Javascript
 
@AwalGarg oh yes, the ICCTC
 
@DineshKanivu I think this is what you want jsfiddle.net/hfbwbz3k/6
6
 
care with them, they are so dangerous
 
Holy shit, I haven't been rickrolled in ages
 
@FlorianMargaine Well done.
+1.
 
9:41 AM
jsfiddle.net/simurai/CGmCe sprite animation
 
@MadaraUchiha thank you.
 
@FlorianMargaine aight
 
y u do dis
 
9:41 AM
pretty much all I care to do right now. fiddle around with the values a little and you'll probably get what you want. A generic solution with this setup will be tedious
 
@BenFortune I was sure that it was a solution and that he starred it because not knowing how stars work
Then I clicked.
Sorry.
 
@GNi33 Thanks Good. Wait
i need some more clarification
 
crl
wow I can do mutiselect :) jsfiddle.net/crl/h82nxqx6/6
should make it work with ctrl+dragover
 
goto
Kill it with fire!
 
scroll down a little bit
 
Hell yeah!
 
However, those nested if statements and the goto could really do with a refactor
if((x and y) or (z and foo)){ } else { }
 
crl
10:22 AM
you don't need no inner parens, but readability maybe
 
@FlorianMargaine heh
 
@rlemon You'll like this channel youtube.com/channel/UCDbWmfrwmzn1ZsGgrYRUxoA
 
@crl I know, but I usually add those for readability. Especially if there's more than one or.
 
DON
10:37 AM
d1=Fri Jan 01 2016 00:00:00 GMT+0530 (India Standard Time)
d2=Fri Jan 01 2016 07:25:00 GMT+0530 (India Standard Time)
timediff = d2-d1
hour difference is correct but minute difference is wrong
 
any FF user around?
 
DON
i'am getting the time difference as 7:42
 
@AwalGarg: At home, yes
 
DON
timediff = (d1 - d2) / 1000 / 60 / 60;
 
@Cerbrus how does firefox render this page for you: docs.npmjs.com/files/package.json?
 
10:40 AM
@AwalGarg normally
 
Just fine
 
@FlorianMargaine release line? (stable/aurora/nightly?)
 
@AwalGarg normal, stable
 
@DON You're aware that an hour has 60 minutes and not 100, and that if you get 7,42 that does not mean it's 42 minutes?
 
@AwalGarg stable
 
crl
10:41 AM
var h=Math.floor((d2-d1)/3600000); var m=Math.floor(((d2-d1)/3600000-h)*60) or new Date(d2-d1).getMinutes()
 
ff 43.0.1
 
@FlorianMargaine @RoelvanUden @Cerbrus can also check how it renders this: docs.devdocs.io/dom/index.json?
do you get a JSON viewer or just see it as plain text
 
@AwalGarg plain text
 
ok, thanks, its an aurora thing then
 
or an extension
 
10:43 AM
Plaintext
 
So, you're running a dev version?
 
crl
var h=(d2-d1)/3600000; [Math.floor(h),Math.floor((h-Math.floor(h))*60) ]/*hours,minutes*/ or var delta=new Date(d2-d1); [delta.getHours(), delta.getMinutes()]
 
why yes, I am
 
That's kinda relevant
 
10:45 AM
@AwalGarg cool. Is it like the JSON viewer in network tools where you can't copy paste anything?
and there's no way to go back to the plain text version?
 
Shouldn't be. Dev edition is intended to be used as regular stable version but only more unstable APIs and tools for devs.
@FlorianMargaine there is a tab to see the raw data
and headers as well. I love it, but just want it to check headers instead of just url ending with .json
 
@AwalGarg where is it?
for headers yeah, nothing special
for raw data I can't find it
I only have "Response"
and there's only JSON there
 
@FlorianMargaine not in the devtools, the web page itself renders it as a JSON viewer
 
10:49 AM
@AwalGarg yes, my comment was wrt dev tools.
 
oh, ok. yeah that sucks
 
crl
var d1=new Date("Fri Jan 01 2016 00:00:00 GMT+0530"), d2=new Date("Fri Jan 01 2016 07:25:00 GMT+0530"); new Date(d2-d1).getHours() // wat?
oh hours are 1-24 based, got to -1 my last msg ^
 
11:07 AM
!!> var d1=new Date("Fri Jan 01 2016 00:00:00 GMT+0530"), d2=new Date("Fri Jan 01 2016 07:25:00 GMT+0530"); new Date(d2-d1).getHours() // wat?
!!live
@rlemon
 
cp has been down for a while
 
RIP Cap 2016
 
@Cerbrus ftfy
 
just checked, its been down since saturday :o
 
crl
beer!> var d1=new Date("Fri Jan 01 2016 00:00:00 GMT+0530"), d2=new Date("Fri Jan 01 2016 07:25:00 GMT+0530"), d=new Date(d2-d1); [d.getHours()-1, d.getMinutes()]
@crl "7,25"
it's quite more efficient to do element.closest('#editor') rather than editor.contains(element) (for checking if element in is editor)? no?
 
11:18 AM
hi guys. Should the header.php(styles) and footer.php(scripts) be on the same location with the index.php where it is imported/included?
or directory rather
 
This is the JavaScript room; this question may be better in the PHP room
 
but theres no one in php
 
crl
you gotta try in lounge then :p </sarcasm>
 
ok thanks
 
hello i need help in validator plugin anyone around? @crl
 
crl
11:28 AM
@Saeed 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.
 
sorry @crl
 $.validator.addMethod('wordcleaner', function (value, element) {
     if(["can", "fuck", "i "].some(function(e) { return value.indexOf(e) >= 0; })) {
	 	return false;
	 } else {
	 	return true;
	}

this is my code for word cleaner and its working fine but 2 issues ... One its not canse insensitive and second it look for 'I' either if its in one for example 'this' contains 'I' and it will give error
 
crl
@SaeedAnsari Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
maybe use regexes
 
@crl could you please edit my code to make it work with insensitive case?
 
Good afternoon everyone
 
@SaeedAnsari return value.toLowerCase().indexOf(e) >= 0
 
crl
11:35 AM
or that ^
 
But this code could be shortened.
For starters:
 
how @MadaraUchiha ?
 
/*...*/, function(value, element) {
  var blacklist = ["can", "fuck", "i"];
  return blacklist.some(function(e) { return value.toLowerCase().indexOf(e) > -1; });
}
 
the other problem is its finding 'i' in between words as weill for example it file 'i' in 'this' word and throws error but i want to give error only when user write for example " I can do i"
 
@SaeedAnsari I'll ask you a different question.
Why are you even trying to prevent people from saying "fuck"?
(Or any particular words, for that matter)
 
11:41 AM
fuck was used for just an example.... my case is I hard coded "I can" and than a input filed where they will write more i.e " I can clean your code" since 'I can " is hard coded so i don't want them to write 'I can" again "I can I can clean your code"
 
You can't possibly correct a user's sentence structure.
 
@SaeedAnsari then look for "i " and " i"
 
@pootis i am thinking the same thanks
@pootis than " it" will be an error :(
 
use regular expressions instead
 
any example please @pootis
 
11:55 AM
I am as good as Donald Trump is at regex.
 
@pootis let me search about regex expressions as i am not good at it :)
 
Noob question
<script>
var x = 3;
var y = 7;
var som = 100;
var resultaat_1, resultaat_2;
x++;
y+=5;
resultaat_1 = som+=x;
resultaat_2 = som+=y;

document.write(resultaat_1 + "<br />");

document.write(resultaat_2);
</script>
 
@MaartenWachters yes I am noob
 
How come that x++ gives me 4 as output?
I was referring to myself @SaeedAnsari =p
 
ohh =P me also noob
 
11:58 AM
@MaartenWachters x++ is equivalent to x = x + 1.
 
But shoudn't it be 5 then?
3+1+1
 
@MaartenWachters var x = 3 , x++ mean 3 + 1
 
^
 
Is it ok or a common behavior if my plugin's init function gets fired every time a user click some element which is bound to the plugin?
 

« first day (1906 days earlier)      last day (3049 days later) »