« first day (2008 days earlier)      last day (2307 days later) » 

00:10
possible answer invalidation by Jose A on question by Jose A: codereview.stackexchange.com/posts/206689/revisions
00:56
@Duga Acceptable: just filling in the details.
01:33
0
Q: Contest Solution: Super Freq

T145 The Problem A character is known to its homeboys as a super freq if it occurs with frequency greater than 15% in a given passage of text. Write a program that reads an ASCII text file and identifies all the English alphabet (A-Z, a-z) super freqs in that text file. Your program should be ...

01:48
0
Q: Lo Shu magic square

Parker Boppstraight up i have no idea what i am doing. I was out sick one day and missed this day and could really use some help. This is the question... Create a program with two functions. The first function should take no arguments and should return a 2-dimensional list. The 2d list should contain rando...

02:21
This may be more suitable for the code review codereview.stackexchange.com stack exchange site — user1605665 26 secs ago
Check Code Review's What questions can I ask about here? help topic - you might get what you want over there. Also, please read stackoverflow's How to Ask and the other links found on that page - as it stands your question is a little too broad.. Welcome to SO. — wwii 55 secs ago
0
Q: Bit Mask Application written using GTK+ 3

FarazI've been studying C on my own using K&R 2nd Edition, and started exploring GTK+ to practice some of the concepts I've learned by making GUI applications. This is the first GUI application I've built, designed in Glade and coded in C. I've also included my Makefile with compile options and the G...

02:41
Hi Terry, this might be a more appropriate questions for codereview.stackexchange.comLex 13 secs ago
If you have a working piece of code from your project and are looking for open-ended feedback in the areas: Best practices and design pattern usage, Security issues, *Performance*, Correctness in unanticipated cases - Then Code Review SE is the right place to ask questions. — Nikhil Vartak 16 secs ago
I'm voting to close this question as off-topic because it is requesting a code review. — skomisa just now
03:32
0
Q: refactoring/polishing the code so that it look clean

Terryy4=[] y3=[] y2 = [] d0=[] d1=[] result = (client.query(sample_query)).raw for key, value in result.items(): d0.append([key,value]) y=(d0)[1][1][0] for key, value in y.items(): d1.append([key,value]) y1= (d1)[2][1][0::59] x2 = y1.pop(0) for z in y1: z3 = z[0][11:13] z4 = z[1] y...

 
1 hour later…
04:33
0
Q: Another school task

SkryptixHeyo, this is my second time using this site and for my previous post, you guys were incredibly helpful and helped me immensely, as such I was hoping that someone could help review my code again! My task is as follows: In preparation for the examination candidates should attempt the following pr...

05:01
Monking
05:15
possible answer invalidation by Faraz on question by Faraz: codereview.stackexchange.com/posts/206766/revisions
0
Q: Find the combination of matches which are closest to each other

vikrantProblem - Given three sorted arrays find combinations which are closest to each other. example - i/p - 3,8,18 7,11,16 10,15,19 o/p - (8,7,10) i/p - 2,2,6 11,15,15 8,8,18 o/p - (6,11,8) Kindly review this scala code and suggest improvements import scala.math.Ordering._ object NearestMa...

05:30
possible answer invalidation by Terry on question by Terry: codereview.stackexchange.com/posts/206768/revisions
If your code is currently working then your question is better suited for codereview.stackexchange.com as it deals with code reviews. Otherwise if you have an actual problem with your current code you need to state that problem. — Patrick Evans 50 secs ago
 
2 hours later…
07:15
Monking
@RMunroe that one is pretty cool. reminds me of the "time" comic
07:44
This kind of questions fit codereview.stackexchange.com better. — Szymon Stepniak 34 secs ago
0
Q: Calculator application by an Html beginner

DudeCoderI've created a Calculator using HTML, CSS and core JS. I just need some suggestion or improvements on my code. Here is how my app works: So, basically, firstly the user enters a number, then clicks on an operator, after then the current number on the screen gets stored in a variable firstOperan...

Maybe softwareengineering.stackexchange.com or codereview.stackexchange.com is a better sight for non-specific questions like this. — Jayson Minard 46 secs ago
08:32
0
Q: Should I combine Dependency Injection with Factory patterns?

Nhan PhanI am implementing a document service. Based on Filetyp, we will have 3 Document class: Word, Excel and Visio as bellow: public enum FileType { Word, Excel, Visio } public interface IDocument { } public class WordDoc : IDocument { } public class ExcelDoc : IDocument { } public ...

