« first day (778 days earlier)      last day (3240 days later) » 

12:00 AM
RELOAD!
There are 1390 unanswered questions (94.3732% answered)
 
@Duga I'm not really arguing, in fact it seems that we agree suprisingly much.
 
@Vogel612 No surprise coming from that user. I'm pretty sure Simon wasn't arguing for the sake of it.
 
@Jamal oh? a repeat offender?
 
@jfriend00 Sorry, all I wanted to do was to prevent someone else from voting to close and commenting with "I'm voting to close this question because it belongs at Code Review". I did not mean anything bad. This question could be a nice CR question, but that's a whole different story. — Simon André Forsberg 4 mins ago
 
0
Q: Can I post some code that have very little potential bug for review?

walkerlalaI write a program. Most of the time it work out really fine. But occasionally it would crash due to segfault. So I wonder whether it is proper to post such a snippet of code. Most program contain bug. Some are big while others are small. Mine contain a little bug that I cannot find out. I need ...

 
12:06 AM
@Vogel612 As I've observed. I won't get into it, though.
 
I thought I recognized the username, can't really specify from where though
 
@StackExchange Even if this is a dup, the tag really didn't belong.
 
0
A: Can I post some code that has very little potential for bugs?

Simon André ForsbergBugs can be big, bugs can be small, it is still a bug. Unfortunately, this is off-topic.

I so wanted that to rhyme ^^
 
right not so meta..
else you'd get downvotes for not making it a haiku ;)
 
Not even Code Review (which is where code reviewing questions belong) will be able to help you with code they can't see. — TigerhawkT3 44 secs ago
 
12:10 AM
@Vogel612 downvotes? I would expect upvotes for making haiku!
 
but it isn't
 
ah, right. downvotes for not making it a haiku
 
it's 4 - 8 - 4
with a little goodwill that is
 
@Jamal I think "very little potential for bugs" is not a that good formulation for the title, I'll try to come up with a better one
4 - 8 - 4 ?
oh, syllables, right
 
yes
it should be 5-7-5 it seems
argh damnit. missing ~400 instructions ..
 
12:13 AM
@SimonAndréForsberg Sure thing
 
240 are view implementation (mostly layouting) T.T
and the rest is spread across main, currently untestable code and my data package.
eh well, Tomorrow will have to be enough, night
 
12:54 AM
Anyone else here struggle to write short answers on here?
 
0
Q: Project Euler 348: Sum of a square and a cube

jshuaf Many numbers can be expressed as the sum of a square and a cube. Some of them in more than one way. Consider the palindromic numbers that can be expressed as the sum of a square and a cube, both greater than 1, in exactly 4 different ways. For example, 5229225 is a palindromic number ...

 
1:11 AM
"The loaderless bootloader" is a good title for a bootloader that doesn't load anything, right?
 
1:32 AM
 
1:46 AM
-1
Q: ODE parameters fitting with leastsq using data from excel

GSAT-82 ODE Solver with Least Square leastsq Aim: I have set of experimental data, and set of ODE equations I have to find out how to find parameters unknown in ODE fitting data Description of Problem: I am getting an error, while debugging. pasted at the end. The error while debugging Descript...

 
1:57 AM
Welcome to Stack Overflow. Please take the time to familiarize yourself with the Stack Overflow help file, which will help you understand what kinds of questions are appropriate for this site. This site is intended to help you obtain answers to specific programming questions, as opposed to providing tutorial, design or code review assistance. — MarsAtomic 54 secs ago
 
crickets
 
I thought ducks "quacked"
3
 
They do.
 
2:13 AM
0
Q: Learning Chat Bot, with some... problems

xXxK3vin_Spac3yxXxI made a chat bot, that, as you talk to it, it learns to respond. But the way it speaks is strange, so if you have any ideas on how to make its response any more human, then please say so. Anyway, you have to start a new chat bot. You'll notice that when you start his responses will be incredibl...

 
2:27 AM
Yo
 
Hello.
 
0
Q: errors running simple cuda program

