« first day (1875 days earlier)      last day (2133 days later) » 

12:00 AM
RELOAD! There are 5389 unanswered questions (89.9620% answered)
 
@202_accepted ^
 
Yeah, I have a mailbox for a user that goes back to 1997...lol
 
Geez...
 
12:36 AM
Yeah, her mailbox is 100+G
 
That's crazy
No retention policy eh?
 
1:27 AM
No she keeps pushing back against it
 
 
1 hour later…
2:41 AM
0
Q: Simon memory game in pygame

ZackattackzI've been teaching myself python and I decided to make a Simon copy. Please let me know if there's anything notable that I should improve on. I understand my use of globals in some functions is considered poor, but I couldn't think of any other way to write them. Thank you for reading import pyg...

 
3:21 AM
SO is not proper site for code review suggestions. I would suggest you to ask question at codereview.stackexchange.comGaurang Dave 28 secs ago
 
3:54 AM
0
Q: Synchronizer object not following Single Responsibility Principle

HoomanI have created a Synchronizer: The purpose is to read data from XML source file and store the the result into DB. I have different type of source, for example Student.XML, School.XML, etc these file are copied in my source directory: C:\Source My Synchronizer should watch the Source folder, ev...

 
4:18 AM
0
Q: Convert IEnumerable<T> to CSV

TDSnetI have an IEnumerable of a view model that I need to convert to CSV and send back as a file response. I have written it out quite manually and I'm just seeking code review and suggestions on a more elegant solution, or alternatively if this looks acceptable, confirmation of that: public Acti...

0
Q: How to make my nginx and php-fpm highly available running, is running on droplets.

Tara Prasad GurungI have zero experience on hosting my web apps on Digital ocean. I have the droplets with this specification. 16 GB 6 vCPUs 320 GB 6 TB(bandwidth) I am hosting a web apps here. MY main goal was. As it got great bandwidth and CPU and memory. will handle alteast 100000 concurrent traffic...

 
While Code Review might be a good place to suggest going for this type of question, we should get out of the habit of sending question-askers over there. Please read this meta post for clarification. — Rcordoval 59 secs ago
 
Monking
 
4:57 AM
@Phrancis One of my accounts goes back to 2005, so 2013 is nothing.
Monking
 
@Mast Do you have a 250 MB limit on the Exchange server though?
 
5:25 AM
Seeing as you have a working function it might be worth asking this on codereview.stackexchange.com instead. — John V. 12 secs ago
 
0
Q: php iterate infinite number of arrays

