Thanks for the tip on the directive; that's really great and I'll try to get it through a code review. But please help me understand the rule: in what sense is there a source and a destination in cmp %rax, %rsi? I know that cmp is implemented as a subtraction, but it's rather hard to keep straight in my head. I'm just looking for a mnemonic. — jacobsa47 secs ago
I've written a small npm module. It is my first module. I'm asking you to review several things:
Readme. If the Idea of the library is clear?
The code. I am rather starter, so any wise critic will be super.
Any suggestions or ideas on the library.
Npm-module | Github
And sure, I'll repeat th...
FWIW I started coding when I was 13 and got a lot of attitudes like that ("Wow, it's so surprising you're not an idiot :D") so remarks like that irk me a little ._.
I have "fetchData" method which fills my "imagesArray":
func fetchData(){
let imageQuery = PFUser.query()
imageQuery?.whereKey("username", containedIn: namesArray)
imageQuery!.findObjectsInBackgroundWithBlock { (objects: [PFObject]?, error: NSError?) -> Void in
if error ==...
How much effort you put into the project is completely irrelevant.... if you sit back and expect people to just put solutions for your problem in your lap without putting in more effort, people aren't going to want to help you.
You may be putting in a lot of effort into your question or something, I don't know.. but you need to present that to people as well instead of complaining that people don't seem to think you're putting in effort.
I have been working for a long time now on modelling an open quantum system using the Lindblad Equation. The Hamiltonian is the following:
However, two other matrices are added to the Hamiltonian. One of them has all the diagonal terms equal to -33.3333i and everything else zero. Another is a ...
> Something is wrong in my code. I don't know what, I don't know where it is wrong, and it takes 2 hours to run. Please help. I also haven't tried debugging it because it is "Hard to follow"
You: - Haven't stated what you've tried - Haven't stated what is wrong - just that it gives the incorrect result - Have just posted a dump of code and asked "what is wrong with this?" - Haven't given *succint* sample inputs/outputs - Haven't even *debugged* it yourself according to comments
If you don't know how to condense the problem into something more managable either, then of course you're being called a help vampire - You have so many points you could improve on that people have told you about and you haven't made an effort to fix any of those things :s
And even if the question were re-opened in its current form on SO, I'd very much doubt you'd get answers given the amount of time the sample code takes to run. People on SO (indeed, across the entire Q/A network) are giving you their time for free - time that could be spent working on other things. You shouldn't make the problem any harder to solve than it needs to be.
ok... - I forgot to add that in... - I have said what the correct output is and what it currently gives - specifically, what do you want - I have not input output samples! - I have debugged it, I will add...
If this discussion is going to go on much longer could I ask you move it into another chat room? It is going a bit far off what 2nd monitor should be used for. I appreciate there is no site business, but this is getting quite long.
I'm voting to close this question as off-topic because it is about the improvement of working code, it is more suited for Code Review — Gerald Schneider28 secs ago
I've written some code for testing Gilbreath's conjecture in python (2.x). The conjecture was shown (in the 90s) to be true up to n=1012. My code uses the primesieve module to quickly generate primes and, by ignoring blocks of 0s and 2s, only calculates values in the array when necessary. However...
I had to write a function to split a string that goes into a field if it(the string) were too long for the field, as it would disappear and be unreadable.
How's the code lookin' ?
function splitText(instr, fieldSize) //instr = string to split into two lines, fieldSize = the width(in characters)...
This is the iterative depth-first search, that does not abuse the stack. Also, I gathered some information from DFS that may be useful; for example, I am able to do topological sort using the result information of DFS, and use topologically sorted graph node set in order to solve the shortest pat...
I'm currently studying fast-forward multi-layer neural networks with back propagation, in the book I see that all query and target vectors are binary-encoded, this makes me believe that this is the only allowed encoding, yet all other neurons in the hidden layers and output layer can take on any ...
This computer science just blows my mind. I really do need to take ea course on compsci, but I didn't even finish a lot of prerequisite math stuff so I should do that too.
I'm practicing a 1000 point algorithm problem on the topcoder.com arena.
The problem is as follows:
You work for an electric company, and the power goes out in a rather large apartment complex with a lot of irate tenants. You isolate the problem to a network of sewers underneath the compl...
I have workbook having multiple sheets and having same data on it. Currently I am using macro that .autofilterand copy paste on respective sheets. I am using looping process like:-
Sub SCRIPT()
Application.ScreenUpdating = False
Sheets("SCRIPT").Range("A3:P100").ClearContents
Dim ...
JavaScript is one of the most popular technologies at the moment. It's modern, runs on every browser (more or less) and can do pretty much anything.
One of the things JavaScript does quite well is Unicode support. If you want to return ϝ (lowercase digamma, not a simple f), you simply tell it to...
@dandan78: but won't code review generate a lot of stuff along the lines of "don't write 32767 as a magic number", which while true is completely irrelevant to the question? — Steve Jessop34 secs ago
In mine opinion you should never hide any questions/answers or comments from other people.
But what could be interesting is a specific highlighting for the question/answer/comment.
This has the advantage that you could still see everything but if a comment of your "ignore" list is set you know ...
Meta meta-Meta
For a post that was intended primarily to address one of the concerns raised (repeatedly) in the previous discussion, this sure has kicked up a lot of dust. I got to talking with a few people in chat earlier, and they... Kinda seemed surprised by a few things that I thought were o...
The year is 2018…
… and the economy is in a slump. Pundits on CNN are attributing the decline to a lack of growth in the computing sector. According to the Alyssa P. Bitdiddle, senior analyst with the Society of Innovative Computer Programmers,
This has been a disaster in the making since ...
On the chat prototype... Let's just say there are several bugs which make the experience difficult. The box where you type text is sometimes visible and sometimes not... Necessary features are hidden and unclickable behind a big Search bar (whose Cancel button is also unclickable) and it only works in portrait orientation AFAICT
For some values of "works"
And there doesn't appear to be a way for me to opt out and go back to the old model which was ugly but at least worked
I have built a light version of a battle ships program and would love for anyone to critique it. The game does not feature OOP, AI nor multiple boards. I aimed more for functionality than correct variable names and other related things just to get it working temporarily so sorry if some things ar...
Am I contributing properly to this IRC bot project? The original project was written 3 years ago with minimal functionalities.
I started out trying to add testing to the application, but so far what I have been doing is basically refactoring the whole thing and adding more functionalities to it....
In the past few days i have started to learn python 3 in my spare time and i am really enjoying it so far.
I have attempted many simple programs such as a palindrome checker and reverse a string in an attempt to improve my skills.
I was hoping that someone would be able to provide some feedback...
Why are there no robot assassins in this story? I was told there'd be robot assassins. What kind of half-rate dystopia doesn't have robot assassins? Are you gonna tell me that all the killer robot companies got sued out of existence and the future will have no roving killbots at all?! — Shog9 ♦15 hours ago
I have not included any code because I want to review the structuring "my project" not some snippet.How would I ever post code for something like that? Why is StackExchange always a pain to use? — Ace Takwas5 mins ago
@AceTakwas The code is the structure. As to posting all your code, we have a character limit of up to 64,000 for a reason (though you would be wise to look at some other large questions for some guidance on structuring a large question) — Zak1 min ago
@AceTakwas Unfortunately, we only review sections of code and not "the structuring of my project". Please feel free to add a complete, non-hypothetical segment of your code from your project in your question and we'll review it - but otherwise this question is off-topic. — Dan Pantry9 secs ago
I'm currently working on a webapp where we often need to condition some server logic based on the page that is going to be returned to the user.
For each page, we have a 4-letter page code associated with it, and these page codes are currently listed in a class as static Strings:
public class P...
That's a pretty big switch statement @Mast have you considered using a data structure? Some kind of map/dictionary or whatever JavaScript has to do this
@Phrancis That's probably a better idea, but this is as big as the switch gets. If I ever extend it, it will probably get another switch for the tens, hundreds, etc.
IMO this is as straight-forward as it gets. There are probably better ways to do this.
This is just not how the garbage collector works, it collects when it has to, not because the user closed the window. Two jiggabytes per window, that's the kind of excess that ought to deserve a good code review. — Hans Passant59 secs ago
Code Review? This way please. And then you post there, please don't just dump your code into the question. Format it correctly and tell them what this code is supposed to do. What input it might expects and what output it should give. — Tomjust now
Given the problem with licensing and the variety of sites on the SE network, why don't you allow each site to license content in the way that is most appropriate for them? For example, Code Review could continue with the current license, while a religious or language site could use a license app...
TLDR: This is a follow-up to our initial proposal for transitioning to a more user-friendly code license. The purpose of this post is to address the concern expressed most frequently in response to the initial proposal: no attribution requirement. Also, we want to make sure everyone has ample ...
> We understand that some users feel the new terms are not a perfect fit for certain sites, but we think fragmenting the license across the network will lead to ambiguity – the exact problem we’re trying to solve by updating the terms.
Such as where they are hosted and the legal team for each site
It would also be quite bad form to give each site legal autonomy otherwise each of those sites could end up promoting things that SO is quite against. For example, antiabortionists.SE wouldn't go down very well for SO's public image.