This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pragma("wasm:export", "dartAdd") | |
double dartAdd(double a, double b) { | |
print("ADDING"); | |
return a + b; | |
} | |
void main(List<String> args) { | |
print("RUNNING MAIN DART"); | |
} | |
> dart compile wasm main.dart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this assumes that every 10th frame is the pose corresponding to the shape key, ordered according to the variable arkit | |
# adjust frame_increment if this isn't correct (e.g. if each pose is on consecutive frames, set frame_increment to 1) | |
# reorder arkit to match the order of poses in your action if needed | |
# select the mesh in the viewport, then run this script | |
import bpy | |
rig_name="rig" | |
frame = -1 | |
frame_increment = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT licence | |
import 'dart:async'; | |
import 'dart:io'; | |
import 'package:firebase_auth/firebase_auth.dart'; | |
import 'package:firebase_core/firebase_core.dart'; | |
import 'package:fluent_academy_app/blocs/initializable_cubit.dart'; | |
import 'package:fluent_academy_app/widgets/user/auth/signin/sign_in_providers.dart'; | |
import 'package:flutter/widgets.dart'; | |
import 'package:firebase_auth/firebase_auth.dart' as auth; | |
import 'package:google_sign_in/google_sign_in.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.xraph.plugin.flutter_unity_widget | |
import android.app.Activity | |
import android.graphics.PixelFormat | |
import android.os.Build | |
import android.os.Handler | |
import android.os.Looper | |
import android.util.Log | |
import android.view.ViewGroup | |
import android.view.ViewGroup.LayoutParams.MATCH_PARENT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:flutter/widgets.dart'; | |
class NotchedContainer extends StatelessWidget { | |
final Widget child; | |
final Widget notchContent; | |
final double notchPadding; | |
final double notchOffsetRight; | |
final EdgeInsets contentPadding; | |
final Alignment notchPosition; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:typed_data'; | |
import 'dart:io'; | |
class Half { | |
static Float32List ToFloat32(ByteData buffer) { | |
var f32Buffer = ByteData(buffer.lengthInBytes * 2); | |
for(int i = 0; i < buffer.lengthInBytes; i+=2) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void unzipLibs(AssetManager am, String nativeLibraryDir) { | |
try { | |
File complete = Paths.get(appDir, "mono_libs_complete").toFile(); | |
if(complete.exists() && !BuildConfig.DEBUG) { | |
Log.e(TAG, "Libs have already been unzipped to data directory, skipping unzip..."); | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final dynamic obj = new JsonObjectLite(); | |
obj.foo = JsonObjectLite.fromJsonString("[1,2,3]"); | |
print(obj); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let L2Norm:Func<double[],double[],float> = Func<double[],double[],float>(fun (x:double[]) (y:double[]) -> | |
let mutable dist = 0. | |
for i in 0..x.Length-1 do | |
dist <- (x.[i] - y.[i]) * (x.[i] - y.[i]); | |
dist) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Powershell: | |
([system.reflection.assembly]::loadfile({filename})).FullName |
NewerOlder