This file contains 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
"dart.debugExternalLibraries": true, | |
"dart.debugSdkLibraries": true, | |
The first will allow debugging of pub packages; while the second will allow debugging of Flutter sdk. |
This file contains 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
public class MyUtilities{ | |
public boolean isDigit(String s) | |
{ | |
if(s.matches("((-|\\+)?[0-9]+(\\.[0-9]+)?)+")){ | |
return true; | |
} | |
else { |
This file contains 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 json | |
import requests | |
from providerProgramContracts.helpers import open_csv | |
def patch_ids(): | |
my_token = 'enter your token here' | |
count = 0 |
This file contains 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
flush() -> method in java used to flush streams, by clearing the | |
stream of any element that maybe or maybe not inside the stream |
This file contains 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
If you get this error when running gradlew clean build command | |
./gradlew: No such file or directory | |
probably your project doesnt have the gradlew wrapper. | |
To generate one run this. | |
gradle wrapper |
This file contains 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
To recover previous git stashes, follow these commands to bring back work in different branches | |
$git stash list - shows git stashes lists | |
$git stash pop stash{0} - to reference a specific stash in the list to get the list of previous stashes | |
$git stash show - inspects the current stash list |
This file contains 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
Java 7 | |
import java.io.*; | |
import java.util.*; | |
import java.text.*; | |
import java.math.*; | |
import java.util.regex.*; | |
public class Solution { |
This file contains 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
Sort By Key | |
List<Employees> employee = new ArrayList<>(map.keySet()); | |
Collections.sort(employee); | |
Output -> [Anne, George, John, Mooh] | |
Sort by Value | |
List<Employee> employeeId = new ArrayList<>(map.values(); |
This file contains 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.util.Scanner; | |
public class Solution { | |
public static void main(String[] args) { | |
/* Read input */ | |
Scanner scan = new Scanner(System.in); | |
String str = scan.nextLine(); | |
scan.close(); | |
This file contains 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 'package:flutter/material.dart'; | |
import 'package:mpesa_flutter_plugin/mpesa_flutter_plugin.dart'; | |
void main() { | |
MpesaFlutterPlugin.setConsumerKey("Your Consumer Key from the safarocom portal, its random eg.'8joAntLHTIT28Pup....' "); | |
MpesaFlutterPlugin.setConsumerSecret("Your Consumer Secret from the safarocom portal, its random eg. 'kjiUWoPT4...' "); | |
runApp(MyApp()); | |
} |
OlderNewer