« first day (2883 days earlier)      last day (1432 days later) » 

00:01
RELOAD! There are 7459 unanswered questions (89.5063% answered)
00:26
Questions like this are off-topic for Stack Overflow because we are interested in solving problems, not in deciding the optimal algorithms (try cs.stackexchange.com or possibly softwareengineering.stackexchange.com) or making the code more elegant (try codereview.stackexchange.com). That said, if "they" are teaching you to use things that have officially not even been supported by the developers for a year or so, you should find a different place to learn. — Karl Knechtel 44 secs ago
For getting opinions about generally working code, codereview.stackexchange.com is the place you want to visit. — tevemadar 8 secs ago
 
2 hours later…
02:39
0
Q: Just started writing javascript to test APIs and below code is to test multiple steps in Json response.Is there a way to clean up and have fewer lines

AlkaTC1 is Code to verify data 1st item of the list in json Response, TC2 Code to verify data 2nd item of the list in json Response and so on. Can this be cleaned up to have fewer lines pm.test("E13_TC1",function() {pm.expect(responseJson.runnerNodeResults[5].filterTemplateId).eql(18);}); pm....

0
Q: Is there a better pattern to match those words with regex?

Spiros GkogkasHello StackExchange community, I am curious if there is a better solution than mine for this exercise below: Enter a regex that matches all the items in the first column (positive examples) but none of those in the second (negative examples). Positive Examples: pit spot spate slap two respite Ne...

03:28
0
Q: Write a clean convertToNumber function, if value is a number

TomI have a function that creates filters for some data. The filters get added to an array and then (later) chained through the reduce function (the chaining part not part of my question). The data I receive are all strings but can actually be numbers, eg {name:"-45.6"}. If it can be a number, I wan...

0
Q: Interactive, real-time bikeshare web application with Bokeh

