Story Of My "Code"
  • About Us

Create, Alter and Drop Table Cassandra

By srigalamilitan On December 30, 2017 · Leave a Comment

Create, Alter and Drop Table Cassandra

Table in Cassandra is a collection of ordered (by name) columns fetched by row. A row consists of columns and have a primary key. The first part of the key is a column name. Subsequent parts of a compound key are other column names that define the […]

Continue Reading →

Keyspace Cassandra

By srigalamilitan On December 29, 2017 · Leave a Comment


A keyspace is a container that holds the column families, user defined types. In Cassandra, Keyspace is similar to schema RDBMS Database. Keyspace holds column families, indexes, user defined types, data center awareness, strategy used in keyspace, replication factor, etc.

Syntax CREATE KEYSPACE | SCHEMA IF NOT EXISTS keyspace_name WITH REPLICATION = […]

Continue Reading →

How To Manage Users NoSql Cassandra using `cqlsh`

By srigalamilitan On December 28, 2017 · Leave a Comment


In this tutorial we learn how to manage user in database cassandra. Setting the cassandra database using username and password authentication. Learn how to login using default username and password cassandra, create user with or without password, create user superuser and nosuperuser, modifying user and dropping user.

Create user

Syntax for create […]

Continue Reading →

Spring Boot Using Hikari Connection Pool

By srigalamilitan On November 8, 2017 · Leave a Comment

# Spring Boot Using Hikari Connection Pool Connection Pool

In software engineering, a connection pool is a cache of database connections maintained so that the connections can be reused when future requests to the database are required. Connection pools are used to enhance the performance of executing commands on a database. Opening and maintaining […]

Continue Reading →

Dynamic Call Store Procedure and Function Database

By srigalamilitan On October 30, 2017 · Leave a Comment

spring-boot-call-store-procedure

Dynamic calling store procedure and store function in database

Dynamic calling store procedure and function
1. Via Callable Statement
2. Via SimpleJdbcCall spring-boot-starter-jdbc

See Code Snippets

Store Procedure DELIMITER $$ USE `training_sp`$$ DROP PROCEDURE IF EXISTS `create_product`$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `create_product`(id VARCHAR(255), p_code VARCHAR(255),p_name VARCHAR(255),weight BIGINT) BEGIN INSERT INTO product(id, CODE,NAME,weight) VALUES(id,p_code,p_name,weight); […]

Continue Reading →

Rest Documentation with Swagger And Spring boot

By srigalamilitan On October 28, 2017 · Leave a Comment

Simple Spring-boot Swagger Documentation
Learning Swagger documentation for rest.

To Add Swagger to your application
add the depedencies

 

<dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger2</artifactId> <version>2.7.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.7.0</version> <scope>compile</scope> </dependency>

 

create SwaggerConfiguration class

@EnableSwagger2 @Configuration public class SwaggerConfig { @Bean public Docket productAPI(){ return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage(“com.putracode”)) .paths(PathSelectors.regex(“/api.*”)) .build() .apiInfo(metaInfo()); […]

Continue Reading →

Implementation Dynamic Specification Using RSQL-Parser Example

By srigalamilitan On May 26, 2016 · 1 Comment

Introducing

Changes Is Enemy, But We Must Prepared . –

I have been code with spring boot and thymeleaf, When the *User Interface * add a new search criteria the backend code (my repository, service and controller) must changed too. Honestly I don’t like that. to much changing :(.
I try searching […]

Continue Reading →

Simple Implementations Tesseract OCR on Android

By srigalamilitan On May 3, 2016 · 3 Comments

Tesseract is an optical character recognition engine for various operating systems. It is free software, released under the Apache License, Version 2.0, and development has been sponsored by Google since 2006. Tesseract is considered one of the most accurate open source OCR engines currently available Wikipedia

Image processing is widely used in helping to […]

Continue Reading →

Small Case But Solve BolierPlate Of My Code StringUtils Apache Common Lang.

By srigalamilitan On February 15, 2016 · Leave a Comment

StringUtils is Operations on String that are null safe. Snipset code below was a my code history.

//when i was in collage String result=”putracode”: if(data ==null && data.length>0 ){ result=data; } //First Time in Job String result= (data ==null && data.length>0 ? data ; “putracode”); //And Now String result=StringUtils.defaultIfBlank(data,”putracode”);

Look More Simple.. 😀
StringUtils […]

Continue Reading →

FastDateFormat is Fast by Apache Commons Lang Example

By srigalamilitan On February 14, 2016 · Leave a Comment

FastDateFormat is a fast and thread-safe version of SimpleDateFormat.To obtain an instance of FastDateFormat, use one of the static factory methods: getInstance(String, TimeZone, Locale), getDateInstance(int, TimeZone, Locale),getTimeInstance(int, TimeZone, Locale), or getDateTimeInstance(int, int, TimeZone, Locale)

Since FastDateFormat is thread safe, you can use a static member […]

Continue Reading →
← Previous Entries Next Entries →
"Unknown Twitter error." — @SrigalaMilitan

Story Of My "Code"

Pages

  • Home
  • Java8
  • SpringBoot
  • Librarys
  • Redis

The Latest

  • My Notes Learning Redis Hash
    Today we learn about redis Hash, What is it, Command of hash, […]

More

Thanks for dropping by! Feel free to join the discussion by leaving comments, and stay updated by subscribing to the RSS feed.
© 2024 putracode.com
Platform by PageLines