« first day (2165 days earlier)      last day (1851 days later) » 

12:00 AM
RELOAD! There are 5965 unanswered questions (89.8551% answered)
 
 
1 hour later…
1:30 AM
0
Q: check for pangrams in elisp

little-dudeI'm trying to find pangrams ie sentences that contain all the letters of the alphabet, for instance "The quick brown fox jumps over the lazy dog". I'm an absolute beginner in elisp, and it ended up being a really difficult exercice for me. My idea what to put all the letters in a set check if al...

 
2:29 AM
0
Q: Factorio analysis: data munging

ReinderienThis project is... a little ridiculous. It's working, but it's a complete mess. Data about Factorio's game economy are pulled from the wiki via the MediaWiki API, scrubbed, preprocessed, and thrown into Scipy for linear programming analysis using the MOSEK interior point method. The pull script...

 
2:39 AM
Check this link to see if it helps you get started. — DevilsHnd 5 secs ago
 
2:51 AM
I'm voting to close this question as off-topic because the code works properly, so this question is more suited for codereview.stackexchange.comJacob G. 34 secs ago
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.com — Joshua 39 secs ago
 
3:35 AM
possible answer invalidation by water on question by water: codereview.stackexchange.com/posts/216762/revisions
 
4:16 AM
Monking
 
5:04 AM
@Joshua — This question does not belong on Code Review. Code Review is for the improvement of working code; this code is not working. — Jonathan Leffler 38 secs ago
 
 
1 hour later…
6:18 AM
Too broad - we prefer stack overflow questions to contain a question, not multiple questions. But even if you trimmed it down to a single one, it's probably still too broad/opinion based. Something feels off with having even the simplest plugin having to implement multiple interfaces but without seeing the concrete definitions, it's hard to say that for sure; but it does make it feel more like a question that might fit on code review (not sure if it is on topic there) — Damien_The_Unbeliever 12 secs ago
 
7:07 AM
Monking
 
Monkin'
 
7:23 AM
0
Q: Rotate a list by k elements

thadeuszlayThe task: Write a function that rotates a list by k elements. For example, [1, 2, 3, 4, 5, 6] rotated by two becomes [3, 4, 5, 6, 1, 2]. Try solving this without creating a copy of the list. How many swap or move operations do you need? const lst = [1, 2, 3, 4, 5, 6]; const rotateBy =...

 
7:50 AM
This question might be a better fit on Code Review where people discuss improving existing, working code. This question might be perceived as too broad here, although I am uncertain due to inexperience with the involved techniques. — Adriaan 8 secs ago
 
 
1 hour later…
9:00 AM
0
Q: Fetching SQL table names and dynamicly insert values

Aggelos WolfskinI need to make a UI where I can edit/insert/remove records of my SQL tables through my app. Edits and deletes of records works fine except of insertions when it comes to tables with auto-incremented PKs. I created a combobox populated with the names of tables and by using the sql schema I try to ...

0
Q: tuple initialization in a loop

LouisonoI would like to do the following: I have a list data of 3-tuples that I need to go through, for each tuple base_tuple I want to know the index index_max of the maximum value held in base_tuple and replace base_tuple with a new 3-tuple new_tuple that only holds 0s except for the value at index ind...

 
9:20 AM
0
Q: .NET Custom hierarchical expression to treeview data structure

thecco I'm not good at English. It's gonna be hard to read. I apologize in advance. I need expression parser for draw diagram(fault tree). In order to do that I have to create data structure from custom expression ( (123-A1) AND (123-A2) AND (123-A3) OR (123-A4 AND (123-A5 OR 123-A6)) ) Th...

 
10:18 AM
0
Q: Calculate Levenshtein distance between two strings in Python