mreff555I've taken a stab at GPU programming. The code I'm posting below was the first assignment. It runs exactly as it should, squaring every value, when run on the virtual machine in the training website. However, when run on my machine I get what is also posted below. What gives? #include <stdio.h> ...

 
@CaptainObvious @Jamal Nuke it ^^
 
2:50 AM
Whee! Another lightning-fast answer! At least in CR time. :D
0
A: Learning Chat Bot, with some... problems

Ethan Bierlein Whitespace. It looks nice, and is important. Use it. There are many areas here where you could insert some whitespace, and then the code will magically become much easier to read. Here are a few areas where whitespace is needed. One blank line between the functions in bot. Some more blank lines...

 
3:05 AM
You should use codereview.stackexchange.com for posts like this in future. — outoftime 57 secs ago
 
2
Q: object oriented javascript and google map objects memory management

nitansh barejaI have to draw various instance of HeatMap, Wind and Polyline. each layer will have 1 HeatMap , 1000+ Wind arrows and 3000+ polyline. Javascript code for the Layer Manager is at http://jsfiddle.net/Nitansh/3sze2w7z/ Websocket push the data into mapData structure where i have to store the data fo...

 
@CaptainObvious Sometimes I wish questions with so many grammatical errors were off-topic so that they don't have to be edited.
 
@Jamal Don't worry. I'll get this one. :)
 
Good. grabs lemonade
Hm. That was my first downvote on a C++ answer.
 
3:20 AM
Woof, done with that edit.
Ooh! Another badge!
 
Wow, that title is just full of tags.
 
Oops. Forgot about the title. xD
Welp, @Quill got it.
 
@EthanBierlein I got it ;-)
 
We should rename the edit tag to car wash to represent the utter speed at which a post is fixed.
2
 
I actually gave a go at answering that question.
0
A: Object-oriented JavaScript and Google Maps objects memory management

Ethan BierleinFirst off, without the background code for this, it's a little hard to understand what exactly this code is doing, but I'll try to give as good a review as possible. First off, the code inside deleteMapLayer should be indented for readability. Secondly, don't create a function as an instance at...

 
3:34 AM
looking for unanswered questions to hand out bounties for
 
21
Q: Factor script to change case of all filenames in a directory

Adeel Zafar SoomroIn the absence of a full-fledged tutorial, I am teaching myself to program in the Factor language by writing a bunch of functions that I will eventually use in command-line scripts. One common operation I like to perform is to change the case of names of files contained in a given directory to u...

@MotokoKusanagi ^^
Wow, there was a political spam post on that answer that got deleted.
I am on a roll today. I went from 2.5K to 2.6K
 
well, your three answers kinda helped
 
Only "kinda"?
 
sarcasm @EthanBierlein, sarcasm
2
 
@EthanBierlein done
 
3:39 AM
@EthanBierlein also 2. Secondly,
 
Hmm, I might learn factor. It looks like an interesting language.
 
3:53 AM
Anyone here know much about Swift's NSXMLParser?
 
4:47 AM
-2
Q: Best algorithm to solve for a M x N rectangle of nodes?

MNRCWhat is the best algorithm to solve for this problem? You are given a bunch of nodes evenly spaced in a rectangular shape. The rectangle is M nodes long and N nodes wide. Node A is in the upper left hand corner and node B is at the bottom right hand corner. How many different paths are there fro...

 
 
2 hours later…
7:17 AM
0
Q: how deep is too deep? mongo subdocs

Justin YoungThe straight forward hierarchy of my schema is: Projects> deliverables> steps> assets> versions> comments My question is, am I trying to nest things too deeply? The above hierarchy makes sense for how I plan to pull the data back out but didn't know if I should break up the chain into smaller ...

0
Q: Generating Heighway dragons in Unity C#

