« first day (1507 days earlier)      last day (2805 days later) » 

00:00
RELOAD! There are 4017 unanswered questions (91.0616% answered)
00:17
This is one of the rare times where I'd say, if you're looking for a code review, then Code Review would be able to help you better. Be sure to post your code directly in the question and not as a GitHub link. — Makoto 48 secs ago
I think directly sending to Code Review is a shame on us in the current state of this question. Please ensure you read the tour: codereview.stackexchange.com/tour. Ensure you know what is on topic. How to properly formulate your question there. I'm almost positive that the current state of your code, with the length and lack of explanation of what it even does is not going to be taken kindly. — idjaw 40 secs ago
@MoeA No. This is a poor question for codereview.stackexchange.com in its current state. Please don't recommend posting it their. If the OP wants a code review, he/she needs to do a few things to "clean-up" their post. OP, see here for more details. — Christian Dean 10 secs ago
00:42
0
Q: Check if a string is palindrome or two strings are the opposite of each other

Tommaso Thea CioniI made a function which checks if a word is the opposite of each other (ex: word and drow) and then realized that with minor changes it could also be used to detect if a word is palindrome. They both return bools, false means they aren't opposite/it isn't palindrome, true means they are/it is. Fi...

01:14
0
Q: game draughts/checkers

HelpMePlsI'm writing checkers in kt, but I can not start the program, because errors are output. Please tell me how to fix it. The remaining code will be discarded in the comments. My English is ugly, I know. main.cpp #include "mainwindow.h" #include <QApplication> int main(int argc, char *argv[]) { QAp...

02:29
21
Q: Font where O is very distinct from zero

ScribblemacherI'm working on a project that has a a convoluted acronym with an O in it. In addition to being difficult to remember, it's very easy to mistake the O for a zero since it's not a word and it already has a number in it. (Example: F4TYO -- a reader who has never encountered this and doesn't know wha...

Try thinking about the other side of the problem--a non-obvious O and a hard-to-remember name. Maybe you should change the name? gasp
Cool cool, i'll give them a crack. Meanwhile found a few 'errors' i think I can fix first before trying code review. — ABowering 15 secs ago
02:53
-1
Q: Making another method similar to this one java

steveI am trying to find the number of times a character appears in a .txt file so I created a method that can solve for that. But it only solves for one letter that I input. I figure if I can make the same method with another letter than I could get it to give me another output. I need three outputs....

03:15
I'm voting to close this question as off-topic because question about review code should on codereview.stackexchange.com. — Stargateur 43 secs ago
04:11
1
Q: How can I make the searchWord function simpler?

welpI wanted to ask whether there is any redundant code or if there was a simpler approach I could have take? The searchWord function needs to be able to traverse the tree and test if a word is there, which it does, but I wanted some opinions on if this is a more complex way of implementing such a f...

04:57
0
Q: DataTable runtime grouping on user defined criteria

t3chb0tI one of my tools I use the user can define grouping for a DataTable. The criteria are known only at run-time. To achieve this I use a Dictionary<string, object> with a custom dictionary comparer that the GroupBy extension cosumes so that I can aggregate the groups. This works pretty well but I w...

05:34
0
Q: Is one code more efficient than the other?

