- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
构建监控工具,管理员可以输入IP范围例如。
开始:192.168.1.3 结束:192.168.1.30
输出:结构体或数组
192.168.1.6...等等
或者
开始:192.168.1.50 结束:192.169.1.12
输出:结构体或数组
我怎样才能达到这个结果。有可用的java库吗?
最佳答案
知道 IP4 地址是 32 位(4 个元素中的每一个都是 8 位),您可以执行以下操作:
begin_int
迭代到 end_int
的循环(抱歉没有给出代码,但我的java知识有限)
更新(谷歌是你的 friend )(好吧,你也可以自己做!)我的灵感来自here 。正如我所说:不能保证这有效!
import java.net.InetAddress;
import java.nio.ByteBuffer;
// Convert from an IPv4 address to an integer
InetAddress from_inet = InetAddress.getByName("192.168.1.50");
int from_address = ByteBuffer.wrap(from_inet.getAddress()).getInt();
// Convert from an IPv4 address to an integer
InetAddress to_inet = InetAddress.getByName("192.169.1.12");
int to_address = ByteBuffer.wrap(to_inet.getAddress()).getInt();
for(int i = from_address; i < to_address; i++) {
// Convert from integer to an IPv4 address
InetAddress foo = InetAddress.getByName(i);
String address = foo.getHostAddress();
System.out.println(address);
}
关于java - Coldfusion 获取给定 IP4 地址范围内的所有 IP 地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34618981/
我正在编写一个我想经常运行的计划任务。 问题是,如果服务器遇到高流量负载,我不希望运行此任务。 除了从 java 获取空闲/总/最大内存之外,还有什么方法可以尝试确定此任务是否应该继续? 最佳答案 G
我知道 coldfusion builder 已发布用于开发 coldfusion 9 应用程序。现在我的问题是 coldfusion builder 是否支持 COLDFUSION 8 开发?非常感
我正在尝试出于学习目的测试 Coldfusion,但我真的不知道非免费企业版添加到免费开发者版的附加功能是什么。 谢谢! 最佳答案 从法律上讲,Enterprise 是供公众消费的,而 Dev 不是。
我一直在玩这个问题一段时间了。我想要实现的是保存到MySQL数据库,然后输出到窗口,一般确认的表情符号如😀😁😂(是的,21世纪问题) 经过大量的修补和遵循本网站上的各种教程和答案之后,我设法实现
嗨伙计!我有一个关于coldfusion用户的简单问题,有没有人知道如何将动态数字转换为小数,例如我有一个代码:#number#,它等于,例如 10 但我需要将它写为 0.10 我该怎么做做吗? 试过
尝试使用方括号表示法来引用动态变量。 (我正在遍历由查询创建的一组产品,为每个与其唯一 SKU 相关联的字段创建字段,如果您对应用程序感到疑惑) 我已将其缩小到这段代码,当我尝试运行它时会抛出“无效表
我刚刚下载了 ColdFusion Builder (CFB),现在我正在尝试编写一个简单的“Hello World”应用程序。但我首先需要某种服务器,不是吗?现在我到底在这里寻找什么? “ColdF
我们正在运行 ColdFusion MX7。 我们遇到的一个问题是,我们在很多页面中都使用了很多功能。将它们放在“全局”ColdFusion 范围内会很好,而不是必须将它们包含在我们所有的页面中。 有
我已经尝试使用 key 工具将证书从 First Data 导入到我的 ColdFusion 9 设置中: keytool -importcert -keystore MYCF9Dir\runtime
在 ColdFusion 组件中,我声明了一个这样的函数: string function render(required Array actions) output=false { //... }
背景 : 我有一个处于设计阶段的新站点,正在考虑使用 ColdFusion。服务器目前正在使用 ColdFusion 和 Python 进行设置(为我完成)。 使用什么是我的选择,ColdFusion
我计划在服务器上从 ColdFusion MX7(Server 2003)迁移到 ColdFusion 11(Server 2012)。有一个其他服务器,我需要从 ColdFusion 8(服务器 2
一些背景知识:我正在从事一个将另一种脚本语言的网络应用程序转换为 ColdFusion 的项目。我遇到的一个问题是旧技术有一些函数名称与 CF 中的函数相同,但工作方式略有不同。不幸的是,在大多数情况
在 this page ,它谈到了 Windows NT、2000、XP 和 2003。幸运的是,我有一台 Windows 7 机器。 第一行说: In User Manager for Domain
ColdFusion 中获取季度第一天和最后一天的最快方法是什么? 似乎没有为此内置功能。 最佳答案 季度第一天: FirstDayOfQuarter = CreateDate(year, (quar
我正在尝试在新的 Windows 服务器 (Windows Server 2012 R2) 上安装 ColdFusion 11(标准版)。安装显然是成功的,但是当我进入管理员安装最新更新时,我不能。当
我有: 服务器详情 服务器产品 ColdFusion 版本 9,0,1,274733 版本标准 操作系统 Windows Server 2008 操作系统版本 6.0 Adobe 驱动程序版本 4.0
我们有一组文件需要 ColdFusion 复制到网络共享。但是,我们无法更改运行 ColdFusion 服务的用户,这意味着 ColdFusion 没有足够的权限访问任何网络共享。我们确实有可以访问的
这对我来说是新的:我正在查看 ColdFusion 网站。 问题是我什至找不到连接字符串。在一些 qryXXX.cfm 文件中,我发现 但我就是找不到这个数据源的存储位置。 最佳答案 数据源在 Co
停止ColdFusion输出的空白的正确方法是什么? 我知道有cfcontent和cfsetting enableCFoutputOnly。正确的方法是什么? 最佳答案 除了,和是。您可以使用它删
我是一名优秀的程序员,十分优秀!