: true,
  ),
  Meal(
    id: 'm6',
    categories: [
      'c6',
      'c10',
    ],
    title: 'Delicious Orange Mousse',
    affordability: Affordability.Affordable,
    complexity: Complexity.Hard,
    imageUrl:
        'https://cdn.pixabay.com/photo/2017/05/01/05/18/pastry-2274750_1280.jpg',
    duration: 240,
    ingredients: [
      '4 Sheets of Gelatine',
      '150ml Orange Juice',
      '80g Sugar',
      '300g Yoghurt',
      '200g Cream',
      'Orange Peel',
    ],
    steps: [
      'Dissolve gelatine in pot',
      'Add orange juice and sugar',
      'Take pot off the stove',
      'Add 2 tablespoons of yoghurt',
      'Stir gelatin under remaining yoghurt',
      'Cool everything down in the refrigerator',
      'Whip the cream and lift it under die orange mass',
      'Cool down again for at least 4 hours',
      'Serve with orange peel',
    ],
    isGlutenFree: true,
    isVegan: false,
    isVegetarian: true,
    isLactoseFree: false,
  ),
  Meal(
    id: 'm7',
    categories: [
      'c7',
    ],
    title: 'Pancakes',
    affordability: Affordability.Affordable,
    complexity: Complexity.Simple,
    imageUrl:
        'https://cdn.pixabay.com/photo/2018/07/10/21/23/pancake-3529653_1280.jpg',
    duration: 20,
    ingredients: [
      '1 1/2 Cups all-purpose Flour',
      '3 1/2 Teaspoons Baking Powder',
      '1 Teaspoon Salt',
      '1 Tablespoon White Sugar',
      '1 1/4 cups Milk',
      '1 Egg',
      '3 Tablespoons Butter, melted',
    ],
    steps: [
      'In a large bowl, sift together the flour, baking powder, salt and sugar.',
      'Make a well in the center and pour in the milk, egg and melted butter; mix until smooth.',
      'Heat a lightly oiled griddle or frying pan over medium high heat.',
      'Pour or scoop the batter onto the griddle, using approximately 1/4 cup for each pancake. Brown on both sides and serve hot.'
    ],
    isGlutenFree: true,
    isVegan: false,
    isVegetarian: true,
    isLactoseFree: false,
  ),
  Meal(
    id: 'm8',
    categories: [
      'c8',
    ],
    title: 'Creamy Indian Chicken Curry',
    affordability: Affordability.Pricey,
    complexity: Complexity.Challenging,
    imageUrl:
        'https://cdn.pixabay.com/photo/2018/06/18/16/05/indian-food-3482749_1280.jpg',
    duration: 35,
    ingredients: [
      '4 Chicken Breasts',
      '1 Onion',
      '2 Cloves of Garlic',
      '1 Piece of Ginger',
      '4 Tablespoons Almonds',
      '1 Teaspoon Cayenne Pepper',
      '500ml Coconut Milk',
    ],
    steps: [
      'Slice and fry the chicken breast',
      'Process onion, garlic and ginger into paste and sauté everything',
      'Add spices and stir fry',
      'Add chicken breast + 250ml of water and cook everything for 10 minutes',
      'Add coconut milk',
      'Serve with rice'
    ],
    isGlutenFree: true,
    isVegan: false,
    isVegetarian: false,
    isLactoseFree: true,
  ),
  Meal(
    id: 'm9',
    categories: [
      'c9',
    ],
    title: 'Chocolate Souffle',
    affordability: Affordability.Affordable,
    complexity: Complexity.Hard,
    imageUrl:
        'https://cdn.pixabay.com/photo/2014/08/07/21/07/souffle-412785_1280.jpg',
    duration: 45,
    ingredients: [
      '1 Teaspoon melted Butter',


     {
            _date = date;
            _config = config;
            _isLiveMode = isLiveMode;
            _dataProvider = dataProvider;
            _factory = config.GetBaseDataInstance();
        }

        /// <summary>
        /// Reads the specified <paramref name="source"/>
        /// </summary>
        /// <param name="source">The source to be read</param>
        /// <returns>An <see cref="IEnumerable{BaseData}"/> that contains the data in the source</returns>
        public override IEnumerable<BaseData> Read(SubscriptionDataSource source)
        {
            var fileName = source.Source;

            if (source.TransportMedium == SubscriptionTransportMedium.RemoteFile)
            {
                using var reader = CreateStreamReader(source) as RemoteFileSubscriptionStreamReader;
                if (reader != null)
                {
                    fileName = reader.LocalFileName;
                }
            }

            List<string> entryNames;
            try
            {
                entryNames = _dataProvider.GetZipEntries(fileName);
            }
            catch (Exception err)
            {
                OnInvalidSource(source, err);
                yield break;
            }

            foreach (var entryFileName in entryNames)
            {
                var instance = _factory.Reader(_config, entryFileName, _date, _isLiveMode);
                if (instance != null && instance.EndTime != default(DateTime))
                {
                    yield return instance;
                }
            }
        }

        /// <summary>
        /// Event invocator for the <see cref="BaseSubscriptionDataSourceReader.InvalidSource"/> event
        /// </summary>
        /// <param name="source">The <see cref="SubscriptionDataSource"/> that was invalid</param>
        /// <param name="exception">The exception if one was raised, otherwise null</param>
        private void OnInvalidSource(SubscriptionDataSource source, Exception exception)
        {
            OnInvalidSource(source, exception);
        }
    }
}


;

@$core.Deprecated('Use wifiConfigDescriptor instead')
const WifiConfig_WirelessMode$json = {
  '1': 'WirelessMode',
  '2': [
    {'1': 'WIRELESS_MODE_DEFAULT', '2': 0},
    {'1': 'A_ONLY', '2': 1},
    {'1': 'B_ONLY', '2': 2},
    {'1': 'G_ONLY', '2': 3},
    {'1': 'N_ONLY', '2': 4},
    {'1': 'B_G_MIXED', '2': 5},
    {'1': 'A_N_MIXED', '2': 6},
    {'1': 'G_N_MIXED', '2': 7},
    {'1': 'B_G_N_MIXED', '2': 8},
    {'1': 'A_AN_AC_MIXED', '2': 9},
    {'1': 'AN_AC_MIXED', '2': 10},
    {'1': 'B_G_N_AX_MIXED', '2': 11},
    {'1': 'A_AN_AC_AX_MIXED', '2': 12},
  ],
};

@$core.Deprecated('Use wifiConfigDescriptor instead')
const WifiConfig_HTBandwidth$json = {
  '1': 'HTBandwidth',
  '2': [
    {'1': 'HT_BANDWIDTH_DEFAULT', '2': 0},
    {'1': 'HT_BANDWIDTH_20_MHZ', '2': 1},
    {'1': 'HT_BANDWIDTH_20_OR_40_MHZ', '2': 2},
  ],
};

@$core.Deprecated('Use wifiConfigDescriptor instead')
const WifiConfig_VHTBandwidth$json = {
  '1': 'VHTBandwidth',
  '2': [
    {'1': 'VHT_BANDWIDTH_DEFAULT', '2': 0},
    {'1': 'VHT_BANDWIDTH_DISABLED', '2': 1},
    {'1': 'VHT_BANDWIDTH_80_MHZ', '2': 2},
    {'1': 'VHT_BANDWIDTH_160_MHZ', '2': 3},
    {'1': 'VHT_BANDWIDTH_80_PLUS_80_MHZ', '2': 4},
  ],
};

