« first day (1044 days earlier)      last day (2967 days later) » 

12:00 AM
RELOAD! There are 1969 unanswered questions (93.9106% answered)
 
12:29 AM
0
Q: Finding a Cartesian product of multiple lists in C#

Gediminas MasaitisI came up with an algorithm to find a Cartesian product of multiple IEnumerable sets. I was able to achieve lazy enumeration via yield return, but I didn't think of a way to do it non-recursively. The result ended up being a recursive lazy enumeration iterator method, the first of it's kind. At l...

 
 
1 hour later…
1:46 AM
0
Q: Custom OrderedLinkedList class with nested OrderedListNode class

IRGeekSauceEverything works with this program. It takes both Strings and ints, however, I feel like my add method is simply too verbose. Does anyone believe I can implement a shorter version of this, or is it good as is? Note: Nothing can be changed in any of the method signatures or parameters. The only ...

 
2:23 AM
> You can make it idiot-proof, but someone will always build a better idiot.
9
Q: English equivalent Polish saying "Dumb people are not sown, they're born"

ColonderI often wonder if there is any similar English idiom to Polish saying "Głupich nie sieją, sami się rodzą" literally meaning "Dumb people are not sown, they're born." Short explanation: This saying is similar in meaning to There are always dumb people and you can't do anything about it, you mus...

 
0
Q: Josephus permutation - follow up

MAGFollow up of this question Changes: 1.The pop_min function now panics if the tree is empty. 2.Moved the size attribute to the tree struct. 3.Applied most of the suggestions given by the answers. 4.Added some other functions. 5.Refactored some functions. 6.Moved everything to the same file....

 
2:53 AM
0
Q: Can someone check my HTML Code?

Derek EdwardsThis is my first ever code and I know its not perfect but I would love for someone with a lot more experience and let me know of my mishaps and let me know what I need to work on. I would really appreciate it! <!DOCTYPE HTML> <html> <head> <link type="text/css" rel="stylesheet" href="dereke...

 
Hello, and welcome to the 2nd Monitor, @NicolasRaoul.
 
Ask on codereview. I'm deleting this answer. — Stephen C 57 secs ago
 
4:51 AM
0
Q: PHP detect group members

