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
//Generate Random Numbers | |
final int min = 0; | |
final int max = 9; | |
Random g=new Random(); | |
final int random = g.nextInt((max - min) + 1) + min; //Random number 0(inclusive)-9(inclusive) |
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
package com.emil.android.util; | |
import android.content.Context; | |
import android.net.ConnectivityManager; | |
import android.net.NetworkInfo; | |
import android.telephony.TelephonyManager; | |
/** | |
* Check device's network connectivity and speed | |
* @author emil http://stackoverflow.com/users/220710/emil |
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 StringCombination { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
Scanner scan= new Scanner(System.in); | |
String name=new String(); | |
name=scan.next(); | |
int iterations=0,n,s,e; | |
e=1; //Initialize word count | |
for(int i=name.length();i>=0;i--){ |
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
#include<iostream.h> | |
#include<conio.h> | |
void main(){ | |
char n[7]="PROGRAM"; | |
int i=0,f=1,tb,ta,sb=0,sa=5,j=0,k=6; | |
clrscr(); | |
while(i<sizeof(n)){ | |
tb=sb; | |
//Print white Spaces | |
while(tb>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
#include<iostream.h> | |
#include<conio.h> | |
void main(){ | |
char n[7]="PROGRAM"; | |
int i=0,f=1,tb,ta,sb=0,sa=5,j=0,k=6; | |
clrscr(); | |
while(i<sizeof(n)){ | |
tb=sb; | |
//Print white Spaces | |
while(tb>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
var randomNumber = Math.floor(Math.random() * 100) + 1; | |
//Generate a random number between 1 and 100 |
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.awt.List; | |
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.Iterator; | |
import java.util.PriorityQueue; | |
import java.util.Queue; | |
import java.util.Scanner; | |
public class Collections { |
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
package application.arkthepro.com.samplebluetoothapp; | |
import android.Manifest; | |
import android.app.AlertDialog; | |
import android.content.DialogInterface; | |
import android.content.Intent; | |
import android.content.pm.PackageManager; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
import android.support.v4.app.ActivityCompat; |
OlderNewer