This file contains 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
// using TS V3.7.5 | |
type ClassType<T> = new () => T; | |
class DefaultClass {} | |
class RedClass {} |
This file contains 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
{"lastUpload":"2018-01-19T14:03:34.798Z","extensionVersion":"v2.8.7"} |
This file contains 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
public partial class Window1 : System.Windows.Window | |
{ | |
public Window1() | |
{ | |
InitializeComponent(); | |
System.Windows.Forms.NotifyIcon ni = new System.Windows.Forms.NotifyIcon(); | |
ni.Icon = new System.Drawing.Icon("Main.ico"); | |
ni.Visible = true; |
This file contains 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
controlName.PreviewMouseWheel += PreviewMouseWheel; | |
private new void PreviewMouseWheel(object sender, MouseWheelEventArgs e) | |
{ | |
if (!e.Handled) | |
{ | |
e.Handled = true; | |
var eventArg = new MouseWheelEventArgs(e.MouseDevice, e.Timestamp, e.Delta); | |
eventArg.RoutedEvent = UIElement.MouseWheelEvent; | |
eventArg.Source = sender; |
This file contains 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
public class TrimmedTextBlockVisibilityConverter : IValueConverter | |
{ | |
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) | |
{ | |
if (value == null) return Visibility.Collapsed; | |
FrameworkElement textBlock = (FrameworkElement)value; | |
textBlock.Measure(new System.Windows.Size(Double.PositiveInfinity, Double.PositiveInfinity)); |
This file contains 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
var x = Math.floor(Math.random() * (1 - 0 + 1)) + 0; |
This file contains 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
//Sort values ascending | |
function compareByValueAsc(a, b) { | |
if (a.value < b.value) | |
return -1; | |
if (a.value > b.value) | |
return 1; | |
return 0; | |
} | |
//Sort values descending |
This file contains 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
<script> | |
var x = document.getElementById("demo"); | |
function getLocation() { | |
if (navigator.geolocation) { | |
navigator.geolocation.getCurrentPosition(showPosition); | |
} else { | |
x.innerHTML = "Geolocation is not supported by this browser."; | |
} | |
} | |
function showPosition(position) { |
This file contains 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
//Round a decimal | |
function round(value, decimals) { | |
return Number(Math.round(value + 'e' + decimals) + 'e-' + decimals); | |
} |
This file contains 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
@media(max-width:992px){ | |
.nav>li>a { | |
padding-left: 10px; | |
padding-right:10px | |
} | |
} |