« first day (1280 days earlier)      last day (3672 days later) » 

8:00 PM
doc.getElementById("btnSubmit").Click
Application.SendKeys "{Enter}"
the second line will not be excauted until i manually close the popup window fired by the first line
doc.getElementById("btnSubmit").Click
MsgBox "Closed"
Application.SendKeys "{Enter}"
here msg "Closed" will not be excauted until i manually close the pop up window fired by the first line
 
@AdnanAl-Husain - And what is that "Click" property you're using (case sensitive javascript and all) ?
 
user3071008
@Schoening 'A' has no method getPrototypeOf and you're passing window.color to it
 
If I understood ur q, doc.getElementById("btnSubmit").Click ,,,this line is vba code inside excel that click internet explorer button which excaute javascript code that fire the pop up window
 
@Schoening - It's
Object.getPrototypeOf(A)
 
Ohh
 
@Schoening
Object.getPrototypeOf(A).color
ok ^
didn't see that
 
this method is working perfetly to click ie buttons but the question if the button fire a pop up, how to interact with that pop up
 
Thanks guys. Yeah I tried reading the mdn first. But I thought they meant "your object" with Object. Not the Object Object
 
@Schoening - Nope, usually when it's with a capital O (Object), it's the constructor.
 
Makes sense yeah.
 
8:17 PM
I wonder why the StackExchange Android app doesn't use push notifications....
 
But this does mean that when people say adding a property with the same name as one of the prototypes properties will "override" the property is false. Because its still there. You just remove your direct link to it. Maybe just semantics. I could misunderstand it tho.
 
copot.eu/matei/games/dastul/game shadows make it so much laggier
 
@MihaiM 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.
 
@t1wc what was the command again?
 
@Schoening dastul.init()
 
8:25 PM
@twiz cause they don't want programmers to throw away their phones :D
 
right now shadow checking is only from top to bottom
and a constant lightsource at the top
 
@AbhishekHingnikar huh?
 
case 1. you post a question
it becomes a flame war
Ting ding ding ding ding ding Ting ding ding ding ting ding ding ... what did SO say .
 
@t1wc what is that going to be?
 
theorically to make it like terraria or starbound I should do the checking from right to left and left to right, without additional lightsources
 
8:26 PM
haha yea, I suppose that's true
 
@Mosho nothing too good will come out of it
 
@t1wc are you constantly creating new worlds? Sure this can't be fixed by adding a loading bar? Adding a loading bar might even create the impression of "wow! It said loading, but it only used 1 second. That is fast!"
 
@t1wc it looks pretty nice
 
It's a little weird getting notices about chat replies that happened like an hour ago though.
 
stylish :P
 
8:27 PM
@Schoening I could
 
reminds of me lemmings or tanks
 
@Mosho I thought of making my own version of terraria or something
@Mosho lemmings?
never heard of that
 
ew,mnfwa,bjkdkjwlabd
 
sfhkjewfhkjsfhdkf
I concur
 
cheese
 
8:29 PM
being 14 is no excuse to not having heard of lemmings
 
nvm...
 
go google it right now
right now
 
@Mosho XD I've actually just seen the images on google, and I've once saw a guy play it
 
Now that I think about it though... I'm not sure I could even stand to play that game anymore. It involved a lot of sitting around and waiting...
 
waiting for lemmings to plunge to their doom
they had the most gratifying death animation :P
 
8:30 PM
@t1wc huh.. how do I look at source code when it is loaded with require.js ? Or don't you want me to?
 
@Schoening with much pain and misery
 
haha
 
Thanks
 
and actually I don't see the problem of reading the source with require js
 
8:31 PM
In a browser I mean
 
but anyway, I guess github is still better
 
I use browserify
and the other day I noticed the package is 45mb
seems a bit extreme
 
