« first day (1676 days earlier)      last day (2342 days later) » 

12:00 AM
RELOAD! There are 4821 unanswered questions (90.2411% answered)
 
12:12 AM
@BoPersson If a code reviewer's warning bells are going off on my code but cannot articulate what the actual problem is with the code or convince me why it is error prone or in bad form, I will chock it up to them being opinionated and I will learn nothing from the exchange. It is essential to understand what makes bad code bad. — Jordan Melo 44 secs ago
 
12:58 AM
0
Q: Phone Book Program in C++ - Follow Up

Frank DoeThis is a follow up to this question. I have taken the suggestions given to me and implemented them in my code, as well as moving towards adding more features to the program. I am unfortunately required to use a linked list for storing contacts, so I cannot adapt to your feedback for that, but th...

 
 
1 hour later…
2:25 AM
0
Q: Moongose, Node display dates in browser

MarioHow can I display data from functions findUsers and findOnlyUser in my browser ? //server.js const userSchema = new Schema({ name: String, surname: { type: String, required: true}, age: Number }); const User = mongoose.model('User', userSchema); const peter = new U...

0
Q: implementing shopping cart in rails?

kofheartsThis is my first cart implementation in rails so i wanted to get some feedback on the right method to implement it. First of all i am storing the data directly in session because the items in the cart are small. The idea is that i save a list of integers(ids of the items) in session[]. When a...

 
2:41 AM
0
Q: ATM Machine application needs hints/suggestions

Robbie AltshulerI made an ATM Machine application that uses arrays. I need hints/suggestions on how to improve the code. I have made single line comments to state these questions. (Please skip following info if not important to you) I am supposed to create an atm machine that: asks user to input username and...

 
2:55 AM
0
Q: Whats wrong with my python n-gram generation code ?