08:45
possible answer invalidation by Terry on question by Terry: codereview.stackexchange.com/posts/206768/revisions
08:57
Monking
Consider migrating this question to Code Review. — D Drmmr 32 secs ago
Monking
09:17
-1
Q: Record and count touch inputs in the background

Miha MWorking on an Android app that records and displays the number of touches in the app and in the background as a service. It should also detect and record touches when other apps are running. What would be the best approach to get this working? I'm currently using onUserInteraction method in the ...

09:29
What does "doesn't work well" mean? Is it too slow? Does it produce error messages? What kind of "large" strings are affected? And if it works - why not ask on Code Review for evaluation of your strategy? — Mr. T 49 secs ago
09:48
@DDrmmr codereview.stackexchange only accepts working code. If there's a compiler error, it definitely doesn't belong there. — Max Langhof 57 secs ago
10:32
0
Q: Implementing a random distribution satisfying RandomNumberDistribution concept

WalterImproving on this code review, I provide logarithmic_distribution to satisfy the C++ RandomNumberDistribution concept implementing the PDF p(x) = N*(m + k * log(x)) with min <= x <= max. Parameters are m, k, min, max, while N is a normalization constant (to be determined from the parameters). ...

Monking
@CaptainObvious No context and code not implemented yet. Bonus points.
@Duga A mess.
More messes recently than earlier. Perhaps the system is absolutely horrible in UX perspective...
11:17
-1
Q: Howto check if int exists?[Python]

Christo PapadopoulosI want to set an integer variable to 100 if the user doesn't enter any information in the input section, but how would I do that? # Text Printer/ spammer, please dont choose a number past 10000, otherwise it crashes repl. #This code asks the user for the text to say and how many times to say i...

@202_accepted What have you done?
@Mast I don't see a mess there? Looks like acceptable edits to me.
11:35
Re-reading the question, I agree. unfortunately, I found the question unclear: " breaks structural equality, potentially hides attributes of an objects that are "logically there" when debugging, and could mutate global state unintentionally" does not mean much to me at least. The only problem I saw with putting the value on the class was Perhaps I should have instead pointing OP at codereview.stackexchange.comrikAtee 9 secs ago
@SimonForsberg I have imported my entire Active Directory domain to Neo4j. :)
@202_accepted ... Why?
It's a long (and confidential) story, but the thing I'll say is that Neo4j let's is do a lot of really powerful auditing that Active Directory makes difficult.
Cool
I'm not too familiar with Active Directory, but it contains a bunch of information about which users exists at your company, right?
11:51
Yep
It also has a list of every computer in the company, and the different permissions users and computers have, etc.
AD was awesome, years ago. It's a bit cumbersome given the alternatives available now.
@SimonForsberg It's lacking context, so context was added, which for some reason was removed again, with answers that got downvotes without comment.
Not exactly how we like it to go, no?
Oh, and on the verge of getting closed.
12:14
@Mast I don't have any idea where you get cumbersome. I setup a fake AD domain for a demo in a period of 2 hours, including installing the VM
0
Q: Performance for creating millions of database entries

