« first day (1427 days earlier)      last day (2595 days later) » 

12:00 AM
RELOAD! There are 3686 unanswered questions (91.4365% answered)
 
-2
Q: Compile linux kernel without mutex support?

Mr ZachI have some problems with an kernel modul. This module has been cross compiled on an other system for the ARM platform. this is kernel 2.6.37. this modul crashes every time it tries to perform something related to creating/releasing a mutex. WARNING: at drivers/tty/tty_mutex.c:31 So the questi...

 
12:41 AM
0
Q: Average across direction-specific average speeds and probabilities

kilojoulesI have a wind rose with 72 evenly-spaced directions, spanning 360°, each describing a direction-specific average wind speed and associated probability. We must condense this information to 36 evenly-spaced direction bins. I average across the midpoints of each bin, which results in undesirably sh...

 
 
2 hours later…
2:17 AM
0
Q: Not sure if my .NET use of Task.Run(..) is the proper usage of running some async in some sync code

Pure.KromeI've got a C# library that helps testing the .NET HttpClient class. Being a library I have no idea how/where my library will be consumed/used: - A console app? - An ASP.NET app? With this in mind, I'm not sure if the code I have written is acceptable and won't cause deadlocks for a .NET applica...

0
Q: Simple Dictionary Chrome Extension

Tristan SunHey guys so I have created a Simple Dictionary Chrome Extension. It is using javascript/ some html/ some css. The Manifest.jso file talks about the extension. The HTML is for a small/simple pop up. And the JS is for the popup and user interactions. Thanks so much for any review much appreciated! ...

 
 
2 hours later…
3:50 AM
possible answer invalidation by Jamal on question by Learn2Earn: codereview.stackexchange.com/posts/159365/revisions
If the code works and you're asking for advice on how to redesign it, CodeReview.stackexchange.com is the appropriate place. SO is for help fixing code that doesn't work at all. — Barmar 5 secs ago
 
4:04 AM
Kaitlin Pike on March 30, 2017

At Stack Overflow, keeping your information safe is our top concern. And as a community with over 40 million people each month, it has to be: Our success has made us a frequent target of attacks.

Computer security is always evolving. Passwords are you “what you know.” Smart cards are “what you have.” We decided to ask “how you do you.”

Today we’re proud to publicly launch that latest evolution.

This security update is the result of years of work, requiring advances in many fields such as computer vision, AI and advanced calisthenics. …

4
 
4:49 AM
Monking
@Feeds Can't stop laughing ! LOL
 
Monking!
 
Monking @Phrancis
 
5:35 AM
0
Q: I wanna create "Factory" which produces a "connection" object

Gordon Freemanguyz! As you know I am a newbie in C# and in OOP in common. I decided a create a class, that should give out a "connection" object. Need an advices and critique (I hope you forgive me my English - it is not my native language) public class Connection_Factory { private string Last_Connection...

 
@Feeds LOL
 
0
Q: Is It possible select multiple items for this Ecto Query?

DoughI am getting 3 different items and putting them into a map like this: current = Rank.current_rank(x.id) |> Repo.all best = Rank.best_rank(x.id) |> Repo.all worst = Rank.worst_rank(x.id) |> Repo.all Map.put_new(x, :rank, %{best: best, worst: worst, current: current}) Is there some way to get al...

0
Q: Word Search Script

user135073I made a script that can search a word from a list that is made from a .txt file. Im a beginner at python (and programming). Just want you guys to criticise it. Have fun and tear it apart! :D file = open('world_languages.txt') i = 0 c = 0 lst = [] for line in file: lst.append(line) srch = 'y' wh...

 
Facebook just crashed Firefox, wat
*closes Facebook*
 
6:06 AM
0
Q: Anagram substrings in a string

HarshaI was trying to solve this questions: Given an input string, find all combination of unique substrings, which are anagrams of each other and distinct from each other. The substrings must follow 2 <= length(substring) < len(original string). Example 1: String: “vadapav” substrings: va, vad, vad...

 
6:29 AM
@CaptainObvious Wow, that's a heck of a lot of code for one question
 
