« first day (2938 days earlier)      last day (1062 days later) » 

12:02 AM
RELOAD! There are 7587 unanswered questions (89.4312% answered)
 
12:15 AM
I’m voting to close this question because it is asking for a code review. The question belongs on codereview.stackexchange.com. — Life is complex 13 secs ago
 
 
3 hours later…
3:34 AM
0
Q: How to refactor my long method of rails

Kamal PanhwarI have wrote following solution for one answer but I want to refactor to make it more simple and readable. I am receiving params sample_params = [{ user_id: 1, email: 'example1@example.com' }, { user_id: 5, email: 'example5@example.com' }, { user_id: 13, email: 'example13@example.com'}] I want...

 
4:04 AM
Monking
 
 
1 hour later…
5:40 AM
Could you please post this on Code Review? — adiga 13 secs ago
 
5:56 AM
ok I have posted it codereview.stackexchange.com there. — student 7 secs ago
 
0
Q: Next word prediction with ngram, python

studentI need my code to be reviewed if there is any mistake in my code, as I am wondering of getting 14 perplexity rate, is it correct? words = text.split() print('Number of words in text file :', len(words)) # Train on 80% f the corpus and test on the rest split = int(80*len(text)/100) train = text[:...

 
6:30 AM
0
Q: Using Numba works slower than not using it for my Python code

SennaI thought this community is better place to ask my question so I ask here rather than at StackOverflow. Recently, I learned that Numba can make Python function which uses numpy modules and for loops super faster so I was trying to implement it to my code in order to optimize execution time. Howev...

 
 
1 hour later…
7:31 AM
this question might be better suited for codereview.stackexchange.comJan Wilamowski 36 secs ago
 
8:02 AM
but this question seems best suited for codereview — Jean-François Fabre ♦ 58 secs ago
 
Monking
 
Thanks had not heard of codereview! beter check it out thanks for the tips though! — Joni Joni -al 58 secs ago
 
0
Q: My code for a LocalBinaryPatern in python is running very slow. Any tips?

Joni Joni -alMy code for a LocalBinaryPatern in python is running very slow. I tried optimizing it with tips from online. I'am still getting used to python, and programming in General so any tips are very welcome! Here is the code: def localbinarypattern(image, radius=2): h, w = image.shape if radius ...

0
Q: How to process webhook request coming from a 3rd party application?

Amit YadavI need help to evaluate weather i am doing it right or is there a better way, the scenario is an 3rd party application is sending an webhook request after a successful payment but the problem is that sometimes this application may send the same notification more than once.so it is recommended to ...

 
8:26 AM
I’m voting to close this question because this PROBABLY belongs on Code Review, another site in the Stack Exchange network. — AndrewL64 57 secs ago
 
8:59 AM
@AndrewL64 The existence of Code Review doesn't change Stack Overflow's rules. Only close questions on Stack Overflow which are off-topic on Stack Overflow. — Peilonrayz 5 secs ago
 
0
Q: Wrapper to mount partition before launching executable

outoftimeSolved task is pretty straightforward: mounting partition if not mounted already, to start executable. There is a couple of checks and notifications because it is supposed to be launched from X and there are no way to see stdout/stderr stream. I have started with much larger version and a lot of ...

0
Q: Removing Loop from Numpy XOR

