我一直在尝试以下命令:
rsync -rvz --progress --remove-sent-files ./dir user@host:2222/path
Run Code Online (Sandbox Code Playgroud)
SSH在端口2222上运行,但是rsync仍然尝试使用端口22然后抱怨没有找到路径,因为它当然不存在.
我想知道是否可以rsync到非标准ssh端口上的远程主机.
我正在通过"IOS编程:大书呆子牧场指南(第2版)"自学Objective-C和iOS编程,我遇到了一个问题,教程要求我创建与App Delegate对象的连接,但是这个对象没有出现在"接口"构建器的"对象"列表中.对于我来说,我非常确定它是一个拼写错误,也可能是版本不同,因为这本书略微落后于我的Xcode版本(4.2).我已经包含了代码.我相当确定MOCAppDelegate对象应该在IB中出现,但我还不熟悉,知道我需要做什么代码更改.具体问题:如何调整下面的代码,以便在Objects列表中获取一个对象在IB中,以便我可以按照教程图形中的说明执行连接?
注意:我研究并发现:在将实例变量连接到AppDelegate时遇到问题但这个解决方案对我不起作用(或者我没有正确实现)
头文件
#import <UIKit/UIKit.h>
#import <CoreLocation/CoreLocation.h>
#import <MapKit/MapKit.h>
@interface MOCAppDelegate : UIResponder <UIApplicationDelegate, CLLocationManagerDelegate>
{
CLLocationManager *locationManager;
IBOutlet MKMapView *worldView;
IBOutlet UIActivityIndicatorView *activityIndicator;
IBOutlet UITextField *locationTitleField;
}
@property (strong, nonatomic) IBOutlet UIWindow *window;
@end
Run Code Online (Sandbox Code Playgroud)
实施档案
#import "MOCAppDelegate.h"
@implementation MOCAppDelegate
@synthesize window = _window;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//Create location manager object
locationManager = [[CLLocationManager alloc] init];
[locationManager setDelegate:self];
//We want all results from the location manager
[locationManager setDistanceFilter:kCLDistanceFilterNone];
//And we want it to be …Run Code Online (Sandbox Code Playgroud) 我试图使用Ember和Ember/Data来显示从REST API返回的简单JSON.
这是我的js:
window.ManageClients = Em.Application.create();
ManageClients.store = DS.Store.create({
revision: 4,
adapter: DS.RESTAdapter.create({
bulkCommit: false,
namespace: "api"
})
});
ManageClients.Client = DS.Model.extend({
url: '/clients',
name: DS.attr('string'),
slug: DS.attr('string'),
programs: DS.attrArray('string'),
selfserve: DS.attrArray('string')
});
ManageClients.Clients = ManageClients.store.findAll(ManageClients.Client);
ManageClients.ClientsView = Em.View.create({
templateName: 'client-template'
});
ManageClients.ClientsView.appendTo('#ManageClients');
Run Code Online (Sandbox Code Playgroud)
我的模板:
<div id="ManageClients">
<script type="text/x-handlebars" data-template-name="client-template">
<ul>
{{#each ManageClients.Clients}}
<li>
{{#if isLoaded}}
Client:{{name}}
{{else}}
Loading...
{{/if}}
</li>
{{/each}}
</ul>
</script>
</div>
<script language="javascript" src="/js/manageClients.js"></script>
Run Code Online (Sandbox Code Playgroud)
错误:
Uncaught TypeError: Object ManageClients.Client has no method '_create' ember-data.js:1811
DS.Store.Ember.Object.extend.materializeRecord ember-data.js:1811
DS.Store.Ember.Object.extend.findByClientId …Run Code Online (Sandbox Code Playgroud)