Nikola Brežnjak blog - Tackling software development with a dose of humor
  • Home
  • Daily Thoughts
  • Ionic
  • Stack Overflow
  • Books
  • About me
Home
Daily Thoughts
Ionic
Stack Overflow
Books
About me
  • Home
  • Daily Thoughts
  • Ionic
  • Stack Overflow
  • Books
  • About me
Nikola Brežnjak blog - Tackling software development with a dose of humor
Books

Surely You’re Joking, Mr. Feynman! – Richard P. Feynman

My notes from the bestseller book Surely You’re Joking, Mr. Feynman! (Adventures of a Curious Character) by the author Richard P. Feynman himself (winner of the Nobel Prize in physics), which I rated  4/5 on my Shelfari account:

All the time you’re saying to yourself, ‘I could do that, but I won’t,’ — which is just another way of saying that you can’t.

I couldn’t claim that I was smarter than sixty-five other guys–but the average of sixty-five other guys, certainly!

I learned from her that every woman is worried
about her looks, no matter how beautiful she is.

There were lot of fools at the conference – pompous fools – and pompous fools drive me up the wall. Ordinary fools are alright; you can talk to them and try to help them out. But pompous fools – guys who are fools and covering it all over and impressing people as to how wonderful they are with all this hocus pocus – THAT, I CANNOT STAND! An ordinary fool isn’t a faker; an honest fool is alright. But a dishonest fool is terrible!

I always do that, get into something and see how far I can go.

When I tried to show him how an electromagnet works by making a little coil of wire and hanging a nail on a piece of string, I put the voltage on, the nail swung into the coil, and Jerry said, “Ooh! It’s just like fucking!

I wouldn’t stop until I figured the damn thing out–it would take me fifteen or twenty minutes. But during the day, other guys would come to me with the same problem, and I’d do it for them in a flash. So for one guy, to do it took me twenty minutes, while there were five guys who thought I was a super-genius.

The whole problem of discovering what was the matter, and figuring out what you have to do to fix it–that was interesting to me, like a puzzle.

https://twitter.com/HitmanHR/status/670015841719721984

Ionic, Stack Overflow

How to design a two column button in Ionic framework

profile for Nikola at Stack Overflow, Q&A for professional and enthusiast programmers
I’m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%). In this category (stackoverflow) of posts, I will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread here.

As you may know, I’m really into Ionic framework lately and am helping out on StackOverflow with the knowledge I gained so far with the framework. I’m in the top All time answerers list.

I actually asked this question myself:

What I would like to achieve is this:

enter image description here

Surely, I went through the button documentation, but it seems nothing similar is there. So, I would appreciate some pointing in the right direction (codepen with a basic example would be most awesome).

So, ideally, this would be one button tag where I would be able to pass two variables (one which would appear on the left and one on the right). This does smell like a job for a Angular directive, though I haven’t fiddled with it too much just yet so a friendly nudge in the right direction would be appreciated.

Answer from Malek Hijazi was pointing out to use the ButtonBar component, but I already knew about it and it wasn’t what I needed. Finally, I managed to answer this question myself after some fiddling with it:

What I ended up doing in the end was this: I created a div with a class button and then inside it I created additional two div‘s with custom classes.

How this looks like on CodePen:

And, the code below:

.leftButtonSide {
    width: 50%;
    float: left;
    color: #000;
}

.rightButtonSide {
    width: 50%;
    float: left;
    background: #F2F2F2;
    color: #000;
    border-radius: 2px;
}
<div ng-repeat="d in data" class="button button-positive-outline">
    <div class="leftButtonSide">2</div>
    <div class="rightButtonSide">2,00</div>
</div>

True, for the exact same look you would have to play a bit with CSS. I ended up with this in the end:

Hope this helps someone too!

https://twitter.com/HitmanHR/status/669836667893768192

Recent posts

  • When espanso Breaks on Long Replacement Strings (and How to Fix It)
  • 2024 Top Author on dev.to
  • Hara hachi bun me
  • Discipline is also a talent
  • Play for the fun of it

Categories

  • Android (3)
  • Books (114)
    • Programming (22)
  • CodeProject (36)
  • Daily Thoughts (78)
  • Go (3)
  • iOS (5)
  • JavaScript (128)
    • Angular (4)
    • Angular 2 (3)
    • Ionic (61)
    • Ionic2 (2)
    • Ionic3 (8)
    • MEAN (3)
    • NodeJS (27)
    • Phaser (1)
    • React (1)
    • Three.js (1)
    • Vue.js (3)
  • Leadership (1)
  • Meetups (8)
  • Miscellaneou$ (78)
    • Breaking News (8)
    • CodeSchool (2)
    • Hacker Games (3)
    • Pluralsight (7)
    • Projects (2)
    • Sublime Text (2)
  • PHP (6)
  • Quick tips (41)
  • Servers (8)
    • Heroku (1)
    • Linux (3)
  • Stack Overflow (81)
  • Unity3D (9)
  • Windows (8)
    • C# (2)
    • WPF (3)
  • Wordpress (2)

"There's no short-term solution for a long-term result." ~ Greg Plitt

"Everything around you that you call life was made up by people that were no smarter than you." ~ S. Jobs

"Hard work beats talent when talent doesn't work hard." ~ Tim Notke

© since 2016 - Nikola Brežnjak