« first day (919 days earlier)      last day (3396 days later) » 

01:08
0
Q: How to increase maintanability of this code as calculated by VisualStudio 2012

Mauricio GraciaThis code aims to hide some of the details of how the configuration of the application is stored and if that is kept on a file or not using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsolePersonasPoderosas { /// <...

01:27
Hello.
Quiet here.
01:37
Hi
0
Q: A machine independent C library for printing the binary representation of data types to stdout

zer0ptrhttps://github.com/zer0ptr/libprintb Curious as to peoples thoughts on this small library I have made. I noticed there are no functions in the C standard library to accomplish this task. I have tried to make the code machine independent. If anyone has access to machines where char != 1 byte, s...

01:55
Hey there
0
Q: A machine independent C library for printing the binary representation of data types to stdout

zer0ptrhttps://github.com/zer0ptr/libprintb Curious as to peoples thoughts on this small library I have made. I noticed there are no functions in the C standard library to accomplish this task. I have tried to make the code machine independent. If anyone has access to machines where char != 1 byte, s...

02:18
Hello
Zak
Zak
Monking @all
I lost my fanatic progress, I forgot the 2nd Monitor doesn't actually count
02:34
Uh-oh... sorry to hear that
02:47
0
Q: TSP Brute Force Optimization in Python

Mr. FootsI am currently working on a project which includes solving the Traveling Salesman Problem using different algorithms. I have just written a Brute Force algorithm and I would love some feedback. Now I understand that the number of operations increases by the factorial of the route length so Brute ...

@Zak Sad to hear.
(I'm Manny Meng BTW if you don't know)
Well, I lost my fanatic badge on meta.cr with only 3 days left a couple of months ago
0
Q: Pythong formatting and indexing

Tin2185I need to create a formatted table that tracks the value of the investment per year (year in one column and principal in another). I can't use graphics because i don't know how to. I just need them to line up under each category. plus i don't know how to loop to find the consecutive years and th...

> "Pythong"
4
lol
03:03
@EthanBierlein rawr...
woah man
03:23
0
Q: My first attempt at WPF and MVVM with simple CRUD

SeeSharpCodeThis is a simple application that will eventually manage certain files for video games. For now, I'm only posting code that handles fetching, adding, and viewing games. I'm trying to keep things incredibly simple and pure while learning WPF and MVVM, so my goal is to avoid frameworks. Please not...

 
2 hours later…
05:05
2060: The gregarious superintelligent AI, happily talking its way out of a box, is fast becoming a relic of the past. Today's quantum hyper-beings are too busy with their internal multiverse sims to even notice that they're in boxes at all!
4
05:37
Monking
06:04
0
Q: Faster way to draw thousands of lines in WebGL or Canvas

grovesNLI am trying to draw thousands of lines between nodes, and the line positions are constantly changing (ie. consider a node being dragged while connected to thousands of children by these lines). Below is a simplified example of an issue I have. When drawing several thousands of lines in WebGL or ...

06:22
0
Q: k-d tree implementation in C++11

Uri RazI've written a k-d tree implementation in C++11 in order to learn and practice the finer points of the language. I'd appreciate feedback on the code, e.g. is it good C++ code, missing functionality, could it be optimized, etc? I have written unit test (I can post separately), if anyone suspects ...

07:10
@syb0rg Thanks!
Nov 5 at 16:52, by SuperBiasedMan
Is Duga down?
@SuperBiasedMan you were right. Duga has been down for several days. I should have noticed sooner.
Her webhooks is working, but not her scheduled tasks (reload, auto-comments...)
 
1 hour later…
08:32
0
Q: Using EqualityComparer to find contained value

Dion V.While searching for a method in HashSet which allows me to actually find an object in O(1) (not just Contains, I need the reference), I came across this question on StackOverflow and specifically the latest answer drew my attention. I reworked the answer in a more generic approach and came up w...

08:44
Monking
hey @DanPantry
0
Q: Find the Preorder traversal from Inorder and Postorder traversals of a binary tree

aamir23I was solving a problem where I was given Inorder and Preorder traversal and had to find the Postorder traversal of a binary tree with the code below. def printPostOrder(inorder,preorder,n): """The first element in preorder is always root, search it in inorder to find left and right s...

0
Q: Refactoring complex function containing case statement

sonalkr132Following methods in my notification class is marked as complex on code climate: (finds object on which action occured) def objectname case action when 0 return Project.find(Comment.find(object_id).polycomment_id.to_i).name when 5 return Issue.fin...

09:03
Monking
@EthanBierlein Who said anything about sleep?
Monking
We have a stereo in work that plays throughout the entire office on overhead speakers that connects to iPhones
and I put my music on this morning
And I COMPLETELY forgot one of the songs had screaming in
woops.
3
the entire office is not amused
Zak
Zak
09:24
Hey @DanPantry still sleep deprived from Saturday or are you back to normal now?
@Zak still sleep deprived
but im souped up on coffee and cute little tigers
Zak
Zak
@DanPantry Cute :)
if that was me i would just give him the leg
well no I wouldn't but still its adorable
Zak
Zak
I just slept until Sunday afternoon, slept again a few hours after that, and I've been up since about midnight. I'm pretty good (so far)
Ha. I had to be in work at 7am this morning so naturally I didn't go to sleep until 1am
09:38
@SimonForsberg Ah, I should have pinged you. I didn't have time before I finished up to check if I was right about her being down or I was misunderstanding how the Duga log room works.
Monking all!
09:58
@DanPantry What you get for making a service public like that. Not your fault ^^
Monking
What would I do without you, lovely popup?
not know how many tabs you have open?
Have less tabs open cause you accidentally closed them all.
@skiwi I am convinced Dutch is just a language that is gooble-de-gook that Dutch people speak when English people are around to make them think the language actually exists when in actual fact all the Dutch people speak English only
I can't even begin to think how you would pronounce half of those words
@DanPantry Scheveningen, try to pronounce that
10:11
@skiwi I would, but I'm afraid I would get phlegm over my screen.
Besides the double vowels it looks like normal weird European language to me.
@SuperBiasedMan I like how you put "normal" and "weird" in the same sentence lol
Normal weird, as opposed to weird weird!
Or try slechtstschrijvend
@DanPantry We do speak English because we're aware you won't take us seriously otherwise.
Scheveningse schuitjes
10:13
You should see the madness of Irish pronunciation too. It's terribly unintuitive.
@Mast I didn't realise you were Dutch :)
@SuperBiasedMan You mean Gaelic?
@DanPantry Yea, I put it in my profile a while back to lessen the confusion.
Herfst is also a totally common word meaning autumn
@skiwi Who the hell thought it was a good idea to put 9 consonants next to each other?
We only need one vowel on five consonants
10:14
@DanPantry Some languages are worse.
It's almost like vowels are a limited resource in your language
Everyone only gets a set number of vowels per year and you can't go over so use them wisely :p
@DanPantry Uh, maybe? I actually forget if that's used for modern irish or not. I always hear it as a vague irishish word rather than applied to the language.
So my boss wants me to put a new feature in that will enable administrators to make a report on all of the users in their branch of the company
They can select each individual user via a drop down list
There are 1134 users in one of the branches. how am I going to display 1134 users in a drop down list..
Step one; select branch
we have already done that
there are 1134 in this given branch
10:21
Ah
there are so many options it actually crashes my browser
@DanPantry In a very long drop down list, obviously.
5
@Mast Ever the pragmatist :p
And there's not ay other breakdown points?
@Gemtastic nope
10:22
Your boss gave you a very specific feature request. I'd say: make it happen.
@Mast Lucky we don't need to support this branch (for another 2 months)
Apparently we will review it then..
And make a back-up of the original (you do use Git now, right?) in case he changes his mind.
@Mast TFS. We're all fked.
(/antiTFS circlejerk)
@DanPantry Are you responsible for slow performance?
Local repo FTW
10:23
@skiwi I'm one of two front end developers for this solution so.. yes
I'd go with a combobox where you would need to type at least one or two letters before it shows any options though
@DanPantry just 1.2k?
you lucky bastard..
I had dropdowns populated with 10k+ Elements...
Alternatively you could create your own "dropbox box" that's lazily loaded while scrolling
without a search option
anyways off for lecture :D
You could use a dropdown like SE chat uses. Perhaps not exactly dropdown, but it works.
10:24
@skiwi Unfortunately every username is prefixed with the same prefix -
But this is probably the solution we'll go with.
I'm still curious where my lecture of 3.45pm is at
@Mast That uses asynchronous loading I believe - almost like a search box.
This could work, however the underlying system call has no concept of filtering by name, so we'd have to retrieve the entire branch each time.
Your boss won't care what happens in the background, right?
He might if it brings down the other systems that rely on the same service :p
10:27
Details
just blame the other systems
5
Yea, blame old hardware
It's not a bug, it's a feature.
Free service restarts for all.
New way to restart all services, search for Nyugen
@skiwi I'm sure there's a joke I am missing here
@Zak in welsh, w and y are vowels.
That doesn't count ;-)
(But yes, Welsh is pretty bad)
@Zak I'd lose track halfway.
@Mast Its hard to read, but saying it is actually pretty easy until you get to "chwyrndrobwilllantysiliogogogoch"
@DanPantry "chew-urn-dro-brilliant-silly-go-go-goch"?
@Zak ha
Zak
Zak
@DanPantry Jinx :)
Stands for Jinx. Durr
@Zak Darn.
@Zak Hakunamatata?
@skiwi What a wonderful phrase.
@Mast my god, Ulduar
I remember tanking that. Good ol 9696969 rotation
Zak
Zak
@DanPantry Hakunamatata
10:37
@Zak [not knowing the rest of the words intensifies]
@Zak That's actually fairly pronouncable
Zak
Zak
@DanPantry Aint no passing craze
It means no worries
for the rest of your days
it's our problem free
IT means no worries? IT has plenty of worries
Zak
Zak
philosophy
hakunamatata
and there my knowledge of the lyrics runs dry
@DanPantry Everyone worries, although their justification is often lacking.
For example, I'm watching crystals grow.
And there is no process as painstaking hard to debug as growing crystals.
Compile time just fades in contrast.
10:39
@Mast I thought you were continuing the hakuna matata song
I was thinking real crystals
Suddenly things became very eloquent
@JeroenVannevel Hakuna Matata: geology version
@skiwi For some values of real
We're meant to be testing whether or not a service is working atm by going through a service that uses it manually
I just wrote a quick script to call the API every 2 seconds :X
10:55
1
Q: Handling error in Java 8 Stream and determine behavior later

Derek MokI have the following code which has a not-so-nice way of tracking whether an exception occurred during some stream processing. public List<> myMethod(AtomicBoolean exceptionOccured) { return myCollection .filter(p -> methodThatCatchesAnException(p, exceptionOccured) .collect(...

Hmm... I need to fill in a form about language competency, it has options (1 = Purely theoretical, 2 = Practical knowledge about basic functions, 3 = Detailed knowledge in use, 4 = Thorough knowledge about syntax and integrations, 5 = Is considered a specialist in his environment)
Do you think it qualifies as being a specialist if you can answer complex CR questions? ;-)
There's even a form about refactoring, that should be a 6...
11:13
@SuperBiasedMan No you were right. As the Github webhooks were working I thought everything was working, I was confused by that. I did not think of the possibility of the scheduled tasks to stop working like that. I also did not read Duga's log-room, if I would have noticed that there were no messages there, I would have known that something was wrong.
Add a value to the set? `SADD`
Remove a value from the set? `SREM`
Get the values from the set?
SMEMBERS
Because SGET would be too logical and we don't do none of that in Redis
Though I would've liked if it would be able to be called with GET -- which works for anything but a set, apparently
Logic... Some stuff lacks it?
@JeroenVannevel this makes sense to me. SMEMBERS indicates getting membes from a set. SGET indicates getting a specific member from a set.
@skiwi I can't stand such forms.
Those are two different operations. That's like wondering why GET / !== GET /:id
11:22
@Mast I think for students studying or just graudated they are fine, what's your problem with it?
@DanPantry mm I guess. Makes sense in that light
@skiwi I never studied CS. The first time I encountered such a form I was like "More practical than theoretical, does that count somewhere?"
This form is exactly for practical experience ;)
I wasn't clear, but it has a huge list of lots of popular languages and some paradigms
And Git knowledge
@JeroenVannevel Besides, are Sets even designed for random access? Their order is not determined.
I just need to connect a given key with a small amount of string values
would you suggest another data structure?
11:25
@JeroenVannevel Sounds like a dictionary is what you need. Sets are collections of data with no defined order, the only guarantee being that each element is distinct.
Redis has support for hashes.
My answer got 40 upvotes. I'm not sure how I feel about this.
@DanPantry eh? Redis is in itself a giant dictionary
@DanPantry It means you wrote a solid answer.
@JeroenVannevel Its dictionaries all the way down.
A solid answer on a dubious question.
Still don't see why I would use nested dictionaries though
11:29
@JeroenVannevel If you want random access you can't use a Set.
You could try a list if you just want to use redis as the dictionary
Since when did I know anything about data structure? wtf brain
What do you mean with "I can't use random access"? I can SREM any element at any location in the set..
And it's a set, aren't those typically based on hashing?
@JeroenVannevel sets are unordered by default
> Redis Sets are an unordered collection of Strings. It is possible to add, remove, and test for existence of members in O(1) (constant time regardless of the number of elements contained inside the Set).
Why does ordering matter?
because if the order isn't guaranteed, each indice will refer to an unknown string
ie, if you have a set 5 items long and you insert another element, its not guaranteed that set[5] will refer to that 6th element
If you want to delete something, you have to specify to value
oh, but that's okay. I don't need any ordering
11:33
Oh, in which case, then I misunderstood your question :)
I just need to have these values associated with the given key
then yeah a set should work
but you can only retrieve all of the members (or guess at random indices usign SREM).
The scenario in question is associating a certain entity with a collection of agents that should be fired when that entity has any interaction happening to it
yeah, that's fine. I need to get all agents and examine their firing condition anyway
yeah set is probably the best here then
Part of me is tempted to create a tree-like structure in Redis based on the idea of tables
11:35
aka hashes :)
Redis |
         | Hash Users
             | Hash user1
                 | Hash username
Is that an accepted practice?
I mean that could potentially work
Although it might be better/more "Redis-y" if you were to create a string such as users:user:<id> and associate that string with the user hash instead.
(I don't know, honestly)
yeah, that's pretty much what we do now: the beforementioned entity has as key '<customer>.Agent.<entityId>'
I wouldn't worry about best/worst practice, just do what solves your problem and worry about it when it becomes an issue.
Nov 2 at 19:30, by Dan Lyons
Nothing is more permanent than a temporary fix that works.
11:38
Well, if it isn't an issue then who cares if its a temporary fix?
Yeah, I guess I'm just not yet comfortable with the idea behind Redis
Right now we have a Redis structure of 50 elements
If you need to be able to query entire tables of users then yeah, use a hash.
once it will get tested (lol, as if), it should be able to handle thousands of requests per second per customer, all in the same redis cache
But if you just need to cache user information and rapidly retrieve it when you know the id of the user, then do users:user:<id> or some similar pattern
I think if there becomes a use case where you need to store tables and tables of user information and access it like a table then you've probably gone wrong somewhere - Redis is meant to be a cache or in memory store, not a database ;-)
@DanPantry thats a very impressive answer.
11:41
I am not entirely sure I wanted it tied to my professional SO with that amount of publicity
You can ask them to disassociate it from your account
I would do the same
but my mortarboard..
Haha
That's the reason I won't sign up for workplace or parenting ^^
While I do really like those sites and wish I could upvote
thats the other side of the medal but it shows honesty. Sure it can come back and slap your face, but well anybody who would judge you or your profession based on that answer should get lost.
@skiwi So just register and upvote. Got a couple of accounts which I only use for upvoting because I never do anything else there.
Although I'm currently writing a Biology question...
11:44
@skiwi I make throwaways for the workplace for obvious reasons.
Me posting something heartfelt about my past isn't really professionally threatening. Me posting something about how my boss is being a dick? Yeah that might be more of an issue.
@Mast lemme tell you all about the flowers and the bees
@JeroenVannevel I'll stick your bee so far up your own flower you'll never attempt to have that talk again.
6
Help
I need an adult
stranger danger
3
I love this chat room
Colleagues just asked if anyone wants to go to drinks on Friday
it's not even lunch on Monday yet
I take a beer
or two
or three
11:48
"I don't have a drinking problem. I get drunk, I fall down, no problem!" - World of Warcraft Dwarf
"When do you know you've had too much?" A: "When I ran out."
5
@Mast Bubba J quote?
Yup, but I doubt it's originally from him.
No-one asks here, usually we have to ask if people aren't going to the pub on Friday
question: is there such a thing as knowing too much when it comes to programming? Right now I'm learning about administration and how to use tech and scaling and.... you get the idea. Should I consider instead just focusing on one thing?
It's pretty overwhelming when starting a project thinking about all of these things - okay so where will the database go and how will it scale what tech should I use private networking okay now lets write the code and the front end and ...
11:53
@DanPantry It Depends(TM)
If you don't tend to over engeneer a given task, you can't know to much.
@Heslacher I overengineer making coffee, let alone anything in programming
@DanPantry Well, knowing too much about writing code correctly can harm productivity if you're not careful ;)
It's the classic "Should I go broad or deep" problem
Making coffee is easy here. Hitting a button and wait...
11:54
@Mast Always go deep
@skiwi balls deep
:^)
IDK, I feel that I focus on too much in a project and that leads to stagnation and not actually get anything done.
@DanPantry In that case you'll want to fill the current gaps in your dev team.
AKA: go broad
@Mast No, I mean
I try and do everything (solo worker) and end up doing nothing.
Ah
I am my own admin, developer, and so forth
11:57
So you're already too broad.
Although it's required in some situations.
Particularly when a solo developer :-)
Exactly.
Hello @kayess, welcome to the chat room.
When you don't have a DBA, you do it yourself. When you don't have a sysadmin, you do it yourself. Etcetera ad infinitum.
Hello @DanPantry, thanks for the warm welcome .-)
11:59
Welcome @kayess
JSON.parse(JSON.stringify(data))
You'd think it wouldn't be necessary. But it is.
@JeroenVannevel
What kind of black magic are you doing
If I don't do the stringify, it can't parse the input. Input being the result of a redis.smembers call
@JeroenVannevel it can't parse the input because the input is an object surely
ya, that's what typeof says
12:02
have you considered looking at what the object contains...?
and when I print it, it displays MB18Zeo2ZMEpUKHbBo_2208095915,PLubZeo2ZMEpUKdqsdqBo_2208721415
so I guess javascript also has the notion of a toString override?
It does
Well apparently my tests work if I do the JSON magic sooooooooooooooo
assignment done
12:03
Would make sense.. JSON.stringify would ignore toString and only serialise the object's own enumerable properties
i wonder what kind of format that is, something like MIME encoded text or ?
@kayess nah, randomly generated characters
@JeroenVannevel I've been amazed by that before and just wrote it down as JS magic.
@kayess it sounds to me like what @JeroenVannevel is trying to parse is an object with toString() overrided to return some kind of key or hash
If it works, don't touch it.
Unless you want to make things shinier, but don't overshine one-liners.
12:05
@DanPantry the object contains all the values of a smembers call
nothing special from my side, this is node_redis' doing
@JeroenVannevel node_redis doesnt do anything special, either
node_redis just maps names (smembers) to redis calls
then I guess it's whatever kind of JSON object redis returns?
smembers should return an Array of objects
all json.parse to json.stringify will be doing is just putting that array into string form and back again
s/return/pass to a callback
hold on, I'll test with a version of redis now.
@DanPantry exactly i thought that too, that it being some kind of Gethashcode() output.
just passing the data returned by redis.smembers through my function pipeline makes it blow up when it reaches a util.isArray call
Are we talking about different kinds of arrays that don't translate?
12:14
how the hell do I get the url of my elasticache group
NVM elasticache only allows access from EC2
oh bugger
i've launched a large redis cluster on my account that doesn't have the free trial of AWS on.
oh dear
my favourite thing about my job is taht work has blocked outbound SSH
but they haven't blocked c9.io
so I can just go on c9.io and ssh onto my VM that way
Monking
@DanPantry At first glance I thought that spelled "Elastic Ache"
@DanPantry Sounds like the type of rookie mistake many sysadmins make.
12:30
Logs say it found a key in Redis, even though I cleared the cache before that
Something is funky
@JeroenVannevel It worked for me.
const myArray = [1, 2, 3, 4, 5]
const key = 12345;

connection.sadd(key, myArray);
connection.smembers(key, function (error, result) {
  console.log(result);
})
danpantry:~/workspace $ node .
[ '1', '2', '3', '4', '5' ]
(albeit it returns strings)
can you call util.isArray on result?
i have issue about SO id..what is the solution
and what to do?
@JeroenVannevel returns true
@Johnson I'm sorry?
Oh, he left
@DanPantry seems like the SO account got deleted...
12:34
@JeroenVannevel any more help you need or can I delete this redis box? :)
Also, how cool is it that I can go on a website, click a button, get a virtual machine with redis on, test something and then click another button to dlete it all within 5 minutes.
that's awesome.
eh? It returns true?
Yeah feel free to delete, I'll investigate further I guess
@JeroenVannevel yup.
put your code in love room and ping me
ill hop over after ive gone to the bathroom
aha
I think I see why
on the redis.smembers() call I do a simple check on if(data) to see if it returned anything
but that will always be true since it returns an object anyway and not null or something
which is also why my logging tells me it found a key that isn't in it
Any suggestion on how to check for this that doesn't involve JSON.parse(stringify()).length?
lol. nevermind
I'll chalk it up to a brainfart
We don't have the XKCD feed here, right?
12:51
@JeroenVannevel Yes, we do :)
That was posted earlier
@SimonForsberg that website has a poster that is now on my desk, thank you :)
gah, I can't remove it now
PICNIC: Problem In Chair, Not In Computer
We call it a I D 10 T error.
Works better when you pronounce it instead of reading.
I don't think I'm going to figure out today where my lecture is
13:06
@DanPantry I prefer PEBCAK
makes me giggle when you pronounce it knowing Dutch
Totally safe for work
No birds, no bees, no flowers
13:26
1
Q: How can I speed up below program's execution?

dhirajforyouBelow is the code for user recommendations using mahout. DataModel dm = new FileDataModel(new File(inputFile)); UserSimilarity sim = new LogLikelihoodSimilarity(dm); UserNeighborhood neighborhood = new NearestNUserNeighborhood(100, sim, dm); GenericUserBasedRecommender recommender = new ...

0
Q: Should I create a new Controller for Insert?

Daniel GrohI have a controller called VacationController; in this controller, I retrieve a list of vacations which will be displayed in a grid. In the grid, I have the option to create a new vacation through a popup window. Should I create a new controller for this popup, considering that the model is repr...

13:37
Hm. Same name, different icon & rep...
@Phrancis I'd reject.
ALready approved before I noticed that. The edit itself is benign, but I hope it's not a sock
If you want to edit your own question, take the effort to log-in to your original account. Or don't edit.
@Phrancis drop the mods a note to request a user merge..
or write an email directly...
Actually, it looks like the "editing" user is the original account. Perhaps the OP had login issues when they cross-posted to CR from SO
13:45
Greetings, Programs.
Hey there @Donald.McLean
There's not a way to ping the mods without pinging each one individually, is there?
Zak
Zak
@Phrancis nope
0
Q: What is the most generic way to provide a variable amount of outputs from a Rust function?

vadixI am currently writing an API for machine learning algorithms in Rust and I would like for a single genetic algorithm, artificial neural network, or Bayesian network to provide multiple outputs so that for instances in which there may be redundancy, the algorithms can benefit from each other. I i...

@CaptainObvious No Code at all...
possibly better off on Programmers, but TL;DR;
13:58
@Vogel612 Got it covered there, I think that one actually would be on-topic on Progs. I made a comment.
Monking
anyone here use Office 365?

« first day (919 days earlier)      last day (3396 days later) »