« first day (1298 days earlier)      last day (2733 days later) » 

12:00 AM
RELOAD! There are 3049 unanswered questions (92.2659% answered)
 
12:30 AM
possible answer invalidation by Zerowalker on question by Zerowalker: codereview.stackexchange.com/posts/147660/revisions
 
Carlsen–Karjakin 3.5–4.5
Karjakin won the last one!
I don't like how aggressive Carlsen plays.
And I like Karjakin's defenses, even if I don't understand them.
Hey, @PhiNotPi.
 
Hello
I was wondering... did you ever start of the lichess app thing?
 
No.
Busy with finals.
I won't be doing that for a while, though.
 
I can sympathize.
 
I'm doing a checkers game with an AI next semester.
 
12:37 AM
cool
 
@Mast Like this?
He was sure watching the clock.
 
Have you ever participated in a king-of-the-hill competition on codegolf.se? They are basically AI-writing competitions.
 
Yeah, sort of.
I was working on a counter bot using your style strategy.
Those pixel bot things?
Me and my partner didn't get it done by the deadline and the JS was a blooming mess, so I gave up.
Flu in the house, so I can't do anything now.
Brother came down with it today. Hoping I can get my final persuasive speech off before I get it.
Due on the 5th...
 
29
Q: Battle of the Fellowships KotH

Nathan MerrillIn this challenge, you are going to create a Fellowship with the goal of defeating all other fellowships in battle. A fellowship (team) consists of 3 characters. Each character moves independently of the rest of their team, but they will need to work together when fighting your enemy. Teams wil...

^ most recent KOTH, it's in the style of an RPG combat system.
 
OK.
GTG, BBL.
 
12:42 AM
Bye!
 
1:22 AM
0
Q: Decide if number is Armstrong number

SulakoreI just recently started reading the python.org documents and it looked like a really interesting language. Now, since Visual Studio 2017 supports Python, I decided to finally actually start learning it. My friend challenged me to write a program that checks if a number is an Armstrong number. Her...

 
1:52 AM
@Hosch250 Allepo? I don't know
 
That was OverCoder.
And Aleppo, I guess it is spelled.
Why, were you from there too?
 
2:04 AM
0
Q: C++ Tic Tac Toe Game

Ryan HallbergI have reached a mini-capstone where I am asked to create a tic tac toe program. I have successfully created the program. What I'd like feedback on is two things: 1. How do I number my columns like I numbered my rows? 2. Can you spot areas where this code could be written in a more optimal manner...

 
2:25 AM
possible answer invalidation by Zerowalker on question by Zerowalker: codereview.stackexchange.com/posts/147660/revisions
 
 
1 hour later…
3:55 AM
possible answer invalidation by Damaji kalunge on question by Damaji kalunge: codereview.stackexchange.com/posts/147374/revisions
 
4:15 AM
Given that your code works, and you just want to refactor it, your question might be better suited to the Code Review site. — Tim Biegeleisen 27 secs ago
 
4:32 AM
0
Q: Java: Method Management

AndrewI'm trying to break this code up into multiple methods and I was successful with the first bit but the other two I can't seem to figure out. With the second method I was trying to make it so it would ask the user for an integer and continually prompts them until a proper integer is entered. Wit...

 
4:54 AM
0
Q: Grayscale PNG Decoding and performing Prewitt operator | Python

Evus This is my first "question"(?) here in code review. I'm hobbyist programmer. My biggest weakness(and fears) is that I don't want to show my code to anybody. Because of that and lack of school/mentor my code can be bad, and I think it is. Well this is my way face my fears, publish unfinished...

 
5:06 AM
0
Q: How to achieve generic wrapper for Alamofire Request's function jsonResponse wrapper

DariI am trying to wrap responseJSON function of Request class of Alamofire because when I send API request I get response in specific pattern. I have achieved below code. But I am still not satisfied with it. I can see much code repeated in both "handle" functions. One is for handling Array of Mappa...

 
5:17 AM
0
Q: Base64 Implementation in C# - How can I make it faster?

