« first day (1843 days earlier)      last day (2166 days later) » 

12:00 AM
RELOAD! There are 5304 unanswered questions (90.0047% answered)
'Good practice' is subjective and too broad for SO. As it was stated, this may be a question for codereview.stackexchange.com but at this point there's nothing to review. The question doesn't make sense without the context. This may be good or bad practice, depending on what you're trying to achieve. There may be a need for other selectors rather than element id, so it's seems more like a bad one. but consider these elements are going to be used multiple times in my app - it doesn't matter how often they used but how often the code where they are used runs. — estus 11 secs ago
 
12:49 AM
Hmmm, I'll try that. Didn't know about code review stack exchange. They open a exchange for everything now! XD — superjugy 8 secs ago
 
 
1 hour later…
2:08 AM
0
Q: Recursive Quadtree implementation in C++

m-byteI've been working on a recursive quadtree in C++. How can I improve my code? My primary goals are improving the performance/speed, as well as practice. QuadTree.h #pragma once #include <vector> #include <algorithm> #include <functional> struct AABB { double left, top, right, bottom; ...

 
2:25 AM
0
Q: Python automate the boring stuff collatz exercise

user3342947I'm looking for some feedback on my code for the collatz function exercise in the python book automate the boring stuff. It works, but doesn't feel very elegant to me, is there a better way to approach it? I'm trying to avoid just looking at someone else's solution so general advice would be pref...

 
 
2 hours later…
4:06 AM
0
Q: Would like to add Arrays to program in order to keep track of variables in Coin Toss program

Geoff ZorefI am working on a project from the textbook Starting out with Java by Tony Gaddis. The program instructions are to create a class to simulate coin toss. The class should then be demonstrated in a Main Class in which three instances of the Coin Class, quarter, dime and nickel, and when the coins a...

 
 
1 hour later…
5:20 AM
Hello @Mast
The edits made within the body of the question are correct, that is why I accepted the edit; but you are right, the edit should be rejected because of the title edit. More attention later :) Have a nice day
 
@BillalBEGUERADJ Since the code is changed as well, although in a small way, shouldn't the edit be flat out rejected? Code shouldn't be altered by anyone but the OP after all.
 
0
Q: Dijkstra algorithm in python without relaxation, why it is correct?

