我正在尝试解析固定宽度格式的文件,从中提取x,y值,然后将它们存储在int[]Vector 中的数组中.文本文件如下所示:
0006 0015
0125 0047
0250 0131
那是代码:
Vector<int[]> vc = new Vector<int[]>();
try {
BufferedReader file = new BufferedReader(new FileReader("myfile.txt"));
String s;
int[] vec = new int[2];
while ((s = file.readLine()) != null) {
vec[0] = Integer.parseInt(s.substring(0, 4).trim());
vec[1] = Integer.parseInt(s.substring(5, 8).trim());
vc.add(vec);
}
file.close();
} catch (IOException e) {
}
for(int i=0; i<vc.size(); i++){
for(int j=0; j<2; j++){
System.out.println(vc.elementAt(i)[j]);
}
}
Run Code Online (Sandbox Code Playgroud)
但输出只显示最后一行.
250
131
250
131
250
131
Run Code Online (Sandbox Code Playgroud)
我应该以某种方式Vector.nextElement()在这里使用我的所有数据吗?
我知道HTML,我知道一些PHP.但我想知道专业人士在Drupal开发网站时是否会使用很多代码.我从Drupal获得的经验是,您不必在al编写任何PHP或HTML,并且您可以从管理菜单中执行所有操作.但由于我是Drupal的新手并且目前正在学习Drupal 7,我想知道其他人在Drupal和建立网站时有什么看法.
您何时使用代码?您正在使用代码?
我有磁铁网站,在那里出售各种在线商品.我已在管理部分设置了PayPal网站付款标准,PayPal帐户详细信息已激活.
当客户成功下订单并使用PayPal支付账单时,我在管理员的订单详细信息页面中获得了"待处理付款"状态.实际上订单已经处理,PayPal接受付款.
我的问题是为什么"待付款"显示在管理员中,即使付款已成功进行.
我想使用Cordova1.5和xcode 4.2创建一个Hello World iPhone应用程序我在Xcode 4.2中安装了最新版本的phonegap(cordova1.5).我怎样才能创建一个Helloworld应用程序.任何人都可以通过cordova1.5和xcode 4.2向我发送有用的链接来创建应用程序吗?
我现有的代码创建了一个如下所示的菜单.

但我想要一个菜单,它是目录菜单的子菜单.
这是我现有的代码 adminhtml.xml
<?xml version="1.0" ?>
<config>
<menu>
<mycustom_menu translate="title" module="brands">
<title>My Custom Menu Item</title>
<sort_order>300</sort_order>
<children>
<!-- child items go here -->
<subitem translate="title" module="brands">
<title>Manage Brands</title>
<sort_order>10</sort_order>
<action>adminhtml/mycustom_controller/</action>
</subitem>
</children>
</mycustom_menu>
</menu>
<acl>
<resources>
<admin>
<children>
<mycustom_menu translate="title" module="brands">
<title>My Custom Menu Item</title>
<sort_order>300</sort_order>
<children>
<subitem translate="title" module="brands">
<title>Subitem</title>
<sort_order>10</sort_order>
</subitem>
</children>
</mycustom_menu>
</children>
</admin>
</resources>
</acl>
</config>
Run Code Online (Sandbox Code Playgroud) 在我正在开发的网站上,搜索已停止为完整和部分SKU工作,此功能以前有效.
在工作时为网站区分较旧的.SQL,我无法看到对以这种方式影响网站的core_config_data的任何更改.
搜索设置为组合和喜欢.仍可从高级搜索页面搜索SKU.
有谁知道我应该关注哪些表格来影响搜索行为的变化?我的预感是有一些后端的变化导致了这一点.
我正在使用亚马逊MWS Feeds API将产品添加到亚马逊卖家中央商店.当我使用亚马逊的Feeds API Section Reference中的示例时,产品无需价格即可添加到商店.我添加了以下用于向亚马逊卖家中央商店添加产品的代码.
<?xml version="1.0" encoding="iso-8859-1"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>M_EXAMPLE_123456</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<PurgeAndReplace>false</PurgeAndReplace>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>TEST1234</SKU>
<StandardProductID>
<Type>ASIN</Type>
<Value>B0EXAMPLEG</Value>
</StandardProductID>
<ProductTaxCode>A_GEN_NOTAX</ProductTaxCode>
<DescriptionData>
<Title>Example Product Title</Title>
<Brand>Example Product Brand</Brand>
<Description>This is an example product description.</Description>
<MSRP currency="USD">25.19</MSRP>
<Manufacturer>Example Product Manufacturer</Manufacturer>
<ItemType>example-item-type</ItemType>
</DescriptionData>
<ProductData>
<Health>
<ProductType>
<HealthMisc>
<Ingredients>Example Ingredients</Ingredients>
<Directions>Example Directions</Directions>
</HealthMisc>
</ProductType>
</Health>
</ProductData>
</Product>
</Message>
</AmazonEnvelope>
Run Code Online (Sandbox Code Playgroud)
有谁知道这个问题并告诉我如何修复它以及如何在上面的代码中添加数量?我使用了来自Amazon Feed API参考的代码.
Finder
Setting
Run Code Online (Sandbox Code Playgroud)
从管理菜单设置转到自定义模块的系统/配置的网址应该是什么。
<menu>
<finder module="finder">
<title>finder</title>
<sort_order>71</sort_order>
<children>
<items module="finder">
<title>Manage Finder</title>
<sort_order>0</sort_order>
<action>finder/adminhtml_finder</action>
</items>
<items module="finder">
<title>Setting</title>
<sort_order>0</sort_order>
<action> ???? </action>
</items>
</children>
</finder>
</menu>
Run Code Online (Sandbox Code Playgroud) 我在我的组织中部署了一个openstack 私有云。我有一些虚拟图像,如 ubuntu 图像、windows 图像,它们通过 openstack 仪表板上传。但我想知道图像在 openstack 控制器节点中的存储位置。
我试图通过路径:/etc/glance和/var/lib/glance。但它没有列出任何上传的图像。
如果我能对此有所了解,那就太好了。
我有两个div:
<div id="div1"></div>
<div id="div2"></div>
Run Code Online (Sandbox Code Playgroud)
我有div1的以下jquery:
$('#div1').click(function(e)
{
alert(e.pageX + ' ' + e.pageY);
});
Run Code Online (Sandbox Code Playgroud)
.现在,我想触发div1的click eventhandler来执行divc的clcicking.为此,我写道:
$('div2').click(function(e)
{
$('#div1').trigger('click');
});
Run Code Online (Sandbox Code Playgroud)
它工作正常,但问题是我无法在div1的事件处理程序中获得e.pageX和e.pageY.如何将div2 click事件处理程序的eventdata传递给div1 click事件处理程序.请帮忙.