任何小型Java挑战的人? [英] Anyone for a small Java challenge?

查看:82
本文介绍了任何小型Java挑战的人?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



向所有人致以问候 -


有人建议Java可能是我需要的一点点b / b
转换程序的答案。真的很简单。只需要一个

列数字:


139

259

433

637

799

1053

1185


并将它们乘以相同的数字,并吐出一个新专栏。

我正在乘以29.97。在这种情况下。我正在尝试将

列的视频时间转换为帧。


最终看起来像:


4165.83

7762.23

12977.01

(等)


虽然我'' d喜欢小数下降,所以最终看起来像:


4165

7762

12977

(等)


有谁可以帮帮我?


非常感谢,

Merc博士

解决方案

>有人建议Java可能是我需要的一个

转换程序的答案。真的很简单。只需要一列数字:

139
439
637
799
1053
1185

将它们全部乘以相同的数字,并吐出一个新的列。
我正在乘以29.97。在这种情况下。我正在尝试将
列视频时间转换为帧。

这最终会看起来像:

4165.83
7762.23
12977.01
(等)

虽然我希望小数下降,但最终看起来像:

4165
7762
12977
(等)



听起来像是Excel的工作...


您计划多久一次这样做吗?

你在哪里获得数字列,以及

你如何使用它们?以什么方式编写一个

程序比使用计算器更容易?

对于开始,请看下面 - 这是关于

一样简单得到:

import java.io. *;

import java.lang.Math;

import java.lang.Double;


public class Convertor {

private static BufferedReader stdin =

new BufferedReader(new InputStreamReader(System.in));


public static void main(String [] args){

double d;

System.out.println("输入你的清单值:");


while(true){

d = Double.parseDouble(stdin.readLine());

System.out.println(Math.floor(d * 29.97));

}

}

}


On Fri,2004年2月20日01:41:43 -0500,Hugh Bothwell写道:


< sniplet>

虽然我希望小数下降,所以它最终看起来像:

4165
7762
12977
(等)



听起来像Excel的工作。 ..


你好,休,谢谢你的回复。


它在Excel中工作正常,但我需要这个作为视频的一部分程序

在我的网站上,所以它应该是免费软件。

你经常计划这样做吗?
你在哪里得到数字列你是如何使用它们的?以何种方式编写
程序比使用计算器更容易?




转换为另一种格式时,这是保留SVCD章节点的问题。章节点可以提取为

次,但转换程序需要它们作为帧。因此,我需要

才能将一列数字乘以23.976或29.97

(取决于电影的帧速率)以将时间转换为帧数。一个

的计算器当然可以工作,但对于20美元左右的b $ b左右来说,这将是一件很费力的工作。

对于开始,请参阅下面 - 这是关于
一样简单:


注意下面的小字体不匹配:

public static void main(String [] args){




如果你能解决这个问题,并让我知道如何使用这个脚本,那将是值得赞赏的。老实说,我不知道任何关于Javascripts的事情,除了

,偶尔我会在我的网页中使用它们的一大块,比如

预加载动态图标。我不知道如何运行像这样的

独立脚本。


感谢您的帮助,

Doc


-

满足您的所有DVD / SVCD / DIVX / OGM需求: www.svcd.cc

DVD录制新手? www.svcd.cc/dvdrinfo.htm

VCD常见问题: http:// abvcd。 home.comcast.net/FAQ/abvcdfaq5.01.htm

SVCD章程: www.svcd.cc/charter.htm


awk''{print int(


Greetings to all -

Someone suggested that Java might be the answer for a little
conversion program I need. It''s pretty simple, really. Just take a
column of numbers:

139
259
433
637
799
1053
1185

and multiply them all by the same number, and spit out a new column.
I''m multipilying by "29.97" in this case. I''m trying to convert a
column of video times to frames.

That would end up looking like:

4165.83
7762.23
12977.01
(etc)

although I''d like the decimal dropped, so it ends up looking like:

4165
7762
12977
(etc)

Can anyone help me out?

Thanks much,
Dr. Merc

解决方案

> Someone suggested that Java might be the answer for a little

conversion program I need. It''s pretty simple, really. Just take a
column of numbers:

139
259
433
637
799
1053
1185

and multiply them all by the same number, and spit out a new column.
I''m multipilying by "29.97" in this case. I''m trying to convert a
column of video times to frames.

That would end up looking like:

4165.83
7762.23
12977.01
(etc)

although I''d like the decimal dropped, so it ends up looking like:

4165
7762
12977
(etc)


Sounds like a job for Excel...

how often do you plan to do this?
Where do you get the column of numbers, and how
do you use them? In what way would writing a
program be easier than using a calculator?
For starts, see below - this is about
as simple as it gets:
import java.io.*;
import java.lang.Math;
import java.lang.Double;

public class Convertor {
private static BufferedReader stdin =
new BufferedReader( new InputStreamReader( System.in ) );

public static void main(String[] args) {
double d;
System.out.println("Enter your list of values:");

while (true) {
d = Double.parseDouble(stdin.readLine());
System.out.println( Math.floor( d * 29.97) );
}
}
}


On Fri, 20 Feb 2004 01:41:43 -0500, "Hugh Bothwell" wrote:

<sniplet>

although I''d like the decimal dropped, so it ends up looking like:

4165
7762
12977
(etc)


Sounds like a job for Excel...
Howdy, Hugh, thanks for the reply.

It works fine in Excel, but I need this as part of a video procedure
on my Web site, so it should be something freeware.
how often do you plan to do this?
Where do you get the column of numbers, and how
do you use them? In what way would writing a
program be easier than using a calculator?
It''s a matter of retaining the chapter points in an SVCD when
converting to another format. The chapter points can be extracted as
times, but the conversion program wants them as frames. Ergo, I need
to be able to multiply a column of numbers by either 23.976 or 29.97
(frame rate of the movie depending) to convert the times to frames. A
calculator would work, certainly, but it''d be a tad laborious for 20
or so entries.
For starts, see below - this is about
as simple as it gets:
Note the small font mismatch below:
public static void main(String[] args) {



If you could fix that, and let me know how to use the script, it''d be
appreciated. I honestly don''t know anything about Javascripts except
that occasionally I use a chunk of them in my Web pages, like to
pre-load dynamic icons. I don''t have any idea how to run an
independent script like this one.

Thanks for the help,
Doc

--

For all of your DVD/SVCD/DIVX/OGM needs: www.svcd.cc
New to DVD recording? www.svcd.cc/dvdrinfo.htm

VCD FAQ: http://abvcd.home.comcast.net/FAQ/abvcdfaq5.01.htm
SVCD Charter: www.svcd.cc/charter.htm


awk ''{print int(


这篇关于任何小型Java挑战的人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