keves1As a side project, I'm working on a Bokeh web application to display public bikeshare data on a map. The data is updated every 2 minutes using a periodic callback. Below is the full implementation. I'm using PyBikes (https://github.com/eskerda/pybikes) to scrape the bike data. I'm interested in f...

 
1 hour later…
 
1 hour later…
06:06
What problems are you facing? SO is not made for code reviews, see codereview.stackexchange.com if you want one. Here you should ask a specific question about the code you've shown. — churill 48 secs ago
06:45
0
Q: Can this C++ implementation of Depth First Search be further improved?

a_sidI got the C++ implementation of DFS from here and made slight modifications to it. The modified code is as follows: #include "stdafx.h" #include <iostream> #include<map> #include<list> class Graph { void DFSUtil(int v); public: std::map<int, bool> visited; std::map<int, std::list<int>>...

07:34
0
Q: Factory / Builder Design Pattern in Python

rkarftSituation: I have implemented a factory design pattern in Python as below. There are different screens which have different configurations. One can register the screen in the factory and get the screen in case correct configuration is passed to respective factory class method. Question: I am wond...

07:52
Note that you are basically asking us to review (working?) code. So, if you already tested your code, and it does give you "valid" results, your question might be better suited for codereview.stackexchange.comGhostCat 51 secs ago
I’m voting to close this question because this might belong to another Stack Exchange site - codereviewbaduker 41 secs ago
This question is probably better suited to codereview.stackexchange.com. However be sure to take their tour and read their How to Ask page before posting. — Nick 48 secs ago
 
3 hours later…
10:26
-1
Q: How do I include my "for" loop value in dataframe?

PyNoobI have a code that scraped soccer games. I have added values but I am unable to include in the dataframe. How can I improve my code? import os import pandas as pd from selenium import webdriver from tabulate import tabulate from datetime import datetime import time from bs4 import BeautifulSoup a...

11:17
0
Q: C++ student class Student data type

rude_rumitWrite the following class called ‘Student-Data’ that uses a pointer to store personal data of a student who studies in a University. The class has two types of information: common data to all the students like the name of the University and the name of the section. For each student, there is pers...

11:44
0
Q: Motivation for using Proxy Pattern

user2338150Okay, I have been struggling with some code which is based on API which seems to use lot of Proxy Pattern. It occurs that the API is written like that so that it could intercept some of incoming calls to set of interfaces: if the caller objects have right state, they could get to call the 'large'...

0
Q: Subclassed DiffableDataSource

Declan McKennaThis is a datasource for Achievements that can be toggled to be viewed within a grid or list layout. Thoughts/notes This code was previously duplicated in two different ViewControllers. Should the CollectionLayout code go in here? Should the SectionHeader and layout toggle button delegate go in ...

0
Q: Extracting patches of points

R.KI would like to extract patches of points, around candidate one, at the same time I don't want a point in patch A to be existed in any other patches. These patches are extracted as shortest distances around the candidates, using Ant Colony Optimization, The candidates are: [0, 28, 56, 84, 112, 14...

11:56
@VyachaslavGerchicov If your question is actually about pointers rather than how to achieve the result, then you should revise your question to say so. My previous comment in this thread gives the answer how do it safely. You must keep the pointers valid, which means nesting withUnsafeMutablePointer code. It's ugly and should not pass code review for this case in any organization. — Chip Jarred 47 secs ago
@CaptainObvious Code doesn't work.
@CaptainObvious Needs to look at Software Engineering.
@CaptainObvious No real code.
12:13
This question belongs on codereview.stackexchange.com — Iguananaut 32 secs ago
12:35
0
Q: C typedef struct naming

potatoI'm new to C and still learning about how to style my code well. I made a linked list with two structs. I needed to reference ListNode in it's definition so I named the struct itself and not only the typedef alias, but I left ListItem an alias of an unnamed struct. For whatever reason it's buggin...

13:00
0
Q: Filter string depending on filtered & unfiltered keywords

ProtractorNewbieI have worked on a small script where I check if the given string is a filtered or unfiltered keyword. Basically if its filtered then we want to add a additional key to dict. with value True, if its not filtered then its False. Once that is done we want to return True if its filtered else False. ...

0
Q: resnet with pytorch

JayKI was studying resnet and wanted to program it with pytorch I searched for some examples(github, google) but it was hard to understand the code completely So I programmed resnet myself and it works. But I want to check just in case if I did something wrong Can I get some code reviews and if I had...

13:51
0
Q: Parsing a text file into a pandas DataFrame

badukerI have a .txt file that looks like this: SHT1 E: T1:30.45°C H1:59.14 %RH SHT2 S: T2:29.93°C H2:67.38 %RH SHT1 E: T1:30.49°C H1:58.87 %RH SHT2 S: T2:29.94°C H2:67.22 %RH SHT1 E: T1:30.53°C H1:58.69 %RH SHT2 S: T2:29.95°C H2:67.22 %RH I want to have a DataFrame tha...

0
Q: Improving php code with OOP paradigms

CelsomTrindadeI'm not that advanced in PHP or OOP concept so I'm facing some issues. I'm working on a project where it's using AltoRouter to call the functions based on the route. So I have a controller for each function that calls a class later on. For example, this is how it's done to get the list of users. ...

14:17
0
Q: Catch The Rabbit Game: How to Create Non-Repeating Randomization? (JavaScript, CSS, HTML)

Treves StudiosI've designed this game, it's my first project. It's a spin-off from "The Pig Game" in a JavaScript course. I tweaked the HTML and CSS templates of the Pig Game for the UI, but I did the game design and coding from scratch. You can play the game here: https://jeffparadox.000webhostapp.com/ I've g...

14:42
0
Q: Student council voting system

AnyonePROBLEM: I am tasked to write a program that outputs the winner/s of an election given the list of student votes. The following are the rules/conditions in said election 1.A student who is absent in the election may NOT win a seat 2. A student who already won a position could not win in another p...

0
Q: Check if two types are the same without template instantiations

Steve ZhangBelow is my attempt to check if two types are the same without template instantiations. #include <cstddef> template<class, class> struct twoTypes; template<class T> std::size_t isSame(twoTypes<T,T>*); bool isSame(void*); template<class T, class U> using checkIfSame = decltype(isSame(static_cast<...

15:21
Happy Friday!
15:32
For posterity: I made a mistake during my code review yesterday when I concluded that it also worked with Node for server-side rendering. It did not. During the course of fixing that problem, I realized that I was fixing the wrong problem. I posted an explanation as a second answer for the benefit of anyone else who might be exploring lazy-loading HTML into the DOM of an Angular app. — Ryan Porter 16 secs ago
1
Q: Feedback on Python OOP code for identifying knees in data

BOD_drummerContext (optional) In my job, we are interested in identifying particular events that may occur during the degradation of a physical system over its lifetime. Specifically, these are referred to as: Knee onset (the beginning of nonlinear degradation phase) Knee point (point after which accelerat...

Tip: do you know CodeReview.stackexchange.com? I still appreciate the link because I don't usually go there — sehe just now
15:59
-1
Q: Using a Modeless form Within a Userform as Confirmation box

a20rjuI've created a userform for an Daily expence entry project. Instead of using the standard msgbox on "click" for the "Save", "Reset" and "Close" command buttons, I'd like to use a Modeless form as a Confirmation box. Didn't add adetailed code here since I felt it wasn't necessary at this point, bu...

16:11
This might be better suited for codereview.stackexchange.com since it is functioning code. But the answer for timeouts is usually that you're not using the correct algorithm. — sweenish 49 secs ago
I agree with your points. The problem is that we are on an extremely tight deadline and the application have been asked to work on is something of a minefield. I need to constantly keep myself in check to not go on a refactoring spree and fall behind schedule. This is coming up a lot with other devs in the code review. — Desolate Planet 37 secs ago
16:24
0
Q: Mimic `super` keyword: Set `base` class and `derived` class field during instantiation

Mansoor Ahmed MemonConsider the following code: #include <iostream> struct Parent { int baseA_ = 0; double baseB_ = 0.0; Parent() = default; virtual ~Parent() = default; Parent(int a) : baseA_{a} {} Parent(int a, double b) : baseA_{a}, baseB_{b} {} auto set(int a) -> void { baseA_ = a; } auto ...

hey
@CaptainObvious Identifying what know?
@Malachi Ah, yea, I try to run CAD/CAE software over RDP.
Slightly different.
16:50
0
Q: Can I further optimize this solution for HackerRank's “Making Candies”?

Ray HamelMy C++ solution for HackerRank's "Making Candies" problem, reproduced below, is as optimized as I can make it and appears similar to what others say are optimal solutions. However, six of the test cases still fail due to timing out. I would be interested to know if there are any significant oppor...

17:15
0
Q: Anemic class that binds functionality

morleycI have cleanly separated functionality of a message bus - namely the diagnostics (optional), sending, decoding and the bus driver, I need to now bind this together and have done so with a MessageBus class. It feels anemic though, with a lot of pass through methods. On the flip side it is necessar...

17:41
0
Q: Downloading multiple log files

user1206480This code succeeds in downloading log text files from multiple URLs. Can this be made more efficient? let private downloadLogs toDirectory = let createFileDirectories (url : string) = let directory = $@"{toDirectory}\{url.Substring(13, 3)}" try if not (Directory....

 
1 hour later…
18:57
0
Q: Optimizations on a function that fIlters a list of connections

Oscar AnthonyHello fellow programmers, I am currently implementing a function and wanted to know if there was anything I could change to simplify the code, make it more readable, or to optimize the running time and memory usage. My current implementation works as expected, without any bugs. The function I am ...

0
Q: How to propagate errors from different classes for defining chess lines with inheritance

eguneysI have these inputs: // a line definition line fen // played moves for a line definition line moves // another line definition `line2` branching off of `line` and adds more moves line2 line moves After I input these definitions, I want to query the state for a line after making some moves. The...

0
Q: My first program in C. A simple command-line calculator

MirkoZeroI've recently started programming in C and as my first serious program I thought I'd create a simple calculator. To make it a bit more complex I decided not to use the functions included in math.h (like pow) but to create these functions by myself. Let me know if there is something I can do to im...

19:22
0
Q: Idea for writing asynchronous data processing chains easier (similar to `ReactiveX`) and its implementation

jay kI'm writing my own library, that is for asynchronous network communication. and then, wanna write my own HTTP proxy server for load-balancing connections to backend servers with it. when I'm using docker at my work in company, I thought that "if the apache have REST API for adding/removing proxie...

0
Q: Binary Search like algorithm to find first zero bit in an array

SebastianI have a byte array, in this array I would like to find the first zero bit. The array works like a bit map and the bits will be set in a continuous order. Like 00000 -> 10000 -> 11000. Currently my code looks like this Span<ulong> span = MemoryMarshal.Cast<byte, ulong>(spanByte); int min ...

 
1 hour later…
20:29
Seeing as you don't have an actual problem, you might be better off posting your question on Code Review Stack Exchange. It's a great community with people willing to give feedback about your code. — Emiel Zuurbier 39 secs ago
 
1 hour later…
21:30
0
Q: Code to generate a random date of birth which will always represent an age less than 18 years from current date

philomath I want to generate a random date of birth [mm/dd/yyyy]which will represent an age equal to less than 18years old My requirement is to dynamically generate test data [date of birth] to negatively test a system which needs a date of birth (age) to be always greater than 18 years old The system whi...

22:10
Moved it to codereview stackexchange.Thank you all — philomath 38 secs ago
22:38
0
Q: Understanding import/no-cycle problem in eslint

Cristian FlórezI have a some code in which eslint thrown an error of the type: import/no-cycle, but I don't understand where this cyclic dependency comes from. The exact error thrown is: ESLint: Dependency cycle via ../types:7=>./Jobs:1(import/no-cycle). File 1. jobs/Jobs import { AuthJobs } from './Auth'; exp...

23:12
0
Q: Prepare Bunnies Escape

tachyonCan't figure out what's going wrong with my implementation provided below. My approach is roughly as follows: Find out the set of penetrable walls (weak_walls) (wall with at least one adjacent neighbor is free if weak_walls is empty (Any modification is useless) return minimum cost using BFS Oth...


« first day (2883 days earlier)      last day (1432 days later) »