Wednesday, September 9, 2015

PRIME HOLDINGS

Prime Holdings Co.,LTD. is a Japanese company that expands a variety of businesses on the basis of the philosophy – “We think about ‘you’ foremost.”


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Manipulating Images with the Python Imaging Library

In my previous article on time-saving tips for Pythonists, I mentioned that Python is a language that can inspire love in its users.

One reason for this is the number of time-saving libraries available for this language. A nice example is the Python Imaging Library (PIL), which is the focus of this article.

What You Can Do with PIL

PIL is a free library that adds image processing capabilities to your Python interpreter, supporting a range of image file formats such as PPM, PNG, JPEG, GIF, TIFF and BMP.

PIL offers several standard procedures for image processing/manipulation, such as:

  • pixel-based manipulations
  • masking and transparency handling
  • filtering (for example, blurring, contouring, smoothing, edge detection)
  • image enhancement (for example, sharpening, brightness adjustment, contrast)
  • geometrical, color and other transforms
  • adding text to images
  • cutting, pasting and merging images
  • creating thumbnails.

PIL and Pillow

One issue with PIL is that its most recent version, 1.1.7, was released in 2009, and only supports Python 1.5.2–2.7. Although the PIL site promises a forthcoming version for Python 3.X, its last commit was in 2011, and it appears that development has been discontinued.

Fortunately, all is not lost for Python 3.X users. A project called Pillow has forked the PIL repository and added Python 3.X support. Given that most readers will probably be working with Python 3.X, I'll focus on the Pillow update in this article.

Installing Pillow

Since Pillow supports versions of Python back to Python 2.4, I'll only focus on installing Pillow and not the older version of PIL.

Python on a Mac

I'm currently writing this tutorial on a Mac OS X Yosemite 10.10.5, and thus will describe how to install Pillow on a Mac OS X machine. But, don't worry, I'll provide a link at the end of this section that describes how to install Pillow on other operating systems.

I just want to note here that Mac OS X comes with Python pre-installed. However, the version most likely will be prior to 3.X.

For instance, on my machine, when I run $ python --version in the terminal, I get Python 2.7.10.

Python and pip

A very easy way to install Pillow is through pip.

If you don't have pip installed on your machine, simply type the following command in your terminal, and you're all done:

$ sudo easy_install pip

Now, to install Pillow, simply type the following in your terminal:

$ sudo pip install pillow

That was easy, wasn't it?

As I promised, for installing Pillow on other operating systems, you can find the instructions for that here.

Continue reading %Manipulating Images with the Python Imaging Library%


by A. Hasan via SitePoint

Promises in JavaScript Unit Tests: the Definitive Guide

Promises are becoming a common part of JavaScript code. The native Promise object is already supported by all the major browsers including Chrome, Firefox, and Safari.

Despite making asynchronous code simpler, dealing with promises in unit tests is a hassle. You need to wire your test’s assertions into the callbacks of the promise, which adds extra code into the test. In this way the test itself becomes a bit complicated and it’s harder to see what’s happening.

In this article, I'll show you how to fix this issue and discuss about useful patterns which are able to simplify common promise-scenarios in tests' stage.

I've created an example project that you can download from my website which shows the techniques introduced in this article.

Getting Started

For this project I'll use Mocha as the testing framework and the Chai library to provide the assertions. You'll understand why in a moment.

Continue reading %Promises in JavaScript Unit Tests: the Definitive Guide%


by Jani Hartikainen via SitePoint

This Week's HTML5 and Browser Technology News (Issue 205)


Read this e-mail on the Web
HTML 5 Weekly
Issue 205 — September 9, 2015
Ashley Nolan
Analysis of 1044 survey responses on CSS preprocessors, task runners, JS libraries, and more.


Mozilla Hacks
CSS scroll snapping (available in Firefox 39+, partial support in IE and Edge, and in Safari 9+) allows you to control where to stop on an overflowing element when it’s scrolled.


Mozilla Hacks
A look at CSS Grid Layout, a relatively new W3C specification with limited but growing support (a polyfill exists, however).


Mailgun  Sponsored
Easy SMTP integration and a simple, RESTful API abstracts away the messy details of sending transactional or bulk email. Scale quickly, whether you need to send 10 or 10 million emails. Start sending email now with Mailgun.

Mailgun

MikoĊ‚aj Stolarski & Tomasz Grajewski
Digging into the implementation of visual effects in Canvas-based HTML5 games.


Robin Rendle
The practice of guessing what users need so assets can be fetched ahead of time has been called ‘prebrowsing’ and it’s formed of several techniques which Robin summarizes here.


