teleren/devto huggingface dataset:
How to compare two databases, identify the diferences and generate the necessary SQL to update the structure of one of them
Tags: hottip, mysql, database, php
Published: 2018-09-19 00:36:38

---
title: How to compare two databases, identify the diferences and generate the necessary SQL to update the structure of one of them
published: true
description: How to compare two databases, identify the diferences and generate the necessary SQL to update the structure of one of them
tags: hottip, mysql, database, php
---

**Tool**: DBDiff (https://github.com/DBDiff/DBDiff)

Note: It works on Linux or Windows

## What do you need

- **PHP**, **GIT** and **Composer** on PATH
- Credentials to access the source and target databases

## Quick start

- Download and enter the DBDiff directory

```
$ git clone https://github.com/DBDiff/DBDiff.git
$ cd DBDiff
$ composer update
```

- Create a **.dbdiff** file in DBDiff directory with the connection settings for 2 servers. Add to "tablesToIgnore" a list of tables and views that should be ignored on comparisson.

**.dbdiff** file:
```
server1:
    user: root
    password:
    port: 3306
    host: localhost
server2:
    user: AzureDiamond
    password: hunter2
    port: 3306
    host: 192.168.1.1
template: templates/db-migrate.tmpl
type: schema
include: up
nocomments: true
tablesToIgnore:
- view1
- view2
- table5
```

- Create a **db-migrate.tmpl** file in templates directory with the content:

```
-- UP

{{ $up }}

-- END UP

```

- Execute the command below to generate the database diff file **migration.sql**

```
$ php dbdiff server1.yourdatabase:server2.yourdatabase
```

- Run the commands that are inside the **migration.sql** using a database client of your preference on server2.yourdatabase to upgrade your database. I recommend review the commands before running them.
Tramp mode not working on emacs 26
Tags: emacs, remoteediting, tramp, angeftp
Published: 2018-10-06 01:41:29

---
title: Tramp mode not working on emacs 26
published: true
tags: emacs, remote-editing, tramp, ange-ftp
canonical_url: http://www.hpcoders.com.au/blog/?p=116
---

On a recent upgrade to emacs, I discovered that remote editing of files via tramp stopped working. This bugged me a lot, as I use it a lot. After much Googling (much), I came across a workaround using sshfs, which allows mounting a remote ssh connection as an fuse mount point.

But the real reason why tramp stopped working is that now an extra “method” parameter is required in the tramp string, eg  
`
^X^F /ssh:remote:file
`

You can abbreviate ssh to ‘-‘ if you have not changed the defaults too much.

A nice additional feature is the su and sudo methods, eg  
`
^X^F /sudo:/etc/passwd
`

See [What’s new in emacs 26.1](https://www.masteringemacs.org/article/whats-new-in-emacs-26-1) (search for “tramp”).
How Does Apple Create Such Stunning Landing Pages?
Tags: discuss, frontend, animation, apple
Published: 2018-09-18 22:41:02

---
title: How Does Apple Create Such Stunning Landing Pages?
published: true
description: 
tags: discuss, frontend, animation, apple
---

![](https://thepracticaldev.s3.amazonaws.com/i/do1t7uqfxi7ytbdjsxoi.gif)

Does anyone have any insight on how they pull off the scroll based animations on the new [iPhone XS landing page](https://www.apple.com/iphone-xs/)?

My coworker found [ScrollMagic](http://scrollmagic.io/) which seems to do the trick. 

Any other ideas?
I want help on this Javascript exercise
Published: 2018-09-18 22:36:25

---
title: I want help on this Javascript exercise
published: true
description: 
tags: 
---
Write a simple JavaScript page using functions page that allows the user to enter their age and display an appropriate message. Generate different messages for teenagers (between 
13 and 19), working class (20 and 64), retired (65 and above). Add a relevant message that will indicate that the user has made an invalid input.
'Add to Home Screen' Popup Code on Android Devices
Tags: android
Published: 2018-09-18 20:05:37

---
title: 'Add to Home Screen' Popup Code on Android Devices
published: true
description: 
tags: android
---

Add to Home screen (or A2HS for short) is a feature available in modern smartphone browsers that allows developers to easily and conveniently add a shortcut to their Home screen representing their favorite web app (or site) so they can subsequently access it with a single tap. This guide explains how A2HS is used, and what you need to do as a developer to allow your users to take advantage of it.

[Read More](https://ahmetcadirci.com/2018/android-cihazlarda-ana-ekrana-ekle-popup-kodu/)

{% github ahmetcadirci25/ana-ekrana-ekle/ %}
What is the difference between Methods, Computed, and Watchers?
Tags: explainlikeimfive, vue, javascript
Published: 2018-09-18 19:37:56

---
title: What is the difference between Methods, Computed, and Watchers?
published: true
description: Explain me like i'm five please!
tags: #explainlikeimfive #vue #js
---

I'm following Vue's getting started and I'm getting confused, tried CSS Tricks and Stack Overflow and still not understanding it in practice. Someone needs to explain me like i'm five. 

####What I got so far:  

**Computed** - They are cached based on dependency and only re-evaluate on dependency change.

**Methods** - 
> A method invocation will always run the function whenever a re-render happens.

What exactly defines a render or re-render? Every data:value change?

Computed and methods has the same structure, but their location on code are different... 🤔🤔🤔

```javascript
//vm instance
computed: {
    // a computed getter
    reversedMessage: function () {
      // `this` points to the vm instance
      return this.message.split('').reverse().join('')
    }
  }
//...

// in component
methods: {
  reverseMessage: function () {
    return this.message.split('').reverse().join('')
  }
}
//...
```

**Watch** - I got confused about this one, Vue's getting started says it is a callback, alerts that is better to use computed, but don't explain for what it is used for...

I will appreciate any clarification on this topic 👍
How to add event listener to dynamically added elements 
Tags: jquery, guide, eventlistener
Published: 2018-09-18 19:33:30

---
title: How to add event listener to dynamically added elements 
published: true
description: 
tags: #jquery, #guide, #eventlistener 
---

What is up fellow coder. 
Welcome to my second installment of "How to" guides 
Thank you for checking out my article on learning how to add event listener to dynamically added element. 


Lets get right into it!


# First add a element

![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/ezyzukp6czcwp44wl1rm.PNG)

![Alt text of image](https://thepracticaldev.s3.amazonaws.com/i/wjogc8l51apgq4pa8k0d.PNG)

## The breakdown
1. I have a simple HTML document that includes a **button** named "click me" and also an empty **div**. Both element have an id.

2. In the JavaScript file, in line 8 I made a render function that should append a string to an element, which in this case will be on the empty **div** from earlier.

3. Therefore line 1-5 it's just me making a **function** called "addButton" that uses render function to make a new **button** called "new button". Line 15 is the event listener that adds a new button every time I click on "click me".

Now that we can add a button. How can we add an event listener to that new button ?

## Let me show you DE WAY
![Alt text of image]
(https://thepracticaldev.s3.amazonaws.com/i/8ka6dcp87ejuwwzrgxos.PNG)
 

## The breakdown

1. The answer starts on line 16. First I create a event listener for the **#content** which if you remember is the main selector id for the empty div on the html document . 

2. Then for the **on** function the *first parameter* is action value "click", the *second parameter* will be a child-selector name which in this case the class of the new button added(see line 3). The *third parameter* is a callback value, in which I made a function that will turn the new button background yellow.

EZ PZ!!

As you can see I was able to add an event listener on my "new button", if when I click on the new button it will change its background to yellow. 




## Nice Gibberish...but what is the point??? 

Well since you now know the basics on how to add an event listener to a dynamically added element. You don't need me to tell you of all the possibility you can use this function with or how commonly this is used. Just think any time you post something on Facebook, Twitter, or LinkedIn you are essential dynamically adding a element to a page. Thus if you can't add a event listener to them how are you able to comment, like, or react to those post.
Software People — How Do You Deal With Stress/Bullies/Frustration?
Tags: life, software, stress, discuss
Published: 2018-09-18 18:49:05

---
title: Software People — How Do You Deal With Stress/Bullies/Frustration?
published: true
description: Dealing with stress is difficult. Having more answers to this question from many different can help many people.    
tags: life, software, stress, discuss
---

This is not really a post. Questions instead. It's a topic very close to my heart. As a full-time open source software developer/advocate — who's been working remotely for the last five years — I have had my fair share of problems with Stress/Bullies/Frustration and all sorts of such stuff. 

I wanted to open up a little — just enough to share that some days it's just way too hard for me to handle. Today was one of those days. A mix of bullying and abusive feedback for my work that I did for free. Being misunderstood. Strong headache. I just felt like **I quit**. And then closed my laptop, got up, and went for a jog. But I have to ask, I know I am not alone —

> **How do you deal with Stress as a software person?!**
Is it okay if I publish the post I write here, to the medium.com too? 
Tags: discuss
Published: 2018-09-18 18:28:37

---
title: Is it okay if I publish the post I write here, to the medium.com too? 
published: true
tags: discuss
---
Obviously with back-link to dev.to.

I would also love to know, what you prefer to reach out to more people as developers are spread-ed across many platforms.

Thanks!
Jelly Fin: Got a minute? We could use it!
Tags: jellyfin, help, devops, ux
Published: 2018-09-18 18:24:28

---
title: Jelly Fin: Got a minute? We could use it!
published: true
description: Laying the foundation is one of the most important parts of getting started and we could use your help.  Got a minute?
tags: jellyfin, help, devops, ux
---

# Hey Jellies!

We've been spinning our wheels getting a shared development platform settled before we start working on features.  I need some experienced folks who have a minute to jump in and help us out.  Here's our project:

{% github https://github.com/jelly-fin/jelly-fin %}

---

# Short term needs

Things that are giving me gray hairs...

### We need help setting up tests [Short-term]

I want to lay a good framework so we can add to it as we go, but I've been battling with Jest and React Native playing nicely.  If you have some time, fork/clone our project and help us get our Travis/Jest with a simple smoke test to make sure our app can render.

### We need a Docker ~guru~ person [Short-term]

I want to make it easy to jump in, so the community had the idea of a shared environment with Docker.  Who can help us set that up and write some clean documentation on how to use it?

### Multi-platform Travis Builds [Short-term]

Has anyone done this before that could help us get our build process nice and pretty?

---

# Long term needs

Things that will eventually make me bite my nails.

### Anyone willing to be a project manager? [Long-term]

We have some GitHub issues defined, but they should be decomposed and prioritized into milestones.  I would love if someone can help me bring order to everything.

### User Experience [Long-term]

As we start to gain traction and lay the groundwork for the app, we will eventually need some wireframes and designs to build towards.  I have some basic ideas, but someone who's done this before might have better ideas ;).

### Project Marketing [Long-term]

I feel like we've got a good thing here and I would love some help with outreach and content generation to talk about our progress and the work we're doing.
Building a Component Library with React and Storybook
Tags: react, javascript, storybook, coding
Published: 2018-09-18 16:10:59

---
title: Building a Component Library with React and Storybook
published: true
description: Learn how to build a component library with React and Storybook to create modular and reusable components that can be shared across projects.
tags: #reactjs #javascript #storybook #coding
canonical_url: https://auth0.com/blog/building-a-component-library-with-react-and-storybook/
---

Learn how to build a component library with React and Storybook to create modular and reusable components that can be shared across projects.

[Read on ⚛️📕](https://auth0.com/blog/building-a-component-library-with-react-and-storybook/?utm_source=dev&utm_medium=sc&utm_campaign=react_storybook)

![Building a Component Library with React and Storybook](https://thepracticaldev.s3.amazonaws.com/i/pdzwyi26cps3wuqy3hg2.png)
Laravel BackupManager
Tags: laravel, package, backup, database
Published: 2018-09-18 16:03:29

---
title: Laravel BackupManager
published: true
description: Simple laravel package to backup/restore files and database.
tags: laravel, package, backup, database
cover_image: https://github.com/sarfraznawaz2005/backupmanager/raw/master/screen.gif?raw=true
---

Simple laravel package to backup/restore files and database.

{% github https://github.com/sarfraznawaz2005/backupmanager %}
REST IN PEACE JQUERY
Tags: javascript, jquery, dom
Published: 2018-09-17 05:47:39

---
title: REST IN PEACE JQUERY
published: true
description: The future of JQuery
tags: #javascript #jquery #dom
---

 

There is a new trend lately. It seems that the web is phasing out jQuery. For example GitHub no longer uses it. Reason?

John Resig created jQuery at a time when browser inconsistencies were a serious epedimic in the wild. But all major browsers are now mostly W3C compliant. Secondly jQuery has grown into a bloated library capable of doing almost everything including ordering Starbucks online. It's true. There's a plugin for that (I'm kidding). However most developers only use it for a very limited set of tasks such as DOM manipulation and AJAX calls. 

And lasty there are now a whole host of new API's available for simplifyng tasks like AJAX calls that can now be done with the Fetch API which all major now browsers support.

Now we must ask do we still need to learn jQuery? Absolutely! It is still an essential component of many libraries and frameworks (for example Bootstrap 4) and will continue this way for the foreseeable future because libraries tend to be a turnkey solution for web development thus utilizing a large portion of jQuery's capabilities. A better question one might ask is do I still need <i>that</i> library (or framework)?

But I still believe jQuery will eventually meet its destined fate sometime in the near future. Rest in Peace jQuery but never forget John Resig for his vision which not only founded the most popular library ever concieved but for also helping to make Javascript the number one programming language in the entire f-ing world.

Here is an outstanding breakdown of vanilla Javascript DOM manipulations and other important tasks that can be performed without jQuery: <a href="https://github.com/nefe/You-Dont-Need-jQuery" target="_blank">You Dont Need jQuery</a>.
[windows] How to open the task manager without going through the login screen
Tags: windows, hottip, shortcut, shortcuts
Published: 2018-09-18 15:37:56

---
title: "[windows] How to open the task manager without going through the login screen"
published: true
description: "[windows] How to open the task manager without going through the login screen"
tags: windows, hottip, shortcut, shortcuts
cover_image: https://res.cloudinary.com/llagerlof/image/upload/v1537207544/dev.to/task-manager-windows81.png
---

Windows shortcut: **CTRL** + **SHIFT** + **ESC**

No more the CTRL + ALT + DEL bureaucracy.
Live coding streams recommendations?
Tags: discuss, livecoding, backend, devops
Published: 2018-09-18 15:11:27

---
title: Live coding streams recommendations?
published: true
description: Recommend your favourite coding livestreams
tags: #discuss #livecoding #backend #devops
---

Hello!

I've been searching, and following up with some live coding streams on youtube and twitch, specifically targeted towards backend engineering and devops. I'd like to get your recommendations so I check them out also.

Thanks!
clinews - read the news from the CLI!
Tags: news, cli, javascript, node
Published: 2018-09-18 13:44:00

---
title: clinews - read the news from the CLI!
published: true
description: 
tags: news, cli, javascript, node
canonical_url: https://github.com/mmckeaveney/clinews
cover_image: https://thepracticaldev.s3.amazonaws.com/i/uej5fq10nb8ebc7whu2n.png
---

A CLI for reading the news and getting the latest headlines including search functionality. Supports over 70 sources. [Check it out on Github!](https://github.com/mmckeaveney/clinews)
High-Performance FreshBooks and Zoho CRM Connectivity with Upgraded Devart Excel Add-ins
Tags: freshbooks, zohocrm, data, connectivity
Published: 2018-09-18 13:39:13

---
title: High-Performance FreshBooks and Zoho CRM Connectivity with Upgraded Devart Excel Add-ins
published: true
description: Devart has rolled out a noteworthy update of Excel add-ins with the support for New FreshBooks API and Zoho CRM API v2 to make data access process even more seamless.
tags: freshbooks, zohocrm, data, connectivity
---

Devart, a Czech software vendor of data connectivity solutions and database tools, has released a greatly improved versions of Devart Excel add-ins, tools that allow to work with database and cloud data as with usual Excel spreadsheets. The Devart Excel Add-ins now fully support New FreshBooks API (alpha) and Zoho CRM API v2 with OAuth authentication. In addition, users can now query deleted records from FreshBooks objects such as Client, Staff, Expense, Invoice, Item, Payment.

Take a closer look at some current and previous features that are available in Devart Excel Add-ins at https://www.devart.com/excel-addins/ .

About Devart

Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.

For additional information about Devart, visit https://www.devart.com/ .
Simplest way of getting the number of decimals in a number in JavaScript
Tags: javascript, split, mathfloor
Published: 2018-09-18 12:29:14

---
title: Simplest way of getting the number of decimals in a number in JavaScript
published: true
description: Simplest way of getting the number of decimals in a number in JavaScript, 
tags: javascript,split,Math.floor
---
You can obtain the number of decimal places of an arbitrary number

var countDecimals = function (value) {
    if(Math.floor(value) === value) return 0;
    return value.toString().split(".")[1].length || 0; 
}

console.log(countDecimals(9.11))  //2
console.log(countDecimals(9))  //0
Universal next gen css-in-js library in under 1kb
Tags: showdev, javascript, css
Published: 2018-09-18 11:46:38

---
title: Universal next gen css-in-js library in under 1kb
published: true
description: A tiny css in js library
tags: showdev, javascript, css,
cover_image: https://thepracticaldev.s3.amazonaws.com/i/99yhqec87dedqxjmr4gq.png
---

# Introducing `scoped-style`

Scoped style aims to be a universal library that you can use to style your components while still maintaining a small footprint.

It has currently been tested with react, preact and hyperapp. You can use the full power of css just as you are used to.

```cmd
yarn add scoped-style
```

## Examples

```react
import scoped from "scoped-style"

// for react
import React from "react"
const styled = scoped(React.createElement)
//

// for Preact
import { h } from "preact"
const styled = scoped(h)
//

// for Hyperapp
import { h } from "hyperapp"
const styled = scoped(h)
//

const Button = styled("button")`
  background: ${props => props.primary ? "orange": "gray"};
  border: none;
  border-radius: 2px;
  :hover {
    padding: 10px;
  }
`

const App = () => (
  <div>
    <Button primary>Login</Button>
  </div>
)

// Your rendering code
```
The project is on [github](https://github.com/sadick254/scoped-css). Contributions are highly welcomed.
.Net senior developer job offer in Barcelona
Tags: jobs, apiumhub, barcelona, softwaredeveloper
Published: 2018-10-03 06:38:58

---
title: .Net senior developer job offer in Barcelona
published: true
tags: Jobs,Apiumhub,Barcelona,Software developer
canonical_url: https://apiumhub.com/tech-blog-barcelona/net-senior-developer-job-offer-barcelona/
---

We are searching for a .Net senior developer to join our [software development team](https://apiumhub.com/software-developer-jobs-barcelona/) in Barcelona! We keep receiving interesting projects to work on and build working software. Let’s grow together!

 

## Main Tasks of a .Net senior developer

Develop and improve a product platform using C#, ASP.NET MVC / Web API, Xamarin and MS Azure as part of a highly motivated team.

 

## What we offer

- The opportunity to learn a lot in a professional high-skilled team
- Best practices in software development
- Working in an international team
- A creative, challenging and fast-growing product. Learning about product life cycles
- Experience to work in a startup company

 

## What we are looking for

- EU citizen
- You have a BSc in Computer Science or equivalent
- At least 3 years professional experience in .NET, ASP.NET MVC / Web API, MS SQL Server or other database
- You have a good understanding of the MVC, web development concepts
- Nice to have experience in Xamarin
- You are excited about learning new technologies
- You are a fast learner and excellent problem solver
- Upper-intermediate and above level in English

 

## Technologies that .NET senior developer should know

ASP.NET MVC 5, ASP.NET Web API 2, Azure SQL Database, Entity Framework 6, Azure Services, HTML5, Bootstrap 3, CSS3, jQuery

##   
Apply here

If you’re interested in this opportunity, let us know! We look forward to meeting you. Please, apply for this .Net senior developer position [here](https://apiumhub.com/contact-software-developers-barcelona/).

 

## Ready to join? [Apply now](https://apiumhub.com/contact-software-developers-barcelona/)!

The post [.Net senior developer job offer in Barcelona](https://apiumhub.com/tech-blog-barcelona/net-senior-developer-job-offer-barcelona/) appeared first on [Apiumhub](https://apiumhub.com).