Skip to content

Instantly share code, notes, and snippets.

View manniru's full-sized avatar

MUHAMMAD MANNIR AHMAD manniru

View GitHub Profile
<?php
exec("ipconfig.exe",$output_array,$return_val);
echo "Returned $return_val <br><pre>";
foreach ($output_array as $o)
{
echo "$o <br>";
}
echo "</pre>";
?>
@manniru
manniru / JavaXml.java
Created August 14, 2014 18:07
Parsing / Reading XML file in Java
package net.viralpatel.java.xmlparser;
import java.io.File;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@manniru
manniru / ns2
Last active August 29, 2015 14:05
http://www-sop.inria.fr/members/Eitan.Altman/ns.htm
http://marco.uminho.pt/~joao/pim-ns2/
import android.annotation.SuppressLint;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
private WebView webview;
/**
* A collection of authentication and account connection utilities. With strong inspiration from the Google IO session
* app.
* @author Dandré Allison
*/
public class AccountUtils {
/**
* Interface for interacting with the result of {@link AccountUtils#getUserProfile}.
*/
public class Consumer
{
private String name;
private int age;
private String email;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
//https://cordova.apache.org/docs/en/2.9.0/guide_cli_index.md.html
npm install -g phonegap
phonegap create phonegap1
cd phonegap1
phonegap run android
npm install -g cordova
npm update -g cordova
//http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html
sudo npm install -g phonegap
phonegap create hello com.example.hello HelloWorld
cd hello
phonegap build ios
phonegap install android
phonegap run android
// Basic device information (Device API):
//http://ubuntuportal.com/2013/12/how-to-install-xampp-1-8-3-for-linux-in-ubuntu-desktop.html
wget http://sourceforge.net/projects/xampp/files/XAMPP%20Linux/1.8.2/xampp-linux-x64-1.8.2-6-installer.run/download
sudo chmod +x xampp-linux-x64-1.8.2-6-installer.run
sudo ./xampp-linux-x64-1.8.2-6-installer.run
sudo /opt/lampp/lampp start
sudo /opt/lampp/lampp stop
sudo /opt/lampp/lampp restart
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mannir.ebahn2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>