Skip to content

Instantly share code, notes, and snippets.

View DavidInnocent's full-sized avatar
💭
On stackOverflowwww

David Innocent DavidInnocent

💭
On stackOverflowwww
View GitHub Profile
@DavidInnocent
DavidInnocent / Bazel Success Build
Created December 3, 2022 13:48
The gist shows the successful log of building bazel sample android application in the terminal.
david@DavidInnocentEnvy MINGW64 ~/OneDrive/Desktop/Algo/examples/android/tutorial (main)
$ bazel build //src/main:app --verbose_failures
Loading:
Loading: 0 packages loaded
Analyzing: target //src/main:app (0 packages loaded, 0 targets configured)
INFO: Analyzed target //src/main:app (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
[0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
Target //src/main:app up-to-date:
bazel-bin/src/main/app_deploy.jar
import java.util.HashMap;
public class start {
public static void main(String args[]) //static method
{
String[] data = {"1", "2", "3", "4", "5", "2"};
transformList(data);
}
let url = 'https://api.demo.reja.ai/auth'
let auth_data = {
"email": "hello@intelipro",
"dashboard_id": "interview",
"password": "interview07August"
}
superagent.get(url)
.set('Content-Type', 'application/json')
<?php
header("Content-Type: application/json");
$response = '{
"ResultCode":0,
"ResultDesc":"Confirmation recieved successfuly"
}';
$mpesaResponse = file_get_contents('php://input');
<?php
header("Content-Type:application/json");
$shortcode='your shortcode';
$consumerkey ="your consumer key";
$consumersecret ="your secret";
$validationurl="./validation.php?token=hahahahaha";
$confirmationurl="./confirmation.php?token=hahahahahaha";
$authenticationurl='https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';
<?php
header("Content-Type:application/json");
if (!isset($_GET["token"]))
{
echo "Technical error";
exit();
}
if ($_GET["token"]!='hahahahaha')
{
echo "Invalid authorization";
<?php
header("Content-Type:application/json");
if (!isset($_GET["token"]))
{
echo "Technical error";
exit();
}
if ($_GET["token"]!='hahahahaha')
//OnboardingFragment
pagerAdapter=new OnboardingViewPagerAdapter(this);
viewPager2.setAdapter(pagerAdapter);
public class OnboardingViewPagerAdapter extends FragmentStateAdapter {
public OnboardingViewPagerAdapter(@NonNull Fragment fragment) {
package com.co.ximmoz.FireFy.ui.views.Activities;
import android.Manifest;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.PointF;
import android.os.Build;
import android.os.Bundle;
<?php
$headers = array(
'Content-Type: application/json',
'Accept: application/json',
'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiNzk3NDczNmI2NDRkMGRlZGJhMDdhMzVhNTA0MWMyY2I1ZTNhODU4YWJjZDk3MTQxMmYzNzZmMmZhOTgwMjNiZDBmMjYwMmQ4YjlhMWI3OWYiLCJpYXQiOjE1ODY5NDk1NjUsIm5iZiI6MTU4Njk0OTU2NSwiZXhwIjoxNjE4NDg1NTY1LCJzdWIiOiI0NiIsInNjb3BlcyI6W119.tbkq9tDxhVil3lJ1KuamujsEArfLssgnv020zqi7Nz7lGYpfk-pNm8EQ3FccPtFGxEx45Gvzn6G91Oo_8xHpGTeJ33QRWAsaywd2sB-x7FLnARLg3ij98VvGKMDXOoCNDysK8OZJzRFsgnY_9nCR2zNBonsLHZqfl8VnrUg6jkp0uuTj-zIAcEQkmNlCwOrtXc8XnizrmFcLwZa-y4ykTeF-hYUPkhPGpj_FSu4UwnLYWQ1_ah8WY22s125S--M2LdRui-LVfsbUTYpOGw7lxa59Zb2dFUZKwY75LsCkx7KrO-OzjHeHNq8fHgrqxGm0BgfvxCrdzE9ja0J26nj9eb0QaJakj-kFX43-yxi4lfVoX_vBImO-xeZPCDabQHSStjF9OaEMvfroadInr3zHslmia_zI8tqdRXd-gMbPmohof0Ky4r4wSNWAuryGVcSCueiAHuPhM8oTCYwXSJct64XebqloIFUQg52P0PmnRVdB9sqOKwRpl32Tq8HP_X76EqoKkt2JbVpljbXy1bLQqeQV79lbnF7cHfHNJUna96AgaLVYl3ll7xQT9XYDp0IAmJ1hBKBP0Y5mL-tt-rXCZGOfNsdzHV