« first day (825 days earlier)      last day (1445 days later) » 

12:00 AM
RELOAD!
 
INTERRUPT
2
mwahaha
 
There are 1424 unanswered questions (94.5157% answered)
 
You even got the time to put the "mwahaha" in-between :D
 
@Quill another hint: "What is the best practice for handling such a task?" sounds very very much like "What is the best practice regarding X?"
 
I still don't get the joke with that INTERRUPT
 
12:03 AM
it's a thing
 
12:17 AM
TTGTB
user image
7
 
My code works as expected in that it 1) gets the user's location with frequent updates, 2) continues location updates if another activity is started or the app goes in the background, 3) sends the user's location over Pusher. I am seeking ways to improve this code - for example, maybe a service? As I clearly say in my post, I am not sure if I am approaching this from the right angle - but the code DOES work. — NightMICU 4 mins ago
 
can't find my game....
where is my CodE!
 
12:34 AM
@Mat'sMug feature request
@Mat'sMug huh?
Is a revised edition in an answer off-topic?
 
0
Q: How can I efficiently move files from Windows.old to current folders?

Ethan BierleinI haven't yet upgraded from Windows 8.1 to Windows 10 yet, and I'm wondering, is there an efficient way to move my own files from Windows.old to their respective locations after the upgrade without having to do a large amount of drag/dropping/copying?

oh wow
 
hmm?
 
I just realized that one of my Super User questions got over 30K views in a week
 
installing XNA again
time to fire up the old laptop... see if I can't speed it up. but it will probably need about a billion updates
maybe I will work on a Javascript Game.
BTW if anyone wants to donate to the "Help Malachi not be broke" fund let me know.
 
@Malachi Make a website with some ads and put it there
3
 
12:56 AM
sounds like a good idea!
 
ugh. I give up on Perlin Noise
I'm implementing my own terrain generation algorithm
 
@Quill I'm not following...
 
I am thinking maybe battleship. maybe do that after I steal Minesweeper from @SimonAndréForsberg
 
If you need me, I'll be watching the GOP candidate debate. I suppose it's a good thing I'm not a drinker.
 
1:09 AM
I can't wait to see Trump get destroyed.
 
I just looked for a livestream but apparently there are none
You have to pay to view the possible future leaders of the country debate the country's issues
 
I'm just watching it on Fox News. Probably the first time I've actually viewed that channel, too.
 
I got blown up
 
I can't get XNA to install for VS2013 Express.
 
1:18 AM
And I can't figure out how to assign a variable to null.
 
you don't
you assign null to the variable
 
As far as "one line" is concerned, it's a complete red herring, because def func(x): whatever is no worse of a line than func = lambda x: whatever. The def is actually shorter. The only problem is when it doesn't follow some style guide imposed by a text editor or a code reviewer who is impervious to reason, but "my colleagues are horse's asses and I can't work my text editor", while perhaps an insurmountable problem, is only a weak justification for preferring one code construct over another. The real reason is that def is not an expression. — Steve Jessop 54 secs ago
 
there is no variable
what language are you talking about here @EthanBierlein?
 
c#
Say I have int x = 0
I tried to do x = null, but it doesn't work
 
int is not a nullable type
int? is
 
1:29 AM
oh
So I have to insert a ? after the type name to make it nullable?
 
int? x = 0;
x = null;
only for some variable types
I don't like this keyboard.
 
didn't MS discontinue XNA?
 
yes
there's always monogame
 
@Malachi is your XNA project open-source?
 
1
Q: Query to merge two rows from same table

RijoThe database keeps a history table of multiple instances of an element changing, for this example a button that changes colors. What I would like is to return the color of the button when the status is both pushed and unpushed. ButtonHistory ButtonId ButtonStatusId ButtonColorId --------...

 
1:33 AM
'cause if it is, then you should be using VS2013 Community Edition, which is essentially a free Pro edition
 
I want to make some money off this game. and I don't know if they actually discontinued it or not.
I think they still support the last version which is like 4 and they have a refresher out
 
side note, I'm off-by-one on this one:
9
A: Is VBA an OOP language, and does it support polymorphism?

