« first day (292 days earlier)      last day (4024 days later) » 

05:06
that alignas question is wierd
I can't tell if I'm missing something, or if the OP is really just overcomplicating it massively
Here goes nothing:
0
A: 10x10 bitmapped square with bits

JamalIndeed, that global array is not good. You'll need to pass around an array, but you shouldn't do it with a C-style array. Doing that will cause it to decay to a pointer, which you should avoid in C++. If you have C++11, you could use std::array, which will be set at an initial size. But if yo...

@Jamal I've been paying attention! Nice work
Thanks! That was a tough one. I used to review a lot of that user's work, and I hope he comes back to see this one.
He was last seen... October :/ Good luck!
yay, trusted use
user, even
05:19
No matter. Another zombie down.
1
Q: Actionscript Graph data structure implementation

Mr. PolywhirlSo, I am not sure if I should have Vertex extend Point, because the equals() and compareTo() functions are already parameterized with Point. I guess I don't really need compare to... Does this structure look good? I used a Map instead of a TreeMap because as3commons and the default flex packages...

@Yuushi congrats!
@Mat'sMug thanks!
0
Q: Is this an effective way to write strcat (string concatenate) in C?

dysruption char *cat_string(char *to_cat, char *destination) { char *copy = destination; while (*copy != '\0') { *copy++; } while (*to_cat != '\0') { *copy++ = *to_cat++; } *copy = '\0'; return destination; } Beginner with C - I would like ...

'night!
05:33
Cya later!
Goodnight! I'll update the answer feed.
And I have hit the cap. Save your votes!
05:47
Congrats on 4K, @Yuushi! :D
thanks @Jamal :)
Now you just need silver (and/or 10K).
heh.. ... and welcome Yuushi to trusted.
both of those are going to take a while I think
Yeah. But let's see what Santa has to offer.
05:50
Yuushi ... you will be skewing all the avid-user charts.
@rolfl how's that?
2
A: Call of Duty - We're on a mission

rolflNow that Stack Exchange Data Explorer includes the beta-site statistics, it is possible to plot and manage the site activity levels.... A question was raised in Meta to discuss options: Stack Exchange Data Explorer is up. What now, Wonderland? Some of the queries that have come up are directly ...

One less person in the 2000 band :(
ah :)
If you haven't noticed, we are sort of tracking individual progressions through he ranks, and the 2000 band is shrinking!
Just means we need more active new users
or newer, I should say
05:55
exactly .... and pushing people (by voting) up the ranks is what will lead to site graduation
0
Q: Ruby Using Win32API to get MouseWheel input

user3163916I'm trying to use win32api to get mouse wheel input on windows MSDN. I tried the following: @state = Win32API.new('user32','DefWindowProc',['i'],'i') p @state.call(0x0800) But it keeps returning 0 no matter what I do with my mouse wheel. I thought something is wrong with my mouse, so I trie...

Oh, this one is off-topic. I saw a "potential" edit before seeing that. :-P
07:02
Good morning. :)
Gotta gain a new 2000er soon-ish
Who is an Enthusiast as of today.
Morning! I posted a new zombie (though I'm capped now).
Bed.
You.
Eating. :-)
morning
Hey ;)
07:14
ah, I just want today to end now. I've fixed everything and it's all in a nice working state, now I don't want to touch anything
0
Q: In-memory cache implementation revisited

ChrisWueAs a follow-up on my earlier question, here is the new implementation. The major change is now that the base class just deals in ICacheValue values which are implemented by the derived classes and generated through implementation of a factory method. Unfortunately requires some casting in the de...

0
Q: How I can do this

Seshu KumarI am going to develop a project, where i want to use MVP pattern. I have completed all the layers, which falls in to the above mentioned pattern. Now when ever i have performed an action on the view, the action will trigger the Presenter and the presenter will perform the action and updates the...

Off-topic and just poor.
Hey, @JeffVanzella! I haven't seen you on here before.
0
Q: How I can do this

Seshu KumarI am going to develop a project, where i want to use MVP pattern. I have completed all the layers, which falls in to the above mentioned pattern. Now when ever i have performed an action on the view, the action will trigger the Presenter and the presenter will perform the action and updates the...

07:30
@Jamal To bed we said!
Eating, I am doing!
0
Q: How Can I generate the Predicates which can be used in the Fluent Nhibernate FilterBy method

