Posts

Showing posts from March, 2018

Java annotations have a number of uses

Annotations, a form of metadata, provide data about a program that is not part of the program itself. Annotations have no direct effect on the operation of the code they annotate.
Annotations have a number of uses, among them:


Information for the compiler — Annotations can be used by the compiler to detect errors or suppress warnings.Compile-time and deployment-time processing — Software tools can process annotation information to generate code, XML files, and so forth.Runtime processing — Some annotations are available to be examined at runtime.

FinTech is a dynamic segment of the financial services industry

FinTech is a dynamic segment of the financial services industry where technology focused startups and new market entrants innovate on the products and services traditionally provided by financial institutions.

Bitcoin remains by far the most popular choice, followed by Ethereum and Litecoin.

Cryptocurrencies were a popular choice to invest $10,000 in,

Apache Thrift is an interface definition language and binary communication protocol

Apache Thrift is an interface definition language and binary communication protocol used for defining and creating services for numerous languages. It forms a remote procedure call (RPC) framework and was developed at Facebook for "scalable cross-language services development". It combines a software stack with a code generation engine to build cross-platform services which can connect applications written in a variety of languages and frameworks.

THINK ABOUT THE BIGGER PICTURE

Thinking about whether the items on your to-do list move you forward in your role, or whether they're just time sucks like emails that probably bring out very little value.

if you’re working hard and delivering good results, you should be advancing.

if you're working hard and delivering good results, you should be advancing.  It's better to get constructive criticism so you can improve your performance than to be left in the dark

A woman was killed by one of Uber’s autonomous cars earlier this month.

Uber Ordered to Take its Self-Driving Cars Off Arizona Roads.

Apple has a new $299 iPad

Apple has other new software tools will help it catch Google in the hunt for students' attention.

PostgreSQL is the preferred open source relational database for many enterprise developers and start-ups.

Amazon RDS supports PostgreSQL version 10, including features like native table partitioning, improved parallelism in query execution, ICU collation support, column group statistics, enhanced postgres_fdw extension, and more.

HP Chief Operating Officer Jon Flaxman Died

HP Inc said that Chief Operating Officer Jonathan Flaxman, 61, has died.

Google Apps Script

With Google Apps Script , you can: Develop in a browser-based editor or IDE (integrated development environment)Code in a specialized version of JavaScript customized to access G Suite, and other Google or external services (URLfetch, JDBC, etc.)Can safely ignore writing authorization code because Apps Script handles it for youDo not have to host your app—it lives and runs on Google servers in the cloud

Google Apps Script UrlFetch Example

Example of sending email by Google Apps Script

Google App Script library

To add it to your script, do the following in the Apps Script code editor: Click on the menu item "Resources > Libraries..."In the "Find a Library" text box, enter the script ID 1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDFand click the "Select" button.Choose a version in the dropdown box (usually best to pick the latest version).Click the "Save" button.Alternatively, you can copy and paste the files in the /dist directory directly into your script project.
Add project key "MGwgKN2Th03tJ5OdmlzB8KPxhMjh3Sh48" to add Underscore to the project

Apps-Script-Blogger-Library: M2CuWgtxF1cPLI9mdRG5_9sh00DPSBbB3

Google App Script library

OAuth2 library

To add it to your script, do the following in the Apps Script code editor: Click on the menu item "Resources > Libraries..."In the "Find a Library" text box, enter the script ID 1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDFand click the "Select" button.Choose a version in the dropdown box (usually best to pick the latest version).Click the "Save" button. Alternatively, you can copy and paste the files in the /dist directory directly into your script project.
Add project key "MGwgKN2Th03tJ5OdmlzB8KPxhMjh3Sh48" to add Underscore to the project

How to Upgrade Ubuntu

By update-manager-core, you can run upgrade command and walk away. Ubuntu will handle the rest. $ sudo apt install update-manager-core When that finishes, run the Ubuntu upgrade utility.
$ sudo do-release-upgrade
Another way, by apt: $ sudo apt update  $ sudo apt upgrade $ sudo apt autoremove$ sudo apt dist-upgrade

Upgrade Ubuntu to 18.04

The latest Ubuntu release, 18.04, marks an opportunity for both LTS users and people on the previous 17.10 release to update Ubuntu and take advantage of the latest features. Thanks to Debian's upgrade process, it should be relatively simple to either upgrade Ubuntu 16.04 to 18.04 (both LTS) or to upgrade Ubuntu 17.10 to 18.04 LTS Bionic Beaver.

