Posts

Showing posts from June, 2016

How to convert String to enum in Java

Use the valueOf() method of the enum class.

Such as YourEnum.valueOf("ABC") to convert the String "ABC" into corresponding Enum value.

Netbeans feature: Print to HTML

To put formatted code for web page using Netbeans: Print to HTML. It’s under the File menu.
Open your source in NetbeansClick Print to HTML under the File menuChoose between “Print to File” and “Print to Clipboard

How to validate fstab syntax without rebooting Linux

You can simple run: mount -a

-a Mount all filesystems (of the given types) mentioned in fstab.

This command will mount all (not-yet-mounted) file systems mentioned in /etc/fstab and is used in system script startup during booting.

The importance of tracking your marketing campaign

Whether it's Facebook ads, Google Adwords, email marketing, guest blogging or product reviews, there are a lot of different methods to market your products. However, marketing only represents part of the equation. The second part, and arguably more important, is tracking your efforts. Without proper tracking and analysis, you'll always just be guessing the true success of your campaigns.

Using GitHub Gist as a Syntax Highlighter for Your Blog or Website

GitHub Gist is a simple way to share snippets and pastes with others. All gists are Git repositories, so they are automatically versioned, forkable and usable from Git.

After you create your Gist, you will be presented with a confirmation page. Click the show embed link and copy/paste the script tag on to your website.

Now, when your page is loaded, your code will be pulled in from Github and automatically formatted. The syntax highlighting is auto-detected based on the extension of the file name that you enter, so be sure you add the appropriate level of detail.

summernote - Super simple WYSIWYG editor

summernote is Super simple WYSIWYG editorSee also: How to highlight bash/shell code in markdown
Easy to Install
Simply download and attach your js, css with bootstrap.


Customization
Customize by Initializing various options and modules.


Examples
See all useful features of summernote in action.


Open Source
Summernote is licensed under MIT and maintained by the community on.


Integration
Integrate it with any back-end. 3rd parties available in django, rails, angular.

Features
Support bootstrap 3.x.x
Lightweight (js+css: 80Kb)
Smart User Interaction
Safari, Chrome, Firefox, Opera
Internet Explorer 9+ (IE8 support coming soon)

How to start MySQL directly for debuging

Starting up the MySQL server directly could provide you more information for debugging, instead of
sudo -i service mysql start or
sudo -i /etc/init.d/mysql startYou could do something similar to:
shell> /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/extra/mysql2/db1-err.log --open-files-limit=8192 --pid-file=/var/lib/mysql/db1.pid --socket=/var/lib/mysql/mysql.sock --port=3306

The /etc/sysconfig/network file in CentOS / RedHat / Oracle Linux

The /etc/sysconfig/network file The /etc/sysconfig/network file is used to specify information about the desired network configuration on your server. Following is a example /etc/sysconfig/network file:
NETWORKING=yes
FORWARD_IPV4=yes
HOSTNAME=it.i88.ca
GATEWAY=0.0.0.0
GATEWAYDEV= The following values may be used: NETWORKING=answer, where answer is yes or no -Configure networking or not to configure networking.FORWARD_IPV4=answer, where answer is yes or no -Perform IP forwarding or not to perform IP forwarding.HOSTNAME=hostname, where hostname is the hostname of your server.GATEWAY=gwip, where gwip is the IP address of the remote network gateway -if available.GATEWAYDEV=gwdev, where gwdev is the device name eth# you use to access the remote gateway.

How to Set Hostname on CentOS (RHEL)

Updated:
How to Set / Change Host Name in CentOS 7 / RHEL 7 / Oracle Linux 7
See also: How to fix: unable to resolve host in Ubuntu
To temporarily set the host name of centos, use hostname command.
However, once the server is rebooted, the hostname will revert to it's previous setting.To permanently change the hostname, you need to edit the network file at /etc/sysconfig/network.
HOSTNAME=<value>, where <value> should be the Fully Qualified Domain Name (FQDN), such as hostname.expample.com, but can be whatever hostname is necessary.

You can also edit /etc/hosts:
127.0.0.1   myhostname localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         myhostname localhost localhost.localdomain localhost6 localhost6.localdomain6

What Elements Determine Google Adsense Quality Score

Ad relevance – this is the relevance of a keyword or search query to the ad in questionLanding page – the reputation and relevance of your landing page to the ad and search query get you a higher score.A higher click through rate

Amazon and Microsoft are entering Canadian cloud market