Seshu KumarI want to implement the generic Predicates to get the desired search result. The predicates should work for inner classes also. How can i create the Search Criteria for the above said scenario.

Hey @Simon :)
Morning @kleinfreund
Well, apparently Facebook bought WhatsApp.
Are we doomed, yet?
By the way. Meanwhile in Kiev:
07:43
Ouch!
My heart goes out to my Ukrainian friends!
08:06
17,885 visitors/day
 
1 hour later…
09:09
0
Q: Reduce cyclomatic complexity

uzzerHow can I reduce cyclomatic complexity of validation and refactor it better way? def valid? return false if @opts.nil? return false if @opts[:property].nil? ... true end

0
Q: Integration test in Jasmine

BenThis integration test involves database access and hence opening and closing a database connection. Does it look correct? I am concerned about ensuring the the database connection is closed should the test fail. "use strict"; describe("MyCtorFunction", function () { describe("myMethod", func...

0
Q: Returning all the LIS of given array of int (java)

user37188I have this assignment where I'm supposed to code an algorithm for finding the quantity of Longest Increasing Subsequences from an array of (different) integers and print them all; I developped one which gives me always the right answer but I have 2 issues with it: 1) It's a little slow 2) Whe...

0
Q: Game passive skill system

CantGetEnoughI'm trying to create some easily accessible database of different skills. General idea is that every skill should do something different and be able to act on different things (ex. one skill which icreases weapon attack by 'x' [it acts on weapon] and other one which icreases chances to drop item ...

 
1 hour later…
10:34
0
Q: Enhancing parser for 8 byte command string (expect problems with type conversions) for Arduino/Radio communication

dgratBecause the throughput of my radio and device is limited, I wanted to compress my control string. I decided to compress the command into an 8 bytes (quasi) string (throttle high, throttle low, pitch, roll, yaw plus/minus, yaw value, checksum, stop byte) and after parsing in four variables: Pitc...

@kleinfreund You have any experience with the <canvas> element?
Not one bit, I have to admit.
Don't have much time on my hand anyway. Have to work on a bought wordpress theme for a local politician.^^
11:01
OK. I was just wondering :) I will probably experiment a bit with it in GWT this weekend.
0
Q: How to extract changesets(or commits) between last two tags in mercurial using python script?

PatrickI have written following script: #!/usr/bin/python import os os.system('hg tags > tags.txt') file = 'tags.txt' path = os.path.join(os.getcwd(), file) fp = open(path) for i, line in enumerate(fp): if i == 1: latestTagLine = line` elif i == 2: previousTagLine = ...

0
Q: C++ memset / memcpy / strcpy implementation performance

JosephIn C++, I have made a basic memset / memcpy / strcpy implementation, yet I am worried that they are slower than the STL equivalent, as they are probably made in assembly, which I do not know. Is there any way of making these quicker, still using C++? #define BYTE unsigned char typedef BYTE byte...

11:40
Dang. Translating a Wordpress theme in all the .php files just to realize __after__ this mess, that there are translation files in a subdirectory.

Now I need to figure out how to use .po and .mo files
11:58
0
Q: Two way socket communication (with classes)

blackFirst of all, I want to apologize for the title, I could not find a better one. I am developing a TCP client-server application, where multiple kinds of data can be send; therefore there's an internal protocol which makes the other side to know what it will receive and then how (by using enums). ...

12:22
0
Q: C# ENCOG SVM classification with my own dataset

MartinI would like to do a multiclass classification application in C#. I decided to use encog to do so. Now I am stuck at one point. I found a XOR example, which I understand. But when I am going to use my own dataset, app is computing only with one feature from one example. Here is my code: namespac...

13:19
@kleinfreund are you talking about yourself?
I guess so, huh?
I managed to translate the theme with the files in question. If only I knew that earlier. :p
@kleinfreund congratulations on the fanatic and making it to 2k
Fanatic? Not yet.
that is what I was talking about
if you click the little bent arrow thing next to the comment it will take you to the comment I am replying to
anyway I have to get going to work, I will jump in and out of chat for most of the day, I can't not do it.
Ah, dang it again.^^
Yes, I was talking about myself.
2k is only a matter of time.
13:22
hello!
And tomorrow I will have the first html badge here. Unless someone removes the tag again. <.<
Hello Muggie. :p
0
Q: CodeIgniter maintain data through Controllers

AndreFontaineI have a main menu in my application, it loads depending on the role of the user that I validate from a table in my data base, but I have to recreate this menu everytime I call a new controller, here is the way I'm doing it: User Controller: class User extends Ci_Controller { function __co...

0
Q: C++ vector implementation

JosephI have tried to implement a basic vector type in C++, yet I am not sure if I can do anything any more efficiently. template < typename _Ty > class vector { public: typedef _Ty *iterator; typedef _Ty _Value_type; typedef vector<_Ty> _Myt; vector() : __size(0), __capacity(...

I won't be able to update the answers feed today
hitting 2K today @kleinfreund?
Unlikely but who knows. ;)
1830 currently.
meeting, AFC ..and then I hit the road, might phone-stalk the chat later ;)
13:29
I am still 1 point away from 3500
Let me help you out. ;)
.... I am still 6.5K away from 20K ... .... ? ;)
2
thank you @kleinfreund
Well, monkey, it hurts me to be the one who tells you the truth, but you won't make it to 20k today. :/
5
ok I am saving my stars for later. i am outta here
13:37
ciao all :)
ciao hello? or ciao Bye-bye?
Hello @geo
ciao @kle
ciao hello :)
today is THE big day.. moving to linux server from win server.. many probs... ufff
Good luck. :>
tnx.. but i see the light :)
13:58
@geomo - I made that move in 1996 .... when slackware came on floppies... or, if you were lucky, on a disk on the front cover of a magazine....
I never looked back.
(not for servers, anyway).
0
Q: Why doesnt this multi thread program print "foo" forever