Luke ParkI've written the following unsafe C# method to convert a byte array to Base64 encoding. It works, but it runs at a significantly slower rate than the built in Convert.ToBase64String method. public static unsafe string From(byte[] data) { int div = data.Length / 3; int mod = ...

 
6:10 AM
0
Q: Trie implementation in Python

Monica GranboisI have created a trie in Python and am looking for feedback. Specifically, I am looking for feedback on: is my code 'pythonic' is my logic proper when inserting and retrieving from the trie I have implemented the following logic: Insert a word into the trie Check if a word exists in the tr...

 
6:21 AM
0
Q: WPF datagrid autorefresh not working

meshsfI would like to auto refresh the datagrid after certain interval of time. I'm using MVVM model adding Model - EmployeeDetails.cs namespace AutoRefresh3.Model { public class EmployeeDetails { private string name; private string location; private double salary; ...

 
@CaptainObvious I made it faster.
 
6:40 AM
possible answer invalidation by Damaji kalunge on question by Damaji kalunge: codereview.stackexchange.com/posts/147374/revisions
 
Monking
 
I'll write an answer after I actually review the code. :) You're not getting away that easily. — EBrown 44 mins ago
GAH I NEED MY QUEUE TO BE FASTER
MORE SPEED
MOAR
Holy carp.
If I explicitly set the buffer size on my Queue, it's less than 1/3 the execution time of the .NET built-in.
                         Method |       Mean |    StdDev |     Median |
------------------------------- |----------- |---------- |----------- |
                Version4PushPop |  8.2043 ms | 0.0397 ms |  8.2041 ms |
                 BuiltInPushPop | 19.9213 ms | 0.1150 ms | 19.9171 ms |
       Version4AlternatePushPop |  4.3012 ms | 0.0106 ms |  4.3023 ms |
        BuiltInAlternatePushPop | 11.0675 ms | 0.0326 ms | 11.0664 ms |
     Version4InitialSizePushPop |  5.9946 ms | 0.0148 ms |  5.9975 ms |
 
7:01 AM
If you have working code that you'd like to improve, you are more likely to find help on our sister site Code Review. — Joe C 31 secs ago
 
7:11 AM
monking @all
finally I had some time to answer this
0
A: From an select item in the list, create another listbox ZK

chillworldOke, there are more points to say on this code then you imagine. Never use static for a user/session variable. In your VM you have the following code : private static Book selectedBook; Imagine that I select Book 1 and you select 2 seconds later Book 2. Because it's static, I'm also having B...

damn, quickly to the break, almost missed that
 
7:44 AM
thx santa
 
7:54 AM
0
Q: Define name of cells having specific color

Amit MangalSub Macro1() ' ' Macro1 Macro ' ' Keyboard Shortcut: Ctrl+p ' Cells.Select Range("N191").Activate Application.CommandBars("Edit").Controls("Find...").Execute With Application.FindFormat.Interior .PatternColorIndex = xlAutomatic .ThemeColor = xlThemeColorAccent4 ...

 
8:31 AM
0
Q: Get a path between graph nodes using breadth-first search

cycloidisticThis code is meant to implement a Graph class which has a method that returns a path between 2 nodes using breadth-first search. I'm doing this to improve my style and to improve my knowledge of fundamental algorithms/data structures for an upcoming coding interview. from queue import PriorityQ...

 
9:00 AM
Tumbleweed candidate; zero score, no answers, no comments, and low views: Classifying test data into several classes
 
Kevin Troy on November 22, 2016
Our data platform, Providence, has evolved over the last two years. We look at how and why it has changed, and the effects on our counts of developers.
 
Naruto answer; accepted non-selfie answer with 0 score: Simple PHP SSH2 Class
 
9:20 AM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: NodeJS static file HTTP server
 
Kaz
Monking @all
 
possible answer invalidation by Damaji kalunge on question by Damaji kalunge: codereview.stackexchange.com/posts/147374/revisions
 
9:35 AM
Monking
@Hosch250 Wow, that's nuts.
 
