This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (int j = start_index; j < end_index; j++) { | |
float value = get_element(tableau, tableau->rows - 1, j); | |
rsSetElementAt_float(solution_vector, value, j - start_index); | |
} | |
rsSetElementAt_int(result_size, end_index - start_index, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@file:Suppress("PackageDirectoryMismatch") | |
package android.support.v17.leanback.widget | |
import android.os.Bundle | |
import android.support.v17.leanback.app.RowsSupportFragment | |
import android.support.v7.widget.RecyclerView | |
import android.view.View | |
/** | |
* RowsSupportFragment which also remembers the subposition in the rows. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class BaseGridFragment : Fragment() { | |
private var lifecycleCallbacks: FragmentManager.FragmentLifecycleCallbacks? = null | |
/** | |
* If your fragment contains a VerticalGridSupportFragment, it automatically includes a search button you can disable. | |
* However, the focus search listener is not disabled, and it does conflict with our implementation for showing the menu. | |
* Don't forget to save a reference to the callbacks to unsubscribe when destroying the fragment. | |
*/ | |
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@file:Suppress("PackageDirectoryMismatch") | |
package android.support.v17.leanback.widget | |
import android.os.Handler | |
import android.os.Looper | |
import android.view.View | |
import java.lang.ref.WeakReference | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Dialog Fragment with hide animations | |
*/ | |
class AnimatingDialogFragment : DialogFragment() { | |
override fun onCreate(savedInstanceState: Bundle?) { | |
super.onCreate(savedInstanceState) | |
setStyle(DialogFragment.STYLE_NO_FRAME, R.style.TvTheme_Dialog) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val recognizerIntent = Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH) | |
recognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM) | |
// Prefer dutch language for recognition | |
recognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, "nl-NL") | |
// Display text for the user as hint until results are available (only in overlay mode) | |
recognizerIntent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Speak to search...") | |
// Accept partial results if they come | |
recognizerIntent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Copyright (c) 2017 eppz! mobile, Gergely Borbás (SP) | |
// | |
// http://www.twitter.com/_eppz | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | |
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | |
// PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF | |
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<head> | |
... | |
<link rel="stylesheet" href="lib/tau/wearable/theme/default/tau.css"> | |
<link rel="stylesheet" media="all" href="lib/tau/wearable/theme/default/tau.circle.css"> | |
</head> | |
<body> | |
... | |
<script src="js/app.js"></script> | |
<script src="lib/tau/animation/tau.animation.min.js"></script> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var t = tau.animation.target; | |
var digitElement = document.querySelector("#digit-element"); | |
t(digitElement).tween({ | |
translateY : -(finalOffset) * digitSizePx + constantOffset | |
}, { | |
duration : 1000, | |
ease: 'linear' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private val fftAudioProcessor = FFTAudioProcessor() | |
val renderersFactory = object : DefaultRenderersFactory(this) { | |
override fun buildAudioProcessors(): Array<AudioProcessor> { | |
val processors = super.buildAudioProcessors() | |
return processors + fftAudioProcessor | |
} | |
} | |
player = ExoPlayerFactory.newSimpleInstance(this, renderersFactory, DefaultTrackSelector()) |