Shivam AgrawalI am trying to generate n-grams from series of words in a para or sentences, when I use sliding_over_words=False, fixed_length_gram=False in my code, though it generates valid result but it seems to be patchy as it generates an empty element in my dictionary too like (): [36, 40] in {(): [36, 40]...

 
3:51 AM
@B001, please, before you recommend Code Review you should review what is on-topic there: codereview.stackexchange.com/help/on-topicStephen Rauch 39 secs ago
 
0
Q: How do I collate list of dictionaries(merging these based on key) with various values?

RaviI am basically saturated to find further solutions on this issue. Any pointers are appreciated. I am running a python script which takes a word file, parses through it using regex for various values and resulting matches are converted into a json dictionary so that I can use the output to form a...

 
4:32 AM
0
Q: Private storage for at-rest data in VBA

thisOne major annoyance in VBA programming is that it's hard to keep a secret secret. In this particular case, it's the ADODB.Connection. For reasons not germane to the post, it is necessary to be able to re-create new instances of ADODB.Connection, which also implies filling in the connection string...

 
I don't think this question is a great fit for SO (too open ended, subjective, etc.). I'd suggest you try an implementation (and do make sure it works first) and then ask for a review at codereview.stackexchange.comKirk Woll 42 secs ago
 
5:22 AM
1
Q: New To Java - HackerRank Graphing Algorithm

Fairly NerdyIn order to learn java, I have been working through some HackerRank problems. The one I am asking about is here: There are cities that we can connect together by repairing some destroyed roads, provided by integer pairs We can build a library in one or more cities There is a cost to the roads ...

 
Monking
 
5:36 AM
0
Q: Selecting multple pandas dataframe rows based on multiple values in same column

Ryan ArbowI want to select multiple rows based on multiple values in a single column. Example below. Is there a better way to do this?

 
6:06 AM
1
Q: Calculator - Kivy Order of Operations

Goat_ReaperI decided to make a simple calculator, but then I decided I want to make an advanced calculator. Before I achieve that though I settled for a calculator capable of order of operations. #!/usr/bin/env python3 """ Brandon Dunbar Start Date: 11/20/17 v1.0 End Date: 12/04/17 Calculator """ # Can...

 
6:38 AM
0
Q: Select pandas dataframe rows based on multiple values within same column

Ryan ArbowMy goal was to get a dataframe which includes just the clients (BILL123 and JILL123 in this sample) and lists all of their transactions. Is there a better way to accomplish this?

 
@Vogel612 mainly because I felt like a beginner writing it.
 
 
1 hour later…
8:05 AM
Monking
 
9:01 AM
Monking
 
Kaz
@SimonForsberg That's not even one of my top 5 ^^
IIRC, this is the one that got the character limit raised:
5
Q: Non-standardised data across multiple worksheets: Aggregation, Validation, Filtering

KazEvery piece of business that gets written (E.G. an adviser's client puts an additional £10k payment into a pension plan) goes in a spreadsheet called the SubSheet. It's split into 8 worksheets for different kinds of business, each with lots and lots of columns. E.G. "Adviser" "First Name" "Invest...

And I still remember @RubberDuck's first answer to me:
> A wise programmer once told me:

What a fascinating solution! It seems that for every smart decision you made, you also threw in a poor decision or two.

I now completely understand where he was coming from, because I feel the same way about this code here. It's a beautiful mix of good and bad decisions.
 
9:18 AM
0
Q: Join three table variable to one in SP SQL Server

klas mackI am struggling with creating a Stored Procedure in SQL Server for getting sales statistics. I have managed to get the information I need out, but the query is a mess and I have probably messed up the table variable by using 3 different ones. Any ideas on how to merge this triple part-query into...

 
9:35 AM
possible answer invalidation by Tasos on question by Tasos: codereview.stackexchange.com/posts/181990/revisions
You could consider posting your code here for review: codereview.stackexchange.comSebastian Hofmann 16 secs ago
 
0
Q: DisjointSet class in Python

JulStratI would like to improve my DisjointSet class implementation in Python. I would be grateful for specific advice. I use it in online contests so it must be short, quick and reusable. from copy import copy class DisjointSet: def __init__(self, s=None): if not s is None: self.__par =...

 
10:24 AM
Monking
 
10:38 AM
I fail to find(Google) any information on Cr meta, Are 1rst years C programmer welcom on CR? One of the student asked if he were allowed to ask for Professional review of his code. Are those newbies allowed?
 
@DragandDrop I've never been to Uni, we also allow s, so yeah. As long as the question is on-topic
 
@DragandDrop As long as their questions are on-topic and they take the time to write a decent question, sure.
 
10:54 AM
Quality should not be an issue as it's only one student. Not even mine but I will review his post..
 
Is it the same teacher that taught you to use gets? When you have this working and up & running, I recommend that you indent & format it correctly (needless to say) and then post the whole of it at codereview.stackexchange.com. — Lundin 50 secs ago
 
@DragandDrop Note we're talking about the quality of the question here, code quality isn't that relevant.
Especially if they're .
 
11:13 AM
sounds more like a codereview question. — briosheje 1 min ago
 
11:27 AM
@Mast Just because I'm Swedish?
 
@SimonForsberg Partly, not just. It's an interesting opening for people who don't know a lot of standard moves and are looking for something different than the same-old Sicilian. It's not popular, but it makes you think about alternative deployment.
IMO anyway, but what do I know about chess...
It's straight-forward and moves the game along quite nicely.
 
I don't like the Scandinavian, jusy feels like a tempo waste... unless you play the Marshall Gambit.
 
11:43 AM
1.e4 d5 2.exd5 Nf6 3.d4 and see what sticks.
 
Yes the Marshall line, but that can be really tricky. With traps for both black and white
 
It's chess. There's always exploding bear traps all over the place.
2
 
True, but if you are not really into opening theory this can be trickier then "safer"openings like KID / Sicilian
 
@Ludisposed By the way, I send you a request for a match. Take your time.
 
12:00 PM
No, while checkin there are some required details which i need to fill before i check in anything into TFS. for eg - Code Reviewer name, Unit Testing, and so on. Just like that i want to input the PBI no. which we fill under Related Work Items: heading by clicking on Add Work Item by ID option. — SRP 53 secs ago
 
On the other hand, it might be just preference
Yes saw, the invite; Good luck :)
 
@Mast haven't seen that meme in quite a while
 
0
Q: modular square checker in C(ansi)

BeginningMathi've written a simple program using modular programming in c(using a lot of functions), that gets a line of input from the user, and then prints if given input forms a magic square or not. the first input is the order of the matrix, and the rest are order*order inputs(order^2)(integers) that are...

 
12:19 PM
@Ludisposed Thanks, you too.
 
0
Q: Is this a case of parent class knowing about child class/properties?

user95437Child classes inherit the function from the parent, but the function defined in the parent, uses the field defined in the child class. Is this ok? class Logs{ public static function getMessage( $code ){ return isset(static::$errors[$code]) ? __(static::$errors[$code]) ...

 
12:41 PM
And I'm already on the defensive, great :-)
 
0
Q: Sum of Square Numbers

LeffI was trying to solve a task on leetcode, where I need to find if a positive integer is the sum of squares of two other integers. My solution is below, but it fails due to exceeding time limit. var judgeSquareSum = function(c) { let output = false; for(let i = c; i >= 0; i--) { for...

 
1:09 PM
@Mast I'm already regretting some of my decisions too, I think you missed a beautiful placed Qb3 somewhere... ;)
 
@Ludisposed I considered that move instead of xd4. Couldn't decide which would've been better.
 
Qb3, would be my choice. Was already sweating... Na5 ... Qa4+... ouch
 
0
Q: Refactoring a Poorly Performing Stored Procedure

Code WarriorI have been asked to replace some Windows Services with Web Services and make it more efficient. There is one particular call SP that I am having difficulty with on how best to approach it. The SP is as below at the moment, and I have tidied some things up within it, however, the main area of ...

 
@Ludisposed Good to know I don't play perfect all of a sudden. Still, it's getting cozy on my right backline.
In hindsight, that queen on left would've been pretty nice, yea.
 
1:30 PM
possible answer invalidation by Shaun Bebbers on question by Shaun Bebbers: codereview.stackexchange.com/posts/181963/revisions
 
1:46 PM
@Duga Handled
 
This question would be better placed on Code Review. — OldCurmudgeon just now
 
Well, apparently the C++17 standard was released yesterday.
2
Final version.
 
2:16 PM
Greetings, Programs.
 
This seems like a great question for code reviewJoseph Wood 10 secs ago
 
Monking :)
 
Monking
 
2:33 PM
I'm voting to close this question as off-topic because code improvement questions belong on codereview.stackexchange.com (but be sure to read the help there first). (not my dv)T.J. Crowder 36 secs ago
@T.J.Crowder No! This is not even close to working as intended. This would be shot down at Code Review even faster than it gets here. — Mast 44 secs ago
 
@Ludisposed Why did you force me to short-castle? Now most of your pieces are out-of-place.
 
@Mast I don't feel they are out of place, I like the attacking positions of my bishops
 
Playing on lichess?
 
@Hosch250 Chess.com.
 
Ehhhh, lichess is better.
 
2:43 PM
@Hosch250 It's the same game, why is it better there?
 
@Mast More chess variants, better tourneys
 
@Ludisposed Ok. At least you got all your pieces deployed nicely.
 
Same way that Git is better than TFS? They are both SC.
Just better quality, plus it's open-source, free, no ads.
 
I liked Lego Chess with the animated pieces :)
 
@Marc-Andre Yes! It's bloody awful to get working on a modern PC though.
I've considered running a VM just for it.
 
2:45 PM
It's been a long time since I last played that game. I probably still have the cd, wonder how I can get it installed again.
 
Blocked at work...
 
It should be possible
 
0
Q: Direction Array: reducing complexity

YonexI have a m*n matrix where every element is unique. From a given starting point I have to move to the smallest point(up, down, left, right)and then have to do the same process again. When all other surrounding point is greater than the existing one I have to stop and print the position from start....

1
Q: K&R exercise 1-19, reverse line

Said BuyukarslanI've just started to read K&R. I'm on page 31 and this is the solution I implemented for problem 1-19: #include <stdio.h> #define MAX_LINE_LENGTH 1000 void reverseLine(char reversedLine[], char line[], int lineSize); int main(void) { int c; int i = 0; char line[MAX_LINE_LENGTH];...

 
@Ludisposed Alternate installer? Yuck. I'd probably boot a VM over that.
 
2:51 PM
@Mast Only stating it is possible, won't be my weapon of choice either.
 
Was a great game though, worth some hassle.
 
3:10 PM
@Makoto pretending like someone can't find Code Review on their own is just silly. I clearly suggested it as a resource for further study. This whole "don't mention that other SE site" thing is ridiculous. — jdv 39 secs ago
 
@Mast Already thinking of sacking something, but it might not be worth it xD
 
0
Q: error: package javax.inject does not exist [error] import javax.inject.*;

IvanpI know this question was asked before too , but I am not finding the solution since I tried some commands like : compile group: 'javax.inject', name: 'javax.inject', version: '1' and links like this one : https://docs.gradle.org/current/userguide/artifact_dependencies_tutorial.html , but where sh...

 
Since you have functional code, and are only looking to improve it, this question is off-topic on Stack Overflow. But... it's on-topic for Code Review. — JDB 59 secs ago
 
@CaptainObvious Nope.
 
3:26 PM
Why is IE 8 so significant, but you never hear about IE 9?
Same about 6/7.
 
@Hosch250 I hear about 7, 9, 11 and Edge all the freaking time. Never 8 or 10 for me, only the odd numbers. (Sometimes 6, but that's infrequent.)
 
Huh, that's odd :)
Makes sense, though, because those are the updated versions for the operating system (10 was 8, 11 was 8.1, etc.).
 
@202_accepted You still hear about 6?
 
But it seems 9 supports CSS 3, but 8 doesn't. We only support 11, but it turns out we "unofficially" support 8.
 
@Mast Yeah, it's been dwindling lately, we had a few XP devices still out there, now we're down to one remaining.
 
3:37 PM
And here I thought the Dutch government was the only organization stupid enough not to upgrade...
 
@Hosch250 I / we officially support IE 7-11 (for now, new PCI DSS reqs are dropping soon and IE 7-10 will be removed from compliance), Edge (both versions), Chrome, FF (pre 57, still working on 57 updates), Opera (based on Chrome so...yeah), Safari and all the crappy mobile browsers.
@Mast Some of these devices literally cannot be replaced because we have outdated software on them, so we're working to replace the software first.
(Unfortunately, to continue to support the old software we have to keep them around.)
 
LOL.
 
Oh, sure, for development you should always have one around, in case you need to troubleshoot or support something. But eventually the software should no longer support it.
 
You've never worked with U.S. finance, have you? ;)
 
Hah, no, I'm not that stupid.
@202_accepted Sounds familiar: zdnet.com/article/…
 
3:41 PM
We have a boatload of POS and ATM systems in the U.S. still running on XP (not my company, fortunately, but others), so Microsoft put in a special registry setting to keep them alive and updated.
 
@202_accepted Point Of Sale? I thought you meant the other POS for a second :P
 
@Hosch250 Can't it be both?
 
Sure it can :)
 
(Shots fired)
 
@202_accepted The police were still running DOS on half their systems 5 years ago.
 
3:45 PM
@Mast Most of our nuclear arsenal is still on DOS.
 
Ahhhh, the next "Russian" targets :)
(I have a big suspicion those were Democrat interns VPN'ing through Russian servers :P)
 
And the best part is they're not a security vulnerability.
Because they have no peripherals except a keyboard, and no network connections.
 
Heck, we went to the moon before DOS. No doubt our nuclear missiles will work.
 
@202_accepted I think most of your nuclear arsenal is pre-DOS.
But I'd make an exception for nuclear arsenal. If it works, don't touch it.
 
Also, Mr. Kim can hit anywhere in the US? We can hit anywhere in NK, which is much harder because we have to aim for it specifically, while he just has to launch in our general direction with enough fuel to get over the ocean and not enough to get to the next ocean.
 
3:48 PM
lol
Does Guam have a portable nuclear installation?
 
No idea.
 
That would turn it from an unfair fight into a joke.
 
Heck, we could do donuts around the world with our missiles before hitting :P
 
If Guam alone would be enough and the rest of the States doesn't even need to get out of bed.
 
We wouldn't even need to use a nuke.
 
3:50 PM
You wouldn't need to, but you never know how MAD goes...
 
There would be absolutely no reason to, unless it was to set a precedent that getting a nuke means sending a nuke.
Somehow, I wonder if he's happy over there firing threats in all directions :P
 
posted on December 05, 2017 by CommitStrip

 
One of these days, I'm going to get made enough to make a hand-held EMP generator to take out advertisers.
 
@Hosch250 I considered it, until I figured out how awfully expensive it's development is going to be if you have to start from scratch.
 
LOL.
That's what government funding is for :)
 
4:05 PM
Mmh ok, I got it. I guess it highly depends on the rest of your code, BTW seems even an appropriate question for Code Review than for StackOverflow, since it works, and you simply want to refactor and polish it. — Andrea Ligios 9 secs ago
 
If anyone wanted to know how my day is going...^^
(No that's not a joke.)
 
Is there a particular problem you are encountering? Is something not working? Is there particular technical detail you are asking about? If not, you should direct requests for feedback on working code to codereview.stackexchange.comFrançois Andrieux 19 secs ago
 
@202_accepted How many monitors do you have?
And why oh why do you have 5 different browsers open at once?
Compatibility tests?
 
@Mast Web dev.
 
@Mast Three.
 
4:09 PM
@202_accepted IE, Edge, Firefox, Chrome, Opera. 5.
 
@Mast Monitors
 
@Mast My response was to monitor's.:P
 
My bad.
 
@202_accepted Any details on why <=IE 10 won't be PCI compliant?
Because that will force us to stop unofficially supporting IE 8 :)
 
Well, sounds like a busy day :-)
 
4:11 PM
@Hosch250 PIC DSS mandates TLS1.2 in June 2018.
 
Yeah, but can't IE 8 be configured to use it?
Because we (supposedly) already switched to full TLS 1.2.
 
I don't think so, from what I read 11 is the only one that supports it, though it's possible I'm wrong.
 
I know that 10 does.
I started with 10.
 
@Mast Edge is for this garbage control panel I have to use to manage our phone system, IE for managing our web platforms, Firefox for research on work stuff, Chrome for troubleshooting work web stuff, and Opera for non-work related things.
 
LOL.
 
4:16 PM
@Hosch250 Looks like I might have been wrong, though I was under the direction that 7-10 would not be allowed as a result.
 
@202_accepted Well, that's one way of keeping things organized.
 
There is no way a language or compiler can prevent people from shooting themselves (or their colleagues) in the foot. Your "situation" is solved by proper documentation and code review. — Mat 25 secs ago
 
Ah that's what it was, TLS >=1.1 is only enabled in 11 by default, 7-10 have it disabled on a fresh setup
 
@Hosch250 It's not enabled by default.
 
Not by default, no.
But it is there in 10 at least.
 
4:19 PM
Oh, yes, I'm talking about 8.
 
But nobody has a fresh setup anymore :P
 
Not with IE 8 I'd hope, no.
But you need to put in some actual work to get it configured, so your customers might not be happy if that's the requirement.
 
Unless they do a fresh install of Windows 7, or something.
 
On the other hand, it's a one-time change, so IT should be able to handle it.
 
Well, let's see.
I could name probably 5 large companies that use IE 8.
 
4:21 PM
I could name 5 countries that use IE 8.
 
I can name far more. Almost every customer company of ours uses 7 or 9. Few use 11 across the board.
 
I know--because I introduced a feature only supported by later browsers and had to fix it.
@202_accepted Probably the same ones as mine. You work with Fortune 10 companies?
 
@Hosch250 We work with banks, exclusively. All my customers are banks in the U.S., every one of them.
And at that, almost every bank in the U.S. is a customer of ours.
 
@202_accepted We work with TCF and USB.
 
(Thanks federal government.)
 
4:23 PM
 
USB is one of the companies I could name. We don't do a whole lot of work with TCF.
 
0
Q: Ramachandran plot (plotting the torsion angles of protein backbone)

Gábor ErdősI would like to have some insights on the code i created. It would be really insightful for me to get some feedback about the code, what should i do differently, i there an easier, more elegant way etc. Thanks! Code: #!/usr/bin/python3 import math import sys import os import matplotlib.pyplot...

 
4:45 PM
0
Q: Reading file from flash with Xamarin.Forms on Android using ActionOpenDocument intent with StartActivityForResult

StephenHSorry for the long keyword title, but I wanted this to be easily discover-able by others who are looking for similar solutions. I have a Xamarin.Forms application which utilizes dependency services to access Android specific features, in this case file access on the storage. The file we are acc...

 
4:57 PM
I'm voting to close this question as off-topic because questions about improving working code are better suited for codereview.stackexchange.com. — Oliver Charlesworth 10 secs ago
This question appears better suited for The Code Review Stack Exchange, since you don't have a real question about your code other than asking for help. However, before posting there, make sure to read their How to Ask Guidelines to make sure your question is well asked according to their rules. — Davy M 56 secs ago
 
5:14 PM
0
Q: Checking if a Stack is sorted in ascending order

cody.codes Write a method isSorted that accepts a stack of integers as a parameter and returns true if the elements in the stack occur in ascending (non-decreasing) order from top to bottom, and false otherwise. That is, the smallest element should be on top, growing larger toward the bottom. For e...

0
Q: get values from db where column is '1', there's a better way?

Lucas Felipeim doing a project to my OOP Class, using C# with SQL Server, and i think im not coding the best way... I dont want code, just some guidance on how to improve my code. for example: I have the following treeView that will populate a datagridview according with the selected node. In the database, ...

 
5:29 PM
So is there actually a problem with this code? Or is it working as expected? If your code works but you're looking to improve it, SO isn't the place to ask. Code Review is there for such questions. — icecub 10 secs ago
 
-3
Q: Project c++ Rock-paper-scissors

Jam SmithAny idea for some classes on a rock game paper scissors project in the network using oop principles?

 
possible answer invalidation by Billal BEGUERADJ on question by klas mack: codereview.stackexchange.com/posts/182052/revisions
 
@CaptainObvious 1 more VTC.
 
@Duga doh! I missed that un-indented END at the end (though I was doing it on my phone after monk-midnight :/)
 
@Duga Not invalidation.
 
5:54 PM
Is your code working? If so, maybe better place would be: codereview.stackexchange.com If not, please provide HTML, too... — sinisake 38 secs ago
 
I will come back if I have any further questions — Jam Smith 13 mins ago
Uh oh.
 
@Hosch250 I'm surprised that is still open...
 
6:09 PM
1
Q: blood type compatibility GUI

Jack ChurchillI am a beginner in Java, I was asked to make a blood type compatibility GUI app. The code compiles and functions how I wanted it to. When a blood type is selected from the combo box a message box pops up with all the compatible types. I feel that there could be an easy way of doing this though. C...

0
Q: Should I use a constructor or setters to create new objects (with new data) when using NHibernate?

w0051977Please see the code below: public class Customer { private readonly IList<Order> _orders = new List<Order>(); public string FirstName { get; protected set; } public string LastName { get; protected set; } public string Province { get; protected set; } public IEnumerable<Order>...

 
6:24 PM
Working code is a better fit for codereview.stackexchange.comMark Thomas 23 secs ago
Answers to this question may be found at Code Review: codereview.stackexchange.com/q/182085/23392JDB 5 secs ago
 
6:51 PM
2
Q: binary_search Python implementation

NinjaG I did a Python implementation of binary search implementation iteratively. It passes all of the test and I was wondering if I can get any feedback. Thank you. #!python def binary_search_iterative(array, item): """iteratively return the index of the item with binary search or None i...

 
I feel like there is a meta post about not editing off-topic questions.. does anybody know which one I am referring to?
 
@SamOnela Well, it will put them in the re-open queue, so it's not advised unless they're edited into on-topicness. Such edits usually get rejected as trivial edits.
@CaptainObvious Java: 200 LoC to create a GUI for something trivial.
@Hosch250 Just fling it as soon as possible and all will be well again.
 
@Mast yeah I know that is the reason - I thought I saw Simon or somebody reference a post explaining that recently...
 
7:40 PM
2
Q: Navigating over a square spiral

NieDzejkobI recently found adventofcode, but when I solved Day 3 in Python, I noticed that my code isn't looking very nice. The challenge is about navigating a hypothetical memory laid out in a square spiral: You come across an experimental new kind of memory stored on an infinite two-dimensional grid....

 
Possibly a better fit on codereview.stackexchange.comzzxyz 31 secs ago
I'm voting to close this question as off-topic because questions about improving working code are off-topic on Stack Overflow. Consider taking the tour at CodeReview.StackExchange and see if your question fits there, instead. — TylerH 45 secs ago
 
8:22 PM
0
Q: Error handling Beacon scanning

DecoI've recently began trying to put more error handling in to my code so I thought I'd post a use-case to check I'm on the right path. I feel like this is going to make my functions much larger and more indented/nested than before. Is this the right way to go about things or should I be utilising t...

 
8:46 PM
Yes, and if you do it right it can be more efficient. But it's not as easy, and you sometimes have to explain to the code reviewers why you didn't just copy and swap. — user4581301 1 min ago
 
9:28 PM
1
Q: Finding as many perfect numbers as possible

13ros27I have tried to make a perfect number finder as efficient as possible in python. I anyone has any things I can add to make it more efficient or any problems with my code please say. def is_prime(num): if num <= 1: return False elif num <= 3: return True elif num % 2 == 0 or num % 3 =...

 
You should ask for a code review: codereview Couple of issues that need to be sorted. Calling destructor (without calling constructor). Exception guarantees (If assignment fails you don't provide the strong guarantee). Premature optimization (testing for assignment to self). Non standard implementation (Copy and Swap). — Loki Astari 48 secs ago
 
9:47 PM
0
Q: R: Optimizing a Solution to an Overdetermined System

ArcturusHearthstone is a collectible card video game similar to Magic: The Gathering, where players play cards with certain values of "attack" and "health" for certain "mana" costs. After being introduced to some of the basics of R, I decided that I would find some of the "values" of these characteristic...

-1
Q: Python Serial Write Byte

minimerThank you all in advance. I am trying to communicate with some serial hardware using pyserial. I need to send single bytes at a time to the hardware, however I am not sure how to make python do this. I have tried, ser.write('\x79') ser.write(chr(0x79)) ser.write(0B01111110) however, this ...

0
Q: Coupon Platform - Coupon/Promo Domain model

Eddy FreemanI am developing a promotion/coupon platform where sellers/merchants can create coupons and will be published on the site. Visitors can also submit coupons to the site. This is the first part of series of code i will be posting here for review as the project proceeds. Below is the coupon domain ...

 
@202_accepted You are familiar with email addresses, right?
We just discovered that .NET's email validator (which is pretty good so far as email validation goes) allows test@test/com.
Is that legal, or should we ensure that there really is a . after the @ manually?
 
0
Q: Switching mod 26 to mod 27

jh123In the following code I am using Hill Cipher to decode text. Using mod 26, I am able to decode the text. The next task is to decode the text using mod 27 (a=1,b=2, etc..). However I am unsure how to change the code I have made which is mod 26 to mod 27. Looking for some help with this as I have b...

 
10:11 PM
That sounds like a new question as this appears to have answered your original question given the details you ave provided. It would depend on the actual data. I might try a dictionary object constructed from a variant array of the actual values. Calculation cycles and event handling can also slow things down but you can suspend both of those. You might try posting a new question based on my code with details of the actual data at Code Review. — Jeeped 33 secs ago
 
@Hosch250 Funny story, that's legal.
 
10:47 PM
0
Q: VBA Delete Duplicates

ShahzebI am using this code to delete duplicates, however, for a large set of data this is too slow. dim dup as variant, r as long, lncheckduplicatescolumn as long With wb_DST.Sheets(sWs_DST) lncheckduplicatescolumn = .Cells(.Rows.Count, "A").End(xlUp).row for r = lncheckduplicatescolumn to 2 ste...

0
Q: Getting values of XML Elements in C#

capI have an XML file that has got the following structure: <root> <body> <e1> <en> <tag1>testt1</tag1> <tag2 user="anonym">testt2</tag2> <tag3>testt3</tag3> <tag4>testt4</tag4> <tag5> ...

 
11:01 PM
0
Q: Project Euler problems ( 1-5 )

HelloWorldTo learn further i decided to try solving some of project Euler problems. Here are the first five of them. The things i'm interested the most from the review. The performance of the code Overall review of the code structure, styling rules and naming convention. Problem: 1 Find the sum...

 
11:15 PM
@Hosch250 You'll want to ensure that separately. Email domains can be local UNC paths (test/com), they can be IP's ([192.168.0.1]), as well as a slew of other things.
Like ebrown@[192.168.0.1] is a valid email address.
 
0
Q: Generating two related collections only once

SinjaiI use the below code to keep track of the rank names and hierarchy in my ASP.NET application. Theoretically, the dictionary and collection should both be created only once, but this is done only with a few piecemeal references and my own limited knowledge on the topic. // Various utilities to...

 
11:42 PM
I knew that last one.
 
@202_accepted That makes the regex email validator much more complicated :D
 
@Phrancis Yes it does, because you can have email@localhost for example. Which means NETBIOS, WINS and DNS names must all be supported.
 
Yuck. More evidence that using regex to validate emails is a bad idea
 
11:57 PM
You need to validate emails to your standard, whatever that be. RFC 2822 is pretty broad, so I usually validate that it has an @, and a . right of the @. That's about the best you can get.
 
@202_accepted We use the .NET one.
I implemented that one, but it allowed a foo@gmail.com, email...
The .NET one is just a wee bit stricter, but still allows all the valid ones I've found.
 

« first day (1676 days earlier)      last day (2342 days later) »