大家好,我试图按照以下位置的说明进行操作:https://github.com/nathanmarz/storm/wiki/Installing-native-dependencies,用于在Ubuntu 12.04计算机上安装Zero MQ作为Storm的依赖项.但是,当尝试运行make命令时,我收到以下错误
Making all in src
make[1]: Entering directory `/home/localadmin/jzmq/src'
make[1]: *** No rule to make target `classdist_noinst.stamp', needed by `org/zeromq/ZMQ.class'. Stop.
make[1]: Leaving directory `/home/localadmin/jzmq/src'
make: *** [all-recursive] Error 1
Run Code Online (Sandbox Code Playgroud)
有没有人知道这个错误源于何处以及我如何能够纠正它?
我无意中听到了关于System.out.print()
今天的争论.一个人声称,由于print()
不包括终止\n
,它写入的缓冲区最终会填满并开始丢失数据.另一个人声称他们一直在使用他们System.out.print()
所有的Java程序,并且从未遇到过这个问题.
第一个人是对的吗?System.out.print()
如果stdout已满,是否可以开始阻止或丢弃数据?是否有一个会导致这种情况的代码示例?
使用Redis创建"记录"时,可以创建包含多个字段的哈希.例如:
HMSET myhash field1 "Hello" field2 "World"
HMSET myhash2 field1 "Goodbye" field2 "World"
Run Code Online (Sandbox Code Playgroud)
你可以通过知道键值来检索它,但是我想知道有没有办法检索field2中有"World"的所有哈希值?
我在尝试编译Spring应用程序时遇到错误.当我编译时,我收到以下错误:
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/aspectj/lang/NoAspectBoundException. Please see server.log for more details.
at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:106)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor176.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:390)
at org.apache.tools.ant.Target.performTasks(Target.java:411)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:284)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:539)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Run Code Online (Sandbox Code Playgroud)
在修改dispatcher-servlet.xml文件之前,它工作正常.通过尝试添加上下文.
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:spring-configured/>
<context:annotation-config/> …
Run Code Online (Sandbox Code Playgroud) 大家好,我有一个基本的Storm应用程序设置,它接收一个推文流并将它们存储在MySQL数据库中.该应用程序在前约23小时左右运行良好,然后开始出现以下错误:
SQL Exception
SQL State: 08003
Run Code Online (Sandbox Code Playgroud)
它做了几次就死了.我正在使用标准JBDC连接器从Java连接到数据库.存储和设置DB连接的功能代码如下:
private String _db="";
private Connection conn = null;
private PreparedStatement pst = null;
public ArchiveBolt(String db){
_db = db;
}
private void setupConnection() {
//Connect to the database
try {
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost:8889/twitter_recording", "root", "root");
} catch (Exception e){
e.printStackTrace();
}
}
public void execute(Tuple tuple, BasicOutputCollector collector) {
Status s = (Status) tuple.getValue(0);
//setup the connection on the first run through or if the connection got closed down
try {
setupConnection(); …
Run Code Online (Sandbox Code Playgroud) 我正在为我公司的内部工具包构建一个前端.一半的工具是用python编写的,然后另一半是用其他几种脚本语言编写的.所以我在使用swing构建java的前端.到目前为止,我可以通过以下代码调用python脚本:
public class Foo
{
public static void main(String[] args)
{
try
{
Runtime r = Runtime.getRuntime();
Process p = r.exec("python foo.py");
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
p.waitFor();
String line = "";
while (br.ready())
System.out.println(br.readLine());
}
catch (Exception e)
{
String cause = e.getMessage();
if (cause.equals("python: not found"))
System.out.println("No python interpreter found.");
}
}
}
Run Code Online (Sandbox Code Playgroud)
哪个工作得很漂亮,但如果python脚本遇到任何错误,它就不会打印出来.如何确保它还打印出它有的任何错误?
我正在尝试构建一个概念验证应用程序,它使用DC.js引入一些静态数据并将其可视化.我们决定使用Vue.js作为我们的框架,使用Webpack作为构建工具.我在基本配置中包含了D3.js,Crossfilter和DC.js.
resolve: {
extensions: ['', '.js', '.vue'],
fallback: [path.join(__dirname, '../node_modules')],
alias: {
'src': path.resolve(__dirname, '../src'),
'assets': path.resolve(__dirname, '../src/assets'),
'components': path.resolve(__dirname, '../src/components'),
'd3': path.resolve(__dirname, '../bower_components/d3/d3.min.js'),
'crossfilter': path.resolve(__dirname, '../bower_components/crossfilter/crossfilter.min.js'),
'dc': path.resolve(__dirname, '../bower_components/dcjs/dc.js') // using unminified version to look at exactly where the error is coming from
}
}
Run Code Online (Sandbox Code Playgroud)
并在具有实际可视化组件的文件中如此.
var d3 = require('d3')
var cf = require('crossfilter')
var crossfilter = cf.crossfilter
var dc = require('dc')
Run Code Online (Sandbox Code Playgroud)
但是DC.js需要交叉过滤器才能工作,它会挂起在DC.js上下文中调用crossfilter的第一个实例.加载页面后,我无法再访问crossfilter
控制台,但我可以访问D3
.是什么让D3.js成为一个全球性的需求,而不是将crossfilter作为一个整体?
我在这里有一些配置吗?
大家好我试图安装Yeoman但是当我尝试通过npm安装软件包时出现以下错误.
sudo npm install -g yeoman
npm http GET https://registry.npmjs.org/yeoman
npm http 200 https://registry.npmjs.org/yeoman
npm http GET https://registry.npmjs.org/yeoman/-/yeoman-0.9.1.tgz
npm http 200 https://registry.npmjs.org/yeoman/-/yeoman-0.9.1.tgz
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/usr/local/share/npm/lib/node_modules/yeoman/node_modules/grunt/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin'
npm ERR! error rolling back yeoman@0.9.1 { [Error: ENOTEMPTY, rmdir '/usr/local/share/npm/lib/node_modules/yeoman/node_modules/grunt/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/local/share/npm/lib/node_modules/yeoman/node_modules/grunt/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin' }
npm ERR! Error: ENOTEMPTY, rmdir '/usr/local/share/npm/lib/node_modules/yeoman/node_modules/grunt/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/.bin'
npm ERR! If you need help, you may report this …
Run Code Online (Sandbox Code Playgroud) 我有一个小型试用Web应用程序,我正在使用vue webpack模板(https://github.com/vuejs-templates/webpack).我对webpack很新,所以我假设我可以添加到插件中new webpack.ProvidePlugin
,它可以全局使用但是当我这样做时,npm run dev
我收到以下错误:
/var/www/public/leadsStatsDashboard/liveleadstats/src/components/Hello.vue
18:17 error 'd3' is not defined no-undef
Run Code Online (Sandbox Code Playgroud)
这听起来像是我无法找到d3参考.我不确定是否有一些我跳过的配置或者什么,但任何帮助将不胜感激.这是我的文件的来源
Webpack.dev.conf.js:
var path = require('path')
var config = require('../config')
var utils = require('./utils')
var webpack = require('webpack')
var projectRoot = path.resolve(__dirname, '../')
module.exports = {
plugins: [
new webpack.ProvidePlugin({
d3: 'd3',
crossfilter: 'crossfilter',
dc: 'dc'
})
],
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
publicPath: config.build.assetsPublicPath,
filename: '[name].js'
},
resolve: {
extensions: ['', '.js', '.vue'],
fallback: [path.join(__dirname, '../node_modules')], …
Run Code Online (Sandbox Code Playgroud) 所以我正在创建一个Angular 2 - typescript应用程序,我希望能够使用Mozilla的PDFJS库来探索PDF.我安装了像这样的依赖:
npm install pdfjs-dist @types/pdfjs-dist --save
Run Code Online (Sandbox Code Playgroud)
然后在我的app.modules.ts中我试图像这样导入它:
import { PDFJS } from "pdfjs-dist";
Run Code Online (Sandbox Code Playgroud)
我在尝试运行时遇到以下错误,tsc
我得到以下输出:
src-ng/csm/app/app.module.ts(27,10): error TS2305: Module '"pdfjs-dist"' has no exported member 'PDFJS'.
Run Code Online (Sandbox Code Playgroud)
我很茫然,因为看起来pdfjs-dist打字似乎是有序的.我还应该包括其他什么吗?
所以我在excel文件中有大约1000万条记录,必须以特定方式解析(我不能只转换为CSV并像这样插入)并插入到mysql数据库的不同表中.我已经把它从整晚拿走了几个小时.但是我想进一步减少这一点.任何人都有任何可以帮助我的技巧或提示?我正在使用Java和JDBC来解析和连接.
我是Spring框架的新手,请原谅我,如果这是一个简单的问题或新手的错误.我的问题是,当我尝试编译和部署我的项目时,我收到一个错误:
The matching wildcard is strict, but no declaration can be found for element 'context:spring-configured'
Run Code Online (Sandbox Code Playgroud)
我的调度程序xml文件包含以下内容:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:spring-configured/>
<context:annotation-config/>
<context:component-scan base-package="connect.controller"/>
<bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/>
<!--
Most controllers will use the ControllerClassNameHandlerMapping above, but
for the index controller we are using ParameterizableViewController, so we must
define an explicit mapping for it.
-->
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="index.htm">indexController</prop>
<prop key="main.htm">mainViewController</prop>
</props>
</property>
</bean>
<bean …
Run Code Online (Sandbox Code Playgroud) 大家好,我正在尝试对我的数据库执行以下插入操作,但是每次尝试它都会失败,并且出现错误1064.我有两个双字段用于lat和long,以及一个整数id.有人能告诉我这里发生了什么吗?
INSERT INTO LatLong (lat, long) VALUES (51.53087375, -0.26259048);
Run Code Online (Sandbox Code Playgroud) java ×5
mysql ×3
d3.js ×2
jdbc ×2
node.js ×2
spring ×2
webpack ×2
angular ×1
apache-storm ×1
buffer ×1
crossfilter ×1
javascript ×1
jzmq ×1
makefile ×1
nosql ×1
npm ×1
optimization ×1
pdf.js ×1
python ×1
redis ×1
spring-mvc ×1
sql ×1
system.out ×1
typescript ×1
ubuntu ×1
vue.js ×1
yeoman ×1
zeromq ×1