« first day (1819 days earlier)      last day (3131 days later) » 

7:00 AM
Anybody used liferay here?
 
user3119231
 
no it is a java based portal framework (IDK, wtf is "portal" here)
 
Java room is on the other side of the planet
 
user3119231
^
 
Hi guys. I was wondering if anyone knows how you move your caret to a certain position in a textarea. This is as far as I can take it myself:

selection = window.getSelection()
range = selection.getRangeAt(0)

I suppose that the next thing to do is `range.setStart()`, but this requires me to define a node as first argument, and I'm not sure how to define that.
 
7:13 AM
@ChristofferJoergensen 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.
@ChristofferJoergensen 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.
 
$('[data-slug]:not(:parentofcurrent):not(:childofslug):not(:current):partial').‌​reduceToClosest()
 
@r3wt sorry but was this in relation to my post? In that case I don't quite understand :-)
 
1 message moved to Trash can
@OiRc Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
{
    "foo": {
        "key1": "value1",
        "key2": "value2"
    }
}
what kind of json object is this?
 
7:29 AM
Incredibly normal
 
7:40 AM
@ChristofferJoergensen no sorry i was just gloating about my triumph.
wrote a library for infinite scrolling with history api. similar to waypoints but only a couple hundred lines of code, and a few extra jQuery functions and expressions
 
@OiRc It is a two-level json object that contains only string key and string leaf values, with names and values typical for demonstration purpose.
 
user3119231
man this gooey looks like shit:
 
user3119231
<svg>
	<filter id="blur">
		<feGaussianBlur in="SourceGraphic" stdDeviation="10" result="blur"/>
		<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0  0 1 0 0 0  0 0 1 0 0  0 0 0 18 -7" result="blur"/>
		<feComposite in2="blur" in="SourceGraphic"/>
	</filter>
</svg>
 
user3119231
is this code shit or what?
 
7:57 AM
I need a mongodb query help
 
need help with angularjs
0
Q: AngularJs factory and controller flow of control

Sonali GuptaI need some help understanding the code below. It is taken from: http://www.html5rocks.com/en/tutorials/frameworks/angular-websockets Factory: app.factory('socket', function ($rootScope) { var socket = io.connect(); return { on: function (eventName, callback) { socket.on(eventName, ...

 
I am using mongoose. there is users, posts. posts have tags and collaborators [ which is a list of user ids], and a userId, who is the creator of the post.. now where the user goes to the wall page, there is a query like this.
var query = Post.find();
query.in('tags', req.query.tags);
query.in('userId', req.user.id);
this works fine, but I want to have the posts, which the user is a creator and a collaborator as well
I wrote this: query.where({'userId': req.user.id}, {collaborators: { $in: [req.user.id]}}); but it doesn't work
I mean I only get the user's posts
 
8:27 AM
how to document something like socket.on('something', function(data){ ... }); with jsdoc, i have description above that method including @param data description but when i run jsdoc command i get nothing
 
@Maurize gooey? The code looks fine at first glance.
 
8:44 AM
`${oldName}${extension}` vs oldName + extension?
Can't decide
 
does the > operator on Date object works correctly also if the date is different timezone?
 
@Alon 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.
 
@Alon The time zone is not relevant when comparing points in time, so, yes. If you want to make extra sure, convert to timestamps first
 
crl
9:02 AM
if anyone doesn't know what to do, he could make a time chart of Chromes's version en.wikipedia.org/wiki/Google_Chrome_release_history
and why 46 and 47 are marked released in 2015-09-01 but we are still at 45? (nvm current beta/dev channel)
 
@crl because they were released to beta and dev on 2015-09-01
 
crl
ok
 
guys is it possibel to skip time in setTimeInterval() i mean
stTimeInterval(function(){
     if(somthing) {
           // true code
     } else {
          // skip this interval
          // i want to start this interval again without waiting fo 10 sec again
         // Immediate start
    }
},10000)
 
9:22 AM
while using react-router , how does react-router inject the routes into context, so when I do React.propTypes.router.isRequired in contextTypes I have this.context.routes oin my componnet
 
user3119231
is there a way to position divs inside a container to equal left?
 
user3119231
I mean: [ x x x x ]
 
crl
"to equal left"? ah I see
 
user3119231
I dont want them all to gangbang on the left side of the container.
 
crl
jsbin.com/reyozuw/edit?html,css,output maybe, but the space between containers is twice as large as between the border
 
user3119231
9:28 AM
@crl this works fine. BUT I have 1 div inside the container which is absolute and shouldn't be effected by flex.
 
user3119231
 
@Maurize your imagination is great :P
 
user3119231
@Mr_Green today's beer day -> My mood is at its best times
 
user3119231
Nevermind how to put that red shit out of display flex :D
 
Happy to hear that
margin-top?
is display: flex necessary here?
 
user3119231
9:31 AM
OUT OF display flex. It shouldn't be in there
 