1
Q: Simplify TcpListener application in C#

Axel BouttelgierI have a simple application that can receive and send tcp data. right now there's a thread used to start the listener and within this thread there's another thread to receive. it works but it seems like a waste of resources. Can the connect be simplified? public partial class Form1 : Form ...

 
@Hosch250 How did your interview go?
> Or, the other way to look at it (since this is relativity after all), is that she would become 20 ns younger than us upon our return. Note to husbands: this could be a useful gift idea for your wife.
Nuts, but he has an awesome sense of humour.
 
9:51 AM
monking @Kaz
and @Mast
 
10:04 AM
0
Q: jQuery plugin for dropdown with multiple select

AlexThis is my first time to create a jQuery plugin, as there have many tutorials for jQuery plugin, I'm not sure is my code correct. Thanks in advance. This is very draft for my plugin, runnable but do not have any customization yet. It will transform the array object to a dropdown list, and ...

 
Looks like this question for codereview.stackexchange.comtym32167 51 secs ago
 
10:38 AM
0
Q: Improving my code

Pony TankerI need an opinion for my JS code. I'm starting in Jquery and trying do a toggle menu using the UI Jquery for my site. Can remake the code I want improve my skills. Sorry for my english. ................................................................. .pht-lista li { list-style: none; pad...

0
Q: Validating Input concerns

José FerreiraI would like to find out if there's a cleaner way to go about validating input before it goes into a function. What I'm doing seems like a lot of code, I'm sure there's a better way. I would also really appreciate some constructive criticism as my goal is to grow as a developer so anything you ma...

1
Q: ExceptionPrettifier for prettier exception strings

t3chb0tI've been refining my previous idea for pretty exception strings and made the following changes: Exceptions can be ordered. Prints all properties including Data. The stack trace formatting is now more eye friendly. Added indentation for inner exceptions. Examples Output for Exception.ToStr...

-1
Q: I am trying to use uinput : the user level input subsystem and wrote a code but not working as expected

Dig The CodeI am trying to simulate keyboard event using uinput : The user level input subsystem in Linux. I referred to the tutorial and wrote a program to emulate key 'a' but program doesn't show the expected output (output is nothing) below is the program: /* * File: main.cpp * Author: nishshanka ...

 
This belongs to Code ReviewThomas Ayoub just now
 
10:52 AM
You may post it to codereview.stackexchange.com for getting your code reviewed by others... — Sayakiss just now
I'm not sure what you mean by "have a Set<Set<Node>> as a data member". What do I add to this? What kind of set, a hash set? Thanks for the CODE REVIEW idea, I never knew this little sub-community existed! :-) — Felix 9 secs ago
 
11:06 AM
0
Q: Elegant way to alter datasets with explicit filters

nowoxI would like to write a small helper to filter datasets. Each dataset is a dictionary and some filters I want to apply are common to all the datasets. That my needs, I wrote this following pattern: class Dataset(dict): """Just a regular dictionary that can be filtered using filters.""" ...

1
Q: Linux performance using multi-threads (vs one thread) and ssh message

Eliad Cohenmy server receives requests in one thread and responds in another. I am using thread pools of pthread-s for both receiving and sending. The performance is not that bad, however... When I am doing the same algorithm in one thread only(MULTITHREAD not defined) so that both recvs and sends are in t...

 
Code Review (Please read their guidelines first though before posting) — Sayse 1 min ago
 
0
Q: Refactored game of Snake

