This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package samples; | |
import org.openjdk.jmh.annotations.Benchmark; | |
import org.openjdk.jmh.annotations.Param; | |
import org.openjdk.jmh.annotations.Scope; | |
import org.openjdk.jmh.annotations.State; | |
import org.openjdk.jmh.annotations.Threads; | |
import org.openjdk.jmh.infra.Blackhole; | |
import org.openjdk.jmh.runner.Runner; | |
import org.openjdk.jmh.runner.RunnerException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_dictionary = new TstDictionary (); | |
TextAsset text = null; | |
float t = Time.realtimeSinceStartup; | |
try { | |
text = Resources.Load ("z") as TextAsset; | |
using (var reader = new StringReader (text.text)) { | |
string key; | |
while ((key = reader.ReadLine ()) != null) { | |
key = key.Trim (); | |
_dictionary.Add (key, null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Pre recieve tests | |
NOREV=0000000000000000000000000000000000000000 | |
while read oldsha newsha refname ; do | |
# deleting is always safe | |
if [[ $newsha == $NOREV ]]; then | |
continue | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delegate void JobResultHandler(bool result); | |
public static void DoJobAsync (string someParameter, JobResultHandler jobResultHandler = null) | |
{ | |
//If callback is null; we do not need unity adapter, otherwise we need to create it in ui thread. | |
ThreadAdapter adapter = jobResultHandler == null ? null : CreateUnityAdapter (); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> | |
<xsl:output method="xml" indent="yes"/> | |
<xsl:template match="@*|node()"> | |
<xsl:copy> | |
<xsl:apply-templates select="@*|node()"/> | |
</xsl:copy> | |
</xsl:template> | |
<xsl:template match="/*[not(//soapenv:Header)]"> | |
<xsl:copy> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<xsl:stylesheet version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:json="http://www.ibm.com/xmlns/prod/2009/jsonx" | |
xmlns:dp="http://www.datapower.com/extensions" extension-element-prefixes="dp"> | |
<xsl:output method="text"/> | |
<xsl:template match="/"> | |
<xsl:variable | |
name="theMasterNode" | |
select="/json:object"> | |
</xsl:variable> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void run() { | |
ExecutorService executorService = Executors.newFixedThreadPool(10); | |
while (true) { | |
final long start = System.currentTimeMillis(); | |
for (final AsyncContext aync : rateWatchers) { | |
executorService.submit(new Runnable() { | |
@Override | |
public void run() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-" | |
maxThreads="10" minSpareThreads="4"/> | |
<Connector port="8080" protocol="org.apache.coyote.http11.Http11NioProtocol" | |
connectionTimeout="20000" | |
redirectPort="8443" selectorTimeout="500" executor="tomcatThreadPool" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<int-ws:outbound-gateway | |
uri="${services.exchange.service}" request-channel="exchangeServiceEnriched" | |
message-sender="exchangeMessageSender"> | |
</int-ws:outbound-gateway> | |
<bean id="exchangeMessageSender" class="com.ykb.esb.util.exchange.BasicToNTLMHttpComponentsMessageSender" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.secretcompany.esb.util.exchange; | |
import org.apache.http.auth.AuthScope; | |
import org.apache.http.auth.NTCredentials; | |
import org.apache.http.client.HttpClient; | |
import org.apache.http.impl.client.DefaultHttpClient; | |
import org.apache.xml.security.utils.Base64; | |
import org.springframework.web.context.request.RequestContextHolder; | |
import org.springframework.web.context.request.ServletRequestAttributes; | |
import org.springframework.ws.transport.WebServiceConnection; |
NewerOlder