« first day (2048 days earlier)      last day (1961 days later) » 

12:00 AM
RELOAD! There are 5855 unanswered questions (89.7142% answered)
 
and now the bash has started - feel free to bash on this smelly season all you want!
Dec 13 '17 at 0:49, by Donald.McLean
@rolfl Winter is stupid. And it smells.
 
0
Q: Creating Uno with Swift

Marcel BI've starting writing the card game Uno the past couple of days and was wondering if you can review my code please. The initialization is done I think, a couple of game functions already exist, please have look. Please give me feedback concerning, structure, logic, data structures, naming conven...

 
12:19 AM
It's that time of year again! HATS! Now live on Stack Overflow and all the Stack Exchange network sites: https://winterbash2018.stackexchange.com/
 
12:41 AM
Hello code reviewers...
I'm looking at this:
41
A: What would Clippy say?

KazNo code in the question Very easy to test for. If there is not a single formatted full line of code in a question: Code Review questions must include the code to be reviewed in the body of the question.

What'd you think is a good minimum for new users? 1 line of code? Two? Five?
 
1:00 AM
@Shog9 a single line of code will most likely fail the "hypothetical code" reason
five seems much more reasonable
 
1:11 AM
@user4500293: please include @Cris in your comment so that I get notified of it. It makes communication easier. I will write up an answer for you tonight here. Please delete your duplicate question on Code Review, it is not appropriate to double-post, and I think this question fits better here than there. Thanks! — Cris Luengo 41 secs ago
 
0
Q: VSTO add-in for Excel to solve systems of linear equations

IvenBachThis code is part of a VSTO add-in for Excel. As the title states it solves systems of linear equations by allowing the user to select the appropriate ranges. The code works and covers most issues I could think of. The form is displayed by a button click from the ribbon. The selection of ranges i...

 
1:26 AM
didn't quite find all of the colors in the logo, but eh
 
1:48 AM
Uh wrong site, You should go to codereview. — SamzSakerz 9 secs ago
 
0
Q: conversion of temperature in python

jeremywrite a python program that accepts temperature given in any Celsius, Fahrenheit, Kelvin or Rankine scale and convert the temperature to the three other scale

 
2:28 AM
0
Q: Organizing Files by File Type in Python

PythonmasteryinprogressI was wondering if it was possible to complete this task in a different way. I searched up online for this specific problem and came across a solution on https://www.geeksforgeeks.org/junk-file-organizer-python/ . Is there another way to accomplish what he did on the website? I don't really un...

0
Q: Hackerrank solution is too slow, any suggestions for improving the subset copy speed or algorithm in general?

Mark Peter Mc AdamI've spent the best part of a day on this question, it is marked as Expert which is way above my level but I gave it my best attempt. There are about fifteen submission test cases and my solution manages to satisfy the first four. However, from there on in it hits timeouts due to performance issu...

 
3:02 AM
Working code belongs on Code Review. — Mark Tolonen 26 secs ago
 
 
2 hours later…
4:39 AM
@Vogel612 went with three to start; can adjust as-needed
 
4:52 AM
1
Q: Code Review questions must contain code

Shog9As requested by Kaz and approved by the voters here on meta, questions asked on Code Review that do not contain code are now blocked. I've configured this initially as a three-line minimum (or three separate bits of code-formatted text, or any combination of the two). This may be too much; it ma...

4
 
5:09 AM
Monking
 
0
Q: Simple stringifying using << operator

H. JangBackground I wrote my_length class and some code. my_length can be stringified using << operator, and main() tests this. Questions I think operator<< can be refactored. How can I rewrite operator<< of my_length, and make it better code? How can I make rest of code better? Code #include <ve...

 
 
1 hour later…
6:33 AM
0
Q: Find "prime polynomials" for a user's given prime, bounds, and degree

Gizmovery amateur programmer and first-time poster here: The program I wrote asks the user for a prime number, a lower and upper bound, and a degree (all of these are integers). I want to generate a 2D list of polynomials, represented by numbers (see example). Each polynomial \$P(x)\$ satisfies the f...

 
6:44 AM
This belongs on codereview.stackexchange.com. I recommend improving the title as well. — Sebastiaan van den Broek 36 secs ago
 
0
Q: Funcational Programing React