Monking!
 
6:49 AM
@Gemtastic Monking!
 
7:04 AM
Monking humans
 
Monking cartoon character
 
@Phrancis LOL. :)) Haha.
 
currently drowning in Node libraries... pls send help
 
oh, there's no cure for that, you unlucky monkey :(
 
7:22 AM
I'm currently considering whether to start a [not hugely complex] project (refactoring/rewriting of an Angular project to React) from scratch with just what we need, or to start with a big, fully-featured template with what looks like a large amount of bloat
I don't even know what at least half of the template's dependencies in package.json are even for
 
@Phrancis I'd first choose the 3rd option: have a coffee. Then choose between the first two options
 
@Dex'ter It's past 3:00 AM and I'll be going to bed and starting my weekend when I wake up :)
(I have a pretty unusual schedule)
 
@Phrancis Oh, right. Then have 2 coffees. Sleeping is too mainstream. If you need to do some node project don't: sleep, breath, blink
 
LOL
 
This is indeed for code review stackexchange, but I couldn't select this in the flags. — Zimano 5 secs ago
 
7:27 AM
Maybe I can begin hacking a few things together trying option 1 and see if it feels right
 
@Phrancis I'm saying this because I recently had to take over a project which uses JBoss and Node at the same time. It was that very moment when I thought McDonald's doesn't sound like a bad idea at all
 
@Dex'ter That sounds dreadful
Wait, JBoss is for Java, no?
 
@Phrancis Exactly ! It's like a dream coming true! (NOT)
 
Java and Node.js don't sound like the kind of things you'd want to purposefully mix together
I suppose it depends what you're doing with them
 
0
Q: Generate 16 digits unique code(like product serial) with Java