Oracle Visual Builder Cloud Service is a visual development tool for creating web and mobile applications by simply dragging and dropping user interface (UI) components onto a page.

You can create business objects with the click of a button, and you can add data by importing CSV files or XLS spreadsheets to your application. You don't need any programming experience to develop an application.

Understanding Linux Audit Log Files

By default, the audit system logs audit messages to the /var/log/audit/audit.log file. Audit log files carry a lot of useful information.

If auditd is not running for whatever reason, audit messages will be sent to rsyslog.


 If you want to generate a summary report on all command executions on the server, run:
sudo aureport -x --summary



The following command will give you the statistics of all failed events:
sudo aureport --failed

Search for all events (if any) touching the file /etc/ssh/sshd_config and interpret them:
sudo ausearch -f /etc/ssh/sshd_config -i

The danger of curl to get binary file

curl url-of-binary could damage your system, it is better you only run it inside a container.
In my Dev system, I can sudo without password, after I run
curl url-of-a-jpg-file, my dev system's systemd-localed service has been stopped.
I have to restart it with

sudo systemctl start systemd-localed

If you feel boring and want some challenge, you can set up sudo without password and then randomly curl some binary files. After that you can try to fix your system.

Fefora is smart, there is warning from Fedora:

Warning: Binary output can mess up your terminal. Use "--output -" to tell 
Warning: curl to output it to your terminal anyway, or consider "--output 
Warning: <FILE>" to save to a file.


Understanding Linux Audit Log Files can help you.

An interview is a mutual exchange of information between an employer and you, as a candidate for a position.

The primary objectives of interview are to:


Supplement resume informationShow that you understand your strengths and weaknesses and have a sense of directionEnable the employer to evaluate your personality and attitudes in terms of the demands of the organization and the positionAllow you to gain information about the organization and the job that is not available through other sourcesGive you and the employer an opportunity to discuss the desirability of further contact or an offer of employment

New for Microsoft Office 365

Image
See updates in real time with co-authors using Word, Excel, and PowerPoint 2016. Quickly find content that could be hard for people with disabilities to consume using the Accessibility Checker. Do more with just your keyboard. Access Keys let you use the tools in the ribbon without touching your mouse.

IT Operations

IT Infrastructure

Cloud

Servers

Database

DevOps

Monitoring

Remote Access

Backup

Technical Documentation

Data Recovery

Encryption

Security

FTP

NAS

Deployment

VPN

VPS

Automation

Log Management

Networking

Virtualization

People are empowered by mobile every single day

Mobile became a power tool in idle moments

In fact, it's become a productivity-boosting tool.

As an Academy for Ads user, you can access online courses that can help you grow your skills and earn certifications and achievements along the way.

Your profile plays an important role in making sure you're properly credited for your skills, so you'll want to keep it current.

As of April 2018 Google will be turning off the Insights feature in Google Partners

Please visit Academy for Ads for Google's e-learning courses, exams and certifications, and check Think with Google for market insights and trends.

Import virtual disks into GCE

Customers can use this beta release to import virtual disks into Google Compute Engine and use the resulting image to create new virtual machines.

Custom PTR support for GCE VMs

This new feature, now generally available, allows customers to register pointer records for GCE instances with external IPs. This allows applications and users to reference domain names instead of IP numbers when accessing GCE applications.

MySQL has various kinds of password policy enforcement tools

MySQL has various kinds of password policy enforcement tools: a password can expire (even automatically), can be forced to be of a certain length, contain amounts of various types of characters and be checked against a dictionary of common passwords or the user account name itself

MySQL Enterprise Transparent Data Encryption (TDE) enables data-at-rest encryption by encrypting the physical files of the database.

Data is encrypted automatically, in real time, prior to writing to storage and decrypted when read from storage.

Oracle MySQL Cloud Service is built on MySQL Enterprise Edition and powered by Oracle Cloud

Oracle MySQL Cloud Service is built on MySQL Enterprise Edition and powered by Oracle Cloud, providing an enterprise-grade MySQL database service. It delivers the best in class management tools, self service provisioning, elastic scalability and multi-layer security.

Google Chrome will require logging of all publicly trusted certificates issued on or after April 30, 2018 in at least two Certificate Transparency (CT) logs

Any certificate issued after that date that is not in the CT logs will produce an error message in the Google Chrome browser.

My Google Adsense ads are not showing in Firefox, but do in other browsers.

