codeblog.vurdalakov.net
CodeBlog: [C#] How to detect if application is running with local administrator rights
http://codeblog.vurdalakov.net/2014/12/cs-how-to-detect-if-app-is-running-with-admin-rights.html
Wednesday, December 17, 2014. C#] How to detect if application is running with local administrator rights. Using System.Security.Principal; public static Boolean HasAdminRights() { try { var user = WindowsIdentity.GetCurrent(); var principal = new WindowsPrincipal(user); return principal.IsInRole(WindowsBuiltInRole.Administrator); } catch { return false; } }. Subscribe to: Post Comments (Atom).
codeblog.vurdalakov.net
CodeBlog: [C#] How to render GitHub-flavored markdown offline
http://codeblog.vurdalakov.net/2014/11/cs-how-to-render-github-flavored-markdown-offline.html
Monday, November 24, 2014. C#] How to render GitHub-flavored markdown offline. 1 Install Strike.IE. 2 Use the following code to generate HTML from GitHub-flavored markdown:. Static public String RenderGithubMarkdow(String markdown) { using (var markdownify = new Strike.IE.Markdownify() { return markdownify.Transform(markdown); } }. The minimal amount of CSS to replicate the GitHub Markdown style. How to render GitHub-flavored markdown with GitHub API. Subscribe to: Post Comments (Atom).
codeblog.vurdalakov.net
CodeBlog: [C#] How to render GitHub-flavored markdown with GitHub API
http://codeblog.vurdalakov.net/2014/11/cs-how-to-render-github-flavored-markdown-with-github-api.html
Monday, November 24, 2014. C#] How to render GitHub-flavored markdown with GitHub API. The following code can be used to generate HTML from GitHub-flavored markdown using GitHub API. Static public String RenderGithubMarkdow(String markdown) { var webClient = new WebClient(); webClient.Headers.Add("User-Agent", "ghmd-renderer"); webClient.Headers.Add("Content-Type", "text/x-markdown"); return webClient.UploadString("https:/ api.github.com/markdown/raw", "POST", markdown); }.
codeblog.vurdalakov.net
CodeBlog: The minimal amount of CSS to replicate the GitHub Markdown style
http://codeblog.vurdalakov.net/2014/11/minimal-amount-of-css-to-replicate-github-markdown-style.html
Tuesday, November 25, 2014. The minimal amount of CSS to replicate the GitHub Markdown style. To replicate the GitHub Markdown style:. 1 Download CSS file. 2 Include it into your HTML code and add a. Class to the styles:. Link rel="stylesheet" href="github-markdown.css" style .markdown-body { min-width: 200px; max-width: 790px; margin: 0 auto; padding: 30px; } /style. Class to any container:. Body class="markdown-body" . /body. April 24, 2016 at 12:48 PM. Subscribe to: Post Comments (Atom).
codeblog.vurdalakov.net
CodeBlog: Encode binary array as a hex string
http://codeblog.vurdalakov.net/2014/11/encode-binary-array-as-hex-string.html
Sunday, November 23, 2014. Encode binary array as a hex string. Std: string hexEncode(unsigned char* buffer, int bufferSize) { std: string hex; hex.reserve(bufferSize * 2 1); const char chars[] = "0123456789ABCDEF"; for (int i = 0; i. 4) and 0x0F]; hex = chars[b and 0x0F]; } return hex; }. Subscribe to: Post Comments (Atom).