« first day (1454 days earlier)      last day (2564 days later) » 

12:00 AM
RELOAD! There are 3787 unanswered questions (91.3495% answered)
 
@Mat'sMug lolwat
 
IKR
 
-3
Q: I am new to coding in C# want wanted some assistance with creating a program to do the following

swizzleI am trying to create a program that will draw a picture with ASCII characters and print it to the console after taking input for the size of the picture from the user.

-2
Q: programação em c, alocação dinâmica

Karo TardígradoEstou com problemas conceittuais no código abaixo. Será que eu poderia declarar todas as variváveis do programa em uma só função? #include<stdio.h> #include<stdlib.h> #include<locale.h> //Ler duas matrizes A e B, de duas dimensões, sendo a matriz A de 5X4 (5 linhas e 4 //colunas) e a matriz B...

 
12:19 AM
@CaptainObvious want wanted won't
a few hundred more like this and will show up under 's related tags
 
 
1 hour later…
1:27 AM
1
Q: PHP: Recoding Laravel's config system?

James AdolfI am trying to create a config class identickle to Laravel's but wanted to do it myself, to test my knowledge on the PHP language, can anyone help me improve it? Each config file is located in the /app path and can be named whatever you want .php. You can then get your config values by doing C...

 
 
1 hour later…
2:47 AM
0
Q: E-commerce site

bsayles12I'm new to node and trying to create a e-commerce site with user and admin features. My code includes all the needed elements, but I keep flipping from unexpected token to missing token errors. Nothing seems to change this. My code is: var express = require("express"); var _ = require("unders...

 
3:04 AM
1
Q: Python Algorithm mimicking mark/sweep garbage collection

user3776749I don't have much experience with python and would love some feedback on my implementation of this program. I am given a file with an integer representing a number of memory-cells, followed by a list of ordered pairs representing links between either a pointer and a memory-cell, or memory-cell a...

 
3:49 AM
0
Q: A JS Tree Viewer

Learn How To Be TransparentTo learn Vue.js I have made the tree viewer. Can anyone give me some advice on how to improve the code? <script src="https://unpkg.com/vue@2.2.6"></script> <div id="app"> <tree v-bind:nodes="nodes"></tree> </div> <style> .selected { font-weight: bold; } </style> <script> var selectedNode...

 
4:05 AM
Monking!
 
4:16 AM
@CaptainObvious Something about this question feels odd, though I can't quite put my finger on it...
 
0
Q: Public function that traverses through a tree

