« first day (1298 days earlier)      last day (3667 days later) » 

12:37 AM
@nickcoxdotme 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.
 
@SomeKittensUx2666 i.imgur.com/BoNHCDO.jpg o_O
 
1:06 AM
Hi, could anyone tell me how to get the first level children of one element using jQuery?
 
like, did you even google?
 
yeah, I find the $("some selector> children selector")
 
okay
you missed the point then
!!google jquery children
 
but my JS use $(this) to locat parent element, I don't know how to deal such situation.
$(this).find(">children selector") does not work.
 
1:11 AM
look at the first link Caprica posted
 
then possibly feel foolish for not seeing jQuery.children when trying to find children with jQuery
 
Your googling is bad and you should feel bad.
(Not really, but maybe a little.)
 
hey
how's it going?
 
Okay, just finding my math skills are shit
 
1:16 AM
how did you make that discovery?
 
Trying to differentiate one quartic divided by another :p
 
I got it, sorry.
 
lkjasdfl;kjadf;lkjas;dlfkj;ldfjg l;kjfadsl;jkfdsajkl;fadsl;jksdf;ljk asfd;ljkasfd
Quitting smoking sucks
 
smoking is worse
 
shut up
i'm going to switch to e-cigs
soon
 
1:23 AM
In a fullscreenchange event, how can I tell whether it's currently in fullscreen mode or not?
 
document.fullscreenEnabled
 
the docs seem to indicate this can return true even when not in fullscreen
> On return, isFullScreenAvailable is true if the document can be put into full-screen mode.
 
isn't that something else though
> fullscreenEnabled
The fullscreenEnabled attribute tells you whether or not the document is currently in a state that would allow fullscreen mode to be requested.
hmm
yeah I guess you're right
 
toggleFullscreen: ->
      if document.fullscreenEnabled then document.exitFullscreen() else document.documentElement.requestFullscreen()
 
fullscreenEnabled is returning true even when it's not fullscreen
fullscreenElement is also non-null
 
1:36 AM
you need a fallback to isFullScreen
Maybe
I can't remember.
 
I can't find docs for that
There is fullScreen, but it looks like FF only
 
I think it's old
Wait, are you doing fullscreen with like F11?
 
nope, requestFullscreen
 
FullScreen or Fullscreen?
 
I have the whole || chain, don't worry
 
1:40 AM
sweet
hmm
Can't remember
hit the second button from the right at the bottom
 
paste the code? :P
 
10 mins ago, by phenomnomnominal
toggleFullscreen: ->
      if document.fullscreenEnabled then document.exitFullscreen() else document.documentElement.requestFullscreen()
With that polyfill that I posted
what browser are you in?
 
Opera and Firefox
 
works in FF
 
console.log(document.fullscreenElement !== null);
console.log(document.fullscreenEnabled);
logs true for both, when I start fullscreen and when I end it
 
1:46 AM
Bizarre
document.fullscreenElement is undefined for me
 
try the ||-chain
document.fullscreenElement = document.fullscreenElement || document.mozFullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement;
 
still null
 
oh, wait
derp on my part
 
hey all, the JS n00b is in the room!
 
enabled still is true, but I know why element is non-null
because I assigned it, ffs
it works now :)
I'm learning three.js, FYI. I'm gonna ping you about it all the time now :P jk
 
1:57 AM
hey can someone help explain what a javascript "method" is ? i guess in relation to objects
reading a tutorial online but it's not really making sense yet
i understand it's basically an object property that happens to be a function, but the syntax kind of throws me off
 
It's basically a function that runs on an object
for example, foo.bar() -> bar is a method
 
let me write some code and show you where it's throwing me off
 
@KendallFrey haha sweet
 
Indeed it is. I'm liking it a lot.
I suppose that fact that spend 10% of my time writing three code and 90% messing with the browser says something.
 
2:32 AM
guys, why doesn't this work?
var bob = {
age: 34
setAge: function(newAge) {
    bob.age = newAge;
    }
};

bob.setAge(20);
 
@redshift: have you tried the console?
Look at the syntax error
 
yea i see i forgot a comma after 34
although it got rid of syntax error, it's still not printing anything
keep getting 'undefinied'
 
what it is supposed to print?
 
console.log(bob.setAge(20));
isn't it supplosed to display 20 in console?
 
No, you're not returning a value
 
2:37 AM
ok that did it:)
i get confused when to add the 'return' keyword
 
3:03 AM
guys, why is this not correct?
var setAge = function (newAge) {
this.age = newAge;
};

var susan = new Object();
susan.age = 25;
susan.setAge = newAge;

