« first day (1550 days earlier)      last day (2763 days later) » 

00:00
RELOAD! There are 4212 unanswered questions (90.8675% answered)
0
Q: Python Character Creator Program

GregQ1. Can the following code be made more efficient and simple? Q2. How is the general structure of the code? Q3. Would this be better written in def/classes? If yes, what would the code look like? Any other opinions/ tips are completely welcome. Thank you. # Challenge 3 // Chapther 5 Python fo...

00:16
You need to ask a specific answerable question for Stack Overflow. If you want open-ended feedback, you'll have better luck on codereview.stackexchange.com. — meagar ♦ 27 secs ago
00:34
Code Review Stack Exchange would be more appropriate — Anthony Pham 37 secs ago
Code Review Stack Exchange is the appropriate site for this question — Anthony Pham 38 secs ago
0
Q: Finding ideal sport based on weighted attributes

hawaii12The program takes weighted strengths of the human body (arms/legs/core/mind) based on the required attributes for a sport, then tells you the resulting sport. The program is obviously really ugly. Is there a way I could use dictionaries and a lambda function to find a max instead? This latter par...

0
Q: CodeIgniter cache replacement

AlexCodeIgniter has a query caching class that is initiated in the query function of the DB_driver class. Originally it was designed to store queries associated with a specific controller by using URI segments (segment 1 + segment 2). I found this a rather strange implementation if one is running bot...

Are you asking for someone else to write your code for you? That's not really what Stack Overflow is intended for. Generally, we expect you to have tried something and hit a snag. There are existing great resources for FizzBuzz in Rust: One from Chris Morgan, a Code Review question, etc. Simple Internet searches yield many good results. — Shepmaster 41 secs ago
01:02
If this is working code, and you want performance feedback, then [Code Review](codereview.stackexchange.com) is the appropriate place. — Mark Thomas 7 secs ago
01:30
0
Q: C# converting a JSON object to XML to be passed to an ASMX webservice

NotarasWhat i have is a scenario where we need to be able to call any ASMX web service and pass any data structure to it that has been constructed on the javascript side. Till now, i have been creating service references for asmx web services in order to call them but in this scenario, i can no longer d...

02:00
0
Q: Google API Very Slow

Julshttps://stackoverflow.com/questions/45407147/google-map-api-very-slow?noredirect=1#comment77776321_45407147 It's taking almost 2 minutes to load all the pins on this google api map. Every time the page is loaded it sends a request for each location one by one. Can it do this all at the same time...

02:51
0
Q: Thread safe ConcurrentDictionary wrapper

Matthew FaiganI needed some features that ConcurrentDictionary doesn't have (such as a maximum number of items) so I created a wrapper around it. This is my first time working with thread safety and want to fix any major mistakes that I missed before anybody uses this code. using Discord.WebSocket; using Syst...

Since you posted on codereview, you should probably delete this question to avoid getting separate answers to the same question. — Fuhrmanator 47 secs ago
03:16
0
Q: Google API Very Slow

xocheeriooohttps://stackoverflow.com/questions/45407147/google-map-api-very-slow It's taking almost 2 minutes to load all the pins on this google api map. Every time the page is loaded it sends a request for each location one by one. Can it do this all at the same time? Or preload the map beforehand? How c...

03:35
possible answer invalidation by TerNovi on question by TerNovi: codereview.stackexchange.com/posts/169812/revisions
IMO this is the kind of stuff that should be picked up in the code review if you guys do it. I've peer review in several projects and you end up with nice code that is known and agreed by more than 1 person. — Totò 7 secs ago
03:55
possible answer invalidation by user1118321 on question by Joker: codereview.stackexchange.com/posts/138929/revisions
You know that's not what I meant, @Wolfram_Alpha https://t.co/mdN6cCp4dE
This is hilarious
04:35
I just realized I have a lot to learn about TDD.
Welcome to SO. I think it looks fine. If readability is good like in this case, additional comments are not needed. As pointed out, for future code reviews use codereview.stackexchange.comc0der 8 secs ago
04:48
Oh wow, Python has you OOP all test cases. In their own separate classes. That's tedious...
Better refactor this and get a review soon.
0
Q: Shape area calculator