ComputernerdI have a multi-thread program which is suppose to print foo forever but the printing of foo stop like after 300 times , I dont understand why . Explaination of design of progam : I have set a maximum of 3 threads to be running at any one time and have use a mutex to lock the global shared resou...

(desktops I have swapped back and forth a bit).
The question looks off-topic to me
for me win is better for many things but if you need a server stable linux is the best
Well the first phrase is of the question is off-topic
14:01
Are you all Windows people?
desktop-wise
@kleinfreund I am yes!
50% :)
Hey @Marc, @syb0rg @amon btw
other half, geomo?
But more of habit than anything else
@kleinfreund Hello.
14:02
kubuntu & win 7
And hi kleinfreund!
@kleinfreund Kubuntu for me :) ditched my last win7 installation half a year ago
Because of?
because KDE is awesome
for google and mail kubuntu.. for graphic application win
14:04
Why is KDE awesome?
<--- big gamer here, so don't want any trouble of installing or anything, so Windows is my choice
@kleinfreund Any KDE application (e.g. file manager, editor) can access files not only on this computer, but also via FTP or SSH. That's really useful for me. Also, it's amazingly configurable (e.g. styles, keybindings, start menus, …).
If you have a PC with more than 2GB of ram you can work with all togheter using a virtual machine.. c00l :)
@amon I use that as my justification for using emacs as DE :)
@amon So I can edit files on my webspace just like I would on my local machine?
14:10
@BluePeppers Ah yes, I tried to use Emacs once. It's absolutely amazing, but the learning curve was too steep for me.
Ah, cool. Hit exactly 4,000 posts on my tumblr. :>
@kleinfreund yes. completely transparently. When you hit “save” in your editor, it uploads the file (the tempfiles are cleanly hidden from view)
Do you have regular use-cases for this ability?
@kleinfreund I recently transitioned my personal workspace (compilers etc) to a cloud server.
I use something similar on emacs all the time to edit config files on remote servers over SSH, without having the input lag of a remote editor.
VFSes are cool, in general :)
14:22
What browser do you use?
Chromium, which has all of the bad parts of Chrome (memory usage, Google lock-in), but at least it's nominally free software.
Sounds stupid, but Chromium has no integrated pdf viewer and no integrated flash player.
I have a feeling that if the Chrome license was changed so that it could be distributed by distro package managers, Chromium users might all but disappear
@kleinfreund "$ sudo apt-get install chromium-browser flashplugin-installer" – of course there's flash. And I use pdf.js for PDFs (which is what Firefox uses)
@BluePeppers you underestimate philosophical disagreements of some **GNU**/Linux users ;-)
@amon Potentially (posted from my Windows 8 Laptop with UEFI SecureBoot enabled)
2
14:47
hey everybody
Heya @apieceoffruit
@kleinfreund howdy. So, did I miss anything interesting?
Not as far as I'm concerned, I guess. ;)
Ah good. I've had a hectic few weeks no time for the really important stuff like developing :)
@apieceoffruit Just a lot of people joining the chat room :)
14:53
@syb0rg heh, nice timing.
btw, I just finished extensively teaching myself WPF so down with Winforms! I am looking forward to more C# questions with XAML to test myself. May even be posting a few myself in the coming weeks. Windows 8 app store development soon to be a hurdle I imagine i will be falling on a lot soon,....
15:11
0
Q: Java program milestone review; reducing repetition and utlizing EDT