Juneyoung OhI am not sure what to call this type of code(16 digits numeric, alphabet mixed code). Conditions like digits are limited 16 numeric, alphabet mixed No duplication allowed Here is my code(One class with main method) public class QuadraDigitCipherGenerator { // Step 1. Generate 16 digit w...

 
7:40 AM
Also I just realised, your code is working fine and objective of this question is optimisation. So Should this not belong to CodeReviews? — Rajesh 55 secs ago
 
7:51 AM
@Dex'ter Wow, just the template without any of the project content added is almost 54K files O_O
 
@Phrancis yup. I've got used to it already
 
@Rajesh This would get closed on Code Review as example code. See the topics page there. — Phrancis 48 secs ago
 
8:53 AM
I'm voting to close this question as off-topic because it is about Codereview and should go to codereview.stackexchange.comtobias_k 34 secs ago
 
5 AM, s'pose I could go to bed now ;)
 
@Feeds They're early.
 
9:46 AM
0
Q: regular expression for telephone/mobile per country and variable naming

vims liuwould like to know if there is a better approach in doing a telephone/mobile number regular expression for specific country. this includes naming variables like how to know if format is international format (is it with + sign?), a national format (is it the area code enclosed in parenthesis) or a...

 
10:06 AM
0
Q: I feel this codes looks very non standard and unreadable what else is missing?

TaraGurungI never used to care about the coding standards not even use exceptional handling.But this days I try to make my code best of its kind and make it better from all the prospective.The first version was very bad I have made many changes and brought to this stage. What else do you think are missing...

0
Q: Set with custom compare correctness

pergyIn my project I use std::set with custom Compare function for maintaining an event queue. It fulfills following criteria: event duplication is not allowed should maintain the insertion order (tried std::vector first, but that performed poorly because of complicated duplicate removal) The imp...

 
10:40 AM
0
Q: Code optimization

MapetMy part of code that i will post has task to calculate year capacity of excavator.So i need your help how to optimize that code, i waas thinking about arrays or list but i have a problem with for loop cause my formula is not the same so please red the code a give some suggestions.And don;t be aff...

 
10:54 AM
0
Q: Fitting multiple piecewise functions to data and return functions and derivatives as Fortran code

StefanSBackground For a future workshop I'll have to fit arbitrary functions (independent variable is height z) to data from multiple sources (output of different numerical weather prediction models) in a yet unknown format (but basically gridded height/value pairs). The functions only have to interpol...

0
Q: Dynamically adding rows to HTML table

DurgaGiven the following HTML form and table <table id="transaction" class="display" width="100%" cellspacing="0"> <thead> <tr> <th>Name</th> <th>Email</th> <th>Min</th> <th>Max</th> </tr> </thead> <tbody> </tbody> </table> <form id="localStorageTest" method="post" action="">

 
11:20 AM
0
Q: Finding the samallest yellow rectangle

AdamI have implemented the following methods in 1 and 2 and need feedback to improve my implementation.Any different approach and ideas are welcome. A static method, minRectangle, accepts an array of rectangles (objects of type Rectangle) and returns the rectangle with the smallest area. Creat...

 
12:00 PM
possible answer invalidation by drewd423 on question by drewd423: codereview.stackexchange.com/posts/159360/revisions
 
12:36 PM
0
Q: UNUSED() with teeth in C++11 debug builds

HostileForkWhen you turn up the compiler warnings with -Wunused-variable, one tends to then employ an UNUSED() macro, to say something is intentionally not used at this time. But that's not very binding, since it's generally just a void cast (or near-equivalent). Hence if you get the warning, add an UNUSE...

 
12:55 PM
@Duga Reverted.
 
this likely belongs at codereview — mplungjan 37 secs ago
 
Monking @Mast
 
Naruto answer; accepted non-selfie answer with 0 score: Ruby Select uniq in one statement
 
1:16 PM
0
Q: Off Canvas Menu and Content Panels with Transitions

Matt HerbstrittAny and all feedback appreciated but I'd especially like suggestions pertaining to: Naming of classes CSS code organization Possible performance improvements Alternative approaches There also seems to be a lag/jolting when transitioning to the off canvas content but only in Chrome and only on...

 
1:33 PM
0
Q: Implemeting simple Siemens USS Protocol

Max R.First of all: I'm completely new to C# and therefore I am not quite sure about the garbage collector. I try to implement the USS Protocol by Siemens. I tried it this way: Ready file, byte per byte and pass it to the parsing function USS.RX() USS.RX(byte ucByte): Message Start -> Should be Star...

 
Based on @Steven_Rumbalski 's comment, I created a thread on CodeReviewdrewd423 9 secs ago
A lot of things are wrong: none probably should be None, one code path prints output the other returns a value, type checking is a bad idea but if you did need it isinstance(a, (int, float)), and finally this isn't a code review service. — Duncan just now
 
-1
Q: seeking help in Linux

m.tI have been asked to extract information a subscriber(information in subscribers text file) and display all the calls made by that subscriber(information in calls text file). and i do not know how to go about it. How do I extract information from another text file in bash

 
1:51 PM
I was like what is that blog post, what is Dance Dance and then will have access by tomorrow, April 1, yep almost google search for things mention in the blog post. (didn't see the video I'm at work)
 
2:02 PM
Unless your code doesn't work or your want to improve its efficiency, this question is better suited for Code Review. — Eli Korvigo 18 secs ago
 
-2
Q: Do I need a try/catch block around window.print() in JavaScript?

RobertI've inherited a JSF code base that allows users to print pages in the browser. For that it uses the following piece of JavaScript: function printReport() { try { window.print(); } catch (ex) { // die gracefully } } I am wondering: What and under what condition...

0
Q: Code for filtering in ArrayAdapter

Marek CzaplickiI have created a code for filtering a list of strings and redisplaying this list. I check if string is starting with a certain letter. It seems to work, but I wonder if I did all right? Havent I forgot about something? public class AlternateRowArrayAdapter extends ArrayAdapter { private int[...

 
2:30 PM
possible answer invalidation by kilojoules on question by kilojoules: codereview.stackexchange.com/posts/159406/revisions
Your question isn't off-topic per-se, but note that if you're looking for ways to improve your already-working code, or just some feedback on any/all aspects of your working code ("working" is crucially important), then you'll be happy to hear about Code Review, where you present your code and tell reviewers what it does and how it does it, and reviewers then proceed to help you make it bullet-proof, readable, maintainable, extensible, secure, performant, etc. — Mat's Mug 13 secs ago
 
@pacmaninbw Monking 🙂
 
2:45 PM
0
Q: High concurrency and channel usage in Golang

Georg BuskeI created the following one off script and it did the task quite well (1000s of requests / second with low CPU usage - outperformed the previous python script in every aspect). But I am wondering if there are more "gophonic" ways to accomplish this in Golang? (the word for pythonic in Go? :p ) T...

 
2:58 PM
0
Q: Web scraper in Node.js

beckahI'm trying to create a scraping API in Express. The API scrapes the different articles featured on the home page. Here are the issues I'm trying to resolve: My code's turning into a ton of jquery select statements. How can I resolve this / How can I simplify my code or extract functions from t...

 
3:28 PM
Monking!
 
0
Q: how to remove array items in a json array (NoSQL)?

JayJayin this project I'm working with NoSQL databases (couchdb) and Node.JS using ES7 (via Babel). This is my code to remove items from an array of addresses in a JSON document. If you see something that could be improved let me know: serviceInstance.removeAddress = async function(groupId, index) ...

0
Q: C# recursive statement with linq

Ortho Home DefenseI have a recursive statement that removesactivities that don't have a resource type for a certain OrganizationID. I was wondering if there was a better way to do this where I can eliminate some of the for loops and use a little more linq private IEnumerable<SubProjectDto> GetProjectAndActivi...

 
3:44 PM
Prevention is better than cure. Merge request builds solves this problem with gitlab / github. You build, run tests before merging. Don't know how it works in Gerrit. Do you use gerrit for code review and can change sets be built separately. — Vishwanath 38 secs ago
 
1
Q: First time using ES6, looking for feedback on a cron module I created

Robert YatesI just created my first ES6 module in node, and first time using promises. And I was hoping to get some feedback on it. I am the only developer at my current company, so I cannot get feedback here. I just want to make sure whoever comes behind me in the future can have a clean code base to work i...

0
Q: Python script to synchronise your locally cloned fork to its parent github repository

RatanShreshthaI recently wrote a python script that syncs your locally clone repository to its parent repository, so I would like you to review it and help me in improving it. #!/usr/bin/python3 # coding=utf-8 __author__ = "Ratan Kulshreshtha" __github__ = "RatanShreshtha" import os import sys from subproce...

 
4:08 PM
0
Q: Generating Resource URLs in Multi-Layered Web API 2 Project

Umut EsenI have a requirement where I need to include resource URLs as part of JSON data returned from the endpoints of my API. The solution currently has the following structure: App.Api (Controllers, Routing etc.) App.Service (Service Classes, DTOs, Exceptions etc.) App.Data (Repositories, Entity Fra...

 
4:21 PM
0
Q: ASP.NET Core singleton acting as an HttpClient provider

M MichalI have created an ASP.NET Core singleton service class to act as an HttpClient provider after reading that reusing an instance of HttpClient is encouraged. However, I also want to be sure that the BaseAddress property is kept up-to-date with the value specified in the configuration so I added a d...

 
Oh right.. It's 1 April tomorrow, I already almost fell for something
 
4:40 PM
@Fede What you overall are asking for is a Code Review which is another site on StackExchange. StackOverflow is for individual questions regarding a specific problem you are having difficulties with in your code. On SO you should post a Minimal, Complete, and Verifiable example and a relevant question to the minimal code. — BenH 31 secs ago
This would be a better question for the code review SE. — Igor 23 secs ago
hi @celtics33, this is the wrong place for you. 1) you need an mvce 2) as you are trying to develop a game, code review stackexchange will be a place more fitted to you. — Andy K 23 secs ago
 
0
Q: Simplyfy 2 filters based in same array

jocI have an array of objects, this numbers can be selected only if the orderable quantity is bigger than 0. I have a select all checkbox that is checked or unchecked accordingly with this function: self.allSelected = function () { return self.shownNumbers().filter(function (number) { retur...

 
Thanks, I did not know about the existence of this code review on Stack Exchange. — guenam 15 secs ago
1. All code must be posted here directly when possible. 2. If your code is complete and works, it should be on Code Review. — Carcigenicate 45 secs ago
@celtics33 has you have nothing to present, CodeReview SE is not the right place for you too. As MooingRawr is saying implicitly , no ded — Andy K 30 secs ago
I'm voting to close this question as off-topic because seems a better fit for codereview.stackexchange.com — Stedy 1 min ago
If you have ugly, repetitive, inefficient code that works as intended but that you'd like to improve, put it up for peer review on Code Review. Describe its purpose, your design decisions and your concerns, and reviewers will be happy to help you make it more efficient, readable, maintainable, performant, secure, etc. — Mat's Mug 5 secs ago
 
5:10 PM
1
Q: In Java determine if an input is an integer, a double or a String

PhilI created a method to test whether the specified input is a double, int or String and then pass it to a 3rd party library which has the methods "doFoo" which accepts either a String, double or int. This is the method that I would like feedback on: public static void testString(String val) { ...

1
Q: Employee Compensations Query

Cache StaheliI have a pretty straightforward query that I am essentially hard-coding. I have a table with 3 keys and a description field. The first key has to do with the type of compensation for an employee (Award, Hourly, NonHourly, Staff, Other, and Commission). The next key has to do with Payment Freq...

 
5:47 PM
1
Q: Imbricated If/else conditions in Javascript

guenamI'm learning the MEAN stack and I struggle getting better in the way I code javascript/typescript. I've read several resources online about "coding style" but it's only partially relevant: What I'm looking for are the Hemingway rules for writing JS. How to make this more clearer & efficient ? ...

0
Q: Spigot plugin protecting servers against bots

PatrickI wrote two plugins with the Spigot-API. It would be very nice if you could give me any advice so I can improve my code. (The projects are to large for a post) https://github.com/ReflexArtZ/NoBots

 
6:22 PM
0
Q: why does my hashset contain duplicates?

J.SchoetersWhen I create a hashset for my elements, for some reason I can add duplicate elements to it. I did override the equals and hashcode methods. Underneath is a bit of my code and an example of my problem. set.add(new element(new Point2D.Double(0,1), new Point2D.Double(2, 3), true)); set.add(new ele...

0
Q: Currency Converter in Python 3

LakshyaAgBeginner Python developer here. I was tinkering around with Python and decided to build a currency converter. It takes in input from the user and prints out the converted currency values. The fixer.io API is used to get currency rates. Looking for any improvements that I can make in it. GitHub ...

 
6:45 PM
I'm voting to close this question as off-topic because it asks to review working code, thus it should go to codereview.stackexchange.com ... — GhostCat 8 secs ago
 
0
Q: Returning to Javascript, could use from honest feedback on a small script i whipped together

r10y/** Example Usage var str = '{{ App_Root }}/apple/sauce/{{ OK }}'; var context = { app_root: ':-)', Ok: '' }; T9r.replaceTokens(str,context); */ // T9r ~ "T{oken Parse}(9)r" const T9r = function(){}; /** A helper function to process and replace all tokens within a string. */ T9r.rep...

 
7:04 PM
2
Q: String scrambler written in C

jakehimtonI've created a basic password scrambler that can run a single string or a file. It will take your character, find the ascii code value of it, floor it, divide it by 16, grab whatever that equals out of the cipher array, and replace it with that character. For example: e@ubuntu:~/bin/c$ ./ciph.ex...

0
Q: Python - Flask Middleware - Request Session Management Strategy

BusturdustI am trying to determine what the most appropriate strategy for session management and authentication is for a middleware application which acts to receive a request, send it over to a database, and essentially echo those results back to the client. I have a variety of functions that look like t...

 
7:40 PM
possible answer invalidation by M Michal on question by M Michal: codereview.stackexchange.com/posts/159454/revisions
 
8:08 PM
I'd post this on codereview.stackexchange.com — scsimon 8 secs ago
I dunno. check Q&A on SO and read a lot on python basic structures & list comprehensions. Also practice a lot and check codereview.stackexchange.com to see how average code is criticized & improved, with explanations. Practice & practice. — Jean-François Fabre 43 secs ago
 
8:26 PM
1
Q: brainF*** interperter in lua

lenscasFor a personal project I may need to load and execute something that will basically be a very simple programming language. Though I am not at all close to this part of the project yet and I can most likely use something that already exist (just embedding lua is probably an option) it got me inter...

 
8:46 PM
 
-2
Q: Is Entity framework 6 slow?

alertWe are developing an application and using entity framework, but their are very bad reviews for entity framework like it is buggy and very slow. We need a high performance application so is it true that entity framework is not a good choice and why .Also whats the other alternate then(for .net o...

 
I'm voting to close this question as off-topic because improvements to working code belong on CodeReview.StackExchange.com — Prune 51 secs ago
Sorry wasn't even aware of code review. I'll remove and repost, thanks! — travBoog just now
 
9:20 PM
Thank you for the timer data. I was curious about that. Now that it is working, I'll bet a trip to Code Review - Excel would produce a parallel solution with 2-D variant arrays that would take seconds instead of minutes. — Jeeped 15 secs ago
 
0
Q: Radix sort implementation

user3079275I have a problem where I need to sort an extremely large number of numbers but the numbers are in a narrow range (0..r-1) where r is typically around 10, and after googling around a bit it seemed like a good time to use radix sort. I have the following implementation below (I had to extract it ou...

0
Q: Optimize this loop?

travBoogI have this loop that builds a BOM but it is so slow as I scale it out to even modest data. All the data resides in two database tables. I am pulling the data in as list of lists and then iterating over them. The orders table contains the product serial number and the top level root part numbe...

0
Q: Simple calculation JavaScript

RyanHi I'm just starting to learn javaScript and I'm stuck on this particular problem, The purpose of the program is to take three inputs from the user: balance, charges, and credits and calculate the users new balance. I'm able to enter in the three variable but i cannot seem to get an output for ...

 
I'm voting to close this question as off-topic because it belongs on another site in the Stack Exchange network: codereview.stackexchange.comvol7ron 18 secs ago
 
9:54 PM
@CaptainObvious Oh wow.
 
0
Q: need help have assinement

user135152Hey lads please I have an assignment and I am still beginner in java so I need help please option 1 how to prompt the user to enter a product name: then you must loop through your product(any) and find the one with the correct name

 
I just wish it worked.
@Phrancis'DROPTABLEUsers-- Nice name.
 
@Hosch250 thanks!
It's unfortunate that SE wouldn't allow ; chars in user names... But for good reasons I'm certain :)
 
10:10 PM
@Phrancis'DROPTABLEUsers-- Use the Greek question mark.
 
possible answer invalidation by raykrow on question by raykrow: codereview.stackexchange.com/posts/159267/revisions
 
10:42 PM
> Display Name can only contain letters, digits, spaces, apostrophes or hyphens and must start with a letter or digit
 
Aw.
 
11:33 PM
Stack Overflow isn't really for working code that doesn't have any problems. You should check the Help Center at Code Review to see if it fits there. — BSMP 57 secs ago
 

« first day (1427 days earlier)      last day (2595 days later) »