DavSevI am facing a challange, I have thre arrays, each array contains only numbers. I have a function get_sum the function receives 2 parameters, an array of arrays and a number. The number is a sum I want to receive from summing one or more bunber from each array, for example: If I have 2 arrays [[1,...

 
@Phrancis No, it's free webmail from MS. There must be gigabytes of information in it by now.
Previous place I worked had a moving limit on the Exchange server. So if you hit the ceiling, it would automatically grow larger.
So multiple colleagues just ignored the e-mails of their mailbox getting full.
Must've been fun at the IT department there.
 
5:47 AM
0
Q: How to extend only Main Class to multiple class?

ichimaruI am using PHP 7.0. I have this 4 classes. Main Class - where we set variables and declare them. Cpc, Basetable and Layer Class are the same. The Master Class which is the one initiating the process. Now Cpc, Basetable and Layer share the same variables because they extend from one another. <...

 
6:46 AM
0
Q: Increase performance of Google Drive Upload C#

Brendan GoodenI'm using Google Drive API for uploading large disk image files ( >100 GB). My Code uses this wrapper to upload these large files in chunks of 40mb. The files are stored on NAS drive. The code works fine, however I'm losing a lot of performance due to the fact that each chunk has to be downloade...

0
Q: Three class extended to one class

ichimaruI built this 4 classes where the Main is the one responsible for setting and getting the variables. I am using PHP7.1. Please let me know on how to make this more amazing or maybe using trait. How does my classes look? Is it professionally made? what do you guys think? thank you very much! <?php...

 
why not post in code review ? — C2486 27 secs ago
 
7:02 AM
0
Q: resize logo and header based upon %

Jonathan C. HoefsHi I’m a noobie at creating websites, and I’d really love some help with a problem I've tried to solve on my own, but failed. I am using the Shaper_Helix template version 2.5.3 with Joomla!, and my site is freshears.org I’d like the header, logo, and fa-bars to be 13% of the window size: how c...

 
7:15 AM
Monking
 
7:25 AM
0
Q: Deflating a Stream using System.IO.Compression

user2950509I receive messages from a MessageWebSocket connection frequently, which are compressed with zlib. The following code decompresses them to a stream which can be read with JSON.Net's JsonReader. I'm pretty sure there are some improvements to be done, but can't quite put my finger on what: private...

 
Monking
 
7:41 AM
0
Q: UITableViewDataSource with different sections and SearchController

TeetzI have a UIViewController holding one UITableView with 3 sections. Also this UIViewController implements UISearchResultsUpdating for searching in that UITableView. The UIViewController looks like this: class MyViewController: UIViewController, UITableViewDataSource, UITableViewDelegate, UISearc...

0
Q: Min/Max Heap implementation in Python

DJanssensI'm refreshing some of my datastructures. I saw this as the perfect opportunity to get some feedback on my code. I'm interested in: Algorithm wise: Is my implementation correct? (The tests say so) Can it be sped up? Comparing my code to the one in the heapq module, it seems that they do not p...

 
^ Look at that pretty face.
 
8:03 AM
0
Q: Rounded borders for different controls (Button, TextBox, ComboBox) via Attached Property

Vadim OvchinnikovSuppose you just want to set border radius for different controls: Button TextBox ComboBox The most frequent approach I usually find is totally override default template like in answers https://stackoverflow.com/a/4779905/1548895 https://stackoverflow.com/a/6746271/1548895 https://stackover...

 
8:18 AM
Monking
 
8:31 AM
You took a perfectly working comment and broke it. Then you tried to add some value (I'll grant you that) but then at the price of losing any file with a not-so-unlikely name. If someone, (out of curiosity) gives a try to your code with such a bad luck it will lose the file for good. Additionally, if there exists a folder named x, your command just fails. Don't thank me and please just fix your code. You don't even need to use an one-liner. And if you think your code is so good, please post it in Code Review. — cdlvcdlv just now
 
8:49 AM
Monking
 
9:07 AM
0
Q: Mybatis switch data source

Frank.DaiMybatis switch data source. Query operation use slave data source and update operation use master data source. Configure data sources @Configuration public class DataSourceConfig { @Value("${data.source.type}") private Class<? extends DataSource> dataSourceType; @Bean(name = "...

 
9:23 AM
0
Q: Advanced method Three class extended to one class

ichimaruI built this 4 classes where the Main is the one responsible for setting and getting the variables. I am using PHP7.1. Please let me know on how to make this more amazing or maybe using trait. How does my classes look? Is it professionally made? what do you guys think? thank you very much! <?php...

 
@bradbury9 Not at all, this is stub code which is off-topic for codereview. — Mathias Ettinger 10 secs ago
 
9:47 AM
0
Q: Find and replace placeholders in Word with values from Excel

MRKI'm new at this and need assistance with shortening/streamlining the 2 pieces of code that is repeated three times each (this is a shortened version as these pieces of code is repeated many more times). Sub CreateWordDocTest() Dim wApp As Word.Application Dim wDoc As Word.Document Dim myStoryRa...

 
10:21 AM
0
Q: Wrap Business Object to DTO with additional fields

wesleyyMy REST service has 3 layers: Persistence Layer - database entities live here Business Logic Layer - business objects live here Access Layer - data transfer objects live here The flow for reading a single entity (/entity/{id}) is: Database Entity Object --> Business Object --> DTO The tri...

 
10:36 AM
You can try seeking help in Code Reviewsoufrk 16 secs ago
 
Who one can name a code snippet that does if (value) { return true } else { return false }.
(value already holds bool true/false)
 
10:57 AM
@MathiasEttinger if I edited this to be a working piece of code would it stand a better chance of being answered in code review? — jim smith 9 secs ago
 
0
Q: bruteforce using HttpWebRequest

Youssef13I'm making a bruteforce to a certain website. The password consists of numbers only. It is 8 digits and it ends with 1 Example: 94315871 My current code: Imports System.Net Imports System.IO Imports System.Text Imports System.Runtime.CompilerServices Imports System.Text.RegularExpressions Pu...

 
@sineemore Smells like a basic ternary.
 
@Mast, I belived there is some fancy name for this kind of error.
 
function yesOrNo(isMember) {
  return (isMember ? "Indeed" : "No, sorry");
}
 
Noop, like this:
`
function isTrue(val) {
if (val) {
return true;
} else {
return false;
}
}
 
11:09 AM
@sineemore Type enforcement? I'd however use return !!value; if I wanted to ensure it's true or false, not truthy or falsy.
 
Is chat formatting same as in SE questions?
 
@sineemore Split it into two comments, code with 4 spaces infront
 
function trueOrFalse(foo) {
  return (foo ? true : false);
}
 
@Mast, but what if foo is boolean already (:
People tend to write if (val) { return true } else { return false } instead of return val
 
@sineemore What if ret isn't a bool and you want it to be one?
 
11:14 AM
@Peilonrayz this is not about "what if"
@sineemore I haven't found a useful name for that
 
@Vogel612 Huh, "but what if foo is boolean already"
 
The bottom of sessionExists function
 
28 mins ago, by sineemore
(value already holds bool true/false)
 
@Vogel612 I tried to google for this, but no luck
 
11:16 AM
I usually just call it "boolean return simplification" or something in my reviews
 
Oh, nice one. I'll stick to this
May I include Golang standart library source code (several lines) right into answer body?
Are there any issues with licensing?
 
@sineemore So, if you can remove the log, the code can become:
cookie, err = req.Cookie("id")
return err == nill and sessions[cookie.Value][1]
right?
 
@Peilonrayz, I am writing this in my answer (:
 
If you're just looking for a code review then there's a different Stack Exchange community for that: codereview.stackexchange.comDavid 14 secs ago
 
And you can remove the log. There is no point in logging cause no other errors can happen.
 
11:26 AM
0
Q: Add class based on checked checkbox

user007I am looking to simplify this code as it is to bulky for what it is doing. I do not need to stick to jQuery. Simple checkbox in html relates to adding underline to some text: $("#houseOrCar").on("change", function () { if ($(this).is(":checked") ) { $("#houseChosen").css("text-deco...

 
@Peilonrayz oh, noop. There is an issue with map lookup. It wll panic if there is no such key.
@Peilonrayz, it is better to _, exists := sessions[cookie.Value] and then return exists
 
I'd just say to take advantage short circuit evaluation
 
12:14 PM
This sounds suited to Code Review - SO is if there's a problem that stops the code from running or you're getting incorrect results. Code Review for "how do I make this code better". — Darren Bartrup-Cook 23 secs ago
 
0
Q: BFS isn't working for solving a 2x2x2 cube - Python 3

Shawn YiI'm taking MIT courses(online) and there was this problem that we had to use BFS to solve a 2x2x2 cube.This is my code: queue = deque() queue2 = deque() queue2.append((a,b,c,d,e,f)) queue.append((A,B,C,D,E,F)) parents = {(A,B,C,D,E,F): (None,'')} parents_2 = {(a,b,c,d,e,f):(None,'')} moves=[' Ri...

 
12:31 PM
If you do post to Code Review remember: Code Review requires concrete code from a project, with sufficient context for reviewers to understand how that code is used. Pseudocode, stub code, hypothetical code, obfuscated code, and generic best practices are outside the scope of this site. — Darren Bartrup-Cook 5 secs ago
 
0
Q: design pattern for iteration php

jim smithI have this class where I can perform two loops on the same associative array, is there a design pattern that would accomplish this but with only one loop? I was thinking it would be Iterator class and then injecting functionality to run on each iteration? class Contacts { public __constr...

 
@Mast I've got over 15k in my deleted folder.
IIRC, we've got a limit of a couple GB.
Oh, found the setting. I've got 99GB.
I'm using .9 so far.
 
@sineemore I still don't understand what you're actually trying to accomplish ^^
 
Get my review next Friday.
 
@Hosch250 I don't have the foggiest what the limits of my private accounts are and I don't have a work account at the moment. Starting a new job in July.
 
12:43 PM
@Mast It should say in the File tab in Outlook.
 
My private accounts are webmail :-)
 
There's a "status" bar under the Mailbox Settings header that says the limits.
@Mast You should be able to sign in with Outlook anyway, no?
 
Probably. But will the limit shown be my local or global limit then?
 
Global, I think.
Not sure, though.
 
0
Q: VBA Latency Issues

anish raoI'm working on a large VBA project for work (around 1000+ lines of vba code) This module is called within another module where I disable everything possible like screen updating, events and setting calculation to manual to improve speed, yet this still seems to run slowly when I'm working with sh...

 
12:57 PM
@KevinZych Actually, I didn't get round to it in 2016, but have finally bitten the bullet in the past 3 months. I chose to start from scratch with 'rails new' and migrate the code over (taking the opportunity for a code review and spring clean). It's a lot of work (more than I remembered) but the actual rails side of the migration is more straight-forward than I expected. Some of the ActiveRecord queries are requiring significant change though. — Snips 27 secs ago
 
@Vogel612 im stealing this (with your permision (so not actually theft))
 
@Mast I thought we had a conversation about this on Meta or something? that just because the user is looking for a review of a more specific area, that is not a reason why we should not review the other areas anyway.
 
@Malachi I remember the answers disagreeing with each other.
 
@Mast which post are you referring to?
 
Oh, wait a minute.
You're confusing 2 separate problems which both have their own meta IIRC.
 
1:11 PM
I am sure that there are at least 2
 
There's posts wanting a review, asking about something specific. In those cases we can touch any other point anyway.
 
but I think they were posted during different eras
 
There's also points wanting a rewrite which aren't concerned about a review. We should simply fling those into oblivion, since they fail the most important question of the on-topic help centre.
 
@sineemore A coworker I had (who recently died) did that a lot.
 
You're talking about the first while we were talking about the second.
 
1:14 PM
are you talking about two different questions in question or two different issues in the question --> codereview.stackexchange.com/questions/196994/…
 
@202_accepted, I saw similar errors a lot as well.
This deserves some general name. And possibly a Wikipedia article.
@202_accepted who your "buying house" thing doing?
 
@sineemore Ugh...not fun.
They keep selling the ones I want.
 
@202_accepted, I am in fear of such events coming to my life.
I feel I have no control of what is happening outside my process table.
If only everything had some decent man page or at least documented API..
The "you need that paper to get this paper" thing dooms me a lot..
 
Yeah, that's the hard part. "We need: 2 most-recent bank statements, 2 most-recent pay stubs, 2 years tax returns, 2 years W2's..."
 
Oh my, I thought it will be city house.
Is it somewhere in the countryard?
 
1:27 PM
@sineemore Yeah, it's outside the city a fair bit. I'm a country-folk.
 
@202_accepted I know the feeling. And the rest is too expensive. Prices raise 5-10% a year at the moment, even in my region.
@Malachi 2 different questions. The question in question only suffers from the "I don't want a review" problem IIRC. But my internet is FUBAR today so I haven't finished loading the question yet.
 
@Mast I'm not too bad off on the $$$ part, just finding one I like is tough.
 
@202_accepted The ones I like are usually the tad more expensive ones...
 
@Mast The ones I really like are literally just outside my price range, so I'm trying to find one around here that's $150-$200k,
 
Exactly.
@skiwi Seen the selection of robo soccerplayers yet from TU/E? They even won the worldcup this year.
> Van Sleutelen
De Moer
Van Perslucht
Van der Tandwiel
Robodinho
 
1:53 PM
-1
Q: Compare two data frames

MayreI'm trying to create a new columns in a file A by using 2 consecutive file (id_base and id_offset) to create a delta. The aim of this column is to have a date stamped when the keyword "Completed" is inputted for the first time by comparing daily files. I found this code, I tried to adapted it but...

 
2:11 PM
in The Factory Floor, 18 hours ago, by dot_Sp0T
I would honestly love having a WB meetup - or at least knowing there is one somewhere
Followed by:
in The Factory Floor, 18 hours ago, by Secespitus
@dot_Sp0T The FBI would likely want to know about such a meetup, too
Then there's a hilarious list of their most peculiar questions.
 
@CaptainObvious Could use some VTC here.
@202_accepted How is the feud going?
 
@pacmaninbw Over now, I ended it.
Might get fired, but oh well.
 
Told you to be careful.
 
@202_accepted How?
 
@pacmaninbw Ah they won't fire me for it. :)
 
2:26 PM
0
Q: Patient Appointment CSV to insert records using simple_salesforce

JaredTEach day I receive a CSV that contains data concerning a patient record and a related appointment record, each on the same row of the CSV. My code is designed to: Parse the entered CSV for two separate but related records per row Validate some data (email) Generate some data (duration) Insert t...

 
@Hosch250 Basically I said this is a silly discussion and almost all of these ideas miss all three major points.
 
And they managed to agree on that?
 
@202_accepted I'd be lucky to find a studio condo in my neighborhood for $450K.
 
I'd expect your boss to side with you and the other guy to disagree, or something.
 
@Hosch250 Well I proposed a new solution that takes care of all three issues, and they agreed to it for some reason.
The other department head hates my boss, but she likes me for the most part.
2
 
2:30 PM
@202_accepted Key word: most
 
@202_accepted, is there some prequel laying in the chat?
 
@sineemore Yeah, look yesterday around 1600 UTC-0400.
 
Oh my..
 
Yeah....
 
Damn, I'd like to post a story about out company deploy standarts being dd if=firmware of=/dev/sda.
To get a recent firmware you simply need to go to devs machine and dd if=/dev/sda of=firmware
"Pretty solid" they say
And the firmware weights several Gb.
It is actually a raw snapshot of physical disk with Linux onboard.
 
2:46 PM
would this be better for code review? — L_Church 15 secs ago
 
3:10 PM
code review? what's that? Is this it: codereview.stackexchange.comuser8758206 6 secs ago
 
posted on June 22, 2018 by CommitStrip

 
@Killed_by_Bugs There is also codereview.stackexchange.com I would suggest you post there a complete, runnable and well documented code and ask for help running it faster and tips for better style. But it's important that others can grab that piece of code and can start to profile and optimize it — Andy 22 secs ago
 
@CommitStrip At least it wasn't PHP.
 
3:28 PM
@CommitStrip That's kind-of how I got started with Python.
 
@GeorgеStoyanov Why not just have a lines list, and put each string in the list? That would do away with the need for the first for loop that uses locals. I'm at work right now, but I could show how this could be written neater when I get off. Or, post this as a complete example on Code Review, and I'm sure there would be many people willing to help. — Carcigenicate 36 secs ago
 
-1
Q: Keeping if statements and javascript code simpler and quicker

user8758206I've managed to create a function that checks whether arrays 'a' and 'b' can 'swap' corresponding values to 'increase' - e.g.: var a = [1,2,3,4,5] // is increasing var a = [1,4,6,7,36] // is increasing var a = [1,6,3,6,5] // not increasing Some successful tests: increaser([5,3,7,7],[1,6,6,9])...

 
@Mast I think that translation is what leads other users to believe that question is off-topic, I don't read it as "I don't want a review"
 
@Malachi Ask OP. We can only guess.
 
if the sentence about the OPNetwork simulator were not there, would it be on-topic to you?
This sentence can be easily misinterpreted, "with or without using random library, preferably for OPNET network simulator"
 
3:40 PM
There's a tendency of a couple of users to go about it that way. What if this, what if that.
We're not here to guess. That's why we need context.
Can it be rewritten into an on-topic question? Yes.
But so can half of Stack Overflow.
It turns into questions the OP is not interested in or might not be interested in.
If you want to know, ask.
Until then, the current version is a feature request and not a request for review.
So it fails the on-topic requirement list.
 
personally, I disagree.
 
Do you want to re-write that list to accommodate for questions that don't want to be answered?
 
I disagree with your assessment that the OP doesn't want a review of the code given
 
Sure, we shouldn't be a bunch of grammar nazis. Request for review doesn't have to be explicit. But in this case, it's explicitly a feature request. We get a lot of those. They want a feature, not a review.
 
what feature do they want implemented?
 
3:45 PM
Note: I didn't VTC the question so I'm kind of feeling I'm fighting someone else's battle.
Honestly the question it's about is not as clear-cut as the general case I presented here. But anyway. The last paragraph:
> Now, I am curious to know how I can write this program in a more readable code with or without using random library, preferably for OPNET network simulator.Do you have another suggestions for implementing the "find_gap_randomly" function in C ?
The first sentence, right up till 'library', looks like a perfectly valid request.
More readable code, right up our alley.
With a suggestion even. Good. OP has thought ahead.
However, the rest gets messy.
> preferably for OPNET network simulator
Wait, the requirements are fluid?
> Do you have another suggestions for implementing the "find_gap_randomly" function in C ?
No, we can look at your current code. Alternative versions can be part of a review if we feel the current solution is utter crap, but we aren't a code rewriting service.
However, and this is why it's a grey area. It's all optionally phrased.
You could throw away the entire paragraph and all of a sudden it's on-topic.
A better option might've been to close it as UWYA till OP has cleared up what the last paragraph means and what he actually wants.
I'm not touching that question with a ten-foot pole after 2 moderators have asked about it and an ex-moderator appears to disagree with them.
Just spouting opinionated crap here, on request.
2
 
Monkday
 
4:02 PM
@Mast Wow. Those names
 
4:27 PM
 
4:45 PM
@RMunroe o - kay... ٩(͡๏̯͡๏)۶
 
4:58 PM
-2
Q: Find a Numeric Palindrome from the Product of Two 3-Digit Numbers

Jonathan MeeSo I think this is a good solution to finding a numeric palindrome from the product of two 3-digit numbers... But it seems like there are some improvements that we could make which I haven't thought of... Do you guys have any thoughts on this code: for(auto it = crbegin(inputs); it != crend(inp...

 
5:27 PM
Yeah code review is not needed. — will7200 7 secs ago
 
5:43 PM
Since this is functioning code, wouldn't it be better asked on Code Review? — zero298 52 secs ago
 
So the steaming pile of garbage that is the F35 goes into mainstream production today...
 
6:01 PM
Fun.
I still think the gov is running a massive money-laundering scheme there to cover the costs for a separate jet.
 
0
Q: Shortest Job First Preemptive

coderI will write code for all scheduling algorithm in future that is why scheduling.h will contain common data members and member functions. Please help me to improve and optimise this code. scheduling.h #ifndef SCHEDULING_H_ #define SCHEDULING_H_ #include <vector> typedef unsigned int uint; cla...

 
6:17 PM
@202_accepted What's wrong with it?
(monking!)
 
@Phrancis It was one of the worst and most poorly designed craft in U.S. history.
 
@Phrancis It has a history of breaking. It seems to have been more/less fixed at this point, but it was pretty bad for a while at least.
 
Project started in 1992, we flew the first one in 2006, it's 2018 and Israel has finally used one in a combat role.
 
IMO they tried to put too much into one craft.
 
Unless I'm looking at the wrong Wikipedia article, it's been used since 2013 by many countries
The Lockheed Martin F-35 Lightning II is a family of single-seat, single-engine, all-weather stealth multirole fighters. The fifth-generation combat aircraft is designed to perform ground attack and air superiority missions. It has three main models: the F-35A conventional takeoff and landing (CTOL) variant, the F-35B short take-off and vertical-landing (STOVL) variant, and the F-35C carrier-based Catapult Assisted Take-Off But Arrested Recovery (CATOBAR) variant. On 31 July 2015, the United States Marines declared ready for deployment the first squadron of F-35B fighters after intensive testing...
 
6:21 PM
@Phrancis Not necessarily in combat.
But meh.
 
@Phrancis See Combat Operation. (Or lack thereof)
 
0
Q: has_palindrome_permutation python

NinjaGWrite an efficient method that checks whether any permutation of an input string is a palindrome. We can assume the input string only contains lowercase letters. Examples: "civic" should return true "ivicc" should return true "civil" should return false "livci" should return false def has_p...

 
6:42 PM
 
@202_accepted Ah, yeah, fair point
 
6:59 PM
-1
Q: Is it bad practice to use a macro to define default move and copy constructors?

Anonymous PersonOften when I write a C++ class, I find that the default copy and move constructors are sufficient for its needs. I then write the following lines in the class's header (with Foo representing the name of the class): Foo(const Foo&) = default; Foo& operator=(const Foo&) = default; Foo(Foo&&) = def...

 
7:33 PM
Feeling like a magician (∩`-´)⊃━☆゚.*・。゚
I need to learn some more js because when I read your answers it's like reading harry-potter - all magic ;-] — t3chb0t 2 mins ago
 
@SamOnela Uhhh... That's PHP ¯\_(ツ)_/¯
 
I know!
 
In any case, if it reads like magic, it wasn't clear enough :P
 
@SamOnela What does this .= operator do?
 
@hoffmale do you mean I should explain things better?
@Phrancis appends to strings - similar to += for numbers
 
7:38 PM
Oh. That dreadful dot-append thing in PHP
 
I'm glad I've never had to use PHP
 
@SamOnela Well... it seems that the author of that comment is either unable to comprehend how you arrived at your code or wouldn't be able to write similar code himself
 
@Phrancis I don't know I'd call it "dreadful", it does to weird things sometimes if you're not paying attention.
 
In either case, it isn't clear enough to him
 
7:43 PM
@Phrancis you mean for work (and things other than your Project Euler solution?
 
So you might need to explain better, or he might need to read up on PHP practices
 
@SamOnela For work or for personal project. I'd pick Node.js or Java over PHP every time
 
lol, how embarassing is that -_- I was reading your answer and wondering what js is that! I should have looked at the tags first :-P — t3chb0t 30 secs ago
 
(or .NET - don't stone me @202_accepted :)
 
@Phrancis You'd pick Java over .NET?
 
7:45 PM
@Phrancis Which .NET? There are two now. ;)
 
picks up stones
 
Well, I know Java a little better, that's all
I'd probably pick Node.js over Java, to be fair
 
There's .NET Framework, and .NET Core. (Actually, there's also .NET Standard, so 3 versions.)
 
Microsoft makes things so complicated :P
2
 
The .NET Core API is actually really cool, I ran an F# project on Linux today with no Mono what-so-ever.
 
7:46 PM
more complicated than Java SE, Java EE, Java ME, ... ?
3
 
@Phrancis All in the name of backwards compatibility and non-breaking changes.
 
Just a suggestion: consider posting your question over at the Code Review SE. They might be more open to offering broad performance improvements. Also, you might find some helpful info in the free book R Inferno. — Sam 43 secs ago
 
@Phrancis I'll be on GTS tonight a bit. You working until 2030 like normal?
 
@202_accepted I'll be working until 22:00 as usual :P
@hoffmale I guess all of it is complicated then
Except Node, that one's still simple ;)
 
8:09 PM
Anyone doing Golang?
 
A bit...
 
I wish there were more Golang posts in here.
 
Evidently it's not a very popular language, we only have 326 questions on it
Oh nice, golang has a panic() function :D
 
I generally like the simplicityof Go, but most of the time I miss templates and memory control too much so i go back to C++
 
nice
 
8:15 PM
panic is awesome way to quit your application early. Just like assert() XD
 
C++ templates are like generics in Java/C#, is that about right?
 
somewhat, they are far more powerful :P
 
Backed by mmmmuuuuuucccchhhhh more power. But generally yes.
+1
 
in other words: C++ templates are the world's ugliest functional programming language that accidentally describes types :P
5
 
Damn. I remember, how Node.js took my heart with express.js super simple web server snippet and awesome one page documentation of standart library...
 
8:21 PM
Yeah Node is super easy if you just need a server
 
^^
 
Same as Golang.
Oh my, there are tons of unanswered questions $.$
My new favorite tag.
 
8:44 PM
@Phrancis except that generics in Java barely deserve the name and in C# they are only marginally better
 
@Phrancis Alright man, I'll hit you up on Skype.
 
@Vogel612 Marginally means including runtime support...
But how are C++ ones?
 
@Vogel612 I think the C# ones are pretty nice. HKT's would be a nice addition, but pretty good otherwise.
 
@202_accepted HKT?
 
"Higher Kinded Types", it's a functional think (Haskell, typically).
 
8:50 PM
possible answer invalidation by rjzii on question by rjzii: codereview.stackexchange.com/posts/197019/revisions
 
Any opinions on Scaling decimal numbers up within bounds of limit? I voted to close as “unclear what you are asking” now, after several attempts to clarify the problem (apparently most of them have been deleted by moderator now). But the program output (still) does not match the given example (which OP explains with floating point inaccuracy) – Am I too critical?
 
Basically, you have IEnumerable<T> and IObservable<T> and such, HKT's could allow something like T<SomethingElse> where the T would be something like IEnumreable<SomethingElse> or IObvservable<SomethingElse>.
@MartinR I'm unclear after reading that.
 
The code has been updated again, now the output matches the provided example.
 
@MartinR so will/have you retract(ed) your VTC?
 
@202_accepted That's kind of unclear, no?
What do you mean by you could have T<SomethingElse>?
You can do that anyway.
 
8:59 PM
@Hosch250 So the outer T is now the generic.
 
@SamOnela I just did. The question looks better now.
 
Ohhh.
 
So you can say "I want a T<string>, which means anything that fits that bill is valid.
 
This is closely related to shapes.
And there is talk about it.
 
So now you can pass IEnumerable<string>, IObservable<string>, IComparable<string>, and they all work for the function.
Vs. having to define one that takes each separately.
 
9:00 PM
Shapes would be further extensible and support things like : where ctor(string).
 
(At least, that is my limited understanding.)
 
Yep, that would be cool.
 
F# can do limited similar things via active patterns.
 
Yep, F# doesn't actively support HKTs. I found a thread asking about it while searching.
I didn't understand the Scala notation in the other threads.
I think I need to learn Scala next.
 
I don't do anything that really warrants HKT's, even the examples I saw seemed contrived.
@MartinR I still have no idea what it's asking.
@Hosch250 I would be far more satisfied to see support for constraints on functions to say "I don't GAF what's passed here, as long as it has a function named ____".
 
9:07 PM
Are my comments not justified/invalid for this answer?
 
I think that could have been handled better on both sites.
 
@202_accepted so... C++ templates? xD
 
@202_accepted As I understand it: Given are n floating point numbers x_i , and an integer bound M. Determine a factor f such that all numbers f * x_i are integers, and their sum is <= M. – That is (roughly) what I wrote in a comment, and OP confirmed it. Both comments have been deleted in the meantime.
 
@hoffmale I don't think templates cover that, do they? I'm wanting to have a function that takes anything, so long as that anything has a member with some name and signature.
@MartinR I still don't follow, but if you say it's good I'll take your word for it.
 
template<typename T> f(T t) { t.do_something(); }
only compiles if t has a member function do_something()
 
9:11 PM
Oh, nice.
 
Assuming there is no other specialization
 
Then yeah, that works for me.
@hoffmale Doe that require a specific signature of do_something?
 
@Hosch250 C++ templates are basically a full-fledged programming language of their own
 
@202_accepted can be as spcific as need be
 
I know some people that implemented a regex-parser in TMP
 
9:12 PM
TMP is (nearly) Turing complete... so a DFA is definitely possible
template<typename T> f(T t) { int x= t.do_something(); } Now the result of do_something needs to be assignable to int
statically checked at compile time
 
Ah, that's not what I want then.
 
you can restrict this in many different ways
 
I'd want to say that I expect a do_something(), and regardless of context, it should have a return-type of int.
 
template<typename T, typename = std::enable_if_t<std::is_same_v<int, decltype(std::declval<T>().do_something())>>> f(T t) {}
 
9:20 PM
only accepts types T that have a member function named do_something that takes no arguments and returns int
verified at compile time, ofc
 
Nifty
So then it does what I want lol
With the exception that it's at compile time, but that's still pretty cool.
 
Why would you need to know this only at runtime?
 
Sometimes, not often, but occasionally I need to do it for something that is completely unknown. Almost duck-typing style.
Granted, in those situations I usually use dynamic in .NET, so it accomplishes what I want.
 
C++ Templates are duck typing (as long as you know all possible types at compile time)
The hard part is rejecting types you don't want
And writing type traits to detect what you don't want
 
10:05 PM
Which part are you asking for improvement with? The chain of if statements? If so, please reduce this to a Minimal, Complete, and Verifiable example without all the irrelevant stuff. If you don't have any specific question, but just want your whole program reviewed in general, that's probably a good question for Code Review (but read their FAQ, don't trust me on that), but it's not a Stack Overflow question. — abarnert 54 secs ago
 
0
Q: Vectorizing a complex nested for loop in R (running models on different subsets of a data set, subsetting the data differently for each loop)

TalThis is my first time posting so hopefully I manage to get my question across in a clear and concise manner. I'm not sure this is the right place but someone on StackOverflow suggested I ask here. I am running a cross-validation experiment which involves training a model on a subset of a data se...

 
10:16 PM
Anyone with undelete vote privileges, can you look at this post? I asked them to clarify if the code was working, which they did a while back, but it was closed as broken, and then deleted
 
possible answer invalidation by Blindman67 on question by user8758206: codereview.stackexchange.com/posts/197071/revisions
 
10:43 PM
> How can this method be improved to (1) update a property nested at any depth, and (2) not lace results with [object Object] all over the place?
IMO (no mod hat) that's a feature-request
the code doesn't work for nesting beyond 6 levels deep
which ... works for most cases, I guess, but apparently not all...
and that makes it basically broken.
and OP just self-deleted the question, since it was not going to get answered
 
11:02 PM
0
Q: Implementing and benchmarking Radix Sort on unsigned integers

IncomputableIntroduction I implemented a restricted version of the sorting algorithm, the one that works only with unsigned integers. I wanted to try using std::stable_partition with bitmask, as I chose base 2. The reason partition works here is because there are only two "bins", thus it is somewhat like pa...

 
@Vogel612 Hm, OK I missed that, thanks
 
somebody complained about the emphasis usage on that post a few hours before and I happened to recall :)
 
It's a weird use case, to have to process objects that you don't know how deeply nested they are
 
@hoffmale Holy cow, is that ugly, LOL.
But yep, that's what C# shapes are going to support.
If/when they finalize the spec and implement it.
I hope it's in C# 9 (they've got the spec for C# 8 pretty much defined already).
@202_accepted Yep, that's what shapes are all about. It will support constructors and members with a set signature and return type, etc.
 
This will sound funny, but plain old JS has function/method and argument checks right out of the box, and has for a very long time
It's all part of Object.prototype
 
11:29 PM
@Phrancis the objects might as well be coming from some arbitrary JSON ...
@Phrancis weelll... but they are only runtime-enforceable, which makes that vastly different
 
@Vogel612 Ah yeah - didn't think of that
Is Node.js also only runtime or is there some sort of compilation going on?
 
there is at least one compilation step
webpack / babel can add more
 
11:48 PM
unrelatedly: my new monitor arrived and I tried to flip over the arrangement for my tower under my desk
now I have a horrendouds mess of cables and will switch most of it back tomorrow after sleep
well... such is the price of experimenting
 
possible answer invalidation by Hooman on question by Hooman: codereview.stackexchange.com/posts/197024/revisions
 
@Duga It's fine, they only added a comment
 

« first day (1875 days earlier)      last day (2133 days later) »