Right now I just use grunt and concat my scripts. (don't hit me!)
 
@Schoening that's what I used to do 2 weeks ago XD don't worry
 
well, if you keep your shit out of the window, nothing wrong with concat
I use concat with angular
 
8:33 PM
wait... is it something?
I thought it was just a short
 
a short what
 
well I used to list all of my scripts in the html page
@Mosho concatenate
 
I would like to improve my workflow a bit. I learned so much over the last 3 days. Why did you stop using grunt @t1wc ?
 
@t1wc well, yeah it's short for a word
 
hahaha
 
8:35 PM
@Schoening never used grunt... missread it :P
 
concat. then. Doesnt matter how
 
I use grunt
I like it, although my gruntfile is getting big
 
@Mosho the only time I really felt ashamed about using concat was when I used node.js and didnt want to bother to write modular. so I just concatted it and fileread it into the main process
 
that is certainly shameful
 
xD
 
8:36 PM
have you never done anything except browser JS? :P this is how it works in traditional languages
 
Actually either way, I think requireJS makes dependencies somewhat annoying to follow
 
Yep. This is my first language. And nodejs is the first serverside interaction I had so far @Mosho
 
How is that even lazier? I'm pretty sure a require() is easier than some concat nonsense
 
well, if he only did <script>'s before
new === scary :P
 
I used some third party libraries that weren't designed for node.js and I wasnt sure how change them properly
 
8:39 PM
ha... yea... those suck... ha
 
how do they suck, they're just as simple
 
Come to think of it, I'm not sure when the last time I used a library that wasn't on NPM was
 
I wrote libraries for myself
using require then is as simple as writing exports = whatever
 
I just mean its annoying when you have to go in and add module.exports
 
I think it's nice
 
8:41 PM
not as nice as npm install something and you're done.
 
well, if you write stuff yourself that you need to link
I think it's simple and concise
 
oh, yea definitely
 
and even helps others read your code
 
requireJS.... not so much...
err AMD... whatever...
 
using node and browserify was sufficient enough that I never looked at other methods
although browserify being 45mb is a pretty huge wtf
 
8:43 PM
So... The stuff I am writing right now is not meant for Nodejs. It's only gonna work inside the browser. Wouldn't browerify be overkill?
 
yea, you must have something weird going on
@Schoening That's why it's called browserify haha
@Mosho I'm not sure what happens if you have cyclical dependencies, but it seems like it could be a mess....
 
you can't
 
and is just a random guess that probably makes no sense
 
it won't run
same as other linkers
and yeah, I thought 45mb was a glitch but I installed it in other places and grunt-browserify is also ~45mb
 
ohhhhhh
 
8:46 PM
I guess it has more features than I know :P
though 45mb for something like that is hard to justify...
 
I thought you meant it was outputting a 45mb file haha
 
no, the library :P
gonna finish my game today
I want to have a nice game portfolio by the next time I intern
 
@SomeGuy lmao it took me a second the get that
 
so I can go work at a sexy game shop
 
I'm just trying to see what I get out of learning to use browserify for my current project. The main libraries I am relying on are Three.js and SAT.js one of which needs html5 to be of any use.
Will browserify help me with exporting via node-webkit?
 
8:49 PM
you don't need to learn anything
you write your stuff with require and exports, same as you do in node.js, and it makes it run on the browser
you can write stuff that can run on either the browser or node that way, without having to change anything
 
So I am actually gaining some speed in my workflow because I no longer have to think about differences in enviorment?
You say require. Not require.js right?
 
oh you still have to think about it, it's still a server vs a browser
@Schoening I meant they keyword used for modules in node
 
yes.
Alright cool.
 
@Schoening If you want to get really fancy, you can use PhantomJS, Selenium, DOMjs, etc to run browser things without a browser
 
for example, I had a piece of logic that I wanted to run in the server
then I changed my mind and wanted it to run in the browser
it was as simple as running browserify and loading the output .js file into my html
 
8:56 PM
@Mosho but don't you have to write all your code with exports tag in front of it?
I wanna learn to write pretty code :< like this stuff:
https://github.com/lodash/lodash/blob/master/dist/lodash.js
 
@Schoening you can pass whatever you want wherever in the file to exports
 
guys, I thought of implementing a seed-based level generation for my game instead of using Math.random() all of the time
but I've never worked with seeds before...
 
Hey guys, anyone familiar with css? please take a look at this goo.gl/RZw4OW On firefox I'm getting following result joxi.ru/PZJRU_3JTJD-Z0XIfts while on chrome following joxi.ru/VJJRU_3JTJDXaH83Mgo can anyone help me?
 
can someone help me?
 
you don't have to do exports = function() {/.../}
you can do var myfunc = function() {/.../} like you normally would and in the last line in the file do exports = myfunc
 
9:02 PM
Oh okay :o ! DUH actually. Any good article you would really recommend?
 
@t1wc Seeds are just something (number or string usually) you pass to a random number generator to determine its output
 
I really want to improve readability
 
@1nsane 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.
 
@Retsam I know what they are, but I don't know how to use them
 
@Schoening well, you can always read or re-read JS ninja or the good parts
but there are many flavors of readability
 
9:03 PM
@t1wc I'd recommend finding a library that provides a random number generator that supports seeding since Math.random doesn't.
 
@t1wc I think you should write every possible outcome as json files. Instead of this lazy random generation.
You will make bug detection so much easier since people can just refer to the exact map
 
ok, so you have no idea of how to do it by yourself, right?
 
@Mosho thx
 
@t1wc Yeah, I've never implemented a random number generator, myself.
 
user1596138
var seed = 1;
function random() {
    var x = Math.sin(seed++) * 10000;
    return x - Math.floor(x);
}
 
user1596138
9:05 PM
@t1wc
 
@Jhawins nice one!
thx
 
@Jhawins Can't decide if that's brilliant or terrible.
 
nice, I would've thought that produces a pattern
 
user1596138
Eh idk
 
9:09 PM
should probably run that and plot the results
doubt it's what most people would consider sufficiently random
 
user1596138
Hey @Retsam what've you got for factorials?
 
user1596138
in JS // math guy
 
user1596138
Anything better than just a boring n*(nn--)*(nn--). . loop? I couldn't find something built in
 
If you mean efficiency, I don't think there's any terribly better than just looping
Though if you want creativity... blog.anguscroll.com/if-kerouac-wrote-javascript
Actually, if you don't mind some accuracy issues, there's Ramanujan's factorial approximation which that linked article mentions...
 
user1596138
I was thinking of doing fractions with factorials and how you can simplify by only doing the decrementing multiplication (a-b) times
 
user1596138
9:16 PM
Is there actually a performance difference to worry about?
 
user1596138
I mean, considering the amount of math most of my animation scripts do in what seems like an instant I guess I'm not really worried. I see no use for them anyway
 
JS math isn't 0.1% of the overhead when you have animations that constantly fire repaints
 
how about just using window.crypto.getRandomValues();

http://jsfiddle.net/5j2kR/
 
does anyone think it's a good idea to prefix a lot of properties or methods with either $ or _ when you're building a Open source framework?
 
jsfiddle.net/rlemon/6Tkge // cc @Jhawins @Mosho
 
9:25 PM
What is the right terminology for an object created with a Constructor? Shouldn't the instanceof be called childOf ? Is it this what they talk about when they say "JavaScript is trying to hide its prototypical nature" ?
 
@Schoening IMO it's an instance of that constructor
 
user1596138
@rlemon Yeah that seed works
 
But the prototype properties are kept inside the Constructor @Connor
 
but would it make any difference at all if they weren't?
 
Well yeah. You can change the prototype value on the Constructor and it appends to all "children"
 
9:30 PM
good point
 
Man I love this the more I get into it
 
Javascript is amazing, It's just a shame we have things like jQuery that really f*ck it all up
 
No, you're not pandering to this room enough. Try harder.
 
:D haha!
 
doesn't look like I'm getting enough randomness
 
9:34 PM
@t1wc go here (copot.eu/matei) there is plenty of randomness there
 
@Connor -_-
 
damn, its more random than mine
 
9:36 PM
@adeneo wow
 
@adeneo appropriate reply is appropriate.
Anyway, jQuery is just a level of abstraction above DOM inconsistencies with a simpler and easier to use API (and provides some utils). It doesn't "f*ck" anything and you can always go vanilla if you want.
 
Unless its a fake there really is a nice united sarcasm on this website
 
Xsi
where's the general chat room of SO/SE?
 
Yay a homm3 player
 
Xsi
ex
 
9:39 PM
aw :p
 
Xsi
ex l2 too)
now js )))
 
