« first day (1727 days earlier)      last day (2283 days later) » 

12:00 AM
RELOAD! There are 4954 unanswered questions (90.2083% answered)
 
12:52 AM
0
Q: Is this something that is useful here

Martin YorkWhen we have a bad question pasting one of the appropriate questions from this site may help. http://idownvotedbecau.se/ Specifically this in a comment. http://idownvotedbecau.se/imageofcode

 
1:57 AM
0
Q: Measuring class load times with utility method

ropuxilWhen ever I load a new class I measure the time it takes to setup, initializing and load that class, it helps me debug the time it takes to complete actions within my application. Here I have a pretty nice feature that does it all for me. public static T CreateInstanceOf<T>() where T : new() { ...

 
2:49 AM
0
Q: Set a default input for a method; partialmethod after class definition best option?

BrianI am using an object that expects a keyword argument for every call, but I never intend to change it. In this case a timeout of 10. What is the best way to add a partialmethods for each attributes. In my example I want to set a timeout for my session requests http methods. I could monkeypatch S...

 
3:26 AM
Welcome to Stack Overflow! This site works best for broken code that has a specific issue (see the help center). However the Stack Exchange network is much more than just Stack Overflow - see there's Code Review, a whole site dedicated to improving every aspect of working code, including performance! =) — Mat's Mug 33 secs ago
You'll want to include that ConvertToLetter function, for context. Also make sure you read the site's posting guidelines, too! — Mat's Mug 14 secs ago
 
 
1 hour later…
4:29 AM
0
Q: At least 1 character from every chosen character group is in the password

Hunter T.import random import string length_of_pass = int(input("How long do you want the password to be? ")) # the four variables below are the components/characters to make up ascii _____ lowercase = string.ascii_lowercase uppercase = string.ascii_uppercase numbers = "0123456789" special = "!#$%&’()*+,...

 
5:07 AM
Monking
 
0
Q: makefile for CGI program using SQLite library

user2309803Hi experience make users, I am developing a CGI program in C on Linux using gcc, GNU make and the SQLite library. How does my makefile look? # Automatic Variables # $@ file name of target # $< name of the first prerequisite # $? name of all prerequisites newer than target # $^ names of all pr...

 
5:33 AM
Monking
 
0
Q: Return the repeated number and the missing number

Anirudh ThatipelliInput: Array of n integers, containing numbers in the range [1,n]. Each integer appears once except A which repeats twice and B which is missing. Output: Return A and B. Example: Input:[3 1 2 5 3] Output:[3, 4] A = 3, B = 4 My approach: public class Solution { // DO NOT MODIFY THE LI...

 
5:52 AM
0
Q: Leetcode 54: Spiral Matrix

Jianmin ChenProblem statement Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, Given the following matrix: [   [ 1, 2, 3 ],   [ 4, 5, 6 ],   [ 7, 8, 9 ] ] You should return [1,2,3,6,9,8,7,4,5]. My introduction of a...

0
Q: EventLogger for Mvc application

Ljdhameliyai have worked on one application related for booking space and required to store activity of user into table and access from admin side. for that i have created one database entity and EventLogger class. public partial class UserEventLog { public int ID { get; set; } public string UserID...

 
6:25 AM
possible answer invalidation by Emre O. on question by Emre O.: codereview.stackexchange.com/posts/185778/revisions
 
6:38 AM
@JDB: No, this isn't at all a CR question. More: codereview.meta.stackexchange.com/questions/5777/…T.J. Crowder 48 secs ago
 
6:49 AM
0
Q: TicTacToe for Humans in C

AstroblemeThis is a small project that is intended to be an educational exercise in learning and consolidating basic syntax and concepts of C. It is a simple console-based implementation of TicTacToe which prints the game state on each turn and takes input accordingly. In each step, it checks if any player...

 
7:48 AM
Please edit your post to include the text file you want to read, the expected output and the actual output. Moreover, StackOverflow isn't CodeReview, so please show any research effort you've done to solve your problem — Rafalon 11 secs ago
 
8:25 AM
0
Q: Loop on maps to find duplicate

Nina watcherIve the following code which do the following there is two Maps with properties and I need to check if properties with the same key and value is already exist, if yes thorow an exception Map<String, Object> existingProperties = requires.get(requiresIndex).getProperties(); for (Map.Entry<...

 
8:52 AM
0
Q: Transforming elements of std containers from other std containers

WooWapDaBugProblem In this HackerRank problem we are asked to rotate the elements of a matrix in the following way: first and second entry specify the size of the matrix and third entry how many times it has to be rotated. As an example, the following input: 4 4 2 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ...

0
Q: Compute max population given a list of people's birth and death year

Leo RomanovskyI recently came across a brief programming puzzle prompt (say that three times fast) which asked to return the year that population peaked. The actual algorithm to compute it can be done several ways and is not particularly difficult, but I have recently been challenging myself to write .. ahem ...

 
First off, Please don't post screenshots of your code. Rather post the actual code. Secondly, SO is not the appropriate place for code review. — Agi Hammerthief 6 secs ago
 
9:07 AM
0
Q: Using while(true) in websocket

Ahmad RzaI am working on a chat app, using php, mysqli, websockets, I have written a websocket that basically uses while(true) to call function getNewMessage(); and this function checks if there is new data with status 1 and get it and display in user window. I want to ask if this is efficient way of doin...

 
9:26 AM
1
Q: Analyze the image of the database relation, and create the original database

ShadhikaI've sorted out an image relational database, and created its original database in phpmyadmin (I use XAMPP). here is a picture of the database relation and this is a database image I created myself in phpmyadmin. this for its sql file -- phpMyAdmin SQL Dump -- version 4.7.4 -- https://ww...

 
9:55 AM
I wouldn't say it's free of malpractises. There's many things here that you could do much differently (and why you should ideally post this on codereview.stackexchange.com) but it'll be a start :) — IsThisJavascript 39 secs ago
 
10:05 AM
0
Q: Update crud code to universal prepared statements.

Olivier Van de VeldeI'm busy learning how to make a good universal crud template in PHP with mysqli and i have made something but i'm kinda stuck because i want to update the code to prepared statements or eventually to PDO with prepared statements. here is a example of the code. Maybe someone can give a tip how to ...

 
10:20 AM
0
Q: how to override log debug method to suit my situation

lavish bansalI have an requirement in my application , there are multiple classes in which log.debug method is wriiten, now i want to change some messages before logging to output. one of the message of logging which is printing :- log.debug("Entitlement ddfdf "); I want to replace the ddfdf with space in...

 
10:36 AM
..btw for code reviews there is codereview.stackexchange.comtobi303 56 secs ago
I'm voting to close this question as off-topic because it´s a review and thus should go to codereview.stackexchange.comHimBromBeere 15 secs ago
 
10:55 AM
possible answer invalidation by Raimund Krämer on question by Astrobleme: codereview.stackexchange.com/posts/185939/revisions
 
-2
Q: Login System - How to add password hashing and cookies store feature in it

Sanu_012The below embedded code is written for a simple login system. I made it using parameterized queries. But I am not able to figure out how to hash password and store session cookies. Below is my code: <?php session_start(); require_once('connect.php'); mysqli_set_...

 
@Barmar Thanks for that... Question got cross-posted to Code Review and is on the verge of being closed there as well. Please familiarize yourself with the rules of Code Review BEFORE making any recommendations. — Mast 11 secs ago
 
If the quality of CR drops, at least we know where to look.
Bloody uninformed SO users...
 
11:26 AM
Monking
 
0
Q: light gremlins ieeextreme - GCD LCM or sets

Lior Edison MizrahiI was trying to answer a question called "lightgremlins" on IEEEXTREME. given a array number of gremlins and the prime numbers each chose return the numbers in range that are still on after all gremlins toggled there prime multiplied numbers. given the input: 30 3 2 3 5 output: 15 case co...

 
12:03 PM
0
Q: CamelCase to joint_lower

Richard NeumannI have written two functions, one actual and one helper, to convert camel case strings into joint lower case strings. Any ideas for improvement are welcome. def _cc2jl(string): """Camel case to joint-lower helper.""" for index, current in enumerate(string): if is_upper(current)...

0
Q: Functional way to Wrap multiple methods into one

user5685250Hi I am fairly new to the World of Function style Programming I was trying some code in Kotlin, given snippet below is what I did, but Looks so much Imperative to me @EmailTemplate("onCallTemplate") fun retrieveNextOnCallAndSendMail(time:LocalDateTime,trial:Boolean=true){ val emailTemplateI...

 
1:00 PM
If it's working, you can ask on codereview.stackexchange.com. Otherwise, describe the error and expected behavior clearly. — user202729 37 secs ago
 
Has anyone here used the Pluralsight Assessments, or know if it's particularly good? I tried the Python one out, and somewhat doubt my result...
 
Welcome to Stack Exchange! Your question would be better suited to Code Review. — Josh 49 secs ago
 
1:25 PM
Additionally, this may be more suited for codereview.stackexchange.comDavid 30 secs ago
 
0
Q: Single mySQL Query one-to-many efficiency

skribeI am fairly inexperienced with the ramifications of doing a single select where joining several tables and there are several one-to-many relationships while also running some built in mysql functions using column values between tables. The tables will be fairly large. 10,000 accounts, 70,0000 ...

 
1:45 PM
Perhaps you should discuss this with your code reviewer. That said, consider using the Composite pattern instead of a Factory. — Steven 1 min ago
 
-1
Q: Is it ok to create instance attributes directly in methods instead of __init__ if no then how should i do this

user378625for example: class A(object): def set_a(self, a): self.a = a because python is a dynamic programming language so i think we can create variable wherever we want and also type can be change

 
possible answer invalidation by WooWapDaBug on question by WooWapDaBug: codereview.stackexchange.com/posts/185944/revisions
This question is really too broad. Suggest asking on CodeReview or SoftwareEngineering — Mark Benningfield 59 secs ago
This might be a better fit at codereview.stackexchange.comsshow 43 secs ago
 
2:14 PM
Greetings, Programs.
 
Code Review is probably better suited for this question — Wondercricket 25 secs ago
if your code works, is bug free, and you want to optimize it, post it for the codereview site. Please read their guide lines and they are strict on how and what to psot. — MooingRawr 29 secs ago
okay I will try asking on codereview — Ashwin Sekhari 53 secs ago
Here is a link to asking good questions on that site. As a follow up to @MooingRawr 's comment. codereview.stackexchange.com/help/dont-askZack Tarr 22 secs ago
 
0
Q: Burnup charts in d3.js

LudisposedSo I've been tasked with creating a burn-up chart for the sprints we have at work. We make use of the Trello-API, to get tickets (Done/Completed/etc...) however that is not want I want reviewed, since this has been done mostly before I joined this project and is very extensive. I do however am a...

 
2:41 PM
Hey everyone! Do we have anyone here who's coding C++ professionally?
(I just realized that with that question, I'm actually getting paid to hang out here!)
 
@SimonForsberg Last time was about 15 years ago.
 
@Donald.McLean That's a start at least. I'm wondering, in real enterprise code that people write, is it the same common things that appear as in Code Review questions? (using namespace std? :P )
Are there coding issues that occur in real-life that don't occur in questions on CR, or vice versa?
 
@SimonForsberg Loki started the 'common review quotes' Git project, which has a couple of C++ recommendations
 
@Peilonrayz Nice. I'm wondering though how common those suggestions are IRL compared to on CR
 
2:59 PM
@SimonForsberg IDK, however, if they're good on CR, why wouldn't they be good IRL? There's only like 3 recommendations anyway, so it's not a complete list.
 
@Peilonrayz The recommendations are of course good, but I'm wondering if people IRL make the same mistakes as those on CR
 
TBH, I would link to the C++ Core Guidelines instead.
 
@SimonForsberg Yes.
At work, there's a standard. A commonly used approach, a format, whatever. A culture. The way the company does it.
Which may or may no adhere to the rules of the general public.
 
@SimonForsberg If I see using namespace std in a real project at work, I'm going to point them to our coding convention (which disallows using namespace in the global namespace) and the C++ core guidelines.
 
Ah, that's a good point @Mast
@Zeta Let me ask you then, have you ever seen using namespace std in a real project at work?
 
3:05 PM
@Zeta Last company I wrote C++ at the entire idea of using was disallowed.
Too many problems with custom functions.
Beginners in companies make the same mistakes beginners at Code Review make.
 
@SimonForsberg Only by C++ beginners or interns. We usually tell them not to use using namespace and limit the non-typedef-like using in its scope as much as possible.
 
They learn from a book, a tutorial, a source. That source tells them how to get things to work, not whether it's a good idea or not to do it like that.
And, honestly, I did the same thing wrong when I started out.
When you learn to program, you're trying to fix a problem.
You don't necessarily understand how you do that.
You get the general idea of the how and what and before you know there's such a thing as bad habits, you already got them.
 
@Mast Fun fact: I just grabbed the C++ book next to me. First complete example says "Just write using namespace std at this place in every program, we'll explain later" (p37). On p64 they finally tell you that they use "using namespace" to keep the example code short, and they recommend full names for non-example code.
 
@Mast Bad practices.
They might not be habits yet.
 
At the moment I'm learning myself how to play a keyboard and it's the same joke all over again.
 
3:11 PM
So for every code you write during that first 30 pages, the reader will use using namespace std.
 
@Hosch250 Depends on how fast you get to it I guess.
 
@Mast Play a keyboard? Do you mean "how to play the piano"?
 
@Zeta O, my book probably does the same thing.
 
I guess its common practice.
 
@Zeta Keyboard is usually a digital "piano keyboard" that has multiple instruments.
 
3:12 PM
@Zeta A piano is a snare instrument. A keyboard is an electric instrument capable of getting sounds not even similar to a piano. Afar from that, yes.
 
So, you could play the drums or the trumpet or something on it.
Some have really weird synthesizer noises.
 
It can also be a PC keyboard. Maybe Mast learns neo2 instead of QWERTY.
 
@Hosch250 And for bonus points, you can hook it up to a PC to make even more noise.
 
Or AZERTY or DVORAK.
@Mast Depending on how you hook it up, it could generate interesting noises indeed.
 
MIDI -> USB, hauptwerk and all of a sudden I got an organ.
 
3:14 PM
So a good old MIDI keyboard.
 
Hook it up wrong, and you might start a fire, which might start sirens and people screaming, etc.
 
@Hosch250 I'm an electrical engineer. I don't need a keyboard to cause all that.
 
@Mast You don't need a keyboard, but you could use a keyboard.
 
True.
Weren't we talking about C++?
 
lol. This is just like lunch discussions at work.
 
3:16 PM
Speaking of C++ and MIDI, my next project might involve both :D.
 
Bet that's what the keyboard's chip is programmed with. Wonder if they use best practices.
 
lol
It's a Yamaha, so it isn't like it's the first time they build one.
 
Either way, TTGH. Gniknom.
 
Many thanks for your comments, @Mast @Zeta.
 
@SimonForsberg Sure thing. Writing another presentation?
 
3:18 PM
Boy, do I hate TFS. It's slow...
@Mast Please share it with me if you do. I need to learn more C++.
 
@Mast I will have a sort of workshop for a group of coworkers (we're all consultants) and plan on going through some common mistakes for Java and C++.
 
@Hosch250 Dvorak's not named after the layout, but the author - so it's not uppercase, unlike most layouts
 
@Peilonrayz Oh, OK.
 
Otherwise it'd be ',.py XD
 
@Peilonrayz That .py threw me off for a sec.
I thought you were talking about some crazy Python file name.
 
3:21 PM
I found it amusing when I was learning the layout
 
@SimonForsberg Scott Meyers wrote a couple of good books.
About preventing rookie mistakes, among other things.
Memory management, etc.
 
I've heard good things about Stroustrup's books, but they are kind of old.
I have his teaching one. It does have the same using namespace std; problem for the first several chapters, but it does explain why not to use it later in when you can actually understand the issue.
I've found it covers cross-language best practices very well, like validating input, some design principles, and stuff.
 
Scott focuses more on the books for advanced C++, assuming you already know the basic stuff or can figure that out on your own.
Although, honestly, some of it is so basic it should've been part of the basic books.
But those usually stop just after exceptions or so.
 
Yeah, Stroustrup has an advanced book too that I don't have.
 
I think the best beginning-to-end book of C++ I have is from Bjarne, Programming Principles and Practice using C++.
Over 1200 pages or so.
 
3:33 PM
0
Q: Suggestions on structuring Firebase JSON tree

BrianI'm in the process of creating a simple registration system for my school district using Firebase as the database. I need two things for the client: the list of available courses and the courses a user has registered for. Following the Firebase documentation, I'm trying to keep my tree as flat a...

0
Q: Accessing directly the UBound element of an array created by the Split function

QHarrI am used to accessing items from an array, returned by the Split function, directly. Usually, I know the element I want and I say something like: Debug.Print Split(myVar, "/")(0) Questions: 1) Can I do something similar to access the UBound of the array returned? 2) What is the "best practi...

 
Which book by Martin Fowler would you folks recommend,
- Martin, Robert C. (2009). Clean Code: A Handbook of Agile Software Craftsmanship.
- Martin, Robert C. (2011). The Clean Coder: A Code of Conduct for Professional Programmers.
- Martin, Robert C. (2017). Clean Architecture: A Craftsman's Guide to Software Structure and Design.
Or all three of them?
I haven't read any TBH
 
I only got the first, can't comment on the rest.
I hadn't even heard about the last till now.
 
The first is good, but you already know everything, @SimonForsberg. If you don't want to/can't tell everything to everybody, have them get it and read it.
 
^^
 
The second I've heard is mostly just a rant about non-professional conduct. One of my acquaintances accidentally got it. IvenBach in the RD room if you are interested.
The third looks like something I'd be interested, but, like Mast, this is the first I've heard of it.
 
3:39 PM
@Mast That can be good OR bad. The reason that most COBOL was so verbose was the naming standards used by most organizations (not the language itself).
 
@Donald.McLean It's definitely better than no style at all, something I've also seen at companies. Which gets messy unbelievably fast.
 
@Hosch250 I also guess that I know most of it already, but it would be good to have references to point to, so that people know that it's not just me making it up :)
 
Well, one thing I've found that doesn't work is creating a library at work.
 
@Mast Agreed. That's one of the ways in which I am fortunate. On a project of one, I write my own standards.
 
I've had two people comment on it, but everyone is too busy working to read them.
 
3:41 PM
@SimonForsberg In that case you can definitely refer to the first on your list.
 
@Hosch250 library-library or code library?
 
Book library.
 
A book library can work, but it has to sprout by itself. You can't create it all of a sudden and expect people to use it.
 
I have Clean Code, a DB book, C# In Depth, a Knuth set, Programming Principles and Practices in C++, and another one or two.
One person said it was too small and said they'd get me a book on graph theory, but never did. The other commented on C# In Depth.
 
Reminds me, I never uploaded my book DB program. It's finished, just looks like hell...
I should probably fix that up sometime soon so it looks presentable and ready for upload.
 
3:45 PM
Our codebase is slowly but surely getting cleaner. I'm working through our old, untestable code and deleting anything that's unused, and restructuring the rest bit by bit. Each testable thing gets tests as I do it
I've added probably a couple hundred tests since I started in May.
 
I had a colleague doing that for PLC software. He measured his progress by LoC cut.
 
Which seems small, but then much of my work is bug fixes and not new work.
 
So if he could replace 10k from 2 projects by putting 1k in a shared library, he made 19k progress.
 
@Mast I can't cut too much in a lot of it, but I can make it more testable.
 
@Hosch250 Honestly, you should make it testable before cutting it.
 
3:47 PM
The section that has the most cutting potential is 100% undocumented, so everyone is scared to tough it.
 
Or you can never be sure.
@Hosch250 Is it also 100% unused? :P
 
@Mast I'm not cutting it. It's mostly basically copy/paste with using injected interfaces instead of explicitly newing up a DB context.
 
I think it's a good question for Stack Overflow, although you may also try your luck at Code Review. Personally I don't see a real problem with your current syntax, but if the code is simplified by a lot and the end result is a lot messier, then indeed you may want to look for an alternative design. — Mena 14 secs ago
 
The stuff I'm cutting is 100% unused.
Basically, a lot of it was either never used or reworked already, but the original stuff wasn't deleted.
So, I'm going through and deleting it to make sure it never gets used.
Got a few minutes while the gated checkin builds, and then back to my fire.
 
0
Q: Example : Extra points in football (Probabilistic Game Strategies and Backward Induction)

akshayThe above example is taken from book Algorithms Design and Applications by Michael T. GoodRich (page number 336 to 338 in text book and in pdf it's from 354 to 356, section 12.4.2) http://canvas.projekti.info/ebooks/Algorithm%20Design%20and%20Applications%5BA4%5D.pdf The code below is what I've...

 
3:51 PM
Did I say we are working on switching from TFS to Git?
And that we are updating to C# 7.2 this week?
And that I have a feeling I may be able to get us to switch from MS Test to NUnit?
 
So, good news?
 
Yup.
Probably the fastest I'll have good news in a long time.
Or get the most good news within a few days of each other, or whatever.
Oh, we broke 1000 tests this week too.
I mean, we didn't make that many fail, we passed that many in count.
 
0
Q: First attempt at a Java Roulette Game

TylerI was looking at since it was my first multi-class program, is there anything I could have done better, via making it shorter and other things as it's very long, and I'm not sure it's efficient enough or following 'etiquette' for coding with Java. Is there any advice in general that could improve...

0
Q: Need to optimize Python3.5 code?

Ashwin SekhariI want to discuss this problem on codechef: https://www.codechef.com/problems/FLIPCOIN out of all the submissions in Python 3.5 none was able to solve it in the provided time limit. How can I optimize my code? n,q = map(int,input().split()) c = [0]*n for i in range(q): j,k,l = list(map(int...

 
4:08 PM
@SimonForsberg Clean Code is pretty Java focused. Sure a lot of it is applicable to other Object-Oriented languages and some is even applicable to other paradigms, but some problems that are worked around in Clean Code just never appear in other languages.
It's still a good "General OOP Guidelines" book
 
4:21 PM
Please move your question to codereview.stackexchange.comSybaris 13 secs ago
 
4:37 PM
0
Q: 2D Discrete Motion Planner

mmmfarrellI am writing a 2D discrete motion planner for a task with specific instructions. The instructions for the search algorithm are contained entirely in the docstring for the search function. My main concerns with the code are the following: Did I get the complexity of this code correct( O(N) )? I...

 
4:59 PM
Monking
 
 
1 hour later…
6:07 PM
0
Q: Implementation of unix utility tail in C

bagI've written a simple implementation of tail as part of reading The C Programming Language by Kernighan & Ritchie. The question states to write tail, which prints the last n lines of its input. By default, n is 10 but should be able to be specified by writing: tail -n to print the last n lines. ...

 
6:22 PM
1
Q: C++ replacing windows dependent lib code with something from the standard library

Francis CuglerI have a couple of classes here one for blocking threads another for blocking processes. These were originally written with the Windows platform in mind. I would like to replace or substitute all of the win library code with std::standard library code for modularity, portability reasons. These cl...

 
@CaptainObvious Asks for rewrite with portable code.
 
@Zeta Don't forget to leave a comment.
 
Currently looking through the FPCs
But I think we don't have one for that case yet.
 
Pick an existing one and modify it a bit.
Or make one up.
 
Conjuring cunning comment…
2
Well, nevermind, 200 already closed with a better comment than I could come up with.
 
this might be more appropriate over at code reviewAlan Hoover 47 secs ago
 
0
Q: Sudoku - method "Check"-java

MaciekI have a question about "Sudoku". I copied method "Check" from github, but it checks all board. So I would like it to check one cell and don't say that you lost the game. Pls Help private void checkButtonAction() { btnCheck.setFocusable(false); btnCheck.addActionListener(new ActionLis...

 
7:04 PM
there is another stack site for code review. this is not the right place for that. Regarding your specific question about the image for 12 you really need to debug and find out .. this is not the right place to ask such a question! ... Good luck — A Khudairy 5 secs ago
 
7:15 PM
possible answer invalidation by QHarr on question by QHarr: codereview.stackexchange.com/posts/185977/revisions
 
@Duga Rolled back.
 
7:31 PM
posted on January 25, 2018 by Patrick Stumps

I'm very new to coding, taking my first coding class in college this quarter. I'm currently writing code for a guessing game in which every time the player guesses the text will display "Try your first guess," "Try your second guess," and "Try your third guess." My issue is figuring out how to make my code display 'first' 'second' and 'third.' I have tried setting an

 
Best is too subjective for this Q&A format. If you need code optimization, check out https://codereview.stackexchange.comOhgodwhy 18 secs ago
 
8:18 PM
0
Q: Calculates tuition for my school. How can I break it into multiple methods

Marty DixonI have here a code that I wrote in class, but the main objective is to break it into multiple methods. How do I go about doing that? package schoolregistration; /** * * @author dixonm */ import java.util.Scanner; public class SchoolRegistration { /** * @param args the command line argument...

 
8:40 PM
possible answer invalidation by user2309803 on question by user2309803: codereview.stackexchange.com/posts/185933/revisions
I'm voting to close this question as off-topic because it is asking for a better way to do already existing code. ask on Code ReviewDaniel A. White 30 secs ago
 
9:10 PM
-1
Q: Snake Game using python and tkinter

Ahmed887I have written a Snake game using Python's Tkinter library. I am a beginner to programming. I learned some python alone and in school. However, most of what we did in school is algorithms/data structures and solving problems (school program geared towards mathematics). Not much coding. Lately, ...

 
9:22 PM
If it works and you're asking for general feedback, you should probably head over to Code Review. — shmosel 40 secs ago
 
I've got a Python best-practices question, but I don't it think fits too well on the main site: my full code is quite large, and writing some small example that shows the issue at hand would probably fall under "too hypothetical." How should I get advice? Can I ask such abstract best-practices questions in chat?
 
0
Q: Listing all the cycles in a directed graph in C++

Shubham SarkarI have written a directed graph code, and I am a novice in C++ programming don't have much idea about the implementation of listing cycles in a directed graph. #include <iostream> #include <vector> #include <algorithm> using namespace std; // data structure to store graph edges struct Edge {...

0
Q: Change specific data based on condition

ArieProduct consist of at least 1 or more articles. Nummer consist of 3-parts separated by dots (always). The one which always appears is always with .1 at the end (main article). For all articles belongs to product their vater is always the main article. Example product consist of main article and ...

 
Whopper Neutrality, bloody brilliant.
@Vogel612 Clean Code ordered!
 
nice...
totally unrelated: Rushing Marine in Supreme Commander is ridiculously strong
 
9:49 PM
@EJoshuaS I think that this question could be acceptable for Code Review. The author appears to be saying that the code works, but in a "stupid" way, so it can be improved. — 200_success just now
 
0
Q: Making CRUD abstracted class in PHP

Никола Р.I did a working CRUD abstracted class, and I am not sure that this is a good way for it, so I would like to hear your opinion. protected function properties(){ $properties = array(); foreach (self::$table_fields as $db_field){ if(property_exists($this, $db_field)){ $p...

 
10:12 PM
0
Q: Project Euler problem 19 - How many Sundays fell on the first

Alex_n00bHere's the problem: How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)? And here's my code: #include <stdio.h> int main(void){ int months[12] = { 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 }; int year=1901; ...

 
10:35 PM
@DLosc Little good comes from abstract best-practice questions. The answer is almost always, "it depends on the details of the situation". Is it a good idea to use a class? Well, if the thing you are implementing is class-like, then yes, otherwise no.
 
10:47 PM
0
Q: How do I code this properly?

MaestroDI wrote a chat program in java/MySql and did the refreshing part of the chat frame with this code : //Thats the connecting part and reading out of the consisting data base sq = new sqlCom("db4free.net","3306"); ResultSet r = sq.executeQuery("select * from chat where chat.sichtbar = 1"); ...

 
11:02 PM
-1
Q: Sudoku solver, Java , StackOverflowError

VoidHave been trying to create a sudoku solver but i Just keep getting SOE.This is the code package sudokusolver import java.util. public class SudokuSolver{ static int grid [][] = new int [9][9]; // provide a grid static Poss [][] possib = new Poss [9][9]; // list of possibilities for each cel...

0
Q: Flatten Dictionary python challenge

NinjaGI got a question about this coding challenge for Flatten a Dictionary Given a dictionary dict, write a function flattenDictionary that returns a flattened version of it. def flatten_dictionary(dictionary): def items(): # loop through each item inside the dictionary k, v #Appending ...

 
11:19 PM
1
Q: Finding the longest overlapping period

LeronI have a list of records containing Id, DateFrom, DateTo. For the sake of this question we can use this one: List<(int, DateTime, DateTime)> data = new List<(int, DateTime, DateTime)> { (1, new DateTime(2012, 5, 16), new DateTime(2018, 1, 25)), (2, new DateTime(20...

 
11:34 PM
0
Q: Bootstrap carousel not working

Hajar ElkoumikhiI'm using Bootstrap 3 to code my personal website. I want to use a carousel. Items in my carousel will be different testimonials written by my employeens. so here is my code : <section class="container testimonialsSection"> <div id="myCarousel" class="carousel slide" data-ride="carousel">...

 

« first day (1727 days earlier)      last day (2283 days later) »