Mat's MugOOP is sitting on 4 "pillars": Abstraction - Abstracting logic and concepts can easily be done by defining objects in class modules. Strictly speaking, abstraction is also achieved by using meaningful identifiers and extracting procedural code into methods (class members). Encapsulation - Cla...

thanks @Santa! :)
3
funny that the accepted answer has +3/-1
@CaptainObvious not very clear whether it's actually working as expected...
 
I was installing the wrong things, no wonder I couldn't get it to work
 
1:53 AM
Make this post on codereview (I think). — Script47 14 secs ago
 
@Mat'sMug ty
@Mat'sMug Yeah, looks awfully like a feature request
 
should I hammer-close as unclear?
 
2:08 AM
yes
 
@Mat'sMug do it, zeus!
 
lol
 
I love it when you swing that big hammer of yours
2
 
ugh. I wish C# had something like Python's enumerate function
lol hit enter too early
 
@EthanBierlein What does it do?
 
2:10 AM
@JeroenVannevel nsfw?
 
@JeroenVannevel If I wanted to iterate over a list, and have the index of each element, I could do for index, item in enumerate(my_list): ...
 
so.. for(int i = 0; i < list.Count; i++) { Console.WriteLine(list[i]); }?
 
just initialise the variable inside the for loop, it's not really that necessary
@JeroenVannevel does that give a off-by-one error?
 
@Quill note < list.Count
<= would
 
2:13 AM
Ah, sorry
<= 2 hours sleep last night
 
@EthanBierlein Python only has "foreach" loops then?
 
I find the syntax confusing. is index a keyword?
 
windows phone SDK 8.0 takes forever!
 
^^ yes
 
2:18 AM
@Mat'sMug no, it's a variable
 
for index, item in enumerate(my_list):
for item in my_list:
right?
 
yes
When you use enumerate to iterate over a list, it yields a tuple in the form (index, item), and by doing index, item, you are unpacking the elements of that yielded tuple into two separate variables, index, and item.
 
I probably didn't need it just yet. I found the XNA 4.0 Framework with the Refresher and have that all installed.
 
@EthanBierlein ah, that explains it
 
I should just put out an alpha for anyone here that wants to test it out.
sorry I will quit interrupting
 
2:21 AM
I would love to test a game
I don't own a windows phone though
 
will be Windows/XboX
 
I am going to make it work on everything that I can eventually, but I have some stages to go through first
 
I might just learn some objective-C: blogs.windows.com/buildingapps/2015/08/06/…
 
huh
interesting
 
2:23 AM
an open-source project @nhgrif might be quite interested into
 
Wait, there's such a thing as Objective-C++?
Strange
 
> Behind this goal are three core principles that drove the architecture and design of the bridge:

Full Windows API access: Making it easy to use Windows APIs within Objective-C code
iOS compatibility: Empower developers to reuse as much existing iOS code as reasonably possible
No sandboxing: iOS and Windows APIs should be able to work together
I hear a crowd screaming "TEAR DOWN THE WALL!"
2
 
I want to build some Android Apps in C#
 
> Are you planning on supporting Swift ?
waiting for the conspirationists to find a devilish reason behind that.
 
Is there a specific way to check if something is null in C#?
Or can I just use variable == null?
 
2:37 AM
all done installing. time to cuddle with the Wife
@EthanBierlein give me a second
 
0
Q: how to check null values using if condition in C#

moei have multiple conditions in my IF statement but only the second one works in other words the null values is not detected. i know the fields are blank or null but it is not detecting it. The email is fired only if keep the 2nd condition and remove the first one but i want to check both conditi...

 
String.IsNullOrEmpty
 
@EthanBierlein depends what you're trying to do, but yeah variable == null will do it.
 
TTGTB
later guys
 
'night
 
2:40 AM
Seeya @Malachi
ugh
Could anyone provide a good reason as to why this question here could be closed as "opinion-based"?
1
Q: How can I efficiently move files from Windows.old to current folders?

Ethan BierleinI haven't yet upgraded from Windows 8.1 to Windows 10 yet, and I'm wondering, is there an efficient way to move my own files from Windows.old to their respective locations after the upgrade without having to do a large amount of drag/dropping/copying?