Aro400A week ago i asked to judge my code of snake. enter link description here I made some changes based on your answers and now I want to show you present code. Something else to modify here? GameMain.java import javax.swing.*; public class GameMain extends JFrame{ public static void mai...

 
11:28 AM
@Sayse Thank you to your comment. I didn't know his section Code Review. So I will put my script and wait for advices. I take care yours ;) — Andromedae93 28 secs ago
 
11:40 AM
0
Q: elevator java code

hamdahelp me with this project please A passenger(s) can get into the lift from any floor in the building to go to any other floor. The lift moves up/down when it has been called, or ordered to move to a certain floor. The lift should work in the following routine: The lift default-starting floor i...

0
Q: Enforce execution order with collections of CompleteableFuture's

MagnusI receive a message that contains a collection of items that need to be processed. Processing each item involves sequential calls to various services. The services return a CompletableFuture that will be completed when the result is available. Data directed to certain services needs to be sent in...

0
Q: Database normalization with Django

Andromedae93I'm beginning with Django and I have a Civil Status project. I created my first models.py in order to get a Form, but I had some advices in order to normalize my database. I made this process and I would like to know what do you think about this new restructuration. My old models.py : from dj...

 
@CaptainObvious HAMMERTIME!
I'm voting to close this question as off-topic because you didn't even try. Keep in mind Code Review only deals in working code. You have no code. — Mast 25 secs ago
 
Monking
 
@Mast Why did you VTC under a custom reason?
 
12:15 PM
Looks fine. You're getting down voted on the question because this site is usually about answering problems you are having. codereview.stackexchange.com or softwareengineering.stackexchange.com are good places to get feed back on deign / code. Your add() disk method does not do anything yet — Alzoid 33 secs ago
 
0
Q: Rock, Paper, Scissors - Python game

trickrider2002This is my attempt at making a 'rock, paper, scissors' game in python. The game takes the user's input and the computer's random selection and calculates who has won. All feedback appreciated. from random import randint def getUser(): print('Rock, Paper, Scissors: ') userIn = inp...

0
Q: inserting in database using pdo mysql without binding params

MoolsBythewayI'm using a class to handle my database stuff connected using PDO to mysql Database, and this code is working correctly but i'm expecting a security hole as i'm not using PDO bind, and asking for some improvement please. Thanks in advance // My class class Events { private $keywd = "table_name";...

 
@Peilonrayz I was a teeny tiny bit mad.
3
 
@Alzoid At Code Review, we assume the code works. Code that doesn't work is off-topic. This question appears to be asking for verification whether it works, so I'd advice against moving it there. — Mast 1 min ago
 
Now there is code, but it's still broken AFAICT.
 
0
Q: calculate the user age java code

hamdai need help with this • Print a message inviting the user to enter his name and birthday (dd/mm/yyyy). • Calculate the user age • (Ignore leap years and different days in months) • Displays a message informing the user about his age. • E.g. Dear sara, you are 35 years, 4 months and 2 ...

 
12:28 PM
@Mast Yeah, just another 'gimme teh codez' question, both before and after having code...
 
@rethab I would have posted it on codereview,but I wanted to be sure that if the program is correct and if am using it in the right way. — crackerplace 42 secs ago
 
-3
Q: I need a java program that can be used to prepare time-table for students and it should have alarm also. Please show the code for me

Puttaraj Koliwad Create an FXML application in Java for students that allows them to plan their daily work. The application should be easy to use for a first time user who is not computer literate. It should provide an interface to store details of tasks and time(s) of day allotted for it. It should...

 
12:48 PM
@CaptainObvious HAMMERTIME!
@CaptainObvious HAMMERTIME!
Did the new courses start or something? It feels like September.
3
 
@Mast New courses probably start at September + 10~12 weeks
 
That's if a university only has semesters.
There's such a thing as half semesters.
Which is probably right about now.
 
0
Q: line count of each file in a given directory efficiently using akka

whokaresThis is my first program in akka so I wanted to know if the below program is efficient and is using the advantages of akka actor model. The program's purpose is to scan a given directory for any files and print the number of lines in each file. The main Application class will create the acto...

 
Kaz
1:04 PM
@DanPantry I think you chose a good time to leave the UK, the way things are going we'll have: Prime Minister Theresa May, Foreign Secretary Boris Johnson and US Ambassador Nigel Farage.
Reality truly is stranger than fiction.
 
 
@Kaz The UK government does not quite agree
 
Kaz
@skiwi At present, publicly, yes. Just a question of if Trump wants it to happen.
Because I imagine, if he does, the government will give it to him.
 
Funny how the former colonial mother needs to snuggle up to the rebellious daughter ...
 
It'll be only a matter of time before Queen Elizabeth will rule the UK as single ruler again, and her mother will rule the USA
 
1:13 PM
Wat.
@skiwi I thought the Queen Mother died a lot of years ago.
Also, a lot of countries became independent since the start of the reign of Elizabeth II, so I highly doubt she'll be a single ruler soon.
 
@Mast Wait, she did?
 
2002 IIRC.
She was old, how old did you think she could get?
 
Oh, whoops
I thought she was over 100 years old and still alive
 
Nope, over 100 years old when she died though.
 
Must've been some pretty old documentary I watched a couple of years ago then
 
1:18 PM
Probably.
@Kaz
@Accountantم Whilst I voted to approve your edit on the grounds that you're trying to be helpful, I don't think this is the kind of behaviour we want to encourage and would suggest that, in future, you leave it to the OP. — Kaz 23 mins ago
We really don't indeed, so feel free to use the 'causes harm' button next time.
 
Kaz
1:34 PM
@Mast I felt it wasn't a bad edit, in and of itself, just the wider context that was worth pointing out.
Admittedly, I don't do much edit reviewing, so I don't know if that's a standard interpretation or not.
 
0
Q: Match the maximum consective count of `)` followed by a keyword

Sohaib FarooqiI am applying a regular expression to match and keyword that is followed by maximum number of closing parenthesis. Code is done in python using re module. String provided for testing contains only one match()and(). But the solution i require shouldn't limit this. Test String: filters=(is_diabl...

 
1:53 PM
Monking.... chat was down for a bit?
 
It was? I just restarted my computer so I wouldn't know.
Monking
 
@rolfl doesn't look like it from this side ,...
 
Could have been a DNS thing, I guess....
I guess I should take this as a compliment? @rolfl: Who are you? Java Developer? GoLang Developer? Do you Part of GoLang core team? ... ;-)
 
