« first day (1418 days earlier)      last day (3529 days later) » 

8:00 AM
If a programmer asks "What is X", a programmer expects a detailed description of what it is.
Not just "It's a building". rather: "It's a flat with 8 rooms, 1 bathroom, a kitchen, etc etc etc"
 
@Cerbrus I am trying to understand the code myself tbh...
this is the book, check page number 29
The function invocation pattern
 
@CustomizedName look at the paragraph above. myObject's value is 3...
and that is continued.
as I correctly speculated... \o/
 
haha true
but why using that instead of this
 
@CustomizedName this would then reference to the function where you are actually using that... so we copy the value of this in that and use that instead of this.
Does nobody have interesting questions???
I WANT INTERESTING QUESTIONS!!!
lol look at the profile description of the user
!!afk this room is now empty.
 
Nope, am thinking about what interesting question i could ask to entertain you ;)
 
8:15 AM
This room is far from empty.
It's just quiet
 
can someone star link to the book please
I will need it as a reference and it keeps getting invisible in chat
 
@CustomizedName Your browser has bookmarks, doesn't it?
 
@SecondRikudo Not for myself, it's if I need to pass reference to someone here, I won't need to post links again and again in the chat room :)
 
Hey people. Is there some way to open a link in a new tab in an "image loaded callback" without triggering popup prevention message in chrome?
 
@PeeHaa Not with window.open I don't think so
 
8:23 AM
Damnit. Any other option?
 
@PeeHaa Load the image on the page, set coordinates at -9999px
Image loads, users can't see it
 
Trying...
 
need to use absolute positioning with left: -9999px
 
@Neil why not set display to none?
 
8:26 AM
3
Q: How can I open a pop-up window without it being blocked?

Florian MargaineI haven't found a single answer able to tell me what's the right way to open a popup. Times have changed, and popups have been mostly replaced with fancybox-like boxes. However, there are still times when popups are needed. For those cases, I don't want my popup to be blocked by the browsers. ...

> Popup blockers will typically only allow window.open if used during the processing of a user event (like a click).
 
The thing is that is what I am doing
I think the loaded callback confuses user agents
 
@AwalGarg Not sure if browser preloads if it isn't shown
 
@FlorianMargaine that still is a huge PITA
 
@Neil It does, but IE7's implementation of QSA has some problems with it... but QSA is out of context so it won't be a problem, I think.
 
What did you find hard to believe?
 
nothing I just don't remember what you're referencing
 
oh well it looks like I just have to live with the fact that it's not really possibru
tnx @all
 
@FlorianMargaine I don't get how such an answer can be upvoted...
 
Fancybox is just a .. well, a fancy jquery dialog, right?
 
8:34 AM
@rlemon the ninth gate was pretty messed up 0.o
 
> You can use Jquery to do this
._.
@AwalGarg IE7 doesn't have QSA
 
@FlorianMargaine -1 More than enough jQuery...
@FlorianMargaine IE8?
 
@AwalGarg IE8 has it
 
@FlorianMargaine then that must be it...
 
@PeeHaa anyway, this popup isn't blocked: jsbin.com/buzidegucalo/1/edit but I can't change the url... @dystroy's answer doesn't work
 
8:38 AM
@FlorianMargaine Do you open at first with an url not subject to Same Origin Policy ?
 
hmmmmmm
 
@FlorianMargaine I'm not sure I get your goal. Is it really to change, after opening, a popup to a different origin ?
In Miaou I do open a new window, wait for an asynchronous action to happen, then change the URL of that window, but I don't change origin
 
Lol I have an old cd which has some browser based tutorials for Javascript... it doesn't work in chrome, ff, safari, IE11, but if I change the document mode to IE5 in IE11 dev tools, it works!
 
lol.
That cd should be in a museum
Along with all versions of IE under 11.
 
The cd has the following text imprinted:
> "Learn the best in class of web, in the web!"
"Clear and concise Javascript tutorials for beginners!"
in times new roman I guess..
 
8:51 AM
inb4 it gets censored
Talking about censorship, my comment was removed in a fully censoring style by moderators. It wasn't anything aggressive or offensive. I just replied to Frederic Hamidi with that there's nothing to debunk, everyone knows about USA and Russia war of peace, and Ukraine is being attacked because of the god "interests". I don't know how much you'll see this comment still. — Adam Barak 3 mins ago
 
@Sippy Oh I can bet on that... few years from now and a WinXP installation disk would be sold as an antique at pawnshops for atleast twice the price of Win8 :D
 
1
Q: limit drag to circular SVG boundary

