我在erlang的列表中的列表中有一个二进制字符串,关于如何只提取二进制字符串的任何想法
例如.
Whatihave = [[<<"hello">>]].
Whatiwant = <<"hello">>.
Run Code Online (Sandbox Code Playgroud)
非常感谢
我有一个简单的 scala maven 模块,它是一个更大项目的一部分(我按照这里的描述创建了它:https : //www.jetbrains.com/help/idea/2016.2/creating-a-maven-module.html):
package com.myorg.simplr
import [...]
@SerialVersionUID(100L)
case class Simplr (){
//class code
}
Run Code Online (Sandbox Code Playgroud)
我试图在 spark shell 中使用这个类,所以我构建了一个 jar 文件“simplr-1.0.jar”并使用 --jars simplr-1.0.jar 启动了 spark shell。
然后,当我尝试导入时,我得到以下信息
scala> import com.myorg.simplr.Simplr
<console>:25: error: object myorg is not a member of package com
import com.myorg.simplr.Simplr
^
Run Code Online (Sandbox Code Playgroud)
我怎样才能使导入工作?
我使用 maven 构建,这是我的 pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>my-parent-project</artifactId>
<groupId>com.myorg</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>simplr</artifactId>
<version>1.0</version>
<dependencies>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.10</artifactId>
<version>1.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-mllib_2.10</artifactId> …Run Code Online (Sandbox Code Playgroud)