« first day (416 days earlier)      last day (3601 days later) » 

12:06 AM
1
Q: Making this Tic Tac Toe implementation more recursive

JohnBobSmithHere is a Tic Tac Toe game in C++ that I have been working on. My questions are as follows: I tested it for bugs, but if you find any, please post the solution! I want to make the code more recursive, in a sense. Instead of having multiple lines of code that do the same things with different va...

 
I posted a little note in the Mathematics chat about my Minesweeper code, we'll see if anyone is interested in it enough to come to CR.
in Mathematics, 13 mins ago, by Simon André Forsberg
I'm not sure if I'm interrupting anything or not, I just wanted to bring attention to something I think you might find interesting. I have written an algorithm for calculating mine probabilities in Minesweeper, and I think it's something you folks might be interested at
TTGTB
 
12:41 AM
@rolfl I'll do that as soon as I have a chance.
 
12:51 AM
Haha. Code Golf, the anti-Code Review.
Absolutely not a slight by the way, there's some genius over there.
 
1:05 AM
Leaving this here. Let me know what you guys think.
0
A: Time for an [encryption] tag?

ckuhn203I think encryption would be a useful tag. There are currently 125 candidate questions for such a tag. (Thank you @Mat'sMug for the improved search.) It was pointed out that we already have a cryptography tag, but encryption is just a subset of crytography; along with hashing. SO has a tag for it...

 
I am, in general, a follower for the tagging in SO. Often (not always), SO has beaten these paths down for us.
 
"encryption is just a subset of cryptography" -- do we have any existing questions that should be but not ? Seems redundant if not
 
2:07 AM
@DaggNabbit Come to that, what we (probably) really want is . Cryptography is encrypting things. Cryptanalysis is breaking encryption. Both fall under cryptology. At least at our scale, the overlap is almost certain to be essentially 100%.
I don't know of a separate term to deal with cryptographic hashing--it's normally lumped together with cryptography (and no, "encryption" doesn't normally exclude hashing).
 
0
Q: Small bash script to start and stop named services

Prahlad YeriI've been working on ubuntu since many years but not quite familiar with bash scripting. My development tools involve servers like nginx and apache, the mysql database and beanstalkd. Obviously, I just can't keep all these services running always and overwhelm my CPU capacity!, so I need a way of...

 
2:40 AM
0
Q: x64 Assembly - checking for largest prime factor

nickpandolfiUsing x64 assembly, I solved the Largest Prime Factor problem on project euler. The problem goes as follows: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? The answer is 6857. I think I have a top notch algorithm to do the...

 
2:53 AM
@CaptainObvious A programming challenge in assembly? Sweet.
 
 
2 hours later…
4:27 AM
0
Q: Can I ask a question about overall architecture without much specific code?

Chase MeadorsI have code, but my question is about overall design patterns. Ideally, I would ask a question describing the design decisions made in my project but would have minimal actual code samples. Is this acceptable/encouraged?

 
5:16 AM
Hey all!
 
5:30 AM
Nothing to see here, move right along ... ;-)
 
@rolfl Apparently, I thought I walked onto the set of a movie filmed in the desert.... Very baren
 
5:43 AM
Not even that late... Guess it's just a Monday night :p.
 
0
Q: Cons of declaring a derived class in another derived class (both of which are derived from the same base class)

Jhomas TeffersonI'd like some input on the way I've structured some things in a side-project I'm working on. I declare an abstract class, CelestialObj, which will contain the common elements between Planets, and Moons (both of which I'd like to be derived from CelestialObj, obviously). Now, a Planet must keep ...

 
@Corbin :p
 
:p
 
need more southern hemisphere people in here
 
Wait... am I having a really stupid moment, or how would that accomplish anything?
 
5:58 AM
Quick Javascript question.... I have a deeply nested associative array. I am not sure a deep item even exists. What's an easy way to have a default value for it, or the actual value:
something like:
data[key1][key2][key3]
or "default"
hmmmm.... googling too,
640
Q: Checking if an array key exists in a JavaScript object or array?

Adam ErnstHow do I check if a particular key exists in a JavaScript object or array? If a key doesn't exist and I try to access it, will it return false? Or throw an error?

 
there's not a pleasant built in way to do that
 