indie blueHere is a sample of the D3.js visualization that I am working on right now. Here, the grey circle is the SVG container. I would like to limit the drag of the green bubbles to the grey circle boundary. I found this example and I used it in my code, but I got two errors: Uncaught TypeError: Cann...

 
Why does it bother me so much that in visual studio, you can close a single open file, or close ALL BUT a file, but there is no way to simply close all open files...
 
@Neil Because OCD :D
 
@Neil close all but a file and close the only open file manually.
 
8:54 AM
I just spam middle mouse on the tabs.
It gives me inner peace.
Then proceed to open them all again
T_T
 
or just close the entire visual studio :D
 
I quit chrome at the end of the day
 
@AwalGarg @AdamBarak please stop your voting script
You are very near suspension.
 
@SecondRikudo its not mine, its AdamBarak...
 
hai @monners
Did you figure out how to introduce your sister to programming?
 
8:56 AM
Hola
Yeah, there's a kickstarter book for Ruby
 
Oooo
 
Hopefully it'll be ready for her birthday next year
 
Sweet
 
@AdamBarak
 
On that note actually, does anyone know of an outstanding 'beginner's guide to programming' that's suitable for adults?
Or is it still very much go out and figure it out by yourself?
 
8:58 AM
@SecondRikudo wait, why do you think it is me?
 
@AwalGarg I offered to ask you guys to stop nicely before you get banhammered.
 
@Sippy learn python the hard way
 
Three users are involved, you are one, Adam is another.
 
@SecondRikudo I am not the one, I am repeating nicely. Very nicely
 
@GNi33 +1 Learning Python really helped me out.
 
8:59 AM
@GNi33 ewwwww
 
@awal isn't active in the offending voting
there were 546 of them, but they stopped
 
@MarcGravell thank you.
 
A friend of mine wants to get into programming and I'm basically just teaching him what I learned at uni, which is C# win forms in VS for now.
 
Oh, hey @MarcGravell. I'll let you take reins.
 
Oh and console apps
Gotta love console apps.
 
9:01 AM
As @Second says; we will intervene if people do silly things with scripts (cough @AdamBarak cough)
 
@MarcGravell oh hi there
 
I'm making system changes, but: we keep very very good records ;p
 
@Sippy well...
 
@MarcGravell @SecondRikudo What makes you think it's me?
 
database access
 
9:01 AM
If I'd just started programming, I'd probably start with Python
 
@AdamBarak 'cos I'm a dev at stackoverflow
 
@MarcGravell Ok show it to us please
 
@AdamBarak @MarcGravell is a developer. He has database access.
 
@Sippy its aimed at kids, but may help: scratch.mit.edu/help Its what they use at the coder dojo here.
 
@MarcGravell solid retort :D
 
9:02 AM
I'm sure I stopped the script since a long time
 
select UserId, count(1) from Posts2Votes where PostId = 25631142
group by UserId
 
@MarcGravell so votes are not actually anonymous right?
 
it should stop after 30 loop counts
 
it's accessible, it doesn't force OOP on you, but you can dive into it after you grasped the basics of functional programming while still writing in the same language and you can learn paradigms excellently with it
 
@MarcGravell Ok, now make a screenshot of the results
 
9:03 AM
@GNi33 I started by explaining OOP. He gets that already.
 
I'd either suggest LPTHW or this guide -> greenteapress.com/thinkpython/html/index.html
 
@AdamBarak Now you're getting annoying.
 
Well, I say he gets it, he can employ it. I dunno if it's clicked for him yet.
 
Stop.
 
@AwalGarg at the database level, we need to store the user id to allow things like undo, prevention of repeated votes, etc
 
9:03 AM
HAMMERTIME!
 
it's pretty great to get a good grasp of different paradigms
 
@MarcGravell While you're here - we're using StackExchange.Redis for a high traffic website and it's running out of connections eventually (doesn't always clean up after itself) - is there anything clever we can do about it rather than dispose the multiplexer and restart again? (There is an open issue about it on GH IIRC)
 
@SecondRikudo I've no time to do it myself, I'm busy
 
@AdamBarak Then you will be banned.
 
If he wants to show proof I need the screenshot, because I'm sure the script stopped after 30 loops
 
9:04 AM
@MarcGravell ahh.
 
no, the script is still running now
the number is still increasing
 
@AdamBarak He isn't obliged to show you any proof. This is an internet community, not a court.
 
@MarcGravell What the hell are you talking about?!
 
@AdamBarak he needs nothing but you to stop the script
 
1 hour ago, by Benjamin Gruenbaum
Writing a script like that and using it on yourself for a minute is fine. Running a script to cheat the system into something you wouldn't do yourself is abusing the system.
 