ArasI try to learn to write functional programming code in React. could you check and review my code and say to me is it functional or not? or how can I write it better! Thank you very much oprationButton(val , oprator){ if(oprator === 'min') return this.setState({currentVa...

0
Q: On right click draw triangle to the SVG Map

Sana KhanI have seen below example and using this example i tried creating rectangle but that doesn't work, Please help me solve issue. Actually i have to select one rectangle shape of size and then when i click on SVG map anywhere then rectangle should be created automatically on cursor position of size ...

 
@Feeds broken
 
7:14 AM
@Heslacher you're wearing a hat! I want one too! ;-) I didn't know it's already started
 
;-)
 
7:34 AM
0
Q: On click automatically draw triangle on the SVG Map

Sana KhanI tried an example of drawing circle in SVG map but i want to draw rectangle and i am unable to do it. below is the example var svg = document.getElementById('mysvg'), NS = svg.getAttribute('xmlns'), local = svg.getElementById('local'), coords = document.getElementById('coords'); ...

 
8:15 AM
If you're looking for a review instead of a bugfix, you will probably be better of posting this on codereview since it is off-topic here. — rpm192 11 secs ago
Take a look here jsfiddle.net/205xgz4w for a little code review — Luca Rainone 38 secs ago
 
8:37 AM
@SᴀᴍOnᴇᴌᴀ Hey there - sorry I haven't seen this before, I must have joined all my fav rooms last night. Things could be better honestly, but I'm hoping for better days soon. What about you? :)
 
8:51 AM
Yay, hat! :)
 
9:03 AM
@MathiasEttinger nice one
 
9:25 AM
Neat!
 
This may be more suited to Code Review. — TrebuchetMS 9 secs ago
 
10:06 AM
0
Q: Serial copying from disk images to folder in Bash

logo_writerThis is a Bash script that copies files stored inside disk images to a directory, using a defined structure provided via a JSON file. I've included the external programs it requires and the test I used so that you can test it too. Any comments regarding programming style and improvements are wel...

0
Q: how to group a list by its common propety