guys is it possibel to skip time in setTimeInterval() i mean
setTimeInterval(function(){
     if(somthing) {
           // true code
     } else {
          // skip this interval
          // i want to start this interval again without waiting for 10 sec again
         // Immediate start
    }
},10000);

Help me please
 
user3119231
try it with setInterval instead of stTimeInterval (this isn't even a word...)
 
user3119231
testInterval = setInterval(test, 10000);

function test(){
	if(true){
		alert("jo");
	}
	else{
		clearInterval(testInterval);
		testInterval = setInterval(test, 10000);
    }
}
 
@Maurize do you know how to skip that time start it again
 
user3119231
here you go, my friend.
 
crl
9:34 AM
you should affect the result of setInterval to a variable if you want to be able to cancel it after
!!tell Simply mdn setInterval
 
user3119231
@crl to late, I already solved it.
 
user3119231
Now help my ass out of flexbox
 
// before this interval starts its wait for 10sec
setInterval(test, 10000);
 
user3119231
9:36 AM
@Mr_Green Thanks for using the screenshot to fiddle converter :D
 
np :)
 
user3119231
This isn't solving my problem
 
user3119231
@Simply
 
user3119231
testTimeout = setTimeout(test, 10000);

function test(){
	testTimeout = setTimeout(test, 10000);
	if(true){
		alert("jo");
	}
	else{
		clearTimeout(testTimeout);
		test();
    }
}
 
@Maurize ty i'll try this
 
9:41 AM
@Maurize what is the issue?
 
user3119231
@Mr_Green the red point is a moving object which should blur effect the others: jsfiddle.net/tkk7kywa/1
 
user3119231
and the space must be remove on the left side of blackbar
 
user3119231
updated the fiddle
 
what happened to the kineticjs tutorials...
*panic*
 
lol, windows... Error code:408 Network timeout on resource. for file:///C:/work/repos/redacted/customerAddress.html
6
 
9:50 AM
@Maurize nice one
the leading and trailing spaces must be removed right?
 
how do I use .on in the capturing phase in jQuery?
 
@ReFruity 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.
 
user3119231
The red dot shouldn't be handled as the others -> It should be "outside" so the green ones have all equal spaces and the red one is behind the first green.
 
user3119231
So the indicator can later move behind the limbs from one point to other points.
 
10:03 AM
if a node.js callback throws an exception (which isn't caught by JS code), it seems to vanish without a stack trace,
is there a way i can make it do something more useful?
 
@Cauterite pm2 for example logs those in error.log files, try maybe using some arguments to specify log files
 
user3119231
update again -> jsfiddle.net/tkk7kywa/4
 
user3119231
@Mr_Green any idea?
 
@ReFruity thanks, i'll see if there's any such options
ah, I see, I needed to listen for 'unhandledRejection' as well as 'uncaughtException'
 
@Maurize ...?
(function test() {
    let condition = true; // your condition here
    setTimeout(test, condition ? 10000 : 0);
})();
 
user3119231
10:18 AM
@MadaraUchiha...? // -- I think he knows how to test -> Good morning, my friend!
 
@rlemon Remind me which code highlighter you use for the dark theme?
@Maurize if you need to set the timeout, and then clear it afterwards under some condition, you probably shouldn't have created it in the first place
 
Every time I git clone now I hear the Schwarzenegger from that clone movie parody with Mad TV. Send help.
 
Have made four php bounty answers in a row. Already got one hit. The joy of bounty hunting! ( The JS bounties are too hard for me. I found Russian question easier to answer >_< )
 
I find Russian questions unreadable.
 
10:35 AM
etheme.js what is it for guys?
I'm getting et.FullHeight error on it
Guys any 1 there , the radio button is not working using jquery ..I'm getting $() et.FullHeight is not a function error
 
I don't know Russian either, but I happen to know parsing l10n date strings in PHP. My advise: don't use PHP. Use Database. A *real* database parse date in all languages most will ever need:
http://stackoverflow.com/a/33035309/893578
I think it also applies to JS :)
 
I think the question looks valid. It has code showing his equlizer, question is about how to do treble and stereo/mono. Should split the question, perhaps, but I'll give it a chance.
Oh it got a bounty anyway...
 
10:51 AM
@JanDvorak because it's a vamp question ? Or for something else ?
 
Because it's a vamp question.
 
Ah. How should we flag a vamp question?
 
Downvotes might suffice
 
@MadaraUchiha highlight.js
 
    $(document).ready(function(){
    	    var i = 1;
    	    setInterval(function(){
    		    console.log("yep yep Yep : " + i++);
    			sleep(5000);
    		},100);
        });

// i value logs every 5 secs or every 0.1 sec ??
 
10:54 AM
@FlorianMargaine @Loktar Friday!!
 
user3119231
@rlemon man catch up -> you're to late!
 
did ya heard about timezones ?
 
i want any javascript code that take min 3 to 5 seconds to complete execute
 
7am here
 
anybody have ?
 
user3119231
10:55 AM
@rlemon much too late.
 
fite me irl
 
@Simply setInterval calls the supplied function once per a given period.
 
