« first day (1782 days earlier)      last day (2240 days later) » 

12:00 AM
RELOAD! There are 5186 unanswered questions (89.9849% answered)
 
0
Q: Trying to get some feedback on this eventManager. Please forgive me if I'm doing it wrong, It's my first post here.

RJ ThompsonI'm trying to paste some code to share and get feedback on( specifically it's an event manager). Maybe this isn't what the site is for? In any case it wouldn't let me because the it kept complaining about the format even though I did control K? I kept hammering on it and Eventually it let me edi...

 
12:13 AM
@skiwi - source code up at: github.com/rolfl/FactorioPrints
 
-2
Q: STL iterator enable if

user7151237Creating reverse function on the basis of iterator type. Please see below link. template <typename IT> typename std::enable_if<HaveRandomAccessIterator<IT>::value>::type void reverseAlgo(IT t1, IT t2) { //List implementation } template <typename IT> typename std::enable_if<!HaveRandomAc...

 
Found some JavaScript course videos on my employer's training platform... the man teaching the course pronounces it "JehvaScript", damn Canadians ;P
 
1:06 AM
Read few blogs, you'd be fine. It seems like you have GitHub branches, then for every branch or developer's branch, first use tool like inbuilt GitHub code review or Phabricator. Then, once that's done and the developer branch level build is started in Jenkins and if that passes some level of tests, then you can merge those change automatically to a main/intergration/release branch. For Quality, you can use all static code tools or SonarQube analysis. Jacoco is best code coverage (free as well). Try Hygieia as well (from capital one). Check SonarQube "Governance plugin" — Arun Sangal 6 secs ago
 
1:45 AM
0
Q: Blackjack in python (using Turtle)

Jerry ZhouI've been programming for 2ish months and I was programming blackjack on a school computer because I was bored. If you guys could check to see if there are any problems with it that would be great! Sorry if the code is too long. Thanks in advance! from turtle import * import random updater = Tu...

 
2:01 AM
0
Q: Functional permutation generator

Shaun LuttinI have (we have) implemented the functional permutation generator from (Topor, 1982). As usual I would like feedback on how to make the code more readable, more aligned with canonical F# styles and conventions, and/or different from how it is right now. For instance: are there more conventional...

 
2:53 AM
0
Q: How to make this Implementation Thread Safe

payam rastogihere we are trying to validate a request. If the same request occurs more than 10 times in 2 secs we are going to reject that request. public class SlidingWindow { private int numberOfRequests; private int tSecs; private Map<String, BlockingQueue<Instant>> map; private Map<String, String> b...

0
Q: Avoid rendering entire list after change in modular Javascript

MichaelI recently switched to modular JavaScript and really like the idea of having the state of your application in JavaScript and not in the DOM. I want to know if what I am doing is considered best practices or not and how I can avoid the issue described in the title. First, the code: HTML <form i...

 
3:10 AM
0
Q: Update the frequency of Sidekiq job

andrew yangI'm working on a feature which user can set frequency of a job. I am using Sidekiq. My solution is when someone updates the frequency from view, I will delete all old scheduled jobs and create a new job in the action of controller. I'm looking for a cleaner and more succinct way to do this. Ri...

 
4:03 AM
0
Q: Python 2-opt algorithm for asymmetric TSP too heavy

Manuel CabreraThe initial result is taken from an Ant Colony Optimization algorithm, and is introduced to the heuristic in this form: path = [(12, 7), (7, 10), (10, 21), (21, 13), (13, 0), \ (0, 11), (11, 14), (14, 15), (15, 2), (2, 17), \ (17, 16), (16, 1), (1, 3), (3, 6), (6, 4), (4, 5), \ ...

 
4:37 AM
Looks like this could be migrated to code review … I tried to raise a flag but that site is not an option. — O.O.Balance 45 secs ago
Aye, i don't know that there is a code review in stack exchange. My bad, I'll ask it there. Thanks for the information @O.O.Balance — rhog23 55 secs ago
 
5:07 AM
Monking
 
0
Q: Return 2 items from Python function

spicyramenFrom a text which could include HTTP URLS or Email addresses, I need to extract each of them. Example: text = "This is a description of my item, please contact me at user@yahoo.com or visit our URL at https://www.mypage.com or http://twitter.com/mypage" I need to return: user@yahoo.com https...

 
5:25 AM
possible answer invalidation by EJoshuaS on question by EJoshuaS: codereview.stackexchange.com/posts/190064/revisions
 
@Duga trying to clarify no problem
 
1
Q: Server does not connect to client in socket c

Lísias de CastroI am trying to learn how to use socket library. I started learning the first steps, and thats ok. I can connect a socket and let the server waiting for income connections. The problem is, I connect from the client side, and nothing happens. What am I doing wrong? Here is the main file: #include...

 
Monking
@CaptainObvious Not working as intended.
 
@Duga for your incoming post, the same applies.
 
5:40 AM
possible answer invalidation by EJoshuaS on question by EJoshuaS: codereview.stackexchange.com/posts/190064/revisions
 
 
1 hour later…
6:40 AM
@rolfl Cool! I'll check after work today
 
6:56 AM
0
Q: First Python Calculator of Mine

Chuck BartowskiThis calculator accepts four operators: +, -, *, /, and works with parentheses. Feedback on how I could make it easier to read and or more effective would be much appreciated. This is the first time I "built my own thing", and the other Python calculators on this website seem kinda different fro...

 
7:13 AM
0
Q: Passing a string from a lexer to a SAX parser: to move or not to move?

Niels LohmannI am designing a SAX parsing interface for my C++11 JSON library and I need advice: In the lexer, I have a std::string variable token_buffer that holds string literals. The lexer takes care about all the UTF-8 or unescaping details of JSON strings (e.g., creating the string literal ä after readi...

0
Q: Program that uploads and process excel files current limit is 20,000 lines

hungrykoalaMy program is called "Cleaner". What it does is that we have a "Dirty" excel file with a good number of lines in it around 20,000 - 400,000 lines. The process of cleaning the records is basically improving the formats(Phone Number) and adding additional details(Country, State, Address, etc) bas...

0
Q: How to effectively close the channel in golang?

titogeoHow to close the channel in below code. I am following the tutorial here. If I close on //Location 1 I do not get any data. If I close on //Location 2 I get a panic: send on closed channel occasionally. if I do not close range on channel do not exit - package main import ( "fmt" ...

 
7:30 AM
0
Q: How to determine the size of biases in a neural network?

Ashar7I'm new to the world of machine learning. My question is how can I determine the size of the biases in a neural network (with backpropagation algorithm)? Currently, I have a 2-layer neural network (1 hidden and 1 output layer). Here's the code: import numpy as np from matplotlib import pyplot as...

 
7:50 AM
0
Q: FTP Client - Connection creation and keep alive

ODB8I'm working on a UWP basic program that connects to FTP server and uploads and downloads files. FTP operations are done in different pages at different moments in the app, so i was wondering the following: Given the following code (Home page): client = new FtpClient(proxy.GetAddress());...

 
8:07 AM
0
Q: My Implementation of a Doubly List in C++

Saad Al-SabbaghI'm a second year CS major currently studying Data Structures, I wanted to implemented a Linked List with whatever knowledge I have at my disposal without referring much to any books or references, just a pen and paper and what I know in C++, I would be glad if someone takes a look at the code an...

 
8:24 AM
0
Q: Edit navigation bar

Georgiosi am new in web development. I want create more steps in this code and i want to do it work perfectly. main.js jQuery(document).ready(function($){ function ProductBuilder( element ) { this.element = element; this.stepsWrapper = this.element.children('.cd-builder-steps'); this.steps ...

 
this likely belongs on codereview — mplungjan 37 secs ago
 
8:52 AM
Monking
 
What does that even mean? If you want a code review, there is a codereview stackexchange site — mplungjan 24 secs ago
I have custom classes, for animations, but when something appears everythingh else disappears. Sorry i didnt know for codereview stackexchange. Is it so strange? — Phaidonas Gialis 13 secs ago
 
9:16 AM
0
Q: XML design for parsing in C#

sapoiI am trying to design XML with configuration info so I can parse it into this code: ... services.Configure<IdentityOptions>(options => { // Password settings options.Password.RequireDigit = true; options.Password.RequiredLength = 8; options.Password.RequireNonAlphanumeric = false...

0
Q: Elasticsearch NEST collecting nested top_hits aggregation

Evaldas BuinauskasI've got a collection of documents indexed in Elasticsearch. Sample of one: { "Id": 123, "Title": "Some Title", "Countries": [ { "Id": 123, "Name": "United Kingdom" }, { "Id": 124, "Name": "United State" }, { "Id": 125, "Name": "Canad...

 
9:29 AM
Monking
 
I have actually added you question to codereview here . Take a look, both the question and the 2 answers are interesting - codereview.stackexchange.com/questions/190049/…Vityata 21 secs ago
 
10:35 AM
possible answer invalidation by Takit Isy on question by Takit Isy: codereview.stackexchange.com/posts/188780/revisions
 
@Duga Seems harmless, only the description is modified
@CaptainObvious OP confirms the code is not working as intended.
 
0
Q: Write one string to a socket within 10 seconds or another string if the time is out

KhojiakbarI'm trying to implement the method, which will send one data to the server if it (Raspberry Pi Pin Input HIGH, in this case) occurs within 10 seconds. If this won't happen within 10 seconds then I should send another data. This implementation works for me, but I think that there should be anothe...

 
11:19 AM
there's also a Code Review stackexchange site which might be more interested in this kind of question, potentially (but review their help to be sure, before you post) — ADyson 24 secs ago
 
11:54 AM
0
Q: Async programming multiple tasks

mkoIs there any difference between GetUsersAsync and GetUsersAsync2 in terms of async programming? According to https://docs.microsoft.com/en-us/dotnet/csharp/async they use Task.WhenAll, not sure if it is a way to do it, or just one of the options public async Task<User> GetUserAsync(int userId) {...

 
So... your second for loop are working, but have repeated code. You can post on Code Review, but remember to read their help before asking. — user202729 just now
I meant -- if you have working code, Code Review is probably a better site. — user202729 30 secs ago
 
12:28 PM
If your code works (which seems to the be the case), then it's OT here and you want to repost this on codereview. Else please explain exactly what's the problem. — bruno desthuilliers 53 secs ago
 
12:41 PM
I believe that this question is on-topic here and off-topic for Code Review, since he is looking for one particular improvement in the code and not a general overlook of all aspects. — Rory Daulton 45 secs ago
But it looks ugly, isn't it? welcome to Streams lol. You might want to check out codereview.stackexchange.com, they're always good at suggesting better ways to do things. — Ben Watson 54 secs ago
 
1:05 PM
possible answer invalidation by BareWithImANoob on question by BareWithImANoob: codereview.stackexchange.com/posts/190060/revisions
this is the most unefficient factor decomposing code I ever saw. I suggest that you check codereview.stackexchange.com to find working examples (or even here) — Jean-François Fabre 33 secs ago
 
1:20 PM
anyone mind if I unpin the comment about the SO Mod Election?
 
@Malachi I don't
 
how are you doing today?
 
Feeling asleep. My 2 yo had a bad night ^^
 
that always sucks. sick?
 
No, nightmares I guess. Nothing to worry about but intermittent night is not very restfull
 
1:28 PM
 
@Duga @Malachi I’m not sure how to handle this, your thoughts?
 
let me take a look
 
The answers mentions the missing implementation + the edit add the implementation with a new naming convention, making the code broken.
 
@MathiasEttinger my son sometimes wakes in the middle of the night, and I check on him, but he usually doesn't remember. say a quick prayer for him (in addition to bedtime prayers)
@MathiasEttinger I would suggest in a comment to fix the naming, if that is all it takes to make the code not broken. otherwise the edit doesn't seem to invalidate any answers, as long as the code still works
 
I usually stay with him 'till he sleeps soundly :)
 
1:33 PM
in my son's case, he usually gives me a blank stare for about 15 seconds and then lays back down and is completely asleep. never actually fully waking. so I comfort him until he lays back down.
 
Meh, I usually went in (kids too old now), and went to sleep, my wife would find me with a still awake kid and a passed-out father.
 
lol
2
would be funny if you did that now
 
Now I go in all noisy and rowdy, flashing the lights, and jumping on the beds just to wake up the crazy kids who sleep till all hoours of the day
Oh, and I leave with the comforter and my daughter's favourite pillow.
It's the old joke .... you spend the first 2 years teaching them to walk, and talk, then the rest of their lives teaching them to sit down, and shut up.
2
 
@rolfl I have given up on the shut up part
 
@Malachi It's usually that too, but this night he needed that I hold his hands for like 15min each time.
 
1:38 PM
my daughter can talk forever I swear
 
@skiwi Probably, but I'm biased.
 
Hey, Javascript worked fine for me..... ^^^
 
0
Q: Speed up a function of combinations

PeCaDeI have made the following function that gives the combinations permuted of n elements with a constrain/rule. This consist on creating a dataframe with all combination of numbers from 0 to n that sums n. Function: import pandas as pd import itertools import numpy as np def combinations_permute...

 
128-lines of code to get a RESTful server up and running doing both encoding and decoding of base-64 zlib compressed JSON content with some enterprise anti-abuse features running on a secure server in the public web.
 
@rolfl I noticed, how long did it take you to write that gem?
 
1:41 PM
About an hour, then another hour to figure out I had a setting wrong limiting it to 64MB of memory on the server, but in the meantime I put in the anti-abuse limit of 5MB uploads.
Now it has the expected 256MB of memory, but I left the 5MB content-limit in place.
 
@rolfl I'm in the first two years phase, so it's really funny :)
3
 
Oh, then another hour or so to get the code neatened up, and put up on github. 3 hours for a full SDLC on a new, published service including opensourcing and code sharing is not bad,.
 
lol
 
That's great actually
 
Not bad for a full development cycle at all.
 
1:45 PM
Yeah, the hard part ended up being the AJAX calls I needed to read up on because I have never done front-end stuff like that.
Turned out to be not that horrendous..... but the interface is still somewhat crude.
I know I should put the code up for review.....
6
 
Starbait.
 
@rolfl I was going to say that you are missing a Code Review phase....
 
And yes, you should.
@Hosch250 Regarding this, nobody will stop you from dumping answers in chat if you feel so inclined. Just don't do it in the official thread to keep things tidy for the CM.
 
OK.
 
It just hit me the Stack Overflow beta launch was almost 10 years ago. Talk about things escalating quickly.
 
1:54 PM
if I am AFK On Monday will someone please Nominate me? I am already starting to type up my answers to the Questions that have been posted
4
 
@Malachi I honestly don't have the foggiest how, but sure, I'll see to it you make the list.
 
0
Q: Binary Search Tree C++

SRGAppreciate your thoughts and feedback... BST.h // // BST.h // BST // // // // #ifndef BST_h #define BST_h // includes #include <memory> #include <string> #include <iostream> namespace bst { template<class Key, class Data> class BST { public: // // Node // class ...

 
I may have to take a trip this weekend and into next week. 3000 mile round trip (4800km for you Canadians)
 
@Malachi Have fun.
 
I hope so. it is for a court hearing
 
2:03 PM
@Malachi The european me appreciate the conversion too ;)
(convertion?)
 
lol
would be easier for all sorts of things if we used base 10 measurements.
but I don't deal with that stuff enough to make a fuss about it
 
@Malachi We cannot.
 
@MathiasEttinger No, conversion is correct.
 
If your code is already working, Code Review is a better site to post the question. — user202729 13 secs ago
 
@MathiasEttinger is that review dependent on the edit? someone may suggest to revert to when the code wasn't broken.
 
2:06 PM
Perhaps better suited for codereview.stackexchange.comnotyou 17 secs ago
 
Nominations can only be done by the person themselves. However, I think you have a week to do it.
 
Nominations are usually 7 or 8 days or so, yes.
 
@Hosch250 I think you can. I just would have to accept the nomination and then edit it I think?
 
Nope. I tried to nominate a couple people last time.
Used to be like that on SO, but they changed it (partly because Jon Skeet kept getting nominated).
 
The least we can do is ping him into oblivion so he won't forget to nominate himself.
 
2:07 PM
@Hosch250 lol
 
Yeah, I can write a selenium script with a couple dozen messages and send him one every 3 seconds.
 
Evil.
 
He'll be pinged into oblivion for sure.
 
Won't the API throw you out eventually?
 
I think if I wait for 3 seconds, I'd be good.
> In the nomination phase, any community member in good standing with more than 300 reputation may nominate themselves to be a community moderator.
It doesn't say anything about non-self nominations.
 
2:12 PM
just found this while looking for info,, I think we talked about nominating other people before --> codereview.meta.stackexchange.com/a/5678/18427
3 years old
 
1
Q: small Logging project

Antonio DropulićThis is a pet project done as an excersicse in C++. The following are currently out of the scope of my project but I am considering them . If you deem it important dont hesitate to comment on it. Multiple output streams coresponding to log levels for safety and better control over output. T...

 
I added some more questions to the post of questions --> codereview.meta.stackexchange.com/q/8684/18427
don't forget to vote for the questions that are going to be answered by the prospective Moderators --> codereview.meta.stackexchange.com/q/8684/18427
 
@Malachi Isn't "What is Code Review to you?" pretty much the same question than the one from Peilonrayz?
 
@MathiasEttinger If you say sorry when someone bumps into you, consider you may be a Canadian ;) :)
 
I think it asks more of a Longevity type of thing...where as Peilonrayz asks a more shorter time frame goal type question. but they are very similar
I gotta get back to work
 
2:26 PM
@Malachi I'm unsure how mine is only short term. As I hoped that my question would encompass both short and long term.
 
I see what you are saying, and it makes sense. I have deleted mine because it does have a lot of fluff to it, but is essentially asking the same question.
 
That makes sense. If you feel my question could be improved in any way, please edit it :)
 
1
Q: Image slider code

AssafI've been doing this image slider section, I've been working on this code for quite a time, the code is perfectly working but I want to improve it. I tried for hours and couldn't find a way. Maybe because I'm too in my code that I can't see other better options. Can you guys suggest me a better...

 
2:47 PM
Are you asking a question or asking for a code review? — Nigel Ren 53 secs ago
If your code works fine, but you are searching for improvements, the code review community might be the right place for your question :-) — Philipp Maurer 22 secs ago
 
3:20 PM
Greetings, Programs.
 
Greetings, @Donald.McLean.
You considering running for mod?
 
posted on March 21, 2018 by CommitStrip

 
@CommitStrip That's us.
 
0
Q: python boolean string to elasticsearch query oss module

Johannes valbjørnI am putting together a little module for oss release that will let you parse a boolean expression consisting of and/AND/or/OR's (no brackets yet) and output a complete elasticsearch query. boolean expression logic: i right now use OR as the basis and put everything on top of that as ANDS. This...

 
@Hosch250 If someone genuinely thought I would make a good moderator and nominated me on that basis.
 
3:30 PM
@Donald.McLean You'd make a good mod, but we can't nominate you, AFAIK.
I tried to nominate people last time, and I couldn't.
 
4:11 PM
Suspected invalidation; don't have time to investigate:
4
Q: Poor performance for signal processing

MathieuI have a program doing a LOT of iteration (thousands to millions to hundreds of millions). It's starting to take quite a lot of time (few minutes, to a few days), and despite all my effort to optimize it, I'm still a bit stuck. Profile: using cProfile via console call ncalls tottime percal...

 
@200_success Depending on how strict the rule is followed, yes.
 
@200_success Second edit may invalidate the first answer, but removing the first edit invalidates the second answer…
Well, it makes the second answer less coherent, not necessarily invalidated.
 
4:29 PM
followed @Tim Williams suggestion for StringBuilder: codereview.stackexchange.com/questions/67596/…Andi 10 secs ago
 
5:13 PM
@rolfl I even managed to sleep through those things
 
@RMunroe Columbo != Columbus
@RMunroe Chris <> Christopher
@RMunroe Fats != Fatty != Fat
@RMunroe Cam <> Cameron
I found more...
 
@Malachi And William <> Williams
 
Cooke/Cook/Cokie
 
5:28 PM
forgot a Ron.... can't believe I just said that out loud
 
maybe they are running out of ideas...
 
@SamOnela Mann != (Bat)man
 
-2
Q: SQL Code that asks for computer characteristics. Returning two errors but I can't figure them out

user164871CREATE TABLE WPCOMPUTER( SerialNumber INT NOT NULL, Make Text(12) NOT NULL, Model Text(24) NOT NULL, ProcessorType Text(24) NULL, ProcessorSpeed INT NOT NULL, MainMemory Text(15) NOT NULL, DiskSize Text(15) NOT NULL, CONSTRAINT WP_PK PRIMARY KEY (SerialNumber), CONSTRAINT MAKE_CHECK (Make IN ('D...

 
@MathiasEttinger forgot Edward Scissorhands
did he miss Elton John? enough John's and James' in that thing
 
@MathiasEttinger Batman is a city in Turkey
 
5:36 PM
Netherlands is a city in Missouri.
 
Nederland (Dutch for Netherlands) is a city in Texas, Colorado and Overijssel (a province in the Netherlands).
They give cities all kind of crazy names.
You can walk from France to Egypt not far from here.
 
Heh, well, London to Paris is not so easy in my neck of the woods.
 
Huh, today I learned that that part of Canada is actually in between the US
 
Yeah, there's part of the US in between canada too... a really odd dislocated part of the US... let me find it....
 
5:44 PM
Ah that reminds me that there's parts of The Netherlands in parts of Belgium that are inside The Netherlands
Baarle-Nassau ( pronunciation ) is a municipality and town in the southern Netherlands, located in province of North Brabant. It had a population of 6,803 in 2017. The town is the site of a complicated borderline between Belgium and Netherlands, with numerous small exclaves of Belgium, some of which contain counter-exclaves of the Netherlands. == Geography == === Topography === Topographic map of the municipality of Baarle-Nassau, June 2015. === The border with Baarle-Hertog, Belgium === Baarle-Nassau is closely linked, with complicated borders, to the Belgian exclaves of Baarle-Hert...
 
@rolfl yeah I've watched videos about the NW angle: e.g. this one
There is also point roberts
And this brings us back to the xkcd from 2017-10-13 which Rmunroe shared that day
 
This might be a suitable question on Code Review, but make sure you read their help pages and ensure your question follows their rules and is on-topic on their site. — AdrianHHH 33 secs ago
 
@MathiasEttinger not fair
 
@rolfl Cool never knew that!
 
lake of the woods???
 
5:56 PM
@SamOnela Wow !
 
oak island is US
@rolfl I think this is a better illustration of that --> google.ca/maps/place/Lake+of+the+Woods+County,+MN/…
sorry I was zoomed in...
 
It's no surprise that it's so close to Emo Ontario: google.ca/maps/place/Emo,ON
 
@skiwi a lot of Canada is between Alaska and the lower states
elm point is just hanging out there...lol
 
@skiwi Depending on how you look at it, one could argue the entirety of Canada is between the USA.
Between Alaska and the rest of the bunch, that is.
 
Your question is off-topic. Stack Overflow is for questions about programming related problems, with concrete answers based in fact. Style is not a problem (unless it's non-existent), and any answer will be based solely on personal opinion. Having said that, Code Review exists exactly for questions about various improvements to working code. — StoryTeller 35 secs ago
 
6:45 PM
Because i have limited C++ experience and was attempting to solve the problem that was given by the user. If he wants an entire code review, that is great. But thats not what i was trying to do, nor is it what was requested. I could be wrong, but i think he asked how to get all the numbers into one large string...... — Steve Bohmbach 44 secs ago
 
7:19 PM
0
Q: Executing asynchronous functions in sequence

Mark AdelI implemented a function for practice that takes a collection of asynchronous functions and a callback. It executes the functions in sequence then calls the callback with the results (coming from the callbacks of the async functions). It partially mimics the behavior of series function in the asy...

0
Q: IBAN validate number in ruby

cassidb7Looking for tips on how to improve my code and areas that I can better follow Object Orientated principles. Is this class structure ok? How is the code overall? The problem: There are two IBAN standards: IBAN-10 and IBAN-13. IBAN-10 is made up of 9 digits plus a check digit. IBAN-13 is made up o...

 
7:43 PM
Monking
 
 
1 hour later…
8:57 PM
your challenge is doing it more short and efficient than me and in one line. Actually, it's your challenge. We're here to help, but not to do your homework for you. Also, this kind of question is not for Stack Overflow, it's better for codereview.stackexchange.com. Lastly, in programming shorter != more efficient && shorter != better. — Scott Marcus 25 secs ago
 
0
Q: Maximum sum subarray implementation using Go

SKSVI'm trying to implement the maximum sum contiguous subarray problem with just recursion. But the result I'm getting is for maximum sum subsequence. I think I'm missing something in the formula. Please point me in a right direction. maximumSumSubarray.go package main import ( "fmt" ) func ma...

 
9:52 PM
0
Q: Find the closest number in a sorted list to a given target number

NinjaG Given a list of n integers sorted in ascending order, find the closest number (value) in the list to a given target number. How quickly can you do it? I'm interested to know if there's any feedback for my code. def getClosestValue(arr, target): n = len(arr) left = 0 right = ...

 
10:20 PM
possible answer invalidation by Exploring on question by Exploring: codereview.stackexchange.com/posts/189975/revisions
 
-1
Q: Python Lambda function to deactivate IAM access key

AhsanI have this code in my lambda function: import boto3 iam = boto3.client('iam') def lambda_handler(event, context): access_key = iam.AccessKey('USERNAME','ACCESS_KEY_ID') response = access_key.deactivate() I'm trying this with a valid username and access_key_id, I get an error saying "error...

 
@Duga rolled back
 
11:18 PM
This best over at code reviewCodexer 16 secs ago
 
11:41 PM
Any European's around?
Trying to make an international purchase and need help on the pricing :P
> 17,- Euro
Does that mean 17 Euros, or does the ,- signify something else (e.g. 17,000 Euros)?
 
@Hosch250 I believe the comma is equivalent to the decimal check out this forum post: What's the comma in Euro for?
 
@SamOnela That's what I thought I remembered too.
And they use spaces instead of , for thousands, right?
So this would mean, in US-speak, 17.00 Euros, and they just used the - to signify nothing?
 
Actually I think dots are used to separate thousands... e.g. evidence by this post
 
Hmm. I've seen spaces.
This must look really funny to Europeans to see US people discussing their practices.
 
the comma is the decimal separator
so it's 17 euros and zero cents
 
11:47 PM
Thanks.
 
the ,- is just a "fancy" and very widespread way to write ,00
 
Yeah, I've seen the - a little bit in accounting. Usually don't see it on order forms here, though.
Now I just need to see if I can find some place that sells the thing here. I don't trust myself buying through an international webpage.
 
🆗
 
mumble mumble encryption mumble
 
LOL, yup :)
You know what we need? One-time credit card purchases!
So we can use our credit card to make a purchase, and it's only good once. No matter if anyone steals it.
 
11:55 PM
that stuff is called nonce...
 
Oh, this is interesting. They just get your contact information on the webpage and say they'll get in touch.
 
the idea is really simple.. just nobody implements it...
because who takes care of validating the nonce...
and how do you securely transmit the nonce, and so on and so on...
 
Well, HTTPS should take care of transmitting more or less...
And it should only be valid for, say, 30 minutes, too, and only for a limited purchase amount.
So, I need to make a $30-some purchase, I could generate a "key" good for $40 bucks that was good for 30 minutes.
That would tie back and charge my VISA with whatever purchase was made. Anything surplus would just be ignored, and would be invalid anyway after the purchase.
 
like putting it in a Swiss deposit box...
 
They send "egift codes". Why can't they send a one-time key that's basically the same thing tied directly to your VISA?
 

« first day (1782 days earlier)      last day (2240 days later) »