在本文中,我们将详细介绍java–任何其他GXT主题?的各个方面,并为您提供关于任何java程序都默认引入一个包的相关解答,同时,我们也将为您带来关于ApacheCXF-无法满足任何其他政策选择、c–
在本文中,我们将详细介绍java – 任何其他GXT主题?的各个方面,并为您提供关于任何java程序都默认引入一个包的相关解答,同时,我们也将为您带来关于Apache CXF-无法满足任何其他政策选择、c – 比任何其他数字更快地比较零吗?、c# – .Net中字符串(或任何其他对象)的内存使用情况、css – 我们可以使用里面的任何其他TAG吗?的有用知识。
本文目录一览:- java – 任何其他GXT主题?(任何java程序都默认引入一个包)
- Apache CXF-无法满足任何其他政策选择
- c – 比任何其他数字更快地比较零吗?
- c# – .Net中字符串(或任何其他对象)的内存使用情况
- css – 我们可以使用里面的任何其他TAG吗?
java – 任何其他GXT主题?(任何java程序都默认引入一个包)
有没有找到新主题的好地方,或者到目前为止还没有出现第三方市场?
解决方法
Apache CXF-无法满足任何其他政策选择
我正在尝试创建第三方WS的客户端。我的应用程序在JBoss AS 6(及其Apache CXF
2.3.1堆栈)上运行。我通过wsconsume(wsdl2java)生成了客户端代码。当我尝试连接到WS时,出现异常:
No assertion builder for type http://schemas.microsoft.com/ws/06/2004/policy/http}BasicAuthentication registered.
Exception in thread "main" org.apache.cxf.ws.policy.PolicyException: None of the policy alternatives can be satisfied.
WSDL的Auth部分如下所示:
<wsp:Policy wsu:Id="abc_ssl_policy">
<wsp:ExactlyOne>
<wsp:All>
<http:BasicAuthentication
xmlns:http="http://schemas.microsoft.com/ws/06/2004/policy/http" />
<sp:TransportBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false" />
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Strict />
</wsp:Policy>
</sp:Layout>
</wsp:Policy>
</sp:TransportBinding>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
客户代码:
@WebServiceClient(name = "Abc",wsdlLocation = "https://hiddendomain.com/abc/abc.svc?wsdl",targetNamespace = "http://tempuri.org/")
public class Abc extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName("http://tempuri.org/","Abc");
public final static QName AbcSsl = new QName("http://tempuri.org/","abc_ssl");
static {
Authenticator.setDefault(new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("user","pas".toCharArray());
}
});
URL url = null;
try {
url = new URL("https://hiddendomain.com/abc/abc.svc?wsdl");
} catch (MalformedURLException e) {
java.util.logging.Logger.getLogger(DistrInfo.class.getName())
.log(java.util.logging.Level.INFO,"Can not initialize the default wsdl from {0}","...");
}
WSDL_LOCATION = url;
}
我尝试获取导管时抛出异常:
Client client = ClientProxy.getClient(port);
HTTPConduit con = (HTTPConduit) client.getConduit(); <- exception
我怀疑这是由于非标准的MS政策所致,我需要适当的Intercerptor来处理此政策,但是有人可以向我展示一种方法吗?
我什至没有,我应该将HTTPS凭据放在auth(我无法获取管道)中
c – 比任何其他数字更快地比较零吗?
if(!test)
比…快
if(test==-1)
我可以生产组装,但是生产了太多的组件,我无法找到我追求的细节.我希望有人知道答案.我猜它们是相同的,除非大多数cpu架构都有某种“比较为零”的捷径.
谢谢你的帮助.
解决方法
Loop: LOADCC r1,test // load test into register 1,and set condition codes BCZS Loop // If zero was set,go to Loop
现在考虑对1进行测试:
Loop: LOAD r1,test // load test into register 1 SUBT r1,1 // Subtract Test instruction,with destination suppressed BCNE Loop // If not equal to 1,go to Loop
现在通常的预优化免责声明:你的程序太慢了吗?不要优化,分析它.
c# – .Net中字符串(或任何其他对象)的内存使用情况
using System; namespace GcmemTest { class Program { static void Main(string[] args) { System.GC.Collect(); System.Diagnostics.Process pmCurrentProcess = System.Diagnostics.Process.GetCurrentProcess(); long startBytes = pmCurrentProcess.PrivateMemorySize64; double kbStart = (double)(startBytes) / 1024.0; System.Console.WriteLine("Currently using " + kbStart + "KB."); { int size = 2000000; string[] strings = new string[size]; for(int i = 0; i < size; i++) { strings[i] = "blabla" + i; } } System.GC.Collect(); pmCurrentProcess = System.Diagnostics.Process.GetCurrentProcess(); long endBytes = pmCurrentProcess.PrivateMemorySize64; double kbEnd = (double)(endBytes) / 1024.0; System.Console.WriteLine("Currently using " + kbEnd + "KB."); System.Console.WriteLine("Leaked " + (kbEnd - kbStart) + "KB."); System.Console.ReadKey(); } } }
Release版本中的输出是:
Currently using 18800KB. Currently using 118664KB. Leaked 99864KB.
我假设GC.collect调用将删除已分配的字符串,因为它们超出范围,但它似乎没有.我不明白也无法找到解释.也许这里有人?
谢谢,
亚历克斯
解决方法
如果要查看托管堆中使用的内存,请查看GC.GetTotalMemory
.请注意,由于垃圾收集的复杂性,所有这些内容都存在一定程度的羊毛.
css – 我们可以使用里面的任何其他TAG吗?
<ul> Some text here or <p>Some text here<p> etc <li>item 1</li> Some text here or <p>Some text here<p> etc <li>item 1</li> </ul>
解决方法
<ul> <li> <h2>...</h2> <p>...</p> <p>...</p> </li> </ul>
今天的关于java – 任何其他GXT主题?和任何java程序都默认引入一个包的分享已经结束,谢谢您的关注,如果想了解更多关于Apache CXF-无法满足任何其他政策选择、c – 比任何其他数字更快地比较零吗?、c# – .Net中字符串(或任何其他对象)的内存使用情况、css – 我们可以使用里面的任何其他TAG吗?的相关知识,请在本站进行查询。
本文标签: