小编Tim*_*mka的帖子

无法使用Swift 4 Package Manager导入包

尝试在我的机器上使用Xcode-beta(v9)测试Swift 4,并将包导入测试项目时出现问题:

  • 启动项目使用 swift package init --type executable
  • 更改Package.swift并添加了2个项目以试用:

Package.swift

// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "sampleproject",
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
        .package(url: "https://github.com/IBM-Swift/Kitura.git", from: "1.7.6"),
        .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.5.0")
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can …
Run Code Online (Sandbox Code Playgroud)

macos xcode package-managers swift swift4

27
推荐指数
1
解决办法
7515
查看次数

Scala-IDE和Eclipse Juno的代码完成问题

我正在使用Eclipse Juno和Java(Java build 1.7.0_05-b05 64bit)和Scala-IDE插件(Scala IDE for Eclipse 2.1.0.nightly-2_09-201207100348-f1d9c23 org.scala-ide.sdt.feature. feature.group scala-ide.org).

以下是Eclipse eclipse.ini的自定义设置:

-vmargs
-Dosgi.requiredJavaVersion=1.7
-Dhelp.lucene.tokenizer=standard
-Xss8m
-Xms256m
-Xmx1536m
-XX:PermSize=64m
-server
-Xverify:none
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:MaxGCPauseMillis=50
-XX:+DoEscapeAnalysis
-XX:+UseCompressedOops
Run Code Online (Sandbox Code Playgroud)

每次我尝试使用代码完成Eclipse抛出2个错误窗口:

The 'Code Recommenders Calls Proposals' proposal computer from
the 'org.eclipse.recommenders.completion.rcp.calls' plug-in did
not complete normally.
The extension has thrown a runtime exception.
Run Code Online (Sandbox Code Playgroud)

The 'Code Recommenders Overrides Proposals' proposal computer from
the 'org.eclipse.recommenders.completion.rcp.overrides' plug-in did
not complete normally.
The extension has thrown a runtime exception.
Run Code Online (Sandbox Code Playgroud)

我在下面的scala-ide日志显示:

[Xlint:cantFindType]
2012-07-10 15:37:29,404 ERROR [main] …
Run Code Online (Sandbox Code Playgroud)

eclipse scala code-completion scala-ide eclipse-juno

11
推荐指数
1
解决办法
3504
查看次数

go install总是使用GOROOT/bin而不是GOPATH

我遇到了烦人的go install命令问题.

每次我尝试在src我的GOPATH目录中运行它时,由于某种原因,结果文件将在GOROOT/bin目录中创建.

我在.bashrc中验证了我的环境变量,并运行'go env'(见下文)并找不到任何问题:

的.bashrc

export GOBIN=$HOME/dev/src/go/bin
export GOPATH=$HOME/dev/go-dev
export PATH=$PATH:$GOBIN:$GOPATH/bin
Run Code Online (Sandbox Code Playgroud)

去环境

GOARCH="amd64"
GOBIN="/home/user/dev/src/go/bin"
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/dev/go-dev"
GORACE=""
GOROOT="/home/user/dev/src/go"
GOTOOLDIR="/home/user/dev/src/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CGO_ENABLED="1"
Run Code Online (Sandbox Code Playgroud)

这篇文章有一个类似的问题,除了我在我的环境中有GOPATH(我尝试了解决方案,但它没有帮助).

当我尝试使用官方GoLang站点创建测试库并运行go install时,我在$ GOPATH/pgk/linux_amd64中创建了一个正确的文件,但是没有在bin目录中创建.

我在配置中遗漏了什么吗?

linux debian go

5
推荐指数
1
解决办法
5881
查看次数

无法使用WebClient.DownloadFile方法从启用了TLS 1.1/1.2协议的计算机下载文件

我正在尝试使用Webclient.DownloadFile方法通过TLS 1.1/1.2协议实现一个简单的控制台应用程序来下载文件.这是应用程序的代码:

var downloadUrl = "https://serverURL.com/sample.mp3";
var filename = "sample.mp3";
var myWebClient = new WebClient();
myWebClient.DownloadFile(downloadUrl, filename);
Run Code Online (Sandbox Code Playgroud)

每次我运行它我收到以下错误信息:

Unhandled Exception: System.Net.WebException: 
The underlying connection was closed: An unexpected error occurred on a receive. --->   

System.ComponentModel.Win32Exception: The client and server cannot communicate, because they do not possessa common algorithm
at System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc)
at System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential& secureCredential)
at System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]& thumbPrint)
at System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output)
at System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 …
Run Code Online (Sandbox Code Playgroud)

.net c# iis ssl downloadfile

3
推荐指数
1
解决办法
3608
查看次数

使用Boomerang库与Resource Timing API的优势

我正在开发一个Node.js在后端使用的项目,Angular.js作为前端,我需要跨不同的浏览器捕获应用程序的不同资源的页面加载统计信息.我能够通过使用Resource Timing API并将结果JSON对象存储在服务器上来收集基本统计信息.但在阅读了这个关于SO的问题之后,我了解了Boomerang库,现在我有点困惑.对于单页面应用程序(即内置Angular),使用Boomerang而不是Resource Timing API有什么优势?

javascript timing node.js angularjs boomerang

3
推荐指数
1
解决办法
1050
查看次数

在Postgres中为每个用户选择每个第N行

我正在使用这个SQL语句:

SELECT "dateId", "userId", "Salary" 
FROM (
   SELECT *, 
          (row_number() OVER (ORDER BY "userId", "dateId"))%2 AS rn 
   FROM user_table
 ) sa 
 WHERE sa.rn=1 
   AND "userId" = 789 
   AND "Salary" > 0;
Run Code Online (Sandbox Code Playgroud)

但是每次表获取新行时,查询的结果都不同.
我错过了什么吗?

sql postgresql select row-number window-functions

2
推荐指数
1
解决办法
3914
查看次数