« first day (1810 days earlier)      last day (2214 days later) » 

12:00 AM
RELOAD! There are 5236 unanswered questions (90.0069% answered)
 
0
Q: Longest Common Prefix of 2 strings in Trie

PeterI have this function in c++ that finds longest common prefix for all strings in Trie. I need to change it so that it returns maximum longest common prefix between pair od any 2 strings in Trie. Can you help me, how to do that? string findLCP(struct TrieNode *root) { struct TrieNode *pCrawl =...

 
This is off topic here. Code reviews and critiques are available elsewhere. — RobG just now
 
 
1 hour later…
1:12 AM
what? no one hangs around late at night anymore?
 
@Malachi I do
 
hey, how is it going?
 
I'm usually the only one, until the early birds from Europe get out of bed :)
 
I am purposely staying out of the Factorio room, looks like there are people in there
 
@Malachi Pretty great, hammering some user scripts together
How are you enjoy your lordship modship?
 
1:15 AM
@Phrancis my wife started a new Housewives show, so for a few nights I may be found doing some code
@Phrancis for the most part. couple of hickups, but everything can't go perfectly otherwise we wouldn't need moderators, right?
@Phrancis user scripts for what?
 
@Malachi Work. It's to automate filling out service tickets for our most common types of issues/calls
 
@Phrancis nice.
Automation is awesome!
2
 
@Malachi Yep, it's going to be a big time saver, I've got the script working the way I want today, so now we need to make a bunch of templates
 
@Mast, @SamOnela --> what more are we looking for from the question in question? codereview.meta.stackexchange.com/q/8786/18427
 
@Malachi The question looks good to me after edit, I voted to reopen it
 
1:27 AM
I agree, I think that others think that it is not complete code though. but the user says that the code works as is.
 
1
Q: Htaccess, the right way to enable HTTPS (on www site)

eplazaiI have read a lot and spent a lot of hours trying to reach the right way to set a good htaccess in order to redirect an HTTP site to HTTPS. There are a lot of tutorials on the Internet, even on Stack Overflow, but some of them seem to be outdated and don't meet good SEO practices. The scenario ...

 
1:53 AM
1
Q: How can I improve this off-topic question about downloading anonymous type data?

PopMy question is flagged as off-topic: Lacks concrete context. How can I improve this question? The //... in the edit history is added to tell viewers that it might or might not have more properties, since it's against the rule, I removed it. But even without it, the code still works without...

 
2:44 AM
0
Q: how to full sparse vector in SQL

余江涛Imagine you have a table stored some sparse vectors by the pair of (dimension,value), for example. +------+------+------+ | id | dim | val | +------+------+------+ | 1 | A | 1 | | 1 | C | 2 | | 2 | B | 1 | +------+------+------+ Now, you want get a table of all v...

0
Q: copy files in parallel by reading what files to copy from few other files

user1950349I am working on a little complicated shell script for the first time and below is what it should do: During startup, it figures out what is my clientid by looking at host-mapping.txt file. If I cannot find clientid for my hostname then I need to exit from shell script with non zero status code ...

0
Q: Bi-directional BFS correctness and run-time efficiency on a matrix in Python2.7

SujithThe code here I have is a bi-directional bfs search, given any two points in a matrix having 0's and 1's, I would like to find if there exists a path between them.Also note that it is forbidden to enter a cell that has a value of 0.I am new to python please ignore if there is a bad coding style. ...

 
3:40 AM
possible answer invalidation by Alex Lo on question by Alex Lo: codereview.stackexchange.com/posts/192306/revisions
 
4:16 AM
0
Q: Dynamic programming to solve two printers with different speeds

RaystafarianI solved this problem using a Class, but thought I might try to figure out this memoization thing. Problem There are two printers that print pages at different speeds (X, Y). What is the minimum amount of time it takes to print (N) pages? Input Data First line contains the number of ...

 
 
1 hour later…
5:26 AM
0
Q: Can i replace for loop here as it's taking a long time to run

rahulCode- block=floor(10000/ncol(recovery)) # Defining Data set for loop for(i in 1:ceiling(nrow(recovery)/block)) { gs_edit_cells(s1, ws = 'raw', input = recovery[((i-1)*block+1):min((i*block),nrow(recovery)),], anchor = paste("A",2+block*(i-1),sep=""), byrow = FALSE, col_names = ...

 
6:01 AM
Monking
 
Monking
 
Monking
 
Ok. Sorry. I never know about Code Review. I ll use that next time. Thank you. — Joyner 51 secs ago
 
6:39 AM
0
Q: Defining classes using a combination of Inheritance and Composition

HFBI am developing an online shopping site. This is a simplified version of my architecture. I have a class Item, which contains all the common attributes of all products (I will explain the IItem interface at the end) // all products common attribues class Item: IItem { int price { get; set...

 
6:57 AM
1
Q: Scheduling using System.IObservable 2.0

Henrik HansenAs a follow up to this first attempt to create and use my own IObservable<T> implementation, this is version 2.0. The goal has been to correct the code where there were conceptual misunderstandings and to take the issues pointed to by answers into account. The overall concept is the same: A sch...

 
Monking.
 
@freestyle if your "ternary monster" is strictly structured, so it only ever nests at the leftmost side, you can indeed (ab)use it to write an expression in a functional style. With a decent formatting, I'd probably be fine with it in a code review -- as long as it's obvious what's done here. I'd still prefer the procedural style as this is what a C programmer later modifying code expects and understands, so it reduces the risk that bugs are introduced later. As soon as your nesting is arbitrary, a "ternary monster" will be utterly incomprehensible anyways. — Felix Palmen just now
 
someone want to report a bug?
the inbox on chat.se doesn't place the site-favicon like it's placed on site
I shouldn't screenshot my inbox right now
that also applies for the site-switcher btw... there's too little padding on it..
 
7:55 AM
0
Q: Classes to hold values in python

etl_devsI am pretty new to OOPS and Python and I have implemented a scenario to create a car company and its models in python. Is it correct to define a class just to hold variable when you can't use inheritance as in below scenario. class CarCompany: """ Stores all the information Car Manu...

0
Q: oracle query returns no rows c#

Asimi have an application have been build using .net 2005 and Oracle Client ver 10 for connecting to oracle db. i upgraded it to vs 2012 and used oracle client ver 11. now there is a query return no rows while using adapter although it was giving a result and even i'm getting result when copying qu...

 
8:12 AM
1
Q: Python beginner Code for a Currrency Converter

K-DoeI am also pretty new to Python so I want to show my code for a very small currency converter with an Tkinter GUI. The code does what I want, but now I want to optimize it and find new "next level" topics for me to learn. So I would be happy if some of you could take a look on my code and please ...

 
@Vogel612 Could you remove, (crop, white out) the mod-only stuff and post a picture? Cause I don't really understand what you mean... :(
 
I have some more time rn, so I'll just edit the content...
 
Oh, I see what you mean, I'll get you some picks if you want?
 
you're welcome to just report it as your own :)
 
I'm quite busy so I can get the pictures, but can't do more than that ):
 
