« first day (1139 days earlier)      last day (2896 days later) » 

12:00 AM
RELOAD! There are 2455 unanswered questions (92.9953% answered)
 
0
Q: Replace 'substring' with 'substring+something' in php

Bogdan WoodI want replace >>numbers to <a href=#numbers> >>numbers</a> example: input: hello >>1050 How are you? output: hello <a href=#1050> >>1050 </a> How are you? number can be 0-100000 Maybe some regular expresion?

0
Q: I am currently writing my code in which my Business Layer matches my Data Layer , how can I change this?

Jeremy MillerCurrently I am calling from my console application into a business layer and then that calls into a data access layer. The issue is that it doesn't seem to be gaining me anything when my DAL and BAL are doing the same responsibility. What can be done? Console app DataSet dataSet = XchgManager...

 
12:16 AM
0
Q: Why does my program System.out.println("Test") only after scanning all user input, and why does scanner scan 1 time extra in for loop?

Trevon Lee Harperimport java.util.Scanner; public class Main { public Scanner input; public int num; public int n; public Main() { input = new Scanner(System.in); calculate(); } public static void main(String[] args) { Main main = new Main(); } public vo...

 
3x nope
 
12:55 AM
0
Q: Countable and uncountable sets in .NET (set operators, demo)

Dmitry NoginPreviously: Countable and uncountable sets in .NET (clean version). Disclaimer: Please do not interpret my attempts to gain maximum from .NET as some kind of socially unacceptable behavior. You, probably, know someone who does it to his/her car. It is a very good way to learn and explore a hospi...

 
@Phrancis please take a look at my endorsements list to see if there is anything you think that you can honestly endorse.
 
0
Q: Logging in to Android application using Firebase

Alexiz HernandezI currently have an app that uses Firebase for logging users in and I would like to know if I can make this code any better. I currently have 4 files: auth/models/User.java auth/BaseActivity.java auth/CreateAccountActivity.java auth/LoginActivity.java User.java: @IgnoreExtra...

 
1:29 AM
@ardaozkal I certainly will, been busy with dinner
 
...linkedin is down??
 
@Mat'sMug no
 
0
Q: DB-to-Java value mapper

Rafael EyngIn my company, I've inherited some Java library that I'm now writing tests to, refactoring and fixing Sonar issues. One particular point that Sonar is complaining about is a big chaining of if/else if/else statements, that is used in a class responsible for parsing values that come from the DB t...

0
Q: Check if a number is prime

newToProgrammingI'm looking for feedback on the following code which checks if a number is prime using Swift 2. import UIKit var number:Int = 1123 var isPrime:Bool = true switch number { case 1: isPrime = false case 2: isPrime = true case 3: isPrime = true default: primeCheck:...

 
@Mat'sMug working fine for me right now
@ardaozkal any particular area of speciality at MSP?
 
Not sure what you mean exactly
 
1:33 AM
.NET, Azure, SQL, etc.
 
ah, .net and azure mostly
 
Have you done some game dev as well?
 
Yep, unity
 
Maybe you should add some stuff about this on your profile :)
At least in your skills
 
I should
 
1:40 AM
Those all seem like good endorsements, based on your network profile(s) here, so, cheers :)
You seem to know Python well enough also
I suppose once you know a language well enough, it's not too difficult to transition to another one
 
Depends on languages mostly
 
like, I know C# and VBA pretty well, and no way I'm going to write PHP
 
But you could still read PHP and in a pinch probably write it
 
PHP and JS is very similar to C# so it wasn't hard to write on them.
 
I could probably review my colleagues' PHP work lol
 
1:43 AM
Most C-Style languages are easy to transfer between
 
FWIW I'm not getting used to that blue @Quill lol
yet
 
JS is a bit of a different beast, with all those thousands of libraries and paradigms
 
@Mat'sMug I think that he should make a script that makes him white again.
I could use one for one of our new mods on arqade too
 
@ardaozkal wat no... ;-;
 
@Quill so how do you like your new toys?
 
@ardaozkal s/white/black/?
ooh, another mod from Canada!
 
#NicePeopleRoom please
 
@Mat'sMug ah, I use soda chat css so colors are confusing.
Pictured: RO, non-ro, Mod
 
you're DESTROYING our shiny not-so-new chat CSS!
I gotta say I used porkchat for a while, but I grew tired of the dk theme
 
1:47 AM
MY EYES ARE BURNING
 
lol
 
Porkchat was definitely better than the beta-blue theme
 
too bright
Porkchat's fixed font sucks, so I forked it
 
@ardaozkal huh, Wipqozn's avatar is a turtle here
 
