« first day (2261 days earlier)      last day (1759 days later) » 

12:00 AM
RELOAD! There are 6251 unanswered questions (89.7189% answered)
 
12:31 AM
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.commartineau 54 secs ago
 
12:45 AM
-1
Q: The HEADING should have 2 SPAN elements

farah mamdouh1: Create a DIV and give it a data-cart-info attribute. Inside the DIV, create a HEADING with mdc-typography--headline4" as its CSS class 2: The HEADING should have 2 SPAN elements. The First displays a shopping cart by setting its class to material-icons and setting its content to shopping_cart...

 
 
1 hour later…
2:04 AM
1
Q: Instagram account automation through Python (with Flask)

Drake RoseThis is my first time doing a code review so I expect a ton of criticism on this from all you professionals. What am I doing? I'm using python with flask to create a service for my web server. My web server has a login prompt for passing login info into the python service. The request is receiv...

 
2:15 AM
possible answer invalidation by farah mamdouh on question by farah mamdouh: codereview.stackexchange.com/posts/224070/revisions
 
2:43 AM
0
Q: Get currentSrc of image from srcset before the page loads

Ben CareyI have written a script that makes a 'best guess' at what the currentSrc attribute of an img element will be once the page has loaded, based on the srcset and sizes attributes. This script is used in conjunction with a preload plugin that preloads all assets on a page before displaying the conte...

 
3:43 AM
-1
Q: Hey im trying to bring over the information fro mailuid and the pages wont recognize it with $_POST, not even the login page itself