1
Q: Find an equation that uses all 9 digits (1-9)

user3036719I used Python to write the following program: """ A desired equaltion includes a 4-digit integer multiplies a single-digit integer to give another 4-digit integer and all 9 digits(1-9) are used in the equation. """ import random found=False while not found: full_range=range(1,10) fo...

 
if you access a key that doesnt exist, you get undefined
which is fine, but then if you try to access a key on that, you get an exception
 
morning @all
 
Morning, chillworld
 
6:01 AM
@Corbin - that's what I was experiencing, and figured there had to be a better way ;-)
but there is not.
 
@chillworld mornin
 
@Corbin Was that a question directed at my comment, or the C++ question that was just posted?
 
Your comment. You meant we need more people in the southern hemisphere so chat is not quite so empty, correct?
 
indeed
 
Southern/Northern makes no sense.
East/West, makes more sense.
 
6:06 AM
@rolfl exactly
 
err, yeah, don't mind me
brain not working
 
{
  "TopRoot": [
    {
      "name": "XXX",
      "label": "xxx",
      ....
    }
  ]
How do I locate the name?
 
morning @AlexL
 
data["TopRoot"][0]["name"] ?
 
@rolfl did you do further with code hunt? I quit now after getting 1 star for converting a string to alternating caps
 
6:12 AM
@rolfl Yes that should do it
 
6:27 AM
Thanks, indeed, it does.
And, with that, I should go to bed.
@chillworld - I gave up a while ago.
I never did anuthing more than 1.13 IIRC.
I consider it to be a waste of time (for me).
Given a problem, I am happy to contemplate the solution
but, ask me to figure out the problem, and solve it? Nahhh
TTGTB
 
@rolfl you can try this one : lowercase string to alternating case string (start with caps)
all mine solutions are 1 star
 
(it works, my convoluted, integrated, .....stack of about a dozen technologies).
 
last solution : public class Program {
    public static String Puzzle(String s) {
        StringBuffer buffer = new StringBuffer(s.length());
		boolean test=true;
		for (int i = 0;i<s.length();i++) {
			buffer.append(test?Character.toUpperCase(s.charAt(i)):s.charAt(i));
			test = !test;
		}
		return buffer.toString();
    }
}
 
0
Q: How create a cache manager in C++?

Jichao#include <mutex> #include <assert.h> #include <iostream> #include <unordered_map> #include <memory> #include <string> #include <stdio.h> // // Requirements: // 1: the bitmap could be used by multiple thread safely.(std::shared_ptr could?) // 2: cache the bitmap and do not always increase meme...

0
Q: Feedback on my API Design

user1876942I am designing an API for a driver that manipulates HW. I have done the following: namespace HWRegister { //private: namespace { //accessible only within this namespace //Represents one of the four HW blocks. enum EHWUnit { Block0, Block1, Block2, Block3 }; enum EHWSet { Rx0, Rx1, Rx2, Rx3, Tx...

 
and changing test to i%2==0 same result
 
6:34 AM
use StringBuilder, and don't forget to cnvert alternate letters to lowercase.
 
na that doesn't have to, all string are lowercase
 
Use an enhanced-for loop on the s.toCharArray
 
at start I already did but solution was to long so I keep removing all mine other checks
for for each char in String?
does that goes?
 
for (char c : s.toCharArray()) {
 
I'll try that
@rolfl still 1 star solution ^^
I really don't get it how you could change it to lesser code
or maybe @skiwi 's way :)
 
6:45 AM
0
Q: Submitting a Java program which implements the Sieve of Eratosthenes

Mark RossI would like some feedback on a Java program which implements the Sieve of Eratosthenes to find prime numbers. Some of the 'features' I've included in the program include: Uses a BitSet for identifying primes. What really gets checked is whether the index of any bit is prime. This eliminates ...

 
6:55 AM
Wait... there's a coding website that has a metric of shortness as one of their quality parameters? That's a bit questionable.....
 
7:07 AM
0
Q: Is there a more efficient way of implementing this clock in Raphael JS?

sk8erboiThe following code is a clock in Raphael JS. Can someone let me know if this is a proper (and efficient) way of doing it? It works, but I wanted to understand if there's a way it be made better (I can use a for loop for the clones, but my browser gets stuck if I do it). window.onload = function...

 
@Corbin look at mine meta post :p
and at the bootom of the website : "microsoft research"
(following the doc it's the lenght of the byte code)
 
Weird... I can certainly understand overly long code being rather scary, but having that tight of metric on length is concerning. In that situation, it kind of made sense since a closed form would yield much shorter code than iteration or recursion, but in genral, that's pretty misguided. I wish I were surprised, but... It is MS sponsored x.x lol
 
hrm, that's the longest answer I've written in a while
and I tested precisely 0 of the code changes I made, because laziness
 
Monking
 
@Yuushi if you are 100% sure you don't have to test it ;)
monking @MadaraUchiha
(but better of course to test ;) )
 
7:19 AM
better to test, but I just can't be bothered :/
 
brb restart pc
 
7:48 AM
back
 
8:19 AM
0
Q: code for claculator,is it efficient?

Bayant_singh /*instance variables for the class are:-*/ private String input="";//We have nothing to display on the screen,if we dont do this creates the problem of displaying the null. private String firstOperand="0"; //Standard firstOperand. private String previousResult = "";//for...

 
8:35 AM
The saga continues
running my tests causes them to pass; stepping through them with a debugger throws an AggregateException
 
8:57 AM
Even better; running it from the Test Sessions window makes them all succeed while using the Test Explorer makes some fail
I feel like I've found a coding wormhole
 
9:08 AM
That's... concerning. o.O
 
9:19 AM
0
Q: random 6 to 10 digits numerical password

Govind Singh Nagarkotii am generating random numerical 6 to 10 digit password, need some important reviews of yours,Is it Ok or some modification is needed? val AB = "0123456789669900" val rnd = new Random() def randomPassword(): String = { val len = rnd.nextInt(5) + 5 val sb = new StringBuilder(len) fo...

0
Q: Traveling to China ned travel tips?

delight01Travel in China can rattle even veteran travelers.This is understandable. China is a huge country with enough languages and dialects to leave even many native Chinese flummoxed at the thought of communicating away from home.If you Traveling to China ned travel tips : 1. Score extra beds the ...

0
Q: Platform independant thread pool v4

Tom MylesThis is a continuation of this question. Following the previous advise, the thread pool now can handle almost all types of input, except for one key form, where the function/functor requires one of its arguments to be std::move'd as shown below. main.cpp #include <iostream> #include "threadpo...

 
Does it have to be numerical? for safety issue's I don't support that(bruteforce on int pw's goes very fast). If not => scala has also : nextString(length: Int)chillworld 11 secs ago
 
9:39 AM
0
Q: How good is this exception handling code example?

Masud RahmanI am planning to use this one as a good exception handling code example in one of my paper. It is for a client module of an Eclipse plugin. How does it look? HttpURLConnection httpconn=null; BufferedReader breader=null; try{ URL url=new URL(this.web_service_url); htt...

0
Q: Method to return a string of max length (in bytes vs. characters)

DarraghIn my (c#) code, I need to generate a string (from a longer string) which when UTF-8 encoded, is no longer than a given max length (in bytes). public static string OfMaxBytes(this string str, int maxByteLength) { return str.Aggregate("", (s, c) => { if (Encodi...

 
Monking
 
10:00 AM
monking skiwi
 
monking
 
10:16 AM
0
Q: Parsing ODataQueryOptions<T> to Expression<Func<T, bool>>

Stuart BlacklerI am following up on this answer for a scenario that I am currently working on. Like the OP, I am too concerned about the longevity of the code. public IQueryable<TEntity> EmptyEnumerable() { return Enumerable.Empty<TEntity>().AsQueryable(); } private Expression<Func<TEntity, bool>> GetFilt...

 
10:29 AM
0
Q: Java: suggest library for Result class

Volodymyr BakhmatiukI don't want to reinvent the bicycle, so I want to ask whether exists class like Result boolean isOk(); String getError(); // in case if isOk returns false or something similar?

 
10:55 AM
@CaptainObvious last question off topic
 
last question gone.
Monking all
breakfast time for me.
 
11:09 AM
bon appetit @rolfl
 
eet smakelijk @rolfl
If we're talking in foreign languages anyway!
 
בתאבון @rolfl
 
11:24 AM
@rolfl I can understand that!
What was that site were some fuzz was about yesterday or day before?
 
code hunt?
 
Yeah that one
 
lol your getting headache when you start with that
 
it has sound... fuu
I won't start with that... doesn't draw that much attention to me :p
 
well, try just to finish the 1 serie's
there are some difficult questions in it
 
11:31 AM
I'm allergic for environments without a proper IDE and coding support
Code should write itself when I look at it!
4
 
@Corbin There is, it's called PCG. And yes, it is highly questionable.
13 hours ago, by Mat's Mug
Haha lol! Simon with a normal sleep schedule? We'll have to update your bio if you succeed!
Waking up at 12:45 in the middle of the day is not normal? -.-
I really need a job...
 
@SimonAndréForsberg I don't know if I'm more normal...
waking up 9am, yet being ready at 11am
Does anyone know if there's certain instutes/companies/etc. that pay (award money) for doing succesful research?
Like, let's say in a game I manage to invent a good reward system, with appropiate tests, etc. Would it be possible to sell that? (So the result, not the researching itself)
 
11:49 AM
@skiwi When the most interesting man in the world looks at a monitor, it does.
 
I am looking, but nothing is happening..... :(
 
Do you think peple could survive the Oculus Rift for 8 hours a day (regular workdays) while programming?
It would be awesome for multiple screens and information available everywhere
 
Info overload. I don't know.
 
I've never been able to use any kind of VR myself yet though :(
 
12:10 PM
13 edits on my question, 0 answers, 0 comments
I'll turn it into a novel
 
13 approved edits?
 
No, my own ones
Gotta keep people updated!
 
I had a site some time ago that showed interesting (CS) problems and also had rewards on them... I only forgot which oen it was
Does anyone maybe know about such site?
 
I think I saw that site on reddit last night
let me take a look
mhhm, can't find it immediately. At home I can look through my history but not here
 
Ah ok, no problem
On what subreddit was it, if you remember?
 
12:23 PM
probably /r/programming or /r/learnprogramming, although I used a multi of 10-15 subreddits so it could be any of them
 
Ah ok
Hmm... I could start learning some OpenCL, need to decide though if I want to either mess with C++ (and I don't quite like visual studio), or use some Java bindings
 
0
Q: Type head Talentbuddy

sundar nataraj  СундарYour task is to write a function that prints to the standard output (stdout) for each query the user name that matches the query if there are multiple user names matching the query please select the one that is the smallest lexicographically all string matches must be case insensitive if no mat...

 
> But you can't necessarily just practice surgery to learn. Also no one would hire you as a surgeon without the proper degrees even if you were some how self taught.
With programming anyone can practice, get good, and get a job, no degree required.
 
12:38 PM
cobol :-)
1/3 of industry turns on cobol
(financial institutes almost everyone)
 
I'm about to get really happy if I read this correctly...
 
@chillworld Ouch
 
I know that wasn't thenetherlands
 
0
Q: My first login CLASS in PHP with PDO and bcrypt.

remux -This is the first time I use a CLASS. Please review this and tell me if it's secure and if it't the right way to do it... The code itself it's working, but I have doubts in the way I used all this... Thanks! // register.php <?php ... $db_password = $hash = password_hash($pass, PASSWORD_BCRYPT, a...

 
12:45 PM
but they search here also Cobol guys. (and good ones earns very good)
 
I can't wait for Project Valhalla to be incorporated in Java
> In accordance with the OpenJDK guidelines [1], this project will provide
a venue to explore and incubate advanced Java VM and Language feature
candidates such as Value Types [2], Generic Specialization [3], enhanced
volatiles [4] (and possibly other related topics, such as reified generics.)
 
if you have experiance in cobol, solicitate at banks, even when there is no job offer
most cobol guy's are old and go on pension
 
But I don't think it's a good idea to start learning COBOL now ;-)
 
oh, I thought you where getting real happy if you read that cobol was a good language
 
COBOL won't get me happy I promise :)
 
12:48 PM
k misunderstand ;)
 
This is very optimistic
"Refinements. An alternate form of user control would be to enhance the automated specialization by overriding specific methods (or adding new methods) for specific type instantiations. For example, List<int> could have a sum() method, or an optimized version of existing methods could be hand-written for specific type instantiations."
 
Recently migrated:
1
Q: Dynamically create a table with values from an object

FoxI want to create a table that looks like this: -------------------------------------------------- | | USD |CAD | -------------------------------------------------- |Smallest Donation | 100 |250 | -------------------------------------------...

 
nice
migration is really good atm
@rolfl nice answer on meta
 
1:07 PM
What on earth
74
A: Convert 1, 2, 3, 4, 5, 6, 7, 8, and 9 to "one", "two", "three", etc

grcPython 2, 64 print' ottffssennwhoiieiieoruvxvgn ere ehe e nt'[input()::9] This is what the string looks like with some extra whitespace (try reading vertically): o t t f f s s e n n w h o i i e i i e o r u v x v g n e r e e h e e n t As explained in the comments below, ...

 
Code golf is really not mine thing :)
 
I sometimes see them on the hot network, but I don't actively visit there
 
I limit myself to miniature golf.
4
 
1:28 PM
@Donald.McLean Me too.
 
0
Q: Unit of Work / Repository nHibernate

Charles WI have a Unit of Work / Repository pattern in place to abstract away some nHibernate. Most examples I've seen though use the pattern a little differently. IUnitOfWork public interface IUnitOfWork : IDisposable { IReadWriteRepository<TEntity> GetRepository<TEntity>() where TEntity : class; ...

0
Q: Largest Prime Factor redux

Jerry CoffinThere have been a number of questions asking for comments on code for the Project Euler problem to compute the largest prime factor of a number. A primary intent of this task is to find the factor as quickly as possible. I decided to implement the code in C++ using at least some approximation of...

 
@SimonAndréForsberg Not worthy of the bounty but still a start to challenge people!
 
@Marc-Andre Well, it's a start at least. I thought I had fixed all those single-line if-statements lacking curly braces already...
Also, it's the Mug who started the bounty, not me :)
 
Eheheh :P still ! I'm trying to understand everything but god there is code!
 
1:47 PM
0
Q: Validator extended to handle domain objects / entities

Kid DiamondI started improving my validator library even more, and I think I'm at the last final element (domain object / entity validations) before I can gladly say that my Validator library is completely done. Here you can see that my validator can already deal with regular variable inputs or non-entity ...

0
Q: Snake Game in Dart

dysruptionFirst project in Dart - looking for style tips. I'm feel like I'm writing it a bit like Java, and would like to learn how to write dart-y dart. Also - what's the convention on multiple files in a project? There are other files in this project, and I do not know how to include them in each other...

 
@JeroenVannevel I'm afraid... It's short for sure
 
Well, if you prefix the code with: this is how I test for valid exceptions, is this exception testing OK?
then I think it will work......
 
Well I've seen worse
(in term of shortness)
 
Alright, I'll throw it on there
 
1:57 PM
Shoot, meetings for the next 4 hours.
See you all on the other side.
Behave yourselves ;-)
Oh, and when there's spam, flag it.....
 
0
Q: How to name template method properly so it makes better sense?

zadaneSome might think its not worth asking but I consider good function names quite important. I am not sure what should be the overridable function name in what I think is template design pattern. I am printing report which has 3 types. There are lots of if-else which is confusing. I replace this pol...

 
@skiwi Pretty cool. Inspired me to post one as well: codegolf.stackexchange.com/a/32427/438
In this case, the complex logic is in the explanation of how I win.
 
2:13 PM
@JerryCoffin haha nice one
 
0
Q: Verifying the type of an AggregateException's inner exception in a unit test

Jeroen VannevelI've got the following code inside an integration test. [TestMethod] public void Integration_GetUser_WithoutLoggingIn_ThrowsInvalidOperationException() { var myApi = new Api(new Session()); try { var irrelevant = myApi.GetUserInfoAsync().AsTask().Result; } catch (Agg...

 
@skiwi But nobody seems to think my largest prime factor question is good at all. I'm kind of bummed...
 
TTGTH
 
@JerryCoffin Here, have an upvote
Because the question seems good
Though why does the syntax highlighting not highlight integer :(
Could be prime factorization be done very fast on the GPU? o.o
Is it something that can be computed independently?
 
0
Q: C to C++ Translation

KillercamI have been given the following C code static struct sl { BITTYPE bitno; char *szLab; } *sLabs; void ReadTableNames(char *szTabNames) { ... struct sl *sLocLab; ... sLocLab = sLabs = (struct sl*)malloc(sizeof(*sLabs) * nTables); ... } I have translated this to C++ b...

0
Q: Skill Upgrades for Strategy Game

bazolaI built a simple class to handle skill increases for the workers in a strategy game for iOS. The basic idea is that whenever a worker finishes a job, their skill (which starts at 0) will increase by 1. Whenever the skill reaches a multiple of 10, this increases the skill multiplier by 0.10. Th...

 
2:31 PM
@skiwi Interesting question. Some parts of some types of factoring you probably could. In this case nearly everything is fairly serialized though, so it'd be difficult (if even possible) to get much speedup from using the GPU unless you rewrote it completely. It'd probably work out better running in multiple threads on the CPU, but even that would be nontrivial to implement well (i.e., so that you gained more from parallelism than you lost to synchronization).
 
@JerryCoffin Would there be a totally different parallel implementation?
 
@skiwi Possibly--I'd have to think about it (but can't right now--need to get ready for work).
 
Hello, just checking in
 
Hi there @Malachi
 
Up at the shower house, figured I would check in. You all are going to have to fill me in on all the exciting stuff that happened while I was gone
Lol
 
Lol yeah
 
 
1 hour later…
3:41 PM
0
Q: how to add new tags in codereview?

Govind Singh Nagarkotii see there are so much less tags,and the available tags are not comparing the all technologies, like there is no tag for play framework,ejjaberd and offcourse many others also.

 
0
Q: C# - Message Based Communication Design

PerretThis is a long long long post... I'm afraid that I cannot really make it shorter, so please be indulgent with me Smile | :) Well, I'm trying to design an API.NET for communication with Testing Equipment and I cannot figure out a proper way for designing the architecture. Basically, we have diff...

0
Q: Finding the largest mirror image of integers present in an array of integers[CodingBat riddle: MaxMirror]

AnirudhThe problem I am talking about is this Problem statment: We'll say that a "mirror" section in an array is a group of contiguous elements such that somewhere in the array, the same group appears in reverse order. For example, the largest mirror section in {1, 2, 3, 8, 9, 3, 2, 1} is length 3 (th...

 
4:17 PM
@JerryCoffin - got a second?
1
Q: What is a good C++ API Design for HW registers?

user1876942I am designing an API for a driver that manipulates HW. I have done the following: namespace HWRegister { //private: namespace { //accessible only within this namespace //Represents one of the four HW blocks. enum EHWUnit { Block0, Block1, Block2, Block3 }; enum EHWSet { Rx0, Rx1, Rx2, Rx3, Tx...

^^^^ That question is a candidate for migration to Code Review.... what think you?
Meh.... useless.
nevermind....
resolved.
 
4:34 PM
@ckuhn203 / @Simon /// FYI, we broke revision history:
 
lol
2
 
Three edits within two minutes, wow. @Jamal must be proud.
 
I was just about to come mention that @SimonAndréForsberg has better English grammar than I do.
 
You see my edit?
See what I did?
 
As if that wasn't enough, @Jamal just edited it.
 
4:36 PM
@rolfl Did you read up on the Java newest proposals?
 
Nope, @rolfl. I don't see what you did.
 
All I see is the summary of "make tag a tag".
 
I did exactly what @ckuhn203 did, but I got no warning when I save.... it just created a no-diff revision
@skiwi - there are a number of them. Any in particular?
 
@rolfl Project Panama, Project Valhalla
 
@skiwi - 219 site-rep today... I am so cleaning up in UX... ;-)
 
4:39 PM
:p
I actually meant ones that got accepted btw
not just proposals
Project Panama is a low-level API to integrate with native code/libraries
Project Valhalla is the realization of value types, specialized generics (primitives usable in generics), volatile improvements and possibly generics reification
 
0
Q: An Enum that has situationally invalid entries.

LexxiconIs it considered bad style to have that BOTH value in the Direction enum? Problems can arise from BOTH being present, for example when trying to build a procedural UI for the Car class, it [the generator] would see the setTurnSignal(Direction) method and create a way for the user to give it a Dir...

 
5:08 PM
@Anirudh - yeah, the algorithm is good, but, you can figure out where I implemented it wrong. Feel free to either use it, upvote, or downvote. Your call. Edit my answer if you want with the right offby-one-correction. — rolfl ♦ 22 secs ago
Gotta run..... work to do.
 
Edits done. Time to eat.
 
5:25 PM
@Jamal You eat edits?
 
Yup!
 
5:44 PM
@Jamal - do me a favour and vaccuum the obsolete comments like the one above... ;-) I edited my answer, not so grumpy.
 
Done!
 
6:10 PM
@skiwi Eats, sleeps and lives edits.
 
I also put them in my tea and coffee.
 
6:41 PM
0
Q: Can this code utilizing promises be written more succinctly?

XåpplI'-I0llwlg'I  -I've written the following code to get all .txt files in a directory and read+delete them, repeating every 15 seconds. var fs = require("fs"); var path = require("path"); var Q = require("q"); var dir = "stuff"; var analyseFile = function(fileData, callback) { ... }; // Not important. var dele...

0
Q: Parsing time ranges with PyParsing

whereswaldenThe following code is intended to parse a string of the following format and return whether the current time falls in that window: start_time-stop_time [(day|day-day[, ...])][; ...] For example, 0900-1200 (mon-wed, sat); 0100-0200 (sun, tue) The code for parsing that type of string is here:...

 
7:18 PM
Is this some kind of new feature? stackexchange.com/questions?tab=realtime
 
It's been there for a long time
 
@CaptainObvious You should learn something from that site.
4
 
So that's why everything looked so small
I accidentally scrolled the size down
@JeroenVannevel Have you had a chance yet to search in your history for that link?
 
@skiwi Ah, I'll take a look
 
At least hoping you are home from work by now ;-)
 
7:32 PM
 
@JeroenVannevel Thanks, checking it now
Do you perhaps also have the reddit post itself?
I'm interested in the comments... wondering how legit and real it all is
That site doesn't have a tag :(
 
@JeroenVannevel I see a whole bunch of links where I can sign up and create a task, but I don't see how one could sign up as a coder
 
"Join the clan", I think
 
@SimonAndréForsberg Somewhere in the top bar... I managed to do it, so you can do it as well!
 
I don't use it myself, I just saw it in a glimpse
 
7:46 PM
I suppose you can't put the code on CodeReview afterwards though ;-)
I've still seen a different site though... more on a research basis, but can't remember what it was
@SimonAndréForsberg I remember talking with you about solving AI problems... And then someone gave a link to a site hosting such problems with rewards, do you remember something about that?
 
@skiwi Yes, I think I remember that. I'm not sure it was only AI problems, but I remember it was something. I think it was more directed towards teams though, not individual coders.
 
Now only how to find it back...
Hmm, new Android version being revealed this week
Hmm, we don't even have a or tag, or anything related on CR?
 
8:06 PM
We have some CUDA questions, but I believe 200 has tagged them with .
 
@Jamal Ah, thanks
Shouldn't there be a tag synonym? I just tried searches on both tags I mentioned and found nothing
 
0
Q: Priority Checker

A.s. BhullarI am trying to implement infix to postfix conversion using stacks. Actually I have done it successfully. But I have a doubt on complexity of logic that I used for priority checking. Following is the code: int hasLowerPriority(char ch,char ch2) { int num=0,num2=0; if(ch=='+'||ch=='-') ...

 
@skiwi The sequel to KitKat, you mean? What are they going to make now, M&M's?
 
I think I'll back off from GPU computing a bit
@SimonAndréForsberg It's something with an L they said
But I'm supposing Android 5.0
Android Lol
 
I hope it will support Java 8...
It will probably have the name of some sweet food...
 
8:11 PM
@skiwi If CUDA is similar enough, then it can be. Otherwise, you can ask about it on Meta.
 
Donut, Gingerbread, Jelly Bean, Kit Kat... see the pattern?
 
@SimonAndréForsberg That. A thousand times that.
Heck, a thousand times? A million times! Infinitely many times!
 
I doubt it will though, but one can at least hope.
 
It is an upgrade they can easily make with their new ART runtime, without inpacting anything, as the ART was in beta all the time and explicitely said to be unstable
But then there's still Oracle and Google, which cannot agree on a license
Someone wants to see some mindf?
21
Q: Why Java Script handles different strings plus/minus numbers?

NirI can't understand why Java Script work that way. console.log("1" + 1); console.log("1" - 1); The first prints 11, and the second prints 0. Why Java Script handles the first as a String and the second as a number?

I'm placing my bets on Android Lemon.
Though it doesn't sound that nice
 
8:14 PM
Android Lime?
 
0
Q: Extending Object.prototype in JavaScript

maaartinusI find the default Javascript extremely poor on useful functions. There I some nice libraries, but somehow I always need something I can't find. Currently, I'd need a method removing all matching properties from an object. And I really mean removing, bot creating a filtered copy. I've found simil...

0
Q: Checking empty object

dnelsonIs there a better method for covering errors in my case? I am looking for best practice for now and future instances. Foreseen errors that could arise: No attributes at all Some attributes could be missing Attribute value could be empty // converting dom into array to use later $fields = $...

 
@skiwi Mmm, I like that name. Tasty.
 
Wow... This about Java
SomeTypeIHaveToLookUpFirstButIActuallyDontReallyCareAboutIt result = getTransactionResult();
You don't want to know the result of your function, what?
If you're only passing it through, then you might as well do
passthrough(getTransactionResult());
 
In Eclipse, I put a lot of stuff as an int and then let the Quick-Fix put the correct type there :)
 
"Functions in the standard library do not use consistent naming, acronym and capitalization conventions, making it hard to remember exactly what the items are called: " <- IDE autosuggest?
@SimonAndréForsberg In Netbeans you can type methodCall(), and then ctrl+enter, and it will autogenerate... Though I rarely use it
I guess I know what I'm doing
I'm wondering if I'm going to win the battle tomorrow
I'm just working in the company for over a year, once a week, on an internship-ish basis and I want to have some change done to testing servers
Goodnight, TTGTB
Or, pretending I'm going to bed, but in reality goign to watch one of the football matches that's on TV right now.
 
8:27 PM
@skiwi In Eclipse I press F2 and not Alt+Enter (It's not Ctrl + Enter I believe?)
 
@SimonAndréForsberg I meant Alt + Enter there I think
 
0
Q: Ember.js file upload code

KallanI am a newbie and tried to do the laziest way to do a file upload using emberjs, jquery and formdata(IE10+). The code might look stupid, but it worked. Here is what i got. Can you please take a look and give some suggestions. Am i doing it wrong? <script type="text/x-handlebars" data-template-na...

 
8:47 PM
It's 5 o'clock somewhere.
 
0
Q: How to use a decorator to apply an inherited method to all child objects of the inherited type

flutefreak7I wanted to share this and get some feedback. My goal was to be able to have an object with methods: class Thing(object): def __init__(self, data=123): self.data = data def add_one(self): self.data += 1 def add_number(self, number): self.data += number An...

 
9:11 PM
Meh, it's 5:10 for me....
I was awake till 3am this morning... I am going to bed for a nap.
 
user image
4
 
9:56 PM
3
Q: I kicked my dog in the back and now she's walking funny, what do I do?

Fuentesj0129I left my room to go talk to my mom and left my little brothers food on the table. When I came back Lola, my dog, was eating the food so I spanked her, then out of frustration I kicked her in the middle of her back and she yelped. She then ran away with her back feet not being normal they were s...

 
@DaggNabbit I thought you were @CaptainObvious there for a second...
 
i feel like i am whenever i review code here ;)
2
 
10:26 PM
Awww, that made me way sadder than it should have :(
 
Me, too. :-/
 
It's just so sad on the surface, and then you realize the really sad implication that the food isn't replaceable....... ;-(
 
 
1 hour later…
11:43 PM
TTGTB
 
Night!
 
31 mugs on the wall, @Mat'sMug.
 
0
Q: C++ code simulating evolution speed too slow to scale up

zmachine123I'm trying to run this code but it is too slow. I know it is long/ i don't expect people to read all of it but I really need help optimizing the EvolvePop fuction because when i make some of the vectors any bigger it takes hours to run. #include <iostream> #include <vector> #include <stdlib.h> #...

 

« first day (416 days earlier)      last day (3601 days later) »