Skip to content

Instantly share code, notes, and snippets.

@quique123
quique123 / MainActivity.java
Created May 27, 2011 21:29
Marakana OAuth Demo
package com.marakana.oauth;
import oauth.signpost.OAuth;
import oauth.signpost.OAuthConsumer;
import oauth.signpost.OAuthProvider;
import oauth.signpost.basic.DefaultOAuthProvider;
import oauth.signpost.commonshttp.CommonsHttpOAuthConsumer;
import oauth.signpost.exception.OAuthCommunicationException;
import oauth.signpost.exception.OAuthExpectationFailedException;
import oauth.signpost.exception.OAuthMessageSignerException;
- (void)save {
[shipment setValue:nameTextField.text forKey:@"shipperName"];
[shipment setValue:[NSDate date] forKey:@"rfqDate"];
NSError *error = nil;
if (![shipment.managedObjectContext save:&error]) {
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
abort();
}
@quique123
quique123 / AddShipmentModalVC.m
Created January 29, 2011 03:35
List View Controller for Shipments
- (void)save {
AppDelegate_Phone *appDelegate = [[UIApplication sharedApplication] delegate];
NSManagedObjectContext *managedObjectContext = [appDelegate managedObjectContext];
Shipment *newShipment = (Shipment *)[NSEntityDescription insertNewObjectForEntityForName:@"Shipment" inManagedObjectContext:managedObjectContext];
[newShipment setValue:nameTextField.text forKey:shipment.shipperName];
NSError *error = nil;
if (![shipment.managedObjectContext save:&error]) {
NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Option Explicit
Dim objConn, objRS, strSQL, strConnection ' Conexion-RS-query y string de conexion
Dim i, a, b, ventasdelmes ' contador, dia, mes, ventasdelmes
Dim xmlDoc, text
' -- Create objects
-(void)downloadPlist{
NSLog(@"Getting xml file");
// USE UDID TO GET FILE - i think this is useless..
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
//Make GET FILE INTERACTIVE
//BUT MAKE THIS ONE GET THE SQLITE FILE OFF THE NET
NSString *prefix = [NSString stringWithString:@"http://www.domain.com/app/"];
NSString *finalString = [prefix stringByAppendingString:@"test2.xml"];
NSLog(@"%@", finalString);
//
// PeopleListViewController.m
// Paparazzi
//
// Created by Marcio Valenzuela on 2/20/10.
// Copyright 2010 Personal. All rights reserved.
//
#import "PeopleListViewController.h"
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
@interface ViewController : UIViewController<UIImagePickerControllerDelegate,
UINavigationControllerDelegate> {
UIImagePickerController* imagePickerController;
IBOutlet UIImageView *imageView;
//
// PeopleListViewController.m
// Paparazzi
//
// Created by Marcio Valenzuela on 2/20/10.
// Copyright 2010 Personal. All rights reserved.
//
#import "PeopleListViewController.h"
//
// PeopleListViewController.m
// Paparazzi
//
// Created by Marcio Valenzuela on 2/20/10.
// Copyright 2010 Personal. All rights reserved.
//
#import "PeopleListViewController.h"
#import "Photo.h"
-(void)synchronousLoadFlickrData{
NSLog(@"BEGINLOADINGflickr dictionary");
PaparazziAppDelegate *appDelegate= (PaparazziAppDelegate *)[[UIApplication sharedApplication] delegate];
// GET PLIST FILE INFO
filePath = [[NSBundle mainBundle] pathForResource:@"FakeData" ofType:@"plist"];
if (filePath)
{
// CREATE FLICKR ARRAY FROM PLIST FILE PATH