solleksI am working on the largest Java program I have undertaken to date and feel uncertain in my current code practices. I think that I state and repeat things that don't need to be which can become a headache as development goes on. Specifically, in my GridBag Constraints. I have worked with GridBagL...

0
Q: Two way socket communication (with classes)

blackFirst of all, I want to apologize for the title, I could not find a better one. I am developing a TCP client-server application, where multiple kinds of data can be send; therefore there's an internal protocol which makes the other side to know what it will receive and then how (by using enums). ...

^ This is on hold. Please consider whether it should be reopened, and/or post a explanatory comment to the OP.
15:35
0
Q: Lua Code review for performance improvements

CarlosI have the following lua script which I use against my redis environment to perform some non-production analytics on my data. My dataset contains hundreds of millions of records, hence I want to make sure that the approach that I am taking is optimal for query performance and best coding practic...

15:54
0
Q: my attempt to prevent email injection

LoaiI have asked a question on Stock-overflow and one of the guys actually managed to hack my contact form and inject anther fake email into the $header of the PHP! So after talking to him he sent few articles, and I aimed to update the PHP to secure this gap and prevent the spam. Here is my old ...

Never sure what to think when I do an answer like this: codereview.stackexchange.com/a/42314/31503
Is it OK to make such big improvements on code that is an assignment?
Well I think it is a good way for the student to learn by an answer like that. If he don't learn a lesson from your answer, future assignment won't get better. So I guess it can just only help!
0
Q: anonymous methods, factory methods, threading, and xml input

Mason11987So I have an application which retrieves data from a (potentially) very large XML file. A combination of XMLReader and XDocument seemed to be the only way I could manage the entire thing the way I wanted. It works, and it does so fairly quickly and efficiently. But I have a few review question...

As long as you word things clearly that a beginner would understand, I think it is okay.
16:20
Good I'm close to having access to the same privilege that I have on SO !
Is it ok to post multiple solution options to a question?

I assume the answer is obviously yes but my question is should I do one answer with V1 and V2 or two separate answers?
0
A: Game passive skill system

apieceoffruitGiven @CantGenEnough 's comments that my previous suggestion didn't fit his needs I thought I'd try an alternate approach I was playing with. Instead of the above you could try a similar approach with a sort of a weighted calculator instead of the actual skill approach. So If you had a generic...

You could always post a meta question about it
yeah good idea, I did that although as I started writing the question the answer seemed obvious, although maybe that's just my opinion on the matter.
0
Q: Multiple Proposed Answers to a Single Question

apieceoffruitIf a question is asked, whereby you have a number of suggested answers is it preferred that you post multiple actual answers or large answer with separated section headers e.g: Version 1 Solution some content here Version 2 Solution some content here P.S My vote is towards multiple answ...

16:40
0
Q: Multiple Proposed Answers to a Single Question

apieceoffruitIf a question is asked, whereby you have a number of suggested answers is it preferred that you post multiple actual answers or large answer with separated section headers e.g: Version 1 Solution some content here Version 2 Solution some content here P.S My vote is towards multiple answ...

... I have to stop doing that, I always forget that the bot does that for me...
4
0
Q: Exception handling in my browser widget?

anongenericThere will probably be bugs if/when I decide to improve this program further. Looking at the code, I would therefore like some guidance on where assert statements might need to be used to check for a certain condition and whether I should handle exceptions such as the one that occurs when a bad U...

0
Q: Using GeoComplete with RequireJS (with shim config)

