« first day (852 days earlier)      last day (3166 days later) » 

12:00 AM
RELOAD!
There are 1475 unanswered questions (94.4588% answered)
 
2am here, waaay past my bedtime
catch you guys tomorrow
 
Good night @janos!
 
Cross-network sarcasm
"Don't see a reason to stop advocating their use" - other than that they're undocumented, unsupported, may disappear in any upgrade or service pack, and are widely known to silently skip databases? What other reasons could there possibly be? — Aaron Bertrand ♦ 2 mins ago
3
 
0
Q: e-mail testing code on java

Pablo GomezMy first post here! I made some code to check that e-mails given apply to the right format: import javax.swing.JOptionPane; public class MailTest { public static void main (String [] args){ String email=""; int at1=0,at2=0; int dot1=0; boolean at = false, do...

 
12:15 AM
So, I'm just reading this transcript. Totally enthralled. Will I be mentioned? The suspense is killing me.
 
lol
in The CRonicles, 2 days ago, by Mat's Mug
RubberDuck (with a big "D") and myself were working on Rubberduck (with a small "d"), and used a new "VBA" chatroom to avoid spamming the 2nd monitor with our stuff. Cardshifter guys did the same.
 
I just read through it as well. They even linked the post where I made my first Meta contribution
Skipped me. Like some newbie.
 
@CaptainObvious Um yeah, needs a code review pretty bad indeed
 
Lol. I just got there @Mat'sMug. Reading about elections now. =)
 
12:30 AM
Hey, congratulations, @janos!
 
Will a mod humour me and post the 30-day flag stats?
 
:(
> 825 flags, average handling time 0 days 0 hours 20 minutes 0 seconds
 
Jul 5 at 0:55, by rolfl
Past 30 days -> 864 flags, average handling time 0 days 0 hours 17 minutes 0 seconds
slackers!
3
 
Maybe our new mods spend more time actually working than you did ;)
 
OK, I am off to watch TV, Remind @janos to blame the monkey, and tell him not to search for his name in the mod room transcript! ;-)
3
 
12:42 AM
See you later.
 
There is a mod room?
I feel like I know nothing about Code Review sometimes.
 
@SirPython nope, never heard of
 
I think the mod room is an SE room.
The Teacher's Lounge, they call it, TL for short.
 
Oh, I've heard of that.
 
Zak
for anyone who's interested, @RubberDuck is telling a story in chat.stackexchange.com/rooms/27598/the-cronicles
 
12:57 AM
oh wow, yesterday's drama has just earned me a [badge:reversal] on meta!
3
 
1:31 AM
C++ question coming soon
 
Ok. Story time's over. Night @all.
 
thank you Santa!
 
night!
 
Night.
 
Night!
 
Zak
1:38 AM
'nite
I just rolled over in bed and nearly squashed Mystery Cat
 
Oh dear
Hmm, scratch that C++ question. I have to write a few tests.
But it won't be long.
 
Zak
when I look at my old code:
 
When I build a C++ project and there are 26 errors on the same line:
 
2:03 AM
> I don't often pimp, but when I do, I'm usually pretty proud of my answer...
0
A: E-mail testing code

PhrancisFirst, heed what Jeroen Vannevel said; it will save you much grief. I'll address the code as-is, even if the purpose of it is not necessarily a workable idea. It's a good exercise in working with Strings. Variable naming Let's start here... String email=""; int at1=0,at2=0; in...

 
Alright, the question's been posted.
Enjoy
Now if the feeds would just catch up.
Meh. #PimpAQuestion
0
Q: Simple RPG Skeleton, Part 1 - The Entity, and a SpecType

Ethan Bierlein This question is a followup to Simple RPG skeleton, Part 1 - The Character. This is the second "part" of my development of this skeleton, and it now includes two new classes, Entity, and SpecType. The Entity class essentially serves as a base class for any character-like object, and has th...

Anyways, I'm heading off to bed. Night!
 
Later!
 
1
Q: Simple RPG Skeleton, Part 1 - The Entity, and a SpecType - follow-up

Ethan BierleinThis question is a followup to Simple RPG skeleton, Part 1 - The Character. This is the second "part" of my development of this skeleton, and it now includes two new classes, Entity, and SpecType. The Entity class essentially serves as a base class for any character-like object, and has the foll...

 
Zak
time to see if I can'tcatch some more sleep :) bbl
 
2:19 AM
'night!
 
2:48 AM
@Phrancis
 
... beautiful
 
yes!
0
Q: Commodore-FizzBuzz

Mat's MugI felt nostalgic recently, and decided to install a Commodore-64 emulator. C-64 BASIC 2.0 is the first language I ever programmed in... some 20 years ago (yes, C-64 was already well beyond deprecated by then). Implementing a simple fizzbuzz in such a limited language, and un-learning pretty much...

> This will sound very weird, but it's actually a pretty big concern with C-64 code, so don't laugh (ok, laugh, but it's not a joke): how's my line numbering?
 
Ok, that's what I thought... I actually didn't kniw about codereview.se Thanks for telling me — der_michael 43 secs ago
Hey Dren, this is probably better off at CodeReviewScottMcGready 46 secs ago
 
oh crap, just saw this one:
15
Q: FizzBuzz in Commodore Basic

Mark1 REM 2 REM FIZZBUZZ IN COMMODORE BASIC 3 REM 10 FOR I = 1 TO 100 20 IF (I/3)=INT(I/3) THEN PRINT "FIZZ"; 30 IF (I/5)=INT(I/5) THEN PRINT "BUZZ"; 40 IF (I/3)<>INT(I/3) AND (I/5)<>INT(I/5) THEN PRINT I; 50 PRINT 60 NEXT I I'm not happy with the tests for "multiple of 3" and "multiple of 5". Us...

 
@Mat'sMug I was about to say, it looks like there's more to line numbers than just... line numbers
Wow, you actually had to make your own modulo? lol!
 
2:55 AM
This is off topic for a variety of reasons. Questions about refactoring working code are best asked on codereview.stackechange.com, but this still wouldn't be a good fit - your question needs to be self-contained and answerable without opening any external links, such as a Github repository. — meagar ♦ 58 secs ago
 
there was no modules.. the only way to "modularize" C64 code was to jump line numbers; I usually went with 1000's, and always left "free" line numbers in-between instructions, to "insert" a debugging instruction
@Phrancis and yeah... no % operator!
 
What's the GOSUB command for?
 
GOTO is a one-way ticket. GOSUB comes with a RETURN ;-)
 
2
Q: Commodore-FizzBuzz

Mat's MugI felt nostalgic recently, and decided to install a Commodore-64 emulator. C-64 BASIC 2.0 is the first language I ever programmed in... some 20 years ago (yes, C-64 was already well beyond deprecated by then). Implementing a simple fizzbuzz in such a limited language, and un-learning pretty much...

 
@Mat'sMug OIC, cool!
 
3:04 AM
Very long day...
 
@nhgrif what's up?
 
I drive 5.5 hrs
From roughly Little Rock to roughly Nashville
arrived at 10:30. Was in meeting with client until 5:30ish
then socialized with my coworkers at this office for a bit, then went to dinner with CEO and his wife
and tomorrow, I'm driving home.
 
wow
 
Damn long day indeed
 
And our client is talking about adding a lot more to the contracts they already have with us
They want 19 devs just to write QA automation stuff
 
3:14 AM
That sounds like great news.
Is this the client that can't afford to re-write their app from scratch?
 
There's a difference between can't afford and can't justify the cost.
 
I know the difference, I guess I didn't remember which term they used.
 
Anyone have time for a regex question?
private static String removePunctuation(String input) {
    Pattern pattern = Pattern.compile("([A-Za-z]?[\\-']?[A-Za-z])+");
Problem is, I'll use it on something like text = readUrlTextContent("http://textfiles.com/stories/antcrick.txt");
 
I feel that you're abusing this site as a homework checker. You have a significant amount of questions, but no answers (which isn't even a bad thing). But this site is not well suited to repeatedly address the same problems in the skeleton code you recieve. Additionally the assignment restricts the usefulness of design based answers. While it's not bad to flex your fingers, I think that reviewing code you cannot challenge the design decisions of is not going to help you anymore. — Vogel612 5 hours ago
 
        String[] splitWords = text.split(" ");

        int index = 0;
        for (String word : splitWords) {
            if (word != null) {
                word = removePunctuation(word);
                System.out.println("[" + index++ + "] " + word);
            }
        }
When I use like this^ it includes a bunch of white spaces (assuming consecutive white spaces used for indenting a title or paragraph beginning)
> [0]
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23] THE
[24] ANT
[25] AND
[26] THE
[27] CRICKET
[28]
[29]
[30] Once
[31] upon
[32] a
[33] time
Am I experiencing a regex problem or is it a String.split() problem?
Ohhhh thanks so... text.split("\\s+");
(sorry @ all for the bother, should've checked SO first ):
Now just one more thingy... "It's me - the cricket" splits as
 
3:35 AM
I'm about 90% certain you can't get null in a forin loop...
 
[315] It's
[316] me
[317]
[318] the
[319] cricket
And... I think it's because I'm applying the regex after doing the split, which means [317] is originally - but then gets erased
 
@overexchange Yes, there is a tag on this site. My take on what @Vogel612's comment is saying is, fill-the-blanks homework questions are not ideal for this site, because the answers you need to get are "staged" - they need to go against the criterion of the assignment, regardless of what the common best practices are. CR isn't a site for evaluating whether your homework is done right, it's a site to get your code peer reviewed; there's a difference. Please feel free to take it to meta
 
Professors are notoriously behind the times & standards.
3
 
^^
 
Not only is it the part between the blanks that is most in need of reviews, but if you offer up code that we improved to modern standards, you'll probably get a worse grade than if you just didn't have it reviewed here.
I mean, there are plenty of colleges that offer VB.NET and don't offer C#.
 
3:46 AM
wut
TTGTB
(you too @nhgrif! ;-)
 
4:47 AM
0
Q: Applying prepare statements

user3907211I don't feel that my code is secure, and would like some help in using prepare statements for the following; $track = "INSERT INTO resources_record (name,email,stage,format,topic,max_cost,mentor,total_cost,duration) VALUES ('".$fullName."', '".$email."', '".$stage."', '".$format."', '"...

 
Wow, this is starting to work like I want it to, finally
 
5:36 AM
0
Q: How to optimize a json parser?

YangFanI've write a C# json parser. But its performance is not good as Json.NET. Run the same test, my parser cost 45 ms and Json.NET cost 32 ms. What should I do to optimize my json parser ? I know this parser don't support float and negative number, but it doesn't matter.

 
@CaptainObvious must be asleep
0
Q: "ONCE", "UPON", "A", "TIME"

PhrancisI'm working on a small program to perform various tasks on text content, primarily at the word level. I wrote these methods as ways to help prepare the raw text file into something more malleable, like a List<String>, where at a later point I can perform various routines such as counting and sort...

lol.
~rejects bad title suggestion~
 
0
Q: "ONCE", "UPON", "A", "TIME"

PhrancisI'm working on a small program to perform various tasks on text content, primarily at the word level. I wrote these methods as ways to help prepare the raw text file into something more malleable, like a List<String>, where at a later point I can perform various routines such as counting and sort...

0
Q: is there a maximum of loops in c programming?

meowtumnThis program is supposed to determine the day of the week for 2015 but when I run the program it won't display the months January and February. I'm still a beginner in programming. Could someone tell me a method I could use to shorten my code. #include <stdio.h> #include <conio.h> void findDay...

 
5:56 AM
@CaptainObvious @200_success I was about to let the OP know they might want to check SO, as they appeared to admit the code was not working correctly; does it actually work, that you know of?
> This program is supposed to determine the day of the week for 2015 but when I run the program it won't display the months January and February.
 
6:13 AM
@Phrancis lol
 
I ran the program, and it actually worked fine.
 
Oh, hi! A fish!
 
hello, fellow fish
 
@200_success Ah ok, thanks for clarifying
 
6:22 AM
no IE I don't want you to be my default browser
2
 
6:34 AM
0
Q: Batching using Semaphores

user3931896I need to batch messages when pushing them , private String[] eventArr = new String[100]; private int idx = 0; private final Semaphore publish = new Semaphore(100, true); private final Semaphore turnstile = new Semaphore(1, true); public void publish(String data){ try { boolean ...

 
7:02 AM
Monking
I will shamless pimp my answer to @Mat'sMug commodore basic question !
0
A: Commodore-FizzBuzz

HeslacherFirst off, thank you for remembering me of the good old days ! BUG alert Well, it is not really a bug, but as you know the % suffix indicates that the variable will be an integer 2010 FOR X = MIN% TO MAX% 2015 LET RESULT% = STR$(X) 2020 LET FB% = FIZZ%*BUZZ% but you are assigning the re...

now coffee
 
0
Q: How to optimize the if condition in my code?

Naveen KumarI want to know is there any way to optimize the two if conditions present in the following code.I edited and paste a snip of my code here. int choice() { int retval=-1; bool var1=0,var2=0; retval=func1(&var1,&var2); if(retval<0) { ...

 
7:33 AM
Welcome to Code Review, I hope you'll get great answers! =) — janos ♦ 1 min ago
 
7:58 AM
0
Q: How can the efficiency of this R code for web scraping be improved?

CFMI am using this R function to web scrape data from the google play store. Is there a way to increase its efficiency using R? This code takes about 4 seconds for 14 urls with my machine/internet connection. Any suggestions would be highly appreciated. library(rvest) library(RCurl) library(fo...

 
Zak
Monking @all
 
Greetings
 
This might be better suited for codereview.stackexchange.comgermi 52 secs ago
 
hey you two
three, sorry @Duga
 
Greetings dude
 
8:11 AM
@Malachi Congratulation for finally reaching 20K ! Now you are trusted !
7
 
Damn, it took him 2 years and 10 months! :/
 
Monking
 
Greetings
 
0
Q: java code for different date formats

Pranav Nathpublic Long timeDifference(String weboutput) { try { Calendar calendar = GregorianCalendar.getInstance(); Calendar today = new GregorianCalendar(); Date inputTime; if (weboutput.length() <= 10) { // for data fetched for current date. DateFormat form...

0
Q: How can I make this code shorter?

memThe goal here is to, add a credit card image, and remove all other credit card images, of a certain input field. I had a even larger code, with a lot of addClass() and removeClass()... then, I shrink it until I have this. Still, I feel it's still a huge block of code. The point here is to short ...

 
Zak
8:48 AM
seems a bit quiet this morning
 
It's usual in the morning
Around 10:30 - 11:00 UTC it will get more active
 
Zak
true. All the east coast people will start coming online
 
East coast?
Of what continent?
 
Need to deliver assignment before 18:00 here (that's in 7 hours) and the site is now already dead :D It's a course with 1500 students
 
Nice!
You should take printscreens and attach with your assignment
 
8:59 AM
If it's not up soon (tm) then I'll just mail it to the course coordinator
He'll have 1500 mails, not fun for him :P
 
Not your fault
 
Zak
@IsmaelMiguel The Americas
 
Oh, right
That'll take a while
 
Congratulation for becoming a mod @janos you deserve it!
4
 
Zak
I guess it depends when they all wake up :)
 
9:09 AM
I guess this is bad if you're using Git
48
Q: Complex git branch name broke all git commands

ruipachecoI was trying to create a branch from master with the following command, git branch SSLOC-201_Implement___str__()_of_ProductSearchQuery when Git suddenly stopped responding. I suspect the unescaped () must have done something to it. Now, whenever I try to run any Git command, I get the same err...

@Heslacher Oh wow, I totally hadn't noticed that, congrats @janos!
 
I just checked meta and saw the post from pops
 
@Zak Yeah, some are crazy enough to wake up at 6am
 
Zak
We're not always crazy :)
Or maybe we are, who knows.
 
But aren't you from UK?
 
Zak
I am
 
9:14 AM
Then why you said "we" when we're talking about USA?
 
Zak
I was talking about waking up at 6am generally
 
Oh
Today I woke up at 5am, less a few minutes
Thanks to that, my head feels like it's being crushed
 
Zak
ouch. I think I was awake, briefly, around 6am, but I'm not sure. Very intermittent sleep last night.
In the end, didn't get out of bed until about 08:10
 
I got up at 8:06
 
Get in bed at 1am, get out of bed at 8.15am, everything was okay :)
Getting in/out bed pretty much means falling asleep/waking up
 
Zak
9:18 AM
@skiwi Those are always the best :)
Very frustrating when you're trying to go to sleep, and you're still awake 2 hours later
 
Nice, finally this web page is not infinitely loading anymore
> 504 Gateway Time-out
nginx/1.9.2
@Zak Yeah... and I mildly panic when it takes 5 minutes for me already
 
I went to bed at 11:10pm, fell asleep at almost 3am, woke up at almost 5am, fell asleep and woke at 7:55am and stayed in bed till 8:06am
 
Zak
@IsmaelMiguel I don't know exact times, but my night was very similar
didn't help that Mystery Cat waltzed in sometime after midnight
 
I couldn't fall asleep so I started talking with a girl
She was answering REALLY slowly
That usually helps to fall asleep
Not this time
 
0
A: How can I make this code shorter?

memI can't comment, so I have to write an answer as a comment. @ratchet freak: I don't understand how "cardTypeToClass[event.card.type]" will know what kind it is that we have to show. Care to explain a little further?

can we VTD this?
 
9:30 AM
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient reputation you will be able to comment on any post. — Quill 9 mins ago
The answered said he doesn't have reputation to comment
And wrote the comment as an answer
 
He is using a different user, but nevertheless its deletable
 
@IsmaelMiguel, it's a automatic comment part of the VTD system
 
You can still edit it
But I flagged as Not An Answer
Voting to delete won't help anyone, in my opinion
 
Deleted
 
9:38 AM
0
Q: Sorting linked list using quick sort

Shubham AggarwalI was recently trying to implement quick sort to sort a linked list. But I have some issues and doubts about it. 1) Isn't moving around nodes to sort the given list expensive? 2) If I am required to solve a linked list by quick sort, is it okay if I traverse the list store the elements in an ar...

 
hey guys, thanks Heslacher and skiwi
I'm at work, so staying on the low-low
 
How low is that?
 
but I'm never too far away (a ping away, to be specific :)
 
Who signed up for:
 
Don't worry
 
9:42 AM
957
Q: Warlords of Documentation: A Proposed Expansion of Stack Overflow

Kevin MontroseIt’s been 7 years and 10,000,000+ Questions since Stack Overflow was launched. The amount of good that has been done for the field - all the developers helped, all the person-hours saved, all the beginners who grew into professionals - is hard to overstate. I cannot express how proud I am of what...

 
I find it a terrible idea
But I find it a good idea
 
contradiction out of 10
 
you contradicted yourself
 
I know
Imagine what it would be like to serve your code with extra documentation and a tad of bloat in the markdown
But the result would be cool
You could post the function name, add a link and done
 
9:47 AM
it does have issues, of which, are listed in the form of answers
 
I know
 
It'd be better than the PHP docs, at least
 
The PHP docs aren't bad
They just miss examples
And some key points
 
Also, code review questions are off-topic. They should be posted at codereview.stackexchange.com — Panagiotis Kanavos 22 secs ago
 
The Brazillian version is a total garbage
 
9:49 AM
they have user submitted examples that often abuse/misuse the functions
 
That too
But seriously, the Brazillian version even has incorrect texts, usage and there's nothing good in it
That's what worries me the most
StackOverflow BR full of BR broken documentation
 
-2
A: Combine / Extend two objects with condition

Jordi Castillaactually you don't have array's, you have JSON objects. Parse the objects like: var obj = JSON.parse(array); Then you will be able to refer to each attribute by name: var array1Oid = obj.Oid; // 'ff2d344e-77e8-43b3-a6f3-bfba577d6abd' After you will be able to mix the arrays as you want.

 
And it was an 8k user
Saying things like "JSON objects"
 
That's like people that say ATM machines
 
9:53 AM
PDF file
 
Actually, it's worst
 
@IsmaelMiguel rep != skill || understanding
 
atually isnt PDF a portable data format and not portable data file
 
It's like saying a car is a set of wheels
 
8k user with 2 gold badges
 
9:54 AM
Portable Document Format (PDF) is a file format used to present documents in a manner independent of application software, hardware and operating systems. Each PDF file encapsulates a complete description of a fixed-layout flat document, including the text, fonts, graphics and other information needed to display it. In 1991, Adobe Systems' co-founder John Warnock outlined a system called "Camelot" that evolved into PDF. While Adobe Systems made the PDF specification available free of charge in 1993, PDF was a proprietary format, controlled by Adobe, until it was officially released as an op...
 
my bad then
 
Zak
I would still just say a PDF anyway
 
.mov movie file
 
Nobody says that
 
9:55 AM
because nobody uses .mov, lol
 
I use the container MKV with the codec h264
 
That poster also has 600 answers
with only ten with negative scores
like 300 with zero scores
 
Weird
 
no
it means that their answers are mediocre
 
Zak
that's what, an average answer score of 1.3?
 
9:57 AM
Maybe
SEDE could probably tell you
 
Zak
8,000 / (600*10)
+_ for rounding, so somewhere between 1 and 1.5
that's a LOT of mediocre answers
 
Well
Based on that answer, I'm not surprised
 
@IsmaelMiguel I'm not so sure that will work with multiple values. I suggested lodash because I thought he might have an array of those values
 
I think it will work
Both objects have different values
And he says "Now I want to bind these Objects together"
 
no, I mean, say that he has to do this over a set of objects
thats how I interpretd it anyway
 
10:03 AM
The question isn't that clear anyway
 
lol
the guy who I was like "wtf" to
just downvoted two of my oldest questions
 
@ARedHerring, I didn't even notice your name change until now, lol
 
@Quill :-)
 
I feel like a bit of a bird-brain ;-)
 
I have an average score of 0.5 across my js answers... :(
@IsmaelMiguel here's what I came up with (if OP is using arrays instead of just 2 objects)
function merge(source1, source2, omittedFields) {
  return lodash.zipWith(table1, table2, function(previous, next) {
    if(previous.Oid === next.array_ref) {
      var nextWithoutId = lodash.omit.apply(null, [next].concat(omittedFields));
      return lodash.assign(previous, nextWithoutId);
    }
  });
}
const zipped = merge(table1, table2, ['array_ref', 'id']);
obviously... that requires knowledge of the object, so'd probably want a "keySelector" parameter too
 
10:13 AM
wells wasn't expected to get this close to rep cap again... just +6 more votes...
going to stalk for more interesting [tagged:java] questions today...
 
@ARedHerring You could look at my questions on
 
I get the feeling there's a way to improve this regex: /([a-z]?[\-']?[a-z])+/gi, but I'm not sure.
 
@Quill what is it trying to do? give example matching input
 
/**
 * Remove punctuation marks from a String using regular expressions.
 * <p>
 *     This will account for contractions such as "it's" and "can't", as well as
 *     hyphenated words such as "first-class" and "low-budget", which in both cases
 *     will be considered as whole words.
 * </p>
 
10:15 AM
Java?
 
my hunch (i.e. untested) is that [\-'] can be rewritten as ['-]
ah
 
@h.j.k. yep, looks fine
 
original expression is
/([A-Za-z]?[\\-']?[A-Za-z])+/;
this has a different meaning to the one you've got, @Quill
specifically your one will not match capital letters
 
that's what the i flag is for
 
10:18 AM
interestingly,
SyntaxError: Invalid regular expression: /([A-Za-z]?[\\-']?[A-Za-z])+/: Range out of order in character class
 
@ARedHerring I had to remove a `\` to get regex101 to even look at it
 
yeah, that makes sense..
\\ would escape the backslash
 
it will because of /i
 
@h.j.k., no, it's because of \\-
 
was referring to case sensitivity matching
 
10:20 AM
\\- translates to \-, and that matches the character ` but -` is the character class operator
oh
 
lagggg
 
my bad
 
:D
 
@h.j.k. ;-; i cri errytim
 
i'm just +3 to rep cap
surprisingly close
 
10:21 AM
5
A: "ONCE", "UPON", "A", "TIME"

h.j.k. In splitTextStringIntoWordList I found myself having to split textString param into String[] array, and immediately afterwards adding the elements from the array one at a time, parsing with regex, into a List<String>. Is there a better way to do this that might not need as much manipulation? ...

*achoo*
 
that regex confuses me
 
Would that work
 
it's a bit dense, although it brings the steps down
 
Zak
@h.j.k. have some upvotes :)
 
10:26 AM
You shouldn't use capturing groups when you don't need
 
that regex101 is fantastic..
 
the website?
 
@ARedHerring It is. It even has unit testing and substitution testing.
 
Here was me writing out tests in node
 
10:27 AM
Tests for regular expressions?
 
Now you don't have to
 
I had a set of words and it would just iterate through words and determine if the regex matched them
 
Ouch!
 
var words = [];
words.map(function(word) { assert.ok(pattern.match(word), `did not match ${word}`); });
nothing too complex
 
10:32 AM
Still
 
@IsmaelMiguel The PHP documentation is not too bad if you also take the time to read the user-contributed commentary.
In the English version, at least.
 
The English version is fantastically written when compared to that butchered Brazillian thing
Sometimes, the text is really wrong
 
@Zak hey thanks for your support :D
 
There's a lot of 'here's the code, no explanation' though
 
Where?
 
10:36 AM
in the user examples
 
The examples should be really clear
If they are clear, no need for more chatting
 
testing for regular expressions... so they like to deal with two problems eh
or three
 
But we know that doesn't always happens
@h.j.k. There's regex101.com, which has unit testing. That's 2 problems down
 
0
A: "ONCE", "UPON", "A", "TIME"

QuillA few things: if (matcher.find()) { return matcher.group(); } else { return ""; } You could swap this with a ternary: return matcher.find() ? matcher.group() : ''; You could consider adding the case insensitive flag to your pattern to avoid blocks like a-zA...

Is my last point a bit pointless/unnecessary/wrong?
 
@Quill my god the regex api for java is awful.
I would have assumed you coudl do
 return matcher.group() || "";
but for some reason, they decided "lets throw an exception for a perfectly valid scenario!"
 
10:41 AM
@Quill normalizeWord() is in 200_Success's answer... you referring to that?
 
That's why it felt wrong, I was reading the wrong post
Thanks for spotting that, @h.j.k., you're a lifesaver
 
cheers
and rep cap
 
@h.j.k hooray :D
 
:D
 
@Quill you'er always posting music, got anything fast-paced (+ instrumental) for coding?
 
10:48 AM
maybe
most of it is Japanese
 
im cool with that
Hm, not my thing, but thanks anyway :P
 
Do the mods directly handle tag blacklisting -> e.g. write the text to be displayed, it requires no CM intervention. Or do they just submit them to the CMs?
 
Submit them to the CM's
 
ok, thanks
 

« first day (852 days earlier)      last day (3166 days later) »