8:16 AM
Monking
 
thank you very much, then :)
 
That's what you're on abut right?
 
and one for the inbox as well, please :)
 
That is the inbox? Do you mean site switcher?
 
the site-switcher is broken as well ..
the inbox is where you see pings
 
8:20 AM
Oh oops not used to the old icons...
 
what you screenshotted is the achievements
 
3
Q: Chat top bar lost its padding

Shadow WizardThe padding in the chat top bar (seen in non-room views, e.g. all rooms here) is off under "My Communities" list, and achievements dialog: and... Happens with Chrome latest stable version (65.0.3325.181) under Windows 7 and 10. Can this please be fixed?

 
Nooo... 17 hours late );
 
Shadow did miss a few things tho
 
8:31 AM
-2
Q: please help me figure this out, i need it done in a few hours

JohnMy Search Engine This tool will allow you to search for a term across a set of text sources. The user puts in a search term and the tool will check the contents of a set of text files and tell you which ones contain the search term. The files that have the “strongest match” against the search ter...

 
8:46 AM
You should probably put this on the code review site — Simply Ged 18 secs ago
 
9:13 AM
How much CR question title must be on topic?
Are there any guidelines?
 
49
Q: Checklist for how to write a good Code Review question

NobodyMany questions of new users lack some parts or common style of the site. There already are some meta questions that aggregate tips on this issue but letting new users walk through all of them is probably very discouraging. Instead I would propose to make a community wiki question and answer wit...