PadaromThis software needs to generate potentially millions of database entries. These entries contain generated codes and generated number series. Codes are sent out to end users to redeem and number series are used internally for drawings. class Generator { public function createCodes($count, $pr...

it's not too bad really, it's fairly clear, well-formatted, good variable names. What don't you like about it, specifically? BTW if you want someone to thoroughly review your (otherwise working) code for quality etc, there is a site specifically for that: codereview.stackexchange.com - you may want to see if you can ask a suitable question on there. — ADyson 18 secs ago
This is probably too broad in scope for Stack Overflow. Perhaps you could post to Code Review instead; but check out their help pages (too) before posting. — tripleee just now
12:46
Non working code is off-topic for Code Review — Heslacher 32 secs ago
12:59
Or move all the comments...that works too...>.<
13:17
-1
Q: How can I simplfy this javascript function in React Native

Radex26Hi I develop react native project and I use this function: firlatpress = () => { const { firstinputvalue, secondinputvalue, thirdinputvalue, } = this.state; if (firstinputvalue === '?' ) { this.setState({ firstinputvalue: this.DRAGDROP[0].firlattext8...

@202_accepted Not to set-up, but to maintain for larger organisations. All the licensing alone already is sub-optimal.
@Mast Microsoft licensing is seriously screwed up, but maintaining AD for large organizations doesn't take any different licensing.
We use scripts and such to maintain most of our AD, and we're not even that large.
No, but you need a heck of a lot less licenses for doing something simple in a 4-person company than running the entire network with loads of odd features on a 200-person company.
Yeah, but that has nothing to do with AD.
Client access licenses.
13:21
That's for different things altogether...lol
That's not for AD, that's for Email or File Sharing or something else.
That's not coupled?
No
AD is just a domain service.
It's just user auth.
(And an org structure if you use it like that.)
ADDS (standard AD implementation) has no licensing attached. If you have a server that is properly licensed, it can be your AD DS domain controller, and there's 'no limit' (about 2.15 billion is the "true" limit) to what the server can do with AD.
You can create up to 2.15 billion objects over the lifetime of an AD DC, but there are workarounds for bypassing that limit.
possible answer invalidation by Chris_F on question by Chris_F: codereview.stackexchange.com/posts/56978/revisions
0
Q: Contest Solution: Al Gore Rhythm

T145 The Problem After his brush with the Justice Department over fundraising with Buddhist monks, the Vice President devised a plan to ensure that such activities are carried out in a more discrete manner and are kept less noticeable. Realizing the Democratic National Committee’s need for...

13:47
0
Q: C++ Currency Converter

AlartskyI'm planning to write a currency converter using CPP classes. It should operate on three-letter abbreviations and be able to accept new, even made-up currencies at any time. It should take the given amount of money from the user, check how much cash cantor has in every available currency and list...

0
Q: Fixing Connect 4 Python

Beginner-Coder123Okay so i'm having some trouble fixing the connect 4 game that is made in python. I was wondering if I could get rid of the Global statements and pass the variables between parameters and return its values. Also to put all of this in a class. I was wondering if this is possible. And likely, how c...

possible answer invalidation by WizardCovfefe on question by WizardCovfefe: codereview.stackexchange.com/posts/206751/revisions
@202_accepted Right. So AD itself is easy, but everything else using AD gets complicated.
Yep.
The rest of it is all based on the "service" being used.
@CaptainObvious Wut
loop = True

while loop:
Abusing globals much.
@Duga Not an invalidation.
More of an extended comment to his own question.
14:06
@SimonForsberg The main bulk of the code to: 1) parse the AD Export; 2) build a proper in-memory domain model; 3) prepare the domain model for Neo4j import; 4) import to Neo4j for all of this is roughly 460 lines of F# code.
let neo4jCreateResults =
    fn
    |> File.ReadAllText
    |> CsvParser.Parser.parse
    |> ADParser.Parser.parse
    |> List.map ADParser.Neo4j.neo4jCreate
    |> List.concat
    |> List.map command
And that's the usage...lol
0
Q: Translate a day in year to month and day 2nd method

dino2018Take an integer representing a day of the year and translate it to a string consisting of the month followed by day of the month. For example, Day 32 would be February 1. I've already submitted my first attempt, but after looking at ctime library, I came up with this method. So, the function just...

14:32
0
Q: Little Address Book coded in Python 3

ericoshimadathis program seems to be working well so far, but I know it can be cleaner and more efficients with certain functions/methods. As I'm still beginning to code any feedback would be very welcome. # Creating class named contacts with methods for editing and adding new # contacts. Also there are s...

0
Q: Nested (3+) Synchronous Calls (with if-evaluations) Using FlatMap?

AlainI've written a bit of code for one of our projects in Angular recently. It contains a lot of nesting of subscriptions (synchronous ones, not asynchronous) and it didn't sit well with me. It turns out that it's quite an anti-pattern and looked up ways of handling this better. Apparently, flatMap(...

14:47
0
Q: Implementation of the Snake game in Pygame, with GUI

Neves4I wrote a simple Snake game in Pygame, with GUI. It`s my first Pygame game and one of my first projects in Python. This game is meant for both HUMAN and AI players (you can see more in the repo). Can someone give me some advice on how I can improve speed, readability and overall size of the imp...

15:17
1
Q: What are "better alternatives" for control flow rather than exceptions?

PierreThere are a lot of questions about "why use exceptions is bad for control flow?" so it's not my question here. Indeed, I just watched a conference of Niall Douglas about errors handling in C++ and he says (around 8:10) to not use exceptions as control flow where better alternatives exist. My que...

@PythonPeople (@Mast @MathiasEttinger) and anyone that knows anything about static typed languages, do you know how to fix an issue I have with static types in a generic method
15:30
possible answer invalidation by stfedosov on question by stfedosov: codereview.stackexchange.com/posts/206316/revisions
0
Q: Proper error handling in node using try catch

nicholas mitchellIm new to javascript programming and i am required to make a web app. Node.js will be used as the js runtime environment. In order to minimize the amount of time needed for debugging as the app develops I would like to implement a robust error handling scheme. However, due to my limited backgroun...

@Peilonrayz Python and types. Aren't you fixing the wrong problem? Can you make it so it doesn't matter what T is?
If you need to do X when it's type A and Y when it's type B, verify type and make branches. I wouldn't do that with generics, since you're doing 2 different things.
I'd only use things like overloading in static-typed languages.
@Mast That's the thing it doesn't matter what T is, because my code runs fine. But it matters that PyCharm does understand the type, because otherwise it makes all the typing useless
As for overloading, I could, but I don't think the benefit of creating each function ~10000 times to outweigh the cost
16:02
0
Q: K&R Exercise 1-18. Remove trailing blanks and tabs from each line

div0manIntro I'm going through the K&R book (2nd edition, ANSI C ver.) and want to get the most from it: learn (outdated) C and practice problem-solving at the same time. I believe that the author's intention was to give the reader a good exercise, to make him think hard about what he can do with the t...

0
Q: Monadic implementation of asynchronous tasks in C# (hidden overhead of threads)

MarkoniusSo, I've been reading about monads and I wanted to see if I could implement a system for asynchronous computation in a monadic way. I came up with two solutions: The first one spawns a thread for each function bound, and this thread waits for the previous thread to finish. Should this bother me?...

@Peilonrayz Ah, it's a PyCharm issue. The question makes more sense now, yes.
@Peilonrayz I definitely wouldn't recommend it.
@Peilonrayz Honestly, I don't know. Do the PyCharm docs say anything about it? Is there any way to contact their devs to ask for clarification and/or feature request?
If your code works but you're looking to improve it then you should maybe post it at Code Reviewzakharuk_pasha 11 secs ago
@Mast I should probably verify if mypy works with it actually
@Mast Thing is I don't think it's a problem with PyCharm, because logically it doesn't make sense why it'd just guess the type in some respect too. PyCharm also yells at me because of this already too.
16:21
@Duga Self-removed.
@Peilonrayz I don't know, but compilers having to guess is usually bad.
Compilers/interpreters/etc.
Not sure how you'd go about this.
Yeah, I tried making an ABC, but still I don't know the generic so it doesn't really work. This is really starting to get annoying ;_; I remember the one problem I have with static languages
Static languages are fine as long as you're doing static things.
16:45
possible answer invalidation by HenrikS on question by HenrikS: codereview.stackexchange.com/posts/206748/revisions
@Duga Yes. Good Duga. Well done.
Monking
17:31
It's that time of year again! You've earned the "Yearling" badge (Active member for a year, earning at least 200 reputation).
0
Q: Won't enter loop even after satisfying condition

Bolbo NaIf i give n=1 it should enter the loop once as 0>1 but it doesnt.it shows face's value as 0.it doesnt even ask for string input. import java.util.Scanner; public class Problem785a { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int n=sc.nextI...

18:02
0
Q: Leetcode #146. LRUCache solution in JAVA (Doubly Linked List + HashMap)

John DoeProblem Statement: Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and put. get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1. put(key, value)...

18:17
0
Q: Unlist all NuGet packages but the last version

t3chb0tI like to unlist my old NuGet packages to keep my catalog clean. However, after a couple of uploads it's always a pain to remove each single package manually so I thought I write a utility for it in python. It works like that: query the service index for the search url find my packages by auth...

possible answer invalidation by HenrikS on question by HenrikS: codereview.stackexchange.com/posts/206748/revisions
19:02
0
Q: A function to validate that a unbound form in access has all required fields filled out

KySotoMy goal in this code review is to see if i can figure out how to optimize the Validate function takes up fewer lines of code. i know there must be a way to cut it down so that it doesnt span 300 lines of code. The Validate function is designed to allow me to check all of the controls in an acces...

@Duga Added comments, probably OK.
19:17
0
Q: Python 3 implementation of binary heap

anomalyInspired by exercise on HackerRank where I'm expected to implement binary heap with additional method that allows to remove any value from heap I decided to clean up and expand my code a little. Expansion is an ability to pass custom comparator to the heap, and method to remove first element from...

-1
Q: Python Close MySql Connection using MySQl Driver

Nono LondonI am new in Python, and am trying to build a class which will handle MySQL connections. For some reason, the bellow code says that connection is opened after using the close method # import mysql.connector from mysql.connector import errorcode, MySQLConnection class MyConnector: _myconn...

possible answer invalidation by WizardCovfefe on question by WizardCovfefe: codereview.stackexchange.com/posts/206751/revisions
@Duga rolled back
0
Q: Select all fields from products table and the lowest applicable discounted price

Samuel ShifterovichI have a products table. I want to select all fields (of a given row) and the most profitable discount that the user can claim (depends on ordered quantity of the product). This is my current query: SELECT p.*, qd.price AS qd_price FROM products AS p -- Find all applicable QDs LEFT OUTER JOIN...

0
Q: jQuery Yes/No Flowchat/Workflow - Performance improvements

pee2peejsFiddle here: http://jsfiddle.net/eh8yvu16/ My question is whether the code below could be more streamlined? I like the way it works but feels like it could be optimised a bit more, not in terms of faster processing but fewer lines of code in HTML and jQuery. It's basically a yes/no workflow. ...

19:45
possible answer invalidation by Peepe on question by Peepe: codereview.stackexchange.com/posts/206723/revisions
0
Q: Simply return true or false if a string has a letter 'b' 3 characters after 'a'

user8758206I'm relatively new to JavaScript and wonder whether my code is 'acceptable' for a practice exercise. Essentially, the function (successfully) returns true or false if the provided string has a letter 'b' 3 characters after a letter 'a' - e.g.: Input:"after badly" - Output:"false" Input:"Laura so...

20:03
I see a shell injection bug, an SQL injection bug, use of an experimental feature with a broken design, and O(N^2) code that could be made O(N). You should have this code reviewed! — ikegami 26 secs ago
I see a shell injection bug, an SQL injection bug, use of an experimental feature with a broken design, use of 2-arg open, O(N^2) code that could be made O(N), needless use of global variables, and $executeRowUpdate < 0 will never be true. You should have this code reviewed! — ikegami 19 secs ago
 
1 hour later…
21:17
0
Q: Android MVVM application architecture

igor_rbInspired this guide: https://developer.android.com/jetpack/docs/guide I try to build some app with similar architecture. App interact with remote API via http protocol (json responses from server). For example, GET /bonuses/:id return {status: true, bonus: {id: 1, name: "test bonus"}} POST /lo...

merge-branch is a transient branch which then destroyed after a merge takes place. As we do peer code reviews, we need that so that others can look over the code prior to committing it to dev. — Adrian 55 secs ago
21:32
0
Q: PasteBin Scraper Based on User Regex

falconspyI am attempting to scrape PasteBin submissions for user defined regular expressions. For example: 'google.com' I have the following code block that could probably use an optimization based on a question I asked over on Stackoverflow. The code does result in some errors which I will put after the...

21:47
0
Q: Combine contiguous spreadsheet cell references into larger ranges

tehhowchFor a hobby project, I am using openpyxl to export Excel workbooks as JSON. Part of this involves identifying the formatting applied to cells, and serializing this information (provided the format is not the default - no need to export that). To minimize the output JSON filesize, it is sensible t...

 
1 hour later…
23:02
0
Q: YA hash tuple in C++17

user1095108Is there something terribly wrong with this implementation? template <class T> constexpr inline std::size_t hash_combine(T const& v, std::size_t const seed = {}) noexcept { return seed ^ (std::hash<T>()(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2)); } template <typename ...T> struct hash<std...

23:20
codereview.stackexchange.com/questions/206838/… is the attempt at code review. Broken code should not be sent there. — chicks just now
23:48
0
Q: GET multiple data frames using external module's function that uses requests

Jack MoodyPurpose The point of this mini project is to quickly gather data from a website's API and combine the collected DataFrames into a "master" DataFrame with all of the stocks I am interested in looking at. I do this using the iexfinance module. If needed, here is the code behind iexfinance. Improv...


« first day (2008 days earlier)      last day (2307 days later) »