« first day (2130 days earlier)      last day (2183 days later) » 

00:00
RELOAD! There are 5861 unanswered questions (89.9249% answered)
 
1 hour later…
01:30
@Kitkat for such related questions please try code review web: codereview.stackexchange.com. You will get prompt respond. — Juniar 50 secs ago
possible answer invalidation by okcapp on question by okcapp: codereview.stackexchange.com/posts/214394/revisions
 
4 hours later…
05:09
try to create a Minimal, Complete, and Verifiable example. No one will read the whole code. And if the code works then it should be on Code Reviewphuclv 28 secs ago
Monking
possible answer invalidation by okcapp on question by okcapp: codereview.stackexchange.com/posts/214394/revisions
May post this at [CodeReview] or [cs]. Do read their FAQ first. — Henk Holterman 18 secs ago
06:17
0
Q: PermCheck Codility

James RayThe following code gets 100% on the PermCheck task on Codility, it should be O(N). The question is: A non-empty array A consisting of N integers is given. A permutation is a sequence containing each element from 1 to N once, and only once. For example, array A such that: A...

0
Q: Hacker rank : Array left rotation C#

RamakrishnaHere is the problem description -https://www.hackerrank.com/challenges/ctci-array-left-rotation/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=arrays A left rotation operation on an array of size n shifts each of the array's elements 1 unit to the left....

 
2 hours later…
08:31
0
Q: Angular - *ngIf or [hidden] for small component?

Michael BThe difference between *ngIf and [hidden]: *ngIf does not render, respectively removes content from DOM if false [hidden] will mark the data with the hidden-attribute. The data are loaded, although they are not visible My question is: What is the better option for my use-case in terms of perf...

09:12
I'm voting to close this question as off-topic because this type of question does not belong on this site. You might try Code Review. — jmcilhinney 57 secs ago
09:28
-1
Q: Divide overlapped and non-overlapped segments

Sadia SharminI am a beginner in R programming. I need help to divide overlapped and non-overlapped segments and create the new segmentation after dividing. I have two data frames, Roadway_seg and Curve_seg I want to add curve_rad value from Curve_seg data frame into Roadway_seg data frame for matching ROAD_...

10:05
We rarely see machine learning questions on code review for Python. But in Stackoverflow if you check for new Python questions most of the stuff are machine learning.
0
Q: Adding items to DataGridViewComboBoxCell in vb.net

HakanI'm using below code with COM interface object. Public Shared Sub ExportPa(ByVal mdl As IScrModel, ByVal dgv As DataGridView) Try dgv.Rows.Clear() If mdl.findElement(My.Settings.str_elem__subvar_grpname_pa, False) IsNot Nothing Then Dim grpList As IScrSubVarGroup ...

0
Q: Naive Implementation of A Least Recently Used (LRU) Cache Memoiser

