How to using Windiff as External Diff in SourceTree
1. Open SourceTree
2. Tools - Options
3. Diff - External Diff Tool : Custom
Diff command : C:\PathToWindiff\WinDiff.Exe
Argument : $LOCAL $REMOTE
*note: put <space> in First letter in Argument
example in command prompt : WinDiff.Exe $LOCAL $REMOTE
Monday, October 16, 2017
Wednesday, August 30, 2017
How to compare file using Command Prompt and Visual Studio 2015
How to compare file using Command Prompt and Visual Studio 2015
1. open command prompt
2. go to visual studio path : "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE"
3. example :
1. open command prompt
2. go to visual studio path : "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE"
3. example :
.\devenv.exe /diff “C:\b.txt” “C:\a.txt” “SOURCE” “TARGET”
Saturday, February 4, 2017
Copy Multi Folders using Robocopy for "Infinite Folders"
Intro dulu ya ....
gw lagi coding php, pake php designer 8. trus gw coba-coba toolsnya. ada export, eh pas gw coba, kok ga beres2 copynya?? trus gw cancel. pas gw liat, eh ternyata ngebuat folder yg banyak bgt.
gw coba cek pake software2, ada sekitar 475 folders (dibaca: tak terbatas a.k. infinity / infinite).
foldernya ampe ga bisa dibuka.
trus gw googling2.
- pake cmd , pake cara buat remove autorun.inf nya SMADAV seperti rmdir, rd, del, erase.
- install winUtilities, Unlocker, pake power shell, dsb.
- trus gw coba robocopy. pake cmd jg. setelah menggila lama , akhirnya nemu juga caranya. yaitu
robocopy [source] [dest] /purge /s /mov
contoh : robocopy c:\hapus\a\ c:\delete\a\ /purge /s /mov
beres deh...
So, ini kesimpulannya :
Pakai Robocopy (using cmd)
command :
robocopy [source] [dest] /purge /s /mov
contoh : robocopy c:\hapus\a\ c:\delete\a\ /purge /s /mov
**dipublish setelah gw liat ini as draft (udah 4 tahun sepertinya...)
gw lagi coding php, pake php designer 8. trus gw coba-coba toolsnya. ada export, eh pas gw coba, kok ga beres2 copynya?? trus gw cancel. pas gw liat, eh ternyata ngebuat folder yg banyak bgt.
gw coba cek pake software2, ada sekitar 475 folders (dibaca: tak terbatas a.k. infinity / infinite).
foldernya ampe ga bisa dibuka.
trus gw googling2.
- pake cmd , pake cara buat remove autorun.inf nya SMADAV seperti rmdir, rd, del, erase.
- install winUtilities, Unlocker, pake power shell, dsb.
- trus gw coba robocopy. pake cmd jg. setelah menggila lama , akhirnya nemu juga caranya. yaitu
robocopy [source] [dest] /purge /s /mov
contoh : robocopy c:\hapus\a\ c:\delete\a\ /purge /s /mov
beres deh...
So, ini kesimpulannya :
Pakai Robocopy (using cmd)
command :
robocopy [source] [dest] /purge /s /mov
contoh : robocopy c:\hapus\a\ c:\delete\a\ /purge /s /mov
**dipublish setelah gw liat ini as draft (udah 4 tahun sepertinya...)
using Entity Framework or EF to copy an Object.
using Entity Framework or EF to copy an Object.
This can be used to avoid Error : PK cannot be modified :
we can use this query :
This can be used to avoid Error : PK cannot be modified :
"The property '
MyPrimaryKey' is part of the object's key information and cannot be modified. "
we can use this query :
var item = _context.MyTableName.First(z => z.Name == "Ardi");
var newItem = (MyTableName)_context.Entry(item).GetDatabaseValues().ToObject();
newItem.MyPrimaryKey = "Generated_" + DateTime.Now.ToString();
_context.SaveChanges();
Labels :
C#,
Copy Object,
EF,
Entity Framework,
error,
Primary Key cannot be modified.
Subscribe to:
Posts (Atom)