<div class="bbcodeblock bbcodequote bbcmspoilerblock">
<div class="attribution type"><noscript>spoiler (move your mouse to the spoiler area to reveal the content)</noscript>
show spoiler
hide spoiler
</div>
<div class="quotecontent">
<div class="bbcm_spoiler_noscript"><blockquote>
Mã nguồn PHP:
[color=#000000]
[/color][color=#ff8000]/* * to change this license header, choose license headers in project properties. * to change this template file, choose tools | templates * and open the template in the editor. */[/color][color=#0000bb]package bai27[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]file[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]fileinputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]fileoutputstream[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]filenotfoundexception[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]io[/color][color=#007700].[/color][color=#0000bb]ioexception[/color][color=#007700];[/color][color=#0000bb]import java[/color][color=#007700].[/color][color=#0000bb]util[/color][color=#007700].[/color][color=#0000bb]scanner[/color][color=#007700];[/color][color=#ff8000]/** * * @author tran */[/color][color=#007700]public class [/color][color=#0000bb]copymovedelphuongthuc [/color][color=#007700]{ public static [/color][color=#0000bb]void main[/color][color=#007700]([/color][color=#0000bb]string[/color][color=#007700][] [/color][color=#0000bb]args[/color][color=#007700]) [/color][color=#0000bb]throws ioexception [/color][color=#007700]{ [/color][color=#0000bb]string a[/color][color=#007700],[/color][color=#0000bb]cmd [/color][color=#007700],[/color][color=#0000bb]source [/color][color=#007700]= [/color][color=#0000bb]null[/color][color=#007700],[/color][color=#0000bb]target [/color][color=#007700]= [/color][color=#0000bb]null[/color][color=#007700]; [/color][color=#0000bb]string [/color][color=#007700][] [/color][color=#0000bb]result[/color][color=#007700]; [/color][color=#0000bb]scanner input [/color][color=#007700]= new [/color][color=#0000bb]scanner[/color][color=#007700]([/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]in[/color][color=#007700]); [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"input as sample 'copy c:\test.txt e:\test.txt'"[/color][color=#007700]); [/color][color=#0000bb]cmd [/color][color=#007700]= [/color][color=#0000bb]input[/color][color=#007700].[/color][color=#0000bb]nextline[/color][color=#007700](); [/color][color=#0000bb]result [/color][color=#007700]= [/color][color=#0000bb]cmd[/color][color=#007700].[/color][color=#0000bb]split[/color][color=#007700]([/color][color=#dd0000]" "[/color][color=#007700]); [/color][color=#0000bb]a [/color][color=#007700]= [/color][color=#0000bb]result[/color][color=#007700][[/color][color=#0000bb]0[/color][color=#007700]]; [/color][color=#0000bb]source [/color][color=#007700]= [/color][color=#0000bb]result[/color][color=#007700][[/color][color=#0000bb]1[/color][color=#007700]]; [/color][color=#0000bb]target [/color][color=#007700]= [/color][color=#0000bb]result[/color][color=#007700][[/color][color=#0000bb]2[/color][color=#007700]]; [/color][color=#ff8000]//input [/color][color=#007700]switch([/color][color=#0000bb]a[/color][color=#007700]){ case [/color][color=#dd0000]"copy" [/color][color=#007700]: [/color][color=#0000bb]copyf[/color][color=#007700]([/color][color=#0000bb]source[/color][color=#007700],[/color][color=#0000bb]target[/color][color=#007700]); break; case [/color][color=#dd0000]"move" [/color][color=#007700]: [/color][color=#0000bb]movef[/color][color=#007700]([/color][color=#0000bb]source[/color][color=#007700],[/color][color=#0000bb]target[/color][color=#007700]); break; case [/color][color=#dd0000]"delete" [/color][color=#007700]: [/color][color=#0000bb]deletef[/color][color=#007700]([/color][color=#0000bb]source[/color][color=#007700]); break; default : [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"comand fail!!!!"[/color][color=#007700]); } } public static [/color][color=#0000bb]void copyf[/color][color=#007700]([/color][color=#0000bb]string source[/color][color=#007700],[/color][color=#0000bb]string target[/color][color=#007700]) [/color][color=#0000bb]throws ioexception[/color][color=#007700]{ [/color][color=#0000bb]fileinputstream fin [/color][color=#007700]; [/color][color=#0000bb]fileoutputstream fout[/color][color=#007700]; try{ [/color][color=#0000bb]fin [/color][color=#007700]= new [/color][color=#0000bb]fileinputstream[/color][color=#007700]([/color][color=#0000bb]source[/color][color=#007700]); }catch([/color][color=#0000bb]ioexception exc[/color][color=#007700]){ [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"input file not found"[/color][color=#007700]); return ; } try{ [/color][color=#0000bb]fout [/color][color=#007700]= new [/color][color=#0000bb]fileoutputstream[/color][color=#007700]([/color][color=#0000bb]target[/color][color=#007700]); }catch([/color][color=#0000bb]ioexception exc[/color][color=#007700]){ [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"error oppening file"[/color][color=#007700]); return ; }catch([/color][color=#0000bb]arrayindexoutofbound***ception exc[/color][color=#007700]){ [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"usage : copy file to"[/color][color=#007700]); return ; } [/color][color=#0000bb]int i[/color][color=#007700]; try{ do{ [/color][color=#0000bb]i [/color][color=#007700]= [/color][color=#0000bb]fin[/color][color=#007700].[/color][color=#0000bb]read[/color][color=#007700](); if([/color][color=#0000bb]i[/color][color=#007700]!= -[/color][color=#0000bb]1[/color][color=#007700]){ [/color][color=#0000bb]fout[/color][color=#007700].[/color][color=#0000bb]write[/color][color=#007700]([/color][color=#0000bb]i[/color][color=#007700]); } }while ([/color][color=#0000bb]i[/color][color=#007700]!= -[/color][color=#0000bb]1[/color][color=#007700]); }catch([/color][color=#0000bb]ioexception exc[/color][color=#007700]){ [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"copy error"[/color][color=#007700]); } [/color][color=#0000bb]fin[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700](); [/color][color=#0000bb]fout[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700](); } public static [/color][color=#0000bb]void movef[/color][color=#007700]([/color][color=#0000bb]string source[/color][color=#007700], [/color][color=#0000bb]string target[/color][color=#007700]) [/color][color=#0000bb]throws ioexception[/color][color=#007700]{ [/color][color=#0000bb]fileinputstream fin [/color][color=#007700]; [/color][color=#0000bb]fileoutputstream fout [/color][color=#007700]; [/color][color=#0000bb]file file[/color][color=#007700]; [/color][color=#0000bb]file [/color][color=#007700]= new [/color][color=#0000bb]file[/color][color=#007700]([/color][color=#0000bb]source[/color][color=#007700]); try{ [/color][color=#0000bb]fin [/color][color=#007700]= new [/color][color=#0000bb]fileinputstream[/color][color=#007700]([/color][color=#0000bb]source[/color][color=#007700]); }catch([/color][color=#0000bb]ioexception exc[/color][color=#007700]){ [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"input file not found"[/color][color=#007700]); return ; } try{ [/color][color=#0000bb]fout [/color][color=#007700]= new [/color][color=#0000bb]fileoutputstream[/color][color=#007700]([/color][color=#0000bb]target[/color][color=#007700]); } catch([/color][color=#0000bb]arrayindexoutofbound***ception exc[/color][color=#007700]){ [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"usage : copy file to "[/color][color=#007700]); return ; } [/color][color=#0000bb]int i[/color][color=#007700]; try{ do { [/color][color=#0000bb]i [/color][color=#007700]= [/color][color=#0000bb]fin[/color][color=#007700].[/color][color=#0000bb]read[/color][color=#007700](); if ([/color][color=#0000bb]i [/color][color=#007700]!= -[/color][color=#0000bb]1[/color][color=#007700]) { [/color][color=#0000bb]fout[/color][color=#007700].[/color][color=#0000bb]write[/color][color=#007700]([/color][color=#0000bb]i[/color][color=#007700]); } } while ([/color][color=#0000bb]i [/color][color=#007700]!= -[/color][color=#0000bb]1[/color][color=#007700]); }catch([/color][color=#0000bb]ioexception exc[/color][color=#007700]){ [/color][color=#0000bb]system[/color][color=#007700].[/color][color=#0000bb]out[/color][color=#007700].[/color][color=#0000bb]println[/color][color=#007700]([/color][color=#dd0000]"move error"[/color][color=#007700]); } [/color][color=#0000bb]fin[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700](); [/color][color=#0000bb]fout[/color][color=#007700].[/color][color=#0000bb]close[/color][color=#007700](); [/color][color=#0000bb]file[/color][color=#007700].[/color][color=#0000bb]delete[/color][color=#007700](); } public static [/color][color=#0000bb]void deletef[/color][color=#007700]([/color][color=#0000bb]string source[/color][color=#007700]){ [/color][color=#0000bb]file file[/color][color=#007700]; [/color][color=#0000bb]file [/color][color=#007700]= new [/color][color=#0000bb]file[/color][color=#007700]([/color][color=#0000bb]source[/color][color=#007700]); [/color][color=#0000bb]file[/color][color=#007700].[/color][color=#0000bb]delete[/color][color=#007700](); } } [/color]
</blockquote></div>
</div>
</div>
Cách sử dụng thước lỗ ban trong xây mộ chuẩn theo phong thủy Cách sử dụng thước lỗ ban trong xây mộ để ngôi mộ của các bậc tổ tiên, những người đã khuất được xây dựng theo kích thước hợp phong thủy...
Hướng dẫn sử dụng thước lỗ ban trong xây mộ