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
commit de7ef99e819e2f6091dee4ead0f400924e76ec08 | |
Author: Vladimir Pouzanov <[email protected]> | |
Date: Sun Feb 8 19:23:25 2009 +0200 | |
Added more api docs to CPObject | |
diff --git a/Foundation/CPObject.j b/Foundation/CPObject.j | |
index a586e6a..b868521 100644 | |
--- a/Foundation/CPObject.j | |
+++ b/Foundation/CPObject.j |
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
@import <Foundation/CPObject.j> | |
/*! | |
Helper function to load xml documents | |
*/ | |
function XmlFromString(xmlData) | |
{ | |
if (window.ActiveXObject) { | |
//for IE | |
xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); |
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
+ (id)dictionaryWithObjectsAndKeys:(id)firstObject, ... | |
{ | |
// XXX: duplicate implementation is bad, but so it's done in CPArray | |
// The arguments array contains self and _cmd, so the first object is at position 2. | |
debugger; | |
var d = [self alloc]; | |
var arglist = [d, "initWithObjectsAndKeys:"]; | |
for(var i = 2; i<arguments.length; ++i) | |
arglist[i] = arguments[i]; | |
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 <iostream> | |
#include <string.h> | |
#include <stdlib.h> | |
#define SIZE 3 | |
class Comparator | |
{ | |
private: | |
int items[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
#include <iostream> | |
#include <string.h> | |
#include <stdlib.h> | |
#define SIZE 3 | |
class Comparator | |
{ | |
private: | |
int items[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
<?xml version="1.0" encoding="UTF-8" ?> | |
<!-- | |
This awful thing parses vkontakte.ru/mail.php | |
I am *NOT* proud of it. C'est la vie. | |
Created by Farcaller on 2009-02-17. | |
Copyright (c) 2009 Hack&Dev FSO. All rights reserved. | |
--> | |
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
def FixFuckingJSON(s): | |
'''FixFuckingJSON(bad_json) -> good_json | |
Fixes integer keys in json | |
''' | |
RX=re.compile(r'(\d+)') | |
r = [] | |
m = RX.search(s) | |
while m: | |
r.append(m.group(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
diff --git a/d20tools/postparser.py b/d20tools/postparser.py | |
index f3af4fe..638c529 100644 | |
--- a/d20tools/postparser.py | |
+++ b/d20tools/postparser.py | |
@@ -3,10 +3,16 @@ import re, random | |
RX_DICE = re.compile(r'[^>](?P<dname>(?P<cnt>\d+)d(?P<dice>\d+)(?P<mod>[-+]\d+|))') | |
RX_DIRECT = re.compile(r'^((\w+), *)+:') # FIXME | |
+RDEV = None | |
+ |
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
- (void)onCatalog | |
{ | |
RSSCatalogController *c = [[RSSCatalogController alloc] initWithNibName:@"RSSCatalogController" bundle:nil]; | |
c.title = @"Catalog"; | |
#ifdef USE_BLOCKS | |
UIActivityIndicatorView *scrollerView = [[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite] autorelease]; | |
[scrollerView startAnimating]; | |
UIBarButtonItem *scrollerItem = [[[UIBarButtonItem alloc] initWithCustomView:scrollerView] autorelease]; | |
UIBarButtonItem *oldItem = [self.navigationItem.rightBarButtonItem retain]; | |
[self.navigationItem setRightBarButtonItem:scrollerItem animated:YES]; |
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
-(void)loadScrollView | |
{ | |
[[NSUserDefaults standardUserDefaults] setObject:self.dataSourceArray | |
forKey:@"data"]; | |
[[NSUserDefaults standardUserDefaults] synchronize]; | |
for (NSInteger i=0; i < [self.dataSourceArray count]; i++) | |
{ | |
NSString *textString = [[self.dataSourceArray objectAtIndex:i] | |
objectForKey:kLabelTextKey]; | |
// ^^ это медленно, используй fast enumeration: for(xx in yy) |
OlderNewer