another clueless SO user?
 
Actually, a Code Review user ;-) ....
Just reviewed some of his code, and I guess the review was unexpected.
 
2:04 PM
hey @rolfl
 
Woot woot.
 
@rolfl Probably shows you know what you are doing ;)
 
Kaz
@rolfl Not that I've noticed?
 
Well, the thing is, when I first read it I took his words more literally than I should have: "Who are you? JavaDeveloper?" ....
 
Haha
 
2:06 PM
Oh haha
 
I went to have a look, and JavaDeveloper does not exist anymore.... not by that name.
 
@Duga That comment did not last long
 
Well, e does exist, but not if you search on the wrong user page.....
 
^^
 
2:09 PM
lol
Even veterans make mistake.
 
Really good answer was provided by Justin's post hereMarcin Korn 54 secs ago
 
I'm still wondering if I should put my BF compiler on CodeReview
Problem is that it's pretty big
 
Simon would probably have a kick at it ;-) ^^^
 
I don't think I'm even going to post everything, there's like 40 classes that are pretty much copy-pasta, though I'll mention it in the review definitely
Though the other part is probably pretty hard to understand
 
If there's 40 classes of copy-pasta, it probably needs a serious review ;_)
 
2:11 PM
I'm not too happy with how it turned out, but hey it does work
 
Which is a good start.
Make it work first, make it pretty later.
Now it's the time to make it pretty.
 
Yeah, you should write it in BF to close the loop. Everyone knows that real compilers self-compile.
4
 
You could always post the most significant parts and link to the repo.
 
I've also been thinking about putting it up for review in parts
One of my issues is this: pastebin.com/HcMmRRAp
@rolfl Well... No thanks
I find it hard to imagine that someone would be able to review that ^^
In hindsight using a Stream instead of a List as data structure may not have been the best idea either
 
0
Q: How can we save memory in term of optimisation for a duplicate object creation

Dinesh Saini def from_template(template, name, uid = nil) template.dup.tap do |new| new.template = template new.tenant = tenant new.program_constraint = updated_program_constraint(template) end end def updated_program_constraint(template) ...

 
2:40 PM
0
Q: Adding/Taking away/Dividing/Multiplying two text boxes then displaying it in another text box

