« first day (1486 days earlier)      last day (2828 days later) » 

00:00
RELOAD! There are 3902 unanswered questions (91.2356% answered)
00:57
@Avi I see now. If nothing else, that's certainly a very unusual way to organize your code, getting close to obfuscated code territory. I'd generally recommend that you store that as a variable instead of placing the block there. Were I code reviewing it, I'd certainly reject it ^_^. However, your question can still be improved by providing both the input source code and the desired output code. That way there can be no ambiguity about what exactly it is you want the formatter to do and a potential answerer can feel that much more confident about their answer being useful. — Shepmaster 47 secs ago
@Mast Confirmed that installing libasound2-dev should get Khronos working on Ubuntu
01:50
This may be a good candidate for codereview.stackexchange.com - if your code is already passing tests and functional. — sheriffderek 5 secs ago
1
Q: Euler Method Harmonic Oscillator

Roshan ShresthaI have written very simple Python code to solve the simple harmonic oscillator using Euler method, but I am not sure if the program is correct or not. I would be very grateful if anyone can look at my code and suggest further improvements since I am very new to this programming thing. import mat...

02:17
in general, is it bad practice to prefer for(;;){ ... } over while(true){ ... } or while(1){ ... } in C?
03:03
0
Q: How to change a global variable in a function using parameters

EnriqueI am making a text adventure game and I am trying to make a function to change rooms. My rooms are made of booleans, so therefore when I change room, the room I exit becomes false, and the new one becomes true. Each room contains if statements so certain things will run depending on what room you...

03:27
0
Q: Collision manager

