This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copyright (c) ${YEAR}, ${USER}, ITHENA BVBA @ http://www.ithena.be | |
| // All rights reserved. | |
| // | |
| // Redistribution and use in source and binary forms, with or without | |
| // modification, are permitted provided that the following conditions are met: | |
| // * Redistributions of source code must retain the above copyright | |
| // notice, this list of conditions and the following disclaimer. | |
| // * Redistributions in binary form must reproduce the above copyright | |
| // notice, this list of conditions and the following disclaimer in the | |
| // documentation and/or other materials provided with the distribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Copyright (C) 2016 hendrawd | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import com.android.volley.Request; | |
| import com.android.volley.error.AuthFailureError; | |
| import com.android.volley.toolbox.HttpStack; | |
| import org.apache.http.HttpEntity; | |
| import org.apache.http.HttpResponse; | |
| import org.apache.http.ProtocolVersion; | |
| import org.apache.http.StatusLine; | |
| import org.apache.http.entity.BasicHttpEntity; | |
| import org.apache.http.message.BasicHeader; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.support.annotation.NonNull; | |
| import android.support.annotation.Nullable; | |
| import java.io.File; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import okhttp3.internal.io.FileSystem; | |
| import okio.BufferedSource; | |
| import okio.Okio; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import android.app.Activity; | |
| import android.app.Service; | |
| import android.content.BroadcastReceiver; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.IntentFilter; | |
| import android.os.Bundle; | |
| import android.os.IBinder; | |
| import android.support.v4.content.LocalBroadcastManager; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun main(args: Array<String>) { | |
| println("This program will calculate annual interest of BukaReksa based on 3 months price") | |
| println("Input start price") | |
| val startPrice = readLine()!!.toDouble() | |
| println("Input end price") | |
| val endPrice = readLine()!!.toDouble() | |
| println("Annual interest is ${calculateAnnualInterest(startPrice, endPrice)}") | |
| } | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * @author hendrawd on 22/12/17 | |
| */ | |
| public class Singleton { | |
| // some singleton creation mechanisms | |
| private Singleton(){ | |
| // throwing an exception here is needed to avoid developer cheating by creating this class with reflection | |
| throw new UnsupportedOperationException("Should not create instance of Util class. Please use as static.."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.PrintWriter | |
| import java.math.BigInteger | |
| /** | |
| * ${Website} | |
| * Created on ${DAY} ${MONTH_NAME_FULL} ${YEAR} | |
| * @author ${USER} | |
| */ | |
| fun main(args: Array<String>) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.4.0; | |
| /* | |
| Simple contract that returns a greeting | |
| */ | |
| contract Hodor { | |
| address creator; | |
| string greeting; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.4.0; | |
| /* | |
| Currency that can only be issued by its creator and transferred to anyone | |
| */ | |
| contract DragonStone { | |
| address public creator; | |
| mapping (address => uint) public balances; | |
| // event that notifies when a transfer has completed |