« first day (2306 days earlier)      last day (1719 days later) » 

12:00 AM
RELOAD! There are 6215 unanswered questions (89.9148% answered)
 
 
3 hours later…
3:19 AM
0
Q: Is this a step towards creating a web API?

MithrandirThis is the simple backend, albeit crude, that I made for a React Native mobile app project as a proof of concept. It's a basic CRUD for tracking supply inventory. The "shopping list" is items with a Buy qty > 0. selectData() is a wrapper for a SELECT query using prepared statements: Signature...

 
3:38 AM
0
Q: Script to check available name in Github

chau giangI just wrote this script to check if the name (2 characters) in Github is available or not so I can accompany this name. Here is my script: #!/bin/bash for i in {a..z} do for j in {a..z} do out=$(curl -s -o /dev/null -w "%{http_code}" "https://github.com/$i$j") if [[ $out =~ .*4.* ...

 
3:58 AM
1
Q: Counting the number of possible triangles: how to optimize?

BlueProblem Statement: Given an unsorted array of positive integers. Find the number of triangles that can be formed with three different array elements as lengths of three sides of triangles. Input: The first line of the input contains T denoting the number of testcases. First line of...

 
4:41 AM
@Peilonrayz I didn't, thank you.
 
4:55 AM
possible answer invalidation by L. F. on question by Blue: codereview.stackexchange.com/posts/226885/revisions
 
@Duga Fine
 
0
Q: Import Specific Spreadsheet into the Database

WeeHongThis is the first project I have coded using Python. Therefore, I am looking for someone to give me some comments to further improve my code. Any constructive criticism is welcome. I am appreciated for your time and effort to read through the code. Purpose of the application This application...

 
 
2 hours later…
7:16 AM
1
Q: Flattening the nested Objects

DinoThe original idea behind the problem is that the API I'm working with returns one type of a response for GET, and requires another type to do POST / PUT. The object I'm receiving from the GET has a format like this: const rawObject = { data1: { id: 1, value: 444 }, data2: null } ...

 
7:35 AM
0
Q: first to fourth layers of storyline from text adventure