that's strange
 
1:48 AM
probably because of many many userscripts I use
 
"I enjoy a variety things, including coding and gaming (video and otherwise)." and no account on here!?
 
@Mat'sMug weird
 
@Mat'sMug they're pretty nice
 
1:49 AM
@Phrancis he is the worst
@Quill How is TL?
 
TL is modspeak for "Teachers' Lounge", the network-wide mod chat
 
memer script?
 
@ardaozkal it's like changing class in school, but where you know most of the people but none of the social context
 
@Quill makes sense
 
oh, "how" ..I totally read "who"
 
@Quill bookmarked
So I'm off o/
it is 5am
 
\o
 
yikes!
 
and I did nothing productive today. I should finish that project I was going to project last month tomorrow
 
good ...morning
 
1:53 AM
Would I regret getting the LinkedIn app on my phone?
 
@Phrancis POTENTIAL EMPLOYERS ARE LOOKING FOR CANDIDATES LIKE YOU
so yes
 
LOL
 
@Phrancis Depends'; DROP TABLE Users; --
I doubt they cleaned up security after that hack
 
Oh, they got hacked huh. That's not good
 
wow the view is awesome
 
1:55 AM
@Quill Really? They got hacked by something that simple?
 
@SirPython not like that (I don't know the details of the hack), I was just joking <_<
 
Whew
 
Anyone who is still vulnerable to SQL injection by now deserve what's coming to them
6
 
oh
 
1:57 AM
It's one of the simplest exploits to prevent
 
It's one of the simplest exploit to prevent
 
@Quill everyone should sub both to the BLOG and the pwn mailing list of hibp.
@Mat'sMug don't forget the s
 
Apparently that Dark web site, Silk Road, got hacked by something similar
 
crap
 
@Quill lol
 
1:59 AM
@Quill lol, myspace is at the top, didn't know they even had any users left
 
apparently they put the server under heavy load and reverse engineered a PHP form to dump the database of credentials
 
@Quill ouch
 
PHP strikes again
 
> The passwords in the breach were stored as SHA1 hashes without salt, the vast majority of which were quickly cracked in the days following the release of the data.
 
wow that's dumb
 
2:00 AM
SHA1 HASHES WITHOUT SALT
 
LOL
 
like, smash-your-face-on-your-desk dumb
 
@Quill that reminds me, see your twitter PMs
 
Oh shit, looks like I got pwned on Patreon
 
Maybe the FBI actually arrested him for shoddy web security policies
 
2:03 AM
 
I was looking at your profile and came to the conclusion you have an email address so I think you’d be perfect for an opportunity I have.
 
> A SQL Injection vulnerability in sonypictures.com lead to tens of thousands of accounts across multiple systems being exposed complete with plain text passwords.
That's pathetic, especially for a company like Sony
 
0
Q: Im having trouble generating enemies for my game

Dhairya JaiswalSo i am having trouble generating enemies that come down from the top of the screen to the bottom. I am trying to make a shooting game, and the user can shoot the enemies to kill them. but i cant seem to get the enemies to appear. plz help heres my code: import pygame import random BLACK = (0,...

 
@CaptainObvious broken
 
Closed
 
2:34 AM
Wow, I just got a tab organizing add-on for Firefox. That's amazing, wish I searched for that years ago! I wonder if @skiwi uses one ;D
 
huh, nice
 
Nice little drag & drop interface too, when you select "Manage my groups"
Called Tab Groups
 
2:58 AM
Does anyone recall where that one page is with all the preformatted comments, or was it a userscript?
 
it's on meta
"Frequently Posted Comments"
28
Q: Frequently Posted Comments

Simon ForsbergOn Code Review we often encounter questions with the same kind of problem over and over again. Some of us are using the auto comments script which allows you to maintain a list of comments to post. What are some useful tin-can comments that can be good to have in your list of comments? If you ...

 
Excellent, merci
Looks like Simon made some kind of user script for it too
 
3:18 AM
Codereview.SE is a great place for this. — Andrew L 34 secs ago
I'm voting to close this question as off-topic because this question belongs on another site in the Stack Exchange network: codereview.stackexchange.comVohuman 41 secs ago
 
OK got it to work, almost completely, maybe I'm just missing something but some of @SimonForsberg auto-comments remote that the [Q] comments don't seem to appear after I added the remote, when clicking the comment box on a question... should they be [C] instead?
In fact, all the [Q] comments don't appear
Wait, other way around, only the [Q] comments do appear for questions, those marked [C] do not appear for question comments
 
[C] shouldn't be used, it's for custom close reasons and the comments there are used together with canned close reasons, so should be [Q]
 
3:35 AM
I made a fixed version here -if @SimonForsberg wants to update his hosted file, it should update for everyone using auto-get setting
Just tested it and works good
 
0
Q: GUID Generation and Invalidation

AcornI'm updating an old ECS I wrote a couple years back, and I've written the following piece of code in order to generate a GUID: const auto& es::EntityStore::RequestEntity() { if(m_freeEntities.size() != 0) { return ec::ENTITY_ID_INVALID; } //Get the lastmost EntityID a...

 
TTGTB
 
me too
'night!
 
Later!
 
3:57 AM
I think it maybe better if you ask at codereview.stackexchange.comshole 58 secs ago
 
4:26 AM
Well my real code is convoluted involving at least two loops of asynchronous fetch calls to retrieve values that will then be filtered and cross referenced against each other. That's why I was wanting to store values in a cache. Of course one could consider a cache object to be a variable. But one loop will be writing to it and another will be reading from it and both asynchronous. My question attempts to address the general problem rather than code review my specific project (-: — hippietrail 38 secs ago
 
4:41 AM
0
Q: Find All the Primes Between two Numbers

Aswin MohanI wrote a solution to the Coding Challenge in C++ using the Sieve of Eratosthenes. How much Ever I tried I could not get over the Time Limit on SPOJ. How can I optimise this Code ? /* * Generate Prime Numbers Between two given numbers. * Url : http://www.spoj.com/problems/PRIME1/ * Date...

 
If your program works as intended but you are looking for ways to improve it, codereview.stackexchange.com is a better place to post this question. — R Sahu 26 secs ago
 
5:06 AM
Monking
 
0
Q: What is the right place to keep Contants and Enums

Abdul WaheedI am new to Android development. In application development, I often need to use 'Constants' and 'Enums'.As far as my I use the strategy, I keep all 'Constants' in a separate class named 'Constants' but I am not sure whether I should keep all Enums in a separate class as I use 'Constants'? or I s...

 
Monking! (not really here)
 
5:53 AM
Monking
 
6:05 AM
possible answer invalidation by deadManN on question by deadManN: codereview.stackexchange.com/posts/132040/revisions
Pulling an individual record from the file means reading through the file until you find the proper record. I highly recommend moving to a computer with a modern 64-bit environment and a reasonable amount of RAM. If you'd like to optimize your program anyway, please provide an MCVE. If it currently works, consider asking on Code Review instead. — TigerhawkT3 38 secs ago
 
monking @all
 
0
Q: Need to simplify multiple linq queries in WebAPI

SivaRajiniI have multiple webapi methods which uses same table and same select statement. only difference is where condition for all the methods. How can i write simple method to pass the where condition dynamically in C# public HttpResponseMessage GetClaimsFlagged() { var result = fro...

 
Monking ^_^
 
6:32 AM
Maybe more appropriate for CodeReview... anyway, I see it mostly right, except that the unique_ptr<mutex> looks unnecessary to me. And instead of duplicating the surface API you could just override operator->(). — rodrigo 49 secs ago
 
0
Q: Enum string parse and get custom attribute assign to array

CiejaI wrote a code which: - parse string to my enum - get description from enum - assign to string[] array private readonly string[] allowed; public AuthorizeRoles(params object[] arrayParam) { allowed = (arrayParam.Select(myField => Enum.Parse(typeof (MyEnum), myField.ToString())) .Se...

0
Q: some suggestions for an algorithm to decrease a word by number

AdamThe idea of the algorithm is to decrease a number from a word. If there is better way to write this algorithm please comment. limitiation: it is important to decrease with a limit, if BB is the word we decrease from, after decreasing by 1 the result will be BA, but after decreasing by 2, we...

 
 
1 hour later…
7:42 AM
Good morning
@Phrancis haha, it's one of the top concepts on OWASP (SQL injection)
 
Zak
7:55 AM
Monking @all
 
0
Q: Value Added Calculator-app with React.js and Foundation

st88The app calculates the tax which is included in a (given) amount. Because I'm new with both libraries (React.js, Foundation) I would appreciate hints and improvement suggestions. Live-Demo on CodePen : http://codepen.io/mizech/pen/WxxrMZ My source code : var SelectInput = React.createCla...

 
Naruto answer; accepted non-selfie answer with 0 score: Ackermann function
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: TabLayout inside fragment fetch data from web
 
Monking @Zak
 
8:11 AM
@Phrancis I should make a Jenkins job to update that file :D
 
@Phrancis Once you accept my connection, I'll endorse you.
Monking @SimonForsberg
 
Shouldn't be too complicated. I'll just need a program that can fetch the meta CR URL and save it to a file pretty much, then I can take care of uploading it to my FTP. And such a program should be easy to make in Java with JSoup, if no one beats me to it.
@Phrancis The userscript itself is not mine, I'm just hosting a file that can be imported to the user-script.
 
Monking
 
Monking
 
8:17 AM
Thanks @Quill for the bounty!
 
AKA: get yourself a new GitHub password
 
0
Q: Guess number with mines game

Goran BI've made mine first Java program and it was Guess a number game and got some great code review, so I've decided to first implement that suggestions and to make a game a bit more complex/advanced. So now, user can select between 3 options, 3 different intervals (1-10, 1-20, 1-10), but also, in e...

0
Q: How can i rewrite this code block with array_map or array_walk?

Adil IlhanActually, I don't like write for/foreach. I had to write a loop. I would like to replace it with array_map/array_walk. Does anyone have an idea? The code: foreach ($data as $key => $value) { if(isset(static::$specialKeywords[$value])) { unset($data[$key]); $check['specialK...

 
@CaptainObvious Ouch. You're going to at least be having warnings due to options not having a key attribute...
@CaptainObvious AND ?
 
8:32 AM
in JavaScript: if u don't know java then it's not my fault on Stack Overflow Chat, 12 hours ago, by Sterling Archer
I matched somebody on tinder named Yuu... and my opening line was "YUU CRANK DAT SOLJA BOY" and she unmatched me
 
8:47 AM
@DanPantry Removed it.
 
9:20 AM
is there any way in Python to search a key in a dict and if it is found to print the value of that key ? ^_^
 
0
Q: Making more pretty this simple PHP array function

BorjaHaving the following code, where: $row: Is an array that contains some things, but the ones that are interesting for the post are country_from and country_to, which are country names. $pBCountries: Array containing strings with country names. The function is very easy. It checks if the countr...

 
@Dex'ter dict.get(key)? With either a default or a try-except. Or do you mean if key in dict: print key?
 
perfect
thanks @JoeWallis
^_^
 
No problem, :)
 
9:41 AM
http://www.commitstrip.com/en/2016/06/16/incognito-mode-freedom-at-last/
CommitStrip
Incognito mode : freedom, at last
CommitStrip
1466069934
 
Zak
> "We can't see anything you're doing at all!"
lol
 
0
Q: ASP.NET C# MVC thin controller for file validation with service layer

Matt ThrowerMy name is Matt and I have a fat controller problem. In truth I have limited experience of MVC and I'm trying to learn how to organise my code better so it's more testable and more maintainable. Here's my first effort at rewriting a bit of my existing application to make it happier and slimmer. ...

 
MOnking
 
10:03 AM
@JoeWallis do you remember that regex from yesterday ?
 
I just `git mv`ed a folder to rename it, and edited a file in it. Will `git commit -a` commit both these things? (Yes, I'm a massive git noob.)
(I used `git commit -a --dry-run` and it just says it was renamed. should I use two commits here?)
@Dex'ter Yeah?
 
it was something like this: \((.*?)\)(?:\((.*?)\))?. Any ideas on how could I modify it so that: if I have index(v1) or index(v1)(v2) to also match the parentheses (not just the values) ?
so the regex will match: (v1) or (v1)(v2)
 
@Dex'ter Move the parentheses in to the capture groups. I.E (\(.*?\))(\(.*?\))? (2 groups) or (\(.*?\)(?:\(.*?\))?) (1 group)
 
@JoeWallis well, yes. I thought about it, but in you first example I'd like instead of the matching groups (v1) and (v2) to obtain (v1) and (v1)(v2).
so a combination between your first and second examples
^_^
 
I strongly suggest you this stackExchange, specialised in these cases: codereview.stackexchange.comFlame_Phoenix 21 secs ago
 
10:11 AM
@Dex'ter That is the second one?
 
@JoeWallis right, sorry.
thanks a lot
I'd buy you a beer
but I'm doing regexes instead
 
0
Q: ive done task 3 can someone help me with task 4

GUZZMEISTER(iii) Describe the structure of an array that could be used to handle the traffic light sequence The sequence should be repetitive. Each red should last 5 seconds. Each amber should last 3 seconds. And each green should last 5 seconds. Red Amber Green Amber Red (iv) Write a script that uses...

 
@JoeWallis Heya
 
@N3buchadnezzar Yo
 
@JoeWallis Is there a small typo here codereview.stackexchange.com/a/132041/61495?
 
10:16 AM
I'm currently on a Mac at work and it is gorgeous.
 
Doh, understood the code finally =)
 
@N3buchadnezzar On Gareth's?
 
@CaptainObvious No.
 
@N3buchadnezzar Don't know, ): but I don't know how to spell parities...
 
10:22 AM
@JoeWallis You must be fun at parities
 
11:02 AM
Monking
 
11:13 AM
If it works and you're looking for improvement, try codereview.stackexchange instead — Raystafarian 50 secs ago
 
@CaptainObvious one more vote
 
11:35 AM
@DanPantry Done,thank you sir :)
Monking!
 
monking
@DanPantry :D
did you see macOS Sierra? it has Siri!
 
Questions about improvement of working code are better placed at SE Code Review. — πάντα ῥεῖ 58 secs ago
 
Monking!
 
Iew, there's a bug walking around in my code
 
@skiwi Squash it.
 
11:40 AM
@Quill No. Unfortunately homebrew wasn't working on the Mac I was on due to permissions, so I couldn't try out what I wanted to try out (dotnet core)
 
ouchie
 
Hi all
 
also the mac keyboards are weirdddd....
 
@Mast I first have to find it
 
@DanPantry The one I use at work doesn't even have curly braces on it
 
11:42 AM
@SimonForsberg You totally should
 
I mean, they're there, but they're not indicated on the keys.
 
When I create a bit vector with size 32 backed by u8 and I take the right part (index 16-31) as a bit slice (a mutable view), then set them all to false, they're all false, set them all to true, they're all true, set them all to false, they're still true
 
The pound sign isn't indicated either, which seems weird, considering the overlap between Facebook, InstaGram and Twitter users and Mac users is probably quite significant.
 
@overactor You're the first person I've ever heard of to refer to the pound sign to being # and not £
 
11:47 AM
@DanPantry I also briefly considered calling it the octothorpe
 
@DanPantry it does happen a lot though
first sentence on en.wikipedia.org/wiki/Pound_sign : This article is about the currency symbol "£". For the sign "#", see Number sign.
 
Not in this country, here pound almost always means either £ or lb
 
I don't like number sign.
 
"hashtag"?
 
Hmm, running my tests again they now worked once, and once they segfaulted, I guess that's problem fixed
 
11:49 AM
@skiwi How on earth do your tests segfault
 
@DanPantry just hash sounds wrong and I'm too contrarian to call it a hashtag
 
Working with raw pointers in Rust... I may or may not have gotten some offset wrong
 
I suppose I should just stop being a grumpy old man and call it a hashtag anyway
 
@DanPantry Or as a child, "Do you want a pound?" "Yeah sure" Smack
2
 
Ouch
Someone asked me to do a virus scan on their VM
 
11:50 AM
@JoeWallis pound has a third meaning you know...
 
Full of bots etc from old owner
apparently the seller company got lazy and didn't reset
they also use Evaluation version of Windows Server 2012
 
@ardaozkal can't they just reimage their VM?
isn't that a whole part of the benefits of a VM..?
 
They SHOULD
But they seem incredibly shady, considering some stuff
 
open the curtains, then
:^)
@JoeWallis I'm starring this because you're one of my people. Not because I condone hitting children
 
@DanPantry Well, isn't it more okay if it's children hitting children?
 
11:54 AM
@skiwi only if they see a yellow mini
 
@DanPantry that sounds vaguely nationalist.
 
@overactor By one of my people I meant culturally. I'm Welsh, not English :)
But I remember that same thing in my childhood
 
Which is quite baffling coming from a Brit.
 
I'm not really a nationalist or patriotic person
 
@DanPantry oh, now I know.
 
11:56 AM
The only times I spout that is when I am being intentionally ironic
 
This conversation's veering pretty far from being topical for this room
 
Shall I move it if you wish to continue it?
 
Nah, I'm good
 
It's alright, I'm fine with leaving it at that
 
11:57 AM
Cool beans :)
 
Does CR have any sort of traditional topic(s) for a first post in a new language?
 
0
Q: Create summary of raw data in new sheet

Stewie GriffinI have an Excel workbook with two sheets: "Raw data" and "Summary". In the raw data sheet there are several blocks with data structured like the image below: I want to create a summary of the data below, in the sheet "Summary", looking like this: The way I've done this is: Sub TransferAndS...

 
@overactor Fizzbuzz
 
@DanPantry came to mind, figured it was probably not very beloved.
 
Project Euler never hurt
 
11:59 AM
I mean, I could do chutes and ladders I suppose, but that's a bit daunting.
 
You could always do "Hello World"
 
My blackjack game seems to have been a hit :P
2
 

« first day (1139 days earlier)      last day (2896 days later) »