« first day (450 days earlier)      last day (3560 days later) » 

12:05 AM
Guess not, I know I have multiple emails so I'll keep it.
 
You could end up with more down the road too. (i.e. 'Secondary')
That would be a good candidate for a natural key though. (If you decide to go that way.)
Email_Type_Id Text Primary Key
 
I'm really iffy about natural keys...
What if someone were to change, say, 'Business' to 'Main' then I would have to refactor every SQL function and likely the app too... whereas if it's 1 then no change other than what it displays in the result set...
 
12:21 AM
@Phrancis That's a great argument for surrogates. Just don't forget the unique restraint on the values.
 
does anyone have ideas about this question codereview.stackexchange.com/questions/58146/… ?
 
@ckuhn203 yes I almost forgot, thanks for reminding me
 
No problem. Man, I don't want to learn LINQ yet... I need another answer...
 
@ckuhn203 are you referring to codereview.stackexchange.com/questions/58224/… ?
 
Ew, LINQ...
I don't like it, but probably because I'm a DB guy...
Makes SQL-like queries look like gibberish.
 
12:35 AM
@mjolka Yes I am. It's a good answer. I like it. I just don't know linq yet.
 
12:50 AM
@ckuhn203 i think the best way to get in to linq is to browse through this page msdn.microsoft.com/en-us/library/vstudio/…
some incredibly useful ones: Select, Where, Count, Contains, Reverse, Range
 
Thanks @mjolka, but one thing at a time is all my poor brain can handle learning.
I'm sure I'll get to learning the library eventually though. It looks useful.
 
@ckuhn203 np, feel free to ping me if you have any C#/linq questions. i'll be lurking here all day
 
Actually. this sounds really stupid @mjolka, but how am I supposed to write a unit test that fails when my compiler is complaining that the function doesn't return a value on all paths.
I'm missing something here.
 
i believe unit tests should be of type void, what's the signature for your method?
 
Those compilers and all their complaining...
 
12:56 AM
        public static bool IsFactor(int dividend, int divisor)
        {

        }
 
It's not the test that's the problem per se. I don't know how to make this fail for a positive and negative test.
 
@ckuhn203 can you copy/paste the whole method?
 
