« first day (1126 days earlier)      last day (3190 days later) » 

00:00
RELOAD! There are 2400 unanswered questions (93.0762% answered)
00:16
0
Q: search object literal and return first key/value pair that matches regex

DonatoThis does what I want: function test(data){ for(var key in data){ if(/_is$/.test(key)){ var obj = {} obj[key] = data[key]; return obj; } } } test( {a: 'a', user_id_is: '1', b: 'b'} ) > Object {user_id_is: "1"} But 8 lines of code for such ...

00:34
0
Q: Why the Rstudio keep running infinetely when running my codes?

user93892I am performing slice sampling in my codes, but when I run the following codes, the Rstudio runs and never stop. I am wondering where the problem lies in? dbinorm <- function(x, p1=.5, p2=1-p1, m1=-1, m2=2){p1 * dnorm(x, m1) + p2 * dnorm(x, m2)} set.seed(100) n<-1000 xdraw <- rep(NA,n) x1 <-...

00:53
Hey @aruisdante, thanks for the comment, it makes sense! And as you suggested I will move this post to another stack exchange site, but probably not codereview but programmers exchange :) thanks! — Joel Min 9 secs ago
@Duga gah, too late
01:34
0
Q: How to parallel for-loop in python?

Alec WangBelow is my code in python to solve the matrix factorization problem. W = XY. However, the codes below is not efficient, and I hope that it can be converted into parallel version, using GPU is the best, CPU is also fine. I am have no experience about parallel programming, so is there anybody can ...

I'm voting to close this question as off-topic because it is asking for code review. — Felix Kling 14 secs ago
02:37
there ya go @DanPantry... Tinder are hiring node devs
 
1 hour later…
03:47
You might want to look at some working implementations of Simon Says on Code Review; there's none in VBA, but even analysing a javascript or python version could help figure out the kind of data structure you would need to come up with, to store a sequence of notes. An Array? A Collection? A Dictionary? I think this question is too broad to be reasonably answered on this site. Research a bit more, and come back when you're stumped on a specific issue. And once it works put it up on CR! — Mat's Mug 49 secs ago
04:01
0
Q: Querying database in Rails using includes and where for has many through relationship

MicFinI would like to get all of the Coaches that have an Expertise level above 0 in Sports. Coach has many Sports through Expertise Coach.includes(:expertises => :sport).where(["expertises.skill_level > ?", 0]).where(sports: {id: Sport.live.map(&:id)}) Coach.includes(:expertises => :sport). ...

04:12
0
Q: generating nested lists in python2.7

Mr. KennedyWhy does the multiplication method lead to the list being nested with multiple iterations of the same list? E.g. >>> foo = [[]] >>> bar = foo * 4 >>> bar [[], [], [], []] >>> bar[0].append(1) >>> bar [[1], [1], [1], [1]] >>> id(bar[0]) 42445960 >>> id(bar[1]) 42445960 >>> rows = 4 >>> bar = [] >>>

04:27
TO is neither a forum for homework nor is it for code review. Check out codereview.stackexchange.com which might better suit your question. — samjaf 6 secs ago
05:02
@CaptainObvious that's a fair take on it. . .
@Mast thanks!
Thats why I love code reviews crash head against wallbish 17 secs ago
@Mr.Kennedy No problem, welcome to The 2nd Monitor :-)
@Quill lol
1
Q: Another long string in Go