GalacticPondererI have been playing around with numpy and matplotlib. My little project was to create a scatter plot ranging from -1 to 1 on both X and Y, but where the shading is done with the XOR scheme. The following is the code that I have implemented (it is in a cell of a jupyter notebook, hence the trailin...

 
9:37 AM
There are several questions rolled into one post here, which is unlikely to attrach much help on SO. If your code is compiling and running, you make be better of posting it on Code Review to ask about optimisation and improvements. — Martin 14 secs ago
 
 
1 hour later…
10:41 AM
1
Q: Optimize K-Mean for large number of clusters

Ling GuoI am writing a Python code for KMeans clustering. The aim of this post is to find out how I can make my below mentioned code optimal when the number of clusters is very large. I am dealing with data with tens of millions of samples and scores of features. The number of clusters that I am talking ...

 
10:54 AM
@JanWilamowski what's codereview.stackexchange.com ? Do you think I should post my question there ? — Marwan Lkd 25 secs ago
 
11:06 AM
0
Q: How to make python3.7 only accept numbers and not letters?

Friendio1 NextNum = input("what numbers do you want to sort?") NumToOrder = [] while NextNum != ("stop"): if #input is not a number#: print ("sorry, you cannot type this") else: NextNum = input("and then?").lower() if NextNum != (stop"): NumToOrder.append(NextN...

0
Q: How to keep current HtmlElement active and change its properties?

Megan ClercI have a simple class that listens click and draws two points on the page. If first point is not exist it is drawn. When second point is present it should be changed after each click. I dislike this part of code: this.point2.element.style.left = `${e.x}px`; this.point2.element.style.top = `${e.y}...

 
11:16 AM
I think codereview.stackexchange.com is a better place for this question — Programmer just now
 
11:31 AM
0
Q: Simplify conversion of uint8_t[16] to std::array<unsigned char, 16>

Richard NeumannI have the following working code to get IPv4/v6 addresses from host names: #include <array> using std::array; #include <iostream> using std::cout; #include <netdb.h> #include <stdexcept> using std::domain_error; #include <sys/socket.h> #include <string> using std::string; #include <vector>...

 
Requests to review working code might be better sent to codereview.stackexchange.com ... having said that: there is no way of not having an infinite loop. The only other thing I could see: if that pattern is really like this, you could be using a List<java.util.Supplier> that you fill with with lambdas like () -> someMethod.getValue();. Then, instead of doing ONE-IF-PER-METHOD, you only loop that list of suppliers... — GhostCat 39 secs ago
 
12:21 PM
0
Q: Fixing Reference Inequality Between ComboBox Data Source and Property of Listbox's SelectedItem

Joshua White In form #1 have a listbox bound to an ObservableCollection<EmployeeModel> as its data source. EmployeeModel has a property called Status of type StatusModel. StatusModel has a string property called Name. In form #2 I have controls for editing information about the employee selected in form #1'...

 
 
1 hour later…
1:41 PM
Usually CSS is included in head section and it is part of generated page's code (not always in place where you want to use it. Without knowing your project we cannot tell where exactly you have to put it, just can suggest using browser's code review and inspection tool you can verify that CSS was included at all, or not. — biesior 33 secs ago
 
1:56 PM
This question is not in scope for Stack Overflow. Try Code ReviewNicholas Hunter 1 min ago
Please notice that cross-posting verbatim questions to multiple SE sites is not allowed. I kindly suggest you delete this now. — desertnaut 20 secs ago
I’m voting to close this question because it is not about programming as defined in the help center but about code review (and already cross-posted). — desertnaut 49 secs ago
 
2:27 PM
0
Q: Efficiently write in a file in C++

And9686I've made a program which reads from the console and writes it in a .txt file. This programm should write in a file with \n. #include <iostream> #include <fstream> #include <string> using namespace std; int main2() { ofstream fich("file.txt"); if (!fich) cerr << "Error!\n"; ...

 
2:44 PM
This question is out of scope for Stack Overflow. I suggest you try Code ReviewNicholas Hunter 19 secs ago
 
2:56 PM
If this is working code it should fit better to codereview.stackexchange.com IMO — Roman Vottner 58 secs ago
 
3:13 PM
Monking!
 
3:30 PM
Monking
 
@KevinLee LOL. That's harsh! When I wrote that I was on the DevOps team and did a lot of throwaway testing of builds and merges, daily. As a developer I still do that sometimes but admittedly it's no longer "every day". Nowadays it's usually when I catch minor things while doing code reviews, and I fix them up and amend or rebase other dev's branches for them. When I'm done I instruct them to do this command on their own local branch so they can grab my changes before addressing the other suggestions in their PR. That's probably weekly, at least. ;) — TTT 18 secs ago
 
3:46 PM
Monking
 
4:07 PM
0
Q: Writing a clean Predicate Builder

sophieI have an inner class for filtering: private class RegSpecification implements Specification<Reg> { private final transient RegFilterDTO filter; private transient Predicate predicate; private transient CriteriaBuilder cb; public RegSpecification(RegFilterDTO filter) { th...

0
Q: Return character frequency in the order of occurrence

Maniv GProblem: Given a string aaabbcccaad print the no. of occurrence of the character in the same order in which the character occurred. Expected output: (a, 3), (b, 2), (c, 3), (a, 2), (d, 1) The approach: Loop through each character. When the next character is not same as the current character, rec...

 
4:58 PM
0
Q: Is there a better way to condense the while loop?

newbieI have been trying to write a number guessing game and I am trying to condense the second while loop when guess =! random_number. I can't figure out if there is any better way to shorten the code but to still achieve the same result. I wonder if someone is able to help me out. If there's anythin...

0
Q: Android APP User class implementation

JimmyHuThis is a follow-up question for Android app class serialization. The implementation of User class has been updated and the functionality of null string checking, password strength checking and the correctness of date formatting are considered in this post. The experimental implementation Projec...

 
5:48 PM
0
Q: A C# hangman game

user242558So i made this c# hangman game... I would like to know what you all think about it. This is a pretty basic but still gets the job done let me know what you think. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace idontfuckingknow { class thehange...

 
CodeReview is probably the right site to ask for this: codereview.stackexchange.comDocDriven 13 secs ago
if your code is working and you just want to improve it, you should post to Code Review Site instead — yedpodtrzitko 30 secs ago
I’m voting to close this question because this would be a better question for codereview.stackexchange.comWOUNDEDStevenJones just now
 
6:13 PM
0
Q: Factoring numbers by 2,3, and 5

Eny1_1This code is to factor completely by 2,3, and 5. I would like any input I can get, also when factoring by a number like 999000 it can do it completely but, when I give it a number like 369 it cant any advice on this?. s is the input, S is the square root of s, and w is an extra integer I use to ...

0
Q: Convenience function wrapping C++17&#39;s std::sample for distance=1 case

Nathan PiersonC++ has the function std::sample which randomly samples from a range and places the results via an output iterator. My goal is to create a utility that directly returns a single value in the event that we only want to sample a single random element from the container. #include <iostream> #include <...

 
6:38 PM
0
Q: I wrote this code but my output is not in 2D as it should have been, and i don't know how to fix it

sara millerCan someone help me with this code I've been stuck at. I wrote my code completely but I'm not getting the expected output from the question. when I put in my values they are not in a 2D list for some reason Functions: def matrix_rotate_right(a): res = [] for i in range(len(a[0])): ...

 
7:03 PM
1
Q: C: Find and Replace in a text file (by a new programmer)

Ahnaf AbdullahI'm new to C as in I've only studied it for a year and it's my first language. I still don't know how to handle real world code and so would like to see how a real world programmer would write up a program that can find and replace text in a text file. It took me 3 days to figure this out and I'v...

0
Q: Couldn't Decrypt Encrypted text using Crypto

Zoronoso I am trying to encrypt a text (eg: some HTML Code) and then decrypt it again when needed... but when I try to decrypt the hash with specified iv and salt it fails with the following the error: node:internal/crypto/cipher:119 this[kHandle].initiv(cipher, credential, iv, authTagLength); ...

 
7:52 PM
possible answer invalidation by newbie on question by newbie: codereview.stackexchange.com/posts/260988/revisions
possible answer invalidation by newbie on question by newbie: codereview.stackexchange.com/posts/260988/revisions
 
@Duga thats okay - OP added TY after closing code fence
 
8:18 PM
0
Q: Vue.js checkout stepper

Razvan ZamfirI have made this small checkout stepper with Vue (v 2.x.x): var app = new Vue({ el: "#cart", data: { stepCounter: 1, steps: [{ step: 1, completed: false, text: "Cart" }, { step: 2, completed: false, text: "Shipping" ...

 
@SᴀᴍOnᴇᴌᴀ And the question went hot... :/
 
9:08 PM
0
Q: Trying for an efficient and readable heap-sort implementation

mastmartelliI'm looking for any sort of optimization and/or conventional practice tips, such as using the appropriate data types and naming my variables appropriately. #include <iostream> #include <vector> #include <cstdlib> #include <ctime> constexpr short MIN_ELEMS = 3; constexpr short MAX_ELEMS = 15; con...

 
9:59 PM
0
Q: python Chatroom/Codehelp through the terminal

TheodoreI created a system that allows individuals to ask questions about code, and chat. I wanted to make this system smaller and better because this is easy to bypass for some reason. The modules/packages I used for this chatroom project import os import time Now the actual script that contains about ...

 
10:58 PM
I think this would be more appropriate for codereview.stackexchange.comevolutionxbox 56 secs ago
 

« first day (2938 days earlier)      last day (1062 days later) »