Skip to content

Instantly share code, notes, and snippets.

@LazyClutch
LazyClutch / SwiftReflection.swift
Last active September 24, 2018 19:59
Swift Reflection
// The test code of Swift Reflection API: http://appventure.me/2015/10/24/swift-reflection-api-what-you-can-do/
import UIKit
public class Store {
let storesToDisk: Bool = true
}
public class BookmarkStore: Store {
let itemCount: Int = 10
}
@chrisdiana
chrisdiana / jquertips.md
Created October 22, 2015 16:45
jQuery Tips
@peace2048
peace2048 / DropDownButton.cs
Created May 19, 2015 08:51
WPF DropDownBox
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
namespace WpfApplication1
{
[TemplatePart(Name = PART_ContentPresenter, Type = typeof(ContentPresenter))]
[TemplatePart(Name = PART_DropDownButton, Type = typeof(ToggleButton))]
$(document).ready(function() {
$('button#show').on('click', function() {
£('p').show();
});
$('button#hide').on('click', function() {
$('p').hide();
});
});
@andidp
andidp / click_jquery.js
Created February 17, 2015 09:05
jquery click
<html>
<head>
<title>title</title>
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script>
$(document).ready(function(){
$('#sel div a').click(function(){
console.log( this.rel );
@aalmiray
aalmiray / Test.java
Created August 6, 2014 16:22
Glazedlists + JavaFX ?!?
package griffon.plugins.glazedlists;
import ca.odell.glazedlists.gui.TableFormat;
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.scene.Scene;
import javafx.scene.control.TableView;
import javafx.stage.Stage;
<!DOCTYPE html>
<html>
<head>
<style>
html, body {
-webkit-font-smoothing: subpixel-antialiased;
}
#links {
display: block;
color: #ddd;
@sdenchev
sdenchev / MainWindow.xaml
Last active July 25, 2023 21:42
WPF filtering with CollectionView
<Window x:Class="Filtering.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:l="clr-namespace:Filtering"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<l:MainWindowViewModel x:Key="ViewModel"/>
</Window.Resources>
<Grid DataContext="{StaticResource ViewModel}">
<ListView ItemsSource="{Binding Collection}"/>
@ravidaram
ravidaram / addclass
Created August 15, 2013 23:54
methods-jquery
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>addClass demo</title>
<style>
p {
margin: 8px;
font-size: 16px;
}
@fakiolinho
fakiolinho / jQuery: jQuery Existence
Created April 21, 2013 12:02
jQuery: jQuery Existence
<!-- Check if jQuery already exists -->
<script type="text/javascript">
(function() {
if(window.jQuery === undefined)
{
document.write('<script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.js"><\/script>');
}
else
{
jQuery = window.jQuery;