/// Descriptor for `WifiConfig`. Decode as a `google.protobuf.DescriptorProto`.
final $typed_data.Uint8List wifiConfigDescriptor = $convert.base64Decode(
    'CgpXaWZpQ29uZmlnEiEKDGNvdW50cnlfY29kZRgDIAEoCVILY291bnRyeUNvZGUSLQoSYXBwbH'
    'lfY291bnRyeV9jb2RlGL0IIAEoCFIQYXBwbHlDb3VudHJ5Q29kZRIoChBwaW5fY291bnRyeV9j'
    'b2RlGDUgASgIUg5waW5Db3VudHJ5Q29kZRI0ChZhcHBseV9waW5fY291bnRyeV9jb2RlGL4IIA'
    'EoCFITYXBwbHlQaW5Db3VudHJ5Q29kZRIsChJjdXN0b21fcG93ZXJfdGFibGUYNiABKAhSEGN1'
    'c3RvbVBvd2VyVGFibGUSOAoYYXBwbHlfY3VzdG9tX3Bvd2VyX3RhYmxlGL8IIAEoCFIVYXBwbH'
    'lDdXN0b21Qb3dlclRhYmxlEiUKDnNldHVwX2NvbXBsZXRlGAcgASgIUg1zZXR1cENvbXBsZXRl'
    'EjEKFGFwcGx5X3NldHVwX2NvbXBsZXRlGPIHIAEoCFISYXBwbHlTZXR1cENvbXBsZXRlEhgKB3'
    'ZlcnNpb24YCSABKA1SB3ZlcnNpb24SFwoHbWFjX3dhbhgMIAEoCVIGbWFjV2FuEhcKB21hY19s'


bold;text-anchor:middle;text-shadow:0">TIFF</text><polygon points="112.6 0 171 58.3 112.6 58.3" fill="%23FFB0C9"/><polygon points="170.9 116.5 112.6 58.3 170.9 58.3" style="fill:%23010202;opacity:0.1"/></svg>');-webkit-filter:inherit;filter:inherit}.mime-icon.ico-tr .ico:before{content:"";color:#f1f2f2}.mime-icon.ico-tr .ico:after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" class="icon-model" viewBox="0 0 200 200"> <path d="M171 192.4V58.2l-58.4 0V0H36.5C32.4 0 29 3.4 29 7.6h0v184.9h0c0 4.2 3.4 7.6 7.6 7.6h126.9C167.6 200 171 196.6 171 192.4z" fill="%23FF50AB"/><text class="icon-text" transform="translate(100 171)" width="120" height="50" font-family="Myriad Pro, Myriad, Tahoma-Bold, Helvetica, Arial, sans-serif" font-size="38" style="fill:%23FFF1F2;font-weight:bold;text-anchor:middle;text-shadow:0">TR</text><polygon points="112.6 0 171 58.3 112.6 58.3" fill="%23FF86C5"/><polygon points="170.9 116.5 112.6 58.3 170.9 58.3" style="fill:%23010202;opacity:0.1"/></svg>');-webkit-filter:inherit;filter:inherit}.mime-icon.ico-tsi .ico:before{content:"";color:#f1f2f2}.mime-icon.ico-tsi .ico:after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" class="icon-model" viewBox="0 0 200 200"> <path d="M171 192.4V58.2l-58.4 0V0H36.5C32.4 0 29 3.4 29 7.6h0v184.9h0c0 4.2 3.4 7.6 7.6 7.6h126.9C167.6 200 171 196.6 171 192.4z" fill="%23FF5277"/><text class="icon-text" transform="translate(100 171)" width="120" height="50" font-family="Myriad Pro, Myriad, Tahoma-Bold, Helvetica, Arial, sans-serif" font-size="38" style="fill:%23FFF1F2;font-weight:bold;text-anchor:middle;text-shadow:0">TSI</text><polygon points="112.6 0 171 58.3 112.6 58.3" fill="%23FF92AA"/><polygon points="170.9 116.5 112.6 58.3 170.9 58.3" style="fill:%23010202;opacity:0.1"/></svg>');-webkit-filter:inherit;filter:inherit}.mime-icon.ico-tsp .ico:before{content:"";color:#f1f2f2}.mime-icon.ico-tsp .ico:after{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" class="icon-model" viewBox="0 0 200 200"> <path d="M171 192.4V58.2l-58.4 0V0H36.5C32.4 0 29 3.4 29 7.6h0v184.9h0c0 4.2 3.4 7.6 7.6 7.6h126.9C167.6 200 171 196.6 171 192.4z" fill="%23FF6963"/><text class="icon-text" transform="translate(100 171)" width="120"


(255,255,255,0.5)}.km-ios .km-pages .km-current-page{background:rgba(0,0,0,0.3)}.km-ios .k-slider .k-draghandle,.km-ios .k-slider .k-draghandle:hover{background-color:#fff;background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#ccc),color-stop(1,#fff));background-image:-webkit-linear-gradient(top,#ccc,#fff);background-image:-moz-linear-gradient(top,#ccc,#fff);background-image:-ms-linear-gradient(top,#ccc,#fff);background-image:-o-linear-gradient(top,#ccc,#fff);box-shadow:inset 0 0 0 1px #f9f9f9,1px 1px 3px rgba(0,0,0,.3);-webkit-box-shadow:inset 0 0 0 1px #f9f9f9,1px 1px 3px rgba(0,0,0,.3)}.km-ios .k-slider-selection{background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,0.5)),color-stop(0.15,rgba(0,0,0,0)),color-stop(0.9,rgba(0,0,0,0)),color-stop(1,rgba(0,0,0,0.4))),-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#2a5db2),color-stop(1,#6da9f7));background-image:-webkit-linear-gradient(top,rgba(0,0,0,0.5),rgba(0,0,0,0) 15%,rgba(0,0,0,0) 90%,rgba(0,0,0,0.4)),-webkit-linear-gradient(top,#2a5db2,#6da9f7);background-image:-moz-linear-gradient(top,rgba(0,0,0,0.5),rgba(0,0,0,0) 15%,rgba(0,0,0,0) 90%,rgba(0,0,0,0.4)),-moz-linear-gradient(top,#2a5db2,#6da9f7);background-image:-ms-linear-gradient(top,rgba(0,0,0,0.5),rgba(0,0,0,0) 15%,rgba(0,0,0,0) 90%,rgba(0,0,0,0.4)),-ms-linear-gradient(top,#2a5db2,#6da9f7);background-image:-o-linear-gradient(top,rgba(0,0,0,0.5),rgba(0,0,0,0) 15%,rgba(0,0,0,0) 90%,rgba(0,0,0,0.4)),-o-linear-gradient(top,#2a5db2,#6da9f7)}.km-ios .k-slider-track{background-image:-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,rgba(0,0,0,0.3)),color-stop(0.3,rgba(0,0,0,0)),color-stop(0.9,rgba(0,0,0,0)),color-stop(1,rgba(0,0,0,0.4))),-webkit-gradient(linear,50% 0,50% 100%,color-stop(0,#dbdbdb),color-stop(1,#fff));background-image:-webkit-linear-gradient(top,rgba(0,0,0,0.3),rgba(0,0,0,0) 30%,rgba(0,0,0,0) 90%,rgba(0,0,0,0.4)),-webkit-linear-gradient(top,#dbdbdb,#fff);background-image:-moz-linear-gradient(top,rgba(0,0,0,0.3),rgba(0,0,0,0) 30%,rgba(0,0,0,0) 90%,rgba(0,0,0,0.4)),-moz-linear-gradient(top,#dbdbdb,#fff);background-image:-ms-linear-gradient(top,rgba(0,0,0,0.3),rgba(0,0,0,0


 val context: Context
) {
    private val audioManager = context.getSystemService(AudioManager::class.java)
    private val cameraManager = context.getSystemService(CameraManager::class.java)
    private val powerManager = context.getSystemService(PowerManager::class.java)
    private val statusBarManager = context.getSystemService(StatusBarManager::class.java)
    private val vibrator = context.getSystemService(Vibrator::class.java)

    private val handler = Handler(Looper.getMainLooper())
    private val screenshotHelper = ScreenshotHelper(context)

    private val vibrationEffect = VibrationEffect.createPredefined(VibrationEffect.EFFECT_CLICK)
    private val vibrationAttrs =
            VibrationAttributes.createForUsage(VibrationAttributes.USAGE_HARDWARE_FEEDBACK)

    private val isFpDoubleTapEnabled: Boolean
        get() =
            Settings.System.getIntForUser(context.contentResolver, SETTING_KEY_ENABLE,
                0, UserHandle.USER_CURRENT) == 1

    private val fpDoubleTapAction: Int
        get() =
            Settings.System.getIntForUser(context.contentResolver, SETTING_KEY_ACTION,
                0, UserHandle.USER_CURRENT)

    private var torchOn = false
    private var screenOn = true
    private var screenOnRunnable = Runnable { screenOn = true }

    init {
        cameraManager.registerTorchCallback(
            object: CameraManager.TorchCallback() {
                override fun onTorchModeChanged(cameraId: String, enabled: Boolean) {
                    if (cameraId == REAR_CAMERA_ID) {
                        torchOn = enabled
                    }
                }
            },
            handler
        )
        context.registerReceiver(
            object: BroadcastReceiver() {
                override fun onReceive(context: Context, intent: Intent) {
                    dlog("onReceive: ${intent.action}")
                    when (intent.action) {
                        Intent.ACTION_SCREEN_OFF -> {
                            handler.removeCallbacks(screenOnRunnable)
                            screenOn = false
                        }
                        Intent.ACTION_USER_PRESENT -> {
                            handler.postDelayed(screenOnRunnable, UNLOCK_WAIT_MS)
                        }
                    }
                }
            },
            IntentFilter(Intent.ACTION_USER_PRESENT).apply {
                addAction(Intent.ACTION_SCREEN_OFF)
            }
        )
    }

    fun handleEvent(event: KeyEvent) {
        val enabled = isFpDoubleTapEnabled
        val action = fpDoubleTapAction
        val interactive = powerManager.isInteractive() // TODO: support screen off?
        dlog("handleEvent: enabled=$enabled action=$action"
                + " screenOn=$screenOn interactive=$interactive")
        if (!screenOn || !enabled || !interactive || event.action != KeyEvent.ACTION_UP) {
            dlog("wont handle")
            return
        }
        when (action) {
            1 -> takeScreenshot()
            2 -> launchAssist(event.eventTime)
            3 -> playPauseMedia()
            4 -> showNotifications()
            5 -> launchCamera()
            6 -> toggleFlashlight()
            7 -> toggleRingerMode(AudioManager.RINGER_MODE_SILENT)
            8 -> toggleRingerMode(AudioManager.RINGER_MODE_VIBRATE)
            9 -> showVolumePanel()
            10 -> goToSleep()
            else -> Log.e(TAG, "unsupported action: $action")
        }
    }

    private fun takeScreenshot() {
        dlog("takeScreenshot")
        screenshotHelper.takeScreenshot(SCREENSHOT_VENDOR_GESTURE, handler, null)
    }

    private fun launc


R, false))
    val dynamicColor = _dynamicColor.asStateFlow()

    fun changeThemeMode(themeMode: ThemeMode) {
        _themeMode.value = themeMode
        preferences.edit { putEnum(KEY_THEME_MODE, themeMode) }
    }

    fun changeCustomColor(customColor: Int) {
        _customColor.value = customColor
        preferences.edit { putInt(KEY_CUSTOM_COLOR, customColor) }
    }

    fun applyImageColor(imageColor: Int) {
        _customColor.value = imageColor
    }

    fun changeDynamicColor(dynamicTheme: Boolean) {
        _dynamicColor.value = dynamicTheme
        preferences.edit { putBoolean(KEY_DYNAMIC_COLOR, dynamicTheme) }
    }
}package com.lanlinju.animius.presentation.navigation

import com.lanlinju.animius.domain.model.Episode
import com.lanlinju.animius.util.SourceMode
import kotlinx.serialization.Serializable
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json

@Serializable
sealed class Screen {
    @Serializable
    object Main : Screen()

    @Serializable
    object Search : Screen()

    @Serializable
    object HistoryScreen : Screen()

    @Serializable
    object Download : Screen()

    @Serializable
    object Appearance : Screen()

    @Serializable
    object DanmakuSettings : Screen()

    @Serializable
    data class DownloadDetail(val detailUrl: String, val title: String) : Screen()

    @Serializable
    data class AnimeDetail(val detailUrl: String, val mode: SourceMode) : Screen()

    @Serializable
    data class VideoPlayer(val parameters: String) : Screen()
}

@Serializable
data class PlayerParameters(
    val title: String,              /* 动漫名称 */
    val episodeIndex: Int,          /* 剧集列表索引 */
    val episodes: List<Episode>,    /* 剧集列表 */
    val mode: SourceMode?,           /* 来源 */
    val isLocalVideo: Boolean = false,   /* 是否为本地视频 */
) {
    companion object {
        suspend fun serialize(
            title: String,
            episodeIndex: Int,
            episodes: List<Episode>,
            mode: SourceMode? = null,
            isLocalVideo: Boolean = false
        ): String {
            return Json.encodeToString(
                PlayerParameters(
                    title,
                    episodeIndex,
                    episodes,
                    mode,
                    isLocalVideo,
                )
            )
        }

        suspend fun deserialize(value: String): PlayerParameters {
            return Json.decodeFromString<PlayerParameters>(value)
        }
    }
}

