Code Review Weekly Newsletter
Code Review Weekly Newsletter

Top new questions this week:

Accurate email syntax validation (no seriously)

So a friend happened to show me how odd and specific the general email syntax rules are. For instance, emails can have "comments". Basically you can put characters in parentheses that are just ...

python python-2.7 validation email  
asked by SuperBiasedMan 34 votes
answered by rhino 21 votes

Checking whether a number is a power of 10

Is there a better way to check whether a number is a power of 10? This is what I've implemented: public class PowersOfTen { public static boolean isPowerOfTen(long input) { if ...

java  
asked by jcm 15 votes
answered by Mark Reed 32 votes

Sudoku solution without the use of classes

A Sudoku puzzle is a 9 × 9 grid with some numbers between 1 and 9 in it, that has to be filled in so that every row, every column, and each of the nine 3 × 3 blocks contain ...

c++ homework sudoku  
asked by JnxF 13 votes
answered by Edward 16 votes

Counting numbers with specific digits

The challenge: Suppose you are inhabitant of a planet where 1, 7, and 9 are lucky digits. A lucky number for you is a number that contains only your lucky digits in it. For ex: 1, 79, 911, 9917 ...

c time-limit-exceeded  
asked by Sandeep GV 13 votes
answered by Pimgd 14 votes

Simple string inverter program

I am currently studying c programming, but I'm at a very basic level. So for practice I made a program that reads a string and inverts it. I want to know if the code is readable and how I can improve ...

beginner c strings  
asked by Lúcio Cardoso 11 votes
answered by LastSecondsToLive 9 votes

A convenient wrapper for Telegram Bot library

I'm working on several projects involving Telegram bots and I've decided to make a library that meets my needs. Basically, there is already a Python library for Telegram bots (import telegram in my ...

python python-3.x  
asked by Highstaker 9 votes
answered by Gareth Rees 2 votes

Replace spaces with '%20'

This is my attempted solution to Question 1.3 from "Cracking the Code Interview", 6th ed. Question: Write a method to replace all spaces in a string with '%20'. You may assume that the string has ...

beginner c strings  
asked by user95657 8 votes
answered by 200_success 5 votes

Greatest hits from previous weeks:

Generate random numbers without repetitions

I want to generate a list of N different random numbers: public static List<int> GetRandomNumbers(int count) { List<int> randomNumbers = new List<int>(); for (int i=0; ...

c# random  
asked by Kao 54 votes
answered by rolfl 57 votes

Assigning value to cells with Excel VBA

I have an Excel Worksheet consisting of two columns, one of which is filled with strings and the other of which is empty. I would like to use VBA to assign the value of the cells in the empty column ...

loop vba excel  
asked by user50726 10 votes
answered by RubberDuck 7 votes

Can you answer these?

Web Scrape, and Save To SQLite DB

Now I am pretty crappy at software architecture. I think I was able to make this relatively concise. Please, any input is helpful! var cheerio = require("cheerio"), request = ...

javascript beginner  
asked by user95602 2 votes

A clean way to do CRUD with pagination

What do you think about the following approach to CRUD? Here is the reading+pagination example. DTO types have Dto* prefix, EF Entity Types have E* prefix. DAL example: class UserQuery : PagingQuery ...

c# pagination crud  
asked by Dmitry Nogin 2 votes

C# Extension Properties

I am doing some math - combining, reusing, extending different analyses methods over the same original data set. It would be reasonable to use C# extension methods in my case instead of defining ...

c# extension-methods  
asked by Dmitry Nogin 3 votes
Subscribe to more Stack Exchange newsletters


Unsubscribe from this newsletter or change your email preferences by visiting your subscriptions page on stackexchange.com.

Questions? Comments? Let us know on our feedback site. If you no longer want to receive mail from Stack Exchange, unsubscribe from all stackexchange.com emails.

Stack Exchange, Inc. 110 William St, 28th Floor, NY NY 10038 <3