« first day (1657 days earlier)      last day (3291 days later) » 

12:00 AM
@sonail @Sushil kay hua
 
Np. Thanks for all your help man
 
if its not too late for u, I can check it tomorrow morning.
@Steve Namaskar
 
i learned that word from crime patrol lol
 
hmm..
 
did u ever watch that show
 
12:01 AM
@Sushil - Sure, np but the site may or may not be up at that time. as this is a demo site. But if you get a chance let me know on stackoverflow.com/questions/29955496/…
 
try meta refresh
 
yeah @SonaliKapoor. i just need to test it in an older version of IE. i have a few systems that run all these older versions but the admin has left for the day and I cannot access them.
 
Np. Sushil, i understand and appreciate your eagerness to help.
 
IE sucks
 
thanks @SonaliKapoor. time for me to leave for the day. have a Good Night ^_^
 
12:04 AM
@Steve - I agree.
but there are still users and you care of every single user who visits the website
 
i had one issue with css
i tried everything but lucky somoene was expert at IE and i had the issue resolved
 
@Steve me too.. IE really sucks big time. that is why MS is dumping IE and working on a completely new browser.
 
my issues is very specific to IE with some older versions. IE on Windows 8 works
@Sushil - i hope they come and it gets adopted soon.
 
why dont u use javascript instead except for jquery?
 
soon with Windows 10..
c ya folks.
 
12:06 AM
we still have the pain for next year or two i guess
before users adopt it
@Sushil - Take care.
 
shubratareeeeeeeeeee
 
12:19 AM
!!summon 29074
 
Anyone happen to know if there are any CSS reset things that basically reduce everything down to having the styling of a div or a span?
 
@twiz we have one internally
 
Is that of high proprietary value..? haha
hint, hint...
 
doesn't do everything, but it's just a step further than normal resets
 
Has anyone ever really wanted a button with default styling
 
12:25 AM
This doesn't go that far, but it's one step closer
we use normalize + that
 
It seems somewhat strange to me that browsers even have all these crazy default styles at this point.
It would be kind of nice if the html5 doctype just threw out defaults.
You'd have to worry about the old browsers anyway, but still...
 
@Loktar I made the mistake of getting on the transit... This is taking forever.
 
12:46 AM
@rlemon what transit?
 
i need help imdummyhelpme.github.io/vlc issue is when putting the video in full screen
full video doesnt show up
 
Why doesn't ng-include 's onload work?

http://plnkr.co/edit/pAOrScdHeO8YtyPpS2Fp?p=preview
Anyway I am trying it from my mobile browser...
 
Hey
 
1:06 AM
does anyone know how to send message to a user on github
 
checkout this beautiful bootstrap code: jsperf.com/detailed-bootstrap
 
@mash rss
 
? :\
 
@mash ru good with js?
seems like user stopped working on the project
 
what project?
 
1:16 AM
github.com/Afterster/videojs-vlc issue is with full screen
 
what kind of issue? what have you tried?
 
when u full screen the video size is small
 
well that one file is missing
 
which one?
 
you didn't add the (ugly) vjs-fullscreen class
 
1:27 AM
do i add within video tag or in head
 
ohh well now you removed it completely.
 
when i added the class vjs-fullscreen its shows full page of player
 
well what do you want?
 
it kind of does the trick
but im gona have to embed it though
 
?
 
1:40 AM
but im gona have to embed it though
 
@Steve I have no idea what you mean. jsfiddle.net/grhnv4zt/show
 
try doing full screen u will c the issue
imdummyhelpme.github.io/vlc when using vjs-fullscreen it shows the video in full screen first but if u were to exit the full screen then width changes it to what it suppose to be
 
2:15 AM
@mash thanks for ur help
the plugin is buggy i tried using it the video freezes
 
2:51 AM
anybody ever experienced when you cannot insert a new attribute to your javascript object?
im puzzled with this
 
3:02 AM
@Eralph has the object been frozen?
 
what you mean frozen @phenomnomnominal?
im not sure..how do you check?
 
look for an Object.freeze
 
i have checked through Object.isFrozen(obj), and it says false
and i have not inserted any code that says Object.freeze()
 
this keyword in the constructor doesn't refer to the constructor itself, but rather the resulting objects, right?
 
3:20 AM
@StevensHaen if you are calling it with new, then yes.
 
@mintsauce what about the self keyword?
 
What about it?
And it's not a keyword.
 
@StevensHaen There is no self keyword in JS / ES.
 
@Sheepy What was function _private intended for?
Also why does
var module = {
  x: 81,
  getX: function() { return this.x; }
};