/*
val PlayerParametersType = NavType(
    parseValue = { value ->
        Json.decodeFromString<PlayerParameters>(value)
    },
    serializeAsValue = { value ->
        Json.encodeToString(value)
    }
)

val PlayerParametersType = object : NavType<PlayerParameters>(isNullableAllowed = false) {
    override fun get(bundle: Bundle, key: String): PlayerParameters? {
        return bundle.getString(key)?.let { Json.decodeFromString(it) }
    }

    override fun parseValue(value: String): PlayerParameters {
        return Json.decodeFromString(value)
    }

    override fun put(bundle: Bundle, key: String, value: PlayerParameters) {
        bundle.putString(key, Json.encodeToString(value))
    }
}

inline fun <reified T> NavType(
    crossinline parseValue: (String) -> T,
    crossinline serializeAsValue: (T) -> String,
    isNullableAllowed: Boolean = false
) = object : NavType<T>(isNullableAllowed = isNullableAllowed) {

    override fun get(bundle: Bundle, key: String): T? =
        bundle.getString(key)?.let(::parseValue)

    override fun put(bundle: Bundle, key: String, value: T) =
        bundle.putString(key, serializeAsValue(value))

    override


(noChiefExists),
            fn.Compose{fn.Not, fn.Null, fn.Curry(fn.Filter, 2)(plyMeta.isCP), player.GetAll}
        },
        fn.Compose{fn.Not, fn.Curry(fn.Flip(plyMeta.getDarkRPVar), 2)("HasGunlicense")},
        fn.Compose{fn.Not, fn.Curry(fn.GetValue, 2)("LicenseRequested")}
    }
}

DarkRP.declareChatCommand{
    command = "givelicense",
    description = "Give someone a gun license",
    delay = 1.5,
    condition = fn.FOr{
        plyMeta.isMayor, -- Mayors can hand out licenses
        fn.FAnd{plyMeta.isChief, noMayorExists}, -- Chiefs can if there is no mayor
        fn.FAnd{plyMeta.isCP, noChiefExists, noMayorExists} -- CP's can if there are no chiefs nor mayors
    }
}

DarkRP.declareChatCommand{
    command = "demotelicense",
    description = "Start a vote to get someone's license revoked.",
    delay = 1.5,
    tableArgs = true
}

DarkRP.declareChatCommand{
    command = "setlicense",
    description = "Forcefully give a player a license.",
    delay = 1.5
}

DarkRP.declareChatCommand{
    command = "unsetlicense",
    description = "Forcefully revoke a player's license.",
    delay = 1.5
}


-hover:hover){.control-pbhJWNrt:hover .arrow-pbhJWNrt{opacity:1}}.arrow-pbhJWNrt{all:unset;align-items:center;border-radius:0 4px 4px 0;bottom:1px;box-sizing:border-box;color:#131722;cursor:default;display:flex;justify-content:center;opacity:0;overflow:hidden;position:absolute;right:0;top:1px;width:11px}html.theme-dark .arrow-pbhJWNrt{color:#868993}@media (any-hover:hover){.arrow-pbhJWNrt:hover{color:#000}html.theme-dark .arrow-pbhJWNrt:hover{color:#868993}}.arrow-pbhJWNrt .arrowIcon-pbhJWNrt,.arrow-pbhJWNrt .arrowIcon-pbhJWNrt svg{transition:transform .5s cubic-bezier(.175,.885,.32,1.275)}.arrow-pbhJWNrt .arrowIcon-pbhJWNrt svg{fill:currentColor;display:block;height:7px;width:4px}.feature-mobiletouch .control-pbhJWNrt .arrow-pbhJWNrt,.isOpened-pbhJWNrt .control-pbhJWNrt .arrow-pbhJWNrt{transform:translateX(0)}@media (any-hover:hover){.control-pbhJWNrt:hover .arrow-pbhJWNrt{transform:translateX(0)}}.feature-mobiletouch .control-pbhJWNrt .arrow-pbhJWNrt.hover-pbhJWNrt,.isOpened-pbhJWNrt .control-pbhJWNrt .arrow-pbhJWNrt.hover-pbhJWNrt{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}@media (any-hover:hover){.control-pbhJWNrt:hover .arrow-pbhJWNrt.hover-pbhJWNrt,.control-pbhJWNrt:hover .arrow-pbhJWNrt:hover,.feature-mobiletouch .control-pbhJWNrt .arrow-pbhJWNrt:hover,.isOpened-pbhJWNrt .control-pbhJWNrt .arrow-pbhJWNrt:hover{background-color:var(--tv-color-toolbar-button-background-hover,#f0f3fa)}}html.theme-dark .feature-mobiletouch .control-pbhJWNrt .arrow-pbhJWNrt.hover-pbhJWNrt,html.theme-dark .isOpened-pbhJWNrt .control-pbhJWNrt .arrow-pbhJWNrt.hover-pbhJWNrt{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}@media (any-hover:hover){html.theme-dark .control-pbhJWNrt:hover .arrow-pbhJWNrt.hover-pbhJWNrt,html.theme-dark .control-pbhJWNrt:hover .arrow-pbhJWNrt:hover,html.theme-dark .feature-mobiletouch .control-pbhJWNrt .arrow-pbhJWNrt:hover,html.theme-dark .isOpened-pbhJWNrt .control-pbhJWNrt .arrow-pbhJWNrt:hover{background-color:var(--tv-color-toolbar-button-background-hover,#2a2e39)}}.feature-mobiletouch .control-pbhJWNrt .arrow-pbhJWNrt.hover-pbhJWNrt svg,.isOpened-pbhJWNrt .control-pbhJWNrt .arrow-pbhJWNrt.hover-pbhJWNrt svg{transform:translateX(-1px)}@media (any-hover:hover){.control-pbhJWNrt:hover .arrow-pbhJWNrt.hover-pbhJWNrt svg,.control-pbhJWNrt:hover .arrow-pbhJWNrt:hover svg,.feature-mobiletouch .control-pbhJWNrt .arrow-pb


Name = "grid";

		spyOn(Util, "directoryExists").and.callFake(function name(myParam) {
			if (myParam.endsWith(defaultComponentName)) {
				return true;
			} else {
				return false;
			}
		});

		expect(Util.getAvailableName(defaultComponentName, false)).toEqual("grid 1");
		expect(Util.getAvailableName(defaultComponentName, false, "jQuery")).toEqual("grid 1");
		expect(Util.getAvailableName(defaultComponentName, false, "React")).toEqual("grid 1");
		expect(Util.getAvailableName(defaultComponentName, false, "Angular", "ig-ts")).toEqual("grid 1");
		expect(Util.getAvailableName(defaultComponentName, false, "Angular", "igx-ts")).toEqual("grid 1");
		expect(Util.directoryExists).toHaveBeenCalledTimes(10);
	});

	it("should read the existing component view name and return incremented view name ", () => {
		let defaultViewName = "editors-calculation-form";
		spyOn(Util, "directoryExists").and.callFake(function name(myParam) {
			if (myParam.endsWith(defaultViewName)) {
				return true;
			} else {
				return false;
			}
		});

		expect(Util.getAvailableName("editors-calculation-form", false)).toEqual("editors-calculation-form 1");
		expect(Util.getAvailableName("editors-calculation-form", false, "jQuery")).toEqual("editors-calculation-form 1");
		expect(Util.getAvailableName("editors-calculation-form", false, "Angular", "ig-ts")).
			toEqual("editors-calculation-form 1");
		defaultViewName = "awesome-grid";
		expect(Util.getAvailableName("awesome-grid", false, "Angular", "igx-ts")).toEqual("awesome-grid 1");
		expect(Util.directoryExists).toHaveBeenCalledTimes(8);
	});

	describe("Relative paths", () => {
		it("Creates correct relative path for child structure", async done => {

			// default use, shared root
			expect(Util.relativePath(
				"C:\\src\\app\\app-routing.module.ts",
				"C:\\src\\app\\carousel\\carousel.component.ts", true, true
			))
			.toBe("./carousel/carousel.component", "Shared Win root, file to file => posix ");
			expect(Util.relativePath(
				"/home/app/app.module.ts",
				"/home/app/grid/grid.component.ts", true, true
			))
			.toBe("./grid/grid.component", "Shared posix root, file to file => posix ");

			expect(Util.relativePath(
				"C:\\home\\app-routing.module.ts",
				"C:/home/app/grid/grid.component.ts", true, false
			))
			.toBe("./app/grid/grid.component.ts", "Win style to posix file, keep ext => posix");
			done();
		});

		it("Creates correct relative path for parent dir", async done => {
			// going up levels
			expect(Util.relativePath(
				"C:\\common\\folder1\\folder2\\folder3\\file.ts",
				"C:\\common\\dir1\\dir2\\target.ts", false
			))
			.toBe("..\\..\\..\\dir1\\dir2\\target", "Win style, file to file => win");

			expect(Util.relativePath(
				"C:\\Work\\git\\Ignite-UI-CLI\\spec\\unit\\ts-transforms\\TypeScriptUtils-spec.ts",
				"C:\\Work\\git\\Ignite-UI-CLI\\lib\\project-utility\\TypeScriptUtils.ts", true
			))
			// same as top level import above
			.toBe("../../../lib/project-utility/TypeScriptUtils", "Win style, file to file => posix");

			expect(Util.relativePath(
				"C:\\common\\folder1\\folder2\\folder3\\",
				"C:\\common\\dir1\\dir2\\target.ts", true
			))
			.t


tive_logo_2016.png",
                "https://www.youtube.com/watch?v=b6R9-7KZ8YM"
            )
        )
        linkList.add(
            Triple(
                "Sky News English",
                "https://upload.wikimedia.org/wikipedia/en/thumb/5/57/Sky_News_logo.svg/1024px-Sky_News_logo.svg.png",
                "https://www.youtube.com/watch?v=w9uJg68CV4g"
            )
        )

        filteredLinkList.addAll(linkList)
        customAdapter.notifyDataSetChanged()
    }

    @SuppressLint("NotifyDataSetChanged")
    private fun prepareItemsMusic() {
        linkList.add(
            Triple(
                "Afrobeats",
                "",
                "https://stream.ecable.tv/afrobeats/index.m3u8"
            )
        )
        linkList.add(
            Triple(
                "Artist Aloud",
                "",
                "https://live.hungama.com/linear/artist-aloud/playlist.m3u8" //nejde
            )
        )
        linkList.add(
            Triple(
                "88 Stereo",
                "",
                "http://k3.usastreams.com/CableLatino/88stereo/playlist.m3u8"
            )
        )
        linkList.add(
            Triple(
                "1HD Music Television",
                "",
                "http://103.199.161.254/Content/7smusic/Live/Channel(7smusic)/index.m3u8"
            )
        )
        linkList.add(
            Triple(
                "30A Music",
                "",
                "https://30a-tv.com/music.m3u8"
            )
        )
        linkList.add(
            Triple(
                "9XM",
                "",
                "https://d2q8p4pe5spbak.cloudfront.net/bpk-tv/9XM/9XM.isml/index.m3u8"
            )
        )
        linkList.add(
            Triple(
                "101 Tele Antequera",
                "",
                "https://limited38.todostreaming.es/live/101tv-AntequeraHD.m3u8"
            )
        )
        linkList.add(
            Triple(
                "A2i Music",
                "",
                "https://stream.sen-gt.com/A2iMusic/myStream/playlist.m3u8"
            )
        )
        linkList.add(
            Triple(
                "A Son de Salsa",
                "",
                "https://cloud01.mipaneltv.xyz/asondesalsa/asondesalsa/playlist.m3u8"
            )
        )
        linkList.add(
            Triple(
                "Activa TV",
                "",
                "https://streamtv.mediasector.es/hls/activatv/.m3u8"
            )
        )
        linkList.add(
            Triple(
                "Arabica TV",
                "",
                "http://istream.binarywaves.com:8081/hls/arabica/playlist.m3u8"
            )
        )
        linkList.add(
            Triple(
                "Baeble Music",
                "",
                "https://dai2.xumo.com/amagi_hls_data_xumo1212A-redboxbaeble/CDN/playlist.m3u8"
            )
        )
        linkList.add(
            Triple(
                "Baraza TV",
                "",
                "https://eco.streams.ovh/BarazaTV/Barazaraza


me(draw);
}

canvas.addEventListener("mouseover", function (e) {
  raf = window.requestAnimationFrame(draw);
});

canvas.addEventListener("mouseout", function (e) {
  window.cancelAnimationFrame(raf);
});

ball.draw();
```

{{EmbedLiveSample("Первое_демо", "610", "310")}}

## Ускорение

Чтобы сделать движение более реальным, вы можете играть со скоростью, например так:

```js
ball.vy *= 0.99;
ball.vy += 0.25;
```

Это замедляет вертикальную скорость каждого кадра, так что мяч будет просто отскакивать от пола в конце.

```html hidden
<canvas id="canvas" style="border: 1px solid" width="600" height="300"></canvas>
```

```js hidden
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var raf;

var ball = {
  x: 100,
  y: 100,
  vx: 5,
  vy: 2,
  radius: 25,
  color: "blue",
  draw: function () {
    ctx.beginPath();
    ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2, true);
    ctx.closePath();
    ctx.fillStyle = this.color;
    ctx.fill();
  },
};

function draw() {
  ctx.clearRect(0, 0, canvas.width, canvas.height);
  ball.draw();
  ball.x += ball.vx;
  ball.y += ball.vy;
  ball.vy *= 0.99;
  ball.vy += 0.25;

  if (ball.y + ball.vy > canvas.height || ball.y + ball.vy < 0) {
    ball.vy = -ball.vy;
  }
  if (ball.x + ball.vx > canvas.width || ball.x + ball.vx < 0) {
    ball.vx = -ball.vx;
  }

  raf = window.requestAnimationFrame(draw);
}

canvas.addEventListener("mouseover", function (e) {
  raf = window.requestAnimationFrame(draw);
});

canvas.addEventListener("mouseout", function (e) {
  window.cancelAnimationFrame(raf);
});

ball.draw();
```

{{EmbedLiveSample("Second_demo", "610", "310")}}

## Скользящий эффект

До сих пор мы использовали метод {{domxref("CanvasRenderingContext2D.clearRect", "clearRect")}}, когда очищали предыдущий кадр. Если заменить этот метод на {{domxref("CanvasRenderingContext2D.fillRect", "fillRect")}} с полу-прозрачным стилем, можно легко создать эффект скольжения.

```js
ctx.fillStyle = "rgba(255, 255, 255, 0.3)";
ctx.fillRect(0, 0, canvas.width, canvas.height);
```

```html hidden
<canvas id="canvas" style="border: 1px solid" width="600" height="300"></canvas>
```

```js hidden
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
var raf;

var ball = {
  x: 100,
  y: 100,
  vx: 5,
  vy: 2,
  radius: 25,
  color: "blue",
  draw: function () {
    ctx.beginPath();
    ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2, true);
    ctx.closePath();
    ctx.fillStyle


tion (string) {
            return string.replace(/،/g, ',');
        },
        postformat: function (string) {
            return string.replace(/,/g, '،');
        },
        week : {
            dow : 1, // Monday is the first day of the week.
            doy : 4  // The week that contains Jan 4th is the first week of the year.
        }
    });

    return sd;

})));
//! moment.js locale configuration

;(function (global, factory) {
   typeof exports === 'object' && typeof module !== 'undefined'
       && typeof require === 'function' ? factory(require('../moment')) :
   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
   factory(global.moment)
}(this, (function (moment) { 'use strict';

    var symbolMap = {
        '1': '১',
        '2': '২',
        '3': '৩',
        '4': '৪',
        '5': '৫',
        '6': '৬',
        '7': '৭',
        '8': '৮',
        '9': '৯',
        '0': '০'
    },
    numberMap = {
        '১': '1',
        '২': '2',
        '৩': '3',
        '৪': '4',
        '৫': '5',
        '৬': '6',
        '৭': '7',
        '৮': '8',
        '৯': '9',
        '০': '0'
    };

    var bn = moment.defineLocale('bn', {
        months : 'জানুয়ারী_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split('_'),
        monthsShort : 'জানু_ফেব_মার্চ_এপ্র_মে_জুন_জুল_আগ_সেপ্ট_অক্টো_নভে_ডিসে'.split('_'),
        weekdays : 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split('_'),
        weekdaysShort : 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'),
        weekdaysMin : 'রবি_সোম_মঙ্গ_বুধ_বৃহঃ_শুক্র_শনি'.split('_'),
        longDateFormat : {
            LT : 'A h:mm সময়',
            LTS : 'A h:mm:ss সময়',
            L : 'DD/MM/YYYY',
            LL : 'D MMMM YYYY',
            LLL : 'D MMMM YYYY, A h:mm সময়',
            LLLL : 'dddd, D MMMM YYYY, A h:mm সময়'
        },
        calendar : {
            sameDay : '[আজ] LT',
            nextDay : '[আগামীকাল] LT',
            nextWeek : 'dddd, LT',
            lastDay : '[গতকাল] LT',
            lastWeek : '[গত] dddd, LT',
            sameElse : 'L'
        },
        relativeTime : {
            future : '%s পরে',
            past : '%s আগে',
            s : 'কয়েক সে


r1, #1
	ldr	r0, [r4, #2308]
	bl	BsGet
	strb	r0, [r10, #1]!
	cmp	r10, r5
	bne	.L1350
	mov	r1, #1
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #1
	strb	r0, [r6, #205]
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #1
	strb	r0, [r6, #211]
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #1
	strb	r0, [r6, #217]
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #16
	strb	r0, [r6, #223]
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #16
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #12
	ldr	r0, [r4, #2308]
	bl	BsGet
	b	.L1349
.L1378:
	mov	r1, #2
	ldr	r0, [r0, #2308]
	bl	BsGet
	mov	r1, #1
	ldr	r9, .L1380+4
	mov	r7, r5
	mov	r6, #0
	str	r0, [r5, #276]
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #5
	strb	r0, [r5]
	ldr	r0, [r4, #2308]
	bl	BsGet
	str	r0, [r5, #272]
.L1341:
	mov	r3, r6
	ldr	ip, [r9, #68]
	ldr	r2, .L1380+8
	mov	r1, #100
	sub	r0, fp, #144
	add	r6, r6, #1
	blx	ip
	mov	r1, #1
	ldr	r0, [r4, #2308]
	bl	BsGet
	cmp	r6, #32
	strb	r0, [r7, #1]!
	bne	.L1341
	mov	r1, #1
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #1
	strb	r0, [r5, #33]
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #1
	strb	r0, [r5, #34]
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #1
	strb	r0, [r5, #35]
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #16
	strb	r0, [r5, #36]
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #16
	ldr	r0, [r4, #2308]
	bl	BsGet
	mov	r1, #12
	ldr	r0, [r4, #2308]
	bl	BsGet
	ldr	r2, [r5, #272]
	add	r3, r4, #81920
	mov	r1, #8
	str	r2, [r3, #3808]
	ldrb	r2, [r5, #2]	@ zero_extendqisi2
	str	r2, [r3, #3812]
	ldrb	r2, [r5, #3]	@ zero_extendqi


ang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s
// RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/b.pcm %s
// RUN: not %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s -DERRORS 2>&1 | FileCheck %s --check-prefix=MISSING-B
// RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm -fmodule-map-file=%t/modulemap.moved %s
// RUN: not %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm -fmodule-map-file=%t/modulemap.moved -std=c++1z %s
// RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm -fmodule-map-file=%t/modulemap.moved -std=c++1z -Wno-module-file-config-mismatch %s -Db=a
// RUN: rm %t/a.h
// RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/a.pcm %s -verify
// RUN: %clang_cc1 -fmodules -I %t -fmodule-file=%t/b.pcm %s -verify

// Oftentimes on Windows there are open handles, and deletion will fail.
// REQUIRES: can-remove-opened-file

#include "a.h" // expected-error {{file not found}}
int x = b;

#ifdef ERRORS
int y = a2<int>;
// CHECK: In module 'a':
// CHECK-NEXT: a.h:1:45: error:

// MISSING-B: could not find file '{{.*}}b.h'
// MISSING-B-NOT: please delete the module cache
#endif

// RUN: not %clang_cc1 -fmodules -I %t -emit-module -fmodule-name=a -x c++ /dev/null -o %t/c.pcm \
// RUN:                -fmodules-embed-file=%t/does-not-exist 2>&1 | FileCheck %s --check-prefix=MISSING-EMBED
// MISSING-EMBED: fatal error: file '{{.*}}does-not-exist' specified by '-fmodules-embed-file=' not found
// RUN: rm -rf %t
// RUN: %clang_cc1 -x c++ -fmodules                   %S/Inputs/explicit-build-overlap/def.map -fmodule-name=a -emit-module -o %t/a.pcm
// RUN: %clang_cc1 -x c++ -fmodules                   %S/Inputs/explicit-build-overlap/def.map -fmodule-name=b -emit-module -o %t/ba.pcm -fmodule-file=%t/a.pcm
// RUN: %clang_cc1 -x c++ -fmodules -fmodule-map-file=%S/Inputs/explicit-build-overlap/use.map -fmodule-name=use -fmodule-file=%t/ba.pcm %s -verify -I%S/Inputs/explicit-build-overlap -fmodules-decluse
//
// RUN: %clang_cc1 -x c++ -fmodules                   %S/Inputs/explicit-build-overlap/def.map -fmodule-name=b -emit-module -o %t/b.pcm
// RUN: %clang_cc1 -x c++ -fmodules                   %S/Inputs/explicit-build-overlap/def.map -fmodule-name=a -emit-module -o %t/ab.pcm -fmodule-file=%t/b.pcm
// RUN: %clang_cc1 -x c++ -fmodules -fmodule-map-file=%S/Inputs/explicit-build-overlap/use.map -fmodule-name=use -fmodule-file=%t/ab.pcm %s -verify -


e_lines = vim.split(source_text, "\n")

        local targe_text = [[
foo
bar
baz
]]
        local target_lines = vim.split(targe_text, "\n")

        -- This edit replaces the full document
        local full_replacement_edit =
            lsp_edit(table.concat(target_lines, "\n"), 0, 0, #source_lines - 1, source_lines[#source_lines]:len())

        local minimal_edits = format.compute_minimal_edits(source_lines, full_replacement_edit)

        -- Only contain edits that remove spaces of the source document to match the target
        local expected = {
            lsp_edit("", 1, 0, 1, 4),
            lsp_edit("", 2, 0, 2, 8),
        }

        eq(expected, minimal_edits)
    end)
end)


s(req_dict):
    for _type, settings in REQUIREMENT_TYPES.items():
        key = settings['prefix'] + '_requirements'
        req_dict[key] = _create_sorted_commented_map(req_dict.get(key))

YAML_MISSING = (
    'bear-requirements.yaml not found or is empty. '
    'Please fetch it from the repository.'
)

if __name__ == '__main__':
    args = get_args()

    logging.basicConfig(
        level=logging.DEBUG if args.debug else logging.WARNING,
    )

    bear_dirs = [PROJECT_BEAR_DIR]

    if args.bear_dirs is not None:
        bear_dirs.extend(args.bear_dirs)

    all_bears = get_all_bears(bear_dirs)

    bear_requirements = get_all_requirements(all_bears)
    instance_dict = merge_requirements(bear_requirements)

    requirements = CommentedMap()
    requirements.yaml_set_start_comment(
        'This is an automatically generated file.\n'
        'And should not be edited by hand.')

    requirements['overrides'] = 'pm-requirements.yaml'
    get_bear_requirement_metadata(bear_requirement_sets=instance_dict,
                                  storage=requirements, old_labels=True)

    if args.update or args.check:
        input_file_path = os.path.join(PROJECT_DIR, BEAR_REQUIREMENTS_YAML)

        try:
            input_file = open(input_file_path, 'r')
        except FileNotFoundError:
            print(YAML_MISSING)
            exit(1)

        input_requirments = yaml.load(input_file)

        if not input_requirments:
            print(YAML_MISSING)
            exit(1)

        new_requirments = copy.deepcopy(input_requirments)
        deep_update(new_requirments, requirements)

        if args.update:
            requirements = new_requirments

        if args.check:
            changed = deep_diff(input_requirments, new_requirments)
            if changed:
                yaml.dump(changed, sys.stdout)
                exit(1)

    sort_requirements(requirements)

    if args.output == '-':
        output = sys.stdout
    else:
        output = open(args.output, 'w')

    yaml.dump(requirements, output)
    output.close()

    language_requirements = get_languages(all_bears)
    bear_languages = language_requirements
    language_requirements = _create_sorted_commented_map(language_requirements)
    file_path = os.path.join(PROJECT_DIR, BEAR_LANGUAGES_YAML)
    with open(file_path, 'w') as outfile:
        yaml.indent(mapping=2, sequence=4, offset=2)
        yaml.dump(language_requirements, outfile)

    metadata = get_metadata(all_bears, bear_requirements, bear_languages)
    metadata = _create_sorted_commented_map(metadata)
    metadata = {'bear_metadata': metadata}
    file_path = os.path.join(PROJECT_DIR, BEAR_METADATA_YAML)
    with open(file_path, 'w') as outfile:
        yaml.indent(mapping=2, sequence=4, offset=2)
        yaml.dump(metadata, outfile)


K
		final TreePath topPath = getCTargetViewer().getTopElementPath();
		assertNotNull("Top item should not be null!", topPath); //$NON-NLS-1$
		TreePathWrapper.assertEqual(originalTopPath, topPath);
	}

	/**
	 * Test for bug 326965.

	 * This test verifies that canceling a reveal pending state delta is
	 * properly handled when a new reveal delta is received from the model.
	 */
	@Test
	public void testRestoreRevealAfterRevealCancel() throws Exception {
		TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(getCTargetViewer());
		TestModel model = TestModel.simpleMultiLevel();

		// Expand all
		fViewer.setAutoExpandLevel(-1);

		// Create the listener.
		fListener.reset(TreePath.EMPTY, model.getRootElement(), -1, false, false);

		// Set the input into the view and update the view.
		fViewer.setInput(model.getRootElement());
		waitWhile(t -> !fListener.isFinished(), createListenerErrorMessage());
		model.validateData(fViewer, TreePath.EMPTY, true);

		// Stop autopopulating the view.
		autopopulateAgent.dispose();

		// Set top index of view to element "3" and wait for view to repaint.
		getCTargetViewer().reveal(TreePath.EMPTY, 2);
		TestUtil.processUIEvents();

		// Trigger save of state.
		fListener.reset();
		fViewer.setInput(null);
		while (!fListener.isFinished(STATE_SAVE_COMPLETE)) {
			Thread.sleep(0);
		}

		// Set input back to root element.
		// Note: Wait only for the processing of the delta and the start of state restore, not for all updates
		fListener.reset();
		TreePath elementPath = model.findElement("3"); //$NON-NLS-1$
		fListener.addUpdates(fViewer, elementPath, model.getElement(elementPath), 1, STATE_UPDATES);
		fViewer.setInput(model.getRootElement());
		waitWhile(t -> !fListener.isFinished(MODEL_CHANGED_COMPLETE | STATE_UPDATES), createListenerErrorMessage());

		// Update the viewer with new selection delta to something new in the view
		ModelDelta revealDelta = model.makeElementDelta(model.findElement("2.1"), IModelDelta.REVEAL); //$NON-NLS-1$

		// Wait for the second model delta to process
		fListener.reset();
		model.postDelta(revealDelta);
		waitWhile(t -> !fListener.isFinished(MODEL_CHANGED_COMPLETE | CONTENT_SEQUENCE_COMPLETE), createListenerErrorMessage());

		// Clear view then reset it again.
		fListener.reset();
		fViewer.setInput(null);
		while (!fListener.isFinished(STATE_SAVE_COMPLETE)) {
			Thread.sleep(0);
		}

		autopopulateAgent = new TreeModelViewerAutopopulateAgent(getCTargetViewer());
		fViewer.setInput(model.getRootElement());
		waitWhile(t -> !fListener.isFinished(STATE_RESTORE_COMPLETE), createListenerErrorMessage());
		autopopulateAgent.dispose();
	}

	/**
	 * Test for bug 326965.

	 * This test verifies that canceling a reveal pending state delta is
	 * properly handled when a new reveal delta is received from the model.
	 */
	@Test
	public void testRestoreRevealAfterRevealCancel2() throws Exception {
		if (Platform.getOS().equals(Platform.OS_MACOSX)) {
			// skip this test on Mac - see bug 327557
			return;
		}
		TreeModelViewerAutopopulateAgent autopopulateAgent = new TreeModelViewerAutopopulateAgent(getCTargetViewer());
		TestModel model = TestModel.simpleMultiLevel();

		// Exp


.unplot(this.x, 4);
        this.x += 1;
        led.plot(this.x, 4);
    }
    stepLeft() {
        led.unplot(this.x, 4);
        this.x -= 1;
        led.plot(this.x, 4);
    }
}

