« first day (2141 days earlier)      last day (1876 days later) » 

12:00 AM
RELOAD! There are 5887 unanswered questions (89.9193% answered)
 
0
Q: A Simple HangMan Game Implemented in the Java Language

King ColdThis is my first post on this forum showing you a simple implementation of the HangMan game in Java. This is a side project and this deviated from the usual programs I write which are either school assignments or problems on coding websites. It feels great to have something simple working, but ...

 
12:23 AM
0
Q: Script that fixes YML SIDs to be simplified for production

BalaclavaI work with YML files that include SIDs and the following structure: title: "2": "content a" # key: comment "3": "content b" # key: comment "4": "content c" # key: comment "5": "content d" # key: comment "6": "content e" # key: comment Usually, I have to remove some strings ...

 
12:43 AM
0
Q: Groupby, apply custom function to data, return results in new columns

AmstellI want to group by id, apply a custom function to the data, and create a new column with the results. It seems there must be a faster/more efficient way to do this than to pass the data to the function, make the changes, and return the data. Here is an example. Example dat = pd.DataFrame({'id':...

 
1:02 AM
0
Q: Deep copy of an unknown(ish) type in a templated linked list

MikeI have a templated linked list (Inventory), and I have instantiated a inventory object of type Item * Inventory<Item*> myinv; Item is an abstract base class, I have two other classes, Weapon and Armor which both publicly derive from the Item ABC. I have instantiated a Weapon object: Weapon *...

 
2:00 AM
1
Q: Phonebook using a trie

PavelI implemented a PhoneBook utilizing a Trie data structure. Could I ask you to evaluate it? Did I apply Trie correctly for such case or is it better to store data somehow else? I'm looking not only for working solution but also for an optimal one in terms of run-time and storage. From my calcu...

 
 
1 hour later…
3:09 AM
If the code is running, then you could go to codereview.stackexchange.com and paste part of the code, e.g. the crypto code only and have it reviewed. — Maarten Bodewes 33 secs ago
 
3:37 AM
0
Q: Writing SQL queries to retrieve data from given tables

X LeforaGood day, I am a college student and lately we had an assignment where we were tasked to write SQL commands on various questions depending on the information that is needed to be displayed from 3 different tables. Here are the instructions and a sample question with a provided solution: And ...

 
3:56 AM
0
Q: Min function accepting varying number of arguments in C++17

LingxiCome across this problem once again in the book The Modern C++ Challenge (problem 18). Wonder how simple and elegant the implementation could be using C++17. Following is my solution. Ideas? ^_^ #include <algorithm> template <typename Less, typename T, typename... Ts> constexpr const T& min(Les...

 
4:17 AM
0
Q: Scraper to get property info from Tripadvisor

Josh LimI'm very much a beginner at programming, and hoping to get some advice! I'm having some trouble with a tripadvisor scraper being slow, and have identified the part of my code that is taking a while. It's likely because of the long selector, but i'm not sure how to use anything more specific becau...

 
5:12 AM
Monking
 
1) Agree with James. What type of file are you trying to run? .cfm? 2) Can you show the code that's giving you the incorrect display? Is that query inside cfquery tags? 3) OT Code Review: If you have a column named Year_2018 that appears to be boolean, what do you do when it's 2019? This is a pretty big code smell indicating you might want to take another look at your database design. — Shawn just now
 
5:35 AM
0
Q: Backup with Hanoi Strategy

hlapointeI want your suggestions about this shell script. I use it to backup some configurations on my home media server. What improvements would you do? Keep in mind, I want to optimize space and speed and at the same time, backup the maximum configurations over time. thank you for any inputs. #!/bin/...

 
6:33 AM
0
Q: Is my Redux pattern and utilization correct?

