View Phonegap Content URI To File Path
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
String ActualFilePath=this.getRealPathFromURI(Uri.parse("content://media/external/images/media/8")); | |
private String getRealPathFromURI(Uri contentURI) { | |
Cursor cursor = this.cordova.getActivity().getContentResolver().query(contentURI, null, null, null, null); | |
cursor.moveToFirst(); | |
int idx = cursor.getColumnIndex(MediaStore.Images.ImageColumns.DATA); | |
return cursor.getString(idx); | |
} |
View load multiple tmpl file in default.php
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
create multiple file inside view | |
admin/views/helloworlds/index.html | |
admin/views/helloworlds/view.html.php | |
admin/views/helloworlds/tmpl/index.html | |
admin/views/helloworlds/tmpl/default.php | |
admin/views/helloworlds/tmpl/default_head.php | |
admin/views/helloworlds/tmpl/default_body.php | |
admin/views/helloworlds/tmpl/default_foot.php |
View API.java
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.io.BufferedInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
public class API { | |
private String webPageUrl=""; | |
public API(String URL){ |
View API.java
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.io.BufferedInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
public class API { | |
private String webPageUrl=""; | |
public API(String URL){ |
View user.sh
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
echo $LOGNAME |
View rc.local
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
Modify file | |
/etc/init.d/rc.local | |
appened your script code into the file |
View mysql.jsp
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
<%@page import="java.sql.*"%> | |
<%@page import="com.mysql.jdbc.PreparedStatement"%> | |
<%@page import="com.mysql.jdbc.Connection"%> | |
<%@ page language="java" contentType="text/html; charset=UTF-8" | |
pageEncoding="UTF-8"%> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Insert title here</title> |
View checkDir.sh
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 Directory Exist ############### | |
if [ -d "$DIRECTORY" ]; then | |
# Control will enter here if $DIRECTORY exists. | |
fi | |
############ If Directory NOT Exist ############### | |
if [ ! -d "$DIRECTORY" ]; then | |
# Control will enter here if $DIRECTORY doesn't exist. |
View mysqlInShell.sh
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
dbHost="localhost" | |
dbUsername="root" | |
dbPass="rootwdp" | |
dbName="test" | |
dbTbl="users" | |
userCol="username" | |
passCol="password" | |
$username="user1" | |
$password="pass123" | |
mysql -u $dbUsername -p"$dbPass" $dbName -e "INSERT INTO $dbTbl($userCol,$passCol) VALUES('$username','$password')"; |
View gist:3250304
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
Install bchunk using the following command | |
sudo aptitude install bchunk | |
This will complete the installation. | |
Using bchunk | |
bchunk syntax |
OlderNewer