raven rogueI am a student who is a beginner at Python, and decided to make a simple program to help me finish my homework. While the program below will probably not help me with my homework,it is still one of my first mini projects. It would be great if you review my code and tell me how I could make it mor...

 
1 hour later…
06:07
0
Q: Making lists symmetrical by merging elements

thom-wMy code is based around the following problem: http://orac.amt.edu.au/cgi-bin/train/problem.pl?set=aio16int&problemid=903 It's about making a series of plots of land symmetrical by knocking down fences, but out of context of this problem, the code: Takes a list, makes it symmetrical by adding e...

06:18
Monking
@Heslacher Monking
Monking
07:10
0
Q: Limit items in for loop

spicyramenI have process_articles function: rank_articles returns sorted_articles which is list of the Articles custom class. I just want to print the first 100. Looking for the pythonic way to stop loop at 100 without an index (idx). def process_articles(limit=100): """ :return: """ art...

Monking
@enderland There is a somewhat well-documented API at lua-api.factorio.com . If you are lucky only one file is enough: control.lua. But it depends on what you want your mod to do. I also look at a lot of other plugins that has some feature I want (like the area selector I used for Lamp Placer) to see how to do something.
I don't think my mods has that many files though. Visual Signals is probably the one that has the most.
@Phrancis Not sure I follow, but you're supposed to put your unit-tests in a separate file in it's own test class. One of the odd cases you'll see boilerplate in Python.
07:40
@Phrancis The rest of his tweets are fairly funny as well.
07:59
Doesn't seem like a good idea to me. I'd rely on code review to catch "adding a constructor without chaining to the master one" and end up with more readable code. Note that in real life situations you're likely to have to chain to the master constructor for other parameters anyway. The instance initializer can only help with state that doesn't rely on constructor parameters. — Jon Skeet 32 secs ago
08:11
0
Q: Robust Addition of date and time Excel columns

