teleren/devto huggingface dataset:
How to Write a Multiline Lambda in Java 8
Tags: java, functional, beginners
Published: 2018-04-01 20:12:30

---
title: How to Write a Multiline Lambda in Java 8
published: true
tags: java, functional, beginners
canonical_url: https://www.gunnargissel.com/how-to-write-a-multiline-lambda-in-java8.html
cover_image: https://thepracticaldev.s3.amazonaws.com/i/w1oh7x2p3d9y8cedlsd7.png
---

For the most part, single line lambda functions are all you need.

This is a single line lambda:


    Predicate<Sound> isBark = sound -> Sound.valueOf("bark").equals(sound); 


Sometimes one line is not enough to express the complexity of the lambda. How do you make a multiline lambda?

This is how:


    //set up - elsewhere in the pseudo code Animal interface: 
    public Sound getSound() throws MuteAnimalException {...} 
    Predicate<Sound> isBark = sound -> Sound.valueOf("bark").equals(sound); 
    //payoff, a multiline lambda 
    Predicate<Animal> isDog = animal -> { 
        try { 
            return isBark.test(animal.getSound()); 
        } catch (MuteAnimalException e){ 
            logger.severe(e.getMessage); return false; 
        } 
    };
Hi, I'm ismail abdelouahed
Tags: introductions
Published: 2017-03-13 19:30:09

---
title: Hi, I'm ismail abdelouahed
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for [number] years.