AlexI am using the GeoCompelte plugin with RequireJS It works, but please could someone confirm I've done this correctly, mainly my understanding of shim: requirejs.config({ waitSeconds: 120, paths: { async: './lib/async', jquery: './lib/jquery-1.7.2.min',...

@rolfl are you around? will you take a look at this Question and answer on StackOverflow for me? I have no Votes yet, it's a SQL question anyone else with SQL knowledge please feel free to vote on my answer or leave a comment. thanks
0
A: SQL Query multiple AND and OR's not working

Malachiyou need to escape the Percentage Symbol the answer to this question should show you how to do it. instead of doing that you could also create a query like this SELECT * FROM HatTable WHERE colorId LIKE '%10%' this should give you all the options that have 10 in them.

16:59
@Malachi - looking ...
@Malachi - the problem the user had was with using an = instead of LIKE. The accepted answer is correct, and worth the upvotes. Your answer makes things ambiguous, and the answer you point to is not helpful in the user's situation. Further, your example SQL produces the wrong results... he wants to match 10 exactly, not 3210, etc.
If you want me to vote it would be down .... ?
so what do the pipes do then?
His first sentence: I have a cell that contains values separated by a double pipe
@rolfl oh duh, but my comment on the answer would still stand then. if it is the first cell or the last cell it will not be returned
Your comment on the question you mean?
on the accepted answer
it will not return values of '||10' or '10||'
17:10
yes, you are correct if you read the answer literally, but, the way I read it is that the answer is saying, instead of using '=' you have to use 'LIKE', and, by the way, the first clause you have would look like: AND Hat.colorId LIKE '%||10||%'
and follow that pattern for the other clauses with wildcards.
He also did not include the select, from, and other clauses ... so, his example is not complete... ;-)
0
Q: Math expression solver on Java

Noxa Furryfolks. Recently I've stumbled upon an interesting challenge for me. You should develop C application, that solves math expressions. Operations such as (+,-,*,/) should be supported, as well as (cos, sin, exp). Application should replace constants Pi and E with built-in values. We may have any...

0
Q: C++ vector re-implementation review

JosephEarlier, I posted a question on my vector implementation, and after following the advice, I have improved it, and added in swap and reverse functions which I had made, but forgot to post. I was just double checking that it was memory efficient and safe to use: template < typename _Ty > inline vo...

The second problem with the SQL that only Krish R addressed is that the parenthesis on the query are wrong....
Oh, saamorim addressed that as well as the LIKE...
@rolfl I see what you are saying. he just spoke on the LIKE v. =
Exactly.... which, as it happens, is the core of the asker's problem.... the 'crux'.
He managed to be the first answer, the first right answer, and thus, he wins the SO race, and gets the votes, and the accept.
Everything else after that is forgotten, so you move on... ;-)
(which is why I don't like SO, and why the best answer is mostly ignored...)
17:27
Today I have realized how much more you get done at work if you don't hang out here...
Apparently, Simon found a way out.
I thought I had barred that window....
Yet Another Bug To Fix
I guess you could call Simon a bug .... ?
2
Is he really that small?
17:32
@AlexL beat you!
@rolfl you took my edit!! :)
.... Sorry .... :(
No problem, We had pretty much the same thing so it doesn't matter xD
Now it is interesting because your's is pending ;-)
Haha\
17:34
I had the idea of editing the same post... glad I didn't do it :P
@kleinfreund No no no, I'm not out. I was just.... temporarily away.
Well, if any of you are thinking of answering it .... ;-) I am busy doing real things for the next number of hours ... ;p
Sure, Simon. We understand.
Calling me a bug? I don't know why but I just gotta star that...
@SimonAndréForsberg - nice answer ;p
17:39
:)
@rolfl lol, I haven't answered in two days so I started wondering: What answer? Now all I have to say is: Thanks, Santa!
0
Q: Best practice to create xml messages with DOMDocument class in PHP

user3333137I want to create xml messages for webservice communication. These messages should be created from a pool of reusable elements. Therefore I have created different classes. A "factory" class, that only returns a message class. An element class, that consists of the reusable parts and the message cl...