^^ have you seen that one?
 
Yeah.
 
I'm not sure what you mean, a question has to be 100% on-topic. The title can be used to close a question if, for example, it says "Please fix my code. Broken!". However it's mostly just used to draw people in :)
 
Yep! I understand, that titles like "ARGH, U PLZ HELP FIX THATH, WILL YA?" are bound to be closed (still find them funny though)
I am looking for some "word play" in title. Just wan't to know, how much of it I can use.
@Vogel612, I'll read checklist once again, just to be sure
 
martineau & rayryeng - Thank you for the tip. I posted the question on Codereview. Zeta - Thank you for your opinion. I also agree with you! @Aja - Thank you for the suggestion! Did not think about it this way but you are right. Thanks! — J. Baselier 23 secs ago
 
9:22 AM
You can use as much as you want then. Some of the regulars have some funny titles, or good/bad puns in their titles
 
0
Q: Python3 Code to send HID Keystrokes

J. BaselierI am not a good coder so I hope you can help me out with this one. Please look at my code. I use this code to convert characters to code which is send over to a computer. This code is interpeted as HID keyboard code. I have 2 questions: 1) When code is executed, double signs like "AAA" or "111" ...

 
Where can I look for job if I want to relocate to different country via work visa? Does anyone have experience with that sort of thing?
Lately it feels like it is time to say goodbye to Mother Russia.
 
@DanPantry Oh right, I forgot that SO actually launched their own recruiting site. Is it popular?
 
@NikitaB reasonably, yes
found my first job through a carreers ad
there is a search option for "takes care of work visa" or something
 
Yeah
"Requires sponsorship" is what you are looking for
You can also go through the tried and tested routes: LinkedIn and Reddit
Though, with no disrespect to you at all, I feel that your biggest obstacle in emigrating to the US will not be finding the job, but the US government letting you be sponsored due to your nationality
So.. don't focus on the US
Emigrating to the US is pretty difficult if you're a new employee as it stands (I've done a lot of research into this over the past couple years :))
 
I'm guessing brexit had it's play in that reseach?
 
No, actually. I already work and live outside of the UK. But I'm looking to be transferred to our LAX office.
In order to have that happen, I'd need an L1 visa, which is one of two common work visas given to tech workers. L1 visas are for transfer visas inter-company and are only available to workers who've been with their company for a year. The alternative is H1B which most people know about but is much harder to get (they are lotteried and in high demand)
 
9:58 AM
huh. So no weird stuff happening to the "working in the EU as EU citizen" thing with the UK dropping the auto-eu citizenship?
 
There might be some weird stuff happening there, however thankfully the Good Friday Agreement between the UK and Ireland means that I have freedom of movement between both countries independent of EU citizenship due to something called the Common Travel Area
..Unless the UK decides to put a hard border between Northern Ireland & Ireland and kills that agreement. Then I'm boned.
 
welp.
given that they try their best to brexit, but actually preferrably not brexit, I don't see them killing that agreement
unrelated: don't cook & SE ...
I almost burned my risotto
 
You're looking for Dijkstra's algorithm or at least a variation of it. While I'd love to help you with the current question I absolutely suck at math. Here's some similar questions that may help you 1, 2. — Andrew 38 secs ago
 
@DanPantry Figures. :) I do not have any specific country in mind at the moment. I guess I'd have to look at the offers (if any ^^), and decide then.
Anyway thanks, I'll give SO careers a try.
@Vogel612 you can add saffron and turn it into (almost)paella, a clearly superior dish.
 
10:16 AM
try making paella in a wok. it's too dry to just let it sit at low heat for a few minutes
I just need to check on the wok every few minutes and the food is nicely cohesive afterwards
also saffron is annoyingly hard to come by here
 
@Vogel612 oh, well... wok would not be my pan of choice for risotto either :)
 
makes it pretty easy to just throw in roughly diced veggies
and cooking for four people at once, while keeping an eye on the flags
@NikitaB we just don't have a coated pan with high rims other than the wok anymore :/
 
0
Q: The code needs to be refactored to avoid code repetition. This displays chart widgets in tabs

