小编Pie*_*rre的帖子

Curvilinear perspective:将3D转换为2D

我正在寻找在半径的曲线透视中将3D坐标(x0,y0,z0)转换为2D (x1,y1)坐标的数学表达式,其中x1和y1的值是原始点的视角{-90°.. + 90°}.R

图片http://www.ntua.gr/arch/geometry/mbk/images/curv159.gif

(图片来自http://www.ntua.gr/arch/geometry/mbk/histor.htm)

谢谢 !

math 3d drawing 2d perspective

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

wsimport"无法解析名称......"

我一直在尝试导入以下Web服务:http://soap.genome.jp/KEGG.wsdl with $ {JAVA_HOME}/bin/wsimport:

wsimport -version
JAX-WS RI 2.1.6 in JDK 6
Run Code Online (Sandbox Code Playgroud)

但我收到以下错误:

parsing WSDL...

[WARNING] src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) 'type definition' component.
  line 19 of http://soap.genome.jp/KEGG.wsdl#types?schema1

[ERROR] undefined simple or complex type 'soapenc:Array'
  line 19 of http://soap.genome.jp/KEGG.wsdl
(....)
Run Code Online (Sandbox Code Playgroud)

问题来自WSDL还是来自wsimport的实现?我应该使用其他工具吗?

谢谢

皮埃尔

java wsdl web-services wsimport

15
推荐指数
2
解决办法
2万
查看次数

后记:如何将整数转换为字符串?

在postscript中,cvs*operator*被称为将数字转换为字符串.我该怎么用?我试过了 :

100 100 moveto
3.14159 cvs show
Run Code Online (Sandbox Code Playgroud)

要么

100 100 moveto
3.14159 cvs string show
Run Code Online (Sandbox Code Playgroud)

但它不起作用.

有帮助吗?

string numbers postscript

15
推荐指数
2
解决办法
6664
查看次数

搜索HDF5数据集

我正在探索HDF5.我已经阅读了线程" 评估HDF5 "中的有趣评论,我理解HDF5是存储数据的首选解决方案,但您如何查询?例如,假设我有一个包含一些标识符的大文件:有没有办法快速知道文件中是否存在给定的标识符?

search hdf5

14
推荐指数
2
解决办法
9939
查看次数

获取<img rel="nofollow noreferrer" />的绝对路径

使用Javascript,是否有标准的方法来获取图像的绝对路径img.getAttribute("src")仅返回srcHTML中声明的属性.

javascript url image absolute-path

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

带有参数的Java Webstart

我是否可以使用一组参数启动Java WebStart应用程序,就像使用<param>标签配置applet一样?

谢谢

java parameters applet initialization java-web-start

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

一种不使用'C'的语言?

只是好奇.我可能错了,但据我所知,大多数语言都是使用"C"创建的.

例如:perl,php, python,java(?),go ...

是否有任何语言不使用C作为低级解释器/编译器?(fortran?)

c compiler-construction programming-languages

11
推荐指数
7
解决办法
1724
查看次数

R.loess和org.apache.commons.math LoessInterpolator之间的区别

我正在尝试使用apache.commons.math库计算将R脚本转换为java .我可以用org.apache.commons.math.analysis.interpolation.LoessInterpolator代替R loess吗?我无法得到相同的结果.

编辑.

这里要说的是创建一个随机的阵列(X,Y)和计算与LoessInterpolator或通过调用R.在结束时黄土的Java程序,结果被打印.

import java.io.*;
import java.util.Random;

import org.apache.commons.math.analysis.interpolation.LoessInterpolator;


public class TestLoess
    {
    private String RScript="/usr/local/bin/Rscript";
    private static class ConsummeInputStream
        extends Thread
        {
        private InputStream in;
        ConsummeInputStream(InputStream in)
            {
            this.in=in;
            }
        @Override
        public void run()
            {
            try
                {
                int c;
                while((c=this.in.read())!=-1) 
                    System.err.print((char)c);
                }
            catch(IOException err)
                {
                err.printStackTrace();
                }
            }
        }
    TestLoess()
        {

        }
    private void run() throws Exception
        {
        int num=100;
        Random rand=new Random(0L);
        double x[]=new double[num];
        double y[]=new double[x.length];
        for(int …
Run Code Online (Sandbox Code Playgroud)

java r loess apache-commons-math

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

java.util.regex.Pattern可以进行部分匹配吗?

是否可以知道流/字符串是否包含可以匹配正则表达式的输入.

例如

 String input="AA";
 Pattern pat=Pattern.compile("AAAAAB");
 Matcher matcher=pat.matcher(input);
 //<-- something here returning true ?
Run Code Online (Sandbox Code Playgroud)

要么

 String input="BB";
 Pattern pat=Pattern.compile("AAAAAB");
 Matcher matcher=pat.matcher(input);
 //<-- something here returning false ?
Run Code Online (Sandbox Code Playgroud)

谢谢

java regex

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

C比Java慢:为什么?

我很快写了一个C程序,提取了一组gzip压缩文件的第i行(包含大约500,000行).这是我的C程序:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include <zlib.h>

/* compilation:
gcc  -o linesbyindex -Wall -O3 linesbyindex.c -lz
*/
#define MY_BUFFER_SIZE 10000000
static void extract(long int index,const char* filename)
   {
   char buffer[MY_BUFFER_SIZE];
   long int curr=1;
   gzFile in=gzopen (filename, "rb");
   if(in==NULL)
       {
       fprintf(stderr,"Cannot open \"%s\" %s.\n",filename,strerror(errno));
       exit(EXIT_FAILURE);              }
   while(gzread(in,buffer,MY_BUFFER_SIZE)!=-1 && curr<=index)
       {
       char* p=buffer;
       while(*p!=0)
           {
           if(curr==index)
               {
               fputc(*p,stdout);
               }
           if(*p=='\n')
               {
               ++curr;
               if(curr>index) break;
               }
           p++;
           }
       }
   gzclose(in);
   if(curr<index)
       {
       fprintf(stderr,"Not …
Run Code Online (Sandbox Code Playgroud)

c java optimization performance

10
推荐指数
3
解决办法
1576
查看次数