« first day (1138 days earlier)      last day (2885 days later) » 

12:00 AM
RELOAD! There are 2447 unanswered questions (93.0084% answered)
 
 
1 hour later…
1:07 AM
0
Q: text with different colors (Javascript)(html)

simdi ejinkeonyeI made text with different colors by listening to keypress events and generating a span with random colors using style.I feeel there is alot of overhead how can this be done better? http://codepen.io/sim04ful/pen/pbyaZz

0
Q: I'm new to coding JavaScript, not sure what the problem is, safari does not display the JS, and not sure why?

LaythesmackI don't know if Inputed the snippet correctly, nor do I know if this question belongs here since I am new to StackExchange, so take it easy and I thank you for helping. I'm having problems displaying the javascript on safari. I don't know why it (javascript) shows up and runs properly on the s...

 
1:17 AM
looks like might need a user merge
 
ugh the system should warn.
"there is already a user with that username that posted these questions and answers. Do you want us to [mail you a password reset link] or are you not affiliated and want to [create a new account]?"
 
0
Q: Created JTextField and JButtons which are very hard to see, how to scale them up? JAVA 4k screen

Olba12I have a program which creates three JButton:s and one JTextField. But when I run it, I can barely see them. I have tried to change the parameters to setPreferredSize and JTextField, but that will not make it better. See picture below and you can tell that it is hard to see. I guess I could chang...

 
 /* some other code */
@Quill thanks, under way
 
1:33 AM
cool :)
 
1:46 AM
You probably want to ask this in [[codereview]] instead of Stack Overflow. — Lie Ryan 11 secs ago
 
[[what]]
 
2:22 AM
0
Q: Different neural network activation functions and gradient descent

benj reiI've implemented a bunch of activation functions for neural networks, and I just want have validation that they work correctly. I implemented sigmoid, tanh, relu, arctan, step function, squash, and gaussian and I use their implicit derivative (in terms of the output) for backpropagation. import ...

 
2:44 AM
0
Q: mini Twitter(in memory, single threaded)

claudiusI am new to java and would like to know whether my java program is idiomatic? I request veteran java programmers to help me write idiomatic, terse code. My solution is functionally correct. Programming Question: Design a simplified version of Twitter where users can post tweets, follow/unfollo...

 
2:59 AM
0
Q: Create a new unique file

AndreKRFor debugging purposes I am storing requests into files. This code is supposed to create a new file for each request. Somehow it doesn't look very nice, can it be improved? Additionally it would be nice if it could be made atomic. filenamePrefix := exeDir + "/debug/" + time.Now().Format("200601...

 
3:36 AM
0
Q: File mutual exclusion in C#

markmnlI created this class to solve a problem where several threads (from .NET's FileWatcher changed events and my program) would compete for access to the same file resulting in only one winning and the rest failing with already in use exception. What do you think? /// <summary> /// Provides m...

 
3:57 AM
0
Q: Graph (adjacency list) and DFS (topological sort)

MAGThe vertices on the graph are numbers from 0 to |V| - 1 for convenience. I was thinking later to use a template wrapper for the graph. Graph.h: #pragma once #include <unordered_set> #include <vector> class Graph { public: using size_type = std::size_t; using adj_list = std::unordered_set

 
is there actually a source for this wikipedia content? — phantom42 1 hour ago
TTGTB
 
4:35 AM
possible answer invalidation by Jamal on question by pokoso: codereview.stackexchange.com/posts/131837/revisions
 
nope @Duga
 
 
1 hour later…
5:39 AM
If it works and you want someone to review this, it belongs on Code Review. — Jim Garrison 10 secs ago
 
Monking
 
hey there
 
Hi all
 
6:21 AM
0
Q: Python "Yahtzee" style dice game (multi-game loops and cumulative stat calculator)

Cole DooleyI am going into my second semester of CMPS and want to become more efficient. I have trouble with classes so this code does not include any. I would like to know where and when to use them as well as which parts in my code could be made more efficient. Thanks for checking it out and any help is a...

 
Monking.
@ardaozkal yeah I dislike Spotify's practices as i mentioned earlier, but there's no good alternative atm
 
0
Q: Refactoring ValidationContext from inheritance into decorator

t3chb0tIn one of my questions I used a ValidationContext class that looked like this: public class ValidationContext<TArg> { public ValidationContext(TArg argument, string memberName) { Argument = argument; MemberName = memberName; } public TArg Argument { get; } p...

 
6:39 AM
$ git rebase --onto is... weird
Also my culture interview is in approx 12 hours
 
6:56 AM
@DanPantry huh, why?
git rebase is actually just git rebase --onto HEAD
 
Just not used to the syntax :)
 
Monking and BBL btw.
 
lol, ttyl :)
 
