« first day (632 days earlier)      last day (3401 days later) » 

11:01 AM
I like how the lecture slides refer to the lecture website for more information, and the website refers to the slides and a 3rd resource, and the 3rd resource also refers to the slides
 
The website came first, then the slides, then the webpage for the slides, and then the 3rd resource
okay, now it just needs to be threadsafe
 
morning all :)
 
morning @DJanssens
 
/**
     * Opens the tunnel, blocking until it is opened.
     *
     * @param localPort The port to open the tunnel on.
     * @return whether the tunnel is now open
     */
    public boolean open(int localPort)
    {
        if (localPort <= 0)
        {
            throw new IllegalArgumentException("Using port 0 for a tunnel is invalid, as are negative ports.");
        }
        synchronized (lockObject)
        {
            if (isOpen())
            {
                if (this.localPort == localPort)
synchronized AFTER the argument validation guard clause - good or bad?
 
bad. because outdated localPort without synchronization possible
 
11:15 AM
localPort is argument here
 
@SimonAndréForsberg What's up?
 
nevermind then
 
@Pimgd I don't see much difference with making it fully synchronized
 
well, if you give a crappy localPort, you get exception back immediately
 
@skiwi well you can prevent the "expensive lock" by instantly exiting
also you don't have to wait for other threads if not necessary ;)
 
11:17 AM
@rolfl Monking see this:
48 mins ago, by Simon André Forsberg
zomis@bubble:/var/lib/tomcat8/logs$ psql -h localhost -U duga -W
Password for user duga:
psql: could not connect to server: Connection refused
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 5432?
 
@Vogel612 Hmm ok, that's a point
 
@SimonAndréForsberg /etc/init.d/postgresql restart
 
Dang, I lost my taskbar
It's just gone
It's mildly annoying
 
^^^^ explorer crashed
It normally self-restarts at some point
 
Nope, Windows Explorer itself still works
 
11:19 AM
@rolfl I've done sudo service postgresql restart -- isn't that the same?
 
I was updating my Win10 tech preview in VMWare, but it gave a nice message of not enough disk space available :(
 
@skiwi these 2 are different things
 
What if you hover at the bottom of the window.....
 
It's just all black
(where the taskbar is supposed to be)
 
@SimonAndréForsberg in /var/log there will be a postgresql log file
 
11:20 AM
dafuq... preview bug.
 
MS Visual Studio isntances are like 10GB each... wow
 
@skiwi I wonder if any installer ever came with "not enough desk space available"
 
hey I didn't know I had CS6 installed
 
2015-01-26 11:39:06 CET [4742-1] postgres@postgres FATAL:  password authentication failed for user "postgres"
2015-01-26 11:39:06 CET [4742-2] postgres@postgres DETAIL:  Connection matched pg_hba.conf line 85: "local   all             postgres                                md5"
@rolfl ^^ do I just need to reorder some stuff in pg_hba.conf perhaps?
 
Is that a log of the failed login, or the server startup?
(based on the time...?)
Nope, server startup
 
11:24 AM
Did you set a password for postgres @SimonAndréForsberg
 
yes, I have a password for the user
 
Do you have a 'trust' line?
 
ah :) Since mine is by default empty
 
6
Q: FATAL: password authentication failed for user "postgres"

sayangetting this error message in ubuntu. in pg_hba.conf file, I tried using 'ident','peer','trust','md5' in different times.but no go. please help.

 
METHOD=trust ? what kind of sorcery is that?
 
11:26 AM
Not sure, but does it work?
And, you do know the password, right?
 
I'm not sure this is the issue though
yes, I know the password
 
> Do you trust this printer?
 
OK, so, the problem is in the restart, and you can do that sort of thing in the console.
First, confirm it's dead:
sudo pg_ctl status
sudo ps auxwww | grep postgres
 
@rolfl > trust authentication is appropriate and very convenient for local connections on a single-user workstation. It is usually not appropriate by itself on a multiuser machine.
 
OK.
 
11:30 AM
in my opinion there is no problem in the restart, because I am connected to the server right now
the problem is just that I am connecting to my internal IP instead of localhost.
47 mins ago, by Simon André Forsberg
I solved it by connecting to my own internal ip of 192.168.0.100 instead of 127.0.0.1...
also, here is my config:
40 mins ago, by Simon André Forsberg
local   all             postgres                                md5

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
 
Yaay, I've got my taskbar back
 
I remember me havingto change something there too
 
@Simon - find all the ports your server is listening on with:
sudo lsof -Pni | grep postgres
(lsof -> list open filehandles)
 
@rolfl it is listening on 5432 correctly, I can even connect using pgadmin from my other machine
 
What IP though
 
11:35 AM
postgres  4714 postgres    3u  IPv4 2373877      0t0  TCP 192.168.0.100:5432 (LISTEN)
postgres  4714 postgres    9u  IPv4 2373281      0t0  UDP 127.0.0.1:58325->127.0.0.1:58325
postgres  4716 postgres    9u  IPv4 2373281      0t0  UDP 127.0.0.1:58325->127.0.0.1:58325
postgres  4717 postgres    9u  IPv4 2373281      0t0  UDP 127.0.0.1:58325->127.0.0.1:58325
postgres  4718 postgres    9u  IPv4 2373281      0t0  UDP 127.0.0.1:58325->127.0.0.1:58325
postgres  4719 postgres    9u  IPv4 2373281      0t0  UDP 127.0.0.1:58325->127.0.0.1:58325
ah, I might see your point....
 
Yup, it should be listening on *:5432
 
alternatively, there should be a second line with (LISTEN)
 
listen_addresses = '192.168.0.100'
^^ that might explain it...
silly me. I had changed that once, to be able to connect from my other machine
 
Change that to 0.0.0.0 and you'll be fine
 
11:37 AM
it says to use *, but I guess that is the same
 
* would work as well
 
yup, now it works. thanks @rolfl
 
np....
odd, I thought that entry in your log file was from the server process, not the client.
The reason I thought that is because I thought your client was connecting with the username 'duga', not 'postgres'
 
no clue where it was from
there was plenty of it though
ah
 
16 mins ago, by Simon André Forsberg
2015-01-26 11:39:06 CET [4742-1] postgres@postgres FATAL:  password authentication failed for user "postgres"
2015-01-26 11:39:06 CET [4742-2] postgres@postgres DETAIL:  Connection matched pg_hba.conf line 85: "local   all             postgres                                md5"
 
11:39 AM
I've been trying both
 
22 mins ago, by Simon André Forsberg
48 mins ago, by Simon André Forsberg
zomis@bubble:/var/lib/tomcat8/logs$ psql -h localhost -U duga -W
Password for user duga:
psql: could not connect to server: Connection refused
        Is the server running on host "localhost" (127.0.0.1) and accepting
        TCP/IP connections on port 5432?
 
not sure what I did att 11:39
I see the confusion
 
Right... breakfast time...
 
0
Q: Is it okay to just pass an array into a function, rather than declare it?

James DonnellyIn my code I have the following: function foo() { var bar = []; ... /* Array gets populated here. */ return bar; } foo(); If I can be sure that the empty array will always be given, are there any downsides to passing the empty array into the function instead? function foo(bar) ...

 
^^ and gone
is it just me or has that user posted several off-topic questions that has been deleted before?
 
11:48 AM
They'll eventually get a question ban.
 
I'd rather see him drop by chat and be educated than getting a question ban
 
12:05 PM
Monday...
 
12:17 PM
Best troll ever, just changed my friends hosts file so it redirects facebook to the rick astley's never gonna give you up song. :D Fun guaranteed!
2
 
@DJanssens if your friend is not of the technical sort, be aware that you may be spending the next 2 weeks overseeing the reinstallation of their OS and programs.
 
I started getting to work at 6 so I could have an hour of peace and quiet. I started this back in October. Today, half of the office now also gets in at 6.
 
My goal ATM is to save up a bit of money, so that I can then declare that I either get a proper workspace, or I will leave.
Open plan workspaces suck =/
 
@nhgrif They also think it's a good idea?
 
Time to get there at 5am now.
 
12:30 PM
huh
0
A: Why does Iterable<T> not provide stream() and parallelStream() methods?

SaulisJust a follow-up on question on this - why do you want to turn your iterable into a stream in the first place? Is it because you actually want to stream the items in your collection or is it because you just want to iterate through your collection using the functional API that stream offers? For...

 
And for me, it's time to get to work... who knows, may be the last time for a while ;-)
 
This doesn't look good
Would that qualify for a NAA flag on SO?
 
@skiwi NAA requires that there be no information in the answer, when compared to the question.
 
wrong answer != Not an answer
-1 indicated
 
0
A: How to compute two aggregate functions with Java streams?

SaulisTry Enumerables. It has multireduce function designed especially to aggregate multiple values during a single iteration: List<Request> requests = Arrays.asList( new Request(id++, 20, 59.28), new Request(id++, 10, 61.23), new Request(id++, 30, 60.67), ...

0
A: Convert Iterable to Stream using Java 8 JDK

SaulisTry Enumerables. It's a wrapper for Iterable which gives you all the functional goodies Stream has. And because it implements Iterable you don't have to collect the results into a list etc. if you don't want to. Iterable<String> list = new ArrayList<String>(); Enumerable<String> enumerable = En...

0
A: Is there a concise way to iterate over a stream with indices in Java 8?

SaulisTry Enumerables. It`s inspired by C#'s IEnumerable and has a filter overload where you can use indices. String[] names = { "Sam", "Pamela", "Dave", "Pascal", "Erik" }; List<String> nameList = Enumerable.of(names) .filter((c, index) -> c.length() <=...

Add spam flags to all of them.
I mean, it's not really someone trying to help... they're just promoting their new thing
 
12:35 PM
I hadn't done anything yet, but apparently it's already deleted by a moderator
 
all their answers have been
 
Seems like his questions/answers are fully purged already
The advertising did work... I'm looking if I can find any major flaws in his logic there
 
All right. It 630. Everyone is here except the intern...
 
@nhgrif does everyone leave at 15:00?
 
Time to start getting here at 3 am...
 
12:39 PM
@rolfl last time for a while? huh?
 
Normally, people work 7am to 4am.
I started working 6am to 3
4pm rather
 
That user did a fair share of work on his project, which he claims that it replaces streams and clunkiness while it actually doesn't and is possibly not happy with that he hasn't seen any usage from his project yet...
 
In gonna start working 3am to noon...
 
@nhgrif What is the point of going early actually?
 
Peace and quiet. And getting home early.
 
12:47 PM
@skiwi What he did wrong is post solely for promoting his work
 
@Pimgd Yeah, he seems desperate to find users for his framework
 
Anyway, people do a lot of talking about stupid things instead of just working.
 
Do they also stand within 2 feet of you whilst doing so?
 
Or asking other people for help too quickly instead of trying to figure it out on their own more.
We have a pretty small office area...
 
0
Q: Best way to identify a computer in LAN C#

soumerI have a web application to manage computers. Every registered computer is locally querying the latest information and updates the database with it in a 10 minute cycle. But the computer is only allowed to update it's information and nothing else. Currently I'm identifying the computer like this...

0
Q: convert an array to a binary tree

malit.tilakI wrote this code in C++ to convert an array to a Binary Tree. eg:- int nums[] = { 7,5,9,1,7,3} to a binary tree (root-7,root's left child-5, root's right child-9...). is there any shorter way to do this? #include <iostream> #include <cstdlib> #include <cstdio> template<class E> struct TNode{...

 
1:11 PM
Noooooooooooooo
> In Java, you can create a main() method in each class in
order to exercise the other methods
This is NOT how testing in Java works!
 
0
Q: CREATE Service Call - optimization

Jeff LevineI'm a relatively new (~6 mos) developer, and I'm hoping for some feedback on my code style/structure. While I'm particularly interested in efficiency and maintainability, I'm open to feedback regarding anything that comes to mind from more experienced developers. Sorry for such a general questio...

 
@skiwi that's how manual testing works
 
That's... ugly, mind-killing, etc.
 
Hypothetical: You don't know how to set up JUnit.
+ You've never used the automated tests before.
Then it's pretty clever to come up with the multiple main methods
 
0
Q: My code is very slow Xmarin.Forms

IbrahimThis is my code, and I test on S3Neo , Can you help me, how speed up my app. Very slow If I click on button and open new page, draw button.All data in time is local. I'm not sure if the problem is in my code or xamarinu. My code: foreach (var category in avm.Categories) { ToolbarIte...

0
Q: Direction array to support multiple keydowns in 4-directional movement

Ivo CoumansTo get a simple, responsive, 4-directional movement in a 2D game, I've implemented the following. When a key is pressed, the add method adds the direction to the keys array. When the key is released, the remove method removes the direction from the keys array. In my Update method, I call getLast ...

 
1:34 PM
@SimonAndréForsberg not sure what to think and the same content repeated in many places
 
@rolfl That doesn't seem to be good news :/
 
@rolfl ah, I see.... I hope they will let you stay
 
Greetings, Programs.
 
0
Q: Simple command line todo-list

lightandlightIntroduction I've written a simple command line todo-list in Haskell. The full code can be found here. However, given people's time constraints, I have selected three verbose functions for review. Function One program :: StateT TodoList IO () program = do StateT $ \xs -> do (choic...

 
1:51 PM
0
A: CREATE Service Call

PimgdYou're a bit inconsistent with how you handle large argument lists. The large argument lists also make your code unreadable (or at least hard to read). I have trouble discerning the parts where your code does actual work and the parts where checks and logging happens. private void doCreateSavedS...

boosh
 
@Donald.McLean Greetings, User
4
 
@skiwi "you can" does not mean "you should".
2
 
I'm still having a hard time reading that person's code
 
2:09 PM
@Phrancis Actually, their code isn't bad. I'm not sure I'm Scala enough to give that the review it deserves.
 
@Donald.McLean If you aren't Scala enough, who is?
 
I'm just the most vocal Scala user who is active in chat.
 
Not sure what I'm reading here...
> National culture

American managers have a hamburger style of management.
They start with sweet talk – the top of the bun. Then the
criticism is slipped in – the meat. Finally, some encouraging
words – the bottom bun.

With the Germans, all one gets is the meat.

With the Japanese, all one gets is the bun; one has to smell
the meat.
It's a slide on global software development
 
2:15 PM
Damn. Walking by -20 degrees from car to office; a few seconds before reaching the entrance I hear a big "crack-boom" - a truck just made a tight turn and blew up a power line. No electricity for at least another 3 hours. Way to start the day!
2
 
@skiwi so true
 
@Mat'sMug Great start of the day
 
@Mat'sMug Here's a typewriter; all you do is typing anyway - Your boss
 
@skiwi It's called the sh1t sandwich.
 
And it rolls downhill.
 
@rolfl As long as it doesn't have any pictures on the page
 
balls
I can't make my Tunnel AutoClosable because close returns a boolean
 
No pictures, and management speak.
@Pimgd Exceptions for failures!
 
No thanks
 
Apparently having half the alphabet as shortcut keys is a thing...
 
2:33 PM
0
Q: wait for all resources loading

SETIn my application I need some resources to be loaded and I have services to load each of them and then I need some point to know that all requests finished. First thought was to use $q.all with array of promises from that services. But it would be resolved only if all promises resolved which is n...

1
Q: PHP login script security check

KrisI made an admin login script for my own CMS website that I'm making in Code Igniter 2.2.1 and I'd like to know what are the potential threats or some holes that I might have left open. So basically this is how it goes: user submits form to admin_login page where the script collects the post da...

0
Q: Rails integration testing: Should we use strings or named routes in http requests?

MohamadWhen integration testing Rails applications HTTP request helpers can take a string or a named route as the first argument. I find myself writing: test "user visits edit page" do homer = users(:homer) get "users/#{homer.id}/edit" assert_response :success end But I can also write: test "...

 
Is naming still an issue if it's Mrs.Maintainer fixing the bugs? ;) — Mat's Mug 16 secs ago
3
 
haha^^^
 
Got nothing to do, so I'm browsing and voting and commenting while phone battery lasts ;)
 
@Mat'sMug Don't worry, if it runs out you can just re-no you're screwed
 
lol
 
2:40 PM
@Mat'sMug turn on energy saving; I've found that it makes my phone last a lot longer whilst not impacting its function
 
If it runs out I'll turn on the laptop and suck the power out of the battery and into my phone through the USB port ;)
@Pimgd Thanks, that's always on. You actually reminded me to turn off location & bluetooth!
 
I didn't know Inappropriate intimacy was a case of code smell
 
@skiwi Well, how would you feel if something was accessing your privates?
 
@skiwi I think that one deserves further explanation/context
 
@Pimgd Probably related to that one, yes, I just didn't see the link
 
2:44 PM
@rolfl how the heck was this answer CW'd?
2
A: XAML Markup Improvements

Mat's MugThere isn't much to say about the markup here - it looks like much was stripped from the markup. One thing though: <Border BorderBrush="Black" BorderThickness="1"> <Image Source="MyImage.png"/> </Border> I wouldn't hard-code paths into the XAML like this...

Phone post from SE app...
Can it be un-wikified?
 
Unwiki'd.
 
that was fast
 
Thanks
 
But, the history indicates that the post was CREATED as a wiki post.
Did you inadvertently check the box before posting?
 
I don't know how that happened
 
2:45 PM
If not, it's a bug....
 
Didn't notice any box
I wonder... hold on
 
^^^ that box (if using the regular web site).
 
Phone app funded by community wiki rep
4
 
Nope. There's just a 'Submit' button in the top-right.. and I couldn't repro.. no idea how it went wiki
 
2:52 PM
WTF I'm reading a slide explaining some stuff and it just ends with this, no further notice:
> Then, magically, UFP = 4I + 5O + 10E + 4L + 7F
 
@rolfl 1 vote short of a [badge:necromancer]! Thanks Santa!
 
How many of you are aware of the hidden timeline feature for questions on Stack Exchange?
 
@rolfl That's wicked awesome!! That's in the "SE Moderation for Dummies" manual?
 
It only works on questions, and it's been available for a while.
 
@rolfl Why is that hidden?! I've never seen that before
 
2:58 PM
There's a userscript that adds the 'timeline' button to all questions....
 
That's awesome.
 
46
Q: Add a link to the timeline of a post

stemaSince a year I am quite active on SO and a bit on meta, but I have never heard of the timeline of a post, till today in a comment on meta. There has been an announcement by Jeff Atwood 2 years ago of this feature as "experimental". (Timeline for that question). This feature has been requested b...

 

« first day (632 days earlier)      last day (3401 days later) »