Amazon has announced its plans to enter the Canadian market in 2016. Amazon is not the only public cloud vendor going after Canadian government clients and companies looking to avoid data sovereignty concerns.

In June 2015, Microsoft announced its plans to enter the Canadian business market in 2016.  Microsoft's plans include two Canadian Azure data centers. Both data centers will be in eastern Canada, with plans to launch in Toronto, Ontario and Quebec City, Quebec.

Kompozer - One of the Best Free Multiple Plateform WYSIWYG HTML Editors

Kompozer supports tabbed editing—WYSIWYG in one tab, raw HTML in the other—on-the-fly editing via the built-in FTP site manager, and a highly customizable interface with easily modified toolbars. Kompozer has a markup cleaner and a W3C call function to validate your HTML against current standards. It's free, available on Windows, Mac, and Linux machines, and it has a strong focus on standards compliance and clean code.

Open Live Writer - a desktop blog-publishing application

Open Live Writer (also known as OLW) is a fork of Windows Live Writer, which is developed by Microsoft and is part of the Windows Live range of products. Open Live Writer features WYSIWYG authoring, photo-publishing and map-publishing functionality.

Open Live Writer is like Word for your blog. Open Live Writer is a powerful, lightweight blog editor that allows you to create blog posts, add photos and videos then publish to your website. You can also compose blogs posts offline and then publish on your return. Open Live Writer works with many popular blog service providers such as WordPress, Blogger, TypePad, Moveable Type, DasBlog and many more.

Google AdWord Campaign Quality Score

When you run an AdWord Campaign Google assigns a Quality Score to each of the keywords you choose. This is a score that can either have a positive or negative effect on the performance of your campaign. In basic terms, a good score can give you an edge over your competitors so you want to consider doing what you can to increase that score as

Google awards the advertisers who offer the best experience for searchers. This score is a variable that can either go up or down as the campaign progresses and a score is assigned to each of the keywords you use. This score affects the way your ad ranks and the cost per click you pay, so the higher the score the lower your cost.

AWS Certificate Manager

AWS Certificate Manager is a new service that lets you easily provision, manage, and deploy Secure Sockets Layer/Transport Layer Security (SSL/TLS) certificates for use with AWS services. SSL/TLS certificates are used to secure network communications and establish the identity of websites over the Internet. AWS Certificate Manager removes the time-consuming manual process of purchasing, uploading, and renewing SSL/TLS certificates. With AWS Certificate Manager, you can quickly request a certificate, deploy it on AWS resources such as Elastic Load Balancers or Amazon CloudFront distributions, and let AWS Certificate Manager handle certificate renewals. SSL/TLS certificates provisioned through AWS Certificate Manager are free. You pay only for the AWS resources you create to run your application.

How to fix: Linux server won't boot because of wrong /etc/fstab file

If you encounter something like:

an error occurred during the file system check

You may need to check and modify /etc/fstab to fix it.

If your /etc/fstab is readonly, try to remount the file system:
mount -n -o remount,rw /

Spring Social

Spring Social connects your Spring application with Software-as-a-Service (SaaS) API providers such as Facebook, Twitter, and LinkedIn.

Chai Assertion Library

Chai is a BDD / TDD assertion library for node and the browser that can be delightfully paired with any javascript testing framework.

Foundation - the most advanced responsive front-end framework in the world

A Framework for any device, medium, and accessibility. Foundation is a family of responsive front-end frameworks that make it easy to design beautiful responsive websites, apps and emails that look amazing on any device. Foundation is semantic, readable, flexible, and completely customizable.

cdn links

SaaS-based model for Global Digital Marketing

Digital marketing is not a niche marketing channel any more. High speed internet penetration is growing rapidly and usage of search and social media has grown exponentially as access to them becomes faster and simpler. Many marketing teams are switching their focus to digital as the world economic crisis has led to reduced budgets and greater accountability requirements.

The SaaS-based model for digital marketing offers a pay-per-use model, along with one-time set up fee for the software, maintenance, upgrade and lifetime support. Hence, the Global Digital Marketing Software market is witnessing a trend where many vendors in the market have begun to offer their solutions through the SaaS-based model to expand their services and enter new markets.

In addition, digital marketing solutions are becoming increasingly popular, as they enable businesses to securely store, access, and maintain digital records, images, text, and data. This is leading to an increased adoption of SaaS-based soluti…