vill3mThis displays chart widgets in tabs. Is it possible to make the code shorter. It gets the type from django widgets. Could I make a function that gives the tabs title and type and loops through it 3 times (flows,packets and bytes) and if yes how exactly <h1>Protocols Statistics</h1> <ngb-tabset>

 
I ended up implementing this solutionHFB just now
 
10:36 AM
@Vogel612 I believe coated cast iron pans often have fairly high rims. Although at that point they should probably be called casserole or something :)
 
11:28 AM
@DanPantry IIUC the Good Friday Agreement is one of the reasons Britain leaving the EU is such a problem.
And taking so long.
EU rules aren't build for overlapping regions.
 
Greetings, Programs.
 
Questions about improving working code are off-topic at Stack Overflow, they may be on-topic at Code Review. — Gert Arnold 8 secs ago
 
11:57 AM
@StefanWitzel: Another option for you, if you've got working code and you're looking for better abstractions, you can submit a piece of code on codereview.stackexchange.com . — Simon Shine 38 secs ago
 
12:11 PM
@GertArnold the first half of your statement is incorrect. Just because existing code is not buggy doesn't mean the question is off-topic here. See also. — Andras Deak 39 secs ago
 
12:27 PM
0
Q: Creates a green background in a window

Jt8146I am trying to move a rectangle around with the keyboard and believe my code to be correct but for some reason when I run the code the rectangle doesn't appear and only the green background is displayed. Could this be because I haven't used my header file correctly in linking my two .cpp files ...

 
@Mast that's correct
the GFA stipulates there cannot be a border between NI & Ireland, but there has to be a customs border somewhere. If there isn't one between NI & Ireland, then it has to be between the UK & NI and NI must remain in the customs union. The problem with that is the DUP, keeping the UK gov in power, do not want a border between UK & NI. lol :D
 
12:44 PM
0
Q: Timing in a Python game

Enn MichaelI'm drawing a player on the screen. He's running in the right direction. To accomplish this, I'll need to update his position, and for that, I'll need some timing. I'll also need some timing if I plan to have a running animation for the player. Is this code any good and why not? :-) class TimedO...

0
Q: Can I have two different resource files and choose one by overriding Resource Manager?

johnI have two sets of resource files. Example. Resources.resx , Resources.fr-CA.resx, Resources2.resx, Resources2.fe-CA.resx. Can I override the code so that I choose between Resources and Resources2 based on the some preference and make locale selection work as it is?

 
1:00 PM
@PanagiotisKanavos Thanks for your comments. I will check with Type.GetTypeCode.. Actually I need to convert into switch case as per code review comments.. — Bhrathi 11 secs ago
 
1:40 PM
-1
Q: Am I over-engineering?

samirk433I'm developing a basic application with following classes and I'm really confused about their design. Sometimes I feel them over-engineered other time they are just too dumb. Would you kindly see if there is any problem with it ? or how can I improve it //Classes Model Class /* hold static da...

 
@CaptainObvious only posting image of code is doing no good
 
@CaptainObvious Wonder if they are trying to break SEO on purpose?
 
@DanPantry Yea, that's about what I understood.
 
2:15 PM
-1
Q: clustering in python

user167518# importing all the required components, you may also use scikit for a direct implementation. import copy import math import random import time import sys import matplotlib.pyplot as plt import matplotlib.animation as animation import decimal #used for randomising U global MAX MAX = 10000.0 #us...

0
Q: Are their any performance issues using Eloquent db transactions this way?

flyingL123Are eloquent transactions meant to only contain db-query related code? Or can their be other code that runs within the transaction? In other words, if I want to make a call to an external web service to create some object, and only make changes in the database if that call succeeds, can I do tha...

 
2:29 PM
"However, I didn't really understand his implementation of the optimization." --> Then why accept the answer? — chux 55 secs ago
This is a better match for "codereview" — mplungjan 9 secs ago
 
2:51 PM
1
Q: Time Complexity of my program with dynamic programming implementation

