« first day (1447 days earlier)      last day (2866 days later) » 

00:41
Laughed out loud :D
possible answer invalidation by Neil Edelman on question by Neil Edelman: codereview.stackexchange.com/posts/161154/revisions
0
Q: 2048 clone in libgdx, handling assets, and OOP overkill?

The Coding WombatI have created a 2048 clone, I wanted to take on a simple project since I have never actually finished anything. Now I have, though I'm not a hundred percent happy with the result. Images so you know what we're discussing: My concerns Handling assets This is the first project in which I u...

0
Q: Re-open single instance

TobiI've made a single-instance app using the following code: try { EventWaitHandle.OpenExisting("app.startup").Set(); return; // if app open, trigger event and then close. } catch { } bool created; wevent = new EventWaitHandle(false, EventResetMode.ManualReset, "app.startup", out created); ...

00:58
Perhaps posting at codereview.stackexchange.com would be more appropriate for this type of question — Snorehorse 30 secs ago
01:10
0
Q: Speech Recognition Part 2: Classifying Data

syb0rgNow that I have generated training data, I need to classify each example with a label to train a TensorFlow neural net (first building a suitable dataset). To streamline the process, I wrote this little Python script to help me. Any suggestions for improvement? classify.py: # Builtin module...

01:26
see Code Review for further assistance. — Ousmane Mahy Diaw 25 secs ago
01:42
I'm voting to close this question as off-topic because seems like a better fit for codereview.stackexchange.comStedy 58 secs ago
Thanks @Stedy - I didn't know about codereview, i'll post it there. — Jonathan Coe just now
I recommend you to post this question to codereview.stackexchange.com since Stack Overflow is not a platform for reviews. — Igor Soloydenko 7 secs ago
02:01
I'm voting to close this question as off-topic because this belongs on codereview, not on SO. — Rob 21 secs ago
1
Q: Python scoring function - a more elegant way to write this?

Jonathan CoeI am writing a function to take a list of words and score 2 and 3 word phrases based on occurrence while removing any phrase occurrences with a score of less than 3. As someone kinda new to python, i'm wondering if there is a better way to write this to do the same thing (the code works) The re...

02:21
0
Q: Creating a win function for Connect Four, I keep getting the error "list index out of range

Emily RivasIt's a 6x7 board which reads as board[rows][columns]- I've changed this bit of code so much trying to make it work but I just keep getting the "list index out of range" error. Would be great if anyone could review this and see something that I haven't. Thank you. def place_piece(): if che...

02:50
0
Q: Integral implemented using a trapezoidal Riemann sum

Brady DeanI tried to make this a general purpose integral function but I want to know if it's efficient and idiomatic Rust. use std::mem; /// calculates the signed area between the function f and the x axis from /// x = a to b using a trapezoidal Riemann sum. precision is the number of /// trapezoids to...

03:09
0
Q: PHPMailer Not Sending to Outlook.com

goatmealBackground: I have been using PHPMailer to send emails through my website, but lately, certain people have not been able to receive my emails. I tested the issue, and it seems like emails cannot be sent to emails on Outlook.com. On the other hand, the emails can be sent to all other email serv...

03:37
hi
03:52
@Aequitas Hello
04:09
@Phrancis'DROPTABLEUsers-- can I ask you a design question?
0
Q: failure to run... sudoku solver in python

user136818I'm working on a Sudoku solver in python, the goal is to read in a file, parse the file into a string of 81 characters and use the program to solve it. I found an example on this site and have been trying to comment it up as to what I think it is doing and adapt it to my purpose... I'm new to co...

0
Q: Binary Min Heap data structure implementation

