teleren/devto huggingface dataset:
In the Zone
Published: 2022-03-22 20:48:27

---
title: In the Zone
published: true
date: 2014-11-02 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2014/in-the-zone/
---

On Friday night I had the urge to fire up Visual Studio and tomorrow (Monday) I move house.

What’s with that? Why am I in a programming mood when I have boxes to pack and shelves to take apart?

For the last few weeks I have been too busy with other things to do much programming or when I had the time I felt more like relaxing than learning anything new.

How do I get into the programming zone, what was it about this particular weekend that made me want to? Was it just the fact I had no time to concentrate on it, or is there some more useful factor that controls my desire to code?

I can think of a few factors that I should make note of.

1. Peace and quiet – Friday night I had the place to myself so I could concentrate and do whatever I wanted.
2. Ideas – Before I started I had some ideas, why don’t I try doing x. Once I have a coding idea I need to investigate it and see where it goes.
3. Break from routine – Friday night was the start of a whole week away from work, this gives me more time to forget about the daily stress of the office and think about other things.
4. Goals – Work annoyed me on Friday and if I want to achieve my goal of working in development more then I need to work at it.

I am not sure how I can put these into practise so that I spend more time on development but we will see. One thing I want to achieve in my new home is a quiet place to concentrate and think without distractions, I have a few options which I will investigate over the next few weeks.

Anyway need to get back to packing boxes.
PHP Ternary Operator
Tags: php
Published: 2021-05-03 17:16:30

---
title: PHP Ternary Operator
published: true
date: 2014-10-31 00:00:00 UTC
tags:
- php
canonical_url: https://www.emmanuelgautier.com/blog/php-ternary-operator
---

The usage of the ternary operator is not the simplest and the most readable way to develop but can be useful for simple conditions. The implementation of the ternary operator depends on the language, let's see how to do it in PHP.

## What is the ternary operator?

It is a one line way to write some conditions like the following example:

```php
if($boolean) {
  echo "foo";
} else {
  echo "bar";
}
```

This condition is simple but takes 5 lines of code. The ternary operator allows to have this condition in only one line without removing too much readability here:

```php
echo ($boolean ? "foo" : "bar");
```

You write your code like this for every use case and have a ternary operator into a ternary operator. But this way can lower the readability of your code, so making the application harder to understand and to maintain:

```php
echo ($boolean ? ($boolean2 ? "true true" : "true false") : "false");
```

The ternary operator could be write as following as well:

```php
$value = $value ?: $othervalue;
```

This way could be useful to assign a default value. Let's take as an example one use case where we want to display as name, the family name if exists else the username :

```php
$display_name = $lastname ?: $username;
```

