« first day (1777 days earlier)      last day (2243 days later) » 

12:00 AM
RELOAD! There are 5171 unanswered questions (89.9923% answered)
 
@Duga We finally dropped below 90%...
 
@Phrancis yep... we do what we can...
 
So, I need an IDE for JavaScript (mostly vanilla for now). I've been reading a few articles, while I'd love WebStorm I don't want to spend money on a license right now. I hear Netbeans has gotten quite good for JS so I think I will give it a 2nd chance
 
ah; I have been using PHPStorm for PHP & JS for a few years now... I like it; before that I used netbeans, and before that eclipse :)
are there any certain IDE features you are looking for?
 
This isn't a code review site. You might want to state up to which it is working. — El Tomato 36 secs ago
 
12:12 AM
-1
Q: Edit a chained list directly in memory

kenI would like to review my code below: typedef struct s_point { int x; int y; struct s_point *next; } t_point; /** * Don't let the machines win. You are humanity's last hope... **/ t_point *createPoint(int x, int y){ t_point *point; point = (t_point*)m...

 
@SamOnela I imagine PHPStorm is superb, if it's anything like their others
@SamOnela Code completion, refactorings, inspections, mostly
 
Ah - yeah I guess I have used it with a couple different libraries - like and it has good support; I honestly don't use it for debugging much - just do that in the browser
 
Yeah with JS you kinda have to use the browser, since it's all happening at run time
The main thing I didn't like about Netbeans is that it was ugly. But apparently you can re-skin it with a plugin
 
12:28 AM
0
Q: How do I use <String.Format> on my Java file in android studio

Arpan PathakI was trying to create a timer, and my timer displays 1:0 instead of 01:00, I waas trying to change the format on my Java file. for now I have been using this Code: int minutes = (int) progress/ 60; int seconds = progress - minutes * 60; String secondString = Integer.toSt...

0
Q: which method is best practice in React and ES6

MuhammedIn React which render method is the best practice calling {membersTable} in to the table or use map with in table and call as function {this.props.members.map(this.membersRow)} Both are seems to be working fine. class Members extends React.Component { membersRow(member, index) { return...

 
12:46 AM
-1
Q: I keep getting a error when I use my program

Zatbotimport random random.randint(1,2) print random I get a error when I run this, what am I doing wrong?

 
1:20 AM
0
Q: Objective-C and AFNetworking, net request methods repeats?

dengAproI want to improve my code. It is Objective-C, and about Networking Request. Just set the AFNetWorking Manager ,and get method name from method lists below (It is all Post request). The way we take now is quite weird. If there is another method to add, just add the list. Shall I combine the list ...

 
🍺
7
OMG that actually worked!?
 
Yep
@skiwi MW2! I've spent so much time on that game
 
1:48 AM
Sooo... dilemma
I have a JS object like this:
const impactLevels = {
    high : 1,
    medium : 2,
    low : 3
};
An by using === strict equality, I have to do something like this, because in the DOM it's a string, not a number
g_form.getElement(fieldRef.header.incidentStateId).value === incidentStates.new.toString()
Is this OK, or would it make more sense to change my object to this:
const impactLevels = {
    high : "1",
    medium : "2",
    low : "3"
};
 
Moderators: if this question is more appropriate for codereview.stackexchange.com, please feel free to move it there. — Shaun Luttin 11 secs ago
 
(I have other objects with reference values like that as well, this is just the smallest example)
 
0
Q: Function to check if folder path is valid

EdeniaIt is a function that validates a string is a correct windows path to a directory. It returns negative numbers if it isn't, 0 if it is correct and 1 if it also exists: int path_is_correct_directory (char *path) { size_t szPath = 0U; if(path == NULL) return -1; if(*...

 
 
1 hour later…
3:07 AM
Wrong place to post this ! codereview.stackexchange.com over here is the right stack exchange community ! :) — WilomGfx 56 secs ago
 
3:19 AM
0
Q: Intersect multiple arrays based on id value

ThomasI make an intersection between 5 arrays based on the Id value. I was wondering if there is a more efficient way to do this without using the select filters and if this can be done with less code in standard javascript. var category = [{id:123,'Name':'Batman','var':'category'},{'id':'124','Name...

 
3:37 AM
0
Q: Java Quick Sort code from int to string array

LewisI have this java code, wich makes the quick sort for intergers and I want to use the same code but to make an array of strings public static int pivotMedian( int v[], int ini, int end ) { int center = (ini + end ) /2; if( v[ini] > v[center] ) swap( v, ini, center ); if( v[ini]

 
3:54 AM
0
Q: Custom fixed-space block memory allocator (C++)

mrsaturn110This is a fixed-size memory allocator. The core memory block is just a unsigned char pointer, which gets allocated on initialization. Other than that, it's has pretty basic allocation and block safety checking functionality. Would appreciate any feedback :D template <size_t block_size, size_t bl...

 
 
1 hour later…
5:20 AM
1
Q: GameManager class for a Breakout clone

bruglescoI am a beginner and am almost done with my 2nd C++ project. It is just another breakout clone. I recently refactored a good deal of the code in response to this question. However I have left myself with a huge God Object class and don't even know how to begin to dissect it. This is my main: #i...

 
5:37 AM
1
Q: Find all words that satisfy unknown letters (Hangman)

Al LongleyI have been working on a function which might be used to solve a word game like Hangman or "Wheel of Fortune". Basically, I wish to search from a very large WORD_LIST (>1 million unique entries) for any word which satisfies the provided letters in the word search. An example of this might be if...

 
5:54 AM
0
Q: Construct A String Using StringBuilder from an Array using elements index

KaizenI am a java beginner and want to build a string from elements in an array using its elements index, the code runs fine yet i want to learn if there are other ways to improve upon it.Below is my sample code and I'm welcomed to suggestions. String buildObject(List<Integer> obj){ StringBuilder...

 
6:29 AM
0
Q: Observable operator choose and combination takeWhile() or takeUntil()

pro.mean angular/core v 4.3.4 I have 2 API which fetch data of teachers and students from given date range; I am using forkJoin to get both APIresponse and display the data with a regular interval of 10 ms. this is working fine BUT when a user changes the date range from the date drop-down, then the ...

 
6:46 AM
0
Q: Currency Converter in Java

Michael HongSo I need to write a currency converter in Java that pulls the currency and exchange rates from a csv file. I'm almost there, but..... import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.*; public class Cur...

 
I'm voting to close this question because it is better suited for codereview.stackexchange.com - the code works, the question is how to improve it. — Oleg Estekhin 6 secs ago
 
7:02 AM
@Marc-Andre I think I played it for hundreds of hours as well long ago ^^
 
7:20 AM
0
Q: Vector classes implementation in C++

MORTALi have rewritten a vector classes similar to the glm library which is used mostly in opengl application. i would like to know how can i improve it further ? #pragma once #include <cmath> #include <cassert> enum ctor { uninitialize }; template <typename T> struct Vec4; template <typename T>...

1
Q: Designing a system to apply multiple effects to one or multiple targets

IavraI posted this on SO first, but was redirected here, since the code below already works: I'm currently trying to develop a small game as a hobby project, which contains an automated combat system based on cards. My goal is to make later implementation easier by providing a fluent API, like this...

 
7:48 AM
Monking
 
0
Q: Filling a string at minimal cost

CaptainTrunkyI'm solving the following problem. Here is the problem statement: You are given a string with wildcards, e.g. X***Y*Z. Your goal is to fill all the wildcards in the given string. You are allowed to write data to the string in blocks of fixed size: character-by-character, you can write contiguou...

0
Q: Need feedback on my codility solution of cyclic rotation

user3452275 Problem statement : A zero-indexed array A consisting of N integers is given. Rotation of the array means that each element is shifted right by one index, and the last element of the array is also moved to the first place. For example, the rotation of array A = [3, 8, 9, 7, 6] is [6, 3, 8, ...

 
If your code is working, your question would be more on topic on Code ReviewThierry Lathuille 53 secs ago
I'm voting to close this question as off-topic because as your code is already working, this question belongs on Code ReviewThierry Lathuille 23 secs ago
 
 
1 hour later…
9:05 AM
0
Q: Simple color clicker game

Gab De JesusMy friend recently made a color clicker game, and I tried cleaning up the code a bit. I want to know how I can improve the functions and passing/editing of global variables. There are a lot of functions and global variables. To keep the global variables 'local', I wrapped the code in an anonymou...

 
Monking
 
9:44 AM
Monking
@Phrancis I bought a license a year ago, now I can't live without ReSharper, WebStorm and PyCharm. The last two have a couple more features if you use TypeScript / types. Also don't know if you noticed, I gave you a pull request a couple of weeks ago
 
0
Q: (C# refactor) - Wrapper delegator - How to call Interface method as parameter

Glauco CucchiarI've to refactor old code that use a wrapper delegator for a service. This is old code: public interface IOrderService { IList<Order> GetOrders(); Order GetOrderById(int idOrder); } public class OrderService : IOrderService { ... //Implements interface } //this is a simple delegate...

0
Q: User Vote API with AWS for iOs app

martinI've been looking for a "code design" board to ask this question so I hope I'm at the right place! :) Please note I am completely new to APIs and servers, forgive any blunder. I am currently developing an app that will allow users to "vote", these votes will then be grouped and the result used ...

 
10:15 AM
0
Q: Java Stream wants to return only failure list

Sarfraz ShaikhI have an object delivery template, which I want to delete based on a name. String array which contains delivery template name is taken as an input parameter. I use Java Stream to iterate the list. Please find the code below. public static List<String> deleteDeliveryTemplates(String... deli...

0
Q: Build a search query with StringBuilder

Spedo De La RossaSo I have my model which I give to a method called CreateSearchQuery. My model has many values ~15. Some of them are: int MyNumber // when empty: = 0 Datetime ToDate // when empty: = 01 01 0001 string Filename // when empty: = null string Foldername // when emp...

0
Q: Java - transfer data from a db to a csv file and download it

PasquI have to create a csv file by taking the data from a table in a posgress database and I have to make the csv file available to third parties. Is there a standard method for doing this? Thank you in advance.

 
10:49 AM
-1
Q: VB.NET: SQL Parameters weird working

SimoI decided to clean up my code moving some Sub from my Forms in a new class, but when i did it Sql parameters start doing weird things! someone can tell me what happened? thanks! Public Sub Delete(ByVal Table As String) 'Opening connection Conn() myConn.Open() 'Clearing transactio...

 
11:30 AM
Working code? Doubts if it's good? Then ask for a codereview. — Sinatr 32 secs ago
 
12:16 PM
0
Q: Use a standard stream, and restore its settings afterwards

Toby SpeightI sometimes find myself changing stream settings (e.g. to output hexadecimal, or to change fill character), and needing to change those settings back afterwards, to avoid perturbing subsequent output. This gets tedious, so I wrote a short class to act as a scope guard, restoring the settings whe...

0
Q: Simple rpg game

Mateusz JuruśI decided to make a simple rpg game to practice JavaScript. I don't know alot about JS best practices or things like that, so I rather have my code criticized now than build more code on top of bad habbits. I'd be greatfull for any advices. document.addEventListener("DOMContentLoaded", funct...

 
12:32 PM
0
Q: Function/Method to get selective columns

Jitendra SoftgridIs it possible to simplify getRows() or it is fine as it is now ? protected $container; public function __construct(ContainerInterface $container) { $this->container = $container; $this->em = $this->getDoctrine()->getManager(); } /* * @param $ntt name of the entity to fe...

 
12:43 PM
If you want a review on a working solution, go to the Code Review to ask for improvement. — AxelH 43 secs ago
 
1:05 PM
possible answer invalidation by Karl Richter on question by Karl Richter: codereview.stackexchange.com/posts/189662/revisions
 
0
Q: Check infrastructure for Python objects

WrzlprmftBackground I am the author of a module that centres around a selection of similar classes, some of which inherit from others. The user instantiates a class and provides parameters to create a complicated object. These parameters must fulfil certain criteria to be valid; otherwise there will be e...

 
1:25 PM
0
Q: Caesar Cipher in Haskell

Andre CassimiroI've come up with this simple implementation of the Caesar cipher. It takes an integer argument and a file to produce the cipher text like so: ./caesar 4 < text.raw Here's the code: import System.Environment import Data.List import Data.Maybe alnum = ['A' .. 'Z'] ++ ['a' .. 'z'] ++ ['0' .. '...

 
1:43 PM
0
Q: LZW Decompression Library

user14492I've been asked to write a decompressor library for an interview process. It's a LZW decompression library. I've got it working and tried it out. I'm looking for any feedback on structure, presentation, readability from professionals who've worked as software engineers. https://gist.github.com/l...

 
2:07 PM
ohai @ComFreek
 
Hello @Vogel612!
 
@Someprogrammerdude But I am prepared to bet a significant sum (say 0.05€?) that this is a "Towers of Hanoi" program, so the digits are probably 1, 2, or 3 (or possibly 0,1,2). It's a terrible idea, and I would rip it to shreds in code review - but I don't think it's the OP's problem. — Martin Bonner 34 secs ago
 
Do people who are not in this chat get notifications if I ping them here?
 
possible answer invalidation by user14492 on question by user14492: codereview.stackexchange.com/posts/189761/revisions
 
@ComFreek depends on how long they were not in chat
you can not ping users that never were here in chat and only those that were in the room within the last ... week? get a notification when pinged
 
2:19 PM
If your code is working as intended and it's bug free, and you want someone to review your code.You might want to post it in Code Review Reviewing code on here is kinda off topic, since it's too broad most of the time. — MooingRawr 36 secs ago
 
Alright
 
if you can't tab-complete their name, you can't ping them
 
Note that this question is off-topic here and it would also be off-topic in Code Review, because you haven't described how your function is supposed to convert numbers to words. Nobody's going to deduce what the expected result is from reading your code. — Aran-Fey 39 secs ago
 
Ah, good to know! Sadly, I can't. So I guess it's up to him to visit this chat :)
 
2:36 PM
I was hesitant whether to post the question here on on codereview, as I've seen so many other popular questions on SO that ask, "What is the best way...?", such as the question I linked about overlapping date ranges. Should I remove the question here and go to codereview? — eclecticist 20 secs ago
 
@ComFreek Alternately, you could invite them to a new chat room. They will also get a ping that way too, if you invite them to it.
 
2:48 PM
Code review? Put the public API in a repository with a restricted set of committers and only change it via pull requests? Hash each file and have a job on your build server that fails if any of the files hash differently? — Stephen Newell 38 secs ago
No, no errors. I was unsure whether to post the question here or on codereview, as I've seen so many other popular questions on SO that ask, "What is the best way...?", such as the question I linked about overlapping date ranges. — eclecticist 43 secs ago
 
0
Q: Returns Google Sheet Cells from a Named Range

tariqkSo right now I've got this function that's called in several places in some of my Google Spreadsheets. Right now it accepts a Range object, a string to search for, and an optional boolean to determine whether to make the search case-sensitive or not, and defaults to true. function getCellsWithVa...

 
Maybe a question better suited for Code Review SE. — jdehesa 46 secs ago
 
Greetings, Programs.
 
@vc74 I can't believe serious project rely only on "code review" or "good communication" to protect public API. I was looking for a way to avoid human mistake, something automated. — Julien Christin 20 secs ago
 
3:05 PM
@Donald.McLean Greetings, User
 
the question leads towards codereview think the question is better here codereview.stackexchange.comRaymond Nijland 30 secs ago
 
0
Q: Python Converting numbers to words, using Recursive

SurenMy function recursively calls itself until it decodes every numbers. rec_ntw face_value_count -> (Incremental variable) denotes ones, tens, hundreds and thousands face_value -> (Dictionary) denotes the dictionary containing corresponding the word value for numbers. result -> (String) Contains f...

 
3:28 PM
-2
Q: Initializing commands C#

JsonDork private readonly ICommand onSelectIssueCommand = null; public ICommand OnSelectedIssueCommand { get { return onSelectIssueCommand ?? new Command<object>(OnEventSelected); } } I'm trying to find out the best way to initialize commands, I really like this way but someone ...

0
Q: Implementing a Java Card Game called War using OOP

Ako SiBased on http://www.bicyclecards.com/how-to-play/war/ The game starts with two players who get half the deck of cards (each player obtaining 26 cards). Both Players flip over the top card from their pile and the player who flips the card with a higher value or rank wins and gets both cards. The w...

 
3:46 PM
1
Q: Pro et Contra of 3 different approaches to a Log class

Antonio DropulićI'm making a personal logger, and so far i have come up with 3 solutions. I have them simplified in this example to highlight my dilemma. I wan't to know the pros and cons of my approaches, and ways to make them better. Also should i be flushing the stream as often as possible and why? TempLog ...

 
possible answer invalidation by Sam on question by Sam: codereview.stackexchange.com/posts/189699/revisions
If your code works but you're looking for specific improvements, try out Code Review (but do please look at their How to Ask page, because it differs from Stack Overflow). — msanford 26 secs ago
 
4:02 PM
0
Q: Sorting a Javascript array with a Regex

TreycosI'm using SharePoint 2013 JSOM, my variable this.templates contains a collection of templates with many different names The only way to iterate through this collection is by using an Enumerator I can only get the name of each template by using get_title() I want to get the templates whose name...

 
such c# in the close queue lately...
 
4:20 PM
1
Q: Swapping two elements of a singly-linked list

Petr PudlákSimilarly to Learning Rust With Entirely Too Many Linked Lists, I'm trying to learn Rust by working with linked lists. Currently I'm trying to implement a function bubble(...) that takes 2 elements of a singly-linked list and swaps them. Any feedback is greatly appreciated! #[derive(Debug)] str...

 
<~ it's-a-me! (wasn't kidding about putting down the mug)
5
(monking!)
 
Is there any section for code review? — Manuel Cabrera 54 secs ago
@ManuelCabrera you mean Code Review? Please make sure you read the site's posting rules first - enjoy! — Mathieu Guindon 39 secs ago
 
@MathieuGuindon Damn!
Somehow unexpected, even after reading you post ^^
 
@MathiasEttinger sorry to disappoint, I was lying all along about being a mug :)
 
@MathieuGuindon Are you? What if you're possessed by an evil mug?
 
4:30 PM
lol
 
feels weird to get pings with my actual name.. I came here as @retailcoder, then was @lol.upvote for a bit, then @Mat'sMug.. I decided to unify my online presence, after hearing Scott Hanselman's pre-day session at the MVP Summit last week
that has nothing to do with stepping down as a moderator though
 
-2
Q: Looping though a list of lists and replacing one of the lists with a new value

Erly ThorntonI have a list of lists created from reading the contents of a csv file. I need to loop though this list and the first time I encounter a certain value I need to change it, then stop looping. I will later write the list out to a csv file with having only the one List item (row) updated. Here is...

 
@MathieuGuindon feels even more weird to see it next to your diamond in post on hold ;)
 
4:43 PM
@MathieuGuindon Is that your actual mug on the photo?
 
yep! proudly wearing my Rubberduck tee and #CDNMVP hoodie :)
shot was taken at a LinkedIn kiosk just outside the grand ballroom at Hyatt Regency Bellevue last week
"Rock your profile!" or something
 
A LinkedIn kiosk, that's a thing?
 
I figured since my LinkedIn profile pic dated from 2012, I could use a refresher
@Mast booth? ...whatever you call a table with a cardboard saying "LinkedIn"
remember, MS bought LinkedIn :)
 
@MathieuGuindon Never seen one of those.
@MathieuGuindon Before or after the massive influx of Indians a couple of years ago?
 
4:48 PM
Now you're changing things up anyway, has this been resolved yet?
 
oh, wow. ...not yet
we're flying to Walt Disney World (Orlando) at the end of May, that's my window right there
 
That's over 2 months from now, I've seen rubber ducks move faster than that.
2
 
eh, it's been over 10 years, what's 2 months :)
 
You got to do what you got to do when you got to do it.
No rush :-)
 
Gandalf would agree!
 
4:52 PM
Any word from the CM's when/if the new election will be?
 
not yet
all I can say is there will be elections
they're probably busy with Stack Overflow's elections right now though. not sure what it entails in the CM's workload, but when I first considered stepping down last year CM said timing wasn't ideal, there was SO election happening and Winter Bash in preparation.
 
Monking
Anyone seen the mug?
 
Just kidding ^^
 
4:59 PM
Welcome reborn @MathieuGuindon!
 
thanks! gotta go grab something to eat, bbl
 
5:13 PM
-2
Q: Create 1D Array from 2D Array Java

TacoB2018I am trying to write a method that takes a 2D array parameter and creates from it a 1D array with a length equal to the number of rows in the original array. I also want the elements in the rows of the new array to equal the minimum value from each row of the original array. If the original row i...

 
What on earth is a Platypus... It lays eggs, but feeds young with milk?
Oh and it's extremely poisonous while mammals usually are not. Of course it lives in Australia.
 
And the daddy-long-legs - that isn't a spider... it doesn't have a thorax...
 
@skiwi Vogelbekdier. One of those odd creatures hard to classify.
 
@skiwi I like the German name. "Schnabeltier". It's an animal ("Tier") with a bill ("Schnabel"), but not a bird.
 
@Zeta Relatively close to the dutch name ^^
Birthmouthanimal
 
5:27 PM
^^
 
@skiwi s/rth/rd/?
 
Yes.
Birdmouthanimal.
Birdbillanimal, if you must.
 
@Zeta Yeah...
 
Sorry
 
But hey, it's Australian. It's either weird, out to kill you or both.
3
 
5:31 PM
@Zeta perhaps that is because it is often referred to as the "duck-billed platypus"
 
if it's working - this belongs on the codereview site — UKMonkey 50 secs ago
 
@Duga Meh.
Haven't seen Quill since winterbash. Perhaps he was eaten?
 
@Mast last I saw him he was just getting elected as a moderator on some SE site (can't recall which one)
 
Every time it floods in Australia, the crocs swim down the street. And Europeans are like "must be bloody dangerous!" where Aussies are like "meh, usually it's just snakes, spiders and dropbears you got to watch out for".
 
lol dropbears
 
5:37 PM
@MathieuGuindon He was PT at language learning, not sure whether he got elected.
 
oh pro-tem.. I thought he had been elected
same
 
lol
Not really, and you should know.
Elected is moderator for life.
 
and a pro-tem that runs in an election, tends to get elected :)
 
True.
But they don't always do run.
Monkey didn't.
 
#reasons
 
5:41 PM
Good reasons, just like you have now.
Being elected for life doesn't mean you have to fulfilll it till you die.
4
 
cue lightning and evil laugh
 
@CommitStrip When YAGNI turns out not to be so bad after all.
 
6:03 PM
The Meta feed is kinda slow to post stuff here…
1
Q: Nothing fishy going on here! Nope, not at all

200_successFollowing Mat's resignation as moderator yesterday, I, too, have informed the Stack Exchange community that I am yielding my position as moderator. I know that it may be natural for many of you to speculate that there is some kind of crisis with the moderation team on Code Review. I'd like to a...

 
welp. I'm pretty sure I'm going to think of your name not being blue as something terrifyingly weird
 
2
Q: Nothing fishy going on here! Nope, not at all

200_successFollowing Mat's resignation as moderator yesterday, I, too, have informed the Stack Exchange community that I am yielding my position as moderator. I know that it may be natural for many of you to speculate that there is some kind of crisis with the moderation team on Code Review. I'd like to a...

 
@Feeds that sounds familiar...
 
@200_success Wat.
I did see Mat's resignation coming. I didn't see yours coming.
 
Why not? Like I said, I pre-announced it years ago.
 
6:17 PM
@200_success The obvious is usually hiding in plain sight.
 
@S31, I learnt from looking at answers on StackOverflow, CodeReview (they really know their stuff there) and also a book called Professional Excel Development :) — CallumDA 52 secs ago
5
 
6:49 PM
Omg @Mat'sMug @MathieuGuindon new name, new picture :)
 
@Phrancis well I did say I was putting down my mug :)
 
0
Q: How can I compare content of vectors of vectors? What about vectors in hash map?

Antonio De La GarzaI am working in a project where I have to find the solution to an 8-puzzle using Breadth First Search. I am using a vector as a queue to store the possible action (left, right, up, down) from the current state. Then , I stored the parent and child states on a hash map to keep track of the path. F...

 
7:08 PM
@CaptainObvious
 
@UKMonkey Turns out it's doing nothing at all, so it's definitely unfit for Code Review. — Mast just now
 
@Duga +100
 
0
Q: Constructing a tibble from another tibble (without for loops?)

colorlaceI've got this doing what I want, but it's using a for loop and I've read many times to avoid for loops in R for efficiency and style. Well, it's not a computationally demanding task and I think it might be as clear as it could be in a for loop. I'm starting with one tibble: source_tbl. I want to...

 
7:28 PM
@CaptainObvious If they hadn't clarified, I wouldn't have guessed that tbl was short for "tibble".
 
0
Q: Decrease execution time in updating rows in PHP

pippa dupreeAny tips on how the below code can be optimised for faster execution? I have a table in postgres called staging with the below columns; |person|colour|sport| |Tom |blue |Tennis| and a multi dimensional associative array that contains updates for each entry of the staging table, like so: $...

0
Q: Custom Day of Week manipulation

LongroadaheadThe function serves two purposes. When dealing with the day of the week, python will always assign 0 to Sunday and 6 to Tuesday and I want to change that. The first part of the code is changing the start of the week from Sunday to users preference, ie: Monday or Tuesday. The second section is...

 
@200_success wtf is a "tibble"
 
@UKMonkey Agreed. However, please be careful when recommending sister sites to new users when not sure whether it's a good fit. Please take a look at the guide. — Mast 37 secs ago
 
@SimonForsberg perhaps this answers that... (the UD definitions are amusing too)
 
A kind of dataframe, it appears.
> A tibble, or tbl_df, is a modern reimagining of the data.frame, keeping what time has proven to be effective, and throwing out what is not. Tibbles are data.frames that are lazy and surly: they do less (i.e. they don’t change variable names or types, and don’t do partial matching) and complain more (e.g. when a variable does not exist). This forces you to confront problems earlier, typically leading to cleaner, more expressive code.
And yes, without the clarification I'd have thought it was short for table.
Perhaps even Tribble spelled wrong.
 
7:37 PM
I know a pair of twins whose last name is "Tibbals"
 
@SamOnela When I was looking up a Swedish translation for "tibble" all I got was that "Tibbles" is a name.
 
@SamOnela Tibbals is a well-known surname in Ohio.
Todd Tibbals (1910—March 22, 1988) was an American architect who was active in the Columbus, Ohio area in the middle part of the twentieth century. == Early years == Tibbals was born in 1910 to a successful engineer and entrepreneur, Charles E. Tibbals (1872–1961). His father was a professional mining engineer and manager of the Royal Elkhorn Coal Company of Prestonsburg, Kentucky. In 1923 the family moved to Columbus where Tibbals' father pioneered in the candy vending business. == Education == Tibbals attended the Ohio State University, where he was a hard working student. When assigned a task...
 
8:04 PM
@rubberduckvba @Rubberduck203 @StackCodeReview Oh, I know. Don't worry, we're already freaking out. Going to solve this by force-renaming 200 to 400_notfound
 
possible answer invalidation by Sam Onela on question by Takit Isy: codereview.stackexchange.com/posts/188780/revisions
 
I don't know if this is a good thing or a bad. It gives the site a chance to grow, but we are losing some good, proven mods :(
 
@Hosch250 CR isn't losing anything
elections are an awesome thing
2
I can't wait to see who's going to step up
3
 
I won't. The unknown is calling me, but I don't participate in the main site anymore.
 
see that's why elections are good: I don't participate in the main site much anymore either
it's time for new blood
 
8:17 PM
Yeah, I tend to agree. I probably won't be on much while building my career, but hopefully sometime I'll start showing up and dropping words of wisdom like Eric Lippert.
(Minus the down votes.)
 
Good catch indeed, that is code done by my colegue, seems that I still need to improve my code reviewing and put less faith in others work. I need to look what exactly this RoutedComponents is for, as replacing it with standard React,Component does the trick. Huge thanks to both of you. — Przemek Lewandowski 43 secs ago
 
8:34 PM
I'm voting to close this question as off-topic because it is more appropriate for Code ReviewDraco18s just now
Beyond needing a Minimal, Complete, and Verifiable example, we don't generally help with slow code here, but with buggy code (and not just generally buggy, but with specific, isolated bugs). For assistance improving code that works, have a took at Code Review -- note that expectations are very different there in terms of what constitutes an acceptable question; see A Guide to Code Review for StackOverflow Users, and codereview.stackexchange.com/help/on-topic, before posting there. — Charles Duffy 36 secs ago
 
8:51 PM
Code Review needs a whole lot more of context than that if you want to post there. Also see A guide to Code Review for Stack Overflow users: codereview.meta.stackexchange.com/q/5777/31562Simon Forsberg 51 secs ago
 
9:09 PM
1
Q: Parsing and creating JSON packets

Daniel CausebrookFor several hobby projects now I have had to interpret and/or send JSON websocket or HTTP responses in Java. I did some research and picked the library GSON to use. In each project I have implemented a custom deserializer in order to correctly interpret different packet types. For example: {"typ...

 
@SimonForsberg Oh definitely. As written this question would be awful on Code Review. But it is, fundamentally, a code review question. — Draco18s 53 secs ago
 
9:20 PM
@MathieuGuindon s/400/404
400 is just generic client error IIRC
well ... "Bad Request"... close enough
 
@Vogel612 Bad request.
Ninja'd.
 
maybe going for 410_Gone would be better
 
Basically 400 means "Somebody screwed up and it's likely your own fault"
 
but that'd be wrong.
 
@Vogel612 IKR
 
9:22 PM
Shog just hasn't been dealing with the abuse of REST APIs in long enough...
not sure whether I envy him for it, because AIUI he traded that for being abused by people :/
 
True.
 
lol
@MathieuGuindon I was reading that comment and thought I could guess at least a couple and the first on my list announces he ain't running.
The curiosity is growing.
 
Pretty sure we're going to see some faces we might know from the mainsite.
 
Oh, probably.
 
9:26 PM
and I daresay we'll see a lot less revivalists than in the last election
pretty sure Malachi won't run, neither will Heslacher. Jeroen has also been off the grid for quite some time
 
How about yourself Vogel?
 
I doubt 202_accepted (fka EBrown) will throw his hat into the ring.
I'm really torn on it
 
Heh, join the club.
 
on the one hand I'd really like to do it, because it just feels like the next logical step, on the other I'm not really sure I'm up for it
 
Last time I was sure I wasn't up for it yet.
 
9:30 PM
University stuff is starting to get really interesting (and work-intensive).
I'm already having trouble staying on track for the work I have to do as research assistant.
I've been much more involved in Rubberduck development as of late
...
oh and I'm on the first page of voters for this month with less than a day's votes...
 
Hey, since people are around, I asked a simple question last night
20 hours ago, by Phrancis
Sooo... dilemma
Just read chat from there
 
if you're not statically typed and you're not using the properties as numbers, I'd change the object
so ... since you're not using TS and this is an option, I'd go for it...
because js stores every number as floating point and those tend to break in the worst moments
 
I'd prefer explicit over implicit and casts.
So change the object so it holds strings.
 
OK ty
 
But in any other language ints would probably do.
 
9:35 PM
I'm thinking about running maybe. Kinda torn too.
 
Was wondering about you.
 
I think I would do OK for the most part, but I'm not sure if I can consistently devote time for it every day
 
-1
Q: Outlook 2016 Macro Mark Read and Update Search folder

GabrielI store everything in my inbox in Outlook and separate my mail with Search Folders. My main folder I work out of is a search folder called "Follow-up" which only shows me unread mail. I would like to create a simple Macro that runs in the background so when a massage gets marked as read it ref...

 
Time wouldn't be my main issue, I'm stuck on imposter syndrome.
Especially since I told myself I should get some experience with 10k tools before considering to run last time. But I've been moderating more than writing questions/answers, so not even close to reaching those tools. Let alone gain experience.
 
FWIW the 10k tools are really only statistics
some of them more interesting than others, most for meta-moderation
stuff like "how is the breakdown of question closing" or "what's the question with the most votes in the last [x] days"
what you really want to know about is the post timeline
that is one of the most underappreciated and undiscoverable features on SE
and that's a shame
 
10:08 PM
Interesting.
 
@Vogel612 What is that, where do I find it?
 
Thank you for illustrating the point @Phrancis :-)
 
something.stackexchange.com/posts/<postid>/timeline
 
@Mast 👍
 
postId is retrievable from the share link
^^ that is the timeline for the second latest CO question
 
10:14 PM
Whoa, that's cool, why is there not a button/link for that??
 
I didn't even know they added a daily summary of votes there
 
If there isn't, I know what my next userscript is going to be for
 
6
Q: Add timeline link to questions and answers on Stack Exchange

BraiamThe following script is meant to be a user script, but it should work on the console. It takes the id of the question and adds the corresponding /posts/id/timeline link to the post-menu element, just besides others. It's meant to not have problem with other scripts. The same as above for the answ...

 
Edit history on steroids.
 
77
Q: Add a link to the timeline of a post

stemaSince a year I am quite active on SO and a bit on meta, but I have never heard of the timeline of a post, till today in a comment on meta. There has been an announcement by Jeff Atwood 2 years ago of this feature as "experimental". (Timeline for that question). This feature has been requested b...

better, actually. Mods also see flags pertaining to the post there
as well as a full comment-timeline (not that they don't see that already)
 
10:24 PM
Wait, @200_success you're leaving too? Damnnnnnn
This is a sad day.
So @MathieuGuindon leaves, @200_success leaves, the whole gang is gone now. :(
 
> Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
 
Even though we don't always agree or get along, I still liked all of the current moderators (as well as the core community).
 
>_<
 
@Vogel612 you're absolutely ripe for it
 
@Vogel612 FWIW, if you ran (or @Mast, or @Hosch250, @Phrancis, or @skiwi) I'd vote for you. (May not always agree with what you think, but I think that's why you'd be a huge asset - we need differing opinions, to an extent.)
 
10:28 PM
@Mast you too!
...damn, everyone here could run
 
Ehh, let's not say everyone, I know for a fact I would be a terrible choice, which is why I mention the 5 folks in this room I would easily support.
 
@202_accepted Hey!!!
 
@SimonForsberg I'm sorry Simon! Please don't be mad!
You're still around, you just take breaks for small times. :)
 
@202_accepted You have any plans on running?
 
@SimonForsberg Absolutely not. I'm not the right personality for it - I'm too aggressive, conceited, arrogant...I'm a typical American. While I'm willing to make the hard decisions, I'm just too much of an a-hole for it.
 
10:35 PM
@202_accepted Well said, I've certainly had my share of small disagreements with various moderators, I think it makes us all better to get each other's perspective
 
I would rather see and support folks who keep a cool head almost all the time, rather than someone like me who is a volatile person. I don't hang around here much anymore largely for that reason. (I still pop in to see how everyone is doing, but I don't do much else because I create more tension than solutions.)
 
Does anyone know when the new moderator election will take place?
 
@Phrancis I think they have typically Spring and Fall for various sites, so I'd imagine Fall. I would think we could scrape by until then.
 
@Phrancis I have no idea, haven't heard anything from the CM's. Probably/Hopefully within a few months.
 
I'd personally prefer sooner rather than later
 
10:41 PM
@202_accepted I'm pretty sure that they just are on an "as-needed and possible" base
currently the CMs seem to have a lot on their plate....
 
@Phrancis One of the nice things about all the existing (and prior - rolfl) mods is that they've always been respectful. Any candidate I'd expect to see should be the same. Doesn't have to agree with my point-of-view, but should not be rude about it.
@Vogel612 Oh for sure, it just seems like typically they're Spring / Autumn. Granted, I'm recalling from what I barely remember, so I could be wayyyyy off.
 
With the number of sites that SE is now, I think they don't want to cluster elections
 
It's possible. They're typically pretty well scripted now, so I think timing will be the only key factor. I'd like to see them towards the end of the university semester, for us in particular.
 
@Vogel612 I made an edit to the post, the script didn't account for sites using HTTPS now
// @include       http*://*.stackexchange.com/*
// @include       http*://stackoverflow.com/*
// @include       http*://*.stackoverflow.com/*
// @include       http*://superuser.com/*
// @include       http*://*.superuser.com/*
// @include       http*://serverfault.com/*
// @include       http*://*.serverfault.com/*
// @include       http*://askubuntu.com/*
// @include       http*://*.askubuntu.com/*
// @include       http*://mathoverflow.net/*
// @include       http*://*.mathoverflow.net/*
 
@202_accepted I prefer to think of it as "it's time for a change".
 
10:57 PM
@200_success It doesn't make me any less sad. :( I have serious respect for you (and all) of our moderators. I hate to see any of you go.
I respect all 6 of you - a lot. You have all really set a high bar to achieve as a moderator, and I hope that whomever may replace you maintains that bar.
You and Mat, especially, have a degree of patience that I have never seen except in a long-time parent before.
 
Compared to the alternative exit strategies — death, ragequit, boredom, mutiny, other life demands — I'm glad to leave voluntarily on a happy note.
9
 
Aye, at least I can rest easier knowing that you're still out there doing good for all.
 
Sorry, gotta go right now. Chat later.
 
So, which part of your code are you asking about? And you mentioned some other question, but there's no link or context, so this is a bit broad ("is my code secure"), and that type of question might just lead to yes/no answers. Can you please edit your question to be more specific? Also - in general, Stack Overflow is not geared toward code reviews, though there's a dedicated code review stack exchange tailored specifically for that purpose. — David Makogon 30 secs ago
 
0
Q: Avoiding boolean parameters in class initialization for checksum object

BrianI need a class to store checksums of mostly remote files and then confirm that those checksums have or haven't changed after certain operations. I originally created something rather simple, which selected whether the remote host was using posix or windows paths as a boolean switch. from pathli...

 
11:18 PM
@202_accepted Umm... we're only 5, unless you count rolfl as a previous mod though.
 
@200_success A CM hitting the wrong button
 
@SimonForsberg I count rolfl.
 

« first day (1777 days earlier)      last day (2243 days later) »