intvprepAfter reading about heap I tried to implement the heap. Below is my code along with test. Any feedback with respect to correctness, performance is welcome. import java.util.Arrays; public class BinaryHeap2 { private int[] heap; private int size; private int capacity; public Bin...

@Aequitas Sure, there's nothing important going on so go ahead
thanks
basically it's just a theoretical oop design question
for a chess application
i have to model the commonalities that queen has (with rook and bishop)
I was thinking of having a ChessPiece class
with a canMove method
and then a DiagonalChessPiece class
and OrthogonalChessPiece
and like Bishop would be a subclass of DiagonalChessPiece and can just call super.canMove
but how would the queen work since it can't be a subclass of both Diagonal and OrthogonalChessPiece
any
just theoretical
just the model I need to do
04:14
@Aequitas That's an interesting way of thinking about it.
would it be better to have canMove(), canMoveDiagonal, etc. in the ChessPiece class
When I do stuff like this, I would typically do (C#):
That sounds pretty reasonable
abstract ChessPiece
- King
- Queen
- ...
But your idea makes a lot of sense to me.
@Phrancis'DROPTABLEUsers-- which one?
04:15
@Aequitas Could you make them interfaces?
Or maybe just say chose a language that supports multiple inheritance.
@Hosch250 but then wouldn't you have to copy and paste the implementation several times?
Or, C# is (may be?) getting a new feature where interface members can have default implementations. You could say it will likely work in 2-3 years in C# 8.
@Phrancis'DROPTABLEUsers-- ok thanks
04:17
@Aequitas That's the problem.
@Hosch250 that'd be nice
What I typically do is have this interface:
interface IChessPiece
- Board Board { get; }
- bool IsValidMove(startCoord, endCoord)
- void Move(startCoord, endCoord)
Then, you get the piece from the Board using the startCoord parameter.
BTW, @Hosch250 is much better at OOP than I am, so I'd take his advice over mine
Wait, I made a bit of a mistake. Each piece instance can't store the Board.
interface IChessPiece
- bool IsValidMove(board, startCoord, endCoord)
- void Move(board, startCoord, endCoord)
Then, Board would essentially be a list of piece type, color, and coordinate.
Or, if iterating 16 pieces max is too much to find if a given piece/player/coordinate is in there, have it be a 2D array.
Am I beginning to bikeshed?
bikeshed?
04:22
> Technical disputes over minor, marginal issues conducted while more serious ones are being overlooked. The implied image is of people arguing over what color to paint the bicycle shed while the house is not finished.
i think so
Sorry.
because i'm not actually trying to implement
just want to model it
still useful tho
lol
Yeah, but a design is useless if you can't implement it.
04:24
So, if this is for a class for a bachelors degree, or something, I'd just use my last interface definition.
Maybe add List<Move> GetMoves(board, pieceCoord) too.
but the question is overcomplicating matters, in reality you would just have each piece do its own IsValid, and not worry about commonalities
If you are doing in-depth analysis, you'd better talk to someone better at chess than me--maybe the Lichess guys.
@Aequitas Personally, I would.
I know my way around chess reasonably well, though the English chess piece names confuse me lol
@Hosch250 would do it that way? or would worry about commonalities
I'd worry about each piece.
04:30
Most if not all OOP languages can implement multiple interfaces, so having commonalities shared shouldn't be a big deal
Yeah, if you want to expose that functionality, do it in an interface.
But extending multiple abstract classes really depends on the language
oh ye I just read that java 8 introduced default methods on interfaces so could implement it pretty good in that
That would be perfectly fine. You just can't derive from multiple abstract classes in most languages. I think there are like 3 that fully support it, and maybe a dozen that support it in to a varying level (like, default interface implementation-level stuff).
@Aequitas I'm offended that 1) Java beat C# to a half-way usable feature, and 2) that you'd consider using Java.
Just kidding ;)
lawl
04:32
Holy war warning
But please don't use Java. stackoverflow.com/a/295248
Jon Skeet says so, and he writes Java for Google.
Java does OOP very well, it's some of the other stuff it struggles with
Oh, Vogel says so too.
Java 8 introduced some FP things like lambda expressions, but it doesn't feel much like FP
Heh, C# has had that since version 3.
04:36
lambda expressions are confusing
everyone else seems to use them well
they write like 5 words and it does so much haha
@Aequitas They had me confused for about a year.
They're simple in principle. Python does lambdas good, but Lisp is all about lambdas
Didn't understand anything about them until I tried Lisp
Lisp is one of the few languages I can't even read.
@Hosch250 is brainfuck one of them?
0
Q: Finding nodes in a linked list

Dj DacThis linked list has nodes and sorts itself as well as using a recursive technique for finding the data. I wonder how it compares to similar approaches e.g. if I can compare it to a B+ tree. What is the complexity of inserts and lookups? #include <stdio.h> #include <stdlib.h> #include <time.h>...

-1
Q: how to ignore not null fields in job

work questionIn my project all Entities inherite from BaseEntity like this : public abstract class BaseEntity { [Column(Order =1)] public Guid Id { get; set; } [Column(Order =2)] public int Code { get; set; } public DateTime CreatedOn { get; set; } public virtual User CreatedBy { ge...

04:40
Maybe now I understand the basic principles of F#, I could get it though.
@Aequitas Yup.
Also, Whitespace.
Lisp is really simple once you understand what the parens are for
I need to buckle down and write 20 more C# answers, or whatever I need for my silver badge.
@Hosch250 haha haven't seen that one before
Oh, just 15.
@Aequitas Just wait until you see Pyth, or Folders.
The Unicode ones are the worst.
I've never met a language written in Unicode that isn't a golfing language.
The idea with Lisp is that each expression (defined by parens) has to be valid, and that the first argument of any of those expressions is a procedure (i.e. a function)
04:44
lawl
@Phrancis'DROPTABLEUsers-- Pretty similar to the logic behind F#, except they borrowed a bit of syntax from C# for the function definitions.
Makes it a bit easier to read (at least for new functional programmers) while using the same principles.
So for instance if I type (+ 1 2) the + is a procedure, not a keyword
Also, it helps with the fact that it is only "functional first"--it allows you to write OOP in it as well.
Clojure is interesting since it allows OOP from its Java roots, but is a Lisp language
@Hosch250 I encourage you to learn a bit about Lisp; usually the programmers who talk crap about it are programmers who never tried it
@Phrancis'DROPTABLEUsers-- LOL, I can believe it.
They are the ones with the reputations to defend ;)
04:51
It's actually a really fun language
The syntax just throws some people off because it looks so foreign
Monking
Monking
One person wrote a language that could write any program with just one character. It is somewhere in this list (or the joke language list), but I can't find it: esolangs.org/wiki/Language_list
My battery is almost dead, and I need to go to bed. See you later.
05:29
-2
Q: Computer Allotment System

Abhiraj VarshneyI want the program on computer allocation (allotment) system in c++ . Like we all go to cyber cafe we have to fill up some entries and then we are given with a computer to the task and then the person charges money according to the time computer used. 1 page Welcome to the new era cyber café Pres...

06:05
0
Q: recapture/reset the first frame every N second

Marciano NgI am doing a project where its a motion based detection program. However it detects changes in the background as "motion" so i'd like a way to recapture a new first frame every few minutes to replace the current one to fix this issue. I am using a Raspberry Pi 2B and a Logitech Webcam. The code i...

possible answer invalidation by FloatingRock on question by FloatingRock: codereview.stackexchange.com/posts/161142/revisions
If you have code that already works but you would like some feedback, may I suggest you post the said code on our sister site Code Review. — Joe C 37 secs ago
06:31
0
Q: Euler 1 but pointless

CAD97I've been teaching myself basic haskell this week in order to be able to better read literature about functional programming (about 80% of which in haskell by my completely off-the-cuff statistic). Just as a check to make sure I got the basic concepts, here is how I answered Project Euler 1. div...

07:08
This is not a code review service. In other words: did you try running your code; did you observe its behavior, in essence: did you test your implementation? In that sense: your question is too broad in my eyes. We help with specific questions; and "here code, please find potential issues" is not exactly a specific question. — GhostCat 6 secs ago
And we have Code Review.SE for this. — glee8e 33 secs ago
@glee8e But even there certain minimal standards are expected; and I think the question would need to be improved in various ways to generate better feedback on codereview ... — GhostCat 1 min ago
I have to wonder if you're going down a rabbit hole. If you provided more context as to what you're trying to achieve, you might get some help on the overall strategy. You could also try posting on the Code Review Stack ExchangeDarthfett 31 secs ago
07:57
Monking
@Duga Something odd is happening there, but probably ok.
Kaz
Kaz
Monking @all
I've missed saying that :)
2
Hi @micro
@Mast how are you
08:15
0
Q: makefile error: given more than once in the same rule, while converting my source file to objectfile

LethalProgrammerI have written makefile target to create static lib in Linux for my project. At first converting source file into object file, I got an error it saying given more than once in the same rule Any help that would really great, because I'm not able to identify the mistake? When I search more about ...

08:29
Monking
08:48
1
Q: Determination of specific state based on a timestamp - avoid repetition

OddDevI'm currently working on a typescript-class with this method: /** * Gets the state of a package. The state is determined based on two timestamps stored as fields in the {@link * Package}. As the current time equals or passes a timestamp, the state changes. * * @param currentTime ...

Did you try to include execution plans? Did you try to measure each block separately to find out, which parts are slow? Did you consider to poste this on StackExchange-Code-Review. This question is not in the scope of StackOverflow... — Shnugo 5 secs ago
Apologies I have now added to codereview, I was unaware of this site — Simon 27 secs ago
0
Q: Optimizing Set class binary search tree

xersiThis is my first time I have implemented a Set based on binary search tree design. I expect some mistakes, so I would like to appreciate any review. Thank you! My Set uses _friend Node to make Set iterator possible. A _friend node links to another node in "in-order" traversal. #include <vector>...

1
Q: Optimising performance of long running a sql query

SimonThe code below takes 5-6 hours for a years worth of data (850,000 records). It takes much less time when running a single month. To start with is there anything glaringly obvious within this script which may account for the slowness. Are there any tests I can do to determine where the flaws are....

09:06
@CaptainObvious SELECT Cast(), Cast(), Cast(), Cast(), Cast(), ..., Cast() FROM table join ... join .. join ... join ... join ... join [...] WHERE
2
wonder why that could be slow ....
If this code is actually working this question might be better suited for codereview.stackexchange.com. — Jens 7 secs ago
If your code works, this question fits better at codereview.stackexchange.comkosmos 9 secs ago
09:21
0
Q: I multiply original file and cut a piece of final file with intention to do it multiple of segmentSize with minimum loss of data

qqffxdouble criteria = 0; int arraySize = 0; double box = 1; int box_i = 0; double coeff; int sizeFactor; if (size < 1300000) sizeFactor = 8; else sizeFactor = 2; //if original file too big, reduce the extend coeff if (size < segmentSize) { coeff = segmentSize / size; coeff = (int)coeff; } el...

09:59
-1
Q: What is right name for Contract assembly/namespace?

pil0tIn a big project we developing Auth part, it will be developed as microservice. What is an appropriate name for assembly with External Api for Auth (it will contain some interfaces and DTOs)? My suggestion is CompanyName.Auth.Contract In singular, not plural, because it single contract for Auth...

10:17
@Phrancis'DROPTABLEUsers-- I was thinking that your comment was referring to the original table they are pulling from... if we had that schema, it would make it easier to recommend something different for dividing it into more tables
10:45
2
Q: Make JavaScript code DRY

JeremiahhI'm having a problem figuring out how I can make this particular part of my code DRY. Currently, the code is repeating itself but with minor changes in each case of a switch. If anyone could help it would be really appreciated! Thanks. function searchHistory(searchParam) { var liElements = ...

10:55
possible answer invalidation by stt106 on question by stt106: codereview.stackexchange.com/posts/161122/revisions
11:06
0
Q: Using SAS macro/do loop across multiple years generating 50+ html tabs per year

tipscodeI am using an ods tagset with table editor in SAS 9.4 to generate htm output tables (a proc tabulate) across all US states across a period of 5 years. Currently I have a macro that generates individual htm tables per state per year with a title that includes state abbreviation and year (e.g., "RI...

@Duga Kind-of, rolled back to avoid a potential mess just in case.
11:19
tfw you realise you made your code hard to test
-1
Q: Multiple data access source in spring mvc

user136851I am having two mysql databases and I want to use them in my project. I have connected both databases but the problem is, when I run the program it copies all entities from first database to second one and starts fetching data from second one instead of first one. Under given are my configuration...

11:44
0
Q: C program to write 5 lines to a file then print the lines except the second line

MichaelXThis will read 5 lines into a file from stdin, then print all the lines except the second one. I used an array because I'm not sure how to do dynamic memory allocation. #include <stdio.h> #include <stdlib.h> #define MAX_SIZE 1024 void write_to_file(const char *s); void print_file(const char *s...

I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comEliran Malka 49 secs ago
12:08
This should actually be posted on the StackExchange CodeReview site found here: codereview.stackexchange.com. SO is intended for problems where the code is not working as intended. CodeReview is a great place for performance improvement. — Brandon Barney 21 secs ago
1
Q: How to speed up this for loop

JOMI have an issue concerning this code. What I want: 1) sort Data descending by column B. 2) start with the highest B, take the corresponding A value and calculate the difference along all other A´s in a tolerance defined below by(FUN=function(x, y) abs(((x - y)/y)*10^6))) 3) find the clostest d...

