Al Hobbs

Rancher
+ Follow
since Aug 30, 2017
Al likes ...
Fedora IntelliJ IDE Spring
Cows and Likes
Cows
Total received
6
In last 30 days
0
Total given
0
Likes
Total received
38
Received in last 30 days
2
Total given
66
Given in last 30 days
9
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Al Hobbs

So you want to be able to go to different anchors?
The response you bet is not related to having other plans.  It only means that he will let you know if he needs a ride.
2 days ago
I dont know about Microsoft and yandex but Google has an api for its translator.  It's priced by character.
2 days ago
I think if you just remove the # from the url then angular won't reload because it's the same route.
If the input will always be a number you dont even have to int.parse.  you can just compare the characters
3 days ago
Your code may run fine with the example test cases but it  probably doesn't hold up under all the test cases that are tested when you submit.  You will probably have to improve it.
3 days ago
Does it compile?  
3 days ago
Doesn't the anchor appear in the url with a # in front?   The anchor mechanism is handled by html so to clear it you would have to change the url  or navigate back to the dogs page without the anchor.  
Why don't you put the dog images in another component  so when you click on the dog or whatever instead of going to the content using an anchor it goes to another route like dogs/<<dogname>>  
Doesn't the anchor appear in the url with a # in front?   The anchor mechanism is handled by html so to clear it you would have to change the url  or navigate back to the dogs page without the anchor.  
Why don't you put the dog images in another component  so when you click on the dog or whatever instead of going to the content using an anchor it just goes to another route like dogs/<<dogname>>  

Stephan van Hulst wrote:You will want to perform a GroupBy.



Oh returning empty enumerable looks way better.  Nice!!!
I didn't understand it at first but it groups the objects by their value then takes the first one.  Very clean!!!
Thanks  
3 days ago
Hi all,

I am trying to get the cleanest way to get the objects with the smallest values.

I know how to get just one :

list.OrderBy(d => d.size).FirstOrDefault();



But if there are multiple objects with the minimum size I want all of them.  
Right now I am planning on doing:

var min =  list.Min(d => size);
return list.Where(d => d.size =  min);



Is there another linq method that maybe I'm looking over?

If there is no better way in C# is there maybe a cleaner solution in Java streams?

Thanks!  
4 days ago
Generally, java used mostly for most so there is no should you learn swing or JavaFX.  You should however know how to make desktop applications.  In that case you could use whatever you want.
4 days ago
If you have an object that has the label and description content in it then yes.
Is it possible to load files from the local pc using Javascript?  I thought it wasnt allowed.
Either way your html where you have the slides can be reduced to the html for one slide.  Theres an angular tag that will iterate through an array and put the appropriate data where you want it much like a jsp.