class Target {
    x: number
    ship: Ship
    constructor(shp: Ship) {
        this.x = 0
        this.ship = shp
    }
    targetForever() {
        while (fail != 3) {
            basic.clearScreen();
            led.plot(ship.x, 4);
            resulting = 1;
            this.x = randint(0, 4);
            led.plot(this.x, 0);
            while (resulting == 1) {
                basic.pause(1000);
            }
        }
        basic.showNumber(point);
    }
}
class Bullet {
    x: number
    ship: Ship
    target: Target
    constructor(shp: Ship, trgt: Target) {
        this.x = 0;
        this.ship = shp;
        this.target = trgt;
    }
    shoot() {
        this.x = ship.x;
        for (let i = 3; i > 0; i--) {
            led.plot(this.x, i);
            basic.pause(100);
            led.plot(this.x, i);
        }
        bullet.resulting();
    }
    resulting() {
        if (target.x == this.x) {
            point += 1;
            basic.clearScreen();
            basic.showLeds(`
            . . . . .
            . . . . #
            . . . # .
            # . # . .
            . # . . .
            `)
        } else {
            fail += 1;
            basic.clearScreen();
            basic.showLeds(`
            # . . . #
            . # . # .
            . . # . .
            . # . # .
            # . . . #
            `)
        }
        basic.pause(100);
        resulting = 0;
    }
}
let ship = new Ship;
let target = new Target(ship);
let bullet = new Bullet(ship, target);
led.plot(ship.x, 4);
basic.forever(function () {
    target.targetForever();
})
input.onButtonPressed(Button.A, function () {
    if (ship.x != 0) {
        ship.stepLeft();
    }
})
input.onButtonPressed(Button.B, function () {
    if (ship.x != 4) {
        ship.stepRight();
    }
})
input.onButtonPressed(Button.AB, function () {
    bullet.shoot();
})
const noValue = {};
export class LazyDictionary<TValue> {
    private values: {[key: string]: () => TValue} = {}

    /** Add an item to the dictionary if another item does not exist. Returns the added or existing item. Caches items after first evaluation */
    tryAdd(key: string, value: () => TValue) {
        if (this.values[key]) {
            return this.values[key];
        }

        let val: TValue = noValue as any;
        return this.values[key] = function () {
            return val === noValue
                ? (val = value())
                : val;
        };
    }

    tryGet(key: string): (() => TValue) | null {
        return this.values[key] || null;
    }