mikeusing UnityEngine; using System.Collections; using System.Collections.Generic; public class HeighwayGenerator : MonoBehaviour { private List<char> direction; private List<Vector3> dragon; private Stack <char> stack; private LineRenderer line; private float magnitude = 0.0f; public int iteration...

 
 
1 hour later…
8:22 AM
0
Q: A tiny library for textual serialization of lists in Java - follow-up

coderoddeSee the previous and initial iteration. I have mainly refactored the code and made it a little bit robust (if serialization of a single object produces a string with new line character(s), an exception is thrown as the deserialization routine relies on assumption that the object string represent...

 
8:48 AM
0
Q: Make pairs of boys and girls based on height

Gaurav KeswaniProblem Statement There are N boys and N girls. Only a boy and a girl can form a dancing pair (i.e. no same sex dancing pairs are allowed). The only other condition in making pairs is that their absolute difference in height should be less than or equal to K. Find the maximum numbe...

 
 
2 hours later…
10:19 AM
0
Q: Is it possible to load new controllers and routes after startup in mvc 6?

user2207784I would like to create a plugin system to allow new controllers to be added at runtime. These will be api controllers and not views. I know I can add controllers from other assemblies at startup by using the following and this works. public void ConfigureServices(IServiceCollection services) { ...

 
Thank you, it is this kind of code review that helps me become better at coding. — Andrey Doronin 58 secs ago
 
11:08 AM
0
Q: Scala - game boot to to some operations every second

infaustusI am building game, like Ogame, or Ikariam where you can play with another users in real-time. You train some soldiers, build some vehicles, or buildings. Every building or vehicle has some level. If building has higher level you must wait longer to use it etc. Could you check my code, it is writ...

0
Q: Compare changes between two data.frames, explain deltas for x columns

MattVI wrote the following snippet to deal with a situation in which I have two datasets (usually the current version versus a previous one) and I need to identify what changes have occured: usually explaining the deltas of one specific column. I want to identify what rows have been added, what rows ...

 
12:03 PM
This question is not such a good match for SO. In part it's a matter of opinion, and in equal part it's a matter of code review. In general, if a wrapper/library works for you and makes your life easier, go for it. Performance should the the least of your worries. The cost to worry about is the cost of maintaining it, other people working on your code learning it, etc. — torazaburo 10 secs ago
 
12:33 PM
0
Q: enter 2 dimensional array in windows form C#

Mercury Lampprivate void btn_nhap_Click(object sender, EventArgs e) { int a = 0; int.TryParse(txt_Phantu.Text.Trim(), out a); for (int i = 0; i < array.GetLength(0); i++) { for (int j = 0; j < array.GetLength(1); j++) { array[...

 
12:49 PM
0
Q: Travelling Salesman Problem with visualisation in Java (Swing)

RK1For practicing purposes, I challenged myself to write a program that solves the TSP and visualises the results step by step. As for now, my program uses a simple nearest neighbour algorithm. I want my program to be flexible, so when I add a new algorithm, it will be able to visualise the result...

 
Good morning @all!
Hmm, looks like @all are here, but not here.
 
meh.
Morning @EthanBierlein
 
Morning @Vogel612
Now that I sort of have the attention of one person, I'm going to "announce" something real quick.
 
you're learning factor now?
 
I'm going to be gone for about a week on a camping trip. In a place with no little or no cell reception. Which means I can't be in here, or do much on the main site.
 
1:02 PM
this sounds very enjoyable
 
And no, not yet. I'm probably going to learn it when I get back.
It should be fun. I always liked camping. Especially in places like this.
 
because you can't care about what happens in the outside world?
 
Western America is nice, with all the dry plains and such.
Stuff like this:
Or this:
 
looks prone to large-scale fires...
 
0
Q: Building and flattening a dependency graph

AlexFoxGillThe Problem Given a list of dependencies ('a * 'a) list where the first item has a dependency on the second item, construct a dependency graph and then 'flatten' it into a single 'a list such that no item comes after one of its dependencies. Constraints I am trying to improve my functional pro...

 
1:07 PM
I've been there before. There was a fire in the early 2000s. I remember going there when I was in 1st grade, and all the trees were about my height.
And yes, it is prone to large scale fires. They happen about every 20-30 years.
Goodbye @all.
 
0
Q: A code for Hexademical to Decimal c#

Simoo VanovCan someone tell me why is this code not working. Why cannot I parse the string ? And why my Method is not working ... ? Thank you in advance :) using System; class HexademicalToDecimal { static void Main() { string hex = "C921"; Console.Write(hex.Length); long resultindecimal =...

 
1:58 PM
@Duga finds the funniest comments some times
in Duga's Playground, 11 mins ago, by Duga
@Lucasvw all programmers are human, does that mean that a programmer is the same as a human? — popovitsj 44 secs ago
 
2:26 PM
0
Q: better way to handle arrays

Luiz K.I have this code, that creates (or update) an user from an omniauth hash param def self.find_or_create_from_auth_hash(auth_hash) uid = auth_hash['uid'] provider = auth_hash['provider'] user = find_or_create_by(uid: uid, provider: provider) user.name = auth_hash['info']['name'...

 
2:51 PM
0
Q: Stable reversed Tartaglia's triangles

CaridorcInspired by Minimising the triangle I am writing a fully tested program to solve the following problem: A triangle needs a good foundation. Every row in the triangle is derived from the sum of the two values below it. However, there can be no repeated values, if a value shows up more tha...

 
3:28 PM
0
Q: Calculating pi using bash

pi.sashaI've written a little program to calculate pi using the Nilakantha series For this formula, take three and start alternating between adding and subtracting fractions with numerators of 4 and denominators that are the product of three consecutive integers which increase with every new iteratio...

 
Tip of the day: Don't even try to make cross-domain JSON POST HTTP requests with JavaScript. Just don't do it. Save yourselves the trouble. Use another approach instead.
 
I've found myself in that dilemma again... which book to buy?
 
@SimonAndréForsberg Cross domain JSON POST HTTP?
@RubberDuck According to the titles, they cover different subjects.
 
They do. In a way.
But, considering that it's very likely I'm about to take on a legacy code base, I think the first one may be appropriate.
 
Dilemma solved.
 
3:43 PM
Yeah. I think so.
 
@Mast cross-domain, JSON, HTTP POST request
 
@SimonAndréForsberg Make the JSON cross domain and you're done, right?
The HTTP just delivers the JSON.
It's like an instruction handler.
 
I don't understand what is being asked...
What do we mean by "cross-domain" specifically?
 
@nhgrif It's more complete than cross platform.
 
Still don't have a clue what we mean...
Someone mind pretending I'm 5 years old?
 
3:54 PM
With a platform, we usually mean OS-family. Cross platform works both on Windows/Linux/OSX.
A domain can mean different system set-ups, like from a home environment to an industrial domain to something high security.
 
@Mast The JavaScript is the real problem. You have no idea how many SO questions there are about this subject. I did not find any question though that was about a) cross-domain, b) send JSON data c) use POST at the same time
 
@SimonAndréForsberg Do you need a server or client solution?
 
More specifically?
 
@nhgrif Run a JavaScript on onedomain.com , make an AJAX request to anotherdomain.com
 
What's attempting to be accomplished and what's the specific problem?
 
3:56 PM
@Mast I 'solved it' with another approach.
Context is as follows:
 
@nhgrif HTTP sends requests. POST is usually to update or upload certain information, in which the query indicates what should happen. Or well, that's one approach.
@SimonAndréForsberg JS is a weird language.
Jun 15 at 14:45, by Mast
I hate JS.
 
I want to have a TamperMonkey userscript on my computer that adds a button to chat for posting a message as @Duga. I can post as @Duga by sending data with 'application/json' or I can send it as 'application/x-www-form-urlencoded' (which my userscript currently uses, as a workaround). I wanted to have my userscript make an Ajax request to stats.zomis.net with 'application/json' data, but that failed
I can post with 'application/json' just fine using a Groovy script, but that is not JavaScript.
 
@SimonAndréForsberg I haven't been following the conversation, but how does it fail?
 
@skiwi JavaScript always fails.
3
 
Could it be a Cross-Origin policy?
 
4:05 PM
@SimonAndréForsberg Why did it fail?
 
I either get 'application/x-www-form-urlencoded' in the header, or I get a jqXHR error and status code 0, and with the extremely informative message that it couldn't load my URL...
@skiwi it works for x-www-form-urlencoded, not for json. It's not related to cross-origin policy.
 
Have you tried sending more low-level requests in which you configure the HTTP header yourself?
 
@SimonAndréForsberg Strange...
 
I have tried configuring the HTTP header myself in JavaScript, that's where it fails. In a Groovy script I can configure the HTTP header just fine.
 
@SimonAndréForsberg What does the extremely informative message say?
 
4:08 PM
either way, I managed to do a workaround so I am satisfied. It's not a clean solution, but it works.
> with the extremely informative message that it couldn't load my URL...
 
I do actually remember having a similar issue a few weeks ago
Also with JavaScript and JSON and POST
 
it just informs me about the URL and that it couldn't load it. Very helpful.
Stack-traces FTW!
 
I don't remember much about it though
 
In NodeJS it goes something like
	var OPTIONS = {
		hostname: 'localhost',
		port: '8000',
		path: '/?' + variable
	}
 
Luckily, I didn't have to use any JavaScript to accomplish this:
 
4:10 PM
Almost too simple to fail.
 
@Mast but that's not a cross-domain request.
 
@SimonAndréForsberg gradle is groovy is magic groovy
 
Technically, it's not a request. It's only the front of the request.
The request would look something like http.get(OPTIONS, function(func, data) {
I use it for my server to send a secondary request to a different server.
 
No.
 
4:33 PM
Guys, I answered our top zombie.
0
A: Factor script to change case of all filenames in a directory

Ethan BierleinThis answer is a WIP. I don't know factor, so I'm going to try as hard as possible to give the best review I can create. Where are the comments? While someone who knows Factor would be able to read this, someone who isn't experienced in Factor would have no idea what this is doing. Add usefu...

 
@EthanBierlein Why?
 
4:56 PM
I looked at that question but Factor does not compile correctly on my box.
I'm hoping to eventually get an answer to this question:
8
Q: Compile-time sieve of Eratosthenes

EdwardThere are many instances of prime number sieve implementation both here and other places on the web, but I wanted something a little different. In particular, I wanted to create a static array of the first 1024 prime numbers at compile time as a simple reusable structure. I also wanted to allow...

 
Thanks for pointers! GHC fix alone made queries run about 20~25% quicker! I was hoping I would be able to use LINQ because the data queried are for a REST / Json RPC with a huge amount of exposed methods, the client that I have written uses a Redis data-store with entities stored in memory, which you can read more about here ConcurrentDictionary's which stores HashSet's based on Type Object-cache C# Take two property.Key == "Age" && property.Value == "29" was simply an added factor I added to give it a more real world scenario. — Joachim 58 secs ago
 
5:18 PM
0
Q: Code refactoring using OOPS fundamentals

Anony-mouseI have written the following code snippet in Ruby.It works.But I believe the codesmells have crept in.Please help me in eliminating them through a cleaner and reusable code. class Vehicle attr_accessor :regno,:type def initialize(regno,type) @regno=regno @type=type end end class Pa...

 
5:30 PM
@Edward I tried, but I don't have a C++14 compiler on my Win box
Also, you write darn good code.
But those macro's seem off. Usually you don't need that many depending on each other.
 
0
Q: Rails 4 and RSpec - avoiding geocoding in call backs when running specs

GhostRiderMy Rails app geocodes users IP when they are created and also when they update their data only if they change their city. The geocoding is slowing down my tests ridiculously. This seems to me to be a poor way to avoid endless geocoding when running tests but i am unsure of a better way to do th...

 
Darn, was reviewing a first post. Made some major improvements. Than @Jamal showed up and did it better.
 
@EthanBierlein My suggestion: If you want to answer that question, play around with Factor for quite a while in IdeOne before you answer it. Try to discover different ways of doing what the OP does.
Get some understanding of the language before you answer the question.
 
@SimonAndréForsberg That ^^
It's what I did before posting my first answer.
 
It's what I did before posting my first (and only) answer.
 
5:43 PM
@SimonAndréForsberg On this question:
19
Q: FizzBuzz in Forth

EdwardThere are quite a large number of existing implementatons of FizzBuzz but I awoke this morning in a cold sweat with the terrible revelation that Code Review had no FizzBuzz implementation in Forth! To redress this terrible oversight, I wrote this while sipping my first cup of coffee. : FIZZBUZZ...

 
yes
not that hard to find, eh?
 
Are you using two or three spaces of indentation? Yes.

Are you using two and three spaces of indentation? Yes.

Are you using two xor three spaces of indentation? No.
Made me lol.
That advice could be modified to suit so many style errors on CR.
The question was written in July. The answer in November. Awesome.
 
not an answer I'm very proud of, but from not knowing anything about the language before I took a look at the question, I guess it'll have to do.
 
You tried to kill a zombie and made it a decent enough answer.
Why shouldn't you be proud on something like that?
 
Because there are other answers I am more proud of? :)
 
5:53 PM
@Mast Yes, I was bothered by the macros, too. I should be able to come up with something better.
 
@Edward I think you'll need something recursive.
But I have very limited experience with recursive programming in C++.
@SimonAndréForsberg Luxury problem.
 
@SimonAndréForsberg It was a valiant effort. I didn't really expect that there would be much existing Forth expertise here. :)
Actually, Factor is quite similar to Forth, but not similar enough for me to just guess at an answer.
 
there wasn't much Forth expertise either :P but thanks!
 
On a non-related note, does anyone know the status of this request:
2
Q: Should we burn a [python] tag?

SirPythonEvery time a post involves Python code, it has the Python tag AND the Python version tag that suits the version of Python that the post is using. I think that is a little repetitive, and we should either: Burn python and have Python related posts use the tag that contains the version of Python...

AKA is removing if another tag with a more specific version is also available recommended?
 
At the moment, I'd say it's status quo.
 
6:03 PM
I've been pondering about that question for quite some time.
I think it should, current tagging behaviour on Python is inconsistent.
Some say should only be used for the original, Python2. However, it's not stated in the wiki and it's not only used for Python2
Technically Python still has a version 1, but I don't think anyone still restricts himself to such.
Backward compatibility and all going till 2.7
But I'm not going to explain the Python history here.
 
I'm glad I'm using a backwards compatible language so that I don't have to deal with different tag versions :)
2
The Java and Java8 were quickly made synonyms.
 
It kinda sucks though as a language developer that once you make a (big) mistake, it's irrecoverable
 
@skiwi patch it by deprecating API and making a better one..
 
@Vogel612 But you'll never be able to remove it
 
meh..
that's only bad for bad programmers ;)
and legacy programmers :(
 
6:14 PM
Python made a decision by making Python 3 backwards incompatible and hoping developers switch over
 
anyways I'm outta here, cya around tomorrow ;)
 
But they might as well have named it differently and treat it as an all new programming language
 
@skiwi Which didn't work out very well in the beginning.
 
If they instead of creating Python 3 would have created Anaconda, then we wouldn't be having tagging issues!
 
@skiwi Anaconda already exists ^^
It's Python + often used packages so you don't have to download numpy and all. It's included.
 
6:18 PM
@Mast Oh crap...
Rattlesnake then?
 
Is this the moment I should remind you Python has nothing to do with snakes?
Naming it Tommy Cooper would be more applicable.
 
@Mast I did already know that, but I still treat it like a snake
 
@skiwi If it looks like a snake, crawls like a snake and hisses like a snake but isn't named after a snake...
@Hosch250 Are you aware of this meta question?
2
Q: Should we burn a [python] tag?

SirPythonEvery time a post involves Python code, it has the Python tag AND the Python version tag that suits the version of Python that the post is using. I think that is a little repetitive, and we should either: Burn python and have Python related posts use the tag that contains the version of Python...

You wrote most of the tag-info, so your input would be welcome.
 
@@Mast No.
Actually that is copy/paste from SO.
 
Are we burning the tag now?
 
6:29 PM
Not yet.
 
@EthanBierlein No.
But if a more specific version is available, I think it shouldn't be used.
Read my answer in that question.
Having both python and python-2.7 doesn't supply more information than just python-2.7 on it's own.
 
Even if it were to be burned, I wouldn't recommend doing it manually with thousands of questions.
 
@Jamal It shouldn't be burned, synonimizing would be a better fit IMHO.
There are 3k questions with it, but less than 30% of them have more specific tags afaik.
Darn, I was about to write it in my answer, then I forgot...
 
@Mast But should it be synonimized with Python2.7 or Python3 ? :)
 
@SimonAndréForsberg That's the problem, we don't know.
Fixed it in my meta answer now.
We could try all those 3k questions ofc, see if it runs in both or just in one...
Good luck!
Deprecating the usage of python and forcing users to pick a more specific version would be much, much better.
Keep it around for legacy reasons. Don't accept new questions with it.
Better suggestions are welcome.
 
@JeroenVannevel Darn.
That's like putting the business logic in your database.
 
JSON Isn't a fucking language. It's data storage.
Although....
 
no it's not..
It's data transmission
 
Oops. I should have said that as "shouldn't be"
 
The only storage purposes it should have is for tiny amounts like config files
 
7:01 PM
Yes
I think the people who try to use JSON as a "language", are the same people who use a static class as a wrapper to store variables.
 
@JeroenVannevel Eh, wtf?
 
Sorta like the guy in this question here who created a class called config just to store configuration data.
 
@EthanBierlein that's a quite common thing to do AFAIK
 
@Simon Yes, but it's kinda dumb to create a class just to store data like that when JSON/Dictionaries/HashMaps/etc. exist.
 
@SimonAndréForsberg It is with JSON, not so sure with Python.
 
7:10 PM
@EthanBierlein What about type safety and things?
 
Config classes are perfectly reasonable
 
In Java, especially on Android applications, I think it is quite common to use config classes
 
so are static classes to store values. Ever tried to share data between pages in a win8.1 or Android app?
 
@JeroenVannevel Yes, I use temporary files for that shames away
 
There's only limited ways to transmit data -- a "global" session class that stores that stuff is invaluable
it's even worse on Android. What an awful dinosauriastic framework that is
2
 
7:13 PM
@Simon Python doesn't have the concept of strong typing, so that's why, in that case, a dict should be used.
From a personal standpoint, I think that using a static class to store data just doesn't feel right.
 
@JeroenVannevel android app, yes. I don't like how Android handles such things. I'm making use of the existing Android Application singleton for that
@JeroenVannevel and what kind of phone do you have...?
 
.. an android
I don't have to care about the horrible framework as an end user, so it's okay
4
 
My phone is too old to support Android.
No Java either...
 
7:57 PM
@JeroenVannevel But you're the C# guy!
 
Well yes, but you have to keep getting in touch with new technologies. Otherwise how will I accurately tear them apart?
 
8:37 PM
0
Q: In emacs markdown-mode making the link live and URL invisible in inline links

kuzzoorooA few years ago I modified version 1.8.1 of Jason Blevins's markdown-mode for Emacs so that when showing inline links the URL is hidden, and so that you can follow the link simply by hitting Enter. If you want to see the URL you can still see it by, say, removing the final ). It's based on linkd,...

-1
Q: SUDOKU integer array with "board.length == GRID_9X9 ? 7 : 5"

mohd faizzi// This method swaps rows and columns of an valid board. // Swaping process for rows must be done same horizontal grid and // also for column swaping process must be in vertical grid. private int[][] swapRowsAndCols(int[][] board) { int range = board.length == GRID_9X9 ? 7 : 5; // defin...

 
9:09 PM
Is this question really technically on-topic?
4
Q: Learning Chat Bot, with some... problems

xXxK3vin_Spac3yxXxI made a chat bot, that, as you talk to it, it learns to respond. But the way it speaks is strange, so if you have any ideas on how to make its response any more human, then please say so. Anyway, you have to start a new chat bot. You'll notice that when you start his responses will be incredibl...

 
9:28 PM
I think this question really belongs on Code Review because the provided code works correctly and it is only the performance which needs to be improved — barrowc 17 secs ago
I'm voting to close this question as off-topic because it belongs on the Code Review StackExchange site — barrowc 34 secs ago
 
9:54 PM
Custom Stylesheet is removed from Chromium : codereview.chromium.org/66383005 . If you want to custom your theme, try using a Chrome devtools extension: github.com/mauricecruz/zero-base-themesDio Phung 40 secs ago
 
10:07 PM
 
10:37 PM
@SimonAndréForsberg Why would it be off-topic?
 
> But the way it speaks is strange, so if you have any ideas on how to make its response any more human, then please say so.
 
Is that asking for code that is not yet written?
 
sounds a bit like it's asking for a feature-review / feature-requests
 
0
Q: Finding the Maximum Inclusive Distance Between Two Duplicate Numbers in an Array

OpenLearnerThe prompt that made me put this function together was sourced from CodingBat. I was curious about cleaner, more correct methods of doing putting this together such as finding a cleaner way to tell if there is or is not a duplicate in the array. I am also trying to be as efficient as possible. I...

 
0
Q: Should you write the code for the OP?

SirPythonI've seen a couple questions have sections at the end of the post where it brings together all of the recommendations that have been mentioned in that post and re-writes the code using those recommendations. Is this okay, or is it better to leave that part up to the OP of the question? One exam...

 
10:46 PM
@SirPython yes.... is that off-topic or not?
 
I guess so.
 
I often say in my comments that Code Review is not the place about changing what the code does, that it is about making the code do the same thing in a better way
2
 
Ah, that makes sense. I hadn't thought about it that way before.
 
0
Q: Iterating Monte Carlo Pi Simulation in Python

user76242 I want this code to run, get to the end, print the value of pi for that run, and then do it again- 40 times, without me hitting the run button again. In other words, I want to see 40 different estimations of pi in the "run" window. As you can tell I'm new to programming, I've read about for an...

 
@StackExchange @SirPython I'm tempted to VTC that meta question as "primarily opinion-based".
 
10:53 PM
Please do. I wasn't sure if there was a rule about it or not.
 
There's no rule about it
Which in fact might be an answer, not a VTC
you VTC'd it yourself?
 
... maybe...
 
0
Q: Size for Doubly Circular Linked List

ProgOptimalI want to know that how to find the last node of a doubly circular linked list in Java, as I want to find the size or number of nodes in the circular linked list.

 
@CaptainObvious Nope
 
11:36 PM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com. — Josh Beam 8 secs ago
Didn't know about codereview.stackexchange.com, thanks! Posting there now. — Keon 46 secs ago
 
@JoshBeam I don't find this question to be off-topic for Stack Overflow at all. This sounds like a question about a specific programming problem (as defined in Stack Overflow's help center) to me. — Simon André Forsberg 14 secs ago
 
@SimonAndréForsberg Will leave it here for now, and delete and repost in codereview.stackexchange.com if nothing good comes of it. — Keon 1 min ago
 
@SimonAndréForsberg Good call.
 
11:52 PM
0
A: How to you use recursion in javascript to create key value objects

Simon André ForsbergAlgorithms makes code fast or slow, not recursion. Some quite fast algorithms can use recursion, but that's a whole different story. Many algorithms can be written as both with recursion, and without recursion. However, your code has a big problem. Notice how many times you call this code? Obje...

He did need a Code Review though, but he definitely didn't ask for one.
 

« first day (778 days earlier)      last day (3240 days later) »