Java Runtime Enviroment also known as JRE is part of Java Development Kit JDK a software development environment for writing Java applications. JRE consist Java Virtual Machine, core classes, and supporting files.
Installing JRE on ubuntu is a little bit different with installation JDK. First, Download the JRE file in here. Remember to download JRE version based on your system version either it's 32bit or 64bit.
After finished downloading your JRE version, we can begin the installation process.
Create new folder in opt directory. In terminal type this command "sudo mkdir -p -v /opt/java/64".
Go to folder containing your JRE download file(example: use"cd Downloads" to move to Download directory from your home directory) and unpack the file by typing "tar xvzf YOUR JRE FILE".
Moved unpacked contents into system folder that you created in step1. Type "sudo mv -v YOUR JRE FILE /opt/java/64".
Inform the system and make the new JRE become your system default. - sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/64/YOUR EXTRACTED JRE FILE/bin/java" 1 - sudo update-alternatives --set java /opt/java/64/YOUR EXTRACTED JRE FILE/bin/java
Install Firefox plugins. Type "mkdir -v ~/.mozilla/plugins".
Removed IcedTea plugin, if it has been installed. type "sudo apt-get remove icedtea-6-plugin && sudo apt-get remove icedtea-7-plugin".
Remove an older version of the Java plugin. Type "rm -v ~/.mozilla/plugins/libnpjp2.so".
Install the plugin by creating symbolic link. Type "ln -s /opt/java/64/jre1.7.0_60/lib/amd64/libnpjp2.so ~/.mozilla/plugins/".
Close and restart Firefox
Type "about:plugins" in Firefox URL bar. If your installation is correct you will see something like this:
Veritrans is Indonesian Payment Gateway. Veritrans accepts Credit Card, Direct Debit, e-Wallet,Bank Transfer and Convenience Store. That's why this Payment Gateway is famous in Indonesia. Further explanations about Veritrans https://veritrans.co.id/ .
VT-Link facilitates a payment feature for your online store by redirecting the customer to Veritrans payment page through a link.
VT-Web
VT-Web facilitatess merchant to use Veritrans payment system, by redirecting the customer to the Veritrans payment page.
VT-Direct
VT-Direct is Veritrans product that allows you to use our payment system directly on your website
Integration Tool Kit
Rails 4
gem veritrans
Configurations
Add gem Veritrans to Gem File and bundle install
gem 'veritrans';
In Console generate veritrans.yml
rails g veritrans:install
Generate Veritrans Form
rails g veritrans:payment_form
This command will generate controller and view for Veritrans.
Because we will built dynamic key for this integrations. You can keep veritrans.yml configurations like this:
development:
# Register in sandbox veritrans and get your keys here:
# https://my.sandbox.veritrans.co.id/settings/config_info
client_key: ""
server_key: ""
api_host: ""
production:
# Register and get your keys here:
# https://my.veritrans.co.id/settings/config_info
client_key: ""
server_key: ""
api_host: ""
staging:
# Register and get your keys here:
# https://my.veritrans.co.id/settings/config_info
client_key: ""
server_key: ""
api_host: ""
Scripting
VT-Web Integrations
In VT-Web Integrations, you just need to obtain redirect URL to Veritrans . After last check out process, put this function for directing page to veritrans:
Rubycritic is gem that wraps around static analysis gems such as Reek, Flay and Flog to provide a quality report of your Ruby code.
Because this gem was uses as Audit guidelines code quality in my company, I often faced hard time to adjust, optimizing and refactor my code.
I began to summarize Rubycritic detecting behavior and implement it in my code to avoid Smells and easier get at least Grade C to bare pass.
A few my conclusion things to consider when developing code according Rubycritic :
Don't! Never! Avoid! Duplicity Code. Rubycritic love this think and will give you sudden great high score, enough to drop your Code Rating Grade.
Evade complicated nested logic with multiple if, switch, etc. It's saver to use functions to handle logic rather than nested logic. Fox example
// Rather than this
if obj == "a"
if obj1 == "1" && obj2 == "2"
// Process
elsif obj1 == "3" && obj2 == "4"
// Process
else
// Process
end
elsif obj1 == "b"
if obj1 == "1" && obj2 == "2"
// Process
elsif obj1 == "3" && obj2 == "4"
// Process
else
// Process
end
else
// Process
end
// Use this
if obj == "a"
process(obj1,obj2)
elsif obj1 == "b"
process(obj1,obj2)
else
// Process
end
Evade complicated nested loops with multiple each, for, etc. It's saver to use functions to handle loops rather than nested loops. Fox example
// Rather than this
data_sources.each do |data_source|
data_source.each do |data|
end
end
// Use This
data_sources.each do |data_source|
process(data_source)
end
If your function using nested hash, redeclare multiple used nested hash using variable.
// rather than
if params[:id] == '1'
user = User.where('id = ?',params[:id])
end
// Used This
id = params[:id]
if id == '1'
user = User.where('id = ?',id)
end
To build Test Plan in Jmeter Apache. We need several step to configuring the process.
Right click in Test Plan > Add > Thread Group
Customize the Thread Group with your desire configurations like number of threads(User),The Ramp-Up Period, and loop count. - Number of threads : Number of Users -The Ramp-Up Period : This property tells JMeter how long to delay between starting each user. For example, if you enter a Ramp-Up Period of 5 seconds, JMeter will finish starting all of your users by the end of the 5 seconds. So, if we have 5 users and a 5 second Ramp-Up Period, then the delay between starting users would be 1 second (5 users / 5 seconds = 1 user per second). If you set the value to 0, then JMeter will immediately start all of your users. - Loop Count : This property tells JMeter how many times to repeat your test
Right click in Thread Group created before and go to > Add > Config Element > HTTP Request
Name-- the name of this HTTP request. The name should be descriptive; remember that it is common to have multiple HTTP Request elements in a thread group.
Server Name or IP-- the server name or the IP address of the machine running the application being tested.
Port Number-- the port number used by the application. Normally, a Web application runs on port 80.
Protocol-- the protocol used, either HTTP or HTTPS.
Method-- the request method, either GET or POST.
Path-- the path to the resource that will handle this request.
Parameters-- the list of parameters sent with this request. Use the Add and Delete buttons to add and remove parameters.
Send a file with a request-- simulate a file upload to the Web application.
Retrieve all images and Java Applets-- download embedded content.
Right click in Thread Group created before and go to > Add > Listener > View Result Tree.
Right click in Thread Group created before and go to > Add > Listener > Summary Report. Explanations:
Label:Recorded HTTP requests. Samples:Samples denote to the number of http request ran for given thread. Average: Average is the average response time for that particular http request. This response time is in millisecond. Min:Min denotes to the minimum response time taken by the http request. Max:Max denotes to the maximum response time taken by the http request.
Std.Deviation:This shows how many exceptional cases were found which were deviating from the average value of the receiving time. The lesser this value more consistent the time pattern is assumed.
Error %: This denotes the error percentage in samples during run. This error can be of 404(file not found), or may be exception or any kind of error during test run will be shown in Error %. In the above image the error % is zero, because all the requests ran successfully.
Apache JMeteris a 100% pure Java desktop application designed to load test client/server software (such as aweb application). It may be used to test performance both on static and dynamic resources such as static files, Java Servlets, CGI scripts, Java objects,databases,FTP servers, and more. JMeter can be used to simulate a heavy load on a server, network or object to test its strength or to analyze overall performance under different load types.
Jmeter can do stress test to client/server application such as simultaneously massive user login and process. Jmeter works in protocol level and using Java desktop applications.
Start Jmeter Installation :
Go to terminal and check your Java version by typing "java -version". It will give result something like this depending on your Java version. java version "1.7.0_60" Java(TM) SE Runtime Environment (build 1.7.0_60-b19) Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)If nothing displays, please re-Install Java SE runtime environment