« first day (1398 days earlier)      last day (1841 days later) » 

2:00 PM
@Unihedron you mean the guys who are mostly too incompetent to RTFM?
 
@Vogel612yes thanks. i however i am a novice at web and tomcat so only understood a little but thanks
 
@jgr208 lol no prob. Make a self answer out of it ;)
 
omg.
another [delete] question
 
Sam
Posts trade mark comment...
 
Stole it.
Did you read the [delete] tag's excerpt? It clearly says "This tag is deprecated! Please use a more specific tag instead." Please read tags more carefully in the future. Thank you. — Unihedron 8 secs ago
 
Sam
2:07 PM
Ah. Laptop's lagging again.
 
goes and asks another meta-question but not here ;)
 
Sam
Out of curiosity, what is your Q about?
 
default syntax highlights for
it doesn't highlight bool
 
Sam
sometimes it doesn't highlight var or using as well.
 
you need to add <!-- language: lang-csharp --> for it to work.
@Sam so this is a known problem also for here?
 
Sam
2:10 PM
Well, I've known about it for a few weeks now, I'm not sure if anyone's posted something about it though.
 
@Sam so... MSE??
It's bugging me like hell, you know?
 
Sam
I'd post it on MSO. Then if it's necessary Mods will migrate it.
Yeah ik, you get used to it, eventually.
 
hum...
 
omg
No i did not read the [delete] tag's excerpt. I only need answers to my questions. Please be cool. — eerol 1 min ago
 
Sam
lol
 
2:12 PM
Actually, before the split I posted something on MSO about asp-classic default highlighting.
2
Q: Add Default Syntax highlighting for [asp-classic] questions

Vogel612I just edited this question's highlighting and wondered why the default syntax-highlighting for asp-classic questions is one that does make ' a string and not a single-line comment. Thus I propose to introduce language: lang-vb as the default syntax higlight for asp-classic

 
Sam
Exactly, before the split.
 
yea it's mse now..
but the changes possibly affect all of the G3...
so I'm wondering.
 
Sam
Actually, since SO isn't the site that's about code, you'd probably be better off posting it in MSE.
 
lol my number of downvotes just outrated my upvotes.
799|807
 
Sam
lol
Just got an edit audit that added "Thank you re normalization you." to the end of the post lol
 
2:18 PM
facedesk
 
You guys surely know Eric Lippert right??
that guy has a quite suckish voting attitude..
it seems that he's only given a single upvote SE-network-wide....
 
Sam
What a scrooge.
 
well at least he's actively downvoting...
better than me...
 
Sam
I tend to flag more than DV.
 
He mentioned it was an accidental upvote too.
 
2:21 PM
currently my voting is ~10-20 votes per day network wide.
 
hehehe :)
 
I usually flag and DV, then the post gets removed, and I reclaim my vote :)
 
and I used to burn 40 votes daily on CR:
 
I run out of comment flags most of the time, and run out of votes on some days. on SO
 
Sam
I can vouch for that.
 
2:26 PM
What happened to the "solved in a way unlikely to help future visitors" close-reason?
 
Sam
Ah, they just renamed it.
Nm.
 
No, they gave it clarification so that it's less useful
 
Sam
Right...
 
Somehow I liked the old wording better.
 
2:29 PM
Same!!!!
 
How I despise people who ask a question, and then aren't even available for the next hour.
 
@Vogel612 On SO, make that weeks.
 
@Unihedron not around that much usually..
 
For the "despise" part.
 
Sam
Thankfully, for the tags I guard (browse) I haven't experienced that, yet...
 
2:33 PM
soo you are the c# guy, huh??
I kinda understand how you despise egyptian braces, but personally ....
 
Sam
And the [audio] guy, and the [wav] guy.
 
also.. it's java convention, soooo..
 
No.
Regex rules all!
 
Sam
I feel sorry for you Java devs.
 
you get used to it..
BTW, on CR we'd have lynched you for that edit
 
Sam
2:36 PM
I suppose so. I guess it's just what you're used to.
 
@Vogel612 Welcome to SO
 
Sam
lol
 
