« first day (1012 days earlier)      last day (3012 days later) » 

12:00 AM
RELOAD! There are 1807 unanswered questions (94.2233% answered)
 
6
A: Improving a robot's ability to navigate the plane with Karel J. Robot

200_successCommands is a poor name for this class. It's a robot of some kind. Better names would be EnhancedRobot or GridAwareRobot or CartesianRobot. What is the point of the currentDirection member variable? It's a write-only variable, and is therefore useless. Reusing code via inheritance is always ...

good answer
 
yeap
 
Zak
yay, more stars ^^
 
0
Q: Automation of array allocation in C

Sam AndersenI recently have been working on moving from projects written in Java and C++ to C and realized that the lack of std::vector in C makes it a bit more difficult to create multi-dimensional arrays. Also, without the std::string in C, it's harder to store arrays of strings and keep track of their siz...

 
12:29 AM
inline void* createArray(varrayType arrayType, int arraySize) {
varray* target;
varray** vtarget;
varray*** tdvtarget;
#NamingThings
3
 
0
Q: Is there something wrong with this python code?

DigitalCodeThis is a homework assignment i gotta do, super basic but im having trouble ;/ Objectives: Demonstrate use of the Python while-statement and if-statement. Description: Write a Python program that repeatedly reads user input and prints a result based on the input. Requirements: Create a Python ...

-1
Q: calculation of grade

Michael Jordz Tarlitwho to calculate the prelim,midterm,and final grade in eclipse? PRELIM GRADE EQUIVALENT INTERPRETATION Quiz 1 (20%): 97.51-100 1.00 Very Excellent Quiz 2 (20%): 94.51-97.50 1.25 Excellent Class Standing (10%):...

0
Q: Where is my error?

NoobieProgrammerpublic static void ejercicio7(int valor,int billetes10000,int billetes5000,int monedas1000); { int billetes10000 = valor/10000; valor=valor-(pago*10000); int billetes5000 = valor/5000; valor=valor-(pago*5000); int monedas1000 = valor/1000; valor=valor-(pag...

 
@CaptainObvious Where is my on-topic question?
3
 
Three shitposts in a row?
 
Mother of all off-topics, all 3 are bad
 
three strikes in a row, and yoooooooooooooouuuuu're outtaaaaaaaa here!
0
Q: Proper PHP array walkthrough

GabeszI am working on a ticket reserving system right now. The users can reserve seats in a cinema for every movie. Whilst my code works, it is not the fastest. When a customer buys ticket (seat(s)) I check all the seats' status (free, reserved) with this foreach loop: if($reserved_seats != null && c...

 
12:35 AM
I was going to copy that massive one-liner but chat said it was too long lol
 
12:47 AM
12
A: What would people on multi-generational ships wear?

WhatRoughBeastA ship intended for a 10,000 year journey has to grow all its own food (if you can't store clothing, you certainly can't store the much greater quantities of food required.) With an onboard agricultural system, any of the traditional fabric materials (cotton, flax, silk, etc) can have a source. ...

 
@Quill OMG human leather wat
 
That escalated quickly. — Azor-Ahai 18 hours ago
2
 
Please consider using codereview.stackexchange.com as your code is already working. — Stephen Reindl 49 secs ago
 
Bamboo is nice because then the kids will understand the "Eats shoots and leaves" pun for many more generations. — corsiKa 18 hours ago
 
lel
 
12:54 AM
This may be OK for Code Review site if the code is already working, but consider adding more context to your question if you post there, as in its current form it is a bit vague. — Phrancis 13 secs ago
 
    Using Con As New MySqlConnection("Database=*;Server=*;User Id=*;Password=*")
        Using cmd = New MySqlCommand(SqlString, Con)
Where VB meets MySQL...
2
Also not really sure why one would want to Open() and Close() connection for every item in an array, seems very inefficient
 
1:14 AM
BitBucket is down...
 
0
Q: Bracket Pairs Validation

Jae BradleyPurpose Validate whether the open brackets within a String have matching closed brackets, in the correct order. The three types of valid brackets are [ and ] { and } ( and ) Examples: A[B]{C}(D) returns true A[B{C}(D) returns false Feedback Creating a new Map of open brackets to close...

0
Q: Decimal numbers to english string representation

amigoThe code is as follows: import java.text.NumberFormat; import java.text.ParseException; import java.util.Locale; import java.util.regex.Pattern; public final class EnglishNumberTranslator { private static final double MAX_LIMIT = 999999.99; private static final String OUT_OF_BOUNDS_INP...

 
1:34 AM
I never knew until now looking at the that I missed this gem
11
Q: One, two, three, … Un, deux, trois, …, maxBound::Int

200_successI wrote a numbers-to-words converter for English, then tried to adapt the code to work for French. I'm wondering mainly whether any simplifications are possible. In English English is relatively straightforward: english :: Int -> String english n | n == 0 = "zero" | n < 0 = "negati...

 
1:47 AM
Author's perspective: why they shut down Parse
 
@Phrancis Indeed.
 
0
Q: Generate all Permutations in C

NoobCoderI have written a code for generating all the permutations in C as explained in http://www.cut-the-knot.org/Curriculum/Combinatorics/JohnsonTrotter.shtml. How can the code be optimized? Are there any memory leaks? int factorial(int n) { int fact = 1; for(int i = 2; i <= n; i++) fa...

 
Any recommendations for C# learning material .... but one step higher then "Let's talk about what a string is". Plenty of beginner books out there but I would hate to waste 200 pages on basic programming concepts. Likely I will just try and make a program and code bite my way into learning. Curious if there were some book suggestions out there.
 
@Matt Read code.
I learned by reading code.
 
Jon Skeet has a C# book series, if you're already familiar with .NET concepts
 
1:57 AM
I started with C++ and got to advanced beginner. Then, I switched to C#, and was doing terribly.
 
I figured the first response was going to be his book. Guessing it is good.
 
Once I got several reviews on CR, I started doing better.
Reading lots of RD/VSD code and discussing best practices really helped me get to where I am.
 
I like CR for learning. I think I could get farther here faster with language advancement then SO
 
BTW, I just figured out something simple after absolute hours of searching.
 
SO is for learning specific stuff, CR helps you learn lots
 
1:58 AM
It feels good.
 
@Matt That's often the case
 
@Quill For sure. SO is starting to sour on me now since there is only so many times I can tell people the same thing.
The rep whore in me has worked its course I think
 
Good good. There's plenty of rep to be had on CR, but even without that, the journey seems a lot more fun than Stack Overflow
 
-1
Q: Simplest linked list in C++?

ZeZNiQ#include <iostream> struct node { int val; struct node *next; }; struct node *head = NULL; struct node *tail = NULL; struct node *prev = NULL; void print_list() { struct node *foo = head; while (foo != NULL) { std::cout << foo->val << std::endl; foo = foo->...

 
Look at that.
 
2:05 AM
why does the add remove section have a different colour background?
 
It is a tool strip.
I can set that, but I thought it looked OK the way it is.
 
It looks good, besides what @Quill mentioned
 
0
Q: Matrix column switching

PipI'm currently working in the math library for a game framework that I'm writing and am working to improve some functionality that was affected during a refactor. Formerly, my Matrix4.SwapColumns(int, int) function looked like this: /// Documentation public void SwapCols(int i, int j) { for(...

 
hrngh... something's wrong with my PC...
 
Memory problems!
 
2:17 AM
hrngh...
 
Why'd you remove the image?
 
tried to thumbnail it
didn't work...
 
I don't think chat supports thumbnails.
 
the problem is that chat doesn't support markdown all the way
anyways I have not the slightest idea why I'm running out of RAM at 50% usage
unless half of my RAM-Bars are failing...
 
@quill that was a good catch the blue are off by exactly 5 point of RGB each according to photoshop
 
2:20 AM
@Vogel612 try using RAMMap
 
looks good to me :/ That tool looks interesting though :D
okaaaaay... sound borked out on me just now.. I call hardware failure...
Diagnosing will have to happen tomorrow. Thanks for the Rubberducking :)
 
quack quack
 
2:41 AM
Either of you guys actually have one of Skeet's books? I can get the 2nd ed ones for pretty cheap. 3rd ed comes up pretty high though for a hobby
 
No, I've been meaning to pick up the 2nd ed one for a while
Jeroen might be able to help you
 
I have the 3rd edition
 
You're a mug. You cant read
 
I... hmm...
 
just print out every msdn article
 
2:48 AM
@Quill I could do that...... Do it a work as it is not my printer. I used Dells printer to get me almost the whole Rifts collection printed.
@Mat'sMug Did you own other editions? Wonder if there is really a difference between 2nd and 3rd ed. Sure it cant be that big a diff.
 
nope
lol, about as big a diff as between C# 3.5 and C# 5.0
I didn't read all of it yet
 
I don't own anything except Bjarne's book for beginners+ and a Knuth set.
I've not finished either.
@Mat'sMug Did you see that I figured it out?
 
You should've done the secret santa @hosch ;)
 
you need to get ahold of Dependency Injection in .NET
@Quill haha was going to say that
 
there's always next this year
 
2:51 AM
@Quill I would have gladly if I thought I could persuade my mom to ship another pen around the world.
 
I have Powersehll in Action ..... great book but hell if i am going to read it cover to cover.
 
looks amazing
 
Yeah - it came down to a simple event trigger.
Also, talking about triggers, did you know I wired the Delete key to the Remove button?
 
the remove button should be disabled when there's no active selection in the grid though
I didn't
 
It doesn't do anything in tha case, but yeah...
 
2:52 AM
but it should look disabled ;-)
UX FTW
 
Yeah, I did everything else...
 
how do you feel about having a margin around the client area? oh, and the left and right panels don't line up (look at the bottom)
 
It has a 5px margin.
 
I think the bottom margin should continue on the left and right; it would make the "client area" line up with the edge of the Ok button
 
The right side does, anyway.
Hmm, I need to remove that margin on the bottom side.
I agree that looks a little funny, but the margin would be too big if I adjusted it.
 
3:08 AM
0
Q: Assignment Branch Condition size too high

DanielI have this class: class Report include ActiveModel::Model attr_accessor :start_date, :end_date, :show_sales, :show_daily_active_users, :show_registered_cc, :show_all_time_registered_cc, :show_users def initialize(params) params ||= {} @start_date = to_date(params...

 
3:20 AM
possible answer invalidation by Sam Andersen on question by Sam Andersen: codereview.stackexchange.com/posts/119449/revisions
 
@Duga handled
 
@Duga What does this mean exactly?
I see the bot post those a lot but I don't know what it means
 
@quartata It means someone edited the code in their question after it was answered.
 
@Hosch250 ah k
 
The edit potentially invalidates an answer, which isn't allowed.
 
3:29 AM
hey @200_success
 
@Mat'sMug What's up?
 
@200_success Nothing much except fine-tuning RD's UI.
 
not much, except RD is getting a facelift, and we have 2 new regular contributors now
 
Created the following with the updated code (suggestions from vnp) GitHub/vector.hSam Andersen 59 secs ago
Designers are really just massive CSS masochists
they're another breed of person
I nearly typed that as bread
> another bread of person
 
Designers (by your definition) need to show me how much CSS they have actually written, before I consider them fellow CSS masochists
 
3:52 AM
-1
Q: Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\xampp\searchnew.php on line 53

jonas gmarao<?php while($row = mysqli_fetch_array($search_result)):?> //please help me the fetch array expects parameter 1 to be mysqli_result boolean <tr> <td><?php echo $row['CODE'];?></td> <td><?php echo $row['DOCUMENT_TITLE'];?></td> ...

 
@CaptainObvious burn
 
4:22 AM
0
Q: Share point 2013 workflow

NavyaI have an approval task process that assigns a task to an user. But any one having edit permissions are able to approve and edit the task. I have already activated the workflow can use app permissions feature and Granted full control permission to workflow. In share point 2013 how to breakdown t...

 
Someone finally figured out how to do vertical positioning in CSS?
 
5:25 AM
@200_success I discovered the long lost Atlantis
Just gotta align the padding with the statues
 
0
Q: Query Tuning in MySql

Soumik DuttaThe code is fetching records from a table called CSAT_SUMMARY_REPORTS[driver table] but due to the filters conditions applied which needs to be checked in another table called CSAT_REPORT_FIELDS. In this table the filters are in different rows so a group_concat is needed to satisfy the ANDed fi...

 
@CaptainObvious You have 8 FROM clauses...
 
Monking
 
yo
 
5:56 AM
oi
 
6:20 AM
monking
 
@Phrancis Yo dawg, heard ya like selects. so I selected some selects using a select to select a select from your selects, now ya just gotta select a select from the selects I selected for ya
3
 
@Quill I select you, Pikachu MySQL!
 
May I ask you guy's for casting a vote : blog.zkoss.org/2016/01/22/zk-data-handler-contest
Take what you find the best (QRCode is of me ^^ )
@Phrancis Saw yesterday another guy was spamming you with script :)
 
6:37 AM
@chillworld I wish they would step away from the SQL server and did not type sp_send_dbmail in their CATCH clause... :)
 
7 hours ago, by Quill
or you could donate them to Phrancis' colleagues to test on so they stop screwing their queries
 
Email is an effective logging method.
2
If everyone logged exceptions via email, then all you would have to do is search your deleted emails for the error.
</sarcasm>
 
6:56 AM
@Phrancis I can believe that
@Phrancis you only need to make them aware to don't use your email :)
 
@chillworld maybe I have asked this before, does ZK has a GUI editor ?
 
7:23 AM
@Heslacher in netbeans you have a palette where you can drag your items to the zul
but the zul isn't show "realtime"
but if you run jetty => zul changes directly visible with refresh in browser
 
ok thanks
I hate making gui's
 
@Heslacher looks like you are going to try it out ^^
@Heslacher I like it making in ZK but I'm still terrible in making designs myself. I prefer an example of how it should look like
 
Maybe I will. Its just that the netbeans gui editor isn't my favourite because all of the placed items seems to be readonly (or something like that). I like VS and Winforms more (I don't like WPF that much)
 
@Heslacher that's not the issue with ZK. (you are thinking of swing)
 
yep
 
7:28 AM
Zul pages are like asp pages
xml like pages
 
Thats ugly as well ;-)
 
