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
| <?php | |
| require 'vendor/autoload.php'; | |
| /** | |
| * Created By John Kagga | |
| * Some of the carbon time methods | |
| * Play around with them | |
| * | |
| **/ | |
| use Carbon\Carbon; |
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
| # | |
| # CONFIGURATION FOR USING SMS KANNEL WITH RAPIDSMS | |
| # | |
| # For any modifications to this file, see Kannel User Guide | |
| # If that does not help, see Kannel web page (http://www.kannel.org) and | |
| # various online help and mailing list archives | |
| # | |
| # Notes on those who base their configuration on this: | |
| # 1) check security issues! (allowed IPs, passwords and ports) | |
| # 2) groups cannot have empty rows inside them! |
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
| <?php | |
| require_once "AfricasTalkingGateway.php"; | |
| //Specify your credentials | |
| $username = "myAfricasTalkingUsername"; | |
| $apiKey = "myAfricasTalkingAPIKey"; | |
| // Specify the number that you want to subscribe | |
| // Please ensure you include the country code (+254 for Kenya in this case) |
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
| <?php | |
| require_once(‘AfricasTalkingGateway.php’); | |
| //next we receive notification from API | |
| //and read in post params to our variables | |
| $apiUsername =config('sms.username'); | |
| $apikey =config('sms.api_key'); |
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
| /************************************************************************* | |
| * Compilation: javac Complex.java | |
| * Execution: java Complex | |
| * | |
| * Data type for complex numbers. | |
| * | |
| * The data type is "immutable" so once you create and initialize | |
| * a Complex object, you cannot change it. The "final" keyword | |
| * when declaring re and im enforces this rule, making it a | |
| * compile-time error to change the .re or .im fields after |
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
| /** | |
| * Created by jokamjohn on 11/16/2015. | |
| */ | |
| //This is a sample program to calculate a DFT Coefficients using the formula | |
| import java.util.Scanner; | |
| public class DFT | |
| { | |
| double real, img; | |
| public DFT() |
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
| /** | |
| * Created by jokamjohn on 11/16/2015. | |
| */ | |
| public final class Test { | |
| /* | |
| * Computes the discrete Fourier transform (DFT) of the given vector. | |
| * All the array arguments must have the same length. | |
| */ |
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
| /************************************************************************* | |
| * Compilation: javac Complex.java | |
| * Execution: java Complex | |
| * | |
| * Data type for complex numbers. | |
| * | |
| * The data type is "immutable" so once you create and initialize | |
| * a Complex object, you cannot change it. The "final" keyword | |
| * when declaring re and im enforces this rule, making it a | |
| * compile-time error to change the .re or .im fields after |
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
| /** | |
| * Checking for network access | |
| * | |
| * @return boolean | |
| */ | |
| protected boolean isOnline() | |
| { | |
| ConnectivityManager manager = (ConnectivityManager) | |
| getSystemService(Context.CONNECTIVITY_SERVICE); | |
| NetworkInfo networkInfo = manager.getActiveNetworkInfo(); |
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
| Complete installation process: | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo apt-get install -y python-software-properties python make build-essential g++ curl libssl-dev apache2-utils git libxml2-dev | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| cd ~ | |
| mkdir git | |
| cd ~/git |