These are the tests.
        [TestMethod]
        public void Test12True()
        {
            //2*2*3
            Assert.IsTrue(Numbers.IsFactor(12, 2));
            Assert.IsTrue(Numbers.IsFactor(12, 4));
            Assert.IsTrue(Numbers.IsFactor(12, 3));
            Assert.IsTrue(Numbers.IsFactor(12, 6));
        }

        [TestMethod]
        public void Test12False()
        {
            Assert.IsFalse(Numbers.IsFactor(12, 5));
            Assert.IsFalse(Numbers.IsFactor(12, 7));
            Assert.IsFalse(Numbers.IsFactor(12, 8));
Should I just put return false in IsFactor and then run Test12True?
 
cool, tests look good. if IsFactor as you pasted it is the entire method, just add "return false;"
 
12:59 AM
Ok, so then all of the Test12False would pass though. That's what I don't get.
 
oh i see
 
Just trying to wrap my head around TDD. I'm feeling like I'm missing something.
 
i believe that's fine. i think with TDD, it doesn't matter if some tests pass, you just want at least one to fail
so we write Test12False, and write the simplest version of IsFactor that will compile: the return false version. great, we have a passing test. now we write Test12True, and see that it fails -- this means we need to fix IsFactor
 
Ok. Maybe it just doesn't work so well for such a simple function. Maybe I need to be trying this with something more complex.
 
@ckuhn203 i found the bowling game kata quite helpful with TDD butunclebob.com/ArticleS.UncleBob.TheBowlingGameKata
 
1:14 AM
1
Q: Binomial coefficient

gd1I wrote a C++ function to calculate the binomial coefficient, trying to avoid overflows as much as possible. /*! * @brief Calculates the binomial coefficient indexed by n and k * * This implementation is based on the algorithm described here: http://blog.plover.com/math/choose.html * and the...

 
Three reviews today. Not bad.
 
Very nice!
I wrote 2 and posted a question.
 
I am also trying to get into the habit of writing shorter reviews, even if they end up getting "beat" by larger ones.
 
I'm a little disappointed though, the better of my two answers didn't receive the attention. Eyes on issue I suppose.
You think we're doing the right thing writing shorter answers?
 
0
Q: Pig Latin ( capitlization, numbers & Symbols)

user49975So I am trying to do a pig latin project, I have it translating and adding etc, but I am running into some case problems. when I type CASE it should translate to ASECAY but instead i am getting Asecay, any help on how to fix it? Also how do i make it not translate words that contain numnbers/symb...

 
1:28 AM
I have heard that larger answers can tell others that an ideal review should be long, and not everyone would like to take the time to write a long review. Plus, with shorter answers, there is room for multiple answers, which is a good thing.
 
I don't know if it's related, but I've noticed an uptick in activity from "the silent majority".
More answers, more people on meta. Even some people in here I've not seen around.
Subjective measure and all.
 
I have sort of noticed that, too.
Unsurprisingly, only the "top" users and mods got involved in the tag discussions, but such things do require more experience with the site.
 
I'm not sure your average user cares so much.
I mean, I don't care enough about SO to get involved with tag discussions, but I still use the site when I'm troubleshooting.
 
I know. I was just pointing that out.
 
1:49 AM
0
Q: Memory Leak happening when using static instance of GsonBuilder to create Gson instances

ChantzI am usong Google's excellent Gson library for doing JSON (de)serialization. I am making use of the GsonBuilder class to create Gson objects with custom serializers for certain classes. At later point after the code wad deployed suddenly I started getting Heap Overflow errors. So I studied the he...

 
2:15 AM
Oh boy. My solution to Project Euler 3 needs optimized. It's been running quite a while now.
 
0
Q: Access View from current/corresponding ViewModel, does this solution Violate MVVM?

AymenDaoudiSometimes when developing a WPF application, I need to access a certain Window (View) from the corresponding ViewModel , to perform or fire a method like this for example : //In the MainWindowViewModel MainWindowView.Hide(); But that's not really easy, and even it violates MVVM because the Vi...

 
Query returned successfully with no result in 499 ms. after refactoring.
 
2:50 AM
0
Q: Should I mock or fake my repository?

Caster TroyI have a controller called PostsController public class PostsController : Controller { private const int PageSize = 8; private readonly IPostsRepository repository; public PostsController(IPostsRepository repository) { this.repository = repository; } public Vie...

 
 
2 hours later…
4:27 AM
0
Q: SynchronizedArrayList implemented using reader writer synchronization

Anand PatelI am trying to understand the workings of reader writer locks. For the sake of learning, I implemented reader writer synchronization by my own. I implemented SynchronizedArrayList with reader writer synchronization. I set out with following objective: There can be many readers. There can only b...

 
4:41 AM
0
Q: Wow that's a big integer! What's it's largest prime factor?

ckuhn203I see that there are a few other people who have tackled Project Euler Problem #3. I hope you're not all sick of that question yet. I've not taken a look at those yet (purposely), but am about to now. I feel like I did a pretty good job on this one, but you tell me. How can I further improve th...

 
Thanks @Jamal! Stupid English language anyway......
lol. Looks like it. Poor @CaptainObvious must get lonely when we're not around.
 
4:59 AM
@ckuhn203 - I posted an answer to your bounty question ;-)
 
Oh! Cool @rolfl! I'll check it out.
It's a cool problem, and I thought the accepted answer was really good.
 
Well, I solve it as a 1-liner ... does that count?
and it is readable too.
 
I <3 math.
That's awesome.
 
Ugh, math
 
Jsut added an edit ....
@Jamal - yup, math, and this is simple stuff
promise
 
5:11 AM
It really kicked my butt the past two semesters or so. I could use some simpler math. :-)
 
return 1 + (startCount - Integer.highestOneBit(startCount)) * 2;
only 1 variable.
Time to sleep.
 
Perhaps I should make some math-related Java question (more math than circumference and area) before I go back to school.
2
 
@Jamal - how to deal with:
0
A: Simple random number generator

user49983dfdsfsdfa sfafsfsfsfsfsfsfsdfdfsf assdfsddfdfdf

flag it spam?
 
Good morning. :)
 
I think so. Shog has said that such users could be "testing the waters" for spam. Flag it and destroy.
 
5:16 AM
You see the userid?
 
Yes
 
49983 ....
nearly at user 50K
 
Wow, we hardly get crap like that. But that is a good thing.
 
morning @all
 
Uh oh. The "night" crew's rolling in and I have to be up for work in a few hours. I better get. Night@all.
 
5:26 AM
I'll be leaving soon, too.
 
good night @ckuhn203
 
Is this broken? It has just entered the close queue.
 
5:43 AM
Goodnight @chillworld. Talk to ya in about 5 or 6 hours.
Yeah @Jamal. It's broken.
Your program is not correct, so don't try to make it faster. There's no point in writing a fast program that gets the wrong answer. Try it with a smaller number. What does your program say the largest prime factor is of 12? (Hint: the correct answer is 3.) Until you can write a program that gets the correct answer, don't try to speed it up. — Eric Lippert Mar 20 '12 at 20:47
It doesn't return prime factors, just factors.j
 
@ckuhn203 mhh it's not like the OP saw that and it still compiles. gray zone here
 
@Phrancis Yes, it's overkill, for the reasons that cimmanon and I mentioned. Use an ENUM for the email type, or as cimmanon suggests, just make a table with one column: Email_Type TEXT PRIMARY KEY. The Email_Type_Id, as you've written it, will just be an annoyance when you write your app.
 
Yeah, but anyone who stumbles on it looking to solve it might not notice the comment. They're more likely to notice the big "this code is broken" bar.
It's no big. Takes 5 to close.
 
@200_success Why TEXT type? Why not VARCHAR(20)?
 
@ckuhn203 you are right and now off to sleep you ;) how the hell you can deliver good work without a good night rest :p
@janos are you sure that no emails are larger then 20 chars?
 
5:58 AM
Monking
 
monking @skiwi
 
@chillworld the field name is Email_Type
but I don't know what are the possible types here
 
@janos mhh to early in the morning with almost no sleep (kid was awake at 3 AM) get to such bad readings, mine bad
 
but I doubt TEXT would be the most suitable option
 
I should read the full context first before I say more stupid things ;)
 
6:04 AM
@chillworld no biggie. And good morning ;-)
 
time to smoke ;)
 
106
A: PostgreSQL: Difference between text and varchar (character varying)

Frank HeikensThere is no difference, under the hood it's all varlena. Check this article from Depesz: http://www.depesz.com/index.php/2010/03/02/charx-vs-varcharx-vs-varchar-vs-text/ A couple of highlights: To sum it all up: char(n) – takes too much space when dealing with values shorter than n,...

 
@200_success and we're talking about postgres specifically? Or is this generally true for all DBMS ?
 
0
Q: Chrome is not using Segoe UI Symbol for Unicode characters (e.g. 🎁)

kleinfreundAlthough Segoe UI Symbol 5.01 is installed on my system (Windows 7, 64 bit), Google Chrome has trouble using it for several Unicode characters. Example (wrapped gift): 🎁 As you can see, Chrome is not displaying the character by default. Only when I explicitly set the font to Segoe UI Symbol,...

 
6:34 AM
time to go to work, have a good day everyone
 
work well ;)
I'm already busy with working atm
 
Monking again
 
@janos PostgreSQL specifically.
 
6:51 AM
0
Q: Transform DataReader to List<T> using reflections in C#

gee'K'iranI have implemented the code to convert datareader to list of objects. My intention was to not to use column name string literals while reading the datareader. Below is my implementation: public static IEnumerable<T> GetListFromDataReader<T>(IDataReader reader) where T : new() { v...

 
7:28 AM
Any log4j2 expert here?
 
7:50 AM
Monking
and probably no...
don't see Donald around ;) But he's , you might want to ping him
 
@Donald.McLean ping
Maybe he is still asleep
 
well at least his pc is still running ;)
 
I'm starting to wonder if this was intentional by me
if (args.length < 1) {
    System.err.println("Invalid command line arguments.");
    System.out.println("Syntax: <CONFIG_PROPERTIES_FILE>");
    System.exit(1);
}
Note err vs out
 
oops
 
I think they should both go to err
I need to include company package name to all my projects (which I forgot), hope it will not break things, will not try yet though
I also need to create a database, but don't have access yet to the company test server due to issues, so local it is, meh
 
8:07 AM
aaarrrgggg how can you make a decent program when you have no decent design, just a model with flaws :s
 
@chillworld You remake the design.
 
@MadaraUchiha I can only suggest "design" changes :s
 
@chillworld Suggest them with a large shotgun in your hands.
 
@MadaraUchiha that sounds like a daft thing to do in a government building.
 
@Vogel612 You might need a tank in that case.
 
8:13 AM
sure you'd get away with it, but you wouldn't need any weapons in the first place.
and chillworld is not exactly the second rikudo...
 
@Vogel612 If I were talking about myself, I wouldn't have suggested such a primitive item such as a "tank",
My eyes are plenty enough.
 
that's what I am sayin ;)
probably sasuke and naruto'd show up too, and in the process, belgium would crumble to ashes.
 
I smell bug
[INFO] [2014-17-28 10:17:24] [pool-3-thread-2] [3094] [OrganizationConsumer] Accepting the file "D:\DPC2\4.ocr-done\3094".
[INFO] [2014-17-28 10:17:29] [pool-3-thread-1] [3095] [FileUtils] Moving "D:\DPC2\4.ocr-done\3095" to "D:\DPC2\5.organization-done\3095".
[INFO] [2014-17-28 10:17:33] [pool-3-thread-1] [3094] [RejectedConsumer] Accepting the file "D:\DPC2\rejected\3094".
[INFO] [2014-17-28 10:17:33] [pool-3-thread-1] [3094] [FileUtils] Moving "D:\DPC2\rejected\3094" to "D:\DPC2\manual\3094".
In logs\3094.log
 
@skiwi whooops something got mixed up..
but why the heck do you create a separate log for each ID?
 
looks like I'll need to write some custom stuff
 
8:20 AM
or asked different: Is there a central log?
 
Because else it'll be a hell to find
The current central log is System.out
 
um... centralLog.log | grep "[3094]"
 
The only point to have a central log is to search for exceptions I guess
I think logging is currently done per document, so shouldn't change it then.
 
@skiwi you have a point there ;)
brb break
 
0
Q: infix to postfix and infix to prefix: not ordering correctly

user49998when i type in a+b+c for an infix expression, I receive abc++ as my postfix expression and +a+bc for my prefix expression. However it is supposed to be ab+c+ for postfix and ++abc for prefix. I only receive the incorrect results when i am not using parenthesis. Any suggestions? import java.util....

 
8:32 AM
Using the appropriate mechanism it now seems to work even.
Yay, fixed it
log4j2.xml files are tricky for people having no experience with them
 
@skiwi poms are too..
or rather... any xml config is tricky for ppl. having no experience with the corresponding program
 
Though honestly log4j2 is pretty nice
I may have overestimated needed time with 16 hours to create a relatively simple database
But I can use the time for other things tha tneed to be done as well
Crap... how do I call a server component that is responsible for putting files in a directory with the filename as name?
Like 777.pdf -> 777/777.pdf
I thought about Package, but then figured I cannot have a package name called package
 
8:50 AM
WAT?
why would you need that??
 
So all related files are in the same directory
 
Isn't the filename enough as Identifier??
wait...
 
Nope
 
so there's also a 777.tiff?
 
It creates a hell of a hassle
 
8:51 AM
urgh.
 
@Vogel612 Yes
Move 777 vs move 777.pdf and 777.tiff
 
move 777 -r vs move 777*
don't you dare try to fool me ;)
 
:)
Unless you're working from within Java
and then files get lost
 
bleargh, this is getting worse and worse ;)
I pity you for the PITA assignment you got..
 
Trust me, in directories is way easier
 
8:54 AM
still a PITA..
 
how?
 
not the moving itself, but the process behind it... when to move what, logging, threading, manual recognition...
the whole story
 
Ah
Yea, it's a fair bunch
It's software for the whole server stack... not just a single component
The first stage isn't too bad to code though
public class PackageConsumer implements BaseConsumer {
    private final Logger logger = LogManager.getLogger();

    @Override
    public Logger baseLogger() {
        return logger;
    }

    @Override
    public void baseAccept(final Path path) throws Exception {
        logger.info("Accepting the file \"{}\".", path);
        Path newDirectory = Config.OUTPUT_DIRECTORY.resolve(FileUtils.getFileNameWithoutExtension(path));
        Files.createDirectory(newDirectory);
        logger.info("Created directory \"{}\".", newDirectory);
There should be a better way to increase a column by 1 every second for 200 columns, than to use 50MB RAM per minute and see it get recycled
 
9:21 AM
return fileName.replaceAll("^\\d", "");, why would this remove a leading zero in a string?
Huh, it removed a leading 050 even
 
it removed digits?
now who would have thought that..
what you want is [\\D] whcih is: [^\\d]
keep in mind, that when starting a regex, the ^ matches the beginning of line, if not in a class.
 
Heh
I'm confused
Ah
this was removing the first digit at every stage
 
@skiwi but after that it took the other digits too, because it's reapplied...
isn't it?
 
This could've gone worse in production... Suddenly first digit of filename disappearing everywhere else
Yep, it got through several stages
That's why there are tons of logfiles now :P
 
9:49 AM
Hey @skiwi i was just trying to change my overengineered Factory to use a map..
but I am stuck on returning a default impl
I don't want to do:
ModelConverter<T> impl = mappings.get(clazz);
if (impl == null) {
     return mappings.get(Object.class);
}
return impl;
but i neither want to return null...
also checking against the supported classes as mappings.keySet() would be redundant.
 
@Vogel612 Let me see, was afk a bit
Where exactly is that, what method?
 
ModelConverterBacking#get
as of your answer..
what I want is something like the C# way to do it:
return classMappings.get(clazz) ?? classMappings.get(Object.class);
 
I think think you should look in the backing
What if you add it in the ModelConverters#modelConverterBacking
exactly here
public static <T> String convert(final T input) {
    ModelConverter<T, String> modelConverter = INSTANCE.modelConverterBacking.get((Class<T>)input.getClass());
    if (modelConverter == null) {
        throw new IllegalStateException("No mapping found for " + input.getClass());
    }
    return modelConverter.convertToView(input);
}
Where ` == null`
 
that would be the proxying step..
i would want to fall back to AbstractConverter for that,..
 
Well the ModelConverterBacking is in my opinion nothing more than a map that provides compile time checks
 
9:57 AM
so I should rather put a proxy in there??
 
Yea, I wouldn't modify the ModelConverterBacking
Whyyy 2014-07-28 11:58:48,456 ERROR Cannot access RandomAccessFile {}) java.io.FileNotFoundException: D:\DPC2\logs (Toegang geweigerd)
 
OS blockade ftw--
 
I think it has to do with two loggers on the same directory
I thought it wouldn't make a difference
But program won't even boot like this
 
0
Q: Better Approach to Using/Storing Server Side Data on the Client Side

asprinFirst of all, please excuse me if this is not the right place for this. I've a slot booking script which is as follows: My Current Algorithm A calendar is shown to the user The user clicks on a date I make an ajax call to determine if at least 1 slot is booked on the clicked date I return back...

 
Fine, the OS wins, I'll just put it in a different directory.
 
10:06 AM
Monking
 
Monking
 
0
Q: Replacig div if there is any Validation error connected with div value

szpicI have a input-group: <div class="input-group"> <div class="input-group-addon"> @Html.DisplayNameFor(m => m.StorageId) </div> @if(ViewData.ModelState["StorageError"] !=null && ViewData.ModelState["StorageError"].Errors.Count>0) { <div class="a" title="@ViewData.Mo...

 
Off for eating ;)
 
enjoy
 
10:22 AM
Huh, what kind of recursion and try-finally sorcery is this?
public void visitClassDef(JCClassDecl tree) {
	boolean oldInValue = inValue;
	try {
		inValue = (tree.mods.flags & Flags.VALUE) != 0;
		super.visitClassDef(tree);
	}
	finally {
		inValue = oldInValue;
	}
}
 
Monking all...
@skiwi - that looks .... fishy
 
Monking @rolfl
It's in com.sun.tools.javac.comp.TransValues
 
0
Q: Creating mirror image with 2 loops and maintain proportional margins

user43251I have a 2 loops in CSS Stylus that I need to mirror: ul for num in (1..9) li:nth-child({num}) margin num px for num in (11..19) li:nth-child({num}) snum = num - 10 margin (10/snum) px The problem I have is that the result should look like this: However ...

 
Hmmm, it's an ugly way to implement things.
but, it is effective
visitor strategy
You guys seen the bountied Java question ;-) ?
I have taken it apon myself to confound ckuhn203
 
10:45 AM
0
Q: Using phantom types to represent amounts and exchange rates of currencies

RagnarLI'm submitting this piece of code to code review since it was suggested in response to another question on stackoverflow (https://stackoverflow.com/questions/24985896/creating-getting-a-value-instance-from-a-phantom-type), but I must say I'm not quite sure what's so wrong with it. Anyhow here's t...

 
11:27 AM
@skiwi back to what we had before lunch...
I can't avoid putting an if-condition in then?
 
@Vogel612 Well, the condition is already there, it just now throws an exception, and you want it to return a default object
Which you could add via backingStore.put(Object.class, obj -> whatever()); (Java 8 syntax)
 
meh, I kinda found my enum approach more obvious in that aspect...
 
Refactoring package names is uglyyy
 
Ummm.... Ctrl-Shift-R
 
well.. umm,... git status borkup
 
11:33 AM
@rolfl That's the easy part
checking if nothing got messed up while renaming/moving files and then all xml config files is the part where you need to pay attention
 
bleargh..
that's why you make eclipse netbeans run a fulltext search in all documents...
 
Make sure you do a full clean/revuild, we have, a couple of times, fallen victim to a class that was compiled with the old package, and then with the new package as well, and both were in the dev environment, and it took a full clean build to fail before we realised.
 
I always do full clean builds, I've had my fair share of issues...
 
We had one where everything worked, except for a tiny, hard-to-reproduce bug fix that was not there in the final build.
 
Ouch
and then a month later the bug occured again
 
11:37 AM
A bunch of the code was using the new class name, and the critical part was still using the old package.
so, at check in time, the code worked, but, later, it failed again....
combination of a bad merge in version control, and a not-clean build.
 
Even more messy.
That's why I like continuous integration, the tests get always executed on a clean build
This is my only grief about Netbeans currently:
import dpc2.base.excepcom.yob.tions.AutomaticExecutiocom.yob.nFailedException;
How on earth can it get messed up so badly.
It just literally merged the new package name randomly inside the old import
I've cleansed and rebuilt everything 10 times, should that be enough?
The sad thing about package names is that higher-ups really are not going to care that you spent half an hour changing all of them, but if you only have one wrong package name you'll get verbally killed.
 
12:18 PM
@skiwi US Eastern time. Yes, I was asleep.
 
@Donald.McLean Good morning then :)
 
Greetings, programs.
 
I've managed to get something working with log4j2, but it feels ugly
Take this:
<Routing name="LOGROUTING">
    <Routes pattern="$${ctx:documentId}">
        <Route>
            <RandomAccessFile name="LOG" fileName="${sys:DPC2LogDirectory}/${ctx:documentId}.log">
                <PatternLayout pattern="[%p] [%d{yyyy-mm-dd HH:mm:ss}] [%t] [%X{documentId}] [%c{1}] %m%n"/>
            </RandomAccessFile>
        </Route>
    </Routes>
</Routing>
 
I'm not a logging expert, and I don't even use log4j2, though I suspect it's very similar to Logback, which is what I do use.
 
Ah, mistaken there then
System.setProperty("DPC2LogDirectory", Config.LOG_DIRECTORY.toString());
LoggerContext loggerContext = (LoggerContext)LogManager.getContext(false);
loggerContext.reconfigure();
That seems to be the only way to inject a static variable
and feels ugly
(That is the ${sys:DPC2LogDirectory})
 
12:21 PM
Sometimes, stuff is just ugly.
2
 
I don't know how Logback manages this kind of things
 
I have a completely different way of setting up my logging, so I don't have to depend on whatever mechanism Logback uses.
 
You made a superior mechanism?
@rolfl Come on, solving problems with math is not fun there on the bountied question!
(Though it does make sense)
 
I don't know if it's superior, but I like it.
 
You did make it yourself though?
 
12:23 PM
Yes.
 
Though I like it, if you don't overdo the reinventing
 
And of course it's in Scala, and I do a lot more than just logging. There's an actor based event dispatcher, actor based TCP/IP communications, and a some other misc stuff.
 
@Donald.McLean Greetings, User
 
I think I have implicitly associated @Donald.McLean with Scala already.
 
All three of my questions are from that library.
 
12:29 PM
Time to improve my logging now, now I've improved how logging messages are being handled
 
@skiwi mysqli_fetch_assoc("Donald.McLean") returns "Scala"
 
"Donald.McLean".intern() returns "Scala"
(Yes, that's some messed up stuff then)
 
sorry did you just create an extension method to the type string in Java?????
 
@skiwi Scala isn't the only thing I think about. I hardly touched the computer at all this weekend.
 
12:44 PM
@Vogel612 No, String#intern has always existed
@Donald.McLean It's what you make us think, though I could imagine you're a human too!
 
@skiwi And of course, there's the fact that I've racked up almost as much rep on Harry Potter questions alone as all of my rep on CR.
 
That's... quite a lot I would imagine
 
@skiwi probably not as much as you think...
 
2500 is still quite some
 
Most of that's Java, where I have a tag badge.
 
Huh
> I think that the use of a LinkedList is not optimal. In every invocation of drainSource you potentially add a new DataBlock ant the end of the linked list; this has performance O(n) (length of the list). I propose to use a Vector instead of the LinkedList.
Isn't it quite normal for a linked list to internally hold a pointer to the last element?
 
@skiwi Yes.
 
Ok, though pure data structure technically it's not the case I think
What is this sorcery
object ERSTerminal extends EventRegistrationStatus("terminal")
 
The thing I thought was funny was the guy who was trying to tell me to slow down the server.
 
extending a named object
 
12:57 PM
@skiwi It creates an object (singleton instance) that is an instance of EventRegistrationStatus.
 
good morning @ckuhn203 :)
 
Hmm, I get what you are doing, though it's a bit confusing to me with Java
 
good morning @chillworld!
Do you know what ended up happening with that question?
 

« first day (450 days earlier)      last day (3560 days later) »