depends on how ugly you want it to write ;)
 
Zak
monking @all
 
hey @Zak
 
you can work with "parts" and include them in a parent page
like a tab, each tab a separate page
 
7:31 AM
I prefer to drag and drop the components and have easy access to its properties
 
mhhh you can have autocompletion for the props but not like swing way
but once you know the basic props, writing is a lot faster then drag drop
 
If I have some spare time I will digg into ZK. Right now I have 4 laptops to configure each should have 3 OS on them for our technicians. Will take some time ;-)
 
all same laptops?
 
Yes, I will configure one and the clone the hd
 
good idea ;)
and save your clone somewhere ;)
@Heslacher once you try it out and have problems, ping me ;)
 
7:44 AM
I will, thanks
 
8:08 AM
@Mat'sMug Sorry about that. Wi-Fi in the train is a bit iffy.
I lost my connection after that. I guess my laptop re-send the message during the reconnect attempts or something like that.
 
8:35 AM
0
Q: Frequency of words in all files of a directory using Future - Scala

Prabhat KashyapI created a program to get frequency of word in all files in a directory using Future API import java.io.File import scala.concurrent.Future import scala.concurrent.ExecutionContext.Implicits.global class GetWordCount{ def inFileCount(source: File):Future[Map[String,Int]]= { val future...

 
8:48 AM
@Quassnoi RIDENS MAGNA VOCE! Ceasar is known for many famous sayings, such as "veni vidi vici", "aleae iactae sunt", and "troglodytarum noli pascere" :) — Hagen von Eitzen 11 hours ago
What, Skeptics is slowly turning into Worldbuilding?
 
Monking
 
monking @DanPantry
 
Monking @DanPantry @chillworld
 
Naruto answer; accepted non-selfie answer with 0 score: Hex-to-octal converter
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Validate data for insert, server side
 
Hey folks, a Python doubt:

This commit of mine: https://github.com/Dawny33/PyHub/commit/490dd9b7843ca0747cbec9c8b00c520d6de07b8b

was shown as "both good and bad" when I did: `git bisect bad`
Can someone explain why?
 
9:09 AM
@DanPantry monking
 
monking @Mast
 
I'm voting to close this question as off-topic because it should belong to code review — SpiderMan 36 secs ago
 
@Dawny33 Do you know how git bisect works?
Hint: it's not necessarily anything to do with Code Review.
 
1
Q: Doge meme generator in racket

Hello_worldI wrote a doge meme generator in racket some time ago, mainly as a joke, and I would like some criticism about the general style and what could be improved. Here is how the program output looks : plainDoge.jpg refers to a plain image for the doge meme (700 * 525) #lang racket (require rack...

 
git bisect is just used to aid in the detection of regressions.
You identify a point where something was working, then identify a point where something wasn't working, and git will go through revisions trying to identify where that functionality stopped working
You mark revisions where the function works as "good" and where it doesnt' as "bad"
 
9:15 AM
@DanPantry Thank you. I need to go through the git bisect docs then :)