Tiago MarinhoI have a chunk of code that's working properly but it's way too complicated to read: addCollision (bodyA, bodyB) { var bodyC, i3; if (bodyA.collision === null && bodyB.collision === null) { bodyA.collision = this.collisions.length; bodyB.collision = bodyA.collision; ...

03:40
1
Q: functools.partial like style for class base function

nKandelIs there any better way to define the function at the class which shares most of the same parameter like functools.partial. from django.db import models class RegisterUserAction(models.Manager): def register_adhoc_created(self, **kwargs): return self.create(action_type="ADHOC_CREA...

04:39
0
Q: Snackdown Pre Elimination 2017 : Is It a Snake

Paras LCan anyone, who submitted solution of this problem(Is It a Snake) of SnackDown Pre Elimination in codechef, suggest any input whose output would not match to the question's output. Link to the problem above. https://www.codechef.com/SNCKPA17/problems/ISSNAKE It will be great if you could also c...

 
2 hours later…
06:14
0
Q: how to add static libs to my c++ application

sivanageswara raohow to add statics libs to my c++ app

06:55
0
Q: related to POS tag to combine two consecutive NNP

priyankaIn python we apply the POS tagger to find the Part of speech of each word. But I am facing the one problem is that, I want to combine the two or more 'NNP' in a sentence those are occur concurrently. For example, 'The prime minister' in that the prime is also 'NNP' and minister is also 'NNP'. But...

07:17
0
Q: time complexity of finding number of islands

codereviewanskquestions// 1 1 1 1 0 // 1 1 0 1 0 // 1 1 0 0 0 // 0 0 0 0 0 >> # of islands = 1 public int numIslands(char[][] grid) { int x = grid.length; if (x == 0) return 0; int y = grid[0].length; int count = 0; for (int i = 0; i < x; i++) { for (int j = 0; j < ...

0
Q: Area under a curve - Haskell

Josh DawsonThe following code is a solution to a Hackerrank problem in Haskell. Given a list of polynomial coeficients a and exponents b, find the area under the polynomial's curve from l to r using a step size of 0.001. Then to find the volume of the curve rotated around the x-axis. As a newbie to Haskell...

07:40
possible answer invalidation by Kamal Zidan on question by Kamal Zidan: codereview.stackexchange.com/posts/164418/revisions
08:01
Monking
I'm voting to close this question as off-topic because it is a review which should go to codereview.stackexchange.comHimBromBeere 46 secs ago
I'm voting to close this question as off-topic because this really belongs on CodeReview - not Stackoverflow ... — marc_s 38 secs ago
 
2 hours later…
09:42
0
Q: Project euler problem 3

Teo Logeanhello I'm actually practicing on project euler and for the problem 3 i wrote this : using System; using System.Linq; namespace ConsoleApplication22 { class Program { static void Main(string[] args) { int[] rep = new int[35]; int index = 0; long nb = 600851475143; int divider = 2; int ...

09:56
0
Q: Creating Docker network with REST API using python Django

Raghavendra lokineniThis solution is to create a docker network using Docker supported APIs. For achieving this I am using python and Django framework for providing RESTful APIs. cat network.py from django.http import JsonResponse import requests import json HEADERS = {"Content-Type" : "application/json", "Accept"...

10:31
You have logic spread among 9 click event handlers and you are thinking to refactor it? Post complete working code to code-review. — Sinatr 47 secs ago
10:53
@IlyaChikmarev Yes its looks okay also this is not the place for code review — Nirav D 16 secs ago
0
Q: C# Events in a tic tac toe game

Pr0gr4mm3ri was adviced to ask the same question here so here is my link to stackoverflow: https://stackoverflow.com/questions/44240022/c-sharp-events-in-a-tic-tac-toe-game and i copy my question as well ;) I am new in coding and atm trying to understand events what is an annoying stage but super importa...

And what exactly is your issue here ? Did you run this piece of code ? Does it work ? If you're asking for a review then you can try to ask this question on codereview.stackexchange.comMartin Verjans 54 secs ago
11:54
Monking
ohai :)
12:20
possible answer invalidation by Gameskiller01 on question by Gameskiller01: codereview.stackexchange.com/posts/164432/revisions
0
Q: Generate models for Oracle DB views using inspectdb

MrGrjI've been messing around with Django (1.11.1) at home for some time now, and I feel like it's one of the best out there in terms of ease of use. While I easily generated the models for all the tables I had in my Oracle DB using: python manage.py inspectdb > models.py I couldn't find a way to...

meh, someone has any ideas?
(I wouldn't mind some upvotes - maybe it'll get some more attention)
12:53
13:35
0
Q: RxSwift iOS Observable FIFO Queue Implementation in Swift 2

diegoperiniI am trying to develop an Observable queue that executes given Observable chains one at a time. The code will be used to encode videos on an iPhone and only one queue will be needed per launch, therefore it is declared as static. It seems to work but I am not sure I covered all the edge cases. B...

13:57
0
Q: Writing doIfNeeded methods in right way

DashAndRestI have faced this situation many times where I need to write methods as: doSomethingIfNeede() I am writing such methods for long time. Should I write like: if someObject.isSomethingNeededToDo { someObject.doSomething() } Or as mentioned, simply write: someObject.doSomethingIfNeeded() ...

does anyone know if datatables allow you to search the entire table even if the pagination is set to true ?
in Javascript
14:15
possible answer invalidation by BCdotWEB on question by RockStar: codereview.stackexchange.com/posts/164248/revisions
14:49
1
Q: php MVC RESTful API

Arslan.HI'm new to the whole thing of MVC pattern ,tho i have heard of it before i have never used it.So I'm confused with it all, I know that this code is not right probably but i need some guidance. This is my folder structure: ├── app │   ├── controllers │   │   └── user.php │   ├── core │   │   ├──...

This might be a better question on the code review section of stackoverflow. — Rasclatt 25 secs ago
15:21
0
Q: Write a programme to sum sequences 2, 4, 6, 8, 10 up to 30. Using registers A and B

SanjAbove are codes written up to the values of 10 which is great! But can you help me to write a code which can store values up to 30 using registers of A and B.

15:41
-1
Q: How to make this source code shorter

KonradI've made myself a task of writing a micro service and I'm a fan of short methods. I want to make the "handleRequest" method shorter. It kind'a describes the steps that need to be done in order to save a product. I hope the code is self descriptive. If not, I've failed in my task and I will expl...

0
Q: Othello Not working properlly

Sabrina ZhuI am a java beginner and we are suppose to create a java program for the game Othello using JPanel, JFrame, MouseListener and KeyListener. My Othello game is not working after I put the first piece, It does switch turn and show the corresponding possible moves, but it doesn't allow the player to...

possible answer invalidation by Jamal on question by Raghavendra lokineni: codereview.stackexchange.com/posts/164457/revisions
15:59
MMoonnkkiinngg
2
16:14
This question is better suited for Code Review than this site. — Gerry 16 secs ago
1
Q: Operator Precedence in AST

marstatoI need an algorithm that will turn an AST (abstract syntax tree) that was parsed without any respect to operator precedence into a tree that does respect operator precedence. I came up with one and am pretty confident that it does its job. But i'd like to have some opinions on it. Maybe there is...

16:33
this kind of question belongs on codereview.stackexchange.com — Atsch 19 secs ago
possible answer invalidation by Arrow on question by Arrow: codereview.stackexchange.com/posts/164264/revisions
posted on May 29, 2017 by CommitStrip

4
16:56
@CaptainObvious Is that question on-topic here?
17:12
Monking
17:25
0
Q: Endpoint Django REST Framework

crazy_secI created a new endpoint for an API (Django REST Framework) that generates a PDF from an HTML template. I follow the example from the plugin django-easy-pdf. It's working, but I would like to improve and to know what could be done in a better way. views.py class DemoPDFView(PDFTemplateView): ...

17:44
Milestone: AlphaGo (a Go playing computer) beat Ke Jie, the Nr. 1 worldwide Go player 3 - 0.
Since Go is a heck of lot more difficult for a computer to play than Chess, that's quite an accomplishment.
@CommitStrip Learn to use a decent search engine.
So, only 20 years from DeepBlue to AlphaGo. Not bad.
^^ that ...
18:07
0
Q: Monad Implementation in Typescript

ManninghamHaving been introduced to monads through Scala, I am trying to add the generalized design pattern to my toolkit by implementing it in a language I use more regularly (typescript). Though my tests pass, I worry that I am committing heresies and/or doing it wrong. Could anyone suggest improvement...

18:29
@syb0rg You fixed the segfault?
Please take this to Code Review. — Filburt 41 secs ago
yesterday, by Simon Forsberg
@rolfl @Vogel612 @EBrown @all-factorio-players I just uploaded my first official mod to Factorio
@rolfl @Vogel612 @EBrown @Kaz @all-factorio-players I just updated my mod to reduce the costs, so that it's much more useful early-/midgame.
0
Q: proper way to let consumers producer is done

noamgotI am writing a simple program with a producer and a few consumers: the producer pushes to a queue some integers, and the consumers pop elements from the queue and print them (order doesn't matter). The queue code can be found below (the implementation is based on this example). In addition to the...

1
Q: Customized Apache host files

user95626I'm using customized Apache host files for my Digitalocean websites. Please review the codes, whether it's following the good standards or not... and please mention if I'm missing something important.. Here is the host file template that I'm using for all my websites (On Ubuntu 16.04)- <Virtual...

-2
Q: Bugs in battleship game Python. How do I fix?

zalidaelI'm working on a 2-player battleship game in Python. There are a few problems with the following code that I was hoping you could help me out with: 1) The ships coordinates do not get reallocated after each successive game. So if you found where the ship was in the first game you could just keep...

Thanks to a certain Github issue I got
I'm voting to close this question as off-topic because this is better suited for Code Review SE! — Am_I_Helpful 43 secs ago
@Mast fixed
0
Q: Showing git status on Mac terminal bug

Greg DegruyOVERVIEW I want to display my current branch status (like * meaning modified) when in a git repo over the terminal like the below. BUT, it is always displaying the following even when I switch to a git repo. ᴾᴋᴹɴ iFeelNewsBot master wrong... ↪ When I open a new tab in my terminal it shows th...

18:56
@Mast Yeah, that was fixed a few days ago
19:32
Anyone want to play Webopoly?
Eh, never mind. I'm going outside while I can.
4
I'll post it on Code Review. New here, did not know there was such a web page. Tnks — Igor Braga 57 secs ago
0
Q: API Design of JavaScript Modules

r10yI have another small module I've written, and I would like some feedback on it with regards to the API I've defined, does it make sense, is it easy to follow, am I missing anything. I'm also interested in any feedback on how I've chosen to break things down, is it too much, not enough, have I mi...

0
Q: Better way to optimize this deciamal to binary array code?

Igor BragaBasicaly this program takes a decimal number from 1 to 10, that is the index of power of 2. And turns into an array with 2^n combinations. For example: If my decimal is 1, I'll have 2 arrays, [0] and [1], and if my decimal is 2, I'll have 4 combinations, [0 0]; [0 1]; [1 0]; [1 1]. And so on. I ...

20:12
@Hosch250 Outside??
20:43
@Jamal This title makes no sense:
0
Q: Let consumers producer is done

noamgotI am writing a simple program with a producer and a few consumers: the producer pushes to a queue some integers, and the consumers pop elements from the queue and print them (order doesn't matter). The queue code can be found below (the implementation is based on this example). In addition to th...

20:58
0
Q: Adding a user via a NodeJS API

TimI have created an API route for adding new users. To use this, users must provide pre-existing authentication, and it is all over HTTPS. These requires are named as the npm module is - restify for the API, fs for opening a database file and bcrypt for salting and hashing. const restify = ...

21:45
Why do parents always say to not do stuff like swim in the ocean/skydive/storm chase because you might die? You are going to die anyway...
5
I could die in a car accident, I could die from a heart attack, I could probably die from rolling over in bed.
@Hosch250 me as a parent just can say: because parents know best
I understand safety concerns, but I'm OK with anything you feel you can handle if you are reasonably safe about it.
0
Q: Big O complexity for this algorithm and its variants

CABI admit I have never been good at determining Big O complexity for algorithms. I have the following algorithm which builds the table shown below, as a sieve, and then determines which values are missing. There are also two optimized variants, shown below. def tps(N): K = N // 6 Kp = in...

22:04
0
Q: Python C++ Bindings

mutex36I wrote a very simple python interface for C++ that uses the Python 2.7 C API. At the moment it can: Manage reference counts/deal with "stolen" references (PyObject) Load python module Invoke a function (templated) and get result Convert between intrinsic python types and C++ types Notes I a...

22:57
0
Q: Implementing non-blocking Executor.map

maxI wanted to extend concurrent.futures.Executor to make the map method non-blocking. It seems to work fine, but I would be very interested in feedback about the general approach, implementation, and code quality. The entire thing is on Github, but below is all the important code: Usage example: ...

23:24
Monking
@SimonForsberg You should make me a RimWorld mod. ;)
Nevermind, the one I want exists. :D
@200_success It didn't make any sense at the start, either. I was thinking it meant to say "Let consumers know when producer is done," but I wasn't entirely sure.

« first day (1486 days earlier)      last day (2828 days later) »