« first day (1558 days earlier)      last day (2755 days later) » 

00:00
RELOAD! There are 4232 unanswered questions (90.8641% answered)
00:11
so you just want a code review? — Scary Wombat 52 secs ago
@EBrown You know him?
@EBrown Sure.
I think you know how to get my email.
Can't say I can do a lot, college is about to start.
00:33
0
Q: Shifting an array of four 32-bit integers

idlmn89for a little project of mine I have written two version for shifting an array consisting of four 32-bit unsigned integers in x86 assembly. I cannot really decide which is better in performance, style, etc.. The first doesn't check for shift-values greater/equal 128 because it is not needed. ...

@Hosch250 Mostly just need fresh eyes, @Phrancis and I have experimented with it for a while, but as I get closer to release I know I need to get new eyes on the subject.
@Hosch250 A little, not too bad of a style, really.
01:01
I fully templated emails in this system...holy crap.
0
Q: Simple memory game in JavaScript

Paul MihaliI am a JavaScript beginner and I want some help to improve my coding skill. I have my HTML, CSS and JavaScript below and I would like to know as much bad things I did as possible. window.onload = function () { // Fade in the body document.querySelector('body').style.opacity = 0; setTimeo...

01:25
possible answer invalidation by Sometowngeek on question by Sometowngeek: codereview.stackexchange.com/posts/172389/revisions
02:17
You should ask hereJohn Joe 56 secs ago
This question might be better suited at the code review stack exchangePaul T. just now
02:39
0
Q: Console Tic Tac Toe game

TopinFrassiI'm learning Python (I have a strong C# background) and it's also my first time building a Game. I feel like the design is pretty horrible, but I had a hard time figuring how to design my architecture around a board game. The game works to the best of my knowledge (I tested the cases that came t...

03:12
0
Q: Python indexing

Video retrievalI have 2 columns in the same data. One column for ID (several Ids are repeated) and the other column is about age (many ages are repeated). I want to create new columns for each. Let's say column 1: in which I regroup the same Ids then call/display their indices where they were in the OLD table. ...

03:46
0
Q: Passing a hex string to json_decode() in php

AKMorrisI had a code review and got told by the senior programmer that it was very bad programming practice to use the json_decode() function of php to determine if a string was not in JSON format. My argument was that the json_decode function has a fail case (returning NULL) and this exists for reasons...

04:22
If no errors are actually being encountered then this question should be posted to codereview.stackexchange.comNkosi 58 secs ago
04:33
Monking
0
Q: reading data from network stream

liv2hakI have a function to request an update from the server. I provide the query and also indicate the expected length of the response. public Byte[] GetUpdate(Byte[] query, int expLength) { var response = new Byte[expLength]; lock(Client) { Stream s = Cl...

0
Q: Finding all unique words in a continuous string

KartikSo I am trying to figure out how to find unique words in a continuous string without any breaks. I would appreciate any suggestions. I have been given this example in my coding interview, which I have already submitted. I needed to find all unique words in a string. For example, the string ilivea...

Monking
Monking
04:51
0
Q: Idris - Bowling scoring

theimowskiHaving read the great Type Driven Development in Idris book, I started fiddling with an implementation for a Bowling scoring system in Idris. My initial goal was to model the score with types and make illegal states unrepresentable, which I think I succeeded to do so. Following is the snippet sh...

05:23
In TDD (assume Python for simplicity), if I extract some functionality out of a function should I also extract (and potentially write more) tests to their own test functions/class/module?
For example I extracted this one-liner from the main function:
def reverse_dna_str(dna_str: str) -> str:
    """
    Reverse a DNA string, returning all uppercase letters.
    """
    return dna_str.strip().upper()[::-1]
The tests for the main function are going to fail either way if that small function doesn't work correctly
But having its own tests would make debugging easier, should it ever be needed
But also add more testing overhead
05:54
0
Q: Python web scrape: Craigslist Systems Jobs (titles and urls)

SkeerFollowing a tutorial located here: https://www.youtube.com/watch?v=1EFnX1UkXVU It's old, for Python 2.x and I'm learning version 3.x. So far I've ran into a few issues that I've been able to figure out via Google. However currently I'm getting an error: File "/usr/lib64/python3.5/site-package...

06:28
1
Q: Console Tic Tac Toe

TopinFrassiSo I started Python this week, and I never programmed a game before. Even though Tic Tac Toe is probably the simplest game ever, I had some challenges while coding the game rules. I split my project in 4 files : board.py, game.py, main.py, ui.py. I think my file content is self-explanatory enough...

07:01
Please post a code snippet here which contains the problem, and ask a more specific question. We're not code reviewers. — SBS 16 secs ago
07:13
Please, share your data. You don't need to share all of it, just two or three rows is enough. While you do that, here are some tips: First, don't put a async code inside a event handler, it makes little sense. Have a look at my answer here in Code Review, to see an easy alternative. Second: drop that AJAX call. I know you said you need it (for some reason), but you really should do that with a simple d3.json. — Gerardo Furtado 36 secs ago
07:29
@Phrancis TDD says you should test all functionality. If all tests still pass, TDD won't mind.
TDD doesn't care about broken code. It only cares about passing tests.
If you write 25 tests and all pass, you have proven thát functionality works. Nothing else.
Half the code can still be broken.
So if your refactoring doesn't break any of the existing tests, no new tests are required for TDD.
IIUC
@Mast That makes a lot of sense, in perspective. Thank you. I suppose new tests should be added when broken code/bugs/corner cases are found then, and not while refactoring
07:55
You don't need that, you can do all the filtering just using D3 and plain JS. Please, have a good look at my answer at Code Review, to see how you have to refactor your code. — Gerardo Furtado 5 secs ago
Kaz
Kaz
08:06
Monking @all
08:19
0
Q: How secure is Apache Tomcat out of the box?

gringogordoFirstly apologies as I don;t think this is the right place to ask this question but I'm not sure where is... I am looking to deploy a simple java REST api to do some basic database insertions. Essentially I work as a java programmer in an organisation that is largely Microsoft based. The core ...

0
Q: E-store automatic email send, to be run daily C#

J.DhaikThis is a fictionary email sending program for a e-store I've done for practice purposes. EmailSenderProgram is a program sending emails to customrs. Currently it sends two types of email, welcome and please come back email. It's supposed to run daily and write a debug log each day if it worked o...

@CaptainObvious no code no glory
assuming this is working code, your question might be better suited for codereview.stackexchange.comtobi303 55 secs ago
08:46
@CaptainObvious One more.
@Phrancis In true TDD, yes.
09:03
Your style would not pass my code review... — Tom Lord 47 secs ago
09:27
StackOverflow is for "making it work", you might want to try codereview.stackexchange.com (after you come up with a solution attempt). — C-Otto 58 secs ago
10:13
@George codereview.stackexchange.com/questions/171711/…, pro-tip, click on the profile, and check the other accounts of the user to get the cross post quickly ;) — Bhargav Rao ♦ 41 secs ago
10:26
0
Q: Picture not showing When create PDF

vaishu aniI am using javascript. Here is my code. var docDefinition = { content: [{ // you'll most often use dataURI images on the browser side // if no width/height/fit is provided, the original size will be used image: 'data:image/png;base64,iVBORw0KGgoAAAANS...

1
Q: Extension Method to append a list of parameters to existing Uri as query

BenAffleckIsBatmanIn Windows Universal, none of the builder classes for web requests are available, nor can I use System.Web. How would you optimize (shorten, perform) the extension method below, considering the following requirements: Sample: http://www.foo.com?bar=foo&foobar=bar Append a list of key/value p...

10:44
It's been a while. Hello :)
5
hey @DanPantry
Kaz
Kaz
\o/
\o/
10:55
\o/\o/·o··o·/o\/o\·o··o·\o/\o/
\\o²//
i'm rebasing my current work on top of a branch I iceboxed
it's painful
note to self, integrate early & often
2
Integrate or differentiate?
11:16
0
Q: Warning: mysqli_real_escape_string() expects parameter 1 to be mysqli, null given in C:\xampp\htdocs\amimo\includes\database.php on line 40

 tina<?php require_once("config.php"); class MySQLDatabase{ private $connection; function _constuct(){ $this->open_connection(); } public function open_connection(){ $this->connection = mysqli_connect(DB_SERVER,DB_USER,DB_PASS,DB_NAME); if(mysqli_connect_errno()){ di...

3
Q: C++ mathematical n-dimensional vector template using fold expressions

StefanI'm writing a template to unify a few mathematical vector types I was using. The goal is low overhead, constexpr where possible and generic utility functions built-in. Normal usage would be like this: typedef vector<float, 3> v3d_t; constexpr v3d_t testv1 { 1.1f, 1.2f, 1.3f }; constexpr v3d_t ...

11:30
0
Q: Injecting Dependencies from child class to parent class PHP

TiminoI am trying to get the correct way of doing dependency injection so is that a correct why to inject dependencies from child class to parent class ?? so later on can be used on child controllers ! class Dependency { } class ParentClass { protected $dependency; public function __cons...

-1
Q: Jquery Problem :eq() and :nth-child value on variables

Bob MoraneI recently posted a similar topic on stackoverflow, but I still have a problem with ": eq () and: nth-child () when I pass them in variables this way: $ ('# element: 'index +') ..., return index: -1 (do not work) and I do not know why .. $ ('# element'). eq (index) does not work either. Here is m...

@CaptainObvious broken code
11:45
0
Q: Rails - Scrapping website with rake tasks

BaigI am working on a task where I am supposed to scrap 5 websites and for this purpose I am using nokogiri gem, right now I have 5 different rake jobs which are working perfectly fine but I do not like the way it is done and I am trying to improve the code by removing the duplication portions. This...

@DanPantry Good to see you, I learned how to do browser-based Javascript all by myself while you were gone. It was wonderful and now I hate my life. :)
8
12:01
0
Q: Find frequency of combinations in large data set

Felix TorssellMy concern is performance of the code. It takes way longer than I would like. I would be willing to give up some memory for higher performance. I have JTable with serial numbers in column1 and options in column2. With every option the person has chosen on a new row. Each serial number can only...

0
Q: Informatics Training Site - no output file - Cabinet Shuffle

EmberWolf77Recently I have been solving some of the problems on the Australian Informatics Training site in C++, and I have gotten the error "No Output File" as shown when submitting a solution to Cabinet Shuffle, in the AIO 2012 Intermediate: Here is my code: #include <bits/stdc++.h> using namespace std...

Post the code in CodeReview for more insights. — voidpro 24 secs ago
"Is there a better approach?" questions are not a good fit for Stack Overflow. You're better off writing some code yourself and posting it to Code Review. — Michael 36 secs ago
12:20
0
Q: Singly linked list exercise in C

Richard NeumannBeing completely new to the world of C, I started off with the excercise of building a singly linked list of integers: /* Single linked list test */ #include <stdlib.h> #include <stdio.h> typedef struct ListElement { int value; struct ListElement *next; } ListElement; void...

0
Q: Mapping from string "aa=bb" to Dictionary<string, string>

Drag and DropI am converting a input like : aa=bb Fruit1=Potato Fruite2=Banana Into a Dictionary, using this code. string tmp = "\r\naa=bb\r\nFruit1=Potato\r\nFruite2=Banana"; Dictionary<string, string> tempValueList = new Dictionary<string, string>(); var lines = tmp.Split(new[] { "\r\n", "\n" }, String...

12:52
0
Q: Trying to get more performance on a text classification task

RobertRight now I am working on a text classification( trying to predict if a twitter response is even human or bot generated). The task is actually a closed kaggle competition, and more details as well as datasets that were used could pe found here:enter link description here My problem is that when ...

13:07
0
Q: Fastest sollution finding unreferenced documents

Nathaël NoguèsI have a database containing at least 2 collections datagroup and data. Each data document have a reference to the _id of one of the datagroup documents. I want to find all datagroup documents that have no data pointing to, the fastest as possible. For this, I use a javascript mongo shell scrip...

13:21
Greetings, Programs.
@chqrlie counter productive? Compile both. You probably did not code for the car or aviation industry :). Having more than one makes code review a real challenge (and you want to be paid :)) — PeterJ 19 secs ago
Member names shouldn't have underscores, that will bite you with a compile error if/when you start using the Implements keyword. Parameters are implicitly passed ByRef, and Option Base 1 is confusing since your array is explicily sized with a lower bound of 0. The comments are redundant or confusing, remove them. This would be a better fit for Code Review, if the code was solving a clearer problem. It's hard to objectively tell what could be done better, in throw-away exploratory/experimental code that doesn't really solve any problem. "What's the right way" of doing what exactly? — Mat's Mug just now
@EBrown Kek
@DanPantry How've you been? Doing well with Riot?
Yeah it's been okay. I've been focusing a lot on functional progrmaming (like Haskell) recently
Preparing to head to LA again on saturday
and you? @EBrown
Was the Lua zombie killed @Peilonrayz?
The one about neural networks
IIRC that had like 120 upvotes
13:36
@DanPantry Not bad, just started a new job as a Technical Associate / Software Engineer / SysAdmin in Toledo (Ohio, US). It's going well - trying to get some modernization in place since we're in the mid 2000's as far as tech and structure.
@DanPantry Jeez, weren't you just here a short while ago?
@EBrown Yeah I was in the states around February time
@EBrown Congrats
@DanPantry I need to (at some point) get into Haskell. No time to do so at the moment. :/
It's a mind bender, but functional programming with types actually makes javascript a lot nicer (see: typescript or flowtype)
@DanPantry I thought so - at least they're keeping you busy. :)
-1
Q: maven apache java code source

layesimI want to add a classe of kernel k-means algorithm to an app code source but i don't know how because i'm not good in java language can you help me?? ps: I have the code source

13:37
@DanPantry Thanks, it's been a weird ride but I'm not disappointed at the moment. :)
Rust uses a really rigid type system which is a bit similar to functional languages and now that I've been bitten by it once I really don't want to get away from it
writing null is practically a sin for me now
@DanPantry Yeah, when I started learning F# the functional stuff was a PITA, but now I actually understand it and don't mind doing it.
We're using VB.NET at work (which Mat's Mug likes to give me a lot of crap for) and I'm not disappointed with it, I've already improved several processes since I've been here, and I've only been here three months. (Actually, last Tuesday was my 3rd month.)
> (which Mat's Mug likes to give me a lot of crap for)
heh
> Actually, last Tuesday was my 3rd month
Wow, I've been away for a while
A year ago yesterday I signed the contract for Riot. It's nearly been a year since I started working here.
@DanPantry Time flies, man.
Times flies like an arrow.
Fruit flies like banana.
13:40
It definitely hasn't felt like 3 months for me - I've done so much stuff here already it feels like I've been here a lot longer already.
We're a two-man IT shop, for a company of ~50-100 people.
@DanPantry Long time no see!
o/ @Mast
@DanPantry I still use a lot of null / Nothing.
@CaptainObvious BURN
@EBrown Option/Maybe types should be used instead IMO and I wish every language I used used them.
13:44
@CaptainObvious Why does that have a favourite?
Tempted to learn PureScript (JavaScript meets Haskell) just so I can use it
I see that sometimes with LQ questions
I think authors favourite it
@EBrown Somebody must've been laughing his ass off.
@DanPantry Yeah, we don't have those in C#/VB.NET really, which is disappointing but not unforeseen.
There's a proposal for C# to have non-nullable reference types
Which is close enough, I guess
Yeah, I hate that particular proposal.
13:45
lol
@DanPantry Why's that so good?
@Mast the reason I like Option and it's related cousin Either types is that it forces you to deal with both cases
ie something exists or it doesn't
and the compiler will check that you've done that
@DanPantry So does a NullReferenceException. ;)
when everything is implicitly null you have to check everything is not null at runtime.
Option/Either mean you can determine if both cases are handled at compile time
plus it's so easy for null to 'slip' into a stack. there's no way for you to say 'hey, this thing here? this can NEVER (or should never) be null'
@DanPantry Aye, I just don't want that proposal to go through for C# because that changes the language entirely.
Adding a keyword for non-null reference types doesn't need to change the language
You could still have nullable reference types be the default and have an extra keyword or symbol that said that something was not allowed to be null
13:49
@DanPantry I thought the proposal was to change the class specification to be non-nullable, such that you would have to add a keyword / thing for nullable reference types.
@EBrown I mean, the purist in me would like that to be the case
but the pragmatist in me says nope that would never happen
it would have to be a decades long transition and it would completely break backwards compatibility, which is a big reason why you would choose to use .NET anyways
I don't know of many breaking changes that have been made in the core .NET framework
I personally like to stick with the current style, and add a keyword (I think I recommended solidclass that would basically do that.
I don't think it should (only?) be at the class level tbh
the keyword should be able to be placed on parameters and field definitions
@DanPantry I don't know if there were a lot as far as C# goes, because it uses the same language. I know .NET core made a lot of breaking changes, but the C# spec is the same.
@DanPantry I would prefer the -style syntax: public string! SomeNonNullableString { get; set; }
Yeah that would be nice @ swift syntax
13:51
That way I can decide what is and isn't nullable.
I think I would still prefer a fully fledged Option type
but it would require a lot of work for that to not infer a runtime cost
(whereas string! could be compiler-only)
Because I've had a desire for certain properties to be non-nullable in my code.
in Rust, Option is basically a tagged union and is compiler only too (at runtime, None paths are just 1(?) byte and Some types are 1+N bytes), but it was designed to be built like that from the ground up
Yeah, I don't think I like that proposal all that much, I don't think it makes sense for the keyword to be at the class level
13:54
0
Q: Some kind of multiple singleton

TchaokkoI need several singleton, I wanted them to be easily accessible via auto-complete, so I made this thing. package com.example.lr35337n.textwatchergenerique; import android.text.Editable; import android.text.SpanWatcher; import android.text.Spannable; import android.text.TextWatcher; public clas...

0
Q: My code eats up half of inputed data and returns intended output partially

Fahim AnwarFirst of all, I'm new to programming/coding so I hope that you will see my question as a learner trying to understand programming. I have to write a program that will remove all duplicates from a sequence of integers and print the list of unique integers occurring in the input sequence, alo...

@DanPantry It depends, I could go for both situations, allow Thing! to specify non-nullable reference, and allow some keyword at the class-level to specify that all properties in the class are non-nullable, with the option to make them nullable.
that display picture though, @ThomasWard
Hey Matthew, I think questions like this are better fit on codereview.stackexchange.comKuba 53 secs ago
@DanPantry you should see the photoshopped of my latest picture I haven't uploaded, it's got me as an evil chaos mage warlord, dark lightning erupting from my hands everywhere, burning posts and spammers, and my evil gaze projecting godly darkness and chaos to all who see me.
this profile picture here, that was a POS five-seconds-in-GIMP equivalent.
13:57
lol
the one i just mentioned? I can't upload it here because of rules ;P
maybe the CM team will give me an exception :)
(just kidding xD)
@DanPantry syb0rg kill that one a year ago, I however don't understand like any of their answer :/
@DanPantry Except if it's a non-nullable type, but yea.
@DanPantry It was answered, but it turns out the question may have been off-topic. OP wanted to know whether his code worked or not.
So one of our highest scoring questions turned out to be one of the most dubious.
14:19
Boo
@syb0rg Mmmhhh... I think you're answer is a little off-topic, but I'll accept it anyway — DavideChicco.it Jul 29 '16 at 17:02
14:35
^^
14:57
If the code is working and you're looking for help improving the coding style, CodeReview.stackexchange.com is the appropriate place. — Barmar 28 secs ago
15:28
0
Q: An API that makes a call to elasticsearch and return the packaged geojson version to the user

saviour123I have designed an api that basically takes a response from elasticsearch and process and serves out as a geojson. The code works, but wondering if there is a better way to handle the promise. I would appreciate some reviews const es = require('elasticsearch'); const client = new es.Client({ ho...

There is a code review stack exchange, and this is not it. — bcsb1001 56 secs ago
I'm voting to close this question as off-topic because it belongs on the CodeReview SE — Aaron 38 secs ago
0
Q: Blackjack interview

Alexander Petrovi got an assignemt for interview to write a small BlackJack program. After submitting the solution I recieved an answer that "the solution was functionaly OK, but was way below their standards of quality code especialy coming from a person with significant experience(I have 15 years experience)"....

15:59
1
Q: Improving code style with loop python

Harshvardhan MattaI am new to python language. I was playing with nested loops. All I am trying to do in my code is to get a value closer or equal to 1.50mm (which is a liquid drop pixel value changed to mm). In program: Starting steps: 1800, which will form a drop of particular volume from my machine epmotion. I...

possible answer invalidation by J.Dhaik on question by J.Dhaik: codereview.stackexchange.com/posts/172433/revisions
0
Q: Python Prime_Numbers Algorihtms TypeError()

Ryth RaTypeError: range() integer end argument expected, got float. If I use Integer It will not include 3 as Prime Number...I do not want to add 3 same like 1... Code--> import math def is_prime(n): if n==1: return False if n == 2: return True if n > 2 and n%2 == 0:...

16:28
Sending build context to Docker daemon  131.1kB
Error response from daemon: mkdir /var/lib/docker/tmp/docker-builder256898188: no space left on device
O.O
16:45
Can anyone help me understand this? msdn.microsoft.com/en-us/library/…
@CaptainObvious You write like you have 5 months of experience.
@Hosch250 That's...particularly confusing.
@Peilonrayz Shoot, I was aiming for it to be well understood by everyone
0
Q: Practicing Java servlets, MySQL and JSON

coderoddeIntroduction This is my attempt at a simplistic web application just for the sake of practice. I have three main servlets: CreateDatabaseController: responsible for creating the database and the table in MySQL, AddPersonController: responsible for adding a new person to the table. ShowPersonCo...

17:07
@syb0rg I'm just not very bright, ):
@Peilonrayz Nah, ML is a complex subject
@Peilonrayz If you have time, I'd recommend reading the book I linked in my answer: neuralnetworksanddeeplearning.com/chap1.html
Super clear, and I think it will pertain well to you since Python is often used for this kinda thing
Probably a mix of both then, however, if I don't get something straight away it's hard to fix my misunderstanding... :/
Thanks for the recommendation, I may look into it if I start doing ML, :)
17:22
0
Q: How To Add if condition for return True or False ?

John KelerThis Code Gives Prime_Numbers from any range...If I replace return then I will Mess Up the Algorithm . I WANT TO PRINT ONLY THE NUMBERS WHICH RETURN TRUE... import math def is_prime(n): if type(n) is not int or n <= 0: return None if n==1: return False if n == 2: ...

Helloooo..... ? — Alexander Petrov 16 mins ago
Excuse you?
"The ace card can have 2 possible values 1 and 11, you didn't account for that at all.! The assignment has defined the ACE as 11 it was by definition. So this one is good. It should be like that. — Alexander Petrov 1 hour ago
^^ That is why the plain-English part of a question matters.
This probably belongs in Code Review Stack ExchangeKevin 51 secs ago
> Dear dotnet bot, > > Given your solid experience in software developement, we invite you LOL
heh
17:42
0
Q: incorporate :eq() and :nth-child() in variables

Bob MoraneThis time, its works...but the code is still upgradeable... I would like to incorporate nth-child into a variable, and retrieve its value, in the same way that I did with :eq() but without success. is it possible ? Should you use the index() or val() method for this ? If anyone to yet another so...

0
Q: Using a DTO to prevent an API consumer from POSTing an entity with an id

kylemartLet's say I have the following model: public class Product { public string Id { get; set; } public string Name { get; set; } public string Category { get; set; } public decimal Price { get; set; } } Now, I'd really like to allow people to add and view my products. So, I...

0
Q: Convert hex color string to SDL Color

Michal PrzybylowiczI am writing a small game and as a part of it I load json config with colors definitions in a format of strings #00ff00. Then I am using this function to convert these strings to SDL Color structure. I am assuming that all color strings are a valid hex colors (between 6-7 chars, depending if # (...

@TopinFrassi No problem, I think that OP needs a swift shot of reality. I (sadly) don't mind being the person to tell them that their code sucks, and they need to absorb all the information they can.
You also had a good answer, and even though I'm opposed to the question existing I still +1'd it.
Yeah I'm starting to wonder if that question really should exist. The user doesn't really seem to want a review, but seems to want to show his code was fine, which just isn't the case.
That's what I thought too.
And to be honest, it's terrible, I would have thrown it away without even considering responding to OP unless required. I'm all for helping people, but only if they want help. OP doesn't seem to.
@AlexanderPetrov First, comments are for "getting additional information or suggesting improvements", none of which yours are addressing (at best, they're half-baked attempts to validate and defend a very poor selection of code); second, you really should be more humble, you are the one asking why this code was rejected from an interview, it's not wise to take every person's attempt at explaining that and point out "flaws" (which, let's be honest, they're not really flaws). If this is a pride thing, just understand that all programmers suck at some point, this is where we get better. — EBrown 5 secs ago
I'm done.
Thanks @200_success. I thought about a custom flag (and I should have done that).
18:12
2
Q: A* make it faster (4 - 6 FPS)

durisvk10I am having a game with a lot of GameBodyObjects and some of them are moving, some of them are not. When I calculate A* for the moving objects it gets really slow when all the objects are present. If there is just a Player then the A* is fast. Here is my Game update loop: public Game update(fl...

You're welcome. There were already plenty of comments flagged in that question and answers.
@EBrown I flagged it myself :)
@200_success I can believe it, I should have flagged rather than continued the discussion.
@TopinFrassi Good work. :)
That question has a poor title, seems to focus too much on being rejected and the comments of OP are mostly argumentative. This does not look like a Code Review, it's more of an : I want to prove to someone why my code should not be rejected as much you think.
@Marc-Andre That's why I DV'd and CV'd. That and the severe lack of an explanation of this particular implementation of Black-Jack. Why is A always an 11, for example?
18:21
I downvoted, but is it close-cote worthy I don't know.
I'll let others decide
18:41
I am asking this question because it popped up during a code review I requested here. codereview.stackexchange.com/questions/172469/… I kind of have feeling that it is a bit Single Responsibility Principle taken into extremeties to be honest. — Alexander Petrov 59 secs ago
0
Q: Brute-force-like solution to Project Euler Problem 5

EJoshuaSProject Euler problem #5 is the following: 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20? First, a disclaimer: yes, I know that ...

0
Q: Java : Address Maper

Shaun What i am doing is getting data from an API. The problem is that data is not in a proper format. For example 111 drive, Toronto, ON M1B 2A6, Canada 111 drive, Toronto, ON M1B 111 drive, Toronto, M1B 2P6 I am getting the result in this formt: Country: Canada Province: ON Postal Code: M1B | M1...

0
Q: Buffered queue for logging

t3chb0tI'd like to use a buffered queue for logging via a WebAPI that handles multiple applications. This helper should reduce the blocking that occures due to logging. I've been experimenting with a producer/consumer pattern and the BufferedProcessor<T> is what I've come up with. Internally it uses th...

0
Q: Poker hand evaluator using numpy

user2341726I'm trying to write a poker hand evaluator using numpy, because I find pure python is pretty slow. def eval_(*args): if len(args) == 5: hand = np.asarray([*args], dtype=np.int8) else: hand = np.asarray(args[0], dtype=np.int8) ranks = np.bincount(hand // 4, minlengt...

19:44
@TopinFrassi @200_success (since you were involved in cleaning the first batch of comments) Is this edit by OP appropriate? I was going to roll it back, but I'm assuming that it's going to escalate the situation.
I just did roll it back.
Probably better that I did it rather than you.
Thanks, I'm trying not to get directly involved, but it seemed an inappropriate edit. Not sure if it's worth explaining to OP or not as to why it's inappropriate?
@200_success I agree, it would have been easy enough but that could have looked like a vendetta against OP (not the case, but it could have been seen that way).
I've rolled back Rev 7 → 6. On Code Review, we try to keep questions pure, without injecting your own conclusions into the question. — 200_success ♦ 12 secs ago
20:05
possible answer invalidation by J.Dhaik on question by J.Dhaik: codereview.stackexchange.com/posts/172433/revisions
20:28
0
Q: ASP.NET Web Forms Singleton

Dan CsharpsterIs this way acceptable to do a C# singleton for use in ASP.NET webforms legacy app: public class FileSingleton { private static readonly Lazy<FileSingleton> lazy = new Lazy<FileSingleton>(() => new FileSingleton( new FileRepository())); public static FileRepository Repository {...

-1
Q: Tic-Tac-Toe code error in Python

user146279I'm attempting to make a Tic-Tac-Toe in Python and this is what I have so far: (It's intended to repeatedly ask you where you want to go and fill in the square) import os def amend(listTo, positionTo, newValue): listTo.pop(positionTo) listTo.insert(positionTo, newValue) ### --- Code ...

20:50
this might go better on codereview if there are no errors — depperm 1 min ago
@depperm codereview? — Jake 41 secs ago
Can you whittle down your code to only relevant sections? Also, this may be a better question for codereview.stackexchange.comWookieCoder 49 secs ago
21:15
I'm not entirely sure what you are asking. If you are asking whether it is possible, then you have clearly shown that the answer is yes. If you're asking how to improve it, you are better off by going to Code Review. — Joe C 56 secs ago
Lol so it turns out there was an error after all, but I fixed it and edited the post. Ill check out codereview, thanks depperm. And to @Alexander, I'm not sure how clearing a dictionary would be relevant in this situation. — Jake 51 secs ago
21:31
0
Q: Simple/pythonic way to delete and edit dicts while iterating inside of multilayered dicts

JakeSo I have a multilayered dictionary that contains information about classes. I am using this to code an automatic schedule builder and I wanted to group together class sections that occur at the same time to lower the amount of possible schedules, I could only find documentation on how to delete ...

This looks like your code is being killed by the server for being too slow. You could try submitting your find_uniq function to codereview.stackexchange.com for help with increasing its speed. — James Elderfield 53 secs ago
21:59
0
Q: Android Code Principles

Alban GashiI've been working on a project to add it to my github account as part of my portfolio. Since I don't know any Android Senior, I thought you guys can help me in telling me if I did any good or is my code just plain bad. The link to the repository: https://github.com/banxxi/Quran-Station Any sugg...

22:13
0
Q: Why is my sprite graphing algorithm sometimes leaving gaps while graphing?

www139My friends and I are working on a game. However, I've run into difficulty with the star sprite management. Sometimes, there are gaps (areas where sprites should be graphed but instead are not). I have included the entire program as a code snippet but below are also code blocks which are likely di...

22:30
@ThomasWard Finally had time to set my Pi up at my new apartment.
22:45
0
Q: Linked list node implementation with maximum code reuse

Matthew WahnerCurrently as an exercise to practicing SOLID principles and basic data structures, I am trying to implement linked list type structures with as much code reuse as possible. Currently, I have: package structures.linked; public class SingleNode<T> { private T data; private SingleNode<T> ...

22:59
@Hosch250 You have an email incoming shortly regarding my secret project thing.
23:16
If there are no specific problems that you are aware of, it would be more appropriate to post this to the Code Review Stack Exchange. — David Scarlett 29 secs ago
Ok, I will move it there. I didn't know about Code Review site. — YotKay 36 secs ago

« first day (1558 days earlier)      last day (2755 days later) »