well I recently revisited a small timekiller of mine I wrote a year ago in c#..
and refactored it a bit...
but all my braces were Egyptian, my Method names got camelCased.
and I didn't have a single Property..
 
Sam
:O
 
so I refactored again..
made my public methods PascalCased and my braces "correct"
I even tried ref-passing a property but...
 
Sam
2:39 PM
Wait, pardon my Java ignorance, but don't you have properties in Java?
 
What do you mean? I'm confused.
 
Sam
A property. Like...
 
nope.
 
fields? modifiers?
 
Sam
public int test { get; set; }
 
2:40 PM
there's no properties in java.
 
Sam
The horror! :O
 
Oh. Nope.
 
you need to manually encapsulate.
 
Sam
That sucks. And you don't have pointers...
 
:(
 
2:41 PM
that's also why violations of the LoD in Java get so friggin Long..
compare:
Object.getField().getProperty().getValue().setSubprop(Object val);
Object.Field.Property.Value = val;
now add in descriptive names and you got the everyday java spaghetti-code ;)
 
Sam
For some reason, I don't feel like learning Java, ever.
 
@Sam well at least it's always the same..
imagine:
Object.Field.getProperty().Value = val;
 
Sam
(Don't forget to add meatballs to the spaghetti.)
 
@Sam always..
but hey, at least Java punishes you for violating principles.
and C# doesn't
Like "Well I can't really stop you from running through the whole Object hierarchy, but at least I will make it hell for you"
 
@Vogel612 False.
 
2:47 PM
vs. "What you wanna violate LoD? Here have some candy ;)"
@Unihedron how'd you do that then?
 
Field hack = Math.class.getDeclaredField("randomNumberGenerator");
hack.setAccessible(true);
hack.set(null, new Random() { @Override double nextDouble() { return 4;}} );
 
@Unihedron well reflection aside...
 
Sam
Interesting.
 
Should had mentioned that earlier. :)
Anyway, Math.random() now always returns 4.
 
Sam
Just like the xkcd comic...
 
2:51 PM
2
A: Random script that isn't actually random

UnihedronJava Shh, don't tell anyone. Secretly call the second method in your code, then call the first method. public String randomPerson() { String people[] = new String[] {"John", "Jeff", "Emma", "Steve", "Julie"}; return people[Math.random()]; } @SuppressWarnings("serial") private void ...

 
@Amession it is common when teaching beginners because makes it simpler, but it is a bit like avoiding the sex talk to your children because it is difficult. — Davidmh 3 hours ago
▲▲ 7 Upvotes...
 
Sam
lol
 
subject: don't go using namespace std;
Amession said: "My schoolbook's author actually recommends this"
 
Sam
3:13 PM
@jcolebrand Wb, how'd your bowling go?
@Unihedron I guess you don't have object initializers either in Java?
 
@Sam whazzzat?
 
Sam
For example,
var example = new MyClass()
{
    SomeProperty = val
};
 
not exactly that way..
IIRC we can make an anonymous inner static class..
 
You can do this:
 
but don't take my word on this..
 
3:16 PM
class TwoIntegers {
  int a = 0, b = 0;
}
 
(killing baby unicorns)
what he did is:
 
{
  TwoIntegers twoint = new TwoIntegers() {
    {
      a = 10; b = 2;
    }
  };
}
That's initializing the variables in an anonymous class
 
Sam
So a and b aren't actually pre-defined?
 
we can even call methods there.
 
yep
 
Sam
3:18 PM
Ah, I'm talking about,
 
well you can't initialize them to null as primitives.
 
Sam
Ignore that, still typing...
 
    class TwoIntegers {
      int a = 0, b = 0;
      TwoIntegers(int a, int b) {
        this.a = a; this.b = b;
      }
    }
  {
    TwoIntegers twoints = new TwoIntegers(10, 2);
  }
 
private static final HashMap<String, String> mapping = new HashMap<>() {{
    put("String1", "StringA");
    put("String2", "StringB");
}};
 
Sam
public class MyClass
{
    public int SomeProperty { get; set; }
}
...
var example = new MyClass()
{
    SomeProperty = val
};
^ Is that possible in Java.
 
