Well, if his question is about optimisation, then i don't think the part about it "working on a cluster" as he puts it is relevant and is just making potential reviewers think the code is broken
Should definitely mention he wants to run it on a cluster and has run it on a local one, but asking if it will work on a cluster makes it sound bad
@Edward I was thinking of wrapping a reference to the container in a class that provides a custom iterator that simply skips elements that don't return true for Predicate. I specifically want to avoid copying.
I think I'll implement it later and submit it for code review.
We've just gotten the July 2016 Community Challenge going, so it's time to pick one for August.
It's time to choose a community-challenge for August 2016.
Post your challenge as an answer to this question. Feel free to resubmit non-winning ideas from previous months.
Vote for those answers w...
@Edward It could work, but I'm not sure it would be the most optimal solution until I try it. Hopefully you can review my implementation once I get around to it. I'll post it tomorrow... got a flight to catch soon.
Where should I put my mirror?
code-golf string palindrome
This is a mirror: |. I just found out that you can stick a mirror in the middle of a string if the string can be mirrored on itself! For example, the string abccba. If you cut it in half the two halves are mirror images of each other:
...
I have implemented to following generic factory in C++11 using smart_pointers and I would like to get some feedback about it.
class FooFactory {
public:
enum FooAlgorithm {UAR, BAR};
std::unique_ptr<Foo> getFoo(FooAlgorithm sa) {
if (d_FooMap.find(sa) == d_FooMap.end()) {
...
Hello I'm a newbie to StackExchange, exciting to be here. I recently wrote some code that was dinged on not having well defined tests and poor modularity. Was hoping someone could review my code and give me pointers on how to create more well-defined tests (Which is where I might be the weakest) ...
I have these 3 different algorithms for computing binomial coefficients (I also had the 4th recursive one, yet I discarded it since it is super slow). The first uses the factorial formula, the second optimizes it a bit, and the last is a dynamic programming algorithm that maintains a Pascal's tri...
Anonymizing code is fine, just not with foobar identifiers. Please keep it to something that at least looks like it could be real actual code. Note that reviewers are free to comment on any/all aspects of the code, including comments and naming. — Mat's Mug ♦5 secs ago
I have the following code to serialize my reports:
[XmlRoot(Namespace = "", IsNullable = false)]
public partial class ReportSpecification{
/// <remarks/>
[XmlElementAttribute("Reports")]
public ReportsHolder Reports { get; set; }
/// <remarks/>
[XmlAttributeAttribute()]
...
Darn, I won't have time. If anyone wants to review him, make sure you mention that using template specialization can remove all those if...else checks and to switch at compile time instead of run time.
nah, it's just.. it covers C# in depth - it assumes somewhere between beginner and intermediate knowledge of the .net framework. the book is basically a walk through C# history, starting with 1.0
if you know nothing of .net, you're probably better off with something else
but I can't recommend anything, ....I learned from a 3-inch thick brick book
This algorithm, which I have included its flowchart as well, takes an array of A[n] which is unsorted and unmutatable and an array of B[k] which is sorted and includes n zeroes and then merges, and sorts them together. The entire code in Python and C# can be found here but as per rules I'm going ...
i have 2 tables one is passengers and second is driver but am confuse how to make one login page for both users, i can not write stored procedure of login for both tables.
ALTER PROC [dbo].[SP_SELECT_Login1]
@Email As varchar(50),
@Password As varchar(50)
As
BEGIN
SELECT Reg_id,Fname from reg...
Welcome to Code Review. Please don't hesitate do include all the code you would like reviewed in the question, our character limit for posts is really large (65K characters or so). It may also be better to not include code from 2 completely different languages unless it is implemented to work together; rather, ask 2 separate questions one for C# and one for Python. — Phrancis8 secs ago
public static class ArrayConverter
{
public static uint BoolArrayToInt(bool[] bits)
{
if (bits.Length > 32) throw new ArgumentException("Can only fit 32 bits in a uint");
uint returns = 0;
for (int i = 0; i < bits.Length; i++)
...
If you want visits to your repo and contributors, post an ad on Stack Overflow. If you want your code peer reviewed, include the code you want peer reviewed in your post. It's perfectly fine to include a link to your repository, but that's for additional context - the code that's up for review is the code you're embedding in your post. — Mat's Mug ♦5 secs ago
It's 2016 now, and we've made some changes to the sidebar size (on top of... accidentally passing over 2H 2015). And with that all in play now, we're restarting our Free Vote-Based Advertising for Open Source Projects. We are clearing the leaderboards for the beginning of 2016. We are also instit...
Problem description:
The Merry Milk Makers company buys milk from farmers, packages it into
attractive 1- and 2-Unit bottles, and then sells that milk to grocery
stores so we can each start our day with delicious cereal and milk.
Since milk packaging is such a difficult business in w...
@Mat'sMug I'm starting to wonder if I shouldn't build all the logic/functional/database parts of my app and just do console input/output, and make the GUI later after all that works. The GUI seems to really take up a lot of time
Probably wouldn't take more than about a week to get all the functionality in place to where it's usable with console
Alright, OP improved that C#/Python question to include all the code, please show some CR love :)
Hello gyes i want your help in my project...
I want to create a simple MOBA game in Unity...
I have created login server base C# with sockets connected with mysql.
I have create game server base C# with sockets with different port from loginserver.
When client login and go to gameserver, i have c...
Here is a simple WPF converter method designed, where the object is a string, and the parameters are a string, which contain a set of comma separated values. The program return true if the list has the value in and false otherwise.
public object Convert(object value, Type targetType, object...
Welcome to CR! With (much) more information and details about exactly what you're accomplishing, reviewers could not only shred your converter code, but also recommend completely different approaches. What makes you think a converter is the best way to do what you're doing? — Mat's Mug ♦27 secs ago
This answer is an alternative to generics.
You could use a code generator to help speed things up by creating all the classes in one go. Create a blank 'TT' file, (You won't see it in the new item list, just type the extension in manually.) click OK on the warning dialog, and paste this into it...
@Mat'sMug I'm all ears, actually the previous version of this loop that I had didn't OOR at all, but I extracted a variable for a call to a value in a list that was repeated 3 times, and been OOR since
Rate Limit Rationale
Comments
Voting
10 comment flags/day (may increase to up to 100 flags/day)
30 comment upvotes or deletes/day
no minimum wait time between votes
Deleting (treated like voting)
no limit
Creating
Three comments per 30 seconds
Editing
comment can be edited every...
> 30 votes per day +10 for questions only (Q only votes can't be used after 25 votes cast on answers. Source) If you vote and undo your vote 30 times, your vote gets locked in.
Speaking of which, @Mast, are you OK with my review on your LED post? I read the post again some time after posting and I reallized I didn't address docstrings, do you need an additional paragraph about that?
If your code works, and you're just looking to improve it, you should delete it here and post it on Code Review instead. This site is for questions about problems with code, and correctly working code clearly doesn't have a problem. If it does not work, and you actually have a problem with it, then please edit your question to make it clear what the problem is and what question you're asking. — Ken White52 secs ago
I thought my React app was alright, and then I checked the console and it turned out there was a wall of text explaining my failure to use react server properly ;-;
please is ist possible to remove tweets begining with RT when scraping for tweets?
import tweepy
import pandas as pd
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.max_colwidth', 5000)
import matplotlib.pyplot as plt
consumer_key = ""
c...