I notice that we have both an and a . The latter only contains four questions, all of which is also tagged with actionscript-3.
Not many people use actionscript-2 anymore (thank goodness)
synonym time?
No, I wouldn't say synonym.
I'm more thinking get rid of the
There is ActionScript 2.0 and ActionScript 3.0. (Heck, technically there's even 1.0...)
@Marc-Andre I agree, weird
there are quite big differences between the versions, but I don't see a reason to have the actionscript-tag at the moment. There's very few ActionScript questions overall, and all of them are also tagged ActionScript-3
Ah, here's @Jamal... What do you think about the ActionScript-3 vs. ActionScript situation I just mentioned here? Should I edit the 4 existing ActionScript questions and remove the tag? Or leave it as-is?
Theoretically, there could come an ActionScript 2.0 question one day. Although I doubt it.
@AlexL Yeah I feel like it's only one answer or maybe two, but six...
If the different versions are significant, then I suppose they should remain.
0
Q: Sort a nearly sorted (or K sorted) array

JavaDeveloperGiven an array of n elements, where each element is at most k away from its target position, devise an algorithm that sorts in O(n log k) time. For example, let us consider k is 2, an element at index 7 in the sorted array, can be at indexes 5, 6, 7, 8, 9 in the given array. I'm looking for code...

17:54
Why are there six answers? At minimum, there could be three (combining the three short answers into one).
Yes, the versions are quite significant. But there are no ActionScript 2 questions at the moment. seems to be meant to be used for both 2.0 and 3.0
@Jamal I was wondering the same thing
Has anyone told him yet? He could combine them however he wants, or someone can do it instead.
It's a bit unusual that you split your review into separate answers. For example, you could have each answer be an item in a list of oberservations, or could separate the topics with an horizontal rule. I'd suggest you merge your other answers into this one, otherwise people might suspect rep-whoring. — amon 1 min ago
3
Maybe he took this one a bit too literary:
3
Q: Multiple proposed answers to a single question

apieceoffruitIf a question is asked, whereby you have a number of suggested answers, is it preferred that you post multiple actual answers, or large answer with separated section headers? Version 1 Solution some content here Version 2 Solution some content here P.S My vote is towards multiple answer...

Two answers is fine IMO, but six? That's a bit too much. Especially with that content.
See also:
7
Q: Should we merge multiple answers from the same person?

Daniel CookToday, I ran across this question which had already been answered by Malachi 3 times before I looked at it. I decided that since he answered in multiple answers, I might as well do the same thing. I also checked out this question, where it seems the concensus is that we can have multiple answers...

18:02
The folks on SO really are quite useless. Only one of my answers there has gotten more than 2 votes.
Why is that useless?
@Donald.McLean LMFTFY
@SimonAndréForsberg No worries. It isn't like I really care that much about rep.
@Donald.McLean In that case I have to agree with @RonniSkansing: "Why is that useless?"
@Donald.McLean: Same here (except more have 2, but no higher than that)! Granted, some of my answers aren't too great, but I've spent time on others.
18:09
I have to say I did not spend a lot of time on this answer on SO...
83
A: Returning the other argument of 2 possible arguments without using conditions

Simon André ForsbergSimple arithmetic: return 7 - input + 5; (which can be simplified as return 12 - input;) Let's say the input is 7: return 7 - 7 + 5 --> return 5 Or if the input is 5: return 7 - 5 + 5 --> return 7

I did spend time on this, especially for the benefit of the OP (who came from here):
0
A: Basic obfuscation program

JamalThis won't fix your entire problem, but I still feel it is important. You seem to misunderstand how the ternary works. Let's observe one of its uses here: for (int i = 0; n <= m ? i < f : i < ++f; i++) {} // ^^^^^^^^^^^^^^^^^^^^^^^^ <--- not the intended outcome This will not w...

Most of the time when I answer a question, it's because I had the exact same question and didn't find a good answer anywhere. So I went and figured it out and posted the result. So the lack of votes is saying either that nobody had the same problem I did (unlikely, or the question wouldn't be there in the first place), or none of the people who found my answer bothered to vote (which would make them useless).
hehe yes too you
But it might / might not have been useless to them
@rolfl That what was I was thinking with my first paragraph of my answer. Nice answer!
If you can do a += x; and a *= x; and a whole lot of things for ints, why not b!=; for booleans?
Instead you have to do b = !b;
18:27
@SimonAndréForsberg "!" is not a binary operator!
@amon But I don't think b!=b would work either, would it?
No wait, that doesn't make sense. Nevermind.
The real reason is of course that "!=" is already taken for not-equals
Yes. Would be nice sometimes to have a "switch the value of this boolean" operator though
I can think of various ways to accomplish that, but none would work in Java
0
Q: Multithreaded PreparedStatement queue seems to randomly stop

Mark WI have written this sql queue mechanism for asynchronously queuing up sql. It also provides some mechanisms for returning results sets and or generated keys, but specifically I'm worried about the enqueue() function. While this has proven to be much much more efficient and faster than our previou...

0
Q: Model simulation using Java annotations

uros calakovicA couple of days ago I posted my code that models systems made up of moving parts. I got several great tips and ideas and here is my latest version. My actions are now methods annotated with @Action (instead of separate classes as in my original code). My Model class contains a HashMap of Class, ...

18:39
Which languages would it work in?
@SimonAndréForsberg any with operator overloading or “monkey patching” or extension methods or macros
well, and booleans have to be objects, not primitives. or at least autoboxed
call-by-reference might be helpful too
Hmm, I found it in Perl (via autoboxing and monkey-patching, and call-by-reference):
use autobox;
*SCALAR::toggle = sub { $_[0] = ! $_[0] };
my $x = 1;
$x->toggle;
# $x is now false
18:54
Ha, cool.
But on second thought, perhaps I don't really want that feature :)
I'm really looking forward to Java 8 right now though, lambdas where are you?
@amon or fake operator overloading.
@SimonAndréForsberg It's called Scala.
@Donald.McLean Scala's typedef and def and stuff seems a little strange to me, I'd still like to try it some time though
@Donald.McLean How would you convice Scala to handle val x = false; x.toggle; /*x is now true*/? The available methods don't seem too supportive. Also, this contradicts immutability
@SimonAndréForsberg If you think THAT'S strange, you haven't looked very closely. So far though, my Scala code is only about 50% idiomatic Scala, and the rest is just glorified Java.
I think my Scala-code would probably be glorified Java too...
19:01
Still a win though. Even when I first started, just having actors was more than enough for me to love my glorified-Java-Scala.
my favourite part would certainly be traits. Working in languages without them is such a pain
@amon TRAITS!!!!!!!!!!
Duck-Typing?
@rolfl I thought you were going to ask about monkey-patching :)
I know monkey-patching... I do it all the time when I fix bugs.
19:05
I noticed that traits seem to be coming to Java 8 as well, and I have to say that I've found plenty of use-cases for them!
@amon You would have to create a mutable boolean class.
@Donald.McLean A mutable boolean class just sounds like.... it's really something that often is unnecessary.
@Donald.McLean but Boolean is final, so our mutable boolean would be incompatible.
Although there is AtomicBoolean in Java... that's the closest thing I can come up with
@SimonAndréForsberg Yeah, there's almost certainly a better way to accomplish whatever you're trying to do.
19:07
@SimonAndréForsberg Java8's default methods are not quite equivalent to traits. But eh, I'll take what I can get.
I was just trying to switch the state of a running boolean, I think running = !running is probably the best :)
YES
@amon What is the default methods missing?
@SimonAndréForsberg volatile running ?
@rolfl Nope, private boolean running. I believe GWT is single-threaded, but using volatile couldn't hurt I guess...
19:12
@SimonAndréForsberg default methods should really only be understood as a way to retrofit existing interfaces. They do allow a form of multiple behavior inheritance, but e.g. cannot have their own internal state (not quite a dealbreaker, but removes some uses). I'm also not quite sure how interfaces with default methods are composed exactly. gonna look that up right now
@SimonAndréForsberg - volatile can hurt ... but, yeah.
Oh, I thought traits didn't have their own internal state.
0
Q: Automatic syntax highlighting doesn't work for Lua

