« first day (566 days earlier)      last day (3750 days later) » 
00:00 - 23:0023:00 - 00:00

00:04
@200 as mentioned in my now deleted comment on maartinus' answer, both programmers and stackoverflow don't really need more links to theor site for users to come and ask questions...
Especially since both have a more refined scope than: general programming questions and conceptual questions about software development
@200_success we've seen calculator code on this site.. I like how @RubberDuck's answer swaps "computer" for "working"
I like that @200_success. But I do feel like "computer code" feels clunky.
I also would ditch the links to the sister sites.
Okay, so this is what I really like.
@Mat'sMug @RubberDuck I feel the same
> We're working together to improve the skills of programmers worldwide by taking working code and making it bette
I think you're missing a lette
6
00:19
Not really. Just on my phone.
lo
2
00:45
I've rolled the one good phrase into your answer, and deleted my answer.
01:14
Only answer, upvoted and OP commented on the answer that it has helped them with their problem, but OP has not accepted... Just let it be or comment something?
Greetings @nhgrif!
hi
I'm so glad this got marked as accepted... it's amazingly better than the other answer if I must say so myself:
4
A: Using "Next" as a Return Key

nhgrifMake sure your text fields have their delegate set and implement the textFieldShouldReturn method. This is the method that is called when the user taps the return key (no matter what it looks like). The method might look something like this: func textFieldShouldReturn(textField: UITextField) ->...

Anyone here good with makefiles?
No, but it does remind me tomorrow I'm going to work on a utility to snag the UDID from every iOS device plugged into your OS X computer and create the .deviceid file you need to upload to your developer account in order to add the devices as testing devices.
@nhgrif I wholeheartedly agree, yours is much more thorough
It's not even about thoroughness. It's just a better approach.
If you change one thing about your UI, you have to change a few different spots to make sure it all works.
01:22
Ah, makes sense
With mine, you can make all your changes in IB and everything continues to work perfectly.
It's as simple as setting tab order. Maybe simpler since you don't have to click through the entire thing. You just give each thing its next thing. It's like a linked list for IB...
There's also the inconsistency in the other answer... use IB to set tags (which I rarely use unless I don't need a reference to that control at all) but sets the delegates in code rather than in IB..
And over-relies on viewWithTag() which can easily be avoided completely, as my answer shows.
52
Q: A co-worker is using my cup

Paranoid AndroidI have a co-worker using my coffee mug at work. I want to make him stop without sounding like I'm being picky. I have tried making the point indirectly that the cup belongs to me but he still uses it. Our cleaner cleans the cups and puts them on a tray in the kitchen area, he usually arrives in ...

read the comments. worth.
Should this question be migrated to Code Review? Just checking ;-) — rolfl 2 days ago
Ahahahaha
You should have added authentication to your coffee cup. This is what insecure practices gets you. — cfqueryparam 2 days ago
01:41
Why do you create the beverage and add sweetener and cream before creating the cup to put it in? Are you making your coffee in zero gravity? — starsplusplus 12 hours ago
01:55
Good grief. After all that abuse of your poorly coded mug, you may just give it to your co-worker. Problem solved. Let them deal with the buggy mug. — Paddy yesterday
Tbh, if I saw that mug I wouldn't go near it. Look at that coupling! No dependency injection, no SRP. If you drink from that mug, you have no standards. — Jimbo yesterday
And the best:
You could instantiate another mug, and point it to your colleague.... — pc-shooter yesterday
02:09
BTW, I just read this:
-1
A: Should we discourage leading +/-1 on comments?

Scimonster-1. I often use comments like that to tell the OP not just that i didn't like it, but that that kind of question/answer is liable to be downvoted. SE always says to explain your downvote. It seems more intuitive to mention the fact that this is an explanation of the downvote in the comment, than...

@hosch250 -1 for posting this again ;-)
Reminds me of the time when a relatively high-rep user (3xxx, I think) -1'ed my comment on a question and provided an answer.
@Phrancis, that other answer posted had a +1 vote, not a -1 vote.
It is +4 voted now.
I'm just being goofy :D
OK, -1 for being goofy :)
13 hours ago, by nhgrif
I am question more why Apple called it "Swift" rather than "Beiber" or something. Heaven forbidden your new language be decently Google-able.
Sorry, but I need to work on a speech I need to submit to my professor by Monday, as well as do my chores.
I am terrible at speech, and I am barely holding my A.
See you more between semesters!
Kick ass and take names, @hosch250
02:18
My final parallel programming project involves hybrid parallelization, including CUDA. I'm using MPI along with CUDA for this one. And for once, we can actually use C++ instead of C. :D
02:49
0
Q: How can I finish these small game in python?

Eric![enter image description here][1] can you tell me how to finish it? Thanks! Shaft frogs's position. can you tell me how to finish it? Thanks!