How to solve: java.lang.SecurityException: Missing required Permissions manifest attribute in main jar

You either need to lower your Java security to medium (you can bring security of Java back to high after that)

Or

You add Java to Exception Site List:

The Exception Site List feature allows end users to run Java applets and Java Web Start applications that do not meet the latest security requirements. Rich Internet Applications that are hosted on a site in the exception site list are allowed to run with the applicable security prompts.

Example to check file exists in Java

if (Files.exists(FileSystems.getDefault().getPath("i88.ca/test.txt'))) {
//exists here
}

Initial Server Setup with CentOS

adduser i88
passwd

visudo

i88    ALL=(ALL:ALL) ALL

sudo vi /etc/ssh/sshd_config


PermitRootLogin no
UseDNS no
AllowUsers i88

/etc/init.d/sshd reload

Test you can login with the new user i88 before logout.

You may then go ahead with 

Marketing using WordPress

WordPress is an open source platform that allows for maximum customization of any pre-developed theme, it gives developers the ability to use various APIs and plugins without having to build them from code and it provides the foundation for SEO best practices.

As the number-one CMS (Content Management System) in the world, WordPress has a very robust development community that makes achieving almost any functionality possible. Because it’s an open-source platform, WordPress saves developers time by giving them tools to build a comprehensive content marketing plan without spending endless hours of custom development work. For marketers, this translates into dollars saved.

Social Marketing by Wordpress
Social Marketing using WordPress

ExceptionMapper

ExceptionMapper is custom, application provided component that can catch thrown application exception and write specific HTTP response. It is a contract for a provider that maps Java exceptions to Response.

Providers implementing ExceptionMapper contract must be either  registered in a JAX-RS runtime or must be annotated with @Provider annotation to be automatically discovered by the JAX-RS runtime during a provider scanning phase.

When an application exception is thrown it will be caught by the JAX-RS runtime. JAX-RS will then scan registered ExceptionMappers to see which one support marshalling the exception type thrown.

WebApplicationException is automatically mapped by the JAX-RS provider. You could extend WebApplicationException and override it's getResponse method. WebApplicationException is simpler to use. ExceptionMapper on the other hand can be used for mapping exceptions that do not extend from WebApplicationException (e.g all the standard Java exceptions, exceptions from t…

How to print screen of the current active window in Windows

If you want to capture only the currently focused window, you can hit alt+Print Screen.

PhantomJS - a WebKit-based browser without a GUI

PhantomJS is “headless”. It can do all the things a normal browser can do but by removing the heavy GUI it runs faster and does not require a graphical interface. PhantomJS is ideal for automated testing as part of a continuous integration system such as Jenkins since it can be installed directly on the Jenkins node and executed from the command-line. Install PhantomJS from phantomjs.org/download.html and ensure phantomjs is accessible from the command line.

The importance of time management skills

For most people, one of the greatest daily challenges is time management. Not only do busy people struggle with effectively managing their time in order to complete their never-ending to-do lists each day, but they also struggle with prioritizing their time to focus on the tasks that will produce the greatest value and returns. A person's daily habits, routines and systems can (and usually do) make or break his/her success.

How to exit scale mode in VirtualBox?

To exit scale mode: Right Ctrl (Host Key)+C

Install Nginx web server on Ubuntu

sudo apt-get install nginx

How To Use kpcli To Manage KeePass2 Password Files on an Ubuntu Server

The kpcli tool is a command line utility for creating and editing KeePass entries and databases.

Installation:
sudo apt-get install kpcli libterm-readline-gnu-perl libdata-password-perl

Usage:
At the prompt, start up an interactive session with kpcli by typing:


kpcli

You can see some of your available options by typing:


help

cd -- Change directory (path to a group)
cl -- Change directory and list entries (cd+ls)
close -- Close the currently opened database

cls -- Clear screen ("clear" command also works)
...



Top 4 Security Controls / Measures / Check-lists

The Council on CyberSecurity has found that 85% of cyber-attack techniques can be prevented by implementing the Top 4 controls:

1 Application Whitelisting– only allow approved software to run
2 Application Patching– keep apps, plug-ins and other software up to date
3 OS Patching– keep operating systems current with the latest fixes
4 Minimize Administrative Privileges– prevent malicious software from making silent changes

Centos Security Checklist -- OnlyAllowRootToAccessCRON.sh

#!/bin/bash
#Only allow root to access CRON
#The cron daemon is used to schedule processes. The crontab command is
#used to create personal crontab entries for users or the root account. To
#enhance security of the cron scheduler, you can establish the cron.deny and
#cron.allow files to control use of the crontab. The following commands will
#establish root as the only user with permission to add cron jobs.
rm -f /etc/cron.deny /etc/at.deny
echo root > /etc/cron.allow
echo root > /etc/at.allow
chown root:root /etc/cron.allow /etc/at.allow
chmod 400 /etc/cron.allow /etc/at.allow

Keyword Rich Domains and URLs

In the past, it was very easy to rank any content for particular keywords by using a keyword rich domain. Google’s algorithm changed and keyword rich domains are not as beneficial in ranking your content as before. Now keyword rich URLs are dominating the SERPs. You can do a research by searching particular keywords in Google. You will notice that all the top rankings contain the keyword in domain and permalink.

Features of Big BlackBerry Z30 GSM Smartphone

You can buy BlackBerry Z30 GSM Smartphone from the company itself or through Amazon.com. It's the biggest BlackBerry smartphone yet. It has a 5-inch AMOLED screen—which can display high-definition images. It's also heavier than some of its competition, and the battery can last for days. It has impressive dynamic range and excellent sound. This BlackBerry has the ability to run Android software in addition to apps designed specifically for the company's BlackBerry 10 operating system. While not every Android app will work and you can't use the Google Play store, most of the apps work fine.

Kubernetes—an open source container manager

Kubernetes is a lean yet powerful open-source container manager that deploys containers into a fleet of machines, provides health management and replication capabilities, and makes it easy for containers to connect to one another and the outside world.

Kubernetes was developed from the outset to be an extensible, community-supported project. Take a look at the source and documentation on GitHub and join the mailing list.

How to Delete / Remove User Account on Linux

userdel userName

How to Disable SSH Root Login on Linux

sudo vi /etc/ssh/sshd_config

PermitRootLogin no
UseDNS no
AllowUsers i88

/etc/init.d/sshd reload

How to show all files/directory including subdirectory using Linux/Unix command

ls -R

-R (recursive) flag

Example of Java String Regular Expression: finding substring

For example:
I88 CA (superman@i88.ca)
To get superman@i88.ca

PatternMY_PATTERN=Pattern.compile("\\((.*?)\\)");
Matcherm=MY_PATTERN.matcher("I88 CA (superman@i88.ca)");
while(m.find()){
// You get: superman@i88.ca
StringwhatYouWant=m.group(1);
}

How to read numeric strings in Excel cells as string with Apache POI

Put

cell.setCellType(Cell.CELL_TYPE_STRING);

before you read the numeric cell. It works no matter how the user formatted the cell. It works even when you open the Excel File as StandardOpenOption.READ.

Example of Java program to read Excel file

importjava.io.IOException;
importjava.io.InputStream;
importjava.nio.file.Files;
importjava.nio.file.Path;
importjava.nio.file.Paths;
importjava.nio.file.StandardOpenOption;
importorg.apache.poi.hssf.usermodel.HSSFWorkbook;
importorg.apache.poi.ss.usermodel.Row;
importorg.apache.poi.ss.usermodel.Sheet;
importorg.apache.poi.ss.usermodel.Workbook;
importorg.apache.poi.xssf.usermodel.XSSFWorkbook;

publicclassMain{

publicstaticvoidmain(String[]args)throwsIOException{
Workbookwb=null;

Pathpath=Paths.get("/your_path/your_file.xlsx");
InputStreamis=Files.newInputStream(path,StandardOpenOption.READ);
StringfileName=path.getFileName().toString().toLowerCase();

if(fileName.endsWith("xlsx")){

wb=newXSSFWorkbook(is);

}else{

wb=newHSSFWorkbook(is);
}

Sheetsheet=wb.getSheetAt(0);

for(inti=1;i<sheet.getPhysicalNumberOfRows();i++){
Rowrow=sheet.getRow(i);
System.out.println(row.getCell(5));

}

if(is!=null){
is.close();
}

}
}
https://gist.github.com/i88ca/c2fd3354ca6365ab2d58

IBM Walks Through Its Software Development History

IBM has gone through a variety of software development schemes and methodologies—including traditional waterfall methodology, iterative styles of development and Agile development schemes with continuous delivery. Spurring these moves are demands for newer, better and faster apps, along with the advent of mobile, social, big data, the Internet of things and cloud environments, where rapid development is a must and DevOps is king. At the recent IBM Innovate conference, Senior Vice President and Group Executive for Software and Systems Steve Mills took attendees through the history of software development—including new tools like IBM's Bluemix platform-as-a-service (PaaS) technology. Combined with IBM DevOps services, developers and line-of-business operations are able to work together and develop faster-than-traditional methods via integrating all organizational systems, simplified testing and quality assurance, and faster access to feedback. This allows the continuous delivery of …

Red Hat Releases RHEL 7 With New Filesystem, Docker Support

After three and a half years in development, a major milestone update for Red Hat Enterprise Linux, Red Hat's flagship Linux platform, debuts.

Red Hat today formally announced the availability of its highly anticipated next-generation Red Hat Enterprise Linux (RHEL 7) platform, which has been in development since 2010. Among its features, RHEL 7 includes a new filesystem that can scale to 500 terabytes as well as support for Docker container virtualization technology.

WordPress Is so much more than Blogging

WordPress is:

easy to usevery customizableeasy to updateeasy to maintainhas superb functionalitytons of community support.

The new open-source Linux kernel improves virtualization for Windows and Mac OS X guests and accelerates resume from suspend

The third major milestone release this year of the open-source Linux kernel is now available, providing users with new and improved features. The Linux 3.15 kernel follows Linux 3.14, which was formally released on March 30. Among the enhanced capabilities in the Linux 3.15 kernel is improved suspend and resume performance. The new suspend and resume code "provides a tangible speed up for a non-esoteric use case (laptop resume)," Linux kernel developer Dan Williams told Linux creator Linus Torvalds in a Linux Kernel Mailing List (LKML)

What to monitor for System performance

Four subsystems that needs to be monitored.
CPUMemoryI/ONetwork1. CPU

You should understand the four critical performance metrics for CPU — context switch, run queue, CPU utilization, and load average.
Context Switch
When CPU switches from one process (or thread) to another, it is called as context switch.When a process switch happens, kernel stores the current state of the CPU (of a process or thread) in the memory.Kernel also retrieves the previously stored state (of a process or thread) from the memory and puts it in the CPU.Context switching is very essential for multitasking of the CPU.Higher level of context switching can cause performance issues. Run Queue Run queue indicates the total number of active processes in the current queue for CPU.When CPU is ready to execute a process, it picks it up from the run queue based on the priority of the process.Processes that are in sleep state, or i/o wait state are not in the run queue.Higher number of processes in the run queue can cause perf…

Credit to get started with Google Cloud Platform

Google Cloud Platform Starter Pack gives developers from affiliated partners $500 in credit to get started building

Apply at http://cloud.google.com/starterpack and use promo code: gdg-in

How to Use Named Native Query in JPA

@Entity
@Table(name = "my_table")
@NamedNativeQuery(name = "MyEntity.nativeSQLexample", query = "SELECT * from MyEntity", resultClass = MyEntity.class)
public class MyEntity {
//... }

//usage:
em.createNamedQuery("MyEntity.nativeSQLexample").getResultList();

Strategy pattern

Image
Head First Design Patterns

No 1 Design Principle in software development

The Strategy Pattern defines a family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from clients that use it.






Define the interface of an interchangeable family of algorithmsBury algorithm implementation details in derived classesDerived classes could be implemented using the Template Method patternClients of the algorithm couple themselves strictly to the interface
Design Patterns: Elements of Reusable Object-Oriented Software


Example 1:
interfacesendStrategy() {
publicvoidsend();
}

classsendByCopyimplements sendStrategy() {
publicvoidsend() {
//copy to the send folder.
}
}

classsendBySMTPimplements sendStrategy() {
publicvoidsend () {
// send by connecting to SMTP
}
}Example 2:// 1. Define the interface of the algorithm
interfaceStrategy { publicvoidsolve(); }

// 2. implementation
abstractclassTemplateMethod1implementsStrategy {
// 3. Template Method
pub…

Observer Design Pattern in Java ( SE and EE )

SE and EE versions:

SE version

package it.i88.ca.example.se.observer;

importjava.util.Observable;
importjava.util.Observer;

classMyObserverimplements Observer {

publicvoidupdate(Observable o, Object arg){
System.out.println("update: "+ arg);
}
}


package it.i88.ca.example.se.observer;

publicclassObserverTest{

publicstaticvoidmain(String[] args){
Observered oed =new Observered();
MyObserver mo1 =new MyObserver();
MyObserver mo2 =new MyObserver();

oed.addObserver(mo1);
oed.addObserver(mo2);

oed.updateNoticeBoard("Event from i88.ca occurs");

}
}


package it.i88.ca.example.se.observer;

importjava.util.Observable;

classObserveredextends Observable {

private String event;

public String getEvent(){
return event;
}

publicvoidupdateNoticeBoard(String notice){
this.event= notice;
setChanged();
notifyObservers(notice);
}
}

Source in GitHub

Problems with java.util.Observable
Because Observable is a class, you have to subclass it. That means yo…

Automattic Acquires BruteProtect

Automattic has acquired BruteProtect, a plugin and service that protects your Wordpress sites from malicious logins, saves server resources so your site runs faster, and keeps all your sites on the latest and greatest versions of WordPress core, plugins, and themes.

The plugin and service are currently available, but over the coming months their functionality will be merged into Jetpack and BruteProtect will be retired as a standalone thing.

Java Management Extensions (JMX)

The Java Management Extensions (JMX) API is a standard API for management and monitoring of resources such as applications, devices, services, and the Java virtual machine.

Typical uses of the JMX technology include:

Consulting and changing application configurationAccumulating statistics about application behavior and making them availableNotifying of state changes and erroneous conditions.The JMX API includes remote access, so a remote management program can interact with a running application for these purposes.
The JMX specification defines an architecture, the design patterns, the APIs, and the services for application and network management and monitoring in the Java programming language.

Using JMX technology, a given resource is instrumented by one or more Java objects known as Managed Beans, or MBeans. These MBeans are registered in a core managed object server, known as an MBean server, that acts as a management agent and can run on most devices enabled for the Java programming l…

eCommerce CMS

Magento: Magento is one of the most popular CMS preferred by a number of the world’s leading brands. This is an amazing open source platform that allows customizing your web project the way you wish. Though it requires more time to master it fully, you will be surprised to discover the full range of its features.
PrestaShop: This is another cool free open source platform with a wide range of amazing features. It will provide you with full control of your inventory, you will be able to customize your project whenever you wish, it comes with PayPal payments support, and more.
osCommerce: This is one of the oldest online shop platforms that offers several marketing options and supports most popular payment systems. Choosing this CMS you’ll be able to treat your viewers with outstanding shopping carts, product reviews, secure transactions, easily customized bestseller lists, related items, and more.
OpenCart: Whether you’re running a small or large business – this CMS will be of use to you. …

How to answer "what’s your favorite tool / platform / software?" during interview

What Most People Answer:  I like Wordpress / Magento / ...

What You Should Answer: I've used a number of proprietary and open source E-Commerce Platforms. However, I base my decision on the scope of the project, the desired outcomes and what’s best for the client. In fact, I usually stick with the client’s current system unless there’s a compelling reason to change.

Why You Should Answer this way: The client’s needs are more important than product loyalty. Your answer should not only showcase your experience with a range of tool / platform / software, but also the way you approach them.

Profit-Driven Marketing

There’s a new trend driving successful digital advertising campaigns: profit-driven marketing. It flips digital tradition on its head by approaching marketing as a profit center instead of as a cost center. A profit-driven approach means spinning familiar problems in new ways. This collection features strategic guidance for marketers to embrace a profit-driven approach, an outline of the three main pillars of profit-driven marketing—recognizing value, targeting outcomes and capturing demand—and case studies of brands that have achieved a better bottom line with this approach.

Read more

Twitter Readies Up For E-commerce

Recode reports that Twitter’s long-awaited e-commerce platform is expected to be launched by the end of the year. The platform will allow users to make purchases directly from the website.

CSS display property

CSS treats HTML elements like boxes. A box can be "block" or "inline".

Block elements display on a new line (e.g., h1, p, ul, li).

Inline elements display on the same line as their neighboring elements (e.g., img, a)

It's possible to change whether a box is block or inline by using the display property.

display: block;

Now you can backup to cloud with MySQL Enterprise Backup

MySQL Enterprise Backup 3.10 support backups to the cloud. The only supported cloud service is Amazon S3.

When the cloud destination is used mysqlbackup will upload the backup as an image file.

You can specify all options on the commandline:
mysqlbackup --cloud-service=s3 --cloud-aws-region=us-east-1 \
--cloud-access-key-id=your-id \
--cloud-secret-access-key=your-key \
--cloud-bucket=your-bucket --cloud-object-key=firstbackup --cloud-trace=0 \
--backup-dir=/tmp/firstbackup --backup-image=- --with-timestamp backup-to-image

How to send big attachment from Gmail

Gmail limits the size of email attachments to 25MB, but you can bypass that by sending an attachment via your Google Drive. When you compose an email, click on the small Drive icon, and from there pick what you want to add.

When someone sends you any attachment via email, you can save it straight to your Drive. Hover over the attachment and you'll see the Drive icon. Click on it and place it where you like.

Make Your Website Work Across Multiple Devices

Build a website that showcases your business on every screen from smartphones and tablets to computers and TVs. Your customers expect a great browsing experience regardless of what device they use.

Resource from Google

How to use electronic signatures for digital documents

If you have an updated Mac, you’ll be able to hold a handwritten signature up to your webcam and easily save it as a digital file. You can scan use a scanner and save your signature to cloud such as Google Drive as a jpeg/png that can be easily inserted into files. If you prefer to print and sign documents, consider an iPhone app like DocScan that can turn a photo of paper into a digital file. Users can also fax files for less than $1.

EchoSign from Adobe and HelloSign are two other platforms for electronic signatures of documents. You can sign and send a document, or request that others sign it as well.

Portable wi-fi choices

Services like FreedomPop give you the freedom to bring wi-fi wherever you go at a very low monthly price. Mobile hot spots like those sold by Verizon are helpful, but not always the fastest option.

How to undo sent messages in Gmail

Click on the gear icon on the right-hand side, and then select Settings. Go to Labs, scroll down to Undo Send and choose to "enable."

Once you've saved that feature, test it out. (For Gmail newbies, the Labs section is where the creators test out new or interesting features, which could "change, break or disappear at any time." However, this feature has been around for at least four years.)

After sending a message, a yellow bar will appear at the top of your Gmail and say "Your message has been sent," and will offer you the option to "undo" or "view message." If you choose "undo," your message turns back into a draft. But be swift — the option will only hang around for a few seconds.

Google Updating Font Family for Wider Mobile Device Use

Image
Google continues to revamp key fonts to help improve the display of new content for mobile users on a wider range of device screens. Google has been working to revamp how content appears for mobile users on a wide range of device screens by updating the Roboto font and introducing a new Chinese, Japanese and Korean language font.

The font updates are part of Google's effort to make the Web easier to use and view by users. The new version of the Roboto font was unveiled by Christian Robertson, a Google Android visual designer, in a July 16 post on the Google Developers Blog, as a project under Google's previously announced expansion of its Material Design guidelines. The guidelines aim to improve visual design online for users while incorporating innovation and the promises of technology and science.

See also:  Fonts

How to Install openoffice to Fedora/CentOS/Red Hat Linux

sudo yum -y install openoffice*

How to Install RPMforge to Centos / Red Hat Linux

From
http://pkgs.repoforge.org/rpmforge-release/

rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el7.rf.x86_64.rpm


Database primary keys design

Database primary keys normally should have nothing at all to do with the application data in a row. Primary keys should be generated sequentially or randomly by the database upon row insertion and should not be changed. If they're not system values managed by the system, you're likely to encounter problems when you change the underlying data or migrate the data to another system.

jstat - command-line tool to display detailed performance statistics for a local or remote HotSpot VM

The –gctuil option is used most frequently to display garbage collection information.

Note: When using the Concurrent Mark Sweep (CMS) collector (also known as concurrent collector), jstat reports two full GC events per CMS cycle, which is obviously misleading. However, young generation stats are accurate with the CMS collector.

For example, to display gc information every five seconds of pid 23610

jdk1.8.0_11/bin/jstat -gcutil 23610 5000
Warning: Unresolved Symbol: sun.gc.metaspace.capacity substituted NaN
Warning: Unresolved Symbol: sun.gc.metaspace.used substituted NaN
Warning: Unresolved Symbol: sun.gc.metaspace.capacity substituted NaN
Warning: Unresolved Symbol: sun.gc.compressedclassspace.capacity substituted NaN
Warning: Unresolved Symbol: sun.gc.compressedclassspace.used substituted NaN
Warning: Unresolved Symbol: sun.gc.compressedclassspace.capacity substituted NaN
  S0     S1     E      O      M     CCS    YGC     YGCT    FGC    FGCT     GCT   
  0.00   0.00  22.86  36.75      -      …