Firefox has a Tracking Protection feature that is enabled by default in Private Browsing mode. You can see a shield icon at the left end of the location/address bar when you are in private browsing mode that some content is blocked.



You can disable this feature in "Options/Preferences > Privacy".



Options/Preferences > Privacy: "Use Tracking Protection in Private Windows"

https://support.mozilla.org/kb/tracking-protection-firefox

https://support.mozilla.org/kb/control-center-site-privacy-and-security-firefox

Https is available for blogger custom domain.

Your HTTPS settings have changed. All visitors are now able to view your blog over an encrypted connection by visiting https://it.i88.ca. Existing links and bookmarks to your blog will continue to work.

Add Adsense to Mobile Blogger Templates

Sometimes adsense ad won't show up in the blogger mobile view. You can add the adsense ad the following way:
Ensure you have enabled CUSTOM Blogger mobile template. If not sure, login to your Blogger dashboard, go to “Template“. Under “Mobile“, select “Yes. Show mobile template on mobile devices” and choose “Custom” from the “choose mobile template” dropdown box andsaveyour settings.

Template” > “Edit HTML
Click inside the HTML and use CTRL F to find the code below: <b:includable id=’mobile-post’ var=’post’> Once you find the code, scroll down gently till you see the code below: <div class=’post-body entry-content’
expr:id=’&quot;post-body-&quot; + data:post.id’
itemprop=’articleBody’>

Paste your parsed Adsense code directly below the code above. Save your template.

Learn and build on GCP for free. Get a $300 credit for 12 months.

The Google Cloud Platform Free Tier is your opportunity to learn and use GCP for free. It has two parts: a 12-month, $300 credit free trial and Always Free. The 12-month, $300 free trial allows you to use any GCP product. Always Free allows you to try participating products for free up to their non-expiring usage limits, making it easy for you to test and develop with these products.

Google’s use of Java shortcuts to develop Android went too far and was a violation of Oracle’s copyrights, the U.S. Court of Appeals for the Federal Circuit ruled Tuesday.

Oracle said its APIs are freely available to those who want to build applications for computers and mobile devices, but draws the line at anyone who wants to use them for a competing platform or to embed them in an electronic device.

JavaScript Data Types

In JavaScript there are 5 different data types that can contain values:
stringnumberbooleanobjectfunction
There are 3 types of objects:
ObjectDateArray
And 2 data types that cannot contain values:
nullundefined

Sorting a JavaScript Array in Random Order

var p = [4, 80, 10, 15, 5, 10];

p.sort(function(a, b){return0.5-Math.random()});

Host portion of a URL in JavaScript

window.location.host : you'll get sub.domain.com:8080 or sub.domain.com:80window.location.hostname : you'll get sub.domain.comwindow.location.protocol : you'll get http:window.location.port : you'll get 8080 or 80window.location.pathname : you'll get /virtualPath

How to configure the Nginx reverse proxy on AWS Elastic Beanstalk

AWS Elastic Beanstalksimplify the process of configuring the Nginx reverse proxy that runs on the web tier.

You can place annginx.conf file in the .ebextensions/nginx folder to override the Nginx configuration. You can also place configuration files in the .ebextensions/nginx/conf.d folder in order to have them included in the Nginx configuration provided by the platform.
.ebextensions/nginx/nginx.conf – Overrides the Nginx configuration for the platform..ebextensions/nginx/conf.d – Files are included in the Nginx configuration provided by the platform. For more information, see Configuring the Reverse Proxy.

How to add user to a Group in Linux

Add user to a Groupusermod - modify user accountA user does not belong to a specific group could cause application problem.

To check a user's existing group:
$ id user_name
To add an existing user to a group:
# usermod -aG group-name user-name
For example, to add user ec2-user to docker group:

$ sudo usermod -aG docker ec2-user
You need to logout and login to see the effect.

Be careful not to use

# usermod -g group-name user-name
It will change the user's primary group, instead of just adding to the group.

See also: How to remove user from a group in linux

Java Application Servers JMX MBeans monitoring

Java Application Servers have JMX MBeans available to use for monitoring purposes. These can be accessed with a tool like VisualVM with the "MBeans" plugin installed.
Monitoring of MBeans can be used to keep track of things like database connection pool usage or HTTP thread pools when looking for bottlenecks or other issues like high connection churn (connections being destroyed and recreated too often).
JMX can be used to monitor lots of other things relating to server health, too, like CPU usage, threads, and garbage collection activity.

