« first day (1045 days earlier)      last day (2977 days later) » 
00:00 - 16:0016:00 - 00:00

12:00 AM
RELOAD! There are 1974 unanswered questions (93.8989% answered)
 
12:20 AM
0
Q: Should I merge these methods into the same class?

therewillbecodeI am building a web scraping library. Below are two functions that make a request for a given url and then takes the response body (html) and loads it into the cheerio library. scrapeListing.js var fs = require('fs'); var request = require('request'); var cheerio = require('cheerio'); var List...

 
12:52 AM
Using SSE and OpenMP may provide speedups. I actually didn't know you were doing that. Have you tried increasing the kernel size? Do you get the same speedups? In any case, I think your post is unsuitable for StackOverflow. You should probably post on Code Review instead. Your code works, but you'd like feedback and recommendations on how to possibly make it faster. — rayryeng 37 secs ago
 
0
Q: Refactoring the Some function

iCodeYouCodeWeAllCodeThe function: I have completed a function that takes a list and returns true if any item in the list passes the predicate test. If a predicate test is not given, the function will return true if any items in the list are truthy. Objective: I am suppose to use the every function to construct th...

 
 
1 hour later…
2:11 AM
0
Q: Max heap implementation in Kotlin

Andrew SunI wrote this class a while ago to learn Kotlin and heaps, so any tips (on either my code style or my heap algorithm) would be appreciated! class MaxHeap<T : Comparable<T>>() { private val items: MutableList<T?> = mutableListOf() var size: Int = 0 private set fun push(item: T...

0
Q: Scala Print Trace Debugger

Michael LafayettePlease review my Scala print trace debugger... https://github.com/JohnReedLOL/debugtrace ^ I know the README, the documentation, and the test cases need work. This project is used for lightweight debugging sort of like the Haskell Debug.Trace module... https://hackage.haskell.org/package/b...

 
2:52 AM
0
Q: What to change in my XML parser?

The Pro HandsI made a basic XML parser supposed to be working in many browsers by using most older functions. What it must do is return a AST (Abstract Syntax Tree) of a XML text in string. When it's interpreting, it's parsing the XML to generate the tree. (not recommended for HTML because it doesn't recogn...

 
Hi, @NicolasRaoul.
 
3:18 AM
0
Q: Trouble using image Array for src

NecessarilyTrying to shuffle an array of images, then display them one at a time by clicking the canvas. The full code is below: <!DOCTYPE html> <html> <head> <title>Array Image Display Test</title> </head> <body style="background-color: floralwhite;"> <canvas style='border: 7px solid black; b...

-2
Q: 0 to 1. JAVA learning

HOORAguys. I have been taking java course for a month. Though i don't have a single idea how it works. Ask me why. I had a kind of psychological illness ( imagining myself kissing with another guy even though im not a gay. When talking with girls i imagine kissing her or doing bad things to her. When ...

0
Q: Print Trace Debugger

Michael LafayetteSee my Scala print trace debugger. This project is used for lightweight debugging sort of like the Haskell Debug.Trace module. The README, the documentation, and the test cases need work. To test it out, see the code below or do: git clone https://github.com/JohnReedLOL/debugtrace And open i...

 
@CaptainObvious I would love to downvote you. If you know how to write in C and C++, you should know your basic search terms and get the answers for all your questions.
Not to mention your absolute craziness (Deciding which shampoo to use? Why not just get the one you usually use?)
 
4:03 AM
After a power outage at the Bulletin of the Atomic Scientists, the new Digital Doomsday Clock is flashing 00:00 and mushroom clouds keep appearing and then retracting once a second.
2
 
4:43 AM
0
Q: Pokemon stats calculator

user100191I have a simple working (so it's not a hypothetical stub) framework for calculating Pokemon stats that will later be incorporated in a game. It uses the LCRNG from the first game in order to be as compatible as possible. I use formulas from the bulbapedia wiki. The example output matches the exam...

 
5:14 AM
0
Q: Stacked bar charts using python matplotlib for positive and negative values

JuwairiaI am trying to plot a stacked bar chart with python Matplotlib and I have positive and negative values that I want to draw. I have had a look at other posts talking about how to plot stacked bar charts with positive and negative values, but none of them has done it using Matplotlib so I couldn't ...

 
5:42 AM
0
Q: Returns an IEnumerable using Linq-to-SQL which is then bound to a GridView. Horrible performance

Lewis CianciSo, this is my function. It works, but its really really slow and the generated SQL is gargantuan and horrible to look at. It's also very expensive to run when it shouldn't be. public static IEnumerable<TrackingComputer> TrackingBoardPCsgroup(string groupName) { var pingresult = f...

 
6:09 AM
0
Q: Distinct List of attribute values from XML, using a pre-defined set of attribute names

ThunderFrameI have an XML stream that looks like the following (attribute and node quantity , and node depth reduced for demonstration purposes.) <root geography="Global"> <country name="Australia" city1="Sydney" city2="Melbourne" language="en" /> <country name="Canada" city1="Vancouver" city2="Mel...

 
6:27 AM
monking @all
 
Monking
 
0
Q: Selection sort algorithm in Rust

demasI am just trying to use Rust so I will be thankful for all remarks and corrections: fn selection_sort(array: &mut [i32]) { let mut min; for i in 0..array.len() { min = i; for j in (i+1)..array.len() { if array[j] < array[min] { min = j; ...

 
7:28 AM
0
Q: How can I convert my react-native code to use a listview?

James111So a lot of people online and offline tell me that using a Listview is the most performant and I've never really understood how it works. I have instead used a <scrollview> that contains nested <PostComponent /> which I construct when an API call is made. Breakdown of my code: handleScroll (): ...

 
8:00 AM
Naruto answer; accepted non-selfie answer with 0 score: improvement of a database register function
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Converting UK drams to ounces and pounds in PHP
 
8:52 AM
Monking
 
Kaz
Monking @all
 
Turns out that sending SQL files over e-mail to the DBAs because we lowly developers are not given INSERT access to the production DB can cause some issues where they run scripts multiple times due to confusion.
Who would have thought?
 
Kaz
@DanPantry I feel like this is the corollary to @PinCrash's usual predicament.
 
@Kaz LOL
 
-1
Q: java.lang.NullPointerException when trying to upload excel value to database

hunt My code to read file.. public void ReadExcelDemo () throws java.io.IOException, javax.servlet.ServletException{ FileInputStream fis = new FileInputStream( new File("C:/Users/hunt/Desktop/DAILY MONITORING.xls")); HSSFWorkbook workbook = new HSSFWorkbook(fis); HSSFSheet spreadsh...

0
Q: Excel VBA: Script for to remove empty row in a sheet

st88I often receive Excel-sheets (with empty rows) which I've to process as an Pivot-table. Because Pivot-tables don't allow empty rows I've made these script: ' Removes empty rows from an sheet. Public Sub RemoveEmptyLines() Dim lastRow As Long Dim currentRow As Long Dim emptyLine As Boolea...

 
Kaz
9:05 AM
@CaptainObvious *shudders*
 
0
Q: What should I do if a value is needed somewhere down the chain, but not always?

Parham DoustdarI have a utility class, called Bills, that extracts some information from a billId and a paymentId. I'm pasting the whole class here for completeness, you don't need to understand the algorithm behind all functions to be able to answer my question. The code is below. <?php class Bills { co...

 
Kaz
@CaptainObvious @Mat'sMug @RubberDuck I see tags for vb.net and vbScript, but no code for either?
 
9:29 AM
0
Q: Refactoring angular code

fujitsu4I am a newly developer in angular. I want to do some homeworks to create forms with angular. I spent nearly a week to do it, but my teacher was not really satisfied about it. I tried to follow some web tutorials and I thought that it was good but apparently, the quality of my code is very bad (ac...

 
@CaptainObvious Ouch, this is bad.
 
0
Q: Reusable Properties File Reader

dataEnthusiastI have implemented a properties file reader. The goal behind creating the properties reader is to cater to different application teams to import the class and read the properties in their projects. I would like to request you to review the code and let me know how better this can be coded so th...

 
9:45 AM
been sat here waiting 10 minutes for VS to check in a changeset to TFS (of 11 files).
 
@Kaz OP isn't wrong about his tags. That snippet would run in any of those languages I believe. His application won't, but the snippet will. Of course, you should never write .Net code like that...
 
but it's portable!
2
 
Which language do you want this reviewed as? Answers will vary greatly depending on the possibilities/constraints of vba/vb.net/vbscript. I'm guessing this is really VBA. — RubberDuck 58 secs ago
 
Kaz
> Excel is notoriously unreliable at maintaining an accurate up-to-date version of things like usedRange, lastCell etc.
@RubberDuck Is there any way to do this without disabling the error handler?

On Error Resume Next '/ Check that it is a valid reference
columnNumber = Columns(columnReference).Column
On Error GoTo 0

If Not columnNumber > 0 Then
MsgBox "Your column reference was not recognised, please try again"
Exit Sub
End If
 
10:13 AM
@Pimgd That's like writing C in a C++ compiler saying it's both.
Or writing Python 2 in such a way Python 3 won't break running it.
Just pick an environment already and stop going portable if the interpreter is widely available...
Interpreter/compiler/whatever the language needs.
 
possible answer invalidation by Jamal on question by fujitsu4: codereview.stackexchange.com/posts/122800/revisions
 
@Kaz What about just keeping a reference to the column? I've no idea what you're worried about or trying to accomplish there.
columnReference.Column should work perfectly fine.
 
10:51 AM
0
Q: Implementation of Abstract Factory pattern with different vendors for product

Krishna KumarI am studying about design principles and design patterns. I have implemented an Abstract factory pattern as per my understanding. The scenario I have considered is as follows : There is an organization 'DrawingStandards.ltd' for setting standard rules for drawing. There are two Other organizat...

0
Q: Node.js parallel file download, the ES6 way

Nicolas RaoulI wrote a script that downloads all PDFs found on the web page of a particular government agency. I would have chosen bash for such a task, but I want the script to run in Node.js. The downloaded files are a few hundred kilobytes big, if that matters. It is the first time I use ES6, but I want ...

 
huhhhh
-1
Q: Creating forms using angular

fujitsu4I am a newly developer in angular. I want to do some homework to create forms with Angular. I spent nearly a week to do it, but my teacher was not really satisfied about it. I tried to follow some web tutorials and I thought that it was good but apparently, the quality of my code is very bad (acc...

 
Their code is not quite as good as their washing machines. :(
 
account merging required, maybe?
 
Kaz
@RubberDuck It's user input, so I'm just checking the string they provide is an actual valid reference.
 
@DanPantry You probably should start adding NOT EXISTS clauses in your ad-hoc scripts, evidently
2
 
11:00 AM
@Kaz Oh! Gotcha! Let me take a second look.
@Kaz At a glance, no. I would probably use an On Error GoTo InvalidUserInput personally, but it's 6 of one, half dozen of the other.
 
@PinCrash they aren't ad-hoc scripts :(
they are ones checked into source control etc.. the DBAs just dont know or want to learn how to use it apparently
but yes I will look into not exists
 
Anyone know how you can remove the "Have you seen these videos" recommendation mails from youtube
because it's full of crap
 
@Pimgd its probably in an account option on your account
I'd tell you... but youtube is blocked in work. :D
 
There is no such option, as far as I can see
 
you could always nuke the email address from orbit /s
 
11:08 AM
Like, filter all mail from youtube that starts with "Popular video by "
 
0
Q: Looking for a faster way to compute rowMeans, for every combination of columns

George DontasThe data pre1 <-structure(list(A = c(0.0276, 0.0165, 0.0113, 0.0229, 0.0113, 0.0151, 0.015, 0.0122, 0.0113, 0.0113, 0.0113, 0.0113), B = c(0.0884, 0.0135, 0.0001, 0.0523, 0, 0.0069, 0.0069, 0.0007, 0, 0, 0, 0 ), C = c(0.04, 0.0155, 0.0065, 0.0291, 0.0065, 0.0128, 0.0127, 0.0078, 0.0065, 0...

 
> Your filter was created.
Yeaaaaahhh die spam die
2
 
--Use this to make a temp copy of the table you want to insert to:
select top 0 *
into #TempComments
from Comments;
--Has all the correct columns but is empty:
select * from #TempComments;
insert into #TempComments values
--(whateverz...)
;
insert into Comments
  select * from #TempComments as tmp
  where not exists (
    select 1 from Comments as c
    where tmp.SomeForeignKey <> c.SomeForeignKey
      and tmp.SomeArbitraryField <> c.SomeArbitraryField
      --etc.
  )
@DanPantry ^^
 
Hi erverybody, I'm currently trying to teach myself c++ and game development by writing an NCurses-based Snake-clone and would love to get some review eventually. However, I'm trying to be pedantic, using OOP-techniques learned from a Java introduction course and generally just starting to learn c++, so I'm up to about 6 classes now with maybe 2 more to come for a total of about 17 files (.cpp & .h).
I'm wondering if cr.se is the right platform to get some review for that. I guess it's in the neighbourhood of 700 lines of code.
 
Hello
 
11:21 AM
@lord_sembor Yes :)
 
lemme cheat and find a similar question
hmmh
So the question I had in mind was actually running out of a single, big file
 
@lord_sembor This post is a great reference if you are fairly new on Code Review:
14
A: Checklist for how to write a good Code Review question

Simon ForsbergSimon's Guide for posting a good question There are a lot of questions that appear on Code Review, and all questions are fighting for reviewer attention. This is a non-exhaustive list of items that I am looking for in a Code Review question when determining whether or not I should review it and ...

 
But yes, it's preferred to make code blocks similar to your files
 
@lord_sembor If it works, it's welcome here. Just make sure you include all relevant code. Especially with languages like C++, since removing one .h you think doesn't need review makes it a lot harder to review the rest.
 
Long and short of it, you can do any of the ways you suggested. It's really up to you. But, smaller, more focused reviews tend to get answers quicker and more to-the-point than posting a huge lump of code
 
11:24 AM
Asking separate questions is likely to be hard; there will be overlap
 
Adding a link to GitHub is always a good idea. Keep in mind we'll review the code stated in the question, not that on your GitHub. The GitHub is for context.
Context is good.
 
recommending that you post 1 question with a focus on one part of the code and then once you have answers, adjust your code and post other bits that you want to get reviewed
 
@PinCrash Thanks, I tried to find something like this.
@Mast It's working :) and I hope to keep it that way.
 
There's also the official how-to-ask for what can and can't be posted.
 
@Pimgd Good idea. So I might post it all, but focus my question on one part of the code
@Mast agh, I never find this kind of stuff on SE sites
 
11:33 AM
monking
 
@lord_sembor Keep in mind you can't tell the reviewers not to focus on something though. A couple of us have tried in vain. It's against the CR culture. You either want a review or you don't. If you upload it, we can talk about any and all aspects we find.
 
And I see giving context, explanation, structure overviews and the likes is pretty important here
 
Monking @Quill
@lord_sembor It turns a mediocre question into a good question.
Having a good title helps as well, but titles are hard.
 
@PinCrash thanks :)
 
@Mast It's not like I'm not looking for as much review as possible, but I thought maybe a focused question will get quicker answers, as it allows for smaller ones.
yeh titles are hard
 
11:37 AM
> There are only two difficult things in Computer Science: Cache invalidation and naming things
 
And off-by-one errors.
2
That's made worse by different languages basing their arrays differently...
 
*looks at Lua*
 
^^
 
Yay, for once, JavaScript isn't the problem! \O/
3
 
@lord_sembor If you really want to know how to write a good question, look around how the highest-voted and well-answered questions did it.
 
Kaz
11:38 AM
@DanPantry and VBA, which will zero-base some things and 1-base others.
 
Oh, so I might post only a part of the code, but for completeness a link to a working github repo, so you can see how it fits into the whole thing.
@Mast will do
 
@DanPantry JavaScript is never the problem, JavaScript is always the solution
 
@Kaz and where you can change the 0-basing into 1-basing by using Option Base just to make your head hurt more
 
Stack Overflow is not a code review service, I'm afraid I can't look at your repository. — Alasdair 40 secs ago
 
There are three hard problems in computer science: 1) Naming things 2) Cache invalidation 3) Javascript
 
11:46 AM
20
Q: If she floats then she is not a witch like we thought

syb0rgContinuing my C++ saga, this is the third project for my CS1 class: Buoyancy is the ability of an object to float. Archimedes' principle states that the buoyant force is equal to the weight of the fluid that is displaced by the submerged object. The buoyant force can be computed by ...

@Kaz VBA should be illegal.
 
Kaz
@Mast Not to quibble, but wasn't it floating == Witch, drowning == Innocent?
 
if it works i think it will be better to move this to codereview.stackexchange.comalexey 5 secs ago
 
I always loved how incredibly absurd the Salem Witchcraft Trials were, especially the part with the sinking and floating. "Alright, we're going to tie you up and throw you into this deep water. If you float, you're a witch! But if you sink and drown and die, then you're fine. So, in that case, uhhh... sorry for the mistake. Oh well, now you're dead. Whoops." — Doorknob Sep 25 '14 at 0:20
Titles don't have to be flawless, as long as the code works.
 
@Kaz it's a lyric
 
Titles are iffy anyway. In this question, I'm not really inventorying the universe. I'm just displaying the inventoried items. Also note inventorizing is not a word.
19
Q: Inventorizing the universe

MastI recently started re-factoring a project I hadn't touched in many months. The original purpose was to be an inventory management system for a game I played, Ogame. In this game you play inside a universe filled with galaxies, which are filled with systems, which are filled with planets. Those p...

And nobody ever mentioned anything about the title.
 
11:57 AM
yeah, @Mat'sMug, @RubberDuck and a few of the others (I'm assuming @syb0rg too) like Nirvana
 
The idea of Nirvana, or the band?
 
the band
 
nope, buddhists. ducks and mugs can attain enlightenment through the continuous struggle of working with VBA.
5
 
that was a joke... is it still too early? oh it's Monday after daylight's saving time
 
the idea is funny, too, but it's bound to the idea of Rinne, which I personally don't like
 
12:01 PM
A software engineer, a hardware engineer and a department manager were on their way to a meeting in Switzerland. They were driving down a steep mountain road when suddenly the brakes on their car failed. The car careened almost out of control down the road, bouncing off the crash barriers, until it miraculously ground to a halt scraping along the mountainside.
The car's occupants, shaken but unhurt, now had a problem: they were stuck halfway down a mountain in a car with no brakes. What were they to do?
5
 
@Malachi We switched to DST this weekend? Good thing I'm working from home today...
 
it was dark and the way into work, I say two accidents on the way in...
 
we don't switch until sunday 27th
 
that is right, it isn't the same day every where....
 
Because time zones need to be more confusing than they already are
 
12:16 PM
(Affirmative) right!?
 
Looks like DST here is also on 27th. False alarm.
 
12:31 PM
Greetings, Programs.
 
Monking
 
-1
Q: Additional Characters read in Arduino to PC Serial Comm

Sara Va NanI am trying to send a text file from one PC to another PC via Arduino. In below connection: PC1 Arduino1 Arduino2 PC2 I have a C# program to put the txt file in serial format and same is sent to Arduino and same is sent to one another Arduino and read in another PC. When I send a file with ...

-1
Q: Bash script for showing newly introduced env variables

AlanI'm making this test script to help me reverse engineer scripts in charge of setting the dev environment. The script: #env-changes #!/bin/bash ENV_BEFORE=$(env | sort) source $1 ENV_AFTER=$(env | sort) diff <(printf '%s\n' "$ENV_BEFORE") <(printf '%s\n' "$ENV_AFTER") Dummy env script: #!/bin...

 
@kaz yes. Witches burn, therefore they are made of wood. Wood floats, therefore throw the suspected witch into the lake. If she drowns, she was not a witch. If she floats, she is made of wood. Therefore, she is a witch and we can feel comfortable in burning her, having scientifically proven she is indeed a witch.
 
this is why @nhgrif gets paid the big bucks
amazing logic
 
I'm a witch, I know how to float and how to swim
And how to code Ruby on Rails. Lotsa magic going on there
 
I'm not putting any value into the magic
Now I'm getting into swift. Fun stuff.
Should I feel bad about leaving the iOS room on SO because I couldn't take the texting speech? I can't spell or type myself :/
 
I don't care for the SO rooms.
 
Some of them are good.
Once you learn to sort who you can trust for advice
Which may or may not happen around the time when you know enough to think for yourself...
 
1:03 PM
@Mast I think it's just the US (or North America, or the Americas) that does DST early.
 
I can only speak for my country and we go on the 27th as well
I'm probably the only one looking forward to another hour of night in the morning and more light in the evening
 
Superuser cleaning house
13
Q: Rat's nest of tags

fixer1234Raystafarian recently posted a number of tag cleanup requests: Be done with [gtd] What to do with [to-do] It's time we managed [time-management] and a tag synonym request: Tag Synonym request: [tag:task-scheduler] vs. [tag:windows-task-scheduler]. We batted around a few ideas on the time mana...

 
Kaz
Apparently I got 2 downvotes on this (now 1):
6
Q: If ComparisonIsTrue(thisPost, ComparisonOperator.NotEqualTo, goodCode) Then Me.Answer

KazThis is a follow-on to a global enum for comparison operators. I wanted to pass a logical expression E.G. >= someValue as a parameter to a function, so I made an Enum and an accompanying function to analyse logical expressions. Is my approach a good way to implement this functionality in VBA? ...

Is there something I'm missing, or should I chalk it up to randomness?
 
1:22 PM
Chalk it up to randomness - or report it if you're really worried @Kaz
@Mast Tom Scott is such a good youtuber
 
Kaz
@DanPantry Not worried, just not used to getting downvotes.
 
1:41 PM
0
Q: Pong game in Processing with Java

PandenI programmed a Pong game in the Editor Processing! I would be glad if you could rate the code and give some improvements ;) Thanks a lot! //Variabeln werden erstellt int untere_spiel_grenze; int obere_spiel_grenze; float spieler_x; float spieler_y; float ball_x; float ball_y; float ball_ge...

0
Q: Nested loops - Random Forest, multiple parameters

kaksatI'm writing a code which task is to grow Random Forest trees based on multiple parameters. In short: Firstly, I declare a data frame in which model parameters and some stats will be saved. Secondly, I declare model parameters and the loop iterator (it will be showed after every loop iteration)....

0
Q: Deal or No deal game like game in C++

Celine De GuzmanGood day, I'm a 1st year student and please I need help in doing this program it is our final project. I would like to ask how to random the values of a 2D array and how to "try catch" a input in C++. Thank you! would really appreciate your reply :)

 
Greetings, Programs.
 
possible answer invalidation by v1dar on question by v1dar: codereview.stackexchange.com/posts/121695/revisions
 
Hello, @Donald.McLean
 
0
Q: Bash Script to Determine a Distro, Update, Upgrade and Install the Apps I Use / First Script

inflatus#!/bin/bash #Script Name : app_install.sh #Author inflatus #Created 4 Sept 2015 #Version 0.4 #Description #This script will determine the distributon of Linux and use the appropriate package manager to install my core apps current_distro=`cat /etc/*-release | grep "^ID=" | grep -E -o "[a...

 
Just got an e-mail from my ISP:
Shame on you!
@Kaz Perhaps they didn't like the title.
 
1:57 PM
This is a question more suited for codereview.stackexchange.commillerbr 23 secs ago
 
@Duga Agreed.
 
-2
Q: hey i wrote a tic tac toe in java everything is working fine but it always pops up a message when i click a button

PRADYUMN SHUKLApackage game; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class main extends JFrame { private JButton button; private JButton button2; private JButton button3; private JButton button4; private JButton button5; private JButton button6; priv...

 
@Mast should they know that?
 
@bilbo_pingouin Yea, they have the information from all their customers saved in their database. In cleartext.
God help us all
 
@Mast "should they know that?" != "do they know that"
 
2:02 PM
I'd have to check, but I don't think mine does... I certainly hope they bloody well don't.
 
I'm voting to close this question as off-topic because it's requesting a code review, rather than assistance with diagnosing a coding error. — nbrooks 28 secs ago
 
I know for a fact my ISP at best stores passwords encrypted
Because they ask for 3 last characters of your password for verification
 
I think all of them do it.
 
well for my ISP, there are two separate things... what they store for me as a customer, account, password, etc. And another is the WLAN credentials... which are stored in the box that I have at home. Which incidently wasn't delivered by the ISP. So I don't think they'll know.
Or did I misunderstand your message?
 
The WLAN credentials are in a box delivered by my ISP. So they 'have the right to know'.
Which is bullshit, but hey...
I do have a back-up in case it gets too messed-up though, to hook behind it.
 
2:07 PM
and you can't change it?
 
I can change it, but first thing it does is send the whole shebang to them again.
 
(O.O)
 
Things you find out when calling for over half an hour with tech support...
Tech support may even have said more than he's allowed to, I think he was impressed by talking to someone who actually knew what a DMZ and forwarding is...
(which is basic knowledge way too many people fail to learn)
 
Are you having a problem with the code you posted? If so, please explain what doesn't work. If the code is working and you're want it reviewed: post the question on Code Review. — Ansgar Wiechers 31 secs ago
 
and by the way, with such appalling policies, you did not setup another router within your network?
 
2:14 PM
@Mast What provider is that...?
 
0
Q: Most succint way to do a large switch statement in Java

Bernard MeurerI'm writing a small Android application that deals with payments and, in my function that handles transactions, I need to translate a number of installments (1-12) and whether or not it has interest (0-1) into the de facto objects for those of the SDK I'm using. Right now I have a switch that loo...

 
@skiwi KPN, but I know for sure Tele2 and Telfort do it as well, can't say with certainty the rest do.
But it's very likely.
 
@Mast Hmmm okay, wasn't planning to buy their stuff anyways :P
 
Their network is relatively good, but their policy on a couple of fronts is really outdated.
@bilbo_pingouin As long as they don't get hacked there's not much to worry about. Besides, my hardware is protected with their own security.
And I'm not afraid of the government.
Nukes for sale!
 
lol
monking!
 
2:18 PM
Monking Mug
 
@Mast I think the word you're looking for is "until" and not "as long as". Either way, I'm not highly supportive of such policies. But I realised that I may have been living in a false reality myself. I'll have to check.
 
@bilbo_pingouin I'm not supportive of it either. But there's something even worse at hand there that needs to be fixed before I'll harass them about password protection. Currently fighting my way up the chain of command till I find someone with responsibilties, we'll see how it ends.
 
sounds like a life-time project... good luck with it :)
 
IKR ^^
I'll probably shift ISP with the next time I move anyway.
@bilbo_pingouin What brought you to The 2nd Monitor anyway? Welcome :-)
 
When you click the first CR-icon chatroom and it's not the 2nd monitor
 
2:26 PM
@Mast Thanks :) curiosity, and wanting to learn. That and I asked a question a few days ago.
 
@Pimgd It isn't? We should fix that.
@bilbo_pingouin Did the answers teach you something valuable?
 
@Mast they did. I did not get a feedback on those answers, as no one up/down voted them. But for me I got to learn some things... which I have since implemented.
 
It was VBA
luckily I got out before they got me
2
 
lol, I saw you :)
 
@Pimgd GoTo GoodChatroom
(jk)
VS with git is actually quite pleasant
Since it doesn't require a round trip to verify whether or not you're actually allowed to edit the file
 
2:34 PM
using a Long with bit twiddling for license features: sounds like a good idea, you can have 63 different features!
Until you actually have 65 different features, then it sucks
 
@bilbo_pingouin If you're interested there's an even better way of argument parsing.
 
because it all blows up
 
Let me find that for you.
@Pimgd You make it sound good.
 
@Mast better than argparse mentioned by both answers?
 
@bilbo_pingouin Are you using Python 2.x or 3.x for that question?
 
2:36 PM
I was using python2
 
@bilbo_pingouin I posted mine too late :(
but hey I had fun writing it anyways ;-) hahah
 
@bilbo_pingouin There are tags for python versions, you may want to specify one next time, so as to avoid reviewers suggesting features/things that are not available in your version
 
@enderland no, it was fine, if you look at the current version of the code on GH, you'll see that I adapted your examples :)
@PinCrash fair enough. First question on CR, still a lot to learn :)
 
@Mast It's not good, because once you run out of bytes you have to build something else, meaning EVERYWHERE IN YOUR CODE you once referred to "is this feature enabled", you have to change it.
 
@bilbo_pingouin No, argparse is the way to go. But I'm allergic to global.
 
2:38 PM
So running out of flags is pretty much a refactoring for 100+ places
 
@bilbo_pingouin Python is a special snowflake like that, almost no other languages have this problem
 
@Mast that I can relate to it. I try to avoid it as well.
 
I am not sure you need python 2.6 tag
 
@PinCrash If you're wondering why is there, legacy reasons. Some OS have it still installed by default.
 
but I made it anyway I think
 
2:40 PM
If the code works, your question is better suited for codereview.stackexchange.comYoshi 53 secs ago
 
or maybe I tagged something with it when it had 0 uses
 
@PinCrash I guess I did not fully realise the extend of variations for python. I since realised that even python3 isn't fully good, as some things don't work on older python3.2 for example (having Debian stable at home)
 
I should make our current project python 3.X
we're using 2.7 since... meh
 
I prefer sticking to 2.7.
 
@bilbo_pingouin Yeah. Pretty much every other language has legacy support for things in previous versions
 
2:41 PM
It stays the same for the next couple of years and runs on all OS.
 
yeah compatability is a nightmare sometimes
 
You could use Java instead, doesn't have that problem ;)
 
and closed!
-5
Q: hey i wrote a tic tac toe in java everything is working fine but it always pops up a message when i click a button

PRADYUMN SHUKLApackage game; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class main extends JFrame { private JButton button; private JButton button2; private JButton button3; private JButton button4; private JButton button5; private JButton button6; priv...

 
(it has other problems instead)
 
> Comment: Edited to improove English and grammar issues
4
 
2:42 PM
@PinCrash I tried.
 
0/10 spelled grammar right
 
Wait, the issues were improved?
 
Ran into the other problems you mentioned ^^
 
So it got worse?
 
2:46 PM
lol
Internally there was an e-mail sent out by the CTO asking people to use Slack
So I raise a helpdesk call because the Slack client is blocked by our corporate proxy
And the helpdesk replies "why do you need this, we have Lync?"
Do you.. like.. just not pay attention to your emails? at all? :s
 
well, since I am here, I read that python3 does not support a mix of spaces and tabs within the same line. But I could choose whatever I want, couldn't I? Or it has to be spaces?
 
@bilbo_pingouin I'm not sure about the mixture and its effects on the interpreter but definitely choose one and stick to it
Some editors may display spaces and indents differently from each other
 
@DanPantry Blame caching.
Such e-mails take a while to be processed.
 
@Mast There are only 50 people internally, everyone would have received it by now. This is not a @PinCrash situation
 
If the CTO isn't your direct manager, inform him as well.
@DanPantry He takes forever to respond to his e-mails. Not sure what his issue is ^^
 
2:58 PM
I deleted about 32K useless email items on the exchange server this morning.
2
 
Kaz
@PinCrash Only 32k emails? Must be a slow day :p
2
 
LOL
 
How do you know they're useless
 
Because I painstakingly created filters for each of the different kinds of them
 
grep colleagueIDontLike >> /dev/null?
(some assembly required)
 
3:01 PM
(for some values of assembly)
 
lol
the helpdesk just closed my call about the software being blocked
> Hi Dan, After a conversation with <your manager>, we are not currently looking into using this software at the moment so please await an update from team leads.
So.. was the CTO wrong then?
 
Apparently
 
Monking
 
Does the old software still work?
Then I guess you keep using that one
 
@Pimgd yes, but only internally.
 
3:06 PM
0
Q: Pretty handling FileNotFoundException

TreckI have got a piece of code that initialize Scanner in two possible ways: no argument constructor creates Scanner that uses stdIO (System.in) as source contructor with String, which creates Scanner, that uses file as source, where String is a path to file It looks like this: public class Inpu...

 
Seconded. Instant fail on the code review. :-D — DevSolar 16 secs ago
possible answer invalidation by error_null_pointer on question by error_null_pointer: codereview.stackexchange.com/posts/122698/revisions
 
@DanPantry Depends, at the end of the day, who has most authority about what your job is?
 
My manager vs the CTO? probably the CTO
2
 
Forward the e-mail you just got to the CTO, asking for clarification.
Since it's a response on his request, you're not skipping any heads.
 
I have forwarded the e-mail to the CTO as well as his assistant who sent out the e-mail and the person who was specifically brought in to address architecture concerns and also requested this :b
 
3:13 PM
You've done your thing. Let them fight it out.
 
Kaz
@DanPantry Sounds fun
 
@Duga nooooooooo
 
@Pimgd It's haskell, you can't expect him to be able to know the rules of CR after his brain is fried from that language.
 
@Pimgd FGITW
 
Kaz
Apparently, I just shocked my Director with the kinds of things you can do to make Excel look pretty.
> My director: "Wait, this is Excel!?
 
3:14 PM
well, yeah, if you ignore the part where it says Excel in the top right. twice.
8)
 
It does look weird, yes, for Excel
also you might want to not build websites in excel
 
But you might also want to :D
 
I guess you could
but you'd be crazy
 
in the same way that you could stick a fork in your eye and wiggle it about a bit.
 
Kaz
Sometimes, Excel and Word seem completely different, and then sometimes, you strip things back and reveal that underneath the hood, they are built on the same platform in the same language.
 
3:15 PM
it might drive you crazy and put you in a lot of pain but you could do it
 
Now I want to see that
 
@Kaz That looks seriously shiny, nice job.
2
 
Some bad horror movie had something like that
 
Kaz
@Mast Aw, I'm out of stars :(
 
which is pretty funny because when the eye moves, so does any object stuck in said eye
so you can now point at things that you're looking at far more easily
2
 
3:17 PM
LOL
 
@Pimgd And all of a sudden putting a fork in your eye has become a feature.
Congratulations, you're ready for management.
2
 
I'd be a pointy-eyed boss.
 
I bet you'd tell unruly employees to go fork themselves.
 
Generally speaking, StackOverflow is for asking specific questions, like "why does this statement fail". It is not for dumping some hundred lines of code in here for code review. — DevSolar 52 secs ago
 
I'd rather have more copies of the good employees, I could make them do more work
 
3:20 PM
so I need to extract data out of a table, apply a primary key to it, then put that data back in that table. how do
@Pimgd you, uh, missed the joke I think
 
@DanPantry do very well
 
@Pimgd thanks dad
 
@DanPantry I'm trying to one-up you (fork process = get child process, fork employee ...)
although stabbing them is good anger management
 
@Pimgd You're looking for a fork bomb.
 
3:21 PM
@Pimgd i can't imagine the labour unions would be too happy about that
 
Code optimization is off-topic. Try codereview, maybe. — Marc B 51 secs ago
 
@DanPantry It's okay, after the first forking they turn into zombies
@Mast I don't quite get this one
I get the glasses part but why is squirtle eating a riceball
 
@Pimgd Closest I could get to something boss-looking with pointy eyes.
The riceball is there for sh*ts & giggles, it's a Japanese series after all.
 
> Msg 8106, Level 16, State 1, Line 45
Table 'UserAgentReference_tbl' does not have the identity property. Cannot perform SET operation.
I did a select from a table, inserted into a temp table, then dropped original table, recreated with a pk, then inserted that data into it..
but it failed... so now I lost all the data
this is why you use transactions
 
@DanPantry And back-ups.
 
3:29 PM
0
Q: Parse Numerals from a String in Golang

tschfldI recently tried my hand at writing Go code for a project I'm working on. In order to help myself get a better grasp I decided to write a simple yet somewhat practical program for parsing numeral characters from strings based on the ascii values of the runes within, and appending them to a slice....

 
@DanPantry Please say that you were in a dev environment and not in production
 
@PinCrash I don't even have the ability to execute any kind of sql on the prod
or even the uat environment..
i can only run scripts on my local
 
Good good
 
How are those 2 DBAs that dropped the tables recently doing? Do they still have production access?
 
@Mast they are the only people with production access. :D
in fact, they are the people that prevent myself and my coworker from having access in case we do something like drop tables in production
because they would never do tha...
...oh, right.
 
3:33 PM
Sounds like business as usual ^^
 
it's not even dropping though, we cant' run ANY inserts
which is super annoying because the majority of our changes now involve inserts and nothing else
 
@DanPantry Could they perhaps make a few specific stored procs for only the inserts you guys need, without giving you access to run ad-hoc queries? That's what I'd do, most likely
 
@PinCrash ah yes but that would make sense
and we can't have that
 
No, why would you have anything that makes sense. Unacceptable.
 
0
Q: Java Stack Implementation with Generics not working properly

j.castilloI've written an implementation of a Stack data structure using a linked list. However, I'm having some issues with generics on the commented lines below. I'd also like a review on my actual implementation. Stack.java public class Stack<T> { private class Node { private T data; ...

 
3:51 PM
@CaptainObvious VTC broken
 
Kaz
Yay, inb4 Mod Hammer (for once).
 
00:00 - 16:0016:00 - 00:00

« first day (1045 days earlier)      last day (2977 days later) »