Miguel CristinaWhat is the time complexity of my program? I think that my program runs in a \$ O(2^n) \$ time but since I'm using a Hashtable to store and re-use subproblems to resolve the main problem, it should be less time since we do less recursions. Help me please! import java.util.Scanner; import java.ut...

 
The wars between the "OTHER PRIMATES OPEN THEM FROM THE SMALL END" faction versus the "BUT THE LITTLE BIT OF BANANA AT THE SMALL END IS GROSS" faction consumed Europe for generations.
2
 
3:13 PM
@CaptainObvious looks familiar - I think it was posted in the past couple days and might have been deleted?
 
@SamOnela Looks like it was on SO before‌​. Maybe you saw it there
 
@Peilonrayz I guess I have seen that problem before - e.g.
4
Q: Calculating total maintenance costs of a car

Flip Introduction I drive a white 2CV from home to work, and intend to keep that way until retirement. Once retired, I will sell the 2CV to buy a yacht and sail away. My home is far, far away from my work, so I put a lot of kms on the 2CV everyday. The 2CV is beautiful and nice but also ...

 
Oh... Two in a couple of days. Now I'm wondering where the challenge is from...
 
yeah...
 
0
Q: How to eliminate select distinct clause?

zundarzWhen I 'group by' or 'group_by rollup' I getORA-00979: not a GROUP BY expression I get the desired results by using select distinct. Is there another way to do this without using select distinct? with tree_row as ( select 'PLUM' as tree_name, 'BACK40' as tree_location, 'MON' as tree_harvest...

 
3:39 PM
@Peilonrayz it is a programming challenge to them, to see if they can do it...they may not have read the tag description before putting it onto the question
 
1
Q: Implementation of Skip List Using C++

seabiscuitSkip List Header File #include <random> #include <iostream> #include <algorithm> struct Node { Node(int vv, Node*nn = nullptr) : val{ vv }, next{ nn }{} Node() : val{ 0 }, next{ nullptr } {} //Node(const Node &n); //copy constructor //Node& operator=(Node &n); //copy ass...

0
Q: Refactor multiple Jest tests with common code

archemiroI have something like this: lib/ somecode1.js somecode2.js somecode3.js ... somecoden.js __tests__ somecode1.js somecode2.js somecode3.js ... somecoden.js Each test file is something like this: const somecode1 = require('../somecode1'); describe('Test cases fo...

 
@Malachi I don't really see what the tag description has to do with it, as they look like a standard challenge. I'm just curious where it's from, to potentially have a go myself.
 
@Peilonrayz I see. he decided to do it on his own, there is no outside challenge other than his own personal challenge
 
3:55 PM
@Malachi Hmm, I can't see where it says that it was a personal challenge. Would you be willing to quote it?
 
@Peilonrayz in the introduction, it is formatted like a challenge, but that feels like a personal story to me.
won't let me post the whole intro here...lol
 
I know what you mean, however I've done a couple of challenges that have read the same way. I see there's a comment asking where it's from, so I guess we'll find out soon enough :)
 
I could argue that I believe this question is OK for SO, but I'm open to taking it elsewhere. And seeing how there hasn't been a quick and simple answer (what I thought it would be) here, I can see how it might fit better over at Code Review. Please flag my question for closure if you feel it doesn't belong. — Scuzzlebutt 23 secs ago
 
@Peilonrayz agreed
 
Monking
 
4:07 PM
Monking
 
Monking
 
If you save it in context then you would access it via this.context. A better question would be: Why didn't var _that = this; pass code review? That is a fairly standard practice. — nurdyguy 26 secs ago
Interesting the _that doesn't pass code review but the misuse of concat() does pass. Question should be about the code review! — Randy Casburn 1 min ago
"didn't pass code review" - surely your reviewer told you which alternative is preferred. If he didn't, ask him - not us. — Bergi 26 secs ago
 
0
Q: Attempt at Perl transliteration function in JavaScript with flags

JaredeI've been trying to rewrite the perl transliteration function in javascript. This isn't a complete replication, and I haven't looked at the perl source code... I took inspiration from this question for my source code. some unit tests (not all): describe('without flags', () => { it('should pr...

 
4:24 PM
Monking
 
4:37 PM
@LefiTarik please add an answer instead of a comment. Refer to the section When shouldn't I comment? on Comment everywhere. — Sam Onela 45 secs ago
 
@Duga darnit - didn't update the URL
 
lol
 
@CaptainObvious I hope that they edit their title, I found the solution and wrote a short review
 
@Malachi That's not the only problem with it.
 
@Mast what do you see?
 
4:45 PM
@Malachi Lack of context, borderline off-topic.
 
I was curious because I am trying to learn Oracle
 
If you're not willing to put in the effort to write a decent question, don't expect a review.
 
@Mast the context is in the insert statements isn't it?
they created a reproducible piece of code, I was able to copy paste and run the code
 
@Malachi For starters, all SQL should be accompanied with a schema. We meta'd that.
Irrelevant.
Please tell us more about what this query accomplishes, what the schema looks like, and provide a sample of the data. See How to Ask. — 200_success 39 mins ago
If that's fixed, sure, it can stay.
 
we know what the schema is going to be from the CTE that they gave. 3 string columns and an integer column. or am I wrong?
Actually, @Mast, I could see Stub Code.
is this the actual code that is used? — Malachi ♦ 12 secs ago
 
4:57 PM
0
Q: imessage bot framework in golang

PLZHELPi guess I'm an "intermediate" programmer and I wrote this framework to run commands on an imessage group chat using a third party websocket to send and receive them. The general basis of my code is: initialize data read from the websocket until a "newMSG" event is received initialize users and ...

 
5:14 PM
1
Q: Const_span and Span

R zuA span provides a view to a contiguous piece of memory. Internally a span wraps a pointer, and a size. I tried an existing implementation: gsl-lite. Somehow a function like template <typename T> void f(gsl::span<const T>& s) {} can't accept a gsl::span<T> as an argument. There seems to be no im...

 
When you set adblock to the strictest level, it blocks Google Analytics :)
 