module.getX(); // 81
 
3:36 AM
@StevensHaen probably because colorless green ideas sleep furiously
@StevensHaen Why do you think it wouldn't?
 
Why does getX look for the property of the parent object, why isn't this referring to the function?
 
@StevensHaen What do you mean by 'itself'?
@StevensHaen If you call a.f(), this in f will refer to a. If you call b.f(), this in f will refer to b.
Even if f is the exact same function. this is resolved dynamically.
 
@mintsauce what if a or b aren't objects?
 
If it's not an object, it doesn't have a property.
 
Oh, I see. So this is referring to whatever comes before the dot notation.
this.x = 9;
var module = {
  x: 81,
  getX: function() { return this.x; }
};

module.getX(); // 81

var getX = module.getX;
getX(); // 9, because in this case, "this" refers to the global object

// Create a new function with 'this' bound to module
var boundGetX = getX.bind(module);
boundGetX(); // 81
 
3:42 AM
@StevensHaen Yes, give or take some scope.
 
Why does getX()'s this refer to the window then?
 
@StevensHaen Right.
@StevensHaen It depends on calling context.
this in 'global' scope refers to the window object in a browser.
 
we're calling module.getX both times, it's an expression in the latter example
I know that, but still unclear
 
@StevensHaen both times? There are three examples.
 
I'm talking about the second
 
3:48 AM
@StevensHaen module.getX is simply a property that refers to a function. That function doesn't care what refers to it. this is resolved when the function is called.
 
but both times it's called in the global scope. The difference is that the first time it was called immediately, the second time around there was an expression and it was called later.
 
!!> var func = function(){ return this; }, a = {name: 'a', f: func}, b = {name: 'b', f: func}; [a.f(), b.f()];
 
@mintsauce [{"name":"a","f":"function (){\n\"use strict\";\n return this; }"},{"name":"b","f":"function (){\n\"use strict\";\n return this; }"}]
 
The first time this was bound to module, the second time, to window.
 
I got that. But why? The first time the func was invoked straight away, the second time around it was saved in a var and then ran.
 
3:54 AM
They were both references to the same function.
The only difference was the calling context.
a.b() sets the calling context to a. That's all.
 
But both are module.getX (similar to a.b)()
 
No.
Both are the same function.
The function isn't module.getX.
module has a property getX which refers to a function. That function exists in its own right.
Functions are values in JavaScript.
 
Ok, I get it
 
4:14 AM
@AwalGarg Hahahaha what nuts
 
@StevensHaen It declares or express a function named _private. There is nothing special about the name; it can be _omnipower or _God.
 
I see
 
hey!
 
Compare with other languages, JavaScript has relatively little 'magic'.
 
@Sheepy JavaScript's magic is more on the level of what a sophomore wizard college attendee would come up with
 
4:23 AM
has anybody checked out log4sure.com I am in need of some feedback :)
 
@Sheepy what is the purpose of magic funcs?
 
@StevensHaen In some languages, certain function names has special meanings. Like __get__ in php. These are magic functions because they are not called or used like normal functions.
@StevensHaen By the way, function names that start with one underscore, like _private is usually intended for private use by the object/class or related subsystem. The underscore is a signal for "Think twice before calling me!".
 
@Sheepy @StevensHaen It's often considered to be bad practice, but it's worth knowing when reading others' code.
 
4:41 AM
can anyone help me please, where I can find good resources for learning non-blocking code.
 
@jemz You mean WebWorker?
 
5:03 AM
@jemz I remember this html5rocks.com/en/tutorials/workers/basics tutorial helping me out with understanding webworkers
 
I don't think he's talking about WebWorkers, I think he is meaning node-style non-blocking IO
 
@phenomnomnominal, yes
 
@jemz Perhaps you can use a promise io library to simplify the task?
 
@Sheepy, is this also can be use in js ?
 
@jemz Which? Worker or Promise or File IO?
 
5:11 AM
@Sheepy, I mean is non-blocking pattern also use when writing js code ?
 
@jemz Yes. Most ajax code is non-blocking, for a starter. I now also use lots of workers.
 
What does worker do?
 
@Sheepy, can I ask what is webworker ?
and how it works ?
 
A worker is a Thread. A rather heavy one, but still a thread.
So you can write multithreaded JS apps with worker.
 
I've never really understood multithreaded vs event-based
event-based should be triggered by an event by the sound of it
 
5:15 AM
@StevensHaen, me too
 
event-driven = you still do one thing at a time, you just don't have full control about in which order things happen
 
how do we know it is multhithreaded ?
 
when two threads see each other change the same variable, you have multithreading
 
