Skip to content

Instantly share code, notes, and snippets.

View JacquesInnocent's full-sized avatar
🏠
Working from home

Nyadru Innocent JacquesInnocent

🏠
Working from home
View GitHub Profile
package com.example.roguex.nyumbaapp;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;
@JacquesInnocent
JacquesInnocent / Button intent
Created June 14, 2018 12:41
Button intent to next activity.
import android.app.Activity;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
//Button id = buttonBack
@JacquesInnocent
JacquesInnocent / PHP get user IP Address
Created June 5, 2018 01:29
Snippet for retrieving user's IP address in PHP.
public function UserIP() {
$ip_address = $_SERVER['REMOTE_ADDR'];
}
Dim vel, hdir As Double
Private Sub Stop_Click()
Timer1.Enabled = False
label2.Caption = Shape1.Left + 1
label3.Caption = Val(label1.Caption) + Val(label2.Caption)
End Sub
@JacquesInnocent
JacquesInnocent / TransactionDetails.php
Created September 15, 2017 13:07
Customer transaction details and identity.
<?php
class BankAccount {
private $balance = 100000;
public function DisplayBalance () {
return 'Balance:'.$this->balance;
}
public function Deposit ($amount){
$this->balance + $amount;
@JacquesInnocent
JacquesInnocent / mapsActivity.java
Last active December 17, 2022 05:02
Google Maps current location activity.
//change .map.myMap in line 2 to your company name and app name input in the begining of activity creation.
package com.map.myMap;
import android.support.v4.app.FragmentActivity;
import android.os.Bundle;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
@JacquesInnocent
JacquesInnocent / GoogleMapsAPI
Created September 1, 2017 17:05
Google Maps Location and permission codes.
package com.example.currentplacedetailsonmap;
import android.content.DialogInterface;
import android.content.pm.PackageManager;
import android.location.Location;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;