Sean Francis N. BallaisSo I have this function that lets one traverse through a tree without having to access the root node of the tree. /** * Moves to another node and returns it. Moves to * the root of the tree if the current node is a leaf. * * @param direction * Direction of the movement of the tree. The ...

 
4:48 AM
@CaptainObvious Stub code, plz close
 
0
Q: How to display row based on index number

Teton-CoderI have an object of arrays coming from the database. I display the raw content on the page of a scrapped doc. The user is able to click through the data that didn't scrap (so the user isn't actually scrolling through each row) and it is displayed in a table for the user to edit. I'm storing the p...

 
Dang there are lots of people here who play Factorio!
 
5:10 AM
According to my Fitbit, I walked 6,387 steps inside my dryer. https://twitter.com/EmilyGorcenski/status/857050751276863489
 
@Phrancis'DROPTABLEUsers-- Is 0.15 live? Haven't played it lately and wanted to start when it's stable/updated.
Monking
 
@Zeta I think it's in public beta
 
6:15 AM
-1
Q: Java code pvp Dice Game

user137459Wondering if anybody could help me, trying to make a player vs. player dice game in Java code based off an already existing game called Button Men. The game is very new to me but here are the rules of the game: http://cheapass.com//wp-content/uploads/2016/06/Button-Men-Rules.pdf

 
7:10 AM
0
Q: Command line blackjack

Seitroxthis is my first post here and also my first project that im doing. Im a c# beginner and this is my try at making a Command line Blackjack. Im aware that the Dealer logic is still far from done, but i wanted to post my code for review. I want to make the code as efficent as possible. Also I want...

 
7:23 AM
0
Q: How can I make this function better , which fetches data from sqlite?

Abhishek KulkarniI' m writing a small python script. Which needs to fetch live data from a database (i'm using sqlite3 for now). I may reuse this function for lot many scripts. Can this code be made better? def fetch_database(database, table, filter_dict, case=None): """ Takes filter parameter as a dict...

 
7:44 AM
0
Q: Split a long string using recursive function

VaibsI have executed a program which reads long string and divide the string on basis of specified input. Well I am getting the correct output but would try it to be more efficient and readable. Opinions and tactics are welcomed to make the code more better and fast. Problem Statement:: Need to split...

 
7:58 AM
0
Q: Evaluating RPG-formatted dice rolls with repeats in Clojure

lord_semborMy target was to write a function that takes a String as input, interprets it as a series of dice rolls, evaluates it and returns a series of integers. The input is in a form that is typical in table top RPGs, slightly extended: 1d20; d20; 20 - Roll a single twenty sided die, e.g. "12" 2d6 + 4...

1
Q: Simplifying the Byte Pair Encoding statistics update

alvasByte Pair Encoding is a multi-pass compression algorithm and at each pass it outputs a rule to merge two individual bytes (for details, see this and this). In this Python implementation from @rsennrich and with explicit comments from here, there's a dynamic programming part that updates the only...

 
8:22 AM
0
Q: Implements ActionListener to class

John Joepublic class ItemToPurchase implements ActionListener { public static void main(String[] args) { ItemToPurchase gui = new ItemToPurchase(); gui.go(); } public void go() { JFrame frame = new JFrame(); JButton button = new JButton("Click m...

 
8:38 AM
@CaptainObvious Not their code
 
9:34 AM
0
Q: 2Captcha API wrapper

MikeSo I've created an API wrapper for 2captcha in c# and I wonder what I can do do improve the code, make it cleaner? Code: using System; using System.IO; using System.Net; using System.Text; using System.Threading; namespace API2Captcha { public class TwoCaptchaApi { string key =...

 
9:47 AM
0
Q: This was a company's interview project. Spring Cloud. It failed, I wonder what I did wrong

user2485309Because to me, it is not great but it shows I can learn those platforms. It uses config-server, zuul, eureka, hystrix with feign. If someone can help me out, I'd be very grateful. Specs: code: https://bitbucket.org/esinecanvisuallogic/publisher-watermarker

 
10:01 AM
Monking
 
10:17 AM
I don't know if it's important, but I've changed my username from Dex' ter to MrGrj. Still a monkey though @(^-^)@
7
And monking !
 
11:08 AM
Monking
For the git experts here.. let's say I'm doing a rebase of branch postgres onto branch master (they both shared a history at some point but master has moved forward)
postgres has a file on it that it has made changes to, but master deleted that file, so obviously we get a merge conflict
Is there an easy way to see what the file was before its most recent change on the postgres branch (and before it was deleted in master)?
Because when I do git diffI obviously see a diff of the entire file being added, which is not very helpful :D
 
@DanPantry If you know the commit the file was deleted in you can do git diff postgres <commit hash>
Oh wait, I'm not testing on different branches, :/
 
ah, but then I'd have to find the commit hash
Which is the other problem
How on earth do I work out the commit on postgres that I am resolving a merge conflict for :(
(While rebasing)
in this scenario I am replaying commits from postgres on top of master
rebase is black magic
 
I've never really rebased, ): I'm quite a noob to git... VS normally tells me the commit hash, but I think you can use gitk too
But IDK if it'd work with what you're doing
 
yeah gitk just shows me that the changes i have are changes that are uncommitted
rather than the original commit
which is annoying
 
11:23 AM
@DanPantry Use some form of Git GUI and use browse files at branch for that specific commit?
Might be a cheap workaround, but if it works :D
 
ALright, I fixed it
But damn, I'm glad I didn't have to do this a few months after doing the work initially
rebase early and often!
 
Wow, this one backfired for the OP
20
Q: How do I measure 10,000 A DC?

JuliaWhat is the standard way to measure a current of about 10,000 A? DC clamp meters seem to have only scales up to 2,000 A. Edit Some background of this question: I am a high school physics teacher and I am trying to improve some classical experiments using high currents from ultra-capacitor dis...

Surprisingly the comments are not reflected in the answers I believe
 
11:48 AM
0
Q: Generate XKCD passwords from single Bash line

forthrinThere are a few "XKCD password" generators out there, but the task seems so straight forward, so I wanted a compact and simple solution. My requirements were: One-line alias (or few-line function) to put in .profile Standard Unix commands (require no packages) Column output (like pwgen) Titleca...

 
12:02 PM
0
Q: Primefaces Datatable paginator doesn't responde to changes in page layout

BabaNewI am using Primefaces 4.0 Datatable with a paginator. The table lies right under a accordionPanel wich can expand or collapse, affecting de layout of the page. Unfortunately, the paginator of the datatable doesn't move when the accordion animation is performed. Before expanding the accordion: ...

 
12:22 PM
0
Q: iOS: Draw grid programatically with borders

dehlenSo I need to draw a grid with some special requirements. My current solution is working but is far away from ideal I guess. Attached you can find the current working solution: Some of my thoughts which led to the current solution: self.view.layer.border... is not working for me because I need...

0
Q: Builder pattern and dependency incection

Dr. FreI'm working with the unit of work pattern to glue together my application logic. To create such a unit of work object I use the builder pattern. But my unit of work classes need access to the service collection of the dependency injection container but as the builder pattern requires you to kno...

 
12:35 PM
0
Q: In Memory Caching Manager In Node.js

user746458I have written caching manager in node.js where cache is managed in memory , keeping memory constraint in check. We can provide expiration time for every cache key and backup callback in case key's value is flushed out and not available in cache. Can you please provide your feedback on the same? ...

 
12:55 PM
1
Q: Drawing pixel to pixel python 2.7

VeltroIm drawing a pixel by pixel image with the following code coord = np.where(np.all(imagen == (0, 0, 0), axis=-1)) cv2.imshow('imagen', imagen) a = coord[0] b = coord[1] for x,y in zip(a,b): rectObs.append(pygame.Rect((y,x),(1,1))) for rect in rectObs: pygame.draw.rect(screen, black, r...

 
1:52 PM
Cleared the screening for another company. More aptitude tests this afternoon.
I might get an interview with a company that is looking for people willing to learn Scala, Go, and Rust. I already sorta learned F#, which they are also interested in.
 
2:09 PM
Why did this have to happen...
My final was due yesterday, and I finished it yesterday, but I just submitted it because I thought it was due tomorrow...
My very last assignment, and the only late one in all of my BS...
 
0
Q: Connect 4. Need help to game to determine the winner

jstep32xi need help trying to tell the code to figure out how to check for a '4 in a row' and send a dialog message that says 'red wins'. please and thanks! import javax.swing.*; import javax.swing.event.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.util.Scanner; class ...

 
@Hosch250 Hopefully you can reason with them
 
It's my fault, so I won't even bother.
 
0
Q: SQL to list function - turning a table column into a delimited list string

iDevlopI wrote this very "general use" function, because I needed that in some reporting. I was windering if there is any suggetsion for improvement. Function sql2List(sSql As String, Optional quote As String, Optional separ As String = ", ") As String Static db As DAO.Database Dim rs As DAO.Re...

 
2:41 PM
@Hosch250 Explain the situation, even if you don't ask for special treatment.
 
0
Q: Implementation of logarithmic random distribution satisfying RandomNumberDistribution concept

WalterFollowing from this post on SO, I provide logarithmic_distribution to satisfy the C++ RandomNumberDistribution concept implementing the PDF p(x) = N*(m + k * log(x)) with a <= x <= b. Parameters are m, k, a, b, while N is a normalisation constant. Here is the header file // file logarithmic_d...

 
@rolfl So, I should send her an email apologizing for the late submission and explain I thought it was on Friday like the rest of the assignments?
OK.
On the brighter side, the company wants an in-person interview "sometime next week."
 
2:56 PM
@Hosch250 In my opinion pretty much that, otherwise you would show you don't care, and they in turn might not care too
 
OK.
Should I also mention it is the first late assignment I've had in all four years of my BS?
 
Not really sure if that's irrelevant, maybe someone else can weigh in
 
So, does this look good?
Dear Dr. McCoppin:

I just realized the deadline for my final paper was yesterday rather than tomorrow; I am sorry for inconveniencing you with a late submission.

I hope you have a good day.

Sincerely,
Abraham Hosch
 
comma instead of colon, but that aside, LGTM
 
Looks fine I suppose
 
3:03 PM
Sent.
I might get an A still.
Late work gets docked 10 points/day. I can lose up to 45 points on this paper, and I've only lost 5 points in the entire class.
She said it wasn't a big deal and offered to give me a couple more days if I needed more time. I told her I was submitting my final version when I saw the date.
 
You already got a reply?
 
Yup.
 
Cool
 
3:26 PM
0
Q: Optimize and reduce this lock-range code in Google Scripts/Sheets

Eight17I'm new to Google Scripts/Javascript and am hoping to get some feedback regarding how to optimize this code I wrote (minimize code/variables and reduce redundancy): function lockEdits(e) { // delcare initial col variable var colCheck = e.range.getLastColumn(); // exit function if the col...

0
Q: Deep copy linked list with a random pointer

user137486I had this as an interview question through phone. The input is a linked list and in addition to a next pointer there is a random pointer that can point to any node in the list. This my code below, which does the above but it has an obvious bug. I solved it in 28 mins with some test cases but mi...

 
0
Q: How meta community user has 5 reputation?

ArulkumarHow the meta community user has the 5 reputation in his profile. The main site community user is having 1 reputation. Since no reputation for meta site, it always shows the same reputation from the main site. Also in all other Stack Exchange sites the meta community user has 1 reputation only....

 
0
Q: A bag of numbers in C++ for constant time statistics queries - follow-up 2

coderodde(See the 2nd/previous iteration.) I essentially removed all the type conversion trickery and have this: numberbag.hpp #ifndef CODERODDE_STAT_NUMBER_BAG #define CODERODDE_STAT_NUMBER_BAG #include <cmath> #include <cstddef> #include <iostream> #include <initializer_list> namespace coderodde { ...

 
4:00 PM
@CaptainObvious seems broken. There is no method getNode() which takes only a single parameter
My week is ending now and I am happy about this. I have this week changed from VS 2010 Setup to Wix and had a hard time.
I guess I have installed our application 150 times until everything works like expected.
 
@Heslacher I haven't heard very nice stories about Wix from colleagues
 
If its working its a nice to have. But until it is working its a nightmare
 
0
Q: Don't Update Every AI Every Tick

bazolaIn my game there are AI characters that try to either steal your gold or destroy the walls of your castle. Previously I simply updated them all every second, but with a large number of characters on the map there were some noticeable frame skips. This code spreads out the updating of the AIs so...

 
posted on April 27, 2017 by CommitStrip

 
@CommitStrip lol
 
4:40 PM
0
Q: "Query" builder for ACF WordPress plugin

samrapAs a back end developer, working with WordPress can be frustrating. From a best practices standpoint, we all know WP development is far from it. I tried my best to take a modern approach to make working with the Advanced Custom Fields plugin feel like using a modern query builder. I would appre...

0
Q: Implementation of Non-Generic Stack in Java

Sharath VI'm starting out to work on DS in Java for the first time and thought that some inputs will get me going to more data structures. I implemented a stack which is non-generic. I followed some of the posts and realized that the top pointer should not be at -1. I know this is a very basic implementat...

 
4:57 PM
Greetings, Programs.
Coming to you live from my new work computer.
 
Welcome back @Donald.McLean
@rolfl Yuck. I've seen practices like that for C in embedded environments, but pulling tricks like that in C++ is plain stupid.
@Heslacher It's broken, as admitted to by the author. It's also UWYA. Request for close votes.
 
@Donald.McLean Greetings from my "old" desktop
 
5:12 PM
@skiwi It isn't a desktop, since I use it for telework.
 
Ah ^^ Okay
 
5:28 PM
Is the following question really on-topic here?
1
Q: Drawing in libgdx

The Coding WombatI have made a Java clone of the popular 2048 game. It works, but I drew the UI in the correct way. Images so you know what we're discussing: I'm basically not sure how to do this, whether I should use Skin, Sprite, Actors like Button and Label, or simply draw textures to the screen. For the ...

It kind of feels like the OP has tried a few variants of how to do stuff in libgdx, and are asking us for advice on how to use the libgdx library in the best possible manner.
Even though the code might compile, and as such is not broken, it still feels like example code and not real production code. I'm wondering if it hadn't been better served on Stack Overflow.
 
0
Q: Sokoban solution rotator in PERL

aschultzThis is a project I always meant to do, but now that I've done it, I am wondering if/how I can do it better. I've made some fixes but I sense there must be more. It came about because I played several Sokoban games and wrote solutions only to notice that many levels were rotations of others, so ...

 
Hmm... Haven't played sokoban for a while...
Haven't seen perl code for a while either... It doesn't look nice...
 
@CaptainObvious Is it just me or did the prettifyer die somewhere through the posted code?
 
5:45 PM
@Peilonrayz i wonder if their code has any open blocks that would fool the colorizer
either that or it's Perl isn't very good lol
 
@ThomasWard starts with // ends with /, probably thinks it's a massive regex or something.
 
@Peilonrayz makes sense. I've seen such evils in code highlighters. Though, this is why I like IDEs :P
maybe we need to file a code highlighter bug on Meta lol
 
Maybe, might be better to do it with the actual prettifier, but I can't remember what that is...
 
Something like they refernence here: meta.stackexchange.com/questions/22186/…
 
@Peilonrayz google-prettify? not sure though
 
5:54 PM
@skiwi Yeah, I think it's that, got an MVCE as well
 
1
Q: parse string into list based on input list

sangbe1192I would like to write a function to parse a string based on the input. The following function works but is there a better way to do it? def func(oStr, s_s): if not oStr: return s_s elif '' in s_s: return [oStr] else: for x in s_s: st = oStr.find(x)...

0
Q: Make the lodash _.forOwnRight recursive

elpHi have this json object: { "$or": [{ "$and": [ { "48a027a20e.value": { "$eq": null } } ] }, { "$and": [ { "62b935f83.value": { "$in": [] ...

 
@Peilonrayz It doesn't help to use <!-- language: lang-perl --> or similar constructs... Is it even legal to do the split(//, ... )?
And split(//, ...) is indeed legal... Strange...
 
@holroy May be off-topic, I'd check with the guy
 
The OP has put a bounty on it, so most likely they think it's on-topic. That is why I'm asking for your opinion. To me it kind of feels off-topic...
 
I think it's a breakage then.
 
6:00 PM
@holroy If the code works it's off-topic, if it's bad then it's defiantly on-topic
 
@Peilonrayz What?! Please explain your reasoning
If it works, it's off-topic?
 
Oops, that's meant to be on, xD
I may be a little tired
 
And I don't think all working code are on-topic, it's not as easy as that. Did you see yesterdays discussion on the C++ question.
 
possible answer invalidation by user3776749 on question by user3776749: codereview.stackexchange.com/posts/161908/revisions
 
@holroy It doesn't have the same ring, "working code is normally on-topic, unless they've broken some other rule, to make it off-topic, if it's bad then it's definitely on-topic".
Also it seems the Perl bug is already known
 
6:09 PM
@Duga added updated code. Don't remember which meta answer to refer to...
 
@Duga Handled
@holroy You may be interested in this meta answer :)
 
6:27 PM
Hmm... I've got some of those, but not all... Where can one add the remote link stuff?!
Found the remote, now on to getting it to work
 
6:45 PM
0
Q: WebPage runs locally but fails on GitHub, and on CodePen

DjokesterThis is a WeatherApp that pulls data off the OpenWeatherMap API, and displays a selected few results. I ran the code locally on my system, before uploading it in a GitHub repository to test it out as a page. Shockingly, I found that the code doesn't work as a GitHub page or on CodePen. Any reason...

 
7:00 PM
possible answer invalidation by Peter Mortensen on question by Abhishek Kulkarni: codereview.stackexchange.com/posts/161919/revisions
 
1
Q: Performance problem with Angular and rendering a grid

HeathcliffI have a big problem with performance with a web application using AngularJS. I currently have a grid that renders an array of objects. It looks something like this. <table data-md-table data-md-row-select="!hideCheckboxes" data-ng-model="row.selected" md-progress="promise" class=...

 
7:22 PM
0
Q: Deep copy linked list with a random pointer

user137486I had this as an interview question through phone through an online text editor. The input is a linked list and in addition to a next pointer there is a random pointer that can point to any node in the list. Create a deep copy of the linked list and return the head of the new copy. Thi...

0
Q: How to get the ball stationary and move with mouse

Chole FielderHow can I get my bouncing ball code in JavaScript to become stationary and then move in the direction of my mouse when clicked? <script type="text/javascript"> var context; var dx= 4; var dy=4; var y=150; var x=10; function draw(){ co...

1
Q: How to better structure for loop or is there a faster approach?

JBaldwinI am looping through content coming from the database using an ajax call. Then I'm building a table using a for loop. Is there a faster way to build the table using the data from the database or is this way efficient enough? var getPages = '<table><thead><tr><th>Page Num</th><th>Type</th><...

 
8:14 PM
0
Q: Using Templates to add virtual tables to non-virtual classes

Rafael BaptistaSo I have these classes that are meant to be low level and fast. I don't want them to generally be virtual - rather I want the functions to be inline. In this case they are mutex implementations: class MutexOne { public: void lock () { /* implementation inline */ } bool tryLock ...

 
8:52 PM
0
Q: Python algorithm mimicking mark/sweep garbage collection 2.0