3:20 PM
@Sam apart from the fact that we ain't got Properties, yea..
that's exactly what he shows above..
MyClass example = new MyClass() {{
       someField = value;
}};
eclipse complaining about missing serialVersionUID sometimes, though.
 
You use Eclipse?
 
@Unihedron yea..
 
Sam
lol. Right, so exchange the properties for fields and it's pretty similar.
 
Actually, the double curly brackets might be a bit confusing.
 
yea..
 
Sam
3:22 PM
Is it necessary?
 
I like to have them notated as I posted, but hey.
yea double is necessary..
 
Within new Type() {}, this pair of {} denotes a class level of the inner class ThisType.Type.1.
 
Sam
Ok.
 
At within a class level, another curly bracket: new Type() {{}} is method level - at an initialization of the invisible unseen stuff that Java keeps us save from.
Here's a more graphical representation:
All of this is optional as new Random() {}; actually works.
 
Sam
3:31 PM
Right, ok. Thanks for explaining.
 
gotta love stuff like
 
Sam
@metacubed & @rene Wb.
 
Hi
 
.addListener(() -> (){
     final int something;
     {
         something = 2;
     }
     @Override
     public void onEvent() {
          //do something
     }
 });
 
'Allo @rene and @metacubed
 
3:33 PM
@rene you seen my edit on the meta-answer?
 
@Vogel612 it's .addListener( new Listener() {
 
@Unihedron edit should work too, as of Java 8..
 
@Unihedron 'Allo 'Allo
 
Sam
Well, from my POV that looks more screwed than C#.
 
@Vogel612 not yet, let me check
 
3:34 PM
@Sam it is...
 
Sam
Such honesty lol
 
I should totally drop Java and try jQuery.
 
@Sam no use in trying to hide it. It's just as broken as Reflection API.
@Unihedron beware the madness of javascript "scope"
 
Sam
@Unihedron You should totally drop Java, jQuery & JS and try C#.
 
Alternatively you could go for scala instead.
or be "retro" and get into ANSI C
 
Sam
3:38 PM
Or just go low and learn assembly.
 
Assembly... May the true gods of programming bring peace to your soul
 
Hey all
 
Sam
Hiya
 
Heya
 
just catching up on history
Oh the Java bashing (tho I'm a C# guy myself)
 
Sam
3:40 PM
Same.
 
I do Java, but frankly there are aspects I dislike as well.
 
Sam
I was trying to understand Java's madness. But...
 
@Vogel612 I can't complain but I upvoted gnat's answer because I feel that really answers the question. Your answer and that of Anthony focus too much IMHO on the statement of Roman with regard to not wanting to debug code. I'm more on the side of Roman than on yours...
 
When you learn and use many different languages, you develop serenity & tolerance for the foibles of a language - Zen thought for the day
 
Right, there are decent reasons Java is not the best "first language to learn" nowadays.
It does too much and you almost don't know what's actually happening, just the mad syntax and insanity that somehow works.
 
3:43 PM
Now I need to share this here:
 
Room.asInstance("The_SO_Tavern_(Free_Snacks)").getInstance().define("user:Sam")‌​.ping();
 
Sam
Insanity seems to be the "glue" that keeps Java together.
 
@Sam xActly.
And these Java API library providers (especially JSON) has to go through and glue up everything with insanity... pain
 
Sam
new User { 5, "Unihedron" }.Ping();
 
3:45 PM
It's new User(){}, and methods in Java are all camelCase :)
 
Sam
That was my C# version. ;)
 
But Java has this weird temptation, it mostly lets you use static methods to invoke new instances.
Instead of giving you new Date(), it has you do Date.getInstance(), no new Integer(1) but Integer.valueOf(1), etc.
 
Sam
Weird.
 
Potential for reversal! A question I answered is at -5.
 
!!go
 
3:49 PM
!!cupcake
 
~ One cupcake on it's way for @Unihedron ....
 
Sam
You only need a mere 14 UVs...
 
> if memory serves they also dropped a few f-words when pointing it
 
Maybe I should add some traffic tags...
 
that should be the accepted answer, just for this sentence ;)
 
Sam
4:00 PM
!!coffee
 
~ 418 I'm a TEAPOT
 
