« first day (782 days earlier)      last day (3534 days later) » 

09:01
H4X
@QPaysTaxes So either the Stack Exchange API is wrong or the Unanswered tab is wrong...
@Duga is never wrong.
No, but she is asleep though
09:19
@JeroenVannevel Can't a bot have some rest?
Not if that bot's purpose is to tell the world of the awesome things I do
@Mast Ok, I tried to make the answer acceptable. Better? :)
@JeroenVannevel perhaps she went on strike just because she had to do that?
@Morwenn At least it's perfectly readable now.
> Rate: +/- 500 Euros
What kind of payment indication is that
Hours, days, months or years
Not.. whatever this is
unless we're talking 500€/hour or day, then I'm okay with it
2
I'm going to sit outside in my white booty, it's way too nice weather to be inside
09:27
@JeroenVannevel Just don't burn.
I get burned just by walking from the bus stop to my house. No worries, I'm putting the parasol out
@JeroenVannevel Run, don't walk ^^
WTH, how did I get Nr. 3 on this list
The rest of you is slacking?
Always.
You can also call it having a life :)
@Morwenn So do I, I just don't have the concentration to live it the way I should.
Reading code is easier than writing documentation.
09:44
I was being mean, sorry.
09:57
0
Q: Find number of whole weeks between months in the same year