It should.
Good adblocker.
 
Agreed.
Both AdBlock Plus and uBlock Origin.
 
5:48 PM
0
Q: Convert binary string to decimal number

java-develI'm finishing C Primer Plus by Stephen Prata book and I wrote as a part of the homework program to convert binary string to decimal number: #include <stdio.h> #include <string.h> typedef unsigned char byte; typedef unsigned int uint; int strbin_to_dec(const char *); int main(void) { char ...

-1
Q: Creating a poker program for studying/to learn react

daneholmbergI just started creating a poker web app. It's still in it's infancy and I just have a basic range board and I was wondering how my react code was. This is the first thing I've ever written with react, feel free to get very nitpicky. https://bitbucket.org/daneholmberg/poker-helper/src/master/

 
@CaptainObvious CBL and incomplete.
I forgot to VTC? facepalm
 
6:05 PM
What's the usual performance hit of using stored procedures over prepared statements @Phrancis ?
MySQL, localhost.
 
0
Q: Python way of setting Class attributes with function

bretonicsSo I am trying to learn how to properly set Class attributes of a Python class, and wondering about using class functions to do so. My beginners way has taught me to do: class MyClass(): """MyClass class instance""" def __init__(self, project, version, command): self.project = p...

 
I'd create both and profile them myself, but I'm likely to write one less optimized than the other and heavily skew the results.
Making them useless.
 
@Mast Do you perhaps have experience with returning products to Alternate.nl? I plan to buy a VR headset but I cannot be 100% sure that I don't get sick or anything, as far as I know returning an item shouldn't be an issue though
actually second-hand market might even be better right now but nah, was planning to buy ti from Coolblue.nl though but it's sold out :(
 
@skiwi No, never had to.
A little experience with 4launch recoveries though, went without a hitch.
 
@Mast FWIW, SP's are usually no slower, and often quicker.
 
6:17 PM
Or take any shop and pay using PayPal, enforce policy by threatening to reclaim money.
I've used that trick before on a shop I didn't trust. Turned out to be a wise move.
> Given a simple SQL statement, and a stored procedure call that accomplishes the same task, the simple SQL statement will always execute faster. Why? Because with the stored procedure, you not only have the time needed to execute the SQL statement but also the time needed to deal with the overhead of the procedure call itself.
3
A: Optimize MySQL in a stored procedure

JamesAfter three days for research, I discovered that CallableStatements are much slower than prepared statements because there is overhead when setting up the stored procedure. That's why my stored proc takes 300ms+ vs the prepared statement. This explains the issue: As you may recall, CallableS...