Event based = function triggered by event.
Multithread = function runs in another thread and does not make the browser hangs while it is running.
And no, in JS threads do not directly share data like that, unfortunately. They need to communicate by passing messages and handing over data ownership. Quite a pain if you are used to better designed languages.
 
@Sheepy, Thank you...is there a good example for Multhithread ?,I am new to this.
 
5:19 AM
In Haskell reading / writing to mutable variables is quite an explicit task as well
 
Google javascript web worker example. It's not exactly new by now...
 
that is, readIORef :: IORef a -> IO a; writeIORef :: IORef a -> a -> IO ()
Even cooler is an MVar, which is essentially a one-element producer-consumer queue on steroids
... and the STM monad, which adds transactions to the shared memory.
 
Wow. World of programming.
 
> retry :: STM a

Retry execution of the current memory transaction because it has seen values in TVars which mean that it should not continue (e.g. the TVars represent a shared buffer that is now empty). The implementation may block the thread until one of the TVars that it has read from has been udpated. (GHC only)
 
Interesting. Looks like it tries to be MT friendly.
 
5:34 AM
"tries to"?
It even has forkOS (which spawns a real thread) and fork (which isn't guaranteed to) if you want this kind of control
The easiest way is the par method, though. It causes the evaluation of its first argument in a new thread, then evaluates to its second argument.
... and a synchronised stack is super-easy and super-cheap - just stick a list in an MVar and cons/uncons to push/pop.
 
5:50 AM
I am not sure because we got very fine control in Java. And Sun/Oracle keeps expanding the concurrent components that we can use.
 
Namely?
 
when using callback function is that a non-blocking code ?
 
6:10 AM
Do you mean forkIO?
> forkIO :: IO () -> IO ThreadId

Creates a new thread to run the IO computation passed as the first argument, and returns the ThreadId of the newly created thread.
 
@JanDvorak Fine control like when to synchronize states, or atomic variables; components like ReadWriteLock or hierarchical Phaser (multi-phase dynamic counted latch); on easy to use side Java has Stream.parallel() to apply concurrency to fluid style data operation.
 
Sure you have atomic variables in Haskell. Not sure how much the compiler wills to reorder these, but I'd hardly call volatile/synchronised a fine control.
Especially since Haskell's IORefs and MVars are volatile by design.
That is, Haskell prevents stale data
Not sure what Phaser is either. Link?
What is Stream.parallel()? A function that spawns a new consumer thread for each frame in a stream? That sounds like a rather hungry version of a consumer/producer queue
 
6:25 AM
Speaking of Haskell libs, I am wondering what you think of this @JanDvorak drmaciver.com/2015/04/the-1-reason-i-dont-write-haskell
 
norepro about the stuck state.
The vast majority of what I use is in base.
 
@JanDvorak Phaser can be regarded as a very fancy counted latch. That you can arrange in a tree to reduce lock contention. stream.parallel works by splitting data rather than operations; last I checked it won't even consider splitting unless you feed it over 8k integer (for an IntStream).
 
In Haskell a list is essentially a stream of data. Haskell even goes as far as loading files into memory on a per-use basis. Just do readFile - it gives you an unevaluated string. When you try to actually read the string, then it starts actually pulling the data into memory.
 
Yes. The beauty of functional programming :D
 
Merging two giant files together? Same code as in-memory merge + 2x file read + file write.
 
6:35 AM
1
A: Javascript:: using querySelector to fetch this.id

Shrawan RajaUse alert($(this).attr('id')); This will return the id value of the selected div

PLEASE downvote
alert($(this).attr('id'));
Couldn't possibly be worse.
 
Sure could
He could have used document.write to demonstrate functionality instead of alert :-D
 
I'm tempted to +1 it for pulling in a 82KB library to alert an id
but I wont
 
@RadonirinaMaminiaina: $(this).attr('id') is never correct. That's like loading your car up on a truck, loading that truck into a ferry, then ordering a captain to send your car to the neighbours. — Cerbrus 44 secs ago
That should be clear enough :P
 
Can we nuke the question?
 
Some time, Audio stop recording isnt working, and throw error stop not a function.
 
6:40 AM
For what reason?
If you find a good close reason, I'm game.
 
Then... CW answer?
 
CW?
 
community wiki
 
function stopRecording() {
isRunning = false;

recorder.stop();
inputVoice.disconnect(AudioContext.destination);
uploadAudioFile();
}
Some time recorder.stop throw an error? do any one know. is it a bug in getUserMedia Api or I am missing some thing
using chrome and mozilla
 
@JanDvorak I wish too. But it is two simple questions combined, and I doubt I'd find an exact duplicate. Finding simple dups is already difficult enough...
 
6:43 AM
@Sheepy too broad?
 
Hm, I don't really see the point in a CW
Too broad applies
There's a lot wrong with the question
 
@JanDvorak Or too localise. Yes I agree there is a lot wrong with the question...
 
Wow, that answer got 2 upvotes
 
i am waiting for a good dude to pop in because i have a stupid question
 
!!tell Joseph welcome
 
6:51 AM
@Joseph 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.
 
Who is going to help me
 
> Some time recorder.stop throw an error?
What error?
 
well it happens that in version 4.5 and above of jqgrid they added the search functionality to the toolbar and it also happens that i have an older version that my employer forbids me from removing . I was wondering if it is possible to adapt the new search to the old library without risking too much regression ...
 
recorder.stop() isn't a function
 
@Joseph: So you want to manually add a library's new functionality to a older version of that same lib?
 
6:55 AM
yes , unfortunately that is what i am looking to do
forced to do *
 
Why exactly can't you update?
 
Those libraries tend to be quite large, and a pain to maintain manually...
 
because they have a stupid set of rules that makes it costly to update all the library ....
 
Tell them how costly it would be to manually copy the new function to the old version.
As in wasted hours...
 
7:00 AM
well, in fact not that much , i think
 
Getting familiar with the inner workings of the library. Isolating the new function, copying it, realizing it ties in EVERYWHERE , hours and hours of debugging
 
i have to create the stupid element and on click set the right operator in the filters
yes yes agreed
 
Hi all! Anyone could help setting up nginx with php?
 
Is someone experienced with Require.js? I need to implement a form builder in a web application and I found Bootstrap Form Builder.. Problem is, I need to make some edits, but they are not updated, so I need to rebuild with Require.js but I really have no idea how to do that
I used NPM to install require and if I try to rebuild it I get a build.js as output
 
@Julo0sS: php room, maybe?
 
7:04 AM
@Cerbrus lol thought about it, just after sending my message... ^^
 
My bad I said erquire.js but it's r.js
 
CV'd
 
7:24 AM
can I ask is my code correctly following the pattern non-blocking code pastie.org/10121605 ?
 
Aaargh! Too much whitespace!
 
@jemz The code you show is to short to tell if your design is sane. There's no obvious problem in what we see
 
Okay I will show the inserting data
 
That code isn't "definitely not blocking"
 
It depends on the for loop, just adding a callback doesn't make something not-blocking
 
7:31 AM
here it is I added the insertion pastie.org/10121615#
 
@Cerbrus there?
 
On and off
 
@jemz Have you tried running it? Because it looks like it will invoke the callback before it's done if pool.getConnection and connection.query are async
 
If I get a way to handle that in php that would be great
please don't care about the way I am using the params
I don't want to use in that way
 
Don't you get it?
We can't help you fix code we can't see
 
7:41 AM
I think.. no
 
@ivarni,what do you mean ?..so my code is not performing non-blocking ?
 
somewhere , you're doing something to get that parameter
 
there is no code to show
 
Or to add it to your query
 
yeah leave the way I am doing to that param
 
7:41 AM
FFS
 
I don't want to do in that way either
 
That's your only option
 
ohh ok
then I need to dive deep in to that strange code
 
How did you expect to change the parameter if we can't change the way you get or set that parameter?
 
ok leave it
How do you add params to query?
 
7:46 AM
@ivarni, I tested it and it logs first this "done inserting"
@ivarni, is my code still not performing the pattern non-blocking ?
 
8:06 AM
hey guys, anybody ever experienced adding a new property to a javascript object but is unable to see it in the object itself when printed?
 
@Eralph Can you reproduce this in a fiddle ?
 
@ivarni ,why is that firstdone is the last called ?
insertDB(id,data_array,function(data){
console.log(data);

});
console.log("First Done!");
 
hey guys Is there any alternate of $(documet).ready() e.x I need to append some css when I get the html response on ajax call.... I want that when div with id croppic exists the action should take place by its own so that I can append css and other stuffs....
?
 
load() ?
 
8:12 AM
@jemz because insertDB is async, the function you're passing in is a callback that gets invoked once the insert is finished but as you've seen that happens after the for-loop is done. You shouldn't be calling the callback untill all the insertDB callbacks have been called.
 
sigh They aren't even trying
 
Do them a favour and report it then :)
Also good morning
 