Martin ShilI'm sure that my server can work with better performance, but it's just a dream. Parsing a very long strings is not so obvious task for me. I have a server that handles a lot of clients requests and finds a substring of a string. Server package api import ( "net/http" "stackexchange/a...

06:07
0
Q: A simple list of objects to display and edit with angular.

dwjohnstonI want to create a simple CRUD app using angular on the frontend. I'm not really happy with the logic here, it seems a bit convoluted for fairly simple functionality. <div class = "container-fluid"> <div id = "table" class = "row" ng-repeat = "o in objects" ng-init = "o.isBeingEdi...

06:22
07:02
0
Q: Multidimensional dynamic array class using a continuous block of memory C++

Alex ZywickiThe following code is designed to be a multidimensional array that works off of a continuous block of memory. It is designed to be able to be resized at runtime, but only when a resize is explicitly requested. #include <memory> #include <cstddef> namespace detail{ template<typename T,template

@Matheno we have a code review and build process which makes it impossible to make sure it all happens at once :) — Justus Romijn 21 secs ago
07:33
0
Q: Creating a definition text from 3 string arguments

EnderyHere is my code to create a definition text from 3 arguments. Is there any way to make it work with better performance and look nicer? private const string IllegalCharacters = "\\" + "\"" + "'#,.[]{}" + " "; public static string CreateDefText(string mainId, string secondaryId, string e...

0
Q: Modifiy an example code to accept 13 digits & leading zero

sylvaiin It is Stroustrup's example code. It does not accept 13 digits or leading zero as it uses an integer for the phone number. I think the only remedy is to replace the integer by a string. Here is thecode: // example illustrating the use of std::list. ...

07:43
0
Q: JavaScript function: Getting the index of a character within the alphabet

st88I've made this function for to mapping coordinates, using a alphabetic character, to their according ordinal number. Can it be improved? Or is there a better way to accomplish this task? Any hints welcomed. var exec = document.querySelector('#exec'); // Maps alphabetic characters to ...

@CaptainObvious It's a mess, possibly off-topic.
Monking!
@DanPantry Monking
hows it going?
Tough.
Busy morning.
07:52
@Mat'sMug shamelessly plugged Rubberduck to my colleague. He loves it
@JeroenVannevel yes. down with teams, foundations and servers!
@Mast :(
Zak
Zak
Monking @all
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Giving money to the bank
, wow
don't see that often
08:19
0
Q: Number of unique sequences of 3 digits, given a length is equal to sum

Dmitry SmirnovThis is code to solve "Minion's bored game" in Google foobar challenge. I'm new to dynamic programming, so the only solution I could implement without looking for hints was recursion + memoization. The code works on my own workstation and returns results really fast, but keeps failing in the chal...

09:04
> the moment we have the capability to develop a simulation that has the complexity of our world, the chances increase massively that we ourselves are a simulation
wow
it's too early for this
pls no
Zak
Zak
> "The moment we determined that there is a maximum resolution to the universe (also known as the planck length), the chances became almost certain
0
Q: Better approach of application layers

JohnWould like to get your opinion and any advice regarding my current approach of creating database applications. Below find my current approach. Counting on your opinion and comments including examples ideas to improve the way i do. Is there something wrong with the way i do or maybe better way to ...

0
Q: Settings Model to read multiple settings files and writes to one

Matthias SchreiberI am writing a Model to read, write and store settings. I think my code is pretty good, but I am not 100% sure. Any advice on how I could possibly improve it is welcome. import ntpath import yaml class Settings: def __init__(self, paths=None, default_path=None): """Load, write and...

Zak
Zak
By simple math, for any sufficiently advanced civilisation, the number of simulated people will be infinitely greater than the number of "real" people. Therefore, as soon as we determined that our universe *could* be simulated by a sufficiently advanced/higher-dimensional computer, it became almost certain that it was.
#HeavyStuff
09:42
0
Q: How to reload the entire page (having two paths) using angular JS

Nikki JScenario: I have two html pages namely StudentManagement and TeacherManagement. Both manage page consists of a form and a grid (embedded with add button). On click of the add button, the form appears. I have loaded a button in teacher's grid, so that I can directly re-direct the page to student's...

0
Q: Given 2 strings, consider all the substrings within them of length n. n will be <= 1. Returns true if there are any such substrings in both strings

Tony StarkProblem: Given 2 strings, consider all the substrings within them of length len. Len will be 1 or more. Returns true if there are any such substrings which appear in both strings. Compute this in linear time using a HashSet. I know as a matter of fact that there are many areas upon w...

Zak
Zak
10:01
Today, I learn that Word's Object hierarchy is lacking certain fundamental concepts.
Like the concept of a page.
This is not a good question for SO. You are essentially asking for a code review but we do have a site for this. Also asking about "any drawbacks" makes the question opinion-based because people have very different ideas of what a "drawback" could be. (For instance I've read different opinions about using CDNs. At the end of the day they are opinions. What works best would have to be determined on a case by case basis with profiling.) — Louis 21 secs ago
Monking
0
Q: Micro bench marking using JMH

Balkrishan NagpalI am learning to write micro bench marks for Java methods. I read that while writing methods for bench marking we should be careful of writing code which compiler/JVM can optimize. I have writeen my first bench mark for stack. Just by looking at my code it looks like a lot of code being repeate...

@DanPantry Ah, much better now.
Had a killer deadline.
Zak
Zak
@OlzhasZhumabek hi
Monking
-1
Q: How do i create an object of the subclass director in a new class, like the one in my code?

Arnav Dasclass Random { public class manager extends Random { int k = 5; public class director extends manager { int r = k-3; public void display() { System.out.println(r+" "); } } } public class engineer extends Random { //to be edited later } public class Admin extends Random ...

10:43
<span class="t xxs bGry7 inxs uuxxs ibk mrxxs mbxs">
HOW AM I SUPPOSED TO MAKE SENSE OF THIS
11
yes that's source code
Are you sure that's not the minified version?
10:57
@JeroenVannevel lol, are you sure that's not minified?
wait, no, it's not..
is it xml?
it's CSS, you won't make sense of it anyway /s
@OlzhasZhumabek no, it's HTML, the issue being the class names
oh, got it
It's literally the source code
in VS
that's pretty dumb
10:59
.cshtml
did someone fall asleep on their keyboard or something and type those names out with their forehead?
have anyone seen SCOPE_EXIT_SUCCESS and SCOPE_EXIT_FAILURE in C?
It would be nice if you explained what this is suppose to do, gave some sample input and the expected results. Also this question belong at code review because you are asking multiple questions related to how it is coded — Guy Coder 20 secs ago
@OlzhasZhumabek Without the SCOPE_ part, yes.
@Mast, From every scope? :)
11:06
@GuyCoder, "how it is coded" is not on topic questions on codereview. Please read information in help center. Despite that, questions about improving the code are welcome. — Olzhas Zhumabek 30 secs ago
@OlzhasZhumabek From every major function.
I hope I handled the comment correctly
It could've gone obsolete since C99, I'll have to look that up.
I've never used C99...
@Mast, I mean you can exit only from current scope, not from whole program :)
@OlzhasZhumabek I never exit a program in C. All my C is embedded running forever.
85
A: Should I return EXIT_SUCCESS or 0 from main()?

Keith ThompsonEXIT_FAILURE, either in a return statement in main or as an argument to exit(), is the only portable way to indicate failure in a C or C++ program. exit(1) can actually signal successful termination on VMS, for example. If you're going to be using EXIT_FAILURE when your program fails, then you ...

11:09
Andrei Alexandrescu made stuff that you can use if you're exiting from function with exception, not, and just exit in any way
and it is just a macro, nameless function
although it's cool and stuff, forgetting to put semicolon after the end of the function will cause very interesting compiler error. It is simply fail
it directly solves our problem: our destructors run anyway, not in particular situations
btw is there any possibility to setup a client/server on PC? I wanted to try out boost.asio
Forgetting semicolons is a bad idea in all C derived languages.
@Mast, I do it all times and wonder where is the error :D but fortunately, I forget it only when I create variables. Since I write templates, coloring turns off and I start searching for it. Although sometimes it turns off whenever it wants
Keyword matching ... Once, a recruiter contacted me who was looking for people that have experience with "API". That tells everything. — phresnel 3 hours ago
3
have you heard about information collecting from so jobs and all over internet? It created multiple meta posts, people seem to be really irritated
@OlzhasZhumabek Yea, seen a couple.
Not really SO's fault.
11:25
possible answer invalidation by sandeep on question by sandeep: codereview.stackexchange.com/posts/129828/revisions
@OlzhasZhumabek I can't find the meta post, but IIRC somewhere around this it got 'fixed'.
@JeroenVannevel is that in a JS file? @skiwi why would you ask if that is in a minified version? is it common to minify HTML and CSS? I mean you could do it, I just haven't seen it done...
monking
@Malachi .cshtml
fair warning....no coffee yet
all kinds of css configs are preconfigured
11:27
@JeroenVannevel i just read that right before you posted....lol
something-400
something-700
same things with different values
@Duga Nah
@Malachi Obfuscation happens everywhere.
Zak
Zak
@Malachi Take a look at the source code for the google homepage.
Or trade_date between trunc(sysdate) and trunc(sysdate + 1), or even just trade_date = sysdate, both of which might look reasonable. Aside from adding comments to say why it's done, which you don't really want to do throughout your code, not much you can do about that really. Hope code review catches it? — Alex Poole 19 secs ago
horrible, how are people supposed to copy pasta code efficiently when you can barely tell what it does?
11:39
@Mast Beware before they have experience with the Appie
some people flag the dumbest crap, people need to stop being offended
@skiwi lol
Double context in Dutch because over here it also refers to the Albert Heijn store
AH is everywhere.
In code reviews and other discussions I've been trying to dissuade people from using the @InjectMocks annotation. Please see this article for a very accessible explanation. — R. Michael Rogers 29 secs ago
11:58
Monking
try this on codereview — Tilak Madichetti 6 secs ago
12:15
SO please send help
@skiwi ?
0
Q: Binary operation != cannot be applied when using generics for a bit vector

skiwiI'm in the process of implementing a Bit Vector class as an exercise, however only knowing Rust for less than a week I run into trouble with the following code: use std::cmp::Eq; use std::ops::BitAnd; use std::ops::Index; use std::ops::Not; struct BitVector<S = usize> where S: Sized + BitAnd<

It's just that I don't know something in Rust :P Though I'm not that confident about SO
12:27
0
Q: Tkinter File Removal Program

click hereThis was my first foray into a Tkinter app and so I chose a simple and certainly overkill task to make into a gui. Aside from one small aspect, this code functions as I was intending and seems to have adequate performance. I'm looking for help to make it more pythonic, not by simply pep8-ing it ...

@CaptainObvious Gotta include the code people
Greetings, Programs.
@Donald.McLean Greetings, Human
@Donald.McLean Greetings, Robot
0
Q: Resolve dependencies from output of PBS queueing system

Martin - マーチンI have written a script, that reformats the output of qstat -f1 of the PBS queueing system. Unfortunately this project is by far too big to post here complete, also I am still working on it. The purpose is to have a quick overview of what is running by whom and what resources are blocked. I am am...

12:39
@CaptainObvious Fixed now
12:58
0
Q: PDF Script Tool - Converts documents to PDF and adds fields and scripts

Michael Brandon MorrisThis is an update from here. This tool is a Windows Form application that can add fields and scripts to PDF files, as well as convert Microsoft Office Word documents to PDF. The usage is as follows: User opens program and presses "Select Files" button. A dialog opens allowing the user to select...

13:41
If this code currently works as designed and you're just looking for feedback on it, this would likely be more appropriate on the Code Review SE site. — David 59 secs ago
I think it's a question for codereview stackexchange website. There they suggest how to improve your working code. — Alex 47 secs ago
Zak
Zak
Huh. Apparently, in VBA, you can't add user-defined types to a dictionary or a collection (or a paramArray)
Classes it is then
13:57
If your code works as intended, but is just slow or inefficient, I suggest you take the whole procedure (i.e. the full context) to Code Review, where you'll receive feedback on any/all aspects of your code, including performance issues. — Mat's Mug 26 secs ago
Accidentally left Wireshark running overnight and captured 2.5 million packets
5
0
Q: Convert simple object to SqlParameter

GregThe code correctly works, but I wanted to see if I could optimize this further. Limitation's do exist, but for this project they're okay. protected SqlParameter[] ConvertPropertyToSqlParameter<TEntity>(TEntity model) { var parameters = new List<SqlParameter>(); var prope...

Yes, but that is replacing the compare tool altogether, including when I try to use codereview. Basically, if I configure Visual Studio to use Beyond Compare or any other 3rd party tool, and then start a code review I lose the ability to add code comments because when I try to do that, it opens up the 3rd party tool that knows nothing about code reviews. — Lasse V. Karlsen 54 secs ago
@syb0rg Lol
Got anything interesting or just a whole lot of noise?
@Mast A few odd packets here and there relating to an IP I'm analyzing
Mostly noise though
14:08
A few odd packets could be all you need.
You realize you can just log those mentioning a specific IP, right?
You don't have to store everything you find.
@Mast I didn't spend much time configuring it, I just kinda jumped in
Rookie mistake, you almost never want to capture everything unless you're just snooping around to see what's out there.
Capturing everything on a network usually gives way too much noise.
I set a filter to check the IP address and that was about it haha
You might want to post this question on codereview.stackoverflow.com ;-) — Chilion 18 secs ago
14:29
Damn, I shattered my dreams, I was happy that all my tests passed, turned out I ran no tests.
8
0
Q: Any suggestion on making this better form validation?

NJeffriesI grabbed the form from some random site because I'm only interested writing the javascript at the moment. I am trying to check that a user has selected or entered text for all fields. I've made it a long if if-else but that can't be the best/most elegant/easiest solution. Leaving aside the rad...

Plot twist: It still works after enabling that test
My first piece of Rust library code: is.gd/IIdiSQ
14:51
0
Q: Retrieving the Currently Logged in User's Department

BassieI hope this is the right place for this. I basically wrote the below script for a SharePoint 2013 where I needed to get the department of the currently logged in user. I was finally able to get it working, but I am not happy with the structure at all: <script src="//ajax.aspnetcdn.com/ajax/jQu...

0
Q: implement generic Fibonacci in Rust without Copy trait

skanurI'm trying to learn Rust and am a beginner. How does one go about implementing a generic version of Fibonacci number generation without using Copy trait in Rust? My code is given below. I had to use Copy trait, otherwise the compiler would complain cannot move out of borrowed content [E0507] in...

15:07
@juanchopanza Analogies aside. Would you ever ship code you did not subject to the following minimum ever? Unit tested and debugged, static code analysis, possibly code review? If you do, you do not work in the same culture I work (CMM3+). Debugging is not an option in C++/C. At least once, some say twice with varying focus. — BitTickler 14 secs ago
Zak
Zak
To MSDN: "How do I check if X exists?" ; "It has an .Exists method" ; "Awesome"
Lovely feeling. Microsoft already solved my problem for me.
CodeReview is probably a better network for such kind of questions. codereview.stackexchange.combriosheje 56 secs ago
15:23
0
Q: Same PyObject for a shared_ptr C++ Object

Roland SpatzeneggerI have a similar problem as in this mail. I want that every time I return the same C++ managed object to python, I get the same PyObject. With the standard converter I get always a new wrapper-PyObject. The solution should fulfill the following requirements: get() == get() (The python object ...

@Zak Methods like that make programming easy.
Questions asking for improvement of working code should go to Code Review SE. Please move there. — πάντα ῥεῖ 33 secs ago
0
Q: Shortening Divs

Alexey AyzinI have a project here that looks pretty good and does exactly what I want it to do. The codepen is here. What I need to find out is if these divs that flip: <div class="flip-container" id="flipcontainer"> <div class="flipper" id="flipper"> <div class="front" id="front"> <...

@Zak That's weird, doesn't MS usually create problems to be worked around?
2
15:35
^^
Zak
Zak
@FreeMan Depends what you want to do with it ^^
@FreeMan I will fiercely defend MS Office as some of the most powerful software ever written.
There's plenty of stuff it's a real pain for, but nothing (big enough to be worthwhile) is universally awesome.
@Zak Beer is universally awesome.
2
0
Q: Using try-finally block for logging the end of method if multiple return statements are present

user1242967Let's say I have this code public Response Test() { var id = Guid.NewGuid(); var stopWatch = new Stopwatch(); stopWatch.Start(); _logService.LogMessage($"{nameof(Test)} called", MessageSeverity.Trace, ticketId: id); var firstOperationResponse = firstOperation(); if (!firs...

0
Q: Inheritance and Association implentation in Symfony 2.7 and Doctrine

RaymondI've a working implementation in Symfony2 with doctrine of the following model. A Parent can apply for one/more Training(s) A Training is based on a specific Skill, but you can have multiple trainings at different dates for the same skill. Once a Parent attends the training he can be marked...

Zak
Zak
@Mast Patently false. I can't stand beer ^^
@Zak Universal = People \ { Zak }
15:50
Greetings all.
0
Q: Simulating memcache get and set race condition and solving it with add

NishantMemacahe get and set can hit a race condition if you use it for something like locking. add actually doesn't get to this problem because it just sets only if the items doesn't exists. A Simple memcache locking logic using get and set would be like: def access(resource): if memcache.get(reso...

@Legato Hello!
16:16
0
Q: Hackerrank Funny String python solution

Trinity Suppose you have a String, \$S\$ of length \$N\$ indexed from \$0\$ to \$N-1\$. You also have some String, \$R\$, that is the reverse of \$S\$, where \$S\$ is funny if the condition is \$|S[i] - S[i-1]| = |R[i] - R[i-i]|\$ is true for all \$i \in [1, N-1]\$. I code mainly in Java. I'm very ...

16:26
0
Q: Unwrapping optional properties from an optional array of objects

JALI'm currently working with an SDK where methods return an optional array of objects with optional properties. Only the array itself is optional, it will either be nil or always contain non-optionals. I'm struggling to find a cleaner way to unwrap optional properties for each non-optional in the...

16:51
Migrations should be named with a timestamp, right down to the second. Of course, if both branches are creating migrations that touch the same db table/fields, then you may still have a conflict. Best advice is go with timestamps and a careful code review. — Petar Zivkovic 59 secs ago
17:07
0
Q: Simplifying a SQL query

ShuieiI'm trying to figure it out how to simplify my SQL query. team_challenges.select( "challenges.*, CASE WHEN EXTRACT(epoch FROM steps.end_at) < EXTRACT(epoch FROM timestamp 'now') THEN 2 * EXTRACT(epoch FROM timestamp 'now') - EXTRACT(epoch FROM steps.end_at) + 3538377300 ELSE EX...

17:28
0
Q: Setting up require.js for a static website and loading custom code as if it was a library

dimkI am a new SO/SE user and I initially asked this question on SO, but i was 'sent' here -for some reason i don't clearly understand but anyway- so here I am..! I was actually curious about my require.js setup, cause it is the first time I 'm using it and having seen many different approaches/exam...

Sorry for that! Seems that since I am new here I cannot really understand where the 'line is drawn' between the two sites, but anyway here it is: codereview.stackexchange.com/q/130058/107098dimk just now
Would the ones here be so kind to cc me once they find a Rust job opening somewhere? I'm really curious to see if they actually already exist at this point in time
Just think - in a few years' time, there will be people who can honestly say they've become rusty in Rust.
4
Zak
Zak
So, turns out the company we thought we were acquiring went and found anther buyer without telling us.
Didn't you already have full access to their data?
Zak
Zak
17:40
@skiwi Almost.
it's sloppy, and I would like the code to be easy to read/edit for future developers. - get it to work as intended, and then post the module on Code Review. Good luck! — Mat's Mug 57 secs ago
Zak
Zak
But no.
On the other hand, I do have a lot of their data from the due diligence process.
And somehow, I get the feeling I'm about to spend a week re-analysing it along certain lines.
if they could find other buyers, I wonder why they didn't just start a bidding war between everyone interested
Zak
Zak
It's not a big enough deal for that. Entire acquisition price is around the £600k mark.
Anyway, I expect I'm about to get a request along the lines of:
"Who are their 200 largest clients by Assets/Revenue, how old are they, what policies do they have and what's their mailing address"
@CaptainObvious The code is kind of hypothetical. Not sure whether it's worth putting on hold.
17:44
@DanLyons On GitHub the color for Rust is some brownish tint, it looks quite rusty
0
Q: I'm new to OOP and I'm wondering if this is an acceptable approach to this simple User class

user107101 // The DataLayer to MySQL require_once $_SERVER["DOCUMENT_ROOT"] . "/api/DAL/classes/User.dal.php"; class User { public $id; public $name; public $age; public function __construct($id = null) { $this->dl = new UserDAL(); // Get an existing user object ...

0
Q: Is the `let` necessary?

user1011471(let [[area exch line] (trio n)] (format "(%s) %s-%s" area exch line)) Is there a way to call (trio n) in-place to avoid the use of let? If there is a way, would you prefer it over let?

18:00
0
Q: Implementing clearTable, grow and shrink on a hash table

swagrovI've gone through previous questions about implementing hash tables in python, but I have something little more specific. I am handling collisions with linear probing, and I want to grow/shrink my table when I go below/above a given loading factor. My put/get methods are heavily based from this s...

18:19
http://www.commitstrip.com/en/2016/06/03/right-click-not-allowed/
CommitStrip
Right-click not allowed!
CommitStrip
1464977768
in Cardshifter TCG, 12 mins ago, by Duga
[skiwi2/bit-vector] skiwi2 pushed commit 71074e98 to master: Added Travis configuration
So that's why Travis wasn't working, the config file is empty
@CommitStrip Instagram right there
@syb0rg There's multiple ways sites can enforce it and most of them can be circumvented.
18:52
0
Q: C++ Heap Sort Implementation

Loki AstariJust checking if I could still do it: #include <iostream> #include <algorithm> std::size_t getParent(std::size_t n) { return (n - 1) / 2; } template<typename I> void heapify(I begin, I end) { std::size_t size = std::distance(begin, end); for(std::size_t loop = 1;loop < size; ++l...

lol
0
Q: Cleaning up Erlang code for a text editor

Finn O'learyOn Monday and Tuesday I started learning Erlang through the Erlang Koans, and around Wednesday night I decided to use my newfound knowledge to implement a simple text editor (Akin to ed(1)). Currently I have the following: -module(text). -compile(export_all). %% State => {file, buffer, cursor} ...

19:15
0
Q: School Banking Project

Emmasky ChuksHow can i optimize this code Header File: #pragma once #ifndef Account_h #define Account_h #include "stdafx.h" #include <iostream> #include <string> #include <fstream> #include <iomanip> #include <assert.h> using namespace std; struct Birth_Date { int Day; int Month; int Year; };...

19:30
So, no one has seen or shared this one yet?
His loss.
0
Q: Document (PDF, TXT, DOCX) to text classes

MarxtaiI wrote some classes to convert some documents (PDF, DOC, DOCX and TXT) to only text so that it can be stored in a search engine. Here's how I use those classes : $file = 'text.doc'; // comes from the user, hardcoded for the example $file_extension = pathinfo($file, PATHINFO_EXTENSION); switc...

o/
@DanLyons I've been doing it for 2 days and I'm rusty. The ownership and lifetime thing is hard to wrap your head around.
@CaptainObvious @200_success Good catch on that comment
19:46
Hmm, I seem to have found a Netflix login script on CodeReview. I wonder how I could use this... — rubenvb 41 secs ago
@SimonForsberg "Just making a point" that I'm a complete idiot!
She's gorgeous, though
Not that i needed to point that out
also i prefer spaces
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Recursive comment function echoes HTML inside function
20:03
Tabs = fewer keystrokes. Even if you're weird and insist on having them expand to spaces... ;)
I use tabs that expand to spaces
Wouldn't that just delay their breakup?
What's the problem you're having with the code? If you're looking for design advice, codereview.stackexchange.com is the appropriate place. — Barmar 39 secs ago
@FreeMan I use tabs in Python and spaces in Ruby.
Tabs are automatically set to 4 spaces in my editor.
in Cardshifter TCG, 2 mins ago, by Duga
[skiwi2/bit-vector] skiwi2 pushed commit 98736013 to master: Updated Travis configuration to avoid failures on nightly
in Cardshifter TCG, 2 mins ago, by Duga
[skiwi2/bit-vector] build for commit 98736013 on master: The Travis CI build could not complete due to an error
The irony...
20:22
0
Q: Improving time it takes to insert thousands of records using Entity Framework

MatthewI have a task in my program that is inserting thousands (94,953 in one instance and 6,930 in another) of records into my database using Entity Framework. Right now I am doing this and calling the .Add() method for each record but it takes about 1 minute to insert the smaller batch and over 20 min...

If you have working code which merely needs improvements then you're probably in the wrong place with this post. Code Review is where they handle existing / working code and do their upmost to improve it in terms of speed, security, sustainability, and longevity. Give it a try. They're good! — Ralph 26 secs ago
kickstarter.com/projects/njones/… a software library, on Kickstarter?
Lol
git reset --hard
Maybe I'll do that on a GoFundMe
21:04
0
Q: Golang: reading and writing files in parallel

mandeep_m91I am trying to read a big file line by line, inspect and cleanse each row and write to either of the two output files depending on the outcome. I am using channels for this. I am still quite new to this language so trying to build stuff by looking at examples. There is something I am doing wrong ...

21:24
More of a codereview.stackexchange.com kind of inquiry — Mark Fox 17 secs ago
I'm voting to close this question as off-topic because it should be on codereview.stackexchange.comaruisdante 1 min ago
0
Q: DRYing out Javascript code

Ilia AptsiauriI have a set of validation functions, in case of the failure of this validations I assign response code and the message to the response. Request can be three types, each of them contains different type of values which should be validated. At the moment I have created the validation class. My ques...

21:56
0
Q: Troubleshooting Program PROGRAM

Ãbråhäm Enëh XiiCan some code a troubleshooting program the identifies certain keyword in teh customers query to provide potential solution querys

@CaptainObvious No.
22:17
-1
Q: GUI Java Game, Puzzle Pop Tiles

Daniel MonteiroI have been making this code for a while. Its a board game in java with GUI. In this game, a user clicks in a tile in the board and it's supposed to check only for neighbors tiles horizontally and vertically, but it's searching tiles in diagonal too. This unwanted result is probably in the method...

ok thank you. Is game Development the right one to go? @SimonForsberg — Daniel Monteiro 1 min ago
Some people will never learn..
22:34
This doesn't belong here - you really should move it to codereview.stackexchange.comDarren Sweeney 39 secs ago
23:20
0
Q: should I optimize this code (simple gallery)?

maciek7566I just created a simple gallery with scroll. Everything works fine but I'm not sure how should I optimize this code: document.addEventListener("DOMContentLoaded", function() { var smallImages = document.querySelectorAll('li img'); var bigPhotoDiv = document.querySelector('.bigPhoto img'); var s...

23:31
Monking guys.

« first day (1126 days earlier)      last day (3190 days later) »