code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
private void writeObject(ObjectOutputStream stream) throws IOException {
byte[] rules=packRules();
int[] times=packTimes();
makeRulesCompatible();
stream.defaultWriteObject();
stream.writeInt(rules.length);
stream.write(rules);
stream.writeObject(times);
unpackRules(rules);
unpackTimes(times);
}
| Save the state of this object to a stream (i.e., serialize it). |
static int userCheck(String stmt,int offset){
if (stmt.length() > offset + 5) {
char c1=stmt.charAt(++offset);
char c2=stmt.charAt(++offset);
char c3=stmt.charAt(++offset);
char c4=stmt.charAt(++offset);
char c5=stmt.charAt(++offset);
if ((c1 == 'S' || c1 == 's') && (c2 == 'E' || c2 == 'e') &&... | SELECT USER() |
public void parentExplotion(int PP_Product_BOM_ID) throws Exception {
PreparedStatement stmt=null;
ResultSet rs=null;
String sql="SELECT PP_Product_BOMLine_ID, M_Product_ID FROM PP_Product_BOMLine boml " + "WHERE IsActive = 'Y' AND PP_Product_BOM_ID = ? ORDER BY Line ";
try {
stmt=DB.prepareStatement(sql,ge... | Generate an Explotion for this BOM |
protected VisorCache initHistory(VisorCache c){
if (c != null) {
c.name=name;
c.mode=mode;
c.memorySize=memorySize;
c.indexesSize=indexesSize;
c.size=size;
c.nearSize=nearSize;
c.dhtSize=dhtSize;
c.primarySize=primarySize;
c.offHeapAllocatedSize=offHeapAllocatedSize;
c.offHeapE... | Fill values that should be stored in history; |
public void add(long value){
if (size == values.length) {
values=Arrays.copyOf(values,size * 2);
}
values[size++]=value;
}
| Appends a value. |
protected void buildSubstitutableProperties(){
for ( String propName : coreProperties.stringPropertyNames()) {
String propValue=coreProperties.getProperty(propName);
if (!isUserDefinedProperty(propName)) propName=SOLR_CORE_PROP_PREFIX + propName;
substitutableProperties.setProperty(propName,propValue... | Create the properties object used by resource loaders, etc, for property substitution. The default solr properties are prefixed with 'solr.core.', so, e.g., 'name' becomes 'solr.core.name' |
protected boolean isPremoveDrop(int fromSquare,int toSquare){
return isBughouse() && ChessBoardUtils.isPieceJailSquare(fromSquare) && board.getSquare(fromSquare).getPiece() == EMPTY;
}
| Returns true if the from square to square represents a premove drop. |
public static IntInterval oddsFromTo(int from,int to){
if (from % 2 == 0) {
if (from < to) {
from++;
}
else {
from--;
}
}
if (to % 2 == 0) {
if (to > from) {
to--;
}
else {
to++;
}
}
return IntInterval.fromToBy(from,to,to > from ? 2 : -2);
}
| Returns an IntInterval representing the odd values from the value from to the value to. |
public void reset(ActionMapping mapping,HttpServletRequest request){
super.reset(mapping,request);
tipos=new String[0];
estados=new String[0];
}
| Inicia el formulario. |
protected void drawChartValuesText(Canvas canvas,XYSeries series,XYSeriesRenderer renderer,Paint paint,List<Float> points,int seriesIndex,int startIndex){
int seriesNr=mDataset.getSeriesCount();
float halfDiffX=getHalfDiffX(points,points.size(),seriesNr);
int start=0;
if (startIndex > 0) {
start=2;
}
fo... | The graphical representation of the series values as text. |
public void testZeroZero(){
byte aBytes[]={0};
byte bBytes[]={0};
int aSign=0;
int bSign=0;
byte rBytes[]={0};
BigInteger aNumber=new BigInteger(aSign,aBytes);
BigInteger bNumber=new BigInteger(bSign,bBytes);
BigInteger result=aNumber.and(bNumber);
byte resBytes[]=new byte[rBytes.length];
resBytes=r... | And for zero and zero |
private static String convertToQuotedString(String string){
if (string == null || string.length() == 0) {
return null;
}
if (string.charAt(0) == '"' && string.charAt(string.length() - 1) == '"') {
return string;
}
return '\"' + string + '\"';
}
| Encloses the incoming string inside double quotes, if it isn't already quoted. |
private void writeQName(javax.xml.namespace.QName qname,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI=qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix=xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {... | method to handle Qnames |
public Tour(){
super();
nodes=new ArrayList<Integer>();
}
| Constructs a new, empty tour. |
public DoubleMatrix2D assign(double value){
if (value == 0) {
for (int i=values.length; --i >= 0; ) values[i]=0;
for (int i=dims.length; --i >= NONZERO; ) dims[i]=0;
}
else super.assign(value);
return this;
}
| Sets all cells to the state specified by <tt>value</tt>. |
public long priority(){
return Long.parseLong(fields[17]);
}
| <p>(Explanation for Linux 2.6) For processes running a real-time scheduling policy (policy below; see sched_setscheduler(2)), this is the negated scheduling priority, minus one; that is, a number in the range -2 to -100, corresponding to real-time priorities 1 to 99. For processes running under a non-real-time schedul... |
public boolean hasPointsToInfo(){
return receiverAllocSources != null || methodArgumentAllocSources != null;
}
| Returns true if there is points-to info on the receiver or one of the method arguments. |
public Builder withEvents(Event<?>... events){
return withEvents(Arrays.asList(Assert.notNull(events,"events")));
}
| Sets the request events. |
protected Marker(){
this(Color.gray);
}
| Creates a new marker with default attributes. |
public Searcher() throws IOException {
searcher=new IndexSearcher(DirectoryReader.open(FSDirectory.open(Paths.get(INDEX_DIR))));
parser=new QueryParser(CONTENT_FIELD,new StandardAnalyzer());
}
| Creates a new instance of SearchEngine |
protected static void appendStringType(StringBuilder sb){
sb.append("VARCHAR");
}
| Output the SQL type for a Java String. |
private void verifyAssignmentChanges(StoragePort storagePort,VirtualArrayAssignmentChanges varrayAssignmentChanges){
VirtualArrayAssignments addAssignments=varrayAssignmentChanges.getAdd();
VirtualArrayAssignments removeAssignments=varrayAssignmentChanges.getRemove();
if ((addAssignments != null) && (removeAssign... | Verifies the virtual array assignment changes in the update request are valid, else throws a bad request exception. |
public long persistSubscription(Subscription subscription) throws PersistenceException {
SQLiteDatabase db=getWritableDatabase();
ContentValues values=new ContentValues();
values.put(COLUMN_CLIENT_HANDLE,subscription.getClientHandle());
values.put(SUBSCRIPTIONS_COLUMN_TOPIC,subscription.getTopic());
values.pu... | Persist a Subscription to the database |
public void runTest() throws Throwable {
Document doc;
NamedNodeMap attributes;
Node element;
Attr attribute;
NodeList elementList;
doc=(Document)load("staffNS",false);
elementList=doc.getElementsByTagNameNS("*","address");
element=elementList.item(1);
attributes=element.getAttributes();
attribute=(... | Runs the test case. |
private static void error(BackupForm backupForm){
params.flash();
Validation.keep();
create();
}
| Handles an error while saving a backup form. |
public boolean isNavBarTintEnabled(){
return mNavBarTintEnabled;
}
| Is tinting enabled for the system navigation bar? |
public boolean resultMayEscapeThread(){
return (escapeInfo & RESULT_ESCAPES) != 0L;
}
| Query whether the result of this method may escape from a thread. |
public void dropAllCache(){
cacheTypeToLRUCacheMap.clear();
cacheTypeToCacheMap.clear();
}
| Below method will be used to clear the cache |
public void testNonBlockingStop_FirstLink() throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
Fixture f=new Fixture(1,false,0,false);
f.simEngine.doSimStep(100);
assertEquals(2,f.qlink1.getAllVehicles().size());
assertEquals(0,f.qlink2... | Tests that a non-blocking stops on the first link of a transit vehicle's network route is correctly handled. |
public boolean hasMoreTokens(){
skipDelimiters();
return (currentPosition < maxPosition);
}
| Tests if there are more tokens available from this tokenizer's string. If this method returns <tt>true</tt>, then a subsequent call to <tt>nextToken</tt> with no argument will successfully return a token. |
public String findMostSpecific(String attributeType){
pos=0;
beg=0;
end=0;
cur=0;
chars=dn.toCharArray();
String attType=nextAT();
if (attType == null) {
return null;
}
while (true) {
String attValue="";
if (pos == length) {
return null;
}
switch (chars[pos]) {
case '"':
at... | Parses the DN and returns the most significant attribute value for an attribute type, or null if none found. |
public CovMatrixSumWrapper(DataWrapper wrapper1,DataWrapper wrapper2){
if (wrapper1 == null || wrapper2 == null) {
throw new NullPointerException("The data must not be null");
}
DataModel model1=wrapper1.getSelectedDataModel();
DataModel model2=wrapper2.getSelectedDataModel();
if (!(model1 instanceof ICov... | Splits the given data set by collinear columns. |
public MaxBytesExceededException(String message){
super(message);
}
| create an with the given message. |
private static Vector<String> generateParentBoxVector(final INaviModule module){
final HashSet<String> parents=new HashSet<String>();
for ( final INaviFunction function : module.getContent().getFunctionContainer().getFunctions()) {
final String name=function.getOriginalModulename();
if (!name.equals(module... | Creates a list of all parent module strings of the functions of a module. |
public static Intent newLocationSettingsIntent(Context context){
Intent intent=new Intent(useGoogleLocationSettings(context) ? ACTION_GOOGLE_LOCATION_SETTINGS : Settings.ACTION_LOCATION_SOURCE_SETTINGS);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
return intent;
}
| Creates a new location settings intent. |
private Object lookupConnectivityConfiguration() throws NamingException {
final InitialContext ctx=new InitialContext();
String key=InitParametersInjector.get(InitParametersInjector.INIT_PARAM_JNDI_CONNECTIVITY_CONFIGURATION);
if (key != null) {
return ctx.lookup(key);
}
return null;
}
| Retrieve the Connectivity Configuration from the target platform |
public void postSaveReInit(){
for ( SynapseGroup group : this.getSynapseGroups()) {
group.postSaveReInit();
}
}
| Returns synapse groups to a usable state after a save is performed. |
public boolean showDialog(){
setVisible(true);
return continueQueue;
}
| Shows the dialog and returns whether the work on the queue should be continued. |
@Override public double errorValue(boolean calculate){
if (!Double.isNaN(m_unitValue) && Double.isNaN(m_unitError) && calculate) {
if (m_input) {
m_unitError=0;
for (int noa=0; noa < m_numOutputs; noa++) {
m_unitError+=m_outputList[noa].errorValue(true);
}
}
else {
if (m_curre... | Call this to get the error value of this unit, which in this case is the difference between the predicted class, and the actual class. |
public DependencyList add(PersistentDependency dependency){
if (dependency == this) throw new IllegalArgumentException("Can't add self as a dependency.");
if (!_dependencyList.contains(dependency)) _dependencyList.add(dependency);
return this;
}
| Adds a dependency. |
public static boolean isWindows(){
if (System.getProperty("os.name").indexOf("Windows") != -1) {
return true;
}
else {
return false;
}
}
| Checks if the OS is windows. |
public MessagePart createMessagePartFromString(EDataType eDataType,String initialValue){
MessagePart result=MessagePart.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '"+ eDataType.getName()+ "'");
return result;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static boolean hasPermission(Activity activity,String[] permissions){
for ( String permission : permissions) {
if (ContextCompat.checkSelfPermission(activity,permission) != PackageManager.PERMISSION_GRANTED) {
return false;
}
}
return true;
}
| Returns true if the Activity has access to a all given permission. |
public boolean isEvaluatable(){
if (expression != null) {
return expression.isEverything(ExpressionVisitor.EVALUATABLE_VISITOR);
}
if (expressionList != null) {
for ( Expression e : expressionList) {
if (!e.isEverything(ExpressionVisitor.EVALUATABLE_VISITOR)) {
return false;
}
}... | Check if the expression can be evaluated. |
public static ImmutableCollection<PreBuiltSimilarityProvider.Factory> listFactories(){
return PRE_BUILT_SIMILARITIES.values();
}
| Returns the list of pre-defined SimilarityProvider Factories |
@Override protected boolean parse(final ConfAction params){
try {
number=StringUtils.unspace(params.getString(M.e("number")));
descrType=params.getString("type","sim");
if ("position".equals(descrType)) {
type=TYPE_LOCATION;
}
else if ("text".equals(descrType)) {
type=TYPE_TEXT;
}... | Parses the. |
private void processPrepareResult(BinaryReaderExImpl in){
assert cfg != null;
PlatformConfigurationUtils.readIgniteConfiguration(in,cfg);
List<PlatformDotNetLifecycleBean> beans=beans(cfg);
List<PlatformLifecycleBean> newBeans=new ArrayList<>();
int len=in.readInt();
for (int i=0; i < len; i++) {
if (i ... | Process prepare result. |
public SerialLight(String systemName,String userName,CMRISystemConnectionMemo memo){
super(systemName,userName);
_memo=memo;
initializeLight(systemName);
}
| Create a Light object, with both system and user names. <P> 'systemName' was previously validated in SerialLightManager |
private void standardMove(KernelPoint destination,KernelPoint source){
destination.InvK=source.InvK;
destination.InvKExpanded=source.InvKExpanded;
destination.K=source.K;
destination.KExpanded=source.KExpanded;
}
| Updates the gram matrix storage of the destination to point at the exact same objects as the ones from the source. |
private void showLogfileDialog(){
final JFileChooser chooser=new JFileChooser();
chooser.setCurrentDirectory(new File(ConfigHelper.getConfigurationDirectory(Constants.COMPANY_NAME,Constants.PROJECT_NAME)));
if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) {
try {
CLogFileDialog.show(Swin... | Shows the log file dialog. |
public int dot(Vector4i v){
return x * v.x + y * v.y + z * v.z + w * v.w;
}
| Compute the dot product (inner product) of this vector and <code>v</code>. |
public void freeze(){
this.frozen=true;
for ( Info info : fields.values()) {
info.freeze();
}
}
| Prepares the MemoryIndex for querying in a non-lazy way. <p> After calling this you can query the MemoryIndex from multiple threads, but you cannot subsequently add new data. |
private static void computeSupport(Plane plane,List<Vector3> points,double minimumDistance){
supportingPoints=new LinkedList<>();
notSupportingPoints=new LinkedList<>();
for ( Vector3 point : points) {
double distanceToPlane=plane.distanceTo(point);
if (FastMath.abs(distanceToPlane) <= minimumDistance) {... | calculates the list of supporting Points for the given 3 points |
public void readExamples(DataRowReader i,boolean permute){
readExamples(i,permute,null);
}
| Reads the examples into memory and permutes the order. Removes all old data rows first. |
private void doDeactivateDOI(DOI doi) throws DeletionNotAllowedException {
Preconditions.checkNotNull(registrationManager.getDoiService());
Preconditions.checkNotNull(doi);
try {
DoiData doiData=registrationManager.getDoiService().resolve(doi);
if (doiData != null && doiData.getStatus() != null) {
i... | Resolve DOI, then depending on its state delete it (if reserved) or deactivate it (if registered). |
private Integer[] createVertices(int count){
Integer[] v=new Integer[count];
for (int i=0; i < count; i++) {
v[i]=new Integer(i);
graph.addVertex(v[i]);
}
return v;
}
| create some vertices |
public static String javaScriptUnescape(String s){
StringBuilder sb=new StringBuilder(s.length());
for (int i=0; i < s.length(); ) {
char c=s.charAt(i);
if (c == '\\') {
i=javaScriptUnescapeHelper(s,i + 1,sb);
}
else {
sb.append(c);
i++;
}
}
return sb.toString();
}
| Undo escaping as performed in javaScriptEscape(.) Throws an IllegalArgumentException if the string contains bad escaping. |
public TrackGrid build(){
if (buildList.get(currentYLevel).size() != sizeZ) throw new IllegalArgumentException("The Z length (" + buildList.get(currentYLevel).size() + ") did not match "+ sizeZ);
boolean[][][] ret=new boolean[buildList.size()][buildList.get(0).size()][buildList.get(0).get(0).length];
int i=0, j... | Finish the building step and return a TrackGrid |
public synchronized void removeFile(String fileName){
for ( LogIndexEntry entry : index) {
if (fileName.equals(entry.fileName)) {
index.remove(entry);
logger.info("Removed file from disk log index: " + fileName);
return;
}
}
logger.warn("Attempt to remove non-existent file from disk log... | Remove a file from the index. |
public synchronized BookKeeperClientBuilder ledgersPath(String ledgersPath){
this.ledgersPath=ledgersPath;
return this;
}
| Set the ledgers path that bookkeeper client is going to access. |
protected void writeGraphicCtrlExt() throws IOException {
out.write(0x21);
out.write(0xf9);
out.write(4);
int transp, disp;
if (transparent == null) {
transp=0;
disp=0;
}
else {
transp=1;
disp=2;
}
if (dispose >= 0) {
disp=dispose & 7;
}
disp<<=2;
out.write(0 | disp | 0| trans... | Writes Graphic Control Extension |
@Override public SerializationConfig withDateFormat(DateFormat df){
SerializationConfig cfg=new SerializationConfig(this,_base.withDateFormat(df));
if (df == null) {
cfg=cfg.with(Feature.WRITE_DATES_AS_TIMESTAMPS);
}
else {
cfg=cfg.without(Feature.WRITE_DATES_AS_TIMESTAMPS);
}
return cfg;
}
| In addition to constructing instance with specified date format, will enable or disable <code>Feature.WRITE_DATES_AS_TIMESTAMPS</code> (enable if format set as null; disable if non-null) |
public Long addRoomWithModeration(String SID,String name,Long roomtypes_id,String comment,Long numberOfPartizipants,Boolean ispublic,Boolean appointment,Boolean isDemoRoom,Integer demoTime,Boolean isModeratedRoom){
try {
Long users_id=sessionManagement.checkSession(SID);
Long user_level=userManagement.getUser... | Create a conference room |
public static int parseInt(CharSequence csq,int radix){
Cursor cursor=new Cursor();
int result=parseInt(csq,radix,cursor);
if (!cursor.atEnd(csq)) throw new IllegalArgumentException("Extraneous characters \"" + cursor.tail(csq) + "\"");
return result;
}
| Parses the whole specified character sequence as a signed <code>int</code> in the specified radix. |
public final void testVerifyPasswordStrength(){
String prefix="prefix";
CharSequence helperText1="helperText1";
CharSequence helperText2="helperText2";
PasswordEditText passwordEditText=new PasswordEditText(getContext());
passwordEditText.setPasswordVerificationPrefix(prefix);
passwordEditText.addAllConstra... | Tests, if the helper text is set correctly, when verifying the password strength. |
public static void main(String[] args){
checkCalcDistance();
}
| Tests calcDistance. |
public void boot(String user){
checkSocket();
this.socket.sendTextMessage("boot: " + user);
}
| Boot a user from the channel. You must be a channel administrator to boot a user. This call is asynchronous, any error or success with be sent as a separate message to the listener. |
public void solveByTotalPivotSearch(){
solve(TOTAL_PIVOT_SEARCH);
}
| Solves this linear equation system by total pivot search. "Total pivot search" takes as pivot element the element in the current column having the biggest value. If we have: <br> <code> ( a_11 ... a_1n ) <br> ( 0 ... &... |
private void updateModel(FloatMatrix u,FloatMatrix i,CfLongId itemIid,FloatMatrix j,CfLongId itemJid,Vertex<CfLongId,FloatMatrixWritable,FloatWritable> vertex){
int ITEM_BIAS_INDEX=0;
float x_uij=i.get(ITEM_BIAS_INDEX) - j.get(ITEM_BIAS_INDEX) + rowScalarProductWithRowDifference(u,i,j);
float one_over_one_plus_ex... | Updates the model based on the factors received. It is a direct port from myMediaLite. |
public static boolean parseParserExtensionTerm(PsiBuilder b,int l){
assert b instanceof PerlBuilder;
return ((PerlBuilder)b).getPerlParser().parseTerm(b,l);
}
| attempting to parse term using parserExtensions |
public void lockUI(ProcessInfo pi){
bOK.setText("");
bOK.setEnabled(false);
this.setEnabled(false);
m_isLocked=true;
}
| Lock User Interface Called from the Worker before processing |
public OMCircle(double latPoint,double lonPoint,double radius,Length units){
this(latPoint,lonPoint,radius,units,-1);
}
| Create an OMCircle with a lat/lon center and a physical distance radius. Rendertype is RENDERTYPE_LATLON. |
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd,int featureID,NotificationChain msgs){
switch (featureID) {
case N4JSPackage.TYPE_REF_ANNOTATION_ARGUMENT__TYPE_REF:
return basicSetTypeRef(null,msgs);
}
return super.eInverseRemove(otherEnd,featureID,msgs);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public void clear(){
int max=bits.length;
for (int i=0; i < max; i++) {
bits[i]=0;
}
}
| Clears all bits (sets to false). |
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){
switch (featureID) {
case TypesPackage.TINTERFACE__EXTERNAL:
return isExternal();
case TypesPackage.TINTERFACE__SUPER_INTERFACE_REFS:
return getSuperInterfaceRefs();
}
return super.eGet(featureID,resolve,coreType);
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public boolean isSetPersist(){
return EncodingUtils.testBit(__isset_bitfield,__PERSIST_ISSET_ID);
}
| Returns true if field persist is set (has been assigned a value) and false otherwise |
private void rebuild(){
List<BTDownloadDataLine> existing=new ArrayList<BTDownloadDataLine>(_list);
List<BTDownloadDataLine> hidden=new ArrayList<BTDownloadDataLine>(HIDDEN);
clear();
for (int i=0; i < existing.size(); i++) {
addSorted(existing.get(i));
}
for (int i=0; i < hidden.size(); i++) {
BTDo... | Rebuilds the internal map to denote a new filter. |
@SuppressForbidden(reason="System.out required: command line tool") public static void main(String[] args) throws IOException {
boolean printTree=false;
String path=null;
for (int i=0; i < args.length; i++) {
if (args[i].equals("-printTree")) {
printTree=true;
}
else {
path=args[i];
}
}... | Command-line tool. |
private void initInfo(int record_id,String value,int M_Warehouse_ID,int M_PriceList_ID,boolean reset){
if (!(record_id == 0) && value != null && value.length() > 0) {
log.severe("Received both a record_id and a value: " + record_id + " - "+ value);
}
if (reset) {
clearParameters();
p_resetColumns=true... | Dynamic Init |
private static byte[] generateSeed(){
try {
ByteArrayOutputStream seedBuffer=new ByteArrayOutputStream();
DataOutputStream seedBufferOut=new DataOutputStream(seedBuffer);
seedBufferOut.writeLong(System.currentTimeMillis());
seedBufferOut.writeLong(System.nanoTime());
seedBufferOut.writeInt(Process... | Generates a device- and invocation-specific seed to be mixed into the Linux PRNG. |
private void writeObject(ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
SerialUtilities.writePaint(this.paint,stream);
}
| Provides serialization support. |
public void nextTrack(){
buildAndSendMessage(null,"NextTrack");
}
| Tell the Chromecast to advance to the next track in the playlist |
public static String sort(String s){
char[] chars=s.toCharArray();
Arrays.sort(chars);
return new String(chars);
}
| Sorts the characters in the specified string. |
public OperationPendingExceptionBean(ApplicationExceptionBean sup,ReasonEnum reason){
super(sup);
setReason(reason);
}
| Instantiates an <code>OperationPendingExceptionBean</code> based on the specified <code>ApplicationExceptionBean</code> and sets the given reason. |
public TranscoderInput(Document document){
this.document=document;
}
| Constructs a new <tt>TranscoderInput</tt> with the specified Document. |
public String dummyVariable(){
StringBuilder buf=new StringBuilder();
buf.append("$_");
buf.append(dummyVariableCount++);
return buf.toString();
}
| Get a dummy variable name. The name returned will begin with the <code>'$'</code> character, and will be different than any previous dummy variable name allocated by this object. Dummy variable names are useful for creating PatternElements where you don't care whether the value it uses is the same as one used by anothe... |
public void runTest() throws Throwable {
Document doc;
DocumentType docType;
String systemId;
int index;
doc=(Document)load("staffNS",false);
docType=doc.getDoctype();
systemId=docType.getSystemId();
assertURIEquals("systemId",null,null,null,"staffNS.dtd",null,null,null,null,systemId);
}
| Runs the test case. |
public Dimension maximumLayoutSize(Container target){
return new Dimension(Integer.MAX_VALUE,Integer.MAX_VALUE);
}
| Returns the maximum dimensions for this layout given the components in the specified target container. |
public void visitEnd(){
}
| Ends the visit of a signature corresponding to a class or interface type. |
public static byte[] tauAdicNaf(byte mu,ZTauElement lambda){
if (!((mu == 1) || (mu == -1))) {
throw new IllegalArgumentException("mu must be 1 or -1");
}
BigInteger norm=norm(mu,lambda);
int log2Norm=norm.bitLength();
int maxLength=log2Norm > 30 ? log2Norm + 4 : 34;
byte[] u=new byte[maxLength];
int ... | Computes the <code>τ</code>-adic NAF (non-adjacent form) of an element <code>λ</code> of <code><b>Z</b>[τ]</code>. |
public static void main(String[] args){
doMain(args);
}
| Application entry point. |
@Override public boolean contains(Object o){
return m_Root.contains(((String)o) + TrieNode.STOP);
}
| Returns true if this collection contains the specified element. |
public MPInstancePara createParameter(int seqNo,String parameterName,Object value){
MPInstancePara ip=new MPInstancePara(this,seqNo);
if (value == null) {
ip.setParameter(parameterName,(String)null);
}
else if (value instanceof BigDecimal) {
ip.setParameter(parameterName,(BigDecimal)value);
}
else ... | Create Process Instance Parameter and save to database |
public void init(RecyclerView recyclerView,IDrawerItem... drawerItems){
if (drawerItems != null) {
for ( IDrawerItem d : drawerItems) {
if (!CACHE.containsKey(d.getType())) {
CACHE.put(d.getType(),new Stack<RecyclerView.ViewHolder>());
}
if (CACHE_SIZE == -1 || CACHE.get(d.getType()).... | init the cache on your own. |
public void testLegacyInt() throws IOException {
Directory dir=newDirectory();
RandomIndexWriter writer=new RandomIndexWriter(random(),dir);
Document doc=new Document();
doc.add(new LegacyIntField("value",300000,Field.Store.YES));
writer.addDocument(doc);
doc=new Document();
doc.add(new LegacyIntField("va... | Tests sorting on type legacy int |
public void debug(String msg,Object arg0){
innerLog(Level.DEBUG,null,msg,arg0,UNKNOWN_ARG,UNKNOWN_ARG,null);
}
| Log a debug message. |
public int cell(int r,int c){
return board[r][c];
}
| Return contents of cell[r][c]. |
@Override public void sendCustomNotification(VibrationProfile vibrationProfile,int flashTimes,int flashColour,int originalColour,long flashDuration,BtLEAction extraAction,TransactionBuilder builder){
BluetoothGattCharacteristic controlPoint=support.getCharacteristic(MiBandService.UUID_CHARACTERISTIC_CONTROL_POINT);
... | Adds a custom notification to the given transaction builder |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 13:00:05.999 -0500",hash_original_method="9FB54278FE2075E29BA0E55156E431DE",hash_generated_method="3E5BA0005B7D6387F8EA073D83361BE0") public String rawString(){
return rawString;
}
| Returns the raw string matched as a phone number in the searched text. |
public static Gamepad logitechDualAction(int port){
Joystick joystick=new Joystick(port);
return Gamepad.create(null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null);
}
| Create a Logitech DualAction gamepad controlled by the Driver Station. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.