idx int64 0 41.2k | question stringlengths 74 4.21k | target stringlengths 5 888 |
|---|---|---|
5,600 | public void writeScoreTo ( OutputStream os ) throws IOException { if ( m_jTune != null ) { setTune ( m_jTune . getTune ( ) ) ; } BufferedImage bufferedImage = new BufferedImage ( ( int ) m_dimension . getWidth ( ) , ( int ) m_dimension . getHeight ( ) , BufferedImage . TYPE_INT_ARGB ) ; Graphics2D bufferedImageGfx = bu... | Writes the currently set tune score to a PNG output stream . |
5,601 | public void writeScoreTo ( File file ) throws IOException { FileOutputStream fos = new FileOutputStream ( file ) ; try { writeScoreTo ( fos ) ; } finally { fos . close ( ) ; } } | Writes the currently set tune score to a PNG file . |
5,602 | public void setTune ( Tune tune ) { m_jTune = new JTune ( tune , new Point ( 0 , 0 ) , getTemplate ( ) ) ; m_jTune . setColor ( getForeground ( ) ) ; m_selectedItems = null ; m_dimension . setSize ( m_jTune . getWidth ( ) , m_jTune . getHeight ( ) ) ; setPreferredSize ( m_dimension ) ; setSize ( m_dimension ) ; m_isBuf... | Sets the tune to be renderered . |
5,603 | public JScoreElement getScoreElementAt ( Point location ) { if ( m_jTune != null ) return m_jTune . getScoreElementAt ( location ) ; else return null ; } | Returns the graphical score element fount at the given location . |
5,604 | public JScoreElement getRenditionElementFor ( MusicElement elmnt ) { if ( m_jTune != null ) return m_jTune . getRenditionObjectFor ( elmnt ) ; else return null ; } | Returns the graphical element that corresponds to a tune element . |
5,605 | public Collection < PluginComponent > list ( List < String > queryParams ) { return HTTP . GET ( "/v2/components.json" , null , queryParams , PLUGIN_COMPONENTS ) . get ( ) ; } | Returns the set of plugin components with the given query parameters . |
5,606 | public Optional < PluginComponent > show ( long componentId ) { return HTTP . GET ( String . format ( "/v2/components/%d.json" , componentId ) , PLUGIN_COMPONENT ) ; } | Returns the plugin component for the given id . |
5,607 | public Optional < QueryData > list ( long accountId , String query ) { QueryParameterList queryParams = new QueryParameterList ( ) ; queryParams . add ( "nrql" , encode ( query ) ) ; return HTTP . GET ( String . format ( "/v1/accounts/%d/query" , accountId ) , null , queryParams , QUERY_DATA ) ; } | Returns the set of data for a query . |
5,608 | public static String getKey ( String category , String name ) { if ( category != null && name != null ) return category + ":" + name ; return null ; } | Sets the key of the label from the name and category . |
5,609 | public Collection < AlertIncident > list ( List < String > queryParams ) { return HTTP . GET ( "/v2/alerts_incidents.json" , null , queryParams , ALERT_INCIDENTS ) . get ( ) ; } | Returns the set of alert incidents with the given query parameters . |
5,610 | public Optional < ExternalServiceAlertCondition > create ( long policyId , ExternalServiceAlertCondition condition ) { return HTTP . POST ( String . format ( "/v2/alerts_external_service_conditions/policies/%d.json" , policyId ) , condition , EXTERNAL_SERVICE_ALERT_CONDITION ) ; } | Creates the given external service alert condition . |
5,611 | public Optional < ExternalServiceAlertCondition > update ( ExternalServiceAlertCondition condition ) { return HTTP . PUT ( String . format ( "/v2/alerts_external_service_conditions/%d.json" , condition . getId ( ) ) , condition , EXTERNAL_SERVICE_ALERT_CONDITION ) ; } | Updates the given external service alert condition . |
5,612 | public boolean hasDecoration ( byte decorationType ) { if ( hasDecorations ( ) ) { for ( Decoration m_decoration : m_decorations ) { if ( m_decoration . isType ( decorationType ) ) return true ; } } return false ; } | Test if the element has the specified type of decoration |
5,613 | public void setChannelIds ( List < Long > channelIds ) { setChannels ( AlertPolicyChannel . builder ( ) . channelIds ( channelIds ) . build ( ) ) ; } | Sets the channels for the policy . |
5,614 | public static Music correctPartsKeys ( Music music ) { for ( Object o : music . getVoices ( ) ) { Voice voice = ( Voice ) o ; if ( voice . hasObject ( KeySignature . class ) && voice . hasObject ( PartLabel . class ) ) { Hashtable partsKey = new Hashtable ( ) ; KeySignature tuneKey = null ; int size = voice . size ( ) ... | Be sure each part has it s proper key signature . |
5,615 | public Optional < PluginsAlertCondition > create ( long policyId , PluginsAlertCondition condition ) { return HTTP . POST ( String . format ( "/v2/alerts_plugins_conditions/policies/%d.json" , policyId ) , condition , PLUGINS_ALERT_CONDITION ) ; } | Creates the given Plugins alert condition . |
5,616 | public Optional < PluginsAlertCondition > update ( PluginsAlertCondition condition ) { return HTTP . PUT ( String . format ( "/v2/alerts_plugins_conditions/%d.json" , condition . getId ( ) ) , condition , PLUGINS_ALERT_CONDITION ) ; } | Updates the given Plugins alert condition . |
5,617 | public Collection < Deployment > list ( long applicationId , List < String > queryParams ) { return HTTP . GET ( String . format ( "/v2/applications/%d/deployments.json" , applicationId ) , null , queryParams , DEPLOYMENTS ) . get ( ) ; } | Returns the set of deployments . |
5,618 | public Optional < Deployment > create ( long applicationId , Deployment deployment ) { return HTTP . POST ( String . format ( "/v2/applications/%d/deployments.json" , applicationId ) , deployment , DEPLOYMENT ) ; } | Creates the given deployment . |
5,619 | public DeploymentService delete ( long applicationId , long deploymentId ) { HTTP . DELETE ( String . format ( "/v2/applications/%d/deployments/%d.json" , applicationId , deploymentId ) ) ; return this ; } | Deletes the deployment with the given id . |
5,620 | public void addSource ( String source ) { if ( this . sources == null ) this . sources = new ArrayList < String > ( ) ; this . sources . add ( source ) ; } | Adds the given source to the list of sources for the widget . |
5,621 | public void addFilter ( String name , String value ) { if ( this . filters == null ) this . filters = new HashMap < String , String > ( ) ; this . filters . put ( name , value ) ; } | Adds the given filter to the list of filters for the widget . |
5,622 | public static Note getLongestNote ( Note [ ] notes ) { float length = 0 ; float currentNoteLength = 0 ; Note maxNote = null ; for ( int i = 0 ; i < notes . length && maxNote == null ; i ++ ) { currentNoteLength = notes [ i ] . getDuration ( ) ; if ( currentNoteLength > length ) maxNote = notes [ i ] ; } return maxNote ... | Returns the note with the biggest duration from the given array of notes . |
5,623 | public static Note [ ] getNotesShorterThan ( Note [ ] notes , int aStrictDuration ) { Vector shorterNotes = new Vector ( ) ; Note [ ] notesArray = null ; for ( Note note : notes ) { if ( note . getStrictDuration ( ) < aStrictDuration ) shorterNotes . addElement ( note ) ; } if ( shorterNotes . size ( ) > 0 ) { notesArr... | Returns all notes strictly shorter than the given strict duration . |
5,624 | public static Note getLowestNote ( Note [ ] notes ) { Note lowestNote = notes [ 0 ] ; for ( int i = 1 ; i < notes . length ; i ++ ) if ( notes [ i ] . isLowerThan ( lowestNote ) ) lowestNote = notes [ i ] ; return lowestNote ; } | Returns the lowest note from the given array of notes . |
5,625 | public static Note getHighestNote ( Note [ ] notes ) { Note highestNote = notes [ 0 ] ; for ( int i = 1 ; i < notes . length ; i ++ ) if ( notes [ i ] . isHigherThan ( highestNote ) ) highestNote = notes [ i ] ; return highestNote ; } | Returns the highest note from the given array of notes . |
5,626 | public Note getHighestNote ( ) { Note highestNote = ( Note ) m_notes . elementAt ( 0 ) ; for ( int i = 1 ; i < m_notes . size ( ) ; i ++ ) if ( ( ( Note ) ( m_notes . elementAt ( i ) ) ) . isHigherThan ( highestNote ) ) highestNote = ( Note ) m_notes . elementAt ( i ) ; return highestNote ; } | Returns the highest note among the notes composing this multi note . |
5,627 | public Note [ ] getNotesBeginningTie ( ) { Vector notesBT = new Vector ( m_notes . size ( ) ) ; for ( int i = 0 ; i < m_notes . size ( ) ; i ++ ) if ( ( ( Note ) m_notes . elementAt ( i ) ) . isBeginningTie ( ) ) notesBT . addElement ( m_notes . elementAt ( i ) ) ; if ( notesBT . size ( ) > 0 ) { Note [ ] notesBTasArra... | Returns the notes from this multinote that begin a tie . |
5,628 | public short [ ] getStrictDurations ( ) { Vector durations = new Vector ( ) ; short currentDuration = 0 ; for ( int i = 0 ; i < m_notes . size ( ) ; i ++ ) { currentDuration = ( ( Note ) ( m_notes . elementAt ( i ) ) ) . getStrictDuration ( ) ; if ( durations . indexOf ( new Short ( currentDuration ) ) == - 1 ) duratio... | Returns the strict durations composing this multi notes . |
5,629 | public MultiNote [ ] normalize ( ) { Hashtable splitter = new Hashtable ( ) ; for ( int i = 0 ; i < m_notes . size ( ) ; i ++ ) { Note note = ( Note ) m_notes . elementAt ( i ) ; Short key = note . getStrictDuration ( ) ; if ( splitter . containsKey ( key ) ) ( ( Vector ) splitter . get ( key ) ) . addElement ( note ) ... | Normalizes this multi note by decomposing it into multinotes with same strict duration . |
5,630 | public Note [ ] toArray ( ) { if ( m_notes . size ( ) > 0 ) { Note [ ] notes = new Note [ m_notes . size ( ) ] ; return ( Note [ ] ) m_notes . toArray ( notes ) ; } else return null ; } | Returns notes composing this multinote as an array of notes sorted from the lowest note to the highest one . |
5,631 | public Optional < NrqlAlertCondition > create ( long policyId , NrqlAlertCondition condition ) { return HTTP . POST ( String . format ( "/v2/alerts_nrql_conditions/policies/%d.json" , policyId ) , condition , NRQL_ALERT_CONDITION ) ; } | Creates the given NRQL alert condition . |
5,632 | public Optional < NrqlAlertCondition > update ( NrqlAlertCondition condition ) { return HTTP . PUT ( String . format ( "/v2/alerts_nrql_conditions/%d.json" , condition . getId ( ) ) , condition , NRQL_ALERT_CONDITION ) ; } | Updates the given NRQL alert condition . |
5,633 | public Part [ ] toPartsArray ( ) { Vector parts = getPartsAsRepeatedOnceVector ( ) ; Part [ ] partsArray = new Part [ parts . size ( ) ] ; for ( int i = 0 ; i < parts . size ( ) ; i ++ ) partsArray [ i ] = ( Part ) parts . elementAt ( i ) ; return partsArray ; } | Returns this multipart as an array of singles parts . The playing of the multi part would sound the same as the playing of the array of parts . |
5,634 | public Collection < User > list ( List < String > queryParams ) { return HTTP . GET ( "/v2/users.json" , null , queryParams , USERS ) . get ( ) ; } | Returns the set of users with the given query parameters . |
5,635 | public Optional < User > show ( long userId ) { return HTTP . GET ( String . format ( "/v2/users/%d.json" , userId ) , USER ) ; } | Returns the user for the given user id . |
5,636 | public Optional < User > resetPassword ( long userId ) { return HTTP . POST ( String . format ( "/v2/users/%d/reset_password.json" , userId ) , null , USER ) ; } | Resets the password for the given user . |
5,637 | public Note getStringNote ( int stringNumber ) { if ( stringNumber > 0 && stringNumber <= m_strings . length ) { return m_strings [ stringNumber - 1 ] ; } else return null ; } | Returns the Note for the request string |
5,638 | public void computeFingerings ( Collection musicElements ) { if ( computedFingerings != null ) computedFingerings . clear ( ) ; Collection notes = new ArrayList ( musicElements . size ( ) ) ; Iterator it = musicElements . iterator ( ) ; while ( it . hasNext ( ) ) { MusicElement element = ( MusicElement ) it . next ( ) ... | Here is the brain of tablature fingerings computation . |
5,639 | public Collection < PartnerUser > list ( long partnerId , long accountId ) { return HTTP . GET ( String . format ( "/v2/partners/%d/accounts/%d/users" , partnerId , accountId ) , PARTNER_USERS ) . get ( ) ; } | Returns the set of users . |
5,640 | public Optional < PartnerUser > create ( long partnerId , long accountId , PartnerUser user ) { return Optional . of ( HTTP . POST ( String . format ( "/v2/partners/%d/accounts/%d/users" , partnerId , accountId ) , user , PARTNER_USERS ) . get ( ) . iterator ( ) . next ( ) ) ; } | Creates the given user . |
5,641 | public Optional < PartnerUser > update ( long partnerId , long accountId , PartnerUser user ) { return Optional . of ( HTTP . PUT ( String . format ( "/v2/partners/%d/accounts/%d/users" , partnerId , accountId ) , user , PARTNER_USERS ) . get ( ) . iterator ( ) . next ( ) ) ; } | Updates the given user . |
5,642 | public PartnerUserService delete ( long partnerId , long accountId , long userId ) { HTTP . DELETE ( String . format ( "/v2/partners/%d/accounts/%d/users/%d" , partnerId , accountId , userId ) ) ; return this ; } | Deletes the user with the given id . |
5,643 | private void applyStemmingPolicy ( JScoreElementAbstract element ) { if ( element != null && element instanceof JStemmableElement ) { JStemmableElement stemmable = ( JStemmableElement ) element ; if ( stemmable . isFollowingStemmingPolicy ( ) ) { byte noteStemPolicy = ( byte ) getTemplate ( ) . getAttributeNumber ( Sco... | apply stemming policy to an element |
5,644 | private void justify ( ) { if ( m_staffLines . size ( ) > 1 ) { double maxWidth = ( ( JStaffLine ) m_staffLines . elementAt ( 0 ) ) . getWidth ( ) ; for ( int i = 1 ; i < m_staffLines . size ( ) ; i ++ ) { JStaffLine currentStaffLine = ( JStaffLine ) m_staffLines . elementAt ( i ) ; maxWidth = Math . max ( maxWidth , c... | Triggers the re computation of all staff lines elements in order to get the alignment justified . |
5,645 | private JNoteElementAbstract getHighestNoteGlyphBetween ( NoteAbstract start , NoteAbstract end , boolean excludeStartAndEnd ) { Collection jnotes = getNoteGlyphesBetween ( start , end ) ; JNoteElementAbstract ret = null ; boolean first = true ; for ( Iterator it = jnotes . iterator ( ) ; it . hasNext ( ) ; ) { JNoteEl... | Return the JNote that have the highest bounding box |
5,646 | private Collection getNoteGlyphesBetween ( NoteAbstract start , NoteAbstract end ) { Collection jnotes = new Vector ( ) ; try { Collection notes = m_music . getVoice ( start . getReference ( ) . getVoice ( ) ) . getNotesBetween ( start , end ) ; for ( Object note : notes ) { NoteAbstract n = ( NoteAbstract ) note ; jno... | Returns a Collection of JNote representing the note glyphes between start and end NoteAbstract . |
5,647 | public void setTuneBook ( AbcTuneBook book ) { m_model . setTuneBook ( book ) ; try { int [ ] numbers = { 0 } ; for ( int i = 0 ; i < numbers . length ; i ++ ) { } } catch ( Exception e ) { e . printStackTrace ( ) ; } } | Sets the tunebook to be displayed in this table . |
5,648 | public float multipliedBy ( Fraction fraction ) { int newNumerator = numerator * fraction . getNumerator ( ) ; int newDenominator = denominator * fraction . getDenominator ( ) ; return ( newNumerator / newDenominator ) ; } | Returns the float result of the multiplication of this fraction by the specified fraction . This fraction remains unchanged . |
5,649 | public Collection < Label > list ( List < String > queryParams ) { return HTTP . GET ( "/v2/labels.json" , null , queryParams , LABELS ) . get ( ) ; } | Returns the set of labels . |
5,650 | public LabelService delete ( String key ) { HTTP . DELETE ( String . format ( "/v2/labels/%s.json" , encode ( key ) ) ) ; return this ; } | Deletes the label with the given key . |
5,651 | @ SchedulerSupport ( SchedulerSupport . NONE ) public final < U , R > Maybe < R > zipWith ( MaybeSource < ? extends U > other , BiFunction < ? super T , ? super U , ? extends R > zipper ) { ObjectHelper . requireNonNull ( other , "other is null" ) ; return zip ( this , other , zipper ) ; } | Waits until this and the other MaybeSource signal a success value then applies the given BiFunction to those values and emits the BiFunction s resulting value to downstream . |
5,652 | public Optional < AlertCondition > create ( long policyId , AlertCondition condition ) { return HTTP . POST ( String . format ( "/v2/alerts_conditions/policies/%d.json" , policyId ) , condition , ALERT_CONDITION ) ; } | Creates the given alert condition . |
5,653 | public Optional < AlertCondition > update ( AlertCondition condition ) { return HTTP . PUT ( String . format ( "/v2/alerts_conditions/%d.json" , condition . getId ( ) ) , condition , ALERT_CONDITION ) ; } | Updates the given alert condition . |
5,654 | public int getSemitones ( ) { int semitones = 0 ; switch ( getLabel ( ) % OCTAVE ) { case UNISON : semitones = 0 ; break ; case SECOND : semitones = 2 ; break ; case THIRD : semitones = 4 ; break ; case FOURTH : semitones = 5 ; break ; case FIFTH : semitones = 7 ; break ; case SIXTH : semitones = 9 ; break ; case SEVEN... | Return the number of semitones between 2 notes spaced by this Interval |
5,655 | public Collection < AlertPolicy > list ( List < String > queryParams ) { return HTTP . GET ( "/v2/alerts_policies.json" , null , queryParams , ALERT_POLICIES ) . get ( ) ; } | Returns the set of alert policies . |
5,656 | public Collection < AlertPolicy > list ( String name ) { return list ( filters ( ) . name ( name ) . build ( ) ) ; } | Returns the set of alert policies with the given name . |
5,657 | public Optional < AlertPolicy > update ( AlertPolicy policy ) { return HTTP . PUT ( String . format ( "/v2/alerts_policies/%d.json" , policy . getId ( ) ) , policy , ALERT_POLICY ) ; } | Updates the given alert policy . |
5,658 | public < T > void addMetric ( String name , MetricTimeslice < T > timeslice ) { metrics . put ( name , timeslice ) ; } | Adds a metric to the set of metrics . |
5,659 | public static byte [ ] convertToBarLine ( String barLine ) { byte [ ] barlineTypes = new byte [ ] { SIMPLE } ; if ( barLine . equals ( "::" ) || barLine . equals ( ":|:" ) || barLine . equals ( ":||:" ) ) { barlineTypes = new byte [ ] { CLOSE_AND_OPEN_REPEAT } ; } else if ( barLine . equals ( "|" ) ) { barlineTypes = n... | Converts the specified string to a bar line type . |
5,660 | public void play ( Tune tune ) throws IllegalStateException { if ( m_isStarted ) { try { m_tune = tune ; Sequence sequence = m_converter . toMidiSequence ( m_tune ) ; seq . setSequence ( sequence ) ; seq . setTempoInBPM ( m_tempo ) ; seq . start ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } else throw n... | Plays the given tune . |
5,661 | public Tune removeTune ( int referenceNumber ) { Tune ret = super . removeTune ( referenceNumber ) ; if ( ret != null ) { notifyListenersForTuneChange ( new TuneChangeEvent ( this , TuneChangeEvent . TUNE_REMOVED , ret ) ) ; } return ret ; } | Removes the tune having the requested reference number from the book |
5,662 | public void saveTo ( File file ) throws IOException { FileWriter writer = new FileWriter ( file ) ; try { writer . write ( getAbcString ( ) ) ; } finally { writer . close ( ) ; } } | Saves the ABC source String to file . |
5,663 | public Collection < Server > list ( List < String > queryParams ) { return HTTP . GET ( "/v2/servers.json" , null , queryParams , SERVERS ) . get ( ) ; } | Returns the set of servers with the given query parameters . |
5,664 | public Collection < Server > list ( String name ) { List < Server > ret = new ArrayList < Server > ( ) ; Collection < Server > servers = list ( ) ; for ( Server server : servers ) { if ( name == null || server . getName ( ) . equals ( name ) ) ret . add ( server ) ; } return ret ; } | Returns the set of servers for the given name . |
5,665 | public Optional < Server > show ( long serverId ) { return HTTP . GET ( String . format ( "/v2/servers/%d.json" , serverId ) , SERVER ) ; } | Returns the server for the given server id . |
5,666 | public Optional < Server > update ( Server server ) { return HTTP . PUT ( String . format ( "/v2/servers/%d.json" , server . getId ( ) ) , server , SERVER ) ; } | Updates the given server . |
5,667 | public double getWidth ( ) { String [ ] lines = getTextLines ( ) ; double max = 0 ; for ( String line : lines ) { max = Math . max ( max , ( double ) getMetrics ( ) . getTextFontWidth ( m_textField , line ) ) ; } return max ; } | Returns the width of this score element . |
5,668 | public Collection < AlertChannel > list ( List < String > queryParams ) { return HTTP . GET ( "/v2/alerts_channels.json" , null , queryParams , ALERT_CHANNELS ) . get ( ) ; } | Returns the set of alert channels . |
5,669 | public Collection < AlertChannel > list ( String name ) { List < AlertChannel > ret = new ArrayList < AlertChannel > ( ) ; Collection < AlertChannel > channels = list ( ) ; for ( AlertChannel channel : channels ) { if ( channel . getName ( ) . equals ( name ) ) ret . add ( channel ) ; } return ret ; } | Returns the set of alert channels with the given name . |
5,670 | public Collection < AlertChannel > list ( long policyId ) { Map < Long , AlertChannel > map = new HashMap < Long , AlertChannel > ( ) ; Collection < AlertChannel > channels = list ( ) ; for ( AlertChannel channel : channels ) { List < Long > channelPolicyIds = channel . getLinks ( ) . getPolicyIds ( ) ; for ( long chan... | Returns the set of alert channels for the given policy id . |
5,671 | public Optional < AlertChannel > create ( AlertChannel channel ) { return Optional . of ( HTTP . POST ( "/v2/alerts_channels.json" , channel , ALERT_CHANNELS ) . get ( ) . iterator ( ) . next ( ) ) ; } | Creates the given alert channel . |
5,672 | public String getText ( boolean unicode ) { if ( ! isChord ( ) ) return m_chordName ; else { StringBuilder ret = new StringBuilder ( ) ; if ( isOptional ( ) ) ret . append ( "(" ) ; ret . append ( note2string ( getNote ( ) , unicode ) ) ; ret . append ( getQuality ( ) ) ; if ( hasBass ( ) ) { ret . append ( "/" ) ; ret... | Returns the text of the chord . |
5,673 | public void writeAsMusicXML ( Tune tune , File file ) throws IOException { BufferedWriter writer = new BufferedWriter ( new FileWriter ( file ) ) ; Document doc = createMusicXmlDOM ( tune ) ; writeAsMusicXML ( doc , writer ) ; writer . flush ( ) ; writer . close ( ) ; } | Writes the specified tune to the specified file as MusicXML . |
5,674 | public void writeAsMusicXML ( Document doc , BufferedWriter writer ) throws IOException { try { TransformerFactory transfac = TransformerFactory . newInstance ( ) ; Transformer trans = transfac . newTransformer ( ) ; trans . setOutputProperty ( OutputKeys . INDENT , "yes" ) ; trans . setOutputProperty ( OutputKeys . DO... | Writes the specified Node to the given writer . |
5,675 | public void addEntityId ( long entityId ) { if ( this . entityIds == null ) this . entityIds = new ArrayList < Long > ( ) ; this . entityIds . add ( entityId ) ; } | Adds the given entity id to the list of entities for the widget . |
5,676 | public void addMetric ( Metric metric ) { if ( this . metrics == null ) this . metrics = new ArrayList < Metric > ( ) ; this . metrics . add ( metric ) ; } | Adds the given metric to the list of metrics for the widget . |
5,677 | public Collection < ApplicationHost > list ( long applicationId , List < String > queryParams ) { return HTTP . GET ( String . format ( "/v2/applications/%d/hosts.json" , applicationId ) , null , queryParams , APPLICATION_HOSTS ) . get ( ) ; } | Returns the set of application hosts with the given query parameters . |
5,678 | public Optional < ApplicationHost > show ( long applicationId , long hostId ) { return HTTP . GET ( String . format ( "/v2/applications/%d/hosts/%d.json" , applicationId , hostId ) , APPLICATION_HOST ) ; } | Returns the application host for the given id . |
5,679 | public int getHighestReferenceNumber ( ) { int max = - 1 ; for ( Object o : m_tunes . keySet ( ) ) { Integer i = ( Integer ) o ; if ( i > max ) max = i ; } return max ; } | Returns the highest reference number from all the reference numbers this tunebook contains . |
5,680 | public int [ ] getReferenceNumbers ( ) { Iterator it = m_tunes . keySet ( ) . iterator ( ) ; int [ ] refNb = new int [ m_tunes . size ( ) ] ; int index = 0 ; while ( it . hasNext ( ) ) { refNb [ index ] = ( Integer ) it . next ( ) ; index ++ ; } return refNb ; } | Returns the reference numbers of tunes contained in this tunebook . |
5,681 | public Tune removeTune ( int referenceNumber ) { Tune ret = getTune ( referenceNumber ) ; if ( ret != null ) { ret . getTuneInfos ( ) . setBookInfos ( null ) ; ret . getInstructions ( ) . removeAll ( getInstructions ( ) ) ; m_tunes . remove ( new Integer ( referenceNumber ) ) ; } return ret ; } | Remove the tune having the requested reference number from the book |
5,682 | public Collection < KeyTransaction > list ( List < String > queryParams ) { return HTTP . GET ( "/v2/key_transactions.json" , null , queryParams , KEY_TRANSACTIONS ) . get ( ) ; } | Returns the set of key transactions with the given query parameters . |
5,683 | public Collection < KeyTransaction > list ( String name ) { List < KeyTransaction > ret = new ArrayList < KeyTransaction > ( ) ; Collection < KeyTransaction > transactions = list ( ) ; for ( KeyTransaction transaction : transactions ) { if ( name == null || transaction . getName ( ) . equals ( name ) ) ret . add ( tran... | Returns the set of key transactions for the given name . |
5,684 | public Optional < KeyTransaction > show ( long transactionId ) { return HTTP . GET ( String . format ( "/v2/key_transactions/%d.json" , transactionId ) , KEY_TRANSACTION ) ; } | Returns the key transaction for the given transaction id . |
5,685 | public Optional < AlertPolicyChannel > update ( long policyId , long channelId ) { QueryParameterList queryParams = new QueryParameterList ( ) ; queryParams . add ( "policy_id" , policyId ) ; queryParams . add ( "channel_ids" , channelId ) ; return HTTP . PUT ( "/v2/alerts_policy_channels.json" , null , null , queryPar... | Adds the given alert channel to the alert policy with the given id . |
5,686 | public AlertPolicyChannelService delete ( long policyId , long channelId ) { QueryParameterList queryParams = new QueryParameterList ( ) ; queryParams . add ( "policy_id" , policyId ) ; queryParams . add ( "channel_id" , channelId ) ; HTTP . DELETE ( "/v2/alerts_policy_channels.json" , null , queryParams ) ; return thi... | Deletes the given alert channel from the alert policy with the given id . |
5,687 | public void setMiddleNote ( Note n ) { byte strictHeight = n . getStrictHeight ( ) ; boolean set = false ; if ( strictHeight == getMiddleNote ( ) . getStrictHeight ( ) ) { set = true ; } else { Clef [ ] toCompare = null ; if ( isG ( ) ) { toCompare = new Clef [ ] { TREBLE , FRENCH_VIOLIN } ; } else if ( isF ( ) ) { toC... | Sets the middle note ( for an internal octave transposition if Note n is compatible with predefined middle note . |
5,688 | public int getLineNumber ( ) { if ( ( m_lineNumber == - 1 ) && ( getName ( ) != null ) ) { if ( isG ( ) ) m_lineNumber = 2 ; else if ( isF ( ) ) m_lineNumber = 4 ; else if ( isC ( ) ) m_lineNumber = 3 ; else if ( isPerc ( ) ) m_lineNumber = 3 ; } return m_lineNumber ; } | Returns the number of the line staff where clef is printed . 2 for treble 3 for alto 4 for tenor 4 for bass ... |
5,689 | public void addState ( TrafficLightState state ) { if ( this . states == null ) this . states = new ArrayList < TrafficLightState > ( ) ; this . states . add ( state ) ; } | Adds a state to the traffic light . |
5,690 | public Collection < AlertCondition > list ( long entityId , String entityType ) { QueryParameterList queryParams = new QueryParameterList ( ) ; queryParams . add ( "entity_type" , entityType ) ; return HTTP . GET ( String . format ( "/v2/alerts_entity_conditions/%d.json" , entityId ) , null , queryParams , ALERT_CONDIT... | Returns the alert conditions for the given entity id . |
5,691 | public Collection < AlertCondition > list ( Entity entity ) { return list ( entity . getId ( ) , entity . getType ( ) ) ; } | Returns the alert conditions for the given entity . |
5,692 | protected Rectangle2D getBounds ( char [ ] glyph , int notationContext ) { String key = String . valueOf ( notationContext ) + "-" + String . valueOf ( glyph ) + "-" + getMusicalFont ( ) . getName ( ) ; try { if ( bounds . get ( key ) == null ) { FontRenderContext frc = g2 . getFontRenderContext ( ) ; bounds . put ( ke... | Get the bounds of a glyph in the given notation context |
5,693 | public Font getNotationFontForContext ( int notationContext ) { try { Font baseNotationFont = ( ( MusicalFont ) getTemplate ( ) . getAttributeObject ( ScoreAttribute . NOTATION_FONT ) ) . getFont ( ) ; switch ( notationContext ) { case NOTATION_CONTEXT_GRACENOTE : return baseNotationFont . deriveFont ( getTemplate ( ) ... | Return the notation for from the given notation context |
5,694 | protected int getTextFontHeight ( byte textType ) { FontMetrics fontMetrics = g2 . getFontMetrics ( getTextFont ( textType ) ) ; return fontMetrics . getHeight ( ) ; } | Returns height of one line rendered in the textType font . |
5,695 | protected int getTextFontWidth ( byte textType , String text ) { if ( text == null ) return 0 ; FontMetrics fontMetrics = g2 . getFontMetrics ( getTextFont ( textType ) ) ; return fontMetrics . stringWidth ( text ) ; } | Returns width of string rendered in the textType font . |
5,696 | public void setSelectedItem ( PositionableInCharStream elmnt ) { CharStreamPosition pos = null ; if ( elmnt != null ) pos = elmnt . getCharStreamPosition ( ) ; if ( pos != null ) { int begin = pos . getStartIndex ( ) ; int end = pos . getEndIndex ( ) ; try { setCaretPosition ( end ) ; moveCaretPosition ( begin ) ; getC... | Highlights the specified element in the abc tune notation . |
5,697 | public double render ( Graphics2D g ) { Color previousColor = g . getColor ( ) ; setColor ( g , ScoreElements . TABLATURE_LINES ) ; number . setText ( "MM" ) ; double mWidth = number . getWidth ( ) ; double numberOfStrings = m_tablature . getNumberOfString ( ) ; for ( int i = 1 ; i <= numberOfStrings ; i ++ ) { double ... | Renders the strings lines avoiding the numbers previously rendered |
5,698 | public Collection < AlertViolation > list ( List < String > queryParams ) { return HTTP . GET ( "/v2/alerts_violations.json" , null , queryParams , ALERT_VIOLATIONS ) . get ( ) ; } | Returns the set of alert violations with the given query parameters . |
5,699 | public Collection < AlertViolation > list ( long startDate , long endDate , boolean onlyOpen ) { return list ( filters ( ) . startDate ( startDate ) . endDate ( endDate ) . onlyOpen ( onlyOpen ) . build ( ) ) ; } | Returns the set of alert violations . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.