« first day (2264 days earlier)   

12:00 AM
RELOAD! There are 6252 unanswered questions (89.7249% answered)
 
 
1 hour later…
1:03 AM
0
Q: Converting string of hex values to numpy array of specific shape

Anson BiggsI am working on a project that needs to take a .bdf font file and turn it into a Numpy array. I am using the code below to turn the bitmap for the font into a numpy array. It currently works, I just feel that it's nearly impossible to read but I'm not sure if there's a better way to do it. How ...

 
Hello! This should be on another site in the Stack Exchange network named Code Review. Thank you! — MilkyWay90 34 secs ago
 
1:23 AM
0
Q: Project Euler Problem # 17, Number Letter Counts, in Python

emadboctorProblem statement: If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total. If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters would be used? NOTE: Do not count s...

 
2:04 AM
If your code works and you're looking for advice on how to write it better, Code Review is the appropriate site. — Barmar 39 secs ago
 
2:22 AM
0
Q: Quick sort with immutable array in JavaScript

NgmI have the following implementation of quick sort (assuming an immutable array). Comments? const reorder = (arr, pivot) => { larger = [] smaller = [] for (i = 0; i < arr.length; i++) { if (arr[i] < arr[pivot]) { smaller.push(arr[i]) } else if(arr[i]>arr[pivot]) { larger...

 
possible answer invalidation by kkawabat on question by kkawabat: codereview.stackexchange.com/posts/224126/revisions
 
3:02 AM
0
Q: Query is running slow even when the tables are indexed

hulahoopThe below query takes roughly 2 minutes for almost 2000+ records. The tables are indexed. what might be causing the issue? SELECT S_MATRIC_NMBR PRIMARY_ID, NVL(INITCAP(S_NAME), ' ') LAST_NAME, ( CASE S_SEX WHEN 'M' THEN 'Mr' WHEN 'F' THEN 'Miss' ELSE '' E...

0
Q: run functions for each row in the python dataframe

elisaI want to get table names and column names from queries in a dataframe. The dataframe is like this: Date Query 29-03-2019 SELECT * FROM table WHERE .. 30-03-2019 SELECT * FROM ... JOIN ... ON ...WHERE .. .... .... 20-05-2019 SELECT ... and I run function to that dataframe...

 
3:24 AM
Well, if you have a working code and is looking for a code review, you can check the site guidelines of codereview.stackexchange.com. However, it seems that this kind of question does not fit this site since you don't have any attempts and the specific roadblocks you're running into — Andreas 56 secs ago
This doesn't help. Try to create at least a part of the code with ifs and then ask here or maybe better at codereview.stackexchange.com if it can be optimized. — Michael Butscher 48 secs ago
 
4:04 AM
1
Q: swift - static variables / passing data between view controllers

andyTLDR: (Sent here from StackOverflow) The code I've presented is working. I'm looking for a code review from more experienced devs to know if what I have done is OK, and to learn if there are better practices I should focus on to expand my skills and understanding. Hello. I have completed versi...

2
Q: Quicksort in JavaScript assuming an immutable array

NgmQuick sort in JS assuming an immutable array: const reorder = (arr, pivot) => { let larger = [] let smaller = [] let equals = [] for (let i = 0; i < arr.length; i++) { if (arr[i] < arr[pivot]) { smaller.push(arr[i]) } else if (arr[i] > arr[pivot]) { larger.push(arr[i]...

 
@SᴀᴍOnᴇᴌᴀ That's dedication! Great intervention.
 
 
1 hour later…
5:35 AM
possible answer invalidation by AlexV on question by Anson Biggs: codereview.stackexchange.com/posts/224256/revisions
 
6:08 AM
thanks for answer, i will add this and suggestions I got on code review. — SqueakyDeath 10 secs ago
 
6:23 AM
0
Q: Find the most occuring string in array with their required level

Mohammed Sharooqinput = ['A','A','B','C','C','A','A','D','D','D','D','D','E','A','A'] requiredElements = 3 output = ['A','D','C']. it is possible to change the required elements when it is changed to 4 it must return array of four commonly occuring elements

 
6:43 AM
0
Q: Angular - The complex flow of renewing expired JWT token

pedramThis the flow: login get two tokens (access token and refresh token) and two expiration time (one for each token) from server from now on the Angular application can determine if we're logged in by monitoring the refresh token expire time. if the refresh token is still valid then it doesn't mat...

 
7:23 AM
0
Q: pid connection autokiller

LinnyI was messing around with ssh and decided to write a python program that scans for any connections that aren't from the system, then terminates them. It works well for many connections from my iMac to my MacBook. A more in-depth explanation of the program is written at the top of the code. I'd ap...

 
7:35 AM
I agree with @Maroun. Also there's codereview.stackexchange.com if you're looking for feedback on your code. — abdusco 42 secs ago
 
0
Q: Importing language modules mid-code: Bad practice? Is there a smarter way?

John ZhauI'm thinking of importing separate language modules (or config data) to be used when chosen by the user. Everything else besides the displayed texts should stay the same, and (I think) this should help save memory since only the language used is being imported and read. Below is some sample code...

 
8:23 AM
0
Q: A get endpoint returned data from file multiplied by parameters from query

mprzemoDoes anybody know how to avoid error: Got AttributeError when attempting to get a value for field data_from_file on serializer DataSerializer in below code? # models.py class Data(models.Model): data_from_file = models.CharField(max_length=20) # serializers.py class DataSerializer(serialize...

 
8:47 AM
If you want comments for how to improve code try: codereview.stackexchange.comPeter Collingridge 54 secs ago
 
 
1 hour later…
9:55 AM
I'm voting to close this question as off-topic because if you want working code reviewing then you should post to codereview.stackexchange.comhardillb 8 secs ago
@hardillb This question, in its current format, is clearly off-topic on Code Review too. — Erik A 36 secs ago
 
10:15 AM
No, you cannot selectively turn off language features for yourself in Java. This would need to be enforced in code review. Maybe you could write a static analyzer for this and hook it into your build. — Thilo 55 secs ago
 
11:04 AM
You should ask yourself why you need to do this in the first place. Usually it's because your application model isn't designed to fit your application needs, but rather to fit whatever shape the data you get from the server has. If your model had fit your application, you would probably have nested update functions for each type that construct the new model level by level, rather than global functions that each does everything in isolation. This is an architecture question that is probably too broad to properly answer here. You might try a forum or Code Review instead. — glennsl 41 secs ago
 
Monking
@Duga That's fine.
 
12:01 PM
I'm voting to close this question as off-topic because it belongs to Code Review forum. — sophros 43 secs ago
Hello W.D and welcome to Stack Overflow. As sophros said, you should ask this question here. Anyway, you should explain the problem in your post, most people don't want to watch youtube to understand it, and explain your approach. — Corentin Limier 14 secs ago
 
12:18 PM
Monking
 
12:57 PM
 
0
Q: Unix-Chat-Server making communication between terminals possible

TVSuchty(You might get eye-cancer today. So if you do not feel ready for this. Leave!) This Server is trying to handle Clients communicating with each other. Because I was not willing to actually give every client a name, they are named by their socket's file descriptor. This is my first application whi...

0
Q: Find cycles in Graph using Union Find Algorithm on Adjacency List Python

justanothertechdudemy code detects if a cycle is present in a graph using Union find algorithm with Weighted tree analysis and path compression. It works and I have included test cases. # check cycles in graph using union find # weighted tree balancing added from collections import defaultdict class graph: d...

 
1:22 PM
0
Q: Enhance Performance C#

Diaa ElkhateebI have the below code that performs well until input size reaches 1000. After that, it takes more than 2 milliseconds to finish. Any help? using System; using System.Collections.Generic; using System.Linq; class Program { public static void Main(string[] args) { var numbersCount = int.Parse(Con...

 
 
1 hour later…
2:25 PM
possible answer invalidation by johnashu on question by johnashu: codereview.stackexchange.com/posts/224203/revisions
 
Alessio Civitillo on July 16, 2019

import seaborn as sns

sns.set(style=‘white’)

plt.figure(figsize=(12, 8))

plt.title(‘Cohorts: User Retention’)

sns.heatmap(user_retention.T, mask=user_retention.T.isnull(), annot=True, fmt=‘.0%’);

 
codereview.stackexchange.com is probably a better fit for code review questions. — Quentin Hayot 24 secs ago
 
2:45 PM
@Feeds Noice, the preview is some code that's half way through the post...
 
If the code works, please head over to Code Review to ask instead. — Andy Turner 55 secs ago
this should be on code review stackexchange, since it's not a programming problem. — BlueRine S 21 secs ago
 
3:01 PM
0
Q: Find Todos by Line Number (or any other reference) in Python

johnashuI write a lot of TODO's but I never keep track of where they are. This program will search through files (and folders if needed) and find any TODO comments and their line number. The details will be printed to the screen and a file will be generated in the folder which is a csv of the files and...

0
Q: Finding the next available filename

TomSelleckWe're having a small debate in work about the following piece of code: private string GetNextFileName(string fileName) { int index = 1; string nextName = $"{fileName}_{index}.png"; while (File.Exists(nextName)) { nextName = $"{fileName}_{++index}.png"; } return...

0
Q: Are there anyway to reduced complexiy of following java code?

umaI need to reduced following java method complexity according to sonar acceptable level. now ,it given this like sonar issue. need some expert help to do this. public List<X> Y(final DateTime treatmentDiscontinueTime, final List< P> vali...

 
3:21 PM
-1
Q: In ionic i want to get the firestore doc id

welkroIn ionic, I want to get the firestore document id to display the stored information of the user who logged in. I set the documents name to the user's email like Collection[name] = Users Document[name] = user@zzzz.zz Here is how i set the document name in auth.ts import * as firebase from 'fireb...

 
@Peilonrayz hmm... perhaps the preview shows the first 5 non-empty paragraph tags...
 

« first day (2264 days earlier)