I thought there was something wrong with `returning nothing` in Python!
 
@CaptainObvious wow such code much noise very racket
 
@SpiderMan This question would be off-topic on Code Review because it is a "What is best practice?" question. Please read the Guide to Code Review for Stack Exchange users before recommending Code Review. Furthermore, you need to cite a bona fide reason for declaring this question off-topic for Stack Overflow. — 200_success just now
 
9:33 AM
@Dawny33 It doesn't tell why?
@CaptainObvious Please stop abusing dogs like that.
 
@Mast No, it doesn't

I've found this nice link though, which I found useful :)
15
A: git bisect doesn't work, no output

Wayne ConradIntroduction to Git Bisect "git bisect" can be a little confusing at first. Once you understand what it does, it'll be easy. The typical scenerio for "git bisect" is: A bug was just discovered. You want to find out which rev introduced the bug. You know the bug exists in the latest rev, but ...

 
@Mast : Thanks for the edit in my answer. As a non-native English speaker, it's a good way to learn :)
 
@Josay I'm a non-native myself, so I understand the mistakes.
No problem, just adding my 2c to the whole thing.
Was a good answer by the way :-)
 
10:09 AM
0
Q: How to get the most date in a text?

jasoncalculate his stay in day's and then return the most person with his stayed days for example text file contain's john 01/15 02/15 jason 01/11 01/15 john 02/10 02/12 output expected ('john', 30 ) my code def most_stayed_person(text): x = 0 with open(text) as f: for line...

 
Wow. TFS just randomly decided to delete an entire folder from source control.
 