9:04 AM
period
 
@GNi33 wtf IT STOPPED -_-
 
@AdamBarak close your browser, reopen it...
 
@AdamBarak Obviously, it didn't.
 
Maybe you have another tab running and you missed it?
 
nope, still running
 
9:05 AM
ok wait a moment I'll close the browser
 
now it has stopped
 
It's happening here:
nvm it stopped.
 
It's strange, it should've stopped after 30 loop runs
wth is wrong I don't know
I apologize
 
2906 votes later ;p
 
2906 votes lol.
 
9:07 AM
my god
wait.. I didn't use the for loop version
 
And as payment for your mistake you must manually remove them all! muahahaha
 
and that's not counting the 2940 in a secondary account that happened to stop at exactly the same time; I'll be generous and assume that is coincidence...
2
 
that's why it didn't stop
 
HAMMERTIME!
 
Caprica plis.
 
9:08 AM
lol, secondary account
 
@MarcGravell I don't think I have other accounts than this
 
All evidence to the contrary ..
 
@Sippy They were temporary votes actually
 
(what's that?)
 
@Sippy No proofs no talk please
 
9:09 AM
@MarcGravell are you gonna rate limit votes now? I hope so :D
 
yes, working on that now; not rate limiting as such, but prevention of excessive undo abuse
 
ok nice, good luck.
 
@AdamBarak wat.
 
@AdamBarak lol you really troubled some men today with a little script xD
 
thanks for stopping, all; remember, with great power comes great heat dissipation requirements... or something like that
 
9:10 AM
Lol
 
hahaha
 
Undo-ing votes : no longer allowed to vote on that item, @MarcGravell?
 
@AwalGarg not really; mildly inconvenienced and slightly irritated
 
@AwalGarg da fucking script was even the other version (not for loop)
 
@MarcGravell yea that ^
 
9:11 AM
@Cerbrus undo is fine; if you undo your vote 2900 times, you probably need therapy ;p
 
@MarcGravell @Neil
 
@MarcGravell do you offer therapies too? didn't know that... superb man!
 
The OCD is dangerous!
 
@MarcGravell: while you're at it, have you seen this question?
-16
Q: MySQL Query - Date and Statuses

Ryan KemptI have a table that looks something like.... id | machine | date | status ---------------------------- 1 | 1 | 01-01-2009 | New 1 | 1 | 01-01-2010 | Busted 1 | 2 | 01-01-2010 | New 1 | 1 | 01-01-2012 | Repaired I need to know the differences in date between each status PER machine, if it i...

Look at the edit history...
 
And it also had votes running against it if I remember correctly :P
 
9:12 AM
Revision wars, script vs man...
 
sigh; that's also mildly annoying
 
@Cerbrus Mod won.
 
yeah @MarcGravell the edits done at that question too were automated via scripts!
 
I can see another gentle conversation in my immediate future...
 
Only half of them, @AwalGarg. OP was actually doing that manually
It's kinda silly that was even possible, actually
 
9:13 AM
@Cerbrus yes but it could have been done via scripts...
 
@SecondRikudo Yes, that's where the voting script started actually
 
I doubt it
Well, not that it could have been done by scripts, but that it was.
 
It could also have been done with browser macros
 
This proves, browsers should not come pre installed with dev tools. And the number of programmers across the globe should be kept minimal.
 
I just can't wrap my head around it, @AdamBarak: How did you not see that the script was still running?
 
9:14 AM
Oh good my DAL is outdated.
 
@AwalGarg In fact I installed Firebug :P
 
Everyone knowing code is not a good thing.
 
k; I'm heading out; have fun, but please don't do things that cause problems and upset ;p
 
@MarcGravell lol you end sentences with ;! Nice programmer you are :D
 
Aye-aye
 
9:17 AM
@Cerbrus I don't know. The thing is, it runs even when I'm not directly interacting with that page and to see it you should either open the request tab or something. I actually was busy with a website and didn't imagine it was still running (because I thought I ran the for loop version which stops after about 30 runs)
Many scripts halt on Firefox when you switch tab, that's also why I was confident about the fact
 
> Me: Hey marc.
Marc: Hi;
Me: Why the semicolon at the end?
Marc: What;
Me: The semicolon - ;.. and that one should be a question mark.
Marc: Oh! I am a die hard programmer;
 
Actually his use of semicolons are mildly annoying. More than bold text
 
>after some time:
Marc: Hey! Your strings aren\'t terminated;
 
@BenjaminGruenbaum sorry, only just saw your redis thing; I was busy looking at voting at the time; this might not be the right room, but can you be more specific about the symptom?
 
@MarcGravell also, Tim Post was to call a dev at one of my meta post, no one came around yet. Its been more than a week.
 
9:20 AM
we might want to take that elsewhere, though
 
The whole business of counting views got to be so cumbersome that we outsourced it. As a plus, many Icelandic carnival workers gained part-time employment at the end of every week. Disambiguated: I'm asking a dev to chime in here. — Tim Post ♦ Aug 14 at 4:55
^this one.
 
Ehm, @AdamBarak: Javascript just keeps running in background tabs
 
;( y they keep it sikrit?
 
k, lemme take a look; I can't guarantee an answer - sometimes we keep certain details privileged simply to prevent deliberate abuse
 
@MarcGravell I was asking because of curiosity though, not for abusing the system.
 
9:23 AM
and I'm sure voting 546 times was curiosity too ;p sometimes, they can amount to the same thing
 
And also because I want to have something similar for a project.
 
@MarcGravell I assure any such thing won't happen again. Also, security by obscurity is worthless, as you already must know ofcourse.
 
Guys, which show/movie is that from? ^
 
@AwalGarg I prefer this option
 
9:24 AM
@AwalGarg oh nos! all is lost! ;p
 
@Neil xD
 
@Cerbrus Not really. Firefox just halts (or should halt) running scripts in the background to free CPU and memory when not used.
 
@MarcGravell hahaha... also, if you can, you can just put up a basic layout of your method. I would do the rest myself.
 
Thanks
 
9:26 AM
public ActionResult SomeAction() { /* awesome stuff left as an exercise for the reader */
is that enough?
 
@MarcGravell ofcourse not...
 
I actually built a backend script like Stack Overflow views
It's nothing special
you either analyze logs and parse them, or for every vote you store it in a buffer and flush it regularly to the db, either by time rate or number of votes in that time. You can also combine both which Stack Overflow does
 
@AdamBarak: tests show otherwise
 
@AwalGarg as far as I can tell, it hasn't changed significantly from what it says in the meta post
 
I had a setInterval running in a background tab in a minimized Firefox window
That didn't stop it from counting.
 
9:29 AM
@MarcGravell I can't find that [random code] anywhere... though. which is the key in the said post.
 
@Cerbrus Then something must be different. A running function in a loop just stops when you switch tabs, maybe setInterval doesn't
I never checked though
 
@MarcGravell public double FermatsLastTheorem { /* totally cool stuff too large to fit here */ }
2
 
@AdamBarak what do you mean ? That scripts running in a tab that's not active don't react to events ?
 
@Neil lolololol.... nice one :D
 
@AwalGarg what is the key bit you are looking for? it is unclear to me
 
9:31 AM
Whatever the case it, a set interval just keeps running in background tabs
 
@dystroy No, that it just stops altogether. When you then switch back to that tab it continues running from where it stopped
 
It DOESN'T stop
 
HAMMERTIME!
 
ugh
 
@Cerbrus I got it. I was replying to dystroy. hello!
 
9:31 AM
Of course it doesn't. It can't. So many things run in background tabs. Not only already started executions but new ones too.
 
@MarcGravell I can't understand how do we handle views from anonymous users... that is the key bit.
@CapricaSix stfu please.
 
@AwalGarg image beacon. dear god, image beacon.
 
@AdamBarak I read that as image bacon
 
look at requests (XML and others as well) when you debug a page's working
 
Hm, so, if I say stop
 
9:33 AM
HAMMERTIME!
 
Tehee
 
You don't need a SE developer to debunk it, it's already there for you.
 
How are you comparing requests to plain old JS?
 
@AdamBarak one more http request fuck.
 
@dystroy Yeah. I think I got to experience that lol. In all seriousness I thought Firefox didn't. Whatever, lesson learned
@AwalGarg What one more http request?
@SecondRikudo haha lol
@Cerbrus I don't think I did?
 
9:35 AM
@AdamBarak the image we put, it would have to load somehow...
santa won't ship the image for us!
:P
 
@AwalGarg in the case of anonymous votes, we use time as a factor; too-frequent views from an anon single IP: probably suspicious. Yes, that means that we miss that moment when everyone at the Redmond campus (for example) descends on a single post at the same time. We're ok with that.
 
@AwalGarg Are you a developer or what? xD you just create a 1x1 pixel image and load it at client side. Caching will work for itself
That's one of the ways though
 
@MarcGravell ok thanks...
 
there are many options for a broad range of situations
You could even store unique IPs in Redis sets which don't allow non-unique items
 
@AdamBarak ;( ctrl+shift+delete ... select all ... enter
@AdamBarak its not reliable, someone sets a curl loop from command line and the cache won't work ofc.
 
9:39 AM
@AwalGarg Sure that's right, but it's one way :P
 
!!afk ‮Lunch. Don't lose the game!
 
@MarcGravell we get "StackExchange.Redis.RedisConnectionException: It was not possible to connect to the redis server(s); to create a disconnected multiplexer, disable AbortOnConnectFail. ConnectionDisposed on PING at StackExchange.Redis.ConnectionMultiplexer.Connect(String configuration, TextWriter log) at TipRanksCache.RedisWrapper.CreateConnectionAsync()"
 
@SecondRikudo Damn you!
 
@MarcGravell Googling that brings an issue on GH, we get around that atm by restarting the connections (disposing the multiplexer and re-creating the connection) - it doesn't happen very often (I'd say once every two days).
 
@AwalGarg Do you want unique views per IP and account or like register a view from an IP address every x minutes?
          **Redis ttl_set**
--------------------------------------
| 127.0.0.1 -> ttl 30 minutes        |   ip_request => if ip_request not ttl then put in
| 127.8.5.3 -> ttl 30 minutes        |   ttl_set else return **(after ttl is expired it will
--------------------------------------   automatically  flush to views_set sorted set with score +1)**

          **Redis views_set**
--------------------------------------
|                                    |
--------------------------------------
what about something like that maybe? ^
Basically when someone makes a request its ip is put in a Redis set if not present with ttl 30 minutes which then flushes to Redis views_set sorted set with an increment value
a sort of server side cache which can't be manipulated by malicious users
you can do the same with registered accounts
 
10:01 AM
@SecondRikudo Also, happy belated birthday
 
@Neil SecondRikudo is afk: ‮Lunch. Don't lose the game!
 
@CapricaSix If you spell SecondRikudo's afk message aloud it will look like israeli accent
 
@@CapricaSix Hello
@@CapricaSix Hello myself
 
@AdamBarak אמג אחט אסול תנוד. הכנול
Or something? XD
 
10:22 AM
Yes, something like that especially the final "hchnol" :D
It has even a meaning haha
 
10:40 AM
wat dafaaaaaaaq
I have a table in SQL Server 2008 that I can't change, every time I try to do any kind of operation on it, it times out
Just the one table.
 
That's why God created nosql.
 
NoSQL isn't the be-all and end-all.
 
Jokes aside, you may want to try exporting it first and do operations "off-line".
 
Mm could do that
Thanks
 
You're welcome
 
10:45 AM
@Sippy NoSQL (like jQuery btw :P) has its purposes.
What are you saving in your database?
 
Not much
The tables(just discovered more) in question are just link tables
The empty ones can't be changed either
Super odd.
@SecondRikudo Fortunately I came here and learned about jQuery before I got attached to it :P
 
@Sippy :P
jQuery is good at saving a little time, and if you're working on governmental sites which need IE6 support. Not much more.
So for PoC or crap sites.
 
@SecondRikudo PoC? Proof of Concept?
 
Would you suggest that using things such as Fancybox constitutes using jQuery?
 
10:51 AM
What! a simple button works wonderfully as closing a form opened by Javascript and opening the hidden one
is this behavior documented somewhere?
 
@SecondRikudo Or do you instead mean using basic jQuery itself?
 
@Sippy Fancybox? You mean a modal window?
 
<button class=cancel>Cancel</button>
 
Something like that, yeah.
I mean using plugins coded using jQuery
 
@AdamBarak Always quote attributes
 
10:52 AM
I guess that's kinda the same thing really.
 
@Sippy When making a proof of concept, the idea is to get something that works as fast as possible
 
@SecondRikudo oh yeah that's for sure, but sometimes I'm lazy to use shift+2 xD
 
So if using a crappy plugin would make it look good just for sake of it, sure, go ahead.
Never in production though.
 
What would you do in production? Raw JS and code it yourself?
 
wait.. it seems like it is reloading the page... a simple button? huh
 
10:54 AM
Yup
@AdamBarak Button's default action is submit, which reloads the page.
 
@SecondRikudo duh you're right
dumb me
 
@Sippy Personally, I don't do much client-side recently
 
ugh I experienced a dejavu again
 
But for common tasks like creating a modal window, I'd have a module ready.
 
I see.
 
10:59 AM
<button class=cancel type="button">Cancel</button>
there you go
such stupid thing. I should be ashamed of myself
 

« first day (1418 days earlier)      last day (3529 days later) »