Skip to content

Instantly share code, notes, and snippets.

View robertstefan's full-sized avatar
:octocat:
Working from home

Robert Ștefan Stănescu robertstefan

:octocat:
Working from home
View GitHub Profile
@robertstefan
robertstefan / script.md
Created May 26, 2021 10:07 — forked from zmts/script.md
Vue.js Preview image file

Preview image file(vue.js)

// https://jsfiddle.net/mani04/5zyozvx8/

new Vue({
    el: '#app',
    template: `
        <div>
            <div class="file-upload-form">
LPCTSTR = Long Pointer to a Const TCHAR STRing (Don't worry, a Long Pointer is the same as a pointer. There were two flavors of pointers under 16-bit windows.)
Here's the table:
LPSTR = char*
LPCSTR = const char*
LPWSTR = wchar_t*
LPCWSTR = const wchar_t*
LPTSTR = char* or wchar_t* depending on _UNICODE
LPCTSTR = const char* or const wchar_t* depending on _UNICODE
@robertstefan
robertstefan / index.html
Created August 31, 2018 08:08 — forked from phil-pedruco/index.html
Plotting a bell (Gaussian) curve in d3
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Normal Plot</title>
<meta name="description" content="">
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style type="text/css">
@robertstefan
robertstefan / Example.cs
Created February 21, 2017 09:37 — forked from huanlin/Example.cs
Helper classes for change printer settings with P/Invoke.
void GetDefaultPaperSize()
{
var devMode = PInvoke.PrinterHelper.GetPrinterDevMode(null);
string s = String.Format("{0} : {1} x {2}", devMode.dmPaperSize, devMode.dmPaperWidth, devMode.dmPaperLength);
Console.WriteLine(s);
}
void SetDefaultPaperSize()
{
string formName = "User defined";
@robertstefan
robertstefan / App.cs
Last active December 2, 2015 17:22
C# ConsoleSpinner
static void Main(string[] args)
{
var spin = new ConsoleSpinner();
Console.Write("Working....");
while (true)
{
spin.Turn();
}
/*
@robertstefan
robertstefan / GetExecutingFolderPath.cs
Created September 22, 2015 17:37
Get current running folder path
public static string AssemblyDirectory
{
get
{
string codeBase = Assembly.GetExecutingAssembly().CodeBase;
UriBuilder uri = new UriBuilder(codeBase);
string path = Uri.UnescapeDataString(uri.Path);
return Path.GetDirectoryName(path);
}
}