12:26
0
Q: Pagination Helper class

Aditya CherlaHere's the problem statement from code-wars: For this exercise you will be strengthening your page-fu mastery. You will complete the PaginationHelper class, which is a utility class helpful for querying paging information related to an array. The class is designed to take in an array of value...

@Harssha if you are interested, you could show your code to the people on CodereviewRhayene 45 secs ago
@CaptainObvious How to improve this title
12:42
0
Q: codeigniter 3 php mysql prevent issuance of items more than what is in the database

Fredrick Boazi am creating an inventory system using codeigniter 3 and mysql, now i have the following areas in my inventory, warehouse/store Categories Suppliers items Batch Transactions/activities the area i have issues with is Transactions, you can issue items from the stores, and the system subtracts/rem...

Code Review is what you're looking for. — Ousmane Mahy Diaw 59 secs ago
13:33
If you already have a working solution but want it improved this might be a better fit for codereview.stackexchange.comOH GOD SPIDERS 21 secs ago
13:53
@Rhayene, please do not redirect broken (or unwritten) code to Code Review, it'll get closed immediately. Please see (A guide to Code Review for Stack Overflow users)[ codereview.meta.stackexchange.com/questions/5777/…holroy 8 secs ago
Oh no. I need to change an application which is written in VB.NET. I see many errors coming because of all the ; I will type. :-(
3
@Rhayene, when someone suggest Code Review for a new user, they automatically assume it is OK for the other site. When you know it is off-topic, this is just bad advice. — holroy 16 secs ago
Better post this on codereview instead of stackoverflow — anshulk 28 secs ago
If your code works and you are looking for improvements, you shod be asking this on codereview.stackexchange.com — Tieson T. 19 secs ago
15:03
Welcome to Stack Overflow. This site is actually supposed to be for code which does not work. You want Code Review. — Michael 35 secs ago
15:24
0
Q: Is there a way to uncluster this query?

ChrisIt works as of right now but its really messy, maybe someone has an idea how to shorten it: "SELECT MAX(part_price) * FROM parts_list WHERE " . (implode(' = 1 AND ', $utilization)) . " = 1 AND (part_price = (SELECT MAX(part_price) FROM parts_list WHERE ".implode(' = 1 AND ', $utilization)." ...

0
Q: Ugly nested loop algorithm needs improvement

Jade_LayyneFor a list of treeDataGroups with 5 TreeDataGroup object, each treeDataGroup object contains maximum 100 dataAndVar and 100 dataNotVar. The execution of removeFullyUnexpectedData method takes: 11466 ms. I would like to reduce that and I know the only way to reduce that the adopted algorithm and t...

@Heslacher wouldn't those be enhancements?
The errors or the ; ?
the ;
;-) but this VB.NET is still better than the other VB6 application I need to maintain
4
15:39
I think this question belongs on Stack Code Review. If you agree you can move it by clicking flag >> should be closed... >> off-topic because... >> This question belongs on another site in the Stack Exchange network. — destination-data 1 min ago
15:57
2
Q: Character Creation in Text Adventure; Proper use of Main and Global Values?