Chris Youderian
A look at creating SVG maps of any area of the world ready for Web use.


ShaderFrog
Create shaders with no code. Compose multiple shaders together.


WebGL Stats
More stats than you could possibly want about native WebGL support on devices hitting a variety of sites.


BlogGeek.me
Recent news is suggesting browser support for WebRTC without the need for plugins is coming soon.


Jobs

  • Apply to top SF & NYC startups in 60 secondsWant to spend less time job searching? Sign up to Underdog.io and startup founders & hiring managers will email you directly. You decide where to interview and where to work. Your information is kept private from current & past employers.  Underdog.io

In brief

Curated by Peter Cooper and published by Cooper Press.
Want to post a job? E-mail us or use our self-serve system.

Unsubscribe : Change email address : Read this issue on the Web

Published by Cooper Press Ltd. Office 30, Lincoln Way, Louth, LN11 0LS, UK


by via HTML5 Weekly

The Most Popular WordPress Landing Page Plugins

Landing pages are the bread and butter of any successful marketing campaign. They are choc full of customized content that speaks to your website visitors. This content speaks to your website visitors because it delivers the exact, specific information that your visitor was expecting. Landing pages are aligned with your marketing messages 110%, and always have one clear objective in mind: making your website visitors take a specific course of action.

When it comes to creating landing pages in WordPress, there is a multitude of plugin options available, all of which have their distinct advantages. In this article, we'll cover a selection of the most popular WordPress landing page plugins.

[author_more]

What is a Landing Page?

A landing page is a stand-alone web page that has been designed with a specific goal or objective in mind. This goal or objective is usually focused on user actions, on motivating your landing page visitors to take action, to do something, to convert. Often, this something might be to request a quote, or sign up to a mailing list, or provide contact details in exchange for a freebie (like an e-book or a white paper or a template of some description).

Landing pages are completely separate from your main website. And, in general, are completely without the main menu navigation that would otherwise tie the landing page to your website. The main reason for this lack of navigation is to give visitors less choice in terms of actions. With less options available, your landing page visitors are more likely to take the course of action that you want them to take, inching them closer and closer to your intended conversion.

Continue reading %The Most Popular WordPress Landing Page Plugins%


by Sally Wood via SitePoint

A Full Screen Bootstrap Carousel with Random Initial Image

A few months ago, I wrote an article that covered Bootstrap’s Affix and ScrollSpy components. This time though, I’ll be focused on a different Bootstrap component: I’ll go through the process of building two simple extensions for the the Bootstrap carousel.

First, I’ll create a full-screen slideshow and then I’ll show you how to randomize the first slide on page load.

But before digging into those extensions, let’s start by creating a carousel based on the default styles.

To create the carousel, we’ll take advantage of the basic code for the carousel component that Bootstrap provides:

[code language="html"]
<div id="mycarousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#mycarousel" data-slide-to="0" class="active"></li>
<li data-target="#mycarousel" data-slide-to="1"></li>
<li data-target="#mycarousel" data-slide-to="2"></li>
<li data-target="#mycarousel" data-slide-to="3"></li>
<li data-target="#mycarousel" data-slide-to="4"></li>
</ol>

<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="1.jpg" data-color="lightblue" alt="First Image">
<div class="carousel-caption">
<h3>First Image</h3>
</div>
</div>
<div class="item">
<img src="2.jpg" data-color="firebrick" alt="Second Image">
<div class="carousel-caption">
<h3>Second Image</h3>
</div>
</div>
<!-- more slides here -->
</div>

<!-- Controls -->
<a class="left carousel-control" href="#mycarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#mycarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
[/code]

Notice that each of our images contains the custom data-color attribute. Later we’ll use its value as a fallback in case the corresponding image fails to load.

The next step is to initialize the carousel via JavaScript and modify the predefined values of the interval and pause configuration properties. Take note that we choose to set the value of the pause property to false because we always want the cycling to be active:

[code language="javascript"]
$('.carousel').carousel({
interval: 6000,
pause: "false"
});
[/code]

Having followed those simple steps (and of course imported the required files), we should now be able to build the first version of the carousel. Here’s how it looks so far:

See the Pen A Basic Bootstrap Carousel by SitePoint (@SitePoint) on CodePen.

Creating Full-screen Slides

At this point we’ll go one step further, converting the existing carousel into a full-screen slideshow. To implement this updated version we have to add some custom jQuery:

Continue reading %A Full Screen Bootstrap Carousel with Random Initial Image%


by George Martsoukos via SitePoint

Google Play Services: Using the Nearby Connections API