« first day (1804 days earlier)      last day (2217 days later) » 
00:00 - 18:0018:00 - 00:00

12:00 AM
RELOAD! There are 5220 unanswered questions (90.0084% answered)
 
12:17 AM
0
Q: Optimizing this Model Association (Rails 5 API)

DNorthrupI have a Character model that has a CharClass and ClassPerks child. Currently I am duplicating my logic a lot by manually assigning data. My Character index and create def index @campaign = Campaign.find_by_id(params[:campaign_id]) @characters = @campaign.characters render json: {...

 
I'm voting to close this question as off-topic because it belongs on code review — EdChum 9 secs ago
 
 
2 hours later…
2:26 AM
-1
Q: how to shoot a bullet prefab in the direction of the mouse (unity3d)

ConnerI have a turret that follows the mouse around in a 2d, top-down environment and I would like to know what code to use to make any bullet prefab shoot in the direction the mouse is.

 
 
1 hour later…
3:45 AM
As for getting the form of equation, Post your question here on Math Stackexchange and then write code in whatever language you want, If you get any problems there, then post a question regarding that here on CodeReviewC0deDaedalus 44 secs ago
 
3:57 AM
0
Q: Tweaking this Pong Game to embed a smarter AI

Shawn31313I am new to game development and took on the task to create a Pong replica due to my curiosity and interest in the field. I decided to write it in JavaScript because the game is not too labor intensive. I specially wrote it without any libraries for learning purposes. One of the biggest issues t...

 
4:14 AM
Monking
 
0
Q: Ruby getter recursively builds tree

0112def children(depth: 4, article_children: self.root.child_links) get_children = lambda do |depth, article_children| article_children.map do |uri| if (depth == 0) Wiki::Yggdrasil::Article.new(uri: uri) else article = Wiki::Yggdrasil::Article.new(uri: uri) {...

 
Monking
 
4:36 AM
Monking
 
5:09 AM
I'm voting to close this question as off-topic because it appears to be asking for advice on how to improve working code, rather than fixing broken code. This belongs on codereview.stackexchange.com. — yshavit 30 secs ago
 
5:29 AM
0
Q: Traversing a 2D Matrix and IoC DI

bruglescoMy most recent project has been an attempt at working with Dependency Injection. The project itself is a custom board game. I have not implemented the full working game rules but I do have the player movement within the game matrix working and that is what I wanted a review on. The first part of...

 
5:48 AM
-2
Q: Refactor two while loops

JV LoboI have this chunk of code: let currentStep = this.stepsOrder.indexOf(this.currentStep); let nextStep = -1; let i = 0; if(step === 'next' && currentStep < this.stepsOrder.length - 1) { i = currentStep + 1; while(nextStep == -1 && i < this.stepsOrder.length) { if(!this.steps[this.stepsOrd...

 
If the code works and you just want to know if there is a better way, you should post it in Code Review instead. — Magnus Eriksson 55 secs ago
"Also healthy criticism on how I wrote the code and how I code improve it will be much appreciated." You get that on codereview. — scopchanov 35 secs ago
@scopchanov broken code is off-topic on codereview. — Heslacher 39 secs ago
@Heslacher I'm sure scop's comment considered just the code review part of the question. You know, because he quoted that ;-). — Peter A. Schneider 50 secs ago
 
6:05 AM
-1
Q: Read description very well.2. All display operations should be in table format

Ahmed ShahwanJava Project Registration system A lot of institutions need systems to manage their works, so this project is going to be registration system which gives universities the abilities to manage their registration operations. so, you have the main ob...

 
6:49 AM
Monking.
 
7:13 AM
Just use an and... but this is more appropriate for Code Review. But note that — user202729 15 secs ago
 
0
Q: Generate a CSV file from a multidimensional array in php

pcgbenI can tell by looking at this code that I've gone about this in the wrong way. Provided the string is correctly formatted (each index ofCSVData[][], would the following generate a CSV file? There must be a more elegant way of taking my queries and building a CSV. Looking at this code kinda mak...

 
7:41 AM
@Peilonrayz @Phrancis Isn't the Help Center sort of meant as that rule book?
 
7:52 AM
0
Q: Is using beforeFind() event in background to dynamic update SQL queries a good practice?

VarunAgwI have a Projects table, which I need to ORDER BY code column. But problem is code is not a simple INT, but a VARCHAR specifying multiple level (like 01-15_33/23). So I need to sort by first part, then next, and so on. One of the option I found is to replace order field everywhere with a complex...

0
Q: Vim commands for browsing git history of a file

DarkWiiPlayerI've been working on this mostly for myself until now, but I am now thinking that it might be worth uploading for other people to use. But first I wanted to ask what other people think because I don't do much vimscript and have no idea about the dos and don'ts (aka. best practices) of the languag...

 
8:07 AM
Still the same, I have tan the following command SonarQube.Scanner.MSBuild.exe begin /k:"CodeReview" /d:sonar.host.url="xxxxxx:9000"; /d:sonar.login="xxxxxx" /d:sonar.upsource.url=xxxxxx /d:sonar.upsource.project=codereview /d:sonar.upsource.revision=11 /d:sonar.upsource.token=xxxxx Then the build command MsBuild.exe /t:Rebuild Followed by SonarQube.Scanner.MSBuild.exe end /d:sonar.login="xxxxx" still nothing showing...... what am I doing wrong :( — Tanzy 17 secs ago
 
@SimonForsberg Yeah, kinda. The last time I read the Help Center it was missing a lot of information. What edge cases we have to rules. Examples of the rules on specific questions. Q&A's on edge cases, answer invalidation on closed questions. I may be wrong, but I think the help center lacks some information. And learnt a ton more from reading Meta questions when I started, as they explained the why too.
 
0
Q: Shortest path via intermediaries

DHaCreated a shortest path finder that must pass via sets of intermediary edges (either one in each set counts as a pass) in order. Primarily I would like to know if there are logical fallacies in the ShortestPathViaFinder. I built it as a label-based breadth first search. Made for Java 7. Examp...

 
8:35 AM
Hmm.. it seems your question would be better suited to be posted at StackExchange CodeReview. — Montmons 30 secs ago
 
8:53 AM
0
Q: Sending many unique emails at same time

Johan HerstadI have an asp.net core app that sends emails with a link. When they click the link they can start taking an online test without logging in. The link contains a number that is validated by the controller who then returns their test. I log into my app and create a project. Here I enter a list of e...

-1
Q: Splay tree internal path calculation

Amudhan Kandasamy For part a calculation, the formula is n(n-1)/2 where n is the number of nodes. For part b calculation, i can't use the same formula. There is some computation required in splaying operation. If anyone knows how to find the internal path length calculation, please help me.

 
9:08 AM
This is a question for Code Review because it is about running code — Jens 45 secs ago
 
9:35 AM
Monking
 
9:45 AM
@CaptainObvious no code no glory
 
10:26 AM
@Peilonrayz It's true that our Help Center can be improved in several areas. See also this:
20
Q: Let's draft better Help Center pages!

200_successTo follow up on Help spot deficiencies in our Help Center, let's collaboratively draft better Help Center pages. For each Help Center page to be modified, post a Community Wiki "answer" containing the original text of the page. Please try to reproduce the markup as faithfully as you can. Then,...

 
This question qould be better placed at codereview.stackexchange.comggdx 16 secs ago
 
10:41 AM
@SimonForsberg The things that I may want to add, may not be a good fit for help pages either. I'll be happy to look into this more when I have more of a picture of what my end product is. If anything I've done can help the site I'll try look into making that happen too :)
 
10:52 AM
@Peilonrayz Ok, good :)
 
0
Q: Decimal to binary and binary to decimal convertor

coderPlease review this code. #include <iostream> #include <vector> #include <algorithm> // std::reverse #include <cmath> // pow() typedef unsigned long long int ulli; bool is_binary(ulli num) { bool status = true; while (true) { if (num == 0) { break; ...

 
@AlexHoppus: We are not a code review service. — Olaf 23 secs ago
 
11:13 AM
0
Q: I made a small chatbot bot with voice recognition but It has bugs and it's kinda slow

SudarMy code: #--------------------------------------------------------------------------- -------| # Imports # | # ~~~~~~~ # | import speech_recognition as s...

 
11:25 AM
^ check your votes :)
 
0
Q: DFS in a binary tree

Latika AgarwalProblem : Perform Depth first traversal on a BST and print the elements traversed class Node(object): def __init__(self, value, left=None, right=None): self.value = value self.left = left self.right = right class BST(object): def __ini...

 
11:48 AM
0
Q: Query to show each sites stock transfer history between all other sites

NinjaArekkuThe below query works fine and is quick enough but I am looking for any improvements that could be made. Due to the clients needs to show all transfers between sites in a Current site -> other sites excluding current site format I need to join CfgSites to itself. The Exists clause must remain...

 
12:07 PM
0
Q: Implementation of knn with k-fold CV in Python

amplifierI'm studying ML, classification algorithms. Here is my implementation of K nearest neighbors with k-fold cross-validation knn.py from numpy import * import operator import sys def classify(inX, dataSet, labels, neighboursNumber): dataSetSize = dataSet.shape[0] tiled = tile(inX, (dataSe...

 
12:25 PM
@curt.jpeg, sorry, I wasn't near a computer. CSS is quite annoying sometimes. To be honest, if you write up something that works, even with "bad" code, get it working and then go have the code reviewed at codereview.stackexchange.com — adpro just now
 
0
Q: Implement funcionality with handling errrors without throwing exceptions

FreeLightmanIn usual code if something goes wrong you throw an exception. However in some cases you need so that exceptions were processed and reported. Form validation is a good example. Error handling in this is realy easy. However I faced a problem when error handling is different from the previous exampl...

 
12:41 PM
great... building a project for work on my laptop -> laptop chokes for at least 5 minutes now
 
Monking
 
0
Q: Speeding up the transcoding of a large histogram

SamI'm currently working on transcoding a large histogram so that the lessened file can be used within a viewer style GUI. The transcoding works by using Tokens to define runs of bins. For example, Token C (below) defines any number above 255 (or 8 bits) up to 16 bit) or 63535) of 0 height bins in...

0
Q: a simple BSON indenter / compacter in javascript

felixBSON is an extended JSON format. For example thoses documents are valid BSON documents, but invalid JSON documents: prettified documents: [ { "_id": ObjectId("5a934e000102030405000000"), "k": 10, "dt": ISODate("2018-10-10") }, { "_id": ObjectId("5a934e000102030405000001"...

 
 
@rolfl yea.... 20 minutes buildtime on travis ... not sure what I'm supposed to expect
 
40 minutes on jenkins, then ;-)
 
12:49 PM
eclipse + chromium + docker = lots of disk waiting
and probably just waaayy too much memory :/
maybe I should upgrade to 16GB RAM -.-
 
Yeah, I'm fortunate in that my work laptop has 32Gig... I dedicate 16 to a VM I run in it...
 
my work laptop has some ridiculous amount of RAM as well...not there at the moment, but I think it is like 32 as well....
I don't do anything yet that uses more than like 35%
 
okay, so everything Imma start now is going to be much nicer...
 
0
Q: Knuth-Morris-Pratt Search Algorithm 2 Python

Anonymous3.1415I tried again to implement the algorithm. Just need someone to check my work. I hope I didn't miss anything but my long work hours recently have been pretty taxing on my brain so I honestly wouldn't be surprised if I messed up somehow. def KMP_table(wrd): #example: B A A B D C B A A A C A B ->...

 
1:06 PM
@Malachi ^^ I'm lucky they pimped mine out too
@rolfl ^^ I didn't even have my VM's open at this screenshot. :P
 
I think I use like 10 gig during normal operation. I don't know what it uses when I am trying to run the automated tests though... :o
 
I usually hit 20-25GB in-use on a regular basis, without VM's open. When I open VM's I end up ditching a bunch of my open stuff.
 
I hate closing things I am working on...lol
 
I kept getting BSOD's on my old laptop because of how much I did with it, so they replaced it with a much larger beast.
 
that is what my home computer is running at right now
 
1:10 PM
16GB here, with a 256 GB SSD at work.
At home, 16GB RAM, 128GB SSD + 1TB 7200 RPM HDD.
I don't know what to do with all the memory I have on my home computer, and I'm penny-pinching memory at work :(
 
14 tabs (Gmail, youtube, this chat + 6 stack tabs), 1 Excel instance
I think I need to find out what I can add, looks like I have two slots open.
2
 
@202_accepted Wow, that's more than me
How many tabs do you have open?
 
SSD!
 
@skiwi Usually 20-30 per browser.
 
@202_accepted How many browsers do you have open? 30?
 
1:13 PM
@skiwi 5
 
(If you want to come close to my normal amount)
Hm, I see Firefox is using 2.7GB again
 
@202_accepted How do you keep track of what you have open?
 
Work: Precision 7520 with a Xeon 4-Core + H/T (8-thread), 3.0Ghz with 4.0Ghz Turbo, 32GB RAM, 512 GB Class-50 SSD, NVIDIA Quadro M2200.
Home: Custom i7-5930K @ 3.5Ghz (6-core, 12-thread), 32GB RAM, 512 GB Class-20 SSD, Dual Radeon 6970 (Crossfire). 4TB SAS HDD as well
@Hosch250 Inefficiently. ;)
 
@202_accepted You way outclass me.
 
@202_accepted Wow, that home one is quite a beast
 
1:15 PM
CPU

AMD A10-6800K APU with Radeon(tm) HD Graphics

Base speed: 4.10 GHz
Sockets: 1
Cores: 2
Logical processors: 4
Virtualization: Enabled
L1 cache: 192 KB
L2 cache: 4.0 MB
 
@skiwi The graphics cards on it are garbage these days.
 
Eh, that's getting a bit personal.
 
@202_accepted I guess my GPU tops that :P
Though I might've went for overkill with my 1080 Ti..
 
@skiwi Probably. The Radeon 6970's are older, and AMD quit updating drivers on them.
 
mine is a little old. probably like 4-5 years....
 
1:15 PM
But I'm going to buy the new HTC Vive Pro next week, so it's not too much overkill anymore I think
 
ttgtw
 
@Malachi I had one about the same age, but it just died :( My new one outclasses it, though, so :)
 
7 mins ago, by Hosch250
I don't know what to do with all the memory I have on my home computer, and I'm penny-pinching memory at work :(
^^^ play factorio
 
1
Q: Multiple CResourceUsers using a single CResource

Teni I need multiple CResourceUsers to share one instance of CResource. I want to instantiate the CResource only if at least one CResourceUser exists. CResource is not singleton by design, there may exist other users of CResource C++98 is used Windows only solution CResource methods are thread-safe ...

 
Surprisingly, Factorio doesn't use much RAM for me.
 
1:19 PM
Yeah, you're right, install visual studio ;-)
2
 
@rolfl Installed.
VS is surprisingly light on RAM, though.
 
That one kills mine. ;)
 
My old computer was 8GB, and it never blinked.
 
And my Opera window always has high RAM usage as well.
@rolfl Surprisingly, Android Studio seems to be the biggest kicker when I am running it.
 
@rolfl Does it use lots of memory? Or are my bases not big enough
 
1:21 PM
@skiwi - let me check... I am really not sure.
 
@skiwi Probably just a lot of time.
 
@rolfl You have time to play Factorio and be a mod?
 
@Hosch250 Oh, and that work one is a Laptop. ;)
 
@202_accepted Both of my computers are laptops.
13" Dell at work and 17" HP at home. My old home one was a 15" HP.
 
I just ordered a Surface Laptop for my GF yesterday, should be getting it today.
 
1:24 PM
@skiwi I don't think even my bases are big enough.
 
@skiwi Apparently....
 
It's been a while since I played Factorio now actually...
 
They worked on optimizing I think
 
@SimonForsberg I still need to try your mods out, I never use logic circuits though.
 
1:24 PM
@rolfl Even my browser uses more
 
@rolfl Dang, good work man.
 
And given that it's a factory running at 2.8GW power, that's not bad.....
 
That's quite some
 
Not at all. I should check what my bases are when I get home, though I have no idea how to check that on Mac.
 
^^ 2 docker containers, eclipse, 1 osgi-application and 1 instance of libre office calc.
 
1:26 PM
Why is your cpu that busy?
 
also a few inactive terminal windows.
eclipse starting the OSGI application
well.. compiling and starting
for some stupid reason I can't get eclipse to show me the console view...
 
Sheesh, why the heck does submitting a form submit it recursively??
 
@rolfl I think the biggest one I had was a Bob's Mods with 1.5GW of solar.
 
I am aiming for a 1 rocket per minute system in order to get a massive infinite research system running.
 
Ah that would be awesome, I haven't played 15 yet.
 
1:30 PM
1 rocket per minute was OK at the time, but adding in the new infinite research as well is huge.
heh, skip 15 and play 0.16
 
Are you using bots?
Last I played was 14 just as 15 was Beta.
 
You're all making me want to play Factorio again
 
Using bots for a small part of it, yes, but using trains for the most part.
 
(I'm out of the times, man.)
@rolfl I suck so hard at trains.
 
wow...resizing a window looks fun ..
 
1:31 PM
0/10 would not recommend myself as a train engineer
2
 
@Vogel612 Well that's pretty...or something.
 
you can see the buffer for the X-Window that's below the chome window.
 
And why the heck does it only happen for valid file types in the submission?
Submit a .png, works. Submit a .csv, infinite submission.
 
@Hosch250 I actually like Dell products for the most part...
 
1:34 PM
@202_accepted Not bad, but I like HP better.
 
@202_accepted There's a mod Logistic Train Network whicha makes trains much more managable at scale.
This sort of scale:
65 trains and growing ^^^
 
@rolfl Wow, that's big
 
Nice
What's with all the blue? Is that water?
 
It's a mostly-water base map with big, but remote resources - map was chosen specifically to make rail transport "required".
 
Ah
@Hosch250 Did I tell you that I found a way to dynamically load and unload .NET assemblies from a running program?
 
1:41 PM
@202_accepted Really?
 
@Hosch250 Yeah, that screenshot was a program looping every 5s, and the part from "Test" and on was a separate assembly I rebuilt during execution.
 
Well, that would be useful for the King of the Hill controller I was building with PPCG.
The project kind of fizzled, though.
I hate working at a table barely higher than my knee.
 
@202_accepted @MathieuGuindon ^^ You might also like this. ;)
 
@202_accepted Unloading is rather tricky though
 
@skiwi It is, and I did it, and did it well. ;)
 
1:47 PM
I've also done it at my job
 
The only downside is it's not .NET Core compatible.
 
I also managed to get it to work such that when calling the same method in IL Bytecode (or compiled Expression Trees I think) it would cause different results because of the reloaded assembly
 
That's what's happening in that screenshot.
Each line is the main ".Tests.exe" calling to a separate DLL, which is loaded, called, then unloaded.
 
Ah, cool
 
It's really quick as well, which was one of the concerns I initially had.
 
1:59 PM
Wow. It works for success and one error message.
I wonder if the new lines in my status description in the response is screwing me.
 
welp ....11k errors...
2
 
80 minutes well-spent? ;)
2018 is just one big game of "what's the worst that could happen?"
 
@202_accepted Meh.
Attitude matters.
This is sick.
Somehow the newlines in the response screwed me.
 
CRLF, CR, or LF? ;P
 
Envronment.NewLine.
Which would be CRLF since I'm running ASP.NET MVC on the .NET Framework.
Replaced them with commas, and it works.
 
2:03 PM
Technically that can vary now-a-days, if it's on Linux / Mac that's supposed to be CR or LF as appropriate, on Windows that should be CRLF.
 
@202_accepted .NET Framework only runs on Windows.
 
@Hosch250 Yeah, but if you use .NET Core you'll get into the gray area. Are you splitting on Environment.NewLine?
 
It's .NET Core/.NET Standard that runs on Linux.
@202_accepted No, I'm joining exception missages for display on new lines.
And I mis-typed that twice, so I decided to go Pooh style.
 
Exceptions have new lines in them. That might be throwing you off?
 
string.Join(Environment.NewLine, exceptionMessages)
@202_accepted The messages don't. I know, because I wrote them myself.
 
2:05 PM
Oh ok, just making sure you're not using exception.ToString(), which pulls a multi-line message in.
@Hosch250 What exactly is happening with the new liens in the response?
 
OK, sheeeesh.
I stuck the newlines back in the display text and left them out of the status description. They got changed to spaces...
Although, wait, that's just HTML. I need to wrap them in span.
 
Are you sure they got changed, or that they didn't just get rendered as spaces? Browsers don't respect CR, LF, or CRLF, you need <br /> for that.
 
@202_accepted Right. That's what I just said.
 
It's kind of a pain in the arse, but it's completely understandable. People formatting the HTML "cleanly" shouldn't have weird side-effects from it.
 
Meh. If I ever meet the guys who wrote CSS, HTML, IE8, or Chrome, they'd better watch out.
 
2:08 PM
Start with the folks who wrote Netscape, as it grandfathered all of those. ;)
 
OK.
starts chainsaw polishes 2x4
 
@202_accepted Not all of them are about logic circuits.
@skiwi Then again, your browser is not a normal browser.
 
258 tabs, I don't see the problem
 
Factorio....hope I forget about that before I get home tonight...
 
SHHEEESH.
We don't format this text as HTML.
OK, that'll be an easy-ish fix, I hope...
 
2:16 PM
@Malachi Factorio
 
@skiwi yes, Factorio
 
Remember it, you want to play it
 
@skiwi is probably playing it trying to forget about the pain in his mouth.
 
I really think I do...lol
 
@Hosch250 Not too much pain :P
 
2:18 PM
@Malachi Ever hear from that guy?
@skiwi Be glad they invented pain killers.
Back in the day, you'd probably have died from the pain alone.
 
@Hosch250 yeah.
 
If not from an infection.
What'd he say?
 
I wouldn't need the painkillers per se afterwards, but during the surgery yes I'm happy they gave some ^^
I mean I probably wouldn't have liked yesterday without any, but I'd have survived
 
@SimonForsberg Yeah, I need to look into them. I always look for mods when I realize I need them...lol
 
@skiwi Yeah, just bite a bullet.
 
2:20 PM
In hindsight the side effects that the painkillers gave me were probably worse than the actual pain... but yeah
 
Well, my Surface Laptop just arrived, will let you all know how it goes.
 
@Malachi Get my Skype messages?
@202_accepted Really? Nice.
 
I just did what they prescribed
 
I considered getting one, but at 3k for a computer vs 1.4k for computer + screen + taxes, I decided not worth it.
 
@Hosch250 Yeah, because of my role with this company I get to put it on the company account and such, so I get guaranteed overnight delivery and such.
 
2:22 PM
@Malachi They say they aren't sending :(
@202_accepted Nice.
OK, this is going to the feature site. Thanks for the rubberducking, everyone.
 
@Hosch250 no
now I got one, just heard my phone
 
Yeah, I resent one.
 
time to get some coffee
 
possible answer invalidation by felix on question by felix: codereview.stackexchange.com/posts/191871/revisions
possible answer invalidation by Sam on question by Sam: codereview.stackexchange.com/posts/191755/revisions
 
2:38 PM
3
Q: C++ Threaded Logger

seeppWhat is it? It's a fairly simple logger which utilises a thread. How it works Note: this a pretty terrible explanation, perhaps it would be easier to look at the code. The logger class is a singleton, which contains the function log(). Upon logs()'s first use a static logger instance is creat...

 
@202_accepted Some mods you don't realize that you need until after you've played with them for a few minutes. Like my "Visual Signals" and "What is Missing"
 
possible answer invalidation by felix on question by felix: codereview.stackexchange.com/posts/191871/revisions
 
@Duga this needs to be dealt with. Anyone has the comment in handy and can rollback?
 
@SimonForsberg Yeah, I don't ever use mods until I know I need them lol
 
@Duga I think this also needs to be dealt with but I am not sure
@202_accepted can you deal with the two invalidations above?
 
2:48 PM
@SimonForsberg Yeah, I'll find the comment.
 
@SimonForsberg there is some content here that could stay I think.
I haven't gotten too deep into it yet
 
Hi there Felix, I have rolled back your recent edits. Please do not update the code in your question to incorporate feedback from answers, doing so goes against the Question + Answer style of Code Review. This is not a forum where you should keep the most updated version in your question. Please see what you may and may not do after receiving answers. — 202_accepted 16 secs ago
 
0
Q: How to shorten my C# code?

CubemasterI have been practicing my C# in a few programming competition games, and one of the challenges is to write the most compact code possible. The following code simulates resource management with Candles. Basically, we start with C candles, and each candle provides a usable stub when burned. It take...

0
Q: Simple console JSON formatter

sineemoreI am writing simple formatter for valid JSON. Is reads JSON data from stdin and writes formatted output to stdout. Goals: given valid input produce valid formatted JSON output constant memory usage minimal viable program (smallest program that solves a particular problem) feature free easy to ...

 
WOAH EVERYONE THIS PERSON DIDN'T FREAK OUT WITH THE ROLLBACK AND COMMENT
4
@202_accepted thanks for the link, didn't knew that — felix 1 min ago
3
 
3:06 PM
You may want to flesh it out enough to build a working example, and submit it to codereview.stackexchange.com instead — papagaga 54 secs ago
 
@202_accepted Excellent
 
0
Q: Alphabet cypher in Rust

Simon BrahanThis is my attempt at an alphabet cyper in Rust. I'm unsure if iteration and pushing to a mutable is the best way to handle building the output; it seems like a good candidate for a map but I can't figure out how to do it. Can anyone help? use std::env; fn main() { let keyword = env::args()...

 
3:23 PM
ugh... eclipse
 
Argh, why does Excel use data validation for my table header :|
 
possible answer invalidation by AShelly on question by AShelly: codereview.stackexchange.com/posts/114393/revisions
 
Ah, I was just failing, nevermind me
 
SQL has me good and spoiled.
I keep trying to do if (value in collection)
 
Hah, surprisingly the SQL IN can be slow sometimes, but if you're using a static set it's almost always wonderful. :)
 
3:39 PM
Yeah, everything can be slow sometimes.
Even select 1 if you are on a slow network.
 
Well with the SQL IN it actually rewrites that from X IN(1,2,3) to X = 1 OR X = 2 OR X = 3.
 
Yeah, but the syntax is so nice.
I'm asking the C# team if I should create a spec for consideration.
 
Oh for sure, just something to keep in mind if you're doing subqueries and such.
 
Yep.
It might be a pain considering the use of it in a foreach statement. Hmm.
 
If you look at "Seek Predicates" you'll see three listed, where the clause was IN(1,2,3).
 
3:42 PM
Yeah.
 
0
Q: Inline css or class for one or two css properties

Johnson CherianI need to add cursor: pointer; to certain elements in my page. What is the best practice to do it. Add inline css to each and every element or add a class say c-pointer to every element and apply cursor: pointer; on that class in css file.? Pardon me if this is a silly question. :-)

 
@Duga That appears to just be a comment that got updated...
 
What do you guys use as SQL front-end if you want to be able to customize it a bit but don't want to write a complete application to manage your database?
 
@202_accepted I've seen it occasionally... like this
 
@skiwi Not sure I understand what you're saying, you want to use SQL but make modifications? What type of modifications?
 
3:54 PM
@SamOnela Thank you for input, I did not know that. — Ogglas Mar 28 at 22:42
 
@SamOnela Nice
@skiwi Does Microsoft Access do what you want? That's what I would use here - connect it to the raw SQL database, rather than the Access DB.
 
@202_accepted A mix between phpMyAdmin and Microsoft access is I guess what I'm looking for
 
Ugh. Someone just resolved merge conflicts with my work and totally bombed it.
 
And it's been a long time since I've last seen phpMyAdmin..
 
@skiwi What SQL database are you using?
 
3:58 PM
@202_accepted Still open for choice, a simple example is that I want to be able to reference another table using a foreign key and allow input based on its values but in reality write the id and not the plaintext
 
@Duga Seems ok.
 
@skiwi You probably want something like Access for that then
 
"Jesus knows the way ask and you shall recieve" codereview.stackexchange.com/review/low-quality-posts/94762
 
Monking
 
@Zeta Monking
 
4:04 PM
@202_accepted I've tried Access a few times but can't make it work together with me
I guess I'll use Excel for the time being, but structured in a relation way and I can always change it
And I want to do some bad things to the person that automatically translates Excel articles but doesn't translate the names
3
For some reason setting Excel to English is also more difficult than it should be
 
Unsolicited code review comment: You can/should do this with just one function. Each of your functions essentially does the same thing. Use parameters in your functions to DRY it iup. — jmargolisvt 6 secs ago
 
4:24 PM
welcome @sineemore; unfortunately you don't have enough reputation to chat here but feel free to observe
 
The second way is correct, always check your constant (or string literal) first, this way no null check is required and you still avoid an NPE. IntelliJ isn't lying to you :-) In a code review I would call out the first way as not correct. — Michael 49 secs ago
If this works is it not a potentially a code review site question? — QHarr 32 secs ago
 
4:45 PM
-2
Q: find the sum of positive real numbers

MustafaCreate a program that reads numbers from the user and prints their sum. The program should stop asking for numbers when user enters the number 0. cold someone help me here please? Scanner reader = new Scanner(System.in); int sum = 0; while (true) { int read = Integer.parseInt(reader.nex...

0
Q: ShuffleBag (Fisher-Yates + PcgRandom)

Kittoes0124Anything that could be done better here? public class ShuffleBag<T> : IEnumerable<T> { private readonly int m_endIndex; private readonly FastRandom m_rng; private readonly T[] m_values; private int m_currentIndex; public ShuffleBag(T[] values, ulong state, ulong? stream = n...

 
5:02 PM
posted on April 12, 2018 by powercat

I am working on hash table implementation. First, I need to create a special Node template. Idea is to store nodes merely in table. Initially, all nodes collected in freelist. Node are linked by positions (for collisions). struct node { uint32_t next_pos = 0; uint32_t prev_pos = 0; }; For template support: template<class T> struct hash_node : node

0
Q: Optimizing Graph Algorithms for Floyd Warshall and Johnson Algorithm

Kaustabha RayI am trying to implement and compare Floyd Warshall and Johnson Algorithm(for Sparse Graphs). I have written the following code which produces correct output values for the all pair shortest paths. However theoretically, Johnson's Algorithm should perform better than Floyd Warshall on sparse grap...

 
You have now enough reputation to talk, @sineemore. You may need to refresh this tab, though. Welcome to the 2nd monitor.
 
@CaptainObvious Good first question, give him a warm welcome.
 
5:54 PM
-2
Q: How can i make React like life cycle hooks for my Widget component, widgets are like plain old vanila js componet and it gets data from ajax call

user1427190How can i make React like life cycle hooks for my Widget component, widgets are like plain old vanila js componet and it gets data from ajax call.

-2
Q: Is array ASCENDING or DESCENDING? javaScript js

Kaietan Paulit's my first post here :/ So I feel bit insecure about that. I need to return appriopriate string for each possible outcome. I'm trying to make loop keep looping and find out if something is true or not, but nothing I do works. What am I doing wrong? Thanks! function isSortedAndHow(array) { f...

 
00:00 - 18:0018:00 - 00:00

« first day (1804 days earlier)      last day (2217 days later) »