teleren/devto huggingface dataset:
Upgrade X220 BIOS to 1.43 mod
Published: 2018-02-10 22:38:25

---
title: "Upgrade X220 BIOS to 1.43 mod"
published: true
tags: 
canonical_url: 
---

original BIOS has some limition: RAM freq, hardware whitelist, missing 'Advanced' BIOS options, etc.

I downloaded latest BIOS with modification from [here](http://x220.mcdonnelltech.com/resources/), if you want upgrade your X220 with faster RAM and 5G wifi(7620AC), you need upgrade your bios first.

If you have a running Windows, you can save some time of creating WINPE USB stick, you should follow BIOS upgrade README.txt, if not, you need create a WINPE USB stick, you can run BIOS updater program on WINPE.

After upgraded BIOS, I can't boot my Ubuntu system, I found a solution about boot loader missing after upgrade bios, [here](https://askubuntu.com/questions/629734/will-updating-the-bios-remove-my-ubuntu-efi-entry), what should be noticed is, you must use UEFI mode, not legacy mode, so check your BIOS boot mode, select `UEFI only`, and run in LIVE terminal:

```
sudo efibootmgr -c -L Grub -l /EFI/ubuntu/grubx64.efi
```
Hi I'm Justin Chew
Tags: introduction
Published: 2017-08-02 14:13:44

---
title: Hi I'm Justin Chew
published: true
description: 
tags: introduction
---

I have been coding for 3 years.

I live in Oxford, England.

I work in NewOrbit.

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

I am currently learning more about Angular.

Nice to meet you.
Sass / SCSS function to generate headings between min and max font-size
Tags: sass, scss, heading, headings
Published: 2017-08-02 06:19:41

---
title: Sass / SCSS function to generate headings between min and max font-size
published: true
description: 
cover_image: https://thepracticaldev.s3.amazonaws.com/i/dk6t5xamtmxv3t5iqg8p.png
tags: sass, scss, heading, headings
---

In school I thought: "Why do I have to learn about lines in terms of geometry?!" I had no good idea of why and where to use them. Some days ago I was remembering that we have learned how to use them in school but I didn't remember how to use them now so I had to look it up.

I wanted to have a function that returns the font size for a specific heading so I came up with this function `f(x) = -8px * x + 68px` where `x` is the heading from 1 to 6.

The headings in this function will start at a font size of 60px for h1 and end at a font size of 20 px for h6.

This is how I came up with this function:

```text
f(x) = m * x + c

maxFontSize = 60px
minFontSize = 20px
m = (minFontSize - maxFontSize) / (6 - 1)
c = maxFontSize - m

f(x) = -8px * x + 68px
```

Finally in SCSS:

```scss
@function getHeadingFontSize($minFontSize, $maxFontSize, $heading) {
  $m: ($minFontSize - $maxFontSize) / (6 - 1);
  $c: $maxFontSize - $m;
  @return $m * $heading + $c;
}

// Font size of headings
@for $i from 1 through 6 {
  h#{$i} {
    font-size: getHeadingFontSize(20px, 60px, $i);
  }
}
```

And this generates the following CSS:

```css
h1 {
  font-size: 60px
}

h2 {
  font-size: 52px
}

h3 {
  font-size: 44px
}

h4 {
  font-size: 36px
}

h5 {
  font-size: 28px
}

h6 {
  font-size: 20px
}
```

I don't know if this is in some way useful because the designers in your team would just give you the sizes but ... yay.
Unity with MVC
Tags: unity3d, architecture, learning
Published: 2017-08-02 04:51:42

---
title: Unity with MVC
published: true
description: 
tags: unity,architecture,learning
---

[Unity with MVC: How to Level Up Your Game Development](https://www.toptal.com/unity-unity3d/unity-with-mvc-how-to-level-up-your-game-development)

I've been working on a Unity application at work for the last month or so and it's gotten so convoluted that I'll occasionally have trouble tracing the stack on how my scripts interact with one another or dependencies. In comes MVC patterns. With good design comes a cleaner workflow.

I just finished up a quick conceptual project at home using this pattern and am looking forward to going into work tomorrow to implement it. Not sure how welcome Unity is here at dev.to but I hope you game designers out there find it useful. Thanks for reading~
Setting up a static website using GitHub Pages and Cloudflare using a custom Domain name!
Tags: github, website, webdev, tutorial
Published: 2017-08-02 02:59:55

---
title: Setting up a static website using GitHub Pages and Cloudflare using a custom Domain name!
published: true
description: Discover how easy it is to setup a static website using Github Pages. Then, supercharge it with Cloudflare to secure it with HTTPS, Caching, and DDoS protection!
tags: github, website, webdev, tutorial
---

I don't want to be **"that guy"**, but I already wrote this article on LinkedIn before I joined Dev.to.  I apologize, but I wanted to share this with the community!

Here is the link to the article:
[How to setup a static website using GitHub Pages and Cloudflare with your own Domain Name.](https://www.linkedin.com/pulse/how-setup-static-website-using-github-pages-your-own-domain-patmore)

Thanks for reading it, and again sorry for linking to another article on another site.  It won't happen again! I promise. :)


Enjoy your day and Happy Hacking!

-- Landon
Hi, I'm Ellis Barnes 
Tags: introduction, cpp, lua
Published: 2017-08-01 22:29:30

---
title: Hi, I'm Ellis Barnes 
published: true
description: 
tags: introduction, cpp, lua
---

I have been programming for 6 years.

You can find me on Twitter as [@blakebarnes00](https://www.twitter.com/blakebarnes00), or on Github as [blakebarnes00](https://github.com/BlakeBarnes00) as well.

I live in Minneola, Florida (Right next to Orlando for perspective). 

I've been learning programming since I was 11, starting with Lua in ComputerCraft, then Java to make mods Minecraft and furthering my Lua in LOVE2D. Now I have been learning C++ ever since then, and my skills are far better than they were in those two.

I mostly program in these languages: C/C++, Lua, and a little Python here to there.

I am currently learning to become a Game Developer, but also have interests in Machine Learning and Security.

Nice to meet you.
5 WordPress interview questions
Tags: javascript, php, wordpress
Published: 2017-08-01 20:55:22

---
canonical_url: https://www.gyrocode.com/articles/5-wordpress-interview-questions/
title: 5 WordPress interview questions
published: true
description: See some WordPress interview questions below to sharpen your programming skills and practice.
tags: javascript, php, wordpress
---

*See some WordPress interview questions below to sharpen your programming skills and practice.*

#### 1. Using the line numbers please describe what problems are preventing the following PHP/WordPress code from working properly as well as changes you would make to optimize this code to make it more efficient, if any. ####

```
<?
class User {
   public function __get($username) {
      if(is_user_logged_in($username)){
         return 'valid';
      }

      return 'invalid';
   }
}

$e = new User();
if(empty($e->checkinfo))
   $x = 0;

//Menu
for($i = 0; $i < 10; $i++) {
   echo '<ul id="'.$i."">';
   for($j = 0; $j < 10; $j++) {
      if($x == 0)
         break

   echo '<li id=".'$j'.">Menu Item'.$j.'</li>';
   }

   if($x =! 0){
      echo '</ul>';
   }
}

/*Some more menu stuff here...*/
$options = get_option( 'theme-options' );
$colors = array('coral','toffee','sunshine','wildflower','wine');
$i = 0;
echo "<select name='theme-options[color]'>"
while($i < 5); {
echo '<option value="$colors[$i]"'. ((esc_attr( $options['color']== $color[$i])? 'selected="selected"': '' ).'>$colors[$i]</option>';
$i++;
}
echo '</select>';
```

#### 2. Using JavaScript and jQuery please provide code that will remove placeholders in the template on page load to produce result shown below. ####

*Template:*
```
<div class="class-replace">
   <p>
      <a href="http://[SITE].com">[NAME]</a> © [START]-[CURRENT]. All rights reserved
   </p>
</div>
```

*Expected result:*
```
<div class="copyright">
   <p>
      <a href="http://foobar.com">FooBar</a> © 2011-2017. All rights reserved
   </p>
</div>
```

#### 3. What does the following function remove from a WordPress users admin area? ####

```javascript
function remove_stuff ( $actions )
   if( !is_super_admin() && !current_user_can( 'edit_theme_options' ) ) {
      unset($actions['inline hide-if-no-js']);
      return $actions;
   } else {
      return $actions;
   }
}
add_filter( 'page_row_actions', 'remove_stuff' );
add_filter( 'post_row_actions', 'remove_stuff' );
```

#### 4. Some users find it difficult to insert media from a URL via the media uploader. Since 98% of our users don’t use that tab we would like to remove it. Please provide an example of how you would remove that tab for all users. ####

#### 5. Users who aren’t super admins or cannot edit theme options are not permitted to create new pages. Even with that capability removed, WordPress still shows the “Add New button. Please provide an example of how you would remove this button. ####
"No Stupid Questions: Ones and Zeroes"
Tags: nostupidquestion
Published: 2017-08-01 19:04:53

---
title:  "No Stupid Questions: Ones and Zeroes"
published: true
description: Dilbert is wrong
tags: no stupid question
---

I saw this, first by myself and then pointed out by [@SwiftOnSecurity][1]. It's [this Dilbert cartoon][2]

![
*PHB:* I have a dumb question.
*Dilbert:* There are no dumb questions.
*PHB:* When you delete software, where do all the ones and zeroes go?
*Dilbert:* I stand corrected.
][3]

Thing is, it isn't. It can be an important thing.

Because they don't go anywhere.

The ones and zeroes are stored on a storage medium, which, for the remainder of this conversation, is a whiteboard. The different programs write on the whiteboard, and when they need to write more, they erase a portion.

There's control; you don't want to write over what someone else has written. I'm thinking of the corner of classroom chalkboards saying **French Club meets Tuesday 6pm in Rm 220 -SAVE-** when I was a student. The rest is done when the class is done, and the next teacher in the next class can erase it and go forward. 

**Just as the whiteboard notes don't go anywhere at the end of class, the ones and zeroes don't go anywhere just because they're deleted.** They're on the whiteboard, devoid of context, until more writing goes over the top. The file or program sit similarly on the storage device until written over.

This means that there are tools that can undelete files and programs after you've hit delete, which can be good if, in a pique of frustration, you destroyed your dissertation notes and need to get them back, but can be bad if you're giving away an old computer and don't want other people going through your photos, or worse.

There are also the whiteboard erasers, which write every bit in storage with ones and zeroes in order to ensure that nothing is left, which will hamper the above tools, but not, it is theorized, a very determined person with access to an electron microscope. In some areas of computing, they therefore don't treat a hard drive as safely handled without physical destruction, with a [crusher][4] or [thermite][5].

So, not only is that not a stupid question, it leads to videos of things destroyed with thermite. How good is that?

*[Originally published on my GithubPages][6]*

[1]: https://twitter.com/SwiftOnSecurity
[2]: http://dilbert.com/strip/2017-08-01
[3]: https://thepracticaldev.s3.amazonaws.com/i/kvk8okhlzdcmv11v4z0r.gif
[4]: https://www.youtube.com/watch?v=kCtwsD47nK8
[5]: https://www.youtube.com/watch?v=k-ckechIqW0
[6]: https://jacoby.github.io/nsq/2017/08/01/no-stupid-questions-ones-and-zeroes.html
String happyWorkPlace = "Happy Developer";
Tags: discuss, workplace, career
Published: 2017-08-01 15:43:09

---
title: String happyWorkPlace = "Happy Developer"; 
published: true
description: 
tags: #discuss #workplace #careers 
---

Ah the work place, the place we meet new people some we like some we don't like and the place that makes us money. But there's one thing in the work place that I commonly see people forget about. And that's your happiness sometimes in a work place it can make us feel miserable for many reasons. But it's something you don't have to put up with being in a place that makes you feel sad is somewhere you shouldn't be.

There has been a couple of places and teams that I worked in that made me feel miserable but I was too afraid to leave. I didn't want to leave because I felt like it would make my history look bad, it wouldn't look good in the perspective of new employers looking. But in the end it turned out differently, in my latest interview they had why I left one of the teams, I told them what had happened and they just agreed that a person shouldn't be in that type of environment.

# What happens if you're in a place that's making you uncomfortable?

Well there's a few things I generally try to do. Initially if there is a team leader speak with them bring up your concerns and take it from there. After all one of the team leaders job is to make sure that the team members are happy. Now this has happened to me a few times, and every time the team leader has always sorted it out for me and the others. But in the case it doesn't happen it doesn't mean you should stay there it is all on you, if it makes you uncomfortable, unhappy you're all in your right to leave it.


# Is there a bad side to leaving somewhere you're unhappy in?

Yes and no. Generally it depends on the reason you leave. There is a lot of reasons for leaving and it depends on how your employer or team leader sees it. Going into a new place after leaving there is a chance that they may contact your former employer regarding why you left, majority of the time I've found that they agreed with the reasons of leaving. I always tell a lot of people that "We never know what the future may bring us" the future is full of surprises, we take it as it comes.

# Final message

There is no shame in this, none at all. At the end of the day you have to do what what you need to do to make yourself happy. If other people are going to complain about it then fine, then that's their problem not yours. Your happiness is always key. 

I'd love to hear what you guys have to say :D

Also one final thing who doesn't love a cute little puppy?
![alt text](https://thepracticaldev.s3.amazonaws.com/i/qmfsyk14552syrtyxq2g.jpg "Awww cute")
What Is Remote Logging?
Tags: debugging, development, mobile
Published: 2017-08-01 13:56:02

---
title: What Is Remote Logging?
published: true
description: Remote logging is the process of viewing an app’s logs from distant iOS or Android devices, using a solution such as Bugfender.
tags: debugging, development, mobile
canonical_url: https://bugfender.com/blog/what-is-remote-logging/
---

![](https://bugfender.com/wp-content/uploads/2017/08/what-is-remote-logging-1.jpg)

Remote logging is the process of viewing an app’s logs from distant iOS or Android devices, using a solution such as <a href="http://bugfender.com">Bugfender</a>.

Let's admit it. We have all been there. We fix a bug or deploy a new feature and the complaints start rolling in. The dreaded emails all point to the fact that your feature is not working. But you don't know what's wrong, because it just works for you.

<img src="https://bugfender.com/wp-content/uploads/2017/08/what-is-remote-logging-2.png" alt="" width="800" height="800" class="size-full wp-image-4265" />

<em>Source: <a href="http://donthitsave.com/">Don't Hit Save</a></em>

With users spread across the globe, the way programmers code and debug software is undergoing a change. And when any given feature doesn’t work, they can't debug with a cable that extends from Berlin to Washington. Thankfully, at Bugfender - we've worked hard to get rid of the "but it works on my machine" issues.  

By installing Bugfender's SDK in less than 60 seconds, you can start retrieving remote logs from your user's device within a few minutes, enabling you to see everything happening. This means you can act immediately on information that you would have normally had to obtain by connecting a device with a cable.

<h2>Level Up Your Debugging Game</h2>

Picture being a new developer for an agency, building and releasing iOS apps, only for your new boss to make you aware of a huge issue - the client isn’t able to save their profile on your app. Every time they try, it crashes and they’re become more and more frustrated. Firing the app up on your device, everything works fine - but that isn’t an answer you can give the client.

The truth is, we can’t possibly test on all devices, there are simply far too many. For every device that exists, there are a hundred more reasons why your app might be crashing. From memory leaks to missing data in temporary storage, from the OS version to the device's network connectivity - there are many variables that might be causing the issue. 

By using Bugfender - you can view logs from remote devices, (and more specifically, your client's device), and start debugging the crash the client has been facing. 

<img src="https://bugfender.com/wp-content/uploads/2017/08/what-is-remote-logging-3.png" alt="" width="1276" height="825" class="aligncenter size-full wp-image-4266" />

Bugfender’s SDK is lightweight and can be enabled to catch logs from all devices right down to a specific user. So start debugging apps the expert way and release quality applications - <a href="https://app.bugfender.com/signup">sign up today and use Bugfender for free</a>.
Move modules – Remove IPP – OutSystems
Tags: outsystems
Published: 2018-09-05 10:17:12

---
title: Move modules – Remove IPP – OutSystems
published: true
tags: OutSystems
canonical_url: https://blogit.create.pt/ricardocosta/2017/08/01/move-modules-remove-ipp-outsystems/
cover_image: https://i1.wp.com/blogit.create.pt/wp-content/uploads/2018/08/outsystems-destaque-echoboomer.jpg?resize=1000,420
---

I needed to move some modules from one infrastructure to another so first I needed to remove [IPP](https://www.outsystems.com/IPP/) (Intellectual Property Protection).

1 – In Service Studio, open your module and goto Module -> Export -> Save As…

[![Export](https://i1.wp.com/blogit-create.com/wp-content/uploads/2017/08/saveOML.png?resize=696%2C540 "Export OML")](https://i1.wp.com/blogit-create.com/wp-content/uploads/2017/08/saveOML.png)<figcaption>Export OML</figcaption>

2 – Navigate to [Intellectual Property Protection (IPP) Rights Validation](https://www.outsystems.com/homeipp/ipp_page.aspx)

Here you need to enter your email, the destination activation code for your target infrastructure, and upload your OML

[![](https://i2.wp.com/blogit-create.com/wp-content/uploads/2017/08/IPP.png?resize=696%2C321 "IPP Validation")](https://i2.wp.com/blogit-create.com/wp-content/uploads/2017/08/IPP.png)<figcaption>IPP Validation</figcaption>

3 – You will receive an email with the OML file without IPP protection. Download the file.

4 – In Service Studio goto Module -> Open File…

[![](https://i1.wp.com/blogit-create.com/wp-content/uploads/2017/08/open-OML.png?resize=283%2C92 "Open module")](https://i1.wp.com/blogit-create.com/wp-content/uploads/2017/08/open-OML.png)<figcaption>Open module</figcaption>

5 – Publish your module

The post [Move modules – Remove IPP – OutSystems](https://blogit.create.pt/ricardocosta/2017/08/01/move-modules-remove-ipp-outsystems/) appeared first on [Blog IT](https://blogit.create.pt).
Explicit Entity State
Tags: database, sql, architecture, entities
Published: 2019-01-20 15:18:01

---
title: Explicit Entity State
published: true
tags: database,sql,architecture,entities
canonical_url: https://horia141.com/explicit-entity-state.html
---

Many or even most of the entities we work with in typical applications have a notion of distinct states they can be in. These states correspond to the evolution of that entity though the application, and the entity is expected to move from one state to another as a result of certain events happening.

To make things more concrete, consider a user entity. Typically a person joins a service and is then asked to confirm an email. After that the product is fully accessible. Later, the user might quit the application and remove their account. We can say that the user has three distinct states: joined, confirmed and left. Similarly, an ecommerce order is first placed, then payment is received, then the order is shipped. At any time before shipping an order can be cancelled. The states are more complex now, with a proper finite state machine as a model.

When laid out explicitly like this things are pretty good. The schema is self-documenting, it’s easy for application code to filter and make assumptions about which columns are valid for a given state, and our own understanding of the code is made easy by this systematization of the possible states of an entity.

However, many times this is not the case. That is, there is no single state column to record explicitly the state an entity is in, and changes to it don’t happen as a result of a small set of well defined events. Rather, states are implicit in assignments of various fields. A common pattern I’ve seen is marking removal via an `IsRemoved` field or a `DateRemoval` field, which is not null once the entity is removed.

With two states, such an encoding does not cause problems, but is not nice either. However, when we begin adding other fields like `HasAcceptedEmail` or `HasShipped` etc. things begin to break down. It’s not clear when any of the <script type="math/tex">2^n</script> state combinations is allowed, it’s harder to filter based on states and the code becomes more complex as a result.

So I’d call this a pretty nasty anti pattern. It’s not easy to solve, as any database refactoring truthfully is. But as a first approach, it does serve to add the explicit state column, and try to maintain it accordingly, while also doing any individual field work in parallel. Once you’re convinced that the state handling is correct, one can remove fields like `IsRemoved` or `HasShipped`, and leave fields such as `DateRemoval` for faster access in a denormalized fashion.
How pair programming helped me focus more
Tags: culture, debugging, deployment, programming
Published: 2017-08-01 09:22:36

---
title: How pair programming helped me focus more
published: true
description: pair programming 
tags: culture, debugging, deployment, programming
---

Originally posted on my personal blog http://haidrali.com/how-pair-programming-helped-me-focus-more/.

I am a big advocate of pair programming as I always feel more productive doing tasks in a pair because it tends to be a Get Things Done kind of attitude. Followings are reasons why I believe pair programming can help you more productive at certain stages

1- The purpose of two programmers sitting on a single workstation is not always to get output greater than output of both individuals but to get the critical work done i.e, setting up your first deployment environment, debugging a rare and critical bug, code merge or code reviews etc

2- If pair consists of a senior developer with a junior developer the follow of knowledge from senior to junior developer really help junior developer to learn. This is what I have experienced while working almost a year with Waqas Farooq he be a Geek and I as new-grad

3- Many a time I have experienced that Unforced Errors like unintentionally making changes to another file, environment variables not loading in production are greatly reduced when a pair sit-down on a single workstation

4- Almost everyone uses social media be it Facebook, Twitter, Reddit, Hacker News etc during work to get some comfort and once your dive into it then it become difficult to get out of this comfort zone. But when you sit together with your fellow programmer the follow of work never stop and social media and other hurdles never come in your way you just keep going until you hit the finish line.

5- Concept of pair programming gets redefined under remote working environment as you are no longer sitting together physically but still you can be on a single workstation by the means of online realtime collaboration tools i.e. screen sharing

I hope my experience would help promoting pair programming culture at your workplace.

Happy Pair Programming :)