« first day (1155 days earlier)      last day (2848 days later) » 

12:00 AM
RELOAD! There are 2497 unanswered questions (92.9505% answered)
 
@Phrancis it's very heavy weight and magic
 
@DanPantry it looks like another framework/package sitting on top of Node... or am I reading it wrong?
 
it's basically a framework that shares codeb etween client and server
 
Looks like it comes with MongoDB as well, ouch
(not that MongoDB is bad or anything, but it is a DBMS)
 
I think that is configurable
(IIRC)
 
12:11 AM
Welcome to SO :) You may consider posting your question on codereview.stackexchange.com instead. — Ivan Gabriele 12 secs ago
I'm voting to close this question as off-topic because it would be better placed at codereview.stackexchange.com. — nnnnnn 10 secs ago
I agree with @IvanGabriele this could be suitable for Code Review if the code works as intended. I would recommend a title that says something about what the code does, however. — Phrancis 31 secs ago
Thank you! I post it at codereview aswell. Sorry but it is my first time here. — Bryan van der Starre 56 secs ago
 
12:43 AM
yo
 
hello
 
hai
 
how's it going?
 
I'm shaking with adrenaline atm; playing the new zero escape
 
0
Q: The base-ten value of n-base number with Python

Motoko KusanagiTo start off I'd like to note I am aware of int(val, base). My goal was to write a short function capable of taking in a base int, and a string defining the value to be summed. The function rests upon the equation: represented_value = value * base ^ placeholder >>> base_v = lambda base_v, ...

 
12:52 AM
humans just aren't made for having to make a bunch of ethical decisions in the form of "you're wrong you die" in a short span of time, even if it's just game people
 
@Pimgd Looks like a pretty intense mindf---
 
in one instance the game places you in a room
 
gee it sure seems intense, by your description
 
and tells you "the other teams are in a similar room" - the room is lined with shower heads and sealed.
 
Not sure if I'm willing to pay USD $40 to try it though
 
12:53 AM
There's a yellow button at the end of the room.
If you push it, the showers in the other rooms will activate, sending down a solution of hydrogen fluoride.
The button will then be disabled for all teams.
 
No spoiler alerts pls, since it just came out yesterday
 
it's a scenario, but basically;
invisible mexican standoff.
 
it seems to me like it's meant to mess with your conscience
 
fffffffffffffffffff
I went to bed that day and had trouble sleeping.
 
The tag "Psychological Horror" seems to imply that indeed
 
12:56 AM
^
 
hoping to finish it this weekend or else I'mma take monday off or I'll just know I won't be doing anything useful at work
 
@Phrancis i fixed my question's title; is that better?
 
@MotokoKusanagi I think so yes
 
ok thanks
 
The code is difficult to read because it is so succinct, IMO
 
