Skip to content

Instantly share code, notes, and snippets.

View cyberhck's full-sized avatar

Nishchal Gautam cyberhck

View GitHub Profile
@cyberhck
cyberhck / isPrime.c
Created December 25, 2014 09:41
A better than our lab isPrime function.
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
int main(){
int n;
printf("Enter a number\n");
scanf("%d",&n);
if(isPrime(n)){
printf("Is prime number\n");
}else{
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hash Tag Demo</title>
<script>
function parse() {
text = document.getElementById("postToorq").value;
res = text.replace(/#[a-z0-9][a-z0-9\-_]*/gi, "<strong>$&</strong>");
res = res.replace(/ /g, "&nbsp;");
public class ContactChooser extends ActionBarActivity{
@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_contact_chooser);
Cursor cursor=getContentResolver().query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,null,null,null,null,null