Sam
Anyone listened to Dolby Headphone?
 
No, never heard of that band
 
Sam
lol :P
 
Sam
4:20 PM
I was just wondering if someone could compare my version against what a DH version would sound like.
 
4:33 PM
Interesting user:
And who knew, he really was user2212428
 
Sam
lol
 
@Unihedron With most rep on Skeptics...now I'm skeptical
 
Sam
!!autospellcorrect=enabled
 
~ WUT?
 
Sam
teesting
Hmm, didn't work.
 
4:38 PM
!!jump
 
~ What are you talking about?
 
!!gameofchess
 
~ WUT?
 
Sam
!!areyouhuman?
 
~ What are you talking about?
 
4:44 PM
 
Sam
Flagginated.
 
Somehow I'm on the lead of suggested edits review for the day!
 
Ha, you managed 21!
 
Hehe!
 
Sam
Congrats!
 
4:49 PM
hello
 
That happens if a post is deleted
 
Or if a 2k- -er edits your Community Wiki answer, which you have to review.
hiya @KalleH.Väravas
 
Sam
@KalleH.Väravas Welcome to the SO Tavern
 
yoyo
got new tires for the s class
but 20" = 3 hours of waiting, till they get it done..
 
It's extremely hard to get a suggested edits on MSO, though. Not that many 2k- -ers edits Community Wiki posts...
 
4:51 PM
so anyways, guys, i gotta problem with image url detection, could anyone put their eye on it?
 
What language?
 
regex:D
php
im missing some small detail
 
... What regex flavour / engine?
Oh.
 
my stuff is always php
im one hit wonder:D
!(http|https)://[^?#]+\.(?:jpe?g|png|gif)!Ui
this detects stuff nicely
 
Maybe you want to anchor it with anchors.
 
4:53 PM
but the problem is.. a big problem is that example.com/images/image.jpg?foo=baa
it lets the ?blabla=blabla stuff trough too
 
!^https?://[^?#]+\.(?:jpe?g|png|gif)$!Ui
 
doh
right
start and end
lol :D
 
test cases pls
 
wait, its a big portal, i have to shut part of it to standby
 
kk
 
4:56 PM
works
 
good
 
however, can I detect somehow, that there is something ?blabla=blabla behind it?
 
can do it with either another regex match or conditional
 
because, right now i will give out the regular your sh*t is broken error, but with that.. or even better
can i remove it on the fly?
so everything behind the jpeg png gif, thats the end, and will be cut off
 
regex replacement: /(?<=jpe?g|png|gif).*//
 
4:58 PM
@Sam pisspoor, thanks for asking! :D
90, 98, 118 I think it was
Get up to get my first turkey of the season (still ...) and I throw the ball like crap, knock down the ten pin
Get back up to get the spare, recover, and I knock down the 7 pin
 
wait, i will swap the hole thing out, isnt that too short? or is there even a point to check if the first partion of the url matches?
 
What do you mean?
 
is that the full regex?
on failed: lookbehind assertion is not fixed length at offset
 
Ah.
 
Sam
@jcolebrand Ah, that's a shame. Who'd you play against?
 
5:01 PM
Regex replacement: /(?<=jpeg|jpg|png|gif).*/ to null
I forgot about php.
 
im really sorry, but regexing and matching is like, my very very weak
but isnt there supposed to be like i or something at the end?
/(?<=jpeg|jpg|png|gif).*/i ?
 
i is case insensitivity.
 
@Unihedron this only matches strings that END at the jpg/png/gif border, like at a newline, no? The trick is to match anything else in the string and strip the part you don't want
 
The part we don't want is after the file extension
Oh I get what you mean now
10 mins ago, by Unihedron
Maybe you want to anchor it with anchors.
Keyword: Maybe
 
well this is working with regular images
but it still keeps the end
 
5:04 PM
Can I have test cases?
 
emm, the portal is sort of ... nsfw man
wait
i know what u want :D
 
Can I have normalized test cases? like rrrrrr.jpeg
 
give me a sec
yes
 
What you really want is a capture group
 
give me sec
 
5:05 PM
I don't recall the PHP capture group syntax
 
I was thinking that as well
 
