« first day (2125 days earlier)      last day (1894 days later) » 

12:00 AM
RELOAD! There are 5870 unanswered questions (89.8990% answered)
 
0
Q: Messy non-recursive Makefile

rAAbertI want to write a non-recursive Makefile using gnumake. I came up with such a Makefile but I am not happy with it. It looks messy. I ended up using .SECONDEXPANSION: to be able to create correct dependencies MAKEFLAGS to keep gnumake going if one build fails .SECONDARY: to keep intermediate t...

 
12:32 AM
0
Q: What is the difference with async and sync in Tcp Socket?

user193954Does it have speed difference? Which one is more responsive? Does it matter which one to use? The codes to these 3 questions: void EndReading(IAsyncResult result) { int size = ((NetworkStream)result.AsyncState).EndRead(result); } void Start() => tcpClient.BeginRead(buffer, 0, 30000, EndReadi...

 
1:09 AM
This question appears to be off-topic because it 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. — John Conde 7 secs ago
 
1:19 AM
0
Q: Code to replace list of integers with nearest bigger element

Prashin JeevaganthThe original question was in the context of an array, but I just used a list without changing the length for easier debugging purposes of toString(). Given an unsorted list of integers, design a O(n) algorithm to transform the list such that the integers are replaced by the next bigger integer o...

 
2:06 AM
0
Q: Searching a nested data structure for 2 attributes

Raymond HolguinSo I have the following data structures export class BudgetGroupInfo { name: string; bcInfo: BudgetCatInfo[] = []; } export class BudgetCatInfo { name: string; description: string; bcAccounts: BCAccountInfo[] = []; } export class BCAccountInfo { name: string; descriptio...

 
@Vogel612 @SimonForsberg Different JetBrains plugin: github.com/ellersoft/JetBrains.Git-User
Finished that one out today, for the most part.
 
2:30 AM
If the code is complete and works, it should be on Code Review, not here. Note though that they require the code to be posted in the question itself. — Carcigenicate 39 secs ago
 
2:53 AM
0
Q: Optimize Multiple Insert SQLite Coming From MySQL

aria mossarI'm currently developing an app that requires sending and receiving of data from android studio going to MySQL and then data coming from MySQL will be saved from the SQLite. I need advice on how to make the process faster. Right now I'm inserting 80,000 + rows of data coming from MySQL and then s...

 
@Donald.McLean Shot my thoughts on what you're doing out -- let me know if they make sense once you've had a chance to read them. It's a lot of text to explain what the F# stuff is doing, but overall the F# is pretty simple.
 
possible answer invalidation by CppLearner on question by CppLearner: codereview.stackexchange.com/posts/214211/revisions
 
3:25 AM
0
Q: Generate Public/Private Keys, Encrypt, Decrypt, Sign, Verify, In Python. Kinda fast

dhoyt902My program generates public private keys, encrypts, decrypts, signs and verifies, while using AES for the bulk for speed. Many operations were chosen for speed. This works out of the box on 3.6+ . Windows idle env disallows it from working there, but linux and mac is ideal. I do call gzip which I...

 
@SalikTariq of course! Just make sure that your question is appropriate for the site: stackoverflow.com/help/how-to-ask. Additionally codereview.stackexchange.com is a good place to ask experts to critique and verify a solution once you have actually coded it. — Primusa 50 secs ago
 
@DerKommissar Interesting, and I'm still studying it.
What sort of mechanism do you think would be good for storing the definitions of the node type?
 
We used raw F# records and unions, then we create objects that internally contain a "Node" that we create getters / setters for.
So it's not inheritance so much as composition.
 
SO is for questions related to problems you're having with progrramming (code) or use of a programmers tool (compiler, version control, etc.). For working code that you're looking to have peer-reviewed, Code Review might be appropriate, but they have very strict requirements for posting there that you should thoroughly review first. — Ken White 58 secs ago
 
@DerKommissar I meant what do you think would be a good way of storing them on disk? For when the app is initialized.
 
3:41 AM
Ah, we use JSON objects there, since Neo4j uses JSON throughout
 
4:03 AM
@DerKommissar That makes sense, especially since Lift is a web app framework and has JSON support baked in.
I suspect the hardest part will be coming up with a high-level query syntax.
 
0
Q: Get two array from array of objects

sleepwalkingI have an array of objects: const dataset = [ {name: 'Marie', year: 12, country: 'Canada'}, {name: 'Jeff', year: 18, country: 'France'}, {name: 'Joss', year: 10, country: 'Spain'}, {name: 'Carrie', year: 45, country: 'Belgium'}, {name: 'Linda', year: 32, country: 'France'}, ] I want ...

 
5:11 AM
I'm voting to close this question as off-topic because it should be on Code Review instead. — EJoshuaS 14 secs ago
 
do you want this post?
0
Q: Any advice on how to make the sending and receiving of json data to and from android studio faster? OPTIMIZE MySQL to SQLite

aria mossarI'm currently developing an app that requires sending and receiving of data from android studio going to MySQL and then data coming from MySQL will be saved from the SQLite. I need advice on how to make the process faster. Right now I'm inserting 80,000 + rows of data coming from MySQL and then s...

If you ever want a post migrated from SO. Please feel free to ping me in here.
9
 
0
Q: Couldn't display contents of div into the editor

PrabuHi I'm developing a page which contains quill rich text editor. When click Edit button, I'm trying to get the contents from .content Class. After editing, updating the contents into the same .content class through Quill editor. Yet clearly, First, I want to edit the contents in the .content cl...

 
5:47 AM
0
Q: Evaluating association strengths of items

Kristada673Say I have a list of animals with their counts: import numpy as np import pandas as pd from random import randint table = np.zeros((5,1), dtype=int) for i in range(5): table[i]=randint(10, 20) df1 = pd.DataFrame(columns=['Animal', 'Count']) df1['Animal'] = animal_list df1['Count'] = table ...

 
6:34 AM
0
Q: Diagonal Difference of a 2D matrix

Mona JalalHow should I fix my code such that it will pass all corner cases not just some in HackerRank? #!/bin/python3 import math import os import random import re import sys # Complete the diagonalDifference function below. def diagonalDifference(arr): sum_diag1 = 0 sum_diag2 = 0 arr_2d = ...

 
 
1 hour later…
7:41 AM
Monking
 
8:38 AM
0
Q: Angular Websocket service with wait for response sending

Franki1986I am writing an Angular Websocket service that can send messages to a server and then can subscribe to the response. I am grateful for every suggestion to improve this. import { Injectable, OnDestroy } from '@angular/core'; import {webSocket, WebSocketSubject} from "rxjs/webSocket"; import {of, ...

0
Q: python - how can loop work in the recursive function

genechenimport math lst = [] def f(X,J): if X == 0 or J == 0 : return 0 if J == 1: return 10*X/(1+X) if J == 2: return math.sqrt(X) if J == 3: return 10 * (1 - math.exp(-X)) def V(X,J): if X == 0 or J == 0: return 0 for Y in range(X+1): lst.append(f(Y,J)+V(X-Y,J-1)...

 
8:49 AM
@SᴀᴍOnᴇᴌᴀ It's annoying when they don't post the exact same question on both SO & CR. If they would have posted this question on SO, it would have been more obvious that the code is not working properly yet.
 
 
2 hours later…
10:44 AM
0
Q: My BlackJack Game in C# Console

Stevewhat do you think of my BlackJack game in regards in Object-Oriented Programming? My code is at https://github.com/ngaisteve1/BlackJack using System; using System.Threading; public class BlackJackGame { private static deckCard deck; public void Play() { bool continuePlay = true; Cons...

 
10:59 AM
Then I'd suggest you need to restructure how you send data within each request as that seems less than ideal for both repetition and security. If you need help with this I'd suggest starting a new question, possibly on CodeReview if the code is working. — Rory McCrossan 50 secs ago
 
 
1 hour later…
12:19 PM
0
Q: Performance issue when manipulating large amount of DOM elements

pavjelHere's working code for my extension for Google Chrome/Mozilla Firefox. Extension should highlight posts on imageboard that has video attachment (we can distinguish between non-video posts by checking for file extension in the title of a post - e.g. .webm or .mp4) function parseVideoTitles() {...

 
12:49 PM
This is maybe better suited for codereview.stackexchange.comLino 1 min ago
 
1:06 PM
0
Q: Socket sending/receiving data

ION GROZEAI am a beginner in Android and this is my first big project in it. I am trying to communicate with an STM Discovery board using an ESP01 module. Below is the client connection class package com.example.remote_dslr; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; i...

 
1:22 PM
0
Q: Tic Tac Toe program that includes reports

okcappI'm working to use everything I'm learning in my reading and former code reviews to keep making this program better. I'm getting stuck on the following issue: the play_many_games and game_is_over methods in the GamesEngine class both call reports. I don't like this because the function names don'...

0
Q: Capitalize a sequence of lines entered via console input and print/return

DaveI'm running through the popular python practice exercises located at github: https://github.com/zhiwehu/Python-programming-exercises/blob/master/100%2B%20Python%20challenging%20programming%20exercises.txt I recently discovered recursive functions. So when asked the following in the above link: ...

 
1:38 PM
1
Q: Java Insertion sort - Which is better?

Brody27Insertion Sort # 1: for(int i = 1; i < arr.length; i++) { while(i > 0 && arr[i] < (arr[i-1])) { int temp = arr[i]; arr[i]= arr[i-1]; arr[i-1]= temp; i--; } } Insertion Sort #2: int n = arr.length; for (int i=1; i<n; ++i) { int key = arr[i]; int j = i-1; ...

 
1:53 PM
0
Q: React Native code style needs improvment( render() takes to long)

Tadas JasikevičiusI'm using Expo to make an app and this part of my app loads the longest. I'm new to this so I am asking for some pointers. Thank you! import React from 'react' import { View, Text, TouchableOpacity, RefreshControl, ScrollView, AsyncStorage, Alert} from 'react-native'; import Icon from 'react-n...

 
@Donald.McLean Yeah we're still struggling with that, we built a language-based DSL that we use, but Cypher is somewhat complex there.
 
2:19 PM
Monking
 
@Vogel612 Eins, zwei drei
 
~sigh :)
 
Or should I start with "Check it out, yo"?
 
Monking
 
Greetings, Programs.
 
2:30 PM
possible answer invalidation by Olivier Jacot-Descombes on question by Pete: codereview.stackexchange.com/posts/46552/revisions
 
@DerKommissar Well, I'll just have to take it one use case at a time.
 
@Donald.McLean Yep. I started building our DSL with simple MATCH (n) RETURN n, and moved from there.
As I needed things I updated the DSL to support them.
 
One thing I'm going to have to do early is add access controls.
 
We actually built that out as a permission system via nodes, due to our model.
So we have a User node, and then a CAN_ACCESS relationship, so it's (:User)-[:CAN_ACCESS]->(n), but then also (n)-[r*]->(otherN), so that you can access that point or lower in the hierarchy.
I think it's r*, not starting at the source right now so can't guarantee the syntax, but that's the basics of it.
If you can access n, you can access any node that n points to, because all nodes point from the top to the bottom, for us.
If you reverse it, you would just reverse the second relationship direction.
 
2:50 PM
Then the removal of the dependencies was wrong and should be reversed. Your code reviewer apparently made a mistake. — JF Meier 34 secs ago
 
0
Q: FollowUp CommandLineInterpreter (CommandLineInteraction)

Martin FrankI wrote an command line interpreter (CLI) in Java and got some real helpful hints on how to improve. The cli is responsible to pick up the users input (via keyboard aka command line) into any app that implements the CommandLineInterpreter. The app itself offers commands to the CLI that can be ...

 
You might have confused something - stack overflow is primarily for very specific programming problems/questions (for example when something doesn't work and you're unable to fix it). For general feedback to code that is working just fine (no specific problems etc) you can try codereview.stackexchange.com. — Mantas Kandratavicius 15 secs ago
Maybe this is more a codereview.stackexchange.com question? — G M 11 secs ago
 
3:35 PM
You may also be interested in what codereview.stackexchange.com has to offer. — jaco0646 46 secs ago
 
4:07 PM
bom Monkens
 
0
Q: Reading CSV and creating objects dynamically

HarryI have this CSV... Type,Noun,ScientificNoun,MinSizeCm,MaxSizeCm,minWeightGrams,maxWeightGrams,Colour,locomation,Country,NaturalHabitat,Shape of the beak,Colours of the feathers,min length of wingspan cm,max lenght of Wingspan cm Bird,Buzzard,Buteo buteo,51,57,550,1300,Brown,fly,United Kingdom;Sw...

 
@SimonForsberg some people... they are just... like J.R. Smith said: "something else"
 
4:31 PM
0
Q: Conway's game of life implementation no error messages but stuck at creation of object

Abhay Raj Singh RathodThis is the code when constructor is called it does nothing checked loops compiling using g++ conway.cpp gcc 8.2.1 Manjaro Linux #include <vector> #include <iostream> #include <cstdlib> #include <utility> typedef unsigned u; class Cell { bool state; public : Cell() { state = f...

 
4:47 PM
1
Q: Increment each digit in a number to form a new number

nowakasdToday I've found /r/dailyprogrammer and I've solved an easy challenge. I'm new to coding and I'm not sure if this is good way to solve this kind of problems. Could you, please, give me some hints? How to make my code more clear and readable? Thanks! Challange description: A number is inp...

 
5:13 PM
posted on February 27, 2019 by CommitStrip

Today, we’re welcoming a new sponsor, TruePath Technologies! TruePath Technologies is an industry-leading provider of enterprise monitoring software, hardware and services. They specialize in configuring and maintaining your monitoring software so you can avoid costly network downtime and maintenance. TruePath is a premier technical support provider and reseller for partners like SolarWin

 
5:30 PM
MOnking
 
5:43 PM
 
5:56 PM
@RMunroe And the irony is that numeric integration is incredibly stable while numeric differentiation is hyper unstable.
 
@YvetteColomb Thanks - I doubt many users here will be losing sleep over such matters but it will be good to keep in mind
 
You may want the code review stack exchange. — Dave Newton 44 secs ago
 
-1
Q: Save as CSV in VBA with blanks not zeroes

emcorI wrote this VBA Macro to save a range of values into a CSV: Sub exportRangeToCSVFile() Set myWB = ThisWorkbook myCSVFileName = myWB.Path & "\" & "Format_CSV-" & VBA.Format(VBA.Now, "dd-MMM-yyyy hh-mm") & ".csv" Range("B5:X260").Select Selection.Copy Workbooks.Add ActiveSheet.Paste ActiveWo...

 
6:18 PM
@SᴀᴍOnᴇᴌᴀ It doesnt make sense to ask a question about something which already works. — emcor 36 secs ago
ROFL
 
0
Q: Find the longest word in set

K. KretzI am currently trying to learn how to become a better programmer. I am taking the Google Tech Dev Guide recommended path and this is the first problem. I came up with my own solution, and read Google's first recommended answer is using brute force, and a slight optimization is to at least ensur...

 
Yes, I put that together yesterday. Needs to go through our code review process. — Hiranya Jayathilaka 53 secs ago
 
6:36 PM
@RMunroe Where's "guess a random function and check via differentiation if it's a correct one"?
 
@RMunroe Error: Exceeded timeout while computing image
 
@SᴀᴍOnᴇᴌᴀ add that to the Hall of Shame
 
6:58 PM
2
Q: How to tell if a BJT is PNP or NPN by looking at the circuit?

Jimmy Vailer Is it possible to tell if a BJT circuit is PNP or NPN simply by looking at the circuit? For example, for the circuits shown, how can we tell if they're PNP or NPN?

@Mast ^^^^^^
 
7:09 PM
0
Q: Reorder indices of tiles in array based on flow map

whoismikesmithThis is part of a HTML5 Canvas / Javascript app. This javascript draws a checkerboard along with arrows to dictate the direction to flow through the tiles. The goal is to have the tile index's follow the flow map, starting at 1 where the 'O' is drawn and ending with the last tile number where the...

 
If this code works, I'd consider posting it as a question on Code Review. Keep in mind that you would be asking for a comprehensive review of your code, although you can point out areas that you would like to emphasize. I'd suggest reading How to get the best value out of Code Review - Asking Questions first though. — Comintern 59 secs ago
 
7:24 PM
0
Q: Python list encoding differences between UNIX and Windows

user96931I'm using Python 2.7, and I have a function that returns a list, inputted from a telnet socket. In UNIX, the formatting is fine, so when I use "print params" - where params is the list, I get "word" But on Windows, when I use "print params" I get "w o r d". I checked the encoding of the list p...

 
7:40 PM
0
Q: Dynamic Programming and Exhaustive Search

SpindoctorI have the following algorithm that prints all possible combinations that sum to a desired amount N.The actual amount of non distinct valid combinations for amounts {1, 2, 5} and N = 10 is 128. My question is can an exhaustive search be improved with memoization/dynamic programming. If so, how ca...

 
8:12 PM
0
Q: Revise arduino code mpu6050 controlling motor with angles

milesI have been trying to create arduino code where my MPU6050 reads it’s angle and based on that angle, change the motor speed. For example 45 degrees is the max motor speed and 22 degrees is roughly half speed and so on. I have a 5065 200kv brushless motor going to a ESC with a bec which i can att...

 
8:27 PM
Not sure, if I am really doing something stupid. Added screenshot of problem i am facing. As suggested applied checkstyle and it looks to work fine as it don't gives any error with code formatted via google style. However applying formatting leading too many diffs in unchanged code thus making code review a bit cumbersome. — tarunkumar 49 secs ago
 
0
Q: Simple web based file browser with Flask

WoaskI made a simple web-based file browser with Flask. It also shows some metadata of a file. I have a few questions regarding security though. Is it possible for an attacker to escape out of the preset root directory? Are there any ways to make my code more readable and/or more efficient? Would love...

 
8:43 PM
This would be more suitable for the Code Review site. — JJJ 19 secs ago
A question better suited over at Code Review. We're generally not tutoring here, and we usually help solve issues with code that isn't running as intended. And seeing as this code runs as intended, just not in a way that would please a professor. — Torxed 56 secs ago
However, before you post on codereview, please fix your indentation so it's a fully workable piece of code as is. — Jon Clements ♦ 40 secs ago
Since there seems to be a bug, it's not quite suitable for Code Review as is. — JETM 31 secs ago
 
9:31 PM
-1
Q: Grading Marks of exams, a simple C program

O.MukhtarI have started working on the project below here. I want to practice my C coding skills. I would love any constructive criticism I can get! It is a Grading Program, it is working and would appreciate for reviews. * #include <stdio.h> #include <stdlib.h> int main() { char name[100]; int...

 
10:23 PM
Congrats on 25k @MathiasEttinger
 
@Peilonrayz Thanks. That final sprint is thanks to you :)
Anyway, didn't get much time today to think about it; but what's with Python 3.6 Generic metaclass that makes it impractical to use another one?
In the end it should always be possible to derive from type(Generic), right?
 
@MathiasEttinger I tried using it before and thought it was using a generic metaclass, but it actually is using typing.GenericMeta, maybe it was a _TypeAlias I was messing with...
It seems to be fine now that I've looked at it again. The only problem is if another third party class uses its own metaclass, making a Converter result in a TypeError.
 
10:40 PM
Like Converter[ClassWithMeta] doesn't work?
 
No class MyConverter(Converter[Base], ThirdPartyClassThatHasMeta): ...
 
Or class Foo(Converter[Bar], metaclass=Baz) ?
 
Yeah or that
Like how I use dataclass_json to wrap the converter, if the third party used a metaclass to add functionality it'd not be usable. To fix this I'd just add a _BASE class var, and have the option to use Generic with your meta, or one without Generic or the metaclass.
 
Seems fishy presented like that
But I'm a bit tired to think properly right now. Didn't get much sleep last night :p
In fact, I think I might go.
 
Yeah I didn't expect a 2/3am review, haha
 
10:48 PM
Me neither. I got carried away by the question
 
@MathiasEttinger Gniknom!
 
11:05 PM
-1
Q: Error loading package hurricaneexposuredata

Gwendolyn AndersonI have looked through other questions about errors and tried various solutions suggested. I did find my anti-virus was preventing me from saving an *.R file and I did try turning it off and then I was able to save. I also tried deleting a LOCK file that was added to my directory but ran into the...

 
If my question hasn't been answered, am I more likely to get an outside answer by putting my own answer and boosting its activity or leaving it unanswered and having it show up in unanswered queries?
I already had an idea but didn't want to pigeonhole potential answers, so I didn't talk about it in my question.
 
If you have a demonstrable problem, then we need you to fill out the rest of the example. If you do not have a demonstrable problem, then you're on the wrong site. Please check "Which site?" for general issues and "Code Review or not?". — Prune 25 secs ago
 
11:52 PM
0
Q: C# Handling Task Cancellations/Timeouts and Exceptions

cd491415I am very new to Tasks and therefore new to handling task cancellations and task exceptions. I wrote this method that gets a List which is then used to populate an ObsservableCollection shown in a ListView but I am not sure if I am handling cancellations and exceptions properly. I would like t...

 

« first day (2125 days earlier)      last day (1894 days later) »