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
<!DOCTYPE html> | |
<html> | |
<body> | |
<p id="r1"/> | |
<p id="r2"/> | |
<script src="https://mapgl.2gis.com/api/js/v1"></script> | |
<script> | |
const r1 = mapgl.notSupportedReason({ failIfMajorPerformanceCaveat: false }); | |
const r2 = mapgl.notSupportedReason({ failIfMajorPerformanceCaveat: true }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.compose | |
import android.os.Bundle | |
import androidx.appcompat.app.AppCompatActivity | |
import androidx.compose.foundation.Text | |
import androidx.compose.foundation.clickable | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.material.Button | |
import androidx.compose.material.MaterialTheme | |
import androidx.compose.runtime.* |
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
https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/functions.html | |
https://github.com/java-native-access/jna | |
https://github.com/spotify/JniHelpers | |
https://github.com/jmarranz/jnieasy | |
https://github.com/fusesource/hawtjni | |
https://github.com/jnr | |
https://github.com/nativelibs4java/JNAerator | |
https://github.com/nativelibs4java/BridJ | |
https://github.com/mapbox/jni.hpp | |
https://github.com/dropbox/djinni |
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 'package:flutter/material.dart'; | |
class AppState extends ChangeNotifier { | |
final _pages = ['Page 1', 'Page 2']; | |
List<String> get pages => _pages; | |
bool get canPop => _pages.length > 1; | |
bool get canPush => _pages.length < 5; |
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 'package:flutter/material.dart'; | |
void main() { | |
final app = MaterialApp( | |
home: MyHomePage(), | |
); | |
runApp(app); | |
} | |
class MyHomePage extends StatelessWidget { |
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 'package:flutter/material.dart'; | |
void main() { | |
final app = MaterialApp( | |
home: MyHomePage(), | |
); | |
runApp(app); | |
} | |
class Item { |
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 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
home: MyHomePage(), | |
); |
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 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
Color mixColors(Color a, Color b, double t) { | |
final w1 = (1 - t) * a.opacity; | |
final w2 = t * b.opacity; | |
final n = w1 + w2; | |
final w = n > 0.000001 ? w2 / n : 0.5; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<style> | |
#grad1 { | |
height: 200px; | |
background-image: linear-gradient(to right,#ff0000ff, transparent, #0000ffff); | |
} | |
</style> |
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 numpy as np | |
from scipy.fftpack import dct, idct | |
import matplotlib.pyplot as plt | |
from PIL import Image | |
import matplotlib.image | |
def dct_2d(x): | |
return dct(dct(x, axis=0, norm='ortho'), axis=1, norm='ortho') | |
def idct_2d(x): |
NewerOlder