UgnesI am practising my coding skills on interviewbit. I got one question about preorder (or tree). This is what I did first: public class Solution { private ArrayList<Integer> result = new ArrayList<Integer>(); public ArrayList<Integer> preorderTraversal(TreeNode a) { if(a == null){ ...

05:53
Monking
06:27
I'm voting to close this question as off-topic because this question belongs on codereview.stackexchange.comNightOwl888 7 secs ago
06:41
0
Q: C++ Speeding up my code for object recognition

kimchiboy03I am working on a multi-object recognition program. I have succeeded recognising two objects. However, the speed of my program is really slow and laggy. Can somebody please tell a way to speed the program up? So far, I have seen that ORB is quite fast at matching features. However, my program is...

06:54
0
Q: Create new DataFrame containing mean information

Seanny123I have a dataframe with the columns "Action", "Filt" and "Val" which measure the resulting error of filtering an action. I want to calculate the mean of the error for each "Action" and "Filt". Currently, I do this by iterating through each combination of "Action" and "Filt". However, I'm afraid t...

07:15
possible answer invalidation by 200_success on question by Ugnes: codereview.stackexchange.com/posts/166138/revisions
1
Q: Python script to take a break

Here_2_learnThe idea may sound stupid, but this is what I got to know that you should take a break at regular intervals to not to strain your eyes. So the idea is to take break of 2 minutes for every 20 minutes of work and a break of 10 minutes for every one hour. People when working sometimes works continu...

0
Q: Adding multiple datasets to single table

SidI have a table1 in DB1 which is similar to the following +----+------+----------+--------+----------+----------+-------------+---------+--------+----------+----------+---------+---------+--------+----------+----------+---------------+---------+--------+----------+----------+--------+ | id | name...

07:51
This is not the f****g code review service. Read What topics can I ask about here? carefully. — danihp 17 secs ago
08:02
Monking
Kaz
Kaz
08:44
Monking
wow ... I think someone is trying to dict-attack a server I'm administrating ...
"Blocked Authentication Attempt" in the logs since yesterday 5 AM through to now with seconds in between timestamps ...
09:18
0
Q: Using generic types in repository

GamaboyIs there a problem with specifying return type of repository methods. Isn't this bounding repository to specific return type? Isn't better idea to create middle layer like for example AccountManager that transfer database object to specific application object, which in this case is TUser : IUser?...

09:54
And, I must add, this question is better to be asked on codereview.stackexchange.comkelin 49 secs ago
-1
Q: checking if list is empty or not in foreach loop java using ternary operator

Laxman ChariWhich of the below code is good practice. I am refactoring some existing code for reducing Cyclomatic and Cognitive Complexity. for (String item : (CollectionUtils.isNotEmpty(list) ? list : new ArrayList<String>())) { //code } VS if(CollectionUtils.isNotEmpty(list)){ for (String ite...

10:31
-1
Q: I am trying a code of INDIAHACK 2017 , i have written a programme but i dont know why i am experiencing a run time error someone please

Piyushhttps://www.hackerearth.com/challenge/competitive/programming-indiahacks-2017/algorithm/hacker-with-prime-bebe28ac/ /* //input taken while(t--){ int num; int count=0; cin>>num; int k=0; for(int i=0;i<20;i++){ b[i]=0; } while(num%2==0){ b[k]=2...

10:52
Please do not edit an answer into a question. If you found a solution yourself: post it as an answer of your own. If you're looking to improve your code: post a question on Code Review. — Ansgar Wiechers 49 secs ago
11:19
0
Q: sum and stock size concurrent code using Executor

bhadramThe code should parse the input values and calculate the sum and size of particular stocks, using Executor thread pool by dynamically adding the thread count. Please review the following below code for calculating the sum of stocks and display the size of the stocks. I'm not allowed to change t...

12:03
Greetings, Programs.
0
Q: My live monitoring web app (Flask, guicorne, heroku, and redis) is spamming the source website

LoerztAs a student, I am working on a project where I need to forward data from an already existing website to a new one, with the data presented in a different manner. In order to do so with my mediocre skill, I learned from the various web ressource available and developed a first version. But, upo...

1
Q: Split mp3 of album into individual tracks

EdwardRecently, I've been transferring some of my old vinyl records to MP3 files. One of the things I did to make some progress was to automate things, so I initially set things up so that it would record each album to a single MP3 file. Now I've gotten to the step where I want to separate those out ...

Greetings user
possible answer invalidation by Peter Wilson on question by Peter Wilson: codereview.stackexchange.com/posts/165839/revisions
@Duga rolled back
possible answer invalidation by Pranav on question by Pranav: codereview.stackexchange.com/posts/165926/revisions
12:18
@Duga allready rolled back
@Duga Rolled back, it was the first bit of the answer, -.-
12:29
I'm voting to close this question as off-topic because it would be better suited for codereview.stackexchange.com — Nkosi 10 secs ago
13:02
My apologies I will use codereview.. Thanks for all your input! — substancev 29 secs ago
13:25
0
Q: Purely functional minecraft-like mesh compiler

PhoenixI'm creating a minecraft clone (for practice), in scala, using largely functional programming. When a chunk doesn't have a mesh loaded into VRAM, it create a Future for the vertex and index arrays, and gives it to a low priority ExecutionContext (so as not to freeze the main game loop). The rende...

13:58
0
Q: Convert an array to a nested object

Ataomega var a = ["a", "b", "c", "d"] var res = {} var value = "Hello" for(var i=a.length; i > 0; i-- ){ var item = a[i-1] var temp = {} temp[item] = i == a.length ? value : {} if(i != a.length){ Object.keys(res).forEach(r => { temp[item][r] = res[r] }) } res = temp } consol...

14:11
1
Q: VB: Abelian sandpile

G. ÜntherI am trying to programm the Abelian sandpile model in VisualBasic. However, with large amounts of sand the calculation takes a very long time, and I wonder: Is there a possibility of speeding the code up? To be fair, I am mostly self-taught in VB, so my code is likely to be ugly. I'd be happy ...

@CaptainObvious @Edward Are you aware of ffmpeg's silence detector? I don't know how well it works with vinyl, though, considering the crackling noises.
If the code works shouldn't this be used to CodeReview? — Darren Bartrup-Cook 8 secs ago
14:33
0
Q: Speed up performance of nested for loops

thumbtackthiefThis works but is very slow. I have an Author table that foreign keys to all books by that author. Each book has a variety of formats it can appear in (html, pdf, etc), which its linked to by its own foreign key. As the code shows, what I'm doing now is getting all the authors, then looping th...

0
Q: Optimize platform independent GetTickCount()

dgratI used this method as a platform independent tick counter. Unfortunately, it consumes ~10 % cpu time in one of my methods. Is there a fast way to solve the issue? inline uint32_t GetTickCount() { using namespace std::chrono; return duration_cast<milliseconds>(steady_clock::now().time_sin...

0
Q: PHP Cache weather in a file

honeyspoonI'm using the darksky api to get weather data for a display board website. The free version is limited to 1000 api calls per month. I have a lot of devices (iPads) diplaying this information in the building and refreshing every minute or so to update weather and the message of the hour I think th...

0
Q: C++ Linux TCP client/server socket wrapper

dvs23I am relatively new to socket programming, so I would like to ask if there is anything wrong with my code :) For the server socket I included the great new C++ lambdas, so you can start an initialized server using: server.run([&](serverSock * serv) {...} Moreover most things run in a new threa...

0
Q: Slow Django view

thumbtackthiefThis code works but is very slow. I am scraping a website for urls for various books, and then checking to see if we have complete records of those books in our database. After I process the URL to get the book info, I see if we have it in our database. If we don't, I move on, that's fine. If...

15:04
Killed a zombie.
possible answer invalidation by alecxe on question by dvs23: codereview.stackexchange.com/posts/166167/revisions
Greetings everyone.
I hope this question belongs to codereview.stackexchange.commanian 17 secs ago
0
Q: iOS - Populate TableView with JSON data

user7802048I basically want to display JSON -data in a TableView. The TableView always displays a List object I came up with. The data structure looks like this: @interface List () @property (strong, nonatomic) NSString *name; @property (strong, nonatomic) NSArray *entries; @property (nonatomic) BOOL recu...

15:33
@Legato Monking.
15:45
You did not change them correctly. Why are you doung this anyway? Copying and pasting code is not solid software engineering and you would be laughed out of any code review for doing this. At any rate, this question is a moving target, it lacks a Minimal, Complete, and Verifiable example and I'm voting to close it. — n.m. 55 secs ago
posted on June 19, 2017 by CommitStrip

2
Monking
16:18
0
Q: Laravel - super long relation, it doesn't feel right

Luuk WuijsterOkay, This is my method: public function edit(Request $request, $ent, $room, $obj) { $input = $request->except(['_token']); Enterprise::where('bedrijfsnaam', $ent)->first()->rooms()->where('name', $room)->first()->objects()->where('name', $obj)->first()->update($input); return redi...

for reference, here's an old question I asked about the project I'm working in, I'm posting only the RegistroCL class, I want to make each Registry own the Properties for it's own creation so that I only have to worry about reading lines and notifying listeners and the'll decide if the line belongs to them and create an instance of the Registry or not: codereview.stackexchange.com/questions/142514/…Anubis Lockward 27 secs ago
16:32
1
Q: My game of life implementation

René GI'm looking for comments on both the micro (individual lines of code) and macro (overall design) scale. My input/output format is a single string, with newlines delimiting rows and '*'/' ' denoting alive and dead, respectively. from itertools import product from enum import Enum class Direction(...

0
Q: My Linked List with abstract class and interfaces - but some doubts

Subodh JainSo I am learning Java and this source code is from Tim Buchalka's java course. ListItem Class package com.timbuchalka; /** * Created by dev on 11/10/2015. */ public abstract class ListItem { protected ListItem rightLink = null; protected ListItem leftLink = null; protected O...

0
Q: Generic A*-Alogrithm without clone

Max BensonI wrote a generic implementation of A* with the focus of not having to clone nodes or actions. Thanks to some very good advice I received on stackoverflow I have arrived at the following final result: lib.rs: extern crate typed_arena; use std::cmp::Ordering; use std::collections::{BinaryHeap, ...

16:58
0
Q: Foreach vs Iterator

Emre AktürkI have implemented a trim method which removes objects having empty properties. This list has average size of 3 or so. Probably, the max length is 7 or 8. I wonder which of these implementations is faster: Implementation 1 private void trim() { Iterator<Child> iterator = mList.iter...

0
Q: How do I make this PHP SQL Injection Proof?

user141593 <?php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; $mysqli = new mysqli($servername, $username, $password, $dbname); if ($mysqli->connect_error) { die("Connection failed: " . $mysqli->connect_error); } $earnedpoints = false; $accoun...

17:12
-1
Q: Code check for website

kai.kyleHi I am a web development student. I got the chance to work with a friend as freelance. he told me to try to develop a website like this w3schools so that he will be able to check my skills. When I submitted part of it my friend told me it was not good without further explanation. I need someone ...

1
Q: Extension method replacing elements from an IEnumerable<T> collection follow up

DenisI got some amazing feedback on my previous question and I decided to extend this method and add it to my own library where every now and than I will add some methods I feel can be useful in the future. There are currently 8 overloads with only 4 unique because there is a separate overload for ea...

java I hate you ....
why isn't every Closeable an AutoCloseable? that's stupid
Java
17:33
also why does everyone seem fully incapable of actually conforming to the JSON standards???
numbers are to be quoted. just like field names, ...
oh and booleans as well ...
it's all a String anyways, and it's only used in Javascript, right??
@DanLyons sorry, I'm missing the irony and the rant tag there...
but hey, at least I can ask the endpoint to return JSON instead of XML...
but not on POST requests, for reasons unknown
Well at least I got some documentation ... A powerpoint with the amazing number of five slides...
17:56
@Vogel612 We get documentation at work (from a multi-million dollar company!) that is a whopping .txt file the guy wrote in Notepad specifically for us.
@CaptainObvious Thanks for Rev 4. That finally gives me a reason to close the question.
0
Q: Mass Queryer Works Around Database Expression Limits

puzzlepiece87With thanks to @BrandonBarney for his encouragement, here is a program I wrote to automate massive data pulls for my team. Warning: I included all the methods in case anyone wanted to see all of them, but I strongly recommend skimming or just looking at a few. This program: Breaks large lists...

Kaz
Kaz
18:23
It's 30 degrees in the UK today. I am literally melting.
Literally?
Kaz
Kaz
@200_success That's what it feels like.
@Kaz Yeah it's too hot, luckily the office had AC
Just a note.CodeReview is for reviewing large amounts of code,but stack is for regular questions.It would be nice if you shrink your question ,and write it in a more clear way :D — Arslan.H 35 secs ago
18:43
This would if at all, only suited for codereview.stackexchange.com , BUT even there, you'd have to post your code: codereview.meta.stackexchange.com/questions/1308/…Marco13 just now
18:58
May be this question should have gone to Code Review section. — illusionist 15 secs ago
@Arslan.H No. Code length is not the relevant factor for deciding whether a question belongs on Stack Overflow or Code Review. Rather, the issue is whether there is a specific issue to be solved (in which case the question belongs on Stack Overflow) or you are looking for non-specific improvements to working code (Code Review). Please read A guide to Code Review for Stack Overflow users. — 200_success 32 secs ago
19:17
0
Q: Python Script: Converts .tsv to TFRecord

prijateljThe python code below converts a tab spaced values file (.tsv) into a TFRecord in hopes that this approach expedites future time spent loading the data. Is the performance of this task correct and optimal, specifically in terms of run-time? The .tsv file is of the following format, including spa...

0
Q: Refactor and simplify redundant jQuery

That Brazilian GuyI need to run the following checks in two occasions: When a certain modal is first shown or clicked, When one of two inputs is filled. How can I remove redundancy in the following code? jQuery(document).ready( function($) { $(document.body).on( 'DOMNodeInserted click', '.media-modal', f...

Also related:
11
A: Closeable to AutoCloseable converter utility for 3rd party java libs

Simon ForsbergI'll try to say this the best way I can... Completely useless unnecessary! Sorry. I couldn't find any better way to say it. The code that you have is well-written, but it is not necessary in the first place. The reason is that the interface Closeable already lists AutoCloseable as a "superinte...

19:31
0
Q: Prim's Lazy Minimum Spanning Tree Algorithm in Haskell (Project Euler# 107)

RE60KI have implemented Lazy version of Prim's Minimum Spanning Tree Algorithm. I want to improve the code structure, follow prevalent conventions and reduce code size. I am solving Project Euler #107. Explanation: I do as follows for MST: Initialize an adjacency list, visited set with vertice #...

0
Q: First time doing TDD with a BDD aproach using xUnit

LoRdPMNI already changed my mind towards the SOLID principles, and am applying them in everything that I create. Now I am reading a lot of articles about TDD and BDD, aiming to begin applying those concepts in new projects. I decided to use xUnit and Moq as my helpers, because of simplicity and LINQ to...

19:50
I wish I could've thought about this kind of title before
Match your deadline and immediately after post this code on Code Review! 😊 — Adriano Repetti 6 secs ago
@Duga Oh God, please no emojis!
I'm voting to close this question as off-topic because questions asking for comments on complete, working code are more appropriate for CodeReview.stackexchange.com. You should also put the code in the question as text, not an image. — Barmar 5 secs ago
Several things wrong with this question. First, post the actual code, not a screenshot. Second, Stack Overflow is meant to help you fix broken code. Working code that you want to talk about effeciency, etc., you should take it over to codereview.stackexchange.com. Check out stackoverflow.com/help/how-to-asksamanime 51 secs ago
20:09
1
Q: Imitate Qt Quick's QQuickFramebufferObject, but do the syncing more tidily (with covariance)

Stefan MonovI'm making a system similar to Qt Quick with its scenegraph. Since it's embedded within Qt Quick with its threading system, the items' Renderers should sync some data from their "parent" items at opportune moments, so this data can be used in the rendering thread, while the GUI thread mutates the...

The first part of this question is a better fit for Code Review SE. — Majora320 27 secs ago
20:23
@Duga @SimonForsberg Look! She ha full Unicode support! :D
These sorts of questions are a better fit on the Code Review site. — tadman 57 secs ago
I would say that this is somewhat beyond the scope of SO, since it seems like you have made an attempt at that. Perhaps you should post what you've attempted over at Code Review, and see if anyone comes up with a better way to optimise your approach. — Terry 30 secs ago
contains(container) isn't that difficult to write: codereview.stackexchange.com/questions/59997/…Deduplicator 16 secs ago
20:41
0
Q: Implementaion of undoable arrange (SendToBack, SendBackward, ...) operations

JanDotNetI am developing a WPF designer where visual elements (rectangles, ellipses, ...) can be inserted, moved, resized and so on. Similar to a simple PowerPoint control. All the actions should be undo-able, so all modifications to the drawing area's state are implemented as Operations. An operation lo...

20:55
0
Q: Is this an efficient implementation of the Roman Numeral Converter?

user141605Is this an efficient way to implement the Roman Numeral Converter ? So first, I put all the digits of the parameter number into an array. Then I loop through this array, and multiply a 10 power based number to the current digit. I use the resulted number in multiple statements, to compare it w...

@EBrown Wtf, that's a unicode?
@SimonForsberg Yeah.
21:35
If the code works, post it on Code Review. If it doesn't work, tell us what it's supposed to be doing and what it's actually doing. Either way, change your title to something that will actually tell us what your code is about. — SomethingDark 37 secs ago
22:06
Off topic here. Try codereview.stackexchange.com. — Dawood ibn Kareem 57 secs ago
1
Q: Efficient Hangman algorithm

FangI'm trying to find the most efficient algorithm for solving Hangman. For those who are not familiar, it's a game where people need to guess the correct letters in a word. I've written the following function: string solveWord='Hangman'; string guessWord='-------'; char letter = 'l'; int index; ...

22:25
possible answer invalidation by Fang on question by Fang: codereview.stackexchange.com/posts/166206/revisions
22:54
0
Q: Java/Swing: Tic Tac Toe - Any way to clean up the code?

LifeMushroomThis is a Tic Tac Toe game I wrote in Java (Swing). It fully works when detecting the winner or a tie. I'm wondering if there's any way I can improve it or clean it up. I'm trying to achieve a 3 by 3 simple Tic Tac Toe game. The first player is X and the second player is O. My X and O buttons ...

23:39
0
Q: Custom function don't read vectors

Guilherme MaiaI have this custom function to show the combinations: x<-function(a,b){ ncol(combn(a,b)) } combinations<-numeric() for(i in 0:12){ combinations<-c(combinations,x(12,i)) } combinations It works, but I want to know if it's possible to do something simpler, like this: x<-function(a,b)...


« first day (1507 days earlier)      last day (2805 days later) »