susan.setAge(35);
 
@redshift: susan.setAge = newAge;
Also, please use {} instead of new Object
 
ok but first, why is newAge != to susan.setAge?
the parameter 'newAge' is what should be assigned to susan.SetAge, no?
 
newAge is not defined outside the setAge function
i.e. ReferenceError: newAge is not defined
 
@OneKitten but newAge is being assigned to the object's age, no?
 
@redshift: I think you meant susan.setAge = setAge;, not susan.setAge = newAge, they are completely different
 
3:11 AM
onekitten, thanks
time to go bed. I'll chew on this in the morning.
 
3:21 AM
bye
 
goooodnight
 
@CraigLondon 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.
 
hey guys, could you please vote to reopen stackoverflow.com/questions/23485342/jquery-show-not-work
I've prepared an answer for it, but I can't post it because it's closed
and as I've said in the comments there, I know what the problem is
 
@Loktar that is the most epic gameboy I've ever seen
 
haha yeah its pretty kickass
titled "you came to the wrong neighborhood mother fuckers"
lol cracks me up
 
3:35 AM
lol, watch as the Nintendo brethren bow down before the almighty neo-geo
I had a green Gameboy mini
 
me too, I still do it was my first!
 
Wario World was the bomb
Your first, eh? Before that I had one of the grey bricks :P
 
heh I bought friggin Empire Strikes Back as my first game for it..
 
Nice.
 
my fam was poor :? I couldnt get one until I had a job. Worked my ass off when I was 15 or 16 and got that and an N64
 
3:37 AM
Bomberman was pretty epic
 
heck yea
 
Ah, the N64. What a great console (and horrible gamepad)
 
super bomberman 2 for the SNES was my fav
haha dude I love the n64 pad! But it gets a lot of shit.
 
Adams Family was my favourite on the SNES
 
I've been playing Paper Mario on the n64 for the past week or so, have put 16 hours into it so far.. hoping to finish it up this week
 
3:38 AM
I just hated how quickly the joystick wore out
 
yeah the build quality for the analog is terrible
 
I was king of Goldeneye
 
my original stick is dead, I had to order a gamecube replacement
 
Unlocked every single time cheat, including Invincibility (Facility, 00, 2:15)
 
and the gamecube replacements dont feel the same :?
haha yeah god some of those were hard
the hardest one for me was the stupid aztec level on hardest or whatever to unlock the egyptian level
you know whats badass about n64 games that save on the carts?
 
3:39 AM
Ah yeah. lol, that room with the floor maze :P
what's that?
 
they use EEPROM so no battery backup, meaning they will never be lost :)
 
Nice.
 
I was happy to find that out, still have my original goldeneye profile
 
And they load like a demon
 
heh because that was a friggin ton of work
 
3:40 AM
The guys that made Goldeneye went on to make TimeSplitters, which was awesome
on the PS2
 
ah I havent played that, but heard its great
they also made Perfect Dark on the n64
which is another fantastic game, but I didnt put as many hours into it as goldeneye
whats crazy is the team was all pretty new over half had never worked on a game before
 
Yeah, it's similar to that and Goldeneye only much more arcadey. The campaign is good and all, but there are hundreds of challenge modes which get stupidly hard
 
I think thats part of why goldeneye turned out so well
 
I didn't know that! Nice.
They sure knocked it out of the park
brb, tea
 
4:29 AM
hello, can anyone help me in calling webservice by javascript i am facing some problem
 
@shishir123 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.
 
ok @CapricaSix
can anyone help in calling webservice from javascript?
 
@shishir123 Yes, just tell us what's the problem you're having.
 
@shishir123: BTW, Caprica is just a bot.
 