Phpnoob666*Login part only shows if the person is not logged. Its supposed to take the mailuid value with $_POST to the profiles page and make anew one per person * <?php if (!isset($_SESSION['Id'])) { echo'<form action="includes/login.inc.php" method="post"> ...

 
 
2 hours later…
5:35 AM
Ananthhokage while you can get good advice here, when the code works as intended, but could be made to work better, a better site to use is Code Review. I've linked to their How to Ask pages because that's the best place to start any new adventure on the Stack Exchange. — user4581301 56 secs ago
 
 
1 hour later…
6:59 AM
You need to optimise for a certain cost. Trying to optimise for duration AND size is usually hard to impossible. The only possibility is when you have wasted both to begin with. Please read this, because I think your question might fit better there codereview.meta.stackexchange.com/questions/5777/…Yunnosch 46 secs ago
 
 
1 hour later…
8:03 AM
-1
Q: Bulls and Cows Game in Python

RobinI want to model good quality code for my students (around jr high level). No functions yet - just basic constructs. Any important improvements I should make to the code below, given the context/level please? import random SECRET_NUMBER_SIZE = 2 MAX_GUESSES = 5 # Just because ASCII art is fun. ...

0
Q: TCP client implementation in golang

KannajI am very new to concurrent programming in general and want to know if my implementation is thread safe. I'm currently working on implementing a TCP client in golang. The service listens on a port and accepts HTTP requests. On a parallel, the service also establishes a connection to an outside ...

 
8:31 AM
Monking
 
9:02 AM
Monking
 
9:43 AM
Sounds like a question for codereview.stackexchange.comdyukha 28 secs ago
 
10:02 AM
-1
Q: How to give this if-else statement a kotlin taste?

J. AdamThis piece of code looks more Java then Kotlin. Can i do some improvements to it to make it look more Kotlin then Java? fun receive(message: SentEmailMessage, messageHeader: MessageHeaders) { val longValue: Long = messageHeader[KafkaHeaders.RECEIVED_TIMESTAMP] as Long val date = OffsetDa...

 
10:42 AM
0
Q: Modeling, view and projection transformation using vector and point in homogenous form

afsara__I know this is horrible code. This program is for performing modeling, view and projection transformation. The program reads input from scene.txt and outputs the modeling transformation in stage1.txt, view transformation in stage2.txt, projection transformation in stage3.txt. The files are adde...

 
11:02 AM
-1
Q: Printing when element value changes in Selenium - Python?

MichealI try to print element value of a web page. Related section in my code: ... 52 print_text = driver.find_element_by_id("ctl00_ContentPlaceHolder1_...").text 53 k = print_text 54 print(k) 55 56 while k == print_text: 57 print_text = driver.find_element_by_id("ctl00_ContentPlaceHolder1_...").te...

0
Q: Optional transformation of list with 1 item

JavaStarterI'm creating a method that returns an (Optional) value, only if there's 1 String in a List<String>. If there is exactly one element in the list, and it satisfies certain criteria, it needs to return one of a few different things depending on the value of the item in the list: return Optional.of...

 
11:21 AM
0
Q: iterator that iterates over a file by paragraph

Maxwell's DaemonI wrote the following iterator to tackle the following problem. I have the following string contained in a file called "example.txt": """ This is an a sentence. This is another sentence. Followed by yet another one. This is not the last sentence. This one neither. This one is the last one...

 
Monking
 
12:09 PM
If you have a working code and is looking for a review, there is a separate codereview.stackexchange.com, but make sure to read and follow their site guidelines — Andreas 8 secs ago
 
 
2 hours later…
1:40 PM
1
Q: School House Points (Python + SQLite) - More effecient code?

PlantPotI am creating a database to store house points for our school running events. I woud like to be able to tally all the points for the houses and it is working fine, however, I think it may be a bit verbose at this point. Is there a simpler/better way? Races are stored in a table "races" (compet...

0
Q: How to reduce the number of iterations in a program where number of elements in the test case is very large?

SoumeePlease refer to this problem from Hackerrank HackerLand National Bank has a simple policy for warning clients about possible fraudulent account activity. If the amount spent by a client on a particular day is greater than or equal to the client's median spending for a trailing number of days, th...

 
Welome to Stack Overflow! Please do not take this personal, but IMO your code looks like it could use some refactoring and code review. I tried to recreate your scenario but I quickly gave up after the jungle overwhelmed me. If you would improve the quality of your code I can guarantee that looking for a bug would be more pleasant and efficient. — Prolog 37 secs ago
 
2:40 PM
-1
Q: Perl: Print the lines of the file in order of length, lines of equal length should be sorted alphabetically

KicoOur task is to write a perl program that sorts lines in a file according to their length, lines of equal length should be sorted alphabetically. Below is what I have tried. I'm not exactly sure about the use of length $a and length $b and the cmp function. My code is also not compiling, could som...

 
possible answer invalidation by Lukasz Salitra on question by PlantPot: codereview.stackexchange.com/posts/224089/revisions
 
 
2 hours later…
4:19 PM
0
Q: Hacker Rank : Electronics Shop

WebbarrChallenge from Hacker Rank - Monica wants to buy a keyboard and a USB drive from her favorite electronics store. The store has several models of each. Monica wants to spend as much as possible for the items, given her budget. Given the price lists for the store's keyboards and USB drives...

 
 
2 hours later…
6:30 PM
possible answer invalidation by Erel Segal-Halevi on question by Erel Segal-Halevi: codereview.stackexchange.com/posts/224025/revisions
 
7:17 PM
I would give this guy a platinum badge for reaching the amount of revisions he has: codereview.stackexchange.com/posts/224044/revisions
 
0
Q: Project Euler problem # 3 is this the most efficient approach in Python or can I do better?

emadboctorThe problem statement: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? This code takes 9 seconds!, is there a better way? from time import time def is_prime(number): for divisor in range(2, int(number ** 0.5) + 1): if ...

 
7:54 PM
@Peilonrayz Is performance preferred over time-limit exceeding?
 
@dfhwze I've rolled back your performance->tle change, this is as the code works fine but is slow. There isn't a time limit, the user is happy to wait 9 seconds.
 
@Peilonrayz Got ya
 
Contrast it with solutions that take years to complete, but work with small input.
 
possible answer invalidation by emadboctor on question by emadboctor: codereview.stackexchange.com/posts/224112/revisions
 
@Duga handled.
 
8:17 PM
0
Q: .htaccess file correct syntax & security check

Ryan StoneThis is the current .htaccess configuration for one of the website projects that I am working on, just as a learning exercise. This is working code and everything in it seems to be ok, My hosting company helped me set up alot of these rules, While others where taken from various different blog po...

 
8:37 PM
0
Q: Python script takes input of four elements and outputs a valid 4 x 4 Sudoku Grid in O(n) time, but only when given non-repeating elements

Travis WellsIntroduction I've found a clever and fun thing to do after solving a n^2xn^2 sudoku puzzle. I can take a grid as such as this one and hard-code its indices as constraints to output other 4 x 4 latin squares in poly-time Now, I took each successive row and hardcoded as indices with successive...

 
9:27 PM
Do you want other people to review your code? Post it on codereview.stackexchange.comThomas Sablik 29 secs ago
If you have working code that you're looking for help improving, your question should be asked on Code Review instead; it's thre reason that site was created. This site is for questions about issues with non-working code or use of programmers tools. — Ken White 58 secs ago
I'm voting to close this question as off-topic because it is about improving working code, which means it should be asked at Code Review instead. — Ken White 1 min ago
 
10:16 PM
0
Q: Segmented (Bit) Sieve of Eratosthenes in Java

MC From ScratchI am trying to create an efficient implementation of the segmented sieve of Eratosthenes in Java, similiar to the one in C found here: https://github.com/kimwalisch/primesieve/wiki/Segmented-sieve-of-Eratosthenes. It is often mentioned that the main optimization in speed to the original sieve co...

 
10:50 PM
After deleting your post here and re-posting on Code Review, while you're waiting for an answer there you should research using the DOM and XPath. You could eliminate both iterating through every single node and the many recursive calls and just select and read only the nodes you need. — Ken White 46 secs ago
 
11:36 PM
0
Q: Pandas updating/adding columns to rows incrementally using dictionary key values

kkawabatI want to populate columns of a dataframe (df) by iteratively looping over a list (A_list) generating a dictionary where the keys are the names of the desired columns of df (in the example below the new columns are 'C', 'D', and 'E') import pandas def gen_data(key): data_dict = {'C':key+key,...

 

« first day (2261 days earlier)      last day (1759 days later) »