« first day (1518 days earlier)      last day (2505 days later) » 

12:10 AM
this is not codereview. i am not here to rewrite every line of code in the question. if you actually have something constructive to say, i would appreciate it if you said it in a constructive manner. — Nick 49 secs ago
 
12:36 AM
I'm not sure this question is a great fit for SO. You've got a working solution and you're asking for open ended advice. I'd say that will attract the sorts of responses (if any?) that SO tries to avoid. This might be a better fit for CodeReview? — Simon Whitehead 30 secs ago
If you are just asking for a review, you should probably send this to Code Review instead. Your approach seems to work, so there is no concrete problem that we can answer to. — E_net4 1 min ago
 
1:07 AM
0
Q: Is the code quality of the following function good?

itachi_uchihaI was asked to perform addition by using vectors, so I am wondering if the function I coded looks good. If not, how can I improve the quality of my code?. Below, I provided .h and .cpp files. I need feedback on the string constructor and operator+ modules. .h file class ubigint { friend ost...

 
1:42 AM
0
Q: Get the last two digits of a string

viniciussssWhat would be the most performant way to get the last 2 digits of a string? For example: getLastTwoDigits("a1b2cd3e4ghi5jk") must return "45"; I had already asked how to get the first two digits of a string. But now I need a performant way to get the last two digits. I've adapted the answer I ...

 
2:30 AM
possible answer invalidation by Jamal on question by Kevin W.: codereview.stackexchange.com/posts/167002/revisions
 
2:43 AM
0
Q: Overriding equals and hashCode vs providing only Single Instance on immutable Objects

rollbackLet's say we have a class SomeInt which holds just one single final int value: public class SomeInt { private final int value; public SomeInt(int value) { this.value = value; } public int getValue() { return this.value; } } Option A - Overring equa...

0
Q: Detecting UI Thread Hanging and Logging Stacktrace

Brian FlynnI have an application that needs to always be responsive. I've written a class that is designed to monitor the UI thread. The goal is to provide useful information in the logs to be able to understand when the UI thread becomes unresponsive and to determine which code is the cause. To do this I...

 
3:18 AM
0
Q: Update SQLServer mdf file using SQL sentence and update DataGrid

sevenOfNineMy environment: Windows 8.1 Pro (64bit) Microsoft Visual Studio 2017 Community SQLServer LocalDB I am trying to understand how to implement code to handle SQL Server. Following is the content of the implementation. Connect to mdf file by SQL Server LocalDB show Table [Customer] on DataGrid...

 
4:28 AM
-1
Q: Printing a coloured tile to the terminal

CodeYogiAs part of the bigger problem I am trying to print a square tile to the console which can have some colour, intensity and dimension, till now I am able to print only the green tile with different level of intensity possibly 5 because I see there are lot of trouble in doing this to the terminal, t...

 
Monking
 
Monking
 
-1
Q: Calculating the terminal width and height

CodeYogiAs part of the bigger problem I am trying to solve smaller problems first and hence below is the code to find the terminal width and height. Code 'use strict'; class Terminal { width() { return process.stdout.columns || 80 } height() { return process.stdout.rows || 60 } } mod...

 
 
1 hour later…
6:12 AM
If this is working code that you think could be improved, see Code Review. — jonrsharpe 9 secs ago
 
1
Q: Reading values from a file and assigning to another class

thatrockbottomprogrammerI'm assigning values to an object by passing it to another class. Basically, I'm reading values from a file and assigning it by passing it to another class. This is the POJO class for the details in a file. public class FileDetails { String URL; String Port; String UserName; St...

0
Q: My Binary Search Implementation

Rahul ShivsharanI have implemented binary search in JavaScript. I run it on node. I pass an comma separated string of numbers in ascending order as first argument and the number to be searched in the second argument. the code is as follows, var myArray = [], searchNum = undefined; // below function is used...

 
6:56 AM
0
Q: Creating dictionary and find probability for each word to be occured in text

Marishka33I am pretty new in Python and I am not sure if I did everything right in my program. May someone to check it, please. Thank you! First of all, I have a text file, for example, abc.txt. I have to create a dictionary and for this, I have to split the sentences into a list of words and convert each ...

 
Monking
 
7:15 AM
Maybe this is better to ask on codereview.stackexchange.comLudisposed 32 secs ago
 
7:59 AM
Monking
 
8:23 AM
-1
Q: delete line from text file in vb.net

alaai have text file, i want to delete line have some characters are same for example 4336 5666 01 4337 5667 01 4337 5667 02 4338 5668 01 4339 5669 01 4340 5670 01 i want to delete line (4337 5667 01) it ha...

 
@CaptainObvious no code,
 
Monking
 
Kaz
8:36 AM
Monking
 
 
1 hour later…
10:02 AM
0
Q: permutation efficiency

Po Chen LiuI am using the permutations function from itertools to generate all possible permutations from 0 - 9 import itertools permuted = list(itertools.permutations(list(range(0, 10)))) is there any way to make this faster? It's quite slow taking around ~9 seconds. Or is it because I am running this o...

 
11:00 AM
0
Q: Print bounding box in the terminal

CodeYogiRight now I am finding ways to write better code in javascript and I see many coding styles used by different authors but right now I am thinking to write code which adheres to the object oriented paradigm better suited for this type of language. Code // Terminal 'use strict'; class Terminal ...

0
Q: API error handling in Flask

flasker_I am refactoring a Flask application and, more precisely, the error handling. I am wondering if it makes sense to refactor all app.errorhandler() to a generic one. So currently I have passed from this: @app.errorhandler(NotFound): def not_found(e): do stuff() ... @app.errorhandler(BadReq...

 
11:52 AM
If the code is working, please head over to Code Review for such a question. — Andy Turner 11 secs ago
codereview.stackexchange.com is a better place to ask — Jens 15 secs ago
(@Jens hope I'm not telling you something you already know, but [codereview.se] expands as in my comment.) — Andy Turner 15 secs ago
I'm voting to close this question as it belongs on Code ReviewCarlos Heuberger 32 secs ago
 
12:20 PM
0
Q: Unoptized VBA macro

Berend StarkenburgCould you review this code please? Macro Sub Contain_Copy() Dim ranger As Long Dim lastrow As Long Dim FromSheet As Worksheet, ToSheet As Worksheet Set FromSheet = Sheets("C") lastrow = FromSheet.Cells(Rows.Count, "N").En...

0
Q: Code efficiency for large iterations

Po Chen LiuI'm working on problem 46 from project euler: It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a prime and twice a square. 9 = 7 + 2×12 15 = 7 + 2×22 21 = 3 + 2×32 25 = 7 + 2×32 27 = 19 + 2×22 33 = 31 + 2×12 It turns out that the conjecture...

 
Greetings, Programs.
 
0
Q: what is a way to shorten and enhance efficiency of this code

Michal Splinderhere is my code, observe ...what I'm trying is, to shorten this code ...but due to the slight difference in name of the variables, I'm stuck. though the pattern is same. please help me out. isel method takes 5 parameters and returns int val. below in another method, I called this isel function 4...

 
12:37 PM
Today is a fun day: I get to write a PDF up instructing our offsite users how to connect their webcam and link to our Video Conferencing software.
 
12:56 PM
codereview might be a better place for this, if this code works and you just want to improve it — depperm 23 secs ago
 
0
Q: reverse the string and capitalise in java

ashokIf case_option = 1, Reversal of words with retaining position’s Case i.e. If the original sentence is “Wipro TechNologies BangaLore”, the new reversed sentence should be “Orpiw SeigOlonhcet ErolaGnab” Note that positions 1, 7, 11, 20 and 25 in the original string are uppercase W, T and B. Simila...

 
@depperm - I completely understand your thinking, and I am guessing it probably wouldn't be wrong at Code Review; but this may be one of those questions that legitimately is a reasonable fit at multiple sites (such as gamedev, mentioned in the 2048 tag). The case for it being a Stack Overflow question is that maybe the code isn't working, in the sense that it's not behaving as expected. Maybe the algorithm is not implemented correctly, or is misapplied to the problem. — John Y 43 secs ago
If you have already functioning code this would be a better question to post to the Code Review Community. For general tips check out this link. — BerticusMaximus 43 secs ago
 
@CaptainObvious no code no glory
 
1:14 PM
Bruce - I will definitely make a point of putting this into CodeReview and adding some For Loops. Andreas/Aspiring Developer - As YowE3K mentioned, I am running other code in different modules. The code I am running for SpeedUp and SpeedDown are two of these and are only called here. The SpeedUp stops Screen Updating, Events, Calculation, and the Status Bar. Speed Down reactivates this. As for the second comment Andreas, I actually have a question regarding this. Some code runs when criteria are met, but others are called by buttons. Would that change the criteria you mentioned? — Mike Winning 49 secs ago
 
Good morning.
 
0
Q: Taking input from DB using isel function and assigning them to different var to use them but because there is a pattern so i think,It could be shorten

Michal SplinderHere is my code, observe what I'm trying is, to shorten this code, but due to the slight difference in name of the variables, I'm stuck. Though the pattern is same. Please help me out. isel method takes 5 parameters and returns int val. Below in another method, I called this isel function 4 time...

 
1:38 PM
Improving working code should be asked about on CodeReview.SENathanOliver 27 secs ago
 
1
Q: 2048 game - AI can't score more that 256 average

KeeperI'm trying to implement AI for 2048 with MiniMax and Alpha-Beta pruning, based on a snake strategy (see http://www.cs.huji.ac.il/~ai/projects/2014/2048Solver/files/report.pdf paper), which seems to be the best as a single heuristics. Unfortunately, AI makes 256 in most games, what is not much be...

0
Q: Speeding Up My Current Code Inventory Management Planning Screen

Mike WinningI first want to apologize for dumping a lot of code into here, but I have been stuck on this issue for days. I was assigned to build a planning screen wherein I could pull corresponding information regarding Sales, Production, and Inventory. As a preface to all of this, this code works for me and...

 
1:52 PM
Try posting this in Code Review instead of Stackoverflow. — Eric Citaire 1 min ago
 
Josh Heyer on June 30, 2017

Because we believe all traffic on the web should be treated equally, Stack Overflow will join some of your other favorite sites from around the web including Netflix, GitHub, Reddit, and Amazon on July 12 for a day of action supporting net neutrality.

The goal of this day of action, organized by Fight for the Future, is to get regular friendly Internet users like you to submit your comments and concerns to the FCC about their plans to do away with net neutrality. In fact, you can do that right now by using Battle for the Net’s system or filling out a comment on the FCC’s page by clicking “Express.” …

 
2:14 PM
0
Q: Dungeons and Dragons Initiative Tracker

diegoI just started learning JavaScript (and the Knockout framework), and decided to try and make an initiative tracker for Dungeons and Dragons 5th Edition. It is designed to take an arbitrary number of Characters (that can either be added manually or chosen from a list of existing ones) and randomly...

0
Q: vectorize a simple code

user1021Is there a more elegant way to write this simple code ? The aim is to avoid loops. I tried with repmat for indexes but it didnt work for j=1:size(C,1); for k=1:size(C,2) C(j,k)=sum(sum(A([1:j],[1:k]).*B([j:-1:1],[k:-1:1]))); end end P.S: It does the same thing than conv2 which ...

0
Q: Retrieve a number in a webpage and store in a SQLite3 db

ssoflashyI'm beggining Python. So I wrote a program which is supposed to get a number of connected people on a forum (like this one : http://www.jeuxvideo.com/forums/0-51-0-1-0-1-0-blabla-18-25-ans.htm) and store the number with the datetime in a database file (SQLite3). Every forum has his own table name...

 
I have a couple of ideas, but not sure if post them here as the others suggested to move this thread to CodeReview. Are you going to do that? — KjMag just now
 
2:29 PM
0
Q: C++ code that convolves a data file for smoothing random data curves of microcanonical ensemble graphs

Digonto IslamI am new to this, I have a convolution program that takes in a data file, convolves it and outputs another file. I am attaching the code here. #include<bits/stdc++.h> using namespace std void convolute() { ifstream fin; ofstream fout; int count = 0; double a=0,b=0; string ...

 
2:40 PM
Adding on to what @Will has mentioned, consider this community instead: codereview.stackexchange.comumop apisdn 28 secs ago
 
3:32 PM
-1
Q: Complete TicTacToe Game Check out my Code pls

hardCodedHello StackOverflow Community! Im currently working on a TicTacToe game. This is the codepen link: https://codepen.io/vpeitos/pen/gRvqqz this.testEnd = function() { //Checks if the Board is full var isThisTheEnd = true; for(var i = 0; i < 9; i++){ if(game.cells[...

 
3:43 PM
This script is better suited for codereview.SE. — l0b0 20 secs ago
And I agree that Code Review is probably the better forum for this. Over here on SO, we expect a question to be focused immediately and directly on the problem one is asking about, with other code eliminated, and a Minimal, Complete, and Verifiable example provided. — Charles Duffy 15 secs ago
Also, nothing wrong with your answer, but random code review recommendations for the OP that could be added to it if you want. The calls to removeChild have no effect, because they are always followed by insertBefore moves the li node from wherever it was in the DOM and const makes more sense than let for all those variables (and to use as a default whenever possible), let implies that they might be modified later. — Paulpro 31 secs ago
So there is no better way in other languages other than bash grep? I posted it on Codereview. Thanks for the tip. — j smith 20 secs ago
 
Monking
 
4:06 PM
0
Q: Bash grep taking 3 days to finish. Any suggestions to enhance it?

j smithI have a script like this that I would like to seek some suggestions on enhancing it. cd /home/output/ cat R*op.txt > R.total.op.txt awk '{if( (length($8)>9) || ($8 ~ /^AAA/) ) {print $0}}' R.total.op.txt > temp && mv temp R.total.op.txt cat S*op.txt > S.total.op.txt awk '{if( (length($8)>9) ||...

 
@CaptainObvious lol
 
4:36 PM
Most of the time when I read a commit message, it's during code review, before the commit is applied. Hence, imperative tense makes sense. — djsmith 11 secs ago
 
@EBrown What is that?
(monking, btw)
 
@EthanBierlein An answer to this.
Which is phenomenal.
 
Nice.
What's the parallelogram aligned with a triangle for?
 
A thing, kinda secret at the moment.
 
4:55 PM
possible answer invalidation by askhat on question by askhat: codereview.stackexchange.com/posts/166856/revisions
 
@EBrown Ah, I see.
 
@EthanBierlein You'll possibly find out in a few weeks. It's exciting, just can't talk about it yet.
 
I guess I'll just have to wait in suspense :)
 
0
Q: Android Rock Paper Scissors (Interview/Homework problem)

John61590I had to do a code review for interview problem but was rejected saying I wasn't "at their level." I'm not sure why and would like help on this. I didn't create this code, but it was given to me by the interviewer. Note that it never actually reads from http://example.com/randhand of course. The...

 
5:19 PM
-2
Q: write a program manage

shivaji kalbandeWrite a program accept full name and print full last name and print first and middle name in initial letter in caps. Accept full Name: Ranjeet Tanaji Bhosale. OutPut: Bhosale R T

 
@EBrown There are some very talented people on that site
 
@CaptainObvious nukes pls ...
 
@syb0rg Yes there are.
 
5:52 PM
0
Q: Iterative quicksort in Java

coderoddeI have this quicksort implementation that relies on heap memory instead of actual stack. It uses two integer stacks for keeping track what subranges are yet to be sorted. When a partition routine is called, it does its job and returns the index of the correct position of the pivot element. Then i...

 
You could probably get rid of all loops. Use arrays instead, iterating ranges and assigning cell values one by one is quite possibly the single slowest thing you can do with the Excel object model. If your code works as intended, just not efficiently, posting the actual procedure (heck, the entire module!) on Code Review can teach you a trick or two. SO is better suited for specific programming issues / bugs. — Mat's Mug 5 secs ago
 
6:26 PM
0
Q: I finally solved the Birthday Problem using Java

Joseph Kreifels III like to put ideas and mathematics into code whenever I am interested in the subject. Ever since I was introduced to The Birthday Problem I wanted to throw it into a Java program. I started writing the program in several different ways, all of which in the end would return "Infinite" for one of...

 
 
1 hour later…
7:27 PM
Here's a simple "all uniq anagrams" algorithm (it excludes duplicates i.e., it generates only 34650 variants for "mississippi"). Though the time performance for short sequences may be worse than set(itertools.permutations(..)) — J.F. Sebastian 50 secs ago
 
7:40 PM
0
Q: Is it possible to remove this nested iteration?

Bruno CastroI'm working in a project with the following structure. A location can have many timetables with many lessons. I need to perform a job every sunday to create or update the lessons. def perform(*args) locations = Location.all locations.each do |location| timetables = LocationLessonS...

 
8:16 PM
0
Q: Rust Snake Game

Winston Ewertextern crate pancurses; extern crate rand; use rand::Rng; use std::io::Write; #[derive(Copy, Clone, Eq, PartialEq)] struct Position(i32, i32); struct State { player: Position, velocity: Position, size: Position, tail: Vec<Position>, length: usize, apple: Position, } im...

 
8:35 PM
possible answer invalidation by Joseph Kreifels II on question by Joseph Kreifels II: codereview.stackexchange.com/posts/167073/revisions
 
0
Q: Java Input form

JamesI need help doing my assignment I was supposed to write a java program where a user inputs his name, age and gender.I tried this code but it did not output the way I wanted. This is my code: enter code here import java.util.Scanner; enter code herepublic class assignment_1 { public st...

 
9:28 PM
0
Q: An explicit loop that can *almost* be neatly replaced by a fold

CarcigenicateI'm writing a program that uses a Genetic Algorithm to "intelligently brute force" our schedule at work. We typically have issues with creating schedules, so I thought using my new GA library to tackle the problem would be a neat exercise. One of the very first functions I wrote seems overly com...

 
9:56 PM
I feel this question would be better suited to codereview.stackexchange.com. The questions on Stack Overflow are more about finding solutions to things that don't work. — Dawood ibn Kareem 1 min ago
 
10:17 PM
Monking!
 
Happy half past 2017!
 
Holy cow you're right, man time flies!
@CaptainObvious Man my Lisp is rusty lol
Kind of odd to see a loop though, those aren't used very often in Lisp
 
10:53 PM
Pseudocode, though very close to real code:
0
Q: How should i restructure my datatabase scheme?

BernardoI would like some help in improving this database. I find that Adults, Pets, and Children are usually repeating the same schema, but i don't know what to do since they each have their own services, as well as Home having the Situation table. Table Names: ContactInfo, Jobs, Children, Adults, Pet...

 
1
Q: Python Tic Tac Toe Gui and AI

QiriSo, I've tried to write a gui for Tic Tac Toe or noughts and crosses, as well as an AI opponent to play against. This is by far the longest program I've written, having mainly just done bash scripts as part of my job, and occasionally using a few lines of python to do something that is unpleasant...

0
Q: How should i restructure my datatabase scheme?

BernardoI would like some help in improving this database. I find that Adults, Pets, and Children are usually repeating the same schema, but i don't know what to do since they each have their own services, as well as Home having the Situation table. Table Names: ContactInfo, Jobs, Children, Adults, Pet...

 
11:53 PM
“If your code needs comments, consider refactoring it so it doesn’t.” - Kevlin Henney
 

« first day (1518 days earlier)      last day (2505 days later) »