in .NET it would be (stuff I want).*
 
Good thing we have
52
Q: Reference - What does this regex mean?

HamZaWhat is this? This is a collection of common Q&A. This is also a Community Wiki, so everyone is invited to participate in maintaining it. Why is this? regex is suffering from give me ze code type of questions and poor answers with no explanation. This reference is meant to provide links to qua...

 
is this what u wanted?
both should match.. but the last one without the ?test=blabla stuff
im learning actually quite alot new thanks to your help, but since the portal is so rapidly fast growing, i cannot trial-error it like, i learned php
 
Maybe you want this?
 
5:09 PM
PERFECT
 
~ Not everything is star-worthy...
 
Want to know a secret?
 
~ Stars get removed under peer-pressure?
 
You are not human, and thats why you are so good at it? :D
 
I didn't change anything than what your regex originally was.
 
5:09 PM
word?
hmmm
because this looks right
no seriouslly?
demit, its in the php somewhere.. and i custom built the cms... ohhhh mannn... and i didnt document anything:D it was meant to be a small project.. quick and easy, now there is like 1million code lines, its massive
 
Ah, sounds like you need a debugger, and a debugger to debug the debugger.
in Tavern on the Meta on Meta Stack Exchange Chat, 21 secs ago, by Unihedron
@TGMCians I closed my own question. Where's my badge?
 
Na its ok, Im used to this style of coding. Anyways thanks man. You actually by fixing the code up on the first try.. I see now, Im not using the match but still the original media_link
As when I tried to fix it and regex it before, there is the right code commented out with a note: i dont do regex
:D
thanks anyways, I will have it fixed in 10min
 
:P
Good luck!
 
But remember the regex before, that I sent via email. Do you think its the most optimal to detect image urls first, as first pass and then second pass the syntax and the regex u saw
because i dont think its humanlly possible to force too much detecting into one regular match right?
 
No idea. It'll probably fine. The guys at PCRE did a good job at optimizing their engine.
 
5:18 PM
Ok ok, I understand the problem now.. It doesnt detect it as image at all.. it goes to the next detection
and tells me that not the image url is problem, but the normal link is proken
broken
 
Are you using match or preg_match?
 
preg_match
if (preg_match('!^https?://[^?#]+\.(?:jpe?g|png|gif)$!Ui', $media_link, $image_matches)) {
crap im so wasted too, i cant even think straight.. i think i have to first match it not in the ifs
though it should still trigger the match
do you have any ideas atm? or i will just drop it for now and like kinda.. have a walk.. my brain is useless :S
 
Shouldn't be happening...
 
I'm reading off this tutorialspoint.com/php/php_preg_match.htm but it seems pretty convincing
 
5:26 PM
Yeah it doesnt catch it at all now.. Weird, but well, its good enough for now. I will hit at it once again in the morning.
Anyways, if you have time to check the email about the search syntax thingy. I could build the script behind it tomorrow then and do a patch release on saturday. Its nice to know somebody who drinks beer and likes regex :)
So anyways guys, peace im out, thanks for everything. Cya tomorrow.
 
I'm under-age to drink beer. Here at HKSAR you'd have to be adult to buy beer. I changed my mind and saved it up in case I need it. Thanks again!
See you
 
Lol :D man, now i feel stupid:D im 24 and u do regex better then me:D ive called myself a programmer the past 10 years, when i started making websites in php :D lol, life is funny:D
but buy something like.. strawberry icecream :D i like to code and eat icecream :D
anyways thanks man cya
tomorrow
 
Seeya!
 
Did we get it sorted then?
I was away
 
Yep, welcome back!
 
Sam
5:59 PM
@metacubed wb
 
6:09 PM
-10 4 mins ago removed User was removed.
 
Sam
I'm sure you'll make up for it tomorrow.
 
Not that I mind, just haven't gotten one of these notifications in a while.
 
Sam
6:25 PM
Dinner time, brb...
 
kk see you!
 
 
1 hour later…
7:32 PM
!!time
~ Thu Aug 14 2014 21:32:59 GMT+0200 (W. Europe Daylight Time)
 

« first day (1398 days earlier)      last day (1841 days later) »