CarcankenI'm still learning python so I decided to experiment by making a tiny text adventure. I'm only a student in highschool so I haven't had the chance to learn many common techniques used in code as most of my learning has been self taught, so I wanted to take this opportunity to have some kind of re...

0
Q: Binary search to identify duplicate user names

patrickI am trying to implement the code described this post about how Reddit identifies duplicate user names (I do believe it is called binary search). The way I understand it, the steps are: You have a new user name you are comparing to an alphabetically sorted list of existing names You compare tha...

Monking
Monking
Monking
Monking
If you are looking for feedback on any/all aspects of your working code, you can present it for peer review over at Code Review - describe its purpose and how it works, and reviewers will help you improve it in every possible way. But Stack Overflow isn't for sharing code, it's for Q&A's about specific programming issues. Take the tour and read How to Ask for all the info. — Mat's Mug just now
16:13
Juan M on April 20, 2017

Hace poco mas de un año y medio empezó el proyecto de Stack Overflow en español.  Me alegra contarles que después de seguir el crecimiento del sitio podemos esperar que nuestra comunidad se gradúe este mayo.  Falta todavía el decidir la fecha pero las circunstancias necesarias ya existen para poder movernos fuera de la etiqueta de “sitio en beta.”

Quiero felicitarlos a todos por haber continuado con el interés necesario para poder promover y crecer nuestra comunidad.  ¡Sus esfuerzos han hecho la diferencia!  Ahora, platiquemos un poco sobre lo que va a suceder en cuanto nos graduemos. …

