« first day (1802 days earlier)      last day (2216 days later) » 

12:00 AM
RELOAD! There are 5224 unanswered questions (89.9895% answered)
 
12:29 AM
-1
Q: Q-sorting strings containing letters from 'a' to 'c' and 'A' to 'C' where A < B < C < a < b < c. Print the strings before and after being sorted

naniC-programming Use short() to sort 20 strings in alphabetical order : • The length of each string is a random number from [10, 20] • A string contains only letters from ‘a’ to ‘c’ AND ‘A’ to ‘C’ • A < B < C < a < b < c • Print the strings before and after being sorted

-1
Q: implementation of a sort algorithm in data structures

Gaone Mokgobelelomay you please help me understand something. how does a program which attempts to sort words in a file and record the time it took to complete the sorting of those words from the given file look like? the program should be implemented in a GUI environment as provided by Java features. please help

 
1:04 AM
0
Q: Is this a proper use of the dynamic programming approach?

PatA few days ago I learned about the dynamic programming approach to problem-solving; the thing is, I'm still not sure I am fulling grasping the concept. I decided to write an algorithm that takes a single String of uppercase letters, s, and split it into substrings based on a dictionary I have pr...

-1
Q: Send boolean return type only when true, when false send exception

karnaI have a function called updateSchool that has a return type of boolean. If the return type is true then the true value is propagated to a Javascript file and a user is shown a alert box saying, "School has been updated". If the status is false, then i want to throw an exception. In the updateSc...

 
1) For better help sooner, post a Minimal, Complete, and Verifiable example or Short, Self Contained, Correct Example. 2) Please use code formatting for code and code snippets, structured documents like HTML/XML or input/output. To do that, select the text and click the {} button at the top of the message posting/editing form. 3) See also the File Browser GUI for tips. — Andrew Thompson 31 secs ago
 
1:29 AM
codereview.stackexchange.com would probably be the correct site on which to post a question like this one — jcarpenter2 57 secs ago
 
0
Q: Is there a better way to set many properties on a PHP class?

