« first day (1524 days earlier)      last day (2788 days later) » 

00:00
RELOAD! There are 4088 unanswered questions (90.9884% answered)
00:18
0
Q: Maximum Product Subarray - Java

coder0h1tWhile solving a leetcode question on Maximum Product Subarray, I stumbled across a solution - which runs very fast (faster than Dynamic Programming solutions found at http://www.geeksforgeeks.org/maximum-product-subarray/), is pretty straight forward, but has left me wondering if this is just a h...

00:29
00:39
0
Q: Redundant_map (Recursion)

user7724050""" Complete redundant map, which takes a tree t and a function f, and applies f to the node (2^d) times, where d is the depth of the node. The root has a depth of 0. """ def redundant_map(t, f): """ >>> double = lambda x: x*2 >>> tree = Tree(1, [Tree(1), Tree(2, [Tree(1, [Tree(1)])])]) >>>...

0
Q: Speeding up a GLSL function used to differentiate between pixels above/below a line

ConduitI've recently acquired a program which is capable of using a GLSL fragment shader as a plugin. After a short amount of experimentation, I've realized that - for my use-case - I desperately need a function that does the equivalent of the following: Takes two 2D points and calculates a line betwe...

 
1 hour later…
02:04
0
Q: Game of Hangman that uses classes for C++

Improve Every DayI would like feedback for this code. This is a game of hangman which uses classes but my knowledge of this category is very limited so I did the best I could. I would like my code to become as professional as possible as far as being an amateur stands. If anyone has any ideas or features they thi...

02:30
posted on July 05, 2017

This Saturday between 10AM EDT (14:00 UTC) and 2PM EDT (18:00 UTC), we will be moving all services from our primary New York data center over to our secondary data center in Colorado. We previously completed a read-only test in preparation for this move and have high hope confidence of success. All user-facing services will be moved including: All Q&A Sites (including Stack Overflow) Stack

03:05
possible answer invalidation by Justin on question by stimulate: codereview.stackexchange.com/posts/167416/revisions
 
1 hour later…
04:15
0
Q: Object Oriented Design for Access Control

dpmProblem Statement: Design an employee swap in swap out system. The system will have a machine which records the swap in and swap out. The user can also login in a portal where he can check his swap in /swap out time. He can correct his time also. There will be managers for employee who can ch...

04:29
Monking
possible answer invalidation by Tony on question by Tony: codereview.stackexchange.com/posts/162914/revisions
04:46
0
Q: Bi grams creating and counting of the probability of the word occurrence

Marishka33I am trying to build a bigram model and to calculate the probability of word occurence. I should •Select an appropriate data structure to store bigrams. • increment counts for a combination of word and previous word. This means I need to keep track of what the previous word was. • compute the pro...

05:21
@Duga seems ok
0
Q: Why is this PyParsing code taking 3-4 minutes to process a 5 mb file

sircasmsI'm trying to parse a file of about 200 MB in size. I decided to use Python re module for this task. However, upon some further study I found that the BNF grammer based PyParsing provides what I'm looking for. To test my code, I used a 5 MB file and to my surprise the code takes more than 3 minu...

06:14
This is better suited over at Code Review. — Joseph the Dreamer 43 secs ago
0
Q: I want only the mobile version

WillBoxGamingI want my code to display the mobile version on the PC one. I cant upload my code here, i dont know how yet.. Here is my website: http://youtube.ae.tn thanks!!

 
1 hour later…
07:37
-1
Q: PHP - Combine two arrays to get an output

AmranCurrently I want to output a data from a database. I have two separate arrays. May I know is there a way to combine those arrays. The code is as below, $array_1 = [ 'memo' => 'title string', 'break_down' => 'title string', 'images' => 'title string', 'email_content' => 'title string' ]; ...

08:14
-1
Q: Accepted approach for maintaining constant values in code

PonniCan someone let me know what would be the cleanest and best approach to maintain constant values as part of my code solution? 1. A resource file .resx 2. A settings file 3. A static class 4. Maintaining in config file If there are any other options available, please suggest them as well. Thanks.

0
Q: Highest performance of a RK4 integration

AbolfazlI don't know if it's a good place to ask such a question here, anyway, I have written a simple code for Runge-Kutta forth order integration to solve a system of ordinary differential equations and paralleled it by OpenMP. I don't know it it is the best we can do for maximum performance of the cod...

@CaptainObvious That's bad.
08:47
Monking
Monking
09:02
0
Q: Spring jwt authentication using cookies

benjamin cI'm working on a experimental code which allows users to authorize using jwt's. jjwt library is used. Here's the authentication and authorization flow. User login User enters login credentials. (User login page is being displayed to every user) Authentication service validates user's existence...

09:40
0
Q: Refractoring to meet basic coding principles

KrzychuI'm a beginner developer and I wrote a simple programm. How could be the code improved to meet best practices of the development? I mean if the names of classes or variables are enough self-explaing for others and it is required to insert setters and getters in the classes, when I know that at th...

0
Q: Convert RSS feeds to html

Ricky WilsonMy Concerns Is this code pythonic? Is this code easy to read? is this code stable? is this code missing something? # -*- coding: utf-8 -*- """ Simple rss to html converter """ __version__ = "0.0.1" __author__ = "Ricky L Wilson" import StringIO from feedparser import parse as parsefeed fro...

10:05
This question really went crazy. Nice
10:24
0
Q: My binary search algorithm implementation in JavaScript

Rahul ShivsharanI have implemented binary search algorithm in JavaScript, Its as follows, var myArray = [], searchNum = undefined; // below function is used to capture the // commandline parameters for array and the // number to be searched (function(){ process.argv.forEach(function (val, index, arr...

possible answer invalidation by stimulate on question by stimulate: codereview.stackexchange.com/posts/167416/revisions
@Duga seems ok
@MrGrj Wat it has a CV... Also nice answer, :)
10:39
This question is asking for a codereview which should be done on over on codereview... as you already have done... so why take it over to this site? — Mischa Behrend 41 secs ago
@Peilonrayz ty !
10:59
1
Q: Crawler for scraping friend list from facebook

SMth80I've made a facebook scraper using vba in combination with selenium which is able to parse the name from friend request list. It is necessary to do one thing manually, though. After running this script, when facebook page opens up, there will be a notification popping up mentioning "Allow" or "Bl...

11:31
2
Q: Filter data with optional parameters

H. PauwelynI would make a filter to filter my data using next parameters: First name Last name Language Profile A minimum date of registration A maximum date of registration Success All filter options are not required for the user. Here could you find my C# code. private IEnumerable<Registration> Filt...

@Peilonrayz Rev 1 had only a GitHub link, not the actual code.
@Mast Oh, that makes sense. I probably should have checked the Revs...
lol
0
Q: Generate Filter Criteria based on multiple field combinations

Coder AbsoluteThe PrepareConditions method in FeeTypeQueryService class prepares the conditions based on the searchConditions parameter, and returns as an object. searchConditions can only have 3 combinations, such as: Filter by TenantId, FeeTypeId Filter by TenantId, FeeTypeName Filter by TenantId, FeeTypeI...

12:03
The code you show, does it work? Then what you seem to want is a code review which can be had by posting in codereview.stackexchange.com instead. — Some programmer dude 22 secs ago
codereview? let's see — Andres Camilo Sierra Hormiga 45 secs ago
Julia Silge on July 06, 2017

This week, my fellow Stack Overflow data scientist David Robinson and I are happy to announce the publication of our book Text Mining with R with O’Reilly. We are so excited to see this project out in the world, and so relieved to finally be finished with it! Text data is being generated all the time around us, in healthcare, finance, tech, and beyond; text mining allows us to transform that unstructured text data into real insight that can increase understanding and inform decision-making. In our book, we demonstrate how using tidy data principles can make text mining easier and more ef …

@Someprogrammerdude afaik codereview.stackexchange.com will only accept working code, thus "Does it work?" will also be rejected there — tobi303 37 secs ago
12:31
What is the treshold to start a conversation in the chat? I have a few follow-up questions about a comment someone wrote under his answer. I've already commented three times below that comment. Firstly to explain my thoughtprocess and afterwards to ask a random thought I had while re-reading his comment. Should I invite him to chat or keep posting comments?
@Ludisposed don't know the threshold but the comment system will tell you at a time that you should take it to chat. You can create a chat room as well now and invite him/her to the chat room.
0
Q: Foobar Fuel Injection Perfection efficiency

ArnavI was writing this code and was using the BigInteger class because it needs to work with numbers up to 309 digits long, however it takes too long to run with numbers that are too big. I was hoping to find a way to make it more efficient and faster, but have tried everything in my power. Any sug...

12:53
0
Q: JSDoc - How to document object with generic key names?

HaSteI already asked this question on Stack Overflow but was told that my question should rather be posted here. I need to document an ES6 class with JSDoc that takes in an object that has properties that has the key names as names of people so the key names can be pretty much any string, nothing pre...

you should share a small example of csv input file and expected output. I see a lot of room for improvement, but that looks more like a question for codereview... — Jean-François Fabre 46 secs ago
13:08
Greetings, Programs.
Since you are asking the best way. It is to write the code and post it on codereview.stackexchange.com to get the feedback :) — Sudipta Mondal 51 secs ago
If your program works and all you want is a code review then you should post on codereview.stackexchange.com. — Some programmer dude 43 secs ago
This is too broad a question for SO. You need to ask specific questions about problems you're having, not open-ended, opinion-based questions like this. If you expand this to a full set of code, it might be appropriate for CodeReview.stackexchange.com. — Barmar 45 secs ago
This question make more sense for codereview.stackexchange.comRajshekar Reddy 37 secs ago
I'm voting to close this question as off-topic because CodeReview.stackexchange.com is the appropriate place to get design suggestions. — Barmar 5 secs ago
13:37
@Ludisposed As @Heslacher said, the system will at some point invite you to take it to chat. When you reach that, you should probably do so. Before that, meh, nobody will blame you for keeping it in the comments unless things get out of hand of-course.
Why does it matter what VS says the maintainability index is? It's a poorly derived number that indicates what a piece of software thinks your code is valued at. Does your code have places for improvement? Sure, string concatenation is frowned-upon (@"" + startPath ...), but it's pretty clear, so it's most-likely just fine. — EBrown 9 secs ago
Don't worry about some "magic" number that a piece of software gives you to determine if your code is "good" or not.
Worry about the rest of your application, because chances are that can be improved as well.
Thank you both Mast and Heslacher for responding. As a newbie on this community I wanted to make sure I understand the meta of CodeReview
possible answer invalidation by Brian Ge on question by Brian Ge: codereview.stackexchange.com/posts/167430/revisions
1
Q: Folder to Zip - code Maintainability

Purger86From the code metrics in VS it says that the maintainability index is 64. I think the code is really easy written. How can I get a higher Maintainability Index? public void ExportProjectFolderToZip() { Log4NetLogger.Logger.Info("Start of Method ExportProjectFolderToZip"); ...

0
Q: D3 Force-Directed Graph with Numerous Functionalities

Cameron TaylorI have a d3.js force directed graph that is driven by the code below. I am relatively new to d3, and much of the code is pieced together from various examples found online. If anyone has a moment or two (even if only to review a portion of the code), I would greatly appreciate any help. The graph...

13:51
"I'm checking if number is even by 'n % 2', how to make faster?" "Use 'n & 1 == 0'." This should be a special-case on '%' at compiler level.
Thank you everyone for the hel provided here. Just need bit more understanding of the stack overflow rules :) - so, can I move this question to Code Review? — nicholas.w 25 secs ago
2
Q: SQL Server - Optimize window functions w/out repeating code?

Stan ShawI have one table on which I want to perform some calculations. The table stores employee points that are awarded for performing various tasks. The relevant structure is as follows (table has about 15,000 rows): PointsTable: ID int IDENTITY(1, 1), EmployeeFirstName (varchar), EmployeeLas...

1
Q: Parser for Facebook friend list

SMth80I have written some code in python in combination with selenium to parse all the names from facebook friend list. It was hard to manage the pop up notification and the process of scrolling to the end of that page. However, my scraper can do that successfully. I tried to do the whole thing very ca...

@EBrown Even in C# it's 10% faster to use & 1 instead of % 2...
14:11
What's your problem? Is there logic error, or are you looking for a code review? This is very vague. — Carcigenicate 34 secs ago
14:25
possible answer invalidation by SMth80 on question by SMth80: codereview.stackexchange.com/posts/167486/revisions
0
Q: python recursive regex optimization

susduI parse a big source code directory (100k files). I traverse every line in every file and look for function calls via regex matching. I know that using regex to parse languages is a terrible idea. However, I'm looking for simplicity and not interested in the whole parse tree. Moreover, the rege...

14:38
0
Q: Rust exercise department employee management

Matthew StevensonWorking my way through the second edition of the Rust Programming Language and did the exercise at the end of ch 8: Using a hash map and vectors, create a text interface to allow a user to add employee names to a department in the company. For example, “Add Sally to Engineering” or “Add A...

0
Q: Why has an edit been rejected?

CiaPanI have made an edit to this answer about 'Lissajous pattern simulator' to replace misleading names of two varables xStart and yStart with more appropriate in the context xTimeFactor and yTimeFactor. However two reviewers, Heslacher and Incomputable, rejected my proposal on the pretext of 'deviati...

possible answer invalidation by Ben on question by Ben: codereview.stackexchange.com/posts/167491/revisions
You might want to include more code and head over to codereview.stackexchange.comJeff Noel 28 secs ago
0
Q: Refactor of a dropdown menu with submenu & heredocs

GrumpyCroutonI was recently going through and refactoring old code, and I eventually came across the code for my websites menu bar, so I started to refactor it. I also recently was introduced to Heredocs, which I am very new to and not sure all the ins-and-outs yet. Here is the refactored code for part of i...

14:55
stackoverflow is not the right place, ask in codereview — dabadaba 47 secs ago
Are you having problems with this? If not I think you can relax, it looks fine :) If there isn't a problem with this, this type of question is probably better for code review exchange — mrfreester 49 secs ago
15:06
0
Q: Converting string to a set of integers

Parth BhoiwalaSo I get a user input of a lot of numbers in a single line like this 100 100 200 300 300 300 400 500 500 700. I want to store the distinct ones in a list. A simple approach is to do this: nums = input().split(' ') myList = list(set([(int(i) for i in nums])) My question is, is this a faster/...

Welcome to SO. Please read What topics can I ask about and How to ask a good question and The perfect question. Your question doesn't seem to involve a direct problem. Instead it's working code that might need improvement. May I suggest to ask the question on Code Review instead? — icecub 8 secs ago
Thanks didn't know that code review exists, will post there too. If you have any input though please care to mention it here or the new code review post. — RandomOne 55 secs ago
If you're willing to edit your questions to ask only those particular concerns using specific snippets, then this question is valid here. If you're looking to have more holistic feedback that addresses problems with the entire program, consider posting this to CodeReview. @zsad512 — ospahiu 34 secs ago
I have a suggestion then. You're likely to find help on how to optimise your slow working solution here: codereview.stackexchange.comcᴏʟᴅsᴘᴇᴇᴅ 17 secs ago
There are other places where this type of review question should be posted such as Code Review stack exchange which offers peer reviews of code. This website is for helping with errors or issues in code. — Professor_Joykill 24 secs ago
This is off-topic here. If you want your code reviewed, visit codereview.stackexchange.comJanes Abou Chleih 18 secs ago
@JanesAbouChleih This question doesn't fall inline with what Code Review does. Please read their help center, before incorrectly suggesting there again. :) — Peilonrayz 24 secs ago
15:38
This should be posted on Code Review. — Masoud 32 secs ago
@Zulan you can give a look at this question (it's still me) — justHelloWorld 36 secs ago
@Shadow you can give a look at this question (I posted it) — justHelloWorld 30 secs ago
0
Q: Clean up PHP & MYSQL code (Picked up by Swift as blog reader iOS app)

BroSimpleNew to PHP and was just wondering if any improvements can be made, maybe increase efficiency or just clean up code? I know I'm using an old MYSQL maybe we can update it. Just want to make sure the connection can be as best to its ability. Also, if you can, can you explain on how to improve secur...

0
Q: Set an attribute to change an objects behavior, at specific times and for a specific period

Michael JohnsonI have a program which I require to cease some of it's activities at specific times. This can change day-to-day, week-to-week. The code below (working) is a test script. My program would check use the sleep_data() data set to check if the current date falls within any of the periods for a given ...

0
Q: OpenMP SIMD Euclidean Distance

user6321I'm using cv::norm() to compute the L2 distance between row vectors in thousands of dimensions (at least 4096 dimensions). I'm using an AVX2 machine and icpc version 2017. Since I'm computing this function millions of times, I need the possible most efficient version for this function and I hig...

0
Q: Counting the number of letters in a .txt file in pascal

PlexusI wrote this program, that needs to count the number of letters in random.txt file in pascal programming language. It doesn't matter if letter are small or caps. Other charachters are ignored. When it finishes it writes, on output, every letter in a single line and then after it the numper of app...

0
Q: Can I ask here for a blog post about programming review?

rap-2-hCan I ask here for a blog post about programming review? (I'm totally new to Code Review)

15:56
Probably, should be posted in Code Review. — Atul Khanduri 51 secs ago
0
Q: Python: Program to output a flight schedule

zsad512I have a CVRP problem that I solved in Python. There are 6 planes (T1-T6) and 3 airports (AUS,DAL,HOU). The airports have 1,2,3 gates respectively. Each airport has a minimum ground time of 25, 30, 35 minutes respectively- that each plane must wait after arrival before departing again. The planes...

0
Q: Distance in a tree

monsterI have implemented the code of a codeforces problem. But after trying it for alot of time I was not able to implement a dp solution of the question. So, can anyone tell me how can i change and improve my solution to convert it into a dp one. Or any tips about how should think and implement to for...

0
Q: Designing and organizing WebGL engine code

RandomOneI have this scene featuring a colored spinning cube that I would like to design better.I would like to split the main function into smaller ones while also avoiding the use of globals cause apparently they can cause many problems as the codebase grows bigger. Being a JS amateur I can't decide how...

Monking
16:31
0
Q: Refactoring JavaScript functions

A_BI'm looking for suggestions on how to clean up JavaScript/jQuery code that looks like the example in the Before snippet. I'm a backend developer so some of the constructs in JavaScript are foreign to me. I took a stab at it in the After block but I'm not sure if there is a name for that design p...

16:44
0
Q: Puzzle 8 Resolver in Python - I can't find frontier neighbors correctly and quickly

Alessandro CorradiniI have to do a 8 puzzle resolver with bfs, dfs and A* algorithms in python, but I have some issue(s). This is my output for python driver_3.py bfs 1,2,5,3,4,0,6,7,8: bfs Frontier node before shift: [[[1, 2, 5], [3, 4, 0], [6, 7, 8]]] current node [[1, 2, 5], [3, 4, 0], [6, 7, 8]] Frontier node...

0
Q: VBA: Moving a value into another cell IF the destination does not have an adjacent border OR contain certain text

AntonyI've created a macro that finds the letter "O" in a range, then moves it up one cell if the destination cell does not have a "." or an adjacent border. It works fine, but I've heard that the use of the "GoTo" statement is something that should be avoided as much as possible (leads to spaghetti c...

16:58
0
Q: Lucky Triples in Haskell

Adam SmithIn answering this question on Stack Overflow, I decided to stretch my legs in Haskell a bit to see if I could implement a solution to find the count of lucky triples in a list of ints. A lucky triple is any triple (j, k, l) where j <= k <= l and l `mod` k == 0 && k `mod` j == 0. A correct implem...

17:12
0
Q: Bakery redone - C

EugeneProutI have started to learn C and decided to recreate my bakery task in C. As I am new to the language, I am unsure if I have approached the task in the right way using structs. Feedback on the style of the code would also be appreciated. #include <stdio.h> double cup_ingredients[4] = {4.0,0.1,12.0...

Monking!
17:46
0
Q: Excel VBA counting total-of-rows written on current day

mizechOn my work I maintain an Excel-sheet which contains information about the incident-tickets I've processed. I've enhanced the sheet with some VBA-code which I use the following way: In the beginning of the work shift I start a new section by entering the current date into the first column. The da...

18:00
0
Q: linspace c++ and unit tests in catch BDD

GiladI have implemented matlab's linspace function /// linear_space - linearly spaced vector /// linear_space(a,b,n) generates N points between a and b /// the goal of the function is to return an evenly distributed set of n points inline std::vector<double> linear_space(double a, do...

0
Q: Numbers to words

VortixDevA bit of code I made in VB.NET to convert the digit form of integers into words. I've intentionally assumed that inputs will match the desired format since the focus of this task for me was to appropriately handle the logic required to complete such a task from valid input. Due to this, there is...

18:18
@Phrancis Monking.
0
Q: Improvements for ugly reflection

GiantTreeI have a project that uses a library to save serialized objects in items and loads them again, when needed. To do the de-/serialization, this library uses Gson. Due to how Gson works and how the library is set up, I can't add support for custom types easily and thus have to rely heavily on refle...

18:36
user image
5
19:26
-1
Q: Rectangular Matrix Class

hsuyip I've made a simple Matrix class to learn C++. It doesn't use Templates so it only works with double. I made it this way to really understand how to work with objects and memory. I'll probably move to the next level once I get feedback on this one.How can I improve it more? Please explain why I...

remonking
20:03
0
Q: Python implementation of stack to return minimum in O(1) time

Zaid HumayunI have written a stack in Python that is required to push, pop and return the minimum of the stack in O(1) time. #!python3 class Stack(): def __init__(self): self.items = [] self.min = None def push(self, item): self.items.append(item) self.minimum() ...

0
Q: Designing better web api controller

kuskmenOverview I am designing one api that will be integration with another system, however I stumbled upon one code which I know it can improved but I don't know how to do it properly. Code [HttpPost] [Route("Reserve")] public IHttpActionResult Reserve([FromUri]ReserveData reserveData, ...

0
Q: JavaScript Python Arrays

Patrick RobertsHere is an implementation in JavaScript that attempts to resemble Python-like arrays by mimicking slice comprehension for both getters and setters, as well as negative indexing from the end of the list. I've called it List just because; this name has no particular importance to me, so suggestions...

Just a note: I'd never pass that code in a code review. A for and its code block on the same line is horrible to read. If you want our help (which we're not even paid for) at least have the courtesy of formatting your code so we can read it. — Almo 20 secs ago
20:32
No, it's not normal - you're doing something wrong, but nobody here can tell you what without seeing the code... and even then, if your code is working as intended, but is just inefficient/slow, then you would get much more thorough input on Code Review. Please make sure you read how to ask and what's on-topic (and what isn't) on Code Review, because their rules are wildly different than those of Stack Overflow. — Mat's Mug 21 secs ago
Posting this on codegolf is unlikely to get you useful responses. Try CodeReview. — Jarko Dubbeldam 23 secs ago
0
Q: Travelling salesman implementation

TTTI am working on an android application the travelling salesperson problem (a list of cities and the distances between each pair of cities, counting shortest possible route that visits each city exactly once and returns to the origin city? I am working on an android application the travelling sale...

0
Q: Is it possible to do better?

Aleksey Budaev How can I reduce the amount of code without losing quality? What are your tips? Your comments on the structure, logic, in general, everything. How to make the type of data entered by the user determined automatically? using System; class taskTwo { static void Main() { int x, y; // Decl...

21:29
0
Q: Endless loop triggered by form created with php exit call

Anthony HaffeyI'm trying to create a very basic login process using $_SESSION and $_POST with php, not worried about security at all at this point. I thought I could do something minimalistic like the following, but once the user has logged in, it loads a page, within a page, within a page etc., which wasn't h...

22:04
0
Q: Parse JSON fromGoogle Directions API

ProI parse a JSON from source like the Google Directions API. With my current code i get no error but I'd like to improve this if possible and am also looking for suggestions for improving the code quality. I tried to paste my code intop here but i could not. Downlaod my class Reader Download my ...

22:54
0
Q: Best Practices For Writing Memory (RAM) Efficient CSS

lolzery wowzeryWhat are best practices for writing memory-efficient CSS? Like what are does and don't regarding CSS's memory usage? Are there any 'evil' CSS properties that should be avoided at all costs? (etc.) For further clarification, please read the bullets below. What I mean by memory is not the hard di...

23:52
0
Q: Copy color image and convert to gray scale

overexchange Assignment Batch Grayscale You have learned how to convert an image to grayscale, and how to select and process several images to convert them to grayscale and display them. You also learned how to copy an image and save it with a different filename. Now put this all together in one ...


« first day (1524 days earlier)      last day (2788 days later) »