id
stringlengths
24
24
repo
stringlengths
5
58
path
stringlengths
4
194
func_name
stringlengths
1
153
url
stringlengths
86
292
split
stringclasses
3 values
language
stringclasses
4 values
docstring
stringlengths
1
46.9k
code
stringlengths
52
485k
text
stringlengths
100
486k
token_count
int32
24
195k
doc_chars
int32
1
46.9k
code_chars
int32
52
485k
license_basis
stringclasses
2 values
source
stringclasses
1 value
added
stringdate
2026-12-05 00:00:00
2026-12-05 00:00:00
record_sha256
stringlengths
64
64
license
stringclasses
1 value
license_class
stringclasses
1 value
license_source
stringlengths
42
99
320e21f9fa56d1d96806da3f
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/providers/EventStackImpl.java
EventStackImpl.pushEvent
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/providers/EventStackImpl.java#L99-L103
train
java
Pushes the event onto the event stack. This action must be performed immediately before the event is being dispatched. Additionally, after the event has been dispatched, it has to be {@link #popEvent(Event) popped} off the stack again. @param <L> Type of the listener. @param event The event which will be dispatched. @...
public <L extends Listener> void pushEvent(Event<?, L> event) { synchronized (this.stack) { this.stack.push(event); } }
Pushes the event onto the event stack. This action must be performed immediately before the event is being dispatched. Additionally, after the event has been dispatched, it has to be {@link #popEvent(Event) popped} off the stack again. @param <L> Type of the listener. @param event The event which will be dispatched. @...
110
340
151
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
dd27a0aab25ce1c540d80386393c1c599b6c68c7a78a4d298af3677dbf3e9f05
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
eec3b29eff668a94661ec98c
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/providers/EventStackImpl.java
EventStackImpl.popEvent
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/providers/EventStackImpl.java#L114-L123
train
java
Pops the top event off the current event stack. This action has to be performed immediately after the event has been dispatched to all listeners. @param <L> Type of the listener. @param expected The Event which is expected at the top of the stack. @see #pushEvent(Event)
public <L extends Listener> void popEvent(Event<?, L> expected) { synchronized (this.stack) { final Event<?, ?> actual = this.stack.pop(); if (actual != expected) { throw new IllegalStateException(String.format( "Unbalanced pop: expected '%s' but e...
Pops the top event off the current event stack. This action has to be performed immediately after the event has been dispatched to all listeners. @param <L> Type of the listener. @param expected The Event which is expected at the top of the stack. @see #pushEvent(Event) public <L extends Listener> void popEvent(Event...
139
271
430
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a085abd8ee89b913f34c11645df5252a8985c77af70182c8ac70f66aef65c54f
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
15a65fa1ff5dc80329ab0d05
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/stores/AbstractSynchronizedListenerSource.java
AbstractSynchronizedListenerSource.modify
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/stores/AbstractSynchronizedListenerSource.java#L48-L55
train
java
Executes the given transaction within the context of a write lock. @param t The transaction to execute.
protected void modify(Transaction t) { try { this.lock.writeLock().lock(); t.perform(); } finally { this.lock.writeLock().unlock(); } }
Executes the given transaction within the context of a write lock. @param t The transaction to execute. protected void modify(Transaction t) { try { this.lock.writeLock().lock(); t.perform(); } finally { this.lock.writeLock().unlock(); } }
58
104
199
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a5976d8943be1fa4a1ea6f5269a616f0a5927f2a15a4038a896455890e892fd4
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
a323956323662fb79c98b38f
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/stores/AbstractSynchronizedListenerSource.java
AbstractSynchronizedListenerSource.read
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/stores/AbstractSynchronizedListenerSource.java#L64-L71
train
java
Executes the given supplier within the context of a read lock. @param <E> The result type. @param sup The supplier. @return The result of {@link Supplier#get()}.
protected <E> E read(Supplier<E> sup) { try { this.lock.readLock().lock(); return sup.get(); } finally { this.lock.readLock().unlock(); } }
Executes the given supplier within the context of a read lock. @param <E> The result type. @param sup The supplier. @return The result of {@link Supplier#get()}. protected <E> E read(Supplier<E> sup) { try { this.lock.readLock().lock(); return sup.get(); } finally { ...
81
162
203
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
4bfc67898d64af1cce30e0f0ac14ab6a5878d2b4a7696b8645ebd0257db22570
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
3e249e1bbb9da4a0c5f9f72c
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java
ExceptionCallbacks.ignore
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java#L28-L35
train
java
The default {@link ExceptionCallback} which simply logs any failure but takes no further action. @return The callback.
public static ExceptionCallback ignore() { return new ExceptionCallback() { @Override public void exception(FailedEventInvocation invocation) { FailedEventInvocation.log(LOG, invocation); } }; }
The default {@link ExceptionCallback} which simply logs any failure but takes no further action. @return The callback. public static ExceptionCallback ignore() { return new ExceptionCallback() { @Override public void exception(FailedEventInvocation invocation) { FailedE...
67
119
266
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3d1097125705f8ef4154d037c34c8fec65affc87fa06dd9833768fbed473253b
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
2f6110412a262150e67e477f
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java
ExceptionCallbacks.stopOnError
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java#L44-L52
train
java
The callback will set the Event's {@link Event#isHandled() handled} flag to <code>true</code> to gracefully stop the delegation process when an exception occurs. Like {@link #ignore()}, the exception will be logged. @return The callback.
public static ExceptionCallback stopOnError() { return new ExceptionCallback() { @Override public void exception(FailedEventInvocation invocation) { FailedEventInvocation.log(LOG, invocation); invocation.getEvent().setHandled(true); } }...
The callback will set the Event's {@link Event#isHandled() handled} flag to <code>true</code> to gracefully stop the delegation process when an exception occurs. Like {@link #ignore()}, the exception will be logged. @return The callback. public static ExceptionCallback stopOnError() { return new ExceptionCall...
107
238
327
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
df300f072e64838178613ba2c4e339823a697305f236c301bc4151ff59fad346
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
1fc7c4cf2ba6bdd09f6b780f
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java
ExceptionCallbacks.failOnError
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/ExceptionCallbacks.java#L61-L68
train
java
The callback will convert the occurred exception into an {@link AbortionException} and then throw it. This stops the delegation process with delegating the exception to the dispatcher of the event. @return The callback.
public static ExceptionCallback failOnError() { return new ExceptionCallback() { @Override public void exception(FailedEventInvocation invocation) { throw new AbortionException(invocation.getException()); } }; }
The callback will convert the occurred exception into an {@link AbortionException} and then throw it. This stops the delegation process with delegating the exception to the dispatcher of the event. @return The callback. public static ExceptionCallback failOnError() { return new ExceptionCallback() { ...
90
220
283
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9238730ff7d0d7944ca51c119f5a783d3a320104b985fa93a8bf2bcd5f79229c
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
ff5c631cda16f34cdb471fb7
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/Event.java
Event.getValue
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/Event.java#L120-L126
train
java
Returns a value that has been stored using {@link #setValue(String, Object)}. As this method is generic, the value will automatically be casted to the target type of the expression in which this method is called. So this method has to be used with caution in respect to type safety. @param <E> Type of the resulting val...
@SuppressWarnings("unchecked") public <E> Optional<E> getValue(String key) { if (this.properties == null) { return Optional.empty(); } return Optional.ofNullable((E) getProperties().get(key)); }
Returns a value that has been stored using {@link #setValue(String, Object)}. As this method is generic, the value will automatically be casted to the target type of the expression in which this method is called. So this method has to be used with caution in respect to type safety. @param <E> Type of the resulting val...
163
481
238
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
8c6b34c81a3641f755e87dc2ae22fefec89609996caf2159845eaa46e9993aa5
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
f812356ce50e4ae6a80ed2c2
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/Event.java
Event.getValueAs
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/Event.java#L139-L144
train
java
Returns a value that has been stored using {@link #setValue(String, Object)}. The value will be casted to the given type. @param <E> Type of the resulting value. @param key The key of the value to retrieve. @param type The type that the value will be casted to. @return The value or an empty optional if the value does ...
public <E> Optional<E> getValueAs(String key, Class<E> type) { if (this.properties == null) { return Optional.empty(); } return Optional.ofNullable(type.cast(getProperties().get(key))); }
Returns a value that has been stored using {@link #setValue(String, Object)}. The value will be casted to the given type. @param <E> Type of the resulting value. @param key The key of the value to retrieve. @param type The type that the value will be casted to. @return The value or an empty optional if the value does ...
131
353
227
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
131c7d788b46bc56cfd2cb33b8647873fd0557943a8c06a7cda96cb019aaf0d2
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
ea285bda41f5683dfad294a6
skuzzle/jeve
jeve/src/it/java/de/skuzzle/jeve/SynchronousEventProviderIT.java
SynchronousEventProviderIT.getParameters
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/it/java/de/skuzzle/jeve/SynchronousEventProviderIT.java#L29-L41
train
java
Parameterizes the test instances. @return Collection of parameters for the constructor of {@link EventProviderTestBase}.
@Parameters public static final Collection<Object[]> getParameters() { return Arrays.asList( new Object[] { (Function<ListenerStore, ? extends EventProvider>) SequentialEventProvider::new, (Supplier<ListenerStore>) DefaultListenerStore::create ...
Parameterizes the test instances. @return Collection of parameters for the constructor of {@link EventProviderTestBase}. @Parameters public static final Collection<Object[]> getParameters() { return Arrays.asList( new Object[] { (Function<ListenerStore, ? extends Ev...
122
121
605
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ea671a0819c3b28cc03d52c0992926d103827f39f041472f8ff3160b18f22214
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
6ab894d0055095482cf9d3ad
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/stores/AbstractListenerStore.java
AbstractListenerStore.copyList
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/stores/AbstractListenerStore.java#L66-L74
train
java
Creates a collection from the given stream, casting each object to the provided listener class. The returned collection must not necessarily be mutable. @param <T> Type of the listeners in the given list. @param listenerClass The class of the objects in the provided list. @param listeners The stream to obtain the list...
protected <T extends Listener> Collection<T> copyList(Class<T> listenerClass, Stream<Object> listeners, int sizeHint) { if (sizeHint == 0) { return Collections.emptyList(); } return listeners .map(listenerClass::cast) .collect(Collectors.to...
Creates a collection from the given stream, casting each object to the provided listener class. The returned collection must not necessarily be mutable. @param <T> Type of the listeners in the given list. @param listenerClass The class of the objects in the provided list. @param listeners The stream to obtain the list...
160
445
371
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
668782d67481d5c1451dbcec0ea63d715002b353c0bde54a188080d5dbbb49a8
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
f90321a14c7609948f178fcb
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/stores/DefaultListenerStoreImpl.java
DefaultListenerStoreImpl.removeInternal
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/stores/DefaultListenerStoreImpl.java#L142-L150
train
java
Internal method for removing a single listener and notifying it about the removal. Prior to calling this method, the passed iterators {@link Iterator#hasNext() hasNext} method must hold <code>true</code>. @param <T> Type of the listener to remove @param listenerClass The class of the listener to remove. @param it Iter...
@Deprecated protected <T extends Listener> void removeInternal(Class<T> listenerClass, Iterator<Object> it) { final Object next = it.next(); final T listener = listenerClass.cast(next); it.remove(); final RegistrationEvent e = new RegistrationEvent(this, listenerClass); ...
Internal method for removing a single listener and notifying it about the removal. Prior to calling this method, the passed iterators {@link Iterator#hasNext() hasNext} method must hold <code>true</code>. @param <T> Type of the listener to remove @param listenerClass The class of the listener to remove. @param it Iter...
179
472
358
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
126fe82b86435c0d1865e2c56108e1251babfebd0d8fa35482d1cb47e1104818
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
297a095d52945338db7f8f3c
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/FailureCollector.java
FailureCollector.getFailedInvocations
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/FailureCollector.java#L77-L84
train
java
Gets the list of failed invocations that has been collected by this collector. @return The failed invocations.
public List<FailedEventInvocation> getFailedInvocations() { synchronized (this.mutex) { if (this.failedEvents == null) { return Collections.emptyList(); } return Collections.unmodifiableList(this.failedEvents); } }
Gets the list of failed invocations that has been collected by this collector. @return The failed invocations. public List<FailedEventInvocation> getFailedInvocations() { synchronized (this.mutex) { if (this.failedEvents == null) { return Collections.emptyList(); } ...
72
111
286
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ce454950279d960307a255c572aa4e88a092f128447e68d19259e25a9f2fae70
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
4b4884b07676a9dfe829423a
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java
SequentialEvent.setEventStack
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java#L70-L75
train
java
Sets the EventStack which is used while this event is dispatched. This method will be called by the {@link SequentialEventProvider} right before dispatching this event. The stack is only set once, subsequent calls will have no effect. @param eventStack The current event stack.
public void setEventStack(EventStack eventStack) { if (this.eventStack == null) { this.eventStack = eventStack; this.cause = eventStack.peek(); } }
Sets the EventStack which is used while this event is dispatched. This method will be called by the {@link SequentialEventProvider} right before dispatching this event. The stack is only set once, subsequent calls will have no effect. @param eventStack The current event stack. public void setEventStack(EventStack eve...
100
278
191
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
815d4ffa71b0e766c50c93e40709c07e4bb1dc7815da4e7c02e5b113a321f3a1
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
49b29164e54bd843af837b90
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java
SequentialEvent.addSuppressedEvent
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java#L109-L116
train
java
Adds a {@linkplain SuppressedEvent} to the set of suppressed events of this Event. If a capable EventProvider determines that a certain event has been prevented because its listener class has been registered on this event using {@link #preventCascade(Class)}, then the prevented event is registered here using this metho...
public void addSuppressedEvent(SuppressedEvent e) { if (e == null) { throw new IllegalArgumentException("e is null"); } else if (this.suppressedEvents == null) { this.suppressedEvents = new HashSet<>(); } this.suppressedEvents.add(e); }
Adds a {@linkplain SuppressedEvent} to the set of suppressed events of this Event. If a capable EventProvider determines that a certain event has been prevented because its listener class has been registered on this event using {@link #preventCascade(Class)}, then the prevented event is registered here using this metho...
148
418
296
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3ff84082a1ecb5ddfcfda3591f2a0de937e6f9ac57cfa16ce7309b028fefc939
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
b99d9c0a033429d4695a89a0
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java
SequentialEvent.getSuppressedEvents
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java#L124-L129
train
java
Gets a read-only set of the suppressed events that have been registered at this event using {@link #addSuppressedEvent(SuppressedEvent)}. @return The suppressed events.
public Set<SuppressedEvent> getSuppressedEvents() { if (this.suppressedEvents == null) { return Collections.emptySet(); } return Collections.unmodifiableSet(this.suppressedEvents); }
Gets a read-only set of the suppressed events that have been registered at this event using {@link #addSuppressedEvent(SuppressedEvent)}. @return The suppressed events. public Set<SuppressedEvent> getSuppressedEvents() { if (this.suppressedEvents == null) { return Collections.emptySet(); }...
81
169
222
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e1a8ba4ffd635d84e6b787f815f594c7470d8e84d1689e449d11b6fe04e7d274
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
87ab05f090bea24c39730306
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java
SequentialEvent.preventCascade
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java#L145-L161
train
java
Prevents to dispatch events to the given listener class while this event is being dispatched. This is only supported when dispatching this event with an EventProvider which supports the {@link EventStack}. <p> Note: this method has to be called before this event is being dispatched. If called during dispatch, it will ...
public <E extends Listener> void preventCascade(Class<E> listenerClass) { if (listenerClass == null) { throw new IllegalArgumentException("listenerClass is null"); } else if (this.eventStack != null) { // this event is currently being dispatched, so adding a prevented ...
Prevents to dispatch events to the given listener class while this event is being dispatched. This is only supported when dispatching this event with an EventProvider which supports the {@link EventStack}. <p> Note: this method has to be called before this event is being dispatched. If called during dispatch, it will ...
254
470
854
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
27f5bf3a86a0bc1b1f878acb227cf15e71107e5e7aac346692cbd2532001ee9d
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
1af510731afac6276fb0b05f
skuzzle/jeve
jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java
SequentialEvent.getPrevented
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/main/java/de/skuzzle/jeve/SequentialEvent.java#L182-L187
train
java
Gets the listener classes to which dispatching should be prevented while this event is being dispatched. @return The listener classes marked to prevent. @see #preventCascade(Class)
public Set<Class<?>> getPrevented() { if (this.prevent == null) { return Collections.emptySet(); } return Collections.unmodifiableSet(this.prevent); }
Gets the listener classes to which dispatching should be prevented while this event is being dispatched. @return The listener classes marked to prevent. @see #preventCascade(Class) public Set<Class<?>> getPrevented() { if (this.prevent == null) { return Collections.emptySet(); } re...
71
181
190
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
aaf1dffe7a033221e48f6edd96388d02bbaa3e4302a4b0b5c58bb297cff0b0d2
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
dd55c46307c64e8fdb979ca8
skuzzle/jeve
jeve/src/it/java/de/skuzzle/jeve/ThreadedEventProviderIT.java
ThreadedEventProviderIT.getParameters
https://github.com/skuzzle/jeve/blob/42cc18947c9c8596c34410336e4e375e9fcd7c47/jeve/src/it/java/de/skuzzle/jeve/ThreadedEventProviderIT.java#L43-L70
train
java
Parameterizes the test instances. @return Collection of parameters for the constructor of {@link EventProviderTestBase}.
@Parameters public static final Collection<Object[]> getParameters() { return Arrays.asList( new Object[] { (Function<ListenerStore, ? extends EventProvider>) ParallelEventProvider::new, (Supplier<ListenerStore>) () -> DefaultListenerStore.crea...
Parameterizes the test instances. @return Collection of parameters for the constructor of {@link EventProviderTestBase}. @Parameters public static final Collection<Object[]> getParameters() { return Arrays.asList( new Object[] { (Function<ListenerStore, ? extends Ev...
327
121
1,818
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b58f2d66d3c9d315db6841d0091ac31d42662d481f33e3da76f3b102daab6395
MIT
permissive
https://github.com/skuzzle/jeve/blob/master/LICENSE.md
16992f9fd691277c712f0ddd
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/simulation/AbstractSphereObstacle.java
AbstractSphereObstacle.intersectionVolume
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/simulation/AbstractSphereObstacle.java#L87-L118
train
java
For 2D: Implements formula 14 of http://mathworld.wolfram.com/Circle-CircleIntersection.html For 3D: Implements formula 16 of http://mathworld.wolfram.com/Sphere-SphereIntersection.html
public double intersectionVolume(AbstractSphereObstacle o) { if(dimension != o.getDimension()){ throw new IllegalArgumentException("Obstacles have different dimensions"); } double result = 0; double distance = 0; for(int i = 0; i < dimension; i++){ distance += Math.pow(position[i]-o.getPosition()[i],...
For 2D: Implements formula 14 of http://mathworld.wolfram.com/Circle-CircleIntersection.html For 3D: Implements formula 16 of http://mathworld.wolfram.com/Sphere-SphereIntersection.html public double intersectionVolume(AbstractSphereObstacle o) { if(dimension != o.getDimension()){ throw new IllegalArgumentExce...
357
185
902
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ef5fef1d135c54f62ced21baa4e4e3173eddb7b6acbfc809e6e052fed789f2a4
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
e75b61453029afd75db94ea3
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/drift/StaticDriftCalculator.java
StaticDriftCalculator.calculateDrift
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/drift/StaticDriftCalculator.java#L40-L64
train
java
Calculates the static drift. Static means, that the drift does not change direction or intensity over time. @param tracks Tracks which seems to exhibit a local drift @return The static drift over all trajectories
public double[] calculateDrift(ArrayList<T> tracks){ double[] result = new double[3]; double sumX =0; double sumY = 0; double sumZ = 0; int N=0; for(int i = 0; i < tracks.size(); i++){ T t = tracks.get(i); TrajectoryValidIndexTimelagIterator it = new TrajectoryValidIndexTimelagIterator(t,1); /...
Calculates the static drift. Static means, that the drift does not change direction or intensity over time. @param tracks Tracks which seems to exhibit a local drift @return The static drift over all trajectories public double[] calculateDrift(ArrayList<T> tracks){ double[] result = new double[3]; double sumX ...
269
213
624
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bc420d752a1c6e4ff8f7ab3cf4f86981a697af6b5a165b5869b9032471ecc272
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
1de6b476066033af26296fa5
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/simulation/ConfinedDiffusionSimulator.java
ConfinedDiffusionSimulator.nextConfinedPosition
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/simulation/ConfinedDiffusionSimulator.java#L73-L95
train
java
Simulates a single step (for dt) of a confined diffusion inside of a circle. Therefore each step is split up in N substeps. A substep which collidates with an object is set to the previous position. @param Nsub number of substeps @return
private Point3d nextConfinedPosition(Point3d lastPosition){ double timelagSub = timelag / numberOfSubsteps; Point3d center = new Point3d(0, 0, 0); Point3d lastValidPosition = lastPosition; int validSteps = 0; while(validSteps<numberOfSubsteps){ double u = r.nextDouble(); double steplength = Math.sqrt...
Simulates a single step (for dt) of a confined diffusion inside of a circle. Therefore each step is split up in N substeps. A substep which collidates with an object is set to the previous position. @param Nsub number of substeps @return private Point3d nextConfinedPosition(Point3d lastPosition){ double timelagSu...
247
237
680
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
42f6c5df0276ff204848e027e4403c54a2c39dbecb555ca57becfa2f0fe09aa2
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
5e2760cd7063ac23cfde5ff0
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/simulation/SimulationUtil.java
SimulationUtil.addPositionNoise
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/simulation/SimulationUtil.java#L45-L70
train
java
Adds position noise to the trajectories @param t @param sd @return trajectory with position noise
public static Trajectory addPositionNoise(Trajectory t, double sd){ CentralRandomNumberGenerator r = CentralRandomNumberGenerator.getInstance(); Trajectory newt = new Trajectory(t.getDimension()); for(int i = 0; i < t.size(); i++){ newt.add(t.get(i)); for(int j = 1; j <= t.getDimension(); j++){ switc...
Adds position noise to the trajectories @param t @param sd @return trajectory with position noise public static Trajectory addPositionNoise(Trajectory t, double sd){ CentralRandomNumberGenerator r = CentralRandomNumberGenerator.getInstance(); Trajectory newt = new Trajectory(t.getDimension()); for(int i = 0; ...
222
97
643
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
84df779efc6ad2a276ca5f4f8681299f8949e0e564406d01e299da46b6067dfb
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
bfc27c482ed614832cc1a64e
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/ConfinedDiffusionMSDCurveFit.java
ConfinedDiffusionMSDCurveFit.doFit
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/ConfinedDiffusionMSDCurveFit.java#L65-L94
train
java
Fits the curve y = a*(1-b*exp((-4*D)*(x/a)*c)) to the x- and y data. The parameters have the follow meaning: @param xdata @param ydata
public void doFit(double[] xdata, double[] ydata, boolean reduced){ CurveFitter fitter = new CurveFitter(xdata, ydata); if(reduced==false){ double ia = Double.isNaN(initA)?0:initA; double ib = Double.isNaN(initB)?0:initB; double ic = Double.isNaN(initC)?0:initC; double id = Double.isNaN(initD)?0:i...
Fits the curve y = a*(1-b*exp((-4*D)*(x/a)*c)) to the x- and y data. The parameters have the follow meaning: @param xdata @param ydata public void doFit(double[] xdata, double[] ydata, boolean reduced){ CurveFitter fitter = new CurveFitter(xdata, ydata); if(reduced==false){ double ia = Double.isNaN(initA)?0...
474
135
1,387
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3e195be260dd7ca72044f488225903e8a9517ea3e43574d01507142fca22d240
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
31cd7d02e1646419bba9f95f
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java
TrajectorySplineFit.calculateSpline
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java#L107-L501
train
java
Calculates a spline to a trajectory. Attention: The spline is fitted through a rotated version of the trajectory. To fit the spline the trajectory is rotated into its main direction. You can access this rotated trajectory by {@link #getRotatedTrajectory() getRotatedTrajectory}. @return The fitted spline
public PolynomialSplineFunction calculateSpline(){ successfull= false; /* * 1.Calculate the minimum bounding rectangle */ ArrayList<Point2D.Double> points = new ArrayList<Point2D.Double>(); for(int i = 0; i < t.size(); i++){ Point2D.Double p = new Point2D.Double(); p.setLocation(t.get(i).x, t.get...
Calculates a spline to a trajectory. Attention: The spline is fitted through a rotated version of the trajectory. To fit the spline the trajectory is rotated into its main direction. You can access this rotated trajectory by {@link #getRotatedTrajectory() getRotatedTrajectory}. @return The fitted spline public Polynom...
4,060
304
12,981
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b1b9448f821e7ac2d3b40f11a0960a7b21939933d2dddf70511b0b53dd09d5d1
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
410999b77e5f644f2a1745ec
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java
TrajectorySplineFit.distancePointLine
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java#L517-L530
train
java
Please see https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Another_formula and http://mathworld.wolfram.com/Two-PointForm.html @param p1 First point on line @param p2 Second point on line @param p Point for which the distance should be calculated. @return distance of p to line defined by p1&p2
public double distancePointLine(Point2D.Double p1,Point2D.Double p2,Point2D.Double p){ double d; double m = (p2.y-p1.y)/(p2.x-p1.x); if(Double.isInfinite(m)) { d = Math.abs(p2.x-p.x); } else{ double k = -1*m*p1.x+p1.y; d = Math.sqrt( Math.pow( (p.x+m*p.y-m*k)/(m*m+1)-p.x , 2) + Math.pow( m*( (p...
Please see https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Another_formula and http://mathworld.wolfram.com/Two-PointForm.html @param p1 First point on line @param p2 Second point on line @param p Point for which the distance should be calculated. @return distance of p to line defined by p1&p2 public do...
235
308
374
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bec87cd9e3b150f11fbb17759299fe4c84edfa9650f81eb7a02ab8e3a7911555
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
35fec672a0c34c2f7860b9d2
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java
TrajectorySplineFit.minDistancePointSpline
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java#L538-L560
train
java
Finds to a given point p the point on the spline with minimum distance. @param p Point where the nearest distance is searched for @param nPointsPerSegment Number of interpolation points between two support points @return Point spline which has the minimum distance to p
public Point2D.Double minDistancePointSpline(Point2D.Double p, int nPointsPerSegment){ double minDistance = Double.MAX_VALUE; Point2D.Double minDistancePoint = null; int numberOfSplines = spline.getN(); double[] knots = spline.getKnots(); for(int i = 0; i < numberOfSplines; i++){ double x...
Finds to a given point p the point on the spline with minimum distance. @param p Point where the nearest distance is searched for @param nPointsPerSegment Number of interpolation points between two support points @return Point spline which has the minimum distance to p public Point2D.Double minDistancePointSpline(Poin...
250
269
768
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
cfc2404adc0d60baf2071c02ab61b81c76380db140da004bfcea12092704e559
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
5f79518874215f28d37bc43b
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java
TrajectorySplineFit.showTrajectoryAndSpline
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFit.java#L604-L658
train
java
Plots the rotated trajectory, spline and support points.
public void showTrajectoryAndSpline(){ if(t.getDimension()==2){ double[] xData = new double[rotatedTrajectory.size()]; double[] yData = new double[rotatedTrajectory.size()]; for(int i = 0; i < rotatedTrajectory.size(); i++){ xData[i] = rotatedTrajectory.get(i).x; yData[i] = rotatedTra...
Plots the rotated trajectory, spline and support points. public void showTrajectoryAndSpline(){ if(t.getDimension()==2){ double[] xData = new double[rotatedTrajectory.size()]; double[] yData = new double[rotatedTrajectory.size()]; for(int i = 0; i < rotatedTrajectory.size(); i++){ xData[i] ...
549
56
2,024
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b84cedd2a1c5a7f23b88dce870a57da84d8127bc3511f0af86104e5e9292749c
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
c4141d11eb1c71c720138cf7
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/features/BoundednessFeature.java
BoundednessFeature.calculateBoundedness
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/features/BoundednessFeature.java#L36-L41
train
java
Calculates the Boundedness value to given confinement radius, diffusion coefficient, timlag and number of steps. @param D diffusion coefficient @param N Number of steps @param timelag Timelag @param confRadius Confinement radius @return Boundedness value
public static double calculateBoundedness(double D, int N, double timelag, double confRadius){ double r = confRadius; double cov_area = a(N)*D*timelag; double res = cov_area/(4*r*r); return res; }
Calculates the Boundedness value to given confinement radius, diffusion coefficient, timlag and number of steps. @param D diffusion coefficient @param N Number of steps @param timelag Timelag @param confRadius Confinement radius @return Boundedness value public static double calculateBoundedness(double D, int N, doubl...
115
254
205
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
86e90ea6bbe3d7f12b31a9276ca2da151e6ed3fc35107b4f9c387df25472e11c
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
506e5bce9c0877f58b0667f3
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/features/BoundednessFeature.java
BoundednessFeature.getRadiusToBoundedness
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/features/BoundednessFeature.java#L51-L55
train
java
Calculates the radius to a given boundedness value @param D Diffusion coefficient @param N Number of steps @param timelag Timelag @param B Boundedeness @return Confinement radius
public static double getRadiusToBoundedness(double D, int N, double timelag, double B){ double cov_area = a(N)*D*timelag; double radius = Math.sqrt(cov_area/(4*B)); return radius; }
Calculates the radius to a given boundedness value @param D Diffusion coefficient @param N Number of steps @param timelag Timelag @param B Boundedeness @return Confinement radius public static double getRadiusToBoundedness(double D, int N, double timelag, double B){ double cov_area = a(N)*D*timelag; double radius ...
99
178
188
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b3736afbff72d424c15fe40a3788c1e8b64975da8d3e591d7e38ca3419cd71a0
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
092acae2e348a398f928c570
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/simulation/AnomalousDiffusionScene.java
AnomalousDiffusionScene.estimateExcludedVolumeFraction
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/simulation/AnomalousDiffusionScene.java#L71-L97
train
java
Estimate excluded volume fraction by monte carlo method @return excluded volume fraction
public double estimateExcludedVolumeFraction(){ //Calculate volume/area of the of the scene without obstacles if(recalculateVolumeFraction){ CentralRandomNumberGenerator r = CentralRandomNumberGenerator.getInstance(); boolean firstRandomDraw = false; if(randomNumbers==null){ randomNumbers = new double[...
Estimate excluded volume fraction by monte carlo method @return excluded volume fraction public double estimateExcludedVolumeFraction(){ //Calculate volume/area of the of the scene without obstacles if(recalculateVolumeFraction){ CentralRandomNumberGenerator r = CentralRandomNumberGenerator.getInstance(); bo...
234
88
846
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9d4641aaa7ae0a961a0f6a66c2947af44699247debb71de9c789778f43e46947
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
96e6403e44348e638e54d2fd
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getTrajectoryChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L56-L74
train
java
Plots the trajectory @param title Title of the plot @param t Trajectory to be plotted
public static Chart getTrajectoryChart(String title, Trajectory t){ if(t.getDimension()==2){ double[] xData = new double[t.size()]; double[] yData = new double[t.size()]; for(int i = 0; i < t.size(); i++){ xData[i] = t.get(i).x; yData[i] = t.get(i).y; } // Create Char...
Plots the trajectory @param title Title of the plot @param t Trajectory to be plotted public static Chart getTrajectoryChart(String title, Trajectory t){ if(t.getDimension()==2){ double[] xData = new double[t.size()]; double[] yData = new double[t.size()]; for(int i = 0; i < t.size(); i++){ xD...
179
85
542
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b27e956076b9c07e7136de44d8ec91343ab19796a3921649671ab58e26c87e87
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
e1a93c8d1d85519dd2c12b03
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L91-L112
train
java
Plots the MSD curve for trajectory t @param t Trajectory to calculate the msd curve @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param msdeval Evaluates the mean squared displacment
public static Chart getMSDLineChart(Trajectory t, int lagMin, int lagMax, AbstractMeanSquaredDisplacmentEvaluator msdeval) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; msdeval.setTrajectory(t); msdeval.setTimelag(lagMin); for (int i = lagMin; i < la...
Plots the MSD curve for trajectory t @param t Trajectory to calculate the msd curve @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param msdeval Evaluates the mean squared displacment public st...
319
309
651
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
07ae44220770f2e06f1b7140211884e5df5712978e3c61eb093801e23034058d
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
455e83f31a95c1a48b71baee
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineWithConfinedModelChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L125-L156
train
java
Plots the MSD curve with the trajectory t and adds the fitted model for confined diffusion above. @param t Trajectory to calculate the msd curve @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @pa...
public static Chart getMSDLineWithConfinedModelChart(Trajectory t, int lagMin, int lagMax, double timelag, double a, double b, double c, double d) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; double[] modelData = new double[lagMax - lagMin + 1]; MeanS...
Plots the MSD curve with the trajectory t and adds the fitted model for confined diffusion above. @param t Trajectory to calculate the msd curve @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @pa...
528
474
1,113
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b9c71c29c36e9e23b5ecd82d6a8180f79ab12921e350049e425743ba1045120e
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
319ef930e386756ba8e883c9
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineWithPowerModelChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L167-L193
train
java
Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time betwe...
public static Chart getMSDLineWithPowerModelChart(Trajectory t, int lagMin, int lagMax, double timelag, double a, double D) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; double[] modelData = new double[lagMax - lagMin + 1]; MeanSquaredDisplacmentFeatur...
Plots the MSD curve with the trajectory t and adds the fitted model for anomalous diffusion above. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time betwe...
430
410
916
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a71446b9b1cdf7791b81b7da9fc0ed33ce93916a685865ba4fee43b6d4ee2edd
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
1411ab50c136ec6e387bcd36
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineWithFreeModelChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L204-L230
train
java
Plots the MSD curve with the trajectory t and adds the fitted model for free diffusion. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time between two fram...
public static Chart getMSDLineWithFreeModelChart(Trajectory t, int lagMin, int lagMax, double timelag, double diffusionCoefficient, double intercept) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; double[] modelData = new double[lagMax - lagMin + 1]; Me...
Plots the MSD curve with the trajectory t and adds the fitted model for free diffusion. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time between two fram...
436
390
989
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
cf3f9783b86497c518ac1365f145c13a692da1c06093617a4080660e75584f56
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
21309dbb20c7db6b008628fe
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineWithActiveTransportModelChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L241-L267
train
java
Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time between t...
public static Chart getMSDLineWithActiveTransportModelChart(Trajectory t, int lagMin, int lagMax, double timelag, double diffusionCoefficient, double velocity) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; double[] modelData = new double[lagMax - lagMin ...
Plots the MSD curve with the trajectory t and adds the fitted model for directed motion above. @param t @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param timelag Elapsed time between t...
460
429
1,029
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3d3707ad9d5b8b6652e749bace2cb1eca0b11f54a9a49bead1826e777862d67c
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
09870c5e3faefd3738c4337c
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L276-L304
train
java
Plots the mean MSD curve over all trajectories in t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param msdeval Evaluates the mean squared displacment
public static Chart getMSDLineChart(ArrayList<? extends Trajectory> t, int lagMin, int lagMax, AbstractMeanSquaredDisplacmentEvaluator msdeval) { double[] xData = new double[lagMax - lagMin + 1]; double[] yData = new double[lagMax - lagMin + 1]; for (int j = lagMin; j < lagMax + 1; j++) { double msd = 0; ...
Plots the mean MSD curve over all trajectories in t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds @param msdeval Evaluates the mean squared displacment public sta...
371
308
792
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bd15068d7251978aa8dce2bfbe16aad735564e65dab3063c6e1e2ca3a112f0bb
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
6b1501ddd76e7b7ae72ca2bb
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L312-L315
train
java
Plots the MSD curve for trajectory t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
public static Chart getMSDLineChart(Trajectory t, int lagMin, int lagMax) { return getMSDLineChart(t, lagMin, lagMax, new MeanSquaredDisplacmentFeature(t, lagMin)); }
Plots the MSD curve for trajectory t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds public static Chart getMSDLineChart(Trajectory t, int lagMin, int lagMax) { ...
132
240
173
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
51c133c73900efc31ef1fd785553afea9c2ca6bfea513b4086d19cfc22d243d3
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
4a5384cd1d4161adc58c1a8f
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.getMSDLineChart
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L323-L327
train
java
Plots the mean MSD curve over all trajectories in t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds
public static Chart getMSDLineChart(ArrayList<Trajectory> t, int lagMin, int lagMax) { return getMSDLineChart(t, lagMin, lagMax, new MeanSquaredDisplacmentFeature(t.get(0), lagMin)); }
Plots the mean MSD curve over all trajectories in t. @param t List of trajectories @param lagMin Minimum timelag (e.g. 1,2,3..) lagMin*timelag = elapsed time in seconds @param lagMax Maximum timelag (e.g. 1,2,3..) lagMax*timelag = elapsed time in seconds public static Chart getMSDLineChart(ArrayList<Trajectory> t, int...
139
254
194
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3026ffd065ab438ef7c19cc049920c19f46fbc603f3fe7b924191c6d2a25bc6d
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
2f39ab797b414178f106a037
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java
VisualizationUtils.plotCharts
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/VisualizationUtils.java#L341-L366
train
java
Plots a list of charts in matrix with 2 columns. @param charts
public static void plotCharts(List<Chart> charts){ int numRows =1; int numCols =1; if(charts.size()>1){ numRows = (int) Math.ceil(charts.size()/2.0); numCols = 2; } final JFrame frame = new JFrame(""); frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE); frame.getContentPane().setLay...
Plots a list of charts in matrix with 2 columns. @param charts public static void plotCharts(List<Chart> charts){ int numRows =1; int numCols =1; if(charts.size()>1){ numRows = (int) Math.ceil(charts.size()/2.0); numCols = 2; } final JFrame frame = new JFrame(""); frame.setDefaultCloseOperat...
183
62
758
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
061113f20f78407212ed8154d45147c16649eb972b60ed136dccb45035c1f340
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
ab6bad9160cfec689b678a33
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryValidIndexTimelagIterator.java
TrajectoryValidIndexTimelagIterator.next
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryValidIndexTimelagIterator.java#L81-L98
train
java
Give next index i where i and i+timelag is valid
public Integer next() { for(int i = currentIndex; i < t.size(); i++){ if(i+timelag>=t.size()){ return null; } if((t.get(i) != null) && (t.get(i+timelag) != null)){ if(overlap){ currentIndex = i+1; } else{ currentIndex = i+timelag; } return i; } } return null; }
Give next index i where i and i+timelag is valid public Integer next() { for(int i = currentIndex; i < t.size(); i++){ if(i+timelag>=t.size()){ return null; } if((t.get(i) != null) && (t.get(i+timelag) != null)){ if(overlap){ currentIndex = i+1; } else{ currentIndex = i+timelag; ...
124
48
317
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ba476f351b92e7c636bb83796d69ba4dfee49357a8418319b32954fd40d2f28b
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
6332493e7619204772ebe0c7
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/Trajectory.java
Trajectory.subList
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/Trajectory.java#L79-L87
train
java
Generates a sub-trajectory
@Override public Trajectory subList(int fromIndex, int toIndex) { Trajectory t = new Trajectory(dimension); for(int i = fromIndex; i < toIndex; i++){ t.add(this.get(i)); } return t; }
Generates a sub-trajectory @Override public Trajectory subList(int fromIndex, int toIndex) { Trajectory t = new Trajectory(dimension); for(int i = fromIndex; i < toIndex; i++){ t.add(this.get(i)); } return t; }
67
26
199
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
495345590e1f4a1d56d4baecee091b8b829537bfc22c2ed3bd5c3bcfd4b73b9c
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
b1e7293e6f887e9a7b591865
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/Trajectory.java
Trajectory.getPositionsAsArray
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/Trajectory.java#L117-L130
train
java
Converts the positions to a 2D double array @return 2d double array [i][j], i=Time index, j=coordinate index
public double[][] getPositionsAsArray(){ double[][] posAsArr = new double[size()][3]; for(int i = 0; i < size(); i++){ if(get(i)!=null){ posAsArr[i][0] = get(i).x; posAsArr[i][1] = get(i).y; posAsArr[i][2] = get(i).z; } else{ posAsArr[i] = null; } } return posAsArr; }
Converts the positions to a 2D double array @return 2d double array [i][j], i=Time index, j=coordinate index public double[][] getPositionsAsArray(){ double[][] posAsArr = new double[size()][3]; for(int i = 0; i < size(); i++){ if(get(i)!=null){ posAsArr[i][0] = get(i).x; posAsArr[i][1] = get(i).y; ...
146
108
305
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f469466b70d3b94c100c75b962b3d896ff45062ad5c44d9f2a68f4c7ccc08347
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
31493d75a070c819f1863b6b
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/Trajectory.java
Trajectory.scale
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/Trajectory.java#L160-L164
train
java
Multiplies all positions with a factor v @param v Multiplication factor
public void scale(double v){ for(int i = 0; i < this.size(); i++){ this.get(i).scale(v);; } }
Multiplies all positions with a factor v @param v Multiplication factor public void scale(double v){ for(int i = 0; i < this.size(); i++){ this.get(i).scale(v);; } }
49
71
101
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f982648386e1af290f4726041671e77d1741d41ac1d19c6a07beb5565b49b3bc
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
2eb9b5289becf8c27db5abb3
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFitLegacy.java
TrajectorySplineFitLegacy.calculateSpline
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/TrajectorySplineFitLegacy.java#L105-L495
train
java
Calculates a spline to a trajectory. Attention: The spline is fitted through a rotated version of the trajectory. To fit the spline the trajectory is rotated into its main direction. You can access this rotated trajectory by {@link #getRotatedTrajectory() getRotatedTrajectory}. @return The fitted spline
public PolynomialSplineFunction calculateSpline(){ /* * 1.Calculate the minimum bounding rectangle */ ArrayList<Point2D.Double> points = new ArrayList<Point2D.Double>(); for(int i = 0; i < t.size(); i++){ Point2D.Double p = new Point2D.Double(); p.setLocation(t.get(i).x, t.get(i).y); points.a...
Calculates a spline to a trajectory. Attention: The spline is fitted through a rotated version of the trajectory. To fit the spline the trajectory is rotated into its main direction. You can access this rotated trajectory by {@link #getRotatedTrajectory() getRotatedTrajectory}. @return The fitted spline public Polynom...
4,007
304
12,757
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
ea21f3133df2e61b2e9f1530ddb95a706a4fc3cc5679e8bf75b8deeb1333044a
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
c534245a17f6cf2d6703e9f3
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traj/math/RadiusGyrationTensor2D.java
RadiusGyrationTensor2D.getRadiusOfGyrationTensor
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traj/math/RadiusGyrationTensor2D.java#L56-L90
train
java
Calculates the radius of gyration tensor according to formula (6.3) in ELEMENTS OF THE RANDOM WALK by Rudnick and Gaspari @return Radius of gyration tensor
public static Array2DRowRealMatrix getRadiusOfGyrationTensor(Trajectory t){ double meanx =0; double meany =0; for(int i = 0; i < t.size(); i++){ meanx+= t.get(i).x; meany+= t.get(i).y; } meanx = meanx/t.size(); meany = meany/t.size(); double e11 = 0; double e12 = 0; double e21 = 0; double e...
Calculates the radius of gyration tensor according to formula (6.3) in ELEMENTS OF THE RANDOM WALK by Rudnick and Gaspari @return Radius of gyration tensor public static Array2DRowRealMatrix getRadiusOfGyrationTensor(Trajectory t){ double meanx =0; double meany =0; for(int i = 0; i < t.size(); i++){ meanx+=...
372
157
830
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f9d84f36580cbda20fe77d6419029c68cd23356a8dc2f1d402ceb8c2f5a9119f
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
3d716bc61da192a027334dcb
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/StokesEinsteinConverter.java
StokesEinsteinConverter.convert
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/StokesEinsteinConverter.java#L44-L46
train
java
Converters the diffusion coefficient to hydrodynamic diameter and vice versa @param value Diffusion coefficient in [m^2 s^-1] or hydrodynamic diameter in [m] @param temperatur Temperatur in [Kelvin] @param viscosity Viscosity in [kg m^-1 s^-1] @return Hydrodynmaic diameter [m] / diffusion coefficient [m^2 s^-1]
public double convert(double value, double temperatur, double viscosity){ return temperatur*kB / (Math.PI*viscosity*value); }
Converters the diffusion coefficient to hydrodynamic diameter and vice versa @param value Diffusion coefficient in [m^2 s^-1] or hydrodynamic diameter in [m] @param temperatur Temperatur in [Kelvin] @param viscosity Viscosity in [kg m^-1 s^-1] @return Hydrodynmaic diameter [m] / diffusion coefficient [m^2 s^-1] public...
111
312
128
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
4003b223f4029f75d3fef47cbafde7e5c56d8cfb6df6a6b34871479ba3258700
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
89e71f6c68d9a429ac7eff3a
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/StokesEinsteinConverter.java
StokesEinsteinConverter.ViscosityByAndradeEquation
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/StokesEinsteinConverter.java#L54-L99
train
java
Calculates the viscosity for different solvent in dependence from the temperatur [k]. Please see https://de.wikipedia.org/wiki/Andrade-Gleichung @param temperatur Temperatur in Kelvin [K] @return Viscosity in [kg m^-1 s^-1]
public static double ViscosityByAndradeEquation(double temperatur, SOLVENT s){ double res = 0; double a; double b; switch (s) { case WATER: if(temperatur<274 || temperatur>373){ throw new IllegalArgumentException("The andrade equation can not be applied for this solvent/temperatur combination."); } ...
Calculates the viscosity for different solvent in dependence from the temperatur [k]. Please see https://de.wikipedia.org/wiki/Andrade-Gleichung @param temperatur Temperatur in Kelvin [K] @return Viscosity in [kg m^-1 s^-1] public static double ViscosityByAndradeEquation(double temperatur, SOLVENT s){ double res = 0...
452
223
1,302
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
dc9a0d3b487894e6d6136f1fc02284781c239764b411fe91f844f8a8fe97ff62
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
6c637db7122d50834ae7454e
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java
TrajectoryUtil.combineTrajectory
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java#L45-L63
train
java
Combines two trajectories by adding the corresponding positions. The trajectories have to have the same length. @param a The first trajectory @param b The second trajectory @return The combined trajectory
public static Trajectory combineTrajectory(Trajectory a, Trajectory b){ if(a.getDimension()!=b.getDimension()){ throw new IllegalArgumentException("Combination not possible: The trajectorys does not have the same dimension"); } if(a.size()!=b.size()){ throw new IllegalArgumentException("Combination not poss...
Combines two trajectories by adding the corresponding positions. The trajectories have to have the same length. @param a The first trajectory @param b The second trajectory @return The combined trajectory public static Trajectory combineTrajectory(Trajectory a, Trajectory b){ if(a.getDimension()!=b.getDimension()){ ...
225
204
666
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f5f80dafd05df8be913d3701b290bbfcff475be689c6cf204ed17ac8116d6f15
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
dd2f5846fc05cb13b72ef817
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java
TrajectoryUtil.concactTrajectorie
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java#L71-L97
train
java
Concatenates the trajectory a and b @param a The end of this trajectory will be connected to the start of trajectory b @param b The start of this trajectory will be connected to the end of trajectory a @return Concatenated trajectory
public static Trajectory concactTrajectorie(Trajectory a, Trajectory b){ if(a.getDimension()!=b.getDimension()){ throw new IllegalArgumentException("Combination not possible: The trajectorys does not have the same dimension"); } Trajectory c = new Trajectory(a.getDimension()); for(int i = 0 ; i < a.size()...
Concatenates the trajectory a and b @param a The end of this trajectory will be connected to the start of trajectory b @param b The start of this trajectory will be connected to the end of trajectory a @return Concatenated trajectory public static Trajectory concactTrajectorie(Trajectory a, Trajectory b){ if(a.getDi...
300
233
739
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
9f27a7ea12604874297f16963921bc6189fb94b2c45de6671c163ab30531e24f
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
128fcb62f9955ce9898c5749
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java
TrajectoryUtil.resample
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java#L105-L113
train
java
Resamples a trajectory @param t Trajectory to resample @param n Resample rate @return Returns a resampled trajectory which contains every n'th position of t
public static Trajectory resample(Trajectory t, int n){ Trajectory t1 = new Trajectory(2); for(int i = 0; i < t.size(); i=i+n){ t1.add(t.get(i)); } return t1; }
Resamples a trajectory @param t Trajectory to resample @param n Resample rate @return Returns a resampled trajectory which contains every n'th position of t public static Trajectory resample(Trajectory t, int n){ Trajectory t1 = new Trajectory(2); for(int i = 0; i < t.size(); i=i+n){ t1.add(t.get(i)); } ...
99
156
178
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
2cbbf1f0f97064622c7cd4992db87e5e48fe294585648e8b7271d127f8e2fa07
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
6364ba5a6ab473f7189e705b
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java
TrajectoryUtil.splitTrackInSubTracks
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java#L131-L156
train
java
Splits a trajectory in overlapping / non-overlapping sub-trajectories. @param t @param windowWidth Window width. Each sub-trajectory will have this length @param overlapping Allows the window to overlap @return ArrayList with sub-trajectories
public static ArrayList<Trajectory> splitTrackInSubTracks(Trajectory t, int windowWidth, boolean overlapping){ int increment = 1; if(overlapping==false){ increment=windowWidth; } ArrayList<Trajectory> subTrajectories = new ArrayList<Trajectory>(); boolean trackEndReached = false; for(int i = 0; i < t....
Splits a trajectory in overlapping / non-overlapping sub-trajectories. @param t @param windowWidth Window width. Each sub-trajectory will have this length @param overlapping Allows the window to overlap @return ArrayList with sub-trajectories public static ArrayList<Trajectory> splitTrackInSubTracks(Trajectory t, int ...
247
242
687
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1423c3204bd0a665b3935cae05dba87116570ccb3de9166e0e9bbea0184e6a59
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
6be809e4188314f537a7f0f6
thorstenwagner/TraJ
src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java
TrajectoryUtil.getTrajectoryByID
https://github.com/thorstenwagner/TraJ/blob/505fafb1f2f77a2d67bb2a089a2fdebe2c9bc7cb/src/main/java/de/biomedical_imaging/traJ/TrajectoryUtil.java#L164-L173
train
java
Finds trajectory by ID @param t List of Trajectories @param id ID of the trajectorie @return Trajectory with ID=id
public static Trajectory getTrajectoryByID(List<? extends Trajectory> t, int id){ Trajectory track = null; for(int i = 0; i < t.size() ; i++){ if(t.get(i).getID()==id){ track = t.get(i); break; } } return track; }
Finds trajectory by ID @param t List of Trajectories @param id ID of the trajectorie @return Trajectory with ID=id public static Trajectory getTrajectoryByID(List<? extends Trajectory> t, int id){ Trajectory track = null; for(int i = 0; i < t.size() ; i++){ if(t.get(i).getID()==id){ track = t.get(i); br...
105
114
236
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
bb89e89d1ae4468a22dd706bc4b04bf24ff37ecf3e1155a62b89605a93f14d15
MIT
permissive
https://github.com/thorstenwagner/TraJ/blob/master/license.txt
29add73eff991cc8e872a8e6
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/LangUtils.java
LangUtils.getClassAnnotationValue
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/LangUtils.java#L19-L28
train
java
Get the value of a Annotation in a class declaration. @param classType @param annotationType @param attributeName @return the value of the annotation as String or null if something goes wrong
public static <T, A extends Annotation> String getClassAnnotationValue(Class<T> classType, Class<A> annotationType, String attributeName) { String value = null; Annotation annotation = classType.getAnnotation(annotationType); if (annotation != null) { try { value = (String) annotation.annotationType().getM...
Get the value of a Annotation in a class declaration. @param classType @param annotationType @param attributeName @return the value of the annotation as String or null if something goes wrong public static <T, A extends Annotation> String getClassAnnotationValue(Class<T> classType, Class<A> annotationType, String attr...
130
191
412
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
364c0796d11468535240e8ddd718f5e1196134e956df7b2a43aa1d0395a441f8
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
ad5585e94c7fdf34cfa4c5d5
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/StringUtils.java
StringUtils.allUpperCase
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/StringUtils.java#L20-L28
train
java
Make all elements of a String array upper case. @param strings string array, may contain null item but can't be null @return array containing all provided elements upper case
public static String[] allUpperCase(String... strings){ String[] tmp = new String[strings.length]; for(int idx=0;idx<strings.length;idx++){ if(strings[idx] != null){ tmp[idx] = strings[idx].toUpperCase(); } } return tmp; }
Make all elements of a String array upper case. @param strings string array, may contain null item but can't be null @return array containing all provided elements upper case public static String[] allUpperCase(String... strings){ String[] tmp = new String[strings.length]; for(int idx=0;idx<strings.length;idx++){ ...
99
174
241
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
24215d7c0324ee334106fcfb545987b70be49bbb19700a24919004390e828e8f
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
b06a9800c4b2cd7e1430fbc5
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/StringUtils.java
StringUtils.allLowerCase
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/StringUtils.java#L35-L43
train
java
Make all elements of a String array lower case. @param strings string array, may contain null item but can't be null @return array containing all provided elements lower case
public static String[] allLowerCase(String... strings){ String[] tmp = new String[strings.length]; for(int idx=0;idx<strings.length;idx++){ if(strings[idx] != null){ tmp[idx] = strings[idx].toLowerCase(); } } return tmp; }
Make all elements of a String array lower case. @param strings string array, may contain null item but can't be null @return array containing all provided elements lower case public static String[] allLowerCase(String... strings){ String[] tmp = new String[strings.length]; for(int idx=0;idx<strings.length;idx++){ ...
99
174
241
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
611ce09eaa6e793c345e75fffff4e7a458e2d88984d7872a2875041bc8ac3cd2
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
d574f0e6120c60ab6a12c317
Canadensys/canadensys-core
src/main/java/net/canadensys/lang/RomanNumeral.java
RomanNumeral.toRomanNumeral
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/lang/RomanNumeral.java#L82-L94
train
java
Get the Roman Numeral of the current value @return
public String toRomanNumeral() { if (this.romanString == null) { this.romanString = ""; int remainder = this.value; for (int i = 0; i < BASIC_VALUES.length; i++) { while (remainder >= BASIC_VALUES[i]) { this.romanString += BASIC_ROMAN_NUMERALS[i]; remainder -= BASIC_VALUES[i]; } } } ...
Get the Roman Numeral of the current value @return public String toRomanNumeral() { if (this.romanString == null) { this.romanString = ""; int remainder = this.value; for (int i = 0; i < BASIC_VALUES.length; i++) { while (remainder >= BASIC_VALUES[i]) { this.romanString += BASIC_ROMAN_NUMERALS[i]; ...
113
50
347
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
3cca07db3d1254e8edbd3e3f4d17f7e2d0646e26de3e2dcb253f5e1c1b3fb4a1
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
51bf5cc64dbcd62b71c23ac3
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/ZipUtils.java
ZipUtils.zipFolder
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/ZipUtils.java#L34-L64
train
java
Utility function to zip the content of an entire folder, but not the folder itself. @param folder @param fileName optional @return success or not
public static boolean zipFolder(File folder, String fileName){ boolean success = false; if(!folder.isDirectory()){ return false; } if(fileName == null){ fileName = folder.getAbsolutePath()+ZIP_EXT; } ZipArchiveOutputStream zipOutput = null; try { zipOutput = new ZipArchiveOutputStream(new F...
Utility function to zip the content of an entire folder, but not the folder itself. @param folder @param fileName optional @return success or not public static boolean zipFolder(File folder, String fileName){ boolean success = false; if(!folder.isDirectory()){ return false; } if(fileName == null){ fil...
188
145
627
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0f1b436dd0fb45df79631d48fa6137481784d04739498ad997fc8fc6f9b983a5
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
a8ad71485e9ece13440a7206
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/ZipUtils.java
ZipUtils.addFolderContentToZip
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/ZipUtils.java#L74-L109
train
java
Add the content of a folder to the zip. If this folder also contains folder(s), this function is called recursively. @param folder @param zipOutput @param folderFromRoot relative path (from archive root) of this folder. @return
private static boolean addFolderContentToZip(File folder, ZipArchiveOutputStream zipOutput, String folderFromRoot){ FileInputStream fileInput; try{ for(File currFile : folder.listFiles()){ ZipArchiveEntry entry = null; if(currFile.isDirectory()){ //as defined by ZipArchiveEntry: //Assumes the e...
Add the content of a folder to the zip. If this folder also contains folder(s), this function is called recursively. @param folder @param zipOutput @param folderFromRoot relative path (from archive root) of this folder. @return private static boolean addFolderContentToZip(File folder, ZipArchiveOutputStream zipOutput,...
336
227
1,227
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
be1218482627b3ea41be5fa48044c2b19e41042924a38d975b4832744d8641c9
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
f2a96df5055f47a65bb5d12b
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/ZipUtils.java
ZipUtils.unzipFileOrFolder
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/ZipUtils.java#L117-L171
train
java
Unzip a file or a folder @param zipFile @param unzippedFolder optional, if null the file/folder will be extracted in the same folder as zipFile @return
public static boolean unzipFileOrFolder(File zipFile, String unzippedFolder){ InputStream is; ArchiveInputStream in = null; OutputStream out = null; if(!zipFile.isFile()){ return false; } if(unzippedFolder == null){ unzippedFolder = FilenameUtils.removeExtension(zipFile.getAbsolutePath()); } ...
Unzip a file or a folder @param zipFile @param unzippedFolder optional, if null the file/folder will be extracted in the same folder as zipFile @return public static boolean unzipFileOrFolder(File zipFile, String unzippedFolder){ InputStream is; ArchiveInputStream in = null; OutputStream out = null; if(!zi...
375
151
1,313
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
7e671499c542e2a52227120392568928e35d68164d283401cf69ae2eb3e36551
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
9fd6f4356dd99b5a0888104e
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/NumberUtils.java
NumberUtils.parseNumber
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/NumberUtils.java#L19-L49
train
java
Tries to parse value into the targetClass. The implementation is no elegant, but it's faster than targetClass.getConstructor(String.class).newInstance(value); @param value @param targetClass @return T instance of value or null if the parsing failed
@SuppressWarnings("unchecked") public static <T> T parseNumber(String value, Class<T> targetClass){ if(value == null){ return null; } try{ if(Integer.class == targetClass){ return (T)Integer.valueOf(value); } else if(Float.class == targetClass){ return (T)Float.valueOf(value); } else if...
Tries to parse value into the targetClass. The implementation is no elegant, but it's faster than targetClass.getConstructor(String.class).newInstance(value); @param value @param targetClass @return T instance of value or null if the parsing failed @SuppressWarnings("unchecked") public static <T> T parseNumber(String...
239
248
719
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
db699fbe435b7902e3344fdfbe9aa511e954e2316b0fca4bc42de761a5c6ef68
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
b9447bc045c5437de12300c9
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/NumberUtils.java
NumberUtils.parseNumber
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/NumberUtils.java#L60-L66
train
java
Tries to parse value into the targetClass. The implementation is no elegant, but it's faster than targetClass.getConstructor(String.class).newInstance(value); @param value @param targetClass @param defaultValue default value to return if the value can not be parsed. @return T instance of value or defaultValue if the pa...
public static <T> T parseNumber(String value, Class<T> targetClass, T defaultValue){ T number = parseNumber(value,targetClass); if(number == null){ return defaultValue; } return number; }
Tries to parse value into the targetClass. The implementation is no elegant, but it's faster than targetClass.getConstructor(String.class).newInstance(value); @param value @param targetClass @param defaultValue default value to return if the value can not be parsed. @return T instance of value or defaultValue if the pa...
114
332
199
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0586467e23c97b338baab5aedb1fbabd1fe5a5b5f5f28a90640681f2330208ba
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
45f1adb04caee47344fb7bdd
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/ListUtils.java
ListUtils.containsAtLeastOneNonBlank
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/ListUtils.java#L21-L28
train
java
Check that a list allowing null and empty item contains at least one element that is not blank. @param list can't be null @return
public static boolean containsAtLeastOneNonBlank(List<String> list){ for(String str : list){ if(StringUtils.isNotBlank(str)){ return true; } } return false; }
Check that a list allowing null and empty item contains at least one element that is not blank. @param list can't be null @return public static boolean containsAtLeastOneNonBlank(List<String> list){ for(String str : list){ if(StringUtils.isNotBlank(str)){ return true; } } return false; }
72
129
175
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d4dba8272496eb8f00c68cea1fa883b4aca330d7dea65bd0cfe83583238163af
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
db23fc8a5a01da0968838366
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/ListUtils.java
ListUtils.toIntegerList
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/ListUtils.java#L37-L53
train
java
Parse a list of String into a list of Integer. If one element can not be parsed, the behavior depends on the value of failOnException. @param strList can't be null @param failOnException if an element can not be parsed should we return null or add a null element to the list. @return list of all String parsed as Integer...
public static List<Integer> toIntegerList(List<String> strList, boolean failOnException){ List<Integer> intList = new ArrayList<Integer>(); for(String str : strList){ try{ intList.add(Integer.parseInt(str)); } catch(NumberFormatException nfe){ if(failOnException){ return null; } else{ ...
Parse a list of String into a list of Integer. If one element can not be parsed, the behavior depends on the value of failOnException. @param strList can't be null @param failOnException if an element can not be parsed should we return null or add a null element to the list. @return list of all String parsed as Integer...
175
347
379
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
2d7e14ca202187a97ebd4565096af26e7b52b2fbd88349f78f8c6c54dd6567c0
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
239100eb00c41fb5a260e3a3
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/ArrayUtils.java
ArrayUtils.containsOnlyNull
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/ArrayUtils.java#L17-L24
train
java
Check that an array only contains null elements. @param values, can't be null @return
public static boolean containsOnlyNull(Object... values){ for(Object o : values){ if(o!= null){ return false; } } return true; }
Check that an array only contains null elements. @param values, can't be null @return public static boolean containsOnlyNull(Object... values){ for(Object o : values){ if(o!= null){ return false; } } return true; }
59
85
146
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
2c7c082f1609f375212615ece233faf7464c6a46d4aa7e220ff4be03fc54f5ec
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
44bc57af780d58e1c30667ff
Canadensys/canadensys-core
src/main/java/net/canadensys/utils/ArrayUtils.java
ArrayUtils.containsOnlyNotNull
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/utils/ArrayUtils.java#L31-L38
train
java
Check that an array only contains elements that are not null. @param values, can't be null @return
public static boolean containsOnlyNotNull(Object... values){ for(Object o : values){ if(o== null){ return false; } } return true; }
Check that an array only contains elements that are not null. @param values, can't be null @return public static boolean containsOnlyNotNull(Object... values){ for(Object o : values){ if(o== null){ return false; } } return true; }
62
98
149
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
db62a2f5cbef202735826838f9c084a4ca97c201863f5891fc54b3d3454b076a
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
59a625fe8e88ed45e059c0e6
Canadensys/canadensys-core
src/main/java/net/canadensys/bundle/UTF8PropertyResourceBundle.java
UTF8PropertyResourceBundle.getBundle
https://github.com/Canadensys/canadensys-core/blob/5e13569f7c0f4cdc7080da72643ff61123ad76fd/src/main/java/net/canadensys/bundle/UTF8PropertyResourceBundle.java#L26-L32
train
java
Get a PropertyResourceBundle able to read an UTF-8 properties file. @param baseName @param locale @return new ResourceBundle or null if no bundle can be found. @throws UnsupportedEncodingException @throws IOException
public static PropertyResourceBundle getBundle(String baseName, Locale locale) throws UnsupportedEncodingException, IOException{ InputStream is = UTF8PropertyResourceBundle.class.getResourceAsStream("/"+baseName + "_"+locale.toString()+PROPERTIES_EXT); if(is != null){ return new PropertyResourceBundle(new InputS...
Get a PropertyResourceBundle able to read an UTF-8 properties file. @param baseName @param locale @return new ResourceBundle or null if no bundle can be found. @throws UnsupportedEncodingException @throws IOException public static PropertyResourceBundle getBundle(String baseName, Locale locale) throws UnsupportedEncod...
119
216
368
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0a21db9932f95572e29e43cdc615ccf23959673b12ced34d229cf302c152789b
MIT
permissive
https://github.com/Canadensys/canadensys-core/blob/master/LICENSE
dca41a5f6e89581c10851f8f
transloadit/java-sdk
src/main/java/com/transloadit/sdk/async/AsyncAssembly.java
AsyncAssembly.pauseUpload
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/async/AsyncAssembly.java#L68-L75
train
java
Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads have actually been paused if possible. @throws LocalOperationException if the method is called while no upload is going on.
public void pauseUpload() throws LocalOperationException { if (state == State.UPLOADING) { setState(State.PAUSED); executor.hardStop(); } else { throw new LocalOperationException("Attempt to pause upload while assembly is not uploading"); } }
Pauses the file upload. This is a blocking function that would try to wait till the assembly file uploads have actually been paused if possible. @throws LocalOperationException if the method is called while no upload is going on. public void pauseUpload() throws LocalOperationException { if (state == State.UP...
102
230
306
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d82a8264952ddfbfab06215d086d27dbf57fc7518c115550df63e4bd43460671
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
be8e76ab05983102ae78b0da
transloadit/java-sdk
src/main/java/com/transloadit/sdk/async/AsyncAssembly.java
AsyncAssembly.watchStatus
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/async/AsyncAssembly.java#L123-L136
train
java
Runs intermediate check on the Assembly status until it is finished executing, then returns it as a response. @return {@link AssemblyResponse} @throws LocalOperationException if something goes wrong while running non-http operations. @throws RequestException if request to Transloadit server fails.
protected AssemblyResponse watchStatus() throws LocalOperationException, RequestException { AssemblyResponse response; do { response = getClient().getAssemblyByUrl(url); try { Thread.sleep(1000); } catch (InterruptedException e) { throw...
Runs intermediate check on the Assembly status until it is finished executing, then returns it as a response. @return {@link AssemblyResponse} @throws LocalOperationException if something goes wrong while running non-http operations. @throws RequestException if request to Transloadit server fails. protected AssemblyR...
132
299
474
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
73f8dfa065b388d3c052a62d7df24cba3bf49bce647c735f5ed1aa29097b4314
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
ebc16295418aeb5c0974c12e
transloadit/java-sdk
src/main/java/com/transloadit/sdk/async/AsyncAssembly.java
AsyncAssembly.uploadTusFiles
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/async/AsyncAssembly.java#L144-L190
train
java
Does the actual uploading of files (when tus is enabled) @throws IOException when there's a failure with file retrieval @throws ProtocolException when there's a failure with tus upload
@Override protected void uploadTusFiles() throws IOException, ProtocolException { setState(State.UPLOADING); while (uploads.size() > 0) { final TusUploader tusUploader; // don't recreate uploader if it already exists. // this is to avoid multiple connections being...
Does the actual uploading of files (when tus is enabled) @throws IOException when there's a failure with file retrieval @throws ProtocolException when there's a failure with tus upload @Override protected void uploadTusFiles() throws IOException, ProtocolException { setState(State.UPLOADING); whil...
370
185
1,898
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
a0eaed67e800c7699e9a0fde5a62e87f4035b196e61b1d96f6a5964459d4c6b0
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
9bd338a229eaf8f4503ebec8
transloadit/java-sdk
src/main/java/com/transloadit/sdk/async/AsyncAssembly.java
AsyncAssembly.handleTusUpload
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/async/AsyncAssembly.java#L199-L205
train
java
If tus uploads are enabled, this method would be called by {@link Assembly#save()} to handle the file uploads @param response {@link AssemblyResponse} @throws IOException when there's a failure with file retrieval. @throws ProtocolException when there's a failure with tus upload.
@Override protected void handleTusUpload(AssemblyResponse response) throws IOException, ProtocolException { url = response.getSslUrl(); totalUploadSize = getTotalUploadSize(); processTusFiles(url); startExecutor(); }
If tus uploads are enabled, this method would be called by {@link Assembly#save()} to handle the file uploads @param response {@link AssemblyResponse} @throws IOException when there's a failure with file retrieval. @throws ProtocolException when there's a failure with tus upload. @Override protected void handleTu...
106
281
256
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
40e119d034e82c22f282c3b4e0f8f347f8995fbf06da52c567060577246ecbc9
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
d749a6d67bc87c68d8daf52f
transloadit/java-sdk
src/main/java/com/transloadit/sdk/async/AsyncAssembly.java
AsyncAssembly.getTotalUploadSize
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/async/AsyncAssembly.java#L252-L262
train
java
used for upload progress
private long getTotalUploadSize() throws IOException { long size = 0; for (Map.Entry<String, File> entry : files.entrySet()) { size += entry.getValue().length(); } for (Map.Entry<String, InputStream> entry : fileStreams.entrySet()) { size += entry.getValue().avai...
used for upload progress private long getTotalUploadSize() throws IOException { long size = 0; for (Map.Entry<String, File> entry : files.entrySet()) { size += entry.getValue().length(); } for (Map.Entry<String, InputStream> entry : fileStreams.entrySet()) { siz...
78
24
365
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
f30ab83d3bf44c5944dd4cf2601e553662f51b47ccab8f38a0ac827a112fed97
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
72a27d2f479cafee3ca1dbf5
dhemery/victor
src/main/java/com/dhemery/victor/frank/frankly/MessageResponseParser.java
MessageResponseParser.deserialize
https://github.com/dhemery/victor/blob/52fa85737f01965cc2b15bf62d9b86b5ad6a974b/src/main/java/com/dhemery/victor/frank/frankly/MessageResponseParser.java#L21-L43
train
java
Create a {@code MessageResponse} object from a serialized JSON representation.
@Override public MessageResponse deserialize(JsonElement element, Type alsoIgnored, JsonDeserializationContext ignored) { List<String> results = new ArrayList<String>(); String reason = ""; String details = ""; JsonObject body = element.getAsJsonObject(); boolean succeeded =...
Create a {@code MessageResponse} object from a serialized JSON representation. @Override public MessageResponse deserialize(JsonElement element, Type alsoIgnored, JsonDeserializationContext ignored) { List<String> results = new ArrayList<String>(); String reason = ""; String details = ""; ...
196
78
984
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
7d9a335162b0c10b57df9aa37d5e4e05b48d48a906f964f22c5fc10150c1d55a
MIT
permissive
https://github.com/dhemery/victor/blob/master/LICENSE.txt
6630c7f3376f6326c86f9fa7
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnConvolutionBwdFilterAlgo.java
cudnnConvolutionBwdFilterAlgo.stringFor
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/cudnnConvolutionBwdFilterAlgo.java#L63-L77
train
java
Returns a string representation of the given constant @return A string representation of the given constant
public static String stringFor(int n) { switch (n) { case CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0: return "CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0"; case CUDNN_CONVOLUTION_BWD_FILTER_ALGO_1: return "CUDNN_CONVOLUTION_BWD_FILTER_ALGO_1"; case CUDNN_CONVOLUTION_BWD_FI...
Returns a string representation of the given constant @return A string representation of the given constant public static String stringFor(int n) { switch (n) { case CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0: return "CUDNN_CONVOLUTION_BWD_FILTER_ALGO_0"; case CUDNN_CONVOLUTI...
312
108
1,038
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
50e42822274cd1c7169e1eae36df625dc5aa49a6c90507d5e14e802f5d4fdba4
MIT
permissive
https://github.com/jcuda/jcudnn/blob/master/LICENSE
b3a94d41b53b0119f2dc2518
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Template.java
Template.save
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Template.java#L62-L71
train
java
Submits the configured template to Transloadit. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public Response save() throws RequestException, LocalOperationException { Map<String, Object> templateData = new HashMap<String, Object>(); templateData.put("name", name); options.put("steps", steps.toMap()); templateData.put("template", options); Request request = new Request(...
Submits the configured template to Transloadit. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public Response save() throws RequestException, LocalOperationException { Map<Str...
120
229
410
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
93cca8ae81c6d340139472a99455b08b10361c245f6cd2ffd34a6c4acaefa60a
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
044a48f641a4114578fce11d
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.getAssembly
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L125-L128
train
java
Returns a single assembly. @param id id of the Assembly to retrieve. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public AssemblyResponse getAssembly(String id) throws RequestException, LocalOperationException { Request request = new Request(this); return new AssemblyResponse(request.get("/assemblies/" + id)); }
Returns a single assembly. @param id id of the Assembly to retrieve. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public AssemblyResponse getAssembly(String id) throws Reques...
86
258
219
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e72a2737f58da571ff553e2ed5e56660112a8372f2359cf8c3dc34bf343e0eb5
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
fd18ab1d0c09f85b9a24bbb3
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.getAssemblyByUrl
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L138-L142
train
java
Returns a single assembly. @param url full url of the Assembly. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public AssemblyResponse getAssemblyByUrl(String url) throws RequestException, LocalOperationException { Request request = new Request(this); return new AssemblyResponse(request.get(url)); }
Returns a single assembly. @param url full url of the Assembly. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public AssemblyResponse getAssemblyByUrl(String url) ...
82
253
221
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d3bacecba534e1b8ad66e9847c1dd5821285e82c726b02348d3f985e83a846f8
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
26d4ed075a5a36c338d53a30
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.cancelAssembly
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L152-L156
train
java
cancels a running assembly. @param url full url of the Assembly. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public AssemblyResponse cancelAssembly(String url) throws RequestException, LocalOperationException { Request request = new Request(this); return new AssemblyResponse(request.delete(url, new HashMap<String, Object>())); }
cancels a running assembly. @param url full url of the Assembly. @return {@link AssemblyResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public AssemblyResponse cancelAssembly(String url) t...
90
254
253
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1ae74bbca8560e44cef4b58ae3e6aa35ca4b1f66befad1b6f1d85c298453be84
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
681fdb9687df1cddb2f30fc2
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.getTemplate
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L195-L198
train
java
Returns a single template. @param id id of the template to retrieve. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public Response getTemplate(String id) throws RequestException, LocalOperationException { Request request = new Request(this); return new Response(request.get("/templates/" + id)); }
Returns a single template. @param id id of the template to retrieve. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public Response getTemplate(String id) throws RequestException, Loc...
82
251
202
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e353eeaf67f19fe90e014f852a017bc02f609eb1d8b489943d1177f9969fdca5
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
ca78b8a4732281066393e717
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.updateTemplate
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L210-L214
train
java
Updates the template with the specified id. @param id id of the template to update @param options a Map of options to update/add. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public Response updateTemplate(String id, Map<String, Object> options) throws RequestException, LocalOperationException { Request request = new Request(this); return new Response(request.put("/templates/" + id, options)); }
Updates the template with the specified id. @param id id of the template to update @param options a Map of options to update/add. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public...
105
312
255
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
6131dc9bbf28e02a342cb0fe58b18a4c4503822b322d5d37cd1ea59c6d8d29a6
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
6966a23ac36be2a71957f1ad
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.deleteTemplate
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L225-L229
train
java
Deletes a template. @param id id of the template to delete. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public Response deleteTemplate(String id) throws RequestException, LocalOperationException { Request request = new Request(this); return new Response(request.delete("/templates/" + id, new HashMap<String, Object>())); }
Deletes a template. @param id id of the template to delete. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public Response deleteTemplate(String id) throws RequestExceptio...
89
242
251
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
75f4bfe996ca97a528bb9e085892e32c8e369c9d1498488f5b6d679472f2cac6
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
488c4f4e1a4c75b596b77572
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.listTemplates
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L240-L244
train
java
Returns a list of all templates under the user account @param options {@link Map} extra options to send along with the request. @return {@link ListResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public ListResponse listTemplates(Map<String, Object> options) throws RequestException, LocalOperationException { Request request = new Request(this); return new ListResponse(request.get("/templates", options)); }
Returns a list of all templates under the user account @param options {@link Map} extra options to send along with the request. @return {@link ListResponse} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. publ...
101
314
245
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
242feed8b70f0f92e657228ab46bde614b91fe98ba1766afc91bb3f7f3bc87a0
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
c62a8df536c719f34961d634
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Transloadit.java
Transloadit.getBill
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Transloadit.java#L269-L273
train
java
Returns the bill for the month specified. @param month for which bill to retrieve. @param year for which bill to retrieve. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations.
public Response getBill(int month, int year) throws RequestException, LocalOperationException { Request request = new Request(this); return new Response(request.get("/bill/" + year + String.format("-%02d", month))); }
Returns the bill for the month specified. @param month for which bill to retrieve. @param year for which bill to retrieve. @return {@link Response} @throws RequestException if request to transloadit server fails. @throws LocalOperationException if something goes wrong while running non-http operations. public Respon...
105
305
249
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e632626215ca6fc64c7cd529fa3d8ceddacdd7084b89c1e4763b26de83364b15
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
ebf4086eac733ba4e2c507c5
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnReduceTensorOp.java
cudnnReduceTensorOp.stringFor
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/cudnnReduceTensorOp.java#L58-L73
train
java
Returns a string representation of the given constant @return A string representation of the given constant
public static String stringFor(int n) { switch (n) { case CUDNN_REDUCE_TENSOR_ADD: return "CUDNN_REDUCE_TENSOR_ADD"; case CUDNN_REDUCE_TENSOR_MUL: return "CUDNN_REDUCE_TENSOR_MUL"; case CUDNN_REDUCE_TENSOR_MIN: return "CUDNN_REDUCE_TENSOR_MIN"; ...
Returns a string representation of the given constant @return A string representation of the given constant public static String stringFor(int n) { switch (n) { case CUDNN_REDUCE_TENSOR_ADD: return "CUDNN_REDUCE_TENSOR_ADD"; case CUDNN_REDUCE_TENSOR_MUL: return "CUDNN_...
288
108
865
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0edfeea4b4d8e41109e5f550af4ed1fde62822fd6f1bf10ff27e86dfef5dd8ac
MIT
permissive
https://github.com/jcuda/jcudnn/blob/master/LICENSE
bd7b3616eb770cdcb82f8048
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnStatus.java
cudnnStatus.stringFor
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/cudnnStatus.java#L63-L83
train
java
Returns a string representation of the given constant @return A string representation of the given constant
public static String stringFor(int n) { switch (n) { case CUDNN_STATUS_SUCCESS: return "CUDNN_STATUS_SUCCESS"; case CUDNN_STATUS_NOT_INITIALIZED: return "CUDNN_STATUS_NOT_INITIALIZED"; case CUDNN_STATUS_ALLOC_FAILED: return "CUDNN_STATUS_ALLOC_FAILED"; ...
Returns a string representation of the given constant @return A string representation of the given constant public static String stringFor(int n) { switch (n) { case CUDNN_STATUS_SUCCESS: return "CUDNN_STATUS_SUCCESS"; case CUDNN_STATUS_NOT_INITIALIZED: return "CUDNN_S...
320
108
1,342
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
d4106bc0c9c246c1a9a7946aca0f7b7354d148151c044cd16bfd5d5676729d17
MIT
permissive
https://github.com/jcuda/jcudnn/blob/master/LICENSE
392ad40c63d312bc7ed0b901
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Steps.java
Steps.addStep
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Steps.java#L54-L56
train
java
Adds a new step to the list of steps. @param name Name of the step to add. @param robot The name of the robot ot use with the step. @param options extra options required for the step.
public void addStep(String name, String robot, Map<String, Object> options) { all.put(name, new Step(name, robot, options)); }
Adds a new step to the list of steps. @param name Name of the step to add. @param robot The name of the robot ot use with the step. @param options extra options required for the step. public void addStep(String name, String robot, Map<String, Object> options) { all.put(name, new Step(name, robot, options)); ...
74
184
138
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
1bdfe67be8abb67b0f5e695c4590397b9e614f777372f101056307df39499180
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
33e9ddb2ad42337e176d3e6d
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.addFile
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L57-L64
train
java
Adds a file to your assembly. If the field name specified already exists, it will override the content of the existing name. @param file {@link File} the file to be uploaded. @param name {@link String} the field name of the file when submitted Transloadit.
public void addFile(File file, String name) { files.put(name, file); // remove duplicate key if (fileStreams.containsKey(name)) { fileStreams.remove(name); } }
Adds a file to your assembly. If the field name specified already exists, it will override the content of the existing name. @param file {@link File} the file to be uploaded. @param name {@link String} the field name of the file when submitted Transloadit. public void addFile(File file, String name) { files.p...
99
257
208
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0d02166b1be9c8378e3547599ec4bcc541103ace0d537d6dd627d49c1e2fba8f
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
d5359fa4d7729c9adb1b6bbf
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.addFile
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L71-L74
train
java
Adds a file to your assembly but automatically generates the field name of the file. @param file {@link File} the file to be uploaded.
public void addFile(File file) { String name = "file"; files.put(normalizeDuplicateName(name), file); }
Adds a file to your assembly but automatically generates the field name of the file. @param file {@link File} the file to be uploaded. public void addFile(File file) { String name = "file"; files.put(normalizeDuplicateName(name), file); }
56
135
123
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
fe54a523b7e00526d77a1ee72cf4e75e4c0ac775186dc08292107f628eda0e1b
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
bac190727b1c6ffca5e5bec8
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.addFile
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L83-L90
train
java
Adds a file to your assembly. If the field name specified already exists, it will override the content of the existing name. @param inputStream {@link InputStream} the file to be uploaded. @param name {@link String} the field name of the file when submitted Transloadit.
public void addFile(InputStream inputStream, String name) { fileStreams.put(name, inputStream); // remove duplicate key if (files.containsKey(name)) { files.remove(name); } }
Adds a file to your assembly. If the field name specified already exists, it will override the content of the existing name. @param inputStream {@link InputStream} the file to be uploaded. @param name {@link String} the field name of the file when submitted Transloadit. public void addFile(InputStream inputStream, St...
98
271
223
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
b1534d49ec1182143efeb5b8e9251b7e6335c25f9cae0d28e7403bbee7dd9958
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
c4887936926ed9699070f751
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.addFile
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L97-L100
train
java
Adds a file to your assembly but automatically genarates the name of the file. @param inputStream {@link InputStream} the file to be uploaded.
public void addFile(InputStream inputStream) { String name = "file"; fileStreams.put(normalizeDuplicateName(name), inputStream); }
Adds a file to your assembly but automatically genarates the name of the file. @param inputStream {@link InputStream} the file to be uploaded. public void addFile(InputStream inputStream) { String name = "file"; fileStreams.put(normalizeDuplicateName(name), inputStream); }
58
143
150
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e4129920049307a39777a1ea55274aa201f9829030d6a1d90912431d107582db
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
b23504814129be99fd5f6f69
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.removeFile
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L107-L115
train
java
Removes file from your assembly. @param name field name of the file to remove.
public void removeFile(String name) { if(files.containsKey(name)) { files.remove(name); } if(fileStreams.containsKey(name)) { fileStreams.remove(name); } }
Removes file from your assembly. @param name field name of the file to remove. public void removeFile(String name) { if(files.containsKey(name)) { files.remove(name); } if(fileStreams.containsKey(name)) { fileStreams.remove(name); } }
57
79
216
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
c7a02d4b8beefc9850f0ca630227b9410c4b8ad5ea1d49ce4b3ee6ad24aaa2ae
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
734d345bb9a8f53810ea6395
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.save
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L155-L184
train
java
Submits the configured assembly to Transloadit for processing. @param isResumable boolean value that tells the assembly whether or not to use tus. @return {@link AssemblyResponse} the response received from the Transloadit server. @throws RequestException if request to Transloadit server fails. @throws LocalOpe...
public AssemblyResponse save(boolean isResumable) throws RequestException, LocalOperationException { Request request = new Request(getClient()); options.put("steps", steps.toMap()); // only do tus uploads if files will be uploaded if (isResumable && getFilesCount() > 0) { ...
Submits the configured assembly to Transloadit for processing. @param isResumable boolean value that tells the assembly whether or not to use tus. @return {@link AssemblyResponse} the response received from the Transloadit server. @throws RequestException if request to Transloadit server fails. @throws LocalOpe...
315
394
1,289
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
57be15389cd7bcc09b4a0eaf5b2e18ba6feaa504cd8a9cd5d80ff1a843be3f59
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
7092ae5d3e933a88838b186b
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.processTusFiles
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L209-L220
train
java
Prepares all files added for tus uploads. @param assemblyUrl the assembly url affiliated with the tus upload. @throws IOException when there's a failure with file retrieval. @throws ProtocolException when there's a failure with tus upload.
protected void processTusFiles(String assemblyUrl) throws IOException, ProtocolException { tusClient.setUploadCreationURL(new URL(getClient().getHostUrl() + "/resumable/files/")); tusClient.enableResuming(tusURLStore); for (Map.Entry<String, File> entry : files.entrySet()) { process...
Prepares all files added for tus uploads. @param assemblyUrl the assembly url affiliated with the tus upload. @throws IOException when there's a failure with file retrieval. @throws ProtocolException when there's a failure with tus upload. protected void processTusFiles(String assemblyUrl) throws IOException, P...
164
246
555
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
0a77caa25668b3f9bded6d05a82ed3a6ccd44d80c74962afa867a0f56a1e7a97
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
6439bea461242e4d5a99bb98
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.processTusFile
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L230-L241
train
java
Prepares a file for tus upload. @param inptStream {@link InputStream} @param fieldName the form field name assigned to the file. @param assemblyUrl the assembly url affiliated with the tus upload. @throws IOException when there's a failure with reading the input stream.
protected void processTusFile(InputStream inptStream, String fieldName, String assemblyUrl) throws IOException { TusUpload upload = getTusUploadInstance(inptStream, fieldName, assemblyUrl); Map<String, String> metadata = new HashMap<String, String>(); metadata.put("filename", fieldName); ...
Prepares a file for tus upload. @param inptStream {@link InputStream} @param fieldName the form field name assigned to the file. @param assemblyUrl the assembly url affiliated with the tus upload. @throws IOException when there's a failure with reading the input stream. protected void processTusFile(InputStream inptS...
147
271
485
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
872201f733da1fa6a5e3c9ccf477a764abed38ccc5bd677a38362a7bebdc32b1
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
d305db05d3839a959dda52e6
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.processTusFile
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L251-L262
train
java
Prepares a file for tus upload. @param file {@link File} @param fieldName the form field name assigned to the file. @param assemblyUrl the assembly url affiliated with the tus upload. @throws IOException when there's a failure with file retrieval.
protected void processTusFile(File file, String fieldName, String assemblyUrl) throws IOException { TusUpload upload = getTusUploadInstance(file); Map<String, String> metadata = new HashMap<String, String>(); metadata.put("filename", file.getName()); metadata.put("assembly_url", assembl...
Prepares a file for tus upload. @param file {@link File} @param fieldName the form field name assigned to the file. @param assemblyUrl the assembly url affiliated with the tus upload. @throws IOException when there's a failure with file retrieval. protected void processTusFile(File file, String fieldName, String asse...
135
248
447
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
2be2c8f944ad06e014c94b1939aec1070be2aea89726a9c7a8d8051b069f7d28
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
525b2d351dd9cf99cc3faaf6
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.getTusUploadInstance
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L273-L280
train
java
Returns the {@link TusUpload} instance that would be used to upload a file. @param inputStream {@link InputStream} @param fieldName {@link String} the field name assigned to the file @param assemblyUrl {@link String} the assembly url @return {@link TusUpload} @throws IOException when there's a failure with reading the...
protected TusUpload getTusUploadInstance(InputStream inputStream, String fieldName, String assemblyUrl) throws IOException { TusUpload tusUpload = new TusUpload(); tusUpload.setInputStream(inputStream); tusUpload.setFingerprint(String.format("%s-%d-%s", fieldName, inputStream.available(), assemb...
Returns the {@link TusUpload} instance that would be used to upload a file. @param inputStream {@link InputStream} @param fieldName {@link String} the field name assigned to the file @param assemblyUrl {@link String} the assembly url @return {@link TusUpload} @throws IOException when there's a failure with reading the...
143
334
413
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
51d8a2945b2dd40684972bbe0c8d801b7a1fcea59e515752132e37415997d088
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
bfc5d6256ca452d9d58d3d4a
transloadit/java-sdk
src/main/java/com/transloadit/sdk/Assembly.java
Assembly.uploadTusFiles
https://github.com/transloadit/java-sdk/blob/9326c540a66f77b3d907d0b2c05bff1145ca14f7/src/main/java/com/transloadit/sdk/Assembly.java#L299-L318
train
java
Does the actual uploading of files (when tus is enabled). @throws IOException when there's a failure with file retrieval. @throws ProtocolException when there's a failure with tus upload.
protected void uploadTusFiles() throws IOException, ProtocolException { while (uploads.size() > 0) { final TusUploader tusUploader = tusClient.resumeOrCreateUpload(uploads.get(0)); TusExecutor tusExecutor = new TusExecutor() { @Override protected void mak...
Does the actual uploading of files (when tus is enabled). @throws IOException when there's a failure with file retrieval. @throws ProtocolException when there's a failure with tus upload. protected void uploadTusFiles() throws IOException, ProtocolException { while (uploads.size() > 0) { final Tus...
168
188
762
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
fde122197e4eccbe2464d06e33906c0e472e38f865469bedf75bced2da794a76
MIT
permissive
https://github.com/transloadit/java-sdk/blob/main/LICENSE
99de1509642d28ec49f926f8
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/cudnnActivationMode.java
cudnnActivationMode.stringFor
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/cudnnActivationMode.java#L55-L67
train
java
Returns a string representation of the given constant @return A string representation of the given constant
public static String stringFor(int n) { switch (n) { case CUDNN_ACTIVATION_SIGMOID: return "CUDNN_ACTIVATION_SIGMOID"; case CUDNN_ACTIVATION_RELU: return "CUDNN_ACTIVATION_RELU"; case CUDNN_ACTIVATION_TANH: return "CUDNN_ACTIVATION_TANH"; case C...
Returns a string representation of the given constant @return A string representation of the given constant public static String stringFor(int n) { switch (n) { case CUDNN_ACTIVATION_SIGMOID: return "CUDNN_ACTIVATION_SIGMOID"; case CUDNN_ACTIVATION_RELU: return "CUDNN_...
181
108
610
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
650641ccda0824751150ed48a7e6f2a3ada9d7775798551f768383c064e0f755
MIT
permissive
https://github.com/jcuda/jcudnn/blob/master/LICENSE
769c491995bb1de3bc719687
jcuda/jcudnn
JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java
JCudnn.checkResult
https://github.com/jcuda/jcudnn/blob/ce71f2fc02817cecace51a80e6db5f0c7f10cffc/JCudnnJava/src/main/java/jcuda/jcudnn/JCudnn.java#L134-L142
train
java
If the given result is not cudnnStatus.CUDNN_STATUS_SUCCESS and exceptions have been enabled, this method will throw a CudaException with an error message that corresponds to the given result code. Otherwise, the given result is simply returned. @param result The result to check @return The result that was given as th...
private static int checkResult(int result) { if (exceptionsEnabled && result != cudnnStatus.CUDNN_STATUS_SUCCESS) { throw new CudaException(cudnnStatus.stringFor(result)); } return result; }
If the given result is not cudnnStatus.CUDNN_STATUS_SUCCESS and exceptions have been enabled, this method will throw a CudaException with an error message that corresponds to the given result code. Otherwise, the given result is simply returned. @param result The result to check @return The result that was given as th...
149
451
254
CodeSearchNet permissive-repo filter (dataset-level; per-row license absent)
code_search_net
2026-12-05
e07f40173fe717995857fef176fa79ecd5ef1053619d378ddc7a783800ddd3a2
MIT
permissive
https://github.com/jcuda/jcudnn/blob/master/LICENSE