NeethuI have a Json which contains details of all countries.first page should shows the available regions list and while clicking a region it shows the list of countries which are on that region. How can i Implement using only one array or list public MainViewModel() { Workitem = ...

 
10:21 AM
Wrong place, please post your question on CodeReviewvishes_shell 29 secs ago
 
10:35 AM
possible answer invalidation by ahmedbhs on question by ahmedbhs: codereview.stackexchange.com/posts/209470/revisions
 
10:52 AM
0
Q: Python: count number of pairs in array(list)

kharandziukA solution for a small algorithmic problem. I believe tests are pretty descriptive: def pairs(n): return n * (n - 1) / 2 def solution(lst): res = 0 stack = lst[0:1] lst = sorted(lst[1:]) while(len(lst)): nxt = lst.pop() if len(stack) and stack[0] == nxt: ...

-1
Q: JavaScript basic dice (help)

SlipsknuteNHey I need a basic solution to this task if anyone can help me by using JavaScript. a. First, the score for each dice is written (i.e., 5th prints) b. Count the number of sexes and store it in a variable. c. Then, the total sum of all points and the number of sexes is written You should use appr...

 
11:35 AM
This question belongs to codereview.stackexchange.comBarr J 6 secs ago
 
0
Q: Monte Carlo Simulation

user186955Problem I need to estimate the volume of a given object using Monte Carlo Integration. I need to perform multiple runs in order to insure a given confidence of four digit. I was wondering if someone could point me in a direction to increase the speed of my code, I apologize in advance I am new t...

 
12:08 PM
Juan M on December 12, 2018

The world is full of interesting yearly traditions.  Take for example the tomato and orange throwing events, the buffet for monkeys,  and the cheese rolling festivities.  With such examples of human creativity, we at Stack Overflow could not pass on this opportunity.  We have created and maintained our own yearly tradition – Winter Bash!

This year we are attempting to knit our users together in our love for hats for the 7th year in a row.  And this year, we’ve even added a way for you to get creative without wasting any real yarn.  Starting now (December 12, 2018) and going through …

0
Q: PyCat: a netcat implementation in Python3.x v2

LudisposedThis is a follow up question from this question Intro netcat is an all-round tool used with many applicable features My last try felt a bit rushed, and should've improved before posting here. But this time, I am happy with the result. CHANGELOG kwargs @use_ssl decorator Multi-Platform (Posi...

 
For code review we can use following codereview.stackexchange.comAyaz Shah just now
 
12:38 PM
0
Q: PDO class ¿wrapper?

A. CedanoI'm writing one custom class for PDO connection. I want these advantages: Protect credentials: user, password ... Facilitate maintenance: facing future password changes for example Facilitate connection: $pdo=new MyPDO(); Provide my class with all the PDO functionalities I write my class as ...

0
Q: Application I made in C# using EF for data access to pull records of people

CMRSo as the title suggests, I am really just looking for feedback/alternatives. This is a practice more than anything. So essentially my goal was at the very top of the application, I have (even though it is not a form or anything) the top of the application, with certain logic that uses the data ...

0
Q: RabbitMQ Class optimization in c #

trafekI have this class: public class Rabbit { public IConnection GetConnection(string hostName, string userName, string password) { ConnectionFactory connectionFactory = new ConnectionFactory(); connectionFactory.HostName = "localhost"; connect...

 
12:54 PM
0
Q: Optimising program with tons of if statements Java

Gameskiller01I have a program that will ask the user to input their grades for 4 different sections of a project, then tell them what their total mark is, what grade they got and how many marks away they were from the next grade. I managed to make a single loop for all inputs rather than having a loop for eac...

 
1:36 PM
This might be a better fit for CodeReviewCD001 12 secs ago
 
2:11 PM
0
Q: pytorch learn looper

Артем ЛянThis code contains some routines for training cnn. Could you please point at any things you find wrong or ugly? Thanks. class Trainer(object): def __init__(self, criterion, metric, optimizer, model_name, model, base_checkpoint_na...

 
Coding style is an opinionated subject, hence off-topic on SO. As you say, this code works. Then it would be better to post it on codereview.stackexchange.com. But be sure to provide enough context. — Georgy 36 secs ago
 
2:29 PM
0
Q: Super slow OCaml code

laurentmeyerI just started Advent of Code 2018. This is exercise 2 of day 1, and I can't understand why my code is so slow (4 minutes 37 seconds, compared to 200ms for a friend who did it in Clojure with the same computer). Basically, it accumulates integers from a provided list of ints, named input. Whenev...

 
2:59 PM
0
Q: Grabbing video path for each video in iOS device's Camera Roll

nocodedI have a function that returns an array of photos and videos from an iOS device's camera roll. The info is returned correctly, however, I'm also needing to return the path to the photo and video which I've been unable to do so far. Here is the code I'm using. The photo and video path code is abo...

 
3:58 PM
This question doesn't really seem to fit the format for this site. That said, the answer posted below could be reformatted into an excellent post for codereview. — p.s.w.g 52 secs ago
 
0
Q: Use of inheritance using two Ruby libraries

Steven AguilarCurrently I'm working on parsing data from a form service into a pdf form. I created 2 classes one inheriting from the other one. However, I see that the classes I created are growing in lines of code and I'm concern that I am concern that these classes become hard to maintain. I would like to...

 
4:14 PM
Hey There
@avazula things are going well despite being slightly under the weather... last night the bike ride home from work was very wet - all 8 km of it... but I'm glad it doesn't cause pain
in a recent turn of events, an OP finally replied to an answer of mine after having been MIA for a couple years (at least on CR)
 
Perhaps I should have put this in the CodeReview StackExchange then. I'm asking in order to get an idea of what potential issues there are (or are not). I couldn't find any discussion of this one way or the other. — Sean Beanland 43 secs ago
 
@SᴀᴍOnᴇᴌᴀ ohhh bonus necromancer points :)
 
4:35 PM
0
Q: Improving a working function that involves a lot of decimal values and simple calculations

Syntax ErrorI've got 17 currency fields on a form and need to do some calculations with their values. I wrote this method some time ago and have come back to try and refactor it to make it more efficient and/or more readable. Could I have some pointers please? Note: The variables appended with d are the dec...

 
@Vogel612 sadly my answers typically don't get that many votes :/ possibly because of lack of views
 
posted on December 12, 2018 by CommitStrip

 
 
@Feeds great timing - it seems like there have been many requests for Teh Codez lately (perhaps as many school terms near completion)
 
5:04 PM
This question could possibly be a good fit for codereviewp.s.w.g 52 secs ago
 
0
Q: Secret Santa : pick a pair

Romain SchmidI recently had to write some code to create a "Christmas Angel" list shuffler. Everyone in my school will have a secret person who makes little gifts, and will make gifts to another one. There is one condition : when you shuffle the list, you must not pick your name, of course. Here is my cod...

 
MOnking
 
ugh... wasted too many hours trying to deal with magically appearing artifacts on the OSGI application's context...
 
5:20 PM
possible answer invalidation by ahmedbhs on question by ahmedbhs: codereview.stackexchange.com/posts/209470/revisions
 
5:37 PM
0
Q: Mouse wheel scrolling for nested scrollable Swing components

Roland IlligBy default, mouse wheel scrolling in Java Swing behaves differently than in web browsers. I tested Google Chrome, Firefox, Internet Explorer and Edge, and they almost behave the same. I prefer this behavior over the default Swing behavior, therefore I implemented it. The basic idea is that ever...

 
@Feeds "sometimes gets stuck" and OP doesn't know why...
 
This might be better asked on codereview.stackexchange.com — Stephen P 43 secs ago
 
6:08 PM
0
Q: VBA, Code to open workbook and copy pages to master workbook is slow

excelguyI have this code which opens 2 worksbooks, copies a sheet and pastes to master workbook. It is currently taking 3 minutes, can this be done quicker? Ie without opening each workbook to copy ? Takes roughly 3 minutes to do. Sub Load() Dim masterWB As Workbook Dim dailyWB As Workbook Dim lastwe...

0
Q: End characters from string being cut off when decrypting (Python)

ConAar2Making a program that encrypts a txt file of the users choice and then saving the encrypted version as a separate file. It should also be able to decrypt the a file if the correct 8 character key is entered. The problem I'm having is that when decrypting the file characters from the end of the fi...

 
@Duga ugh tough call... I don't think the answer was invalidated so I didn't roll back but left a comment... if somebody thinks it should be rolled back then feel free
 
6:29 PM
@Duga @SᴀᴍOnᴇᴌᴀ Rolled back to Rev 5.
 
@Mast affirmed
 
0
Q: Command line test runner

User319This is a simple program to run a command-line program with given parameters and verify that it writes the expected output to stdout or stderr. The specification file is passed as the first argument. It's formatted like this: echo foo -> foo man -> What manual page do you want? with program an...

 
6:54 PM
0
Q: Blackjack Code Needs Betting System

YuriMy coding teacher gave us this code and told us to add a betting system. specifically: "Add a betting system. The user should start out with $200 and be able to bet any amount as long as they have money to bet. EX: You have $200 Place your bet: $50 ...after a few hands ...

 
7:10 PM
0
Q: Find the length of the good substring that has the minimum importance

Mathejunior Define a good substring as a substring which begins with 'x', ends with 'z' and has a length divisible by 3. Define the importance of a string as the number of good substrings it intersects with (excluding itself, if it is itself good). Consider a string of length N (1≤N≤10^5) which is...

 
@Feeds sigh...
@Feeds fling it!
 
@Bardicer As this is example code, it's off-topic on CR. Please see codereview.meta.stackexchange.com/questions/5777/…. — Zeta 13 secs ago
 
@SᴀᴍOnᴇᴌᴀ Edited my comment to include the link to the question on hold.
 
7:19 PM
@Zeta okay I removed mine
you refer to edits as ninja edits?
 
I sometimes refer to the edits in the first 5 minutes after a post has been published as "ninja edits", because they don't show up in the revision history.
I think the term originated on Reddit.
Although it doesn't make sense for SE comments.
 
Can 10k users see the revision history for comments?
 
You mean with 10k mod tools? No. Hence "it doesn't make sense for SE comments".
 
1
Q: Python unit tests for a sorting algorithm

XaoliNewI am pretty new in Python nor programming. I wrote unittest for project with sorting algorithm, data_strutcure and some mathematician problem to better know this structures and mechanism. I would like to now how can i make unitests writing easier and more readable but i want to stay with classes ...

 
7:27 PM
Huh. Interesting. I was looking for an old SO answer two days ago, and just realized that the question got deleted in February.
The 390 reputation I got from my answer weren't removed, though. Does anyone know when the deletion of an answer won't result in a reputation loss?
 
7:39 PM
@SᴀᴍOnᴇᴌᴀ I don't think there is a revision history for comments...
@Zeta 60 days since rep was awarded
 
Thanks.
 
This would do much better on the code review stack exchange, codereview.stackexchange.comJosh Eller 33 secs ago
 
7:56 PM
0
Q: Hangman game in C. Choosing a random word from a file

user187002(hangman.c) Write a program for user to play the simplified version of hangman game. First read words from a file, Then randomly choose a word from the word list. Then give user 10 chances to guess what word it is. First display how many chances the user has and previous wrong guesses separated ...

 
8:11 PM
So... What's the question? If this is about code review etc as you mention on the bottom, wrong place to ask. — penleychan just now
 
0
Q: Custom implementation of python queue to use dict instead of dqueue

Ron SerruyaA bit of context: I have 100 addresses that can send transactions to a blockchain, and I have a web app that works like this: Get request and handle it in a thread Get a free address from the queue Send a transaction Return address to the queue It's important to know that one address cannot s...

0
Q: Python and SQL - Query takes too long to execute

Helena MartinsI've recently began to work with Database queries when I was asked to develop a program that would have read data from the last 1 month in a Firebird DB with almost 100M rows. After stumbling a little bit, I finally managed to make the code work, using Python (and, more specifically, Pandas lib...

 
Hey, @penleychan I cant have a code review here ? The question is how I can fix that page refresh ? — Ahmed bhs 12 secs ago
 
8:27 PM
0
Q: Simple Python 3 TicTacToe Game

DanwooRelatively new here so please let me know if I'm doing something wrong. I'm mostly wondering if there's any additional way I can make this code more efficient. Specifically the moveset and win condition part of the code feels unnecessarily long or overcomplicated. Still a beginner in python, so...

 
8:42 PM
0
Q: super(type, obj): obj must be an instance or subtype of type

gallIm trying to run a short climate model in Python, but get the error: TypeError: super(type, obj): obj must be an instance or subtype of type. can somebody advise please? # Import libraries import netCDF4 as nc import numpy as np import matplotlib.pyplot as plt # import the coordinate reference ...

 
8:58 PM
0
Q: Better way calculate percentage from class properties using LINQ

IgorWe have the following definição LINQ: myList.Select(s=> new DtoTest(){ TotalSamples = myList.Count(c=> c.UserId == s.UserId), EvaluatedSamples = myList.Count(c=> c.UserId == s.UserId && c.Status == Status.OK) PercentageRealized = (myList.Count(c=> c.UserId == s.UserId) / myList.Count(c=

 
9:13 PM
-1
Q: pyspark equivalent of tpc-h query in scala

Good ReadsI want to convert this scala query to ispark query and don't know how to do that: package main.scala import org.apache.spark.SparkContext import org.apache.spark.sql.DataFrame import org.apache.spark.sql.functions.count import org.apache.spark.sql.functions.sum import or...

 
9:28 PM
0
Q: Find the size of string with minimal importance

Mathejunior A good substring is a substring which begins with 'x', ends with 'z' and has a length divisible by 3. Define the importance of a string as the number of good substrings it intersects with (excluding itself, if it is itself good). Consider a string of length N (1≤N≤10^5) which is composed of x,...

 
SO is not for code review. consider codereview.stackexchange.comSimonare 1 min ago
 
@SᴀᴍOnᴇᴌᴀ double face-palm
 
9:59 PM
0
Q: Quickly check whether file name is in column in Sql Table and move to new folder

Scott CranerI have a table that in one of the columns exists a list of file names. The names comes from other tables and the files in a folder. Not all the files are used, may be attached to parcels that no longer are active. My list is of only the active parcels. After creating the table I want to go th...

0
Q: Multiple Variable-length arguments

user31953Is there a way to define a function with multiple variable length arguments. For example def param(*func,*args): return([func(arg) for arg in args] for func in funcs])

 
@VictorM Of course you can create the tree like that. It depends on what you're doing with that later on. I have edited the answer to provide a link to codereview.stackexchange.com However, your code should already be working when you're posting there. Did my answer solve the current problem? Let me know, if you have questions about my code. :-) — Jayjayyy 35 secs ago
 
10:30 PM
0
Q: OpenGL Simple Texture Loading Acts Weird

babaliarisI'm currently learning OpenGL and I just encountered a weird behaviour. I was trying to render a 2D rectangular image which I manually created using Windows 10 paint. The result of the rendering was this (the border of the image is white and the content is just a black rectangle): While the ac...

 
11:16 PM
0
Q: Flower Shop with Classes python 3.7

skyn37This is my first attempt to write a program using OOP with python. Would like to know some general guidelines and feedback in order to get better at it. """Flower Shop Ordering To Go - Create a flower shop application which deals in flower objects and use those flower objects in a bouquet objec...

 
11:47 PM
1
Q: Block same instance of a program for running again

Michael B.I am implementing a library (Linux) and I created some functions to block new instances of a running program and I was wonder if there are some better improvements for it. Here is a program which describes what I am trying: #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <stri...

 

« first day (2048 days earlier)      last day (1961 days later) »