Skip to content

Instantly share code, notes, and snippets.

View rafialhamd's full-sized avatar
💭
Working on HBarScan.com

Rafiudeen Chozhan Kumarasamy rafialhamd

💭
Working on HBarScan.com
View GitHub Profile
@rafialhamd
rafialhamd / HederaAccountTest.java
Created January 12, 2019 09:03
Test com.hedera.sdk.account.HederaAccount.getBalance()
package com.hbarscan.test.account;
import org.slf4j.LoggerFactory;
import com.hedera.examples.utilities.ExampleUtilities;
import com.hedera.sdk.account.HederaAccount;
import ch.qos.logback.classic.Logger;
public final class HederaAccountTest {
14:22:52.865 [main] INFO com.hedera.sdk.node.HederaNode - RUNNING QUERY TO NODE
14:22:53.086 [main] INFO com.hedera.sdk.node.HederaNode - cryptogetAccountBalance {
header {
payment {
body {
transactionID {
transactionValidStart {
seconds: 1547283162
nanos: 741032000
}
14:23:42.331 [main] INFO com.hedera.sdk.node.HederaNode - RUNNING QUERY TO NODE
14:23:42.586 [main] INFO com.hedera.sdk.node.HederaNode - cryptogetAccountBalance {
header {
payment {
body {
transactionID {
transactionValidStart {
seconds: 1547283212
nanos: 184467000
}
@rafialhamd
rafialhamd / pom.xml
Created February 2, 2019 04:30 — forked from mnadeem/pom.xml
Add non maven jar in maven way
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.demo.app</groupId>
<artifactId>demo-app</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<version.maven-install-plugin>2.5.2</version.maven-install-plugin>
<version.non-maven1>1.0.0</version.non-maven1>
Verifying my Blockstack ID is secured with the address 1EqrN27SEgVTmYqw5v9LPqKciCczantJcK https://explorer.blockstack.org/address/1EqrN27SEgVTmYqw5v9LPqKciCczantJcK
@rafialhamd
rafialhamd / alt-callback-pass.md
Created June 11, 2019 09:53
Alternative ways to pass a callback to a function in Javascript

#Alternative ways to pass a callback to a function in Javascript

Javascript is extremely flexible, encouraging us to find alternatives to almost any possible expression or statement. For example, passing a callback function to another function can be done in different ways.

Because a function is an object in Javascript, it can be passed to another function as an argument and executed later. Callbacks let us defer the code execution to the moment it's really needed.

function waitAndCall(func)
{
 setTimeout(func,parseInt(Math.random()*10000));