Tobi AlafinI wrote code to (naively) perform lru memoisation. I tried to write it in a functional programming style, and so did not make use of any global variables. My Code def naive_lru(mx=None): """ * Closure that returns a memoiser. * Params: * `mx`: The maximum ...

I wonder if that means, people who do machine learning doesn't really care about quality of code, but to just get it working to pass some assignments. šŸ¤”
10:28
Monking
10:45
@422_unprocessable_entity We get a couple. From what I've experienced they tend to not have easy answers, and so commonly go unanswered. And are rarely in the HNQ. I'd think people in the field don't know about us, or don't want to post a question that'll just stay unanswered.
11:11
:)
what is HNQ?
The "Hot Network Questions"
11:43
0
Q: Recursively find path through maze, return path as string

GiulioI tried this several times from scratch, but it just won't work properly. This time i get the path in wrong order :/ public class Delivery { private static boolean[][] map1; private static boolean[][] visited1; public static String search(boolean[][] map) { map1 = map; ...

0
Q: Find the next expiration date

NoceoSay I have an agreement with a customer. When the agreement ends, the customer needs to pay. The amount which the customer needs to pay, increases for each month that has passed, since the agreement was initiated. The maximum duration is 3 years, so I have a final expiration date. From this final...

12:10
If your code is working then maybe this question would be a better fit for codereviewLino 49 secs ago
For optimizations, I think you have a higher chance of success over at Code Review SEMX D 39 secs ago
12:21
0
Q: Updating a memory stream with a new value within a using block

JohnLBevanI have a scenario where I want to apply some operation to a memory stream under specific conditions. The real world use case is there are some scenarios in which I need to send a stream to a web service as an XML stream, and other scenarios where I need to zip the XML stream first, then send a s...

@Lino Oh! I think you are right... I will post my next question like this on codereview — MoustacheSpy 43 secs ago
12:59
0
Q: Getting Record entries

bornfreeI have a class Record which keeps entries of strings(implemented using vector of strings). I want to keep the data member private to the class. To get entries, I have defined a member function get_entry which accepts a reference to vector of strings to store results. Below is the code. #include <...

13:38
0
Q: Simple Harmonic Oscillator Python

Casinia Ciobanu****Hi, so i found this code but i canĀ“t understand it as I am only a beginner to Python. Could someone help me please?**** import math from pylab import * xt = [3] t = [0] k = 0.50 dt = 0.0001 Vx = 0 for i in range(800000): t.append(dt*i) a = -k*xt[i] xt.append(xt[i] + dt*Vx) ...

13:48
just add deny -2 +2 for Change Owner in label Code Review works for me. — TerrenceSun 37 secs ago
this code works. ask Code ReviewDaniel A. White 45 secs ago
14:05
Monking
14:22
This should be posted on codereview.stackexchange.com as that is a much more suitable location for enhancement requests. — basic 19 secs ago
I'm voting to close this question as off-topic because it is asking for the quality of working code. ask on Code ReviewDaniel A. White 19 secs ago
Greetings, Programs.
14:45
Yuo you are right, however your might wanna look at codereview.stackexchange.com/questions/160411/… also there few articles on this why you shouldn't use the state.map directly. I will update you once I get a hold of my laptop. — Subhendu Kundu just now
Welcome to SO, which does not work by throwing the whole of our code as-is and asking for general advice (you may want to post to Code Review for such tasks); please see How to create a Minimal, Complete, and Verifiable example, as well as why a wall of code isn't helpful. — desertnaut 53 secs ago
There's no question here. What problem are you having? Without an actual question, this post is off topic for Stack Overflow. You might try the code review stack exchange site instead. — Joel Coehoorn 54 secs ago
0
Q: more pythonic way of writing pandas double loop

REdim.Learningi'm using a dataframe full of headers/field names to develop a schema and I need unique values for each header - but each header should be represented. I want to loop though the dataframe list of fields and the second time I come across a field name, I want to add an ever increasing number to it....

15:14
-1
Q: I have a syntax error on line 4 that I can not decipher. The code is supposed to delete the node at the End of a LinkedList. The Code is in Python 3.6

TimmyTurnerThe code is supposed to delete an element at the end of a linkedlist. I have split into three cases: the list is empty, the list has one node, the list has more than one node. I have tried to google various solutions and searched the forum for other users with similar problems. I am a beginner a...

15:29
Maybe I am too brief with my actual use case. At Code Review I have posted a question with the full use case. Please have a look [link] (codereview.stackexchange.com/q/214363/193952) — rAAbert just now
Maybe I am too brief with my actual use case. At Code Review I have posted a question with the full use case. Please have a look [link] (codereview.stackexchange.com/q/214363/193952) — rAAbert 27 secs ago
15:45
possible answer invalidation by Yan Khonski on question by nhaarman: codereview.stackexchange.com/posts/58489/revisions
16:11
0
Q: XMLGregorianCalendar to LocalDateTime

MrSmith42From some generated code I get a javax.xml.datatype.XMLGregorianCalendar and I want to convert it to a LocalDateTime without any zone-offset (UTC). My current code accomplishes it, but I think it must be possible to acheaf the same reult in a more elegant (and shorter) way. public static Lo...

This could be a good question for CodeReview. — dymanoid 11 secs ago
This could be a question for CodeReview. — dymanoid 29 secs ago
 
1 hour later…
17:28
0
Q: Flutter - Set the state of the dynamically created child widgets

GabrielThis is what I wan't to do: In my app I've 2 custom widgets called SelectItems. If the user clicks on item, it changes the background color. Everything is working just fine, but a code, which manages the state is a bit cumbersome: import 'package:flutter/material.dart'; void main() => runApp...

Monking
17:50
If you have code you believe works and you want it to work better, consider asking over at Code Review. Note that I have linked to the How to Ask help pages. Make sure you are familiar with their requirements and adjust your question accordingly. — user4581301 32 secs ago
18:25
0
Q: bash script - Create virtualhost on development server (ver 2)

LeonidMewReview compatibility, readability, good code standards, security. This is for development server, where webmaster uses GUI fo IDE and fine way to create quickly apache2 virtualhost using GUI but fallback to text interface is present. Second review of script with applying previous review and add...

0
Q: Using inheritance with dialogs that may return a result

appa yip yipI'm writting a framework to help me create awesome dialogs. So far, all dialogs were used only to display something to the user. But now I want some of them to return something back too. I've came up with the following generalization: public abstract class BaseDialog { public bool IsClosed...

18:54
0
Q: I suggest a two tags 'readability' and 'compatibility'

LeonidMewI suggest adding two tags readability and compatibility. I can't add them myself but think they will be useful. At my last code review question I added a tag related to the programming language itself. Are extra needed? I think so.

0
Q: A XMLHttp Request in the browser

Developerfunction Remote() {} Remote.upload = function(formData, progressHandler) { return new Promise(function(resolve, reject){ var xhr = new XMLHttpRequest(); xhr.open("POST", "http://localhost:3000", true); xhr.setRequestHeader("Accept", "application/json"); xhr.ad...

19:59
Any SEDE pros around?
I'm kinda lost on how to get last_value to work. I'm trying to get a list of all the duplicate question on CR. I've found that PostHistory has the information if a question has been closed (PostHistoryTypeId = 10) and reopend (11). I then group by the PostId and get the last PostHistory, so I know if it's open or closed.
From here I filter all open ones, and filter to just duplicates (Comment in {'1', '101'}). The problem seems to be that last_value doesn't sort in ascending order so returns questions that have been closed as well as ones that are currently closed.
WITH PostHistoryStatus as (
    SELECT
        ph.PostId,
        last_value(ph.Comment) OVER (ORDER BY ph.CreationDate ASC) as Comment,
        last_value(ph.PostHistoryTypeId) OVER (ORDER BY ph.CreationDate ASC) as PostHistoryTypeId
    FROM
        PostHistory ph
    WHERE
        ph.PostHistoryTypeId = 10
        or ph.PostHistoryTypeId = 11
    GROUP BY
        ph.PostId, ph.Comment, ph.PostHistoryTypeId, ph.CreationDate
)

SELECT
    p.PostId,
    p.PostId as "Post Link"
FROM
    PostHistoryStatus p
1
Q: Bash on Synology - Delete recycle bin entries over X days old

AaronKSynology NASs have a Task Scheduler that allows you to schedule deletion of files over X days old from recycle bins. This feature isn't working for meā€“running the task results in no files being deleted. The task works if I schedule a full deletion of the recycle bin, but I'd prefer to only delete...

0
Q: Tic Tac Toe program that runs games and reports

okcappThis is a followup question to Tic Tac Toe program that includes reports. The accepted answer suggested completely refactoring the reports features. My goal was to prevent a situation where I was backed into calling reports and running games from within the same method deep in one of my classes....

0
Q: Enhanced C# Enumeration / `enum`

Ehouarn PerretI am developing my own kind of Enumeration like SmartEnum but trying to prevent the user to provide a recursive-ish type definition like below: public sealed class TestEnum : SmartEnum<TestEnum> { public static readonly TestEnum One = new TestEnum(nameof(One), 1); public static readonly ...

1
Q: Generic Variable Elimination with multiple entry points

SvalorzenI have this algorithm, called Variable Elimination, which is used quite often in my code-base (library). It is an algorithm for factor graphs (a type of bipartite graphs), used to efficiently maximize something over the nodes, thus I need to make it as fast as possible. Since I had 5 separate im...

20:56
Maybe I am too brief with my actual use case. At Code Review I have posted a question with the full use case. Please have a look [link] (codereview.stackexchange.com/q/214363/193952) — rAAbert 17 secs ago
21:37
0
Q: RSS Feed Viewer in Clojure

MarioThis semester a classmate and I visited a course on functional programming in our university. For grading, we've to submit a small project which should be written in Clojure and make use of functional programming. However, the topic of the course itself was mostly about Clojure and its syntax an...

-1
Q: ftp using python- masking password

ChuckLevitonI wrote a simple script to perform an ftp. I can accept password masked but when the ftp executes the password shows as clear text. import subprocess import getpass p=getpass.getpass() fo = open('put.cnt','w') fo.write('open server \n') login_string= 'user myuser ' + p + ' \n' fo.write(login_st...

0
Q: Optmise slow LINQ database query

jrnI wrote the below LINQ statement which populates a fairly big DTO. The GroceryEvents table is by far the largest table, as it records events for every grocery item in the database. A pageload which queries the database using the below LINQ statement takes up to 5 seconds. I am thinking that the...

1) It's entirely unclear what you're asking, and 2) It sounds like you're asking for opinions which isn't really the sort of question to ask on StackOverflow. Perhaps you want codereview.stackexchange.comPhil 48 secs ago
-1
Q: Split overlapped segments into non-overlapped segments

Sadia SharminI am a beginner in R programming. I need help to split overlapped segments and create the new non-overlapped segmentation after dividing. I have two data frames, Roadway_seg and Curve_seg I want to add curve_rad value from Curve_seg data frame into Roadway_seg data frame for matching ROAD_INV, ...

22:34
0
Q: Stack template using linked list

AlekseiI'm working on stack implementation using linked list, but i have strong filling that i overcomplicate my solution. I would be appreciated if you review this code and give me any suggestion on code and style. #pragma once #include <functional> #include <iostream> #include <type_traits> #include <...

23:24
For feedback on code that works, you should check out our sister site Code Review. — Code-Apprentice 34 secs ago
0
Q: What does the Bob say? (clojure version)

little-dudeI'm doing the exercices from clojureacademy. Here are the instructions for this one. Bob is a lackadaisical teenager. In conversation, his responses are very limited. Returns "Whatever." if given phrase is one of the following inputs: "Tom-ay-to, tom-aaaah-to." "Let's go mak...

0
Q: Program that scores the following data about soccer player in a structure (C++)

MikeI am coming for a code review checkup from you C++ experts to review my code if I am not using these restrictions shown below: No global variables No labels or go-to statements No infinite loops, examples include: for(;;) while(1) while(true) do{//code}while(1); No break statements to exit ...

23:51
1
Q: Simple C++ program to check win in TicTacToe

n3a9Given a string of size 9 that represents a tic tac toe board, determine if X or O has won, or if the board is in an invalid state. Any other character aside from x, X, o, O represents an empty spot on the board. Input: 012345678 Board: 0 1 2 3 4 5 6 7 8 TicTacToe.cpp #include "tictactoe.h" ...

0
Q: How to speed up the retrieval of the corners of a mask

Seth KitchenI have trained a polygon detector neural network to recognize the mask of "quadrilateral" (the mask generates curvy lines so it's not exactly a quadrilateral). I would like to get the corners of the quadrilateral. I believe the best approach is to get the points in the mask that are closest to t...


« first day (2130 days earlier)      last day (2183 days later) »