user3119231
@rlemon what is fite? Fuck inside trapped eroticmodels?
 
@JanDvorak oh that means it sleeps for 5 seconds any any cost
 
What is sleep
 
10:57 AM
sleep is for the weak ?
 
pours more coffee
 
           setInterval(function(){
                 console.log("HI");
		    // i have a code that take 3 seconds to execute
		},100);
 
Use a function and call it recursively with setTimeout
 
@Simply define "take 3 seconds to execute". If it wastes CPU the whole time, it won't be running more than once at the same time.
If it just schedules an empty function after three seconds, you can have 30 of those enqueued at the same time.
 
In a git ignore file... how do I ignore node_modules which may be there in a subfolder somewhere from my folder root path?
 
11:07 AM
fuck a fuck
 
1 message moved to Trash can
@Simply Please don't post unformatted code - hit Ctrl+K before sending, use up-arrow to edit messages, and see the faq.
 
@deostroll Have you tried node_modules?
 
I wasn't sure that would work...
but it does...
:|
 
Testing costs nothing, try things out, it's fun
 
    setInterval(function(){
                 // i have ajax call here i'm getting data from server and doing some stuff
                 // I'm expecting it to complete in 2 seconds
                // so i gave 2 sec delay
                // what happends if this takes more then 2 secs lets say 5 seconds
               // whats happens to my setInterval will it still run 2secs ? or waits for before queue to complete ??
		},2000);
 
11:10 AM
Refer to my previous suggestion
 
@Simply For simple questions, ask SO. With help from Google. stackoverflow.com/questions/1976405/…
 
git rm . -rf bad thing to do... :S
what is the opposite of git add . ? as in to undo whatever added?
 
Run git status, it will tell you
 
i got why timers ??? i can use recursive function right ?
 
@deostroll git reset
?
 
11:12 AM
!!tell deostroll google undo git add
 
11:27 AM
@deostroll protip: when you run git status it will tell you the commands you need to use to do things with those files
 
@deostroll you could also do git checkout
 
@rlemon FRIDAY!
 
!! friday
 
I was expecting rebecca's video :/
 
user5020521
11:41 AM
@rlemon I found a way to pass var from js to php
 
user5020521
this is it xmlhttp.open("POST", url + "?idRecord", + true);
 
 
10/10 alt text
saved the comic
@Riccardo990 I'm concerned about that + true at the end
Apparently that's equivalent to 1, which is truthy. But still, don't
 
12:20 PM
Hey @Cereal Does reactjs serve the same purpose as jquery?
 
wtf, BlackBerry doesn't have PATCH?!
 
what kind of PATCH?
 
@Mr_Green The HTTP verb
And the DevTools even show the request as PATCH, but I only get a GET on the server
 
@OliverSalzburg what do you mean by "BlackBerry doesn't have"?
 
Just curious, you working on Blackberry OS or BB browser?
 
12:23 PM
@AwalGarg I mean what I just said ;)
@Mr_Green OS, this is a Cordova application
 
what application sends the request?
 
@GNi33 Mine
 
huh, ok
cordova, well
 
@OliverSalzburg err, I mean, you can have whatever HTTP verb you want...
 
I always dreamed of developing app for my BB, but in reality never did
 
12:24 PM
Everything works as expected on Android, iOS, WindowsPhone8. And all other verbs work fine as well. Only PATCH behaves differently on bb10
@AwalGarg Apparently not
 
@OliverSalzburg What does that even mean? How can a device not have an http verb?
It's not an http server nor client, so you're going to have to elaborate
 
2 mins ago, by Oliver Salzburg
And the DevTools even show the request as PATCH, but I only get a GET on the server
 
@GNi33 Interesting, but too low-level for us :P
 
So you're claiming that devices running blackberry can't send the string PATCH in the beginning of an http request?
 
12:26 PM
not sure if this will help you, but it should be possible
 
We're using X-HTTP-Method-Override now, but I still find it very curious
 
@Zirak I was having a hard time putting that into words for some reason, but this @OliverSalzburg
 
@Zirak I'm pretty sure that they're technically capable of doing so, but they don't through the interface that is exposed through WebWorks
 
@Zirak sounds plausible if the web browser there is acts smarter than it is.
 
And not only that, they replace the contents of outgoing requests from PATCH to GET
Because "why not"
 
12:28 PM
it probably falls back to GET by default
 
@OliverSalzburg That's more plausible
It's not blackberry then, it's some intermediary library that's screwing with you.
 
I guess it's to protect poor webservers from their own evil javascript
 
@Zirak Well, WebWorks is a BlackBerry product
 
!!google webworks
 
12:29 PM
@Zirak probably. as in the forum post I linked earlier, they need to send a "customRequest" via QT to make it PATCH
 
12:43 PM
@JoelL no
 
xcode 6.5 building react native projects seems buggy
will try upgrade to v7
 
12:55 PM
@Zirak I missed you
 

« first day (1819 days earlier)      last day (3131 days later) »