VikramI have redux store with data of IProperty[] type (defined as below). Using ADD_PROPERTY, CHANGE_PROPERTY, CHANGE_PROP_TYPE, CHANGE_PROP_PARENT, UPDATE_PROP_PARENTS actions. interface IProperty { name: string; type: string; fullName: string; parentRef: string; errors: { ...

 
6:52 AM
-1
Q: Allocate Resource Effectively

Dinesh KumarI have module called printer allocator (PrinterAllocator) which will allocate the next available printer to the requester. import java.util.ArrayList; import java.util.Arrays; import java.util.BitSet; import java.util.List; public class PrinterAllocator { private static final int TOTAL_AV...

 
7:12 AM
have you tried posting at codereview.stackexchange.com as well? — g_uint 8 secs ago
 
7:31 AM
0
Q: Monte Carlo Tree Search agent in a game of Isolation - Debug Suggestions

kerweiTLDR MCTS agent implementation runs without errors locally, achieving win-rates of >40% against heuristic driven minimax but fails the autograder - which is a requirement before the project can be submitted. Autograder throws IndexError: Cannot choose from an empty sequence. I'm looking...

0
Q: Walking over a N branching tree

James SchinnerThe aim of this code, written in Python3.6, was to write a function that will non-recursively walk over a N-branching tree structure. It works by using a list of indices that to keep track of visited nodes and retracing prior steps when a tree branch ends. The function non_recurs visits nodes to...

0
Q: reducing time complexity

Sadi HurayvHere is the problem link and here is my code, #include<stdio.h> int main() { int i, j, k, t, n, c=0; int num[105]={0}; num[0]=0; scanf("%d",&t); for(j=1; j<=45360 ; j++) { c=0; for(k=1; k<=j; k++) { if(j%k==0) { ...

 
 
2 hours later…
9:27 AM
0
Q: Data structure that is fast to read and modify

CodeMolester69I'm working on an apllication that needs to process a lot of objects in realtime. I've separated the logic from the UI so that it isn't as much of a mess. The basic idea is that every tick I'm trying to populate a list of objects to process and once they are processed I update the UI accordingly....

 
@Mantykora7 Beside: if you want to, you can post this on codereview.stackexchange.com so the community can do a code review on your code and comment about best practices, better solutions and s.o.. — unherz 18 secs ago
 
9:46 AM
0
Q: Convolutions with shared memory in CUDA

JsevillamolI am writing a noise blur convolution kernel in CUDA __global__ void noiseReduction(float *im, float *NR, int height, int width) { // Definition int i, j, bi, bj; // Retrieve global id i = threadIdx.y + blockDim.y*blockIdx.y + 2; j = threadIdx.x + blockDim.x*blockIdx.x + 2; ...

 
9:56 AM
Monking
 
Monking
 
0
Q: Password Generation Using Cryptographically Strong Random Number Generation

Jose Fernando Lopez FernandezMy goal in creating this project was to create a password generator that was simple enough to be useful as well as sophisticated enough in its random-number generator so as to not be contrived. I used Boost Program Options for argument parsing. The interface seems extremely easy to use, and the ...

 
10:14 AM
Monking
What's the respectable method of putting simple, user-editable configuration in a project to be read at runtime nowadays?
INI files? YAML? Something else?
It's one of those odd situations where JSON may not be the most suitable.
Also, depending on the use case they'll be holding max 3 or 15 keys per user. So it doesn't have to be something build to support massive amounts of data.
 
@Mast INI-files is so 90's and I hate YAML.
I'd go for *.properties files. Simple lines with a=b values
 
if JSON would be suitable, so would YAML
 
0
Q: Php how to properly connect functions with pagination

Mantykora 7Am I doing this right? I do not know how to properly connect functions with pagination. To make everything work, I have to duplicate this variables. When I add variables to the function and to the index, then everything works. $rowperpage = 10; $page = $_GET['page'] ?? 1; $page = $page - 1; ...

 
properties are just K-V pairs, so they're not terribly well suited for object-like configuration
 
@Vogel612 a.b.c=xyz
 
10:27 AM
so what are you doing about lists of objects?
a.b1.c=foo?
 
a.b.0=bar
or something. There's plenty of options
or a.b[0]=bar
or a.b[]=bar
 
but the following is still kinda very much easier:
a:
  b:
    c: xyz
  b:
    c: foo
 
intended to be YAML, but TOML is based on that IIRC
 
@SimonForsberg What spec does that follow?
@Vogel612 At least it's readable, although how does that work with a doubly-declared a.b?
Say I call a.b.c from that file, it has 2 options?
 
10:35 AM
I'm not really deep in the area, but basically you get objects out of there..
a has a list of bs then
it should be equivalent to the following JSON:
 
@SimonForsberg Simple lines with a=b is just about INI, except INI adds section headers on top of that.
 
@Mast Java property-files.
 
{ "a":
  { "b": [
    { "c" : "xyz" } , { "c" : "foo" }
  ] }
}
 
@Mast INI supports one nested section, not multiple.
 
Ok
 
10:39 AM
@Vogel612 I'm always so confused by YAML when nested objects are mixed with lists.
 
@SimonForsberg tbqh so am I, but eh
YAML is pretty well established at this point
 
So is both JSON and properties-files as well.
 
So, it's not a matter of picking the best but a matter of picking one and sticking with it?
 
@Mast yes
as always, really
 
Fun.
 
10:41 AM
@SimonForsberg JSON is slightly more difficult to write syntactically correctly...
 
@Mast No matter what you choose, someone will end up hating it.
 
FYI if you are using YAML + python remember to call safe_load and not load
 
@Vogel612 YAML is even worse, IMO.
 
@422_unprocessable_entity That goes for most configurations really. Raw configparsers don't work too well either, you need safeparsers.
 
YAML is basically python as configuration...
 
10:43 AM
Groovy DSL's is also an option
 
And YAML/JSON/INI have support in most sensible languages I can think of, so that doesn't matter either.
 
0
Q: HashTable using C

Giannis PapaioannouIntroduction This is my first attempt to mess with memory allocation using C and create something close to a python dictionary. Coming from a high level programming language like python/java, I am not really used to correctly handling low level code. I tried to follow c conventions/style but I c...

 
@SimonForsberg They really should've called it something else.
But isn't the problem with DSLs that it's specific? Why would I want to restrict myself now?
 
@Mast I haven't seen any INI-support in a looong while
@Mast Just said that it was an option, not that I would recommend that option :)
 
@SimonForsberg I thought you were making a joke, but it turns out C# doesn't handle it by default.
 
10:46 AM
@SimonForsberg INI is almost the same as properties
 
Needs a package for it, while Python has it in one of the default packages.
 
@Mast I don't think Java can handle INI-files either
 
C# wants you to use XML. I'm not using XML for this.
 
@Vogel612 Keyword: Almost ?
 
XML is way overkill.
I'm this close to putting everything in an include and just import that. As long as the project uses interpreted languages, that's not a problem at all...
 
10:48 AM
@Mast actually they want you to use .config files, which just happen to be XML, because there is well-defined semantics to overriding XML values and XML is a really powerful language
 
Oh yes, XML is very powerful. It's also a lot of overhead for 15 keys.
 
@Mast Concretely, what kind of configuration are we talking about here?
 
@SimonForsberg 2 different applications, really. 1 is a simple thing where there's 1 config file for everybody and (probably, or just in the same file) 1 config file per user. Per user it should hold 3 keys or so and the general config doesn't need much either.
The other application will hold profiles as well, but per action instead of per user. 15 keys max.
 
1 config file per user? Where each of those configs hold 3 keys each?
 
@SimonForsberg not everyone's developing webapps :)
 
10:51 AM
To get even more specific, the first application is going to query Steam for achievement data and needs a userID, API key, things like that.
But I was thinking I would invent the wheel once and use it twice.
 
And specifying all the config for all users in the same config file is not an option then I assume?
 
And yes, I might be looking for a hammer while I need pliers.
@SimonForsberg All user configs are going to be in a subfolder, the same subfolder, which is specified in the main config file.
So yes, they'll be mentioned in the config, but putting it all in one file is going to be a mess, I think.
Besides, shouldn't application configuration and user configuration be splitted nowadays?
 
Alright. I'd say that properties-files is probably the easiest, for both you and your users
@Mast No clue, but it sounds reasonable to split, yes.
 
@SimonForsberg You don't happen to have an example with that from a recent project, by chance?
 
Properties are very readable + it supports comments AFAIK
 
10:57 AM
@Mast github.com/Zomis/minesweeper-flags-client/blob/master/… github.com/Zomis/minesweeper-flags-client/blob/master/… Even though they are not Java, they are in the exact same way as Java-files would be.
properties-files should ignore all lines starting with '#' I believe.
 
No quotes around strings, everything handled the same? Ok.
I think I'd have to parse that just like an INI though, don't think there's a dedicated parser for that yet.
 
@Mast Yup, couldn't get any easier.
 
@Mast line.split("=", 2)
 
yeah exactly ^^
 
there is a bit around line-continuations, but that's about it
 
11:01 AM
Hmmm
Sure, why not. Let's try this.
 
@Mast That's the spirit
 
0
Q: Changing player position after dice is rolled, c++

C.MannI am wanting each player to move position once the dice is rolled from their current position. For example, if the current player position is 3, and the die rolled is 2, then players new position is 5. At the moment, the players position is only moving from arrayTest[0]. #include <iostream> ...

 
well, that was quickly closed
 
I half expected one of you to leave the comment while the other closed it.
 
I'm voting to close this question as off-topic because it is a functioning code. Stackoverflow is mainly for coding errors. You can try posting this in codereview.stackexchange.comniyasc 13 secs ago
 
11:10 AM
@Vogel612 Moderator on duty.
@Mast I always comment first
 
Please don't language tag spam, also if you have functioning code and want to improve it, then codereview.stackexchange.com maybe a better site but read the help to see if it's suitable — EdChum 44 secs ago
 
11:59 AM
Monking.
There's also TOML.
 
I dont think StackOverflow handles code reviews — sabithpocker 6 secs ago
 
12:21 PM
0
Q: Are default parameters with non-static defaults legit?

Sebastian WeißI am currently refactoring some internal Angular libraries and ran across a function for a mockup service that looks very much like this: private createRandomItem(property: PropOne, anotherProperty: PropTwo, yetAnotherProperty: PropThree): Item { ...

 
12:34 PM
urgh...
I tried to check up on my dishwasher, which doesn't work properly right now. Found a very well-hidden area of mold behind it...
 
@Zeta I hadn't heard about TOML until today, also seems pretty simple to read and write, slightly more complex to parse perhaps. Overall, I like it.
@Vogel612 s/mold/gold/ ? No? :)
 
0
Q: Adding custom punctuation in string

Rahul PatelI want to add custom punctuations in a given string. eg: US 8012999 B2 --> US 8,012,999 B2 US 20170107206 A1 --> US 20170107206 A1 EP 2795605 B1 --> EP 2 795 605 B1 US 09700674 --> US 09/700,674 This is what I wrote def punctuate(text, punctuations): """Given text and list of tuple(index...

0
Q: Bringing modern DI/IoC concepts to asp.net web forms

OrtundThis seems to work okay in general even though the implementation seems to be very sensitive so I wanted to get some feedback about what I'm doing here. So the idea is to use a service class to separate the page and Entity Framework because I think that having EF in the page is messy. To do this...

 
@SimonForsberg would be kinda nice if it were gold instead of mold, yes...
ugh...
 
12:53 PM
@Vogel612 Seems to be that time of year.
We just discovered a basketball-sized area of mold in our house that wrecked a bookcase and a bunch of books.
We got it cleaned up, but we had to throw the affected bookcase and books out.
@Vogel612 Incidentally, they are switching a lot of their config files to JSON.
 
1:08 PM
@SimonForsberg IIRC, it's .ini, but more formal. It's also the configuration file for Rust projects, which is the main reason I heard about it.
 
@Zeta I thought ini was already perfect?:D
 
@Zeta I don't recall ini-files supporting nested structures, or other datatypes than string. But I used ini-files back in early 2000's when I was just starting out programming, so I probably did not use them to their full capability
 
@SimonForsberg They don't unless you want them to
.ini is an informal standard
They were basically built as a pre-registry thing for Windows
When Microsoft built the registry in Windows 95, they started encouraging use of it over .ini's mostly because the registry does some magic behind the scenes.
I.e. when you write a key / value to the registry it's not necessarily written to disk yet
Which is pretty interesting
 
I'm voting to close this question as off-topic because it's opinion based. You can try to get code reviewed at codereview.stackexchange.com. — deceze ♦ 37 secs ago
 
1:17 PM
@DerKommissar Ah, good old regedit
 
Yep. ini's were the pre-registry configuration
 
Yeah I might have put a thing or two inside the registry for my old Delphi applications.
 
Hahahaha Delphi
 
Spot the stupid mistake:
def get_profiles(self):
    for filename in os.listdir(self.config['profile_path']):
        if filename.endswith(".usr"):
            profile_name = filename[:-4]
            self.profiles[profile_name] = dict()
            for line in filename:
                key, var = line.partition(" = ")[::2]
                print(key, var)
                self.profiles[profile_name][key.strip()] = var.rstrip('\n')
I'll explain it if nobody finds it.
 
I see maybe 2 mistakes?
First, you aren't stripping \r.
Second, line.partition(" = ")[::2], shouldn't that be ::3?
 
1:26 PM
Hah, you're finding a lot of mistakes, but not the major one.
 
OK, LOL.
 
The biggest mistake is I'm iterating over the filename instead of the filecontents and try to add the characters of the filename to a dictionary instead of the content. Which is useless.
 
LOL.
I noticed that, but it was so odd, I thought it was intentional.
 
So, in short, I forgot to add a loop.
 
I thought maybe you were trying to cleanse weird multiline filenames or something.
 
1:28 PM
No, what I try to do is read property-like files into a dict.
 
Makes much more sense.
 
@DerKommissar Hey! What are you laughing at?
 
@SimonForsberg Just Delphi, I haven't done much with it but I giggle because it was such a PITA lol
 
@DerKommissar I liked it. I have considered trying it out in recent days just to see how it has changed, but I don't really have a good reason to use it these days.
 
Hey, to each their own. Glad you like it. :)
 
1:34 PM
@Mast I'm assuming you're using Py2, rather than 3? So no tasty pathlib for you :(
 
@DerKommissar Liked
 
It was supposed to be more like this:
    def get_profile_list(self):
        for filename in os.listdir(self.config['profile_path']):
            if filename.endswith(".usr"):
                self.profile_configs.append(filename)
            else:
                continue

    def get_profiles(self):
        for profile_config in self.profile_configs:
            print(self.config['profile_path'] + "\\" + profile_config)
            with open(self.config['profile_path'] + "\\" + profile_config) as filehandle:
                profile_name = profile_config[:-4]
@Peilonrayz I'll make it work on Py2 first, but this is one of the projects where I may probably not disallow Py3 recommendations during review.
 
@Mast Sensible, make it work in the environment you know then potentially convert :) IMHO Py2 and Py3 aren't that different. I wrote some bespoke Py 3.5.0 typing code and it magically just worked in 2.7 when I needed to add support for that too.
 
For now, I want to get it done. Been working on this for way too long already.
@Peilonrayz Exactly, and possibly use the project to learn a new environment at the same time. After it works.
So, not exactly at the same time, but you get the idea.
 
Yeah, :) It'd be nice to see you using Py3 :D
 
1:46 PM
You have provided a sample of input & expected output, and you have provided some code. However, you haven't explained what's wrong with your code. Where does it go wrong? Do you get compile or run-time errors? Is it not calculating correct answers? Something else wrong with it? Do you just want it to run faster or be written better (i.e. a Code Review)? — FreeMan 23 secs ago
 
@Hosch250 No, it takes the 0th element, the key, the entire ` = ` as 1st element and the value as 2nd element. Since I'm only interested in the 0th and 2nd, I take them with [0::2]. Of which [::2] is shorthand.
If it works the way I think it does.
 
@Mast Oh, OK.
I'm not that familiar with Python; I thought that was string indexing.
 
No, Python does a lot of fancy things with slicing.
 
0
Q: EF Core - Auto relationship creator

TachyonI am currently developing a project in .NET Core 2.2, more specifically a Web API. I am using EF Core as my ORM. I didn't want to manually specify all the relationships between my tables, so I wrote the below piece of code that gets executed in the OnModelCreating method of my DbContext. Would ap...

 
2:04 PM
Yeah, I've heard of it.
Just not familiar with it.
 
2:17 PM
0
Q: (Brilliant) Arrays Intermediate 3: Contiguous Knapsack

Tobi AlafinProblem Given an array and a number \$t\$, write a function that determines if there exists a contiguous sub-array whose sum is \$t\$. Source (Note that the URL may not link to the exact problem as it's from a quiz site, and questions seem to be randomly generated). I was able to co...

 
2:36 PM
0
Q: Writing Readable Python Syntax

HannibalI am trying to clean up some code that contains some rather long and ugly if/else statements and I wanted to get the opinon of the community on the what is considered to be the most elegant approach. Would the following be acccpetable or might there be a more Pythonic, or succint syntax? Any and...

0
Q: Substituting variable placeholders that may be intermixed with HTML tags

Logarytm CałkowyI needed to substitute variables of the syntax {FIRST_NAME} in a HTML template. The problem is that the template comes from a WYSIWYG system, and so the placeholders may be intermixed with HTML tags. For example in the following input, the {SECOND_NAME} placeholder should also be substituted, and...

0
Q: Damage calculation of server from decompiled code to C

majidarifI'm implementing a function for damage calculation based on de-compiled code I tried to rewrite to C. I just want to know if there are mistakes or there are still ways to improve my code. This is my code: unsigned char* dword_4FDE44 = reinterpret_cast<unsigned char*>(0x4FDE44); unsigned __in...

 
Yeah any code that calls main() should not survive code review. There is absolutely no reason to choose that over the answer given here, and many reasons not to. — Adrian 59 secs ago
 
2:52 PM
"Is my approach correct?"—this is off-topic here. Please see the help center. It might be appropriate on Code Review, but please make sure to read their on-topic documentation, take their tour, etc. to make sure before posting there. — Chris 38 secs ago
@Chris If OP doesn't know whether the approach is correct, it's not ready for Code Review yet. OP should know whether it works or not before posting. Code Review is not a code validation service. — Mast 21 secs ago
Well like I said, I am able to create the user but the doctor/patient is not automatically created. I don't quite understand what you mean by "it's not ready for code review yet". — Joseph Cheng 55 secs ago
 
3:15 PM
0
Q: Simple PHP method, but it might do too much?

NotflipI have been trying to implement good 'OOP' and coding standards, but I always end up with bloated controllers. How could I clean this controller method? public function updatePositions(Request $request) { MenuItem::setNewOrder($request->positions); $item = MenuItem::findOrFail($request->...

 
3:46 PM
1) You seem to have forgotten your code. 2) If your code works correctly, and you are looking for advice on improving it, consider asking on codereview.stackexchange.com. It seems to be more on topic there. — Algirdas Preidžius 25 secs ago
 
0
Q: Is there a better way of implementing showing and hiding people information

Simon PriceI have been given an extremely loose design to follow at the moment in terms of a page must show people's photos, name in a text overlay over the image, and when clicked a bio shows below. Must Haves Photo, text overlay with white background that you can still see part of the image. On click sh...

 
Your question(s) are way too broad. Please read How to Ask and what a Minimal, Complete, and Verifiable example is. Working code could be posted on CodeReviewLotPings 56 secs ago
 
4:37 PM
You’ve already got a diff tool that will show you what changed between versions for purposes of code review, right? If so, then the commented-out code surely serves no additional benefit — Marnen Laibow-Koser just now
 
4:48 PM
@CaptainObvious Off-topic, I think.
 
5:05 PM
posted on March 15, 2019 by CommitStrip

 
@CommitStrip Why would you possibly want to abuse CSS for all that?
You should totally drop that and use jQuery instead.
 
0
Q: async Parallel.Foreach c# code

NeoI have a deviceList of more than 10k items and want to send data by calling another method. I tried to use Parallel.Foreach but I'm not sure is this the correct way to do it. I have published this webapp on azure, I have tested this for 100 it works fine but for 10k it got timeout issue. Is my ...

 
5:30 PM
Sooooo, what is your question? This seems more appropriate to post on the code reviewing StackOverflow — Reedinationer 37 secs ago
@Reedinationer Code with known bugs is off-topic for Code Review. — 200_success 15 secs ago
 
I now know how doctors feel talking to some patients- trying to derive a proper title from god knows what code.
 
"Ask your doctor if Dependency Injection is right for you!"
7
 
5:50 PM
1
Q: Linux: color ASCII drawing class

Darius DuesentriebI am working on a pseudo graphical interface for a chess engine I wrote. I want to draw a colored chess board with ascii pieces. To abstract the pure std::cout << std::endl; I wrote this little class to organize an ascii-character "framebuffer": #include <iostream> #include <sys/ioctl.h> #include <

 
6:08 PM
It's a shame that Stack Overflow hasn't fully adopted the new Code of Conduct, which was designed to minimize the types of responses @Steve is receiving. Steve, your question is better suited over at codereview.stackexchange.com where such questions are welcomed :) — Jack 26 secs ago
...plus the habbits one picks up by writing Unity3D co-routines (essentially creating C# iterators that don't actually iterate anything and always return null) will most likely lead to rejected code reviews when you try to submit code to your peers outside of the Unity3D world — MickyD 47 secs ago
 
6:56 PM
Monking
 
I'm voting to close this question as off-topic because it would be a better fit for Code ReviewIgor 52 secs ago
this is not code review... — Pedro Coelho 1 min ago
 
7:15 PM
possible answer invalidation by hlapointe on question by hlapointe: codereview.stackexchange.com/posts/215473/revisions
 
@Duga Rolled back.
 
7:45 PM
possible answer invalidation by Outsider on question by Outsider: codereview.stackexchange.com/posts/215392/revisions
 
@Duga Is OK, only adds some values.
 
Soo @Mast I wrote an answer about the analytical solution to that building thingie.
 
8:06 PM
-1
Q: Python 3.7 \n after a loop

trizzHey I wrote the following code for an assigment: def triangular_area(): for i in range(0, 10): print(((i+1)**2)/2, end=" ") and it prints the following: 0.5 2.0 4.5 8.0 12.5 18.0 24.5 32.0 40.5 50.0 however, If I call another function that prints a random string right after I ca...

0
Q: ROR - Shopping Cart

evarHow are you? This is my first question in StackExchange! I hope I've posted it in the right section. I am new to web design and I've decided to start this journey learning Ruby on Rails and building the typical Point of Sale (POS). I've seen many tutorials on the Web, but none of them fulfill my...

 
8:20 PM
For reviews of working code, check out codereview.stackexchange.com instead of StackOverflow — Blorgbeard 32 secs ago
 
-1
Q: Is this a good practice to load controllers

J. DoeI'm new to PHP and I'm learning mostly, Is this a good practice to load controllers in PHP? Does it have any vulnerability? or it's fine and I can move on to write my controllers? <?php // application path (outside public_html) define('APP', '../application/'); // controllers define('CONTROLL...

 
8:44 PM
0
Q: python: Two items in loop

benwiggyI have a script that takes PDF pages (from booklets), copies each one twice and then them in half by cropping the right side and then the left side. However, I'm only getting one half on both sets #!/usr/bin/python # coding=utf-8 import sys import os from Quartz import PDFDocument, kPDFDispl...

-1
Q: Is it possible to get rid of code repetition and speed up its execution?

jhllkl kuylhI do not like the repetition of the code and the use of slow LINQ. Cannot change search methods. It is necessary to optimize the code in this context. Thanks for any help. public static IEnumerable<ElasticVideoMaterial> FilerResults(FilterData data) { List<ElasticVideoMaterial> resul...

 
9:04 PM
0
Q: Winforms MVP Passive View

JammoDI am currently in the process of refactoring a monolithic Winforms MVP application to make it testable. I have decided to utilise the Winforms MVP Passive View pattern. After reading many blog posts including Mark Heath I wanted to ensure that my understanding is correct. Any tips or guidance is...

 
9:23 PM
0
Q: Angular 7 HttpClient post and get correct way of doing this?

TanI have googled and read many tutorials about fetching data and posting data to Rest API. But i have never seen a tutorial with how to handle the getting of new data after a POST or an PUT in a best practice way. So i experimented a bit and codes this. It is working but i dont know if it is the c...

 
9:42 PM
0
Q: The function returns "None"

urban pečolerI know this is a beginner problem, but technically I have a code that needs a review. def dividable_by_2(a): if a/2 == isinstance(2, int): return print(dividable_by_2(4)) when I run it it returns "None" and I can't fix it.

 
10:11 PM
Code Review might also be receptive to this type of question. — Barmar 45 secs ago
 
@CaptainObvious broken
 
10:25 PM
possible answer invalidation by Snowhawk on question by harshit54: codereview.stackexchange.com/posts/215443/revisions
 
10:49 PM
re: 'let me know if I'm on the right path' - since you already have the requirements, can you clarify what you need from us to improve on those requirements? If you're looking for code reviews, consider Code Review Stack Exchange. — Akshat Mahajan 38 secs ago
 
11:11 PM
Please only ask one question at a time. If you want to ask about cleaning up a working script, post it to Code Review. — Barmar 24 secs ago
 
11:58 PM
0
Q: Script written in basic that uses strings of text for introspective analysis

Travis WellsPDR is an acronym for personality defect removal. This script was written in basic v1.1. I use strings to save details of the psychological analysis of one's defects to improve their personality. MIS=mistakes written AS=correct and positive perspective to be written that is easy for the mind to...

 

« first day (2141 days earlier)      last day (1876 days later) »