So, that's bullshit?
 
@Mast Do you ever worry about the performance of calling a function/method vs. copy/pasting code?
 
@Mast I don't really expect it to be an issue, just don't really want to wait two weeks before it's restocked at the other shop though
 
@202_accepted If it passes by reference and doesn't take a needless copy, no.
 
Technically, the SP is always slower, but if you let the optimizer be the optimizer, it can often do the SP quicker in the end because it knows what it's got, vs. being handed unknown SQL every time.
Basically, SQL does weird stuff, including something called "parameter sniffing", it's easier to sniff and optimize SP's than regular queries, because everything has to be parameterized.
 
@Mast On the whole SPs have best performance, as long as they calculate and store a decent execution plan, which they typically do
 
6:20 PM
possible answer invalidation by 200_success on question by Anirudh Thatipelli: codereview.stackexchange.com/posts/189936/revisions
 
@202_accepted Right, a bit like Python compiling it's imports so it doesn't have to figure them out again 2nd run.
 
@Phrancis Queries do the same thing if you parameterize them / use prepared statements, but if you have anything hard-coded that changes, all bets are off.
@Mast Basically, yeah. :)
SP's do better and more effective sniffing 99% of the time, and I doubt you're doing anything to be put in that 1%.
 
Probably.
Right, I'll give it a shot and I guess my code is just about review ready then.
 
@SirPython Hey, I just timed the new widget on the office network (the old time was on my home network). Time-To-First-Byte is consistently under 700ms.
 
And an interesting note: if you have nested SP's the performance can go up CONSIDERABLY, due to the same thing.
@Mast FWIW these are the same reasons to use VIEWs as well. Just don't use FUNCTIONs in Microsoft SQL Server. ;)
 
6:23 PM
I ain't touching nested anything when it's about DB. I'll let the code sort it out instead of the DB.
 
@202_accepted Why not?
We've got some TBF's at work, and they run great.
 
@Hosch250 TBF's are fine if used correctly, SVF's are not.
 
While a full code review is unlikely to happen, here, you may want to check out OSMnx (github.com/gboeing/osmnx). From there, you can look at the author's example notebooks of how to export OSM data into a Folium map, which may be sufficient for your initial exploration efforts: github.com/gboeing/osmnx-examples/blob/master/notebooks/…kuanb 44 secs ago
 
6:43 PM
-1
Q: replacing Promise with async await

Takii found a question on stackoverflow using promises, an answer has been provided but for practicing purposes i thought about proposing an alternative using async / await and i'm wondering if its a good idea, is it a good idea to replace the promises in the the post with async / await ? what wou...

 
@202_accepted What's so horrible about them?
 
6:59 PM
0
Q: SQL Create a view that adds a check comparing two rows in two tables

Joe.BurchI have a task to create a view that will add a column which checks if data in two rows of one table matches the same two rows of another table. I have these tables: Table 1 Name ID Team John 35 1 Josh ...

 
7:11 PM
@Hosch250 Dunno, been told by over a dozen DBA's with 10 companies not to use them, so I don't.
 
OK, I'll look around.
 
cursory search yielded this answer and its sibling
second answer points to this:
 
My searches are saying just don't run an SVF for each row on the table...
Use cross apply instead.
 
1
Q: My attempt at a Blackjack game

BlackBoxSo I've been trying to make a blackjack game as my first attempt at an OOP project. The program is working, but not yet finished as it is lacking three major features that I couldn't figure out how to implement. Not being able to deal the same card more than once Automatically changing the valu...

0
Q: Restful CRUD API with Node.js and Express

Kate HerasimenakI build a RESTful CRUD API with Node.js and Express. This application allows, for example, to create a table on the client side with the ability to add, update and remove data by ID. I generate an array of random data for the availability of data when you start working on the client side with the...

 
7:27 PM
I'm voting to close this question as off-topic because it belongs on Code ReviewTnTinMn 24 secs ago
@TnTinMn It is okay to recommend the OP post on CR but in the future, please don't use Code Review as a reason to close a question. Evaluate the request and use a reason like too broad, primarily opinion-based, etc. Then you can mention to the OP that it can be posted on Code Review if it is on-topic. Please see the section What you should not do in this answer to A guide to Code Review for Stack Overflow usersPhrancis 58 secs ago
 