I'm a huge homm fan
homm 2 was the best though
 
@Schoening it is part of the jQuery meme
 
@rlemon yours is giving out some kind of shape actually :P
 
Xsi
kb1
 
9:40 PM
@FabrícioMatté ah thx :p
Nah my favorite is 3. Fortress. Even though they are a bit shitty
 
Xsi
kb1 ;P
 
@Schoening only good unit they have is the bull
anyway, good times
downhill after 3
 
Against bots at least it can also be viable to just get Verdish ( first aid) and just grab a hydra after a few days
 
I can hear the hooves sound in my head now
 
Xsi
I'd love more nostalgia how it was in 60's first games space war.. I wasn't born but the world was simpler ... and with A-bom
 
9:43 PM
I tried out the WoG addon. Pretty neat. The upgraded Hydras have 500 hp and regeneration ^^
Huh... I am always a bit annoyed that I have to type console.log(); Never thought about just defining a log() function....
 
@Schoening you can also define it differently if you're in production, allowing for different levels of logging
 
Good idea
 
have an Idea in Xbmc for XBOX ?
have you*
 
no, I definitely need a new seed value extractor mechanism
it's making shapes... SHAPES!
 
Are you sure you don't want shapes @t1wc ? generally things are a bit clumbed together IRL
 
9:49 PM
@Schoening then patterns... PATTERNS!
 