How to solve: Secure Admin must be enabled to access the DAS remotely in Glassfish / Payara Java EE application server

Enable Glassfish / Payara secure adminasadmin> get secure-admin.enabled
secure-admin.enabled=false
Command get executed successfully. asadmin> enable-secure-admin
You must restart all running servers for the change in secure admin to take effect.
Command enable-secure-admin executed successfully. asadmin> restart-domain

Successfully restarted the domain
Command restart-domain executed successfully. asadmin> get secure-admin.enabled secure-admin.enabled=true Command get executed successfully.
If you encounter: asadmin>  enable-secure-admin
remote failure: At least one admin user has an empty password, which secure admin does not permit. Use the change-admin-password command or the admin console to create non-empty passwords for admin accounts.
Command enable-secure-admin failed.
asadmin> change-admin-password
Enter admin user name [default: admin]>
Enter the admin password> 
Enter the new admin password> 
Enter the new admin password again> 
Command change-admin-password execu…

How to install MySQLdb on Linux

MySQLdb is an interface to the popular MySQL database server for Python. To install MySQLdb, just install mysql-python on Linux

Debug Java Mail on Java EE server

Call session.setDebug(true) in your application after creating the Session. Then look at the server log file.

Show / hide / toggle by jQuery and CSS

down voteaccepted To hide the div $('.i88ca').hide();or $('.i88ca').css('display','none');and to show the div: $('.i88ca').show();or $('.i88ca').css('display','block');or

Red Hat® JBoss® Fuse is a lightweight, flexible integration platform

Red Hat® JBoss® Fuse is a lightweight, flexible integration platform that enables rapid integration across the extended enterprise—on-premise or in the cloud. JBoss Fuse includes modular integration capabilities, a new style enterprise service bus (ESB), to unlock information. Through this agile integration functionality, you're free to connect your systems, apps, and technologies in whatever way works best for you.

How to add security-realm manually to GlassFish Java EE Server

Add realm in /domain/conf/login.conf Add realm definition under sercurity-services under Server-conf or default-conf.Add the appropriate jars needed for realm in lib directory.

Social Media Sites for IT Pros & Developers

Slashdot — This well-known tech site is a great source for tech-related news (particularly Linux and Open Source issues), and a fantastic way to drive traffic to your own website.Spiceworks — Created by an IT pro for other IT pros, this site’s goal is to “provide the tools they need to do their jobs every day” via a free network management app as well as a community of 5 million IT professionals.Solaborate — This social and collaboration platform for technology professionals provides tools and services to help increase productivity.GitHub —  You can participate in “the world’s largest open source community” through OS project collaboration and code review and discussion.Stack Overflow — This free Q&A site is a compendium for programmers.In addition to: LinkedIn,Facebook, or Twitter

JavaScript Numbers are Always 64-bit Floating Point which follows the international IEEE 754 standard

Unlike many other programming languages, JavaScript does not define different types of numbers, like integers, short, long, floating-point etc.

This format stores numbers in 64 bits, where the number (the fraction) is stored in bits 0 to 51, the exponent in bits 52 to 62, and the sign in bit 63:
Value (aka Fraction/Mantissa)ExponentSign52 bits (0 - 51) 11 bits (52 - 62)1 bit (63)

Chrome Debugging for VS Code

Chrome Debugger allows front-end developers to debug their client-side JavaScript code running inside Google Chrome directly from Visual Studio Code.
To get started, open the Extensions view (Ctrl+Shift+X). When the extension list appears, type 'chrome' to filter the list and install the Debugger for Chrome extension. You'll then create a launch-configuration file which we explain in detail in our README right here. You can either setup VS Code to connect to an already running Chrome instance or simply start a new one with remote debugging enabled.

When does a HashMaps get() method go into an infinite loop

A put() operation can cause re-sizing, which can further lead to infinite loop, that's why either you should use a Hashtable or ConcurrentHashMap (the latter is recommended).

PPA provides the latest GIMP development snapshot for Ubuntu 17.10 and 18.04 LTS

sudo add-apt-repository ppa:otto-kesselgulasch/gimp-edge
sudo apt-get update && sudo apt install gimp

Auto backup from Google Drive iOS app to Google Photos will end soon

the "auto backup" feature currently available within the Google Drive iOS app will no longer be supported after April 30, 2018.

To continue backing up your photos and videos on your iOS device, get the Google Photos app and enable "Backup & Sync." Learn more in the Google Photos Help Center: Back up photos & videos

