Skip to content

Git clone authentication password with special character

try using the URL Encoded value of the @ symbol if you’re passing the password in the url:

git clone https://userId:pwd%40123@gitserverurl
Advertisements

Create repo from an existing project

    1. Go into the directory containing the project.
    2. Type git init .
    3. Type git add . to add all of the relevant files.
    4. You’ll probably want to create a .gitignore file right away, to indicate all of the files you don’t want to track. Use git add .gitignore , too.
    5. Type git commit .

 

C#: XOR operation got error Cannot implicitly convert type int to byte.

How to solve error ” error CS0266: Cannot implicitly convert type ‘int’ to ‘byte’. An explicit conversion exists (are you missing a cast?)” in C#: XOR operation? Just pust cast as byte to final operation

 

  1. before:  output[i] = ((oper1[j] ^ oper2[j]) ^ oper3[i]);
  2. after:  output[i] = (byte)((oper1[j] ^ oper2[j]) ^ oper3[i]);

C#: Compile app in x64 (64bit) and linking with x86 (32bit) DLL

When compile a C# app and linking with x86 (32bit) DLL, got this error: “That error is the Win32 error ERROR_BAD_EXE_FORMAT” or similar error. This occur when your DLL is x86 (32bit) platform and your is x64 (64bit) platform. To solve this problem, add platform switch at csc.exe command:

Type this at your command line:
csc /platform:x86 HelloWorld.cs

This command save me when I got that problem. I was working on app development for RFID / smartcard project. The RFID is ACR120U. The reader drivers (DLL) was compiled using  x86 platform but my laptop is x64 platform. I dont want to use new reader because my organization got too many stock for this reader (ACR120U).

What are the C# equivalent of these C datatype?

signed char c; -> SByte c;
unsigned char b; -> Byte b;
signed short s; -> Int16 s;
unsigned short w; -> UInt16 w;
signed long l; -> Int32 l;
unsigned long u; -> UInt32 u;
float f; -> Single f; (though ‘float’ still works)
double *d; -> Double d; (was this meant to be a pointer???)
char *p; -> String s; (assuming its a string here, in the marshaling you can tell it whether it is ASCII or wide char format)

Create opencart module

Today i want to develop opencart module. My goal is provide product option with quantity…first step is learn how vurrent opencart catalog working

Kuih tradisional – limas (limaih)

Hari ini ibuku bercerita tentang cara membuat temalung limas (limaih). Kemahiran untuk membuat temlaung limas bukan lah perkara yang mudah.