-1
Q: Regarding index out of bounds error and implementing Loop error in backpropagation algorithm

Calvin RichardI am fairly new to Python. I have spent some time trying to implement this and wanted to ask the community for some advice. I am receiving an index out of bounds error. I would like help addressing that as well as any advice on a way to write this code more efficiently because mine is very rough...

 
7:54 PM
-1
Q: Given an array of positive integer, divide in 2 array such that the average is same

SiddPExample: [1,2,4,5] output would be [1,5] and [2,4] So here is what I tried but code breaks at one point need help with decision making at that point.From below code if(avgArr1 < avgArr2){ is the point where I decide which needs to be the source array which needs to be destination array for inse...

 
8:10 PM
0
Q: Edit js CRUD table with using popup

Kate HerasimenakI created JS CRUD table with the ability to edit with popup. This is part of the code for editing. Editing includes the following steps: click button "edit" in the row of the table with selected data open popup window with showing data in the input fields edit data and confirm this by clicking...

 
8:22 PM
StackOverflow is not intended for code review, I recommend you move you post to codereview.stackexchange.comdimwittedanimal 9 secs ago
I don't think this is a code review, but I do think the question itself is missing. I'm assuming they want the text from within the html pulled out as a string, but I'm not sure. @perusjosh, if that is the case, please add the jquery you have tried, and also add some clarification so the question is clear. — Tyler just now
 
9:21 PM
0
Q: A simple program that animates the Y position of multiple elements based on the window scroll position

Vera PerroneThe following code animates an item's Y position based on how much of its parent is currently visible. This is the first time I ever animated something on JavaScript based on the window scroll position and the current performance is extremely bad. I am looking for ways to get this running as fast...

 
If you want your code to be reviewed, then you should post it in codereview.stackexchange.com also post your code in your question, just linking to somewhere else will irritate people. — Pablo 16 secs ago
I'm voting to close this question as off-topic because this question is better placed at codereview.stackexchange.comPablo 9 secs ago
@Pablo It is okay to recommend the OP post on CR but in the future, please don't use Code Review as a reason to close a question. Evaluate the request and use a reason like too broad, primarily opinion-based, etc. Then you can mention to the OP that it can be posted on Code Review if it is on-topic. Please see the section What you should not do in this answer to A guide to Code Review for Stack Overflow usersPhrancis 22 secs ago
 
10:00 PM
I want to post what I have as an answer, but I know there is more to review, I just don't have the time right now.
 
you want code review — smith 14 secs ago
 
0
Q: SQL Query to check if 100+ (or Dynamic) columns in table is null

DT09Let assume a table has more than 100 of columns & I want to display all the rows when all of its columns (Col1, Col2, ..., ColN) are nulls except for the column(s) I mentioned (PK). This is just a sample table I created to explain this question. Sample Table with data ╔════╦══════╦══════╦════...

0
Q: Use the built-in vectorization

LlopisI am evaluating if a list of pathways and its genes has pathways included in another pathways. So the way I thought about it is to create a function that does just a single comparison. all_in <- function(x, y) { if (length(x) > length(y)) { 0 } else { ifelse(all(x %in% y), 1, 0) }...

 
10:37 PM
1
Q: First Attempt at implementing a Perceptron

ZieziHere is an attempt at implementing the simplest Neural Network, which is an algorithm for learning a binary classifier. In this specific case, it can decide whether an input, of a pair of Cartesian coordinates, belongs to some specific class or not. main.cpp #include <iostream> #include <iomanip>...

0
Q: Assignement in c with file and user defined function

aita.kaneHello guys this is an assignment due tomorrow and i've done all the questions But i want you guys to chek my code and see if there are parts i can change to better my code . Please. so here is the questions and below what I've done. Thanks for taking your time and helping me. A company decides t...

 
maybe I should have asked before approving this, but do certain fonts have issues with certain ASCII tables?
 
11:19 PM
@SamOnela From my experience, all modern monospace fonts should display fine, and even old ones like Courier (not New) and FIXEDSYS
Also VTC that question as example code
 
11:36 PM
@Phrancis okay... noted
@Phrancis good call
 

« first day (1810 days earlier)      last day (2214 days later) »