vimal4davidI am amateur Java Programmer.I wrote a class to return the number of whole weeks between months in the same year. Please need suggestions on my code. public int year; public String m1; public String m2; public Solution(int Y, String A, String B) throws ParseException { this.year = Y; t...

@Morwenn Np, you're right up to a point.
I vote once every 3 months
It makes my votes really exquisite
People fight over them to have it
Someone from fiji visited my blog today! First time I've got one from there
@JeroenVannevel Are you keeping track with a map?
I've seen DX HAMs do it all the time, keep track of what countries they made contact with.
10:07
No it just stands out compared to the typical US, Russia, France, Germany, Netherlands and Nordic states
I check the viewers pretty much daily
Don't mind the Belgium counter -- most of that is from my own views some time ago (though a month ago it stopped counting myself)
@JeroenVannevel You got some exotic countries in your list.
Still waiting for my first Vatican City visitor though
Pope visit = huge bragging rights
@JeroenVannevel Sure it would count the Vatican as a country of it's own?
It could be one of the 28 visits from Italy.
Why wouldn't it? It is a country..
@Duga that was a looooong time ago and I have already deleted that repo again
10:13
23 hours ago, by Simon André Forsberg
potential-octo-hipster? Sounds great to me.
So, @SimonAndréForsberg, not to drop a bombshell on you or anything, but will you be running for moderator?
0
Q: My code is to extract flights from result of an airline web service, is this a good approach?

Daniel NewtownI have following code to extract results of an airline web service. I am wondering if this is any better approach to this? The code is supposed to ignore any flight that has more than 1 transit. All retrieved results from Airline web service are in "AvailabilityRes" class. for (int i = 0; i < a...

@Mast At this point in time I can neither confirm nor deny any speculations about me running for moderator.
@SimonAndréForsberg I asked you about running for moderator, but you reply in a style as if I asked you whether you're running for president.
All-right, we'll see :-)
10:29
Monking
8
A: How do I better structure Java code to avoid dereferencing null?

skiwiYou need to ensure that every statement in the switch is one that ensures that sb != null holds, this is not the case currently. You can fix this by throwing an exception instead of logging a message, like this: default: throw new IllegalArgumentException("input was invalid: " + userInput);...

Yay, I got an accept :D
I feel like I would recommend Groovy nowadays though
After a month?
@Mast 2014...
@Mast Gratz
Thanks.
First golden.
On CR at least.
10:35
You don't have Fanatic? :(
Maybe it would be better if you asked this in codereview.stackexchange.comChococroc 11 secs ago
@skiwi Almost, 36 days left or so.
10:53
@200_success is a typo? Or does it mean ? codereview.stackexchange.com/q/92199/41243
@RubberDuck I've never seen callbacks in C before...
Perhaps when working with sockets
It's a typo. The question is not about C, so the tag should've been
that ^^^
0
Q: Excel VBA: Error in colouring the bar in barchart according to their value

Abdul ShiyasI have a chart with many series. And I want to colour all the bar in the chart (all series) with red if it has value<100 and with green if it has value>=100. My code is Private Sub CommandButton1_Click() Dim chartIterator As Integer, pointIterator As Integer, seriescollectionIterator As Int...

The entire Belgian airforce is flying outside
I just saw 2 jets and 3 WW2-era planes fly by
2
@JeroenVannevel That's... all?
I'm not surprised here by the airforce anymore, living like 5km away from a military base
11:08
First time I tried to get Fanatic, I couldn't connect the 100th day.
What do you mean, that's all? I just told you it's the entire Belgian air force!
I live.. 5 km away from an air force base
but considering belgium's sizeable army, I only see/hear planes one or two days a year
Though this is now the 4th flyby in 10 mins
I think they're doing stunts!
They're flying right above our houses and very close to eachother
With some luck, they crash on my neighbour
Code review requests belong on this site: codereview.stackexchange.comrghome 8 secs ago
A similar question answered with a nice suggestion, maybe useful for you too. Ä°f you're good with cmd line, you can parse and check if any work item with type "Code Review" is there. query is: tf changeset /collection:[url] [changeset#] /nopromptBeytan Kurt 33 secs ago
I like summertime
11:25
@JeroenVannevel You like your neighbours?
@JeroenVannevel Where are you in the picture?
Most of them, except the ones to the left. They prevented us from growing a garden on our roof by complaining about privacy
it's not like we'd be up there all day
I'm behind the picture, taking it
@JeroenVannevel I hate it when plants intrude my privacy
3
@JeroenVannevel What a load of bull.
@rolfl @Mast thanks
@Mast Well, there is some validity to their complaint. Our roof stretches out as a platform so we can easily look into their yard
Still, it makes me salty. It's not like I'm interested in spying on 80y olds anyway
When we were setting up that wooden wall a few months ago, I would look into that part of the yard from time to time and EACH TIME our neighbour would be staring at us
I'm aware retirees don't have much to do, but damn it she took it to the next level
You try eating at the table when you only have to look up to see a grandma staring at you through her window
11:33
@JeroenVannevel There's nothing stopping you to stand on your roof now, is there?
So what difference would a garden make?
Privacy laws are stopping us
You can go on the roof for short amounts of time, but not constantly
Wut
I'll do whatever the heck I want on my roof.
If they don't like it, let them set up a partytent or something.
You can, but then they have grounds to take you to court
Same reason there was something in the news a few years ago about someone that put up a treehouse in his yard but had to take it down because it was too high
Maybe they'll become more lenient when our fruit trees are fully grown and covering more of their yard
Or when the woman dies. The man is nice
@JeroenVannevel We have similar rules here, I can't place an antenna higher than 5m above the highest point of my roof without a permit.
I'm just saying there are options
@Mast That's probably less to do with privacy and more with bird/plane safety
11:37
@JeroenVannevel Not with planes I hope.
Adds another reason to his list of reasons to move to Alaska.
I mean, what does a plane have to do 10m above my roof?
Well you have to take some point as border
Might also just be vision polluting
@JeroenVannevel If I see an airplane at 10m above my roof, I'd hope it's crashing. Only valid reason to be there.
@Mast Strange thing to hope for
11:39
Otherwise there are much bigger things going wrong.
To echo what Jubobs said, I would recommend having developers commit their proposed changes to a new branch, and have them make the appropriate changes after code review in that branch as well, then merge into the main branch when all is well. If you do not want the "pre review" code in the history, you can always flatten the commits as well. — David Deutsch 35 secs ago
@Mast I'd hope it flies a bit further away before crashing
@skiwi That would be nice.
There's a lot of open ground around us, so let's hope they hit that instead of a building.
I'd hope it doesn't crash at all.
There's enough plane crashes in the world already.
You know what's scary? This chatroom isn't the weirdest place on the webz.
11:47
@RubberDuck ^^
Damnit, I need to get to StackOverflow to ask a question
@skiwi Be careful!
0
Q: Why is grails.gorm.autoFlush set to true not working?

skiwiConsider the following code: class User { static constraints = { email email: true, unique: true token nullable: true } String email String password String token } @TestFor(User) @TestMixin(DomainClassUnitTestMixin) class UserSpec extends Specification { ...

@Mast Let's hope I survive...
@skiwi Sounds like you found a bug.
0
Q: Is it necessary to use filter_var() when bindParam() is already being used for sql Injection deffense?

YuranI have a class that creates user accounts and to avoid sql injection attacks, I am using the following functions to sanitize both the user name and password inputs: $admUsername = filter_var($_POST['admUsername'], FILTER_SANITIZE_STRING); $admPassword = filter_var($_POST['admPassword'], ...

11:56
@Mast Why would I always be the one finding bugs?
Wow, Google is being fast, desparately I try more googling of that issue (already been doing that for a few hours), and my SO post is already on there
I might have seen an SO question about that before, @skiwi. Not able to find it now though
8
Q: Technical reasons not to set grails.gorm.autoFlush and grails.gorm.failOnError to true in Config.groovy?

knorvBesides the obvious performance implications of doing so, what are good technical reasons not to set grails.gorm.autoFlush = true and grails.gorm.failOnError = true in Config.groovy?

That one maybe?
nope, not that
Nice quote...
> Hibernate is clever enough to know when it needs to write to the database and can optimise - you've abstracted away that problem.
Nope, Hibernate freaking sucks at that ^
Because nothing is more fun than an ORM persisting when it feels like it
12:02
@JeroenVannevel How does C# handle that stuff?
0
Q: Hash table with "Time To Live" elements

so-olitaryRecently, I got a very interesting task, it is to realize the hash table that works in multi-process server in common memory, each element of which must have a TTL property. It was suggested to implement the TTL, as a additional process that walks through the table every second and corrects the T...

If you mean "Entity-Framework" rather than C#: it persists when you say it should
aka calling SaveChanges()
Entity-Framework itself also holds a cache (the so-called "attached objects") to prevent unnecessary database lookups if you want to
Sounds more sensible.
But persisting is done when you want it to be done
there are more caching layers for other things like execution plans, but these are the broad lines
@JeroenVannevel Yeah... that
@JeroenVannevel But if you call SaveChanges() then they are also persisted?
Well yes
SaveChanges() means "flush to database"
If you would just use Movies.Add(new Movie()), it would still be in-memory
Okay, that makes sense
If you then call dbContext.SaveChanges(), it flushes it to the db
The problem here with Hibernate/Grails/GORM/whatever is that calling user.save() does not flush it automatically to the database
12:07
@RubberDuck 3 VTCs, need 2 more.
Calling user.save(flush: true) does do that
@Mast ty
Ugh. That's a horrible overload
@JeroenVannevel I'm trying to change it in the config, but there's my SO question for that as it appareantly doesn't work
Breaking SRP based on a boolean parameter
12:09
What's SRP?
Single Reponsibility Principle
Hmm.
What does user.save() even do, if not flush it to the db?
@JeroenVannevel It saves it in memory in the Hibernate cache
What if the default implementation of save() flushed, and you could call save(flush: false) to prevent the flush? Would you still have a problem with it?
12:10
But appareantly it then doesn't even trigger validation errors on unique constraints, so it's borked if you ask me
@nhgrif No, that's what I'm trying to achieve via the config setting
You also have the failOnError probably that's by default set to false, that means that if there's validation errors it will return null rather than throw an exception
For that one I have (succesfully) changed the default value to true, because having that set to false is insane
It is a good option to have as it prevents try-catch statements, but still insane to turn it on by default
@skiwi I was asking Jeroen his opinion and SRP things...
I don't think SRP is really an applicable comment.
> You've earned the "JAVA" badge.
Whether or not this method does what you expect it to do or actually even works, I don't think this is necessarily poor behavior.
12:29
Yeah, it's satisfying to solve a problem yourself; but if you're stuck, don't hesitate to ask. Also, when your code is already working but you still feel it could be improved, I recommend asking on codereview.stackexchange.com for feedback! — sloth 21 secs ago
Monking @ all
Experiencing an unfamiliar error, apparently has to do with implementing toString(), anyone have time to help?
@Phrancis Sure
This is the section there the error appears to happen:
import groovy.swing.SwingBuilder
import groovy.beans.Bindable
import static javax.swing.JFrame.EXIT_ON_CLOSE
import java.awt.*

@Bindable
class UserInput {
    String word
    String toString() { "$word" }
}

def userInput = new UserInput(word: '')
Getting error like:
Caught: groovy.lang.MissingPropertyException: No such property: word for class: SwingForm
groovy.lang.MissingPropertyException: No such property: word for class: SwingForm
...
"$word" is a GString I believe and not a String, not sure if that matters there
Not sure how the SwingForm comnes into play though
Could be. Did some Google-Fu and it one way or the other the problem appears to be with toString
12:37
What are you trying to do?
toString() is for an human readable description of the object
I believe you can retrieve the word variable as easily as calling getWord()
Ah, commented out that toString line and error still happens. Hold on, gotta take dogs out
If I have two horses, will I more accurately determine which is faster by racing them or by posting on the Internet about my horses and having people make guesses as to which would be faster? — nhgrif 12 secs ago
3
@nhgrif Upvote for you and a flag for OP.
Monking!
-1
Q: Excel VBA: change x axis value as desired

Abdul ShiyasI am creating charts with origin(100,0) i.e, x axis value=100. At first I used, ActiveChart.Axes(xlValue).MajorUnit = 10 and I got the x axis ... 70,80,90,100,110,120,130....etc I thought it would be better if I had axis values as ...60,80,100,120,140... etc. So I edited my code as follows, A...

12:44
@CaptainObvious @rolfl @Jamal ^^ Kill it
@skiwi So, what I'm really trying to do is to take a value from a user-input field, and be able to do something with it, usuing Swing & Groovy. lol
Once I can capture the damn value(s), it's easy from there
Moreover, even if you do race your horses and find out which is faster, you're probably going to find out that in the specific case of UI, there isn't going to be much of a difference (if any) (your ability to write efficient code when you don't even know to just race your horses versus Apple engineers who wrote the Xib loading code...). And you'll have to retest it every time you change anything on the UI. And you'll have to retest it every time there's an OS update. And your hand-written UI code will be a PITA to maintain versus the interface builder UI setup. Consider everything. — nhgrif 8 secs ago
@nhgrif People are obsessed with speed.
Some remember memory is also important.
Most forget maintainability is very, very important.
As in, very, very, very important
12:48
@skiwi What really bugs be is No such property: word for class: SwingForm, as my file is, obviously, SwingForm.groovy
So I think I just need to make word a property, but not really sure how
@Phrancis It means there's no word property in SwingForm, appareantly
@Phrancis Could it be a general namespacing problem?
I actually don't know how easy it would be to manually write UI code that would perform better than using the visual interface builder.
You have the word property in UserInput, not in SwingForm
The Xib file does have to be parsed... but the thing is, I can guarantee the UI isn't what's slowing him down. I've had extraordinarily complex UIs (even ones that actually have to parse several Xib files just for one screen) and never noticed a slow down.
His code is slow because of whatever else logic he's doing (which is probably poorly implemented).
And by the time he's done writing the manual UI code, it'll probably be even slowed.
I'll bet on Apple engineers over basically any individual iOS programmer...
2
12:52
OK I copied String word outside of UserInput as well, now I'm getting nulls, but that should be easier to solve, thanks guys :)
@nhgrif If he hasn't decoupled his view from his logic, it probably sucks.
It's kind of weird.
You have individual views
But some views have a view controller
And that view controller will add subviews to its view
Each view has its own UI logic
And usually you'll put auto layout code in your view controller.
The problem isn't where (exactly), it's more when he's putting his code.
There will always be some logic involved. But if you don't split them up (SRP style), you'll block stuff and make it your compiler unnecessarily difficult.
@nhgrif When?
This complicated logic he's doing either needs to happen on the previous screen before this view starts showing up, or on this screen after the UI stuff is done
Or just in the background.
As in, whether or not it executes before loading the screen?
12:58
Link only answer with an upvote...
0
A: advantage and disadvantage developing app programmatically without storyboard and xib

paoloThis video with Ray Wenderlich and friends is an interesting watch.

@nhgrif VLQ'd.
Now I only need to solve why my variable is always null - Some reference issue I'm sure
0
Q: HTML: How to set up header file with proper content and structure (working code)

keewee279I am new to HTML and programming in general and am currently working on setting up my first website. For this I created a couple of PHP pages with a separate file for each of them and in order to avoid duplicating code I tried to remove as much as possible from the pages header and saved this i...

-1
Q: Program that reads 4 files and outputs contents of it into another file after formatting it

Cool GuyThe below python 3 program scans 4 files a.txt, b.txt, c.txt, d.txt and then outputs the read data into a file output.txt in a formatted way. (Never mind about the bad variable names) def main(): with open('a.txt', 'r') as a, open('b.txt', 'r') as b, open('c.txt', 'r') as c, open('d.txt', 'r...

Can you "step through" a script with IntelliJ?
0
Q: Does getchar() follow open/closed principle?

overexchangeEvery I/O driver must implement 5 functions read / write / open / close / seek. This is a contract obeyed by any I/O driver. For example, driver for a keyboard(say) or file(say) must implement these functions. Below program(myProgram), main() { int c; while ((c = getchar()) != EOF) ...

Can somebody help me on design of getchar() function?
@overexchange That's on programmers, not on CR.
@overexchange Here, have the interface: char getchar();.
If I've marked an answer as spam, it isn't necessary to also mark it as NAA is it?
            tr {
                td { label 'Input: ' }
                td { textField userInput.word, id: word, columns: 20 }
                println word
            }
13:08
The spam flag should be strong enough.
Something is wrong with this ^
word always prints null no matter what, so my syntax must be wrong
Owell, TTGTW D:
@Mast no
spam gives an auto dv and a high-priority mod-task
Good.
It will be auto-removed after 5 spam flags, right?
13:30
@Mast something like that.
Greetings, Programs.
@Mast 6 flags, actually
including 100 rep penalty for the user
0
Q: PHP Secured Database Insert [PHP/MySQLi]

PeurrI've been working on a safe inserting method for a while, and I think I've found a pretty secure way to do this. Would you Overflowers mind taking a look at it and maybe give me some tips to improve my script? function dbRowInsert($table, $data) { require_once('../config.inc.php'); $bui...

If you continue to include irrelevant links to your company, you will end up with a ban. This seems to be an otherwise okay review, but please remove the spam link. — RubberDuck 20 secs ago
13:45
Good. I was about to destroy this user, too.
4
Hopefully he gets the point.
@RubberDuck Ah well, CRitters than ;) — Peurr 57 secs ago
It has been a while since I've seen spam on this site. Guess we're not popular enough. ;-)
@Jamal It's because we're just a beta.
Spammers don't care about beta sites.
Perhaps. Which could mean that any new moderators will have to know how to deal with them.
Burninate all the spam.
13:54
You hear that @SimonAndréForsberg? You'll need to know what to do with Spam.
hides
@Donald.McLean Greetings user!
Have we heard how many mod positions will be open in the election?
Not that I know of.
I know Monkey's been pushing them for 5, but it didn't sound like that was going to happen.
I think Pops is keen to having 5. He also agrees that we were overworked and could become more busy after graduation.
Hmm. If that's true, I will consider running. This is the first SE site I ever joined.
14:01
It looks like we should expect a Q&A, too. I will make sure I can answer all the questions.
When do these elections start? Monday?
Hmm. I have two meetings today. Back to back. In the same room.
@nhgrif yes
0
Q: Java Code for Exporting Data from casandra to mongodb

Ritesh SinhaI have a program which exports the data directly from Cassandra to mongodb.It works fine But, It doesn't copies the counter type column from Cassandra to mongodb. It leaves it as blank. My data in Cassandra Table : public class CassExport { static String keyspace = "query"; static String ta...

0
Q: Authors 'final result' post showing the 'final result' after the answer/corrections/suggestions

Ognyan DimitrovThe case: Somebody posts code for review then follows up with all the analysis and some of the answers is accepted. The suggestion: Some kind of finalization post by the dev who is asking the question which is the corrected/final implementation according to all proper suggestions and analysis. ...

14:13
@Jamal We know you're running for moderator, we know rolfl isn't, do you happen to know what @200 is going to do?
I have no idea, but even if I did, I probably shouldn't say it unless it were already public. We'll just have to find out on Monday.
0
Q: Refactoring the code

LoveI have the method. public void AddNLogConfigurationTypeTagret() { var filePath = _loggerModel.file_path_pattern.Replace("\\YYYY\\MM\\DD", ""); var dateTime = DateTime.Now; filePath += "\\" + dateTime.Year + "\\" + dateTime.Month.ToString() + "\\" + dateTime.Day; ...

@CaptainObvious Dat title
Is it good enough? Never!
@Jamal Of-course.
@nhgrif Now that's a general move. Just grab everything.
14:28
@nhgrif what are they going to do, re-write history?
sigh
@RubberDuck Apple might try to do just that.
2
0
Q: Selecting security questions and entering answers

Kala JI have a dialog that houses 6 security questions and 6 security question answers. I want to pass the data the user selects and enters from the view to the controller to save the data in session. Right now, the code works perfectly but it is a mess. I am passing 12 arguments to my controller act...

Also note, that an "answer" consisting of a code dump with the "final code" (...is code ever "final"??) will be downvoted and flagged as "not an answer" - please shape your selfie in the form of a review, as if you were reviewing your own code (which you can always do anyway); explain why changes are made (and/or link to answers that do). This site isn't about the "final code" after all; it's about understanding how code can be improved. Just dumping the improved code as an answer saying "thanks all, this is how it looks now" provides no value whatsoever. — Mat's Mug 28 secs ago
@RubberDuck The worst part? Wolfenstein 3d is on the iOS app store.
Monking CRitters!
14:38
I don't know if they took the Nazi flags out of it or not for Apple, but the app store description references the Nazis.
14:55
Am I being salty?
@gamil No, it doesn't, it merely explains how to use it and why it should or should not be used, if you would have read my question, you would see that I have already set everything up. If it would help me (as you think), then point out how it would help me. — skiwi 7 secs ago
A little
Wait
how did a 1-rep user that made his account today make a comment?
@JeroenVannevel you can always comment on your own posts
@JeroenVannevel Eh... indeed, wtf?
but it's not his post
it's @skiwi's post
His comment did disappear though, but got re-added within a minute again

« first day (782 days earlier)      last day (3534 days later) »