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
// During init | |
final MainActivityHelper ui = new MainActivityHelper(this); | |
// ---------------------------------------- | |
// Old usage | |
Button save_button = (Button) findViewById(R.id.save); | |
save_button.setOnClickListener(onSave); | |
// ---------------------------------------- |
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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:x="http://filipfracz.net/schemas/android_extensions/1.0" | |
android:orientation="vertical" | |
android:layout_width="fill_parent" | |
android:layout_height="fill_parent" | |
x:package="net.filipfracz.samples" | |
x:className="MainActivityLayoutHelper"> | |
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="MySample.MyCoolWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | |
<Grid> | |
<Button x:Name="ClearButton">Clear</Button> | |
</Grid> | |
</Window> |
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
EditText name = (EditText)findViewById(R.id.name); | |
EditText address = (EditText)findViewById(R.id.address); | |
RadioGroup types = (RadioGroup)findViewById(R.id.types); | |
Button clear = (Button)findViewById(R.id.clear_button); |
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
ref class CppSafeBuffer : public ::System::Runtime::InteropServices::SafeBuffer | |
{ | |
private: | |
// TODO: Figure out how to handle a custom deleter | |
//std::unique_ptr<const char*>::deleter_type _deleter; | |
public: | |
CppSafeBuffer(std::unique_ptr<const char*> && bytes, | |
const std::size_t size) | |
: ::System::Runtime::InteropServices::SafeBuffer(true) |
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
struct my_element | |
{ | |
int my_element_data; | |
/* Placement of container-specific node data can be easily modified for locality | |
optimization */ | |
struct container__slist_node slist_node; | |
/* A single element can be linked into multiple containers */ | |
struct container__hash_node hash_node; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Bootstrap 101 Template</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<!-- Bootstrap --> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css"> |
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
static void doMagic() | |
{ | |
var form = new System.Windows.Forms.Form(); | |
form.Text = "Drop your pants!"; | |
form.Width = 800; | |
form.Height = 500; | |
var browser = new System.Windows.Forms.WebBrowser(); | |
browser.Anchor = AnchorStyles.Bottom | AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Top; | |
browser.Size = form.Size; | |
browser.Navigate("http://www.youtube.com/embed/uIN48CE6L_I?autoplay=1"); |
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
/* | |
Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. | |
Microsoft Open Technologies would like to thank its contributors, a list | |
of whom are at http://aspnetwebstack.codeplex.com/wikipage?title=Contributors. | |
Licensed under the Apache License, Version 2.0 (the "License"); you | |
may not use this file except in compliance with the License. You may | |
obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.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
<messages> | |
<message name="AccountListRequest" msgcat="app" msgtype="123456"> | |
<field name="AccountListRequestID" required="Y" /> | |
</message> | |
<message name="AccountListResponse" msgcat="app" msgtype="123457"> | |
<field name="AccountListRequestID" required="Y" /> | |
<component name="AccountData" repeats="Y" /> | |
</message> | |