小编ale*_*z78的帖子

是否可以使用 iText 查找文本位置

是否可以使用 iText 找到文本位置?我看到了具有beginTextBlockrenderTextendTextBlockRenderListener接口,但它们似乎对查找文本位置没有用。如果 iText 无法实现:是否存在另一个能够做到这一点的开源 Java 库?

java pdf itext

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

如何在Grape中设置自定义Maven存储库管理器

我想使用grape来通过命令行安装库.所以我发出了命令:

grape -V install org.apache.derby derby 10.5.3.0
Run Code Online (Sandbox Code Playgroud)

Grape应使用位于http://127.0.0.1:8081/artifactory/webapp/home.html的Maven存储库.我该如何配置?

启用详细模式后,我在日志中看到:

:: loading settings :: url = jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
no default ivy user dir defined: set to /home/alexyz/.ivy2                                                           
including url: jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings-public.xml       
no default cache defined: set to /home/alexyz/.ivy2/cache                                                            
including url: jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings-shared.xml       
including url: jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings-local.xml        
including url: jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings-main-chain.xml   
including url: jar:file:/opt/groovy-1.7.2/lib/ivy-2.1.0.jar!/org/apache/ivy/core/settings/ivysettings-default-chain.xml
settings loaded (89ms)                                                                                                 
        default cache: /home/alexyz/.ivy2/cache                                                                      
        default resolver: default                                                                                      
        -- 5 resolvers:                                                                                                
        shared [file]                                                                                                  
        default [chain] [local, main]                                                                                  
        local [file]                                                                                                   
        public [ibiblio]                                                                                               
        main [chain] [shared, public]                                                                                  
:: resolving dependencies :: caller#all-caller;working …
Run Code Online (Sandbox Code Playgroud)

groovy ruby-grape

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

Groovy无法加载与Grape一起安装的库

有人可以解释为什么即使我已经使用Grape安装了依赖项,Groovy也无法找到JDBC驱动程序?

$ grape --version
Groovy Version: 1.7.7 JVM: 1.6.0_20

$ grape install org.apache.derby derby 10.5.3.0
:: loading settings :: url = jar:file:/opt/groovy-1.7.7/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
:: resolving dependencies :: caller#all-caller;working
        confs: [default]
        found org.apache.derby#derby;10.5.3.0 in remote-repo
downloading http://127.0.0.1:8081/artifactory/repo/org/apache/derby/derby/10.5.3.0/derby-10.5.3.0.jar ...
        [SUCCESSFUL ] org.apache.derby#derby;10.5.3.0!derby.jar (388ms)

$ grape resolve org.apache.derby derby 10.5.3.0
/home/alex/.groovy/grapes/org.apache.derby/derby/jars/derby-10.5.3.0.jar

$ groovy file_parser.groovy records.txt csv
Caught: java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver
        at film_parser.run(film_parser.groovy:16)

$ groovy -cp /home/alex/.groovy/grapes/org.apache.derby/derby/jars/derby-10.5.3.0.jar file_parser.groovy records.txt csv
Inserted 1 rows.
Run Code Online (Sandbox Code Playgroud)

groovy ruby-grape

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

运行quantstrat分析时出错

我坚持以下分析:

library(quantstrat)

stock_size = 200
tickers = c("XOM", "MCD")
init.date = as.Date("2008-01-01")

usd = "USD"
currency(usd)
for(ticker in tickers){ 
  stock(ticker, currency=usd, multiplier = 1)
}

options("getSymbols.warning4.0"=FALSE)
getSymbols(tickers,from=init.date,to.assign=TRUE)

suppressWarnings(rm(strat, port, acct, ords))

port.name <- "MyPort"
port <- initPortf(port.name,tickers,initDate=init.date)
acct.name <- "MyAcct"
acct <- initAcct(acct.name,portfolios=port.name, initDate=init.date, initEq=35000)
ords <- initOrders(portfolio=port.name,initDate=init.date)

strat.name <- "MyStrat"
strat<- strategy(strat.name)
strat<- add.indicator(strategy = strat, name = "SMA", arguments = list(x=quote(Ad(mktdata)), n=20),label= "ma20" )
strat<- add.indicator(strategy = strat, name = "SMA", arguments = list(x=quote(Ad(mktdata)), n=50),label= "ma50")

strat<- add.signal(strat, …
Run Code Online (Sandbox Code Playgroud)

r quantstrat

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

石墨:每点精度的时间

以毫秒精度存储每点的时间是否可能?

由于Graphite基于Whisper,我看了一下whisper.py文件.它包含:

UnitMultipliers = {
   's' : 1,
   'm' : 60,
   'h' : 60 * 60,
   'd' : 60 * 60 * 24,
   'y' : 60 * 60 * 24 * 365,
}
Run Code Online (Sandbox Code Playgroud)

因此,似乎可以记录最大精度为1s的事件.我如何应对每10ms产生一次事件的系统?

python graphite

0
推荐指数
1
解决办法
2140
查看次数

列奥纳多串行通讯

我编写了这个示例草图来测试与 Arduino Leonardo 的串行通信(在 Windows 7 上使用 Arduino IDE 1.0.5):

int delayTime = 10000;
long lastExec = 0;

void setup()
{
  Serial.begin(9600);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }
}

void loop()
{
  long t = millis();
  if (t - lastExec >= delayTime) {
    if(Serial.available() > 0){
      Serial.println('Hello world');
    }  
    lastExec = t;
  }
}
Run Code Online (Sandbox Code Playgroud)

选择的串行端口似乎工作,因为草图上传正确。

但是我在串行监视器窗口中没有得到任何东西。为什么?

serial-port arduino

0
推荐指数
1
解决办法
8103
查看次数

标签 统计

groovy ×2

ruby-grape ×2

arduino ×1

graphite ×1

itext ×1

java ×1

pdf ×1

python ×1

quantstrat ×1

r ×1

serial-port ×1