Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

Andrew Polansky

Ranch Hand
+ Follow
since Feb 21, 2015
Andrew likes ...
Linux MS IE
Cows and Likes
Cows
Total received
18
In last 30 days
0
Total given
0
Likes
Total received
74
Received in last 30 days
0
Total given
84
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Andrew Polansky

Winston Gutkowski wrote:

Adam Scheller wrote:Yesterday in a newspaper I found that the picture below got sold on an action. Try to guess for how much it got sold, in EUR? I cannot tell the name of the artist because that would make things easier


Sepp Blatter? (I noticed the corrupted '$' sign)

If so, I'm sure one of his cronies would stump up a million to help pay his legal fees...

Winston



It's not Sepp Blatter. It's Adam Scheller I lied about the auction. I sketched those totally random lines in about 10 seconds. But if somebody is interested in buying it for a million dollars then send me a poorple moosage

IMO, the modern art is not about art, but about signatures. If one would do an official auction of the picture above and said it's sketched by some famous artist, it would be called as a great piece of modern art and could be sold for several hundred of thousands US dollars. But if the auctioneer would tell it's a sketch of an ordinary guy coding Java, people would laugh on it. Try to negatively comment online some modern art picture like the one above. People will comment "dude, it's John Doe", "you have no idea what are you talking about, it's John Doe", "hey, I don't know if you know, but it's John Doe...", and so on. Replace John Doe with name of any famous artist. If such John Doe sketches a pooping moose in 10 seconds it will be called a great art anyway. Who cares what's on the picture, when below is the signature of John Doe?
2 years ago

Brian Tkatch wrote:My Windows box has a black background with no icons, just the bar on bottom


High five Brian, I have the same setup I just have the bar on the top.

2 years ago
Yesterday in a newspaper I found that the picture below, painted by a known artist, got sold on an action. Try to guess for how much it got sold, in EUR? I cannot tell the name of the artist because that would make things easier

2 years ago
Oh no no no no no!


Tim Holloway wrote:The bad thing about vi is that if you sneeze while seated at the keyboard, you've probably managed to press random keys, and just about any random key sequence is a (probably dangerous) vi command. Which, to compound the injury, will probably get executed, since command mode is the default vi editor mode.


I agree that hitting random keys in command mode may lead to weird things, but it's nothing that couldn't be undone by hitting "u" (undo) or ESC button to cancel the current command.

Tim Holloway wrote:Emacs also has the additional virtual in that it's easier to run in an independent window, so when I want to do an edit-and-test cycle on a script, I can spawn an Emacs session from the same command window that I'm running the test script in. Vi's natural state is to own that window, so it's a series of start-vi, edit, save/quit, test, repeat. Of course REAL Emacs diehards simply run the script inside a command-line pane within Emacs, but I don't usually have the patience for that.


Here I disagree completely. In vim you can easily spawn new windows, tab, split windows and so on. There are also powerful buffers that allow you to edit the same file in several windows. You can spawn bash or anything else inside vim as well. And you don't have to save/quit vim at all. You can simply send the process to background (CTRL-Z), do your stuff in the terminal, and bring the process back to foreground (fg command). You can use terminal multiplexers like tmux to switch between terminals in a single terminal. The two last mentioned things are vim unspecific and would work with any software.

Tim Holloway wrote:The Emacs macro language is Lisp, so you can feel like an old-school hacker when customizing it.


You can script vim with lua, perl, python, scheme (lisp dialect), ruby and tcl.

Tim Holloway wrote:On the mixed-blessing side, Emacs leaves behind a "before" image of the file being edited. This was more important back before git, when sometimes the best way to get out of a hole was to pretend you never dug it. But all those backup files tend to clutter directories until you get around to deleting them.


There are plugins and script available for such functionality.


2 years ago
Use service command, ie. service postgresql start.

Enter man service command to get description and available options.
2 years ago
Ah I see. Try to replace systemctl command with service postgresql status. Check what value it returns and use that in your script. systemctl is for systemd init system which wasn't in rhel6
2 years ago
The classes are mostly syntactic sugar for the prototypes system. Mostly, because it actually brings a few useful things like enforcing to use the "new" keyword. Theoretically they should simplify development and make it less bug-prone as there is less messing with code, but I didn't write any production code with them yet so I don't know how it does it in reality.


Remember about case sensitivity, it's systemctl is-active what you have on mind, not systemctl is-Active . The same goes for if, your code has it as a capital letter. You also need fi to close the if. And don't forget about semicolons, as you wrote everything in one line.

2 years ago
Hi,

If you decide to buy the exam from PearsonVue website, you will have to pickup exam date during purchase process. When you buy a voucher, you can set the exam date at later time when you register with the voucher on PearsonVue website.I believe vouchers are valid for one year, but I may be wrong.

If you buy a voucher, you can use it as a payment method on PearsonVue website. Instead of using credit card on checkout you will be able to enter voucher code.

I think that this is the only practical difference between buying directly at PearsonVue and voucher from Oracle. I am getting OCA JP8 next month and I bought voucher from Oracle, because I had no credit card available at the moment. They simply voucher along with invoice which I could pay through wire transfer.


Why did you decide to do Java 7 exam, when Java 8 is available?
The problem doesn't lie in Arrays.toString(), but in your flatten() method. As a proof, try to print your result like this and you will get exactly the same values as from Arrays.toString().


Try to work on your flatten() method a little more and try to find what is wrong
2 years ago
You can't output an array directly like this. It's toString() will output you its hash code.

Use java.util.Arrays.toString() to get a nice String representation of an array.

By the way, this code will not work as expected ;-)
2 years ago
Thanks for your comments Scott. If you need a picky tech reviewer for your next book, send me PM

Jeanne Boyarsky wrote:

Adam Scheller wrote:I have missed Jeanne's response when I did my last post.


I posted a whole 3 minutes before you . You were probably already typing when I posted it.



That's correct