« first day (1931 days earlier)      last day (2381 days later) » 

00:00
RELOAD! There are 5485 unanswered questions (89.9821% answered)
00:18
1
Q: Are pytest fixtures for making small dummy data?

Albert RothmanI have just started using pytest and I am still getting used to how they do things. It seems like fixtures are at the core of the library, and that they can be used for making small pieces of dummy data that will get reused. I see that there are other methods for handling large dummy data. I have...

The body has this as well: They're hard to follow so I want to break it up into separate if statements but I'm not sure if it'll change the way the subroutine performs. which is not adressed in your answer. The OP is not sure about a Perl point, you are just giving him one example that does not tell, in general, if his assumption (no code after return is executed) yields in Perl for all cases or not. For generic code enhancement there is Code ReviewPatrick Mevzek 58 secs ago
00:43
@SamOnela I assume you are referring to Review Queues, and not Code Reviewing?
 
1 hour later…
01:48
0
Q: Efficiency Help, Less Variables or Shortcuts?

DanNewbie coder here who may or may not be creating too much work for simple tasks. So far it is working great, but I was wondering if I could optimize a little since I have nearly 30 variables on a code of only 100 lines. Since I'm not a coder, I code based on how I would be doing it manually: ...

02:10
You asked at Code Review, which was the proper site. It should be deleted here. Posting the same question to multiple sites is highly discouraged, as it wastes the time of users who answer it on one site only to find it's already been answered at the other. You can find the delete link in the lower left corner of your post under the tags. — Ken White 14 secs ago
 
2 hours later…
03:55
If this code works as intended, this would be a great question for Code Review. Just make sure to go through the asking guidelines there, they're a little different. — Comintern 37 secs ago
04:08
04:19
Monking
04:34
0
Q: Asking help VBA code to convert text files huge data to Excel columns [URGENT]

Perrine 2018/07/01 00:00:26 +08:00,BPRO:MSTS:SMODE,1401,11621660,,2018/07/01 00:00:25.980 +08:00,FCS0102:%DR0060S010201,3:0:0,FCS0102,HS1298,,HS1298 BY OPERATOR VALIDATION AUT 2018/07/01 00:01:38 +08:00,BOPE:MPRO:SDATA,1601,11621664,ROCC_SENIOR,2018/07/01 00:01:38.000 +08:00,FCS0102:%DR0178S0102...

05:06
Thanks for the response, will direct this question to code review :) — Ryeo 30 secs ago
05:19
0
Q: VBA Class Module - When to Stop and Where to declare public constant?

RyeoI have been coding vba for quite sometime now and it is only recently that I have begun diving into doing up some class module. some questions on my mind is when should I stop including functions and properties in a class ? i.e. I am creating a class module where by it record table properties...

05:43
Monking
06:04
0
Q: Get least time complexity in the below pattern

Yash Bedi T TE TES TEST EST ST T Here's my Code : int main(){ char* a[] = {"t","e","s","t”,”\0"}; int k=0, i,j; for(i=0;i<4;i++) { while(k<3) { cout<<" "; k++; } k=i+1; for(j=0;j<=i;j++) { cout<<a[j]; } cout<<"\n"; } for(i=1;i<4;i...

06:19
Monking
@RMunroe H2EAT Nice try
06:34
0
Q: What is OOP and MVC php

guradioI have a Project that consist of an index page that has a modal that has a form: index.php <div class="modal fade" id="DemoModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content">...

07:26
Monking
Maybe it's your loop that is inefficient. Post it on code review, maybe it can be improved enough that you don't need multithread. — Andreas just now
Monking
I agree that people should comment on downvotes, but it doesnt seem to be popular practice. Although I haven't downvoted (The question has plenty already <vbg>) It is likely because This kind of question doesnt really belong here. Questions relating to best practices probably belong on codereview.stackexchange.com. StackOverflow is for problems with specific alreasy written code that isnt working or is behaving unexpectedly that the OP has researched and can't solve. Don't be discouraged though. At the end of the day, rep is not the be all and end all of life ;-) — David Wilson 37 secs ago
@DavidWilson "Questions relating to best practices probably belong on codereview.stackexchange.com." This is explicitly stated as off-topic in the help center… — Mathias Ettinger 47 secs ago
possible answer invalidation by Yash Bedi on question by Yash Bedi: codereview.stackexchange.com/posts/201858/revisions
07:46
@Duga Didn't edit the code
07:57
it's a even bigger problem when a new teammeamber joins also, this is what code reviews are for. If you are worried about this I'd suggest you implement code reviews of new team membersLiam 17 secs ago
08:23
@Duga New team members should have their stuff reviewed anyway, before putting it in production. Regardless of whether they write code, build a machine or constructed a building.
09:04
1
Q: Sort all even numbers in ascending order and then sort all odd numbers in Descending order Java