12:58 AM
aw :(
 
I don't Python very much though, so it could be just me
 
Seems like, if the performance was the same anyways, it would read a lot better as just a regular function rather than a lambda expression
 
-1
Q: jQuery looking for better solution

Bryan van der StarreI made a colour game and my question is how to make the script shorter and easier? The script is working but in my opinion the script can be shorter and better. I will explain my game. It's a game about matching the right colour. In the first level you start with 3 cubes that each have a differe...

 
1:14 AM
@CaptainObvious I think the OP is confused about the meaning of the word "cube"
That color matching game is surprisingly challenging
 
0
Q: My First Adventure in C# - Recursive Breadth First Search Knights Tour

pacmaninbwThis is my first C# program. Since it is my first C# program, I'd really love someone to dissect it and tell me all the things I can do to improve it. This is a real learning experience. This program was written on Windows 7 using Visual Studio 2012 Professional. Some of the issues encountered m...

 
pfff when the game throws a puzzle at you and you pause the game and work it out and then one of the characters just straight up tells you the solution
thanks
 
1:31 AM
@Pimgd that's a bit strange
 
0
Q: Reversing a word or sentence

LeonWas just wanting some general feedback on the below code regarding readability, structure and if there is a more efficient way of accomplishing the task. https://gist.github.com/JLeonn/5a3aae2468ce6cc2115fef6e6c3b3d08

 
... I thought so too but they don't give you the full solution in the end
it's just a massive hint
oh well
-1
Q: Reversing a word or sentence

LeonWas just wanting some general feedback on the below code regarding readability, structure and if there is a more efficient way of accomplishing the task. import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Scanner; /** * Created on 5/27/2016. * * Si...

looking for reopen votes
 
1:47 AM
If this code is working already it may be a good candidate for codereview.stackexchange.com. They are great at helping to improve working code. — TheEngineer 16 secs ago
 
2:02 AM
0
Q: Website code for a client

Darcey Mckelvey body { padding: 0px; margin: 0px; } input[type=checkbox] { cursor: pointer; } .main_content { width: 480px; padding-left: 618px; padding-right: 620px; } .top_info { width: 477px; height: 105px; padding-bottom: 20px; } .top_info h2 { padding: 0px; margin: 0px; margin-to...

 
2:28 AM
@Pimgd Depends on the person.
My favorite style game is where I can plan beforehand, then watch my plan against an opposing plan.
I'm still working on C# In Depth. Expression trees are really interesting.
Next up--extension methods.
 
0
Q: Could someone please provide an example of LARS algorithm via R program?

jezaCould you tell me the best recourse about Least Angle Regression with implementation in R program, because, there is nothing on YouTube.

0
Q: Tetris Random Piece Generator

LeonWas just wanting some general feedback on the below code regarding 1. Readability 2. Structure 3. Efficiency import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Scanner; /** * Created on 6/23/2016. * * Inspired by r/dailyprogrammer * https:/...

 
-1
Q: Reversing a word or sentence

LeonWas just wanting some general feedback on the below code regarding 1. Readability 2. Structure 3. Efficiency import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Scanner; /** * Created on 5/27/2016. * * Simple functions used to reverse either a s...

still looking for reopen votes
 
2:48 AM
Nitpick: "esprit de corps", not "esprit du corpse". Unless you think their dead soldiers had particularly high morale. — Michael Seifert yesterday
 
3:23 AM
it's 5:24 AM
but woooo
I got my first ending
also, it's light outside
 
3:57 AM
Where does Duga run? and is grails related to Ruby in some way?
 
4:20 AM
0
Q: Points and Segments Solution

Huy VoTask. Given a set of points on a line and a set of segments on a line. The goal is to compute, for each point, the number of segments that contain this point. Input Format. The first line contains two non-negative integers s and p defining the number of segments and the number of points on a lin...

 
4:38 AM
@Matt IIRC @Duga runs on a PC by @SimonForsberg.
 
 
3 hours later…
7:21 AM
0
Q: NBP currency application

Mike QuoroI have a small program in Java with GUI, which is showing NBP currency data in specified tabs. It downloads data from www.nbp.pl using XML format and saving it into Apache Derby database using hibernate. I am posting my code here because I want to correct myself in style and, eventually, in effic...

 
7:36 AM
@Matt grails is ROR on Groovy, IIUC
 
7:57 AM
Monking
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: NetBuffer - buffer specialized for socket read / write
 
stackoverflow isnt a code review site — redFIVE 18 secs ago
I'm voting to close this question as off-topic because it asks for a code-review instead of stating a specific problem. codereview.stackexchange.com would be a better place for this question. — Mureinik 12 secs ago
 
8:37 AM
@Matt Listen to @EBrown and @Vogel612, they are correct.
5
 
many thanks for your help Increment irow was the solution. I am interested in understanding what you mean by heading over to codereview. How can I get my code shorter? — MAx Segura 13 secs ago
You should better post this to codereview.stackexchange.com :) — hazevich 47 secs ago
 
9:06 AM
0
Q: Data Access Layer to return Data Transformation object

user110425I am trying to create a Data Access Layer using ADO.Net. I have created a generic method for ExecuteNonQuery. The stored procedure I am calling will return two parameters. The output parameters from the stored procedure should be assigned to DTO object and the DTO should need to be returned to BL...

 
9:24 AM
Thank you. I did post this on codereview.stackexchange — Rama 30 secs ago
 
0
Q: ListView in Android

Rathiga JesikaI creates ListView inside the ScrollView using java code and bottom of Listview i added on Button its working fine.I know to fix the button always bottom.But my doubt is how to fix the button is bottom of the screen when the item is less like two or three? if the item increases the button have to...

 
10:01 AM
0
Q: Full screen WebView Android app

baalalI've created a working Android app for my project website. I'm newbie too android dev so please review the code of this app. Any simplification or suggestion to optimize it much appreciated. Thank you. MainActivity.java public class MainActivity extends AppCompatActivity implements MyWebChrome...

 
10:16 AM
Codereview is another stackexchange site where you can get help improving your code (as opposed to stackoverflow where you get help fixing errors). — arcadeprecinct 31 secs ago
 
10:48 AM
move your question hereguradio 52 secs ago
 
0
Q: My first (simple) template that does more than storing a value of type T

tobi303I just decided to get a bit more acustomed to using templates. Maybe this is a stupid question, but in my experience in C++ there is always some pitfall lurking aroung the corner. Thus I prefer the danger of embarresment instead of building up on bad habbits. Mainly as an exercise I wrote this: ...

 
Nobody here? =(
 
@N3buchadnezzar Somebody here =)
 
@zʏᴀʙiɴ101 Was able to increase the speed of a code 34402.762 times. Feeling good :p
 
Was TNBing in the Nineteenth Byte, as always. Feeling good :P
Do you like an idea of a book about Duga?
 
@zʏᴀʙiɴ101 Maybe
@zʏᴀʙiɴ101 TNBing?
 
11:21 AM
@N3buchadnezzar "The Nineteenth Byte"-ing.
Currently the book is called Duga: A Bot out of the Ordinary, and the idea is being brainstormed on in the Nth Monitor.
Until I get a room for the book...
 
@zʏᴀʙiɴ101 long answer is long
@zʏᴀʙiɴ101 Sounds interesting!
 
@N3buchadnezzar Good! Apply in the Nth Monitor.
 
11:38 AM
@zʏᴀʙiɴ101 Feel free to create one.
 
@Mast Thanks :D
@Simon @skiwi Don't mind if I add you as owners of the book's room?
 
Monking
Back later though
 

 Duga: A Bot out of the Ordinary

Discussion of the book about Duga
 
@Phrancis ELI6: Canada Day
 
11:54 AM
@DanPantry Explain like I'm six? o_O
 
12:11 PM
@DanPantry Just a national holiday, like Queensday I guess.
 
Yeah.... Canada Day!
 
12:38 PM
I give up
 
0
Q: ISBN validation with Hibernate Validator

Olivier GrégoireI've written a ISBN-validating annotation. It is to be used in conjunction with Hibernate Validator. I'm pretty satisfied with this code as it works as expected, but I've had to make a design choice that I totally dislike. This is why I post this question. The method checkISBN returns an Option...

 
I should stop answering old questions.
 
1:09 PM
@N3buchadnezzar Why?
 
No recognition or comments from the author. However I think I am just impatient
 
As long as the content is correct you have done your duty. Would be nice to be acknowledged for your work though. I love "Thanks that worked" comments.
 
@Matt Yeah, the same. The worst are the accepted zero upvotes ones.
I spent a long time trying to optimize the posters code though :
 
This is true but at least you can get a badge for that one.
Yeah that is the thing about CR. Spend a lot more time on answers... testing and justification are important to prove your code.
 
@Matt I had a 6+ answer on a -3 question. I think there is a badge for +10 on a -5 question?
 
1:16 PM
civic duty badge on SO
 
I think that is also close to a badge.
Reversal
 
> Provide an answer of +20 score to a question of -5 score. This badge can be awarded multiple times.
That is hard
 
Which is why it is gold
 
@Matt It is the third least awarded badge though.
Even among gold badges it is hard. It is only beaten by being a moderator and
Edit and answer 500 question.
 
uhhh
great question, unsung hero, illuminator, legendary all have been awarded less than reversal
 
1:22 PM
oh?
 
and sherriff / stellar question haven't even been awarded at all
how do you get "third least"
what stats are you looking at
 
SO don't apply here =)
 
I would think so? It gives a bigger pool of data
 
wrong culture
how do I put this
evidence based on statistics for Stack Overflow is only weak evidence for events on Code Review
 
1:25 PM
Having a high number of reversal badges is not a good indication of a good culture imho :p
 
... that's the different kind of wrong
I mean to say that it's basically taking stats about americans
and using them to model europeans
It's that kind of different
Questions on Code Review tend to be far less applicable to a general audience than questions on Stack Overflow
so it's hard to get 100 favorites or 100 votes on an answer or question
but there are multiple correct answers
so it's easier to get some votes
 
The number of questions with 100 votes or more compared to number of questions is lower on SO though
 
that's because SO doesn't upvote very much when compared to CR
 
Excactly
 
CR's questions come in so slowly that we can discuss each of them in chat
SO's questions come in so fast you have to use the review queues and the flagging mechanisms more
so flags and review queues are different as well
 
1:37 PM
Quick Python question: Support x = [[1,2],[3,4]]. Can/should I iterate through the "rows"? I.e. [1,3] , then [2,4] in plain Python or is this numpy territory?
 
@StewieGriffin numpy
 
@N3buchadnezzar Thought so :) Thanks...
 
@StewieGriffin You can do it without by why would why?
lst = [[1,2], [3,4]]
print [item[0] for item in lst]
print [item[1] for item in lst]
@StewieGriffin This works, but please do not :p
 
@N3buchadnezzar No reason... But if it was straight forward in plain Python then why use numpy... :)
@N3buchadnezzar I won't =)
 
@StewieGriffin Because it is a billion times faster?
=P
 
1:47 PM
@N3buchadnezzar American billion, or old British billion?
 
Both, multipled with each other to the power of the list you are trying to evaluate.
 
But got to go :) Baby crying...
 
good luck, have fun, do not die.
 
Yes, Stewie has a baby! What a world we live in...
 
1:59 PM
@zʏᴀʙiɴ101 I don't really see much use for it
 
@skiwi We're discussing the book about your bot, Duga. Duga: A Bot out of the Ordinary.
 
@zʏᴀʙiɴ101 @Duga is not mine though, it's @SimonForsberg's bot, I only started with it, formerly called GithubHookSEChatService and deployed as TCG ChatBot with as only purpose to show commit messages, issues, etc. from Github
 
Woo got some points
 
0
Q: PHP upload script might be vulnerable

AlexI have written a basic PHP upload script a few years ago and recently I discovered some phishing html pages in the website's root. This website is located in /www/sitename, while I upload the files to /gstorage/sitename, which can't be accessed from the web. I have found a lot of html files in...

 
 
2 hours later…
4:05 PM
0
Q: Extension method splitting string on each capital letter

denisHello I'm creating my own game and for some statistics I need to get the names of specific objects, the problem was that I had them declared like this SmallFireBall but I wanted them to appear like this Small Fire Ball because that's something the user is able to see, so I decided to create my ow...

 
4:21 PM
def sum_even_fast(limit):
    a, b = 0, 2
    total = a+b
    c = 4*b+a
    b, a = c, b
    while c < limit:
        total += c
        c = 4*b + a
        b, a = c, b
    return total
Way to write this shorter?
 
If you want to learn how to write bad code, CodeGolf was created for people like that
3
 
-1
Q: How to convert this C code into Swift?

JW.ZGThis is a very famous piece of code from Quake-III Arena, game/code/q_math.c. Its sqrt function is even 4 times faster than the system funtion sqrt(). I want to know how to use this in Swift. Thanks in advance! float InvSqrt(float x) { float xhalf = 0.5f*x; int i = *(int*)&x; // get bits for fl...

 
@CaptainObvious OP assumes the trick also works in Swift. Very flawed assumption.
 
4:59 PM
0
Q: Route Cipher implementation

Ryo ArmandaI'm writing a simple tool as a helper on Route Cipher for fun. In summary, the tool breaks input string into a two-dimensional array of characters with the dimensions specified by the user, and after that it's represented as a table on HTML. The tool also has a function to shift table data on a r...

 
Since your code appears to work, you may want to post this at codereview.stackexchange.com. — R Sahu 44 secs ago
I did think about posting it to codereview, but whilst the code compiles and runs the output is incorrect for my specific problem so I thought it would be better to post it here. — ArchbishopOfBanterbury 56 secs ago
possible answer invalidation by tobi303 on question by tobi303: codereview.stackexchange.com/posts/133694/revisions
 
handled
I haven't rolled back the edit, but please see what you may and may not do after receiving answers for future reference. Thanks for keeping the answer cleanly in sync with the OP. — Mat's Mug ♦ 9 secs ago
 
5:20 PM
possible answer invalidation by tobi303 on question by tobi303: codereview.stackexchange.com/posts/133694/revisions
 
5:33 PM
0
Q: Labeled While loop with break loop counter

user4317867I'm looking to improve a loop within a script that performs scheduled server restarts. Currently, I'm using a DO While loop with an exit condition within an IF statement once a counter reaches a limit. I'm looking to change this into a more simpler loop using a Labeled While loop containing a F...

 
5:46 PM
-1
Q: HackerRank Sherlock and Squares: "Terminated due to timeout"

tachmaI am unsure of how I can simplify my code for this HackerRank activity: Here's my code in C++: #include <iostream> #include <cmath> #include <vector> using namespace std; int main() { unsigned test_cases, low_range, high_range, count = 0; vector<unsigned> sherlock_squares; cin >> test_...

 
6:27 PM
0
Q: PHP PDO MySQL - Printing many-to-many relationships in a HTML/Bootstrap Table

Shiroyama CahI am doing a project here where i had to learn everything fast so i could be able to do my class, however i am pretty newbie in PHP and i need a LOT of help here :( I need to print the many-to-many relation ship in my tablet, however i don't know what to do for my case: i tried tons of ideas, ho...

 
6:37 PM
0
Q: Rust: Read file contents to string safely

soarjayI've just started to teach myself Rust. I've written the following code to read a text file and store the contents in a String. Is this the typical way of doing this? Can anyone suggest any improvements to this? use std::fs::File; use std::io::Read; use std::io; fn main() { let file_name ...

 
6:55 PM
@Mast Swift uses the IEEE 754 representation for Float (at least on all platforms where it is currently available), therefore the same "trick" works in Swift: stackoverflow.com/a/33680900/1187415.
 
Good for him.
 
@Duga Why is Rubberduck on Duga on the 2nd Monitor?
 
7:21 PM
Ahoy
 
Yahoo
 
@zʏᴀʙiɴ101 Some of the messages from @Duga show up here for all persons/repos.
 
7:36 PM
Lol, I have a field that doesn't allow me to enter decimals, but entering 10e-2 gives me 0,01
 
That's...hilarious. Lol
 
No wonder I had no clue what was going on
I thought I was implementing an CurrencyStringToDecimalConverter, but turns out I was implementing a DecimalToCurrencyStringConverter
 
0
Q: Synchronous loop with internal asynchronous calls

user3419168Below I've written a simple version of what I'm attempting to accomplish. I'm new to asynchronous functions, so it's difficult to wrap my head around this. My goal is to wait for the loop to finish all the callbacks before console.log() runs, but I want all the callbacks inside the loop to be asy...

 
I have no clue why it didn't blow up though
 
woo two upgoats
 
7:41 PM
Nice, it works :D When I type input it doubles it
Type 5 -> end up with 10, type 20 -> end up with 40 because 2 -> 4 then 40 -> 80
makes sense right?
 
Absolutely not.
 
f(x) = 2x ?
 
Ok nice, I'm just trying to figure out how WPF works with custom converters, this wasn't actual code I wanted to implement ;)
@N3buchadnezzar More like f(x) = x * pow(2, strlen(x))
Great, now typing 40 gives 404404
 
0
Q: Distinct unordered pairs of an array which satisfy a condition

user120947I came across the below problem in a coding challenge: Let's define 2 functions a function F(i) and Val(i,j) for an Array A of size N as follows: F(i) = ∑ Val(i,j), for j = i+1 to N Val(i,j)=1 ,if A[i]<A[j], otherwise Val(i,j)= 0. I need to find the number of distinct unordered pairs of elemen...

 
@skiwi More like 404 am i right?
 
7:55 PM
404 brains not found
 
Braaains, raaahhh. makes droodling homer simpsons sounds
 
WPF? More like WTF.
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: HTML Pagination Generator
 
@EBrown Else it wouldn't let me enter a comma or dot in a TextBox if bind to a float or decimal :/
You have experiences with WPF WTF @EBrown?
 
8:01 PM
@skiwi Yeah. A little bit (with both).
 
A casual or a causal relationship?
 
Both.
 
^^ Ok
I read somewhere that WPF makes the hard stuff trivial and the trivial stuff hard, I think I need to agree with that
Ugh, if you type "5." it then converts that to decimal 5 and then proceeds to show "5" when it is converted back to a string
 
0
Q: Python text game

user6542393Im a complete noob and started today, i watched some videos about how to make a simple text game but doesnt seem to make it happen. When i run the shell it says missing paranthesis around print, i tried to swap it but nothing happened. What am i missing to make it run? def start(): print ("Hell...

 
This is quite flawed
 
8:21 PM
@skiwi I stared it (that is the new word for flags right?)
 
@N3buchadnezzar You stared it?
 
Yeah
Hopefully a 10k user will do the same / moderator.
 
@N3buchadnezzar Flag what?
 
Are you sure you know what that word means?
 
I think he's confused.
 
8:23 PM
Me too.
 
Contains broken code
8 mins ago, by Captain Obvious
0
Q: Python text game

user6542393Im a complete noob and started today, i watched some videos about how to make a simple text game but doesnt seem to make it happen. When i run the shell it says missing paranthesis around print, i tried to swap it but nothing happened. What am i missing to make it run? def start(): print ("Hell...

 
> Stared: past form of stare.
> Starred: past form of star.
 
Oh, English you so silly!
 
Welcome to Stack Overflow. Please take the time to familiarize yourself with the Stack Overflow help file, which will help you understand what kinds of questions are appropriate for this site. This site is intended to help you obtain answers to specific programming questions, as opposed to providing tutorial, design or code review assistance. — MarsAtomic 55 secs ago
 
8:44 PM
@Duga Ohh, no way. False positive.
 
9:23 PM
0
Q: Regex-guided crawler that downloads regex-matching images up to a crawling level

Gustavo6046This is one simple crawler that downloads images from websites, the website's URL to be crawled to must match the regex, as well as any image-to-download's URL. (Also, I know, I made my own thread pool, because I did want to keep my crawler lightweight...) Code: import BeautifulSoup import req...

 
Uh @Mat'sMug / @EBrown what should I do with this?^
 
@Phrancis click 'no' and restart linqpad
 
@Phrancis I always hit "No".
 
or, select VS 2015 and start debugging IL code for the broken process if you're brave
 
OK thanks guys
 
9:49 PM
GO GERMANY
 
?
 
They just won
@Phrancis Ye
Watching a tournament on twitch and having soccer on the radio
@Phrancis Really liked my answer here ^^
**
 
10:08 PM
This is something for Code Review.... — LPK 41 secs ago
 
0
Q: Regarding Image of JFreeChart

Meenakshi PantI have generated an image in png format using ChartUtilities.saveChartAsPNG() method in JFreeChart save that chart in the local path. I am retrieving that chart from local and converting into bytes arrayand then to binary and save them in a variable. When I vice versa this process by convertin...

 
10:26 PM
wat, the move failed :(
 
Why? Not a mod?
 
No I think there were just too many messages to move at once :(
 
Ah
 
Seems like it moved some of them, though...
 
To where?
 
10:29 PM
0
Q: Vampire number generator

LeonInspired by Reddit r/dailyprogrammer A vampire number v is a number v=xy with an even number n of digits formed by multiplying a pair of n/2-digit numbers (where the digits are taken from the original number in any order) x and y together. Pairs of trailing zeros are not allowed. If v is a va...

 
in The Nth Monitor, 4 mins ago, by Phrancis
237 messages moved from The 2nd Monitor
I think I may have broken SE chat
 
It copied them, but never deleted them here.
 
Very strange
nevermind
 
monking
 
I refreshed my browser page and they are gone now
 
10:35 PM
:(
Yeah.
 
BTW @EBrown, from a RO over there:
in Agents of Nothing, 1 min ago, by KutuluMike
he's more than welcome to some here and like BvS, it's always good for some drama
 
Hmm.
 
@Phrancis Wot.
 
@Mast All good
I think it was just the chat not really knowing how to properly keep up with this many messages being moved at a time
 
10:53 PM
I'm voting to close this question as off-topic because there is no concrete question and belongs on the code review site. — Eiko 45 secs ago
If your code works this might be better off on codereview.stackexchange.comj08691 39 secs ago
I'm voting to close this question as off-topic because it would be better placed at codereview.stackexchange.com. — nnnnnn 1 min ago
 
11:11 PM
0
Q: Chellenge 3 from Project Euler

Ethan WatsonHow can I improve my code, make it more efficient, and are there any tips you have? public class LargestPrimeFactor { public static void main(String[] args) { long num = 600851475143L; boolean isPrime = true; // this is to see if num is factorable for (int ...

 
I'm voting to close this question as off-topic because this belongs to CodeReview.SE (codereview.stackexchange.com/) — Derek 朕會功夫 23 secs ago
 
Good grief @Duga, 3 messages saying it's off-topic for SO because "belongs on the code review site"
@CaptainObvious I ran the code and it gave the right answer, but after a while errored...
71
839
1471
<right answer removed for spoilers>
Exception in thread "main" java.lang.ArithmeticException: / by zero
	at Main.main(Main.java:13)
exited with non-zero status
Not sure if that makes it broken or not
It also prints 3 wrong answers before printing the right one
@EBrown what do you think about this?^
 
Ehhh...I'd ask the OP for clarification on what they determine the correct execution to be.
Ask them if there's a reason it prints all the prime factors instead of the largest.
 
Good call
@EBrown integer overflow would roll back to 0 value after a while, right?
 
Because, technically, it finds the solution, but it doesn't find only that solution.
@Phrancis Yes.
So that's what is happening there.
Which also makes it broken, but the OP may want to fix it.
 
11:29 PM
It's a pretty easy fix indeed
 
Yeah, int -> long.
Technically the code isn't broken.
It find the right answer, and then errors out afterwards.
Which I find acceptable.
 
@Eiko please vote to close as "Too Broad" or "Unclear" if there is no actual programming question/problem. That being said, if the code works correctly it would be on-topic on Code Review. — Phrancis 8 secs ago
@nnnnnn please vote to close as "Too Broad" or "Unclear" if there is no actual programming question/problem. That being said, if the code works correctly it would be on-topic on Code Review. — Phrancis 28 secs ago
@Phrancis - The question is completely clear. But the code works as is and the OP has essentially asked for a review, which is why it is a candidate for the Code Review SE, and why I voted to close it as off topic. — nnnnnn 1 min ago
 
@Duga Oddly enough, "Belongs on another SE network" isn't a valid VTC reason.
 
My point exactly
Oh well, not in the mood for a comment war on Stack Overflow
 

« first day (1155 days earlier)      last day (2848 days later) »