What this means for you:
Previously backed-up photos and videos will remain in Google PhotosIf you want to perform manual backup of your iOS and iCloud data using Google Drive, go to "Settings > Backup" within the Google Drive app

Gradle was designed for multi-project builds, which can grow to be quite large.

Gradle supports incremental builds by intelligently determining which parts of the build tree are up to date; any task dependent on those parts does not need to be re-executed.

What are Domain Specific Languages?

Domain Specific Languages are languages created to support a particular set of tasks, as they are performed in a specific domain.

Google CLOUD SPANNER PRICING

Pricing for Cloud Spanner is simple and predictable. You are only charged for the number of nodes in your instance, the amount of storage that your tables and secondary indexes use (not pre-provisioned), and the amount of network bandwidth used. Note that there is no additional charge for replication.

No-Compromise Relational Database Service

Google Cloud Spanner is the only enterprise-grade, globally-distributed, and strongly consistent database service built for the cloud specifically to combine the benefits of relational database structure with non-relational horizontal scale. This combination delivers high-performance transactions and strong consistency across rows, regions, and continents with an industry-leading 99.999% availability SLA, no planned downtime, and enterprise-grade security. Cloud Spanner revolutionizes database administration and management and makes application development more efficient.

The US government is officially investigating Facebook

The Federal Trade Commission confirms.

Google is finally rolling out mobile index as its main form of website indexing

Google says the majority of its users are on mobile so this update will make sure their searches are more accurate.

External JavaScript Advantages

Placing scripts in external files has some advantages:It separates HTML and codeIt makes HTML and JavaScript easier to read and maintainCached JavaScript files can speed up page loads

Simple example Dockerfile

Attaching a Shell to a Container

We can attach a shell to containers and browse them just like they were a full operating systemThe-iand-tflags can be passed to theexeccommand to keep an interactive shell open, and you can specify the shell you want to attach after the container ID. Here we'll attach a standard Bash shell.docker container exec -it my_container_i88 /bin/bash

Set XHR breakpoints in Chrome Developer Tools

Use an XHR breakpoint when you want to break when the request URL of an XHR contains a specified string. DevTools pauses on the line of code where the XHR calls send().To set an XHR breakpoint: Click the Sources tab.Expand the XHR Breakpoints pane.Click Add breakpoint.Enter the string which you want to break on. DevTools pauses when this string is present anywhere in an XHR's request URL.Press Enter to confirm.

JavaScript /* */ (multiline comment)

Multiline comments are used for large text descriptions of code or to comment out chunks of code while debugging applications. Comments are ignored by the compiler.Description, Explanatory notes embedded within the code.
Comments are used to remind yourself and to inform others about the function of your program.

JavaScript console.trace will log to the console the call stack that exists at the point console.trace was called.

The console object also supports outputting a stack trace; this will show you the call path taken to reach the point at which you call console.trace().



Find out how long something has taken to execute JavaScript

Web Workers makes it possible to run a script operation in background thread separate from the main execution thread of a web application.

The advantage of this is that laborious processing can be performed in a separate thread, allowing the main (usually the UI) thread to run without being blocked/slowed down.

Console.table() displays tabular data as a table.

This function takes one mandatory argument data, which must be an array or an object, and one additional optional parameter columns.

It logs data as a table. Each element in the array (or enumerable property if data is an object) will be a row in the table.

The first column in the table will be labeled (index).

// an array of strings

console.table(["it", "i88", "ca"]);

China called on World Trade Organization members on Monday to unite to prevent the United States "wrecking" the WTO

China urged them to oppose U.S. President Donald Trump's tariffs targeting China's alleged theft of intellectual property.

The debugger keyword has the same function as setting a breakpoint in the debugger.

The debugger keyword stops the execution of JavaScript, and calls (if available) the debugging function.With the debugger turned on, this code will stop executing before it executes the third line. If no debugging is available, the debugger statement has no effect.

Example:
var x = 15 * 5;
debugger;
console.log(x);

All modern browsers have a built-in JavaScript debugger.

Built-in debuggers can be turned on and off, forcing errors to be reported to the user.You activate debugging in your browser with the F12 key, and select "Console" in the debugger menu.
With a debugger, you can also set breakpoints, and examine variables while the code is executing.



HTTP Access Logging to Glassfish Server

For example, to add request referer:

<access-logformat="%client.name% %auth-user-name% %datetime% %request% %status% %response.length% %header.referer%"></access-log>