Anirudh Thatipelli Given an array of integers (both odd and even), the task is to sort them in such a way that the first part of the array contains odd numbers sorted in descending order, rest portion contains even numbers sorted in ascending order. Examples: Input : A[] = {1, 2, 3, 5, 4, 7, 10} ...

09:31
So where should i post this question? If not here or codereview? Thank you for your comments i do appreciate them. — Pete 9 secs ago
09:50
0
Q: Closure implementation

Prashant TukadiyaI have custom cell of tableview which is used as header as well as normal cell. In custom cell I have this properties public var btnReplyTappedClousre:((CommentCell) -> (Void))? public var btnBulbTappedClousre:((CommentCell) -> (Void))? public var btnOtherReplyTapped:((CommentCell) -> (Void))?...

0
Q: Crypt-arithmetic solver (Brute force) in Python

AmitI'm working on a crypt-arithmetic solver to add two or more numbers. I've used brute-force to find all the permutations. I'm looking forward to improve this algorithm. Kindly review for all the aspects of this code and provide me your comments. import string import itertools inListNumsAsStringAr...

0
Q: Parsing strings to decimals

HitTheSkyContext I have a Selenium test which asserts certain values are the same throughout the program workflow. There are four values altogether and three of them are always displayed with two decimal points at the end. One of the values can be either a whole number or a decimal so I've implemented co...

I'm trying to be constructive here so don't take this the wrong way. If you want to prevent getting downvotes, the first thing you should do is read the help center of the site you want to post on. For example: Stack Overflow's on-topic help center and Code Review's on-topic help center. Do note each page has links with additional information. — Mast 18 secs ago
10:05
0
Q: CodeFights: Frisbees

LudisposedDescription You and your friends are seizing another summer day, passing around the frisbee in the park. You have the most fun when the game is fair, so as much as possible, you would all like to ensure that everyone receives the disc an equal number of times. You also like to challenge yours...

10:20
0
Q: Code to test whether the user enables the remote notification on iOS

