Showing posts from 2019

Registration Form Example Using JavaFX

This is a simplest form for JavaFX registration layout, you can modify it whatever based on your need.

import javafx.application.Application; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.PasswordField; import javafx.scene.control.TextField; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class App extends Application { private StackPane root = new StackPane(); private Stage stage; @Override public void init() { Button button = new Button("OPEN"); VBox vBox = new VBox(); vBox.setSpacing(8); vBox.setPadding(new Insets(10,10,10,10)); vBox.getChildren().addAll( new Label("Your Name"), new TextField(), new Label("Your Username"), new TextField(), new Label(&…

JavaFX Login Example Codes

This is example of a login form created using JavaFX

import javafx.application.Application; import javafx.geometry.Insets; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.control.PasswordField; import javafx.scene.control.TextField; import javafx.scene.layout.StackPane; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class App extends Application { private StackPane root = new StackPane(); private Stage stage; @Override public void init() { Button button = new Button("OPEN"); VBox vBox = new VBox(); vBox.setSpacing(8); vBox.setPadding(new Insets(10,10,10,10)); vBox.getChildren().addAll( new Label("Your Username"), new TextField(), new Label("Your Password"), new PasswordField(), new Button("LOGIN")); root.getChi…

Windows 10 Connect

Window 10 Connect is a windows program to help you work with other device, usually smartphone, so you can do like for example transferring file, etc.

To open Windows connect, you can do it by pressing window key, then type "Connect" to find the program, the other way is to click on Open center located on bottom right of your screen, after it's opened, at the bottom tiles, you click the connect tile.

Now your computer is ready for you to connect wirelessly.

JavaFX Load Local HTML File Using WebView

JavaFX is platform to create GUI for desktop application in Java, it has more modern and performance than any other framework for desktop application development. It also support template using FXML and styling using CSS.

You can load an HTML file into JavaFX application using WebView, either it's available online, internet connection required or a local HTML resource, support CSS and Javascript. To load an HTML we can use WebView for example:
1. First create an html and put it on /src/main/resources/helloWorld.html
<html lang="en"> <head><title>Hello World</title></head> <body><h1>Hello world!</h1></body> </html>
2. Now for just demo, create a class name that contains main method.
import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.web.WebEngine; import javafx.scene.web.WebView; import javafx.stage.Stage; public class HelloWorldApplication extends App…

Windows 10 Camera

Windows 10 has a default camera application where you can take a picture or video, but camera in computer or laptop sometimes is just useless, i mean who want to take a picture sitting in a desk? But in any way it's a good addition to the OS,

The new camera program in Windows 10 has lots of settings or configuration, here's a short description of the configuration:

- Pro mode, shows advanced controls for photo and video
- Framing grade has 4 options, they are rules of third, golden ratio, cross hair and square
- Photo quality, you can specify which quality the camera will render, but it depends on your camera hardware, mine is really sucks, the maximum is 640x480
- Flicker reduction, basically to set frame-rates, the bigger the better

You can also change the location where the camera will save your photo, you can enable or disable
whether the photo will contains your coordinate location based on GPS, change some privacy settings, etc.

Windows 10 Calendar Where You Can Manage Your Events

As I've already said in the previous post, Windows 10 has so many upgrade, from performance to adding more program, or just upgrade their previous program to be more modern, easy to use and more rich feature. One of the new cool addition to Windows 10 is Windows Calendar, with this program you can't just view full year calendar, you can also add an event you wanna do today or the day before. You can also add an upcoming event, it's kind of reminder so you won't forget or miss an important future event you have.

To add an event just double click on the date of your even, then fill up the event name. You can also set event location and set the time when the reminder will on, either the time of the event, 15 minutes before the event, or whenever you want the even to be on.

You can also sync your calendar event to your Microsoft account, so you will receive the reminder to your associated email.

Calendar is really useful program shipped in Windows 10 by default, you can m…

Windows Alarm & Clock

Windows 10 is really amazing computer Operating System (OS). It has lots of major upgrade from the previous previous which is Windows 7 and 8. From the new cool user interfaces, adding lot of new features and performance enhancement. Windows 100 added new program Alarm & Clock, it is new program really useful for you working with alarms and clock.

As you can see on the picture on alarms and clock program, you can add some cities and know what their time is currently at, and you can also see that the map has dark and light, dark indicate that the place is currently in day night and and light means day light. If you have friends or someone overseas, this map can be helpful for you.

You can also set an alarm to get you up in the morning or whatever time you want to set, the alarm doesn't care if your computer is sleep, as long as it's has enough power or not in low battery condition, it will on automatically in time.

Timer and stopwatch maybe not that big deal, but still som…

3D Viewer in Windows 10 For 3D Printing

Windows 10 has so many great things shipped by default, the one i am gonna talk about is the 3D Viewer. It is a program you can use for inspect 3D model's mesh, texture, material,animation data, and view 3D files in different shading model.

You can also use this program to work with camera, so you can mix real pictures taken by your camera and the 3D file you can load. It support both for taking pictures only or with video recording. The result will be mixed of your real images and the 3D model. You can even change the 3D model theme for example color, size, and texture, and move you can move the 3D model position.

Before you start taking a picture or record a video you want your 3D model to be perfectly looks and positioned, you can do that, there are lots of option you can do with this 3D Viewer program.

It also support for 3D printing, although I've never done that because i don't have 3D printing, you can do that by click menu File and Print 3D.

Netflix The Best Digital TV

Netflix is probably the most popular and used TV media service, i am not using Netflix because i don't watch TV to often, but people around me are using Netflix, so it's popular and loved by many people. You can watch thousands of TV program on Netflix, probably every shows that ever exists and or currently airing are available you can watch on Netflix.

Over all Netflix is one of the best on media industry, providing the best service where we can watch show whatever we want. It has lot of programs let's say Movies, TV Shows plus their original programs, Netflix original production, and many many more type of entertainment can be found on Netflix.

You can watch Netflix either through computer web browser, mobile app and smart TV. That's probably what makes Netflix popular and used by many people, there are many option you can use Netflix.

They are just a TV, so nothing special, but because they kind of have everything it makes them big, but in fact, you can watch any e…

Service In Spring Boot For Beginners

Service in spring boot is component where you usually place your business logic of your application. So service will be the class where mostly you will write Java code. Business logic can be anything for example, when user update profile, buying items, checkout, etc.

So here's an example of simple service in spring for user registration, login, update, and remove.

public class UserService{

private UserRepository userRepository;

public User registration(User newUser){

public User login(UserDto user){
return userRepository.findByUsername(user.getUsername());

public User update(Long id, User newUser){
User user = userRepository.findById(id).orElse(new User);
return user;

public void remove(Long id){

To make a class as a service, you add a @Service annotation, and on the above code we are auto wiring Use…

Repository in Spring Framework For Beginners

Repository in spring is classes use to interact with database, that is simplify as CRUD (create, read, update and delete). To make a class repository, you add a @Repository annotation to the interfaces, but you also need to extends one of spring repository class that is CrudRepository, JpaRepository or PagingAndSortingRepository. And you need to mention your DAO, for example.

public interface UserRepository extends JpaRepository<UserDao, Long> {

class UserDao{
private Long id;
private String name;

Actually that's enough, now you can use your repository anywhere you want, just inject that component, for example to find a user you can use it.

public Class UserController{
private UserRepository userRepository;

public List<UserDao> allUser(){
return userRepository.findAll();

The above class is an example on how to get all user expose by endpoint "user/findAll".

Model In Spring Framework For Beginners

Model in programming language is a representative of an object, so if you have a car object, you can define a car model, for example, car brand, car speed, car price, etc. In pseudo code you can create a car model, something like.

Class Car{
String brand;
Integer speed;
Float price;

That's called a model. Now in spring framework, you can add some annotation to your model, so that it can be integratted to you database, those model usually will be call as an entity, so the first thing is to set annotation to car class an @Entity annotation.

Class car{
String brand;
Integer speed;
Float price;

But, that class should have at least an id it is recommended to have an id to whatever model you want create, so you must have an id field.

@Entitypublic class Car{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id;private String brand;private Integer speed;private Float price;}
Now, your entity is ready, but it useless since it doesn't have any public fiel…

Controllers In Spring Framework For Java Beginners

It is really hard to build web application if you are just a beginner, but if you spare your time seriously learning web development, you're eventually gonna make it. Spring is a Java framework for web development, by using framework, you don't to focus on some core stuff like http stuff, security, database connection, all you gonna need to do is just some little configuration and more focus on writing business logic for your application.

If you've already finish the first part and successfully running your application on the browser, the next step is you just need to learn more, to read more stuff about spring framework. This part will be just about controller. Controller is to where you decide an endpoint, usually on web application, user will request a page or a service, we called it end point.

1. Simple hello world controller

public class HelloController{

public String hello(){
return "Hello World!";


Web Development Using Spring Boot For Beginners

In this series of posts, we are gonna cover tutorial on how to get start web development in Java using spring boot. For your information, I've been working on web developments for quite a while but not using Spring, and not using Java either, so it's kinda like i am also newbie as you are, but don't worry all codes on this website will be tested so that it will work when you copy/pasting. And because it's for beginners, all codes on this series would be full single class file, no cut.

Follow these steps to get started web development in Spring.

1. Prepare your favorite IDE
It is Java not Javascript, you are gonna write enterprise level codes, in other to have readable, maintainable codes, you need to have better tools, IDE helps you refactoring your code, code completion, and building your code with a press of a button, usually hammer icon.

2. Initialize spring boot project
Simply using, you can create your project template, all you need to do is specify…

How To Deploy Spring Boot Web Application To Production

Building web application is somewhat hard, but with good tools support, good programming language, and good framework, this daunting hard time consuming tasks can be minimized and can be somewhat fun.

Building web application using Spring Boot has many benefits, of course your gonna doing it faster, easier, large community support, and the beautiful maintainable codes. And the results of your web application performance, because it is Java technology, it can be fast, salable, and capable of handling thousands of thousands transactions.

This time i am not going to share java codes, it's just an easy simple tasks how you gonna deploy your application to production server. Of course there's lot of ways to do it, but for this time, i am only showing you 2 of the most easiest way to deploy your application.

1. Embedded Tomcat

This is the easiest way, basically you just installed Tomcat to your server, this is article to doing that How to install tomcat on Ubuntu. After that, login t…

What is GraphQL anyway?

GraphQL becomes really popular in these days, what's GraphQL anyway, is it something similiar with SQL, is it just replacement of SQL?

For current usage, Graphql is not gonna replace SQL, because most of todays application  using GraphQl in fact still need a database to get data, and database system like MySQL, not changing, and it is pretty dangerous if you expose GraphQl to directly connecting to your database, it is mainly becuase GraphQL can be queriend front frontend application.

GraphQl is just a spesification, people can doing whatever they want with a spesification but mostly in current most uses, is how you can query a data from front end application that has spesific limitation by the server side of your application.

It can be use to get your data, it can be use to delete a data, it can be use to updating your data, pretty much everything we need for an application.

GraphQL is a query language for APIs and a run time for fulfilling those queries with your existing data. …

How To Create Service On Windows

Windows is really amazing OS, you have cool GUI, full, optimize performance especially for personal PC, it has lot of capabilities that any other OS can't compete with windows. And if you are programmer, windows also support you by providing easiness of program development, like for example when we have a program need to have a service whenever every user log on to their computer. You can create a (.bat) file to be executed when user doing installation.

To create service for experiment purpose, you can run cmd using administration privileges

sc create MyServiceName binpath= "\"C:Program Files (x86)\My Service\yourProgram.exe\" --someparameter=0" displayname= "My Service"

The trick is, always create space after equals sign, and always create double-quotes in your program location. You can add more option, like for the example above we define displayname which will appear as our service name, You can also read more detail about SC command here from offic…

What is DNA Sequencing?

It's basically just determining DNA sequences of one biological creatures. The easiest way to do DNA sequencing is on simple viruses like Sir Frederick Sanger did back in 1977, it easier to do because even a simple organism like virus can contains hundred of thousands of DNA sequences, compare to complex species like human that has billions of sequences, it is still hard to do DNA sequencing  on none other than viruses.

What's the benefit of DNA sequencing so that it's really important thing to do is because, it is like you can do anything with that sequences of DNA, as you already know, DNA is like our biological body's blue print, if we we do know our own blue print, we can either replicate our self, improve human health, curing diseases in our body like cancer, etc. there is many benefit of knowing the fundamental block of our body.

The problem is still remain that's it is really complex things to do, it billion dollar project to map our Genomes because it'…

Google Adsense and Google Adwords

Google AdSense and Google AdWords or now is known as Google Ads is subsidiary of Google in which their main activities is on advertisement bases, so they are responsible for managing ads that appear on Google Platform such as YouTube, Gmail, etc.

When you talk about Google, the main idea to rise in your mind is Google search, where you can search for anything you want to get some result you really need, but Google can't run by just their search engine, with it advertisement, they can survive as company, because their main revenue is mainly from advertisement.

There is also Google AdWords, it also advertisement based, but it has different goals, where google AdSense is for publisher to place google ads, google AdWords is where advertiser from many companies to make an advertisement that will be place on google publisher, some sort of, google AdWords is collecting ads and google AdSense is making output for all of those ads.

Composer PHP Package Manager

Composer is package manager used by many PHP developer. It is not a de facto package manager like NPM for node or pip for python, it's just the popular one, among maybe another PHP package manager.

To use composer, there's two options, the first is a binary file without PHP dependencies, so it can run without PHP, and the other one is composer that written in PHP, we usually seeing it as "composer.phar"

Composer is of course fast an reliable, it has huge collection of packages, from the popular framework like Symfony or Laravel to small mini project like if you want to generate JWT token you can use rbdwllr/reallysimplejwt.

Of course composer syntax is different than any other package manager, npm an pip has install, composer has require instead of install, it's not a easy for developer from different language to use composer because of that differences.

Last Day On Earth Survival Games

Last day on earth survival or people just like calling it LDOE, is mobile game for Android and IOS about surviving on the last day on earth. You basically just running around to different location to collect resources for survive on the world that has been infected by some sort of virus that turn human into zombies.

In the last day on earth, you are not alone, there's another survivors also try to avoid to death by the lack of declining earth, all resources are important from food to water, you must keep it safe so that you can use it, or exchange it with dealers, but to meat dealers, you need to repair your broken radio on your base.

There as some known place you can visit, like bushes, mountains, another survivor bases, a farm, gas station and. and later when you're getting more advanced you can uncover more locations to getting more loot in other for you to survive by collecting stuff like woods, stones, that you can craft it into  more useful stuff like  have some more st…

How To Start Java Web Development

Developing Web app on Java can be daunting, it requires deeper understanding on programming world, but don't worry, this post will give you a summary about set up web development using Java, for detailed step, you can just googling or asking on active forum.

1. Install tomcat
2. Set tomcat user password /tomcat/conf/tomcat-user.xml
3. Install Java EE plugins on Netbeans 4. Add tomcat server on Netbeans
5. Generate your spring boot project here
notes: - on the dependencies field, add at least web, mysql, jpa and devtools
- on packaging, choose war 6. Extract the zip file into your projects directory 7. Using Netbeans, open the project 8. Set up located in src\main\resources
spring.datasource.url = jdbc:mysql://localhost:3306/youDatabase?useSSL=false spring.datasource.username = root spring.datasource.password = 1234 spring.jpa.hibernate.ddl-auto=create

9. Build the project
8. To deploy your web application to your sever, just upload your …

Enable Remote SMTP For Local Development

When you are working on web development using PHP or other language, you may need to provide mailing feature, and you may already have a server with Postfix or similar mail program running, and then you want to enable that server to be able to send email with your local computer, because the default emailing port (25) isn't open for public.

Without further ado, let's start to make your server to send email from your local computer, We assume that you already have Post-fix or similar software, if you don't just do quick installation, it won't took long.

1. Add new port for SMTP (simple mail transfer protocol) services, the default port is 25, we are gonna add one more port which we will use port 2525. It's up to you whatever port you choose as long as it is not already been used by another services.

2. To add more SMTP port, you can use simple editor like vim or nano and with sudo privileges, now using vim:

sudo vim  /etc/postfix/

3. Then add new line, afte…

Inkscape Open Source SVG Editor

If you are a graphic designer, you must already been doing some vector manipulation, which usually wrapped into SVG format or other similar format, basically it's just an image format that can be easily manipulated its shapes using tool or even hand-coding the file because the SVG file is not encoded, you can open it using any text editor, but it's require a  knowledge of SVG specification which you can go into detail by this link SVG Tutorial.

Inkscape is free open source tool, meaning you can using it without paying sum amount of money to get the program, you can install Inkscape by downloading the installer here Inkscape download link. Choose based on your operating system.
Inks-cape is free tool with has many almost complete tools you can work on your project. You can do vector image editing, importing image, exporting image into variety of image file type like PNG or JPEG. And many other tools that can help getting your work done. And there's a lot of tutorial about …

How To Synchronize Database Using Navicat

Navicat is a database management tool provided by Premium Soft. I like Navicat so much, it is cool, easy to use and really fast in performance, i mean if i compare with like for example Workbench, it is outperformed it. And Navicat has lot of cool features, one that i really like much is the tool which we can synchronize the database from our local development computer to our server production, when you don't need to manually like for example changing or adding your database structure.

There are 2 different synchronizing tools, the one is for synchronizing the structure, second is for synchronizing the data.

1. To synchronize your database, the first thing you need to do is connect both your localhost and your server.
2. Go to Tools menu and select either Data synchronization or Structure synchronization
3. On Source section choose your most updated database, and on target choose the database that you want to update

4. Click next, then compare, wait until it finish the process, th…

How To HTML Parsing With PHP Xpath Query

I am doing a lot of PHP programming, it is easier than any other language, you don't need any setup to get started with PHP, in Windows there's program called XAMPP, and just about all you need to start a PHP programming. Because the simplicity, I've created many projects using PHP, and it's fun for creating small projects. Enough for the intro, here's some handy tips when you want to do some HTML parsing.

1. To get start, using file_get_contents function to get the HTML content of the page you want to parse, save it in a variable call $contents, whatever you name it.

$contents = file_get_contents("");

2. Declare the DOMDocument class, name the variable $dochtml, again whatever you want.

$dochtml = new DOMDocument();

3. Call the loadHTML, pass the contents from file_get_contents to its parameter.


4. Declare DOMXpath, pass a dom object to it's constructor.

$xpath = new DOMXpath($dochtml);

5. Le…

MySQL Allow Remote Connection

MySQL is undoubtedly one of the best database server exists, it is widely used by many of companies or even for just personal project around the world, because it is free and yet capable of doing something bigger.

For this tutorial we will discuss about how you can allow your MySQL server to be managed by local computer. The reason sometimes, especially for me for doing this approach is, when we want to use an advanced database management tools on our local computer, let's say we have Navicat or Workbench.

Without further ado, these are steps how you can do that. My server is Ubuntu and my local computer is Windows, but it think there's no much different.

1. Change bind address on MySQL configuration from localhost to your server IP. Login ssh to your server, and you can use vim for editing "mysqld.cnf" file.

sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf

# Replace xxx with your IP Address 
bind-address        =

Restart MySQL.
sudo /etc/init.d/mysql start

How To Start Git Web Interface

Git has been a very helpful software development tool, it is so amazing when we are developer given such a free tools that have so much power. But we are not gonna be discussing about git at this moment, this tutorial is a simple and easy steps on how to create a web interface for your git server.

We already have a post about how you set up a git server, follow this link for detail How to setup git server. Now login to your server, then init a new git server.

git init --bare my-project.git

Install ruby on your machine, well if you are using Ubuntu, it is so easy, you can just run this following command and ruby will be installed instantly.

sudo apt install ruby

Then we just this following command to make our web interface running.

sudo git instaweb --httpd=webrick

Now you already have a web interface for your git server, it's nothing like Github, but it's still has so many feauture to make our development experiences a bit easier.

If you somehow want to stop the git web interfac…

How To Zip And Unzip On Ubuntu Terminal

Well if you are using Desktop, it is easier to do zipping and unzipping an archived files, but if you are doing on server that running Ubuntu, or any other Linux distribution, here's a simple and quick way for you to do basic simple file management on your server.

1. Firstly, you must have an installed zip program ready for your terminal, just type zip to check if it's exists, or you can just run this command, it will check if a zip already on your machine or not, if it is not then it will installing it for you.

sudo apt install zip unzip

2. Zip files and folder  on Ubuntu, you can run this commands

sudo zip -r directory_of_your_files

3. To unzip a zip file, you can using this commands

sudo unzip -d directory_destination

That's so easy right, you can do that over and over to make you familiar with those commands, if you somehow forget, you can just bookmark this blog page and comeback whenever you forget.

Can I Delete Package-lock or Yarn-lock File?

The short answer is No, you must not delete the package-lock or yarn-lock file, it is crucial for your project to work and compiled successfully without trouble. Here's the quick explanation, why you should not delete it.

Basically when you and some library with node package manager (npm) or yarn, you save it to your "package.json" and when you install your project, the package manager will try to grab some required other library by the library that you use and save it in a lock file when the building process is finished.

If you delete the lock file, the package manager you use will try to search it again, searching a newest dependencies that exist, because they can find the lock file. The lock file is basically just a massive dependencies list with the version that was work on last successful compiled.

It's still noticeable when your project is not that big, but when you have some bigger project that required a lot of dependencies, it can be really massive mess. So…

How To Start React Using Typescript

This is how you can start React programming, it is cool framework for build front end web application, and not just for the web, React also can be use as Mobile User interface programming, but we will not cover that in this short tutorial. We are gonna start React programming for web using typescript.

Why typescript? it's because typescript supports static type programming, it is recommended to use typed language because your code will be more concise, structured and maintainable, and if you used advanced IDE, you will be given an error event before run time.

This is how you can start using React with typescript.

1. Make sure you have Yarn, if you don't, you can download it on this official website:
2. If you are using Windows, you don't need any setup after yarn installation, yarn will do it for your. But, if you using Linux or Mac Os, you should add Yarn global package to your path using this command export PATH="$PATH:`yarn globa…

Smartphone Frame Free Download - PNG Transparent Format

People often searching for Smartphone or iPhone  frame for many purpose, especially those who want to use it as a frame of their app. There's plenty of that out there, but here's the i give you a free one. And it's transparent, so you just gonna need to create another layer for your app Screenshot on top of this frame.

Use your favorite image editor, like Photoshop, etc. But if you don't have one, you can download image manipulating program for free, yes there's such a free kind of program, it's call Gimp, go to this page for more information.

Thank you for coming to this blog, i hope you like the image we give to you, don't forget to share this page to other friends, if you want to.

Spring Boot Hello World How To

Spring Boot is framework to make web development in Java much more simpler and easier. With Spring boot developing web application can be faster and without having to do lot of configurations. Many modern Java web application are now using Spring Boot.

This post is gonna show you how to create a Hello World in Spring Boot. Just follow the steps bellow.

1. To create a spring boot starter go to, which you will get the zip version of your project, it will be codes templates.

The dependencies we need is only Web, because it's just a simple hello world program, not require database connection or anything.

2. After you got the zip file, extract that file to your project folder, the structure of our hello world project will be like this.

3. Now create new Class for our controller under com.example.demo, we named it

4. Run the project. Open the browser and got to http://localhost:8000

Now you can start to build your project using Spring Boo…