Tom Powellfunction doMath(sum) { if ('operator_1'== '+'); { var a = document.getElementById('textbox_1').value; var b = document.getElementById('textbox_5').value; return parseInt('a')+('b'); } if ('operator_1'== '-'); { var a = docume...

 
BTW.Work, trying to get something done this week...lol
 
@Malachi That's against the laws of procrastination
 
I procrastinated yesterday
Tomorrow I will implement my personal rule of not procrastinating two days in a row
5
 
@CaptainObvious He's multiplying strings with each other instead of numbers. Of-course that will NaN.
 
But in GDB you can go up the call stack to the abort, finish the function and signal 0 to continue. That said, if you're finding that many issues in your code at this stage, you probably need to be looking for problems in your unit tests, code review and the rest of your development process. — Toby Speight 24 secs ago
 
3:10 PM
1
Q: Converting an integer to Greek and Roman numerals

papasmurfYesterday I posted a question about converting an integer to it's Roman Numeral equivalent. Apparently you guys liked it and gave me some good advice, so I decided to take all your advice, and go a step further, it will now not only convert to Roman but will now also convert to Greek numerals. ...

 
@Mast I think it went OK, but I haven't been contacted since.
@Malachi You procrastinated yesterday and tomorrow, but not today?
 
@Hosch250 I procrastinated yesterday and then put off the implementation of my personal not to procrastinate 2 days in a row until tomorrow
so now I can procrastinate today too because I procrastinated implementing my personal rule not to procrastinate 2 days in a row
 
@Mast In the US, that is probably for finals.
 
finals already?
 
Yes.
 
3:24 PM
cool, so September is coming to an end then :)
and that means.....
HATS!!
 
Kaz
Oh. I just remembered. I have news!
 
what's up?
 
Kaz
Work offered their full support for me finishing my degree. So, come February, I'll be studying for that full time and working (mostly) full time.
 
Good news!
 
Kaz
I also added it all up, and my salary went up 50% this year.
 
3:26 PM
Although doing 2 things full time is working 200%.
That's 16h a day, doesn't leave much to eat and sleep.
 
Kaz
@Mast I learn fast.
I'm expecting more 20h/week than 40.
 
nice
 
Kaz
And work are happy for me to go to something like 34 hours a week, on average.
So it's really only going from 40/week to 55.
 
I don't doubt your learning abilities :-)
What degree are you going for, CS?
 
Kaz
Still. Lots of work. Plus I now have to re-learn the first year of my degree ^^
@Mast Mathematics & Statistics
 
3:29 PM
Ooh, I can imagine your job liking you finishing that, yea.
 
SO elections close in 4 hours. Everybody voted?
2
 
Hi everyone
 
hi @TheEngineer!
welcome to the 2nd monitor!
 
Thanks!
 
28
Q: Welcome to The 2nd Monitor!

PhrancisSo, you have found your way to the Code Review main chat room, The 2nd Monitor, perhaps for one of these reasons: You were invited or "pinged" by a site moderator or other user to discuss a post on the main Code Review site; You visited Code Review for the 1st or Nth time, and noticed the chat ...

^ if you wonder what you just stepped into ;-)
 
3:41 PM
I've got some VBA code that is working, but gets a run-time error that appears to happen at random. Is that a good fit for Code Review or should that go in Stack Overflow until the bug is fixed?
@Mat'sMug Thanks. I've been here a couple times over the last couple years, but not for a while
 
oh
 
Kaz
@TheEngineer Not-Working code is Off-Topic for Code Review.
 
lol
 
Kaz
If you can distill the bug into a good SO question, feel free to ask over there.
@TheEngineer When you say "happen at random", what does that mean, exactly?
 
@Kaz That's what I figured. The annoying part is that it works fine almost all the time, but then throws an error every once in a while
 
3:43 PM
are you handling errors?
 
If this is working code, you may want to ask on Code Review. — 4castle 21 secs ago
 
e.g. On Error GoTo ErrHandler
 