    getLazy(key: string): () => TValue {
        return () => {
            const result = this.tryGetLazy(key)();
            if (result === undefined) throw this.buildKeyNotFoundError(key);

            return result;
        };
    }

    tryGetLazy(key: string): () => (TValue | undefined) {
        return () => {
            const result = this.values[key];
            if (!result) return undefined;

            return result();
        };
    }

    enumerate() {
        return Object
            .keys(this.values)
            .map(x => ({ key: x, value: this.values[x]() }));


: $anchor-color;

    &.is-dashed {
      stroke-dasharray: 5 5;
    }

    fill: none;
    pointer-events: none;
  }
}

.charticulator__canvas-popup {
  pointer-events: auto;
  position: absolute;
  white-space: nowrap;
}

.handle-text-view-popup {
  width: 300px;
  padding: 5px;
}
/*!
 *  Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome
 *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
 */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.1.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.1.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.1.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.1.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.1.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font-family:FontAwesome;font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:spin 2s infinite linear;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@keyframes spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform


erwrites any information in the xattrs.

        set_permissions(path, PermissionsExt::from_mode(self.mode.bits()))?;

        if xattr::SUPPORTED_PLATFORM {
            for (attr_name, attr_value) in self.attributes.iter() {
                xattr::set(&path, &attr_name, &attr_value)?;
            }
        }

        // We only support ACLs on Linux currently.
        #[cfg(target_os = "linux")]
        {
            if !self.acl.access.is_empty() {
                // Add the necessary entries if they are missing, computing them from the `mode`.
                let mut metadata = self.clone();
                metadata.update_acl(AclType::ACCESS);

                let acl_entries = metadata
                    .acl
                    .access
                    .iter()
                    .map(|(qualifier, mode)| {
                        qualifier_to_entry(*qualifier, *mode, exacl::Flag::empty())
                    })
                    .collect::<Vec<_>>();

                exacl::setfacl(&[path], &acl_entries, exacl::AclOption::ACCESS_ACL)?;
            }

            if !self.acl.default.is_empty() {
                // Add the necessary entries if they are missing, computing them from the `mode`.
                let mut metadata = self.clone();
                metadata.update_acl(AclType::DEFAULT);

                let acl_entries = metadata
                    .acl
                    .default
                    .iter()
                    .map(|(qualifier, mode)| {
                        qualifier_to_entry(*qualifier, *mode, exacl::Flag::DEFAULT)
                    })
                    .collect::<Vec<_>>();

                exacl::setfacl(&[path], &acl_entries, exacl::AclOption::DEFAULT_ACL)?;
            }
        }

        match chown(
            path,
            Some(Uid::from_raw(self.user)),
            Some(Gid::from_raw(self.group)),
        ) {
            Err(nix::Error::Sys(nix::errno::Errno::EPERM)) => (),
            Err(error) => return Err(io::Error::new(io::ErrorKind::Other, error)),
            _ => (),
        };

        set_file_times(path, self.accessed.into(), self.modified.into())?;

        Ok(())
    }
}

/// A `FileMetadata` for metadata that is common to most platforms.
#[cfg(feature = "file-metadata")]
#[cfg_attr(docsrs, doc(cfg(feature = "file-metadata")))]
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
pub struct CommonMetadata {
    /// The time the file was last modified.
    pub modified: SystemTime,

    /// The time the file was last accessed.
    pub accessed: SystemTime,
}

#[cfg(feature = "file-metadata")]
impl FileMetadata for CommonMetadata {
    fn from_file(path: &Path) -> io::Result<Option<Self>> {
        let metadata = path.metadata()?;
        Ok(Some(Self {
            modified: metadata.modified()?,
            accessed: metadata.accessed()?,
        }))
    }

    fn write_metadata(&self, path: &Path) -> io::Result<()> {
        set_file_times(path, self.accessed.into(), self.modified.into())
    }
}
<gh_stars>10-100
#![feature(test)]

extern crate test;
extern crate tinysegmenter;

use std::io::prelude::*;
use std::fs::File;
use test::Bencher;

#[bench]
fn run(b: &mut Bencher) {
  // http://www.genpaku.org/timemachine/timemachineu8j.txt
  let mut f =
    File::open("benchmark/timemachineu8j.txt")
    .expect("Failed to read a benchmark text.");
  let mut s = String::new();
  let _ = f.read_to_string(&mut s);

  b.iter(|| tinysegmenter::tokenize(&s));
}
<gh_stars>1-10
use crate::mumble::m;

#[allow(unused_variables)]
pub trait MumblePlugin: Send {
    fn shutdown(&


) + 672.0 * y7)

    var `is` = h * (
        0.0158271919734802 * (y1 + y13) +
            0.0942738402188500 * (y2 + y12) +
            0.155071987336585 * (y3 + y11) +
            0.188821573960182 * (y4 + y10) +
            0.199773405226859 * (y5 + y9) +
            0.224926465333340 * (y6 + y8) +
            0.242611071901408 * y7
        )

    val s = snz(`is`)
    val erri1 = abs(i1 - `is`)
    val erri2 = abs(i2 - `is`)
    var r = 1.0

    if (erri2 != 0.0) {
        r = erri1 / erri2
    }

    if (r > 0.0 && r < 1.0) {
        tol /= r
    }
    `is` = s * abs(`is`) * tol / eps

    if (`is` == 0.0) {
        `is` = b - a
    }

    return adaptlobStp(f, a, b, y1, y13, `is`)
}

fun coth(d: Double) = cosh(d) / sinh(d)

class Dual private constructor(private val values: DoubleArray) {
    constructor(values: List<Double>) : this(values.toDoubleArray())

    /**
     * Constructs a [Dual] from the value [x] and the [tail].
     * */
    constructor(x: Double, tail: Dual) : this(
        DoubleArray(tail.values.size + 1).also {
            it[0] = x

            for (i in 0 until tail.values.size) {
                it[i + 1] = tail.values[i]
            }
        }
    )

    operator fun get(index: Int) = values[index]

    val size get() = values.size
    val isReal get() = values.size == 1

    /**
     * Gets the first value in this [Dual].
     * */
    val value get() = values[0]

    /**
     * Gets the values at the start of the [Dual], ignoring the last [n] values.
     * */
    fun head(n: Int = 1) = Dual(DoubleArray(size - n) { values[it] })

    /**
     * Gets the values at the end of the [Dual], ignoring the first [n] values.
     * */
    fun tail(n: Int = 1) = Dual(DoubleArray(size - n) { values[it + n] })

    operator fun unaryPlus(): Dual {
        return this
    }

    operator fun unaryMinus() = Dual(
        DoubleArray(size).also {
            for (i in it.indices) {
                it[i] = -this[i]
            }
        }
    )

    operator fun plus(other: Dual): Dual =
        if (this.isReal || other.isReal) const(this[0] + other[0])
        else Dual(this.value + other.value, this.tail() + other.tail())

    operator fun minus(other: Dual): Dual =
        if (this.isReal || other.isReal) const(this[0] - other[0])
        else Dual(this.value - other.value, this.tail() - other.tail())

    operator fun times(other: Dual): Dual =
        if (this.isReal || other.isReal) const(this[0] * other[0])
        else Dual(this.value * other.value, this.tail() * other.head() + this.head() * other.tail())

    operator fun div(other: Dual): Dual =
        if (this.isReal || other.isReal) const(this[0] / other[0])
        else Dual(this.value / other.value, (this.tail() * other - this * other.tail()) / (other * other))

