This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ choco uninstall pdftk-server | |
| Chocolatey v0.10.10 | |
| Uninstalling the following packages: | |
| pdftk-server | |
| pdftk-server v2.02 | |
| WARNING: pdftk-server has already been uninstalled by other means. | |
| Running auto uninstaller... | |
| Skipping auto uninstaller - The uninstaller file no longer exists. ""C:\Program Files (x86)\PDFtk Server\unins000.exe"" | |
| pdftk-server has been successfully uninstalled. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Even though it does not say so, it does install to proper location | |
| $ choco install keepass -ia "'/DIR=D:\PFiles_x64\choco\keepass'" | |
| Chocolatey v0.10.11 | |
| Installing the following packages: | |
| keepass | |
| By installing you accept licenses for the packages. | |
| Progress: Downloading keepass.install 2.39.1... 100% | |
| Progress: Downloading keepass 2.39.1... 100% | |
| keepass.install v2.39.1 [Approved] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PS > choco install googlechrome -ia "'INSTALLFOLDER=D:\PFiles_x64\choco\chrome'" -y | |
| Chocolatey v0.10.11 | |
| Installing the following packages: | |
| googlechrome | |
| By installing you accept licenses for the packages. | |
| Progress: Downloading GoogleChrome 68.0.3440.8400... 100% | |
| GoogleChrome v68.0.3440.8400 [Approved] | |
| googlechrome package files install completed. Performing other installation steps. | |
| WARNING: Unable to find the architecture of the installed Google Chrome application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # moved to https://github.com/atiq-cs/Scripts-And-Utilities/wiki/choco-batch-install-or-upgrade |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| UVA#11557 Reference | |
| Solution Link: | |
| This is the chinese solution acquired from: http://blog.csdn.net/accelerator_/article/details/38783651 | |
| referred by Yonghui Wu (http://www.cs.fudan.edu.cn/en/?page_id=2269) | |
| Generates | |
| Complexity: | |
| Generates Pattern string from the input code fragment of repository n times: | |
| P[1...m], P[2...m], P[3...m], P[4...m], ....., P[m..m] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // O(N) Time , O(lg N) Space | |
| public class Solution { | |
| IList<int> nodeList = null; | |
| public IList<int> RightSideView(TreeNode root) { | |
| nodeList = new List<int>(); | |
| FindRight(root); | |
| return nodeList; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // O(N), O(N) | |
| public class Solution { | |
| public int Rob(int[] nums) { | |
| var dp = new int[nums.Length]; | |
| for (int i=0; i<nums.Length; i++) | |
| dp[i] = Math.Max((i < 2? 0 : dp[i-2]) + nums[i], i<1? 0 : dp[i-1]); | |
| return nums.Length == 0 ? 0 : dp[nums.Length-1]; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // O(row*col), O(1), O(row+col) stack space | |
| public class Solution { | |
| char[][] grid; | |
| public int NumIslands(char[,] grid) { | |
| int count = 0; | |
| for (int r=0; r<numRows; r++) | |
| for (int c=0; c<numCols; c++) | |
| if (grid[r][c] == '1') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // complexity less than n lg n | |
| public class Solution { | |
| List<List<Node>> vertListPos; // for positive | |
| List<List<Node>> vertListNeg; // for negative | |
| List<List<Node>> vertList = null; // pointer | |
| internal class Node { | |
| public int val { get; set; } | |
| public int level { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // for leetcode meetup | |
| // O(2^n), O(2^n) | |
| public IList<IList<int>> Subsets(int[] nums, int index = nums.Length) { | |
| if (index == 0) | |
| return new List<IList<int>>(new IList<int>[] { new List<int>() }); | |
| var temp = Subsets(nums, index - 1); | |
| int tempLength = temp.Count; | |
| for (int i = 0; i < tempLength; i++) { |