code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
@Override public WeightVector train(final SLProblem sp,SLParameters params) throws Exception {
WeightVector wv=null;
if (params.TOTAL_NUMBER_FEATURE > 0) {
wv=new WeightVector(params.TOTAL_NUMBER_FEATURE + 1);
wv.setExtendable(false);
}
else {
wv=new WeightVector(8192);
wv.setExtendable(true);
... | The function for the users to call for the structured SVM |
public MarkupBuilder(IndentPrinter out){
this.out=out;
}
| Sends markup to the given IndentPrinter. Use this option if you want to customize the indent used or provide your own IndentPrinter. |
public ExportKeyPairAction(KseFrame kseFrame){
super(kseFrame);
putValue(LONG_DESCRIPTION,res.getString("ExportKeyPairAction.statusbar"));
putValue(NAME,res.getString("ExportKeyPairAction.text"));
putValue(SHORT_DESCRIPTION,res.getString("ExportKeyPairAction.tooltip"));
putValue(SMALL_ICON,new ImageIcon(Toolk... | Construct action. |
public DCryptoStrength(JDialog parent,Dialog.ModalityType modality) throws CryptoException {
super(parent,res.getString("DCryptoStrength.Title"),modality);
initComponents();
}
| Creates a new DCryptoStrength dialog where the parent is a dialog. |
public void estimateActivities(String filename,double radius){
int lineCounter=0;
int lineMultiplier=1;
try {
Scanner input=new Scanner(new BufferedReader(new FileReader(new File(filename))));
input.nextLine();
while (input.hasNextLine()) {
if (lineCounter == lineMultiplier) {
log.info("... | Assumes a comma-separated file format. |
@Deprecated public boolean isExceptionDetailEnabled(){
return true;
}
| This method is now a noop and will be removed from a future release |
public MariaDbClientPreparedStatement clone() throws CloneNotSupportedException {
MariaDbClientPreparedStatement clone=(MariaDbClientPreparedStatement)super.clone();
clone.sqlQuery=sqlQuery;
clone.prepareResult=prepareResult;
clone.parameters=new ParameterHolder[prepareResult.getParamCount()];
clone.resultSet... | Clone statement. |
public void testXorMappedAddressXoring_v6(){
XorMappedAddressAttribute addressAttribute=new XorMappedAddressAttribute();
TransportAddress testAddress=new TransportAddress("2001:660:4701:1001:202:8aff:febe:130b",12120,Transport.UDP);
addressAttribute.setAddress(testAddress);
TransportAddress xorredAddr=addressAt... | Verifies that xorred address-es are properly xor-ed for IPv6 addresses. |
public MD5InputStream(InputStream in){
super(in);
md5=new MD5();
}
| Creates a MD5InputStream |
public JettyRuntimeConfigurationCapability(){
this.propertySupportMap.put(ServletPropertySet.PORT,Boolean.TRUE);
}
| Initialize the configuration-specific supports Map. |
protected POInfo initPO(Properties ctx){
POInfo poi=POInfo.getPOInfo(ctx,Table_ID,get_TrxName());
return poi;
}
| Load Meta Data |
public PutIndexTemplateRequestBuilder addAlias(Alias alias){
request.alias(alias);
return this;
}
| Adds an alias that will be added when the index template gets created. |
public MP4Config(String path) throws IOException, FileNotFoundException {
StsdBox stsdBox;
mp4Parser=new MP4Parser(path);
try {
mp4Parser.parse();
}
catch ( IOException ignore) {
}
stsdBox=mp4Parser.getStsdBox();
mPPS=stsdBox.getB64PPS();
mSPS=stsdBox.getB64SPS();
mProfilLevel=stsdBox.getProfile... | Finds sps & pps parameters inside a .mp4. |
@SuppressWarnings("unchecked") static ConfProxyUtil createUtilInstance(final String className) throws Exception {
Class<ConfProxyUtil> utilClass=(Class<ConfProxyUtil>)Class.forName(className);
return utilClass.newInstance();
}
| Creates an utility program instance of the provided class name. |
public List<Integer> duplicates(int[] A,int[] B){
List<Integer> res=new ArrayList<Integer>();
if (A == null || B == null || A.length == 0 || B.length == 0) return res;
int i=0;
int j=0;
while (i < A.length && j < B.length) {
if (A[i] < B[j]) {
i++;
}
else if (A[i] > B[j]) {
j++;
... | Two pointers for the 2 arrays |
private void deleteStatus() throws IOException {
final File statusFile=new File(workingDir,statusName);
if (statusFile.exists() && !statusFile.delete()) {
throw new IOException("Could not delete status file (" + statusFile.getAbsolutePath() + ")!");
}
}
| Removes a cache server's status file |
public void downloadSeasonPoster(TvShow show,int season){
String seasonPosterUrl=show.getSeasonPosterUrl(season);
TvShowSeason tvShowSeason=null;
for ( TvShowSeason s : show.getSeasons()) {
if (s.getSeason() == season) {
tvShowSeason=s;
break;
}
}
String filename="";
if (season > 0) {
... | Download the season poster |
public Builder fetchField(){
this.isField=true;
return this;
}
| Get the data from a field, rather than a property. |
public String[] validOption2(){
return new String[]{""};
}
| Get an array of valid values for "option 2"; used to display valid options. May not be null, but may have zero entries |
public Doctype addElement(String element){
addElementToRegistry(element);
return (this);
}
| Adds an Element to the element. |
private boolean isStandalone(){
return JavaCore.getPlugin() == null;
}
| Returns <code>true</code> if the class is used outside the workbench, <code>false</code> in normal mode |
@Nullable public PyType exclude(@Nullable PyType type,@NotNull TypeEvalContext context){
final List<PyType> members=new ArrayList<PyType>();
for ( PyType m : getMembers()) {
if (type == null) {
if (m != null) {
members.add(m);
}
}
else {
if (!PyTypeChecker.match(type,m,context)) ... | Excludes all subtypes of type from the union |
protected static ValueTrackerElement transformLiterals(final ReilInstruction instruction,final ValueTrackerElement incomingState,final IElementGenerator generator){
final ReilOperand firstOperand=instruction.getFirstOperand();
final ReilOperand secondOperand=instruction.getSecondOperand();
final String thirdOpera... | Transforms MNEM L1, L2, R1 to (R1 => CALC(L1, L2)) |
public void applyLocalizedPattern(String template){
pattern=convertPattern(template,formatData.getLocalPatternChars(),PATTERN_CHARS,true);
}
| Changes the pattern of this simple date format to the specified pattern which uses localized pattern characters. |
public LinearTransform(DataSet dataSet,double A,double B){
this(A,B);
fit(dataSet);
}
| Creates a new Linear Transformation for the input data set. |
public Y le(String value){
if (value == null || value.trim().length() == 0) {
return super.le((Long)null);
}
else {
return super.le(Long.parseLong(value.trim()));
}
}
| SQL: <code><=</code> |
private List<Byte> toList(byte[] bytes){
List<Byte> result=new ArrayList<Byte>();
for ( byte b : bytes) {
result.add(b);
}
return result;
}
| Arrays.asList() does not work with arrays of primitives. :( |
@Override public Handle findHandle(Point p){
validateHandles();
for ( Handle handle : new ReversedList<Handle>(getSecondaryHandles())) {
if (handle.contains(p)) {
return handle;
}
}
for ( Handle handle : new ReversedList<Handle>(getSelectionHandles())) {
if (handle.contains(p)) {
retur... | Finds a handle at a given coordinates. |
public ResourceFilter recursive(){
return addKind(Kind.INHERITABLE);
}
| The match will be recursive from the root directory. |
void close(LocalRegion region){
try {
getDiskStore().close(region,this,false);
}
finally {
statsClose(region);
}
}
| stops the compactor outside the write lock. Once stopped then it proceeds to close the current * old oplogs |
public static boolean writeFile(String filePath,String content,boolean append){
if (TextUtils.isEmpty(content)) {
return false;
}
FileWriter fileWriter=null;
try {
makeDirs(filePath);
fileWriter=new FileWriter(filePath,append);
fileWriter.write(content);
fileWriter.close();
return true;
... | write file |
public void testBug22613() throws Exception {
createTable("bug22613","( s set('a','bc','def','ghij') default NULL, t enum('a', 'ab', 'cdef'), s2 SET('1','2','3','4','1585','ONE','TWO','Y','N','THREE'))");
checkMetadataForBug22613(this.conn);
if (versionMeetsMinimum(5,0)) {
Connection infoSchemConn=null;
t... | Tests fix for BUG#22613 - DBMD.getColumns() does not return expected COLUMN_SIZE for the SET type (fixed to be consistent with the ODBC driver) |
public void finishMoveRightAnim(){
if (!mExpandFlag) {
return;
}
ObjectAnimator imageAAnimator=null;
PropertyValuesHolder imageA_translate_x=PropertyValuesHolder.ofFloat("x",endCoordinateXs[imageE.getIndexLable()]);
PropertyValuesHolder imageA_translate_y=PropertyValuesHolder.ofFloat("y",endCoordinateYs[i... | when move right, finger move up, finish animation |
public void testPosNegFirstShorter(){
String numA="293478573489347658763745839457637";
String numB="-2837462783428374767845648748973847593874837948575684767";
String res="-2837462783428374767845615168483972194300564226167553532";
BigInteger aNumber=new BigInteger(numA);
BigInteger bNumber=new BigInteger(numB)... | Xor for a positive and a negative number; the first is shorter |
public Months negated(){
return Months.months(FieldUtils.safeNegate(getValue()));
}
| Returns a new instance with the months value negated. |
public String createQuota(String path,Long... thresholds) throws IsilonException {
IsilonSmartQuota quota;
if (thresholds != null && thresholds.length > 0) {
quota=constructIsilonSmartQuotaObjectWithThreshold(path,"directory",null,false,false,thresholds);
quota.setContainer(true);
}
else {
quota=new ... | Create a smartquota |
private void validateTableMetaData_allSystemTables(String tableNamePattern) throws Exception {
Set<String> expectedTables=new HashSet<>(Arrays.asList("RDB$FIELDS","RDB$GENERATORS","RDB$ROLES","RDB$DATABASE","RDB$TRIGGERS"));
Map<TableMetaData,Object> rules=getDefaultValueValidationRules();
rules.put(TableMetaData... | Helper method for test methods that retrieve table metadata of all system tables. |
public CompoundVariation(){
super();
operators=new ArrayList<Variation>();
}
| Constructs a compound variation operator with no variation operators. |
public boolean isClear(){
return this.opType == OP_TYPE_CLEAR;
}
| Returns true if the operation cleared the region. |
public Driver() throws SQLException {
}
| Construct a new driver and register it with DriverManager |
public void afterLast() throws SQLException {
throw new UnsupportedOperationException();
}
| Moves this <code>CachedRowSetImpl</code> object's cursor to the end of the rowset, just after the last row. This method has no effect if this rowset contains no rows. |
public static String sign(String signingString,PrivateKey privateKey) throws InvalidKeyException, SignatureException {
byte[] bytes=signingString.getBytes(StandardCharsets.UTF_8);
Signature sig;
try {
sig=Signature.getInstance(SHA256_WITH_RSA);
}
catch ( NoSuchAlgorithmException e) {
throw new Illegal... | Signs a string using the private key and SHA 256 with RSA signing algorithm, and returns it as a hex-encoded string. |
public void testRecognizeOpenInternet() throws Exception {
Response testIResponse1=MessageFactory.create3489BindingResponse(discovererAddress,responseServerAddress,responseServerAddress);
Response testIResponse2=MessageFactory.create3489BindingResponse(discovererAddress,responseServerAddress,responseServerAddress);... | Performs a test where no responces are given the stun client so that it concludes it is behind a Open Internet. |
protected boolean changed(MapPropertySource mp1,MapPropertySource mp2){
if (mp1 == mp2) return false;
if (mp1 == null && mp2 != null || mp1 != null && mp2 == null) return true;
Map<String,Object> s1=mp1.getSource();
Map<String,Object> s2=mp2.getSource();
return s1 == null ? s2 != null : !s1.equals(s2);
}
| Determines if two property sources are different. |
private void createAnnotatedMap(HashMap<Class<? extends Annotation>,Set<Class<?>>> annotatedMap,Set<Class<?>> annotatedSet){
if (annotatedSet != null && !annotatedSet.isEmpty()) {
Iterator<Class<?>> iterator=annotatedSet.iterator();
WebConfiguration webConfig=WebConfiguration.getInstance();
boolean annota... | Go over the annotated set and converter it to a hash map. |
public static final CButton createExportButton(String text){
AppsAction aa=new AppsAction(A_EXPORT,null,text);
CButton button=(CButton)aa.getButton();
button.setMargin(s_insets);
return button;
}
| Create Export Button wlth label text |
public void removeListener(mxIEventListener listener){
eventSource.removeListener(listener);
}
| Removes the given event listener. |
@Nullable private InputStream sendResourceRequest(String name){
assert !Thread.holdsLock(mux);
long endTime=computeEndTime(p2pTimeout);
Collection<UUID> nodeListCp;
Map<UUID,IgniteUuid> nodeLdrMapCp;
synchronized (mux) {
if (missedRsrcs != null && missedRsrcs.contains(name)) return null;
nodeListCp=... | Sends resource request to all remote nodes associated with this class loader. |
public Future<Pipeline> shutdownAfterSequenceNumber(long seqno) throws InterruptedException, ReplicatorException {
ArrayList<Future<ReplDBMSHeader>> taskShutdownFutures=new ArrayList<Future<ReplDBMSHeader>>();
for (int i=0; i < stages.size(); i++) {
taskShutdownFutures.add(stages.get(i).watchForProcessedSequenc... | Shuts down after a particular sequence number is applied. |
public void testAddCertificate1() throws Exception {
Identity i=new IdentityStub("iii");
PublicKeyStub pk1=new PublicKeyStub("kkk","fff",new byte[]{1,2,3,4,5});
i.setPublicKey(pk1);
CertificateStub c1=new CertificateStub("fff",null,null,pk1);
i.addCertificate(c1);
assertSame(c1,i.certificates()[0]);
try {... | verify addCertificate(Certificate certificate) adds a certificate for this identity. If the identity has a public key, the public key in the certificate must be the same |
public static Collection<MAsset> forASI(Properties ctx,int M_Product_ID,int M_ASI_ID){
ArrayList<Object> params=new ArrayList<Object>();
String whereClause=COLUMNNAME_M_AttributeSetInstance_ID + "=?";
params.add(M_ASI_ID);
if (M_Product_ID > 0) {
whereClause+=" AND " + COLUMNNAME_M_Product_ID + "=?";
pa... | Get Assets from given M_Product_ID and M_ASI_ID. <p>Note: The A_Asset_Product table is not checked !!! |
public static void main(String[] argv){
try {
if (argv.length == 0) {
System.out.println("Please specify a set of instances.");
return;
}
int current=Integer.parseInt(argv[0]);
int max=current;
for (int i=1; i < argv.length; i++) {
current=Integer.parseInt(argv[i]);
if (cur... | Main method for testing this class. |
private static int[] normalForm(int[] a){
int d=computeDegree(a);
if (d == -1) {
return new int[1];
}
if (a.length == d + 1) {
return IntUtils.clone(a);
}
int[] result=new int[d + 1];
System.arraycopy(a,0,result,0,d + 1);
return result;
}
| Strip leading zero coefficients from the given polynomial. |
private synchronized void recordShow(IConnection conn,String broadcastid,String streamName,Long flvRecordingMetaDataId,boolean isScreenData,Boolean isInterview) throws Exception {
try {
log.debug("Recording show for: " + conn.getScope().getContextPath());
log.debug("Name of CLient and Stream to be recorded: "... | Start recording the published stream for the specified broadcast-Id |
public void delete(RoutingContext ctx){
final String id=ctx.request().getParam("id");
moduleManager.delete(id,null);
}
| Delete a module. TODO - Is the logic the right way around? What to check first for notfound? Deletes first from the running system, then from the database. |
public void testSpans3(){
final JPanel panel=new JPanel(new GridBagLayout());
final JButton button=new JButton();
button.setPreferredSize(new Dimension(50,10));
final JTextField field1=new JTextField();
field1.setPreferredSize(new Dimension(110,10));
GridBagConverter converter=new GridBagConverter();
conv... | button(can grow) | text field (want grow, span 2) |
public boolean isIPAddressInUse(String vcenter,String datacenter,String cluster,String vlan,String ipAddress) throws Exception {
logger.debug("vcenter: " + vcenter + " datacenter: "+ datacenter+ " cluster: "+ cluster+ " vlan: "+ vlan+ " ipAddress: "+ ipAddress);
if (vcenter == null) {
throw new Exception("v... | Check if the given IP address is in use. |
public static void main(String[] args){
weka.core.logging.Logger.log(weka.core.logging.Logger.Level.INFO,"Logging started");
try {
for (int i=0; i < args.length; i++) {
if (args[i].equals("-offline")) {
m_offline=true;
String[] temp=new String[args.length - 1];
if (i > 0) {
... | Main method for using the package manager from the command line |
public static OptionBuilder hasOptionalArgs(){
OptionBuilder.numberOfArgs=Option.UNLIMITED_VALUES;
OptionBuilder.optionalArg=true;
return instance;
}
| The next Option can have an unlimited number of optional arguments. |
private ArrayList<ReferenceContainer<WordReference>> selectContainers(final byte[] hash,final byte[] limitHash,final int maxContainerCount,final int maxReferenceCount,final int maxtime) throws IOException {
final ArrayList<ReferenceContainer<WordReference>> containers=selectContainers(hash,limitHash,maxContainerCount... | PROCESS(1) Select a number of index containers from the RWI index. Selected containers are removed from the RWIs (not from Solr, only the DHT references). |
@Override public Statement createStatement(int resultSetType,int resultSetConcurrency,int resultSetHoldability) throws SQLException {
try {
int id=getNextId(TraceObject.STATEMENT);
if (isDebugEnabled()) {
debugCodeAssign("Statement",TraceObject.STATEMENT,id,"createStatement(" + resultSetType + ", "+ res... | Creates a statement with the specified result set type, concurrency, and holdability. |
public boolean isSignificant(){
int totalSamples=0;
int activeBuckets=0;
for (int i=0; i < buckets.length; i++) {
totalSamples+=numSamples[i];
if (numSamples[i] > 0) {
activeBuckets++;
}
}
return activeBuckets >= numSignificantBuckets || totalSamples >= numSignificantSamples;
}
| Is the current result 'significant'? Ie is it drawn from enough buckets or from enough samples? |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:55:15.510 -0500",hash_original_method="B96EF178F3ED1A0DFACDA94649407E5C",hash_generated_method="388BFD43642BF851D61AF8A45943A910") public void close(){
}
| Close the message channel. |
public Airborne(String sidc){
super(sidc,1);
}
| Create a new Airborne graphic. |
public static boolean isServerError(int status){
return (status >= 500 && status < 600);
}
| Returns whether the status is a server error (i.e. 5xx). |
public static void write32bit(int value,byte[] code,int index){
code[index]=(byte)(value >>> 24);
code[index + 1]=(byte)(value >>> 16);
code[index + 2]=(byte)(value >>> 8);
code[index + 3]=(byte)value;
}
| Writes a 32bit integer at the index. |
public DateTimeFormatterBuilder appendDayOfWeekShortText(){
return appendShortText(DateTimeFieldType.dayOfWeek());
}
| Instructs the printer to emit a short locale-specific dayOfWeek text. The parser will accept a long or short dayOfWeek text, case-insensitive. |
protected void beginDrawing(DrawContext dc){
GL2 gl=dc.getGL().getGL2();
int attrMask=GL2.GL_CURRENT_BIT | GL2.GL_COLOR_BUFFER_BIT;
gl.glPushAttrib(attrMask);
if (!dc.isPickingMode()) {
dc.beginStandardLighting();
gl.glEnable(GL.GL_BLEND);
OGLUtil.applyBlending(gl,false);
gl.glEnable(GL2.GL_NORM... | Setup drawing state in preparation for drawing the cube. State changed by this method must be restored in endDrawing. |
public static Long toLong(long l){
return Long.valueOf(l);
}
| cast a long to a Long Object(reference type) |
private Bitmap drawableToBitmap(Drawable drawable){
if (drawable instanceof BitmapDrawable) {
return ((BitmapDrawable)drawable).getBitmap();
}
int width=drawable.getIntrinsicWidth();
width=width > 0 ? width : 1;
int height=drawable.getIntrinsicHeight();
height=height > 0 ? height : 1;
Bitmap bitmap=Bi... | We need to convert drawable (which we get from attributes) to bitmap to prepare if for BitmapShader |
private String testConfigurationFile(String fileName){
File file=new File(fileName);
final String portStr=System.getProperty("rmi.port","12424");
final int port=Integer.parseInt(portStr);
return testConfiguration(file,port + testPort++);
}
| Test a configuration file. Determines whether the bootstrap should succeed or fail depending on the file name: *ok.properties: bootstrap should succeed. *ko.properties: bootstrap or connection should fail. |
private void paintXPBackground(Graphics g,JComponent c){
if (spinner != null && !spinner.isEnabled()) __Icon9Factory__.getInstance().getSpinnerDisableBg().draw((Graphics2D)g,0,0,c.getWidth(),c.getHeight());
else __Icon9Factory__.getInstance().getSpinnerBg().draw((Graphics2D)g,0,0,c.getWidth(),c.getHeight());
}
| Paint xp background. |
public static boolean isToplevelAnonymousClass(Scope s){
if (s instanceof Class) {
Class td=(Class)s;
return td.isAnonymous() && td.isToplevel();
}
else {
return false;
}
}
| Is the given scope a toplevel anonymous class? Members of toplevel anonymous classes can be directly imported into the toplevel namespace of a compilation unit. |
public static String matchObj(String path,Object input,Object expected) throws Exception {
return matchObj(path,input,expected,DEFAULT_DELTA);
}
| comparison using default delta |
public void newMessage(Message m){
if (isWarmup()) {
addWarmupID(m.getId());
return;
}
this.creationInfos.put(m.getId(),new InfoTuple(getSimTime(),m.getFrom().getLocation().clone(),m.getTo().getLocation().clone()));
}
| This is called when a new message is created |
protected StateRootImpl(){
super();
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public void insert(final AbstractInsnNode location,final AbstractInsnNode insn){
++size;
AbstractInsnNode next=location.next;
if (next == null) {
last=insn;
}
else {
next.prev=insn;
}
location.next=insn;
insn.next=next;
insn.prev=location;
cache=null;
insn.index=0;
}
| Inserts the given instruction after the specified instruction. |
public RGBImage(int[] rgb,int width,int height){
super(null);
this.width=width;
this.height=height;
this.rgb=rgb;
}
| Creates an RGB image from scratch the array isn't copied and can be saved and manipulated |
public UnManagedSMBFileShare(){
}
| JAXB requirement |
public GPUImageFilterGroup(){
this(null);
}
| Instantiates a new GPUImageFilterGroup with no filters. |
public Ed25519GroupElement negate(){
if (this.coordinateSystem != CoordinateSystem.P3) {
throw new UnsupportedOperationException();
}
return Ed25519Group.ZERO_P3.subtract(this.toCached()).toP3();
}
| Negates this group element by subtracting it from the neutral group element. (only used in MathUtils so it doesn't have to be fast) |
public boolean createHostPort(final String xivSystem,final String hostName,final String hostPort,final String hostPortType) throws Exception {
boolean isAvailable=findAvailability(MessageFormat.format(HOST_PORT_INSTANCE_URL,xivSystem,hostPortType,hostName,hostPort));
if (isAvailable) {
_log.info("HostPort {} al... | Creates Host Port (Initiator) |
public Object put(Object key,Object value){
Object k=maskNull(key);
Object[] tab=table;
int len=tab.length;
int i=hash(k,len);
Object item;
while ((item=tab[i]) != null) {
if (item == k) {
Object oldValue=tab[i + 1];
tab[i + 1]=value;
return oldValue;
}
i=nextKeyIndex(i,len);
... | Associates the specified value with the specified key in this identity hash map. If the map previously contained a mapping for this key, the old value is replaced. |
public void testUpperCaseFilter() throws IOException {
Analyzer a=new UpperCaseWhitespaceAnalyzer();
assertAnalyzesTo(a,"AbaCaDabA",new String[]{"ABACADABA"});
assertAnalyzesTo(a,"\ud801\udc3e\ud801\udc3e\ud801\udc3e\ud801\udc3e",new String[]{"\ud801\udc16\ud801\udc16\ud801\udc16\ud801\udc16"});
assertAnalyzesT... | Test that LowercaseFilter handles entire unicode range correctly |
public void testCase4(){
byte aBytes[]={1,2,3,4,5,6,7,1,2,3};
byte bBytes[]={10,20,30,40,50,60,70,10,20,30};
int aSign=1;
int bSign=-1;
byte rBytes[]={11,22,33,44,55,66,77,11,22,33};
BigInteger aNumber=new BigInteger(aSign,aBytes);
BigInteger bNumber=new BigInteger(bSign,bBytes);
BigInteger result=aNumb... | Subtract two numbers of the same length and different signs. The first is positive. The second is greater in absolute value. |
public void uninstallUI(JComponent c){
uninstallComponents();
optionPane.setLayout(null);
uninstallKeyboardActions();
uninstallListeners();
uninstallDefaults();
optionPane=null;
}
| Removes the receiver from the L&F controller of the passed in split pane. |
@Override public int hashCode(){
return nickname().hashCode();
}
| hashCode that must be used to distinguish localization services in hash sets |
public List<byte[]> hmget(final byte[] key,final byte[]... fields){
checkIsInMulti();
client.hmget(key,fields);
return client.getBinaryMultiBulkReply();
}
| Retrieve the values associated to the specified fields. <p> If some of the specified fields do not exist, nil values are returned. Non existing keys are considered like empty hashes. <p> <b>Time complexity:</b> O(N) (with N being the number of fields) |
private synchronized void removeTLCStatusSource(Model model){
String name=model.getLaunchConfiguration().getFile().getName();
this.sources.remove(name);
this.providers.remove(name);
printStats();
}
| Remove a source and the date provider associated with that source, if it exists. |
public ChoiceStateData(StateHolder<S,E> state,Guard<S,E> guard){
Assert.notNull(state,"Holder must be set");
this.state=state;
this.guard=guard;
}
| Instantiates a new choice state data. |
public void draw(Canvas c,Rect bounds){
mCirclePaint.setColor(mBackgroundColor);
mCirclePaint.setAlpha(mAlpha);
c.drawCircle(bounds.exactCenterX(),bounds.exactCenterY(),bounds.width() / 2,mCirclePaint);
final RectF arcBounds=mTempBounds;
arcBounds.set(bounds);
arcBounds.inset(mStrokeInset,mStrokeInset);
f... | Draw the progress spinner |
public boolean writeMyRasterToFile(String filename,String filetype){
log.info("Writing raster image to " + filename);
boolean b=false;
File f1=new File(filename);
try {
b=ImageIO.write(this.bufferedImage,filetype,f1);
}
catch ( IOException e1) {
e1.printStackTrace();
}
if (b) {
log.info(" ... | Writes the object's <i>BufferedImage</i> as an image. It is suggested that only image types that can handle transparency, such as *.png, be used since the raster image is essentially only calculated using various alpha-channel values, i.e. using transparency. |
public void show(boolean animate){
show(animate,fadeIn);
}
| Make the badge visible in the UI. |
public Object convert(Class type,Object value){
if (value == null) return null;
if (value instanceof Date) return value;
return DateUtils.getDate(value.toString());
}
| Convierte un objeto a Date. |
public void addFooterView(View view,boolean reverse){
if (null == view) {
throw new IllegalArgumentException("the view to add must not be null!");
}
final FixedViewInfo info=new FixedViewInfo();
info.view=view;
info.viewType=BASE_FOOTER_VIEW_TYPE + mFooterViewInfos.size();
mFooterViewInfos.add(info);
... | Adds a footer view |
@Override public void onUserSelected(User user){
mUserManager.switchUser(user);
Intent intent=new Intent(getApplicationContext(),MainActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
setResult(Activity.RESULT_OK);
fini... | When a user has been selected, finish this activity and load select category activity. |
private void pushRun(int runBase,int runLen){
this.runBase[stackSize]=runBase;
this.runLen[stackSize]=runLen;
stackSize++;
}
| Pushes the specified run onto the pending-run stack. |
@Override public boolean isRasterFormat(){
return true;
}
| Used to check if the file is raster format. |
public void updateAllTableRows(int columnId){
((ObdItemTableModel)tblPids.getPvModel()).updateAllRows(columnId);
}
| update specified column of all available table rows |
private TransportNetwork buildNetworkFromManifest(String networkId){
String manifestFileName=GTFSCache.cleanId(networkId) + ".json";
File manifestFile=new File(cacheDir,manifestFileName);
if (!manifestFile.exists() && sourceBucket != null) {
LOG.info("Manifest file not found locally, downloading from S3");
... | Build a network from a new style manifest JSON in S3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.