    inline fun function(x: ((Double) -> Double), dx: ((Dual) -> Dual)): Dual =
        if (this.isReal) const(x(this.value))
        else Du


Variable == CalculatedVariable.END) && !isBoundsFromEndpoints()) {
			if (oldEnd.equals(newEnd)) {
				return;
			}
			if (PlanResourceXMLHelper.isSetFromXML()) {
				endTime = newEnd;
				return;
			}
			throwCalculatingError("end", "start plus duration");
		}
		setEndNotify(oldEnd, newEnd, notifications);
		Date oldStart = startTime;
		if (newEnd == null) {
			setStartNotify(oldStart, null, notifications);
		} else {
			if ((oldStart == null) || (calculatedVariable == CalculatedVariable.START)) {
				Date newStart = deriveStartTime(duration, newEnd);
				setStartNotify(oldStart, newStart, notifications);
				TemporalPropagation.maybeUpdateParentStartEnd(this, oldStart, newStart, oldEnd, newEnd, notifications);
			} else if (oldStart.after(newEnd)) {
				setDurationNotify(duration, DateUtils.ZERO_DURATION, notifications);
				Date newStart = newEnd;
				setStartNotify(oldStart, newStart, notifications);
				TemporalPropagation.maybeUpdateParentStartEnd(this, oldStart, newStart, oldEnd, newEnd, notifications);
			} else if (isBoundsFromEndpoints()) {
				Amount<Duration> newDuration = deriveDuration(oldStart, newEnd);
				setDurationNotify(duration, newDuration, notifications);
				TemporalPropagation.maybeUpdateParentEnd(this, oldEnd, newEnd, notifications);
			}
		}
	}

	private void setEndNotify(Date oldEnd, Date newEnd, NotificationChain notifications) {
		endTime = newEnd;
		if ((notifications != null) && !CommonUtils.equals(oldEnd, newEnd)) {
			notifications.add(new ENotificationImpl(this, Notification.SET, TemporalPackage.TEMPORAL_MEMBER__END_TIME, oldEnd, newEnd));
		}
	}

	private void throwCalculatingError(final String fieldName, final String otherTwo) {
		final StringBuilder msg = new StringBuilder();
		msg.append("Can't change " + fieldName + " because it is set to be calculated as " + otherTwo);
		final EPlanElement pe = getPlanElement();
		if (pe != null)
			msg.append(" -- TemporalMember parented by " + pe.getClass() + ": " + pe.getName());
		throw new UnsupportedOperationException(msg.toString());
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Boolean getScheduled() {
		return scheduled;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void setScheduled(Boolean newScheduled) {
		Boolean oldScheduled = scheduled;
		scheduled = newScheduled;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, TemporalPackage.TEMPORAL_MEMBER__SCHEDULED, oldScheduled, scheduled));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean isUseChildTimes() {
		return (eFlags & USE_CHILD_TIMES_EFLAG) != 0;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated NOT
	 */
	@Override
	public void setUseChildTimes(boolean newUseChildTimes) {
		NotificationChain notifications = null;
		if (eNotificationRequired()) {
			notifications = new NotificationChainImpl();
		}
		notifications = setUseChildTimes(newUseChildTimes, notifications);
		if (notifications != null) {
			notifications.dispatch();
		}
	}

	NotificationChain setUseChildTimes(boolean newUseChildTimes, NotificationChain notifications) {
		boolean oldUseChildTimes = (eFlags & USE_CHILD_TIMES_EFLAG) != 0;
		if (notifications != null && oldUseChildTimes != newUseChildTime


Literal52D5C9ABAEE14BB116010EAAE4B67D121410BFC3);
		s_Il2CppMethodInitialized = true;
	}
	{
		String_t* L_0;
		L_0 = Environment_GetResourceString_m050B47F93963088693F4FCC93D69DB02603A623D(_stringLiteral52D5C9ABAEE14BB116010EAAE4B67D121410BFC3, /*hidden argument*/NULL);
		NotSupportedException__ctor_m40BC57BDA6E0E119B73700CC809A14B57DC65A90(__this, L_0, /*hidden argument*/NULL);
		Exception_SetErrorCode_m92A787DA80F9CBC81E05D158F3D8099A8F1DD44D(__this, ((int32_t)-2146233031), /*hidden argument*/NULL);
		return;
	}
}
// System.Void System.PlatformNotSupportedException::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void PlatformNotSupportedException__ctor_m0D5189E4DEB946C86352AC0F1924638E61D8D746 (PlatformNotSupportedException_t4F02BDC290520CA1A2452F51A8AC464F6D5E356E * __this, SerializationInfo_t097DA64D9DB49ED7F2458E964BE8CCCF63FC67C1 * ___info0, StreamingContext_t5888E7E8C81AB6EF3B14FDDA6674F458076A8505  ___context1, const RuntimeMethod* method)
{
	{
		SerializationInfo_t097DA64D9DB49ED7F2458E964BE8CCCF63FC67C1 * L_0 = ___info0;
		StreamingContext_t5888E7E8C81AB6EF3B14FDDA6674F458076A8505  L_1 = ___context1;
		NotSupportedException__ctor_mF9AA32494BB42CCBFEACE3F31214844F702BD9B5(__this, L_0, L_1, /*hidden argument*/NULL);
		return;
	}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winvalid-offsetof"
#pragma clang diagnostic ignored "-Wunused-variable"
#endif
// System.Void System.Reflection.Pointer::.ctor()
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Pointer__ctor_m0A82159E5A0F2A800A9AFF6B7ED278C403CC416F (Pointer_t97714CA5B772F5B09030CBEEBD58AAEBDE819DAF * __this, const RuntimeMethod* method)
{
	{
		Object__ctor_m88880E0413421D13FD95325EDCE231707CE1F405(__this, /*hidden argument*/NULL);
		return;
	}
}
// System.Void System.Reflection.Pointer::.ctor(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)
IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR void Pointer__ctor_m4DC714C44E6583F33AC34E86C645F351B5343942 (Pointer_t97714CA5B772F5B09030CBEEBD58AAEBDE819DAF * __this, SerializationInfo_t097DA64D9DB49ED7F2458E964BE8CCCF63FC67C1 *


的走资派”、“搞唯生产力论的走资派”、“翻案派”、“复辟派”等大帽子。他们对十一名公司党委书记，要打倒七人，另外四人，不打倒就打跑。他们还散布“搞生产是给走资派脸上贴金”，“炉子熄火就是胜利”的反动谬论，破坏生产，使一九七六年钢产量比一九七五年下降了百分之四十多。

   “四人帮”在郑州铝厂的爪牙，在一九七六年猖狂地叫嚣：“要打倒一批，赶走一批”。他们给总厂的四个党委书记、副书记，扣上了“右倾翻案的代表”、“走资派”的罪名，把总厂党委搞瘫痪。十一个分厂党委也被他们搞乱了九个。这就使这个占全国铝氧产量百分之六十的铝厂，有一年的时间处于停产和半停产状态，损失严重，造成全国几十个铝厂由于缺铝氧全部或部份停产。

   中共冶金部核心小组一九七七年六月十五日

    注：陈绍昆，原冶金部部长。

   （七）“四人帮”及其党羽在铁路部门层层揪所谓“还乡团”、“走资派”，篡夺领导权

   铁道部临时领导小组的揭发

   “四人帮”为了篡夺党和国家的最高领导权，力图切断铁路这个国民经济的大动脉。张春桥叫嚣：“铁路是必争之地，一定要控制好。”他们把毛主席亲自圈阅的中共中央关于加强铁路工作的决定，即一九七五年中央九号文件，污蔑为“复辟纲领”。他们破坏铁路运输的反革命部署，是堵塞枢纽，打乱干线，搞垮全路。他们把黑手伸到铁道部机关，伸到铁路一些单位，诬蔑建国以来铁路工作是“条条专政”，“资产阶级专政”，“走资派专政”。他们在部机关和一些铁路单位另搞一套，打击一大片，层


d").WithInternal(err)
	}

	statusType := status.StatusType
	err = models.CheckStatusType(statusType)
	if err != nil {
		slog.Error("invalid status type", "statusType", statusType, "err", err)
		return echo.NewHTTPError(400, "invalid status type")
	}
	justification := status.Justification

	mechanicalJustification := status.MechanicalJustification

	ev, err := c.firstPartyVulnService.UpdateFirstPartyVulnState(nil, userID, &firstPartyVuln, statusType, justification, mechanicalJustification)
	if err != nil {
		return err
	}

	err = thirdPartyIntegration.HandleEvent(core.VulnEvent{
		Ctx:   ctx,
		Event: ev,
	})
	// we do not want the transaction to be rolled back if the third party integration fails
	if err != nil {
		// just log the error
		slog.Error("could not handle event", "err", err)
	}

	return ctx.JSON(200, convertFirstPartyVulnToDetailedDTO(firstPartyVuln))
}

func (c firstPartyVulnController) ListPaged(ctx core.Context) error {
	// get the asset
	assetVersion := core.GetAssetVersion(ctx)

	pagedResp, _, err := c.firstPartyVulnRepository.GetByAssetVersionPaged(
		nil,
		assetVersion.Name,
		assetVersion.AssetID,
		core.GetPageInfo(ctx),
		ctx.QueryParam("search"),
		core.GetFilterQuery(ctx),
		core.GetSortQuery(ctx),
	)

	if err != nil {
		return echo.NewHTTPError(500, "could not get first party vulns").WithInternal(err)
	}

	return ctx.JSON(200, pagedResp.Map(func(firstPartyVuln models.FirstPartyVuln) any {
		return convertFirstPartyVulnToDetailedDTO(firstPartyVuln)
	}))
}

func (c firstPartyVulnController) Sarif(ctx core.Context) error {
	// get the asset
	assetVersion := core.GetAssetVersion(ctx)

	vulns, err := c.firstPartyVulnRepository.GetByAssetVersion(
		nil,
		assetVersion.Name,
		assetVersion.AssetID,
	)

	if err != nil {
		return echo.NewHTTPError(500, "could not get first party vulns").WithInternal(err)
	}
	sarif := common.SarifResult{
		Version: "2.1.0",
		Schema:  "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/123e95847b13fbdd4cbe2120fa5e33355d4a042b/Schemata/sarif-schema-2.1.0.json",
		Runs:    make([]common.Run, 0),
	}

	// group the vulns by scanner
	scannerVulns := make(map[string][]models.FirstPartyVuln)
	for _, vuln := range vulns {
		if vuln.ScannerIDs == "" {
			slog.Warn("firstPartyVuln has no scannerIDs", "vulnID", vuln.ID)
			continue
		}
		scannerID := vuln.ScannerIDs
		if _, ok := scannerVulns[scannerID]; !ok {
			scannerVulns[scannerID] = make([]models.FirstPartyVuln, 0)
		}
		scannerVulns[scannerID] = append(scannerVulns[scannerID], vuln)
	}

	// create a run for each scanner
	for scannerID, vulns := range scannerVulns {
		run := common.Run{
			Tool: common.Tool{
				Driver: common.Driver{
					Name:  scannerID,
					Rules: make([]common.Rule, 0),
				},
			},
			Results: make([]common.Result, 0),
		}

		addedRuleIDs := make


 forms */
/* NOTE: pure-help-inline is deprecated. Use .pure-form-message-inline instead. */
.pure-form .pure-help-inline,
.pure-form-message-inline {
    display: inline-block;
    padding-left: 0.3em;
    color: #666;
    vertical-align: middle;
    font-size: 90%;
}

/* Block help for forms */
.pure-form-message {
    display: block;
    color: #666;
    font-size: 90%;
}
/*!
Pure v0.1.0
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
https://github.com/yui/pure/blob/master/LICENSE.md
*/
.pure-menu ul {
    position: absolute;
    visibility: hidden;
}

.pure-menu.pure-menu-open {
    visibility: visible;
    z-index: 2;
    width: 100%;
}

.pure-menu ul {
    left: -10000px;
    list-style: none;
    margin: 0;
    padding: 0;
    top: -10000px;
    z-index: 1;
}

.pure-menu > ul { position: relative; }

.pure-menu-open > ul {
    left: 0;
    top: 0;
    visibility: visible;
}

.pure-menu li { position: relative; }

.pure-menu a, .pure-menu .pure-menu-heading {
    display: block;
    color: inherit;
    line-height: 1.5em;
    padding: 5px 20px;
    text-decoration: none;
    white-space: nowrap;
}

.pure-menu.pure-menu-horizontal > .pure-menu-heading {
    display: inline-block;
    margin: 0;
    zoom: 1;
    *display: inline;
    vertical-align: middle;
}
.pure-menu.pure-menu-horizontal > ul {
    display: inline-block;
    zoom: 1;
    *display: inline;
    vertical-align: middle;
}

.pure-menu li a { padding: 5px 20px; }

.pure-menu-can-have-children > .pure-menu-label:after {
    content: '\25B8';
    float: right;
    font-family: 'Lucida Grande', 'Lucida Sans Unicode', 'DejaVu Sans', sans-serif; /* These specific fonts have the Unicode char we need. */
    margin-right: -20px;
    margin-top: -1px;
}

.pure-menu-can-have-children > .pure-menu-label {
    padding-right:30px;
}

.pure-menu-separator {
    background-color: #dfdfdf;
    display: block;
    height: 1px;
    font-size: 0;
    margin: 7px 2px;
    overflow: hidden;
}

.pure-menu-hidden { display: none; }

/* FIXED MENU */
.pure-menu-fixed {
    position: fixed;
    top:0;
    left:0;
    width: 100%;
}

/* HORIZONTAL MENU CODE */

/* Initial menus should be inline-block so that they are horizontal */
.pure-menu-horizontal li {
    display: inline-block;
    zoom: 1;
    *display: inline;
    vertical-align: middle;
}

/* Submenus should still be display:block; */
.pure-menu-horizontal li li {
    display: block;
}

/* Content after should be down arrow */
.pure-menu-horizontal > .pure-menu-children > .pure-menu-can-have-children > .pure-menu-label:after {
    content: "\25BE";
}
/*Add extra padding to elements that have the arrow so that the hover looks nice */
.pure-menu-horizontal > .pure-menu-children > .pure-menu-can-have-children > .pure-menu-label {
    padding-right:30px;
}

/*!
Pure v0.1.0
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under


from .evaluation import Evaluation


Gui
import net.minecraft.item.ItemStack
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent

object InvincibilityTimer : Module(
    name = "Invincibility Timer",
    description = "Provides visual information about your invincibility items."
) {
    private val invincibilityAnnounce by BooleanSetting("Announce Invincibility", true, desc = "Announces when you get invincibility.")
    private val showCooldown by BooleanSetting("Durability Cooldown", true, desc = "Shows the durability of the mask in the inventory as a durability bar.")
    private val showWhen by SelectorSetting("Show", "Always", listOf("Always", "Any", "When Active", "On Cooldown"), "Controls when invincibility items are shown.")
    private val equippedMaskColor by ColorSetting("Equipped Mask", Colors.MINECRAFT_DARK_PURPLE, desc = "Color of the equipped mask in the HUD. (Bonzo/Spirit)")

    private val showSpirit by BooleanSetting("Show Spirit Mask", true, desc = "Shows the Spirit Mask in the HUD.")
    private val showBonzo by BooleanSetting("Show Bonzo Mask", true, desc = "Shows the Bonzo Mask in the HUD.")
    private val showPhoenix by BooleanSetting("Show Phoenix Pet", true, desc = "Shows the Phoenix Pet in the HUD.")

    private val hud by HUD("Invincibility HUD", "Shows the invincibility time in the HUD.") { example ->
        if ((!DungeonUtils.inDungeons && !example) || (showOnlyInBoss && !DungeonUtils.inBoss)) return@HUD 0f to 0f
        var width = 0f

        val visibleTypes = InvincibilityType.entries.filter { type ->
            when (type) {
                InvincibilityType.SPIRIT -> showSpirit
                InvincibilityType.BONZO -> showBonzo
                InvincibilityType.PHOENIX -> showPhoenix
            } && (when (showWhen) {
                0 -> true
                1 -> type.activeTime > 0 || type.currentCooldown > 0
                2 -> type.activeTime > 0
                3 -> type.currentCooldown > 0
                else -> true
            } || example)
        }.ifEmpty { return@HUD 0f to 0f }

        visibleTypes.forEachIndexed { index, type ->
            drawItem(type.itemStack, -2f, -1f + index * 14f)
            val y = index * 14f + 3f

            if (type == InvincibilityType.BONZO && mc.thePlayer?.getCurrentArmor(3)?.skyblockID?.equalsOneOf("BONZO_MASK", "STARRED_BONZO_MASK") == true ||
                type == InvincibilityType.SPIRIT && mc.thePlayer?.getCurrentArmor(3)?.skyblockID?.equalsOneOf("SPIRIT_MASK", "STARRED_SPIRIT_MASK") == true) {
                Gui.drawRect(13, y.toInt(), 14, y.toInt() + 8, equippedMaskColor.rgba)
            }
            drawStringWidth(
                text = when {
                    type.activeTime > 0 -> "${(type.activeTime / 20f).toFixed()}s"
                    type.currentCooldown > 0 -> "${(type.currentCooldown / 20f).toFixed()}s"
                    else -> "✔"
                },
                16f, y,
                if (type.activeTime == 0 && type.currentCooldown == 0) Colors.MINECRAFT_GREEN
                else if (type.activeTime > 0) Colors.MINECRAFT_GOLD else Colors.MINECRAFT_RED
            ).let { if (it > width) width = it }
        }

        width + 20 to visibleTypes.size * 14
    }
    private val showOnlyInBoss by BooleanSetting("Show In Boss", false, desc = "Only shows invincibility timers during dungeon boss fights.")

    init {
        onWorldLoad {
            InvincibilityType.entries.forEach { it.reset() }
        }


contact;

  set contact(Contact? aContact) {
    _contact = aContact;
    setState();
  }
}
/*
 Copyright © OnePub IP Pty Ltd. S. Brett Sutton. All Rights Reserved.

 Note: This software is licensed under the GNU General Public License,
         with the following exceptions:
   • Permitted for internal use within your own business or organization only.
   • Any external distribution, resale, or incorporation into products
      for third parties is strictly prohibited.

 See the full license on GitHub:
 https://github.com/bsutton/hmb/blob/main/LICENSE
*/

import 'package:deferred_state/deferred_state.dart';
import 'package:flutter/material.dart';
import 'package:future_builder_ex/future_builder_ex.dart';
import 'package:money2/money2.dart';
import 'package:strings/strings.dart';

import '../../../../dao/dao_customer.dart';
import '../../../../dao/dao_job.dart';
import '../../../../dao/dao_milestone.dart';
import '../../../../dao/dao_quote.dart';
import '../../../../entity/customer.dart';
import '../../../../entity/job.dart';
import '../../../../entity/milestone.dart';
import '../../../../entity/quote.dart';
import '../../../util/flutter/flutter_util.g.dart';
import '../../quoting/select_quote_dialog.dart';
import '../../widgets/layout/hmb_list_page.dart';
import 'edit_milestone_payment.dart';

class ListMilestoneScreen extends StatefulWidget {
  const ListMilestoneScreen({super.key});

  @override
  _ListMilestoneScreenState createState() => _ListMilestoneScreenState();
}

class _ListMilestoneScreenState extends DeferredState<ListMilestoneScreen> {
  late Future<List<QuoteMilestoneSummary>> _summaries;

  String? filter;

  @override
  Future<void> asyncInitState() async {
    setAppTitle('Milestones');
    _summaries = _fetchMilestoneSummaries();
  }

  Future<List<QuoteMilestoneSummary>> _fetchMilestoneSummaries() async {
    final milestones = await DaoMilestone().getAll();
    if (milestones.isEmpty) {
      return [];
    }

    // Group milestones by quote_id
    final milestonesByQuote = <int, List<Milestone>>{};
    for (final m in milestones) {
      milestonesByQuote.putIfAbsent(m.quoteId, () => []).add(m);
    }

    final summaries = <QuoteMilestoneSummary>[];

    for (final entry in milestonesByQuote.entries) {
      final quoteId = entry.key;
      final quote = await DaoQuote().getById(quoteId);
      if (quote == null) {
        continue;
      }

      final job = await DaoJob().getById(quote.jobId);
      if (job == null) {
        continue;
      }

      Customer? customer;
      if (job.customerId != null) {
        customer = await DaoCustomer().getById(job.customerId);
      }

      final quoteMilestones = entry.value;

      // Total value of all milestones
      final totalValue = quoteMilestones.fold<Money>(
        MoneyEx.zero,
        (sum, m) => sum + (m.paymentAmount),
      );

      final count = quoteMilestones.length;

      // Calculate total invoiced to date
      final invoicedValue = quoteMilestones.fold<Money>(
        MoneyEx.zero,
        (sum, m) =>
            sum + ((m.invoiceId != null) ? m.paymentAmount : MoneyEx.zero),
      );

      // Count how many milestones are invoiced
      final invoicedCount = quoteMilestones
          .where((m) => m.invoiceId != null)
          .length;

      final summary = QuoteMilestoneSummary(
        quote: quote,
        job: job,
        customer: customer,
        totalValue: totalValue,
        milestoneCount: count,
        invoicedValue: invoicedValue,
        invoicedCount: invoicedCount,
      );
      if (summary.matches(filter)) {
        summaries.add(summary);
      }
    }

    return summaries;
  }

  @override
  Widget build(
    BuildContext context,
  ) => FutureBuilderEx<


.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_linux_amd64_SHA256SUM":       "59031c50e0dfeedfde2b4e9445754804dce3f29e4efa737eead0ca9b4f5b85a5",
			},
			expectedPackerConfigDirHashBeforeInstall: "h1:sxhWsXwLkxCO1fm86oO2QIg7ImLdfw9pmXa0hKHIeUw=",
			packerConfigDir:                          cfg.dir("1_pkr_plugins_config"),
			pluginSourceArgs:                         []string{"github.com/hashicorp/hashicups", "v1.0.1"},
			want:                                     0,
			dirFiles:                                 nil,
			expectedPackerConfigDirHashAfterInstall:  "h1:sxhWsXwLkxCO1fm86oO2QIg7ImLdfw9pmXa0hKHIeUw=",
		},
		{
			name: "install-newer-version",
			Meta: TestMetaFile(t),
			inPluginFolder: map[string]string{
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_darwin_amd64":                "1",
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_darwin_amd64_SHA256SUM":      "6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b",
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_windows_amd64.exe":           "1.exe",
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_windows_amd64.exe_SHA256SUM": "07d8453027192ee0c4120242e6e84e2ca2328b8e0f506e2f818a1a5b82790a0b",
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_linux_amd64":                 "1.out",
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_linux_amd64_SHA256SUM":       "59031c50e0dfeedfde2b4e9445754804dce3f29e4efa737eead0ca9b4f5b85a5",
			},
			expectedPackerConfigDirHashBeforeInstall: "h1:sxhWsXwLkxCO1fm86oO2QIg7ImLdfw9pmXa0hKHIeUw=",
			packerConfigDir:                          cfg.dir("2_pkr_plugins_config"),
			pluginSourceArgs:                         []string{"github.com/hashicorp/hashicups", "v1.0.2"},
			want:                                     0,
			dirFiles: []string{
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_darwin_amd64",
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_darwin_amd64_SHA256SUM",
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_linux_amd64",
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_linux_amd64_SHA256SUM",
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_windows_amd64.exe",
				"github.com/hashicorp/hashicups/packer-plugin-hashicups_v1.0.1_x5.0_windows_amd64.exe_SHA256SUM",
				map[string]string{
					"darwin":  "github.com/


# simulator.py
import numpy as np
import pandas as pd

def generate_simulated_data(num_drivers=5, num_orders=5, seed=42):
    """
    Generates:
      - drivers_df:
          driver_id, loc_x, loc_y, rating, cost_factor, incentive_progress,
          shift_start, shift_end, next_break_in_minutes
      - orders_df:
          order_id, loc_x, loc_y, item_value, priority, required_sla, surge_zone
      - traffic_level:
          a single float representing a city-wide traffic multiplier
    """
    np.random.seed(seed)

    # Simulate city-wide traffic level [1..3],
    # e.g., 1 => low traffic, 3 => severe traffic
    traffic_level = np.random.uniform(1.0, 3.0)

    # For demonstration, center around Bangalore lat/lon ~ (12.9716, 77.5946)
    # We'll generate random offsets in a ~ 0.1 deg box to keep markers in the city
    # 1 deg of lat ~ 111 km, 0.1 deg ~ ~11 km
    # We'll store them in 'loc_lat' and 'loc_lon' for clarity.
    def random_bangalore_location():
        lat = 12.9716 + np.random.uniform(-0.05, 0.05)
        lon = 77.5946 + np.random.uniform(-0.05, 0.05)
        return lat, lon

    # Drivers
    drivers_data = []
    for d_id in range(num_drivers):
        driver_id = f"D{d_id+1}"
        lat, lon = random_bangalore_location()
        rating = np.random.uniform(3.0, 5.0)            # rating between 3 and 5
        cost_factor = np.random.uniform(1.0, 2.0)       # cost multiplier
        incentive_progress = np.random.randint(0, 10)   # deliveries completed toward an incentive

        # Shift times: random 9-hr shift between 8am-8pm
        shift_start = np.random.randint(8, 14)          # e.g., 8AM to 2PM
        shift_end = shift_start + 9                     # 9-hour shift
        # Next break in minutes
        next_break_in_minutes = np.random.randint(0, 60)  # could be in 0..60 min

        drivers_data.append([
            driver_id, lat, lon, rating, cost_factor,
            incentive_progress, shift_start, shift_end,
            next_break_in_minutes
        ])

    drivers_df = pd.DataFrame(drivers_data, columns=[
        "driver_id", "loc_lat", "loc_lon", "rating", "cost_factor",
        "incentive_progress", "shift_start", "shift_end",
        "next_break_in_minutes"
    ])

    # Orders
    orders_data = []
    for o_id in range(num_orders):
        order_id = f"O{o_id+1}"
        lat, lon = random_bangalore_location()
        item_value = np.random.randint(100, 1000)
        priority = np.random.choice(["normal", "vip", "high_value"])
        required_sla = np.random.randint(10, 30)  # 10-30 minutes

        # Some fraction of orders are in "surge zones"
        surge_zone = np.random.choice([True, False], p=[0.3, 0.7])

        orders_data.append([order_id, lat, lon, item_value, priority, required_sla, surge_zone])

    orders_df = pd.DataFrame(orders_data, columns=[
        "order_id", "loc_lat", "loc_lon", "item_value", "priority",
        "required_sla", "surge_zone"
    ])

    return drivers_df, orders_df, traffic_level


--- src/lib/ecore/efl_exe.c.orig	2021-01-26 00:11:13.995849000 +0100
+++ src/lib/ecore/efl_exe.c	2021-01-25 23:59:58.582943000 +0100
@@ -32,7 +32,7 @@
 #  include <sys/wait.h>
 # endif
 # ifndef HAVE_CLEARENV
-#  if defined (__FreeBSD__) || defined (__OpenBSD__)
+#  if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__DragonFly__)
 #   include <dlfcn.h>
 static char ***_dl_environ;
 #  else
@@ -153,7 +153,7 @@
 # ifdef HAVE_PRCTL
    if (task_flags & EFL_TASK_FLAGS_EXIT_WITH_PARENT)
      prctl(PR_SET_PDEATHSIG, SIGTERM);
-#elif defined(HAVE_PROCCTL)
+#elif defined(HAVE_PROCCTL) && defined(PROC_PDEATHSIG_CTL)
    if (task_flags & EFL_TASK_FLAGS_EXIT_WITH_PARENT)
      {
         int sig = SIGTERM;
@@ -577,7 +577,7 @@

    // clear systemd notify socket... only relevant for systemd world,
    // otherwise shouldn't be trouble
-# if defined (__FreeBSD__) || defined (__OpenBSD__)
+# if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__DragonFly__)
    _dl_environ = dlsym(NULL, "environ");
    if (_dl_environ) env = *_dl_environ;
 # else
@@ -620,7 +620,7 @@
           }
         // yes - we dont free itr or itr2 - we're going to exec below or exit
         // also put newenv array on stack pointign to the strings in the env
-# if defined (__FreeBSD__) || defined (__OpenBSD__)
+# if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__DragonFly__)
         if (_dl_environ) *_dl_environ = newenv;
         else ERR("Can't find envrion symbol");
 # else
@@ -637,7 +637,7 @@
      {
         prctl(PR_SET_PDEATHSIG, SIGTERM);
      }
-# elif defined(HAVE_PROCCTL)
+# elif defined(HAVE_PROCCTL) && defined(PROC_PDEATHSIG_CTL)
    if ((pd->flags & EFL_EXE_FLAGS_TERM_WITH_PARENT))
      {
         int sig = SIGTERM;


e(GL_FRONT_AND_BACK, GL_LINE);

	glTranslatef(translation.x, translation.y, 0);
	//glRotatef(rotation.x, rotation.y);

	if(hasmirror)
		if(!mirrorX){
			glScalef(-1, 1, 0);
		}else{
			glScalef(1, -1, 0);
		}//*/

	for(size_t i =0; i < clsContents.size(); i++){
		(clsContents[i].getObject())->draw(clsContents[i].getLayer());
	}
	glPopMatrix();

}//not right
//------------------------------------------------------------------------------

void Model::drawLayerFromModel( const Vertex translation, const Vertex Rotation, const bool mirrorX, const bool hasmirror, int layer ){

	glPushMatrix();

	glTranslatef(translation.x, translation.y, 0);
	//glRotatef(rotation.x, rotation.y);

	if(hasmirror)
		if(!mirrorX){
			glScalef(-1, 1, 0);
		}else{
			glScalef(1, -1, 0);
		}//*/

	if(clsLayerIndex < clsContents.size() ){
		printme(layer);
		printme(clsLayerIndex);
		while( clsLayerIndex == layer ){
			(clsContents[clsLayerIndex].getObject())->draw(clsContents[clsLayerIndex++].getLayer());
		} // end while
	} else {
		clsLayerIndex = 0;
	}
	glPopMatrix();

}//wrong

//------------------------------------------------------------------------------

void Model::drawFromPicture( const Vertex translation , const Vertex rotation, const bool mirrorX, bool hasmirror ){
	glPushMatrix();

	glTranslatef(translation.x, translation.y, 0);
	//glRotatef(rotation.x, rotation.y);

	if(hasmirror)
		if(!mirrorX){
			glScalef(-1, 1, 0);
		}else{
			glScalef(1, -1, 0);
		}//*/

	glBindTexture(textureType , clsPicture.getReference());

	const int w = clsMax.x - clsMin.x;
	const int h = clsMax.y - clsMin.y;

	glBegin(GL_QUADS);
		glTexCoord2f( clsMin.x, clsMin.y ); glVertex2f( clsMin.x, clsMin.y );//glTextCoord2f:seta as coordenadas do valor p/operar
		glTexCoord2f( clsMax.x, clsMin.y ); glVertex2f( clsMax.x, clsMin.y );//glVertex: manda calcular
		glTexCoord2f( clsMax.x, clsMax.y ); glVertex2f( clsMax.x, clsMax.y );
		glTexCoord2f( clsMin.x, clsMax.y ); glVertex2f( clsMin.x, clsMax.y );
	glEnd();
	glFlush();

	glPopMatrix();

}//draw the model from its texture

//------------------------------------------------------------------------------

void Model::setMinMax(){
	cerr<<"\nSET MIN MAX \t";
	printme(clsName);

	clsMin.x = clsMin.y = INT_MAX;
	clsMax.x = clsMax.y = INT_MIN;
	for(size_t i = 0; i < clsContents.size(); i++){
		if(clsContents[i].getObject()->getType() == OBJECT_COMPONENT){
			((sgtComponent*)clsContents[i].getObject())->setMinMax();
		}
		Vertex mn = (clsContents[i].getObject())->getMin();
		Vertex mx = (clsContents[i].getObject())->getMax();
		clsMin.x = min( min(clsMin.x, mn.x), mx.x);
		clsMin.y = min( min(clsMin.y, mn.y), mx.y);
		clsMax.x = max( max(clsMax.x, mn.x), mx.x);
		clsMax.y = max( max(clsMax.y, mn.y), mx.y);
	}//end for
	printme(clsMax);
	printme(clsMin);
}//set the model's boudingbox

//------------------------------------------------------------------------------

void


weixin.qq.com/s/TYVsVOmWcgSodJph2yk_VQ)

简评：PerfXLab澎峰科技宣布即将开源轻量级深度学习推理框架InferXLite。

## 论文

- [[1804.07573]MobileFaceNets: Efficient CNNs for Accurate Real-time Face Verification on Mobile Devices ](https://arxiv.org/abs/1804.07573)

简评：本文展示了一种非常高效的CNN模型，叫做MobileFaceNets，它使用不超过100万个参数，专门为在移动设备和嵌入式设备上的高精度实时人脸验证而量身定做。还对常见移动网络的弱点进行了简单的分析。作者特别设计的MobileFaceNets已经克服了这个弱点。在相同的实验条件下，MobileFaceNets的准确性更高，而且比MobileNetV2的实际加速要高出2倍。在经过了改进后，我们的单移动facenet模型的0。4 MB的大小，达到了99。55%的人脸验证精度，在MegaFace挑战1上达到了92.59%（FAR1e-6），这甚至可以与最先进的CNN模型的数百MB大小相媲美。我们的MobileFaceNets中最快的一个在移动电话上有18毫秒的实际推理时间。
- [[1711.05408] RNN作为识别器，判定加权语言一致性](https://arxiv.org/pdf/1711.05408.pdf)

简评：该论文探索了识别加权语言的RNN形式模型的计算复杂度。研究表明，大多数类似的RNN中存在的问题都是不可判定的，包括：一致性、等价性、最小化和最高权重字符串的确定。然而，对于连续一致的RNN来说，最后一个问题是可判定的。
- [[1804.09882] A Neural Embeddings Approach for Detecting Mobile Counterfeit Apps](https://arxiv.org/abs/1804.09882)

简评：本文提出了利用先进的神经嵌入生成卷积神经网络(cnn)来衡量图像之间的相似性。结果表明，在伪检测问题上，采用了一种新颖的方法，采用了由CNN过滤网的克氏矩阵给出的样式嵌入方法，比内容嵌入和筛选功能等基线方法更有效。我们发现，通过将样式嵌入与内容嵌入相结合，可以实现进一步的性能提升。
- [[1804.07090]Low Rank Structure of Learned Representations ](https://arxiv.org/abs/1804.07090)

简评：


	{
		StoreBounds(bounds, mAABBTree->getNodes()->mBVMin, mAABBTree->getNodes()->mBVMax);
	}
	else
		bounds.setEmpty();
}

#endif
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
//  * Redistributions of source code must retain the above copyright
//    notice, this list of conditions and the following disclaimer.
//  * Redistributions in binary form must reproduce the above copyright
//    notice, this list of conditions and the following disclaimer in the
//    documentation and/or other materials provided with the distribution.
//  * Neither the name of NVIDIA CORPORATION nor the names of its
//    contributors may be used to endorse or promote products derived
//    from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Copyright (c) 2008-2025 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.

#include "GuMTD.h"
#include "GuDistancePointSegment.h"
#include "GuDistanceSegmentSegment.h"
#include "GuDistanceSegmentBox.h"
#include "GuVecBox.h"
#include "GuVecCapsule.h"
#include "GuVecConvexHullNoScale.h"
#include "GuInternal.h"
#include "GuContactMethodImpl.h"
#include "GuBoxConversion.h"
#include "GuPCMShapeConvex.h"
#include "GuPCMContactGen.h"
#include "GuConvexMesh.h"
#include "GuGJK.h"
#include "GuSphere.h"
#include "geomutils/PxContactBuffer.h"

using namespace physx;
using namespace Gu;

static PX_FORCE_INLINE float validateDepth(float depth)
{
	// PT: penetration depth must always be positive or null, but FPU accuracy being what it is, we sometimes
	// end up with very small, epsilon-sized negative depths. We clamp those to zero, since they don't indicate
	// real bugs in the MTD functions. However anything larger than epsilon is wrong, and caught with an assert.
	const float epsilon = 1.e-3f;

	//ML: because we are shrunking the shape in this moment, so the depth might be larger than eps, this condition is no longer valid
	//PX_ASSERT(depth>=-epsilon);
	PX_UNUSED(epsilon);
	return PxMax(depth, 0.0f);
}

///////////////////////////////////////////////////////////////////////////////

// PT: the function names should follow the order in which the PxGeometryTypes are listed,
// i.e. computeMTD_Type0Type1 with Type0<=Type1. This is to guarantee that the proper results
// (following the desired convention) are returned from the PxGeometryQuery-level call.

///////////////////////////////////////////////////////


/*
 * MIT License
 *
 * Copyright (C) 2024, DragonDreams GmbH (info@dragondreams.ch)
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software.
 *
 * 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 OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

#ifndef _GDEUOBJECTCLASSSETPARTIALHIDETAGS_H_
#define _GDEUOBJECTCLASSSETPARTIALHIDETAGS_H_

#include <deigde/undo/igdeUndo.h>

#include <dragengine/common/string/decStringSet.h>

class gdeOCSpeaker;
class gdeObjectClass;

/**
 * \brief Undo action object class set partial hide tags.
 */
class gdeUOCSetPartialHideTags : public igdeUndo{
private:
	gdeObjectClass *pObjectClass;

	decStringSet pOldValue;
	decStringSet pNewValue;

public:
	/** \name Constructors and Destructors */
	/*@{*/
	/** \brief Create undo action. */
	gdeUOCSetPartialHideTags( gdeObjectClass *objectClass, const decStringSet &newValue );

protected:
	/** \brief Clean up undo action. */
	virtual ~gdeUOCSetPartialHideTags();
	/*@}*/

public:
	/** \name Management */
	/*@{*/
	/** \brief Undo. */
	virtual void Undo();

	/** \brief Redo. */
	virtual void Redo();
	/*@}*/
};

#endif


println("Expected file:" + file);
            }
        }
    }

    @Test
    public void testBundleResourcesDirs() throws IOException, ConfigurationException, CompileExceptionError, MultipleCompileException {
        System.out.println("Platform:" + platform.toString());
        final boolean isAndroid = (platform == Platform.Armv7Android || platform == Platform.Arm64Android);
        final String appFolder = getBundleAppFolder("unnamed");
        /*
         * Project structure:
         *
         *  /
         *  +-/m.txt
         *  +-<built-ins> (from createDefaultFiles)
         *  +-custom/
         *  | EMPTY!
         *  +-sub1/
         *    +-common/
         *      +-s1-root1.txt
         *      +-s1-root2.txt
         *  +-sub2/
         *    +-[current-platform-arch]/
         *      +-s2-root1.txt
         *      +-s2-root2.txt
         *      |
         *    The folders below only on Android
         *      |
         *      +-assets/
         *        +-s2-asset.txt
         *      +-lib/
         *        +-[current-platform-arch]/
         *          +-lib.so
         *      +-res/
         *        +-raw/
         *          +-s2_raw.txt               <-- must contain only [a-z0-9_.]
         *        +-values/
         *          +-s2-values.xml
         */
        File cust = new File(contentRoot, "custom");
        cust.mkdir();
        File sub1 = new File(contentRoot, "sub1");
        File sub2 = new File(contentRoot, "sub2");
        sub1.mkdir();
        sub2.mkdir();
        File sub_platform1 = new File(sub1, "common"); // common is a platform
        File sub_platform2 = new File(sub2, this.platform.getExtenderPair());
        sub_platform1.mkdir();
        sub_platform2.mkdir();
        createDefaultFiles(contentRoot);
        createFile(contentRoot, "m.txt", "dummy");
        createFile(sub_platform1.getAbsolutePath(), "s1-root1.txt", "dummy");
        createFile(sub_platform1.getAbsolutePath(), "s1-root2.txt", "dummy");
        createFile(sub_platform2.getAbsolutePath(), "s2-root1.txt", "dummy");
        createFile(sub_platform2.getAbsolutePath(), "s2-root2.txt", "dummy");

        // some additional files and folders which will only be included on Android
        if (isAndroid) {
            // res and subfolders
            File sub_platform2_res = new File(sub_platform2, "res");
            File sub_platform2_res_raw = new File(sub_platform2_res, "raw");
            File sub_platform2_res_values = new File(sub_platform2_res, "values");
            sub_platform2_res.mkdir();
            sub_platform2_res_raw.mkdir();
            sub_platform2_res_values.mkdir();
            // this is a "raw" file and it will be included as-is in the res folder of the APK
            createFile(sub_platform2_res_raw.getAbsolutePath(), "s2_raw.txt", "dummy");
            // this is a resource file and it will get included in the resources.arsc file
            createFile(sub_platform2_res_values.getAbsolutePath(), "s2-values.xml", "<?xml version=\"1.0\" encoding=\"utf-8\"?><resources></resources>");

            // assets will be included in the asset folder of the APK
            File sub_platform2_assets = new File(sub_platform2, "assets");
            sub_platform2_assets.mkdir();
            createFile(sub_platform2_assets.getAbsolutePath(), "s2-asset.txt", "dummy");

            // libs wil


ethod(this PIDType type) => type
        is Method_1 or Method_2 or Method_3 or Method_4
        or Method_1_Unown or Method_2_Unown or Method_3_Unown or Method_4_Unown;

    public static bool IsRestricted(this PIDType type) => type is >= BACD_R and <= BACD_M;

    public static bool IsUnown(this PIDType type) => type is Method_1_Unown or Method_2_Unown or Method_3_Unown or Method_4_Unown;
}


5a37a63931e25d943',1,'glm::GLM_ALIGNED_TYPEDEF(int16_t, aligned_int16_t, 2)'],['../a00364.html#gae553b33349d6da832cf0724f1e024094',1,'glm::GLM_ALIGNED_TYPEDEF(int32_t, aligned_int32_t, 4)'],['../a00364.html#ga16d223a2b3409e812e1d3bd87f0e9e5c',1,'glm::GLM_ALIGNED_TYPEDEF(int64_t, aligned_int64_t, 8)'],['../a00364.html#ga2de065d2ddfdb366bcd0febca79ae2ad',1,'glm::GLM_ALIGNED_TYPEDEF(i8, aligned_i8, 1)'],['../a00364.html#gabd786bdc20a11c8cb05c92c8212e28d3',1,'glm::GLM_ALIGNED_TYPEDEF(i16, aligned_i16, 2)'],['../a00364.html#gad4aefe56691cdb640c72f0d46d3fb532',1,'glm::GLM_ALIGNED_TYPEDEF(i32, aligned_i32, 4)'],['../a00364.html#ga8fe9745f7de24a8394518152ff9fccdc',1,'glm::GLM_ALIGNED_TYPEDEF(i64, aligned_i64, 8)'],['../a00364.html#gaaad735483450099f7f882d4e3a3569bd',1,'glm::GLM_ALIGNED_TYPEDEF(ivec1, aligned_ivec1, 4)'],['../a00364.html#gac7b6f823802edbd6edbaf70ea25bf068',1,'glm::GLM_ALIGNED_TYPEDEF(ivec2, aligned_ivec2, 8)'],['../a00364.html#ga3e235bcd2b8029613f25b8d40a2d3ef7',1,'glm::GLM_ALIGNED_TYPEDEF(ivec3, aligned_ivec3, 16)'],['../a00364.html#ga50d8a9523968c77f8325b4c9bfbff41e',1,'glm::GLM_ALIGNED_TYPEDEF(ivec4, aligned_ivec4, 16)'],['../a00364.html#ga9ec20fdfb729c702032da9378c79679f',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec1, aligned_i8vec1, 1)'],['../a00364.html#ga25b3fe1d9e8d0a5e86c1949c1acd8131',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec2, aligned_i8vec2, 2)'],['../a00364.html#ga2958f907719d94d8109b562540c910e2',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec3, aligned_i8vec3, 4)'],['../a00364.html#ga1fe6fc032a978f1c845fac9aa0668714',1,'glm::GLM_ALIGNED_TYPEDEF(i8vec4, aligned_i8vec4, 4)'],['../a00364.html#gaa4161e7a496dc96972254143fe873e55',1,'glm::GLM_ALIGNED_TYPEDEF(i16vec1, aligned_i16vec1, 2)'],['../a00364.html#ga9d7cb211ccda69b1c22ddeeb0f3e7aba',1,'glm::GLM_ALIGNED_TYPEDEF(i16vec2, aligned_i16vec2, 4)'],['../a00364.html#gaaee91dd2ab34423bcc11072ef