02 2014 档案
摘要:一、概述 NetCDF全称为network Common Data Format,中文译法为“网络通用数据格式”,对程序员来说,它和zip、jpeg、bmp文件格式类似,都是一种文件格式的标准。netcdf文件开始的目的是用于存储气象科学中的数据,现在已经成为许多数据采集软件的生成文件的格式。 从数学上来说,netcdf存储的数据就是一个多自变量的单值函数。用公式来说就是f(x,y,z,...)=value, 函数的自变量x,y,z等在netcdf中叫做维(dimension)或坐标轴(axix),函数值value在netcdf中叫做变量(Variables).而自变量和函数值在物理学上的一些
阅读全文
摘要:A literal array is created by putting squarebrackets around a comma-separated list of elementseg:# ["zero" , "un" , "dos" , "tre" ]a = ['zero' , 'un' , 'dos' , 'tre' ]# 4a.length# 4a.size# "zero"a[0]# ["un" ,
阅读全文
摘要:ProblemYou want to display an image instead of text as the title of the current view controlleron the navigation controllerSolutionUse the titleView property of the view controller’s navigation item- (void)viewDidLoad { [super viewDidLoad]; /* Create an Image View to replace the Title View */ ...
阅读全文
摘要:ProblemYou would like to directly manipulate the array of view controllers associated with aspecific navigation controllerSolutionUse the viewControllers property of the UINavigationController class to access andmodify the array of view controllers associated with a navigation controller- (void) goB
阅读全文
摘要:ProblemYou would like to allow your users to move from one view controller to the other witha smooth and built-in animation.SolutionUse an instance of UINavigationController.What it's likeIf you’ve used an iPhone, iPod Touch, or iPad before, chances are that you have alreadyseen a navigation con
阅读全文
摘要:http://www.codeproject.com/Articles/556995/MVC-interview-questions-with-answers#What_is_razor_in_MVC
阅读全文
摘要:// View宽,高public int[] getLocation(View v) { int[] loc = new int[4]; int[] location = new int[2]; v.getLocationOnScreen(location); loc[0] = location[0]; loc[1] = location[1]; int w = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); int h = View.MeasureSpec.make...
阅读全文
摘要:You want to be able to allow your users to share content inside your apps with theirfriends, through an interface, such as Facebook and Twitter.SolutionCreate an instance of the UIActivityViewController class and share your contentthrough this class.eg:you have a text field where the user can enter
阅读全文
摘要:Presenting and Managing Views with UIViewControllerProblemYou want to switch among different views in your application.SolutionUse the UIViewController class.(Apple’s strategy for iOS development was to use the model-view-controller (MVC) divisionof labor. Views are what get displayed to users, whil
阅读全文
摘要:You would like to present a few options to your users from which they can pick anoption, through a UI that is compact, simple, and easy to understand.effect:1. declare control#import "ViewController.h"@interface ViewController ()@property (nonatomic, strong) UISegmentedControl *mySegmented
阅读全文
摘要:Picking the Date and Time with UIDatePickereffect:1. declaring a property of type UIDatePicker#import "ViewController.h"@interface ViewController ()@property (nonatomic, strong) UIDatePicker *myDatePicker;@end@implementation ViewController...2. instantiate the date picker- (void)viewDidLoa
阅读全文
摘要:Creating and Using Switches with UISwitchYou would like to give your users the ability to turn an option on or off.effect as follow:SolutionUse the UI...
阅读全文
摘要:1. Viewspresentation:A view (an object whose class is UIView or a subclass of UIView) knows how to draw itself into a rectangular area of the interface.eg: you can drag an interface widget, such as a UIButton, into a view in the nib editor; when the app runs, the button appears, and works properly.i
阅读全文
摘要:synthesize creates setter and getter(从Objective-C 2.0开始,合成可自动生成存取方法)the setter is used by IOS to set the pointer of the object on storyboardwe uses getter anytime we want to call the object on storyboard and send messages属性合成的步骤:1) 在接口部分(也就是头文件)使用@property指令标识属性 eg: @property int numerator, denomina
阅读全文
摘要:http://my.oschina.net/sunboy2050/blog/55749
阅读全文
摘要:names = { "小林", "林", "大卫", "玛丽" }names.each { |name| if /林/ = ~name puts name end}运行结果:小林林
阅读全文