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
@Test public void fromCen2FattPAConversionShouldCreateCsvIfConversionResultHasErrors() throws IOException, SyntaxErrorInInvoiceFormatException { | |
// given | |
given( fromCen.extension() ).willReturn(".xml"); | |
List<Exception> myErrors = Arrays.asList(new IllegalArgumentException("test exception")); | |
//Cen2FattPAConverter fromCen = Mockito.mock(Cen2FattPAConverter.class); | |
when(fromCen.convert(any())).thenReturn(new ConversionResult("bytes".getBytes(), myErrors)); | |
// when converting a mock invoice, errors should occur |
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
In git flow, usually there's one branch per feature. | |
So, you should: | |
- synch your local develop with remote develop. | |
- start a new feature from your local develop |
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 | |
url="http://HOST:8098/buckets/apia2014/index/\$key/VerificareFinalaCA_ZDB_BIHOR_20150615075705_BH000000_vioril.pdf/VerificareFinalaCA_ZDB_BIHOR_20150615075705_BH009999_vioril.pdf" | |
FILE="keysJudet.txt" | |
result="$(curl -s $url)" | |
echo "$result">$FILE | |
keys="$(cat $FILE | jq '.keys')" | |
echo "$keys" | |
for i in $keys; do | |
i="${i/\"/}" |
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
@Bean | |
public ClinicalDocumentService clinicalDocumentService() { | |
String serviceName = ((RemotableInterface) ClinicalDocumentService.class.getAnnotation(RemotableInterface.class)).serviceName(); | |
RmiLbServiceConfig<ClinicalDocumentService> serviceConfig = new RmiLbServiceConfig<ClinicalDocumentService>( | |
RemoteParams.getRmiServerUrls(serviceName), ClinicalDocumentService.class); | |
serviceConfig.setMonitorPeriod(60L); | |
serviceConfig.setLookupStubOnStartup(true); | |
RmiProxyFactory factory = RmiProxyFactory.getInstance(); | |
return factory.create(serviceConfig); |
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
function(head,req) { | |
var testFunc = function(doc) { return true; }; | |
if ( typeof req.query['function'] !== 'undefined' ) { | |
// includ aici funcția de test trimisă | |
eval("testFunc = function(doc) { return "+req.query['function']+"; }"); | |
} | |
start({ "headers": {"Content-type":"application/json;charset=utf-8", "Cache-Control": "max-age=10, must-revalidate"}}); | |
send('{"offset":0,'); | |
send('"rows":[\n'); | |
var r2=false; |
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
jQuery.browser={}; | |
(function() { | |
jQuery.browser.msie=false; | |
jQuery.browser.version=0; | |
if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) { | |
jQuery.browser.msie=true; | |
jQuery.browser.version=RegExp.$1; | |
} | |
})(); |
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
Leave beanstalkd disabled in /etc/default/beanstalkd | |
Then create a bash script to execute beanstalkd. | |
$ cat /usr/local/bin/beanstalkdshell | |
#!/bin/bash | |
/usr/local/bin/beanstalkd -l 0.0.0.0 -p 11300 -b /var/lib/beanstalkd | |
Then setup supervisord. |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'gearman' | |
require 'json' | |
require 'net/http' | |
require 'uri' | |
require 'pg' | |
w = Gearman::Worker.new(['***.***.***.***:4730']) |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package aduna11java; | |
import org.gearman.Gearman; | |
import org.gearman.GearmanFunction; |
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
/* | |
HTML5 Web Workers are the web’s answer to multi-threading. They’ve been around for a while now, so are pretty safe to rely on. A Worker is typically initialised by instantiating Worker with the URL of your ‘worker script’: | |
*/ | |
var myWorker = new Worker('path/to/my/worker.js'); | |
/* | |
And then you’d interface with the worker via asynchronous message-passing: | |
*/ | |
// == Within parent page == | |
myWorker.postMessage('Did you receive this?'); |
NewerOlder