« first day (2389 days earlier)      last day (1611 days later) » 

12:00 AM
RELOAD! There are 6253 unanswered questions (90.0823% answered)
 
12:55 AM
0
Q: Optimizing a TFxIDF vectorization - Python 3.x

Jerry M.I am attempting to train a number of classifiers to test their performance with classifying tweets as being from a political bot, or not (a binary 0 or 1 classifier). My data is being read in via a csv file, with 200,000 rows, that looks like this: username,tweet,following,followers,is_retweet,...

 
 
1 hour later…
2:50 AM
possible answer invalidation by Confettimaker on question by Dewamuval: codereview.stackexchange.com/posts/232552/revisions
 
3:38 AM
0
Q: String printing macro in NASM Win16 (No 21h)

T145Building on the knowledge I've gathered from prior posts on string manipulation in NASM Win16, the following is a macro implementation based on it. Do your worst (which is technically best)! ; Prints a string ; %1 = constant string or 0-ended array %macro prtstr 1-2 pusha %ifstr %1 ...

 
 
2 hours later…
5:36 AM
Monking
 
 
3 hours later…
8:47 AM
0
Q: Many if's with simple comparison. Feels very redundant

sirzentoI got a function that checks if a user can access a specific url. The functions parameter are the url and a, lets say, power level. The conf object has stored power levels for comparison with the users power level. The function is very simple, you will get what I want :) function isAuthenticat...

 
9:00 AM
Monking
@Duga Why was that approved? I'd say it's an attempt to reply and should be posted as comment or part of an answer.
Second opinion anyone?
On a completely unrelated note: I suspect we need to rewrite the LCC close reason to prevent it from being abused as UWYA. I think we can do this, might write a meta on it later.
6
 
9:44 AM
This question would be more suitable for codereview.stackexchange.comNetwave 45 secs ago
possible answer invalidation by Roxy'Pro on question by Roxy'Pro: codereview.stackexchange.com/posts/232465/revisions
Also, code reviews are off-topic here. For working code (this is a hard requirement) see the Code Review SE site. — Some programmer dude 33 secs ago
 
10:15 AM
What problem are you facing with the above code? If the code is working and you want a review please consider codereview.stackexchange.comRishikesh Raje 10 secs ago
 
10:27 AM
@tmptplayer I suggest you to ask a new question with examples or a code review on codereview.stackexchange.com as it is unclear to me what you exactly think is more beneficial then this method. Seems like you have to create a property for each translation key and implement that in each implementation of the interface. How can this be more maintainable then an exportable option like Resx Manager provides? — CularBytes 26 secs ago
 
0
Q: I want my code to count to 25 with the gps, but it requires no input and doesn't say anything when ran

ShadowXLWhile attempting to study for my upcoming midterm, I was given a practice question "Very Similar" to the exam. The question is : 4.) Complexity. The vehicle is a complex machine. The system needs to be in near constant contact with each other, otherwise there may be a problem. Write a program whe...

 
10:48 AM
If you're looking to improve the code, you could try posting it at codereview.stackexchange.com rather than here, perhaps? — simonalexander2005 27 secs ago
 
0
Q: Registry Perfomance issue for HKLM

Sankar SAm using below code to retrieve nodes and values.It is taking 20 mins to retrieve the nodes and values of HKLM. 'Getting nodes Private Function f_GetSubkeys(ByVal WindowsRegistryKey As RegistryKey) As Integer For Each subkeyName As String In WindowsRegistryKey.GetSubKeyNames ...

 
This question seems more adequate to be at Code Review than here. Up to now your question is kind of vague, making it hard to see what you are doing and where the problem is. — Rockcat 57 secs ago
This question seems more adequate to be at Code Review than here. Up to now your question is too related to your own code. — Rockcat 47 secs ago
This question seems more adequate to be at Code Review than here. Up to now your question is too related to your own code. — Rockcat 27 secs ago
 
11:24 AM
Hi @Rockcat I don't think this would be On-topic for Code Review. CR is all about reviewing code that already works as intended. Once the OP has figured out what's causing their issues and fixed it, we'd be happy to review the final result. — Kaz 29 secs ago
 
0
Q: TypeError while fetching the user profile in Redux