cbasahI am trying to create a robust way to add two Excel columns to generate a datetime value, one that may contain a date and the other that may contain a time value. If dateCol > 0 And timeCol > 0 Then If IsDate(rowRange.Columns(dateCol).Value) And IsNumeric(rowRange.Columns(tim...

08:39
Working code should be reviewed at Code ReviewFilburt 18 secs ago
Monking
@Duga RBA, possibly incoming.
@Vogel612 Monking
0
Q: Unit testing objects with nested properties

Lorenzo BI would like to know what is the best approach in order to unit test objects with nested properties. This is the structure I'm using. ContainerType is a sort of wrapper objects. It contains two String properties and an HolderList property. HolderList is an object that contains a list of Holders ...

1
Q: Calculating the sum of array values

Aleksey BudaevAm I doing the right thing, hiding the implementation of the method in a separate part of the program? That is, the user interacts only with the Enter class, and all that concerns the implementation of this class lies in another class. For simplification purposes. // Step 1: Declare variables in...

Container container = operation.getContainer(request);
assertNotNull(container);
assertEquals("0", container.getOutcomeCode());
assertEquals(1, container.getHolderList().getHolders().size());
assertEquals("123456", container.getHolderList().getHolders().get(0).getCode());
assertEquals(2, container.getHolderList().getHolders().get(0).getGroupList().getGroups().size());
assertEquals("123456", container.getHolderList().getHolders().get(0).getGroupList().getGroups().get(0).getCode());
assertEquals(1, container.getHolderList().getHolders().get(0).getGroupList().getGroups().get(0).getTitleList().
TTBOMK, that's not how you're supposed to unit test.
Got to admit though, it probably works fairly well.
08:58
0
Q: Dyamically extensible threadpool implementation in C

SubhranilPurpose For my recent project, I needed a thread pool. I saw a lot of implementations at GitHub, but most of them were quite complicated. With complication comes performance penalty. Most importantly, none of them provided dynamically managable threads. So I decided to write myself a thread pool...

@CaptainObvious smells like example code
10 hours until Stack Overflow moderator elections end - go vote
09:15
0
Q: DHT11 and PMS3003 Code. How to save in a specific path? Wrong formatting?

PaulI am using pms3003 sensor and dht11 sensor. I got g3 code from https://github.com/Thomas-Tsai/pms3003-g3 (thank you). This code displays to a text file, 20x4 lcd(separate driver), and terminal. 1.) How do I save my data to a specific folder? My code below doesn't work. (save_path) It saves in th...

If this code works, and you're just looking for a cleanup, CodeExchange is probably the best place for this question — Christopher Moore 54 secs ago
09:42
Or maybe you could add this to the wuestion on codereview. Then I can delete this question here, do avoid the dupe. :) Thanks. :) — lampshade 6 secs ago
"What would be a better way to..." questions do not belong on Stack Overflow. You should post this on Code Review. You have 8.5k rep, how do you not know this? — Michael 8 secs ago
0
Q: Bulk Email notifications in Java?

RachelI am written a service which uses the JAVA Mail Api to send bulk email notifications to the recipients. But then I feel that the way I implemented the solution is not really scalable when the number of recipients increases. I would like to know if there is a better way to make my solution more ef...

10:04
you should specify algorithm which you want implement. Provide your implementation and post link to git result with your question for reviewSergii 22 secs ago
10:15
0
Q: Refactor multiple condition statements in map function

NicholasI would love some help or some directions with refactoring this block of code. It perfectly works but it kind of looks ugly ;). It was messier but I tried to make it DRY-er. const uploadedFiles = images.map((item, index) => { if (images.length < 2) { if (item.file.name.match(/.(gif)$/i)...

Why not try to come up with a structure yourself and then ask either here (if you have problems) or at [codereview] (if you want opinions)? This looks like you either need to learn something (and that's best done by trying it yourself) or it's your job (in which case it's you who gets the money for the effort, so show some first ;) ). — Thomas 56 secs ago
10:30
0
Q: Update a register with less database hits (Removing Loops)

David CI ask as I'm mostly self taught, and don't have a team to be able to get experience/challenge or ask. The Requirement I have a register per week. (ie the kind you mark attendance on), with sub sessions (known here as services). Ie, Morning, afternoon, evening etc. It is indicated whether someo...

10:52
Any question with "the best" will be likely downvoted / close-voted as primarily opinion based. You could instead provide the code and ask how to improve it (but would then like get directed to the codereview community...). — freedomn-m 43 secs ago
0
Q: self referencing struct

SleepingPandaI want to create a struct containing both a struct Foo and a struct Boo which is referencing a field of Foo. pub struct Foo { pub field: String, } impl Foo { pub fn boo(&self, start: usize) -> Boo { Boo { field: &self.field[start..], } } } pub struct Boo<'a

This question might be better suited for CodeReview.se — CraigR8806 18 secs ago
11:16
If I saw this in a code review I would only have one comment: rewrite the entire thing. — Michael 48 secs ago
Looks like a code review question rather than any specific technical issue. First step would be to improve the exception handler by removing it. — William Robertson 22 secs ago
@Beginner If you have working code for this task, you can post it on codereview.stackexchange.com for a peer review, Review thischux 23 secs ago
11:50
possible answer invalidation by Mateusz Sobczak on question by Mateusz Sobczak: codereview.stackexchange.com/posts/171625/revisions
Kaz
Kaz
12:08
@skiwi It's been running for about a week, and has made about 1%.
Though that's likely to be drowned out by whatever happens today. Bitcoin Hard-Forks in 10 minutes' time and what that will do to the price is anyone's guess.
@Duga rolled back
12:38
0
Q: jQuery filter performance

fabioI have to filter many times some very long lists of images (thousands, even 10/15k), so performance is important. First solution: var image_match = []; $('#'+id_canvas+' image').each(function(i, el) { if (el.attributes.x.value === x && el.attributes.y.value === y) { ...

0
Q: Handling URL patterns with JS

YconI'm handling parameters that are passed from a URL. I want to keep my URLS neat, and the following (rather exhaustive code) has been able to achieve it. There will be more added, so it would be good to keep it versatile and compact. Code below does work. URLS patterns a.com/ a.com/q=bar a.co...

0
Q: Strings: Making Anagrams

a-inaProblem Statement Input Format The first line contains a single string, a. The second line contains a single string, b. Constraints 1<= |a|,|b| <= 10^4 It is guaranteed that and consist of lowercase English alphabetic letters (i.e., through ). Output Format Print a single integer denoting t...

12:51
@Kaz Hard-Fork, is that a new music genre?
Monking!
Kaz
Kaz
@Marc-Andre Monking!
@Marc-Andre Monking!
How is everyone?
0
Q: Python 3.x: code improvement for databases linking

francoisFor my work, I wrote a python script to link 2 files. Since I am an autodidact and since no one of my colleagues writes code, I ask the question here. My code takes an unbelievable time to run. Is it possible to improve the following code? (I'm sure it is possible but I have no idea how to make ...

0
Q: Ruby & OOP: FizzBuzz Game

Ovidiu CotaI would like a more elegant solution for this problem, I think the Builder class is not used properly and also the names for classes. Also can those if statements be removed somehow? Problem: Given the array [1, 2, 3, 4, ... 100], print all the elements as follows: if the element can be divid...

13:09
0
Q: Redirect after PHP form Submit with ajax not starting sessions

Oke TegaI am trying to submit a PHP login for with ajax and redirect to the header('Location:)' after submitting the form. But i have searched (well enough i think) and discovered a way to do this is using the javascript window.location() but the issue is that after logging in the session doesn't start.H...

I'll take the silence as everyone is busy and doing fine :)
@Marc-Andre sounds like a good plan...
replace that with "should be busy" for me, but eh ;)
Kaz
Kaz
@Marc-Andre Watching a trading screen, hoping for all hell to break loose.
@Kaz Bitcoins ?
@Marc-Andre hey there
How is the baby ?
Kaz
Kaz
@Heslacher Yep.
My bot loves volatility.
13:25
;-)
-2
Q: Error: unknown host 'services.gradle.org'. you may need to adjust the proxy settings in gradle

Vijay Kumar KRI installed latest Android studio app 2.3.3, this is I am trying to build very basic Android app for the first time without internet connection, but I am getting error like this. Can any one please guide me how to fix this error.

0
Q: How Add to Sqlite database in Rss xml parsa app (offline reding)

SHABAB K Mnow i am making a android news reding app (using rss xml parsa ) itis good working with internet connection . now i wnad to add offline reding option (Sql Database) in my application , (in user reding news then no internet conection show user reding all the news) , sorry my bad english , please h...

@Heslacher She's really great :)! Growing up so fast! 9 months tomorrow! We have trouble with her nights, she's waking up at least 2 or 3 times, but other than that it's really perfect!
@CaptainObvious I'm not sure what to make of this ...
@Marc-Andre that will go away ;-) someday you will wake up smiling because she didn't wake up ;-)
@Vogel612 code not written "now i wnad to add offline reding option (Sql Database) in my application....please help me any develepers" reads like "could you please write the code for me
hmm ... but there is a Downloader class ....
13:33
@Heslacher Ahahah yeah ! That day I think I'll be like, is she ok? :)
@Vogel612 @Heslacher Basically, his code works, but he wants to cache data so it can be read without internet connection available.
So, he wants extra functionality added.
Yes, it will download the data. But it reads like the data isn't stored (semi-)permanently yet.
@Kaz I'm awaiting the white paper.
Extra functionality means code not yet written. In its current state this makes the question off topic unless he/she will reword it.
^^
14:00
0
Q: Bootstrap Tooltip not showing up in kendo UI Grid

l.lijithAs I was workig with KendoUI and Bootstrap,came accross following error: The Bootstrap tooltip is not poping up over my Kendo UI grid. i have tried adding the following commands in my CSS but still did not get to the result: .k-grid-content { overflow: visible !important; }

@CaptainObvious broken
0
Q: Simple LinkedList Implementation in C++

Kemal Tezer DilsizBelow I have a very simple LinkedList implementation. I was wondering if there are any memory leak problems with this and if I used the pointers correctly. I just started practicing with C++ and hoping to improve my use of pointers and memory leak management. #include <iostream> struct node{ ...

14:40
Kaz
Kaz
@Mast Why toaster to freezer?
A new use-case to be tested in every self-proclaimed generic rock-paper-scissors problem.
Basically, a toaster is better at heating stuff than a freezer is at cooling stuff.
Unless you get a very big freezer, of-course.
I had a 3-phase powered industrial freezer here last week, should've tried whether it would win...
Kaz
Kaz
@Mast Ah, I had a feeling it was XKCD.
@Kaz The drawing style kinda gave it away, yea :-)
OK...thanks for for your help guys and....I'll remember Code Review in future, didn't realise this before. — Mike just now
I'm voting to close this question as off-topic because questions asking to review working code should go to codereview.stackexchange.com — GhostCat 53 secs ago
possible answer invalidation by TopinFrassi on question by raven rogue: codereview.stackexchange.com/posts/171722/revisions
possible answer invalidation by Kemal Tezer Dilsiz on question by Kemal Tezer Dilsiz: codereview.stackexchange.com/posts/171756/revisions
15:06
0
Q: LINQ-ifying Colour Generation from Strings

EBrownRecently I was thinking about how Google, Microsoft Outlook on Windows Phone (and now many others) method of giving you a coloured icon with a letter in the centre of it works. Essentially, given some sort of name, they generate a colour based on that name. The kicker is that the same name alway...

1
Q: Makefile for a small JNI project

RodneySo I'm going to publish this small project on GitHub and I thought I'd better do a makefile for it. The source code consists of 1 Java Class 1 Native JNI module written in C 1 stdlib wrapper object written in C (for LD_PRELOAD) The purpose of the Makefile is to compile the two shared objects ...

15:30
possible answer invalidation by David C on question by David C: codereview.stackexchange.com/posts/171741/revisions
@Duga seems like it doesn't invalidate anything here
If it works and you are looking to make it better then check out Code ReviewJoey Grant 21 secs ago
15:54
0
Q: Java: How well the following Code for making a Notepad is Written?

NoviceI wanted to know whether the following Notepad code is written by a experienced programmer or by a beginner level programmer? Expecting your's humble opinion... Click here to see code

16:04
David Robinson on August 01, 2017

Last week, Adobe announced that they would stop supporting Flash by 2020. In some ways this is surprising: I still sometimes run into pages that require Flash, and you can still find a few defenders of the platform in the software development community.

But in other ways it was a long time coming. You can often see the decline of a technology in advance, by examining data on its usage in the software development community. One notable source of such data is in our Stack Overflow Trends tool, which shows questions about Flash have been declining in frequency since 2010. …

Monking
@Kaz Wow, if that's consistent then that's a lot
@Kaz Wow, it's happening?
Kaz
Kaz
@skiwi BCH started trading about 15 minutes ago.
I thought I read some days ago that they cancelled that plan because they agreed to a solution
@Feeds Skewed, especially in relation to JavaScript: >50% of those have score <= 0.
Kaz
Kaz
They did agree a solution, but some people decided the solution wasn't enough, so they decided to go even further.
16:17
So it's not as many as were planning before?
Kaz
Kaz
@skiwi It's ... complicated.
I just checked the Bitcoin subreddit, there's... a lot of salt
16:42
Possibly a better fit for codereview.stackexchange.comj08691 17 secs ago
1
Q: 2-D Kalman Filtering in Python using Numpy

Sam HammamyI am practicing Kalman filtering and wrote a short python class that uses Numpy to calculate the 2-D kalman filter for position and velocity along the X axis: assume that the object is only moving along the X-axis since it's on a flat ground. The following code is syntactically correct and when ...

0
Q: Deserializing a customly formatted string

SamThe component receives a serialized message as a string and a serialized schema as a string. The message contains key-value pairs or just the values. The schema describes how to turn that message into a Java object. Firstly, we parse the schema into a Java object (schema format is known in advanc...

0
Q: Function that can either succeed or fail, but can also throw exceptions, and returns a detailed log of success and failure

user5322657example of my function: public class ProcessDataResult { property bool Success { get; set; } property string Value{ get; set; } property List<string> Log { get; set; } } ProcessDataResult processData(string fileName) { if (!File.Exists(fileName)) { // throw exception } var file...

16:58
1
Q: Add arrow to a form drop down

archana swaminathanI applied a class to in order to display the arrow. In that class, I am using the background image, size and position to display the arrow. Is this the right way to do it? .b-dropDownSelector__selectArrow { background-image: url('/images/glyph-wedge-down.svg'); background-size: rem(...

17:09
More of a code review question. Not a SO stuff. — Arun Vinoth 36 secs ago
@Feeds Got their .NET estimate wrong.
Expect the .NET questions to spike as they get it more and more on OSX and *nix systems.
0
Q: Is there a better way of getting a file?

Walid MujahidPart of my code: def get_file(): custom_data_folder = input("Name of custom data directory - " + "Hit ENTER to default: ") file_name = input("File name: ") default_path = os.path.abspath(os.path.join('data', file_name)) custom_path = os.path.abspat...

17:45
@Hosch250 .NET dieing? lol
Not dying, just shrinking.
I'm expecting it to spike over the next few years.
I wouldn't expect it to shrink a lot
Java might/should take a hit though if they don't change things soon
the most important thing to change is the owner ;)
I don't think I've ever heard plans of that? So doubt it will happen
That will never happen.
18:09
Visual Studio just crashed, and deleted part of a file I was editing in the process. (I compulsively save every time I start a new line, wrote several functions in this file.)
18:29
1
Q: Separating hundreds of thousands of points using vba

VikMy code below takes the following data lines: 2017:06:29T14:12:06,0,0,00,000,0.000,0.000,000,000,040,040,040,0,00,000,0.000,0.000,000,000,040,040,040,0,00,000,0.000,0.000,000,000,040,040,040,0,00,000,0.000,0.000,000,000,040,040,040, 2017:06:29T14:12:07,0,1013,02,000,0.000,0.000,000,000,040,040,0...

1
Q: Noob learning c++ with an rpg game

user2350585Particularly focused on learning object oriented design right now there's some SDL code but it does nothing save generate a window I for now am working with text till I get a better understanding of SDL and graphics in general. My Questions are: is this a good example of object oriented progra...

0
Q: Writing little package for rubber ducks in tikz

samcarterI'm currently working on a little latex package to bring rubber ducks into tikz (a continuation from https://tex.stackexchange.com/a/347458/36296). As this is the first bigger project in which I use tikz I'd like to hear your opinion about the current way it is implemented. I'm looking forward ...

Is this working code that you're looking for a code review for? If so, it might be a better fit for our Code Review site. — EJoshuaS 40 secs ago
Yes, the Stack Exchange network is actually composed of quite a few different sites - they separated out questions about broken code (Stack Overflow) from methodology/architectural questions (Software Engineering SE), tool/library recommendations (Software Recommendations SE), and Code Review questions (Code Review SE), partially because of differences in moderating them. For example, tool/library recommendations are notoriously difficult to moderate well because they tend to draw spam and excessively opinionated answers. — EJoshuaS just now
18:47
@EBrown Any plans to continue the discussion in the comments here? codereview.stackexchange.com/q/171759/31562
It got an auto-flag for lots of comments
I dismissed the flag for now without doing anything, it seemed like the discussion has calmed down.
0
Q: Laravel / VueJs project looking for feedback

CasperI am looking for some feedback on my new project which consists of 2 parts a backend and a frontend. The backend is in Laravel and the front end is in Vue, I am mostly looking for pointers, as what I could do better if there was a smarter way to do something if the structure is weird, etc. The b...

0
Q: C hashtable implementation

YonlifThe following code is an implementation of an hashtable in C. hashTable.c: #include <stdio.h> #include <string.h> #include <stdlib.h> #include "hashTable.h" int hashCode(int key) { return key % SIZE; } /* By given key returns a pointer to a DataItem with the same ...

@SimonForsberg No, they're all mostly obsolete now as I updated the question to reflect the comment discussions.
@EBrown Great! Can you remove your obsolete ones and flag the individual ones that are obsolete?
@SimonForsberg Done.
19:04
No problem. :)
Also gave me 10% of the flags I need for [silver-badge:deputy].
@EBrown Aim for the gold!
@SimonForsberg I'm several hundred flags away from that.
About 437 flags to go before the gold badge.
@EBrown Aim for comment flags, those are the easiest to get. I got about 15 helpful flags on SO just yesterday, without even trying! (I already have the gold)
@SimonForsberg I'm not a "flagger", our mods (you, Janos, Jamal, Mat's Mug) are usually on top of things enough that I'll likely only beat them by a couple of minutes, and it's just not worth it at that point.
@EBrown It's always worth it to flag.
19:15
I don't know, I just don't look at it that way. You guys usually have it handled pretty effectively, I just see myself as a bystander or onlooker, just here if anyone needs any help.
I need to vote more, if I start doing that I'll (naturally) find things to flag.
The reason why we're usually on top of things is the flags.
(Including long comment threads, etc.)
@EBrown Vinder! (Sorry, haven't been Vindering much myself recently)
@SimonForsberg Yeah, there's a bug in it I need to track down and fix.
Here codereview.stackexchange.com/a/166342/35991 is an implementation which should be faster than yours. — Martin R 19 secs ago
19:18
I also haven't been in a good mood for about 6 weeks now, and it's making me a grump-ass.
Sorry to hear that
My air conditioner in my apartment has been out for 6 weeks now (submitted 7 individual tickets to maintenance for it now), so I've been running a portable unit in my living room (so my office is about 85F-90F daily). Yesterday I got home and my landlord had stolen my portable unit.
I managed to get it back, but it's been very stressful for the last few weeks.
possible answer invalidation by Vogel612, Conor Mancone on question by Super Mario's Yoshi: codereview.stackexchange.com/posts/158674/revisions
@Duga fancy how that looks..
19:27
If this works and you are looking for ways to improve the code it belongs on codereview.stackexchange.com This is too broad for this forum. — Scott Craner 37 secs ago
19:48
@EBrown Ugh. I see.
@Hosch250 Found a somewhat reasonable use for local functions in C#7.0:
int clampToColorVal(double v) =>
    (int)((v / 2 + 0.25) * 255);
var color = Color.FromArgb(
    clampToColorVal(numArr[0]),
    clampToColorVal(numArr[1]),
    clampToColorVal(numArr[2])
)
Also, for questions regarding "how can this be simplified/written better" a better site would be codereview.stackexchange.comGibralterTop 30 secs ago
@SimonForsberg Yes, it's been very painful for the last month and a half.
And it looks like it's only going to stay that way.
Currently investigating legal recourse for their actions.
(Or lack thereof.)
0
Q: Use return onEarth() / JUPITER_ORBIT_RATIO Or return AgeInSeconds / (jupiterOrbitalInEarthYears * ageInEarthSeconds)

M GarpHi all I was wondering which is it better to use: double onJupiter() { return AgeInSeconds / (jupiterOrbitalInEarthYears * ageInEarthSeconds); } double onMars() { return inputAgeInSeconds / (marsOrbitalInEarthYears * ageInEarthSeconds); } Or double onJupiter() { ...

Stack Overflow Elections just finished
20:02
@Vogel612 DID I WIN
I doubt it :/
ElectionBot says it's Andy and Cody Gray
@EBrown You live in the United States, don't you? My impression is that you guys sue each other all the time over there.
@Vogel612 I honestly didn't even vote this year.
shame on you, I even pinned a message ;)
0
Q: `Class needs refactored but not sure correct way

James CulshawI have written the following class: internal class CalendarHelper { internal static IEnumerable<DHXBlockTime> GetUnavailableBlocks(IEnumerable<Driver> availableDrivers, string viewName) { var unavailable = new List<DHXBlockTime>(); foreach (var driver in availableDriver...

0
Q: Speed up replace if matching criteria and append the rest

iCosminI have 2 sheets with the exact format, 5 columns (Category1, Category2, Category3, Month, Amount) - "Temp" and "Source". My goal is to copy the data from "Source" to a new sheet("Combined"), append the data from "Temp" but replace the rows that are matching on column C and D with the new rows fro...

Hello Scott. I didn't know about codereview. Thank you, I have just posted the question there. — iCosmin 39 secs ago
20:08
@SimonForsberg Yeah, and it's not as common as you might think. Usually the people suing each other already have lots of money and want to try to take it from someone else. I am only looking for appropriate retribution for the fact that I've had to sleep in excessive heat every night for 6 weeks.
According to the legal code for my state, they're required to fix it within 30 days of receiving a written, certified letter (basically I write a letter then pay the USPS to deliver it to them and obtain a signature verifying delivery), or I can cease rent payment to them, and send it to the Clerk of Courts instead.
(The Clerk of Courts will take 2%+ of the payed rent, then deposit the remainder in an "escrow" account that gains interest, keep all the interest, and send a letter each time I pay the court to my landlord stating I'm paid up.)
Once the landlord fixes the issue to my satisfaction, they can then take the rent that was deposited into escrow and keep it. (If they don't fix it in a timely manner, I am allowed to have it done on my terms and cost, and then deduct the cost to repair it from following rent payments.)
possible answer invalidation by user2350585 on question by user2350585: codereview.stackexchange.com/posts/171781/revisions
@Duga Added supporting code. Seems reasonable.
20:23
I dislike writing self reviews
I'm voting to close this question as off-topic because code review questions belong on codereview.stackexchange.comKuba Ober 42 secs ago
@EBrown I'm staying away from them for now..
@skiwi They have a use, a very restricted, specific use, but a use nonetheless.
I can see the point of not wanting to pass in arguments of a method, and I see the solution, I'm just not sure if I really like it
0
Q: How I should create file tree structure with Hibernate?

Maxim KovalSo basically I have such mapping for Resource, File and Folder: @Data @NoArgsConstructor @AllArgsConstructor @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name = "type") public class Resource { @Setter(AccessLevel.NONE) @Id @GeneratedValue(strategy = G...

20:38
I don't see them being too useful because we already have Action and Func FWIW.
These are basically a more native way of writing an Action or Func. Not sure what LDT expects to happen with them.
LDT?
Language Design Team
On mobile so trying to save keystrokes. Lol
Ah okay
21:04
I'm voting to close this question as off-topic because it belongs on codereview.stackexchange.comAndreas 48 secs ago
21:17
It looks good to me... Is it running too slow at the moment? Are you using Application.ScreenUpdating = False, Application.Cursor = xlWait, etc.? Is anything particularly not working? This might be a better question for Code Review. — dwirony 14 secs ago
21:41
0
Q: Binary Search Implementation for Integer Array

Jae BradleyPurpose Implement a binary search algorithm that takes a sorted int array and some int target value and returns the index of the target value, if it exists. Discussion The way I thought about implementing a binary search algorithm was the following Given an array of sorted int values, pick t...

22:15
0
Q: JavaScript to wait for multiple callbacks to finish then execute a piece of code

toyI'm writing a JS lib for browser without Promise. I have two callbacks need to be done first but execute a piece of code only after the second callback is done. let n = _config.preinit.length; if (_config.preinit) { _config.preinit.forEach(function eachPreInit(p) { var pre = require('./pr...

22:47
@SimonForsberg @Phrancis Fixed the Vinder bug.
Sweet!
23:17
0
Q: Find length of largest substring with unique characters

user3605508The below code scans a string and returns the length of the largest substring containing all unique characters. I am iterating over the input string's characters and analyzing the longest unique charactered substring ending at the current character. By caching some info about the longest substr...

0
Q: I'm creating a calculator in C#. The math is not adding up. no pun intended ;)

j2839So I am trying to make a calculator in a windows forms application. I havent coded all the buttons yet just the numbers and basic calculations. Divide, Multiply, Add, and Subtract to not work correctly. I put in a few labels(lbv1,lbv2,lbinput) to try to see if the variables are being set incorrec...

23:39
If this works and you want to get feedback on the code and implementation, you should take it to Code Review — jacoblaw 20 secs ago

« first day (1550 days earlier)      last day (2763 days later) »