source roulette
3
 
Microsoft Roulette.
3
 
please, please, I only have so many stars
 
@DanPantry What does the log say?
 
10:20 AM
@Mast It just says I removed it (I didn't).
 
So you're working with a lying piece of software. Great.
Looks like you need source control tests to prevent source control regression.
Somebody should make a NuGet for that.
 
Imagine a NuGet package called TFS
 
@DanPantry if you've got some stars, let me tell a boxing joke... you'll never guess the punchline
3
 
0
Q: Couting items problems

LilfinnHello I want to write some code in python that accomplishes the following: Input and store number of items in a consignment. Use some validation to determine whether the parcels can be accepted or not and output all the reasons that the items that fail, fail. Currently have this code which meas...

 
10:35 AM
I'm being informed by another colleague that they can't release their system because my system has not tested against it (both systems are completely separate projects)
I'm a bit exasperated as to why I have to test my system against theirs instead of them having automated tests to make sure their system performs as expected
2
 
@CaptainObvious That's absolutely terrifying code.
 
@Mast Snakes are pretty scary.
 
...
 
And it isn't even Friday yet.
 
10:38 AM
No, but it's hump day, which is almost as good.
 
has no idea what hump day is, searches, ends at the Chive
People invent days for every day.
Why can't a day be just an another ordinary day.
 
Zak
@Mast There probably is a "Just another Ordinary Day" Day.
 
10:54 AM
0
Q: Matrix and Complex Numbers Parser

Kamil MahmoodI have been working on a simple calculator project in Java since November 2014 as hobby. Now I want to add complex number support and Matrices. I also wants to add support for symbolic computation in future. For this purpose I wrote a Literal class which is meant for to hold all types like Matrix...

 
If anyone sorts out how to golf (code) for a living, please ping me in chat. Asking for a friend... — Martin Büttner ♦ yesterday
You joined the wrong site ^^
Code Review is actually useful and a necessary skill for the average developer.
 
0
Q: Need someone to check my code

userunknownImportant: I am writing it here because I am under the impression I can get some code review and suggestions to improve my code, If there is some problem or this is not the right place, please don't down vote it, just let me know the right place to ask it. I need advice in improving my code as I...

0
Q: Just started learning OO PHP, am I doing it right?

Jeroen BellemansI've just started with the basics of OOP. At first it looked complicated, but once I just started with it, it seemed so easy. That's why I'm unsure if I'm doing this right. I'm creating a system to track actions: This is the Timer class: class Timer { private $_db; public $user_id; ...

 
So every day there's a heartbeat email sent to the on call phone - I'm on call today
Haven't received the heartbeat email
 
@CaptainObvious CBL
 
Turns out external e-mails are currently stuck in a queue of ~30000 or so e-mails
@Phrancis did your coworker have anything to do with this?
 
11:07 AM
@DanPantry Heartbeat e-mail, is that like a WDI?
 
@Mast no idea what WDI is, but essentially it's just an e-mail sent to the work phone every day at 11am telling us that the offices aren't on fire, etc
 
A watchdog timer (sometimes called a computer operating properly or COP timer, or simply a watchdog) is an electronic timer that is used to detect and recover from computer malfunctions. During normal operation, the computer regularly restarts the watchdog timer to prevent it from elapsing, or "timing out". If, due to a hardware fault or program error, the computer fails to restart the watchdog, the timer will elapse and generate a timeout signal. The timeout signal is used to initiate corrective action or actions. The corrective actions typically include placing the computer system in a safe state...
 
@Mast No, its just a cronjob that runs at 11am and checks services are up.
 
So not getting the e-mail means stuff is on fire?
Sounds like your ordinary day just got less ordinary.
 
Not literally on fire but yes
Not getting that e-mail means "the business is not workign any more"
or "your email is stuck in a queue of 30000 emails"
 
11:18 AM
0
Q: Printing letters in order like a pyramid, Needs evaluation

RockybillyThere is this hackerrank question, where we need a rhombus of letters. As to my opinion it can be viewed as some fractal, or similar logic. Well I solved the question, but I am obviously disappointed with the code I come up with. Actually when I started writing I knew how I would end-up and I wa...

 
E-mail with username/password for live environment was just sent around the office ffs
 
Monking
 
monking
 
I passed my Physics course :o
 
@skiwi Congrats.
 
11:27 AM
0
Q: What is the point of returning a promise and its result?

ElfayerI found the following code in a style guide for AngularJS : (Reference) activate(); function activate() { return getAvengers().then(function() { logger.info('Activated Avengers View'); }); } function getAvengers() { return dataservice.getAvengers() .then(function(data) { vm...

 
@DanPantry By one of the DBA's I presume?
 
Estimated to get between 4.5 and 5.5 for the final exam, got a 6.8 o.o
@Mast Thanks
 
For the non-Dutch among us, it goes on a scale from 1 to 10 and you need a 5.5 to pass.
 
@Mast which is best 1 or 10 ?
 
10 is best
 
11:36 AM
ok, so its different to germany. Here 1 is best and 6 is worst
 
Yea. There are a lot of different systems in use.
 
@CaptainObvious how to bastardise promises: a guide by the original author of that code (not OP)
 
Consider move your question to codereview.stackexchange.comkosmos 27 secs ago
 
0
Q: reformatting string to two string values in javascript

najibI have the following code that converts a string that looks like : aaa-bbb|ccc-ddd|eee-fff to two strings that look like aaa|ccc|eeeand bbb|ddd|fff var id = "HEL-CAS|MAD-STO|XXX-YYY" var splittedId = id.split('|'); var from = "", to = ""; $(splittedId).each(funct...

 
@CaptainObvious cross-posted from SO
 
11:55 AM
Can we nuke this already?
I linked my entire repository with this question. I can not link all my files to this question any other way and I want help improving my coding skills not specific snippet of my code. — userunknown 41 mins ago
 
1
Q: Code structure feedback

przemoo83I'm a beginner in Javascript and I want to improve my skills. I decided to write a simple application that adds a GUI to CanvasRenderingContext2D. I have just barely started and there are not many functionalities yet. I wonder however whehter this is a proper way to write OOP in javascript? Will ...

 
12:26 PM
0
Q: Manual instantiations of common typeclasses for a machine word data type

WCharginI've written a data type to represent a word in the memory of a MIX computer. A MIX word has a sign bit and five six-bit bytes. So I created a data type and provided instances for all the common numeric typeclasses (that I could think of). Some questions that came to mind: A lot of my instanti...

 
Monking
 
12:45 PM
hello @Vogel612
 
Greetings, Programs.
 
hrngh... system hogging 1.2 Gigs of mem and somehow only 4 of my 8 are actually used...
sod it, I'm running memtest over this...
 
1:07 PM
@CaptainObvious Just started writing CR titles, am I doing it right?
 
0
Q: I have an issue with my java code which is failing at opening an https connection and writing to it

Sandeep SuthariI have an issue with my following java code which is failing at opening an https connection and writing to it.Its for sending a push notification to an IOS app on my mobile using Apple's APNS service. Following is the java code : public class APNSHttpDriver { private static final Proxy pro...

 
Constructors that fire off HTTP requests suck.
 
1:37 PM
@CaptainObvious Vote to close, non-working code.
 
0
Q: Parsing URL query and appending it at end of the other URL?

BigSackHow do I optimize this code and make it error proof? This code is quite slow. How can I improve it? function parse_me ($ from, & $ to) { // $ To = array (); $ From = urldecode ($ from); $ From = urldecode ($ from); foreach (explode ( '&', $ from) as $ part) { ...

0
Q: What is logic behind this code for calculating ratio and max height for view for parallax?

Jeste double ratio = ((double) mImageView.getDrawable().getIntrinsicWidth()) / ((double) mImageView.getWidth()); mDrawableMaxHeight = (int) ((mImageView.getDrawable().getIntrinsicHeight() / ratio) * (zoomRatio > 1 ? zoomRatio : 1)); Source: https://github.com/Gnod/ParallaxListView

 
Zak
@nhgrif I think that about sums it up:
@Monoandale: "I just give away everything I know, am I not losing precious professional capital?" And yet, you're asking people on Stack Exchange to share their professional capital with you? Take a lesson from this experience: Helping others only enhances you, it doesn't in any way take anything away from you. — T.J. Crowder 4 hours ago
oh yeah, and that one:
You weren't ensuring things were documented before deciding to leave? — user2338816 8 hours ago
 
2:01 PM
@Zak lol documentation
 
Monking
 
-1
Q: Javascript loop to decrement float

userThis is a for-loop which runs once for each step with i>1 and maybe for 0 <= i <= 1. var i , prob_ = 3.5; for ( i = prob_; i >= 0; i -= 1 ) { if ( i > 1 || withProbability(i) ) { doSomething(); } } with function withProbability(chance) { return Math.random() < chance; }...

 
Zak
If anybody feels generous:
0
A: Failed to negotiate salary properly; I have to quit, but I don't want to cheat the employer

Zak My first week on the job, they literally said I was the best person they've ever had in this position and I did more my first week than the previous crew (of 4) did in a year. If they literally told you that you were more productive than 4 employees put together, then negotiate for a (he...

 
2:18 PM
0
Q: How should i mention the licence of my code?

Hello_worldWhen posting code to be reviewed (for instance code that already has been pushed on a github repo), how should I mention the licence of the code ? I definately can't put the licence notice in the code snippet as it is enormous. Is the following a correct way of stating this fact ? Please ...

 
@Phrancis: but it is working correctly, right? — user 1 min ago
wat
 
If you want someone to review your code and give you optimization tips, you will probably have better luck posting it on Stack Exchange Code Review. — twernt 38 secs ago
 
-1
Q: Turn-Based Text-Fighter: Weird Indent Error

Dmitri ValentineI keep getting this error: File "game.py", line 90 if Marco.hp > 0: ^ IndentationError: expected an indented block If I remove that line, it goes to the next set of if's and says there's an error there as well. This is my code: ### Fighter V2 import random ### Fighter Definitions c...

 
@CaptainObvious lol, the else clause above the line that throws the error is empty
 
@EthanBierlein Probably worth mentioning in a comment?
 
2:33 PM
I guess. It figured it just might be better for it to be answered on SO.
 
@Phrancis the code works
 
Welp, nevermind. OP deleted the post.
 
@Pimgd I retracted my VTC
 
it's still a bad question tho because doSomething()
I am reminded of gemcraft
a tower defense game
 
Zak
@Pimgd Gemcraft is awesome ^^
 
2:36 PM
a certain color gems there do "links", in the form of "x% to do hit up to y targets"
if x gets up to 100, it does this:
"x% chance to hit up to y+1 targets"
and 100% chance to hit up to y targets
But if you were to implement it, don't do it like this
first roll the dice and then just see whether you should provide max chain = 3 or max chain = 4
... but I can't say that because doSomething()
maybe it's not something mathematical
 
I'm voting to close this question as off-topic because it belongs on code review. — Claudiu 19 secs ago
 
Just got an email about doing an extra year of studies in Finland which will leave you with a Finnish bachelors in Engineering. Tuition free.
Sounds rather awesome
> JAMK offers, for example, the following courses for ITPro students to choose from:
Game Programming, ASP.NET Programming, Android Programming, Windows Phone Programming, Cisco Networking,
Software Business, International Skills and Language studies: Finnish, English, Swedish etc.
Good god, why are their words so freaking long
> Jyväskylän ammattikorkeakoulu on vetovoimainen ja kansainvälinen korkeakoulu.
 
0
Q: How to create an item in python for dynamodb

BigBI have no clue how to create new items using python code, i have 5mil records that i want to push to dynamodb but i want to specify different columns/item attributes in dynamodb.I dont know if the following code can be interpreted as a column of its own. if it doesnt how could i possibly go about...

 
@CaptainObvious off topic code explanation
Also his other question off topic broken code?
here it is
0
Q: Importing CSV data into DynamoDB using Python

BigBThis is my first time working with DynamoDB and I was wondering if what I did is a good way to extract data from a CSV document into DynamoDB. All input is appreciated. #!/usr/bin/env/python import boto import optparse import json from pprint import ppri dynamodb_conn = boto3.connect_dynamod...

 
@JeroenVannevel That's horrible
 
2:50 PM
is import ppri supposed to be import pprint? Also, you do from pprint but don't do anything with it - as is this is broken code. — Dannnno Feb 4 at 20:56
 
possible answer invalidation by user on question by user: codereview.stackexchange.com/posts/119508/revisions
 
wow chrome crashed when I pasted text into the edit field
that's a new one
 
0
Q: Python webpage parser

Gábor ErdősI have a working code, but it has a lot of flaws. The main project is to get a value from a website. I need to complete this action million of times, so i download the webpage returned from the class method, and parse it afterwards. In case the page is already downloaded i just open that one up....

0
Q: Java: Exception handling,Singleton Classes and best practices

dataEnthusiastContext: The below code will run a series of steps in an ETL workflow. I would like the code to be reviewed to avoid memory bottlenecks and null pointer exceptions etc. MainApp.java (This is the class containing the main method. This class invokes all the other methods in an order) package com....

 

« first day (1012 days earlier)      last day (3012 days later) »