code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public void open() throws IOException, EOFException {
reader=new BufferedReader(new FileReader(filename));
if (firstLineNames) {
String str=reader.readLine();
if (str == null) {
throw new EOFException();
}
columnName=str.split(delimiter);
for (int i=0; i < columnName.length; ++i) {
c... | Open the file and read the first line if it contains column titles. |
public static void divRow(Matrix A,int i,double c){
divRow(A,i,0,A.cols(),c);
}
| Updates the values of row <tt>i</tt> in the given matrix to be A[i,:] = A[i,:] / c |
public synchronized void trigger(boolean isRising){
if (!enabled) return;
if (isRising) risingTime=System.currentTimeMillis();
else fallingTime=System.currentTimeMillis();
if (isRising && triggerRising || !isRising && triggerFalling) {
if (func != null) func.apply(interrupts.indexOf(this),funcParam... | Trigger the interrupt |
public void toEPLOptions(StringWriter writer,EPStatementFormatter formatter,boolean includeFrom){
String delimiter="";
if (includeFrom) {
formatter.beginFrom(writer);
writer.write("from");
}
if ((outerJoinQualifiers == null) || (outerJoinQualifiers.size() == 0)) {
boolean first=true;
for ( St... | Renders the from-clause in textual representation. |
public static boolean sameLanguage(Automaton a1,Automaton a2){
if (a1 == a2) {
return true;
}
return subsetOf(a2,a1) && subsetOf(a1,a2);
}
| Returns true if these two automata accept exactly the same language. This is a costly computation! Note also that a1 and a2 will be determinized as a side effect. Both automata must be determinized and have no dead states! |
@Inject PageParserImpl(DocumentProvider documentProvider,EntryParser entryParser){
this.documentProvider=checkNotNull(documentProvider);
this.entryParser=checkNotNull(entryParser);
}
| Creates a new PageParserImpl with the given dependencies. |
public void assertEqual(long expected,long actual){
TestUtils.assertEqual(expected,actual);
}
| This method just invokes the test utils method, it is here for convenience |
public DateTimeFormatterBuilder appendTimeZoneOffset(String zeroOffsetPrintText,String zeroOffsetParseText,boolean showSeparators,int minFields,int maxFields){
return append0(new TimeZoneOffset(zeroOffsetPrintText,zeroOffsetParseText,showSeparators,minFields,maxFields));
}
| Instructs the printer to emit text and numbers to display time zone offset from UTC. A parser will use the parsed time zone offset to adjust the datetime. <p> If zero offset print text is supplied, then it will be printed when the zone is zero. If zero offset parse text is supplied, then either it or the offset will be... |
public Object runSafely(Catbert.FastStack stack) throws Exception {
java.io.File f=getFile(stack);
if (SageConstants.LITE) return null;
if (stack.getUIMgr() == null) return Boolean.FALSE;
try {
stack.getUIMgr().getModuleGroup().importXML(f,stack.getUIMgr());
if (stack.getUIMgr().getBoolean("save_stv... | Imports a SageTV Application Definition file into the current STV file that is loaded. This will essentially merge the two together. |
public static BufferedImage createPattern(String pattern,Color lineColor){
return createPattern(pattern,defaultDimension,defaultScale,lineColor,defaultBackColor);
}
| Draws a pattern with a given <code>Color</code> using the default scale (.5), bitmap dimensions (32x32) and backgound color (transparent). |
public void unbox(final Type type){
Type t=NUMBER_TYPE;
Method sig=null;
switch (type.getSort()) {
case Type.VOID:
return;
case Type.CHAR:
t=CHARACTER_TYPE;
sig=CHAR_VALUE;
break;
case Type.BOOLEAN:
t=BOOLEAN_TYPE;
sig=BOOLEAN_VALUE;
break;
case Type.DOUBLE:
sig=DOUBLE_VALUE;
break;
case Type.FLOAT:
sig=FLOAT... | Generates the instructions to unbox the top stack value. This value is replaced by its unboxed equivalent on top of the stack. |
public AtomicTypePanel(final Component parent,final TypeManager typeManager){
this(parent,typeManager,null);
}
| Creates a new instance in order to build a new type from scratch. |
public static void shuffle(double[] a,int lo,int hi){
if (a == null) throw new NullPointerException("argument array is null");
if (lo < 0 || lo > hi || hi >= a.length) {
throw new IndexOutOfBoundsException("Illegal subarray range");
}
for (int i=lo; i <= hi; i++) {
int r=i + uniform(hi - i + 1);
d... | Rearranges the elements of the specified subarray in uniformly random order. |
public float drawLine(Token token,Graphics2D g,float x,float y){
float nextX=x;
while (token != null && token.isPaintable() && nextX < clipEnd) {
nextX=token.paint(g,nextX,y,host,this,clipStart);
token=token.getNextToken();
}
if (host.getEOLMarkersVisible()) {
g.setColor(host.getForegroundForTokenTy... | Draws the passed-in text using syntax highlighting for the current language. The tokens used to decide how to paint the syntax highlighting are grabbed from the text area's document. |
private StringBuilder appendTaxonName(Taxon taxon,StringBuilder builder){
String name=taxon.getName();
if (name.contains("\"")) {
name=name.replace("\"","\\\"");
}
return builder.append("\"name\": \"").append(name).append("\"");
}
| name suitable for printing - quotes if necessary |
@Override public void translate(final ITranslationEnvironment environment,final IInstruction instruction,final List<ReilInstruction> instructions) throws InternalTranslationException {
TranslationHelpers.checkTranslationArguments(environment,instruction,instructions,"AND");
translateAll(environment,instruction,"AND... | AND{<cond>}{S} <Rd>, <Rn>, <shifter_operand> Operation: if ConditionPassed(cond) then Rd = Rn AND shifter_operand if S == 1 and Rd == R15 then if CurrentModeHasSPSR() then CPSR = SPSR else UNPREDICTABLE else if S == 1 then N Flag = Rd[31] Z Flag = if Rd == 0 then 1 else 0 C Flag = shifter_carry_out V Flag = unaffected |
public final void init(ManagerFactoryParameters spec) throws InvalidAlgorithmParameterException {
spiImpl.engineInit(spec);
}
| Initializes this factory instance with the specified provider-specific parameters for a source of trust material. |
private boolean parseAbbreviatedAbsoluteLocationPath(PsiBuilder builder){
if (builder.getTokenType() == XPathTokenTypes.ANY_PATH) {
if (!parseLocationPath(builder,true)) {
builder.error("location path expected");
}
return true;
}
return false;
}
| [10] AbbreviatedAbsoluteLocationPath ::= '//' RelativeLocationPath |
private void init(){
mResizeDrawableDiagonal=AbImageUtil.bitmapToDrawable(AbFileUtil.getBitmapFromSrc("image/crop_big.png"));
mResizeDrawableDiagonal2=AbImageUtil.bitmapToDrawable(AbFileUtil.getBitmapFromSrc("image/crop_small.png"));
}
| Inits the. |
public char charAt(int pos){
return c[pos];
}
| Returns the character at the specified position. |
public void testAbstractBean() throws Exception {
ObjectMapper m=new ObjectMapper();
AbstractBean[] input=new AbstractBean[]{new StringBean("xyz")};
String serial=m.writeValueAsString(input);
try {
m.readValue(serial,AbstractBean[].class);
fail("Should have failed");
}
catch ( JsonMappingException e... | Unit test that verifies that an abstract bean is stored with type information if default type information is enabled for non-concrete types. |
public static double dot(double[] vec1,double[] vec2){
int n=vec1.length;
double res=0.0;
for (int i=0; i < n; ++i) {
res+=vec1[i] * vec2[i];
}
return (res);
}
| Calculates the scalar product of two vectors. |
public boolean isLocal(int dlsSerialNumber){
return this.lockGrantorSerialNumber == dlsSerialNumber && this.dm.getId().equals(this.lockGrantorMember);
}
| Returns true if this instance represents a local lock grantor with the specified DLS serial number |
public boolean doesEntityNotTriggerPressurePlate(){
return true;
}
| Return whether this entity should NOT trigger a pressure plate or a tripwire. |
public void exit(int status){
return;
}
| Terminates the currently running Java application. This method never returns normally. The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination. |
public final Double2D multiply(double val){
return new Double2D(x * val,y * val);
}
| Multiplies each element by scalar "val" |
public void pinVisiblePanels(){
if (layout == Layout.FULL) {
getTabbedFull().pinVisibleTabs();
}
else {
getTabbedSelect().pinVisibleTabs();
getTabbedWork().pinVisibleTabs();
getTabbedStatus().pinVisibleTabs();
}
}
| Pins all visible panels. |
@Override public boolean performFinish(){
projectName=newProjectWizardPage.getProjectName();
useGWT=newProjectWizardPage.useGWT();
gwtSdkContainerPath=newProjectWizardPage.getGWTSdkContainerPath();
packageName=newProjectWizardPage.getPackage();
locationURI=newProjectWizardPage.getCreationLocationURI();
isGe... | We initialize these members here so that finishPage can access them without triggering a SWT InvalidThreadAccessException. |
private VirtualMachineConfigSpec buildVirtualMachineConfigSpec(String datastoreName) throws InvalidPropertyFaultMsg, FinderException, RuntimeFaultFaultMsg {
String displayName=this.state.name;
VirtualMachineConfigSpec spec=new VirtualMachineConfigSpec();
spec.setName(displayName);
spec.setNumCPUs((int)this.stat... | Creates a spec used to create the VM. |
public static <A>CompletableFutureTValue<A> fromAnyM(final AnyMValue<A> anyM){
return of(anyM.map(null));
}
| Construct an CompletableFutureT from an AnyM that contains a monad type that contains type other than CompletableFuture The values in the underlying monad will be mapped to CompletableFuture<A> |
public void testDetectLanguageFr(){
LOGGER.debug("detectLanguage fr");
LanguageDetector instance=LanguageDetector.getInstance();
Document doc;
try {
doc=Jsoup.parse(new File(PATH + "fr.wikipedia.org-wiki-Accessibilite_du_web_20140701.html"),UTF_8);
assertEquals("fr",instance.detectLanguage(doc.text()).g... | Test of detectLanguage method, of class LanguageDetector with fr pages. |
private AffinityTopologyVersion topologyVersion(){
return cctx.affinity().affinityTopologyVersion();
}
| Gets current topology version. |
protected void persistClaimsList(ImmutableMap<String,String> labelsToKeys){
ClaimsListSingleton singleton=new ClaimsListSingleton();
Key<ClaimsListRevision> revision=ClaimsListRevision.createKey(singleton);
singleton.setActiveRevision(revision);
ofy().saveWithoutBackup().entity(singleton).now();
if (!labelsTo... | Persists a testing claims list to Datastore that contains a single shard. |
public InputVenueMessageContent.InputVenueMessageContentBuilder address(String address){
this.address=address;
return this;
}
| *Required Sets the address to the provided value |
public Iterable<Long> lengthAll(final byte[] key) throws IOException {
return new BlobLengths(key);
}
| get all BLOBs in the array. this is useful when it is not clear if an entry is unique in all BLOBs in this array. |
public boolean isAfterLast() throws SQLException {
return crsInternal.isAfterLast();
}
| Indicates whether the cursor is after the last row in this <code>JoinRowSetImpl</code> object. |
private static String toCanonicalName(String className){
className=StringUtils.deleteWhitespace(className);
if (className == null) {
throw new NullArgumentException("className");
}
else if (className.endsWith("[]")) {
StringBuilder classNameBuffer=new StringBuilder();
while (className.endsWith("[]"... | Converts a class name to a JLS style class name. |
private void returnData(Object ret){
if (myHost != null) {
myHost.returnData(ret);
}
}
| Used to communicate a return object from a plugin tool to the main Whitebox user-interface. |
public FlowLayout(int align){
this(align,5,5);
}
| Constructs a new <code>FlowLayout</code> with the specified alignment and a default 5-unit horizontal and vertical gap. The value of the alignment argument must be one of <code>FlowLayout.LEFT</code>, <code>FlowLayout.RIGHT</code>, <code>FlowLayout.CENTER</code>, <code>FlowLayout.LEADING</code>, or <code>FlowLayout.TRA... |
public static void serialize(GPathResult node,Writer w){
serialize(asString(node),w);
}
| Write a pretty version of the GPathResult to the Writer. |
@Override protected AdminResponse createResponse(DistributionManager dm){
return RemoveHealthListenerResponse.create(dm,this.getSender(),this.id);
}
| Must return a proper response to this request. |
private boolean isSelectionSelected(Object source){
boolean retValue=false;
if (source instanceof Checkbox) retValue=((Checkbox)source).isChecked();
else if (source instanceof Radio) retValue=((Radio)source).isChecked();
else log.log(Level.SEVERE,"Not valid - " + source);
return retValue;
}
| Is Selection Selected |
public GoogleTurnSSLCandidateHarvester(TransportAddress turnServer,String shortTermCredentialUsername,String password){
super(turnServer,shortTermCredentialUsername,password);
}
| Initializes a new <tt>GoogleTurnSSLCandidateHarvester</tt> instance which is to work with a specific TURN server using a specific username for the purposes of the STUN short-term credential mechanism. |
protected Instances makeTestDataset(int seed,int numInstances,int numAttr,AttrTypes attrTypes,int numClasses,int classType,int classIndex) throws Exception {
TestInstances dataset=new TestInstances();
dataset.setSeed(seed);
dataset.setNumInstances(numInstances);
dataset.setNumNominal(attrTypes.nominal ? numAttr... | Make a simple set of instances with variable position of the class attribute, which can later be modified for use in specific tests. |
private void showFtu(){
Menu menu=mToolbar.getMenu();
View view=menu.findItem(R.id.media_route_menu_item).getActionView();
if (view != null && view instanceof MediaRouteButton) {
IntroductoryOverlay overlay=new IntroductoryOverlay.Builder(this,mMediaRouteMenuItem).setTitleText(R.string.touch_to_cast).setSingl... | Shows the Cast First Time User experience to the user (an overlay that explains what is the Cast icon) |
public static void main(final String[] args){
DOMTestCase.doMain(hc_characterdatadeletedatabegining.class,args);
}
| Runs this test from the command line. |
public static String hashMapToString(HashMap<?,?> map,int dp){
StringBuilder sb=new StringBuilder();
for ( Object k : map.keySet()) {
sb.append(Utils.padRight(k.toString(),31));
Object obj=map.get(k);
if (obj instanceof Double) {
sb.append(Utils.doubleToString((Double)obj,5,dp));
}
else ... | Print out a HashMap nicely. |
static void compileArrayStoreBarrier(Assembler asm){
BaselineCompilerImpl.genParameterRegisterLoad(asm,3);
asm.generateJTOCcall(Entrypoints.aastoreMethod.getOffset());
}
| Generate code to perform an array store barrier. On entry the stack holds: arrayRef, index, value. |
protected void addField(DDFField ddf){
String fName=ddf.getFieldDefn().getName().trim().intern();
if (Debug.debugging("asrp")) {
Debug.output("GeneralASRPFile.addField(" + fName + ")");
}
Object f=fields.get(fName);
if (f == null) {
fields.put(fName,ddf);
}
else {
if (f instanceof List) {
... | Add a field to the field list. If a field already exists in the hashtable, the DDFField is replaced by a list of the fields with the same name. Some types of files need this, like the THF file. Others don't seem to. |
public UnhandledException(Throwable cause){
super(cause);
}
| Constructs the exception using a cause. |
void showStatus(final String msg){
RapidMinerGUI.getMainFrame().getStatusBar().setSpecialText(msg);
}
| Shows the given message in the main GUI status bar. |
protected String expandFormat(String pszSrc){
StringBuffer szDest=new StringBuffer();
int iSrc=0;
int nRepeat=0;
while (iSrc < pszSrc.length()) {
if ((iSrc == 0 || pszSrc.charAt(iSrc - 1) == ',') && pszSrc.charAt(iSrc) == '(') {
String pszContents=extractSubstring(pszSrc + iSrc);
String pszExpan... | Given a string that contains a coded size symbol, expand it out. |
private String d(){
return d(1);
}
| Return single field delimiter. |
public T caseEventSpec(EventSpec object){
return null;
}
| Returns the result of interpreting the object as an instance of '<em>Event Spec</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc --> |
public KeyCrypterScrypt(ScryptParameters scryptParameters){
this.scryptParameters=checkNotNull(scryptParameters);
if (scryptParameters.getSalt() == null || scryptParameters.getSalt().toByteArray() == null || scryptParameters.getSalt().toByteArray().length == 0) {
log.warn("You are using a ScryptParameters with ... | Encryption/ Decryption using specified Scrypt parameters. |
@Override public boolean supportsBooleanValues(){
return SUPPORTS_BOOLEAN_VALUES;
}
| Supports setting of a boolean value. |
public ConversionException(final String message,final Throwable cause){
super(message);
this.cause=cause;
}
| Construct a new exception with the specified message and root cause. |
private void addToken(int tokenType){
addToken(zzStartRead,zzMarkedPos - 1,tokenType);
}
| Adds the token specified to the current linked list of tokens. |
public void forceNSDecl(String uri){
forcedDeclTable.put(uri,Boolean.TRUE);
}
| Force a Namespace to be declared on the root element. <p/> <p>By default, the XMLWriter will declare only the Namespaces needed for an element; as a result, a Namespace may be declared many places in a document if it is not used on the root element.</p> <p/> <p>This method forces a Namespace to be declared on the root ... |
public void testWritable(){
SpellCheckedMetadata result=null;
SpellCheckedMetadata meta=new SpellCheckedMetadata();
result=writeRead(meta);
assertEquals(0,result.size());
meta.add("name-one","value-1.1");
result=writeRead(meta);
meta.add("Contenttype","text/html");
assertEquals(1,result.size());
asser... | Test for <code>Writable</code> implementation. |
public static boolean isOutlier(int index,ArrayList<Double> values){
if (values.size() <= 1) {
return true;
}
if (index == 0) {
return isRightOutlier(index,values);
}
else if (index == values.size() - 1) {
return isLeftOutlier(index,values);
}
else {
return isRightOutlier(index,values) || ... | This method looks at the data set and if there is a value that is 20 numbers higher than either the left, it is an outlier. |
protected NumExpr_Impl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public short[][] production_table(){
return _production_table;
}
| access to production table |
public static <I>Parser<I,I> satisfy(Predicate<I> test){
return null;
}
| A parser which succeeds if the next symbol passes the predicate <code>test</code>. The parser returns the symbol. |
public int compare(Object o1,Object o2){
String s1=o1.toString();
if (s1 == null) s1="";
String s2=o2.toString();
if (s2 == null) s2="";
return s1.compareTo(s2);
}
| Compare based on Name |
public Enumeration<Option> listOptions(){
Vector<Option> result=new Vector<Option>();
result.add(new Option("\tSkip identical instances (distances equal to zero).\n","S",1,"-S"));
result.addAll(Collections.list(super.listOptions()));
return result.elements();
}
| Returns an enumeration describing the available options. |
private void testPreRegisterBusinessObjectData(HashMap<String,String> attributes,boolean useSsl) throws IOException, JAXBException, URISyntaxException {
dataBridgeWebClient.regServerAccessParamsDto.setUseSsl(useSsl);
UploaderInputManifestDto manifest=getUploaderInputManifestDto();
manifest.setAttributes(attribute... | Calls preRegisterBusinessObjectData() method and makes assertions. |
@Override public Object eGet(int featureID,boolean resolve,boolean coreType){
switch (featureID) {
case DatatypePackage.TYPE__NAME:
return getName();
case DatatypePackage.TYPE__NAMESPACE:
return getNamespace();
case DatatypePackage.TYPE__VERSION:
return getVersion();
case DatatypePackage.TYPE__REFERENCES:
return ... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public Task<BlockConsistencyGroupRestRep> resynchronizeSnapshot(URI consistencyGroupId,URI snapshotId){
final String url=getIdUrl() + "/protection/snapshots/{fcid}/resynchronize";
return postTask(url,consistencyGroupId,snapshotId);
}
| Resynchronize consistency group snapshot <p> API Call: <tt>POST /block/consistency-groups/{id}/protection/snapshot/{fcid}/resynchronize</tt> |
public void testDoConfigureSetsConfigurationVersion() throws Exception {
configuration.setProperty(WebLogicPropertySet.CONFIGURATION_VERSION,CONFIGURATION_VERSION);
configuration.doConfigure(container);
String config=configuration.getFileHandler().readTextFile(DOMAIN_HOME + "/config/config.xml","UTF-8");
XMLAss... | Test changing configuration version. |
private void skipWhitespace(){
matcher.usePattern(WHITESPACE);
if (matcher.lookingAt()) {
matcher.region(matcher.end(),matcher.regionEnd());
}
}
| Skip over any whitespace so that the matcher region starts at the next token. |
protected boolean[] runBasicTest(boolean nominalPredictor,boolean numericPredictor,boolean stringPredictor,boolean datePredictor,boolean relationalPredictor,boolean multiInstance,int missingLevel,boolean predictorMissing,int numTrain,Vector<String> accepts){
boolean[] result=new boolean[2];
Instances train=null;
... | Runs a text on the datasets with the given characteristics. |
public static long multiply(int p,int q){
long result=0;
if (q != 0) {
long q1=q & 0x00000000ffffffffL;
while (p != 0) {
byte b=(byte)(p & 0x01);
if (b == 1) {
result^=q1;
}
p>>>=1;
q1<<=1;
}
}
return result;
}
| Return product of two polynomials |
private void loadInstantUploadVideoPath(){
SharedPreferences appPrefs=PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
mUploadVideoPath=appPrefs.getString("instant_video_upload_path",getString(R.string.instant_upload_path));
mPrefInstantVideoUploadPath.setSummary(mUploadVideoPath);
}
| Load upload video path set on preferences |
protected void initCDATA(){
}
| Initialize global variables |
protected String[] split(final String line){
final String[] cols=line.split("[,\t]");
return cols;
}
| Split the line into columns based on tabs or commas. |
private void addInlineDiffs(Delta<String> delta){
List<String> orig=(List<String>)delta.getOriginal().getLines();
List<String> rev=(List<String>)delta.getRevised().getLines();
LinkedList<String> origList=new LinkedList<String>();
for ( Character character : join(orig,"\n").toCharArray()) {
origList.add(cha... | Add the inline diffs for given delta |
public synchronized void append(String key,byte[] bytes){
RawByteAllocator alloc=findRawByteAllocator(key);
long newObjectBytes=alloc.memoryLength + bytes.length;
long newCacheBytes=this.currentMemoryBytes + bytes.length;
if (newObjectBytes <= maxObjectBytes && newCacheBytes <= maxCacheBytes) {
alloc.buffer... | Adds a range of bytes to the end of the vector. |
@Override public synchronized void initialize(){
if (!mRootDirectory.exists()) {
if (!mRootDirectory.mkdirs()) {
VolleyLog.e("Unable to create cache dir %s",mRootDirectory.getAbsolutePath());
}
return;
}
File[] files=mRootDirectory.listFiles();
if (files == null) {
return;
}
for ( Fil... | Initializes the DiskBasedCache by scanning for all files currently in the specified root directory. Creates the root directory if necessary. |
private void processSuccessResponse(StunResponseEvent ev){
Response response=ev.getResponse();
Request request=ev.getRequest();
CandidatePair checkedPair=(CandidatePair)ev.getTransactionID().getApplicationData();
TransportAddress mappedAddress=null;
if (!response.containsAttribute(Attribute.XOR_MAPPED_ADDRESS... | Handles STUN success responses as per the rules in RFC 5245. |
public FatalPeerException(final String message,final Throwable cause){
super(message,cause);
}
| Creates a new exception. |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:59:46.022 -0500",hash_original_method="85E3B4FCCAFED594AE8716A3280C8E01",hash_generated_method="5102FE82D016AAF05DE0178E966BD666") private void possExpand(int bits){
if ((mPos... | Allocate a new internal buffer, if needed. |
static public Sequence<IString> tokenize(String str){
String[] strings;
if (str.trim().isEmpty()) strings=new String[0];
else strings=str.trim().split("\\s+");
IString[] istrs=toIStringArray(strings);
return new ArraySequence<IString>(true,istrs);
}
| Apply whitespace tokenization then convert to a Sequence of IString objects. |
public static FlowDelegate onCreate(NonConfigurationInstance nonConfigurationInstance,Intent intent,Bundle savedInstanceState,StateParceler parceler,History defaultHistory,Flow.Dispatcher dispatcher){
checkArgument(parceler != null,"parceler may not be null");
final Flow flow;
if (nonConfigurationInstance != null... | Immediately starts the Dispatcher, so the dispatcher should be prepared before calling. |
public void copyIntoArray(int fromStart,int[] to,int toStart,int len){
System.arraycopy(objs,fromStart,to,toStart,len);
}
| Copies 'len' elements from the Bag into the provided array. The 'len' elements start at index 'fromStart' in the Bag, and are copied into the provided array starting at 'toStat'. |
public Implementation(){
super();
plugin=this;
}
| Creates an instance. <!-- begin-user-doc --> <!-- end-user-doc --> |
public static String sha256Hash(byte[] data) throws NoSuchAlgorithmException {
return sha256Hash(data,data.length);
}
| Returns SHA-256 hash of given byte array. |
public void removeParticleEffect(){
if (currentParticleEffect == null) {
return;
}
currentParticleEffect.clear();
currentParticleEffect=null;
}
| Removes current Particle Effect. |
@SuppressWarnings("unchecked") public T put(T value){
int x=value.getX();
int z=value.getZ();
int index=getIndex(x,z);
XZAddressable bucket=this.buckets[index];
while (bucket != null) {
if (bucket.getX() == x && bucket.getZ() == z) {
this.buckets[index]=value;
return (T)bucket;
}
index... | Associates the given value with its xz-coordinates. If the map previously contained a mapping for these coordinates, the old value is replaced. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:31:30.532 -0500",hash_original_method="9A2E566018459C8A4F9FE2F49DBB98B8",hash_generated_method="8E840BFE7E6405298EC13CA3DE52B347") @android.view.RemotableViewMethod public void smoothScrollByOffset(int offset){
super.smoothScrollByOf... | Smoothly scroll to the specified adapter position offset. The view will scroll such that the indicated position is displayed. |
@SuppressWarnings("unchecked") public ArrayList<Map<String,Object>> sort(ArrayList<Map<String,Object>> rows){
TreeMap<T,ArrayList<Map<String,Object>>> sorted=new TreeMap<T,ArrayList<Map<String,Object>>>();
for (int i=0; i < rows.size(); i++) {
Map<String,Object> row=rows.get(i);
if (row.containsKey(columnNa... | sort rows by each rule and emit result on output port. |
public static void initialize(final CDatabaseConfiguration configuration) throws CouldntLoadDriverException, CouldntConnectException, SQLException {
checkDriver(configuration);
final String url=POSTGRES_DRIVER + "//" + configuration.getHost()+ "/"+ POSTGRES_DEFAULT_DB;
Connection connection=null;
try {
conn... | Initializes a new PostgreSQL database |
public CoverageCharVdt(String a,String v){
attribute=a.toLowerCase().intern();
value=v.intern();
}
| Construct a new object |
public void removeAudioFileType(String type){
audioFileTypes.remove(type);
firePropertyChange(AUDIO_FILE_TYPE,null,audioFileTypes);
}
| Removes the audio file type. |
public void fireGenerateEvent(int eventType,String name,Attributes atts){
}
| Fire off startElement, endElement events. |
public static boolean isShortKeyId(String keyId){
return isValidKeyId(keyId) && keyId.length() == HEX_SHORT_KEY_ID_LENGTH;
}
| * Checks if given string represents a valid hex encoded 32-bit short key id. |
public void removeSegmentOccurrence(byte segmentMarker,int occurrence){
final List segmentList=(List)_segmentDataMap.get(new Byte(segmentMarker));
final List segmentOffsetList=(List)_segmentOffsetDataMap.get(new Byte(segmentMarker));
segmentList.remove(occurrence);
segmentOffsetList.remove(occurrence);
}
| Removes a specified instance of a segment's data from the collection. Use this method when more than one occurrence of segment data for a given marker exists. |
@DSSource({DSSourceKind.IO}) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-02-25 10:38:04.913 -0500",hash_original_method="FDD307626797CF03D3088020E6279DC1",hash_generated_method="EC28F09966AA2D56B5EA24D3CC58965D") @DSVerified @DSSpec(DSCat.IO) public int read() throws IOException {
if (... | Reads and returns the next byte in the stream. If the end of the message has been reached, returns -1. Note that a call to this method may result in multiple reads from the underlying input stream in order to convert NETASCII line separators to the local line separator format. This is transparent to the programmer an... |
final int internalNextInt(int origin,int bound){
int r=mix32(nextSeed());
if (origin < bound) {
int n=bound - origin, m=n - 1;
if ((n & m) == 0) r=(r & m) + origin;
else if (n > 0) {
for (int u=r >>> 1; u + m - (r=u % n) < 0; u=mix32(nextSeed()) >>> 1) ;
r+=origin;
}
else {
... | The form of nextInt used by IntStream Spliterators. Exactly the same as long version, except for types. |
public final double dot(MutableDouble2D other){
return other.x * x + other.y * y;
}
| Returns the dot product of myself against other, that is me DOT other. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.