@Feeds ?????
0
Q: Find the maximum profit if given array of daily stock prices and allow to buy and sell twice

太極者無極而生I am wondering about the correctness of this method: We are given a function / algorithm findMaxProfit() that can find the maximum profit when given an array of stock prices, and buy and sell once, with time complexity O(n), additional space complexity O(1). The buy must occur before the sell (m...

one more flag
16:40
possible answer invalidation by Graipher on question by patrick: codereview.stackexchange.com/posts/161322/revisions
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comniton 28 secs ago
Also, since this is an "improve my code request", this is really more appropriate for Code Review. Note though, that they require full, runnable chunks of code. — Carcigenicate 25 secs ago
0
Q: read a file stored in a folder using c++

lorrainemutheuI have a C++ program in which i need to allow the user to enter a folder name e.g folder1 and to check the contents of the folder which has folder2 inside folder2 is a text file which should open and be read.That is the number of characters and lines in the file.Folder 1 is stored in C drive - "C...

17:05
Is there a way to have 2 SE chats open in a single browser page/tab ?
0
Q: Python Water Jug problem -- have a solution, but how to make it recursive?

user45254At the end of a section on recursion in an algorithms book I am self-studying, I see: "Write a program to solve the following problem: You have two jugs: a 4-gallon jug and a 3-gallon jug. Neither of the jugs have markings on them. There is a pump that can be used to fill the jugs with water. Ho...

0
Q: Searching files in directory with various filters

JanDotNetRequirements Note: the requirements are invented by me for practicing functional programming. Functional Requirements Given a directory, all files below the directory (and its sub directories) should be filtered by one of the available filter conditions and then printed to the console. The fi...

@IgorSoloydenko if you want to go hack with frames?? sure. ...
@Vogel612 I only want to track what's going on in SO and CR :)
Naruto answer; accepted non-selfie answer with 0 score: Search function for books
By the way, if you're interested in a review (and your code works), try Code Review. — Zeta 54 secs ago
17:13
Monking all.
@Zeta which "monking"?
Err, wait a second.
0
Q: Thread-safety based on object value

Steven RyssaertI need to create thread-safety on a Web-API method, but only when two requests containing the same property value are ran simultaneously. I have created a mix of WaitHandles and a ConcurrentDictionary to only hold the threads that have another thread processing a similar item. Is this code thre...

17:28
@IgorSoloydenko That one.
4
Although I should probably have said "monkernoon". Eh, monkever…
Kaz
Kaz
@Zeta Monking is time-agnostic.
@Zeta that makes sense.
happy to do so.. however,I dont get the Stack Code Review Option? — Hightower 19 secs ago
0
Q: I am trying to make a menu restaurant menu

LineleafI am trying to make a menu restaurant menu, that lets the user inputs the amount the amount of items, select the items then the computer should calculate the price and output it on a file.I can't seem to figure out how to organize the code though, I am not allowed to use loop or other complex ter...

17:54
@Duga Code Review isn't a Stack Overflow option...
Click the bloody link provided to you instead...
18:08
Oops, I think I crashed Python.
It hangs.
And no, there's no looping going on.
I move on Monday. :(
@EBrown Why is that bad news?
I hate moving
@Mast I had to debug an HttpHandler (inside my own C# DLL) in IIS today, problem is that the w3wp.exe (IIS worker thread) only spawns when the first request is made, the first request went wrong and took down the entire w3wp.exe process with it
Then we figured that putting a sleep of 10 seconds would be enough to attach the debug to the process, but now as soon as we attached the debugger the program would quit :D
Then I realized I had to deal with the exact same latter problem about two weeks ago and knew the fix :)
urllib.error.HTTPError: HTTP Error 408: Request Time-out
Ugh.
@skiwi lol
@skiwi No try-catch to filter out bad requests?
18:37
-1
Q: Preorder, Inorder, Postorder BST: print a new line after recursively calling traversals

Juliapreorder(), inorder(), and postorder() successfully print the output and then a new line. But everytime I try to put "cout << endl;" within preorder(node *ptr), postorder(node *), and inorder(node *ptr) it either prints weird or creates a seg fault. Is there anyway to put "cout << endl;" within t...

@Mast Nope, it was way lower level, some unmanaged DLL I called into was hanging
18:51
I wonder why the air raid tornado sirens are going off.
0
Q: Game status with different states and equatability

ManolisThe status of a game can be: running, when it is not over yet, tie, when over but no player won, win, when over and a certain player won. Being able to check equality of statuses is desired. With these in mind, I coded a GameStatus class which implements IEquatable: class GameStatus : IEqua...

urllib.error.URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
WTF is a temporary failure...
@skiwi Ah, that sucks.
@Hosch250 The obvious answer would be an incoming tornado.
Cloudy, but no tornado as far as I know.
No storms for a couple days, rained this morning and yesterday afternoon.
I heard there's a lot of tornados early in the season this year, might be false alarm.
"Should I use a list or array?" Either will work - there are some pros and cons to each but nothing that affects a project at this level. If this is your only question then this is opinion-based or belongs on codereview. — D Stanley 49 secs ago
18:59
Does anyone have much experience with Terraform (or similar) here? :( or AWS in general
wow and as soon as I ask I work ito ut in my head
NVM
@DStanley I doubt this would be welcome on Code Review either, as the code does not work (or even compile) in its present state. — Mike McCaughan 45 secs ago
19:13
@DanPantry Quack
19:24
0
Q: Good approach for models in a simple PyMongo-based Blogging Web App without ORM/ODM?

Arturo Reyes Jr.I am currently using PyMongo + Flask for building a simple blogging application. I am not using any kind of ODM, instead I decided to use PyMongo directly. I need to know how to improve my code since learning is my main motivation for building this application. This portion of code is implemente...

This belongs on Code Review. — molbdnilo 38 secs ago
@Mast something like "no internet connection"? or "no DNS Server responding"?
19:41
@Mast It's only there when you execute the code :D
@Vogel612 Eh, probably. My internet connection is FUBAR today, might have something to do with it.
19:54
0
Q: how can i make my player animate

Ela Hidrihello i am trying to make a GUI application that allows me to move my player where the mouse is ,, drag it ,, and make it jump ,, i have did that but i found problem in making my player animate so i am asking for your help ,, i am not very good at java so here is my codes package animation; ...

20:14
I am curious. When you showed this to a peer for code review, what did they say about it? — R. Richards 56 secs ago
0
Q: Encryption in C#

Ofir EizenbergI have got to my self these two functions (Encryption and Decryption): public static byte[] Encrypt(string plaintext, byte[] key) { using (Rijndael desObj = Rijndael.Create()) { desObj.Key = key; desObj.Mode = CipherMode.CFB; desObj.Padding...

20:49
Is this too simple for main site? pastebin.com/iGKvQUvz
I just want to know if it will do the right thing on both little-endian and big-endian machines
0
Q: Lookups in list in C

Dj DacI read about loopups in lists and I think that is what I did. I would like to compare it to a skip list, a binary search or a B+ tree. #include <stdio.h> #include <stdlib.h> #include <time.h> typedef struct node { int node_id; int data; struct node *left; struct node *right; } ...

If all you're trying to do is to improve working code, you should post in CodeReview.StackExchange.com. "I want to do some unit testing" is a broad objective, not a specific programming question. — Prune 16 secs ago
21:25
possible answer invalidation by Arturo Reyes Jr. on question by Arturo Reyes Jr.: codereview.stackexchange.com/posts/161340/revisions
I'm voting to close this question as off-topic because improvements to existing code belong in CodeReview.StackExchange.com — Prune 29 secs ago
0
Q: Secure local Interprocess communication

DemiI wrote the SlipRock library for secure local interprocess communication. It is designed to be secure against untrusted users running on the same machine, or any user running on any other machine. The code is at https://github.com/DemiMarie/SlipRock The Windows port is very incomplete. The co...

21:44
0
Q: How to use main method for unit testing python files

Intrested_userI have two python files. One for creating tables and second for writing more data into the table. Contents of first.py are below #!/usr/bin/env python import sys from pyspark import SparkContext, SparkConf from pyspark.sql import HiveContext def main(table, hivedb, domain, port, database, u...

@Andreas, thanks for the code review, but this is simply a sketch to test a concept. — Miguel 36 secs ago
22:07
1
Q: Sanity Checking an unordered_set of unique_ptrs to objects

Mikel FI have a use case for a data store containing uniquely identified large objects where I can get partial updates over time. Each object can be identified by a 'key' consisting of a trio of values embedded in different parts of the structure of the object. Yes, this is terrible, and no, I can't cha...

0
Q: Parse path string

Lin MaSuppose path string are encoded in this way: 2T3T5: means move 2 steps, turn right, move 3 steps, turn right, and move 5 steps 32T: which better read as 3(2T), and it means do the following operation 3 times => (move 2 steps, turn right), if written in a complete word, it means move 2 steps, tu...

0
Q: SQL detection in PHP

TheCrazyProfessorI have made this regxr to detect SQL code in a file: /(\"(ALTER( (TABLE|DATABASE))?|SELECT|CREATE( (INDEX|DATABASE))?|DELETE|UPDATE|DROP( (TABLE|DATABASE))?|INSERT INTO) (([A-Z_*.]+(\([A-Z_*.]\))?)(.+))( FROM|WHERE|ADD|SET|ORDER BY|GROUP BY|IN)?(.*)\")/I Live Demo Can it be made better? fix b...

22:33
Working code critique requests should be posted at codereview.stackexchange.comwwii 51 secs ago
0
Q: Performant functional evaluation for enum value

John DorianI have a java enum which represents the side of an order (enum Side {ASK, BID}) and I'm constantly writing code with which I'd like to use the ternary operator, e.g. BigDecimal orderPrice = order.getSide() == Side.ASK ? calcAskPrice(order) : calcBidPrice(order) The issue is that I want to futu...

23:01
@CaptainObvious Ewwww don't do that!
Maybe better suited to Code Review. — Andy Turner 42 secs ago
23:18
0
Q: Finding a peak in a 1D array

Sam HammamyI am hoping to get this implementation of "finding a peak" reviewed. My concerns are about: Is using vectors in this way better than an int[] array? Is passing the subvector in the recursion OK without using a pointer? Is there a more memory efficient way to create the subvector? Is the file c...

0
Q: Use Python to determine the repeating pattern in a string

Jake SteeleI am writing an algorithm to count the number of times a substring repeats itself. The string is between 1-200 characters ranging from letters a-z. There should be no left overs at the end of the pattern either and it should be split into the smallest possible combination. answer("abcabcabcabc")...

23:41
Also, if your code works and you just want to make it better, put it on Code Review (but only if it totally works!) — SomethingDark 5 secs ago
Oh, thank you for letting me know about the code review. I didn't know that was a thing! — Brandon Finley just now
23:56
^ Two answer-invalidating edits slipped by.

« first day (1447 days earlier)      last day (2866 days later) »