Wednesday, June 13, 2018

How Engagement With Social Media is Changing - #infographic

Over the last two years, figures for sharing opinions, details of day-to-day life, and photos have held fairly steady. However, this can hide other trends. Sharing visual content has taken on a new relevance thanks largely to the strong growth of photo-focused platforms like Instagram. The...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

15 Steps to Social Media Marketing Success [INFOGRAPHIC]

As social network penetration is ever increasing, it’s essential that marketing teams are planning and implementing their social media strategies. As of 2018, there are over 2.6 billion social network users worldwide; in 2010 there were just over 900 million. Social media marketing is a powerful...

[ This is a content summary only. Visit our website https://ift.tt/1b4YgHQ for full links, other content, and more! ]

by Web Desk via Digital Information World

The new (and old) CSS units you've never heard about

#344 — June 13, 2018

Read on the Web

Frontend Focus

The New (and Old) CSS Units You've Never Heard About — Exploring the newly defined CSS units that have been recently or are going to be implemented in browsers, including lh, vi and grad.

Massimo Artizzu

Manipulating Pixels Using Canvas — If you’ve not worked with the canvas element in the past few years, this is a practical, easy to follow walkthrough of producing some handy pixel-based effects with it.

Welling Guzman

💻 New Course: A Practical Guide to Algorithms with JavaScript — Bored by the academic approach of most data structures and algorithms courses? This is for you. Solve algorithms and analyze space and time complexity in both an interview setting and in your day-to-day development.

Frontend Masters sponsor

Image Inconsistencies: How and When Browsers Download Images — Browsers don’t download images referenced in CSS until the CSS object model is built which could lead you to use img tags to load images more quickly.. but Firefox may not behave as you’d expect here.

Harry Roberts

Creating a Bar Graph with CSS Grid — A walkthrough of a cute way to create a basic bar graph using CSS grid layout and variables.

Preethi Kasireddy

▶  Introducing MapKitJS: Bring Apple Maps To Your Sites — Although still in beta, you can now integrate Apple Maps directly on your own site. This video session from WWDC runs through how you could use it. Related documentation here.

Apple

▶  Designing Web Content for the Apple Watch — watchOS 5 brings web content to the Apple Watch by rendering rich HTML in Messages and Mail.

Apple Developer

AV1 Video Support Added to 'Can I Use' — Not a lot to see yet as it’s only supported in Firefox and Chrome behind a setting, but this video format could become more significant in future.

Can I Use

💻 Jobs

Remote Front End Developer (React Native & Rails) — Join us, work remotely from North America, and help build software that matters.

Aha!

Have You Tried Vettery? — Vettery matches top tech talent with fast-growing companies. Take a few minutes to join our platform.

Vettery

📘 Tutorials

Animating Images and Videos with Curtains.jsCurtains.js uses WebGL to turn images and videos into a plane that can be animated in a ‘curtain’-like way. It’s a striking effect, but be careful not to overuse it.

Martin Laxenaire

CSS Media Queries: A Quick Reference and Guide

Alligator

Building a Responsive Image as an SVG — How to create a logo that responds to its own aspect ratio.

Nils Binder

Creating a Visual Studio Code Theme — Not your typical frontend work, but as VS Code is built using JavaScript and HTML, many concepts transfer across.

Sarah Drasner

Easier 'Scrollytelling' with position: sticky — A neat effect demonstrated simply and in a surprisingly little amount of code.

Elaina Natario and Russell Goldenberg

Submitting HTML Forms using Vue, React, or Hyperapp

Ogundipe Samuel

See Why Facebook, Spotify, & fastlane Trust CircleCI with Their CI/CD — The shortest distance from idea to execution. Automate your development process quickly, safely, and at scale.

CircleCI sponsor

A Comprehensive Guide to Flexbox Alignment — A good primer to help understand how items get aligned along flexbox’s two axes.

Anna Monus

How to Build a Toggle Control 'Smiley Face' using HTML and CSS — A neat trick for this simple visual effect.

Eder Diaz

Deprecations and Removals in Chrome 68 — Chrome 68 will be the stable release in about a month.

Google Developers

Designing Web Content for watchOS — Some early pointers on building pages for the Apple Watch.

Erik Runyon

Keeping Up with Browser Updates

Raymond Camden

Some Time-saving Chrome DevTools Shortcuts

Dmitry Pashkevich

🔧 Code and Tools

Implement 200+ Tools with the Flip of a Switch – Get Started for Free

Segment sponsor

LuminJS: Progressively Highlight Any Text on a Page — For drawing attention to text or, perhaps, showing progress.

Preet Shihn

Pull to Refresh.js: A 'Pull to Refresh' Feature with No Markup Needed

Box Factura

Swup: CSS Transitions Between Website Pages

Georgy Marchuk

SQIP: A SVG-based 'Low Quality Image Preview' Technique — Generate tiny SVG-based placeholders on the server side.

Tobias Baldauf

Linux Cloud Hosting Starting at 1GB of RAM for $5/mo

Linode Cloud Hosting sponsor


by via Frontend Focus

Flattening Contracts and Debugging with Remix

Smart contracts on the Ethereum main-net use real money, so building error-free smart contracts is crucial and requires special tools like debuggers.

Remix IDE is the most fully-featured IDE for Solidity. Among other tools, it has an excellent step-by-step debugger. You can perform various tasks such as moving in time, changing the current step, exploring local variables and current state by expanding various panels.

You can also set breakpoints to move between different points in the code. And the terminal allows you to display transactions executed from Remix and debug them.

Throughout this tutorial, we’ll use Truffle and OpenZeppelin to build a simple custom token. We’ll see why and how to flatten the contract, and finally we’ll use Remix IDE to start debugging the contract.

Why Flatten a Smart Contract?

Flattening a smart contract refers to combining all Solidity code in one file instead of multiple source files such that, instead of having imports, the imported code is embedded in the same file. We need to flatten smart contracts for various reasons, such as manually reviewing the contract, verifying the contract on Etherscan, or debugging the contract with Remix IDE, as it currently doesn’t support imports.

Writing a Simple Token Using Truffle and OpenZeppelin

Remix IDE is officially recommended for building small contracts or for the sake of learning Solidity, but once you need to build a larger contract or need advanced compilation options, you’ll have to use the Solidity compiler or other tools/frameworks such as Truffle.

Besides error-free contracts, security is also a crucial part of building a smart contract. For this reason, using battle-tested frameworks like OpenZeppelin that provides reusable, well-tested, community-reviewed smart contracts, will help you reduce the vulnerabilities in your Dapps.

Let’s now see how we can use Truffle and OpenZeppelin to create a simple custom Token that extends the standard token from OpenZeppelin.

Requirements

This tutorial requires some knowledge of Truffle, Ethereum and Solidity. You can read the Blockchain Introduction and Ethereum Introduction.

You also need to have Node.js 5.0+ and npm installed on your system. Refer to their download page for instructions.

Installing Truffle

Using your terminal, run the following command to install Truffle:

npm install -g truffle

Creating a New Truffle Project

Start by creating a new directory for your project. Let’s call it simpletoken and navigate into it:

mkdir simpletoken
cd simpletoken

Next, create the actual project files using:

truffle init

This command will create multiple folders, such as contracts/ and migrations/, and files that will be used when deploying the contract to the blockchain.

Next, we’ll install OpenZeppelin:

npm install openzeppelin-solidity

Creating a Simple Token Contract

Inside the contracts/ folder, create a file named SimpleToken.sol and add the following content:

pragma solidity ^0.4.23;

import 'openzeppelin-solidity/contracts/token/ERC20/StandardToken.sol';

contract SimpleToken is StandardToken {
    address public owner;

    string public name = 'SimpleToken';
    string public symbol = 'STt';
    uint8 public decimals = 2;
    uint public INITIAL_SUPPLY = 10000;

    constructor() public {
      totalSupply_ = INITIAL_SUPPLY;
      balances[owner] = INITIAL_SUPPLY;
    }

}

This is the contract that we’re going to flatten and debug. We’re importing the OpenZeppelin StandardToken.sol contract and declaring our SimpleToken contract which extends StandardToken.sol using the is operator.

Our contract will inherit a bunch of variables and functions, which need to be overridden in order to customize the contract.

For the sake of completing our Truffle project, inside the migrations/ folder of your project, create a file called 2_deploy_contract.js and add the following content:

var  SimpleToken = artifacts.require("SimpleToken");
    module.exports  =  function(deployer) {
        deployer.deploy(SimpleToken);
};

Using this file, we can deploy/migrate our smart contract into the blockchain, but we don’t actually need this for this example, because we’re going to use Remix IDE to deploy the smart contract after flattening it.

The post Flattening Contracts and Debugging with Remix appeared first on SitePoint.


by Ahmed Bouchefra via SitePoint

New Course: Coding Blocks for WordPress Gutenberg

What's New for Devs in iOS 12 and Xcode 10?

liike.js : Tiny JavaScript Tweening Library

Liike is a Finnish word and means movementmotion. It’s a minimalistic library to create performant custom JS tweens no matter what you’re tweening.

When you create a tween, Liike will create a single render loop on-demand for every tweens running and use DOMHighResTimeStamp (provided by requestAnimationFrame), which should be accurate to 5 µs. If the delay is 0, Liike will start the tween at the next animation frame and count the duration from there.

The post liike.js : Tiny JavaScript Tweening Library appeared first on Best jQuery.


by Admin via Best jQuery