It is basically an Excel sheet with buttons to add a new row under the current row
 
Kaz
@TheEngineer What do you know about the error? What's the Error code? Does it let you debug and go to where your code broke?
 
I can click the button 20 times with no error, but then it will throw one on the 21st time
And then it will happen on the 10th time the next time
 
Kaz
3:45 PM
@TheEngineer Is that the 21st specifically? Or just "after some random number"
 
Which is why it appears to be at random
The code does not have any error handling yet
 
ok.. you'll have to be more precise about exactly what the error is and which line of code is raising it
 
I am modifying a file written by someone else before I started here
 
handling runtime errors is step 1
 
0
Q: Instantiate repository classes dynamically

WaragiI'm curious about the best way to instantiate my repositories. Currently they're in the main controllers constructor method. I was thinking making separate controllers for inbounds, outbounds, directs then instantiate the correct repository in the controller constructor. But that seems redundan...

 
3:57 PM
It is inside a For loop: For j = .Shapes.Count To 1 Step -1
 
Kaz
So, at that point in your program, j has a value that doesn't exist in your collection .shapes()
 
This question could be suitable for Code Review, as long as (a) your code works as intended, (b) your code is real code, rather than example code, and (c) your code is included in the body of the question. If you wish for a peer review to improve all aspects of your code, please post it on Code Review. — Mike McCaughan 50 secs ago
I have some other suggestions that would tighten up your code but I don't want to muddy the answer. If you're interested, let me know, I'm happy to code review it, but it should be done separately. — Sy Dy 36 secs ago
 
0
Q: Linear quation system solver

Dan DanI've done an equation system that takes as input the equations (you choose the number of equations), and gives as output the values of the unknowns. I splitted the code in four files: -equation class(move all to left member and acquire values) -matrix class(find determinants) -equations syst...

 
@Mat'sMug Huh, what part is that? The 1st/2nd/3rd?
 
4:08 PM
looks like the actual voting part
 
I think I'll post my code on CR, let's hope I don't get past the code limit
Is it superfluous to mention that my BF compiler compiles to an executable?
 
@skiwi 63k characters, start counting.
@skiwi Usually yes, however, since BF is usually interpreted, it might be wise to mention it anyway.
 
@Mast it has to be 65,535
because otherwise... nah nevermind, arbitrary limits are just arbitrary limits
 
@Mat'sMug Perhaps they store the title and tags in the rest? IDK.
Perhaps it's 65k, I'm usually not even close to the limit.
AFAIK anyway.
 
More seriously, the limit has been raised to 65536 from 30000. — Chris Jester-Young Aug 15 '15 at 18:20
 
4:23 PM
ha, it's probably an int32...
 
Why shouldn't it be?
 
I'm afraid I'll be getting close to that limit
 
Don't worry.
May 23 at 14:54, by Zak
So, I think my new Class Module is going to get a significant % of the way to breaking the Post-Length limit ^^
 
Kaz
@Mast IIRC, wasn't I partly responsible for the last time the post length limit was raised?
 
You were fully responsible.
2
So keep breaking it and perhaps they raise it again.
3
 
4:30 PM
int32 to int64
 
Kaz
@Mast I dunno. Writing code that bad just feels wrong these days. I'm not sure I could.
 
Write an Excel-to-executable compiler in ASM. I'm sure you'll hit the limit somewhere.
2
 
0
Q: Mutliplication Exercise Genrator

R. HollandI'm new to programming in Python, and I am trying to create a multiplication exercise generator. I've got the following code for the solution, but I'm wondering if there is any more elegant solutions than this one. Note: I have not covered lists, tuples, or dictionaries as of yet so I'm using the...

0
Q: Extract strings from Deterministic finite automaton

