Catatan

Tunjukkan catatan dari 2021

Apa itu .gitignore

 Rujukan artikel :  Ignoring in Git: How To Use .gitignore Files When  making commits to any Git repository , you’ll choose the files you want to stage and then you’ll commit them. But you might not want to commit every single one of your files—there are files that never need to get committed. This is where the .gitignore file is useful: it tells Git exactly which files to ignore and never track. Let’s take a look. What is gitignore? When you’re working in your copy, Git  watches every file  in and considers it in three ways: Tracked: You’ve already staged or committed the file. Untracked: You’ve not staged or committed. Ignored: You’ve explicitly told Git to ignore the file(s). The .gitignore file tells Git which  files to ignore  when committing your project to the GitHub repository. gitignore is located in the root directory of your repo. The .gitignore file itself is a plain text document. Here’s an  example .gitignore file : Copy # Binaries for programs and plugins *. exe *. exe

[PSH,ACK] wireshark capture

Reference : https://osqa-ask.wireshark.org/questions/20423/pshack-wireshark-capture/ This is basic TCP communications flow. The ACK indicates that a host is acknowledging having received some data, and the PSH,ACK indicates the host is acknowledging receipt of some previous data and also transmitting some more data. Google will let you search for more info about basic TCP communication.   ACK means that the machine sending the packet with ACK is acknowledging data that it had received from the other machine. In TCP, once the connection is established,   all   packets sent by either side will contain an ACK, even if it's just re-acknowledging data that it's already acknowledged. PSH is an indication by the sender that, if the receiving machine's TCP implementation has not yet provided the data it's received to the code that's reading the data (program, or library used by a program), it should do so at that point. To quote  RFC 793 , the official specification for TCP

Force Execute File to Run As Administrator

Imej
Right-click your WPF project to add new Item: "Add->New Item..." Select "Application Manifest File" and click Add Double Click your newly created manifest file and change the <requestedExecutionLevel level="asInvoker" uiAccess="false" /> to <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> Then the WPF application would run as Administrator. References link:  https://stackoverflow.com/a/53431997

How to make Windows Service start as "Automatic (Delayed Start)" ?

  Now that .NET 4.0 is here: serviceInstaller1.StartType = ServiceStartMode.Automatic; serviceInstaller1.DelayedAutoStart = true ; https://stackoverflow.com/a/9525289

Stop and Start a service via batch or cmd file?

  net start [serviceName] and net stop [serviceName] tell you whether they have succeeded or failed pretty clearly. For example U:\>net stop alerter The Alerter service is not started. More help is available by typing NET HELPMSG 3521. If running from a batch file, you have access to the ERRORLEVEL of the return code. 0 indicates success. Anything higher indicates failure. As a bat file,  error.bat : @echo off net stop alerter if ERRORLEVEL 1 goto error exit :error echo There was a problem pause The output looks like this: U:\>error.bat The Alerter service is not started. More help is available by typing NET HELPMSG 3521. There was a problem Press any key to continue . . . Return Codes - 0 = Success - 1 = Not Supported - 2 = Access Denied - 3 = Dependent Services Running - 4 = Invalid Service Control - 5 = Service Cannot Accept Control - 6 = Service Not Active - 7 = Service Request Timeout - 8 = Unknown Failure - 9 = Path Not Found - 10 = Service Already Running -

How to run a ".bat" file during installation?

  62 Well, after much searching and trial and error I have solved this. I'm not sure if this is the best way, but it works. Here's the scenario: I have an application I would like to deploy via a Visual Studio Setup project. In addition to my application files, I would like to create a subdirectory in the target directory that contains a batch (.bat) file. I would like this file to run at the end of the installation process. Here's what you do: Create a setup project and configure as you normally would, including the subdirectory in which you'll place your batch file (you can just place it in the Application Folder directly if you don't want it in a subdirectory). In the "File System" view (right-click on the project in Solution Explorer->View->File System), add the batch file you want to execute  and  cmd.exe (C:\Windows\System32\cmd.exe) Open the "Custom Actions" view (right-click on the project in Solution Explorer->View->Custom Ac

Windows update services was disabled

 Windows update error (0x80080005) and Net start wuauserv Reference:  https://answers.microsoft.com/en-us/windows/forum/all/windows-update-error-0x80080005-and-net-start/da8cab53-2a01-43d5-bf3e-27f020bfff17 Hello, Please run  Windows Update troubleshooter  from Settings app > Update & security > Troubleshoot. See if it helps. If not, s uggest you to run System File Checker scan: 1. Search for 'command prompt' using Cortana or Windows Search. 2. From results, right click on Command Prompt and select Run as administrator. 3. Type  sfc /scannow  command and press Enter key. 4. Let the command complete and then reboot the machine. If SFC can fails, try these steps: 1. Search for 'windows powershell' using Cortana or Windows Search. 2. From results, choose Windows PowerShell and select Run as administrator. 3. Then type/paste following and press Enter key: Repair-WindowsImage -Online -RestoreHealth 4. Let the command complete, restart your system then. Now try to s

ASP.Net perform auto reload

Imej
Working with SQL Server ROWCOUNT

ASP.NET show console

Page.Response.Write("<script>console.log(' Message : " + message + "');</script>");

Windows 10 shows Security Tab

Imej
  The Problem: The Solutions: Reference: Windows 10 Security Tab missing from file properties -  https://superuser.com/a/1522619

Git Reflog : Recover deleted git commit

Imej
 Recover deleted git commit using git reflog https://stackoverflow.com/a/34751908 References: bitbucket -  https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog error: Your local changes to the following files would be overwritten by checkout -  https://stackoverflow.com/questions/22424142/error-your-local-changes-to-the-following-files-would-be-overwritten-by-checkou Recovering a deleted branch from a remote on Bitbucket (git) -  https://stackoverflow.com/questions/15596670/recovering-a-deleted-branch-from-a-remote-on-bitbucket-git

Name cannot begin with the '<' character, hexadecimal value 0x3C

Imej
Problem : Name cannot begin with the '<' character, hexadecimal value 0x3C Solution : .resx corrupt due to bad merging from git

Git Pull Repository

Imej
  References: https://www.datree.io/resources/git-force-pull