« first day (2705 days earlier)      last day (1297 days later) » 

12:00 AM
RELOAD! There are 7018 unanswered questions (89.7565% answered)
 
 
3 hours later…
2:36 AM
github.com/motart/stringville/tree/develop <- this link is broken. I'm also pretty sure code review is outside the intended audience for the [java] tag, but I'm not quite sure. — rzwitserloot 44 secs ago
Code Review Stack Exchange would be an appropriate place to post this question, but you should modify your question to include the code. — rshepp 35 secs ago
 
 
2 hours later…
5:02 AM
This is off-topic, as it's asking for recommendations. However, your VBA script may be optimisable, in which case Code Review could help. Otherwise, I'd look at exporting the data to Python and using it - search for reading Excel into Pandas, and it turns out there is a function for that. Try rewriting your VBA into Python, then ask here if you need help. — Ken Y-N 22 secs ago
 
5:26 AM
@Gary I made a topic in "code review": codereview.stackexchange.com/questions/249978/… Do I need to delete this one or not? (I wouldn't want to.) — user51515151 11 secs ago
 
0
Q: Sequential writing and reading (two threads)

user51515151I am new to the Java programming language. Task: Create SequentalWriter and SequentalReader classes that implement the Runnable interface. They must provide a sequence of write-read operations (i.e., write-read-write-read-write-read, etc.). The task assumes only the use of "synchronized", "notify"...

 
possible answer invalidation by Nɪsʜᴀɴᴛʜ ॐ on question by Nɪsʜᴀɴᴛʜ ॐ: codereview.stackexchange.com/posts/249946/revisions
 
5:58 AM
0
Q: Route Improvement in Laravel 8

PankajI have below route. I am using Laravel 8. Route::post('/update-crew', array( 'uses' => 'App\Http\Controllers\Directory\Crew\API\CrewAPIController@Update', 'as' => 'apiUpdateCrew', ) ); Is there any way to use namespace instead of writing the path in string. My route...

 
6:10 AM
Monking
 
Monkin'
 
@Duga Answer has already been edited after the edit on the question.
 
 
1 hour later…
7:15 AM
possible answer invalidation by Nɪsʜᴀɴᴛʜ ॐ on question by Nɪsʜᴀɴᴛʜ ॐ: codereview.stackexchange.com/posts/249946/revisions
 
7:38 AM
0
Q: Which is better-way to casting model

Jaydeep VyasI need to convert my model to fit data in tableview cell finding better approach My Model class MyResponseModel { var question: String = "" var id: String = "" var answer: String = "" //Other variables also but not required to display init(fromDictionary dictionary: [String:...

1
Q: Best practice for cleaning Pandas dataframe columns

p.vitzliputzliI am cleaning str columns in a Pandas dataframe (see below for an example), and I have been wondering if there are more concise ways or additional inplace methods to do so. What are the general best practices for cleaning columns in Pandas? import pandas as pd df = pd.DataFrame.from_dict({"col1":...

0
Q: Substring match within a text for given keywords

TlatworkGoal: Look for a substring match within a text for given Keywords. Keep the substring match if the levenshtein distance is smaller than the length of the Keyword divided by (x=10), else return an empty list. (First of all my apologies if the code is of lower quality. I am quite good in R but very...

 
7:55 AM
possible answer invalidation by Nɪsʜᴀɴᴛʜ ॐ on question by Nɪsʜᴀɴᴛʜ ॐ: codereview.stackexchange.com/posts/249946/revisions
 
0
Q: A React component which adds select options to a sidebar which needs re-wriing with hooks instead of the use of compose

JakubIn my React project I have a component which essentially adds a section to a sidebar containing 2 select fields. The component uses also Material UI to have it responsive and looking good. A part that also some props are passed as the options for the select and the data from DB which is the optio...

1
Q: How can one plot the progress of an optimization?

FriascoIs there a way to plot the progressive value of a function being optimized with scipy.optimize's differential evolution? In the following the plotting part doesn't work: from scipy.optimize import rosen, differential_evolution bounds = [(0, 5), (0, 5), (0, 5), (0, 5), (0, 5)] result = differentia...

 
8:16 AM
@Nader.Bhr generally, no. SO is for solving problems with code. Questions like that are typically better suited to codereview.stackexchange.com but be sure to read the tour there to make sure your question is appropriate before posting. — Nick 36 secs ago
"Is it possible to improve this using a non-recursive method, possibly using std::index_sequence?" - If it's working code, perhaps asking at code review is better - but please do explain what the code is supposed to do. — Ted Lyngmo 1 min ago
 
0
Q: CodeWars - Assembly Language - Check List For Value

RedDragonWebDesignI'm doing assembly language problems on CodeWars, a website with practice problems. Problem https://www.codewars.com/kata/545991b4cbae2a5fda000158/train/nasm Create a method that accepts a list and an item, and returns true if the item belongs to the list, otherwise false. Solution In C To give...

 
9:24 AM
Assuming the code works, then this question as-is, is on-topic and should be asked at codereview.stackexchange.com instead. On SO is is border-line opinion-based and too broad. — Lundin 27 secs ago
 
 
3 hours later…
12:28 PM
@Duga sigh
Left a comment on both Q and A.
 
@KamilCuk Let's not split hairs. We're using GitLab and it's code review feature, and that forces us to deal with the remote in certain ways. If we were using Gerrit instead, we'd get a different behaviour surrounding code review from the remote, and we would have different options. Also, the graphical interfaces do stuff, and sometimes it's easier to use those than to type stuff in my local terminal to effect changes. — gibson 55 secs ago
 
0
Q: Simulating Brownian motion for N particles

Khashayar BaghizadehThe following is the web exercise 3.2.27. from the book Computer Science An Interdisciplinary Approach by Sedgewick & Wayne: Write a data type that represents a particle undergoing a Brownian motion in two dimensions. Create a client program that takes a command line integer N, creates N particl...

 
1:05 PM
-1
Q: Using command line arguments to find and replace a word in a file in C

LocalHostI have a txt file with some text in it. All I have to do is to find a given word in that file and change it with a new given word. These words and text file name will be supplied at the command prompt with the format C> findword <old word> <new word> <filename> where findword is executable file. ...

 
@CaptainObvious This poor question got noticed very quickly.
It also got hammered shut.
 
1:30 PM
0
Q: comparing lists of tuples

Celso Pereira NetoI have the following code, comparing two lists that contains equally structured tuples: list_one = [('id_01','aaa','bbb'), ('id_02','aaa','bbb'), ('id_03','aaa','bbb'), ('id_04','aab','bbc')] list_two = [('id_01','aaa','bbb'), ('id_02','aaa','bbb'), ('id_03','aad','bbd')] for tupl in list_one: ...

 
1:55 PM
0
Q: Pinning and protecting a byte array for secure memory storage

oscilatingcretinI've been dabbling in some security features for a WinForms application I am working on and have gone down the deep rabbit hole of pinning and protecting data. Since I am brand new to this, I though I'd see if anyone could find any flaws in my design. The requirement: Be able to securely store a ...

 
2:45 PM
1
Q: Fnv1a hashing of C# Guid

ynglingI have the following implementation of the Fnv1a hashing for a string, which should be correct: public static uint Fnv1a(string toHash, bool separateUpperByte = false) { IEnumerable<byte> bytesToHash; if (separateUpperByte) { bytesToHash = toHash.ToCharArray().Select(c => new...

 
3:19 PM
Monking
 
Monking
 
3:51 PM
That is better in place on Code Review. — usr2564301 31 secs ago
 
@CaptainObvious hmmm... +2 on votes, yet 2 VTC currently for CNWAI... maybe because of statements like these:
> I would like to know if this implementation is correct or something needs to be changed?
and
> Expected behavior (What seems to work right now, but I'm not sure it will always be that way.):
is that too sketchy?
@SᴀᴍOnᴇᴌᴀ one of those VTC might be a band-wagon/auto-reviewer ...
 
Monking
 
@SᴀᴍOnᴇᴌᴀ Probably. FWIW it's on-topic because it's working to the best of the author's knowledge and asking for "Correctness in unanticipated cases" is allowed.
 
@Peilonrayz thanks
it was a quiet past ~16 hours...
 
4:15 PM
Well we can change that now ;)
 
<childish-sarcasm> "nuh-uh!" </childish-sarcasm>
 
@SᴀᴍOnᴇᴌᴀ pretty sure you know your JS. Do you know if any of the cool new front-end web frameworks support multiple root elements? I want to modularize a local host website that is a mishmash of different projects. Notifications, tasks, quick links. None of them are related so no root is needed AFAIK. Or am I just being silly?
 
posted on September 29, 2020

We’ll be performing some server maintenance on our Stack Exchange Data Explorer server starting at 2:00 PM UTC (10:00 am US/Eastern) on Tuesday, September 29, 2020. The service outage could be up to 12 hours. For more details, see our post on Meta Stack Exchange.

 
@Peilonrayz by "multiple root elements" do you mean child elements of a <body> element, such that one JS "controller" could reference those different child elements?
if it would help to prepare a fiddle you could try one on a site like jsfiddle.com, jsbin.com, codesandbox.io, plnkr.co, codepen.io, playcode.io etc...
 
I don't think so. You know when you use a web framework you have your root element <div id="app"></div> and then Vue, Angular.js do fun stuff under them
 
4:23 PM
right
I'm mostly familiar with AngularJS and VUe... have looked at ReactJS a little but not enough to know if it would do what you want
is it an issue like this?
5
Q: A way to render multiple root elements on VueJS with v-for directive

HelloWorldRight now, I'm trying to make a website that shows recent news posts which is supplied my NodeJS API. I've tried the following: HTML <div id="news" class="media" v-for="item in posts"> <div> <h4 class="media-heading">{{item.title}}</h4> <p>{{item.msg}}</p> </div> </div

 
0
Q: Is this an appropriate use of async/await combined with Task continuation?

Bryan BoettcherSanity check needed, as I'm still very unfamiliar with the nuances behind async/await and how they relate to more traditional Task / TPL code. I have a high-level repository layer which is assembling a business object from various lower-level repositories. As a business decision, we are doing ke...

 
@SᴀᴍOnᴇᴌᴀ I looked through that but I think it's solving a different problem. Might have to upgrade my Vue skill tho.
IIUC that's multiple roots of the same app. These would be different apps
I think I'll be able to monkey patch it with iframes at the worst, but not exactly the best go-to ;)
 
could you specify the <body> as the root element, then reference child elements by $refs?
do you want the framework code to simply read from those multiple root elements, or write to them (e.g. render HTML)?
 
@SᴀᴍOnᴇᴌᴀ That possibly would work but I fear it'd mean I'd have to merge all my projects into one.
 
if you merely just want to read from other parts of the page then you can just do DOM lookups...
 
4:33 PM
Great input, thanks guys. Moving this questions to Code review Stack Exchange — Rachid Abadli 30 secs ago
 
@SᴀᴍOnᴇᴌᴀ It would be read/write but not between the apps. Otherwise I'd just scrap JS altogether and serve HTML from the server.
 
@Peilonrayz As your core or as an aside? Controller or viewer?
 
@RachidAbadli please read the help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?_". In the current form the post would likely be close as off-topic because the code is not embedded directly, plus the title should describe what the code does instead of requesting review. — Sᴀᴍ Onᴇᴌᴀ 1 min ago
 
Sounds like it's already modular if it's a mish-mash of things.
Though not necessarily the modules you want :-)
 
@Peilonrayz can you give a sample objective you are trying to achieve?
 
4:38 PM
@Mast I don't understand what you mean by that. But they'd all be more like asides than a core. My MVC terminology skills aren't great. Pretty sure they'd just be views.
Yeah they're pretty modular but I kinda want them on the same page. Currently they're just fairly static stand alone sites
 
That makes sense.
 
@SᴀᴍOnᴇᴌᴀ I just want 2 Vue apps on one page really.
There wouldn't be any routes or views just really really dumb apps.
 
@Peilonrayz you should be able to have 2+ Vue instances on one page, plus multiple components
 
Oh, that's good. Sweet thanks :D
 
What will be the glue that keeps the 2 Vues together then?
 
4:45 PM
@Mast a common pattern is to use an Event bus
 
Flask and Jinja. I try to stay away from JS whenever at all possible. But I've had really nice times with Vue, AngularJS and Angular than I don't want to go anywhere near JQuery *shudder*
 
@SᴀᴍOnᴇᴌᴀ Heh, I didn't know that existed.
Then again, I don't know half of modern JS framework tricks.
At least.
 
@Mast yeah I wish it was in the documentation .... like the cookbook
 
1
Q: Simple Calculator to add/subtract/multiply/divide 2 inputs

Jack WThis is for an assignment in my robotics class so the requirements I needed to meet was it had to be in a while loop and the input numbers needed to be float point. I just wanna make sure im not using any bad practices and if theres any areas that can be improved. while (True): # Gets operato...

 
5:16 PM
1
Q: Combining Files from different folders

Austin JohnsonI have two folders that contain multiple json files. The first folder contains game logs for all MLB teams and is structured like this. {"Team": "PIT", "Games": [{"Date": "Jul 24, 2020", "Opponent": "@ San Diego", "Results": "L", "Score": "7-2", "Line": "+128", "Over_Under": "O", "Total": "8", "P...

0
Q: Application to calculate scores of strings submitted to an endpoint

RasheedRecently submitted a code assessment and I was wondering what other's feedback might be. What red flags can you see? I included gradle file if you're interested in running the application locally. Note that I used H2 to make it easier for the grader to run the app without having to worry about th...

 
5:41 PM
1
Q: A graphing calculator written in python

JSScratchDoubleI wrote a calculator that can solve equations with variables using matplotlib and sympy. I am looking for tips on performance and style. How can I improve on this calculator? Is it a good idea to use sympy for this purpose? import sympy import matplotlib.pyplot as plt class Iterator: name, equa...

 
6:17 PM
This looks like a question for codereview.stackexchange.compawello2222 27 secs ago
@pawello2222 unfortunately this code appears to be too hypothetical for CR SE. Please review What topics can I ask about here? for CR. — Sᴀᴍ Onᴇᴌᴀ 49 secs ago
 
@avazula are you still using yer cron parser?
 
@SᴀᴍOnᴇᴌᴀ Monkevening! Sadly no, I've changed jobs and didn't get to use that tool again ever since.
 
@avazula ah okay... have you been working on other coding projects lately?
 
1
Q: How to use Join to find (sum of column A - Sum of Column B) value for corresponding tuple

garima gargTable 1: financial_detail id,firstname,lastname, vpa:primary key,credit 1, abc, santosh, abc@gmail.com, 10000 2, xyz, sharma, xyz@gmail.com, 15000 3, mnz, saraswat, mnz@gmail.com, 20000 Table 2: transaction_log id, paid_to,paid_by, amount, paid_on 1, abc@gmail.com, xyz@gmail.com, 13155, 12-09...

 
@SᴀᴍOnᴇᴌᴀ I wasn't up until very recently, but a few days ago I took on a project for building a moderating website for monitoring the servers of a game I'm playing
It's not that I'm not a fan of programming side projects, but when I stop working I'd rather make time for my other passions :)
But this video game is worth it and I get to learn about React so I was like, you know what, let's go!
 
6:40 PM
@avazula yeah sometimes I feel the same way... nice
 
@SᴀᴍOnᴇᴌᴀ are you working on side projects these days?
 
honestly not really, mostly trying to improve front-end testing skills
 
oooh. Like behavioral testing and alike?
I still struggle to see how one would manage to have multiple levels on testing on the front end... But maybe that's because I'm biased by my backend/embedded software perspective
 
@avazula unit and e2e... e.g. with VueJS and its test-utils
 
There's at least unit-testing, automated testing, non-automated testing...
UX testing.
 
6:45 PM
woo, Vue, my favorite JS framework!
@Mast I see how to do these last two but I shall admit I struggle to see how to unit-test frontend code
 
Just like any code, in small pieces.
 
@CaptainObvious no query... which makes me believe it is CNWAI
Someday I would like to write tests like janos did for his voting system
I've also contemplated extending that code to show the reputation affect - might be a dopamine stimulator..
 
@Mast What's the difference between automated and unit tests? Cause my unit tests are pretty automated and Google seems to be 404 here
 
@Peilonrayz Thinking CI.
And yes, unit tests can be part of that.
 
Ah, that makes sense I guess git precommit hook would possibly also count?
You can set some up to not push secrets to git
 
6:53 PM
First of all, you should use Code Review Stack Exchange since there is no issue, so it's off-topic here. Secondly, Application.DoEvents is evil. Thirdly, if the file is huge, don't update the UI on every single line read, but use batches instead. Fourthly, reuse variables: don't do int.Parse(txt.Text) every single time. Lastly, we would need to know what's involved in the ProcessInsert constructor and InsertRow method for this to be on-topic in Code Review — Camilo Terevinto 57 secs ago
 
what is in your precommit hook? a linter, or do you run actual tests on it?
 
I don't have any precommit hooks. I'm guessing your point is that it has to be proper tests
 
I put my secret things in a seekrit folder and exclude it from merging.
Never put confidential things with your non-confidential things in the same file.
NEVER.
 
cornerstone of GDPR, isn't it? ;)
 
I don't deal with userdata. If a user is stupid enough to give me their data, that's their problem.
 
6:57 PM
0
Q: To Do List Project - app lets you make projects and inside of this projects you can save to-dos

Žiga GrošeljI have built a To Do App in Javascript, using Webpack and some modules. The app lets you store projects (School, Sport, Grocery, etc.)... And inside these projects, you can store todo items... You can also edit the todo item, and click it do delete/finish it. The app should be built with OOP prin...

 
I do the same. Except for my current project...
But sometimes you get people that post secrets in Code Review questions. It's a mad world...
 
I use GitLab CI/CD variables and provider-stored secrets to pass confidential data to my pipelines
 
Oh yes, we've seen our fair share of API keys.
Provider-stored secrets, that basically means all the secrets are external, right?
Even if you'd just put a Seekrit class in a Seekrit folder holding your secrets, that works. A stupid container to be included, works.
 
@Mast Not come across the term before but I'd assume it's more like how CI + PyPI integrate
 
@Peilonrayz Could be, I'm not particularly good at setting such things up.
Once they work, I can maintain them. But setting them up is always a pain.
 
7:03 PM
Same. I have a base project that has a tutorial for myself so I remember to set all the nonsense up :/
 
I recall.
 
7:47 PM
0
Q: C# Scraper - EventHandler

user231071It might help to check my previous question out, its part of the same application. The only minor changes are with the entity class names. They now each have their own entities, and I use interfaces for polymorphism so each site has its own entity, rather than ambious class names like ProfilePost...

 
8:37 PM
0
Q: Class to automatically create Valve VDM files by timestamps

TheBvI'm currently working on a project which should create VDM files. Here's a basic example: demoactions { "1" { factory "SkipAhead" name "skip" starttick "1" skiptotick "3623" } "2" { factory "PlayCommands" name "startrec" ...

0
Q: AI for OpenTTD - A* Path Finder

Marlon SmithI'm writing an AI in C++ for OpenTTD, and the first component is a path finder. If you'd like to run it yourself, it's on Github here: https://github.com/marlonsmith10/empire_ai. Currently, it will pick two random towns and build a road between them. The pathfinder class Path is used by calling f...

 
9:29 PM
If your code works but needs improvement, it would be better suit for Code Review. — dwirony 24 secs ago
If your code is working and you just wanted to make it faster, your question belongs in Code Review instead - codereview.stackexchange.combraX 15 secs ago
@dwirony when suggesting users post on CR it would be great if there was also a suggestion like "Please read the relevant help center pages like 'What topics can I ask about here?' and 'How do I ask a good question?". In the current form the code above would likely be closed as off-topic because it is missing context. about what the code actually does. — Sᴀᴍ Onᴇᴌᴀ 34 secs ago
@chrisneilsen Gotcha. Typically I see questions like these instantly closed or referred to Code Review. — dwirony 24 secs ago
@dwirony I think ultimately it's up to CR if they want our Q's 1chris neilsen 48 secs ago
 
9:52 PM
@Duga wow I hadn't seen that list or some of those posts before...
@dwirony Yes, I see it often too, but it's wrong to do that. Some Meta discussion 1 2 3 4 although there is also some dissent 1chris neilsen 8 mins ago
 
@SᴀᴍOnᴇᴌᴀ Yeah they got some good links
@SᴀᴍOnᴇᴌᴀ @Mast I was thinking of making a meta for what a good recommendation looks like. I've had people start arguments because the damage caused from bad recommendations isn't visible to the suggester. Do you think it'd be a good idea to make it a meta? Kinda like "a guide to CR for SO". No point in posting something to just get downvoted ;)
 
 
2 hours later…
11:34 PM
0
Q: Is there a way to speed up the following code?

Marcos GomezI am trying to see if anyone can help me in making this Excel VBA code a little faster in rendering the data from the weather site I am using. Maybe instead of getting all 14 days it includes in the site, could I get help in getting just 10 days? Any help is much appreciated. Thanks! Sub MiamiWe...

 

« first day (2705 days earlier)      last day (1297 days later) »