我刚刚开始使用Elixir并且已经使用了很多iexshell.我可以将"会话"保存/记录到文件中吗?
谢谢.
我正在阅读" Gulp入门"(2015年1月出版)一书,但我意识到因为Gulp的开发速度非常快,所以可能已经过时了.
这是我的gulpfile:
// Modules & Plugins
var gulp = require('gulp');
var concat = require('gulp-concat');
var myth = require('gulp-myth');
var uglify = require('gulp-uglify'); // newly added
var jshint = require('gulp-jshint'); // newly added
var imagemin = require('gulp-imagemin');
// let's add two node.js modules:
var connect = require('connect');
// var serve = require('serve-static');
var browsersync = require('browser-sync');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var plumber = require('gulp-plumber');
// Tasks
// styles task
gulp.task('styles', function(){
return gulp.src('app/css/*.css')
// now …Run Code Online (Sandbox Code Playgroud) 正如标题所述,我对Emacs来说相对较新.我尝试了几个入门套件,但是使用Prelude并改变了很多东西.
无论如何,我已经掌握了很好的一切......直到今天早上我工作,我输入了双引号.通常,由于自动完成,Emacs会在("")之后插入第二个双引号,但是我必须通过击键意外地改变了某些内容,现在当我键入"时,我得到\"\".
思考?
谢谢.
我现在一直在努力奋斗这几天,我可以使用一些指导.
以下是我原始Podfile的内容:
pod 'Parse', '~> 1.7.1'
pod 'ParseUI', '~> 1.1.3'
pod 'ParseCrashReporting'
Run Code Online (Sandbox Code Playgroud)
一切都工作正常,直到有一天我决定添加一些豆荚.这是我的Podfile现在的样子:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Parse', '~> 1.7.1'
pod 'ParseUI', '~> 1.1.3'
pod 'ParseCrashReporting'
pod 'Alamofire', '~> 1.2'
Run Code Online (Sandbox Code Playgroud)
如您所见,我正在尝试添加Alamofire.当我做的时候
$ pod update
$ pod install
好像一切都安装好了.然而,当我在Xcode中打开我的项目并完成索引时,所有地狱都已经崩溃了(好吧,不是真的).
似乎Parse不再与我的项目相关联,因为我有50多个错误:
Use of undeclared type 'PFLogInViewController'
我不是Ruby/Gemfiles或命令行的新手,但我对Xcode和Cocoapods来说相当新.
任何帮助,将不胜感激.谢谢.
编辑:下面是我的桥接标题.
// Objective-C Bridging File
#import <Foundation/Foundation.h>
#import <Parse/Parse.h>
#import <ParseCrashReporting/ParseCrashReporting.h>
#import <ParseUI/ParseUI.h>
#import <Bolts/Bolts.h>
Run Code Online (Sandbox Code Playgroud)
编辑:
我做了以下后出现以下错误pod install:
Error: unable to read module map contents from 'Target Support Files/Pods-Parse/Pods-Parse.modulemap': …Run Code Online (Sandbox Code Playgroud) 我刚开始使用Discover Meteor教程,当我尝试:
mrt add bootstrap
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
usr/local/lib/node_modules/meteorite/lib/project.js:225
throw("Package named " + pkgName + " doesn't exist in your meteor in
^
Package named bootstrap doesn't exist in your meteor installation, smart.json, or on
atmosphere
Run Code Online (Sandbox Code Playgroud)
有什么想法吗?谢谢.
问题:当使用Alamofire和SwiftyJSON填充a时UITableView,表视图会加载,但在显示数据之前会有1秒的暂停.我不确定我应该在哪里reloadData()解决这个问题.
关于何时reloadData()使用Alamofire和SwiftyJSON来填充a 有各种各样的问题UITableView,但我还没有找到解决我问题的答案.
一点背景:
我正在使用Google Places Web API填充UITableViewGoogle地方信息名称,地址和图标.最初我只使用SwiftyJSON来实现这一目标,但UITableView加载需要相当长的时间.以下是一些代码:
GooglePlacesRequest.swift:
...
var placesNearbyArray: [GooglePlaceNearby]?
if let url = NSURL(string: urlString) {
if let data = NSData(contentsOfURL: url, options: .allZeros, error: nil) {
let json = JSON(data: data)
placesNearbyArray = parseNearbyJSON(json)
completion(placesNearbyArray)
} else {
completion(placesNearbyArray)
}
} else {
completion(placesNearbyArray)
}
}
func parseNearbyJSON(json: JSON) -> [GooglePlaceNearby] {
var placesNearbyArray = [GooglePlaceNearby]()
for result in json["results"].arrayValue { …Run Code Online (Sandbox Code Playgroud) 我不得不在 Swift 中使用类型擦除几次,但它总是涉及通用协议。在这种情况下,它涉及通用枚举和通用协议,我被难住了。
这是我的通用枚举和通用协议以及必要的扩展:
enum UIState<T> {
case Loading
case Success([T])
case Failure(ErrorType)
}
protocol ModelsDelegate: class {
associatedtype Model
var state: UIState<[Model]> { get set }
}
extension ModelsDelegate {
func getNewState(state: UIState<[Model]>) -> UIState<[Model]> {
return state
}
func setNewState(models: UIState<[Model]>) {
state = models
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的类型擦除泛型类:
class AnyModelsDelegate<T>: ModelsDelegate {
var state: UIState<[T]> {
get { return _getNewState(UIState<[T]>) } // Error #1
set { _setNewState(newValue) }
}
private let _getNewState: ((UIState<[T]>) -> UIState<[T]>)
private …Run Code Online (Sandbox Code Playgroud) 我找到了几个线程,其他用户有类似的问题,但没有一个看起来像这样.
发出命令后:
rbenv install 2.1.3
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Installing ruby-2.1.3...
BUILD FAILED (OS X 10.10 using ruby-build 20140926)
Inspect or clean up the working tree at /var/folders/y_/5mjltxsn35q0n_k5817bszlw0000gn/T/ruby-build.20141010202255.63586
Results logged to /var/folders/y_/5mjltxsn35q0n_k5817bszlw0000gn/T/ruby-build.20141010202255.63586.log
Last 10 log lines:
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... no
configure: error: something wrong …Run Code Online (Sandbox Code Playgroud) 我通常使用Vim进行Rails开发,我决定尝试使用RubyMine来查看它是什么样的.这不是一半坏,但我觉得它太臃肿了.
现在,当我运行时,rake test它正在"通过"团队城市运行测试(我不完全理解它在做什么).在任何时候我都不记得安装teamcity.我怎么能完全摆脱它呢?在我的测试干净利落地保持和最小/自豪之前.
谢谢.
我必须写一个这样的方法:
def populate_hash([key1, key2, key3], default_value)
#
end
populate_hash([:apples, :oranges, :melons], 6) # { apples: 6, oranges: 6, melons: 6 }
Run Code Online (Sandbox Code Playgroud)
如果我正在编写一个传递两个单独数组(一个用于键,一个用于值)的方法,那将很容易,但我不确定如何处理默认值。
谢谢你。