DannyI have created a class which one can build a Deterministic Finite Automaton(https://en.wikipedia.org/wiki/Deterministic_finite_automaton ), with different states - including a start state and one or several accepting states,also every transitions has at least one Character. I have a Method; get...

 
Oh why, I totally forgot this Token class also existed
Huh, why
> ├── Root
│ ├── PointerRight
│ ├── Increment
I wasn't aware I had this issue in my program
 
I think this should be on codereview. — Simon Kraemer 33 secs ago
 
4:43 PM
0
Q: Implementing bulk big data insertion in async EF

usr-local-ΕΨΗΕΛΩΝMy assignement is: parse a large data file (say 450MB of 380-bytes long lines) and insert corresponding records into MySQL database as fastest as possible, using Entity Framework. Normally, in Java/Hibernate stack, I can implement the same assignement by using multithreading with a limited-capac...

 
@Peilonrayz I came across a course recently where all the classes' variables where defined between the definition and the __init__. Do you happen to know whether this is Pytnonic?
It's the first time I've seen it.
 
You should move this to codereview.stachexchange.com as @scsimon stated. — Mister Positive 29 secs ago
 
class Foo():
    bar = ""
    x = 0
    def __init__(self):
 
@Mast For global class variables, it seems fine.
That's how I would do it in any other language. Variables (fields) on top, methods below.
 
It's usually for default values and the likes.
 
4:46 PM
@Mast If I remember correctly, bar and x are static variables in that case.
 
@Mast Oh, I'd say it depends, I wouldn't as it goes in a different scope to what I think they're thinking of, I.E. if you do Foo.x you get 0. It's kinda odd.
 
@EthanBierlein Nope.
 
No? Huh. I must be thinking of something else.
 
They can be called later on with self.bar just like any other variable.
Modified like any other.
I don't think there's such a thing as a static variable in Python to be honest, just like there's no const either.
 
That doesn't make them non-static.
 
4:48 PM
1044
Q: Static class variables in Python

Andrew WalkerIs it possible to have static class variables or methods in python? What syntax is required to do this?

 
Static just means there is one instance per class.
 
Oh, I'm confusing static types.
 
It is usually a stupid idea to modify a static variable, but it isn't impossible.
Hey there, @rolfl.
 
Woot
 
WHY SE
 
4:49 PM
I found a job opening I'm going to apply for at the Watson team at IBM.
 
@skiwi The new Mondriaan.
 
Someday, we just might be working together.
 
@skiwi because blockquote != Code block
 
@skiwi format as code block first, then blockquote
 
@Hosch250 Nice. Watson has a number of departments ;-) Good luck.
 
4:50 PM
This question belongs in Code review stack exchange IMHO. — Blacksilver 58 secs ago
 
Entry level programmer job.
 
@Mat'sMug That.
 
@Mat'sMug Thanks :)
 
@Peilonrayz But what's the point of putting them there instead of in __init__ ?
 
Monking
 
4:52 PM
Monking
 
@Mast I used to, it defaults the value to it, so you don't need to in __init__. Saves you from doing self.bar = 0 etc. I no longer like it and so don't use it. IIRC it's stylistic
 
But you don't happen to know of any PEP which recommends one way or another?
 
0
Q: Find Row Pairs that are never both 1

user3613886Given sample_size many arrays of length dim. For each index from 1 to dim, i want to give a list of indices, where no sample contained in both indexes 1s. The code is really slow and i want to improve the performance. # Test set dim = 10000 sample_size = 1000 from random import * randBinList ...

 
I may need to rethink my plans
> Body is limited to 65536 characters, you entered 119186.
2
 
try a screenshot instead of that blockquote ...actually... nevermind. just split it.
 
4:57 PM
@Mast I don't know of any, but I've not read them all. (You seem to know as much Python as me).
 
@Mat'sMug It's just the output of an AST, should I host it on Pastebin and link it?
If I'd screenshot it then it would probably be in 1pt font
 
But I remember why I stopped using them: f = Foo(); Foo.x = 5; f2 = Foo(); print(f.x, f2.x); f.x = 1; print(f.x, f2.x)
 
@skiwi why not?
 
I don't really like linking to Pastebin, but it's just extra info
 
@Peilonrayz Yuck. That's why we hide data.
 

« first day (1298 days earlier)      last day (2733 days later) »