0zerocool0Please tell me where my errors are/how to achieve my goal. I am trying to find all users with group "group". Code: <?php $group1 = mysql_query("SELECT * FROM `users` WHERE `group` = 'group'"); $group2[] = mysql_fetch_array($group1); ?> <select><option><?php echo $group[//what do I do here ...

 
5:10 AM
0
Q: Node.js, Angular 2, and PassportJS Seed Application

Dom FarolinoI wrote a seed application to help developers get started using Node.js, Angular 2, Polymer web components, and PassportJS to form a basic OAuth user driven login site with Angular 2. The demo site can be viewed here The code repository is public on GitHub here and I am really just looking for fe...

0
Q: Is this an efficient method to copy one list to another?

Amoli am copying one ArrayList into another using the iterator below is the code for that ArrayList<Integer> a = new ArrayList<>(); for(int i=1;i<=10;i++) a.add(i); Iterator itr = a.iterator(); for(int x : a){ a2.add(x); } this method works well but is ther...

 
 
1 hour later…
6:19 AM
Working Code. Why not try Code Review? — Mathews Mathai 39 secs ago
 
6:50 AM
in Tavern on the Meta on Meta Stack Exchange Chat, 15 hours ago, by Jason C
ability to downvote your own question out of shame
 
 
1 hour later…
8:02 AM
Thank you for the comment. Is asking how to refactor too vague? I am fairly new to SO. Also, do I do a completely new post to codereview? — iCodeYouCodeWeAllCode 10 secs ago
Yes, you create a new post for codereview. Please read their guidelines before posting because they require certain things in the question (like a description of the purpose of the code). As for your "refactor", to me that just means a reorganization of the code. What is more meaningful is a "refactor to accomplish some specific objective" which needs to be described in order to know what the goal of the refactor is. — jfriend00 54 secs ago
 
0
Q: while loop not working! it wont run

karla#include <iostream> #include<string> using namespace std; int main() { string username="123456"; string password; int inputpassword; for(int isAttempt = 0; isAttempt <=3; isAttempt++) { cout<<"Username:"<<endl; cin>>username; cout<<"Password:"<<endl; cin>>password; if(username !=...

 
8:38 AM
0
Q: Webpack code splitting with emphasis on small size

FredyCI am using Webpack to create sort of loading sequence of the application. This is approach I came up with. I can simply call prepareInfosite().render() and I don't need to care about hidden async nature of it. export function prepareInfosite() { return setupRenderer((resolve) => { re...

 
9:00 AM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Four jQuery date time pickers
 
 
1 hour later…
10:18 AM
0
Q: Bashscript - Find and run main.py file (part of vim-Python IDE)

TheCommoner282I try to get into Python and thought I build together my own IDE. Most of it consists of different addons for vim and changes in the vimrc (which of course I simply copied of google), but I also needed a way of executing the main.py file, even when I am working on some other file of the same proj...

0
Q: This function replaces some XML tag values. The tags appear in the XML excactly once.I want to know if this can be done in a better way

Mohima Chaudhurisub editConnConfig{ my ($DOMAIN,$rscDir,$walletDir,$DEFAULTPORT)=@_; `perl -pi -e 's!<trustStore>.*?</trustStore>!<trustStore>$walletDir/fctrust.jks</trustStore>!sg' "$rscDir/ConnectionConfig.xml" 2>&1`; `perl -pi -e 's!<keyStore>.*?</keyStore>!<keyStore>$walletDir/fckey.jks</keyStore>!sg' "$rscD...

 
10:36 AM
Also, if you want feedback on your code, post on Code Review SEOrangeFlash81 18 secs ago
What is the question? Code review? — Ivan Starostin 49 secs ago
 
11:00 AM
0
Q: Declare variable to hold the result before checking the status

tribetFor some reason declaring "ApiResult" before checking if the answer is in a correct status doesn't look good. I wonder if there is any better way to check the status and return the result: public async Task<ApiResult> GetCustomersByOutcode(string outcode) { using (var client = ne...

 
11:43 AM
Monking
 
0
Q: JUnit @Rule ExpectedException

bradleykinsI have been trying to use the JUnit expected Exception to validate my own exceptions for an application, however whenever i try to use this the compiler complains that there is an uncaught exception. @Rule public ExpectedException invalidInputException1= ExpectedException.none(); @Test (expected...

 
12:27 PM
0
Q: Selection sort algotithm

demasI am just trying to use Go so I will be thankful for all remarks and corrections: package main import "fmt" func selectionSort(a []int) []int { for i := 0; i < len(a); i++ { min := i for j:= i + 1; j < len(a); j++ { if a[j] < a[min] { min = j;...

 
12:57 PM
0
Q: C# Pass several classes as one parameter

denisI have 2 classes that hold some info about the user. One holds the data, the other one holds the controls info. Now i need to pass both of them as a parameters to a method. However they are connected to one another and i dont think that passing the 2 classes separately as parameters is okay. I wo...

 
1:31 PM
0
Q: Find all instances of a given weekday in February for a given year

rhinoA friend of mine was practicing his programming skills with a textbook meant to prepare students for computer science exams. He asked for help with a specific task. The task is to capture user input (day of week and a year in the range 1500 to 2005 inclusive), and output all instances of the wee...

0
Q: Show each three word using pointers

n096The user enters a string from the keyboard - a proposal with spaces and punctuation up to 100 characters. Show e three words. #include <iostream> #include <conio.h> using namespace std; char s[100]; int main() { char *ps = &s[0]; cout<<"\n Input the string: "; gets(s); for (...

0
Q: Vertical Text Printing (Java)

StardustI was trying one of the problems found on HP Codewars 2007: (2) Task Description: The CodeWars judges and scorekeepers need help printing the team names above each column on our score sheet. But we want them to look nice, so they need to be printed vertically. All we have to use is a list ...

0
Q: I am 12 years old. i am writing a java program and i cannot find a way to check the result

PRADYUMN SHUKLApackage game; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class main extends JFrame { private JButton button; private JButton button2; private JButton button3; private JButton button4; private JButton button5; private JButton button6; priv...

 
1:50 PM
Must be older than 15 on SE right?
 
2:09 PM
Because it would make the code review difficult. Is is easier to understand the changes in small steps than in a single large squashed commit. — Mifeet 9 secs ago
 
0
Q: How to make good performance this python with Beautiful Soup code?

mikezangI am using python3 with Beautiful Soup to scrape web site, I also used Thread to download images, but it will spend more than 30 minutes to get all information and download relevant images, how can I improve this code? is it possible? # -*- coding:utf-8 -*- import sys import os import urlli...

0
Q: Java Singleton design pattern

ganesh rCan someone explain how my Junit passed successfully with below singleton implementation Singleton class package com.r.patterns.design; public class EagerInitializations { private final String NAME="SINGELTON"; private static final EagerInitializations INSTANCE=CreateEagerInitializations(); ...

 
2:45 PM
possible answer invalidation by Jack Wilsdon on question by ganesh r: codereview.stackexchange.com/posts/122735/revisions
 
@JohanLarsson 13, I believe, and across the entire Internet.
 
What...
Must be old enough to know better than telling your age...
 
@nhgrif Congress made a law to protect minors privacy, or something.
 
3:00 PM
Congress is entirely incompetent when it comes to technology. How do you even enforce that?
 
3:11 PM
No idea.
Your parents have to create the account for you and pay a small amount of money to prove they are an adult if your age is younger than the limit.
Most companies will donate the fee to charity.
 
3:45 PM
No they don't...
Are websites making me enter my driver's license number or SSN?
No. They're asking me how old I am...
 
0
Q: Best Pratice to write Button.setOnClickListener in Android

geeksoulI am starting with android and I have seen couple of different approaches to set onClick event. First one is to set method name in XML itself <Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:onClick:"methodNameToInv...

0
Q: Assess my answer to MIT introduction to Java Assignment 7 (please!)

Cormackhttp://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-092-introduction-to-programming-in-java-january-iap-2010/assignments/MIT6_092IAP10_assn07.pdf Is anything in this answer bad practice or just bad? I'm using a lot of lists and for loops. Thanks! package magicSquares; publ...

 
4:14 PM
COPPA is what you two are talking about @Hosch250 @nhgrif
And yes, the issue lies with the enforcement, hence the saying
> Yes, I am 18, and I have been since I was 12
6
Although that may apply to some sites more than others
It was a bill with good intentions but ultimately ended up being a "Look everyone, we tried!" bill
 
@DanPantry Like almost every bill passed since about 1900.
Or maybe earlier.
 
Daily reminder that copy pasted code is evil
6
 
This question belongs to codereview.stackexchange.com, since you're facing no problems — danidee 27 secs ago
 
0
Q: Putting a matrix from a text file into a list

aolI'm trying to read a text file with matrix and put it in a list, but I am using two loops here and I want my function to be faster. def read_file(path_to_file): mylist=[] for eachLine in open(path_to_file,'rt'): mylist.append([int(eachRow) for eachRow in eachLine.split()]) re...

 
4:59 PM
-2
Q: Does this "Charge Account Validation" look accurate?

KevinConstant Integer SIZE = 18 Declare String account[SIZE] = "5658845", "4520125", "7895122", 8777541", "8451277", "1302850", "8080152", "4562555", "5552012", "5050552", "7825877", "1250255", "1005231", "6545231", "3852085", "7576651", "7881200", "4581002" Module ...

 
5:33 PM
I'm not sure what you're trying to accomplish, but if the answer below fixes your issue, then I won't waste your time with code fixes. There is a CodeReview Stackexchange for that — cricket_007 26 secs ago
@cricket_007 I'm trying to learn thats and thanks for the tip with CodeReview. Have a nice day! — Kira 30 secs ago
 
6:09 PM
0
Q: Designing in MongoDB

QuarktumI'm designing a simple "social network" with MongoDB. And I am wondering if what I did so far is OK or not, and some cons. The idea is, lets suppose: // User { id: "UserID1", name: "Username", cars: [ { id: "CarID1", brand: "Ford", model: "Focus" }, { id: "CarID2", brand: "Mitsubishi", mod...

 
If you code works, post to CodeReview.StackExchange.com. — Thomas Matthews 19 secs ago
 
6:35 PM
The question is pretty open-ended, I think it should be moved to: codereview.stackexchange.comutdemir 9 secs ago
 
6:48 PM
LOL at this Chuck Norris thing:
> Chuck Norris doesn't have a last will and testament because Chuck Norris doesn't fear death. Death fears Chuck Norris.
 
0
Q: Do CriteriaQuery code more readable and elegant

Eugene G. UstimenkoI wrote the code and would like to change it to more readable and elegant: @Repository public class ProductRepositoryImpl implements ProductCustomRepository { private static final int MORE_THEN_RESULT = 1; @PersistenceContext private EntityManager em; public List<Product> findByFilter(Filter ...

 
7:19 PM
0
Q: Lazy prime number generator

Gediminas MasaitisThere are multiple Project Euler problems (e.g. 7, 10) that deal with prime numbers. I decided make a reusable solution that could be used for most of them. I wrote a method to generate an infinite* prime number sequence, which would enumerate lazily, using yield return. At this point I can use ...

0
Q: C - Reading file into structure

LastSecondsToLiveAt the time I'm trying to read a quite big file into a C program for later user. The file size is in the range of 800 megabytes containing around 20 million lines of data of the following format: YYYYMMDD HHMMSSMMM,X.XXXXX0,X,XXXXX0,0 Y: Year, M: Month, D: Day, H: Hour, M: Minute, S: Second...

 
@Feenaboccles If your code compiles and it does what you want it to, then your question is for codereview not for StackOverflow. SO questions must contain an actual problem in their statement: e.g. runtime or compile time error, wrong output, crash etc. Things like "what's the best way to do this" and "how to improve the style/efficiency/robustness of this code" are off topic. — Bakuriu 47 secs ago
 
8:00 PM
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Piano Tiles-like-Game: Mouse LorMorR
 
8:26 PM
I'm voting to close this question as off-topic because it is asking for an improvement to working code. codereview.stackexchange.com might be a better place. — Daniel A. White 59 secs ago
 
8:42 PM
@PinCrash Congrats.
 
1
Q: Simple Hangman game in python

Joe KumarI recently started learning python, and made a simple text based Hangman game. I wanted to know if there could be anything done to make the code cleaner, or more efficient. Thanks! import random import os import sys def main(): pickword() def start(word, twoplayer): wordarray = '' ...

 
9:15 PM
-1
Q: Solve Caesar Cipher using Ruby

Sarah AbogabirI am new to the Ruby community and would like to advice/help. I have been stuck for so long on this question I need some serious help. I have to write a function to solve a Caesar Cipher. I must do it with a left shift of 1. I know the range is 97 to 122. I need some new perspective on how to ap...

 
@CaptainObvious CVs needed instead of downvotes ...
 
10:11 PM
0
Q: C# - Event delays?

Johny P.I am making a GUI for my C# Monogame project. So since this was the first time I ever made a GUI that is not winforms-based I took a wrong approach in making it and thus I decided to change it entirely. But now the behavior is not the same. Since I have some big classes I tried to cut what's rele...

0
Q: Multiple emails and attachments, reusing memory stream

JakeI am generating a pdf form based on user input from an MVC website form. The pdf is genrated using the Foxit .NET SDK, then attached to three separate emails, generated using Postal. It has been requested that the file not be saved to disk at any stage. I have not worked a lot with files or Memo...

0
Q: please see my seed.rb file

ROR learningI'm seeding my database with really complex code as I think. It works but not good. Here is my database - https://editor.ponyorm.com/user/nemolinero/Ask_Dima Constrains: Every meal has exactly ONE main dish (marked as is_main in intermediate table). Here is my seed.rb for left right of the DB. ...

 
 
1 hour later…
11:30 PM
0
Q: Code kata featuring: fetch, promises, Array.sort, Array.reduce, Array.map, String.localeCompare

Konrad DzwinelI just finished a kata and would love to get some constructive feedback regarding code quality, redability, organization. Objectives fetch members of polish parlament (poslowie) group them by occupation sort occupations by number of members and occupation name get top 5 entries print result on...

 
This question would be more suited for codereview.stackBankzilla 47 secs ago
 
11:48 PM
0
Q: Bootstrap site container width overflowing on mobile

jonmrichI'm not sure what's going on with my site...I've got it working perfectly on 'desktop', but can't for the life of me figure out what's going on with the width on mobile and how to fix it. The site is much wider than the actual view that it should be. https://dose.co/dtc I've tried removing ever...

 

« first day (1044 days earlier)      last day (2967 days later) »