off to university. Should maybe not completely miss the mandatory tutorium
tutoring... tutorial??? that all sounds carp
 
@CaptainObvious no code no glory
 
7:01 AM
Hi, The first entry itselft should generate changes to the each cell, so I used these endless ElseIfs. With your advice I kind of succeeded by loosing some seconds on running this macro. I put Exit sub after each If/ElseIF and its quite faster than it was before. I'll post this to codereview, maybe I might loose more seconds. Thank you. — Ariunaa just now
I'm a little confused why Exit Sub would make it faster because if one ElseIf was triggered, it should skip the rest. When posting to codereview, make sure you describe what you want to do as precise as possible. — arcadeprecinct 21 secs ago
 
7:39 AM
-2
Q: Want to know which are private public protected n class second

deepu ch determine which members of class first are private ,protected and public in class second see the image for better understanding.

 
@CaptainObvious you'd hope that programmers of the future would put a little more effort into homework wouldn't you?
 
it looks like Java
 
That's definitely C++
+1. I do not participate in any of the social events either (though I am not a boss). I am here to work and write code: the social events make me uncomfortable. — Dan Pantry 24 hours ago
Didn't expect that comment to resonate with so many people
 
I literally got told I wasn't getting a pay increase because I don't small talk enough
 
:s
I enjoy sociallising and small talk
just on my own terms
I am very much an introvert
 
7:58 AM
3
Q: Pig Latin converter in Python

Hannan RhodesHow is it and can it be optimised? sentence = input("Enter a sentence you want to convert to pig latin: ") sentence = sentence.split() for i in range(len(sentence)): if sentence[i][0] in "aeiou": sentence[i] += 'yay' else: sentence[i]=sentence[i][1:]+sentence[i][0] ...

lol
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Finding all delivery orders with multiple purchase orders
 
Zak
@DanPantry There's a difference between your own PC, and your personal PC. And if not, there's still a hell of a difference between a company which explicitly created a BOYD policy, and one where it's occurring by accident.
 
@Quill I don't get it. What's block storage?
 
Zak
Monking @all
 
no idea, sounds interesting
 
@Quill wait ,what, you're a mod?
3
 
yep :D
 
Zak
8:22 AM
Excel Spec:

Undo levels
100
 
@DanPantry I got nominated for pro tempore on Language Learning
7
 
Zak
Nested levels of functions
64

I can't imagine the horror of 64 levels of nested worksheet functions.
 
@Quill Grats
@Zak Did you know that IE had a max of approx ~4k CSS selectors in one file?
which is all fine and dandy until you realise bootstrap has ~6k
$ git stash pop
warning: unable to access 'Services/Html/.gitattributes': Permission denied
warning: unable to access 'Services/Html/.gitattributes': Permission denied
Thanks, windows file locking
refuses to let me checkout branches due to files beign "locked"
lmfao
only way to fix it is to close VS and Sublime, THEN checkout, then open them back up
 
@Zak Oh good, an interstitial. I will just wait until the full-page sized ad is over before continuing to the next page! - Noone, ever.
 
Zak
8:32 AM
@DanPantry No AdBlock?
 
@Zak I have uBlock. It won't block interstitials
 
Zak
AdBlock > uBlock :p
 
Morninga
anyone here has interests in designing web services ?
 