missingnoAccording to this meta question, tag-based syntax highlighting should be working but In this Lua question that was not the case. I suggested an edit to fix the highlighting in the question itself but you can still see the bad highlighting in this answer (the comments are the wrong color).

@SimonAndréForsberg Noxa Furry's identity confirmed.
@200_success Thanks. For a while I suspected that it was someone else's code.
19:24
@SimonAndréForsberg In Scala, traits can have state.
@Donald.McLean And I suppose that's something you often use?
New user still needs two more welcoming votes to reach 15-point threshold:
1
Q: Extracting changesets (or commits) between last two tags in Mercurial with Python

PatrickI have written the following script: #!/usr/bin/python import os os.system('hg tags > tags.txt') file = 'tags.txt' path = os.path.join(os.getcwd(), file) fp = open(path) for i, line in enumerate(fp): if i == 1: latestTagLine = line` elif i == 2: previousTagLine = line...

@SimonAndréForsberg I don't know about "often", but it sure is useful at times.
@200_success ... ;-) almost as subtle as me saying .... this answer points out a bug in the question: codereview.stackexchange.com/a/42336/31503
0
Q: Avoiding casts in abstract types

ctorI asked this question on StackOverflow and in the comments someone had this to say. In a proper design, you should almost never have to do a dynamic_cast, even if it's hidden inside some nice getter function. Now this got me thinking.. a lot. I have been thinking of various ways in which I ...

