This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Make by x:@BoxMrChen and windsurf ai | |
import asyncio | |
import base64 | |
import json | |
import io | |
import os | |
import sys | |
import pyaudio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio | |
import base64 | |
import json | |
import os | |
import pyaudio | |
from websockets.asyncio.client import connect | |
class SimpleGeminiVoice: | |
def __init__(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Update Gradle, Java and other Android project settings in a Flutter project | |
# See: https://gradle.org/releases/ | |
DESIRED_GRADLE_VERSION="8.9" | |
# Build errors often show the required Java version | |
DESIRED_JAVA_VERSION="17" | |
# See: https://developer.android.com/ndk/downloads | |
DESIRED_NDK_VERSION="27.0.12077973" | |
# The minimum Android SDK version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void startAdvertise(String uuid, int major, int minor) { | |
BluetoothLeAdvertiser advertiser = BluetoothAdapter.getDefaultAdapter().getBluetoothLeAdvertiser(); | |
AdvertiseSettings settings=createAdvertiseSettings(1000); | |
AdvertiseData data = createAdvertiseData( uuid , major, minor, -59); | |
// | |
advertiser.startAdvertising(settings, data, new AdvertiseCallback() { | |
@Override | |
public void onStartSuccess(AdvertiseSettings settingsInEffect) { | |
super.onStartSuccess(settingsInEffect); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String argv[]) { | |
Scanner input = new Scanner(System.in); | |
int n = input.nextInt(); | |
for (int i = 0; i < n; i++) { | |
String ask = input.next(); | |
int index = check(ask); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1號解法: | |
public class Main { | |
public static void main(String argv[]) { | |
Scanner input = new Scanner(System.in); | |
int n = input.nextInt(); | |
for (int j = 0; j < n; j++) { | |
int people = input.nextInt(); | |
int die = input.nextInt(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
String animal[] = { "tiger", "rabbit", "dragon", "snake", "horse", "sheep", "monkey", "rooster", "dog", "pig","rat", "ox" }; | |
int year = input.nextInt(); | |
if (year >= 2010) { |