This file contains 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
@Composable | |
fun NumPad( | |
modifier: Modifier = Modifier, | |
onClick: (NumPadButtonType) -> Unit | |
) { | |
val baseNumbers = listOf( | |
listOf(NumPadButtonType.NUM_1, NumPadButtonType.NUM_2, NumPadButtonType.NUM_3), | |
listOf(NumPadButtonType.NUM_4, NumPadButtonType.NUM_5, NumPadButtonType.NUM_6), | |
listOf(NumPadButtonType.NUM_7, NumPadButtonType.NUM_8, NumPadButtonType.NUM_9), | |
listOf(NumPadButtonType.EMPTY, NumPadButtonType.NUM_0, NumPadButtonType.BACK) |
This file contains 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
@Composable | |
fun CustomLayout( | |
modifier: Modifier = Modifier, | |
content: @Composable CustomLayoutScope.() -> Unit | |
) { | |
val measurePolicy = customLayoutMeasurePolicy() | |
Layout( | |
content = { CustomLayoutScopeInstance.content() }, | |
modifier = modifier, |
This file contains 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
#include <QGuiApplication> | |
#include <QApplication> | |
#include <QQmlApplicationEngine> | |
#include <QItemSelectionModel> | |
#include <QtQml> | |
#include <QQuickView> | |
#include <QTreeView> | |
#include <Contacts.cpp> | |
This file contains 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
TreeView { | |
model: ContactsModel | |
headerVisible: false | |
style: TreeViewStyle { | |
rowDelegate: Rectangle { | |
height: 20 | |
} | |
branchDelegate: Rectangle { |
This file contains 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
RowLayout { | |
Label{ | |
font.pixelSize: 14 | |
text:"Search name/company:" | |
} | |
TextInput { | |
maximumLength: 14 | |
focus: true | |
} | |
} |
This file contains 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
/* | |
* systray.c - systray handling | |
* | |
* Copyright © 2008-2009 Julien Danjou <julien@danjou.info> | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* |
This file contains 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
fun matchFile(pathname: String): Boolean { | |
val file = File(pathname) | |
if(!file.canRead()) return false | |
val stream = file.inputStream() | |
for (offset in startOffset..startOffset+range-1) { | |
stream.channel.position(0) | |
if(stream.available() < (offset + value.size)) { | |
return false |
This file contains 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
import org.bytedeco.javacpp.PointerPointer | |
import org.bytedeco.javacpp.avcodec.avcodec_find_decoder | |
import org.bytedeco.javacpp.avformat.* | |
object ffmpegTest { | |
@JvmStatic | |
fun main(args: Array<String>) { | |
val pFormatCtx = AVFormatContext(null) | |
av_register_all() |
This file contains 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 pFormatCtx = AVFormatContext(null) | |
av_register_all() | |
if (avformat_open_input(pFormatCtx, "E:/music_local/Ujuba na takaburi - Scramble for Africa Scenario Music.mp3", null, null) != 0) { | |
System.exit(-1) | |
} | |
if (avformat_find_stream_info(pFormatCtx, null as PointerPointer<*>?) < 0) { | |
System.exit(-1) | |
} |