ok, i wrote a webservice method which open and print the html elements in excel and i call this webservice from ajax but it can not open any excel file
@CapricaSix
my web method is
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public string Export_ex(string elem)
{

string elements = elem;
HttpContext.Current.Response.ContentType = "data:application/vnd.ms-excel";
HttpContext.Current.Response.AddHeader("content-disposition", "attachment; filename=Print.xls");
HttpContext.Current.Response.Write("<html xmlns:x=\"urn:schemas-microsoft-com:office:excel\">");
HttpContext.Current.Response.Write("<head>");
HttpContext.Current.Response.Write("<div>");
HttpContext.Current.Response.Write("<META http-equiv=\"Content-Type\" content=\"text/html; charset=utf-
java script function is function fun() {

//var data = ;
var data = { "elem": demo.innerHTML };
$.ajax({
type: 'POST',
url: "WebService.asmx/Export_ex",
//url: "WebService.asmx/hello",
data: JSON.stringify(data),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(response) {
var show = response.d;
var report = jQuery.parseJSON(show);
alert(report);

// alert(show);
alert("success");


},
failure: function(msg) {
alert("Error occur, could not load the service.");
 
4:40 AM
!!design or logic
 
@eazimmerman design
 
yay
 
!!i suck or you suck
 
@OneKitten i suck
 
!!up or down
 
4:43 AM
@eazimmerman down
 
@CapricaSix can you help?
 
!!help
 
@Mosho Information on interacting with me can be found at this page
 
@Connor: what to close it as? Hmm...
 
4:55 AM
@OneKitten Off Topic: belongs on meta.stackoverflow.com
@OneKitten do you copy, over.
 
Not 100% sure about that though.
 
@OneKitten It's a question about asking a question on stackoverflow!
 
@Connor: no, it's not
The user has tried to change the font of the Stack Overflow ask page using Tampermonkey, but when they do so the markdown preview of the question doesn't appear.
 
@OneKitten I take that back
That's still a bad question
 
@Connor: agree, closed as "lacks sufficient info"
 
5:00 AM
I can't, I've retracted my vote
 
@MostafaJamareh 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.
 
33
A: Why is -1 > null true in php

OneKittenPHP converts both sides to booleans when there is a null on one side. The PHP manual section on Comparison Operators states that where the type of operand 1 is "bool or null", or vice versa, it "converts both sides to bool, FALSE < TRUE". Any number that has a non-zero value is considered to be...

the question...
that's the worst moderating action I've seen on this site so far
 
@user74756e61 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.
 
5:40 AM
@Connor what exactly is? The question has two closures, one reopen with a second one pending, a ton edits and rollbacks and even a mod-lock because of those rollbacks. Which was the bad one?
 
@JanDvorak I suppose i didn't take the edits into consideration, nevertheless I still don't see how it's "opinionated", there is a factual reason behind it, surely?
 
I did vote to reopen, but what exactly were those ot-votes back then and do they still apply?
and it wasn't a single-handed moderator vote either.
 
@JanDvorak what votes
 
off-topic closevotes
that caused the first closure
 
> put on hold as primarily opinion-based by Chris, TOOTSKI, SomeKittens Ux2666, tereško, Robert Harvey♦ May 1 at 21:38
I don't understand what you're getting at...
you mean, the meaning could've changed?
 
5:45 AM
> Post Closed as "off-topic" by Alma Do, Dan Lugg, salathe, Amal Murali, Second Rikudo
occurred May 1 at 20:41
 
ok. need a cup of tea as i have no idea what you're on about jan
 
I mean, was the first closure correct, and did it stay correct after the edit?
 
Cross posting here, becuase I'm proud of this answer lol
0
A: draw 10,000 objects on canvas javascript

LoktarI can get you 10,000 but there are two main drawbacks. You may notice the images don't respect transparency entirely, its possible to fix.. but that's beyond the scope of this answer. You will have to use math to do any sort of transformations because transformations can not be applied to Imag...

not many questions/answers make me stay up until 1am
I like how some people said it couldn't be done.
I'm going to write an article now on crazy fast canvas manipulation with 10k+ objects and submit it to @simonsarris :)
alright bedtime night all
 
@JanDvorak I can only see one closure..
@Loktar nice :)
 
@Connor check the very bottom of the revision history
 
5:57 AM
ohh
 
@AaronShen 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.
 
\me handles Connor a cup of coffee
 
@JanDvorak I just got tea :) they both look invalid to me, off-topic is quite broad though, depends what sub-section
 
OK... I've checked what the revisions #3 and #4 were. WTH were our high-reps doing???
 
@Connor: other + comment deleted? Can't see how any of the others fit
BTW that was a test to see how much rep you can get from copy-paste documentation (hint: a lot)
 
6:12 AM
@OneKitten again, maybe I'm not on earth today, but i have no idea what you're on about
 
@Connor off-topic close reason
 
@OneKitten oh, it could've been, but I still don't think it should have been closed
 
@SomeKittensUx2666 hm, not at all?
 
0
Q: Unable to receive a Failure from a scala Future

user7124Any idea why the code below can handle the Success without any issues, but when trying to return a Failure ends up throwing an Exception? Exception in thread "main" au.com.ingdirect.splunk.Implicits.package$LameExcuse: hello at au.com.ingdirect.splunk.Implicits.package$RichJob$$anonfun$asFut...

 
6:31 AM
Hey
 
hey :)
 
I've these lines in a js file:
 
sweden++
usa--
 
// Class
function first() {

}

// Static Method
first.defineInheritanceType = function (parent) {
    if (parent.constructor == Function) {
        // Normal Inheritance
        this.prototype = new parent;
        this.prototype.constructor = this;
        this.prototype.parent = parent.prototype;
    }
    else {
        // Pure Virtual Inheritance
        this.prototype = parent;
        this.prototype.constructor = this;
        this.prototype.parent = parent;
    }

    return this;
}
 
@Panx 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.
 
6:33 AM
@MRS1367 all i can say is YUCK
//you can acutally just do

Function.prototype.defineInheritanceType = function(parent){

}
then u will have this uglyness everywhere
 
I don't get why people use complex inheritance schemes in JS. It's so easy doing it the simple way(s)...
 
@AbhishekHingnikar with a cherry on da top
 
@dystroy yeah... same
sounds like people just want complexity for the sake of it
 
Look, you don't understand. You need 10000 jQuery plugins to even get started in JS (I'd recommend the jQuery math plugin, image loader plugin, slider plugin, and number spinner plugins first), then add your favourite class library and make everything one, then make sure to add Backbone so you can say it was "made with latest technologies".
 
@AbhishekHingnikar reason : post-prison support which most countries doesn't have
 
6:48 AM
@OneKitten Pro-tip, use Angularjs also if you want to update title bar like stackoverflow chat does
Angular updates like good update do, but yeah, jQuery is good OS
 
@dystroy because "microsoft"
 
@AbhishekHingnikar I would rather have said "because oldish OOP trend & java"
 
MS isn't the only one doing overly complicated programs
 
^ I ain't joking my friend
 
6:50 AM
Hum...
 
bahahaha IE dev center
 
@KarelG it is actually a good place
i will miss my svg accelerated environment chrome is piece of shit on huge images :[
 
@AbhishekHingnikar If I remove the last word from that search query, I don't get any MS result on the first page
 
@dystroy very true, but I was forced in college to use microsoft tech
just to show them how much they suck, i am going to write the same thing in jabba script, natieeev for chrome
 
@AbhishekHingnikar Most of us were forced to use microsoft tech in the companies we work for :(
 
6:53 AM
Yup :(
 
well, .NET and directX are the only things from MS which is good.
rest is currently crap
 
@KarelG REST is not crappy
@dystroy I have a bet with my dad & HOD , if i can re-do my app in 1 day in Angular/Less/Flask
they won't ever tell me i need college :D
// it just took 4 months to build in WinJS and the MS tools :[
 
why are you losing time here ? code
 
Hi :)
 
@AbhishekHingnikar : <_<
 
6:56 AM
waiting for the tools to be downloaded
 
dl'ing ms tools ? :p
...
i have 3 small AJAX requests on my page. IE only does the first 2. Other browsers are smooth with that
persons whom is encouraging IE should be shot down
 
@KarelG subl, pg, flask, python
oh and yoeman
 
0
Q: Can I untangle this nesting of 'when' promise invocations?

NilzorI'm new to the when.js javascript library, but I'm familiar with async programming in C#. That's why I find this code to be unwieldy: filters.doFilter('filter1name', reqAndPosts).then(function(filter1) { filters.doFilter('filter2name', filter1).then(function(filter2) { filters.doFilt...

 
7:13 AM
when checking for windows.location.origin, i stumbled upon this
 
@KarelG Ahh, stumbleapon, that's something to do
Everything is apparently harmful in javascript.
Decide for yourself
 
@iniyaval 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.
 
@Connor the blogger is just an idiot making ppl scared for nothing
 
Closures considered harmful, ++ considered harmful, function scope considered harmful, this considered harmful, constructor functions considered harmful, bitwise operators considered harmful, is there anything that's not considered harmful?
2
 
^-- +1
 
7:16 AM
@Qantas94Heavy Yeah, jQuery
It's great, and because it doesn't use any js apis, it's pure jQuery safeness
 
@Connor: oops. Yes. When in doubt, try jQuery.
 
If you want ultimate security do window = jQuery(window) because it makes a jQuery version which means it's safer than shitty javascript
 
Unfortunately, that's not possible, so we just use jQuery(function ($) {}).
 
Anyway, if you don't mind, I'm doing some jQuery-powered stumbling-aponing
 
@KarelG This is totally retarded 1) "harmful" != "limited compatibility" 2) it's not webkit-only
 
gooooood morning stack overflow!
 
yeah, that's why i'm pissed if people posts things while they shouldn't do
 
@DrogoNevets good morning
 
Good morning everyone
 
Morning Javascripters
 
7:28 AM
morning all
can I ask for a few close votes on this
it's sad 4 people answer such a poor question instead downvoting and closing
 
@mehow: no problemo
 
3 ~10K and one over 20K... just wow...
@Qantas94Heavy thanks bud
 
uno problemo, though : you have to know the basics of vba to decide if it's closeable or not
 
well, im in the top 10 so I hope you can trust me on this one
(not being cocky)
 
ok, voted
 
7:31 AM
@mehow: I tell you, they get started and think "I have to get rep quick". Once they have 10k, 20k, even 50k, they keep going like they're addicted to answering crap and seeing that number go up.
 
yeah i see this all the time
 
@mehow some1 upvoted it
 
yeah there have been 2 on it
2 upotes i mean
upvotes*
 
Then half of those users whinge about others reducing their imaginary rep revenue
 
@mehow don't worry, most of us has still common sense
 
7:36 AM
What would be the good closing reason for this ?
1
Q: Javascript Pattern to access the global object

Alberto Fecchii've found this example code var global = (function () { return this || (1, eval)('this'); }()); but i havn't understood its utility. When/why i should use this code? From: http://shichuan.github.io/javascript-patterns/?utm_content=buffer874b9&utm_source=buffer&utm_medium=facebook&

 
too broad IMO
or not enough information to diagnose the problem
 
Hey canvas guy, do you *know* how does requestAnimationFrame works?
I am wondering why some people put the call at the end of the render loop and why some put it at the beginning.
Does it change the behavior?
Does requesting the next frame at the beginning help in any way, like ensure that it will be called at the good time no matter how long it takes for the current to handle the logic and draw itself? Or if not, what are the "double loop" (one loop to handle logic INSIDE the rendering loop) meant for?
 
I'm usually among the closers but I don't see why this one was closed :
0
Q: Creating border triangle CSS

user2992577I want to make div like this: is it possible to make this with css? if it is, how?

@dievardump when you stack an execution, it will always be done after the current one. So doing that at the beginning or end doesn't change anything. Remember : there's only one user thread
 
That's what I think. But I can not understand the reason of the "double loop" if the rendering acts like that
 
7:41 AM
@dystroy :
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist. — John Conde Apr 18 at 13:01
he's one of those delvoters
 
Ok this guy edited his post saying "there is no reason"
 
@KarelG yes but how would you demonstrate how to solve that when you're stuck on this non trivial problem ?
@dievardump what ? where ?
 
> Edit - February 3rd, 2010
As was pointed out in the comments, there is no benefit in running more drawing operations than update operations (except for maybe benchmarking), so you have to either interpolate or skip drawing if there were absolutely no game updates.
Oh no it's the other way.
 
@kmakarychev 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.
 
Hum, it's a bit difficult for me, but I think this answer my question
 
7:52 AM
@dystroy same thoughts.
 
old image
 
Not as old as your mom's!
 
One would hope that his mom be born before 2008
 
8:01 AM
@Qantas94Heavy those 2 reviewers seem to have voted a little too fast...
 
^-- Q -> A :replacing wifi module is what he needs
the error is probably not obvious. Maybe he should call captain obvious :p
that reminds me of some1 from CS coming to our department. She was complaining that her computer couldn't find the printer while she says that she connected it to her computer. That guy whom helped her replied with " these things aren't easy at it seems. Just plugging the cable doesn't say that both devices are connected. " Then she argued that it's not true. Man. i'm happy that i didn't offered my help
 
8:27 AM
@RobinDrost 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.
@bergman 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.
 
@santhoshpatil 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.
 
i am making a image filter application with html5. but i have very little knowledge in designing an UI for the application... The Gelo app on iphone store has a cool interface but i am trying more like a flat UI .. Plus designing a image browser where images would auto fit like in windows 8 start screen. I need some tutorials and advises to do it..
 
pfffff
0
Q: JEE: Best practice to store password without hashing

John RumpelWithin my WebSphere web application, I have to store passwords without any hashing since further processes will need to recalculate the clear text to trigger some actions. For example, I have a device PIN and this pin shouldn't be stored in clear text in the database. But a daily service will ne...

 
Public-key cryptography, also known as asymmetric cryptography, is a class of cryptographic algorithms which require two separate keys, one of which is secret (or private) and one of which is public. Although different, the two parts of this key pair are mathematically linked. The public key is used to encrypt plaintext or to verify a digital signature; whereas the private key is used to decrypt ciphertext or to create a digital signature. The term "asymmetric" stems from the use of different keys to perform these opposite functions, each the inverse of the other – as contrasted w...
I would use that or something similar.
 

« first day (1298 days earlier)      last day (3667 days later) »