user3776749Here I have incorporated the excellent feedback from this question to improve a small program that simulates a Mark/Sweep G.C. Algorithm. The code overall is much cleaner and the functionality is improved. Specifically I moved inline comments to a larger Documentation Block at the top of each fu...

0
Q: Command Pattern implementations in Java - Fluent Interface or Results return

Martin SpamerI would like your thoughts on the relative merits of the following two approaches to implementing the Command Pattern. The first approach is having Commands return this as a FluentInterface vs having the Commands returning an instance of a Results object. Command with a Fluent Interface public...

 
9:30 PM
0
Q: Any way to optimize this function for recursively listing files in python

TrelI'm a complete amateur at python. Other than hello world programs, this is the first thing I've ever done in Python. I cannot find a good way to make os.walk function the way I want it to so I worked on my own function for it. I'm curious which would be the best way to do something. def atDir...

 
9:43 PM
0
Q: The user enters fixed monthly investment, yearly interest rate, and number of years invested

user3349639mind helping me? For this program, the user enters fixed monthly investment, yearly interest rate, and number of years invested. The program then calculates and displays the future value. I'm trying to write a method, but my output is not displaying correctly. Language = Java import java.u...

 
@holroy You can always add to them if you feel there's an important one missing.
 
10:17 PM
0
Q: ActiveObjects repository with partial update

JakobActiveObjects is a ORM similar to ActiveObject. This is a repository for it to be reused within my application. I would like advise on: Naming of the CreatePeriodConfiguration and UpdatePeriodConfiguration, do you have better ideas? I don't like verbs in class/interface names. Do you think Cre...

0
Q: Rust: Sieve of Eratosthenes

snakeandroosterA first attempt to implement the Sieve of Eratosthenes to find all the prime numbers from 2 up to a given number. #![feature(inclusive_range_syntax)] pub fn primes_up_to(limit: u64) -> Vec<u64> { let mut vec: Vec<u64> = (2...limit).collect::<Vec<_>>(); for p in 2...limit { vec....

 
10:43 PM
0
Q: How can I change this function to create an array of arrays and not an object of arrays

Teton-CoderI'm still a newb with PHP and I'm not sure how I can change this existing code. I don't want to store the arrays in an object. I want the arrays to go in one array that way I can then sort the arrays. This way when I create a table with the data each row will have the correct data in the row. //...

 

« first day (1454 days earlier)      last day (2564 days later) »