@CaptainObvious ?
that question is it spam?
or just off topic?
Since there's no link and such, probably not. Probably just a really lost user.
And I've deleted them both. No need to keep them on the front page.
 
1 hour later…
04:03
0
Q: Text-Based game isn't accepting user input to flow through the next options

JadeI'm doing a text based game for an assignment, and I can't seem to get this bit of code to work properly. For some reason when it gets to the if userInputList[0]=="yes": It's not going onto the next print line. Instead it's jumping to the 'else' part and I can't work out why. I'm fairly new to...

-1
Q: I have no idea how to start this

Bob JonesSo basically, what I'm trying to do is create a Pokemon-esque card game. Each card has a specific cost and attack, and the person and computer each have a set of lives, first one to zero lives looses. Standard stuff. However, I have no idea how to go about this. I figure I need to make a Card cl...

I have no idea how to title this
04:53
monking
Monknight
@Jamal do you still need help with that?
Yes I do. I'm having to compile both CUDA and MPI.
and the question is?
When I run make, it appears that my .cu file isn't being compiled with nvcc. I get errors that suggest this, such as <cuda.h> not being recognized.
05:09
I might be able to help if you pastebin the makefile and the output you get
Here's the makefile so far: pastebin.com/0t9JUJae
And I'll regenerate the error message.
I guess I could've waited to post the whole thing. Anyway, here it is: pastebin.com/xGMVevdH
if you run mpic++ -O3 -c p6_countsort_mpi.cpp, not with make, does it work?
(I don't think so)
Nope
that's not a makefile problem then
I'm not sure what else it could be. I do include the .cu file in the .cpp file. Could that be the problem?
05:24
without makefile, can you build the project by manually running the build steps one by one?
once you have the correct sequence of the correct build steps, translating that to a makefile shouldn't be too hard
as per the current makefile, mpic++ -O3 -c p6_countsort_mpi.cpp is the first step that gets executed, and it just doesn't seem to work, so something's wrong with this sequence
and yes, it looks like p6_countsort_mpi.cpp includes p6_countsort_cuda.cu, which in turn is looking for cuda.h and cannot find it
I can, but I'm using one for convenience.
Ah! The last part might be it. Would a header guard help with that?
that's not the point. If you can build by hand, and make cannot, then you need to check if it's running the commands in the same order as you intended, and with the right params of course
Okay
once you get it right, it's great, because a simple make will run only what needs to be run
if you start clean, and run make, watch for the order in which it executes the steps. it will be different from your manual steps, that's why it doesn't work
05:52
I have already emailed my instructor, so he may have something to say about it.
what are the manual steps?
(if you fix the makefile for him that might score you some extra points)
The makefile is completely optional. It's just useful so that we don't have to put in each command each time.
I would definitely prefer to get it to work rather than running the commands manually
there's also some duplication in it that could be simplified
06:16
I should be able to get it working sometime. After that, I can really start on the project. I have two weeks from today.
In the meantime, I'm finishing my Swing project now. It's actually going along well so far.
06:47
code review in real life (android project): github.com/janosgyerik/bluetoothviewer/pull/12
Note the Show outdated diff links too
07:13
0
Q: Better way to concatenate HashMap entry

DCoderI have one HashMap<String, ArrayList<String>> and I want to concatenate key with every item in its array list; consider following demo program HashMap<String, ArrayList<String>> map1 = new HashMap<String, ArrayList<String>>(); ArrayList<String> map11 = new ArrayList<String>(); m...

07:34
0
Q: Getting NumPy array of Day of Years at Every 18 days

simenI want to getting the NumPy array consisting of the day of years at every 18 days as follows: import numpy as np, time doy_2012 = np.array([time.strftime('%Y%j',time.strptime(str(x),'%Y-%m-%d')) for x in np.arange('2012-01-01','2012-12-31',18,dtype='datetime64')]) for x in doy_2012: pri...

07:55
Monking
and wow this question keeps farming rep...
36
Q: Why does Iterable<T> not provide stream() and parallelStream() methods?

skiwiI am wondering why the Iterable interface does not provide the stream() and parallelStream() methods. Consider the following class: public class Hand implements Iterable<Card> { private final List<Card> list = new ArrayList<>(); private final int capacity; //... @Override p...

Wonder if I can somehow found out if it's being linked anywhere?
08:16
you could search for the link everywhere except on SO/SE
08:33
0
Q: Displaying a city name with concatenations

S Rahul BoseI am learning MVC and Android. I have create a sample program which is supposed to implement the MVC philosophy. I plan to build my codes on top of this. I wish to know whether I have got the concept more or less, or if there are any fundamental issues in my understanding of the MVC. Summary: T...

0
Q: how to cleaning up javascript code

user3213558i'm studing javascript in jsfiddle. i hit myself in the head. how to clean code? var foo = function(){ return{ funcA : function(){ console.log("funcA call"); this.funcD(); }, funcB : function(){ console.log("funcB call"); this.funcD(); }, func...

@Vogel612 Not finding popular sources, so it's interesting
> i'm studing javascript in jsfiddle. i hit myself in the head. how to clean code?
wat
I thought only PHP was capable of causing one to do that.
08:48
javascript got enough quirks to make brains explode
case WIFI_GET_CURRENT_CONNECTION:
		{
			ScannedWifiNetwork wifiInfo;
			wifiInfo.base.ssid[0] = "";
			wifiInfo.base.encryption = WIFIENCTYPE_NONE;
			wifiInfo.base.mode = WIFIMODE_UNKNOWN;
			wifiInfo.signalStrength = 0;
			if (!unabto_query_write_uint8(writeBuffer, getCurrentWifiConnectionInfo(&wifiInfo))
				|| !unabto_query_write_uint8_list(writeBuffer, wifiInfo.base.ssid, 32)
				|| !unabto_query_write_uint8(writeBuffer, wifiInfo.base.encryption)
				|| !unabto_query_write_uint8(writeBuffer, wifiInfo.base.mode)
does this look dirty?
the sideeffects in the if are smelly..
but all else equal...
yeah but it either returns true for "write went okay"
or false for "write went bad"
not sure whether you need to clean up if something blows up...
The AER_REQ_RSP_TOO_LARGE says "buffer full, can't write anymore"
The alternative is something like this
writeSuccess = writeSuccess && unabto_query_write_uint8(writeBuffer, streamInfoStruct.encoding);
				writeSuccess = writeSuccess && unabto_query_write_uint32(writeBuffer, streamInfoStruct.height);
				writeSuccess = writeSuccess && unabto_query_write_uint32(writeBuffer, streamInfoStruct.width);
				writeSuccess = writeSuccess && unabto_query_write_uint8(writeBuffer, streamInfoStruct.expectedFramerate);
				writeSuccess = writeSuccess && unabto_query_write_uint32(writeBuffer, streamInfoStruct.expectedBitrate);
09:00
isn't there something like &= ??
There is, but it doesn't do what you think it does
it does a bitwise and.
T.T
halfway suspected that..
		case WIFI_GET_CURRENT_CONNECTION:
		{
			ScannedWifiNetwork wifiInfo;
			wifiInfo.base.ssid[0] = "";
			wifiInfo.base.encryption = WIFIENCTYPE_NONE;
			wifiInfo.base.mode = WIFIMODE_UNKNOWN;
			wifiInfo.signalStrength = 0;
			bool connected = getCurrentWifiConnectionInfo(&wifiInfo);/*also fills wifiInfo*/

			if (unabto_query_write_uint8(writeBuffer, connected)
				&& unabto_query_write_uint8_list(writeBuffer, wifiInfo.base.ssid, 32)
				&& unabto_query_write_uint8(writeBuffer, wifiInfo.base.encryption)
altered it a bit
yes that looks better in direct comparison.
since you don't have to think about the || ! construction
I think the break; is unnecessary, since you return before that
and just in case you do there's a comment in the success block
The break is a safety net in case I screw up somewhere along the way
added to all cases
09:40
Holy cow... this is a long answer on SO
130
A: Very Large Numbers in Java Without using java.math.BigInteger

Paŭlo EbermannI think a programmer should have implemented his own bignum-library once, so welcome here. (Of course, later you'll get that BigInteger is better, and use this, but it is a valuable learning experience.) (You can follow the source code of this course life on github. Also, I remade this (a bit p...

crap... my JSON library doesn't support raw char arrays
and .toString fails too
I guess I'll have to convert it to a hex string somehow
10:01
I could offer a fast implementation of byte[] -> hex String
what the...
hidden features of doomness!
0
Q: Make sequential fadeIn() promises more manageable

deostrollI've two versions of promise code. The page is a simple one - an unordered list with a few items. I am trying to make the items show up (fadeIn) one-after-another sequentially. This exercise is done to sort of explain people what promises are... Version 1: $('li').hide(); var fadeInFunc = func...

0
Q: Making Tic-Tac-Toe winning check more efficient

Hunter AnthonyMy code works perfectly fine and I would just like to clean it up a little. From the research I've done, I cannot find anyone that used a multidimensional list to a game of TTT. I'm just looking for a way to make this code prettier than it is right now. grid = [['-','-','-'], ['-','-','-'...

@Nihathrael I can't get raw bytes either
The Java side - not fixable
so I had to write char* to hex string in C
static bool writeStringAsHexString(buffer_write_t* writeBuffer, const char* string, uint16_t length){
	const char* hexStringCharSet = "0123456789ABCDEF";
	char* hexStringResult = malloc((sizeof(char) * length * 2));
	if (hexStringResult == NULL){
		return false;
	}
	int i = 0;
	for (i = 0; i < length; i++){
		int currentHexIndex = i * 2;
		char leftHalf = (string[i] & 0xF0) >> 4;
		char rightHalf = (string[i] & 0x0F);
		hexStringResult[currentHexIndex] = hexStringCharSet[leftHalf];
		hexStringResult[currentHexIndex + 1] = hexStringCharSet[rightHalf];
now to convert it back in Java =)
10:22
Any reason your initializing that i outside of the for()?
@Nihathrael that's c..
it's not supported..
blows up in your face with a compiler error.
2
Ancient-C to be precise
ah hrm, true story. Haven't written plain old C in a long long while
my bad then
well to be true, I'm not really using the standard correctly
The declarations for i and writeSuccess need to be moved to the top of the function
10:59
Monking @all
monking
0
Q: Why is loading images taking so long?

bodycountPPWhen Page_Load is executed I assign the ImageUrl which is a IHTTPHandler: imgView.ImageUrl = "ImageHandler.ashx" + "?rezeptId=" + rezeptId.ToString() +"&imageId=0"; Which looks like this: public class ImageHandler : IHttpHandler { public void ProcessRequest (HttpContext context) { ...

11:32
0
Q: Is this a good implementation of single linked list in C++

gg.kasperskyI'm new to this site and C++ in general, so I wonder if the code below is a good (quality and correctness) implementation of a single linked list in C++, in regard of data structure (not the exposed interface) class List { class Node { friend class List; int value; Node *next; ...

12:03
@Vogel612 Does this sound familiar?
> Rinderkennzeichnungs- und Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz
Rinderkennzeichnungs- und Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz listen (RkReÜAÜG) (literally, Cattle marking and beef labeling supervision duties delegation law) was a law of the German state of Mecklenburg-Vorpommern of 1999, repealed in 2013. It dealt with the supervision of the labeling of beef. The name is an example of the virtually unlimited compounding of nouns that is possible in many Germanic languages. German orthography uses “closed” compounds, concatenating nouns to form one long word. This is unlike most English compounds, which are separated using spaces...
Familiar? no...
Typical? Yes
Stackoverflow down
showing funny images
@Pimgd ?? not for me..
ofc when I say it it's back up
Despite having had the ability to stare at funny pictures for a minute or so
6
A: Home page isn't loading...Oops, something bad happened!

OdedWe had a misbehaving server. It is now sat in the corner, wearing a dunce hat and no longer participating in serving up pages.

@Pimgd not just you...
12:12
hah see
I'm not going crazy
(yet)
3
12:28
Today in my world: My boss refuses to let me continue to use automated tests (Even though I do TDD) and is telling me to use manual testing (debugger) to test 50 things by the end of next week. All of which have potentially bugs which would cause me to have to test all 50 of them ecah time I make a change to the code..
Yeah I'm sure doing that with a debugger is "feasible"
@DanPantry Flip over some tables and burn that place down!
Not sure if it's the most appropriate reaction though.
Well, I'm being told that I effectively have no idea what I am doing and that manual testing is the way forward under threat of dismissal
I'd feel in this position table flipping is very appropriate
even though, you know, I employ TDD in all of my code
Maybe it's time to start orienting to find a new place...
No kidding
My boss has no problem with me spending hours in a debugger but is afraid of automated tests because I might write them wrong
because you know it's not possible to miss things in a debugger..
and also the debugger requires having a running project in the first place
Just really frustrated right now
lol
I'll head into 2 more hours of lecture in which I possibly will fall asleep
12:32
hf lol
@DanPantry hey if they don't want competent people you should stand up on them...
I will in my letter of resignation
As far as I am concerned I am a professional hired to do my job.. and I am not going to write less safe code or in a less efficient way just "because"
I have pride in my work and that involves it being tested
2
be sure to have a place to go to, though ;)
I'm moving into my girlfriend's house in the new year.
I was always going to resign, just maybe not before 2015.
12:45
0
Q: Using slack api create chat application

user3836671How to use slack api for chat application using php? Any source code for to develope the chat application using slack api?

13:13
0
Q: Translation of Number Systems

MaZaHaKaMy code converts a number from one number system to another (from binary to 36 and back). Do you think my formatting succsessfull or not ? #include <stdio.h> #include <stdlib.h> #include <string.h> #include <locale.h> #include <math.h> #define _CRT_SECURE_NO_WARNIN #define MAXMEMORY 10 const i...

0
Q: VLQ review queue, option for "this should be a comment"

Nick UdellI was reviewing an item in the Low Quality queue (which I sadly cannot link to) that was most definitely not an answer and should have been a comment, because it was asking for clarification from the asker. However, there did not appear to be an option to indicate such. It certainly wasn't ok to...

13:39
Greetings, Programs.
Greetings, Human!
@Donald.McLean Greetings, User!
@DanPantry Do you think that them treating you like this gives you the "right" to resign with a very short notice? Think about like one week
I've always understood that when both parties part on good terms, that then a term of at least one month feels appropriate
14:17
0
Q: CSV File Parser in Ruby

Dušan RychnovskýThe following is my Ruby attempt at a (very) basic CSV file parser class, inspired by an exercise from the book Seven Languages in Seven Weeks. I'm a Ruby novice and will be grateful for any suggestions for improvement. #!/usr/local/bin/ruby -w # CSV file parser. # # USAGE: # CsvFile.new('data....

0
Q: Programming Practice (OOP Concepts)

Mr.777I was trying this example: Design a class for a bank database. The database should support the following operations: ❍ deposit a certain amount into an account ❍ withdraw a certain amount from an account ❍ get the balance (i.e., the current amount) in an account ❍ transf...

hiyaaaaa~
heyooooo~
14:38
@JaDogg that's a review, you know???
10
Q: Failed audit for making a valid comment?

leigeroI was given an audit that I felt didn't belong on StackOverflow, but perhaps would be a better fit on CodeReview. I made this comment to the question as it was still a well worded question and not in need of down-voting or deletion, but the OP should consider moving it to a more relevant location...

0
Q: Calculating Exponential Moving Average in Python

ChrisCI'm in the process of creating a forex trading algorithm and wanted to try my shot at calculating EMA (Exponential Moving Averages). My results appear to be correct (compared to the calculations I did by hand) so I believe the following method works, but just wanted to get an extra set of eyes to...

Help educate a migrator
Additionally, even if the code were included in the question, the second point is also an outright failure for this question.. — Vogel612 57 secs ago
@Vogel612 Why?
It's a solution to someone else's puzzle
and one of the codes he's referring to (or even both) are not his...
it's not?
ah I see
14:44
urk... wait..
no it is..
crap..
No you're right =)
no I'm not...
since he really wrote both..
OTOH he isn't asking for a comparative review...
mmmmhmh
> I've coded up the type-level solution to the "Instant Insanity" puzzle using both Functional Dependencies and Type Families:
Ah okay
yeah he wrote both
he's just wondering why B is not as fast as A and how B could be faster
probably..
15:30
0
Q: Flask route to pull data from database for getJSON to process - Am I doing this right?

RichI am developing a reporting application in Flask where in a route function in Flask I pull data from a postgresql database and jsonify the data. On the client side I have some javascript that does a $.getJSON on the route to request the data. Here is what the code looks like Flask route: def get...

15:51
1
Q: Word Jumble in Python

Amateur ProgramerThis game I semi coded, is a little bulky, and kind of boring... I want to know if there is anything simple i can do to shrink it, and add a little spice to the code. # Word Jumble # # The computer picks a random word and then "jumbles" it # The player has to guess the original word import rand...

16:15
@skiwi we're definitely not on good terms but I am not intending to resign within 2 weeks
that said they are treating me like shit and threatening to sack me so why not?
Do both
Don't treat it as "teh unit tests are verboten!"
Treat it as "I don't trust unit tests, so please verify everything by hand"
use your unit tests for the day-to-day stuff, but do verify everything by hand
1
Q: Code review/improvements - my code works, but I want to ask if there is a better solution - where can I ask this type of question?

bg17awMy code works, but I would like to ask if: is it a good solutions is it not too slow is it following best practices is there a better/shorter/clearer code/solution is this solution introducing hidden bugs? Or I just want to learn from the community. Where should I ask this type of question? ...

@GrimaWormtongue handled and about to be closed as duplicate.
@Vogel612 It's a bot =D
@Pimgd I know..
well In fact it's a feed.
16:26
I didn't
I still wanted to make the connection ;)
=/ I have massive duplication but I dunno how to solve it
0
Q: Getting essential computer info for network admins - Powershell

PhasmatisI will be answering my own question in this thread but please feel free to give me constructing criticism on what I can do better with this script. I recently had to install VNC on mass across a lot of computers on a domain and needed some info about their PC, for example: Host name Username MA...

@Override
    public FutureTask<Byte> requestGetStreamCount()
    {
        final StreamComponentImpl component = this;
        FutureTask<Byte> future = new FutureTask<>(new Callable<Byte>()
        {
            @Override
            public Byte call()
            {
                Future<JSONObject> responseTask = component.sendRequest("streamCount.json", null);
                do
                {
                    try
                    {
                        JSONObject result = responseTask.get();
@Override
    public FutureTask<List<StreamInfo>> requestGetStreams()
    {
        final StreamComponentImpl component = this;
        FutureTask<List<StreamInfo>> future = new FutureTask<>(new Callable<List<StreamInfo>>()
        {
            @Override
            public List<StreamInfo> call()
            {
                Future<JSONObject> responseTask = component.sendRequest("streamGetInfo.json", null);
                do
                {
                    try
                    {
                        JSONObject result = responseTask.get();
@Override
    public FutureTask<List<StreamInfo>> requestGetStreams()
    {
        final StreamComponentImpl component = this;
        FutureTask<$type$> future = new FutureTask<>(new Callable<$type$>()
        {
            @Override
            public $type$ call()
            {
                Future<JSONObject> responseTask = component.sendRequest($parameter$, null);
                do
                {
                    try
                    {
                        JSONObject result = responseTask.get();
hmm.
1 & 2 are examples of duplication
the outermost could be extracted...
16:32
yeah but how...
do I get an abstract method that wants a string, a type and a runnable that takes a JSONObject?
the whole "extract via runnable" is strange to me
it's a whole new style of thinking
@Pimgd do you have java 8 there??
Nope, Java 6
poor you..
I briefly had java 8
but then I had to unroll the whole thing to work on android
urk...
@FunctionalInterface could've saved you there..
16:39
how do you specify a Callable with arguments
Scala - when Java 8 isn't enough. :-)
@Pimgd not at all..
I can make my own callable
hah.
@Donald.McLean there is no java8, move on.
@Pimgd yes you will have to..
neither Callable nor Runnable take any (non-final) arguments..
you could cheat your way around it by setting a field you implement into the inner class... but that's a hack ;)
I like hax
16:42
0
Q: Enumerate directories till a given search depth

HeslacherAs I had been in the need of finding directories from a startpath with different search depth levels, I created this little helper class. This class is using objects of the System.IO namespace. public class IOHelper { public const int AllDirectories = -1; public const int TopDirectoryOn...

public <T> FutureTask<T> requestGet(final String json, final HaxCallable<T> callback)
    {
        final StreamComponentImpl component = this;
        FutureTask<T> future = new FutureTask<>(new Callable<T>()
        {
            @Override
            public T call()
            {
                Future<JSONObject> responseTask = component.sendRequest(json, null);
                do
                {
                    try
                    {
                        JSONObject result = responseTask.get();
That's just evil.
I will use it, though.
to home!
@Vogel612 old ;-) Nah it got posted yesterday, there is some interesting stuff in it, but nothing major for us yet I believe
0
Q: Longest collatz sequence using dynamic programming

leoI am trying to solve longest collatz sequence problem under 1000000 with the below code. Can anyone suggest a faster way to approach this problem? I was thinking of dynamic programming, but I'm having trouble in understanding it. #include <stdio.h> long long int col(long long int n) { if(...

I don't believe that question should've been migrated at all, thoughts?
@skiwi hmmm yes..
I believe the biggest thing to really expect is a new Currency API
@skiwi it seems to be good to go for codereview..
just needs the programming-challenge tag..
since it's project euler..
IIRC there's also a collatz sequence tag.
16:50
@Vogel612 The problem (imo) is that he is asking for guidance on an implementation using dynamic programming... which he doesn't have yet, so I'm seeing it more or less as a feature request
@skiwi hmmm.. no. It looks like he's heard of that, but has no clue what it is..
if you think so, ... then VTC ;)
@Vogel612 I'll just let it rest, I still think the question is dodgy, but seems to be within the rules
your choice anyways ;)
as in, when I asked for clarification on what he wanted me to do when i wanted to test some kind of new piece of code (let's say mapping from dto -> obj using reflection) he said he wanted me to manually step thru with the debugger.. and that i was not to write any tests for it in code
@Pimgd I do - he is outright opposed to ANY unit tests
@DanPantry Does he have any kind of special background? And is it possible to talk with him..?
16:59
@skiwi he himself has worked in automated testing, apparently. and yes, it is possible. I DID speak to him today. He literally said what i just told you
that I was not to write any unit tests and to test it all manually or be sacked
as far as the man above him is concerned (not a software dev), this comes down to me not listening to my boss, which is "a sackable offence"
It's not really a case of me not listening to my boss. It's a case of knowing that manual testing simply will take too long and many bugs will slip through the cracks and regressions will happen
But all they see it is as apparently is me "thinking I know better than my boss" :^)
Which is in this case completely true,.....
not that they'd know..
I don't think I know better than my boss
I simply disagree with him, and I have presented my reasons for that
If he gave me a valid reason to use manual testing over automated, then I would happily use it
but my main method of development is writing tests first.
And I don't see how writing writing code and hoping it works in the debugger by sticking a break point at it and running through the entire program every time you make a change is any more beneficial than testing the code in isolation and in integration instantly
OK, so no, I lied, I think in this case, yes, I do think I know more than my boss
Maybe that makes me a bad employee? Idk. I guess I am opinionated.. anyway, I'll stop spamming chat, now.
no it's fine
everybody needs a place to let off some steam
17:14
Yeah. No doubt.
Sounds to me like they just want you to prove you can follow orders when you have to.
0
Q: OOP Bank Database Best Practice?

Mr.777I have been working on this: Design a class for a bank database. The database should support the following operations: ❍ deposit a certain amount into an account ❍ withdraw a certain amount from an account ❍ get the balance (i.e., the current amount) in an account ❍ tra...

0
Q: jQuery/JavaScript/HTML to dynamically add/remove select options when radio button changes

bg17awI have the following code working here on JSFIDDLE: <!DOCTYPE html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> </head> <body> <label for="opt1"><input class="radio-button-select...

Maybe a you can find something relevant on workplace @DanPantry. Or make a post there.
@RubberDuck that did occur to me, but this is a deal breaking project that could lose our biggest customer if it's not delivered on time, and I really do not feel like gambling with it.
Well I'm out for today.. see you around ;)
Toodles!
o/ have a good night
17:18
can anyone tell me what is wrong with this Answer on SO? why it is downvoted?
-2
A: How to suppress "This page is accessing information not under its control"

ATMIn case this is helpful for someone running Visual Studio 2013. I had upgraded my Visual Studio from 2010 to 2013 and then started seeing the seurity warning. Using Fiddler I found that VS 2013 kept sending arterySignalR requests. I turned this off by setting the following in the web.config u...

is it because it is in the development and not in suppressing the popup from the browser?
Probably because it is an old question, but IMO that doesn't warrant a downvote. The answerer is providing new info to the question.. I wouldn't've downvoted it
2
it worked for me, but I want to know if there is a solid reason for the downvotes, this is going on a relatively secure site I am working on.
0
Q: Implementation of a URL router

njpI was wondering if you could provide some feedback on this Router class I built. Worth noting that it relies on an Apache rewrite rule that always redirects to this file, but passes the path into $_GET['url'] as a string (e.g. A request to http://foo.com/foo/bar) goes into $_GET['url] => 'foo/bar...

0
Q: How many guards/patterns is too many?

Michael EdenfieldI'm working one of the recommended tutorials -- actually, the UPenn online course CS194 -- for learning Haskell, and I have a working solution to the final "challenge exercise" for HW 2. But it seems to be a very brute-force way of doing things, so I'm wondering if this is really the idiomatic Ha...

17:47
@DanPantry Maybe he wants to have some work, as you said he prior worked with automated testing... Sounds like a perfect use case to brush up his portfolio
But it's just guessing... There's some motivation behind it probably if he used automated tests before
0
Q: Reversing a string in place without using iteration in C

REACHUSThis is function for reversing a string in C using recursive calls: #include <stdio.h> #include <string.h> void revert(char* left, char* right) { // Should I pass char* like I'm doing now or are char** a better idea? if(left == right) return; char *ll = left; char* rr = right; cha...

0
Q: Reversing a string in place without using iteration in C

REACHUSThis is function for reversing a string in C using recursive calls: #include <stdio.h> #include <string.h> void revert(char* left, char* right) { // Should I pass char* like I'm doing now or are char** a better idea? if(left == right) return; char *ll = left; char* rr = right; cha...

^ Does that also work for uneven length strings?
18:07
1
Q: Save parameters in a "key: value" format

Henry BlaikeI have been playing with Java for around a year and I started writing this API for storing data in files. I wrote this method which will save the parameters in a "key: value" format in a file. The method is getting fairly long and I am just wondering if there is a better/shorter/more efficient w...

0
Q: This one time, I called a constructor and got a null reference exception

Wil BoykinThis is the whole pasted version of a particular page load I have on some page somewhere. Extra detail: ServerData is a class with an overloaded [] which brings back a list of interfaces based on some concrete type which must be .ConvertAll to utilize the type specific functions. Basically, I u...

@CaptainObvious Did it occur at band camp?
3
in VBA, 2 mins ago, by RubberDuck
Bugs don't exist. They're a myth. There are only features.
4
@skiwi idk what his reasons are but treating me the way he is without justification is unacceptable imho
1 hour ago, by RubberDuck
Sounds to me like they just want you to prove you can follow orders when you have to.
@DanPantry ^^ This is good advice to follow, IMO.
18:24
@DanPantry agreed
@DanPantry I've gotten myself into trouble before, because I "cared" too much to change things that I didn't think were right. I have since grown more cynical and understood that I'm here to do what my company says, until I am the boss myself eventually then I can have more influence.
@CaptainObvious That title got me all excited. Thanks for nothing.
18:39
0
Q: Is this system of text protection reliable?

StubbornI've got a text I don't want to be copied by users. To avoid that, I'm using this code: index.php <?php session_start(); $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $randomString = ''; for ($i = 0; $i < 100; $i++) { $randomString .= $characters...

19:04
0
Q: Remove, Append, and Resize Using jQuery

user1960364I'm trying to essentially replace an element and make it transition smoothly to the new size... I started off trying to work with the appended element itself, but the padding and margins made that difficult, so I switched to using a container. var template = "<p>I've replaced the button<br>and i...

19:17
@Phrancis It's a fair choice to move away though if your interests and your companies interests don't align, however you need to be in a financial and economical position to do so
@skiwi Words of wisdom right there!
9
Q: Is Factory Pattern implemented good in this way?

m3th0dmanSuppose I have this code: public interface BaseType { public void doSomething(); } public class ExtendedTypeA implements BaseType { //No Instance Variables @Override public void doSomething() { //really do something } } public class ExtendedTypeB implements Ba...

^^ old question, edit pending. Don't want to bump, can it be locked? it would be off-topic / hypothetical if asked today
0
Q: Parsing URLs in Pandas DataFrame

Ryan AllenI'm working on a project, and the client needs their Google AdWords destination URL query parsed, and the values spell checked to eliminate any typos (use instead of us, etc). So what I'm doing is pulling the data using the AdWords API and putting it into a dateframe for manipulation. Everything ...

19:38
@Mat'sMug Locked
thanks!
I hope Cartman wasn't planning on answering it as well.
0
Q: Get all points on a uniform discrete grid inside a circle's radius

Nick UdellI have a 2-dimensional grid defined by a known point gridCenter and distance between points gridStep and need to find all points on this grid that are inside or on the radius of a circle defined by center and radius. My solution is to use a brute-force approach like so: public static IEnumerable<...

@janos: I was told that the problem was because I wasn't supposed to include the .cu file in the .cpp file. My makefile was correct.
20:04
0
Q: Improvement on a triggered movement script

VolearixI am trying to more or less perfect a movement script that activates when "triggered" by another object. Below I have the code for both the triggering object as well as the object being triggered. I tried to provide summary data to make it obvious what I'm doing, but what can I improve here? And ...

20:26
0
Q: Usings TAGS with <script> at your websites

Nicknamedescription:: function creates a series of a tag links at desired destination by the usage of premade tag system. usage::: createMyTAGS_DATA pass in a single line all the links as: LinkText;LinkAddress;; createMyTAGS_LOCATION pass the destination id of a div,span to render the result. Result wo...

Elastic Search Maintenance Sat, November 22nd - 1:00PM (18:00 UTC) - 3PM (21:00 UTC) We will be upgrading... http://tmblr.co/Z7Lcqt1W8Y4Aq
21:01
Creating good reviews really takes a lot of time, but it is good fun :)
5
@Jamal glad it got cleared up
I am glad I nailed the makefile. :-) I realize that that's as simple as it can get, but I haven't made heavy use of them in school. I do like them, though.
they are a must with C/C++ development
I also use them for other purposes
I used to use a more complicated one for x86, but it was provided to us. The lab person sort of explained how it worked, too. This one is adapted from what I've had to use in another C++ class, which involved some Linux.
@syb0rg: Your review here could've used a custom message instead. The canned one you've used isn't relevant here. Other than that, thanks for picking rejected.
21:16
thank you @Santa
21:58
I found a JavaScript answer that I could answer on SO that nobody else had answered, miracles still happen ;)
6
I wonder if I will get a vote ;)
4
still wondering?
22:17
0
Q: TextFile into a dictionary

Edward SikorskiI need help with reading my TextFile into a dictionary. My textfile is the following: loan 2 debt 3 rate 2 help 1 cousin 1 lawyer 1 Now I need to convert this into a dictionary. I have experimented, but without success. def Identifierare(): File = open("FulaOrd.txt","r") Dict = {} ...

are we getting more junk than usual?
It does seem like it. The network-wide enabling of the question bans did come at a great time.
0
Q: C++ code problem. Input needed

kristian salvillaThere are several problems with my code: I am trying to create a menu but it goes to infinite loop when a letter or character is put in. It is the same if I used the function corners_of_pools,coordinates_of_corners and depth_of_pool. I want the user to be able to go back and change the coordinate...

And another one.
@CaptainObvious BURN IT
22:27
I guess we really are getting more popular.
And we're at a whopping 40K visits/day.
3
40K unique IP addresses?
I don't know.
yeah, there are also some new faces, putting in pretty good reviews
And we could still use more reviews because we're almost hitting 800 unanswered.
I did put in 6 today already, but that's just a drop in the ocean, of course
22:36
Yeah. Luckily it's not nearly as bad as it was before (88% answered).
22:47
Our Maintenance this weekend has been Canceled. Sorry Guys.
0
Q: How could I refactor this?

borjagvoI see this pattern quite frequently in my code: one if statement where very little changes. class Feeder def self.most_recent_created(watching_user=nil, current_cursor) next_cursor = nil feed = [] influencers_ids = User.any_in(roles: ["influencer"]).distinct(:_id) if watching_u...

@CaptainObvious "How could I title this?"
2
00:00 - 23:0023:00 - 00:00

« first day (566 days earlier)      last day (3750 days later) »