Joe ScottoI'm trying to define parameters for my api, it's a super basic one and the first I've made. I'm trying to instantiate my class and set parameters but to me it seems super messy. Is this really the best way to set a bunch of properties on a class and check them? API Class: class Api { private $_...

 
 
2 hours later…
3:25 AM
1
Q: Comma Code - Automate the Boring Stuff (Python 3)

Robin CareyI'm currently working through an exercise of Chapter 4 from Automate the Boring Stuff, which reads as follows: "Say you have a list value like this: spam = ['apples', 'bananas', 'tofu', 'cats'] Write a function that takes a list value as an argument and returns a string with all the items separ...

 
3:48 AM
0
Q: Program to automate clicking on the new button on a chat website until the username matches certain conditions

Daniel SamIt's written in Python using the Selenium webdriver and beautifulsoup modules. This is the first part, for receiving the complete URL of the website, i.e after DOM and JavaScript manipulations. from selenium import webdriver driver = webdriver.Chrome('C:\SeleniumDrivers\chromedriver.exe') drive...

0
Q: have multiple buttons but only one statement displays

James Kellerneed help to have each button show below when clicked, i am very rusty with code but need to help a friend and have reached the end of google. <!DOCTYPE html> <html> <body> <h2>variable document</h2> <p>Please click the Call options you require.</p> <button onclick="myFunction(1)">API call ...

-1
Q: Calling a new Activity from within Runnable

amitabh tiwariI have a flow to handle in andoid : Suppose I am in Activity 1 and then there is one API say https://status.com/key which tells me whether I need to navigate to Activity 2 or stay on Activity 1 itself. So in Activity-1 I have put the HttpRequest call inside runnable thread and I am continuously...

 
4:03 AM
Monking
 
4:24 AM
0
Q: Is there a better way to get the most used character in a string, including the number of times it is found?

e-sushiThe following function I wrapped up in a quick coding frenzy counts the number of individual characters in a (hexadecimal) string, returning an array containing (a) the most used character and (b) the number of times that character is found in the string. function getMostUsedCharInStringInclCoun...

 
Monking
 
4:59 AM
Unfortunately, that may not be the case. If there is time between code reviews for feature_branch and dependent_branch, it's possible the feature_branch might be merged and pushed and someone else might add something conflicting before dependent_branch is landed. — Mike 15 secs ago
 
5:25 AM
Monking
 
5:56 AM
0
Q: Project Euler Problem 11 in Rust

Matthew StevensonHere is my solution to problem 11 on Project Euler. The goal was to find the largest product of any four numbers in consecutive line of any direction (vertical, horizontal, or diagonal). While my code achieved the solution it feels wrong to me in a way I cannot quite articulate. I attempted to...

 
6:36 AM
Also the usual rule is that if you have working code, the question belongs on Code Review, not here. These questions on converting loops to streams should be closed. — cpp beginner 36 secs ago
 
6:55 AM
As it is written, this is too broad, consider rewording it to match one only question. Asking for best practices could fit better in codereview.stackexchange.combradbury9 12 secs ago
 
7:24 AM
Please post relevant, minimal code as text in the question. Also, pure code reviews probably belong on a sister site. — KevinO 42 secs ago
 
7:35 AM
possible answer invalidation by Mdupont on question by Mdupont: codereview.stackexchange.com/posts/191619/revisions
 
7:59 AM
0
Q: Laravel - Add different style to type of product

Rainier LaanI'm working on a project where I have products. Each product can either be a theme, plugin or a plan. Now my idea was to add different styles to each of the types. For instance, Theme is red, Plugin is blue etc... Now in my blade file I have handled this in the following way: @if($product->produ...

 
8:40 AM
possible answer invalidation by Mdupont on question by Mdupont: codereview.stackexchange.com/posts/191619/revisions
 
9:01 AM
Yes, even I thought so. But the logic from my code reviewer is the browser starts parsing from the deepest node matched. So if it encounters li then it would search for every possible parent/child css declaration for all lis which would be slow in terms of parsing compared to the case where if it would have a class assigned to it, it could have directly applied those styles. — Souvik Ghosh 23 secs ago
 
@Duga thats ok
 
10:31 AM
Images instead of actual code, really? For these particular purposes, I guess, CodeReview would work better. — Kamiccolo 1 min ago
 
10:44 AM
0
Q: grouping values in a list of tuples to a dictionary

Van PeerI've a list of tuples (comes in pairs only) a = [(1,2),(1,4),(3,5),(5,7)] which I'm trying to convert to a dictionary as below d = {1: [2, 4], 3: 5, 5: 7} Here's what I've come up with - a= [(1,2),(1,4),(3,5),(5,7)] d= {} for k, v in a: if k not in d: d[k] = v else: ...

0
Q: Code improvement for String comparison and passing parameters among classes

gogogagaI have to check an uploaded file for anti-virus and if there is an exception, i have to give a message according to the exception to the users. e.g. if its a timeout, i would ask the user to try aging in a while. My first class, fileUpload is: public class FileUpload { //Message when no v...

 
11:02 AM
-1
Q: try/catch as an If statement

SimoActually I'm using the try/catch statement to check if a table already exist. yes the lazy way. What I'm asking is if this way is deprecated or just an ugly way to know if the table exist. My Code Private Sub CreateTable(ByVal tableName As String) Try Dim sql as String = "CREATE TAB...

0
Q: Copy-and-Move Concept Using Smart Pointer

HenningBelow I tried to implement a simple container class using the copy-and-move idiom. I am learning the changes to C++ as of C++11 and later. This is my first question, I hope it is well framed. Is the code exception safe? I chose to use a smart pointer. Is std::unique_ptr a safe choice? I read th...

 
It is better suited for codereview.stackexchange.comuser7 8 secs ago
 
11:18 AM
0
Q: Separate Post/Put API Helper methods or amalgamate

egmfrsMy application performs many post and put API calls. I've set up a helper to make this easier - if you pass in isPut = true then it will perform a put, otherwise it will post. public static async Task<HttpResponseMessage> PostAsync<T>(string url, T controller, ...

 
CodeReview might be better suited for you. — Script47 1 min ago
 
11:55 AM
0
Q: Program creates 3 consecutive values on a 7x7 grid; User has to guess the location

DorkymonSo, I'm learning Java with Head First Java. I'm trying to build a program that creates a 7x7 grid (A0 to G6) and places an object of 3 consecutive values inside it. The user has to guess the location and when the 3 values are found, the program will confirm that the object is destroyed. My pr...

 
12:12 PM
0
Q: Login/Register/Welcomepage/Updateuserprofile security improvements

Hazaki I have created a Login, Register ,welcomepage(userprofile with updatefunction). I have done that without thinking about security. Now I would like to improve the security on these pages. Note: This is a School exercise and I don't really have much experience with php. What simple changes can be ...

0
Q: PostgresSQL - Using a list of numbers

Guest123Can you use ... in PostgresSQL so I don't have to write out every number in a list? e.g. WHERE price IN (1, 2, 3, ..., 10) Or is there another way to do this?

 
1:01 PM
Just did an evaluation of a project I need to review
The project is 272mb, of which 271mb is dependencies.
Node JS code bloat is terrifying
 
0
Q: Refactor class to keep SRP

Rafal LesniakI had this question on interview, can you tell me how refactor this code to SRP? I am thinking that only wrong is console.log but I am not sure. class Product { constructor(name, price, tax) { this.name = name; this.price = price; this.tax = tax; } } class Basket { constructor...

 
1:21 PM
0
Q: List implementation

SRGAppreciate your thoughts and feedback on my simple list implementation. I have the code on github with list and some googletests here (not sure why github changes the spacing to be so big) Some points to keep in mind.. I have chosen to have two separate functions for assignment and move opera...

 
I think this question would have been better for codereview.stackexchange.com. — Sedrick 13 secs ago
 
1:38 PM
Greetings, Programs.
 
0
Q: How do I make POST requst from one app to another in Django Rest Framework

philipI making a payroll app that will be interacting with the accounting app. When a payslip is posted the payload will be used by accounting app.This is my code snippet so far but I haven't yet implemented a way to enable accounting app to get payslip payload. Create Payslip POST METHOD class Pays...

 
1:53 PM
This might be better suited for code review siteMathieu de Lorimier 41 secs ago
Working code + is this bad practice to do X -> CodeReview SE. Not saying you won't get an answer here, but it's right that SO works best for "I have this code, I expect this behaviour but encounter this one" questions. — Aaron 30 secs ago
 
2:13 PM
I'm voting to close this question as off-topic because questions about refactoring working code belong on Code ReviewMichael 37 secs ago
 
0
Q: Is it bad practice to use process.env.SOMETHING in a npm package?

lucavallinSpecifically, I have created a wrapper for winston, so only a few functions are available and it can always be swapped out for some other library. In this wrapper I am creating a new logger with: const logger = winston.createLogger({ level: process.env.MIN_LOG_LEVEL || 'debug', // Minimum logg...

 
2:37 PM
@DanPantry just start removing stuff and see what you actually need...lol
good to see you again
 
Monking-ish
 
thanks @malachi
 
2:53 PM
First of all I guess that your post are going to be closed because SO is not a code review website, you need to ask a specific question. I see that you don't feel confortable with some basic concept of programmation, you should absolutely read, before anything else, (the matlab basic tutorial)[ch.mathworks.com/help/matlab/getting-started-with-‌​matlab.html]obchardon just now
 
3:09 PM
If you believe that the code works correctly, consider presenting your work (with its unit tests) in a more-complete fashion over at Code Review. You'll likely get some suggestions on making it more efficient, easier to read, and better tested. Before you do that, make sure to read A guide to Code Review for Stack Overflow users first, as some things are done differently over there! (e.g. question titles should simply say what the code does, as the question is always, "How can I improve this?"). — Toby Speight 52 secs ago
 
0
Q: How do I vectorize this code

zexotThis R code separates the values in 'rData'. They are classified according to the class in 'rClass'. To do that, 'ClassifiedrData' is a named list, where each element in the list (a class), should be a vector with all the elements in that class. It is slow, and I had read that I should not use ...

0
Q: Converting a C# Function With Out Parameters to Java

MeridianI have a function in C# that takes an object and attempts to insert it into a database: public bool CreateObject(myObject objectToCreate, out myObject objectToCreateUpdated) { ... //attempt to insert object into database ... if (success) { ...

 
3:55 PM
Monking
 
I've spent an hour on refactoring code. I've managed to make it lose 5 lines. BOOO
I've lost my form
 
Is it a condition that it still has to work after you're done refactoring?
 
It took me almost a whole day once to refactor one line of code away.
 
@skiwi
yes I have test cases this time to make sure I don't break things
s/cases/case
 
Line was 600 characters long or so, but hey...
 
4:05 PM
Although I broke the test anyway because it turns out some properties weren't being used so I.. liberated... them
I think the code is a lot easier to read now, though
also, json-server is acting a bit like the soldier from that TF2 video
GET /api/v1/issues/1 returns 404
GET /api/v1/issues?id=1 returns [ the issue ]
 
0
Q: How to rewrite a set of tensor operations so that it can handle an arbitrary number of that set of operations?

maunaI am reading the resnet 50 implementation in Tensorflow Eager. The part I would like help with is between lines 235 and 241: self.l2a = conv_block([64, 64, 256], stage=2, block='a', strides=(1, 1)) self.l2b = id_block([64, 64, 256], stage=2, block='b') self.l2c = id_block([64, 64, 256], stage=2...

 
@DanPantry you mean it is doing exactly what you told it to do?
 
@Malachi Actually, no, it's just being really dumb
Insofar as it is doing what I am telling it to do but what I am telling it to do and what I want it to do are different things
Why can't software I didn't write read my mind. /s
4
Basically i have a webserver that proxies requests to a webserver, but I forgot to put path rewriting on
So it was passing /api/v1/issues to the webserver instead of /issues
 
@DanPantry To prevent code from going suicidal?
 
for some reason, the webserver was happy to serve /api/v1/issues with the content of /issues, but /api/v1/issues/1 ~made it teleport bread~ return 404
why does every chat room have it's own strike through syntax
 
4:17 PM
You have a bread teleporting web server?
 
yes, it is rather magical
 
To say the least.
 
with javascript, all things are possible. you thought == compared things? nope. teleports bread and cures malaria or causes palm-induced headaches. your mileage may vary.
 
It's tasty
 
Teleporting bread is dangerous though, didn't you hear?
 
4:19 PM
(I linked that clip above)
 
Right...
Mine's bigger.
3
 
4:31 PM
@DanPantry "==" is one of those things I find annoying about the state of JavaScript. The IDEA editor keeps trying to tell me that I should really be using "===" but that operator never seems to work correctly - and that's with up to date browsers.
 
what is that? a TV show or a YouTube show?
 
@Malachi A YouTube series.
Even has a kind-of long story to it IIRC.
Gary's mod got a bit out of hand.
 
0
Q: Implement a graph in Python

Latika AgarwalQuestion : Build a graph in python, given its edge representation. from collections import defaultdict graph = { '1' : ['2' ,'4','5'], '2' : ['3'] , '3' : ['5'] , '4' : ['2'] } def generate_edges(graph): edges = [] for node in graph: for...

 
@Malachi Making of
 
4:47 PM
monkin'
 
good thing I am eating lunch
lol
 
@Michael 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 usersSam Onela 1 min ago
 
@Duga repeat offender...
 
@SamOnela I don't like that guy. seems like a jerk
 
@Malachi The Jerk store just called, and they're running out of that guy...
 
4:55 PM
store
 
"Probody's nerfect..."
@SimonForsberg has anybody suggested having Duga reply to anyone who VTC SO posts because they should be on CR? or would that not be a good idea?
 
Pobody
 
^^
 
@SamOnela Do we trust @Duga that much?
I think it would be more annoying for SO than it would help CR.
 
Oh here we go, POI territory.
Don't trust the AI.
 
5:00 PM
@SimonForsberg touché
 
And whatever you do, don't give it any real power.
 
implementation would not be easy
everyone suggests it differently
 
@SamOnela 2 hours and 58 minutes...
 
5:03 PM
Thanks to how SE rounds.
1 PM Oregon time
8 PM UTC, 10 PM CEST
8 AM in Auckland, whatever their timezone is called.
Kiwi Coordinated Time
 
my coworker just came back from a month in NZ
 
5:19 PM
@SamOnela Of course we trust our robot overlords.
 
possible answer invalidation by antfuentes87 on question by antfuentes87: codereview.stackexchange.com/posts/189435/revisions
 
@Duga Good girl.
 
Does anyone have experience making semi-relational databases using Excel?
 
Sep 13 '16 at 16:55, by Mast
Excel is not a database, so learning SQL might be a good idea.
 
Basically I think I can get away with scoring data on a few sheets, then having another sheet to query the data and it should be fairly simple to set up
I'm having some properties that apply to a number of items all at once though, and I'd rather not duplicate it
 
5:30 PM
Oh, you simply want to reference a cell that's on another sheet?
That's easy.
What was it, !SheetNameColumnRow
So, say you got a sheet called Data.
 
Hm, not sure, I for example also have the list property that I kind of want order lines, but I'm planning to do a full commercial implementation
 
!DataR14
 
For example I can have three different order lines, but they in total have a price, and not individually
 
Sum the price at the bottom of the data sheet, reference it wherever you want it to show.
Yes, you can shortcut that. No, there's no good reason to do so if you don't, ehm, excel at Excel.
 
Mh, I'm weighing my options, I don't quite like Access, something web-based would be cool, but I haven't quite found it yet
 
5:37 PM
So, you want SQL...
 
Doesn't need to be SQL per se
But it should be expressed in a relational manner
Basically all Rapid Application Development platforms cost quite something per month though
 
Meh.
Pick a server with a RDBMS and you're done.
Heck, PHP and MySQL would solve your problem.
I may still have a couple of free accounts with support for that...
 
I'd rather not PHPOOP though
I've got a server already as well though
Maybe it's more a question of picking the right platform then... I don't want to deal a lot with the GUI
Lists should by default be paginatable etc.
 
@Donald.McLean I don't know a single case of === not working with modern browsers. Do you have a PoC?
 
I'll do that sort of stuff at work, not in my spare time ;)
 
5:52 PM
 
@skiwi When you say "that sort of stuff", you mean not over-complicating things, right? ;-)
 
@Phrancis Yeah, I have my job for that
 
This might be best to be asked in codereview.stackexchange.comadpro 35 secs ago
 
Well, not for over-complicating, but to solve generic problems :P
 
The client side is, by far, my weakest side.
@DanPantry Probably, but I'll have to dig around in the code a bit.
 
6:05 PM
Code optimization belongs on Code ReviewScott Craner just now
 
I'm actually wondering, am I not looking for a slightly more advanced CRUD app?
 
-3
Q: basic programming c++

MJdi'm a student and i have a project to be done but, the thing is that i have a trouble with the main part. how can i use arrays in such system like this? can i use 3d array? is it easier? because i'm gonna use functions to calculate scores and such things. it's a simple game system that'll ask th...

-1
Q: My R code is running slowly, should I code in Python so?

Arthur VazI am coding a model in R and the performance isn't what I was expecting. Should I change to Python script? I don't know if R is the best choice for this case problem. Follow the script and the data bases. SCRIPT AND DATA BASES install.packages("sqldf") install.packages('Oarray') install.packag...

 
I don't see a specific question. This seems more suitable for Code Reviewtripleee 25 secs ago
 
6:21 PM
Oracle is a Pain in the Neck....
now I know why people use Microsoft products....
 
I might dig up Django again
 
0
Q: create an xml using the csv input

LearningCppAim : To create a xml file from the csv file Iam trying to create a xml file from the csv file , the xml contains header , footer and body . I have create 3 different functions. Input csv file name,value,amt,position,qnty abc,2,3,4,5 cde,7,8,9,10 abc,12,13,14,15 cde,7,8,9,10 Code t...

-2
Q: Dependency injection in MSTest Using Unity

Troy NguyenIn many of my MSTest unit tests, every time I refer to certain interfaces, I will always be referring to the same class that implements that interface. For example: IPersonAccessor personAccessor = new MockPersonAccessor( JsonConvert.DeserializeObject<IList<Person>>("path/to/test-persons.jso...

 
@CaptainObvious 2 more VTC, example code.
@CaptainObvious UWYA, lack of context, take your pick. One more VTC.
 
6:37 PM
@Mast hammer'd by Vogel
 
Welcome to the Code Review chat room @Ampy
You don't have the required reputation yet to chat.
 
ʘ︵ʘ
 
-1
Q: How can I make this SQL more efficient?

Bicycle SELECT (SELECT Count(request) FROM list_items WHERE request IS NOT NULL AND request != 0 AND list_id = g.id) AS COUNT, (SELECT Count(id) FROM list_items WHERE list_id = g.id OR list_id IN (SELECT list_...

 
@Robert Using exceptions for flow control is how you fail a code review. — tadman 24 secs ago
We can say a lot of things about random code snippets. I'm just concentrating in the main issue. You can find SE codereview very interesting as well: codereview.stackexchange.com, take a look — Robert 32 secs ago
 
7:00 PM
Trying to figure out why a <input type="radio" checked="checked" /> isn't staying checked.
Any thoughts?
 
Spontaneously unchecking itself?
 
Have anything overwriting your checkboxes?
 
No.
@200_success Hmm, it might be the way fieldset works.
 
rogue unicorns? cosmic rays?
can you provide an MCVE?
 
@SamOnela Not likely. It's reproducable :P
 
7:02 PM
is it a publicly available page?
 
No.
Let's see if I can make an MVCE and post a Gist.
 
perhaps there is a script operating on that element...
 
No.
 
@SamOnela Could be
But I suspect it's something on the page overwriting all checkboxes and unchecking them by default.
I'd start with checking (haha) the CSS.
 
Yeah, MVCE works.
It was working just before I refactored it, so it's not that.
 
7:08 PM
Election ends soon, good luck everyone!
3
 
I'm assuming the -1 is because this is not a good SO question. This is a question that is primarily opinion based. It is also too broad for a good answer. Furthermore, your specific question can be answered with a simple "Yes" or a "No" (Where a "yes" is too small for an answer, and the "No" would be pretty broad to elaborate further). I also feel that it's unlikely to help anyone in the future as the usecase is pretty specific to your needs. Lastly, there is a separate Stackexchange site for Code Review which is really what this question boils down to. — JNevill 50 secs ago
 
Ah crap. I found it.
I've got a bunch of groups with the same "name".
And that just broke my save too.
 
@Hosch250 darn those names ... ლ(`ー´ლ)
 
Which means I have the same ID on all of them too...
The thing is, I've got the same groups for a zillion instances of the same data type.
 
7:18 PM
ఠ_ఠ is there not an easy way to give unique IDs?
 
Oh man, this is annoying
I just fixed a really subtle bug
2
So, there's a library in js called immutable. it does what it says on the tin. it has typescript typings. wonderful. anyway, I was trying to work out why a unit test that passed didn't match behaviour at runtime, despite types being correct
 
@SamOnela They are unique, in a way. It's presenting an enum as radiobuttons.
 
So it turns out if you were to do this.. Immutable.Map({ key: 'value' }).merge({key: 'value'}), the second {key: 'value'} gets deeply converted into a map
 
hmmm...TTGGL
 
But if you do this. Immutable.Map({key: 'value'}).merge(Immutable.Map({key: 'value' })) - the merged map is not deeply converted at all and is left untouched
I hate javascript.
2
 
7:21 PM
@DanPantry Can I join your club?
 
It's a love/hate relationship
I do love the language, but sometimes you come across really weird behaviour like this
But! tests saved me
it("doesnt store things in a really stupid way oh god javascript why", () => {
  const state = redux.groups(
    undefined,
    redux.loadProductsSucceeded("team-1", products)
  );

  expect(state.productById.get("efgh-1")).toEqual(products[0]);
});
 
@DanPantry Then you can't join my club :P
 
this test revealed the problem. I love unit testing now.
 
OK, we need a bunch of microclubs.
One for unit testing, one for JS hating, and one for JS liking.
 
@DanPantry I recently found out +[] casts an empty string to 0 instead of 1.
 
7:25 PM
just +[] on it's own?
 
If the + doesn't increment, why's it casting at all...
1373
Q: Why does ++[[]][+[]]+[+[]] return the string "10"?

JohnJohnGaThis is valid and returns the string "10" in JavaScript (more examples here): ++[[]][+[]]+[+[]] Why? What is happening here?

 
+[] casts to 0 as a number
typeof +[] === 'number'
 
Ok, empty array to a 0.
Why does every language call it something else...
 
no idea
we should all agree on one language and standard
 
@DanPantry No.
That would break things so bad.
 
7:27 PM
How do you think javascript was born
 
@DanPantry JavaScript wasn't born. It erupted from the gates of Hell.
 
The only way to have 1 language would be to go back to assembly.
Because they solve different problems.
 
@Hosch250 Hah, you thought there was only 1 language called assembly?
TASM, NASM, MASM, there's plenty.
 
that's fair
after all the saying is Some Assembly Required, not One Assembly Required
5
 
@Mast Those are just flavors :P
 
7:32 PM
@Mast I actually learned a weird form of AT&T assembly a short while ago.
To anyone interested: about to post a question with some nifty things in it.
 
-4
Q: I need helppp asap [code (python)]

reemPlease can someone please help me write this code , I can't figure it out since iam just a python newbie. file attached in this email into Python and separate the data into variables keeping in mind each variable is one column and the radiance (which is the last variable) has many columns. After...

0
Q: Prototype of an idle game

Julien RouséI am currently fiddling with ClojureScript and Reagent (a wrapper for React), and I'm trying my hands at an Idle game. I'm somewhat familiar with FP, and pretty new to Clojure/ClojureScript/React. I'd like a review more specifically on the Clojure/ClojureScript/FP and also React/Reagent parts bu...

0
Q: Dynamic Fibonacci algorithm in x86 (MASM)

WilliamMy task was to implement this algorithm that uses memoization to calculate fibonnaci numbers: int fib(int n) { int f[n+2]; // 1 extra to handle case, n = 0 int i; /* 0th and 1st number of the series are 0 and 1*/ f[0] = 0; f[1] = 1; for (i = 2; i <= n; i++) { f[i] = f[i-1...

 
7:58 PM
2
Q: Using PowerShell to deploy a staging environment to production

202_acceptedSo it's been a while. I present you with a somewhat basic PowerShell script that is designed to deploy our staging environment to production, on a nightly basis. I've designed this to be robust, and also log information relating to the deployment of staging to production. The idea where was to b...

0
Q: Performance when checking for primes [Python]

Santana AftonI wrote a program in Python 3 to check all tuples of the form (s,t) where s and t are positive integers satisfying three conditions: The inequalities s <= t^2 and t <= s^2 hold, and the value s+t divides st(s+1)(t+1); The value of s+1 is prime; The inequalities both s * [math.ceil( math.ceil( (...

 
Election is over, thanks for participating. Feel welcome to join us in the election chat room for updates!
8
in 2018 Code Review Moderator Election Chat, 49 secs ago, by Simon Forsberg
@Malachi @rolfl @Vogel612 Congratulations!
 
I don't remember who I voted for
 
@202_accepted It's still visible if you go to the election page.
 
@Phrancis It's over?! :o
 
Congratulations to our new mods: @Malachi, @rolfl, @Vogel612, as well as a big thank you to our retiring mods @200_success, @janos, and @MathieuGuindon!
17
 
8:09 PM
@skiwi Did you forget to vote?
 
Congratulations @Malachi @rolfl @Vogel612!
2
@Hosch250 No, I did vote ^^
 
@skiwi Took you 4 days or so, but yes, I noticed you voted :-)
 
@Mast I was weighing my decisions
 
@skiwi Wise man.
You can change your vote up to a minute before the election ends though, which takes a bit of the pressure of it.
 
8:27 PM
lol
@DanPantry USB-C
 
@Malachi Yuck.
 
USB-D
 
you don't like the reversability of USB-C?
sorry I may have the name wrong of the charging cable I mean
USB 3.1 Type-C ???
I have it on my Moto-Z
 
@Malachi No, I think it puts convenience over performance.
 
my phone charges much faster when I have the right charger....is that not part of it's convenience and performance?
 
8:32 PM
@Malachi It would charge even faster if it used a different port.
 
I think it has to do with the Device and the amount of amps it can take.....more than the port style
 
Well, not just for charging, it's for data transfer too.
 
3
Q: 2018 Community Moderator Election Results

Jon EricsonCode Review's second moderator election has come to a close, the votes have been tallied, and the 3 new moderators are: They'll be joining the existing crew shortly — please thank them for volunteering, and share your assistance and advice with them as they learn the ropes! Please join me ...

2
 
@Hosch250 The amperage shouldn't affect the data transfer....should it...I am not an electrical engineer, although I know a little bit, very little.
 
amperage makes for more heat. generally excess heat is something you want to avoid
 
8:45 PM
@Malachi No, it just makes the "tube" bigger so more data can go at the same time.
 
@Malachi More copper is more amperage before things start burning.
 
@Mast Is USB-C still using Digital to charge and transmit data? Because AFAICR it's possible to do AC/DC over the same line without creating too much interference.
 
@202_accepted What are you talking about?
 
@Malachi Oh yes, so now everything has the same connector but depending on the type of cable and port it may or may not work. ;)
@Mast I dunno, I was just wondering how USB-C transmits data and charge over the same cable, and if they were intertwining signals.
 
@skiwi USB-D ~= B Batteries?
 
8:55 PM
My favourite part of USB-C and the 3.0/3.1 stuff is that now my ports have to negotiate another protocol version on-top-of the previous negotiations, and that's always a good idea. :)
 
@202_accepted USB-C has alternate modes, so who knows what it's actually doing.
Size went down though. Less size is less copper. Less copper is no good.
 
I like how it's less-copper-more-money.
 
Development cost.
 
Oh yeah, "we spent so much time engineering a cheaper product that we have to sell it for more money!"
2
 
@202_accepted Not sure if that is sarcasm or not.
 
9:02 PM
Cynicism.
 
9:17 PM
If anyone wants to test our new moderators - now is the time to flag stuff ;)
 
9:28 PM
Did I just miss a flag-fest?
 
@Hosch250 I wish I had seen that when I was working on the Marshal badge...
 
@SamOnela That's what I used.
 
@Hosch250 For SO I used to just check out bot responses by Natty in NAtOQHQ
 
0
Q: Most accurate/efficient way of timing code in Python

J DoeIm using a linear search as a spell checker. I need to time my code to get averages as im using different searches and comparing them. However I don't believe the code iv used to time the code is accurate enough or the best method. If anyone has any suggestion that would be great. import re impo...

 
9:54 PM
-1
Q: JavaScript Alarm Clock

MO HYHow to make a JavaScript Alarm Clock and make the alarm duplicate itself in other times with Radio Buttons? I tried to make a normal alarm but i can't make it duplicate itself

1
Q: Grouping Date Objects by year and month

FangI have an array of date objects, which I want to group by year and month. The data structure I have chosen for my target is an array of arrays of Date objects. Two Date objects should be in the same array if year AND month match up. I'm supplying two extensions I added to Date and Formatter to ...

 
Congratulations moderator dudes. @Malachi @rolfl @Vogel612
 
@Donald.McLean thank you
TTGH
 
10:11 PM
0
Q: Macro that allows for Linear Problem notation to create Genetic Algorithm fitness functions

CarcigenicateAs a side toy project for my Genetic Algorithm, I decided to try to create a macro that lets you use maximize: ... subject to: ... linear problem notation to generate fitness functions. Those fitness functions can then be used in a genetic algorithm to solve linear problems through brute force. ...

0
Q: A basic Ruby rate limiting class using Hashes and Mutexes

theGreenCabbageI wrote a basic rate limiting classes using class instance variables and mutex. I would love a good review on this code! In particular, I think rate_count could be written better in how I count the number of expired timestamps. class RateLimit @@timestamp = {} @@m = Mutex.new de...

 
Code that works well, and you want users only to review (verify) it for feedback and improvement suggestions (usually) belong on, and get better responses on codereview.stackexchange.comdavedwards just now
 
10:28 PM
0
Q: C programming struct&file

user166782Our professor want us to write program that shows student information such as name, surname, id, exam grade, total grade and average. We have to use struct and file in c. (not c++). For 30 students, we'll enter information. firstly it has menu. we have to choose option then we can continue the pr...

 
11:02 PM
Look at the code review stack exchange if you want someone to simplify your code. — Ryan Schaefer 44 secs ago
 
11:37 PM
TTGTB
 
11:57 PM
0
Q: C# Refreshing Cell Values in Visible Rows of a Virtual Mode DataGridView

David StampherI have a DataGridView whose Virtual Mode property is set to True. When values of the underlying list are updated, those updates are not occurring in the UI unless I scroll vertically. So I have created a timer which, every 1 second, calls DataGridView.Refresh(). Feels ineffective and overkil...

 

« first day (1802 days earlier)      last day (2216 days later) »