Morning
 
@BenFortune I can't
 
8:17 AM
@BenFortune Nope.
 
Click it again :p
 
You sneak
I wonder if it can persuade me to move from Atom
 
8:19 AM
@BenFortune Why would it?
 
@BenFortune isn't it just atom
 
The debugger looks nice
 
no way it will be better than dev tools
 
@BartekBanachewicz node/iojs?
 
Isn't the dev tools in Atom local to Atom though?
IE not being able to run your scripts through it
 
8:22 AM
@BenFortune No, most IDEs use the native debugger, and implement the remote deubgging protocol
 
Atom isn't an IDE though
 
@ivarni, where should I put this callback("done inserting"); ?
 
@BenFortune no, it's a shitbrick
 
inb4 use vim
 
emacs, but I'm not forcing anyone
 
8:24 AM
VS Code looks like it'd be a nice alternative to WebStorm though
 
@rlemon thanks, looks good.
 
@BenFortune How, exactly? :|
 
@jemz I'm a bit busy but a quick search on SO came up with stackoverflow.com/questions/15162049/… which have a couple of suggestions. You can also look into using github.com/petkaantonov/bluebird and leverage promises which would be a better solution. Or maybe the DB library you're using already works with promises.
 
@ivarni, Thank you
 
8:29 AM
@AwalGarg lmao
 