19:35
Any interest in a new tag for calculators? Parsing arithmetic expressions is a common class of questions. On the other hand, it could be a little tricky defining exactly what constitutes a calculator.
Interesting ... I added the recursion tag to that question, and then I considered adding too....
I am not sure there's enough volume on it to make it worth while... but, it's still worth considering ...
Now that I look at the tags... why do we have both and ?
@rolfl Because they aren't the same thing.
Good organization contributes to readability, but it's also functional.
mathematics would be good, yes.
There's a whole bunch of tag that I wonder if we really need, , , aren't all our questions about that?
So, question; does anyone know how frequent firefox bugs out in regards to rendering CSS peculiarly?
frequently**
19:47
Tags with dubious usability? I've never seen that happen.
I had some peculiar things happened when I applied a style sheet, it would work when I firebugged two rules in, and then I wrote them by hand and !important'd them. They refused to work until they were moved to the bottom of the stylesheet, despite the fact there was no other selector that should have overridden these changes...
no selector used later on**
' ... should have ...' being the operative statement.
@PhilFromHeck I ask @kleinfreund about all my CSS-related issues :)
Heya, I'm alive.
Hey all. :)
I love it when a DING! has effect :)
19:50
#arraySet_Facilities [name=facilityArray_Model] was the selector in question; it's entirely unique :P
@Phil Which rules get overwritten? Have a demo or something?
It's client specific, unfortunately.
So I can't really divulge :O
An ID selector will only be overwritten by an inline style, a later ID selector or the !important rule
My thoughts exactly.
One of these is there. There is no other possibility.
Or you have a syntax error or other mistake in your files.
19:54
@rolfl I'd prefer to keep for problems that an amateur mathematician might be interested in. Implementing a calculator is mostly about parsing and arithmetic.
It was that the styling wasn't being applied at all, it wasn't being overwritten though.
If there were an unclosed tag a lot more would break O.o;;
I'm just going to roll my face furiously on my keyboard until I realize that I fucked up somewhere along the road.
Thank's for your time @klein
This is going to happen. At one point you just find out what little thing fucked you up.
Btw with HTML5 doctype, you only need to properly nest. You can't break things by just closing improperly.
It is said that one picture says a thousand words, so see if you can figure out what I am doing from this image:
20:10
Atleast it has symmetry.
ooh, Conway's Game of Life :) Will that also become available on Zomis.net?
@SimonAndréForsberg this one even has a “glider” near the top. nice
@amon Yup, it will. I'm using a canvas HTML element in GWT.
It's not possible to click to remove anything yet though, only adding. So I tried "killing" a map that had about 500 active tiles by adding some more ones... I ended up having about 900 suddenly...
@amon If you like gliders you will love this one...
20:56
Oh goodness there's chaos in Ukraine...
@rolfl: The OP is invalidating yours and Marc's answers:
3
Q: Reducing repetition and utlizing EDT

solleksI am working on the largest Java program I have undertaken to date and feel uncertain in my current code practices. I think that I state and repeat things that don't need to be which can become a headache as development goes on. Specifically, in my GridBag Constraints. I have worked with GridBagL...

Night @Simon. Going to sleep as well.
Goodnight!
Night all. :)
21:26
0
Q: Simple tax return program

user3255517The overall program I have to do is a simple tax return. Add wages, interest, dividends, and other income. Deduct $2,800 for each dependent. income = wages + interest + dividends + other income - (number of dependents * 2800) I have that and that part is good. Now after I get that, I ask ...


« first day (292 days earlier)      last day (4024 days later) »