SV650.org - SV650 & Gladius 650 Forum



Idle Banter For non SV and non bike related chat (and the odd bit of humour - but if any post isn't suitable it'll get deleted real quick).
There's also a "U" rating so please respect this. Newbies can also say "hello" here too.

Reply
 
Thread Tools
Old 01-12-06, 04:47 PM   #31
Baph
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Grinch
looks wrong to me... nothing in particular... just wrong.
That's actually the BETTER way to do it, otherwise I'm messing big time with an app that takes me around 15mins to just build. That, or I'm overriding the formatter complete, and the guys at Sun probably wouldn't like me for that (but my opinion of their function will stay off the forum...)

Anyway, I'll stop de-railing now

P.S. You were right, it is wrong. pattern[17] matches against ALL elements of matchingRegex[].
  Reply With Quote
Old 01-12-06, 04:52 PM   #32
Grinch
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Baph
Quote:
Originally Posted by Grinch
looks wrong to me... nothing in particular... just wrong.
That's actually the BETTER way to do it, otherwise I'm messing big time with an app that takes me around 15mins to just build. That, or I'm overriding the formatter complete, and the guys at Sun probably wouldn't like me for that (but my opinion of their function will stay off the forum...)

Anyway, I'll stop de-railing now

P.S. You were right, it is wrong. pattern[17] matches against ALL elements of matchingRegex[].
no worries.. glad to help...
  Reply With Quote
Old 01-12-06, 04:54 PM   #33
Viper
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by Grinch
Quote:
Originally Posted by Baph
Quote:
Originally Posted by Grinch
Bloody Java's memory leaks are causing me stress...
Grinch, just for you....

Code:
private String buildStrictRegex(String format){

        	String[] pattern = {"yyyy", "yy", "MMMM", "MMM", "MM", "M", "dd", "d", "G", "ww", "w", "W", "DDD",
        				"DD", "D", "F", "E", "a", "ww", "w", "HH", "H", "kk", "k", "hh", "h", "KK", "k", 
        				"mm", "m", "ss", "s", "SSS", "SS", "S", "z", "Z"};
        	String[] matchingRegex = {"+[0-9]", "[0-9][0-9]", "+[a-zA-Z]", "+[a-zA-Z]", "+[a-zA-Z]", "+[a-zA-Z]",  
        			"+[0-9]", "+[0-9]"                                                                                        TOTAL ********     


        zA-Z][a-zA-Z]", "+[0-9]", "+[0-9]", "[0-9]", "+[0-9]", "+[0-9]", "+[0-9]",
        			"[1-5]", "[0-9]", "[a-zA-Z][a-zA-Z]", "+[0-9]", "+[0-9]","+[0-9]", "+[0-9]", "+[0-9]", "+[0-9]",
        			"+[0-9]", "+[0-9]", "+[0-9]", "+[0-9]", "+[0-9]", "+[0-9]", "+[0-9]", "+[0-9]", "+[0-9]", "+[0-9]", 
"+[0-9]", "+[a-zA-Z; ]-+[0-9]:+[0-9]", "-+[0-9]:+[0-9]"};
Is how the function starts....
looks wrong to me... nothing in particular... just wrong.
  Reply With Quote
Old 01-12-06, 04:56 PM   #34
Baph
Guest
 
Posts: n/a
Default

colour blocks don't work in code blocks, sorry
  Reply With Quote
Old 01-12-06, 05:23 PM   #35
PsychoCannon
Guest
 
Posts: n/a
Default

I have a nice cold server room where I hide, if I'm really desperate I can rack myself in one of the cabinets and re-boot
  Reply With Quote
Old 01-12-06, 05:53 PM   #36
Beenz
Guest
 
Posts: n/a
Default

My boss is in a different country... which is nice. I also have to travel between different offices, unfortunately I normally have too much to do to have a quiet nap.
  Reply With Quote
Old 01-12-06, 08:22 PM   #37
Luckypants
Moderator
Mega Poster
 
Luckypants's Avatar
 
Join Date: Jul 2003
Location: Nr Ruthin
Posts: 7,079
Default

Quote:
Originally Posted by Grinch
Quote:
Originally Posted by Baph
Quote:
Originally Posted by Grinch
looks wrong to me... nothing in particular... just wrong.
That's actually the BETTER way to do it, otherwise I'm messing big time with an app that takes me around 15mins to just build. That, or I'm overriding the formatter complete, and the guys at Sun probably wouldn't like me for that (but my opinion of their function will stay off the forum...)

Anyway, I'll stop de-railing now

P.S. You were right, it is wrong. pattern[17] matches against ALL elements of matchingRegex[].
no worries.. glad to help...
__________________
"Your Viffer sounds like it is raising hell! Spot on." - Witchery 17/4/08
Snow Plough Appreciation Society - Member #3

Luckypants is offline   Reply With Quote
Old 01-12-06, 08:31 PM   #38
timwilky
Member
Mega Poster
 
timwilky's Avatar
 
Join Date: Mar 2004
Location: Not in Yorkshire. (Thank God)
Posts: 4,116
Default

Quote:
Originally Posted by Grinch
Bloody Java's memory leaks are causing me stress...
What!


Poor C/C++ code give memory leaks, when coding in C I would look to free any constructs that I had created with a malloc call. Similarly with any C++ constructor methods a decent programmer should think about their destroy requirement. Like C#, because the java garbage collector collects unreferenced constructs you should not experience memory leaks as a result of the programming language. Therefore you either have poor code or an undersized platform and unfairly blaming the application because it is resource bound.


Yes I have seen **** poor java code. The same with c, c#, fortran pascal and numerous assemblers. Don't blame the language. Blame the programmer
__________________
Not Grumpy, opinionated.
timwilky is offline   Reply With Quote
Old 01-12-06, 09:49 PM   #39
philipMac
Guest
 
Posts: n/a
Default

Go away out of that with your ugly Java Regex Baph.
I would lash out that regex in perl 1/4 that length.

Does java not have an ignore case thing? like $pattern =~ m/MM/i or whatever. That would lose you a few elts from that pattern arr for a start.

Edit, yeah, totally fall asleep at work. If I am not coding, and am listening to a seminar, and the room is all hot, and the lights are down, and he is going through some fecking nucleoporin subunit protein that I have no interest in at all, for 30 minutes, yeah, my brain does a little ctrl-Alt-backspacing,
  Reply With Quote
Old 01-12-06, 11:33 PM   #40
Grinch
Guest
 
Posts: n/a
Default

Quote:
Originally Posted by timwilky
Quote:
Originally Posted by Grinch
Bloody Java's memory leaks are causing me stress...
Yes I have seen p*ss poor java code. The same with c, c#, fortran pascal and numerous assemblers. Don't blame the language. Blame the programmer
As I tend to look after the OS... normally I blame the application... In this a Java memory leak in SAP net weaver portal 2004. Oh and I blame SAP for not giving me any information and making me look for it and find it was something completely different...
  Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
falling off on ice richbeales Bikes - Talk & Issues 12 16-11-07 09:29 PM
What’s the best way to keep from falling over? zunkus Bikes - Talk & Issues 9 17-06-07 02:02 PM
Eyeball....were you lost or asleep? ASM-Forever Idle Banter 0 16-06-07 12:58 AM
Asleep at the wheel only careless, not dangerous? MiniMatt Bikes - Talk & Issues 5 05-06-07 07:16 PM
Pillions who fall asleep thor Bikes - Talk & Issues 68 05-05-05 09:48 PM


All times are GMT. The time now is 05:12 PM.


Powered by vBulletin® - Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.