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
Thumbs.db | |
*.obj | |
*.exe | |
*.pdb | |
*.user | |
*.aps | |
*.pch | |
*.vspscc | |
*_i.c | |
*_p.c |
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
$ gcc struct.c -o struct | |
$ ./struct | |
a.Bar: 1 | |
b.Bar: 2 | |
a.Bar: 2 | |
b.Bar: 1 |
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
puts ARGF.read |
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 ValidationMethods | |
{ | |
private IDictionary<object, Func<object, object, Boolean>> _functionTable; | |
public IDictionary<object, Func<object, object, Boolean>> FunctionTable | |
{ | |
get | |
{ | |
return _functionTable | |
?? (_functionTable = new Dictionary<object, Func<object, object, bool>>()); |
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
RootFrame.BackKeyPress += (o, args) => | |
{ | |
if (o is PhoneApplicationFrame) | |
{ | |
var j = o as PhoneApplicationFrame; | |
var listPicker = "/Microsoft.Phone.Controls.Toolkit;component/ListPicker/ListPickerPage.xaml"; | |
if (j.Source.OriginalString == listPicker) | |
{ | |
return; | |
} |
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
/// <summary> | |
/// Raises the PropertyChanged event if needed. | |
/// </summary> | |
/// <typeparam name="T">The type of the property that | |
/// changed.</typeparam> | |
/// <param name="propertyExpression">An expression identifying the property | |
/// that changed.</param> | |
[SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate", | |
Justification = "This cannot be an event")] | |
[SuppressMessage( |
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
#include <stdio> | |
#include <stdlib> | |
#include <stdarg> | |
#include <winsock.h> | |
#include <errno.h> | |
#define WIN32_LEAN_AND_MEAN | |
#define _SERVER_PORT 6667 | |
#define _SERVER_HOST "irc.freenode.org" | |
#define _SECURE_LOGIN |
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 StreamByteConverter | |
{ | |
private byte[] m_Data; | |
private int m_Size; | |
private int m_Index; | |
public Stream( byte[] data, int size, bool fixedSize ) | |
{ | |
m_Data = data; | |
m_Size = size; |
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
/// <summary> | |
/// Convert between Boolean? and String | |
/// </summary> | |
public class BooleanToStringConverter : IValueConverter | |
{ | |
public object Convert( object value, Type targetType, object parameter, CultureInfo culture) | |
{ | |
// bool? to string. | |
bool castValue = (value as bool?) ?? false; |
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
///<Summary> | |
/// Converts a hexadecimal colour code (8-hex with alpha) into a .net Color struct. | |
///</Summary> | |
///<remarks> | |
/// If the input string is invalid, will throw an exception from parsing, you | |
/// should handle this in the callee. | |
///</remarks> | |
///<param name="colour">The colour in numerical form. Prefix with # for hexadecimal format.</param> | |
///<example> | |
/// Example of converting hexadecimal string and ulong values to a Color. |
OlderNewer