Chihab AhmedI have been facing this problem which is not working for me at the moment I basically have an auth app that I am able to register and login however When I am trying to fetch the profile data I am facing a TypeError( Cannot read property 'FirstName' of undefined. In the redux tool the isAuthent...

 
11:41 AM
@Rockcat there is an exception displayed, that is not suited for Code Review, rather it should be closed as a dupe of the NPE question. — luk2302 58 secs ago
 
Monking
 
I think this belongs in codereview — xception 14 secs ago
 
-1
Q: populate data jquery

sssstthis is not populating the data in table . plz help me correcting my code. javascript code function fetch_data() { var dataTable = $('#user_data').DataTable({ "processing" : true, "serverSide" : true, "order" : [], "ajax" : { url:"fetch.php", type:"POST" } ...

 
So you should focus on the actual questions. 1) Is whatever you’re doing there involving multiple threads and requiring synchronization on your side? (That’s obviously a question regarding the redis API) 2) Is whatever you are doing sufficient to provide the necessary synchronization? (That’s obviously a code review question). If not → fix it. It’s irrelevant whether or how the problem materializes. Even if it happens to do the intended thing now for a while, the problem will materialize some day. Neither of these two questions are about the HashMap implementation. — Holger 27 secs ago
 
12:32 PM
0
Q: Turtle controller with simple instruction set

mattrea6I've made a controller for Python's Turtle. The controller essentially defines an 'instruction set' so that commands can be recorded in a text file and then executed sequentially by the turtle. It acts in a similar way to (very basic) assembly code in that it executes these instructions in order ...

 
12:53 PM
0
Q: Writing better the if-else structure in Python

madik_atmaAfter each query with the respective query (e.g. 1) value I would like to give the respective value (e.g. 2) to the new variable new_val. But it looks very inefficient. are there any better options here? if int(laststring_goal) == 1: new_val = 2 ...

 
1:14 PM
Greetings, Programs.
 
1:26 PM
@Çöđěxěŕ I'm pretty sure the people at Code Review wouldn't like this question either. — DavidG 31 secs ago
 
1:47 PM
0
Q: Efficient Timeout without synchronization

Michele MariottiI'm trying to create a timeout for a blocking operation, a InputStream.read() in the specific case, using a timeout thread without synchronization. This is needed to avoid that a blocking operation will last forever. This should be a typical use case: try(InputStream input = request.getInputSt...

 
2:41 PM
Wow, this is laying it on strong: academia.meta.stackexchange.com/q/4622/48772
3
 
JAD
hmm
 
Code Review, but read their guidelines first — Sayse 42 secs ago
 
3:04 PM
> "The purpose of this question is to politely request that CMs and SE employees stay the hell out of our community."
2
Quite an intense response indeed.
 
1
Q: Idiomatic use of lifetime parameters?

Rich ApodacaMy goal is to implement a function that accepts a Follower object that will be used to report progress through a complex function (a depth-first traversal of a graph). Here's my attempt: pub trait Follower<'a, N> { fn root(&mut self, node: &'a N); } pub fn depth_first<'a, N>( node: &'a ...

 
3:29 PM
0
Q: How to check list of environment variable in python?

Naveen KumarI have requirement to check list of environment variable in Linux. Based on environment variable, exit code will be different. how to optimize the below code? def check_mandatory_envs(): if "ENVCONTEST_1" not in os.environ: exit(125) if "ENVCONTEST_2" not in os.environ: e...

 
4:03 PM
As others have said, this question will likely end up closed as opinion-based. However, if you have real, working code that actually solves a problem and you're interested in feedback in any/all aspects of it, consider putting it up for peer review on Code Review. — Mathieu Guindon 55 secs ago
 
0
Q: Algebraic Expression Calculator (using reverse polish notation) in C++

ElizSo, I have this code which works correctly, but I need to adjust it according to task. I tried to change 'string' to 'char array' (so that an expression was stored in the array) but ran into issues very quickly. I would love to get some advise on how to fix it. And also please provide some inputs...

 
@Mast What exactly do you want me to do here? codereview.stackexchange.com/questions/232458/…
The answer that the asker posted indicates one more reason to VTC.
FYI I upvoted the answer.
 
4:20 PM
Ryan Donovan on November 18, 2019

Journalists have an uneasy relationship with technology. On one hand, journalism at the highest levels still focuses on print distribution, a technology hundreds of years old. On the other hand, even the Gray Lady has a snazzy mobile app and  stories custom made for virtual reality. Traditional news outlets are increasingly discovering the power of interactive journalism. To do that right, you need a team of people working on a story—a journalist, a data scientist, a programmer, and a UX designer. It’s rare that you get all four skills in a single person. …

 
4:55 PM
possible answer invalidation by Jefferson on question by Jefferson: codereview.stackexchange.com/posts/231488/revisions
Thank you for your feed back. I will oblige by all the conditions. But what is exactly unbroken code? Also, I click on the Code Review, but I did not find links to more info. Best regards. Guy — Guy Mercier 33 secs ago
 
@pacmaninbw Never mind, I have a splitting headache so I'm not about to argue the point.
 
@Mast Didn't mean to cause you any pain.
 
lol
Not your fault.
Work.
 
Monking
 
5:12 PM
Monking @skiwi
 
5:31 PM
0
Q: String printing macro in NASM Win16 Assembly (No DOS\21h)

T145Building upon the knowledge gained from my other experiments, here is an attempt at making some macros to handle string printing and definition. Reference this post for building instructions. string.asm org 100h %include "string.inc" puts hello ret string hello, "Hello World!" string.i...

-1
Q: Which is faster, (n==0 or n==1) or (n*(n-1)==0)

Isaac YIU Math StudioThis is the first time for me to ask a question in this site. Recently, I was learning python 3.x and I got a question... Which is faster ? if n==0 or n==1: or if n*(n-1)==0: Similarly, for a,b,c,d are numbers, which is faster? if n==a or n==b or n==c or n==d: or if (n-a)*(n-b)*(n-c)*(...

 
5:49 PM
 
0
Q: Iterate through Expression Tree

RhaokielI'm trying to build an iterator (enumerator) that can select specific elements in an Expression tree by traversing the tree and deferring further iteration until needed. My following implementation intends to keep it simple by leveraging the ExpressionVisitor. But since a visitor-pattern uses rec...

 
6:33 PM
-1
Q: Jacobi and Gauss-Seidel Iterative Method for Solving Linear System

mattsprestigeI have been working on creating a program that solves linear systems of equations for the Jacobi and Gauss-Seidel iterative methods. (Link to the methods: https://www.cis.upenn.edu/~cis515/cis515-12-sl5.pdf) The specific problem I have with my code is that it works for 2 by 2 matrices but does no...

-1
Q: Property typed lodash compose function

ThomasReggiimport * as _ from 'lodash'; namespace Compose { export type ReadFuncs = readonly ((x: any) => any)[] export type Tail<T extends ReadFuncs> = ((...a: T) => void) extends ((h: any, ...r: infer R) => void) ? R : never; export type Func = (...any) => any export type Funcs = Func[] ...

 
6:53 PM
0
Q: Number of unique substrings of particular length of a binary string

Nehal SameeQuestion: A binary string is given with only 0's and 1's. A number n is also given as the length of a sub string to be considered. It is to find the number of unique substrings. My algorithm: The ways I followed: (i) First, I extracted out the sub string of length n and converted it into a numbe...

 
7:13 PM
0
Q: Compiling Go with python

LudisposedI've made a small script to compile go code with python And the end result is not something I'm quite happy with, because what's been bugging me is: It seems overly complicated I'm worried the nested if else with f string are unreadable Am I using the subprocess module the correct way? Any a...

 
7:30 PM
This may be better suited for codereview.stackexchange.comJeremy Harris 15 secs ago
 
8:15 PM
0
Q: Writing a bittorrent client in JavaScript

calvinesI'm trying to write a JavaScript BitTorrent client in Node.js in order to get more familiar with the language and ecosystem. I don't know how often people use classes in JavaScript since I feel like the overall approach is to try to hide the least state possible and embrace some of the functional...

1
Q: spread values to an object (Computed property names)

zb22I would like to get a review/suggestions of something, I have a function which creates an array of objects for a Drop-Down component (react-select). The function gets data, valueKey, labelKey and otherInfo from an object, and creates the array of objects based on the valueKey and the labelKey...

 
8:35 PM
0
Q: Validate if either or both of two fields has been provided, as a ValidationAttribute

MPelletierI have a binding model where at least one of two fields must be specified. I can't just set them both as [Required]. Here is what I came up with: using System; using System.ComponentModel.DataAnnotations; namespace MyApp.Utils.DataAnnotations { [AttributeUsage(AttributeTargets.Class, AllowM...

 
If this is working code, see Code Review. Otherwise, please edit to explain the specific problem. — jonrsharpe 25 secs ago
 
8:55 PM
0
Q: Better way than setInterval to wait for an image load?

martixyThis is really a simple affair, I just wonder if there is a better way to do it: let el = document.querySelectorAll('#comic img'); let loadPromise = new Promise(function(resolve, reject) { let ticker = setInterval(() => { if (el[0].complete) { clearInterval(ticker); ...

 
9:16 PM
0
Q: Function that provides callback for promise or non-promise

ThomasReggiBelow I created a use function that wraps a promise or non-promise, providing the a value callback all-while preserving the original function type. type ThenArg<T> = T extends Promise<infer U> ? U : T type Func = (...args: any[]) => any type RelatedThen<PP, V> = PP extends Promise<infer U> ? Pr...

-1
Q: How to apply best practices to javascript code

gabriel Hello i started studying javascript, nodejs, reactjs front end and I have some questions about best practices to apply in this javascript world, I would like to ask opinion regarding my code how could I improve Starting with an example I have 2 functions, with different ways of handling promise...

 

« first day (2389 days earlier)      last day (1611 days later) »