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
#import <Foundation/Foundation.h> | |
@interface LimitFormatter : NSFormatter { | |
} | |
@property int maxLength; | |
@end |
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
public class Foo | |
{ | |
public void Do(int bar, string baz) | |
{ | |
Console.WriteLine(GetCallerMethodName()); | |
} | |
public void Do(int bar) | |
{ | |
this.Do(bar, null); |
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
CFDictionaryRef dict; | |
/* | |
Get some dictionary... | |
*/ | |
SInt32 intVal = 0; | |
CFNumberRef cfIntVal; | |
char* strVal; | |
CFStringRef cfStrVal; |
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
<Window x:Class="Test.ArbitraryShapeForm" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="ArbitraryShapeForm" | |
AllowsTransparency="True" | |
Background="Transparent" | |
WindowStyle="None"> | |
<Canvas Width="300" Height="300"> | |
<Path Stroke="Gray" StrokeThickness="2"> |
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
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Windows.Data; | |
namespace Converters | |
{ | |
public class PathEllipsisConverter : IValueConverter | |
{ | |
private const string EllipsisChars = "..."; |
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
<Window x:Class="TabControlExp.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="MainWindow" Height="350" Width="525"> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="auto" /> | |
<RowDefinition Height="*" /> | |
</Grid.RowDefinitions> |
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
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Media; | |
namespace iburlakov | |
{ | |
public class CalloutBorder : Decorator | |
{ | |
private const double DEFAULT_POINTER_HEIGTH = 20D; | |
private const double DEFAULT_POINTER_WIDTH = 10D; |
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
NSString * | |
getDomainName() { | |
// "dsconfigad --show" command returns domain which mac joined to or nothing if mac is not joined to any domain | |
NSTask *task = [[NSTask alloc] init]; | |
[task setLaunchPath:@"/usr/sbin/dsconfigad"]; | |
[task setArguments: [NSArray arrayWithObjects:@"--show", nil]]; | |
NSPipe *pipe = [NSPipe pipe]; | |
[task setStandardOutput: pipe]; | |
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
// calculate amount of 1 digits in given number | |
function calc(num) { | |
var digits = 0; | |
do { | |
if (num & 1) { | |
digits++; | |
} | |
num = num >>> 1 | |
} while (num != 0); |
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
// | |
// TaskLauncher.h | |
// sandbox-nstask | |
// | |
// Created by Ivan Burlakov on 11/12/15. | |
// Copyright © 2015 Ivan Burlakov. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
OlderNewer