:D
 
I've seen that on twitter but I don't get it. Is it just somebody renaming atom.exe to another name ? What's the matter ?
 
posted on April 30, 2015 by kbironneau

/* by Boppel */

 
@dystroy Just installed it, xbenjii.co.uk/i/kiyW4
 
Can't we remove the coding love's feed ? Most of it is just retarded circlejerk with ads around
 
8:34 AM
Yes, please, do remove that one.
 
Madara Uchiha has stopped a feed from being posted into this room
 
Also edit the room description while you are at it.
@BenFortune How come the size is 0 bytes?
 
No idea
 
Can you start a Chrome DevTools timeline recording from your own code?
 
@OliverSalzburg No.
 
8:37 AM
:(
 
Only events with the trusted flag and code run in privileged environment is allowed to do so.
 
> Your code can add annotations to Timeline recordings using the console.timeStamp() method. This helps correlate code in your web app to other activity going on or browser events.
This could already help
 
Yes, but you can't trigger starting it.
 
@AwalGarg Yeah, sadly :\
I haven't really worked much with the timeline yet. The additional stuff at the start and end of recordings is distracting me
 
@dystroy i cant seem to reproduce this one in a fiddle..i wonder why
 
8:43 AM
hey there. anyone has three.js experience here?
 
@BennySchudel 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.
 
@Eralph That's usually how you start finding where is the problem
 
yes...but let me give you idea as to how it happened...
projectList = [];

// projects array of objects from mongodb
projects.forEach(function(pr){
pr.new_field = "hey";
projectList.push(pr);
})

// will not show `new_field`
console.log(projects);
 
I bet you're calling a asynchronous mongodb function in your loop on projects (or around the loop)
 
if i iterate through the array again, the new_field property cant be found...
 
8:46 AM
and you log before the callback is called
 
it is executed right after the callback
ironic thing is...when i do this right after the first block of code...

projects.forEach(function(pr){
console.log(pr.new_field);
});

it displays correctly..
 
@Eralph why did you log projects, not projectList?
 
@turutosiya 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.
 
@Eralph after the callback is executed ? Are you sure ? Do you understand what asynchronicity means
 
@turutosiya ohhh...sorry...typo...that should be `projectList`

thanks
@dystroy yes
yes I am sure
 
8:52 AM
Please close that shit :
-2
Q: Why should I use a debugger?

Jack TwainI'm a recent graduate in CS and a Java programmer. During my studies I never liked to use debuggers to debug my Java code. I always use print statements to check the expected behavior of code statements. However, now I'm looking for jobs in the industry and maybe they could ask me if I know how t...

Everybody is voting on "yes I agree with this opinion"...
 
CV'ed
 
Please, SO users, 1) don't answer opinion based questions. 2) Don't just upvote answers on "yes I agree with that opinion". — dystroy 27 secs ago
 
I can't imagine writing any real code without a debugger.
 
I can and I often do. It's just another convenient tool.
 
@dystroy here is how looks like...

Project = require('model/project')
Project.getAll(function(projects){
projectList = [];

projects.forEach(function(pr){
pr.new_field = "hey";
projectList.push(pr);
})

console.log(projectList);
})
 
8:55 AM
up arrow, ctrl-A, ctrl-K, enter
 
@Eralph Are you sure that projects.length > 0 ?
 
@dystroy ctrl-a not required on SO
 

« first day (1657 days earlier)      last day (3291 days later) »