:D
 
how can I have a world generation mechanism where there is a hill repeating over and over?
 
It won't be fixed to just use a random number every now and then D: ?
 
@Schoening then the whole concept of seed is gone
 
good nigth
 
9:52 PM
@fahdijbeli 'night
 
Ok.
 
Hi, I have this xml which contains this node: <rs:data ItemCount="0"></rs:data> I need to run some function if ItemCount is > 0. How could I capture this value in a variable using jQuery?
 
@Batman have you tried seeing what $("rs") logs?
 
let me try
Syntax error, unrecognized expression: rs:
 
$('rs\\:data')
 
9:59 PM
evenings :)
if anyone still's active :P
9l.dk/seq trying to "make" a pause/resume timer for the next slide, called on line 127 - seems to be wrong and not working- can anyone help me
 
@adeneo this worked, thank you
 
10:19 PM
o/
So, Amazing Spiderman 2 is not that good
 
\o
Anyone surprised by that?
 
No, but I had to see for myself
 
anyone that can help me?
 
I stopped reading at line 127
If you want help, create a short self contained example, 20 lines tops, and on jsfiddle
 
What triggers process.on("exit") in NodeJS?
 
10:23 PM
Exiting the process
 
Yes, but what's considered an exit?
ctrl-c in the terminal? a restart from an uploaded file?
 
If no more code is running (no timeouts, servers, etc) or you explicitly call process.exit() iirc.
@RUJordan why?
 
I'm still trying to "force logout" players when my server restarts. Like, if I shutdown my server, or upload a file and it restarts, I want my clients screen to simply refresh so they're taken to the login screen
 
I hate CSS.
 
Don't logout players when your server restarts, put something in front of it.
@SomeKittensUx2666 everyone hates CSS, it's a broken system.
 