@Zak I used to use AdBlock plus until.., I guess I got the two confused.
@Mathematics You may be in the wrong chat room. We review code. I mean, I'm sure many of us are interested in web services (because it's code), but you probably aren't going to get what you're loooking for here.
 
@DanPantry I sometimes review code as well, mostly write code and design web services as well, but you are right too
brb
 
8:48 AM
0
Q: Thread safety without sacrifice performance in collections

deadManNi wrote a code, and i just want to see if it's thread safe, and i did it right. i saw people say that the readonlycollection it self is not thread safe, and is affected if the passing list changes later... here's mine... Code is incomplete if you don't mind public class AutoUpdate { private...

 
9:01 AM
Monking
Some relatively new user posted a really good question at EE. That doesn't happen often.
16
Q: 4-bit bus address selection via analog input pin: Monte Carlo simulation shows overlapping address values

KarlKarlsomI designed a small sensor PCB for my master thesis with an ATtiny44 microcontroller. I need about 200 of these boards for my application and 16 are always locally connected to controller board. The whole network looks like this: To communicate between the controller and the sensor boards I wro...

@DanPantry When in doubt: reboot.
@DanPantry Can't you fix that by only including the parts of bootstrap you actually use?
 
0
Q: Creating database table for WordPress Plugin.

pvaitonisIs there better solution to create database table for WordPress Plugin, how to simplify this query? What code improvements are needed for code improvements? Any up-to-date ideas would be great (: register_activation_hook(__FILE__, 'my_plugin_create_db'); function my_plugin_create_db() { glo...

 
Zak
@DanPantry Yeah, AdBlock and AdBlock Plus are 2 entirely different things.
AB+ is somewhat skeezy and does paid whitelisting, essentially a modern-day protection racket.
 
Adblock is my first line of defence in the war against viruses.
 
@Mast Yes, unfortunately some certain UI libraries require the entire bootstrap thing to be added
 
Zak
AB is honourware and does exactly what it says. It blocks ads. All of them. In all their forms.
 
9:10 AM
it's a shame really because if ads didn't have viruses we wouldn't need to block them and we could continue to use ad-supported content
 
Well, some ads are so intrusive I'd kill them anyway.
I don't believe in advertisement. Advertisement is what killed radio and TV for me.
 
Zak
@DanPantry Speak for yourself. Viruses are a problem, but IMO popups, videos, un-mutable audio, interstitials etc. they're all horrible.
 
If only I liked JavaScript, I'd roll my own adblock.
 
btw.. you should have just heard what a contractor said right next to my colleague
I was on my bitbucket profile and it showed I had ~3k contributions in the past year
and showed that my colleague had 800
and the contractor said "well you're not very productive"
LOL
2
Not sure where those contributions are coming from though because I only have some 2k commits in that repo
But it may be counting my fork as a separate set of contributions
Uh,,, no, I'm wrong, I do actually have 3.6k commits to that repo. Alrighty
With 3k of them occurring in the past 6 months. :s
 
1
Q: How to make object childs the same length as maximal child

ZakKodiI have such json structure: { "maxPageIndex":1, "totalItems":1, "currentPageIndex":1, "currentPage":[ {"id":1,"name":"Hummer","compareItems": [{"companyId":1,"companyName":"Makoto","compareItemId":10,"compareItemName":"MyHummer"}, {"companyId":3,"...

 
9:21 AM
Read Computed property keys and overloading ToPrimitive on 418stat.us: http://ift.tt/1rpnlwB
yay new blog post
 
monking @all
 
@Quill You get one point for using spaces but I'm docking that point because you're using 4 of them instead of 2
;-)
 
I don't follow standard js
I have my own set of lint rules
 
@DanPantry So, they're using commits per day as a productivity measurement now? That's bullshit.
 
@Mast No :p
the contractor was joking
 
9:23 AM
He better be.
 
He's not in a position to judge our productivity anyway
 
Since when does that keep anyone from judging anyway :P
 
But it is quite stark to see that I've literally done 10x the commits of my colleague since the start of the year since I switched to Git (I switched to Git and nodeJs technologies in the front end in January)
I think that should say a lot about the tech stack we were using - colleague has developed at the same rate and my productivity has increased tenfold
Even better when you realise that I was almost rung up for procrastinating at the start of the year :)
 
Almost sounds like you're the one measuring productivity in commit-frequency now.
 
I'm not saying there is a linear correlation but there is a link
there's no way I could be as productive as I am now than I was when we were on TFS
and that's not based on commit frequency: I make lots of small commits and rebase them later on, colleague makes larger commits. It would be unfair to compare us
Besides, he works on other projects; not just PM. I'm mostly dedicated to PM and it's architecture (as well as Git)
 
9:31 AM
Looks like Apple's new API docs are all built in React and looking good. Congrats, friends! https://developer.apple.com/reference https://t.co/LOlGqv1Ay8
 
@Quill feels like a static web page, though I suppose that's the point
 
monking
 
Monking @Dex'ter
 
well, that's a bit weird: how would I match \x01R5\x02F.F.1()\x03 that F.F.1 ? Apparently I have some problems because of those hexes
 
If you match and eliminate all hexes, you'll end up with R5F.F.1()
Finding F.F.1 in there is suddenly easy.
 
9:45 AM
well, I only need F.F.1 and I tried something like \x01R5\x02(.*)\(\)\x03
 
I'd consider cleaning the input from hex values first and finding the value I want in the next step. Probably not the cleanest, but it works and is easy to follow.
 
and I see something like: \x01 matches the character  with position 0x01 (1 decimal or 1 octal) in the character set
well @Mast that wouldn't be hard, but I'm just curious how can I treat hex as string in a regex
^_^
 
This question better fits to codereview. — diiN_ 57 secs ago
 
that's because I have to also match those hex values
 
39
A: Regular Expression to validate hex string

David NormanI believe ^([A-Fa-f0-9]{2}){8,9}$ will work. This is nice because it generalizes to any even-length string. EDIT: Small update based on a good comment.

9
A: Regular Expression to validate hex string

Jon SkeetThat's just a 16 character requirement with an optional 2 character afterwards: ^[A-Fa-f0-9]{16}([A-Fa-f0-9]{2})?$ The parentheses may not be required - I'm not enough of a regex guru to know offhand, I'm afraid. If anyone wants to edit it, do feel free...

There's more alternatives in that thread.
 
9:48 AM
0
Q: "Reviewing" your own code - "minor" optimization change

rdllopesDo you think is ok to answer your own question with a "minor" optimization? Naive parallel Sieve of Eratosthenes in Java I found in my own code space for optimization. Actually it could double the speed of the code for huge numbers but would not affect significantly small numbers. Until now, th...

 
@Dex'ter is that '\x01R5\x02F.F.1()\x03' or r'\x01R5\x02F.F.1()\x03'? In Python string notation
 
@StackExchange Duplicate.
 
@JoeWallis for now I'm just trying to get it work on regex101 but probably it's the second option in Python
my_regex = r'\x01R5\x02(.*)()\x03'
 
@Dex'ter In Python you can do re.search('\x01R5\x02(.+)\(\)\x03', '\x01R5\x02F.F.1()\x03').groups(0) and you get ('F.F.1',). I'll have a quick look if I can get it to work on regex101
 
ok
yea' got it workin' my way
apparently regex101 wasn't my friend on this one
 
9:56 AM
I just had to explain to someone how timezones work
They were complaining the date in the DB was being stored incorrectly
because it was "one hour behind them"
no, the date ni the DB is correct, it's just that date is being corrected to your timezone when you iew it so it makes sense
 
I think better suited for code reviewSanjeev 26 secs ago
@Sanjeev possibly. The golden rule of Code Review is that the OP must reasonably believe that their code already works as intended. In this case, it sounds more like the OP wants somebody else to confirm that their code works, which would not be an appropriate CR question. — Zak just now
 
any of you proficient in C# async programming?
I'm using that kinky dataflow API and I want to verify that my implementation is correct
 
@JoeWallis Nice work.
 
10:12 AM
-1
Q: AutoDownVote.SE - The new way to down-vote!

Narawa GamesAutoDownVote.SE is a browser extension that enables you to quickly down-vote every votable Stack Exchange post on the page with a single click. Options are available: only down-vote questions, only down-vote answers, down-vote both questions and answers, or automatically down-vote everything as ...

 
@JeroenVannevel hello.
 
@Quill Yuck. Isn't there a rule on SE against that?
 
I don't need auto-downvote to downvote this post. — Dan Pantry 9 secs ago
2
 
0
Q: Client / Server implementation for TCP connection in C

Quino TerrasaAlthough it seems to be correctly implemented, it keeps on returning me ERROR when I establish a connection using the loopback address(127.0.0.1). In addition to a simple TCP Client/Server connection, I have added an additional case: If the client tries to send data but finds the connection clo...

 
@Mast what do you mean?
 
10:16 AM
240
Q: Column 80 - Plain Text optimised Stack Exchange

Mark Henderson Screenshot / Code Snippet About Browsing the existing Stack Exchange family of websites was OK in a text-based browser, but when you're stuck in a Linux shell with no way out and no other computers around and you just know you saw the answer on Server Fault last week, this is how you can fi...

This is cool
 
> NEWS UPDATE: We're currently working on an auto-flag feature to be implemented in the next version.
ouch noo
 
@Quill Down-voting without regards for the content of the post, smells like a TOS violation although I can't find the specific rule being broken here. It's most definitely unwanted.
It turns SE into a playground instead of a Q&A.
 
@Mast even if it wasn't against the TOS, it should be.
 
^^
 
now post to mse for free rep
 
10:19 AM
I love this.
 
@Mast votes are up to the person, I doubt it violates TOS, but it's not good
 
@Quill Yes and no. SE has systems in place reversing votes, so they aren't entirely up to the person.
 
Heh, A on my final exam. Wop wop
3
 
@ardaozkal No mention of voting on there though.
 
10:21 AM
@ardaozkal you won't find voting things inside of the ToS
 
So first of all:
> Subscriber is responsible for all of its activity in connection with the Services and accessing the Network. Any fraudulent, abusive, or otherwise illegal activity or any use of the Services or Content in violation of this Agreement may be grounds for termination of Subscriber’s right to Services or to access the Network.
 
When I said ToS I meant something else but not ToS
 
anything that script does, you are %100 responsible for it
if it ends up serial downvoting someone, you can be banned for it
 
I'd ban the user for 7 days for encouraging illegal behaviour if it was up to me.
SE is having enough trouble as it is, we don't need jokers like this.
 
that'd highly hurt answerers and askers.
 
10:26 AM
So would serial downvoting without viewing the content
 
It literally breaks the system.
 
@DanPantry no, I mean the script hurts
 
0
Q: Laravel dropdown list without empty values

JonuuxI'm creating dropdown list from all possible cities in database, all cities are distincted. $city = DB::table('contacts')->distinct('city')->lists('id', 'city'); ^ Extracts all possible cities, however it also extract empty string ['' => '95]. How I can forbid retrieving empty city ? I tr...

 
LOOOOL addons.mozilla.org/en-US/firefox/addon/autodownvote-se mozilla removed the extension already
 
Zak
@DanPantry Isn't this what Downvoting (that post) and the vote-reversion mechanisms are there for? Sure, it's unwanted, but also not particularly dangerous.
 
10:29 AM
@Zak Downvoting is for removing posts from the front page or indicating they are low quality. Vote reversal is a tool that exists to revert malicious usage of downvoting.
I would argue this addon is almost certainly malicious downvoting
We shouldn't need to reach for vote reversal there, we should just simply not allow it in the first place
It's almost like saying it's okay to hurt someone because hospitals exist. Yes, you can get better at a hospital, but it'd be better to not get hurt in the first place ^^
 
Monking
 
Zak
What's the difference between a serial downvoter having their votes reversed and (potentially) getting banned, and the same user doing the same but via script instead?
 
There is no difference
 
@Zak according to ToS, literally nothing
 
But if you're comparing a serial downvoter who gets banned to someone using a script maybe that should be reason enough to not allow the script
 
10:32 AM
well, one is an issue with the user's mindset, one is with a user's choice.
 
Downvoting a post is a user choice
Serially downvoting a post is a user's choice
Using this addon to indiscriminately downvote posts is a user's choice
They're all user's choice. Serial downvoting, via addon or not, is a bad thing
 
also yeah, it also costs -rep to them when they downvote answers
 
It's not a cost of rep, it also reduces visibility of a question
 
Zak
@DanPantry Exactly, which is why I think it should stay. If somebody wants to use it (and get banned for it), that's their perogative.
 
If you're going to ban someone for using a script, why would you just not ban the script?
2
The only thing that script serves to do in that case is just honeypotting.
 
Zak
10:34 AM
@DanPantry Because the script is not, in and of itself, bad. It's just a tool.
 
@Zak I would usually agree with you but I'm not seeing a single instance where this tool could be used for good.
it's not ambiguous. It's a tool for trolling at best. it has no positive uses.
Guns, hammers, drills, knives are all dangerous tools but they all have a primary use that is actually helpful. I'm not seeing where serially downvoting an entire page would be helpful unless in extremely rare circumstances.
 
@DanPantry mozilla acted quicker and removed the script from the firefox addon store
 
Zak
@DanPantry I dunno, it might make downvoting SO people who insist on answering poor-quality obvious dupes a lot easier.
 
the user should be banned, the developer
they, jokingly or not, planned a serial flagging feature
 
@Zak If i was an addon that let you like
tick multiple questions
and dthen downvote them
I can see that being the case
But this just downvotes the entire page indiscriminately
 
10:37 AM
@DanPantry or downvoting from question list
 
And it does it as soon as the page loads, before you can read any of the question
 
@DanPantry and you can't remove downvot
 
@ardaozkal You can, within a minute or so.
 
No, the addon stops you.
 
lol
That's even more afwul.
 
10:38 AM
MAYBE there is a good idea in here
But this addon is not the correct implementation of it
Far, far from it
 
Zak
@DanPantry Again. I'm not disagreeing that the behavior it automates is bad. Just that I'd file it under "If people want to be idiots, that's their perogative"
 
@Zak I'd agree, but this doesn't just affect users, it also affects people asking and answering questions
If it were something stupid like making their password visible to all or putting a phallus as their profile picture so they'd get banned that'd be ae personal choice
 
Zak
@DanPantry Which is what the corrective mchanisms are for.
 
@Zak they are free to put it on non-se platforms but as soon as they advertise on StackApps they scream "network ban me"
 
If you're advertising an app on StackApps that will get you banned or force mods to intervene when you use it, it should not be on StackApps.
That is no longer a user choice and it's trolling at best and just wastes a mods time
 
10:40 AM
You can ask people to review your code at CodeReviewchoz 31 secs ago
 
@DanPantry I'll put it as an SO question
 
I would be okay with it if it didn't affect anyone else, but it does, and saying there are "corrective measures" is not a good enough reason to approve it IMO
 
@DanPantry IMO it'd be quicker to just manually downvote, rather than build a list of things to then downvote...
 
@JoeWallis I agree, and that's the only time I can see this addon actually being useful
In every other case it serially downvotes everything and causes more work for mods
 
Zak
Huh. There's no Meta-Stack-Apps
 
10:42 AM
it got downvoted out of existence/
:^)
 
@DanPantry as I said, they already planned developing a flag feature. That could cost mods and high rep users a lot of time.
 
Zak
@DanPantry Which is why I think manually intervening to ban it sets an unnecessary precedent.
 
not just a mods time too
 
@ardaozkal Yes, that one sent up... warning flags
@Zak It was a joke, but I really just don't see any use for this mod and I can't see why it should be approved just because "Welp it's the user's own fault if they use it and get banned"
If you disagree, that's fine, but I don't really have anything else more to say here :(
 
Zak
@DanPantry I was going to write much the same ^^ It's just a fundamental difference of opinion on the appropriate response.
 
10:45 AM
@JoeWallis are you around ?
 
@Dex'ter Yup
 
(\(.*?\)) this gives me all that's between parentheses including them. How can I remove them to get only the value ? (in regex)
 
the user who answered that user's post also answered other questions/discussions/posts of him. Sock?
 
@Dex'ter \((.*?)\)?
 
awesome. tnx mate ^_^
 
10:48 AM
@Dex'ter (\([^\(\)].*\))
 
tnx @Quill I guess Joe's alternative is a lil\' bit easier to digest
=)
 
As if any Regex is easy to digest ;)
4
 
hahaha
 
@skiwi There's no need to digest regex, it's already a pile of s*** ;-)
 
Zak
0
Q: Should Stack Apps ban apps which encourage ban-worthy behaviour?

ZakReferencing This App in particular. It's an App that allows you to auto-downvote every downvote-able thing on any SE page. I have 2 questions. 1) Does that app actually violate the SE Terms of Service? 2) If it does not, should it be banned anyway for "encouraging unwanted behaviour" (or simil...

 
11:03 AM
0
Q: create generic method for two different anonymous types C#

SivaRajiniFunction 1: public HttpResponseMessage Get340BValidations() { int partitionId = GetPartitionId(); //int partitionId = 10054; this.db.Database.CommandTimeout = 180; List<Validation340B> result = this.db.VW_Validation_340B.Where(x => x.parti...

 
@JeroenVannevel All I can think of is reviewing this
btw tasks are not guarnateed to start on new threads
they start in the threadpool, even in aspnet this is fine
 
Monking!
 
monking @Phrancis
 
How's it going?
 
11:15 AM
oh hey there @Phrancis
 
11:35 AM
Anyone around has some experience with Unity framework for C#?
 
Yes
 
@ardaozkal RE your profile message
I think you should remove the "Please don't criticize me for X Y Z" section
No one is going to know your age, nor care about old stuff you posted, nor your political beliefs, on SE
I'd argue they are more likely to do so with your profile message signposting them to it
Just my 2c
 
@DanPantry they are there because they happened.
 
Where is your age even mentioned on your profile?
Except that section
 
But yeah, removed
 
11:52 AM
@DanPantry that doesn't sound a complete sentence
 
I'd have thought I misunderstood the question if this were the top answer but kudos for the code review. — Fr0zenFyr 38 secs ago
 
0
Q: First JQuery Plugin ScalableLightbox Not Working

Breionna DillonGood Morning, I am currently working on a school project where I must develop my own Graphic Design portfolio and we MUST use a lightbox to showcase our projects. I have come across this jquery plugin called ScalableLightbox, and have installed everything perfectly until I started to add 10 more ...

 
@JeroenVannevel i was mainly trailing off at that point yeah
basically not sure what's wrong, but your code could use a review imo
 
All code could use a review
private static Task SpawnThread(DataflowProcessor<string> dataflowProcessor, string taskName)
{
    return new Task(async () =>
    {
        await FeedData(dataflowProcessor, taskName);
    });
}
Could just as easily be
private static async Task SpawnThread(DataflowProcessor<string> dataflowProcessor, string taskName)
{
      await FeedData(dataflowProcessor, taskName);
}
There's no guarantee that a Task will execute on a new thread or its own thread
I have no idea how this data flow stuff, works, though
 
11:57 AM
I wrote up a half explanation earlier
let me find it
> The idea behind Dataflow is that every part of the pipeline (a Block) works independently from other parts and they just pass data on to eachother. Each part of the pipeline has a queue of incoming and outgoing data and performs their action on the data as it passes through.
It's, quite frankly, freaking awesome
I want to build all my stuff with pipelines like this
it's like.. async func programming
 
So.... middleware pipelines, basically
(in: T, next: Function<T>, done: Function<T>) -> void right?
 
yeah but with loads of building blocks and everything works asynchronously
 
Yeah, I know what you mean, we've used that pattern in node for years, it is awesome
As for your question I would say: Don't make sure it creates threads on demand
make it create tasks, let the .NET environment determine if it needs to put it on a new thread or not
 
pretty much. But the linking is done separately so you can link a single block to multiple other blocks who then do their stuff and aggregate it into another buffer block who then passes it on to a transform block and 5 billion more other blocks
 
Tasks are not bound to threads
 
12:01 PM
The idea behind the issue is that now when a request happens, we store a lot of data throughout the request and at the end of it, we insert all that data in the db (telemetrics stuff)
so I was thinking about creating such a pipeline where we push everything on and that then does the db inserting on another thread (not the request thread)
this allows the request thread to be finished sooner while the pipeline handles the db inserting on its own
 
don't worry about threads (for the millionth time ^^) just use async/await with Tasks
Tasks run on the thread pool, so that is managed for you
 
alright, I have to read up more on tasks and threads
I've got wonky knowledge
 
A task is a representation of an asynchronous action
Think Promise in JS
A thread is where that action might be run
also, my chair just broke... i am not that heavy
 
@JoeWallis are you still here ? a bit of guidance ? dpaste.de/7yO2
 
but now I can't lean back on it, RIP my back
 
12:07 PM
Monking
 
@Dex'ter I'll have a look, :)
 
@JoeWallis oke
 
user image
2
 
@Quill watch yourself, you might cut yourself on that edge
also, I figure that describes a project manager far more than a CEO
our CEO is bloody awesome
 
well that makes one of us
 
12:12 PM
thats my CEO
he flew the entire company abroad a couple years ago
(googled photo)
 
@Dex'ter I can think of something, but you won't like it...
 
well, say it. It can't be worse than what I have
^_^
 
$ git rerere is magic
 
@DanPantry Git 2.9 is magic
 
$ git --version
git version 2.8.1.windows.1
 
12:17 PM
@syb0rg Why?
 
oh, nice
git rebase -x looks awesome, too
 
@Dex'ter Put it in dpaste. Don't want to clutter up here with regex and Python. :) But I used 2 regexes one to get a string of all values like (value_1)(value_2) and then another to get every value in a list ['value_1', 'value_2'].
 
