code stringlengths 10 174k | nl stringlengths 3 129k |
|---|---|
public double computeAverageLocal(int var1[],int var2[],int cond[]){
initialise();
addObservations(var1,var2,cond);
return computeAverageLocalOfObservations();
}
| Standalone routine to compute average conditional MI for a given set of variables. |
protected void connect() throws Exception {
FloodlightModuleContext fmc=new FloodlightModuleContext();
ThreadPool tp=new ThreadPool();
syncManager=new RemoteSyncManager();
fmc.addService(IThreadPoolService.class,tp);
fmc.addService(ISyncService.class,syncManager);
fmc.addConfigParam(syncManager,"hostname",s... | Set up the remote sync manager and prepare for requests |
AtomicLongChunks(final long length,final int chunkBits){
mLength=length;
assert chunkBits >= 0 && chunkBits <= 31;
mChunkBits=chunkBits;
mChunkSize=1 << mChunkBits;
mChunkMask=mChunkSize - 1;
final long ch=(length + mChunkSize - 1) / mChunkSize;
if (ch > Integer.MAX_VALUE) {
throw new RuntimeException... | Constructs an index by splitting into array chunks. This version sets the size of the chunks - it should only be used for testing. |
protected RequestTask(KMLNetworkLink link,String address){
if (link == null) {
String message=Logging.getMessage("nullValue.ObjectIsNull");
Logging.logger().severe(message);
throw new IllegalArgumentException(message);
}
if (address == null) {
String message=Logging.getMessage("nullValue.PathIsNul... | Construct a request task for a specified network link resource. |
public DefaultContainerCapabilityFactory(ClassLoader classLoader){
super();
AbstractFactoryRegistry.register(classLoader,this);
}
| Register container capability name mappings. |
public InQueryExp(ValueExp v1,ValueExp items[]){
val=v1;
valueList=items;
}
| Creates a new InQueryExp with the specified ValueExp to be found in a specified array of ValueExp. |
@Override public void dropPartition(String dbName,String tableName,String partitionName,boolean deleteData) throws HiveMetastoreException {
HiveObjectSpec partitionSpec=new HiveObjectSpec(dbName,tableName,partitionName);
if (!existsPartition(dbName,tableName,partitionName)) {
throw new HiveMetastoreException("M... | Drops the partition, but for safety, doesn't delete the data. |
private void jbInit() throws Exception {
Charset[] charsets=Ini.getAvailableCharsets();
for (int i=0; i < charsets.length; i++) fCharset.appendItem(charsets[i].displayName(),charsets[i]);
bFile.setLabel(Msg.getMsg(Env.getCtx(),"FileImportFile"));
bFile.setTooltiptext(Msg.getMsg(Env.getCtx(),"FileImportFileInf... | Static Init |
private void updateProgress(String progressLabel,int progress){
if (myHost != null && ((progress != previousProgress) || (!progressLabel.equals(previousProgressLabel)))) {
myHost.updateProgress(progressLabel,progress);
}
else {
System.out.println(progressLabel + " " + progress+ "%");
}
previousProgress... | Used to communicate a progress update between a plugin tool and the main Whitebox user interface. |
@Override public void run(){
amIActive=true;
String inputFile=null;
String outputFile=null;
int v;
int a;
int i;
double sigmaX;
double sigmaY;
double N;
double sigmaXY;
double sigmaXsqr;
double sigmaYsqr;
double mean;
double meanY;
double radians2Deg=180 / Math.PI;
double slope;
double... | Used to execute this plugin tool. |
protected void prepare() throws IllegalStateException {
startLoading();
this.videoIsReady=false;
this.initialMovieHeight=-1;
this.initialMovieWidth=-1;
this.mediaPlayer.setOnPreparedListener(this);
this.mediaPlayer.setOnErrorListener(this);
this.mediaPlayer.setOnSeekCompleteListener(this);
this.mediaPla... | Calls prepare() method of MediaPlayer |
public NormalizedIndicator(Problem problem,NondominatedPopulation referenceSet,double[] referencePoint){
super();
this.problem=problem;
normalizer=new Normalizer(problem,referenceSet,referencePoint);
normalizedReferenceSet=normalizer.normalize(referenceSet);
}
| Constructs a normalized indicator for the specified problem and corresponding reference set. This version allows the use of a custom reference point. |
public InvalidPathException(String input,String reason){
this(input,reason,-1);
}
| Constructs an instance from the given input string and reason. The resulting object will have an error index of <tt>-1</tt>. |
public void testDoCheckWithDefaultDetectionResultAndDetectionResultOverridenByConstructor(){
LOGGER.debug("doCheckWithDefaultDetectionResultAndDetectionResultOverridenByConstructor");
elements.add(element);
expect(mockTextElementBuilder.buildTextFromElement(element)).andReturn("test");
mockTestSolutionHandler.a... | Test of doCheck method, of class TextBelongsToBlackListChecker. |
public static void saveX509Cert(Certificate cert,File certFile) throws GeneralSecurityException, IOException {
saveX509Cert(new Certificate[]{cert},certFile);
}
| Save a certificate to a file. Remove all the content in the file if there is any before. |
@Override public boolean eIsSet(int featureID){
switch (featureID) {
case N4JSPackage.BINARY_BITWISE_EXPRESSION__LHS:
return lhs != null;
case N4JSPackage.BINARY_BITWISE_EXPRESSION__OP:
return op != OP_EDEFAULT;
case N4JSPackage.BINARY_BITWISE_EXPRESSION__RHS:
return rhs != null;
}
return super.eIsSet(featureID);... | <!-- begin-user-doc --> <!-- end-user-doc --> |
@LargeTest public void testPropertiesGIFFile() throws Exception {
final String imageItemFilename=INPUT_FILE_PATH + "IMG_640x480.gif";
final int imageItemDuration=10000;
final int renderingMode=MediaItem.RENDERING_MODE_BLACK_BORDER;
boolean flagForException=false;
try {
new MediaImageItem(mVideoEditor,"m1"... | To test Media Properties for file GIF - Unsupported type |
public String doNotCheckCapabilitiesTipText(){
return "If set, associator capabilities are not checked before associator is built" + " (Use with caution to reduce runtime).";
}
| Returns the tip text for this property |
public void compileSingleFiles(List<File> projectRoots,List<File> modelFiles) throws N4JSCompileException {
compileSingleFiles(projectRoots,modelFiles,new DismissingIssueAcceptor());
}
| Compile multiple Files |
private boolean isHiraganaDakuten(char c){
return inside(c,h2d,'\u304b') && c == lookupHiraganaDakuten(c);
}
| Hiragana dakuten predicate |
private void writeAttribute(java.lang.String namespace,java.lang.String attName,java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName,attValue);
}
else {
registerPrefix(xmlWriter,namesp... | Util method to write an attribute without the ns prefix |
public boolean isLoaded(){
return loaded;
}
| Gets the value of the loaded property. |
public void destroySelf(){
if (mViewPager == null || mViewPager.getAdapter() == null) {
return;
}
mBaseCyclePageChangeListener.removeAdapterDataChangeObserverListener();
removeAllViews();
}
| clear self means unregister the dataset observer and remove all the child views(indicators). |
public static int computeTagSize(final int fieldNumber){
return computeRawVarint32Size(WireFormat.makeTag(fieldNumber,0));
}
| Compute the number of bytes that would be needed to encode a tag. |
public static <T>ManyAssociationContainsPredicate<T> contains(ManyAssociation<T> manyAssoc,T value){
return new ManyAssociationContainsPredicate<>(manyAssociation(manyAssoc),value);
}
| Create a new CONTAINS specification for a ManyAssociation. |
public SignerInformationStore generateCounterSigners(SignerInformation signer) throws CMSException {
return this.generate(new CMSProcessableByteArray(null,signer.getSignature()),false).getSignerInfos();
}
| generate a set of one or more SignerInformation objects representing counter signatures on the passed in SignerInformation object. |
protected void checkHistory(final List<DomainHistoryObject<?>> historyList){
final DomainHistoryObject<?> history=historyList.get(historyList.size() - 1);
ModificationType modificationType=history.getModtype();
if (!modificationType.equals(ModificationType.DELETE)) {
fail("The last version of history object i... | Helper method for checking last entry of history table for status DELETED. |
private void push(final int type){
if (outputStack == null) {
outputStack=new int[10];
}
int n=outputStack.length;
if (outputStackTop >= n) {
int[] t=new int[Math.max(outputStackTop + 1,2 * n)];
System.arraycopy(outputStack,0,t,0,n);
outputStack=t;
}
outputStack[outputStackTop++]=type;
int... | Pushes a new type onto the output frame stack. |
public TypeNode typeNode(Type type){
if (type == null || !(type instanceof PrimType || type instanceof RefType)) {
throw new InternalTypingException();
}
TypeNode typeNode=typeNodeMap.get(type);
if (typeNode == null) {
throw new InternalTypingException();
}
return typeNode;
}
| Get the type node for the given type. |
private void put(final Item i){
if (index > threshold) {
int ll=items.length;
int nl=ll * 2 + 1;
Item[] newItems=new Item[nl];
for (int l=ll - 1; l >= 0; --l) {
Item j=items[l];
while (j != null) {
int index=j.hashCode % newItems.length;
Item k=j.next;
j.next=newIte... | Puts the given item in the constant pool's hash table. The hash table <i>must</i> not already contains this item. |
@Override public String toString(){
TextBuilder tb=new TextBuilder();
tb.append('{');
int length=_mapping.length << 6;
for (int i=0; i < length; i++) {
if (this.contains((char)i)) {
if (tb.length() > 1) {
tb.append(',');
tb.append(' ');
}
tb.append('\'');
tb.append((c... | Returns the textual representation of this character set. |
public void testCsiX(){
withTerminalSized(13,2).enterString("abcdefghijkl\b\b\b\b\b\033[X").assertLinesAre("abcdefg ijkl "," ");
withTerminalSized(13,2).enterString("abcdefghijkl\b\b\b\b\b\033[1X").assertLinesAre("abcdefg ijkl "," ");
withTerminalSized(13,2).enterString("abcdefghijkl\b\b\b... | CSI Ps X Erase Ps Character(s) (default = 1) (ECH). |
static int popLength(InputStream stream){
byte[] lengthBytes=new byte[Integer.SIZE / Byte.SIZE];
try {
stream.read(lengthBytes);
}
catch ( IOException e) {
Log.e(TAG,"IOException popping length from input stream: " + e);
return -1;
}
ByteBuffer buffer=ByteBuffer.wrap(lengthBytes);
buffer.order... | Take the output of lengthValueEncode() and decode it to a Message of the given type. |
protected Locale determineLocale(HttpContext context){
return Locale.getDefault();
}
| Determines the locale of the response. The implementation in this class always returns the default locale. |
@Override public Object eInvoke(int operationID,EList<?> arguments) throws InvocationTargetException {
switch (operationID) {
case N4JSPackage.PROPERTY_ASSIGNMENT___GET_DEFINED_MEMBER:
return getDefinedMember();
case N4JSPackage.PROPERTY_ASSIGNMENT___IS_VALID_NAME:
return isValidName();
case N4JSPackage.PROPERTY_... | <!-- begin-user-doc --> <!-- end-user-doc --> |
protected double calculateHighestVisibleTickValue(){
double unit=getTickUnit().getSize();
double index=Math.floor(getRange().getUpperBound() / unit);
return index * unit;
}
| Calculates the value of the highest visible tick on the axis. |
private String nextAT() throws IOException {
hasQE=false;
for (; pos < chars.length && chars[pos] == ' '; pos++) {
}
if (pos == chars.length) {
return null;
}
beg=pos;
pos++;
for (; pos < chars.length && chars[pos] != '=' && chars[pos] != ' '; pos++) {
}
if (pos >= chars.length) {
throw new ... | Returns the next attribute type: (ALPHA 1*keychar) / oid |
public JmsQueueListener(Delegator delegator,String jndiServer,String jndiName,String queueName,String userName,String password){
super(delegator);
this.jndiServer=jndiServer;
this.jndiName=jndiName;
this.queueName=queueName;
this.userName=userName;
this.password=password;
}
| Creates a new JmsQueueListener - Should only be called by the JmsListenerFactory. |
public boolean isActiveSite(){
try {
SiteState state=getSiteFromLocalVdc(coordinator.getSiteId()).getState();
return ACTIVE_SITE_STATES.contains(state);
}
catch ( RetryableCoordinatorException ex) {
if (ServiceCode.COORDINATOR_SITE_NOT_FOUND == ex.getServiceCode()) {
return true;
}
log.e... | Check if current site is active |
public RayTracer(Entity entity){
this(new Ray(entity.position().add(entity.components.has(Living.class) ? entity.components.get(Living.class).faceDisplacement.get() : Vector3D.ZERO),entity.rotation().applyTo(Vector3DUtil.FORWARD)));
}
| Does an entity look ray trace to see which block the entity is looking at. |
boolean canBeWalkedInNaturalDocOrderStatic(){
if (null != m_firstWalker) {
AxesWalker walker=m_firstWalker;
int prevAxis=-1;
boolean prevIsSimpleDownAxis=true;
for (int i=0; null != walker; i++) {
int axis=walker.getAxis();
if (walker.isDocOrdered()) {
boolean isSimpleDownAxis=((ax... | Tell if the nodeset can be walked in doc order, via static analysis. |
@Override public void runAndUpdate(final Runnable r){
r.run();
if (getScope().isPaused()) {
updateDisplay(true);
}
if (animator.isPaused()) {
animator.resume();
animator.pause();
}
}
| Method waitForUpdateAndRun() |
private Response doQUIT(SMTPSession session,String argument){
if ((argument == null) || (argument.length() == 0)) {
StringBuilder response=new StringBuilder();
response.append(DSNStatus.getStatus(DSNStatus.SUCCESS,DSNStatus.UNDEFINED_STATUS)).append(" ").append(session.getConfiguration().getHelloName()).appen... | Handler method called upon receipt of a QUIT command. This method informs the client that the connection is closing. |
public void writeImmediateAlert(final boolean on){
if (!isConnected()) return;
if (mAlertLevelCharacteristic != null) {
mAlertLevelCharacteristic.setValue(on ? HIGH_ALERT : NO_ALERT);
writeCharacteristic(mAlertLevelCharacteristic);
mAlertOn=on;
}
else {
DebugLogger.w(TAG,"Immediate Alert Level ... | Writes the HIGH ALERT or NO ALERT command to the target device |
private PostgreSQLGuacamoleProperties(){
}
| This class should not be instantiated. |
public static void main(final String[] args){
DOMTestCase.doMain(documentimportnode11.class,args);
}
| Runs this test from the command line. |
public UnifyMapping(UnifyElement sourceElement,UnifyElement destinationElement){
this(sourceElement);
destinationElements=createDestinationElements();
addDestinationElement(destinationElement);
}
| Creates a new UnifyMapping from one source element to one destination element. You cann add more destination elements later by method <code>addDestinationElement(..)</code>. |
@Override public int eDerivedStructuralFeatureID(int baseFeatureID,Class<?> baseClass){
if (baseClass == VariableEnvironmentElement.class) {
switch (baseFeatureID) {
default :
return -1;
}
}
if (baseClass == NamedElement.class) {
switch (baseFeatureID) {
default :
return -1;
}
}
if (baseClass == PropertyN... | <!-- begin-user-doc --> <!-- end-user-doc --> |
public static boolean isSymbolicLink(File file) throws IOException {
try {
Class<?> filesClass=Class.forName("java.nio.file.Files");
Class<?> pathClass=Class.forName("java.nio.file.Path");
Object path=File.class.getMethod("toPath").invoke(file);
return ((Boolean)filesClass.getMethod("isSymbolicLink",p... | Returns whether the given file is a symbolic link. |
@Override protected void onDraw(Canvas canvas){
if (canvas != null) {
super.onDraw(canvas);
}
mTotalWidth=0;
final int height=getHeight();
if (mBgPadding == null) {
mBgPadding=new Rect(0,0,0,0);
if (getBackground() != null) {
getBackground().getPadding(mBgPadding);
}
mDivider.setBoun... | If the canvas is null, then only touch calculations are performed to pick the target candidate. |
public void addDataFile(List<ExtensionMapping> mappings,@Nullable Integer rowLimit) throws IOException, IllegalArgumentException, InterruptedException, GeneratorException {
checkForInterruption();
if (mappings == null || mappings.isEmpty()) {
return;
}
currRecords=0;
currRecordsSkipped=0;
Extension ext=... | Adds a single data file for a list of extension mappings that must all be mapped to the same extension. </br> The ID column is always the 1st column (index 0) and is always equal to the core record identifier that has been mapped (e.g. occurrenceID, taxonID, etc). |
public Filter createFilter(BridgeContext ctx,Element filterElement,Element filteredElement,GraphicsNode filteredNode,Filter inputFilter,Rectangle2D filterRegion,Map filterMap){
List srcs=extractFeMergeNode(filterElement,filteredElement,filteredNode,inputFilter,filterMap,ctx);
if (srcs == null) {
return null;
... | Creates a <tt>Filter</tt> primitive according to the specified parameters. |
public RandomPlayer(char mark){
super(mark);
}
| Construct a Random player who determines a move randomly from available open cells. |
private void addEntryMarkdownToExport(Entry entry,StringBuilder result,SourcesHashList sources,boolean includeQuotations,boolean includeReferencesSection,boolean skipThisLevel) throws IOException {
if (!skipThisLevel) {
final Entry source=dbLogic.getEntryById(entry.getSourceId());
int sourceId=0;
if (sour... | Helper method. Adds the Markdown for an entry to an export. |
private void displaySimple(PrintStream output){
output.println("First-Order Effects");
for (int j=0; j < P; j++) {
double[] a0=new double[N];
double[] a1=new double[N];
double[] a2=new double[N];
for (int i=0; i < N; i++) {
a0[i]=A[i];
a1[i]=C_A[i][j];
a2[i]=B[i];
}
double ... | Computes and displays the first- and total-order Sobol' sensitivites and 50% bootstrap confidence intervals. |
public ByteBuffer read(final long off,final int nbytes) throws IOException {
final ByteBuffer tmp=ByteBuffer.allocate(nbytes);
FileChannelUtility.readAll(this,tmp,off);
tmp.flip();
return tmp;
}
| Read some data out of the file. |
public AddReviewerResult(String reviewer,boolean confirm){
this(reviewer);
this.confirm=confirm;
}
| Constructs a needs-confirmation result for the given account. |
private JFrame createMainFrame(){
JFrame result=new JFrame();
result.setPreferredSize(new Dimension(400,300));
JTextPane textPane=new JTextPane();
myAppender=createAppender(textPane);
textPane.setEditable(false);
JScrollPane scrollPane=new JScrollPane(textPane);
scrollPane.setPreferredSize(new Dimension(4... | createMainFrame <p> |
public boolean isJsonNull(){
return this instanceof JsonNull;
}
| provides check for verifying if this element represents a null value or not. |
public static Seconds seconds(int seconds){
switch (seconds) {
case 0:
return ZERO;
case 1:
return ONE;
case 2:
return TWO;
case 3:
return THREE;
case Integer.MAX_VALUE:
return MAX_VALUE;
case Integer.MIN_VALUE:
return MIN_VALUE;
default :
return new Seconds(seconds);
}
}
| Obtains an instance of <code>Seconds</code> that may be cached. <code>Seconds</code> is immutable, so instances can be cached and shared. This factory method provides access to shared instances. |
public void testGetters3(){
LayoutBuilder b=builder().setIncludePad(true).setWidth(50);
FontMetricsInt fmi=b.paint.getFontMetricsInt();
Layout l=b.build();
assertVertMetrics(l,fmi.top - fmi.ascent,fmi.bottom - fmi.descent,fmi.top,fmi.descent,fmi.ascent,fmi.bottom);
}
| Basic test showing effect of includePad = true wrapping to 2 lines. Ascent of top line and descent of bottom line are affected. |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2014-08-13 13:14:14.274 -0400",hash_original_method="4681265216BD04726C8DE86640D9EBFD",hash_generated_method="96212B4C3BFA1663294F6F4C683E643F") public static String toASCII(String input,int flags){
return NativeIDN.toASCII(input,flags);
}
| Transform a Unicode String to ASCII Compatible Encoding String according to the algorithm defined in <a href="http://www.ietf.org/rfc/rfc3490.txt">RFC 3490</a>. <p>If the transformation fails (because the input is not a valid IDN), an exception will be thrown. <p>This method can handle either an individual label or an ... |
public void startCDATA() throws org.xml.sax.SAXException {
m_cdataStartCalled=true;
}
| Report the start of a CDATA section. |
public MoveDescription waitForMove(final IPlayerBridge bridge){
return m_movePanel.waitForMove(bridge);
}
| Blocks until the user moves units. |
private boolean isNegative(final String input){
requireNonNull(input);
for ( final String negativeString : negativeStrings) {
if (input.equalsIgnoreCase(negativeString)) {
return true;
}
}
return false;
}
| Checks if a user's input matches one of the negative strings. |
public boolean matchType(Properties jobProp){
if (_confName == null || _confPattern == null) {
return false;
}
return jobProp.containsKey(_confName) && _confPattern.matcher((String)jobProp.get(_confName)).matches();
}
| Check if a JobType matches a property |
@Override public void load(Entity unit) throws IllegalArgumentException {
if (!canLoad(unit)) {
throw new IllegalArgumentException("Can not load " + unit.getShortName() + " into this bay. "+ currentSpace);
}
currentSpace-=1;
if ((unit.game.getPhase() != IGame.Phase.PHASE_DEPLOYMENT) && (unit.game.getPhase()... | Load the given unit. |
public boolean isProjectionStep(){
return projectionStep;
}
| Returns whether or not the projection step is in use after each iteration |
protected int skipWhitespace(int c) throws IOException {
while (c == ' ' || c == '\t') {
c=readCodePoint();
}
return c;
}
| Reads characters from reader until it finds a character that is not a space or tab, and returns this last character code point. In case the end of the character stream has been reached, -1 is returned. |
private void generateRandom(){
int step=k - overlap;
int numberOfFunctions=(n - k) / step + 1;
function=new double[numberOfFunctions][1 << k];
permutation=new int[n];
for (int i=0; i + k <= n; i+=step) {
double max=Double.NEGATIVE_INFINITY;
for (int j=0; j < (1 << k); j++) {
double value=PRNG.ne... | Generates a new, random problem instance. |
private int checkInterruptWhileWaiting(Node node){
return Thread.interrupted() ? (transferAfterCancelledWait(node) ? THROW_IE : REINTERRUPT) : 0;
}
| Checks for interrupt, returning THROW_IE if interrupted before signalled, REINTERRUPT if after signalled, or 0 if not interrupted. |
@DSComment("Private Method") @DSBan(DSCat.PRIVATE_METHOD) @DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:33:07.036 -0500",hash_original_method="35C4B35D5036F5DD5E458797A063F760",hash_generated_method="06BDD6176671442A00DBFA1F4DCB3855") private void nativeNotifyAnimationStarted(int ... | Notify webkit that animations have begun (on the hardware accelerated content) |
public void copyFrom(ParameterProperty other){
this.bits=other.bits;
}
| Make this object the same as the given one. |
public static String format(String message,Object[] arguments){
return MessageFormat.format(message,arguments);
}
| Formats the given string with the given argument. |
static void paintDisabledText(Style style,Graphics g,String text,int x,int y){
g.setColor(style.getHighLightColor());
g.drawString(text,x + 1,y + 1);
g.setColor(style.getShadowColor());
g.drawString(text,x,y);
}
| Paint disabled text using a style's highlight and shadow colors. |
public void assertSame(Object expected,Object actual,String errorMessage){
TestUtils.assertSame(expected,actual,errorMessage);
}
| This method just invokes the test utils method, it is here for convenience |
public static byte[] decodeFromFile(String filename) throws java.io.IOException {
byte[] decodedData=null;
Base64.InputStream bis=null;
try {
java.io.File file=new java.io.File(filename);
byte[] buffer=null;
int length=0;
int numBytes=0;
if (file.length() > Integer.MAX_VALUE) {
throw new... | Convenience method for reading a base64-encoded file and decoding it. <p>As of v 2.3, if there is a error, the method will throw an java.io.IOException. <b>This is new to v2.3!</b> In earlier versions, it just returned false, but in retrospect that's a pretty poor way to handle it.</p> |
@DSGenerator(tool_name="Doppelganger",tool_version="2.0",generated_on="2013-12-30 12:58:22.129 -0500",hash_original_method="A70831539166366B9681E2ACC95982AC",hash_generated_method="1AEA9BD8E826B96D44420B922A4B6FA3") private void parseSmsStatusReport(PduParser p,int firstByte){
isStatusReportMessage=true;
forSubmit=... | Parses a SMS-STATUS-REPORT message. |
public void snippetResin3xLocalDeploy() throws Exception {
InstalledLocalContainer container=new Resin3xInstalledLocalContainer(new Resin3xStandaloneLocalConfiguration("target/myresin3x"));
container.setHome("c:/apps/resin-3.0.18");
container.start();
Deployable war=new WAR("path/to/simple.war");
Deployer dep... | Snippet for local deployment on a Resin 3.x container. |
public List<String> hostVcenterChangeDeclineDetails(URI hostId,URI clusterId,URI datacenterId,boolean isVcenter){
Host host=_dbClient.queryObject(Host.class,hostId);
return Lists.newArrayList(ComputeSystemDialogProperties.getMessage("ComputeSystem.hostVcenterChangeDeclineDetails",host.getLabel()));
}
| Get details for a decline event for hostVcenterChange NOTE: In order to maintain backwards compatibility, do not change the signature of this method. |
private void fillComboReport(int AD_PrintFormat_ID){
comboReport.removeEventListener(Events.ON_SELECT,this);
comboReport.getItems().clear();
KeyNamePair selectValue=null;
String sql=MRole.getDefault().addAccessSQL("SELECT AD_PrintFormat_ID, Name, Description " + "FROM AD_PrintFormat " + "WHERE AD_Table_ID=? "+ ... | Fill ComboBox comboReport (report options) |
public FileDocument(final File file){
if (file == null) {
throw new NullPointerException();
}
if (!file.exists()) {
throw new DSSException("File Not Found: " + file.getAbsolutePath());
}
this.file=file;
this.name=file.getName();
this.mimeType=MimeType.fromFileName(file.getName());
}
| Create a FileDocument |
T versionStrict(boolean versionStrict){
this.versionStrict=versionStrict;
return this_;
}
| Sets whether to exclude properties that do not support the target version from the written vCard. |
public ConstraintExpr_ createConstraintExpr_(){
ConstraintExpr_Impl constraintExpr_=new ConstraintExpr_Impl();
return constraintExpr_;
}
| <!-- begin-user-doc --> <!-- end-user-doc --> |
public static void sendRefusal(InternalDistributedMember recipient,int processorId,DM dm){
Assert.assertTrue(recipient != null,"ManageBackupBucketReplyMessage NULL reply message");
ManageBackupBucketReplyMessage m=new ManageBackupBucketReplyMessage(processorId,false,false);
m.setRecipient(recipient);
dm.putOutg... | Refuse the request to manage the bucket |
public static ListContainersParams create(){
return new ListContainersParams();
}
| Creates and returns arguments holder. |
public OFRoleVendorData(int dataType,int role){
super(dataType);
this.role=role;
}
| Construct an OFRoleVendorData with the specified data type (i.e. either request or reply) and role (i.e. one of of master, slave, or other). |
public SpringWriteTemplate(TransactionManager transactionManager) throws Exception {
setTransactionManager(transactionManager);
afterPropertiesSet();
}
| Create a new SpringWriteTemplate instance. |
private void assertActive() throws ReplicatorException {
if (!active) {
throw new ReplicatorException("Channel assignment service is not enabled");
}
}
| Ensures that the service is active. |
private boolean processAuthenticationResponse(final HttpMethod method){
LOG.trace("enter HttpMethodBase.processAuthenticationResponse(" + "HttpState, HttpConnection)");
try {
switch (method.getStatusCode()) {
case HttpStatus.SC_UNAUTHORIZED:
return processWWWAuthChallenge(method);
case HttpStatus.SC_PROXY_AUT... | Processes a response that requires authentication |
public static float toUnit(short fromUnit,float value,short toUnit){
if (fromUnit == 1) {
fromUnit=2;
}
if (toUnit == 1) {
toUnit=2;
}
return (float)(K[fromUnit - 2][toUnit - 2] * value);
}
| Converts an angle from one unit to another. |
public void testLotsOfBindings() throws Exception {
doTestLotsOfBindings(Byte.MAX_VALUE - 1);
doTestLotsOfBindings(Byte.MAX_VALUE);
doTestLotsOfBindings(Byte.MAX_VALUE + 1);
}
| tests huge amounts of variables in the expression |
public void doTestEntityExpiration() throws Exception {
IDeviceListener mockListener=createMock(IDeviceListener.class);
expect(mockListener.getName()).andReturn("mockListener").anyTimes();
expect(mockListener.isCallbackOrderingPostreq((String)anyObject(),(String)anyObject())).andReturn(false).atLeastOnce();
exp... | Note: Entity expiration does not result in device moved notification. |
public String encode(String str){
if (str == null) {
str="null";
}
int n=str.length();
int j=_first.firstEncodedOffset(str,0,n);
if (j == n) {
return Encode.encode(_last,str);
}
final int remaining=n - j;
final int m=j + _first.maxEncodedLength(n);
CharBuffer input=CharBuffer.allocate(m);
st... | Encodes an input string to an output string. |
protected void recalculateInsetRect(Rect outerBounds){
final int parentWidth=outerBounds.width();
final int parentHeight=outerBounds.height();
if (!mIsWidthSet) {
mInsetRect.left=outerBounds.left + (mIsLeftPercent ? parentWidth * mLeft / 100 : mLeft);
mInsetRect.right=outerBounds.right - (mIsRightPercent ... | Update the inset bounds based on provided outer bounds and this layer's state |
private static void sbrHfInverseFilter(float alpha0[][],float alpha1[][],final float Xlow[][][],int k0){
float phi[][][]=new float[3][2][2];
for (int k=0; k < k0; k++) {
SBRDSP.autocorrelate(Xlow[k],phi);
float dk=phi[2][1][0] * phi[1][0][0] - (phi[1][1][0] * phi[1][1][0] + phi[1][1][1] * phi[1][1][1]) / 1.... | High Frequency Generation (14496-3 sp04 p214+) and Inverse Filtering (14496-3 sp04 p214) Warning: This routine does not seem numerically stable. |
protected void addTrailerToOutput(byte[] msg,int offset,AbstractMRMessage m){
msg[offset]=0x03;
}
| Add trailer to the outgoing byte stream. |
static public ISeq list(){
return null;
}
| **************************************** list support |
public boolean hasClosedDate(){
return hasExtension(ClosedDate.class);
}
| Returns whether it has the closed date. |
public GetIDs(int i){
m_i=i;
}
| Get IDs |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.