signature stringlengths 43 39.1k | implementation stringlengths 0 450k |
|---|---|
public class WhiteboxImpl { /** * Invoke a constructor . Useful for testing classes with a private
* constructor when PowerMock cannot determine which constructor to invoke .
* This only happens if you have two constructors with the same number of
* arguments where one is using primitive data types and the other ... | if ( parameterTypes != null && arguments != null ) { if ( parameterTypes . length != arguments . length ) { throw new IllegalArgumentException ( "parameterTypes and arguments must have the same length" ) ; } } Constructor < T > constructor = null ; try { constructor = classThatContainsTheConstructorToTest . getDeclared... |
public class Curve25519 { /** * Calculates an ECDH agreement .
* @ param publicKey The Curve25519 ( typically remote party ' s ) public key .
* @ param privateKey The Curve25519 ( typically yours ) private key .
* @ return A 32 - byte shared secret . */
public byte [ ] calculateAgreement ( byte [ ] publicKey , by... | if ( publicKey == null || privateKey == null ) { throw new IllegalArgumentException ( "Keys must not be null!" ) ; } if ( publicKey . length != 32 || privateKey . length != 32 ) { throw new IllegalArgumentException ( "Keys must be 32 bytes!" ) ; } return provider . calculateAgreement ( privateKey , publicKey ) ; |
public class Expressions { /** * Create a new Template expression
* @ deprecated Use { @ link # numberTemplate ( Class , Template , List ) } instead .
* @ param cl type of expression
* @ param template template
* @ param args template parameters
* @ return template expression */
@ Deprecated public static < T... | return new NumberTemplate < T > ( cl , template , args ) ; |
public class DateCache { /** * Format a date according to our stored formatter .
* @ param inDate
* @ return Formatted date */
public synchronized String format ( long inDate ) { } } | long seconds = inDate / 1000 ; // Is it not suitable to cache ?
if ( seconds < _lastSeconds || _lastSeconds > 0 && seconds > _lastSeconds + __hitWindow ) { // It ' s a cache miss
_misses ++ ; if ( _misses < __MaxMisses ) { Date d = new Date ( inDate ) ; return _tzFormat . format ( d ) ; } } else if ( _misses > 0 ) _mis... |
public class Parsers { /** * A { @ link Parser } that sequentially runs 3 parser objects and collects the results in a
* { @ link Tuple3 } object .
* @ deprecated Prefer to converting to your own object with a lambda . */
@ Deprecated public static < A , B , C > Parser < Tuple3 < A , B , C > > tuple ( Parser < ? ex... | return sequence ( p1 , p2 , p3 , Tuple3 :: new ) ; |
public class JDBCResultSet { /** * < ! - - start generic documentation - - >
* Retrieves the value of the designated column in the current row
* of this < code > ResultSet < / code > object as
* a < code > long < / code > in the Java programming language .
* < ! - - end generic documentation - - >
* @ param c... | Object o = getColumnInType ( columnIndex , Type . SQL_BIGINT ) ; return o == null ? 0 : ( ( Number ) o ) . longValue ( ) ; |
public class XMLLibImpl { /** * TODO : Too general ; this should be split into overloaded methods .
* Is that possible ? */
XmlNode . QName toNodeQName ( Context cx , Object nameValue , boolean attribute ) { } } | if ( nameValue instanceof XMLName ) { return ( ( XMLName ) nameValue ) . toQname ( ) ; } else if ( nameValue instanceof QName ) { QName qname = ( QName ) nameValue ; return qname . getDelegate ( ) ; } else if ( nameValue instanceof Boolean || nameValue instanceof Number || nameValue == Undefined . instance || nameValue... |
public class Computer { /** * Returns true if all the executors of this computer are idle . */
@ Exported public final boolean isIdle ( ) { } } | if ( ! oneOffExecutors . isEmpty ( ) ) return false ; for ( Executor e : executors ) if ( ! e . isIdle ( ) ) return false ; return true ; |
public class PathUtils { /** * Normalize a relative path using { @ link # normalize ( String ) } and verify that
* the normalized path does not begin with an upwards path element ( " . . " ) .
* The path is required to be a relative path which uses forward slashes ( ' / ' ) .
* The normalized path is tested as an... | if ( path == null || path . length ( ) == 0 ) return "" ; path = normalizeRelative ( path ) ; if ( path . startsWith ( ".." ) ) throw new MalformedLocationException ( "Can not reference \"..\" when creating a descendant (path=" + path + ")" ) ; return path ; |
public class ReflectUtil { /** * 获得指定类过滤后的Public方法列表
* @ param clazz 查找方法的类
* @ param excludeMethods 不包括的方法
* @ return 过滤后的方法列表 */
public static List < Method > getPublicMethods ( Class < ? > clazz , Method ... excludeMethods ) { } } | final HashSet < Method > excludeMethodSet = CollectionUtil . newHashSet ( excludeMethods ) ; return getPublicMethods ( clazz , new Filter < Method > ( ) { @ Override public boolean accept ( Method method ) { return false == excludeMethodSet . contains ( method ) ; } } ) ; |
public class MmtfActions { /** * Read a Biojava structure from an { @ link InputStream }
* @ param inStream the { @ link InputStream } to read from
* @ return the parsed { @ link Structure }
* @ throws IOException */
public static Structure readFromInputStream ( InputStream inStream ) throws IOException { } } | // Get the reader - this is the bit that people need to implement .
MmtfStructureReader mmtfStructureReader = new MmtfStructureReader ( ) ; // Do the inflation
new StructureDataToAdapter ( new GenericDecoder ( ReaderUtils . getDataFromInputStream ( inStream ) ) , mmtfStructureReader ) ; // Get the structue
return mmtfS... |
public class HttpServlets { /** * 设置请求 URI 。
* @ param request
* 请求
* @ param requestURI
* 请求 URI */
public static void setRequestURI ( final HttpServletRequest request , final String requestURI ) { } } | request . getSession ( true ) . setAttribute ( STORE_URI_KEY , requestURI ) ; |
public class UnmodifiableList { /** * Returns an unmodifiable view of the list composed of elements .
* @ param elements Iterable of elements .
* @ param < E > Type of the elements of the list .
* @ return an unmodifiable view of the list composed of elements . */
public static < E > List < E > copyOf ( Iterable ... | Preconditions . checkNotNull ( elements , "elements" ) ; List < E > result = ( elements instanceof Collection ) // can pre - allocate the array
? new ArrayList < > ( cast ( elements ) . size ( ) ) // cannot
: new ArrayList < > ( ) ; for ( E e : elements ) { result . add ( e ) ; } return Collections . unmodifiableList (... |
public class GeoJsonReaderDriver { /** * Parses Json Array and returns an ArrayList
* Syntax :
* Json Array :
* { " member1 " : value1 } , value2 , value3 , { " member4 " : value4 } ]
* @ param jp the json parser
* @ return the array */
private ArrayList < Object > parseArray ( JsonParser jp ) throws IOExcept... | JsonToken value = jp . nextToken ( ) ; ArrayList < Object > ret = new ArrayList < > ( ) ; while ( value != JsonToken . END_ARRAY ) { if ( value == JsonToken . START_OBJECT ) { Object object = parseObject ( jp ) ; ret . add ( object ) ; } else if ( value == JsonToken . START_ARRAY ) { ArrayList < Object > arrayList = pa... |
public class FsctlPipeWaitRequest { /** * { @ inheritDoc }
* @ see jcifs . Encodable # encode ( byte [ ] , int ) */
@ Override public int encode ( byte [ ] dst , int dstIndex ) { } } | int start = dstIndex ; SMBUtil . writeInt8 ( this . timeout , dst , dstIndex ) ; dstIndex += 8 ; SMBUtil . writeInt4 ( this . nameBytes . length , dst , dstIndex ) ; dstIndex += 4 ; dst [ dstIndex ] = ( byte ) ( this . timeoutSpecified ? 0x1 : 0x0 ) ; dstIndex ++ ; dstIndex ++ ; // Padding
System . arraycopy ( this . n... |
public class Snippets { /** * Using a CoGroupByKey transform . */
public static PCollection < String > coGroupByKeyTuple ( TupleTag < String > emailsTag , TupleTag < String > phonesTag , PCollection < KV < String , String > > emails , PCollection < KV < String , String > > phones ) { } } | // [ START CoGroupByKeyTuple ]
PCollection < KV < String , CoGbkResult > > results = KeyedPCollectionTuple . of ( emailsTag , emails ) . and ( phonesTag , phones ) . apply ( CoGroupByKey . create ( ) ) ; PCollection < String > contactLines = results . apply ( ParDo . of ( new DoFn < KV < String , CoGbkResult > , String... |
public class AbstractAggregatorImpl { /** * / * ( non - Javadoc )
* @ see javax . servlet . http . HttpServlet # doGet ( javax . servlet . http . HttpServletRequest , javax . servlet . http . HttpServletResponse ) */
@ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws ServletE... | final String sourceMethod = "doGet" ; // $ NON - NLS - 1 $
boolean isTraceLogging = log . isLoggable ( Level . FINER ) ; if ( isTraceLogging ) { log . entering ( AbstractAggregatorImpl . class . getName ( ) , sourceMethod , new Object [ ] { req , resp } ) ; log . finer ( "Request URL=" + req . getRequestURI ( ) ) ; // ... |
public class ElevationUtil { /** * Creates and returns a shader , which can be used to draw a shadow , which located besides an
* edge of an elevated view .
* @ param orientation
* The orientation of the shadow in relation to the elevated view as a value of the enum
* { @ link Orientation } . The orientation ma... | RectF bounds = new RectF ( ) ; switch ( orientation ) { case LEFT : bounds . left = bitmapWidth ; bounds . right = bitmapWidth - shadowWidth ; break ; case TOP : bounds . top = bitmapHeight ; bounds . bottom = bitmapHeight - shadowWidth ; break ; case RIGHT : bounds . right = shadowWidth ; break ; case BOTTOM : bounds ... |
public class SipCall { /** * The waitForIncomingCall ( ) method waits for an INVITE request addressed to this user agent to be
* received from the network . Call this method after calling the listenForIncomingCall ( ) method .
* This method blocks until one of the following occurs : 1 ) An INVITE message has been r... | initErrorInfo ( ) ; receivedRequests . clear ( ) ; receivedResponses . clear ( ) ; transaction = null ; dialog = null ; myTag = null ; callAnswered = false ; RequestEvent event = parent . waitRequest ( timeout ) ; if ( event == null ) { setReturnCode ( parent . getReturnCode ( ) ) ; setErrorMessage ( parent . getErrorM... |
public class SumPaths { /** * Computes the approximate sum of paths through the graph where the weight
* of each path is the product of edge weights along the path ;
* If consumer c is not null , it will be given the intermediate estimates as
* they are available */
public static double approxSumPaths ( WeightedI... | // we keep track of the total weight of discovered paths ending along
// each edge and the total weight
// of all paths ending at each node ( including the empty path ) ; on each
// time step , we
// at each step , we pick an edge ( s , t ) , update the sum at s , and extend
// each of those ( including
// the empty pa... |
public class NameTable { /** * Given a period - separated name , return as a camel - cased type name . For
* example , java . util . logging . Level is returned as JavaUtilLoggingLevel . */
public static String camelCaseQualifiedName ( String fqn ) { } } | StringBuilder sb = new StringBuilder ( ) ; for ( String part : fqn . split ( "\\." ) ) { sb . append ( capitalize ( part ) ) ; } return sb . toString ( ) ; |
public class ManagedDatabaseVulnerabilityAssessmentScansInner { /** * Gets a vulnerability assessment scan record of a database .
* @ param resourceGroupName The name of the resource group that contains the resource . You can obtain this value from the Azure Resource Manager API or the portal .
* @ param managedIns... | return getWithServiceResponseAsync ( resourceGroupName , managedInstanceName , databaseName , scanId ) . map ( new Func1 < ServiceResponse < VulnerabilityAssessmentScanRecordInner > , VulnerabilityAssessmentScanRecordInner > ( ) { @ Override public VulnerabilityAssessmentScanRecordInner call ( ServiceResponse < Vulnera... |
public class BinaryFormatUtils { /** * Read a field value from stream .
* @ param in The stream to consume .
* @ param fieldInfo The field info about the content .
* @ param fieldType The type to generate content for .
* @ param strict If the field should be read strictly .
* @ return The field value , or nul... | if ( fieldType != null && forType ( fieldType . getType ( ) ) != fieldInfo . type ) { throw new SerializerException ( "Wrong field type for id=%d: expected %s, got %s" , fieldInfo . id , asString ( forType ( fieldType . getType ( ) ) ) , asString ( fieldInfo . getType ( ) ) ) ; } switch ( fieldInfo . type ) { case Bina... |
public class PrBuOr { /** * < p > Retrieve page . < / p >
* @ param pRqVs request scoped vars
* @ param pRqDt Request Data
* @ param pBuyr buyer
* @ throws Exception - an exception */
public final void page ( final Map < String , Object > pRqVs , final IRequestData pRqDt , final OnlineBuyer pBuyr ) throws Excep... | TradingSettings ts = ( TradingSettings ) pRqVs . get ( "tradSet" ) ; // orders :
int page ; String pgSt = pRqDt . getParameter ( "pg" ) ; if ( pgSt != null ) { page = Integer . parseInt ( pgSt ) ; } else { page = 1 ; } String wheBr = "BUYER=" + pBuyr . getItsId ( ) ; Integer rowCount = this . srvOrm . evalRowCountWhere... |
public class RouteContext { /** * Returns a request parameter for a Long type
* @ param paramName Parameter name
* @ param defaultValue default long value
* @ return Return Long parameter values */
public Long queryLong ( String paramName , Long defaultValue ) { } } | return this . request . queryLong ( paramName , defaultValue ) ; |
public class Krb5Common { /** * This method restore the property value to the original value .
* @ param propName
* @ param oldPropValue
* @ param newPropValue */
public static void restorePropertyAsNeeded ( final String propName , final String oldPropValue , final String newPropValue ) { } } | java . security . AccessController . doPrivileged ( new java . security . PrivilegedAction < Object > ( ) { @ Override public Object run ( ) { if ( oldPropValue == null ) { System . clearProperty ( propName ) ; } else if ( ! oldPropValue . equalsIgnoreCase ( newPropValue ) ) { System . setProperty ( propName , oldPropV... |
public class CreateIssueParams { /** * Sets the multiple list type custom field .
* @ param customFiledItems the custom field identifiers and custom field item identifiers
* @ return CreateIssueParams instance */
public CreateIssueParams multipleListCustomField ( CustomFiledItems customFiledItems ) { } } | for ( Object id : customFiledItems . getCustomFieldItemIds ( ) ) { parameters . add ( new NameValuePair ( "customField_" + customFiledItems . getCustomFieldId ( ) , id . toString ( ) ) ) ; } return this ; |
public class PrimaveraReader { /** * Process project properties .
* @ param rows project properties data .
* @ param projectID project ID */
public void processProjectProperties ( List < Row > rows , Integer projectID ) { } } | if ( rows . isEmpty ( ) == false ) { Row row = rows . get ( 0 ) ; ProjectProperties properties = m_project . getProjectProperties ( ) ; properties . setCreationDate ( row . getDate ( "create_date" ) ) ; properties . setFinishDate ( row . getDate ( "plan_end_date" ) ) ; properties . setName ( row . getString ( "proj_sho... |
public class CronDescriptor { /** * Provide description for a year .
* @ param fields - fields to describe ;
* @ return description - String */
public String describeYear ( final Map < CronFieldName , CronField > fields ) { } } | final String description = DescriptionStrategyFactory . plainInstance ( resourceBundle , fields . containsKey ( CronFieldName . YEAR ) ? fields . get ( CronFieldName . YEAR ) . getExpression ( ) : null ) . describe ( ) ; return addExpressions ( description , resourceBundle . getString ( "year" ) , resourceBundle . getS... |
public class GetStageResult { /** * A map that defines the stage variables for a stage resource . Variable names can have alphanumeric and underscore
* characters , and the values must match [ A - Za - z0-9 - . _ ~ : / ? # & = , ] + .
* @ param stageVariables
* A map that defines the stage variables for a stage r... | setStageVariables ( stageVariables ) ; return this ; |
public class RegexpUtils { /** * Returns a RegexpMatcher that works in a specific environment . < br >
* When in a JVM 1.3.1 it will return a Perl5RegexpMatcher , if the JVM is
* younger ( 1.4 + ) it will return a JdkRegexpMatcher . */
public static RegexpMatcher getMatcher ( String pattern , boolean multiline ) { ... | if ( isJDK13 ( ) ) { return new Perl5RegexpMatcher ( pattern , true ) ; } else { return new JdkRegexpMatcher ( pattern , true ) ; } |
public class JITDeploy { /** * Parse an rmic compatibility options string .
* @ param options the options string
* @ return the compatibility flags
* @ see # isRMICCompatibleValues */
public static int parseRMICCompatible ( String options ) // PM46698
{ } } | final boolean isTraceOn = TraceComponent . isAnyTracingEnabled ( ) ; if ( isTraceOn && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "parseRMICCompatible: " + options ) ; int flags ; if ( options == null ) { flags = RMIC_COMPATIBLE_DEFAULT ; } else if ( options . equals ( "none" ) ) { flags = 0 ; } else if ( options . is... |
public class CanonicalXML { /** * Receive notification of the start of an element .
* < p > By default , do nothing . Application writers may override this
* method in a subclass to take specific actions at the start of
* each element ( such as allocating a new tree node or writing
* output to a file ) . < / p ... | flushChars ( ) ; write ( "<" ) ; write ( qName ) ; // output the namespaces
outputAttributes ( mNamespaces ) ; // output the attributes
outputAttributes ( atts ) ; write ( ">" ) ; mNamespaces . clear ( ) ; |
public class JSMinPostProcessor { /** * ( non - Javadoc )
* @ see net . jawr . web . resource . bundle . postprocess . impl .
* AbstractChainedResourceBundlePostProcessor # doPostProcessBundle ( java . lang .
* StringBuffer ) */
@ Override protected StringBuffer doPostProcessBundle ( BundleProcessingStatus status... | Charset charset = status . getJawrConfig ( ) . getResourceCharset ( ) ; // The original JSMin doesn ' t handle Dos ( CRLF ) line endings
// So here we replace the CRLF with LF only
String bundleContent = bundleString . toString ( ) . replaceAll ( CR_LF , LF ) ; byte [ ] bundleBytes = bundleContent . getBytes ( charset ... |
public class MonitoringServiceWrapper { /** * Sends all events to the web service . Events will be transformed with mapper before sending .
* @ param events the events */
public void putEvents ( List < Event > events ) { } } | Exception lastException ; List < EventType > eventTypes = new ArrayList < EventType > ( ) ; for ( Event event : events ) { EventType eventType = EventMapper . map ( event ) ; eventTypes . add ( eventType ) ; } int i = 0 ; lastException = null ; while ( i < numberOfRetries ) { try { monitoringService . putEvents ( event... |
public class PlaylistSubscriberStream { /** * { @ inheritDoc } */
public String scheduleOnceJob ( IScheduledJob job ) { } } | String jobName = schedulingService . addScheduledOnceJob ( 10 , job ) ; return jobName ; |
public class OpenSSLAnalyzer { /** * Retrieves the contents of a given file .
* @ param actualFile the file to read
* @ return the contents of the file
* @ throws AnalysisException thrown if there is an IO Exception */
private String getFileContents ( final File actualFile ) throws AnalysisException { } } | try { return FileUtils . readFileToString ( actualFile , Charset . defaultCharset ( ) ) . trim ( ) ; } catch ( IOException e ) { throw new AnalysisException ( "Problem occurred while reading dependency file." , e ) ; } |
public class IntegerList { /** * Replies the segment index for the specified value .
* < p > The given array must be pre - allocated with at least 2 cells .
* The first cell will the the index of the segment . The
* second cell will be the first integer value .
* @ param offset is the number of integer values t... | if ( this . values != null ) { int idxTab = 0 ; for ( int idxStart = 0 ; idxStart < this . values . length - 1 ; idxStart += 2 ) { for ( int n = this . values [ idxStart ] ; n <= this . values [ idxStart + 1 ] ; ++ n ) { if ( offset == idxTab ) { tofill [ 0 ] = idxStart ; tofill [ 1 ] = n ; return true ; } ++ idxTab ; ... |
public class ClassInfo { /** * Check for the type query bean and type query user annotations . */
public void checkTypeQueryAnnotation ( String desc ) { } } | if ( isEntityBeanAnnotation ( desc ) ) { throw new NoEnhancementRequiredException ( "Not enhancing entity bean" ) ; } if ( isTypeQueryBeanAnnotation ( desc ) ) { typeQueryBean = true ; } else if ( isAlreadyEnhancedAnnotation ( desc ) ) { alreadyEnhanced = true ; } |
public class BinaryArrayWeakHeap { /** * Join two weak heaps into one .
* @ param i
* root of the first weak heap
* @ param j
* root of the second weak heap
* @ return true if already a weak heap , false if a flip was needed */
@ SuppressWarnings ( "unchecked" ) protected boolean join ( int i , int j ) { } } | if ( ( ( Comparable < ? super K > ) array [ j ] ) . compareTo ( array [ i ] ) < 0 ) { K tmp = array [ i ] ; array [ i ] = array [ j ] ; array [ j ] = tmp ; reverse . flip ( j ) ; return false ; } return true ; |
public class Query { /** * Create a copy of this query , but that returns results that include the columns specified by this query as well as the
* supplied columns .
* @ param columns the additional columns that should be included in the the results ; may not be null
* @ return the copy of the query returning th... | List < Column > newColumns = null ; if ( this . columns != null ) { newColumns = new ArrayList < Column > ( this . columns ) ; for ( Column column : columns ) { newColumns . add ( column ) ; } } else { newColumns = Arrays . asList ( columns ) ; } return new Query ( source , constraint , orderings ( ) , newColumns , get... |
public class PNGDecoder { /** * Decodes the image into the specified buffer . The last line is placed at
* the current position . After decode the buffer position is at the end of
* the first line .
* @ param buffer the buffer
* @ param stride the stride in bytes from start of a line to start of the next line ,... | if ( stride <= 0 ) { throw new IllegalArgumentException ( "stride" ) ; } int pos = buffer . position ( ) ; int posDelta = ( height - 1 ) * stride ; buffer . position ( pos + posDelta ) ; decode ( buffer , - stride , fmt ) ; buffer . position ( buffer . position ( ) + posDelta ) ; |
public class GuiceyBootstrap { /** * May be used to access unique sub configuration object . This is helpful for bundles universality :
* suppose bundle X requires configuration object XConf and we are sure that only one declaration of XConf would
* be used in target configuration class , then we can simply request... | return configurationTree ( ) . valueByUniqueDeclaredType ( type ) ; |
public class nsip { /** * Use this API to fetch filtered set of nsip resources .
* filter string should be in JSON format . eg : " port : 80 , servicetype : HTTP " . */
public static nsip [ ] get_filtered ( nitro_service service , String filter ) throws Exception { } } | nsip obj = new nsip ( ) ; options option = new options ( ) ; option . set_filter ( filter ) ; nsip [ ] response = ( nsip [ ] ) obj . getfiltered ( service , option ) ; return response ; |
public class DateUtils { /** * Helper for getting epoch { @ link DateTime } object
* @ return { @ link DateTime } representing epoch */
public static DateTime epoch ( ) { } } | MutableDateTime epoch = new MutableDateTime ( ) ; epoch . setDate ( 0 ) ; epoch . setTime ( 0 ) ; return epoch . toDateTime ( ) ; |
public class API { /** * Gets the HTML representation of the given API { @ code response } .
* An empty HTML head with the HTML body containing the API response ( as given by { @ link ApiResponse # toHTML ( StringBuilder ) } .
* @ param response the API response , must not be { @ code null } .
* @ return the HTML... | StringBuilder sb = new StringBuilder ( ) ; sb . append ( "<head>\n" ) ; sb . append ( "</head>\n" ) ; sb . append ( "<body>\n" ) ; response . toHTML ( sb ) ; sb . append ( "</body>\n" ) ; return sb . toString ( ) ; |
public class NetworkImageView { /** * Loads the image for the view if it isn ' t already loaded .
* @ param isInLayoutPass True if this was invoked from a layout pass , false otherwise . */
synchronized void loadImageIfNecessary ( final boolean isInLayoutPass ) { } } | int width = getWidth ( ) ; int height = getHeight ( ) ; boolean wrapWidth = false , wrapHeight = false ; if ( getLayoutParams ( ) != null ) { wrapWidth = getLayoutParams ( ) . width == LayoutParams . WRAP_CONTENT ; wrapHeight = getLayoutParams ( ) . height == LayoutParams . WRAP_CONTENT ; } // if the view ' s bounds ar... |
public class CreativeTemplate { /** * Sets the variables value for this CreativeTemplate .
* @ param variables * The list of creative template variables . This attribute is
* required . */
public void setVariables ( com . google . api . ads . admanager . axis . v201805 . CreativeTemplateVariable [ ] variables ) { }... | this . variables = variables ; |
public class ManagementClientAsync { /** * Retrieves the runtime information of a subscription in a given topic
* @ param topicPath - The path of the topic relative to service bus namespace .
* @ param subscriptionName - The name of the subscription
* @ return - SubscriptionRuntimeInfo containing the runtime info... | EntityNameHelper . checkValidTopicName ( topicPath ) ; EntityNameHelper . checkValidSubscriptionName ( subscriptionName ) ; String path = EntityNameHelper . formatSubscriptionPath ( topicPath , subscriptionName ) ; CompletableFuture < String > contentFuture = getEntityAsync ( path , null , true ) ; CompletableFuture < ... |
public class ModularParser { /** * Returns the number of Equality Chars which are used to specify the level
* of the Section . */
private int getSectionLevel ( SpanManager sm , Span sectionNameSpan ) { } } | int begin = sectionNameSpan . getStart ( ) ; int end = sectionNameSpan . getEnd ( ) ; int level = 0 ; try { while ( ( sm . charAt ( begin + level ) == '=' ) && ( sm . charAt ( end - 1 - level ) == '=' ) ) { level ++ ; } } catch ( StringIndexOutOfBoundsException e ) { // there is no need to do anything !
logger . debug ... |
public class AbstractLibertySupport { /** * Resolves the Artifact from the remote repository if necessary . If no version is specified , it will
* be retrieved from the dependency list or from the DependencyManagement section of the pom .
* @ param item The item to create an artifact for ; must not be null
* @ re... | assert item != null ; Artifact artifact = null ; if ( item . getVersion ( ) != null ) { // if version is set in ArtifactItem , it will always override the one in project dependency
artifact = createArtifact ( item ) ; } else { // Return the artifact from the project dependency if it is available and the mojo
// should ... |
public class AmazonCloudWatchEventsClient { /** * Sends custom events to Amazon CloudWatch Events so that they can be matched to rules .
* @ param putEventsRequest
* @ return Result of the PutEvents operation returned by the service .
* @ throws InternalException
* This exception occurs due to unexpected causes... | request = beforeClientExecution ( request ) ; return executePutEvents ( request ) ; |
public class DateTableEditor { /** * getTableCellRendererComponent , Returns the renderer that is used for drawing the cell . This
* is required by the TableCellRenderer interface .
* For additional details , see the Javadocs for the function :
* TableCellRenderer . getTableCellRendererComponent ( ) . */
@ Overri... | // Save the supplied value to the date picker .
setCellEditorValue ( value ) ; // Draw the appropriate background colors to indicate a selected or unselected state .
if ( isSelected ) { if ( matchTableSelectionBackgroundColor ) { datePicker . getComponentDateTextField ( ) . setBackground ( table . getSelectionBackgroun... |
public class ContentExtractor { /** * / * 输入Jsoup的Document , 获取正文文本 */
public static String getContentByDoc ( Document doc ) throws Exception { } } | ContentExtractor ce = new ContentExtractor ( doc ) ; return ce . getContentElement ( ) . text ( ) ; |
public class AbstractWebPageForm { /** * Check if passed object allows for the specified action .
* @ param aWPEC
* The web page execution context . Never < code > null < / code > .
* @ param eFormAction
* The form action that is to be checked . Never < code > null < / code > and
* never { @ link EWebPageForm... | return true ; |
public class DeflateOutputHandler { /** * @ see com . ibm . wsspi . http . channel . compression . CompressionHandler # finish ( ) */
public List < WsByteBuffer > finish ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "finish" ) ; } List < WsByteBuffer > list = new LinkedList < WsByteBuffer > ( ) ; if ( isFinished ( ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "finish, previously finis... |
public class DecimalWithUoMType { /** * { @ inheritDoc } */
@ Override public Object format ( final Object _object , final String _pattern ) throws EFapsException { } } | final Object ret ; final DecimalFormat formatter = ( DecimalFormat ) NumberFormat . getInstance ( Context . getThreadContext ( ) . getLocale ( ) ) ; formatter . applyPattern ( _pattern ) ; if ( _object instanceof Object [ ] ) { final String tmp = formatter . format ( ( ( Object [ ] ) _object ) [ 0 ] ) ; ( ( Object [ ] ... |
public class PseudoClassSpecifierChecker { /** * Add the { @ code : root } element .
* @ see < a href = " http : / / www . w3 . org / TR / css3 - selectors / # root - pseudo " > < code > : root < / code > pseudo - class < / a > */
private void addRootElement ( ) { } } | if ( root instanceof Document ) { // Get the single element child of the document node .
// There could be a doctype node and comment nodes that we must skip .
Element element = DOMHelper . getFirstChildElement ( root ) ; Assert . notNull ( element , "there should be a root element!" ) ; result . add ( element ) ; } el... |
public class IndexTree { /** * Returns the node with the specified id .
* @ param nodeID the page id of the node to be returned
* @ return the node with the specified id */
public N getNode ( int nodeID ) { } } | if ( nodeID == getPageID ( rootEntry ) ) { return getRoot ( ) ; } else { return file . readPage ( nodeID ) ; } |
public class Configuration { /** * Adds the given byte array to the configuration object . If key is < code > null < / code > then nothing is added .
* @ param key
* The key under which the bytes are added .
* @ param bytes
* The bytes to be added . */
public void setBytes ( String key , byte [ ] bytes ) { } } | String encoded = new String ( Base64 . encodeBase64 ( bytes ) ) ; setStringInternal ( key , encoded ) ; |
public class JasonShanksAgent { /** * ( non - Javadoc )
* @ see jason . architecture . AgArch # act ( jason . asSemantics . ActionExec ,
* java . util . List ) */
public void act ( ActionExec action , List < ActionExec > feedback ) { } } | if ( ! isRunning ( ) ) return ; if ( this . getSimulation ( ) == null ) return ; boolean result = false ; Structure actionStructure = action . getActionTerm ( ) ; String actionID = actionStructure . getFunctor ( ) ; try { if ( this . actions . containsKey ( actionID ) ) { Constructor < ? extends JasonShanksAgentAction ... |
public class DataGenerator { /** * Read file structure file under the input directory . Create each file
* under the specified root . The file names are relative to the root . */
private void genFiles ( ) throws IOException { } } | // BufferedReader in = new BufferedReader ( new FileReader ( new File ( inDir ,
// StructureGenerator . FILE _ STRUCTURE _ FILE _ NAME ) ) ) ;
// String line ;
// while ( ( line = in . readLine ( ) ) ! = null ) {
// String [ ] tokens = line . split ( " " ) ;
// if ( tokens . length ! = 2 ) {
// throw new IOException ( ... |
public class Delay { /** * Creates a new { @ link LinearDelay } with a custom boundaries and factor .
* @ param unit the unit of the delay .
* @ param upper the upper boundary .
* @ param lower the lower boundary .
* @ param growBy the multiplication factor .
* @ return a created { @ link LinearDelay } . */
p... | return new LinearDelay ( unit , upper , lower , growBy ) ; |
public class ControlWrapper { /** * Puts the wrapper of the parameter element to the upstream of this Control .
* @ param element to put at upstream */
private void bindUpstream ( BioPAXElement element ) { } } | AbstractNode node = ( AbstractNode ) graph . getGraphObject ( element ) ; if ( node != null ) { Edge edge = new EdgeL3 ( node , this , graph ) ; node . getDownstreamNoInit ( ) . add ( edge ) ; this . getUpstreamNoInit ( ) . add ( edge ) ; } |
public class PickerSpinner { /** * { @ inheritDoc } */
@ Override public void setSelection ( int position ) { } } | PickerSpinnerAdapter adapter = ( PickerSpinnerAdapter ) getAdapter ( ) ; if ( position == adapter . getCount ( ) - 1 && adapter . hasFooter ( ) ) onFooterClick ( ) ; // the footer has been clicked , so don ' t update the selection
else { // remove any previous temporary selection :
( ( PickerSpinnerAdapter ) getAdapter... |
public class SourceParams { /** * Sets the { @ link SourceType } for this source . If you are creating a custom type ,
* use { @ link # setTypeRaw ( String ) } .
* @ param type the { @ link SourceType }
* @ return { @ code this } , for chaining purposes */
@ NonNull public SourceParams setType ( @ Source . Source... | mType = type ; mTypeRaw = type ; return this ; |
public class HttpUtil { /** * Performs an HTTP DELETE on the given URI .
* Basic auth is used if both username and pw are not null .
* @ param uri The URI to connect to .
* @ param username username
* @ param password password
* @ return The HTTP response as Response object .
* @ throws URISyntaxException
... | return send ( new HttpDelete ( uri ) , new UsernamePasswordCredentials ( username , password ) , null ) ; |
public class CommerceOrderNoteLocalServiceUtil { /** * Updates the commerce order note in the database or adds it if it does not yet exist . Also notifies the appropriate model listeners .
* @ param commerceOrderNote the commerce order note
* @ return the commerce order note that was updated */
public static com . ... | return getService ( ) . updateCommerceOrderNote ( commerceOrderNote ) ; |
public class PrettyTime { /** * Set the the { @ link Locale } for this { @ link PrettyTime } object . This may be an expensive operation , since this
* operation calls { @ link TimeUnit # setLocale ( Locale ) } for each { @ link TimeUnit } in { @ link # getUnits ( ) } . */
public PrettyTime setLocale ( Locale locale ... | if ( locale == null ) locale = Locale . getDefault ( ) ; this . locale = locale ; for ( TimeUnit unit : units . keySet ( ) ) { if ( unit instanceof LocaleAware ) ( ( LocaleAware < ? > ) unit ) . setLocale ( locale ) ; } for ( TimeFormat format : units . values ( ) ) { if ( format instanceof LocaleAware ) ( ( LocaleAwar... |
public class HostAndPort { /** * Returns the validation state of the config
* @ throws ConfigException if the hostname is empty or the port is not between 0 and 65536 */
@ Override public void basicValidate ( final String section ) throws ConfigException { } } | if ( StringUtils . isEmpty ( host ) || port == null || port <= 0 || port > MAX_PORT ) { throw new ConfigException ( section , "Invalid host and port" ) ; } |
public class KrakenAccountServiceRaw { /** * Retrieves all ledger entries between the start date and the end date . This method iterates over
* ledger pages until it has retrieved all entries between the start date and the end date . The
* ledger records the activity ( trades , deposit , withdrawals ) of the accoun... | String startTime = null ; String endTime = null ; long longOffset = 0 ; if ( start != null ) { startTime = String . valueOf ( DateUtils . toUnixTime ( start ) ) ; } if ( end != null ) { endTime = String . valueOf ( DateUtils . toUnixTime ( end ) ) ; } if ( offset != null ) { longOffset = offset ; } Map < String , Krake... |
public class ID3v2Tag { /** * Return a binary representation of this object to be written to a file .
* This is in the format of the id3v2 specifications . This includes the
* header , extended header ( if it exists ) , the frames , padding ( if it
* exists ) , and a footer ( if it exists ) .
* @ return a binar... | byte [ ] b = new byte [ getSize ( ) + padding ] ; int bytesCopied = 0 ; int length = 0 ; length = head . getHeaderSize ( ) ; System . arraycopy ( head . getBytes ( ) , 0 , b , bytesCopied , length ) ; bytesCopied += length ; if ( head . getExtendedHeader ( ) ) { length = ext_head . getSize ( ) ; System . arraycopy ( ex... |
public class StringToTranscriptEffect { /** * Parse the specified string as a fraction and return the denominator , if any .
* @ param s string to parse
* @ return the denominator from the specified string parsed as a fraction ,
* or null if the string is empty or if the fraction has no denominator */
static Inte... | if ( "" . equals ( s ) ) { return null ; } String [ ] tokens = s . split ( "/" ) ; return ( tokens . length < 2 ) ? null : emptyToNullInteger ( tokens [ 1 ] ) ; |
public class AbstractTileBasedLayer { @ Override public LayerRenderer getRenderer ( ) { } } | if ( renderer == null ) { renderer = new DomTileLevelLayerRenderer ( viewPort , this , eventBus ) { @ Override public TileLevelRenderer createNewScaleRenderer ( int tileLevel , View view , HtmlContainer container ) { return new DomTileLevelRenderer ( AbstractTileBasedLayer . this , tileLevel , viewPort , container , ge... |
public class TokenizerME { /** * Returns the probabilities associated with the most recent
* calls to tokenize ( ) or tokenizePos ( ) .
* @ return probability for each token returned for the most recent
* call to tokenize . If not applicable an empty array is
* returned . */
public double [ ] getTokenProbabilit... | double [ ] tokProbArray = new double [ tokProbs . size ( ) ] ; for ( int i = 0 ; i < tokProbArray . length ; i ++ ) { tokProbArray [ i ] = ( ( Double ) tokProbs . get ( i ) ) . doubleValue ( ) ; } return tokProbArray ; |
public class DefaultCoreEnvironment { /** * This method wraps an Observable of Boolean ( for shutdown hook ) into an Observable of ShutdownStatus .
* It will log each status with a short message indicating which target has been shut down , and the result of
* the call .
* Additionally it will ignore signals that ... | return wrapShutdown ( source , target ) . map ( new Func1 < ShutdownStatus , ShutdownStatus > ( ) { @ Override public ShutdownStatus call ( ShutdownStatus original ) { if ( original . cause == null && ! original . success ) { LOGGER . info ( target + " shutdown is best effort, ignoring failure" ) ; return new ShutdownS... |
public class PlayEngine { /** * Send resume status notification
* @ param item
* Playlist item */
private void sendResumeStatus ( IPlayItem item ) { } } | Status resume = new Status ( StatusCodes . NS_UNPAUSE_NOTIFY ) ; resume . setClientid ( streamId ) ; resume . setDetails ( item . getName ( ) ) ; doPushMessage ( resume ) ; |
public class StaticWord2Vec { /** * Returns the similarity of 2 words
* @ param label1 the first word
* @ param label2 the second word
* @ return a normalized similarity ( cosine similarity ) */
@ Override public double similarity ( String label1 , String label2 ) { } } | if ( label1 == null || label2 == null ) { log . debug ( "LABELS: " + label1 + ": " + ( label1 == null ? "null" : "exists" ) + ";" + label2 + " vec2:" + ( label2 == null ? "null" : "exists" ) ) ; return Double . NaN ; } INDArray vec1 = getWordVectorMatrix ( label1 ) . dup ( ) ; INDArray vec2 = getWordVectorMatrix ( labe... |
public class CommonsPortlet2MultipartResolver { /** * < p > cleanupMultipart . < / p >
* @ param request a { @ link org . jasig . springframework . web . portlet . upload . MultipartResourceRequest } object . */
public void cleanupMultipart ( MultipartResourceRequest request ) { } } | if ( request != null ) { try { cleanupFileItems ( request . getMultiFileMap ( ) ) ; } catch ( Throwable ex ) { logger . warn ( "Failed to perform multipart cleanup for portlet request" , ex ) ; } } |
public class DefaultHistoryManager { /** * ( non - Javadoc )
* @ see org . activiti . engine . impl . history . HistoryManagerInterface # recordProcessDefinitionChange ( java . lang . String , java . lang . String ) */
@ Override public void recordProcessDefinitionChange ( String processInstanceId , String processDef... | if ( isHistoryLevelAtLeast ( HistoryLevel . ACTIVITY ) ) { HistoricProcessInstanceEntity historicProcessInstance = getHistoricProcessInstanceEntityManager ( ) . findById ( processInstanceId ) ; if ( historicProcessInstance != null ) { historicProcessInstance . setProcessDefinitionId ( processDefinitionId ) ; } } |
public class Links { /** * / * clears the link table , returns a copy */
synchronized Link [ ] clearLinks ( ) { } } | Link [ ] ret = null ; if ( count != 0 ) { ret = new Link [ count ] ; for ( int i = 0 ; i < count ; i ++ ) { ret [ i ] = links [ i ] ; links [ i ] = null ; } count = 0 ; } return ret ; |
public class ClaimBean { /** * { @ inheritDoc } */
@ Override public Set < InjectionPoint > getInjectionPoints ( ) { } } | if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "getInjectionPoints" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "getInjectionPoints" , Collections . emptySet ( ) ) ; } return Collections . emptySet ( ) ; |
public class RegisterOnPremisesInstanceRequestMarshaller { /** * Marshall the given parameter object . */
public void marshall ( RegisterOnPremisesInstanceRequest registerOnPremisesInstanceRequest , ProtocolMarshaller protocolMarshaller ) { } } | if ( registerOnPremisesInstanceRequest == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( registerOnPremisesInstanceRequest . getInstanceName ( ) , INSTANCENAME_BINDING ) ; protocolMarshaller . marshall ( registerOnPremisesInstanceRequest . ... |
public class BaseBigtableInstanceAdminClient { /** * Deletes an app profile from an instance .
* < p > Sample code :
* < pre > < code >
* try ( BaseBigtableInstanceAdminClient baseBigtableInstanceAdminClient = BaseBigtableInstanceAdminClient . create ( ) ) {
* AppProfileName name = AppProfileName . of ( " [ PRO... | DeleteAppProfileRequest request = DeleteAppProfileRequest . newBuilder ( ) . setName ( name ) . build ( ) ; deleteAppProfile ( request ) ; |
public class GeometryExpressions { /** * Create a new GeometryExpression
* @ param expr Expression of type Geometry
* @ return new GeometryExpression */
public static < T extends Geometry > GeometryExpression < T > asGeometry ( Expression < T > expr ) { } } | Expression < T > underlyingMixin = ExpressionUtils . extract ( expr ) ; if ( underlyingMixin instanceof PathImpl ) { return new GeometryPath < T > ( ( PathImpl < T > ) underlyingMixin ) ; } else if ( underlyingMixin instanceof OperationImpl ) { return new GeometryOperation < T > ( ( OperationImpl < T > ) underlyingMixi... |
public class ApiOvhVps { /** * Veeam restore points for the VPS
* REST : GET / vps / { serviceName } / veeam / restorePoints
* @ param creationTime [ required ] Filter the value of creationTime property ( like )
* @ param serviceName [ required ] The internal name of your VPS offer */
public ArrayList < Long > se... | String qPath = "/vps/{serviceName}/veeam/restorePoints" ; StringBuilder sb = path ( qPath , serviceName ) ; query ( sb , "creationTime" , creationTime ) ; String resp = exec ( qPath , "GET" , sb . toString ( ) , null ) ; return convertTo ( resp , t4 ) ; |
public class MainFrame { /** * < / editor - fold > / / GEN - END : initComponents */
private void btInitActionPerformed ( java . awt . event . ActionEvent evt ) // GEN - FIRST : event _ btInitActionPerformed
{ } } | // GEN - HEADEREND : event _ btInitActionPerformed
InitDialog dlg = new InitDialog ( this , true , corpusAdministration ) ; dlg . setVisible ( true ) ; if ( ! wasStarted && isInitialized ( ) && ! serviceWorker . isDone ( ) ) { btImport . setEnabled ( true ) ; btList . setEnabled ( true ) ; serviceWorker . execute ( ) ;... |
public class TimeSeriesUtils { /** * Reverse a ( per time step ) time series mask , with shape [ minibatch , timeSeriesLength ]
* @ param mask Mask to reverse along time dimension
* @ return Mask after reversing */
public static INDArray reverseTimeSeriesMask ( INDArray mask , LayerWorkspaceMgr workspaceMgr , Array... | if ( mask == null ) { return null ; } if ( mask . rank ( ) == 3 ) { // Should normally not be used - but handle the per - output masking case
return reverseTimeSeries ( mask , workspaceMgr , arrayType ) ; } else if ( mask . rank ( ) != 2 ) { throw new IllegalArgumentException ( "Invalid mask rank: must be rank 2 or 3. ... |
public class RegistryImpl { /** * @ Override
* public void publish ( String address , RampBroker broker )
* _ brokerMap . put ( address , broker ) ; */
@ Override public void shutdown ( ShutdownModeAmp mode ) { } } | TreeSet < String > serviceNames = new TreeSet < > ( _serviceMap . keySet ( ) ) ; // HashSet < ServiceRefAmp > serviceSet = new HashSet < > ( _ serviceMap . values ( ) ) ;
if ( mode == ShutdownModeAmp . GRACEFUL ) { save ( serviceNames ) ; } for ( String serviceName : serviceNames ) { try { ServiceRefAmp serviceRef = _s... |
public class TtmlDestinationSettingsMarshaller { /** * Marshall the given parameter object . */
public void marshall ( TtmlDestinationSettings ttmlDestinationSettings , ProtocolMarshaller protocolMarshaller ) { } } | if ( ttmlDestinationSettings == null ) { throw new SdkClientException ( "Invalid argument passed to marshall(...)" ) ; } try { protocolMarshaller . marshall ( ttmlDestinationSettings . getStylePassthrough ( ) , STYLEPASSTHROUGH_BINDING ) ; } catch ( Exception e ) { throw new SdkClientException ( "Unable to marshall req... |
public class ICUService { /** * Convenience override for get ( Key , String [ ] ) . This uses
* createKey to create a key from the provided descriptor . */
public Object get ( String descriptor , String [ ] actualReturn ) { } } | if ( descriptor == null ) { throw new NullPointerException ( "descriptor must not be null" ) ; } return getKey ( createKey ( descriptor ) , actualReturn ) ; |
public class ProjectScanner { /** * Gets the list of resource files from { @ literal src / main / resources } or { @ literal src / test / resources } .
* This method scans for all files that are not classes from { @ literal target / classes } or { @ literal
* target / test - classes } . The distinction is made acco... | Set < String > resources = new LinkedHashSet < > ( ) ; File classes = getClassesDirectory ( ) ; if ( test ) { classes = new File ( basedir , "target/test-classes" ) ; } if ( classes . isDirectory ( ) ) { DirectoryScanner scanner = new DirectoryScanner ( ) ; scanner . setBasedir ( classes ) ; scanner . setExcludes ( new... |
public class UnixSshPath { /** * { @ inheritDoc } */
@ Override public boolean startsWith ( Path other ) { } } | if ( ! getFileSystem ( ) . equals ( other . getFileSystem ( ) ) ) { return false ; } if ( ( other . isAbsolute ( ) && ! isAbsolute ( ) ) || ( isAbsolute ( ) && ! other . isAbsolute ( ) ) ) { return false ; } int count = getNameCount ( ) ; int otherCount = other . getNameCount ( ) ; if ( otherCount > count ) { return fa... |
public class IOUtils { /** * Writes integer in reverse order
* @ param out
* Data buffer to fill
* @ param value
* Integer */
public final static void writeReverseInt ( IoBuffer out , int value ) { } } | out . putInt ( ( int ) ( ( value & 0xFF ) << 24 | ( ( value >> 8 ) & 0x00FF ) << 16 | ( ( value >>> 16 ) & 0x000000FF ) << 8 | ( ( value >>> 24 ) & 0x000000FF ) ) ) ; |
public class Profiler { /** * Ends the specified section .
* Time elapsed from the call to { @ link Profiler # startSection ( String ) } is stored
* @ param section The name of the section */
public synchronized void endSection ( String section ) { } } | long now = System . nanoTime ( ) ; section = section . toLowerCase ( ) ; if ( ! this . startTime . containsKey ( section ) ) throw new IllegalArgumentException ( "Section \"" + section + "\" hasn't been started!" ) ; long elapsed = now - this . startTime . remove ( section ) ; this . elapsedTime . put ( section , elaps... |
public class GreenPepperXmlRpcServer { /** * { @ inheritDoc } */
public Vector < Object > getSpecificationHierarchy ( Vector < Object > repositoryParams , Vector < Object > sutParams ) { } } | try { Repository repository = loadRepository ( repositoryParams ) ; SystemUnderTest systemUnderTest = XmlRpcDataMarshaller . toSystemUnderTest ( sutParams ) ; DocumentNode hierarchy = service . getSpecificationHierarchy ( repository , systemUnderTest ) ; return hierarchy . marshallize ( ) ; } catch ( Exception e ) { re... |
public class ComputationGraph { /** * Conduct forward pass using an array of inputs
* @ param input An array of ComputationGraph inputs
* @ param layerTillIndex the index of the layer to feed forward to
* @ param train If true : do forward pass at training time ; false : do forward pass at test time
* @ return ... | setInputs ( input ) ; return feedForward ( train , layerTillIndex ) ; |
public class KeySignature { /** * Returns < TT > true < / TT > if the key without exotic accidentals has only
* flats .
* e . g . :
* < ul >
* < li > Dm returns true
* < li > Dm ^ c returns also true
* < li > D returns false
* < / ul >
* @ see # hasOnlyFlats ( )
* @ see # hasSharpsAndFlats ( ) */
publ... | return ( ( keyIndex == 1 && m_keyAccidental . isFlat ( ) ) || keyIndex == 3 || keyIndex == 5 || ( keyIndex == 6 && m_keyAccidental . isFlat ( ) ) || keyIndex == 8 || keyIndex == 10 || ( keyIndex == 11 && m_keyAccidental . isFlat ( ) ) ) ; |
public class PersistenceController { /** * Insert or update a list of conversations .
* @ param conversationsToAdd List of conversations to insert or apply an update .
* @ return Observable emitting result . */
public Observable < Boolean > upsertConversations ( List < ChatConversation > conversationsToAdd ) { } } | return asObservable ( new Executor < Boolean > ( ) { @ Override void execute ( ChatStore store , Emitter < Boolean > emitter ) { store . beginTransaction ( ) ; boolean isSuccess = true ; for ( ChatConversation conversation : conversationsToAdd ) { ChatConversation . Builder toSave = ChatConversation . builder ( ) . pop... |
public class ClassFileWriter { /** * Add the single - byte opcode to the current method .
* @ param theOpCode the opcode of the bytecode */
public void add ( int theOpCode ) { } } | if ( opcodeCount ( theOpCode ) != 0 ) throw new IllegalArgumentException ( "Unexpected operands" ) ; int newStack = itsStackTop + stackChange ( theOpCode ) ; if ( newStack < 0 || Short . MAX_VALUE < newStack ) badStack ( newStack ) ; if ( DEBUGCODE ) System . out . println ( "Add " + bytecodeStr ( theOpCode ) ) ; addTo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.