@JoeWallis one sec
 
12:36 PM
@ardaozkal did you say yes about the Unity framework question?
 
12:47 PM
@JoeWallis something like this, but it's not ok dpaste.de/XmyQ
 
function tryParseDate (dateString: string): Date {
  // Attempt to parse with our date format, otherwise use negotiation to parse.
  return kendo.parseDate(dateString, `${$scope.ShareSvc.UserPreferences.DateFormat} HH:mm:ss`)
    || kendo.parseDate(dateString)
}
That feels so hacky :(
 
-1
Q: Node.js function Error

JorkermcI am new to node.js and i want a create a function but it gives me a error.Here is the code: function cmd() { rl.question(">", function(cmd){ if(cmd == "exit"){ process.exit(); } cmd(); }); it isn't working.The error is: SyntaxError: Unexpected token ) at Object.exports.ru...

 
@CaptainObvious
 
@Dex'ter Same requirements as before?
 
yea'
 
12:51 PM
@Dex'ter Is it limited to two values 'F.F.1(v1)(v2)'?
 
yep
it can be Index(v1) or Index(v1)(v2)
 
Don't care about what's between brackets I guess.
 
no, because I'm filtering them anyway. I'm interested only in the digits between brackets
 
I love the change they made in Python so (?:(.*))? can return None, ):
 
i felt the irony #haha
 
12:56 PM
Does regs_index = re.escape(index_value) + '\((.*?)\)' + '(?:\((.*?)\))?' work? You will need to change joined_values too joined_values = ''.join(v for v in values_in_row if v is not None)
 
well, it works if it matches that regex
but yes, it works like that
 
Greetings, Programs.
 
That's awesome.
 
couldn't find a better way to add a variable to a regex condition @JoeWallis
 
@Dex'ter Huh?
 

« first day (1138 days earlier)      last day (2885 days later) »