Skip to content

Instantly share code, notes, and snippets.

@pinda
pinda / c#
Last active January 13, 2016 15:01
Inheritance
public class Bar {
public string Baz;
public Bar(int x)
{
// Do something here
}
}
public class Foo : Bar {
@pinda
pinda / gist:ae02b5d4a9164bd68a38
Created May 21, 2014 14:44
UIWebView horizontal scroll
// Alter the webview contentsize after loading page
- (void)webViewDidFinishLoad:(UIWebView *)webView {
// Set the width and height of the content size, in your case the width bigger than the screen width
[webView.scrollView setContentSize:CGSizeMake(myWidth, myHeight)];
}
@pinda
pinda / gist:1926560
Created February 27, 2012 19:44
FayeClient
for (NSString* channel in _objects) {
FayeClient* client = [[FayeClient alloc] initWithURLString:@"ws://localhost:8001/faye"
channel:[NSString stringWithFormat:@"/%@", channel]];
client.delegate = self;
[client connectToServer];
}
@pinda
pinda / gist:1836504
Created February 15, 2012 15:07
Redirect met jquery
if (jQuery.browser.mobile == true) {
window.location = 'http://Hier-de-URL-die-je-wilt-hebben';
}
@pinda
pinda / gist:1560010
Created January 4, 2012 13:21
JSon of tastypie
{"objects":
[{
"created_at": "2011-12-20T13:22:34",
"title": "Test",
"sender": "/api/v1/users/1/",
"dates": ["/api/v1/dates/4/"],
}
]
}
jsonify_paginated(url=url_for('events_program_list', slug=slug),
page=page,
extra_context={'filter': request.args.get('filter', None) },
shows=show_list)
<div id="fotoslider">
<!-- slide -->
<div class="slide">
<img src="" />
</div>
<!-- slide -->
<div class="slide">
<img src="" />
</div>
self.subtitleLabel = [[UILabel alloc] initWithFrame:CGRectMake(108, 32, self.view.width - 120, 0)];
self.subtitleLabel.font = [UIFont fontWithName:@"Helvetica" size: 12.0];
self.subtitleLabel.textColor = RGBCOLOR(136, 136, 136);
self.subtitleLabel.backgroundColor = [UIColor clearColor];
[self.view addSubview:self.subtitleLabel];
<form action="" method="post">
<!-- column 1 -->
<div class="column">
<!-- veld 1 -->
<p>
<label></label>
<input />
</p>
<p>
<label></label>