You can find me on Twitter as [@ismail0611](https://twitter.com/ismail0611)

I live in [city].

I work for [company]

I mostly program in these languages: [languages].

I am currently learning more about [topic].

Nice to meet you.
Hi, I'm Andree Kröger
Tags: introductions
Published: 2017-03-13 18:55:37

---
title: Hi, I'm Andree Kröger
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for [number] years.

You can find me on Twitter as [@kroegodil](https://twitter.com/kroegodil)

I live in Oldenburg.

I work for open knowledge GmbH

I mostly program in these languages: Java and JavaScript.

I am currently learning more about Webdevelopment.

Nice to meet you.
Hi, I'm Sha Alibhai
Tags: introductions
Published: 2017-03-13 18:43:27

---
title: Hi, I'm Sha Alibhai
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 15 years.

You can find me on GitHub as [shalotelli](https://github.com/shalotelli)

I live in Orlando, Florida.

I work for Unboxed Technology

I mostly program in these languages: JavaScript, TypeScript, SASS, HTML.

I am currently learning more about Angular 2.

Nice to meet you.
Hi, I'm Mark Whibley
Tags: introductions
Published: 2017-03-13 17:59:11

---
title: Hi, I'm Mark Whibley
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 23 years.

You can find me on Twitter as [@mark_whibley](https://twitter.com/mark_whibley)

I live in Dover, UK.

I work for futureCodersSE CIC as their Lead Developer.

I mostly program in these languages: Java, Javascript, HTML, CSS, SQL.

I am currently learning more about lots!

Nice to meet you.
Hi, I'm Freddy Reyes
Tags: introductions
Published: 2017-03-13 17:23:58

---
title: Hi, I'm Freddy Reyes
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for [number] years.

You can find me on Twitter as [@reyfreddy12](https://twitter.com/reyfreddy12)

I live in [city].

I work for [company]

I mostly program in these languages: [languages].

I am currently learning more about [topic].

Nice to meet you.
Understanding How CSS Calc() Works
Tags: webdesign, webdev, css, csspreprocessors
Published: 2018-09-04 21:06:41

---
title: Understanding How CSS Calc() Works
published: true
tags: web-design,web-development,css,css-preprocessors
canonical_url: https://medium.com/@chuksFestus/understanding-how-css-calc-works-fc994ffa49a6
---

![](https://cdn-images-1.medium.com/max/620/1*TwIyl61pW99byVdyxdNwEA.jpeg)

The css3 calc() function is a native CSS way to perform simple mathematical operations property values. Being able to do math in code is nice and a welcome addition to a language that is fairly number heavy.

But is it useful? Well Instead of declaring, for example, static pixel values for an element’s width, we can use calc() to specify that the width be the result of the addition of two or more numeric values.

```
.example {
    width: calc(100px + 50px);
}
```

### Can’t I Just Use Preprocessors?

All CSS Preprocessors do have math functions and they are pretty useful. If you have used CSS pre-processors like SASS then you must have come across something like this

```
.example\_\_one {
    width: 100px + 50px;
}

// Or using SASS variables
$width-one: 100px;
$width-two: 50px;
.example\_\_two {
    width: $width-one + $width-two;
}
```

The above example seems pretty cool however, the calc() function provides a better solution for two reasons. First is it’s **ability to mix units.** We can **combine** relative units such as percentages with absolute units such as pixels. Preprocessors can’t do that because It is something that has to happen at render time.

```
.foo {
    width: calc(100% - 3em);
}
```

In this example, the .foo element will always have a width that is 3em less than 100% of it's parent width.

Second, when doing mathematical expressions with CSS pre-processors, the value given to the browser is the resulting value of the expression.

```
// Value specified in SCSS
.foo {
    width: 150px + 50px;
}

// Compiled CSS and computed value in browser
.foo {
    width: 200px;
}
```

However, with calc() the value parsed by the browser is the actual calc() expression.

```
// Value specified in CSS
.foo {
    width: calc(100% - 50px);
}

// Computed value in browser
.foo {
    width: calc(100% - 50px);
}
```

What this means is that the values in the browser can be more dynamic, and adapt as the viewport changes. We can have an element with a height of the viewport minus an absolute value, and it will adapt as the viewport changes.

### Using Calc()

The calc() function has four simple math operators: add (+), subtract (-), multiply (\*), and divide (/). Basically the calc() CSS function can be used anywhere a <length>, <frequency>, <angle>,<time>, <number>, or <integer> is required.

The calc() function can also be nested like so:

```
.foo {
    width: calc( 100% / calc(25px \* 8) );
}
```

### Providing Fallbacks

For browsers that don’t support calc(), the entire property-value expression is ignored. This means that we can easily provide a fallback static value that will be used by non-supporting browsers.

```
.thing {   
    width: 90%; /\* fallback if needed \*/   
    width: calc(100% - 3em); 
}
```
Saving Commit Templates using Git Extensions
Tags: git, commit, template, programming
Published: 2017-03-13 12:07:51

---
title: Saving Commit Templates using Git Extensions
published: true
description: Nowadays in projects, developers are using a common commit template for all commits in Git. This post provides the step by step details to save commit template in the Git Extension tool.
cover_image: 
tags: git, commit, template, programming
---

*Originally posted in [my blog - Efficient user](https://efficientuser.wordpress.com/2016/03/11/saving-commit-templates-using-git-extensions/)*


Nowadays in projects, developers are using a common commit template for all commits in Git. This post provides the step by step details to save commit template in the [Git Extension tool](https://code.google.com/p/gitextensions/).

## Commit template

The sample commit template will looks as follows

```
[JiraId]: <Description>
[Link]:
[Versions]:
[ReviewedBy]: <PeerName>

```

# Steps to save templates in Git Extensions

The following steps will demonstrates the steps to save the templates

* Commit the changes using Git Extensions tool

![1](https://efficientuser.files.wordpress.com/2016/03/saving-commit-1.png)

* In the commit window, we are having the option called commit templates. By selecting settings option in commit templates dropdown we can add our templates

![2] (https://efficientuser.files.wordpress.com/2016/03/saving-commit-2.png?w=636)

* We can add various commit templates with appropriate provided options

![3] (https://efficientuser.files.wordpress.com/2016/03/saving-commit-3.png?w=636)

* Once we added our templates, we can able to quick select various templates as follows

![4] (https://efficientuser.files.wordpress.com/2016/03/saving-commit-4.png?w=636)

![5] (https://efficientuser.files.wordpress.com/2016/03/saving-commit-5.png?w=636)

Cool, That's it.


Happy Coding!
Nevertheless, Liza Wilde Coded
Tags: wecoded
Published: 2017-03-08 13:49:20

---
title: Nevertheless, Liza Wilde Coded 
published: true
tags: shecoded
---

## I began coding because...

I traveled a lot as a child, and my computer was my constant. I was a huge fan of the gaming site, Neopets, and with each virtual pet you got a blank HTML page to do with what you wanted. I read ALL of their tutorials and would make my pages the best they could be, even creating multiple accounts and pets so that I could link pages. Eventually their tutorials weren't enough, so I dived into other online resources and I've been hooked ever since.

## I'm currently hacking on...

All of the websites I work on through my 9-5 job, but I also design and develop websites for creative entrepreneurs in my free time, so I'm usually hacking away at one of those. I was recently excepted into the Hackers Fellowship in Detroit, Michigan, and am gearing up for some amazing bootcamp learning, and all of the awesome collab projects that will come from that!

Oh, and I'm an event organizer for Girl Develop It Ann Arbor, so I'm usually hacking away at the logistics of planning workshops. ;)

## I'm excited about...

Teaching GDI Ann Arbor's Intro to HTML/CSS workshop at the end of this month. It'll be my second time teaching this curriculum, and I'm always so excited to see my students get into the basics and their questions about where it can take them in the future. 

I'm really passionate about helping other women get into code, whether that's the career path they've always been on, or it's a change from what they've been doing for the last decade. 

## My advice for other women who code is...

Declare it. Tell the world you are interested in coding, and it will welcome you. There are so many resources, and groups, and companies who are looking for women who code.
Hi, I'm Pof Magicfingers
Tags: introductions
Published: 2017-03-13 11:28:03

---
title: Hi, I'm Pof Magicfingers
published: true
description: My introduction post
cover_image: https://pbs.twimg.com/profile_banners/17706545/1398446426/1500x500
tags: introductions
---

I have been coding for 16 years. I debuted with HTML/JS when I was 7 or 8 years old

You can find me on GitHub as [PofMagicfingers](https://github.com/PofMagicfingers)

I live in Toulouse, France.

I work for Xtraball, developers of [SiberianCMS](http://siberiancms.com/),
I'm CTO and co-founder of [podCloud](https://podcloud.fr/) a french platform to listen, watch, and create podcasts.

I mostly program in these languages: HTML5, JS, (S)CSS, Ruby, Rails on personal projects, and PHP on work projects.

I am currently learning more about PostgreSQL.

Nice to meet you.
Hi, I'm Pandiyan Murugan
Tags: introductions
Published: 2017-03-13 11:25:14

---
title: Hi, I'm Pandiyan Murugan
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for Four years.

You can find me on GitHub as [PandiyanCool](https://github.com/PandiyanCool) & Twitter [Pandiyan](https://twitter.com/pandiyan_cool)

I mostly program in these languages: JavaScript, Angular Js, C#.

I am currently learning more about .net core.

And my blog is [EfficientUser](https://efficientuser.wordpress.com/).

Nice to meet you.
Hi, I'm Mike
Tags: introductions
Published: 2017-03-13 11:07:06

---
title: Hi, I'm Mike
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 3 years.

You can find me on GitHub as [mgaruccio](https://github.com/mgaruccio)

I live in Cleveland.

I work for Expedient

I mostly program in these languages: PowerShell, JS, Ruby, Python.

I am currently learning more about web development.

Nice to meet you.
Hi, I'm Phil
Tags: introductions
Published: 2017-03-13 08:45:33

---
title: Hi, I'm Phil
published: true
description: My introduction post
cover_image: http://phil-b.xyz 
tags: introductions
---

I have been coding for 12 years.

You can find me on Twitter as [@comradephil](https://twitter.com/comradephil)

I live in Portsmouth, UK.

I worked for Airborne Interactive Ltd.

I mostly program in these languages: JavaScript, QML, C#, Bash and SQL.

I am currently learning more about Node.js, AngularJS and Java.

Nice to meet you.
Hi, I'm Igle
Tags: introductions
Published: 2017-03-13 07:45:36

---
title: Hi, I'm Igle
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for [5-6] years.

You can find me on Twitter as [@tuSigle](https://twitter.com/tuSigle)

I live in [Salamanca].

I`m trying to be [Freelance].

I mostly program in these languages: [C, C++, PYTHON, JAVA].

I am currently learning more about [RUST, DJANGO, OPENGL].

Nice to meet you.
<3 :3
Love and Happiness
Published: 2017-03-13 07:14:18

---
title: Love and Happiness
published: true
description: 
cover_image: 
tags: 
---

I'm Tim. You can find more here:

* https://www.linkedin.com/in/drtimwright
* https://github.com/drtimwright
* http://stackoverflow.com/users/story/6768976
How to build a Macintosh executable that will run on older versions of MacOSX.
Tags: mac
Published: 2018-10-06 01:44:38

---
title: How to build a Macintosh executable that will run on older versions of MacOSX.
published: true
tags: mac
canonical_url: http://www.hpcoders.com.au/blog/?p=100
---

This took me a good day of drilling into MacOSX, with a paucity of appropriate advice on the internet, which is why I’m writing this post.

## -mmacosx-version-min compiler flag

The first hint is to use the -mmacosx-version-min compiler flag, which takes values like 10.9 (for Mavericks) or 10.12 (for Sierra). If you are compiling everything from self-contained source code, it suffices to add this compiler flag to your CFLAGS variable, and build away. I discovered by experimentation that Mavericks was about the earliest OSX that support the C++11 standard library.

## Checking the minimum version of an executable or library

Use <tt>otool -l</tt> _executable or library_ and then look for the tag <tt>LC_VERSION_MIN_MACOSX</tt>

## MACOSX\_DEPLOYMENT\_TARGET environment variable

If you don’t specify the above compiler flag, then the clang compiler will examine the value of the MACOSX\_DEPLOYMENT\_TARGET environment variable, and use that the target of the compiler. This is useful as a way of setting the deployment target without editing a bunch of files (say you’re compiling a bunch of 3rd party libraries).

If the environment variable not set, then the current OSX release version is used.

## MacPorts

The problem with MacPorts is that it overrides the MACOSX\_DEPLOYMENT\_TARGET and sets it to your current machine’s value.  
After a lot of browsing of the TCL scripts that MacPorts used, I found that you can add it as a configuration option to /opt/local/etc/macports/macports.conf

```
macosx\_deployment\_target 10.9 buildfromsource always
```

The second option is required to prevent macports downloading prebuilt binary packages.

Final tip is if you have already built some packages before setting the above options, then you can rebuild the ports via

```
port upgrade --force installed
```
Hi, I'm Justin Riedyk
Tags: introductions
Published: 2017-03-13 06:08:11

---
title: Hi, I'm Justin Riedyk
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 3 years.

You can find me on Twitter as [@JustRiedy](https://twitter.com/JustRiedy)

I mostly program in these languages: Powershell, Ruby.

I am currently learning more about Puppet.

Nice to meet you.
Hi, I'm Chintan
Tags: introductions
Published: 2017-03-13 04:27:35

---
title: Hi, I'm Chintan
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for just over 13 years, 7 of those for actually earning a living.

You can find me on Twitter as [chin7an](https://twitter.com/chin7an), and I have a Github account as well, [chin7an](https://github.com/chin7an) but that account remains pretty much empty.

I work for Qualtrics developing their platform services.

I mostly program in Java, and Ruby, but the job also requires a good amount of PHP.

I am currently learning more about functional programming, and Elixir while running through examples.

Nice to meet you.
Hi, I'm safoche
Tags: introductions
Published: 2017-03-13 04:15:28

---
title: Hi, I'm safoche
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 3 years.

You can find me on GitHub as [safoche](https://github.com/safoche)

I live in Muscat, Oman.



I mostly program in: Java.

I am currently learning more about Ruby on Rails.

Nice to meet you.
Hi, I'm Treighton Mauldin
Tags: introductions
Published: 2017-03-13 03:50:48

---
title: Hi, I'm Treighton Mauldin
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for ~5 years.

You can find me on GitHub as [treighton](https://github.com/treighton)

But, I use gitlab so you can also go here [treighton](https://gitlab.com/treighton)

I live in Franklin, California.

I work for [10up](https://10up.com/)

I mostly program in these languages: HTML, CSS, JS, and PHP.

I'm always learning something; right now I am focusing on:

a11y, Gutenberg (Wordpress), and becoming a CSS craftsman. I am also learning about small scale farming and powerlifting
Hi, I'm Naman Sachdeva
Tags: introductions
Published: 2017-03-13 02:42:22

---
title: Hi, I'm Naman Sachdeva
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 4 years.

You can find me on GitHub as [namansachdeva](https://github.com/namansachdeva)

I live in Faridabad.

I mostly program in these languages:HTML, CSS ,  C++ and Java.

I am currently learning more about Android.

Nice to meet you.
Hi, I'm Firehead16
Tags: introductions
Published: 2017-03-13 01:44:41

---
title: Hi, I'm Firehead16
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 3 years.

You can find me on Twitter as [@firehead_16](https://twitter.com/firehead_16)

I live in Chelyabinsk, Russia.

I didn't work anywhere

I mostly program in these languages: C#, Python.

I am currently learning more about SQL.

Nice to meet you.
Hi, I'm Bobby
Tags: introductions
Published: 2017-03-13 01:20:41

---
title: Hi, I'm Bobby
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 7 years.

You can find me on GitHub as [ImBobby](https://github.com/ImBobby)

I live in Jakarta.

I work for Suitmedia

I mostly program in these languages: Javascript, HTML and CSS.

I am currently learning more about Node.js and front-end mvc framework.

Nice to meet you.
Hi, I'm Sayo Paul
Tags: introductions
Published: 2017-03-13 01:10:03

---
title: Hi, I'm Sayo Paul
published: true
description: easy going passionate learner with a desire to be world class.
cover_image: 
tags: introductions
---

I have been coding for 1 year +.

You can find me on GitHub as [sayopaul](https://github.com/sayopaul)

I live in PortHarcourt, Nigeria.

I am a student at FUNAAB

I mostly program in these languages: PHP.

I am currently learning more about Laravel.

Nice to meet you.
Hi, I'm Nelson Antunes
Tags: introductions
Published: 2017-03-13 00:26:11

---
title: Hi, I'm Nelson Antunes
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 15 years.

You can find me on Twitter as [@nantunes](https://twitter.com/nantunes)

I live in Lisbon, Portugal.

I work for Pentaho.

I mostly program in these languages: Javascript and Java.

Nice to meet you.
Hi, I'm Tiago Amaro
Tags: introductions
Published: 2017-03-12 23:56:57

---
title: Hi, I'm Tiago Amaro
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 10 years.

You can find me on Twitter as [@tiagopadrela](https://twitter.com/tiagopadrela)

I live in Rio de Janeiro.

I work for my own

I mostly program in these languages: Ruby and Javascript.

I am currently learning more about Marketing and self employment.

Nice to meet you.
Hi, I'm Jansen Fuller
Tags: introductions
Published: 2017-03-12 22:56:30

---
title: Hi, I'm Jansen Fuller
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding since I was 12 years old.

You can find me on GitHub as [jansenfuller](https://github.com/jansenfuller)

I live in Salt Lake City.

I work for MaritzCX

I mostly program in these languages: Python, C#, and C++.

I am currently learning more about Perl and system scripting.

Nice to meet you.
Hi, I'm Mateus Rodrigues de Morais
Tags: introductions
Published: 2017-03-12 22:31:50

---
title: Hi, I'm Mateus Rodrigues de Morais
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 8 years.

You can find me on Twitter as [@hitech_8](https://twitter.com/hitech_8)

I live in Natal, RN, Brazil.

I mostly program in these languages: C#, ASP.NET, .NET Core.

I am currently learning more about Machine Learning.

Nice to meet you.
Hi, I'm Ahmed ElSawaf
Tags: introductions
Published: 2017-03-12 22:01:39

---
title: Hi, I'm Ahmed ElSawaf
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 5 years.

You can find me on Twitter as [@_BonDoQ](https://twitter.com/_BonDoQ)

I live in Berlin.

I work for Zalando

I mostly program in these languages: Javascript.

I am currently learning more about ReactJS.

Nice to meet you.
Hi, I'm Cristian Cepeda
Tags: introductions
Published: 2017-03-12 20:40:01

---
title: Hi, I'm Cristian Cepeda
published: true
description: Family Man & Web Development Enthusiast
cover_image: 
tags: introductions
---

I have been coding for 10 years. You can find me on GitHub as [pastuxso](https://github.com/pastuxso).

I live in Pasto/Colombia, I mostly program in these languages: Ruby, Elixir and Javascript, I am currently learning more about Elixir and ReactJS.

Nice to meet you.
Hi, I'm Paul Mortimer
Tags: introductions
Published: 2017-03-12 20:36:53

---
title: Hi, I'm Paul Mortimer
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 35 years.

You can find me on GitHub as [LastManStanding](https://github.com/LastManStanding)

I live in Sydney.

I work for Logical3

I mostly program in these languages: GO, C#, HCL, 

I am currently learning more about Block Chains, Encryption & Deployment

Nice to meet you.
Hi, I'm Henning B.
Tags: introductions
Published: 2017-03-12 20:33:38

---
title: Hi, I'm Henning B.
published: true
description: My introduction post
cover_image: 
tags: introductions
---

I have been coding for 24 years.

You can find me on Twitter as [@henning_me](https://twitter.com/henning_me)

I live in Frankfurt.

I work for DB Fernverkehr.

I mostly program in these languages: C#.

I am currently learning more about Service Fabric.

Nice to meet you.
Hi, I'm Nick Taylor
Tags: introductions
Published: 2017-03-12 20:22:41

---
title: Hi, I'm Nick Taylor
published: true
description: My introduction post
cover_image: 
tags: introductions
canonical_url: https://www.iamdeveloper.com/posts/hi-im-nick-taylor/
---

You can find me on GitHub as [nickytonline](https://github.com/nickytonline) or find out more about me at [iamdeveloper.com](http://iamdeveloper.com).

I live in Montreal, Quebec, Canada.

I mostly program in JavaScript/TypeScript and love React.

Nice to meet you.