This is my attempt at writting a generic NSMapTable with weak keys and strong values (after your feedback I'll be trying to write Strong-Key/Weak-Value and Weak-Key/Weak-Value variants to have the complete functionality of NSMapTable with generics). To my knowledge it works correctly. Here's the ...
I'm new to C and I've been working on some code for a project for school. This was the finished result and now that I'm done it, I came back and tried making it better. So I was wondering, how would I make this printAvgCalPerGroup simplified?
#include "diary.h"
void printTotalCal(Food * list)
{...
Last time we created and reviewed Simon Says games, and that was a lot of fun.
So, what should we do this time? Feel free to resubmit non-winning ideas from previous rounds, although new ideas are usually more successful.
Post an answer to this question with your challenge
Vote for those answe...
I'm voting to close this question as off-topic because it is asking for what amounts to a code review. It may be a better fit for Code Review. — Tieson T.10 secs ago
Last time we created and reviewed Simon Says games, and that was a lot of fun.
So, what should we do this time? Feel free to resubmit non-winning ideas from previous rounds, although new ideas are usually more successful.
Post an answer to this question with your challenge
Vote for those answe...
I am trying to bridge the gap between the database context and routes that are stored in the database.
The factory is designed so that when used in other assemblies, you are forced to use the database context which is known to contain the DbSet which can provide the required data to populate the...
Re-Nominating this one, because I think it's a fun little challenge.
http://meta.codereview.stackexchange.com/a/3786/41243
Implement a simple calculator
Where the definition of "simple" is whatever you make it - only supports basic arithmetic operators? Fine. It supports scientific notatio...
I have just started learning coding and am trying to clean up a website that I am making. Everything is functional, but I imagine there is a better way write everything that is there, because a good chunk of it is repeated each time (the part with mouseover and mouseout) Is there a way to create ...
This is my code:
router.delete('/delete-:object', function(req, res) {
var query;
var id = req.body.id;
switch (req.params.object) {
case 'news' :
query = queries['news_delete'];
break;
case 'member' :
query = queries['member_delete'];
...
I'm taking part in this Daily Challenge on http://www.reddit.com/r/dailyprogrammer/comments/29zut0/772014_challenge_170_easy_blackjack_checker/
Basically, you have to develop a program that runs two blackjack players and outputs the winner, the user has no input on the player's choices - basical...
No one hacked my computer. The problem is, the Internet isn't just some big truck with a truck driver driving all the messages around. The Internet is a series of tubes. Sometimes tubes get clogged, and when tubes get clogged, messages some times bounce around in space and off the moon and continuously get sent. That's how it works.
Meme: TS | RSA
Originator: SimonAndréForsberg (TS), rolfl (RSA)
Cultural Height: star-power
Background: The 2nd Monitor is quite a star-happy chatroom. How many of you know that there's only a number of times you can "star" a chat post - a star cap (like the rep cap and the vote cap, a star ca...
This is my first post out here, so forgive me if something is not per the rules.
The problem in question is a coding challenge from Hackerrank
Problem Statement
You are given an integer N. Find the digits in this number that
exactly divide N (division that leaves 0 as remainder) and d...
Recently, as part of an interview, I was given a (seemingly) simple code prompt: To simulate a Bank with 5 customers and one teller, allowing them to deposit to and withdraw from their accounts, but with each customer on its own thread while only allowing one to access the teller at any given ti...
What is the correct process to flag a post for migration? I've used moderator flag before but some were marked as unhelpful and commented not to do that...
As Bradley noted, this question is not off-topic. It might be answerable on another site (although probably not Math), but that alone does not make a question off-topic either - there are lots of sites where certain programming questions are appropriate (when they overlap heavily with the main to...
Please chose 1 specific language to solve your problem. Additionally, if you have working code and want it critiqued, you may find better reception on Code Review. If your code is not working, please post errors — paqogomez1 min ago
> This question is off-topic here on SO, and is on-topic on Code Review. The code works, and meets the CR scope. Find me in the 2nd monitor if you have questions.
@rolfl Do you think I should ask on SO meta anyways? I have it practically all typed up, I can add that bit you suggested to see if that woks for them?
(the bulk of this answer is plagiarized borrowed from: What is migration and how does it work? - I have taken that and adapted it to focus on Code Review specific concerns)
Migrating to Code Review:
Background
General Constraints
Technical Constraints
Question Constraints
Answer Constraints
...
Code Review is becoming well-known on Stack Overflow.
The folks over on Code Review are happy about that.
The only problem is that there are a lot of questions redirected to CR which don't belong there.
So I want to ask that the users who direct askers to CR (or request migration of questions...
> Obviously, there are questions you’ll have to turn away, either because their only connection to your site is via the audience (“How do I make bread as a programmer?”), because it’s completely off-topic (“How do I cook a fish in a dishwasher?” obviously belongs on Cooking, not Home Improvement) or because they’re simply not useful or constructive.
> Along the same lines, don’t attempt to scavenge on-topic questions from other sites by asking the moderators there to migrate them to yours. Again, there’s no harm in leaving a comment suggesting that a question would be a better fit somewhere else. But focus on the questions that aren’t on-topic, or aren’t getting answered – snatching someone’s question (or answer) away without any forewarning is a slap in their face.
> And unlike deletion, there’s no community veto: once a post is migrated, the source is locked and the answers deleted – if the destination rejects it (by closing and deleting), it’s gone without the origin getting a chance to override it. It breaks the lifecycle.
This program is a payroll using calculate two types of employee. Two overloaded functions for two type of employee (hourly and salaried). There must be one pass-by-value, one pass-by-reference, and two pass-by-reference using pointer. All the variable must be local. There are 3 files of this proj...
This was not a good candidate for migration. It is on-topic at Stack Overflow, and migration is intended for off-topic questions.
Perhaps the most compelling reason—while this question would fit very nicely on Code Review, it isn't necessarily off-topic on Stack Overflow.
This is a perfect...
^^ There's the answer I was hoping to find!
So, I'm guessing it would make more sense, unless it's an obvious off-topic on SO and on-topic here, to actually comment letting the user know if they like they can delete it on SO and re-post it on CR?
using namespace std; - not a very good practice because namespaces can have functions and classes with the same names, which become ambiguous and can cause various problems: Why is using namespace std; considered bad practice.
You can clean your code up by adding more functions. Why don't you c...
Q: My code isn't compiling. What's wrong? A: You have a syntax error on line 47. It should be this. Comment: Okay great! Now it's compiling, but I've got an infinite loop.
You guys should pile upvotes on this answer: stackoverflow.com/a/29423606/2792531 (and not on mine) because his answer is way better even though the OP marked mine as accepted.
And I'm the only one that has upvoted that better answer.
Not sure if this is the site I should be posting to, but here it goes.
I am creating a class object which I wish to ensure that only numpy ndarrays are passed as input. The code so far:
class Points(np.ndarray):
'''ndarray required,info='array info',name='pnts'')
A points class which uti...
I’m working on a C# implementation of a tree class.
The tree will be used wherever I need to store data in a tree format. (Application Menu, File Infos etc.). Therefore the tree should support a lot of different use cases.
I think my implementation is ok… but I’m not sure. I never implemented a ...