(包含執行次數、消耗時間等等)
。使用方式:
1. 在用gcc compile時,加上-pg選項:
$ gcc -pg test.c -o test_gprof
2. 執行程式:
$ ./test_gprof
執行後會發現產生一個gmon.out檔
3. 利用gprof 打開gmon.out和原本的執行檔:
$ gprof test_gprof gmon.out
。結果:
Ref:
http://www.thegeekstuff.com/2012/08/gprof-tutorial/
$ gcc -pg test.c -o test_gprof
$ ./test_gprof
$ gprof test_gprof gmon.out
<link href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css" rel="stylesheet"></link>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
2. 在html裡加一個id=slider-range的div<div id="slider-range"></div>
$(function() {
$("#slider-range").slider({
range: true,
min: 0,
max: 500,
values: [ 75, 300 ],
slide: function( event, ui ) {
// do somethong when value change
// ui.values[0]: left value
// ui.values[1]: right value
}
});
target: dependencies <tab>Commands
.PHONY: clean clean: <tab>rm *.o
.PHONY: clean clean: @echo "Clean..." -rm *.o
foo.o: common.h gcc -c foo.c
foo.o: common.h
foo.o: common.h <tab>
target = foo $(target): command <tab>gcc -o $(target) foo.c
make CFLAGS="-g -O2"
make clean
<script src="http://code.jquery.com/jquery-1.11.2.min.js"></script> <script src="dist/jquery.flip.js"></script>
<div id="card-2" class="card"> <div class="front"> Front content </div> <div class="back"> Back content </div> </div>
<script type="text/javascript"> $(function(){ $("#card-2").flip({ axis: "y", reverse: true, trigger: "click" }); }); </script>
Attribute | Possible value | Default | Description |
---|---|---|---|
axis | y , x |
y |
The axis that you want to rotate around |
trigger | click , hover , manual |
click |
Event that activates the flip action. Using manual means that you have to activate it via javascript. |
reverse | true , false |
false |
Set to true if you want to reverse the direction of the flip. |
speed | any integer | 500 |
Duration in milisecond for flipping dom |
$("#card-2").flip(true); //back side和
$("#card-2").flip(false); //front side