Skip to content

Instantly share code, notes, and snippets.

View tranquangchau's full-sized avatar

Trần Quang Châu tranquangchau

View GitHub Profile
http://stackoverflow.com/a/36344490
@tranquangchau
tranquangchau / php read file txt export from excel
Created August 24, 2016 16:30
Excel -> save .txt Php read .txt -> table
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Name: Ion Auth Model
*
* Version: 2.5.2
*
* Author: Ben Edmunds
* [email protected]
* @benedmunds
*
@tranquangchau
tranquangchau / MainActivity.java
Created May 9, 2016 15:01 — forked from anonymous/MainActivity.java
android play mp3, mp4
package com.example.administrator.myapplication;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.session.MediaController;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<script>
function test(){
var x = (Number(3.3) * Number(4)).toFixed(2);
document.write(x);
}
test();
</script>
@tranquangchau
tranquangchau / html add tag for select.html
Last active December 11, 2015 17:56
tag for basic,select, error
<!--Css basic-->
<li class="price_control op-wrap">
<div class="stt-control">4</div><div class="name-control n">4 chọn kiểu may * <span class="selected_item"></span></div>
<ul class="control_type">
<li><input value="0" id="con-0" name="control_type" class="select_control_step_4" type="radio" /><label class="get_selected" for="con-0">Chia đều</label></li>
<li><input value="1" id="con-1" name="control_type" class="select_control_step_4" type="radio" /><label class="get_selected" for="con-1">Xếp tầng</label></li>
<div id="load_control_type" class="load_des"></div>
<div class="next-step-wrap">
@tranquangchau
tranquangchau / template.php
Created December 7, 2015 15:42
ok lựa chọn giao diện hiện thị cho 1 category trong wordpress file \wp-includes\template.php trong hàm get_single_template()
function get_single_template() {
$object = get_queried_object();
$templates = array();
if ( ! empty( $object->post_type ) )
$templates[] = "single-{$object->post_type}.php";
// $templates[] = "single.php";
$the_categories = get_the_category();
@tranquangchau
tranquangchau / a.html
Created December 3, 2015 16:02
same ajax in local file html
<head>
<script type="text/javascript" src="test.js"></script>
<a href="javascript:loadjscssfile('myscript.js','js')">Load "myscript.js"</a>
<a href="javascript:loadjscssfile('mystyle.css','css')">Load "mystyle.css"</a>
<div class="demotable" style="background:red;">fsa</div>
<a href="javascript:test()">function test</a>
<div id="content"></div>
</head>