[Documentation](http://php.net/manual/fr/language.operators.comparison.php#language.operators.comparison.ternary)
より“軽く・速く・薄くなった”iPad。 Apple iPad Air 2 SIMフリー 64GB ゴールド レビュー
Tags: review
Published: 2018-05-16 20:31:02

---
title: より“軽く・速く・薄くなった”iPad。 Apple iPad Air 2 SIMフリー 64GB ゴールド レビュー
published: true
tags: review
canonical_url: http://connect.coron.tech/archives/51871703.html
---

[![IMG_6589](http://livedoor.blogimg.jp/cv_k/imgs/2/4/2400e812-s.jpg)](http://livedoor.blogimg.jp/cv_k/imgs/2/4/2400e812.jpg "IMG\_6589")  

驚くほどに軽く、そして速くなったiPad
  
  
約4ヶ月振りのブログ記事となりました。この4ヶ月間には管理人にとってとても様々な経験をすることになった4ヶ月間となり、久々に自宅以外での活動時間が自宅にいる時間を上回った一ヶ月間でもありました。この4ヶ月間については、本年の年末記事にて詳しくまとめていきたいと思っています。  
  
さて、10月24日より販売開始された、iPadシリーズの最新モデル、「iPad Air 2」の64GB･ゴールド･SIMフリーモデルを購入しましたのでひとまず開封と比較のレビューをお届けします。日本通信のPlatinum DATA SIMも予約しており、到着次第紹介したいと思います。  
  
続きは以下からどうぞ。  
[続きを読む](http://connect.coron.tech/archives/51871703.html) ![](http://counter2.blog.livedoor.com/c?ro=1&act=rss&output=no&id=2732114&name=cv_k&pid=51871703)
To boldly go where no SQL has gone before Part 2
Published: 2022-03-15 21:52:38

---
title: To boldly go where no SQL has gone before Part 2
published: true
date: 2014-10-21 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2014/to-boldly-go-where-no-sql-has-gone-before-part-2/
---

Let’s continue looking at a database schema for storing details of every Star Trek Episode. If you are new to databases, a schema is just the design of the structure of the database.

We have three tables, Episode, EpisodeWriter and Writer. See my last post for more details of these. It has been suggested that a slight change to this structure would enable storage of more of the creative staff.

Lets rename Writer and call it Credit, and rename EpisodeWriter and call it EpisodeCredit. Now any creative staff member involved in an episode can be stored in the Credit table. Lets alter EpisodeCredit and add an extra column called CreditType. CreditType is just a text field that stores the role that creative person had on that episode, it can be anything from Director, Writer, Actor, Science Consultant etc.

In case anyone wants to recreate the databases I have described here, I have saved the SQL on a separate page which can be found here.

We now have the ability to store information relating to the episode in the episode table and any creative people in the credit table. What else can we add to the database? How about a table that can be used to record when an episode was last watched. I am probably weird but sometimes I want to watch a Star Trek episode that I like but I haven’t watched in ages.

The last watched table is really simple and just have a datetime field and episodeId. This can be further expanded to have a userId field if you wanted to keep track of what episodes your friends had been watching.

Another idea could be to tag episodes with certain themes or topics like Klingon episodes or meaning of life episodes or Kirk talks a computer to death episodes. Again this is fairly simple table containing TagName and EpisodeId.
To boldly go where no SQL has gone before
Published: 2022-03-14 20:26:00

---
title: To boldly go where no SQL has gone before
published: true
date: 2014-10-12 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2014/to-boldly-go-where-no-sql-has-gone-before/
---

My last post proved quite popular so I am wondering if I can combine a post about IT and Star Trek.

Years ago I used to have lists of Star Trek episodes, which included such information like original air date, production number, episode title and brief description.

One thing that was hard to keep track of was how many episodes were written by a specific person. This is because episodes are written by multiple people. A column called writer would then need to contain multiple people, another option would be to have columns called writer1, writer2 etc. This wouldn’t help either as you wouldn’t know which column a specific writer had been saved in.

![](https://storageaccountblog9f5d.blob.core.windows.net/blazor/wp-content/uploads/2014/10/manytomany.jpg?w=559&ssl=1)

The relationship between writer and episode is known as a many to many relationship. An episode can have many writers and a writer can have written many episodes. To achieve this structure in a SQL database you will need three database tables as it is not possible to create a many to many join between two tables. The first table will contain all the episodes, the second table will contain all the writers, the third table known as a junction table, will contain the relationship between the two.

Let’s do an example so we can see how this would work. Gene Roddenberry creator of Star Trek wrote the pilot episode ‘The Cage’. So Gene would be added to the writers table with an id of 1 and The Cage would be added to the episode table with an id of 1. In the junction table, it has two columns episode and writer, so we would enter 1 and 1 into these columns.

```
Select * from Episode e
Join EpisodeWriter ew on e.id = ew.EpisodeId
Join Writer w on w.id = ew.WriterId

```

But if Gene Coon and Gene Roddenberry had writing credits on The Cage we would need to add Gene Coon to the writing table and add an extra entry to the episodewriter table.

I am going to do more posts based on this as I expand the database structure to include other information, I may go on to create stored procedures for bringing back certain information or I may use this as an example to talk about coding a user interface.
Undo a git add
Tags: git
Published: 2021-03-05 22:01:13

---
title: Undo a git add
published: true
date: 2014-10-12 00:00:00 UTC
tags:
  - git
canonical_url: https://www.emmanuelgautier.com/blog/undo-git-add
---

An unwanted " git add " can happen. That's why there is a command to redo this " git add ". Here the command line to perform this action.

```bash
git rm --cached <file>
```
The Rush and Falsehood of Greenfield Projects
Tags: discuss, career, productivity, beginners
Published: 2014-10-08 20:59:57

---
title: The Rush and Falsehood of Greenfield Projects
description: I used to love the idea of a green field project. I was envious at those who got to start from scratch. This time, everything will be right...
date: '2014-10-08T20:59:57.571Z'
tags: discuss, career, productivity, beginners 
published: true
---

*Originally written in 2014, republishing for the dev.to community* 

I used to love the idea of a green field project. I was envious at those who got to start from scratch. _This time, everything will be right._

![](https://cdn-images-1.medium.com/max/800/1*0BnzC8ndIKeXHaXbc1ypWw.jpeg)

When I was stuck on problems in university, when I couldn’t get the program to do what I needed, _I would routinely delete my entire project and start over_. Sometimes it was effective, but most of the time I would just code myself right back to where I was.

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

The times it worked reinforced the belief that programs were _tight rope walks_. That early missteps in thought, would cause the project to crumble. That to successfully complete a project, every decision needed to be _right and just and holy._

![](https://cdn-images-1.medium.com/max/800/1*992euKF2IXed0P1SvJOCSg.jpeg)

I’ve changed my mind about all this now. I’m a bit older now (that’s how it usually goes). I’ve clocked a good number of hours in the cockpit, so to speak. Now, projects seem to me like big ships. They have a weighty inertia that you’ll have to control. Powering on in one direction might get you way of course, but you can _almost always_ slowly turn the ship back on course.

Undeniably, _sometimes,_ the practice of restarting is very effective. Why? Well there’s the rush of getting to start over. But the more important factor was because I had re-_think about the problem._ I stepped through the problem again, this time thinking _a little deeper._

I try to keep that part of it. Starting to think about the problem again, knowing nothing. But this time I keep my code around. _Beginner’s mind, not beginner’s project._
How to replace master branch in git, entirely, from another branch?
Tags: git
Published: 2014-10-06 10:00:00

---
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/y9hxcwi5y92j6zfcxbjx.jpg
title: How to replace master branch in git, entirely, from another branch?
slug: how-to-replace-master-branch-in-git-entirely-from-another-branch
date: 2014-10-06 10:00
tags:
 - git
---
If you want to completely replace a branch by merging over another, the follow trick will help you, as it has helped me:

    git checkout yourbranch  
    git merge -s ours master  
    git checkout master  
    git merge yourbranch
Kali & NetHunter Security Release Fixes
Published: 2023-08-21 21:17:44

---
title: Kali & NetHunter Security Release Fixes
published: true
date: 2014-10-06 00:00:00 UTC
tags: 
canonical_url: https://www.kali.org/blog/kali-linux-1-0-9a-release/
---

### Squash the Bugs with Kali 1.0.9a

Over the past couple of weeks, we’ve seen a bunch of nasty bugs hit the scene, from **shellshock** to Debian **[apt](https://www.debian.org/security/2014/dsa-3025)** vulnerabilities. As we prefer not to ship vulnerable ISOs, we’ve rolled up new images for our Kali Linux and NetHunter releases as well our Amazon AWS images with the relevant security fixes in place. These images correspond to Kali 1.0.9a and [NetHunter 1.0.2](https://www.offsec.com/offsec/kali-nexus-nethunter-1-0-2/) versions, now available for [download](https://www.kali.org/get-kali/) through our mirrors. We expect the Amazon images to be updated in the AWS backend by the end of the week. If you’re already running Kali Linux, all you need to do is run an update and dist-upgrade to get the latest and greatest:

```
apt-get update
apt-get dist-upgrade

```

### NetHunter for Professional Penetration Testing

[![](https://www.kali.org/blog/kali-linux-1-0-9a-release/images/nethunter-demo-homescreen-thumb.png)](https://www.kali.org/blog/kali-linux-1-0-9a-release/images/nethunter-demo-homescreen-thumb.png)

The [OffSec NetHunter](https://www.kali.org/kali-nethunter/) release was a success and has brought about a huge amount of interest in our Nexus ROM overlay. We are happy and thankful to see a NetHunter community spring up and [contribute](https://www.kali.org/docs/community/contribute/) to the project so actively. Since the release, we have been repeatedly asked about our [Kali EULA](https://www.kali.org/docs/policy/EULA.txt) and whether NetHunter can be used for **commercial purposes** such as professional penetration testing or running security assessments. **The answer is a resounding YES** , currently making NetHunter the only free Nexus Android system which is Open-source and allowed for commercial use. If you’re doing any serious work with NetHunter, make sure it is [properly secured](https://forums.kali.org/showthread.php?23022-Securing-your-NetHunter-Device) and [encrypted](https://forums.kali.org/showthread.php?22901-NetHunter-Disk-Encryption).

### Kali Linux Tools Listings

A month ago, we released the Kali Linux Tools website, detailing the tools available in Kali as well as simple usage examples. If you are the author of a tool that we have missed or have additional examples that you would like us to include in order to more fully cover your project, please feel free to [contact us](https://www.kali.org/contact/) to have your entries fixed.
Refactoring, Rewriting and Lead Climbing
Tags: refactoring, code, testing, analogies
Published: 2014-10-02 17:58:59

---
title: 'Refactoring, Rewriting and Lead Climbing'
description: Refactoring - small steps carry us a long way.
date: '2014-10-02T17:58:59.441Z' 
tags: refactoring, code, testing, analogies
slug: /@jonskulski/refactoring-rewriting-and-lead-climbing-d53dfce6bc1d
published: true
---

*Originally written in 2014, republishing for dev.to*

I’ve thrown the word _refactor_ around a lot. I’m like this:

> “What are you working on for the next three weeks?”  
> “I am going to refactor the login system”

M. Fowler, in his wonderful book _Refactoring,_ gives the definition of _‘a change made to the internal structure of software…without changing its observable behavior’_

So technically, alright. Go ahead, me, _refactor_ the login system for three weeks. But words and accuracy are important. Perhaps I should just say I’m _rewriting_ the login system.

Fowler also gives this definition:

> applying a series of refactorings without changing its observable structure.

I’m having more success with this definition. It’s safer and warmer and more comforting. If it’s a multiweek process without releasing to production, I’ll call that a _rewrite._ And _rewrites_ are hard and scary and riskier. So I try to avoid ‘em.

![Lead climbing. Many anchor points, several discrete releasable points.](https://cdn-images-1.medium.com/max/800/1*mxRLCJM4fEFh0hTXn49f1w.gif)
Lead climbing. Many anchor points, several discrete releasable points.

When I conceive of a refactoring as a series of _discrete_ steps to improve the quality of the code, I take those small steps. By discrete, I mean releasable to production.

Extract a method. Create a small class. Rename a variable. Add a type hint. Make a small, safe, confident commit in the right direction.

Small steps carry us a long way.
Windows 9 or do I mean 10
Published: 2022-03-14 13:17:10

---
title: Windows 9 or do I mean 10
published: true
date: 2014-10-01 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2014/windows-9-or-do-i-mean-10/
---

Like many systems administrators I watched as the news came out yesterday about the latest version of windows. What would it be like? What would it be called? Would it be better or worse than previous versions?

I was shocked when the name of the new operating system was revealed to be Windows 10. What really!? At first I though someone had tweeted a photoshopped image of the press conference, but no it was really going to be called Windows 10.

![Windows 10](https://storageaccountblog9f5d.blob.core.windows.net/blazor/wp-content/uploads/2014/10/windows_10_fullwidth.jpg?w=800&ssl=1)

Windows 10 is the next operating system to be released after windows 8, many had been calling it windows 9 or windows Threshold.

Microsoft has never had a fixed naming convention for its OSes, so should we really be that surprised at its new name.

- Windows 1.0 (1985)
- Windows 2.0 (1987)
- Windows 3.0 (1990)
- Windows 95 (1995)
- Windows 98 (1998)
- Windows ME (2000)
- Windows XP (2001)
- Windows Vista (2007)
- Windows 7 (2009)
- Windows 8 (2012)
- Windows 10 (2015)

One reason Microsoft may have gone with with Windows 10 is because they wanted to signify that the coming Windows release would be the last “major” Windows update. What does it mean to be the last major update?

If you look at the list of OSes above you will see that between XP and Vista was a huge 6 years, this gap is/has caused a huge headache for IT professionals (me included). Software was written for XP because that is all that was available, when XP moved out of support earlier this year it caused loads as problems as people tried to get this software to work on more modern OSes.

If windows 10 is around for a long time we may end up with a similar situation to XP, in that loads of software will run only on it and cause problems if you try and port it to whatever comes next. I am only a trainee developer so I don’t know what is involved with building an OS, but I would imagine there must be things that are very difficult or almost impossible to fix without ripping them out and starting again which is what happens when a new version of an OS is written.

Only time will tell if Windows 10 really is the last version of windows and what will happen to the OS in the future. What ever the case I am downloading a preview so I can have a look (I want my start menu back!)
What is the difference between Development and Operations?
Published: 2022-03-13 20:25:49

---
title: What is the difference between Development and Operations?
published: true
date: 2014-09-27 20:00:45 UTC
tags: 
canonical_url: https://www.funkysi1701.com/posts/2014/what-is-the-difference-between-dev-and-ops/
---

I want to learn Development and eventually move into a development role. But what is the difference between development and what I already do?

Put simply Development or programming is the creation of new programs, websites or databases.

IT Operations or System Administration is the administration of existing servers, websites or databases.

I have been doing System Administration since I started my job back in 2006. What you do as part of this role can be very simple like setting up new users or computers to something very complex like upgrading the version of Exchange that the company uses for its emails.

As part of my role I have done a lot of tasks that could be described as development. I have created databases and built new database structures like tables, views and stored procedures. I have also assisted the development department with testing, setting up visual studio, building websites and databases from code.

Can I describe myself as a developer? I would say yes, I have done plenty of work that is development work.

Can I get a job as a developer? Possibly but it would depend on the role. I have many of the skills that developers use, but I have limited knowledge in many areas. What I need to do is concentrate my efforts onto the development work I do and delegate as much administration work as I can so my knowledge can increase.

A Buzz word in IT at the moment is DevOps. I have lost count of the number of times .NetRocks or RunAsRadio have mentioned it.

DevOps is the integration of IT Development and Operations, it emphasises the need for the two departments to work closely together to achieve common goals. In big companies the two departments can pull against each other if you are not careful, but in my case as I do both roles, it would be very difficult for the development side of myself to blame the operations side of myself for a problem.

This I think puts me in a good position, I just need to learn more development and I will make a valuable addition to someone’s development team.
Form input type range element (Slider control)
Tags: html, javascript
Published: 2018-03-02 16:16:34

---
title: "Form input type range element (Slider control)"
published: true
tags: HTML5,javascript
canonical_url: http://blog.mandarbadve.com/2014/09/27/form-input-type-range-element-slider-control/
---

HTML5 gives us very useful slider control. Lets look at the syntax and how to use the slider control.

```
<input type="range" name="price" min="1" max="10" value="1" />
```

Here are the different attributes you can use with range input.

- min: specify the minimum value allowed.
- max: specify the maximum value allowed.
- step: specify the value of the interval.
- value: specify the default value of the slider.

You can use event _onchange_ to track selected value.

```
<input type="range" max="10" min="1" name="quantity" value="1" onchange="alert('Selected value: '+ this.value);" />
```

### Demo

Select the quantity of the product:

<input max="10" min="1" name="quantity" type="range" value="1">

<address>Check the browser compatibility for the input type color</address>

[http://caniuse.com/#feat=input-range](http://caniuse.com/#feat=input-range "http://caniuse.com/#feat=input-range")



_This post was originally published on [blog.mandarbadve.com](http://blog.mandarbadve.com/2014/09/27/form-input-type-range-element-slider-control/)_