Kyra_WI need a function that checks how different are two different strings. I chose the Levenshtein distance as a quick approach, and implemented this function: from difflib import ndiff def calculate_levenshtein_distance(str_1, str_2): """ The Levenshtein distance is a string metric for...

 
 
3 hours later…
12:52 PM
@MartinR it probably [is] (stackoverflow.com/a/51200213/2907715). But that uses nested for loops too. To avoid them, all possible 4-element arrays using 1,2,3 should be generated (similar but not identical to this) — ielyamani just now
 
0
Q: Save form in the java script cookie

Ninja NinjaI am trying to save my all form in the cookies. But When I wrote new javascript code to make all checkbox and there text to save in the cookies I am lil bit confused how I will get it to save in the cookie for a user. Kindly guide me how I can achieve it. var checkId = 8; var checkIqd = 8...

 
1:07 PM
@CaptainObvious Hey @SimonForsberg I think this person is looking for you. ;)
@Mast Bummer. :(
 
If the code works as intended but the only issue is performance, it would be better if you post it on codereview.stackexchange.com instead. If you do so, make sure to provide some context, and an example of input and output data. — Georgy 59 secs ago
 
0
Q: Querying connection string across solution

Jessica WardI have an app.config file that contains some connection strings, this is accessed on a project-by-project basis Say I have the following projects: A B C D Project A contains the app.config file, and a class called ConnectionStringHelper public class ConnectionStringHelper { public strin...

 
1:34 PM
0
Q: /Proc/net/tcp results Converter/Editor

remy_rmBeing unable to easily read the output of /proc/net/tcp I made a small C# console app that modifies the output to be in decimal notation instead of the standard hexadecimal, show the corresponding enum states of the state code and added the ability to filter out remote addresses. With the ability...

 
1:53 PM
0
Q: How to split String of date in javascript

Nikos Kalantasi want to find a way to split a "date-type" String and add a zero if the day of the date has only one digit. (1-9). for example my string is : April 8th 2019, 16:27:51 and i want to change it to April 08th 2019, 16:27:51 I want to check if the day of the string is from 1 to 9 and if it d...

 
Which part do you have a question with? SO is not for code reviews — Juan Mendes 1 min ago
 
2:13 PM
0
Q: Web Server handler class to pass IIS http requests to SQL Server stored procedures

George BarwoodThis is a c# class I use to implement web database applications with Microsoft IIS and Microsoft SQL server. It passes the http context to a selected SQL stored procedure, and writes a response based on the result sets generated by the stored procedure. Thus the entire application is coded as SQL...

0
Q: A Java Morse Coder/Decoder basic program

K. SchmidtI have a Morse code coder and decoder here. I'm having an issue trying to remove pieces I have already done from the substring here sub = encrypted.indexOf(','); morsechar1 = encrypted.substring(0,sub); morsechars = encrypted.substring(sub); So that it keeps going instead of returning to the firs...

 
Mmm, I'm debugging some weird key handling and I'm suspecting message loop shenanigans, now I wonder if there are tools with which I can monitor message loop hooks
So it's like a hook that hooks into the hooks that into the message loop
 
2:28 PM
I don't think you can even conclusively know who's hooked into the message loop
and even if you could: You can only make sure your own application handles the message loop correctly
 
2:40 PM
possible answer invalidation by K. Schmidt on question by K. Schmidt: codereview.stackexchange.com/posts/217076/revisions
 
2:55 PM
@Vogel612 Ensuring that is a hellish task already
I'm talking 30 years legacy
 
no chance to rewrite the message loop handler from scratch?
that should be a pretty tight loop in the first place, so it might not be too bad
 
I'd rather move to .NET entirely and drop the legacy
 
@skiwi C or C++?
If it's C++, I might be able to help with the message pump thing.
If it's C, good luck. Trollface.gif
 
@DerKommissar Oh yes, thanks for the ping!
 
3:11 PM
0
Q: client handling of tcp server in go

majidarifI'm writing a service for a ORPG and I expect about 10kb of packets per second. I just want to know if my approach is correct? Are there areas I can improve? This is a bit basic the full app would have a lot more handlers and packet structs. package main import ( "bytes" "encoding/bina...

0
Q: Return whether a string is a palindrome if you can delete at most k elements

thadeuszlayThe task: Given a string which we can delete at most k, return whether you can make a palindrome. For example, given 'waterrfetawx' and a k of 2, you could delete f and x to get 'waterretaw'. The followig solution is inspired by @Oh My Goodness's answer. const s = "waterrfetawx"; ...

 
No I'm saying that emailing offline isn't how stackoverflow works. You should hire a tutor or do code review with a colleague instead. — Charles Landau 49 secs ago
 
3:31 PM
0
Q: Why my SIMD 3D vector class is not giving performance gain?

Ankit singh kushwahI wrote two versions of vector class for my ray tracer. Non-SIMD version and SIMD version. You can find the code below. I want to ask what things should I keep in mind to get max performance with SIMD. I am not getting any performance gain with this. I turned off compiler optimizations and still ...

 
3:50 PM
possible answer invalidation by mrmadhat on question by mrmadhat: codereview.stackexchange.com/posts/200917/revisions
 
4:29 PM
0
Q: Rethrowing Error through several classes

user3568719This is a simplified version of my app. It has a bunch of scraper classes, and a Job class, which controls the collection of data, and the saving to the db. During scraping it could happen many unforeseen problem due to irregular html structure, date format, missing information etc. I want to hav...

 
@DerKommissar Not sure, the code is written in C++ but it may as well be C on some points
 
@skiwi I'm moderately familiar with the Windows message pump
Only ever used it in C++ though
 
I'm thinking it would be a good idea to move away from it completely and use a framework (hint: .NET) that does it for us
 
Probably, but sometimes in life you don't (yet) have that opportunity.
 
4:48 PM
0
Q: StringReader reuse for XML Parsing in C#

cezarlamannI'm developing a generic XML Parser that would parse chunks of a given XML to a given list of types by using the "Pull parsing" approach, which I think is more "memory efficient/predictable", instead of loading unknown-sized XML files into memory. I'm caching the XmlSerializer objects for the gi...

 
@DerKommissar You know that .ConfigureAwait(false) thing we were discussing?
You don't need to do that in .NET Core since there aren't execution contexts :D
(Straight from the mouth of the C# design team. I asked them about it.)
 
5:05 PM
Great, so now I need to rewrite about 6000 dependencies.
 
0
Q: Create Apache2 virtualhost, Mysql db & user. CLI tool and GUI on top of it

LeonidMewReview for optimization, code standards, missed validation. What's in this version: Rewritten, instead of large complex script - few tools with each own task. Solid CLI tool and GUI script on top of it. Apply all previous code reviews on new code. Some improvements from myself Input arguments ...

 
@DerKommissar rewrite as in ... develop from scratch?
or as in run a sed-replace?
 
Dev from scratch
 
~gulp
 
I don't own the source to them and the vendors have made it very clear they will not switch to .NET Core.
 
5:14 PM
soo ... no X-Runtime compat?
 
Nope.
 
what are the odds they will switch after you're finished rewriting the stuff?
 
Zero lmao
It's C++ with a .NET Framework wrapper
The C++ is very much Windows only
(This is the major one I need support for.)
 
Would .NET Core 3.0 help, maybe?
It might be faster to just wait for that to come out, if it would help at all.
 
@DerKommissar It shouldn't be too hard to multi-target that...
then again if the source isn't open, you can't really submit a PR introducing multi-targeting :/
 
5:39 PM
 
@RMunroe much human-nature
 
5:53 PM
For reviewing codes SE has a separate site for it: codereview.stackexchange.comChirag Jain 55 secs ago
I believe this question would be a better fit on the Code Review site. — halfer 8 secs ago
 
@Vogel612 It uses Windows internals. I've seen parts of the source.
It does some P/Invoke stuff that's less-than-flattering.
@Vogel612 And no, source is closed. Very, very closed.
 
ohh... yea that makes it hard to go for .NET Core
~sending good vibes your way
 
@Hosch250 .NET Core will never fix the things they need, they rely on some Windows-specific stuff that you just cannot do with .NET Core (without reinventing the wheel).
 
I'm done for today
 
@Vogel612 Appreciate it. ;)
@Hosch250 It's a 2-person shop, we'll be screwed at the end of next year when the two of them retire. I've spent the last 6 months researching alternatives.
 
5:59 PM
LOL, ouch.
Buy their systems.
 
That is an option we are discussing.
(That's also how I've gotten my hands on bits of the source.)
 
TBH, it's probably the safest version.
Who knows how much they could lose of something goes wrong with changing things over.
And that's over and above the planned dev/test time.
 
It's coming down to a licensing snafu, and some client-issues. They have clients that are direct competitors of ours, we're trying to find an ethical way to acquire them.
 
That's nice of you guys.
The most ethical way is probably to buy them and open source it.
 
Not really, it's their requirement.
 
6:02 PM
That way you don't harm competitors.
But you still get what you need.
 
We just wanted to buy the whole thing and take over their other clients, they won't let us do that without more guarantees.
 
Is it a reasonably stable business?
 
Theirs is, they make good money from it (the pair nets $1.2m+ a year).
 
Could you personally buy it and just keep running it personally?
 
We're looking at spinning up another company to buy it.
 
6:03 PM
Probably the sanest idea.
How much are they asking? You might have a competitor here :)
/jk I can't afford to buy a million-dollar business.
 
Yeah, they want a (very) reasonable price, so we're thinking about splitting all of our tech-resources off into a third-party company, and consuming them.
They want roughly 5-years earnings.
 
Yeah, even if I was to get a loan, I'd have to put 1m down. Definitely not a competitor here.
And probably more, since businesses are riskier investments than houses.
 
0
Q: Universal OpenGL object RAII wrapper class

JacajackI created a universal OpenGL object RAII wrapper class, that only takes care of object creation and destruction. Here's my code and reasoning behind it: I first wrote a class that would take glCreate/Delete*() function pointers as constructor arguments, but I quickly realized that's not the righ...

 
We make at least 50% more than their asking price per-year, from their application, so it's definitely something we're not afraid to do.
 
I'm voting to close this question as off-topic because this belongs on codereview — DeepSpace 54 secs ago
@DeepSpace Feel free to recommend the OP post on CR but in the future, please don't use the existence of the Code Review site as a reason to close a question. Evaluate the request and use a reason like too broad, primarily opinion-based, etc. Then you can mention to the OP that it can be posted on Code Review if it is on-topic. Please see the section What you should not do in this answer to A guide to Code Review for Stack Overflow usersSᴀᴍ Onᴇᴌᴀ 40 secs ago
P.S. this post would currently not be on-topic on CR because the code is not embedded directly — Sᴀᴍ Onᴇᴌᴀ 5 secs ago
 
6:27 PM
-1
Q: Simplify else if statements in JS for a prompt to code?

Guy In NeedHow do I simplify else if statements? I want the code to be able to run a bunch of code based on the users input, such as bring to link for some of them, so I am not looking for alert (prompt) BELOW IS AN EXAMPLE var prompt = prompt ("Test"); if (prompt == "test1"){ alert ("test1") } else ...

 
7:25 PM
0
Q: Keep ABC size down for conditional string concatenation in Ruby?

willlmaI originally had this helper method. EVENT_TEXT and REASON_TEXT are hashes that map properties to more human readable strings, like pickup_date: 'a pickup date change' def comment_text(comment) [ (EVENT_TEXT[comment.event.to_sym] if comment.event.present?), ('due to ' + REASON_...

 
possible answer invalidation by Reinderien on question by Reinderien: codereview.stackexchange.com/posts/217047/revisions
 
7:44 PM
0
Q: Generalized solution to creating k-sized sub/supersets from a given set

ielyamaniIn this code for a Set Game, using nested for-loops seems inevitable. But suppose there were more properties to provide for the Card initializer, the pyramid of nested loops would grow even bigger. A possible solution could be to generate all the possible k-sized sub/supersets from the initial ...

 
8:04 PM
@Duga OP added sample output, per request of @SimonForsberg
 
This question might be better on-topic at CodeReview. Anyway, please edit the question and include a MCVE that demonstrates slowness. — vonPryz 15 secs ago
 
8:23 PM
0
Q: Linux wc command in C

userUSeruserI'm working on my implementaion of the linux wc command. I finally have something that is working properly (with no options yet) but i think it needs a lot of "cleaning". I mean, i highly disrespect the "do not repeat yourself rule" and i want to hear some ideas on how can i polish this up a bit....

 
8:43 PM
0
Q: Reordering items which must have alphabetically ordered keys

Toby SmithI have a list of objects each with a unique Key and a display name (Label). The list needs to remain sorted by the keys of each object but unfortunately the keys need to be strings rather than numerical and as such 'sorted' here refers to the keys being sorted alphabetically rather than numerical...

0
Q: Convert human readable string to TimeSpan

dafieI want to pass time interval as a string (to program args) and then I want to parse it to TimeSpan. I created simple class: public static class TimeSpanConverter { public static TimeSpan Convert(string input) { var units = new Dictionary<string, int>() ...

 
9:02 PM
0
Q: Hackerrank Beautiful Strings

Rajat SaxenaFrom Hackerrank Beautiful Strings: You are given a string, S , consisting of lowercase English letters. A string is beautiful with respect S to if it can be derived from S by removing exactly 2 characters. Find and print the number of different strings that are beautiful with respe...

 
 
1 hour later…
10:13 PM
@Mast hopefully the close vote queue doesn't get as large as the SO one (I know that is a long shot but given the growth lately who knows....)
 
 
1 hour later…
11:38 PM
0
Q: How to show message on negative input?

TheAppGuy21I have a small bug in my code below where user is prompt in the how many students? and how many tests per student. When user enters a -1 integer . or any negative number it shows an error: libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc. Is there a way ...

 
11:56 PM
This hsould be moved to code review or something. Do not downvote on something that does not belong here. — Gox 25 secs ago
Sounds like this belongs on code review — Michael Randall 14 secs ago
 

« first day (2165 days earlier)      last day (1851 days later) »