10:27 PM
@RUJordan if you want to catch ctrl+c, use process.on('SIGINT'
 
var Constructor = function () {
    this.x = 0;
    this.y = 0;
}
Constructor.prototype.color = 'yellow';

var A = new Constructor();
Constructor.color = 'red';
var B = new Constructor();

console.log(A.color); // yellow
console.log(B.color); // yellow
console.log(Constructor.color); // red
 
@SomeKittensUx2666 do you know if that will catch a nodemon file upload?
 
That's also catch a bunch of other stuff though, like kill with SIGINT :P
 
Because everything is an Object and I can add properties to everything ?
 
@Schoening not everything is an object.
Go to the language specification, see the section on types.
 
10:29 PM
@RUJordan it won't
 
Functions (like constructor in your case) are objects though, yes.
 
@BenjaminGruenbaum you're a broken system.
Also, 0th world problems: I have to work from my laptop instead of PC on my work-from-home day because the version of ElasticSearch I have on my PC is too new.
 
That sucks :/ I can't stand working from my laptop on big stuff.
 
it's not really 'big stuff'
I need to check some CSS in search results
 
You need to use width/height attributes and font tags.
 
10:36 PM
Ok how about this, if I can't trigger a reload on server restart -- how can I trigger a response to no server?
For instance: app.get("/",authenticate,function(req,res) {
that runs the function authenticate that makes sure the session is present, else it redirects to the login screen
If I do app.io.route('move', authenticate, function(req,res,next) {, the authenticate function doesn't run because next() is undefined
So if my server restarts, and somebody triggers the move socket, it will just broadcast undefined values. How can I detect if (!req) and trigger a response to that?
 
If we're discussing 0th world problems, I recently got a newer macbook from work, and the newer power connectors are absolutely terrible...
Even as someone who generally prefers PC, I think the magsafe is probably the best laptop power connector I've ever seen.
The magsafe 2, though? Easily the worst.
 
Hello
Is there onScrolltop event in jquery?
 
10:51 PM
0
Q: NodeJS Check Request/Response

RUJordanUsing sockets, how can you detect if req and or res is not undefined, and if undefined, redirect the client? Here's my authenticate function function authenticate(req,res,next) { if (!req.session.loggedIn) { fs.readFile('./html/login.html', "utf8", function(err, html) { ...

This is getting annoyyinnnggg
 
@user3123545 check the API
 
Yay a shitty answer
@SomeKittensUx2666 right?
I read that and I was like "..no shit..?"
 
Everything is broken. CSS is evil
It only works when I put the elements in backwards order.
 
lolwut?
 
11:08 PM
if scrollTop is the amount of PX i scrolled down, and scrollHeight is the total amount to scroll, why cant scrollTop be equal to scrollHeight? e.g just tested and values are:
80 : 280
100 : 300
120 : 320
scrollTop : scrollHeight
looks like it adds 200
 
and I know that as soon as I finish fixing everything and finally get it to where I want to be, our snippy designer will send out new designs and expect them to be implemented yesterday because "Any good front-end guy should be able to make it pixel-perfect, easy"
 
Oh i see, it adds the height of div so obj[0].scrollTop + obj.height() == obj[0].scrollHeight
 
@SomeKittensUx2666 teach him HTML or make him design with macaw
 
</rant>
@BenjaminGruenbaum How is Macaw? I like the idea but haven't tried it.
 
Me neither :P
 
11:11 PM
And I doubt trying to get him to make anything will get far. He even expects us to be pixel perfect when working with a drag-n-drop email creator
I just ignored him on that one.
 
TBH, you should never release anything that is not pixel perfect :P
 
There's "Here's a design and we'll work towards it." Pixel perfection is a reasonable goal there.
Then there's "Oh, you're done with the site, now I'll send you a .png of how it should be. What's a rewrite?"
"Oh, and I'll change my mind three days later"
Pixel perfection there is a waste of time.
 
I don't skin PSD files, I hate that, so there's that :P
 
haha
My other favorite is how his designs usually have new features that haven't ever been discussed before
 
@SomeKittensUx2666 what works is beating him at his own game.
Ask him about your ideas and ask him to design features you might want.
People start delivering exactly what you expect and on time when they think doing extra will cause you to make them do more extra.
"This new feature is cool, can you send me 3 alternatives to it so I can check what looks better on different screen sizes?"
 
11:18 PM
yeah, I should do more of that.
 
In home country, changing requirements change you!
 
Has anyone here used github pages?
I cant get my cname file working
 
How is an inline style with !important being overridden?!
 
A problem you shouldn't hate, but... A more specific important?
Or, with JS?
 
Chome WebTools (don't worry, I'm not using style)
 
11:31 PM
I use style sometimes when really lazy.
 
I'd use style everywhere if it fixed this problem.
 
11:42 PM
...
anyone?
2 hours ago, by Connor
does anyone think it's a good idea to prefix a lot of properties or methods with either $ or _ when you're building a Open source framework?
 
Yes. It's a bad idea
 
It's a good idea if it's to mark them as internal but still expose them.
Otherwise it's a bad idea.
 
I'll show you what i currently have
if i decide to keep $ handlers and used will also be prefixed
 
Why
 
It's let's the user know it's a "the-framework" method but it's also a pain
 
11:47 PM
^ * 2
 
why what?
 
Why $
 
It can be used to indicate "internal" I guess.
 
Why prefix
 
I feel it set's apart user-code and framework-code
because this "token" is used by user a lot
 
11:49 PM
Seems like you're cloning Angular convention
 
@FabrícioMatté I was waiting for that, It's also unfortunate that people think angular and jQuery own $
 
@Connor truth be told naming convention doesn't pay that much, just be consistent.
 
I wouldn't do it unless the framework's built-in methods/properties would appear in the same objects as user code methods, or can be dependency-injected
 
Maybe I'll ask for their permission
 
I generally use _ for privates.
 
11:51 PM
They're not private though
 
Users are expected to use them?
 
not expected but most probably
so Yes to be on the safe side
 
I'm confused.
Either they're a part of the API, or they're not.
 
you should define whether it is part of the public API or not
if it is part of the public API, you have to think about back-compat when making changes
 
I use o∩o for privates.
oh my, that looks like a condition.
I guess my API should see a doctor.
 
11:54 PM
Well, I use them internally, the user uses the "token" for values and elements, it's just at this moment in time i haven't had to use them (as a user) to save any data because I've been working on basic stuff, but it's more than likely as things get more complicated that they will be needed to store data, I don't know how the whole things gonna plan out, I'm just going with the flow of my code
 
I usually hate too much planning, but defining how the API will work is usually the first thing I do
otherwise you will most likely waste a lot of time rewriting code later
 
brb
 
Heh.. I just wrote a massive SO answer to answer my own question. Helps me learn a lot writing things down.
 

« first day (1280 days earlier)      last day (3672 days later) »