Meh, I'll just take it to meta.superuser
 
To the closer it seems like a 'what's the best tool for the job' kinda thing, rather than a 'is there a tool that can actually do that?'
Which is opinion-based, in their opinion
 
I've edited the question
Screw superuser. Time to just Google it
 
You could pay an overseas cheap labour worker to do it for you
 
Actually, I just found a small applet built by MS to do this for you
 
> You have Windows 10, but this page is for an older version of Windows
 
2:54 AM
oh :(
 
might work though
 
Seems there'll be no answer to this question. My current practice is to use Java static analysis tool (such as FindBugs) and perform code review based on Java Card best practice. Some of the practices are described by Gemalto in "Java Card™ & STK Applet Development Guidelines". You can google to get the document. — David 15 secs ago
 
@Malachi string.IsNullOrWhitespace is kinkier
> I wanted to create a skype bot dut din't know how. So I just copy pasted the codes from code project studied. Seriously, I didn't understand much. But when I tried to execute, it throws an error.
That's the kind of question I love
 
3:16 AM
I screwed up ^^
 
just a bit
 
only a little
clearly It somehow isn't updating all the neighbors
I might have to re-write this entire damn terrain generator
again
oh boy, time for a re-write!
The entire class has been reduced to this:
using UnityEngine;
using System.Collections.Generic;

/// <summary>
/// Terrain generator.
/// </summary>
/// <param name="terrainWidthX">The x-width of the terrain.</param>
/// <param name="terrainWidthZ">The z-width of the terrain.</param>
/// <param name="minHeightIncrement">The minimum height increment.</param>
/// <param name="maxHeightIncrement">The maximum height increment.</param>
/// <param name="seedingIterations">The amount of iterations to run while seeding map data.</param>
/// <param name="generationIterations">The amount of iterations to run the generation loop.</param>
 
?
/// <param name="terrainWidthX">The x-width of the terrain.</param>
/// <param name="terrainWidthZ">The z-width of the terrain.</param>
/// <param name="minHeightIncrement">The minimum height increment.</param>
/// <param name="maxHeightIncrement">The maximum height increment.</param>
/// <param name="seedingIterations">The amount of iterations to run while seeding map data.</param>
/// <param name="generationIterations">The amount of iterations to run the generation loop.</param>
 
What?
 
xml comments seem misplaced
 
3:26 AM
nope
Classes that inherit from MonoBehaviour don't have constructors, so comments like that should go at the top of the class.
 
<param> should be for, well, parameters
and they're, well, ...public fields
 
Unity encourages a rather strange design pattern, but it's workable.
 
can't you use auto-properties instead of public fields?
 
@Mat'sMug Technically, to Unity, they're "arguments"
@Mat'sMug Nope, Unity C# is behind
 
Unity is Microsoft's IoC container, no?
 
3:29 AM
Unity3d
sorry, that wasn't clear
 
@EthanBierlein it just feels wrong
but I don't know Unity3D
but it feels wrong.
 
I think it feels a little wrong too
Unity3d also mangles variable names too.
 
I mean, from a C# standpoint, you have a mutable reference type exposing its instance fields, and they're xml-documented as method parameters would. bleh.
 
3:50 AM
0
Q: Error in x[[1]] : subscript out of bounds in R language

user28536I am new to R and i followed the link below visit http://neondataskills.org/R/Image-Raster-Data-In-R/ >library(raster) >Loading required package: sp > library(sp) > library(rgdal) rgdal: version: 1.0-4, (SVN revision 548) Geospatial Data Abstraction Library extensions to R successfully loaded Lo...

 
@CaptainObvious VTC for broken code
 
gone
thanks for the comment
 
np
 
ugh
Still broken
 
There is a place called Code Review - try there. — OneFineDay 19 secs ago
 
3:56 AM
hmm
I have an idea
 
I'm voting to close this question as off-topic because it belongs on codereview as already mentioned — Blakes Seven 31 secs ago
 
1
Q: Collaborative filtering to group similar users and products

pocI'm doing product recommendation module based on collaborative_filtering. The recommendation will be generated by users, products, and products view count The recommendations can be splited into 2 types: One is to find which user's favorites is similar to specific user (the _similar_users fun...

 
I think I found the issue
I'm not truncating the height of a tile in a certain range.
 
@BlakesSeven please see A guide to Code Review for Stack Overflow users - use existing, valid close reasons ("too broad" or "opinion-based", as applicable); being on-topic on CR isn't a valid close reason on SO. Cheers! — Mat's Mug 20 secs ago
That said, this question would need a better title and a description of what's being achieved here (i.e. more context), to be well-received on Code Review. — Mat's Mug 47 secs ago
 
Hmm, that wasn't the issue...
Oh my god I think I found the issue
I'm not "smoothing" the terrain to make sure that the neighboring height values of a tile are close enough to that tile
 
4:08 AM
@SirPython, @EthanBierlein may have started the Interrupt! meme
 
This looks like the earliest message:
Jun 11 at 0:00, by Ethan Bierlein
INTERRUPT
 
Bookmarked
For possible history
 
0
Q: Creating loops that ask a questions until desired answer is received?

Levi Schneider var mainQuestion = prompt("Do you love pandas?! Yes or No") if(mainQuestion == "Yes"){ alert("We knew you did!") } else { while(mainQuestion != "Yes"){ alert("You don't mean that!"); var maninQuestion = prompt("Now, do.. you.. like.. pandas!?") if(mainQuestion == "Yes"){ alert("We ...

 
I sure hope this smoothing function "smooths" things out.
 
4:12 AM
@CaptainObvious why the question mark?
 
I'll show myself out.
 
@Mat'sMug so very unclear, only code
-2
Q: Forcing you to love pandas

Levi SchneiderI have code that, loops asking a questions until a desired answer is received. var mainQuestion = prompt("Do you love pandas?! Yes or No") if(mainQuestion == "Yes"){ alert("We knew you did!") } else { while(mainQuestion != "Yes"){ alert("You don't mean that!"); var maninQuestion = prom...

 
Do not click Run code snippet on that question. It will freeze up all sorts of things.
 
4:30 AM
It's a recursive function, it's not that bad
@200_success, did you close for the maninQuestion bug?
 
Yes.
 
I'll leave a fix it and get-reopened comment, then
 
The task is lame, but if it weren't for the obvious bug, it would be reviewable.
 
Supposing you fix the maninQuestion bug, the post could be re-opened. — Quill 13 secs ago
@200_success I was in the middle of reviewing it, actually
I saved it to a file, supposing they fix it, I'll post it
 
0
Q: Keeping an inventory of items

amol singhI have been working on a shopping cart project and I am creating the database for that product table: create table product ( product_id number(4) primary key, category_id references category, product_name varchar2(40), product_brand varchar2(30), price varchar2(15) , image_url varchar2(200...

 
4:37 AM
@CaptainObvious VTC as unclear
 
@200_success we've reviewed plain CREATE TABLE scripts before? isn't OP asking more for a "schema review" than anything else?
 
ugh, screw it. The terrain generator is still broken. Night @all
 
4:54 AM
 
5:13 AM
0
Q: Appending script elements with variable attributes

misterManSameWay has a simple Pay Now button that is embedded as a script. There are other ways to use the eWay API to take a custom payment, but they are slightly more complicated and the idea was to keep it simple. This is the basic script: <script src="https://secure.ewaypayments.com/ scripts/eCrypt...

 
Welcome to Code Review. As worded, your question sounds more like a design review, or something else that is not very clear, rather than a review of real, implemented code. — Phrancis 14 secs ago
ttgtb
 
'night!
 
5:41 AM
Monking
 
hi!
 
6:28 AM
Monking
 
 
1 hour later…
7:34 AM
Monking
 
7:46 AM
@elegent For example, I would consider an answer that suggests needlessly complicated and inefficient code as a bad one. Something that would get thrown out of code review in half a second. — juanchopanza 25 secs ago
 
8:11 AM
Greetings
 
8:24 AM
Monking.
 
Greetings
Do you want a difficult question?
 
"And you should see how offices in off-shore countries work" - I don't want to see that. I had to do code reviews on these software ruins that were mostly a complete collection of how to not do something. My recommendation was almost always the same: Get a company with real programmers to rewrite the application. Fixing it didn't made any sense from an economical perspective. Writing good code and follow good practice doesn't require time, as you just do and follow it. Your iron triangle becomes a Bermuda triangle by sacrificing good practice in the first place. — burzum 35 secs ago
 
@IsmaelMiguel Of which kind?
 
Non-sense
I have a website with a bug
I copy the whole freaking content to another domain
Connected to the same exact database
 
@IsmaelMiguel An antisemic question :D
 
8:27 AM
The files are a bit-perfect copy
But the bug doesn't show on the copy
Only and only in the original site.
 
Then it has to do with the context in which it is launched, not with the site itself, right?
 
Exactly
Except that the context is the same.
 
The directory where the site is is not since It is a copy. That's context.
 
Finally I could replicate the bug!
 
Oh, then...
 
8:30 AM
I've made exactly the same yesterday
It's a database problem of some sort
 
So, I just want to remind everyone that the CR community is awesome and you have all spoiled me. Other SE communities don't participate in chat/meta the way we do.
Oops. Wrong link.
 
@RubberDuck I though you had a candle on your hat (on your profile photo)
 
Okay @curiousdannii. Since you refuse to take the discussion to an appropriate place, I'll defend the question here. — RubberDuck 29 mins ago
Comment thread that prompted that "thank you".
@IsmaelMiguel nope, it's my Eureka hat!
> Is it winterbash yet?
 
@RubberDuck Give him a break, he had a bad day/night
And I didn't notice that before.
I really though it was a candle, like in a birthday cake
(Even though I hate birthdays)
But anyway, he really got the whole thing backwards
 
0
Q: Weiler-Atherton Algorithm

anonymousI have searched throughout the internet and found no OO approach to implement Weiler-Atherton Algorithm. I have implemented this code. Collection<Polygon2d> GetClippedPolygon() { Collection<Polygon2d> polygons; //Collection clippingList = this->CollectClipVertices(); ...

 
8:47 AM
Lol. Now I want to photoshop myself a birthday cake hat!
 
I hate birthdays, but I approve your idea
@CaptainObvious "To me, this is a quality-less and miserable code. Please, help me to make the code elegant and efficient." --> Why miserable? It looks like happy code!
 
It could be better but I wouldn't consider this miserable code either.
 
I really don't see anything terribly bad
Only that do{ }while;
 
Now that the full code is there, we can see that things really are perfectible :)
 
Now I agree that it looks a bit miserable
His code looks so flat
 
9:23 AM
Monking
 
Greetings
 
Morning.
 
Quack!
 
Anyone here good at Java?
 
Many people. Not sure they're here right now though.
 
9:26 AM
Not me, but I don't mind learning
 
My IDE is bugging my about "Unindexed remote Maven repositories"
 
I will call that a bug
 
I'm not sure what that means and if I should index them or not
 
4
Q: IDEA 14 and Grails 3.x unindexed remote maven repositories found

JamesAI am importing a new Grails 3.0.1 application into IU 14.1.1 and receiving a warning that "unindexed remote maven repositories found": Opening the repositories list and clicking update as suggested does not seem to do anything. IDEA does not have Grails 3.x support yet according to this iss...

11
Q: IntelliJ IDEA: "Indexed Maven Repositories" list - how to add remote maven repository in this list?

dnimI'm having trouble understanding how to get repositories in the "Indexed Maven Repositories" list of the IntelliJ IDEA. In one my project I have two repos in this list: one local and one (main) remote (see attached screenshot below). And in other project (created using AppFuse template) I have ...

Pick the one that works
Don't forget to up-vote them
 
0
Q: Stack Implementation using Arrays

Rohit SalujaI am implementing a Stack using an array. I have written the below code and it works fine #include<stdio.h> #include<stdlib.h> int isFull(int top, const int unsigned size) { if(top==size-1) return 1; else return 0; } int isEmpty(int top) { ...

0
Q: poker deck class - could be more pythonic?

Nyitrai Lőrincfrom random import shuffle class Deck(object): suits = range(4) ranks = range(13) @classmethod def generator(cls, suits, ranks): for suit in suits: for rank in ranks: yield({'suit': suit, 'rank': rank}) def __init__(self): self.c...

 
9:42 AM
Monking
 
@skiwi Hey you :)
 
How are ya?
 
Fine. Preparing for tonight's live. What about you?
 
Having a bit of a mini-holiday, still not sure if I can work next week or not
I came up with a plan to try to build a trading card game in 40 hours
We have Cardshifter ofcourse, but (as usual) my ideas are so radical that I don't think they'll fit in there
 
Good luck.
You'll likely lose most of your time into design decisions :p
 
9:51 AM
I'm usually too focused on perfect code, I really wonder if I can also produce stuff
@Morwenn I've got quite a few of those done already
Wait... did you mean game design or program design?
 
Game design.
@skiwi The problem of every CRitter ever x)
2
 
I can get over it for work-related work
But at home it's easy to fall back into the depths of perfection
 
Same here. Also, I'm less of a perfectionist when I use Python.
 
Try being a perfectionist in PHP
You'd have to rewrite the langauge for that
 
Thanks @IsmaelMiguel
Those posts didn't answer my question on closer inspection. They're on about the same thing, but don't explain what it is and why
 
10:05 AM
0
Q: Is there a term that covers body parts, tools, entities and more?

skiwiI'm trying to design a concept for a Trading Card Game and I've got this thing thought out, but I'm unsure how to name it. The concept: Creatures can be divided into several parts that can be independently destroyed when a creature enters combat. A few examples of these parts that make up ...

My first step :D
 
This question might be more appropriate for codereview.stackexchange.com. — Robin Krahl 19 secs ago
 
@jacwah One of them says it is a bug. Other says how to shut it up. Not perfect, but that's what I found doing some quick google-fu
 
There is a forum named like "Code Reviews" in Stack Exchange and I think this question should be putted there... — Xawery Wiśniowiecki 52 secs ago
 
@Duga (Shouts) We are not a forum!
 
10:41 AM
@skiwi More will come
 
0
Q: ASP.NET MVC: Javascript error logging in production environement

user79673There are several libraries available for javascript error logging in a web application. These libraries sound useful during development. We can catch javascript errors at global level using widows.onerror handler. All looks fine and dandy upto this. But if we enable bundling and minification i...

 
@skiwi Nice question
 
@CaptainObvious Burn it for 1) Not having code, 2) The code that wasn't posted doesn't work and 3) It's a bad question for StackOverflow.
 
@Mast Thanks
 
0
Q: Comparing two almost exact arrays

jackdhSo I have two arrays. $row $rowTwo The only difference between these two arrays are the first two keys have slightly different names due problems out of my control. Question currently to check a difference between the two I need to do it as below, I'm wondering if there is a cleaner way to d...

0
Q: Service receiving and sending messages – multiple protocol versions

user1320170I need to design and implement a service (C#, .Net 4.5+) which receives messages, converts the messages to BLL models and passes them to the BLL. Long story: The service will receive messages (strings containing multiple fields (No JSON, no xml just a string)) from a client. The format of the...

 
10:53 AM
 
Which one is yours?
cppsort?
 
It seems that my dedicated osrting algorithms beat genera-purpose sorting algorithms only for sizes < 10.
cppsort::sort
 
@IsmaelMiguel 3) It's on CR, not SO
 
Can you make a graph with more elements, if possible?
 
@IsmaelMiguel That wouldn't be of any use. It's a small arrays sorting algorithm.
 
10:56 AM
@Mast I know... But the point is that the question isn't worth migrating to over there. My wording is wrong
 
It falls back to std::sort when the number of elements is greater than 32.
 
@Morwenn 32 is alright
 
@IsmaelMiguel Let me a few minutes to generate the results.
 
@Morwenn Take your time. I'm really curious to see how it goes
 
It is better than std::sort until ~30 elements and better than pdqsort only until ~10 elements (but we can already see that one on the graph).
But the graph is flawed: I only timed this with shuffled arrays and timsort does not perform well with shuffled arrays.
 

« first day (825 days earlier)      last day (1445 days later) »