Neal.Marlin /** * check if user allow local notification of system setting * * @return YES-allowed,otherwise,NO. */ + (BOOL)isAllowedNotification { static NSInteger allowedNotification = -1; if([NSThread isMainThread]) { UIUserNotificationSettings *setting = [[UIApplication sharedAppli...

0
Q: Learning F#. Converted a roslyn analyzer from C# to F#. Idiomatic code?

NikI'm learning F# and for an exercise converted a roslyn analyzer written in C# to F# — the F# version repo. In the excerpt below the GetParameterInfo function: takes in ArgumentSyntax which describes an argument passed to a C# method at an invocation site. And finds the corresponding IParamet...

This would be better suited to Code Review. SO is for problems with the code, Code Review is for how can you improve the code. — Darren Bartrup-Cook 28 secs ago
No problem, i think what i will do is post my code on code review and ask this question there. — Pete 15 secs ago
0
Q: A better way of splitting encoded data; RegEx vs String Operations?

Ross HallidayThe obvious answer here is to use RegEx for optimisation but I thought someone might like the challenge during their lunch break. The reasons for why I'm decoding these strings would make for a whole Daily WTF article, but we'll gloss over that for now. The KpiTableRow is just a simple POCO to ...

11:00
possible answer invalidation by Ross Halliday on question by Ross Halliday: codereview.stackexchange.com/posts/201870/revisions
0
Q: CodeVita challenge: forming the latest valid datetime in a year using some given digits

200_successAfter answering someone's Code Review question, I decided to tackle a sequel: Given an input consisting of 12 non-decreasing single digits separated by commas, form the latest valid date time in a non-leap year, in MM/DD hh:mm format. Use each digit at most once. If no date time can be cons...

11:23
@Duga Possibly, 2 edits already. Second opinion anyone?
Monking
11:45
Can we send/Receive & perform Code reviews/request from here? — GreenRobo 23 secs ago
@Mast The first edit had been made before the answer. The second edit doesn't invalidate the answer
@Heslacher Thanks for checking.
No problem
This might be more appropriate (and get more useful responses) on codereview.stackexchange.com as it's more a matter of opinion than a question about how to achieve something. — DaveyDaveDave 51 secs ago
If that is your actual code and is working as expected and you are looking for reviews and possible improvements, then codereview.stackexchange.com is a better place to ask. See also codereview.meta.stackexchange.com/questions/5777/… for SO vs CR. — Martin R 1 min ago
Not for codereview, there's no code to review. Maybe dba or software engineering. — eurotrash 10 secs ago
12:21
0
Q: Conditional highlighting (Font size colour, size and Bold) using VBA

SeánMcKNote: Question originally asked in SO, here I have code which achieves exactly what I want. The basis of my code comes from the generous help of Tim Williams in a previous question. Building on his help, I have added slightly to the functionality (larger font size, and returning formatting to ori...

> "Elliott, don't you think a table for that is a bit excessive? It's only going to have 3 rows."
> "Six months ago it would have only had 2." Check. Mate.
@202_accepted Every time a colleague comes with a "shouldn't you do it like X" I tell them to draw it. If that's too much effort, I ain't gonna change it.
I've decided that my word is final from now on.
Bringing a gavel in on Monday, and whenever I bang it the discussion is "finished."
0
Q: Better way to terminate / stop / kill Spark jobs from a Play Framework controller using an API?

Fahad SiddiquiI do have a controller named SparkJobController class SparkJobController @Inject()(cc: ControllerComponents, actorSystem: ActorSystem)(implicit exec: ExecutionContext) extends AbstractController(cc) { val jobsMap = scala.collection.mutable.Map.empty[String, SparkAppHandle] /* POST reques...

0
Q: Letter representing number

borkoborko39Hey how can i make a word to convert into numbers? Like if i type 'A' it would return 1 in the innerHTML, B return 2... Dog would return 26, 4+15+7 I will be able to split it and sum the numbers but i can't make it convert the letters. Can you give any solutions maybe mapping? Mapping would be go...

0
Q: Automate the Boring Stuff Chapter 9 exercise

LRBrady#!/usr/local/bin/python3 #selectiveCopy.py - Walks through a folder tree with the extension .PDF and copies them to a new folder. import re import os import shutil filePdf = re.compile(r"""^(.*?) #text before extension [.][p][d][f] #extension .pdf ...

12:51
0
Q: in play framework, inserting multiple array of data with diffrent properties in database

user177504i want to insert marks of student, meaning that each student have his own marks, and have his id, now i want to insert list of students, each with unique identifications, means in list of student, their marks have to be submitted at the same time i'm using java play framework

13:01
Greetings, Programs.
0
Q: JavaScript: Are there any downsides to omitting semicolons?

CryptoCoolbyIn some cases I use semicolons (;) and in some cases, not. From time to time I have noticed that you can eventually leave a semi-colon here and then until i reached the point where i removed all of them from my code and the app still ran without any errors. I have found that each line is treate...

@CaptainObvious No code, no glory
13:21
0
Q: From Option to Iterator

Ta Thanh DinhI have a function which consumes an iterator, called it func: fn func<T: iter::Iterator<Item = char>>(i: T) { //... } I need to write a function whose input is an Option<char> (type char is not important here, just for illustrative purpose), and depends on the value of input, it should cr...

@CaptainObvious Example code, no glory
This probably belongs to code review — Slava 46 secs ago
13:36
0
Q: Simple single-file PHP login system

rahuldottechThis is something that I initially came up with to protect a bunch of scripts on my personal webserver, but am now planning on using with a few public projects too. login.php: <?php session_start(); //log out if ?logout=true if($_GET["logout"]){ $_SESSION["loggedIn"]=false; header('Loc...

0
Q: Is it ok to use `map` with side-effects?

tombardeyI want to know if a set of tasks finished successfully. A task has side-effects. Pseudocode: /// Returns true if the task finished successfully. func work(task: Task) -> Bool { // side-effects here } // Returns true if all tasks finished successfully. func work(tasks: [Tasks]) -> Bool { ...

@CaptainObvious Pseudocode. Also, way too many language tags.
@Mast let me know if that user posts anything else please. (or another moderator)
1
Q: Subset Sums in Java

Anirudh Thatipelli Given an array of integers, print sums of all subsets in it. Output should be printed in increasing order of sums. Input : arr[] = {2, 3} Output: 0 2 3 5 Input : arr[] = {2, 4, 5} Output : 0 2 4 5 6 7 9 11 Input: The first line of input ...

13:55
0
Q: Please reopen "PHP: Object for HTML hyperlink"

NewSitesThe question PHP: Object for HTML hyperlink was closed as off-topic with the reason, "Lacks concrete context: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used." When the question was first posted, a portion of the code w...

14:20
possible answer invalidation by Ross Halliday on question by Ross Halliday: codereview.stackexchange.com/posts/201870/revisions
@Malachi I'll try, but I don't have 10k privileges, so I'll have to recognize the user by avatar :-)
I have the user's profile open in a tab
14:52
1) Compilation time can, in no way, be impacted by the input, since you can only provide input to a program, once it is compiled. 2) If your code works correctly, and you only want to increase its performance, codereview.stackexchange.com is better place for such a question. — Algirdas Preidžius 47 secs ago
15:17
@Duga ouch - I feel sorry for that question (I think?)
but I see now that it also happened a few hours back as well
@CaptainObvious tag all the JAVAs!!!
15:45
@RockyRaccoon You are confusing your constructors. This question is only about default construction. Sure your class may overide the constructor with std:: initializer_list but an empty initializer list and a default constructor (you would hope) do logically the same thing. But that is why we also have code review. — Martin York 18 secs ago
-1
Q: URL shortener - Symfony 4

P. PiotrCan you make code review of my url shortener written in Symfony 4? The more feedback, the better. https://github.com/selfmadeking/URL-shortener-Symfony-4

16:37
0
Q: Compute for each point the number of segments containing that point

nglglhtrTask: You are given a set of points on a line and a set of segments on a line. The goal is to compute, for each point, the number of segments that contain this point My solution: a vector of all the x coordinates, a vector of all the y coordinates, a vector of all the given points and a vector o...

@CaptainObvious deleted by OP, but sounded borked
I'm voting to close this question as off-topic because code review questions are off-topic on SO. A question like this might be on-topic at codereview.stackexchange.com, but be sure to read their help first, especially this bit. — T.J. Crowder 23 secs ago
@T.J.Crowder I don't see evidence that the OP has tested this enough to know whether it's working or not, so it shouldn't be asked on Code Review yet. — EJoshuaS 1 min ago
This question might be better asked on Code Review if your code already works and you are looking to optimize it. — BigBen just now
17:37
1
Q: C++ Add Two Numbers given in Reverse Order from a Linked List

Greg DegruyProblem Description You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. You may assume the two numbers do not cont...

18:07
@Duga Rolled back partially, CC @Mast @Heslacher
0
Q: Excercise from PPP Order class

Sandro4912I did the following two excercise from PPP by Stroustrup: Define an Order class with (customer) name, address, data, and vector<Purchase> members. Purchase is a class with a (product) name, unit_price, and count members. Define a mechanism for reading and writing Orders to and fronm a file. D...

@Vogel612 Much better.
Then try codereview.stackexchange.com - StackOverflow is for programming help, but it sounds like you already have a working solution. — Adrian 36 secs ago
18:26
@200_success I am taking my question down. Thanks for the solution. I will try to understand the code . Thanks.
@200_success But If i remove this question i would have to remove the discussion in meta also right?
It's not that bad to leave a dangling link from a Meta question.
ok i am taking the quetion down then
@Phoenix That's ok. Don't take it personally and feel free to come back if you ever got a question fitting the scope of our site.
I have no problem bro. I am actually quite happy that i got a working soln. Thanks
18:48
We just had a bug where a page was broken, it was trying to do 4.3495072887310307264923017326158e+997 expensive operations on a spreadsheet...oops.
All because we built an algorithm that was accidentally ! at the end...
@202_accepted Ouch.
I didn't know it was possible to bork Excel that hard.
19:20
Wasn't Excel, it was NPOI (an Excel parser/editor for .NET).
0
Q: Xamarin Forms with Ninject navigation service

ToskrOkay, so I am wondering if the particular design I am using is a bad. I am new to Xamarin Forms and I have been searching online finding ways to setup navigation in a MVVM fashion. In particular I am designing around a concept I found here. However, I am using Ninject to have a ViewModelLocator ...

19:40
@Adrian - sure, will use codereview for such in future. But if I had asked how to write buildAlphaNumeric() would that have been a valid question here, without giving any implementation from my side. Only difference is that I have working code and seeking if thats how it should be done / is acceptable. — Gaurav Sinha 45 secs ago
Asking how to write it would be too broad for SO. Asking generally if a working implementation could be somehow "better" is off-topic, and better suited to codereview. A question about how to fix a non-working implementation would be on-topic for SO, but that is not the situation you are in. — Adrian 44 secs ago
20:15
0
A: Extracting data from text file in bash using awk, grep, head and tail

Hopethank you!!! this was super helpful. i too am a beginner trying to become better

20:33
@SamOnela lol
OMG Let's get one of those cute things!
1
Q: move friendly merge sort

Brady DeanThis is a follow up to this question. I'm only interested to see if this is implemented correctly for move-only types. #include <vector> #include <iterator> #include <algorithm> #include <utility> namespace sorting { namespace detail { template<typename RandomIt> RandomIt middle_itera...

0
Q: Speeding up multiple for-loops to transform and combine files & how much data can R handle?

ekrynakI have 50+ excel files that I need to transform (and eventually combine) to use in analyses. I’ve written a code that transforms them into the format I need, but it is extremely slow for files with high species counts (the transformed output will have > 2 million rows). My first question: is ther...

21:01
Good question but since your code works OK it's best asked on codereview.stackexchange.com or even codegolf.stackexchange.com :) — Absinthe 49 secs ago
-1
Q: How to retain technical information about new features?

user11235813I'm going through an online training on Apex and Salesforce (trailhead), and I don't know how to retain all this info. I'm memorizing it, and trying to build stuff, but I'm still not retaining it.... Does anyone have any recommendations on how to retain all this info? Ex - https://trailhead.sale...

Monking!
Monkernoon
I really want to post this answer to this question
@CaptainObvious That's just bull.
@sineemore Don't.
While there's a good core of truth in it, it sucks as an answer.
21:17
I won't. That my personal feelings on this. Just mocked up an answer header..
Really drives me out..
@Mast Happy to see you share same feelings :)
@SamOnela, how about your question on event emitter?
@sineemore I've looked over your answer as well as the other one- haven't taken time yet to implement advice yet
thanks for the feedback!
@SamOnela Happy to help)
21:40
you'd better post on codereview.stackexchange.com for this kind of request — scraaappy 32 secs ago
@Duga wow- almost sounds like a threat!
 
1 hour later…
22:54
A while back I discussed a similar MATLAB vs numpy comparison on Code Review, codereview.stackexchange.com/questions/17702/…. Speeding up numpy code by replacing the loops with 'whole-array' operations (as required by older MATLAB versions) is a frequent SO topic. — hpaulj 18 secs ago
23:39
0
Q: Code Refactoring. 2D Array HourGlass

Renan CidaleMy code passed, no problem. But I would like your guys opinion as to what I could have improved in my code. Unnecessary things, tips, better ways to do the same thing, faster ways, I'm literally open to any kind of feedback. Lately I'm only trying to focus on improve how fast I can solve a proble...

But anyway, if you have working code and want people to look it over and suggest improvements, you'll probably get better answers at Code Review than Stack Overflow. — abarnert 59 secs ago

« first day (1931 days earlier)      last day (2381 days later) »