Mikey AkamiheLayers 1-4 of the text and storyline section of the much-improved sequel to my first text adventure. It's three times as long but three times more efficient. The setting takes place where a majority of Telltale's TWD: A New Frontier takes place. introduction = '''08 MARCH 2035. It has been years...

 
8:07 AM
I'm voting to close this question as off-topic because this question belongs on another site in the Stack Exchange network codereview.stackexchange.com as it seeks to find the best ways of writing code — chridam 22 secs ago
 
0
Q: Two dimensional arrays with nulls

SandraI'm new with Kotlin, and this is my first attempt of a two dimensional array. // private var roomGrid = arrayOfNulls<arrayOfNulls<Room>>(4) private var roomGrid = Array(roomCountX) {arrayOfNulls<Room>(roomCountY)} init { for (gridY in 0 until roomCountY) { for (gridX in 0 until ro...

 
8:25 AM
possible answer invalidation by Toby Speight on question by D. Ben Knoble: codereview.stackexchange.com/posts/226848/revisions
 
-1
Q: Multiple Text Search in one column from list

INAMDARNeed to search multiple text in Description column from List column (which will be in different Sheet later) if Found the exact Item from List in Description column it will be return in Result column with comma after each item. Please note that from this code there is a problem - see in Descrip...

 
 
1 hour later…
9:47 AM
@Duga It's just formatting, relax
 
0
Q: "Tic Tac Toe" Game in Python

Omri Shneorim relatively new in python, Heres a Tic Tac Toe game Ive created in python: def is_valid_move(x,y,board): return ((0 <= x <= 2) and (0 <= y <= 2)) and (board[x][y] == '_') def check_win(board): if board[0][0] == board[0][1] == board[0][2] != '_': return True if board[1][0] ...

 
10:08 AM
0
Q: Advice without knowledge of specific langage

NomisI'm here for a little more than one year now but still very new to the how-to of the place, and a recent comment in this post made me think that maybe I was overstepping my boundaries. I'm not well versed in that many langages but I have lot of experience programming (i'm a senior dev) and algor...

 
@Feeds wrote an answer.
 
possible answer invalidation by Peter Taylor on question by Shadab Hussain: codereview.stackexchange.com/posts/226789/revisions
 
10:28 AM
@Duga It's just some formatting of the testcases, no worries
 
Kaz
Monking @all
Unsurprisingly, the first Data Analyst candidate from the Indian outsourcing firm failed to make any progress in the 2 hours they had to analyse the data-file-from-hell.
There's 3 more to come this week.
Hopefully they all fail convincingly, and I can finally persuade work that, seeing as a "Senior" Indian analyst already costs 2/3 of what it would cost to hire a junior analyst for me to manage, they should just hire someone locally.
Which is only what I've been telling them I need for 2 years straight now.
@DerKommissar 3 now ^^
I might even answer a VBA question next
 
You provided no code to help you with. But anyway, this question is more appropriate for CodeReview. — dymanoid 12 secs ago
 
11:30 AM
0
Q: Poor error handling: Throw inside Finally

Karan KhannaI have the following code which I am running through fortify. Why it gets marked for poor error handling, throw inside finally? private String getResourceContent(String fileName) throws IOException { try (InputStream resource = ErrorResource.classLoader.getResourceAsStream(fileName)) { ...

 
12:10 PM
0
Q: Fetching data from realm database and searching and viewed in recyclerView

user207345Attached my data class, datas is not fetched from realm database while performing filtering in performFiltering method: Worker.kt package com.oyespace.guards.models import io.realm.RealmList import io.realm.RealmObject import io.realm.annotations.PrimaryKey import io.realm.annotations.RealmCla...

 
12:29 PM
0
Q: Screen transition effect like in Final Fantasy games

GillesI've created a battle screen transition effect similar to Final Fantasy games, you can see it in action here: https://gilles-leblanc.github.io/ff8-transition/ I've purposely avoided using Typescript which I normally use as an exercise. I'm interested in code quality, performance, optimizations a...

 
1:02 PM
I think your question would be better on StackExchange Code Review. SO is more about direct (programming) problems — GameDroids 27 secs ago
I'm sure that codereview.stackexchange.com would be more suitable place for this kind of question. — Kamiccolo 19 secs ago
 
0
Q: Find most "academic" implementation of doubly linked list

RaiderRecently, a company has asked me to make an implementation of a doubly linked list with unity tests to test my skills. In the task description they specified that the solution should be as academic as possible. After seeing the test, they said it was not passed, so, since they have not specified ...

 
1:27 PM
I wonder if Code Review isn't better suited for this. I also wonder if there is any traffic at all for XS there. — simbabque 26 secs ago
 
0
Q: Rock–paper–scissors console game

A JI wrote this console rock-paper-scissors game. I'm new to C++. I'd appreciate any suggestions to improve the code below. Thanks. RPSCore.h #ifndef RPS_CORE_H #define RPS_CORE_H #include <string> class RPSCore { public: static int rpsWinner(char& playerChoice, char& computerChoice); st...

0
Q: PHP Doctrine - shared properties between discriminator classes

Jonathan ClarkI have a single table inheritance type on a class (Resource) that can be one of 3 classes: SingleDay MultiDay Accommodation SingleDay has properties: QTY hours_offset minutes_offset hours_duration minutes_duration MultiDay has properties: QTY start_day start_time hours_duration minutes_durat...

 
1:48 PM
0
Q: A simple but useful error handler

Your Common SenseI am trying to make a very simple error handler that would catch and handle all kinds of errors in both development and production environments. The idea is to keep it as simple as possible yet useful in the production environment. In order to do so I am converting all errors into exceptions. Th...

-1
Q: Representation graph as Adjacency List on JavaScript

UndefitiedI feel quite slow in the understanding of graph representations. So, please, I'd like you to verify that I did understand, at least, the Adjacency List correctly. Here is my code in JavaScript: 1) data format (from tests): const result = formatDataToAdjacencyList(data) expect(resul...

 
1:58 PM
Greetings, Programs.
 
possible answer invalidation by JonB on question by JonB: codereview.stackexchange.com/posts/226853/revisions
 
I added a new tag up for review 'easing'. But I just noticed it would better be deemed a synonym of 'animation'.
 
In the future, if you have working code and are trying to improve it, consider going to codereview.stackexchange.comkojiro 55 secs ago
 
@dfhwze Might be best to just remove it from the question, unless we get four people with a score of 5 in it we'll never be able to make them synonyms.
Might require 5 people, if the suggestion doesn't count as a vote.
 
@Peilonrayz Done, unfortunately I don't think I can request a synonym if I don't have at least x rep on the tag.
 
2:13 PM
Not rep, answer score of at least 5 :)
 
@Peilonrayz exactly, I knew it was something :p
 
2:30 PM
This question would do better on codereview.stackexchange.comSyntaxVoid 15 secs ago
I'm not sure how these comments are useful, since they are tangential to the question being asked. velis wasn't asking for a code review. — Jacob Lee just now
 
2:47 PM
0
Q: Subscribe once and reuse the Angular Subscription each second

RahulI am creating a web application using Angular 8. This application is all about talking to the stock markets server and getting the Live updates every second. I have one query here. Below is my code: setInterval(()=> { this.GETDATA_NSE_EQ_LIVE();}, 1000); GETDATA_NSE_EQ_LIVE():void{ this....

 
3:23 PM
I'm voting to close this question as off-topic because seeking runtime improvements for functioning code is better suited to codereview.stackexchange.com. — pjs 21 secs ago
 
0
Q: PHP_CLI: How to OOP correctly?

Ann-SophieI made a small PHP CLI to add details for a workshop to the database. I would like to get some feedback on this code so I can improve my programming skills. I made some OOP Services, but no Models cause for me it seemed more work than I would have benefits from it. Could you give me some exampl...

 
3:46 PM
0
Q: Custom Queue class with O(1) Enqueue and O(n) Dequeue

DaniI am implementing a Queue class in C# using a Node/LinkedList class that I also implemented, and I wonder if there is a way to implement the enqueue and the dequeue methods, both in algorithmic efficiency of \$O(1)\$. In the Queue class I have a field of the tail and the head, and I managed to i...

 
3:58 PM
@SᴀᴍOnᴇᴌᴀ my tag got approved, how should I proceed to make it a synonym of another tag?
 
4:09 PM
Welcome to Stack Overflow. Please read about what's on-topic in the help center. We're here to answer specific, concrete questions about code. General questions like "how can I improve my code" are off-topic as primarily opinion-based and too broad. Furthermore, you haven't shown us any code. Take a look at Code Review and see if you can craft a good question over there. Please make sure to take their tour first and ask a good, on-topic question. That means you'll have to share some code. — Chris 19 secs ago
 
4:35 PM
As I suggested in my first comment, Code Review might be a good option but please make sure to read about their rules before posting. If you can figure out the cause of your lagginess and ask about it in a specific way with a minimal reproducible example you could also get help here. — Chris 27 secs ago
 
Monking
 
0
Q: Inheritance. Create a dictionary based on the class type

ViewedBelow I will give an example of the code that is involved in creating a dictionary. One class creates a dictionary for the contract, the other for the execution act. Both have common points: some dictionary keys. ContractConverter adopts the method to Convert my type Contracts. ActCompletionCon...

 
5:04 PM
-1
Q: File still needs to be opened

joe daudaI am having trouble with a macro i created where it should automatically open the file it Vlookup's to. For some reason the vlookup doesnt pull the information until after i run the macro and double click the cell again and open the associated file. Is there anyway i can run a vlookup to multiple...

 
5:16 PM
> - Users with at least 2,500 reputation (1,250 on beta sites) and a total answer score of 5 or more on a given tag may suggest synonyms for that tag.
- Users with a net answer score (total upvotes minus downvotes) of 5 or more for a given tag may vote for synonyms for that tag.
so if it is see if you can access this page
 
@dfhwze I think if a tag doesn't have any post/synonyms it disappears automagically. If you really want it to be a synonym you'd probably have to go to meta saying why you think it's better to be a synonym than for it to just fade away.
 
I'm voting to close this question as off-topic because it is asking to improve working code. consider asking on Code ReviewDaniel A. White 50 secs ago
 
5:33 PM
Ok thanks for the feedback guys
 
5:46 PM
@dfhwze Why?
 
@Mast meta post pending
 
Especially if it's supposed to be a synonym of an already existing tag, why not use that one instead?
A synonym is a fix to a problem.
If there's no problem, don't touch it.
 
@Mast Oh, well feel free to formally let me know: codereview.meta.stackexchange.com/questions/9305/…
 
0
Q: Synonym request for tag [animations], proposed synonym [easing]

dfhwzeSynonym Request I came across this question screen-transition-effect-like-in-final-fantasy-games where OP makes their custom easing function in order to smoothly transition a color over an image. I did not find any tag that suited so I created a new tag easing. Usage guidance: Easing functi...

 
6:03 PM
0
Q: Function to parse VB.NET Like pattern

Zev SpitzVB.NET has a Like operator similar to the standard SQL LIKE expression: Dim result = "abcd" Like "a*" It supports: multiple-character matches -- "abcd" Like "a*" single-character matches -- "abcd" Like "a??d" digit matches -- "ab12cd" Like "ab##cd" alternate character matches -- "abcd" Like ...

 
6:42 PM
0
Q: Sed script to update a version number in an RPM SPECS file

ZhroI have a specs file: Name: program Version: 2.3.3 Release: 0 ... I want to update the version number every time it's built. I perform the build from a bash script so I'm calling sed to update the SPECS file and a "version" file which holds the version number. I am usin...

 
6:56 PM
@dfhwze Late to the party, but at least you got your answer.
 
I'm voting to close this question as off-topic because it should be asked on codereview.stackexchange.com since the issue is about code efficiency. — Rasclatt 46 secs ago
@Rasclatt That's not a helpful close reason though. Especially since this question would be closed on Code Review in it's current state, see their help center for more information. — Mast 33 secs ago
@Mast This question is closed here by others as being unclear and it might be closed in code review for being unclear but the OP states their code works and is asking if there is a better way. Since it's about efficiency rather than not working at all, I feel it is better suited in that space. — Rasclatt 33 secs ago
 
7:24 PM
@Mast Yep, thanks for the feedback. I'll use the easing flag whenever I see fit :)
 
This question is probably better suited for Code ReviewSedrick 7 secs ago
 
7:39 PM
possible answer invalidation by Zev Spitz on question by Zev Spitz: codereview.stackexchange.com/posts/226938/revisions
I'm not totally convinced this question doesn't belong on the Code Review Stack Exchange - check it out. It's a great site for in depth coding advice, as opposed to problem-solving advice — MyStackRunnethOver 30 secs ago
 
8:15 PM
possible answer invalidation by Shadab Hussain on question by Shadab Hussain: codereview.stackexchange.com/posts/226789/revisions
 
-1
Q: PYQT5 - How do you print(with QPrinter) a QTable Widget?

summerbyeI'm trying to print a QTableWidget with QPrinter, after making an .ui with Qt Designer. This is my code:  def create_print(self): printer = QPrinter(QPrinter.HighResolution) dialog = QPrintDialog(printer, self.tableWidget) if dialog.exec_() == QPrintDialog.Accepted: self....

 
8:30 PM
@Duga ugh - the answer points out that the original code didn't satisfy requirements, and it has 4 close votes...
 
Code Review SE for code review. Code golf SE for short programs. — noɥʇʎԀʎzɐɹƆ 42 secs ago
 
0
Q: Dependency injecting or manually instantiating structs in others with go

BentCoderI am coming from PHP OOP background so just want to find out if what I do with Go is common/acceptable practise or not (I am newbie in Go). It is to do with Dependency Injection. In OOP it best to Dependency Inject object X into object Y rather than directly instantiating object X in object Y. I...

 
8:48 PM
This is a code review request. This might be better suited to the Code Review Stack Exchange site. Before posting there be sure to read their FAQ to ensure that your question meets their guidelines. In its current form it does not meet their requirements. — John Conde 14 secs ago
 
9:19 PM
0
Q: Merging Two Bubble Sorted Linked Lists

EmmaI'm following a tutorial on merging two bubble-sorted Single Linked Lists in Python. merge1 creates a new list and does the merging. Other than naming conventions which are not the best and I'm just following the tutorial, any feedback would be appreciated, about OOP, practical time-compl...

 
9:39 PM
0
Q: In-Place Merging of Two Bubble Sorted Linked Lists

EmmaI'm following a tutorial on merging two bubble-sorted Single Linked Lists in Python. merge2 does an in-place merging with O(1) constant space complexity that I'm guessing. Other than naming conventions which are not the best and I'm just following the tutorial, any feedback would be appre...

0
Q: Temporary modifying env variables with context manager

Daniel LenzOne function of a program I'm working with benefits from using all available openMP threads. The rest of the program has issues with the env variable OMP_NUM_THREADS being unequal to 1. I'm currently using the following solution to that, and was wondering whether there were any caveats or room f...

 
@Mast should I remove my comments and have the moderator remove yours? All VTC are cleared and the original question has been removed. codereview.stackexchange.com/questions/226699/…
 
9:58 PM
0
Q: BiasedOptionChooser<T>: a class to do "weighted random choices"

TrauerI need to select "random" elements from a collection. Random is quoted because I must assign a weight to each element; elements with higher weights have a greater chance of being selected. To achieve this, I wrote the classes described below. I'd like to have my code reviewed in order to feel mo...

 
@pacmaninbw I cleaned these up, because the meta question is mostly obsolete for that specific question
 
@CaptainObvious I wrote a mutable non-monte-carlo (is there a word for that?) one of those a while back which was a lot of fun. O(log n) add, remove, update, and sample. I never did anything with it, so maybe I should dig it out and post it for review.
 
Las Vegas?
or maybe Macau?
 
Not heard Macau before
Las Vegas is a class of monte-carlo where you know when you've gone wrong, I think, which I believe is how a truly efficient mutable selector would be implemented
 
Welcome to SO! Seems pretty DRY to me too ¯\_(ツ)_/¯. I'd say head to Code Review but you have to be the author of the code for that to work. — ggorlen 26 secs ago
 
10:08 PM
well, it's not a class of algorithms, but it's a small island south of hong kong known for it's casinos
 
Ah, that'll be why I can't find anything when I search of "Macau" and "Algorithms"
 
11:05 PM
@Duga looks okay - it is sample code for the VB citation but the post is about c#
 
11:56 PM
0
Q: Counting constants and vowels

killsburydouboyI'm new to Python and want to develop good habits at the beginning. This class takes a string, and then counts the number of vowels and constants in the word(s). Any advice on how to improve? class CntVowels: def __init__(self,string): self.string = string self.vowels = [ ...

 

« first day (2306 days earlier)      last day (1719 days later) »