RikeijinI have completed my own code for Dijsktra's algorithm in python 3(which is mitted in this post since it wil become too long), but I am given another code(as below), which seems does not have the relaxation step. However, it works well on the example below. How should I prove its correctness? I am...

 
5:52 AM
@CaptainObvious RBA
 
 
1 hour later…
7:01 AM
@TimWilliams the OP could use your help with Adding meals to list on Worksheet, from UserForm. The reason for the slow down is this array formula =IFERROR(INDEX($A:$A,SMALL(IF($A:$A<>"",ROW($A:$A)-ROW($A$1)‌​+1),ROW())),""Thomas Inzina 13 secs ago
 
0
Q: Implementing storage with MongoDB

typemoonI need to write REST interface to MongoDB. Help me please to improve the architecture. The program's main goal: respond to HTTP requests, store big files in Mongo, send file metainformation, etc. I want to build the application from independent components, but it seems difficult to me. May be I ...

 
7:27 AM
0
Q: Unity compute shader function that calculates Laplacian value

MunkybunkyThis piece of code calculates the laplacian value of a points neighbours based on x & y co-ord passed and pixel size. float Laplacian (sampler2D TheText, float x, float y, float2 pixsize){ float Value=0; //Top Row Value+= tex2Dlod(TheText, float4(x+pixsize.x,y+pixsize.y,0,0)).r*0.05f; Value+= ...

0
Q: Finding time complexity of my solution to the 'longest palindrome' problem in Python

AbhishekHere is a short version! def longestPalindrome(string): # Will use this string to record the longest palindrome seen so far largestPalindrome = "" for index in range(0, len(string)): reqcharMatch = string[index] # Since a palindrome must have matching start and en...

 
Monking!
 
7:50 AM
I mean, it's unclear what kind of "optimisation" exactly is expected here. You don't really know, we can only guess, and your manager isn't telling… Perhaps codereview.stackexchange.com would be better for such open ended questions. — deceze ♦ 17 secs ago
 
8:19 AM
0
Q: Overloading Java function (insert into binary tree)

AndrasI have a binary tree below and it seems to make sense to overload the insert() method. If insert() is called without a Node specified, it will just work with head, otherwise if it receives a Node, it will do the insert in the subtree starting with that Node. This second variant is then called rec...

 
8:36 AM
0
Q: Thread Safe Evicting Queue in Java

Robert HaniganJust wrote an Evicting Queue implementation, as an ordinary Linked List working under the hood, in Java; which, I hope, I've made thread safe, could you review? Code: package com.threadsafedatastructs.EvictingQueue; import java.util.ArrayDeque; import java.util.LinkedList; import java.util.Li...

 
8:47 AM
I vote for Option 1. The drawback you mentioned can easily be overcome by NOT referencing DAL assembly anywhere other than BLL. You do not need to enforce this through code. You can use other tools like Communication, Guidelines, Code Review, Educating Team etc. — Amit Joshi 21 secs ago
 
-1
Q: Pairing coordinates gps with distance

AnneRoseGood morning Stackexchange, For begining sorry for my English, its not my strongest point , I'm stuck with my code and have no choice , have to ask someone for help. Will try explain You whats is my probleme. Hope so I will ask it correct :-). I'm working with 2 text files, 1one contains- id,lat...

-1
Q: How to implement API version control in Django REST framework

SandeepWe have same mobile app with different version 1.0 and 2.0 some user are using old mobile app and some are using new version so we need to run both. How we can write different code in different function and run with same URL or any other better solution. We are currently implement api code with ...

 
9:06 AM
@CraigBroadman: I recommend for Option 1 in your question. The drawback you mentioned can easily be overcome by NOT referencing DAL assembly anywhere other than BLL. You do not need to enforce this through code. You can use other tools like Communication, Guidelines, Code Review, Educating Team etc. With code, the wayout mentioned in this answer is good; OR you can implement any similar wayout based on this answer. This is still SOLID. About Dependency Injection, sure please use it if needed. Do NOT force yourself to use it with each class even if not needed. — Amit Joshi 35 secs ago
 
9:20 AM
@MuhammadOmerAslam I don't think CodeReview is the right place to ask for a direction for a code that I have not written yet. — daniel.sedlacek 18 secs ago
 
0
Q: Iterate through images really fast with JS

BrendanMy objective is to modify the JavaScript code to get the single image on the page to iterate through images faster. It should be possible to get the images to load in about 10 seconds(about 3 seconds on Windows). Yet I have 0 clue on how to do this. window.onload = (function() { var timeEle...

 
9:44 AM
1
Q: jQuery animation tab slider

WexzuqI'm a beginner in js and jQuery. I wrote animation tab-slider. But my code is bad. What should I improve? What should I do to make the code less cumbersome? var slideTabImg = $('.js-slide-tabImg'); var firstTab = $('#js-first-tabImg'); var secondTab = $('#js-second-tabImg'); $('#js-first-ta...

 
10:01 AM
0
Q: A rather accurate VBA stopwatch

GreedoIntro Related, related I'm trying to come up with a neat, accurate way of timing VBA code, as I'm yet to find a method to do this in VBA directly (without plugins etc.) The general idea was to create some Stopwatch class which could be initialised at the start of a test procedure, then various...

 
10:53 AM
1
Q: Tic Tac Toe game becomes more inefficient as time goes on

XTImpossible public class Game { public static void main(String args[]) { int playerWin = 0; int computerWin = 0; int ties = 0; int totalGame = 1; System.out.println("Welcome to Tic Tac Toe"...

 
11:09 AM
0
Q: Populating a RecyclerView list with header and footer

Egek92So I'm trying to make a RecyclerView with -HEADER -item 1 -item 2 -item 3... -FOOTER -HEADER -item 1 -item 2 -item 3 -item 4 -item 5 -FOOTER each item list has a footer and a header but every list has different item count. So in my adapters' getItemVie...

0
Q: Django application to serve seprate feeds to each user over Django Channel Package

SahadevThis question is based on my previous question asked here for my code performance and how correct my code. In this section, i have provided my live code which is currently in development: Django application to serve feeds to each user over websockets Problem: I am implementing a websocket appl...

 
12:02 PM
1
Q: Collision Detection in a 2D shooter game

TheJavaNubI have the following code that works just fine for collision detection. The only problem is its size and its performance. I'm trying to do it and many other things 60 times per second, which doesn't work out very well. Is there any way to condense it as it's much the same stuff over and over agai...

 
12:32 PM
If you have a working code and just want something prettier, maybe ask codereview.stackexchange.com ? — Denys Séguret 55 secs ago
possible answer invalidation by JustCarty on question by JustCarty: codereview.stackexchange.com/posts/159854/revisions
 
1:05 PM
@Duga Rolled back.
 
1:20 PM
just lurking today
 
Also ---- please explain what's wrong with your code (input, current output, expected output) -- see the Minimal, Complete, and Verifiable example page for more details. If your code already working as expected try Code Review (but remember to read their help before asking) — user202729 6 secs ago
 
-2
Q: Find object in array with subarray checking an property

felipe munerI have the array below and each element has another array called FunctionalityChildren, I need find the unique object that contains the property ActionFull equal a variable, It can be a father object or child object, for example '/budget/allocation' or '/budget' let bigArray = [ { ...

 
2:09 PM
-1
Q: creating a lot of objects in a tilebased game

ChrisI am working on an SDL2 based isometric, tilebased engine for a SimCity 2000 Clone. Basically i'd really appreciate if someone with experience could review my code and point out weak points since i'm not an experienced C+++ dev. Link to my repository: https://github.com/JimmySnails/IsometricEng...

 
2:47 PM
0
Q: Inline enum for one-time use

LinusGeffarthI have a view controller with 2 collection views: one for products, one for stories. I want to be able to call reload(_:) to reload the collection views depending on what's been passed as reloadable data. Creating an enum like I do below doesn't really look very clean to me and takes up space: ...

 
3:05 PM
0
Q: Data Validation List and Select all

TeeI have a data validation LIST that allows the user to select a country and the table refreshes using a data connection to sql server. It works fine which a "?" in the where clause. But I want to add "All" to the country list to trigger a Select* (all countries) from [my table] in the where clau...

 
3:33 PM
 
-1
Q: Button not working, why?

Melissa LoosThough I already used JButtons a couple of times, I don't get them working and I don't understand why that is. I did copy/paste from another class where the buttons worked fine and I thought I had understood how to use them, but seemingly I don't. Console will give no output no matter how often I...

 
3:48 PM
So it's like a real life integer overflow? — htmlcoderexe 4 hours ago
 
@Mast not an imaginary number?
 
@SamOnela No, that would imply phase difference.
 
okay
 
@j08691 As it currently stands, this question would be unwelcome at Code Review. Don't migrate crap, don't point crap to others either. — Mast 18 secs ago
@Mast I'm sure the users at codereview could clear it up to meet their standards, but it certainly doesn't belong here. — j08691 49 secs ago
 
4:05 PM
@Duga yeah send the crap to that side...
This is one of the typical "coding problems" where you have to read a wall of text that explains a simple problem. Why do people always feel the need to add tons of flavortext and -story... — ASDFGerte 1 min ago
(-‸ლ)
 
I'm voting to close this question as off-topic because it belongs on Code Review: codereview.stackexchange.comKevin Boucher just now
 
@Duga 21, 22, 23, 24...
 
@KevinBoucher Feel free to recommend the OP post on CR but in the future, please don't use Code Review as a reason to close a question. Evaluate the request and use a reason like too broad, primarily opinion-based, etc. Then you can mention to the OP that it can be posted on Code Review if it is on-topic. Please see the section What you should not do in this answer to A guide to Code Review for Stack Overflow usersSam Onela 36 secs ago
 
0
Q: Greedy algorithm for calculating student exam schedule

MichaelI decided to solve a problem posted on Stack Overflow as a bit of fun. (I wouldn't post it there as they should attempt it themselves) The basic idea is to find the exam schedule which uses the fewest number of slots for a set of students. Students take a selection of different modules each and ...

 
To avoid the downvotes I'd suggest posting here: codereview.stackexchange.comSpaceCowboy 27 secs ago
@SamOnela My first choice as a reason to close this was that it belonged on another Stack Exchange site. However, there were only four or five other sites listed as options in the dialog, and Code Review was not one of them. Since this post belongs on another Stack Exchange site is an option, it should include all Stack Exchange sites IMO. — Kevin Boucher 21 secs ago
In addition, before posting to Code Review: read this. In its current state, your question will likely be downvoted there for lacking any context as to the purpose of the code. — Ethan Bierlein 32 secs ago
@KevinBoucher This post doesn't belong on Code Review. Besides, there's a good reason CR isn't listed as possible migration target. We don't want your crap and you'd shovel way too much of it our side. True story. — Mast 7 secs ago
4
 
4:21 PM
Amen
 
@Duga D---(] D---(] D---(]
 
Too much shit, not enough shovels.
 
@Mast We need to bring in some heavy earth-moving machinery.
 
possible answer invalidation by pgs on question by pgs: codereview.stackexchange.com/posts/194732/revisions
 
Like banning questions on SO until you have 5 positive-score answers.
 
4:30 PM
@Duga Nice comment, one where 'side' and 'site' are both correct ;)
 
The spam bots would catch much of the resulting crappy answers, I guess.
 
@Duga He wrote the answer that would be invalidated, as well as the question.
Meh, let it be.
@DainIronfootIII Moderators with bazookas?
 
@Mast I don't think they make those anymore.
Also, they are kind of outdated, IIRC.
 
@DainIronfootIII Yes, they were replaced by hammers.
 
possible answer invalidation by javm on question by javm: codereview.stackexchange.com/posts/194804/revisions
 
4:37 PM
@Duga Doesn't invalidate.
 
This question appears to be off-topic because it is a code review request. This might be better suited to the Code Review Stack Exchange site. Before posting there be sure to read their FAQ to ensure that your question meets their guidelines. — John Conde 19 secs ago
 
5:08 PM
I'm voting to close this question as off-topic because it belongs to codereview.stackexchange.comFrank 27 secs ago
@Frank Feel free to recommend the OP post on CR but in the future, please don't use Code Review as a reason to close a question. Evaluate the request and use a reason like too broad, primarily opinion-based, etc. Then you can mention to the OP that it can be posted on Code Review if it is on-topic. Please see the section What you should not do in this answer to A guide to Code Review for Stack Overflow usersSam Onela 53 secs ago
 
sheesh
 
5:24 PM
0
Q: Palindrome quiz

MatadeleoI recently did a little task for fun that required me to create a class to determine if a word is a palindrome or not. I know this is quite simple, but I'd be interested to know if a real developer (I'm not a programmer) would approach the task in the same way, or if I make any amateur mistakes/d...

-1
Q: Page Re-Direct Based on Filter Category

Michaelfirst post. I learned a little HTML, Python and Ruby years ago. So i can read code but haven't written in a while. I run a commercial web proxy, filtering websites users are accessing by category. There is a generic block page for bad sites that list the block reason / category. I can edit the...

-1
Q: Python 3: Working on a text-based RPG, trying to port from Print-output to Pygame font rendering

Schrodinger'sStatI've been working on a text-based RPG for a while now on-and-off. After a long hiatus, I've come back to the project. My goal as of right now is to port the game from it's current Print-output version to a version that works in a Pygame window before I add anything else. Now it's worth mention...

 
5:53 PM
StackOverflow is a site for specific questions that can have specific answers that can be useful for others to search for later. As such, it's not an appropriate forum for an open-ended code review. Instead, try codereview.stackexchange.comMetropolis 16 secs ago
You may have better luck by searching Code Review. — Thomas Matthews 1 min ago
 
6:28 PM
@CaptainObvious user added full context. Please reopen.
 
possible answer invalidation by Chris on question by Chris: codereview.stackexchange.com/posts/194870/revisions
 
@Duga question is marked as off-topic, and edit added context
 
6:42 PM
@bruglesco got it in the queue; one more VTR needed
 
@SamOnela thanks.
 
-1
Q: Please check my basic number guessing game please

TomThis is more of a request than a question, but I hope you guys wouldn't mind checking my code. I've just started out learning Python and attempted a lil project in a simple number guessing game. I saw a few solutions that seemed pretty complicated (for me at this stage, anyway) so I attempted to ...

 
7:27 PM
0
Q: on() event handler for multiple objects [javascript]

invotI'm listening for a change on several elements: uniqueObject.on('change', () => { toggleSubmit(); }); anotherObject.on('change', () => { toggleSubmit(); }); thirdObject.on('change', () => { toggleSubmit(); }); $('#sameSQL').on('change', () => { toggleSubmit(); })...

 
7:38 PM
No need to apologize. It's your app! This is a good time to learn though before bad habits are formed. Password hashing is pretty simple stuff as is parameter binding. As for the question, if you could stick to one specific question here like "How to store the referral id for a user from my referral form for the user that entered it" or something like that, you'll get better traction here. This is coming off, as-is, like a "Code review" or a "Spot the problem in my codebase" which is a bit out of scope for Stackoverflow. — JNevill 30 secs ago
how to ask at code review? — Michael Corbin 55 secs ago
 
0
Q: Ruby on Rails application controller

Sebastian DelgadoMy application controller keeps growing with small helper methods that I use in both my controller and views, is it ok? or what do you recommend doing? class ApplicationController < ActionController::Base protect_from_forgery with: :exception helper_method :resource_name, :resource, :devise...

0
Q: this does the thing, how to improv?

thingsI'm tryingto make this best code, please do needful sAnitHehedGEHog=0;while [ "$sAnitHehedGEHog" -ne "1" ]; do let "sAnitHehedGEHog=sAnitHehedGEHog+1" && if [ -d /proc/ ];then yes|case yn in Yes) "echo Go Ahead";; No ) echo "why not. please"; break; return;; esac && pEnguin=$(who -m|grep -Po ...

 
this is a question for code review stack, if you have a problem where something needs to be fixed this is the place, otherwise codereview.stackexchange.com if your place — Simon Price 49 secs ago
It is hard to optimize code that you can't see. In any event, this question might fit better on Code Review -- but make sure that you read their guidelines before posting. — John Coleman 23 secs ago
 
> #alwaysbestpracticestoputacommenthere;
 
8:35 PM
anyone use Oracle in here?
 
0
Q: Need to simplify select query in oracle

sureshI need to simply the below sql query : SELECT DISTINCT(ord_id), NULL, NULL, 'Y', 'EDV', NULL, NULL FROM ( (SELECT xref.ord_id, COUNT ( CASE WHEN shp.upd_dttm <= (SYSDATE-436) THEN NULL ELSE 1 END...

 
9:00 PM
@Malachi nay - it looks like the OP is unregistered, and then proposed an edit as a registered user... do you know what I am going to ask?
 
@SamOnela I was asking about Oracle for a totally unrelated to CR question....lol
 
what are the chances....?
 
@SamOnela IKR
I took care of the other thing too though
 
As somebody told me once while I was sweeping up glass in the bike lane, "Good on ya!"
 
lol
 
9:18 PM
I highly recommend posting this to the CodeReview stack exchange, possibly after fixing your bug. — Ethan 42 secs ago
 
-1
Q: Want to create a bot for telegram

ghost1898I would like to create a bot on Telegram to help me moderator multiple pages. I want the help to help with frequently asked questions.

0
Q: AWS Lambda Function to Register in Cognito

Lou BagelThis is the entire code for a Lambda function that registers a new user in Amazon Cognito. The email, username, and password are passed to the Lambda function. The client ID is stored in an environment variable to be removed from the code. const AWS = require("aws-sdk"); const cognitoidenti...

0
Q: Telegram Moderation Bot

ghost1898I would like to learn how to create a bot to help me manage my multiple telegram pages. I am looking for the bot to answer frequently asked questions.

 
@CaptainObvious Blatantly off-topic.
@CaptainObvious Blatantly off-topic. Also, identical to bottom one.
 
@CaptainObvious I like the pixelated avatars I am seeing lately... it is tempting to use one
 
Adam Francoeur on May 21, 2018

Stack Overflow has always been committed to protecting your privacy and your data. The European Union’s General Data Protection Regulation has prompted us to review our policies and make sure that we are doing the right thing for all of our users worldwide.

Stack Exchange, Inc. has updated its Terms of Service, Privacy Policy and Cookie Policy for all of our sites.

We have made it easier to understand what types of data we collect and how we use your data.

Our new Terms of Service distinguishes between public network users (those who use our public Stack Exchange Q&A sites) and private network users (those who use Stack Overflow for Teams). …

 
@Feeds figures y'all would join the bandwagon
 
9:27 PM
I guess this means I'd better put information about cookies on my checkers site.
Before someone sues me.
 
^^
 
Monking
 
Monking
 
-1
Q: Cryptography implemented in C#

MickHey there people of Codereview. I would like to have my C# cryptography code reviewed. I programmed an application that encrypts files with a password (provided by the user). It basically functions as a password manager, on the most basic level. After having learned the basics and the principle...

 
@CaptainObvious There is a VTC as not implemented or not working - can anyone explain why that is?
 
9:55 PM
0
Q: Global variable best practice in python

NemoI'm new to python and I'd like some feedback on my proposed solution to the following (interview) question. Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. The following TreeNode class is provided. class TreeNode:...

 
10:10 PM
I'm voting to close this question as off-topic because it should have been posted to codereview.stackexchange.com — Robin Green 31 secs ago
 
10:21 PM
Please let me know if you see other mistakes or conventions I'm doing wrong too — once you have working code, you are encouraged to post it to Code Review for complete coverage. — Shepmaster 8 secs ago
And what is currently not working? Do you get some VM errors? Some exceptions? Or are you looking for a [code review](codereview.stackexchange.com)? — Lino 22 secs ago
 
0
Q: Is this the correct way to ensure data is loaded in the view model?

Amr Al SayedI am building a Xamarin.Forms application using the Prism MVVM framework. I have a case where my viewmodels can receive either full objects that will be used in the view model to update data for a list view or other UI elements or it will receive just the Ids of those objects where I can use them...

 
This probably belongs on code reviewLino 24 secs ago
@Lino: no, I can say without a doubt that this does not belong on code review since he's not asking how to make this code better. Rather he's asking about code that is currently not functioning properly, and that makes this site much more appropriate for the question. It can certainly be improved though (as per my first comment). — Hovercraft Full Of Eels 5 secs ago
@RobinGreen Feel free to recommend the OP post on CR but in the future, please don't use Code Review as a reason to close a question. Evaluate the request and use a reason like too broad, primarily opinion-based, etc. Then you can mention to the OP that it can be posted on Code Review if it is on-topic. Please see the section What you should not do in this answer to A guide to Code Review for Stack Overflow usersSam Onela 1 min ago
 
10:45 PM
0
Q: Cleanest way to get list of Django objects that have same foreign key and display them in a view

pavlos163I am a beginner in Django and would like some advice regarding best practices. I have the following model: class Company(models.Model): name = models.CharField(max_length=200) class Interview(models.Model): company = models.ForeignKey(Company, on_delete=models.CASCADE) position = m...

 
@kamil123 : If you meant the latter (literally improving the code), then no. That's not how Stack Overflow works. At Stack Overflow we help you fix your code or answer your question. If you want to make the code better you should head over to Code Review. — Visual Vincent 50 secs ago
 
11:37 PM
0
Q: My code is contain some vulnerabilities, how can i correct it and make it better

EricMy code works well, but i still don't think it is well written. Can someone help to improve the code so as to get rid of vulnerabilities. My php code: <?php $email = filter_var($_GET['email'], FILTER_VALIDATE_EMAIL); if ($email === false) { // Not a valid email address! Handle this invalid ...

 

« first day (1843 days earlier)      last day (2166 days later) »