code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public static void assertEqualStreams(InputStream expIn,InputStream actIn,@Nullable Long expSize) throws IOException {
int bufSize=2345;
byte buf1[]=new byte[bufSize];
byte buf2[]=new byte[bufSize];
long pos=0;
while (true) {
int i1=actIn.read(buf1,0,bufSize);
int i2;
if (i1 == -1) i2=expIn.re... | Validate streams generate the same output. |
private boolean needFlip(long pos){
return second != null && second.contains(pos);
}
| Checks if position shifted enough to forget previous buffer. |
public static void loadRootUserDataCacheOnStart(){
EFLogger.debug("loadRootUserDataCacheOnStart");
users.put("root",UserData.restoreFromESData("root",rootPassword,"/*"));
}
| load authentication info when ES instance starts |
@Override public StatisticViewHolder onCreateViewHolder(ViewGroup parent,int viewType){
View v;
int layout;
Context parentContext=parent.getContext();
if (viewType == StatisticViewHolder.TYPE_LARGE) {
layout=R.layout.list_item_statistic_most_played;
}
else if (viewType == StatisticViewHolder.TYPE_SMALL... | Called to create the ViewHolder at the given position. |
public void reserve(int len) throws IOException {
if (len > (buf.length - pos)) flushBuffer();
}
| reserve at least len bytes at the end of the buffer. Invalid if len > buffer.length |
public <T>T fromXML(final URL url,final T root){
return unmarshal(hierarchicalStreamDriver.createReader(url),root);
}
| Deserialize an object from a URL, populating the fields of the given root object instead of instantiating a new one. Note, that this is a special use case! With the ReflectionConverter XStream will write directly into the raw memory area of the existing object. Use with care! Depending on the parser implementation, som... |
public boolean isDrawRoundedSlicesEnabled(){
return mDrawRoundedSlices;
}
| Returns true if the chart is set to draw each end of a pie-slice "rounded". |
public void cleanTemplate(Integer ID){
cleanTemplate("" + ID);
}
| Clean Template cache for this ID |
private void testGaussianDistribution(double mu,double sigma,DescriptiveStatistics statistics){
Assert.assertEquals(mu,statistics.getMean(),TestThresholds.STATISTICS_EPS);
Assert.assertEquals(sigma * sigma,statistics.getVariance(),TestThresholds.STATISTICS_EPS);
Assert.assertEquals(0.0,statistics.getSkewness(),Te... | Asserts that the statistical distribution satisfies the properties of a Gaussian distribution with the specified mean and standard deviation. |
public SearchSourceBuilder sort(SortBuilder sort){
if (sorts == null) {
sorts=new ArrayList<>();
}
sorts.add(sort);
return this;
}
| Adds a sort builder. |
public void post(Object event){
post(event,EventType.DEFAULT_TAG);
}
| post a event |
@Override public void handlePatch(Operation patch){
if (!patch.hasBody()) {
patch.fail(new IllegalArgumentException("Body is required"));
return;
}
if (Operation.TX_ENSURE_COMMIT.equals(patch.getRequestHeader(Operation.TRANSACTION_HEADER))) {
handleCheckConflicts(patch);
return;
}
ResolutionRe... | Handles commits and aborts (requests to cancel/rollback). TODO 1: Should allow receiving number of transactions in flight TODO 2: Does not support 2PC for integrity checks yet! This will require specific handler from services TODO 3: Should eventually shield commit/abort against operations not coming via the /resolve u... |
private List<AbstractOption> addConfigOptions(){
List<AbstractOption> result;
if (getPlugin() == null) {
log().debug("No plugin set?");
result=Collections.<AbstractOption>emptyList();
}
else {
List<AbstractOption> newOptions=new ArrayList<AbstractOption>();
log().info("Adding OptionSoapAction");
... | This methods add the default config options to the OptionManagerEncryption. Those are: - Option for changing the SOAPAction. - Option for aborting the attack if one XSW message is accepted. - Option to not use any XML Schema. - Option to selected XML Schema files. - Option to add a search string. - The View Button - Th... |
protected Class loadArrayClassByComponentType(String className,ClassLoader classLoader) throws ClassNotFoundException {
int ndx=className.indexOf('[');
int multi=StringUtil.count(className,'[');
String componentTypeName=className.substring(0,ndx);
Class componentType=loadClass(componentTypeName,classLoader);
... | Loads array class using component type. |
public static IMouseStateChange enterEdgeLabel(final CStateFactory<?,?> m_factory,final MouseEvent event,final HitInfo hitInfo){
final EdgeLabel l=hitInfo.getHitEdgeLabel();
return new CStateChange(m_factory.createEdgeLabelEnterState(l,event),true);
}
| Changes the state to edge label enter state. |
protected void flushRequirementChanges(){
AbstractDocument doc=(AbstractDocument)getDocument();
try {
doc.readLock();
View parent=null;
boolean horizontal=false;
boolean vertical=false;
synchronized (this) {
synchronized (stats) {
int n=getViewCount();
if ((n > 0) && (minorChanged ||... | Publish the changes in preferences upward to the parent view. This is normally called by the layout thread. |
public void test_addEdge_correctRejection_001(){
final int CAPACITY=5;
TxDag dag=new TxDag(CAPACITY);
Object tx1="tx1";
Object tx2="tx2";
dag.addEdge(tx1,tx2);
try {
dag.addEdge(tx1,tx2);
fail("Expecting exception: " + IllegalStateException.class);
}
catch ( IllegalStateException ex) {
log.i... | Test for correct rejection of addEdge() when edge already exists. |
public boolean createLifetimeReplacementConnection(ServerLocation currentServer,boolean idlePossible){
HashSet excludedServers=new HashSet();
ServerLocation sl=this.connectionFactory.findBestServer(currentServer,excludedServers);
while (sl != null) {
if (sl.equals(currentServer)) {
this.allConnectionsMa... | An existing connections lifetime has expired. We only want to create one replacement connection at a time so this guy should block until this connection replaces an existing one. Note that if a connection is created here it must not count against the pool max and its idle time and lifetime must not begin until it actua... |
public static IGeoRectangle parseLatLon(String path){
if (path != null) {
String[] minMax=getLastPath(path).split(GeoRectangle.DELIM_FIELD);
if ((minMax == null) || (minMax.length == 0)) return null;
String[] elements=minMax[0].split(GeoRectangle.DELIM_SUB_FIELD);
if ((elements != null) && (elemen... | Format "lat,lon" or "lat,lon-lat,lon" |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:59.600 -0500",hash_original_method="1719055BB7B83C8257DECB960F96EA3B",hash_generated_method="057AC4294C52FE0AC14AB3E2D4532546") @Deprecated public static Uri createPersonInMyContactsGroup(ContentResolver resolver,ContentValues value... | Creates a new contacts and adds it to the "My Contacts" group. |
public MosaicDefinition(final Deserializer deserializer){
this.creator=Account.readFrom(deserializer,"creator",AddressEncoding.PUBLIC_KEY);
this.id=deserializer.readObject("id",null);
this.descriptor=MosaicDescriptor.readFrom(deserializer,"description");
this.properties=new DefaultMosaicProperties(deserializer.... | Deserializes a mosaic definition. |
private boolean processKeyUp(int keyCode){
if (keyCode == KeyEvent.KEYCODE_DEL) {
if (mInKbMode) {
if (!mTypedTimes.isEmpty()) {
int deleted=deleteLastTypedKey();
String deletedKeyStr;
if (deleted == getAmOrPmKeyCode(AM)) {
deletedKeyStr=mAmText;
}
else if ... | For keyboard mode, processes key events. |
private static List<String> addTargetClassesImport(List<String> lines,List<Attribute> attributes,Class<?> aClass){
List<Class<?>> classes=new ArrayList<Class<?>>();
for ( Attribute attribute : attributes) if (attribute.getClasses() != null && attribute.getClasses().length > 0) for ( Class<?> clazz : attribute... | This method adds to lines the import of target classes. |
public static Put metadataToPut(MailboxMessage message){
Put put=new Put(messageRowKey(message));
put.add(MESSAGES_META_CF,MESSAGE_MODSEQ,Bytes.toBytes(message.getModSeq()));
put.add(MESSAGES_META_CF,MESSAGE_INTERNALDATE,Bytes.toBytes(message.getInternalDate().getTime()));
put.add(MESSAGES_META_CF,MESSAGE_MEDIA... | Transforms only the metadata into a Put object. The rest of the message will be transfered using multiple Puts if size requires it. |
private void enablePlugins(PluginLoadOrder type){
if (type == PluginLoadOrder.STARTUP) {
helpMap.clear();
helpMap.loadConfig(config.getConfigFile(Key.HELP_FILE));
}
Plugin[] plugins=pluginManager.getPlugins();
for ( Plugin plugin : plugins) {
if (!plugin.isEnabled() && plugin.getDescription().getLo... | Enable all plugins of the given load order type. |
public static void fill(int[] array,int start,int end,int value){
Arrays.checkStartAndEnd(array.length,start,end);
for (int i=start; i < end; i++) {
array[i]=value;
}
}
| Fills the specified range in the array with the specified element. |
public static PrivKey load(File file,final String password) throws IOException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, InvalidParameterSpecException {
if (file.length() < 3) t... | Load private key from a PEM encoded file |
protected void loadTableOIS(Vector<?> data){
window.getWListbox().clear();
window.getWListbox().getModel().removeTableModelListener(window);
ListModelTable model=new ListModelTable(data);
model.addTableModelListener(window);
window.getWListbox().setData(model,getOISColumnNames());
configureMiniTable(window.... | Load Order/Invoice/Shipment data into Table |
public static void writeIgniteConfiguration(BinaryRawWriter w,IgniteConfiguration cfg){
assert w != null;
assert cfg != null;
w.writeBoolean(true);
w.writeBoolean(cfg.isClientMode());
w.writeIntArray(cfg.getIncludeEventTypes());
w.writeBoolean(true);
w.writeLong(cfg.getMetricsExpireTime());
w.writeBoole... | Writes Ignite configuration. |
public void flushFileContent(String mimeType,String charset,String fileName,String fileContent) throws IOException {
generateFileContent(mimeType,charset,fileName,fileContent);
this.response.flushBuffer();
}
| Flushes the response as a file. |
public AtomicIntChunks(final long length){
this(length,CHUNK_BITS);
}
| Constructs an index by splitting into array chunks. |
@Override public AmpException rethrow(String msg){
return new AmpException(msg,this);
}
| Rethrow the exception to include the proper stack trace. |
public boolean logout() throws IOException {
return FTPReply.isPositiveCompletion(quit());
}
| Logout of the FTP server by sending the QUIT command. <p> |
public Map<NetworkLite,List<StoragePort>> selectStoragePortsInNetworks(List<StoragePort> storagePorts,Collection<NetworkLite> networks,URI varrayURI,ExportPathParams pathParams){
Map<NetworkLite,List<StoragePort>> portsInNetwork=new HashMap<>();
for ( NetworkLite networkLite : networks) {
URI networkURI=networ... | Return list of storage ports from the given storage ports connected to the given network and with connectivity to the passed virtual array. |
protected synchronized void onResized(int columns,int rows){
onResized(new TerminalSize(columns,rows));
}
| Call this method when the terminal has been resized or the initial size of the terminal has been discovered. It will trigger all resize listeners, but only if the size has changed from before. |
public T coords(String value){
return attr("coords",value);
}
| Sets the <code>coords</code> attribute on the last started tag that has not been closed. |
protected EqualityOp_Impl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
private boolean isLeapYear(long year){
return !((year % 4) != 0 || (year % 100) == 0 && (year % 400) != 0);
}
| Returns true if the given year is a leap year. |
@Override public String createInitialLoadSqlFor(Node node,TriggerRouter trigger,Table table,TriggerHistory triggerHistory,Channel channel,String overrideSelectSql){
String sql=super.createInitialLoadSqlFor(node,trigger,table,triggerHistory,channel,overrideSelectSql);
sql=sql.replace("''","'");
return sql;
}
| All the templates have ' escaped because the SQL is inserted into a view. When returning the raw SQL for use as SQL it needs to be un-escaped. |
protected AbstractTParser(TokenStream input){
super(input);
}
| Create a new parser instance, pre-supplying the input token stream. |
public void sortArray(T[] d,Comparator<T> c){
this.data=d;
this.comp=c;
int len=Math.max((int)(100 * Math.log(d.length)),TEMP_SIZE);
len=Math.min(d.length,len);
@SuppressWarnings("unchecked") T[] t=(T[])new Object[len];
this.temp=t;
mergeSort(0,d.length - 1);
}
| Sort an array using the given comparator. |
public UnicodeReader(InputStream in) throws IOException {
this(in,null);
}
| Creates a reader using the encoding specified by the BOM in the file; if there is no recognized BOM, then a system default encoding is used. |
public String optString(String key,String defaultValue){
Object o=opt(key);
return o != null ? o.toString() : defaultValue;
}
| Get an optional string associated with a key. It returns the defaultValue if there is no such key. |
public final Cursor increment(int i){
index+=i;
return this;
}
| Increments the cursor index by the specified value. |
public void put(String key,Integer value){
mValues.put(key,value);
}
| Adds a value to the set. |
public static boolean isSkipPosting(final GameData data){
final boolean skipPosting;
data.acquireReadLock();
try {
skipPosting=Boolean.parseBoolean(data.getSequence().getStep().getProperties().getProperty(GameStep.PROPERTY_skipPosting,"false"));
}
finally {
data.releaseReadLock();
}
return skipPos... | Do we skip posting the game summary and save to a forum or email? |
public SpecialTextUnit showStrikeThrough(){
isShowStrikeThrough=true;
return this;
}
| Show StrikeThrough |
public Boolean isSnapshotLocked(){
return snapshotLocked;
}
| Gets the value of the snapshotLocked property. |
public void incFunctionExecutionsCompleted(){
this._stats.incInt(_functionExecutionsCompletedId,1);
}
| Increments the "FunctionExecutionsCompleted" stat. |
private static IgfsBlockLocation location(long start,long len,UUID... nodeIds){
assert nodeIds != null && nodeIds.length > 0;
Collection<ClusterNode> nodes=new ArrayList<>(nodeIds.length);
for ( UUID id : nodeIds) nodes.add(new GridTestNode(id));
return new IgfsBlockLocationImpl(start,len,nodes);
}
| Create block location. |
public static Map<String,Object> updateUserLoginId(DispatchContext ctx,Map<String,?> context){
Map<String,Object> result=new LinkedHashMap<String,Object>();
Delegator delegator=ctx.getDelegator();
GenericValue loggedInUserLogin=(GenericValue)context.get("userLogin");
List<String> errorMessageList=new LinkedList... | Updates the UserLoginId for a party, replicating password, etc from current login and expiring the old login. |
public Object runSafely(Catbert.FastStack stack) throws Exception {
return stack.getUIMgrSafe().getSTVVersion();
}
| Returns the value of the 'STVVersion' Attribute under the Global Theme Widget. This is used for dependencies relating to plugins. |
@Override public void run(){
amIActive=true;
String inputHeader=null;
String outputHeader=null;
int row, col, x, y;
double z, min, max;
float progress=0;
int a;
int filterSizeX=3;
int filterSizeY=3;
int dX[];
int dY[];
int midPointX;
int midPointY;
int numPixelsInFilter;
boolean filterRoun... | Used to execute this plugin tool. |
public void drawCube(){
GLES20.glUseProgram(cubeProgram);
GLES20.glUniform3fv(cubeLightPosParam,1,lightPosInEyeSpace,0);
GLES20.glUniformMatrix4fv(cubeModelParam,1,false,modelCube,0);
GLES20.glUniformMatrix4fv(cubeModelViewParam,1,false,modelView,0);
GLES20.glVertexAttribPointer(cubePositionParam,COORDS_PER_V... | Draw the cube. <p>We've set all of our transformation matrices. Now we simply pass them into the shader. |
@Override public boolean equals(Object theObject){
if (theObject instanceof Timestamp) {
return equals((Timestamp)theObject);
}
return false;
}
| Tests to see if this timestamp is equal to a supplied object. |
public byte[] peek(long wait) throws KeeperException, InterruptedException {
Preconditions.checkArgument(wait > 0);
TimerContext time;
if (wait == Long.MAX_VALUE) {
time=stats.time(dir + "_peek_wait_forever");
}
else {
time=stats.time(dir + "_peek_wait" + wait);
}
updateLock.lockInterruptibly();
... | Returns the data at the first element of the queue, or null if the queue is empty after wait ms. |
public static CacheHeader readHeader(InputStream is) throws IOException {
CacheHeader entry=new CacheHeader();
int magic=readInt(is);
if (magic != CACHE_MAGIC) {
throw new IOException();
}
entry.key=readString(is);
entry.etag=readString(is);
if (entry.etag.equals("")) {
entry.etag=null;
}
entr... | Reads the header off of an InputStream and returns a CacheHeader object. |
public synchronized void flush() throws IOException {
if (!initialized) return;
checkNotClosed();
trimToSize();
journalWriter.flush();
}
| Force buffered operations to the filesystem. |
public void testDivideBigDecimalScaleRoundingModeHALF_EVEN(){
String a="3736186567876876578956958765675671119238118911893939591735";
int aScale=5;
String b="74723342238476237823787879183470";
int bScale=15;
int newScale=7;
RoundingMode rm=RoundingMode.HALF_EVEN;
String c="500002603731642864013619132621009... | divide(BigDecimal, scale, RoundingMode) |
public static boolean needToDo(String tag){
return toDoSet.contains(tag);
}
| Checks if a tag is currently marked as 'to do'. |
public ExecutionState basicGetState(){
return state;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
@Override protected boolean accept(String propertyValue){
int major;
int minor;
Matcher matcher=MAJOR_MINOR_VERSION_PATTERN.matcher(propertyValue);
if (matcher.matches()) {
major=Integer.parseInt(matcher.group(1));
minor=Integer.parseInt(matcher.group(2));
}
else {
throw new RuntimeException("Mal... | Returns true if the given property value, which is a major.minor Unicode version, is less than or equal to the Unicode version, false otherwise. |
public boolean isValidRepository() throws LocalRepositoryException {
final String prefix="isValidRepository: ";
_log.debug(prefix);
final String[] cmd={_SYSTOOL_CMD,_SYSTOOL_IS_APPLIANCE};
final String[] ret=exec(prefix,cmd);
if (ret == null) {
throw SyssvcException.syssvcExceptions.localRepoError(prefix ... | Check if the current deployment is an appliance |
public void testProperties() throws Exception {
ReplicatorCapabilities caps1=new ReplicatorCapabilities();
TungstenProperties cprops=caps1.asProperties();
ReplicatorCapabilities caps2=new ReplicatorCapabilities(cprops);
testEquality(caps1,caps2);
caps1=new ReplicatorCapabilities();
caps1.addRole("master");
... | Tests round trip storage in properties. |
public void run(final String[] args){
if (args.length == 0) {
System.out.println("Too few arguments.");
printUsage();
System.exit(1);
}
Iterator<String> argIter=new ArgumentParser(args).iterator();
String arg=argIter.next();
if (arg.equals("-h") || arg.equals("--help")) {
printUsage();
Sys... | Runs the network cleaning algorithms over the network read in from the argument list, and writing the resulting network out to a file again |
public void registerInterestRegistrationListener(InterestRegistrationListener listener){
final String s=LocalizedStrings.RemoteBridgeServer_INTERESTREGISTRATIONLISTENERS_CANNOT_BE_REGISTERED_ON_A_REMOTE_BRIDGESERVER.toLocalizedString();
throw new UnsupportedOperationException(s);
}
| Registers a new <code>InterestRegistrationListener</code> with the set of <code>InterestRegistrationListener</code>s. |
@Override public String toString(){
return toString(5,false);
}
| Convert the DoubleVecor to a string |
private void zInternalSetDateTextField(String text){
skipTextFieldChangedFunctionWhileTrue=true;
dateTextField.setText(text);
skipTextFieldChangedFunctionWhileTrue=false;
zEventTextFieldChanged();
}
| zInternalSetDateTextField, This is called whenever we need to programmatically change the date text field. The purpose of this function is to make sure that text field change events only occur once per programmatic text change, instead of occurring twice. The default behavior is that the text change event will fire twi... |
@Override public Iterator<Instruction> iterator(){
return m_instructions.iterator();
}
| Can be used to iterate over all instructions in the basic block. |
protected String handleTime(Time time){
return time == null ? null : time.toString();
}
| Return time read from ResultSet. |
private static String decodeBase900toBase10(int[] codewords,int count) throws FormatException {
BigInteger result=BigInteger.ZERO;
for (int i=0; i < count; i++) {
result=result.add(EXP900[count - i - 1].multiply(BigInteger.valueOf(codewords[i])));
}
String resultString=result.toString();
if (resultString.... | Convert a list of Numeric Compacted codewords from Base 900 to Base 10. |
public TextEditorPane(int textMode,boolean wordWrapEnabled){
super(textMode);
setLineWrap(wordWrapEnabled);
try {
init(null,null);
}
catch ( IOException ioe) {
ioe.printStackTrace();
}
}
| Creates a new <code>TextEditorPane</code>. The file will be given a default name. |
@Override public int hashCode(){
return mID;
}
| Calculates the hash code value for a BaseObj. |
public static double stirlingFormula(double x){
double STIR[]={7.87311395793093628397E-4,-2.29549961613378126380E-4,-2.68132617805781232825E-3,3.47222221605458667310E-3,8.33333333333482257126E-2};
double MAXSTIR=143.01608;
double w=1.0 / x;
double y=Math.exp(x);
w=1.0 + w * polevl(w,STIR,4);
if (x > MAXSTIR... | Returns the Gamma function computed by Stirling's formula. The polynomial STIR is valid for 33 <= x <= 172. |
public void reset(ActionMapping mapping,HttpServletRequest request){
super.reset(mapping,request);
niveles=new String[0];
}
| Inicia el formulario. |
public String serializedClustererFileTipText(){
return "A file containing the serialized model of a built clusterer.";
}
| Returns the tip text for this property. |
void unSelect(){
if (mHideOnSelect) {
show(true);
}
}
| callback from bottom navigation tab when it is un-selected |
public void connectToTangoCamera(Tango tango,int cameraId){
mRenderer.connectCamera(tango,cameraId);
}
| Gets a textureId from a valid OpenGL Context through Rajawali and connects it to the TangoRajawaliView. Use OnFrameAvailable events or updateTexture calls to update the view with the latest camera data. Only the RGB and fisheye cameras are currently supported. |
public static MContainer copy(MWebProject project,MCStage stage,String path){
MContainer cc=getDirect(stage.getCtx(),stage.getCM_CStage_ID(),stage.get_TrxName());
if (cc == null) cc=new MContainer(stage.getCtx(),0,stage.get_TrxName());
cc.setStage(project,stage,path);
cc.save();
if (!stage.isSummary()) {
... | Copy Stage into Container |
private void discoverUnManagedCifsShares(AccessProfile profile){
URI storageSystemId=profile.getSystemId();
StorageSystem storageSystem=_dbClient.queryObject(StorageSystem.class,storageSystemId);
if (null == storageSystem) {
return;
}
storageSystem.setDiscoveryStatus(DiscoveredDataObject.DataCollectionJob... | discover the unmanaged cifs shares and add shares to ViPR db |
public boolean isDefaultPrf(){
return prf == null || prf.equals(algid_hmacWithSHA1);
}
| Return true if the PRF is the default (hmacWithSHA1) |
public Path tools(){
return root.resolve("tools");
}
| Gets the tools directory. |
public static void listDatasets(final Bigquery bigquery,final String projectId) throws IOException {
Datasets.List datasetRequest=bigquery.datasets().list(projectId);
DatasetList datasetList=datasetRequest.execute();
if (datasetList.getDatasets() != null) {
List<DatasetList.Datasets> datasets=datasetList.getD... | Display all BigQuery datasets associated with a project. |
public TransactionImpl(){
}
| Constructs an instance of a Transaction |
public Vertex discover(boolean details,boolean fork,String filter,Vertex vertex,Vertex vertex2,Vertex vertex3,Vertex vertex4,Vertex vertex5){
String keywords=vertex.getDataValue();
String keywordscaps=Utils.capitalize(vertex.getDataValue());
if ((vertex2 != null) && !vertex2.is(Primitive.NULL)) {
keywords=key... | Self API Discover the meaning of the word. |
public AttributeCertificateHolder(int digestedObjectType,ASN1ObjectIdentifier digestAlgorithm,ASN1ObjectIdentifier otherObjectTypeID,byte[] objectDigest){
holder=new Holder(new ObjectDigestInfo(digestedObjectType,otherObjectTypeID,new AlgorithmIdentifier(digestAlgorithm),Arrays.clone(objectDigest)));
}
| Constructs a holder for v2 attribute certificates with a hash value for some type of object. <p> <code>digestedObjectType</code> can be one of the following: <ul> <li>0 - publicKey - A hash of the public key of the holder must be passed. <li>1 - publicKeyCert - A hash of the public key certificate of the holder must be... |
private static boolean matchIntlPrefix(String a,int len){
int state=0;
for (int i=0; i < len; i++) {
char c=a.charAt(i);
switch (state) {
case 0:
if (c == '+') state=1;
else if (c == '0') state=2;
else if (isNonSeparator(c)) return false;
break;
case 2:
if (c == '0') ... | all of a up to len must be an international prefix or separators/non-dialing digits |
List<NamedRange> removeSurrogates(int startCodePoint,int endCodePoint){
assert startCodePoint <= endCodePoint;
if (startCodePoint >= 0xD800 && endCodePoint <= 0xDFFF) {
return Collections.emptyList();
}
List<NamedRange> ranges=new ArrayList<NamedRange>();
if (endCodePoint < 0xD800 || startCodePoint > 0xDF... | Returns 0, 1, or 2 ranges for the given interval, depending on whether it is contained within; is entirely outside of or starts or ends within; or straddles the surrogate range 0xD800-0xDFFF, respectively. |
public void printMap(HashMap<String,HashMap<String,HashSet<Integer>>> map){
map.forEach(null);
}
| Depub method which write the filter "value" map to std::out |
public DenseVector(int n){
u=new float[n];
}
| Constructs a new vector with the specified capacity |
public InlineQueryResultVideo.InlineQueryResultVideoBuilder videoHeight(int videoHeight){
this.video_height=videoHeight;
return this;
}
| *Optional Sets the height of the video file being sent for this result |
public void visitEnd(){
if (fv != null) {
fv.visitEnd();
}
}
| Visits the end of the field. This method, which is the last one to be called, is used to inform the visitor that all the annotations and attributes of the field have been visited. |
public SizedTextField(final int columns,final Dimension dim){
super(columns);
setPreferredSize(dim);
setMaximumSize(dim);
}
| Creates a <tt>JTextField</tt> with a standard size and with the specified number of columns and the specified <tt>Dimension</tt>.. |
@Override public void clear(){
stackTop=0;
}
| clear the stack |
public void createSubscription(final Color color,final boolean subscribe,final TabbedSubscriptionDetails subscriptionDetails,final MqttAsyncConnection connection,final MqttConnectionController connectionController,final Object parent){
logger.info("Creating subscription for " + subscriptionDetails.getTopic());
fina... | Creates a subscription and a tab for it. |
public static List<TriggerMessage> create(TriggerType triggerType,List<TriggerProcessParameter> params,Organization receiver){
List<TriggerMessage> messages=Collections.singletonList((new TriggerMessage(triggerType,params,Collections.singletonList(receiver))));
return messages;
}
| Convenience method to constructs a new trigger message list based on the given parameters. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:31.650 -0500",hash_original_method="97FF8506F533416A8B40E097933B45CB",hash_generated_method="E01E632F05C3B4BB240F0FFBFCB3F338") public javax.sip.address.SipURI createSipURI(String user,String host) throws ParseException {
if (host... | Create a SipURI |
public EntryLink(Class<E> entryClass){
this.entryClass=entryClass;
}
| Constructs an entry link that points to the given entry type. |
public SMJReportViewer(Integer AD_PInstance_ID,String nameTrx,Integer idReport,Integer C_Period_ID,Integer AD_PrintFont_ID,MReportColumn[] columns){
super();
reportId=idReport;
m_AD_PInstance_ID=AD_PInstance_ID;
trxName=nameTrx;
p_C_Period_ID=C_Period_ID;
p_AD_PrintFont_ID=AD_PrintFont_ID;
m_columns=colum... | Static Layout |
protected void decrypt(byte[] b,int off,int len,long fp){
for (int i=off; i < off + len; i++) {
b[i]=(byte)decrypt(b[i],fp++);
}
}
| Decrypt a range within a byte array. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.