For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.
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:async'; | |
| import 'dart:math'; | |
| import 'package:flutter/material.dart'; | |
| import 'package:flutter/services.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } |
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:convert'; | |
| import 'dart:math'; | |
| import 'dart:typed_data'; | |
| import "package:pointycastle/export.dart"; | |
| import "package:asn1lib/asn1lib.dart"; | |
| List<int> decodePEM(String pem) { | |
| var startsWith = [ | |
| "-----BEGIN PUBLIC KEY-----", | |
| "-----BEGIN PRIVATE KEY-----", |
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
| class DownloadUtil { | |
| static Future<String> downloadAndSaveFile(String url, String fileName) async { | |
| final Directory directory = await getApplicationDocumentsDirectory(); | |
| final String filePath = '${directory.path}/$fileName.png'; | |
| final http.Response response = await http.get(Uri.parse(url)); | |
| final File file = File(filePath); | |
| await file.writeAsBytes(response.bodyBytes); | |
| return filePath; | |
| } |
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
| class Solution { | |
| int findKthLargest(List<int> nums, int k) { | |
| // sort all values | |
| nums.sort(); | |
| return nums[nums.length-k]; | |
| } | |
| } |
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
| // Error Codes for SignUp | |
| ERROR_OPERATION_NOT_ALLOWED` - Indicates that Anonymous accounts are not enabled. | |
| ERROR_WEAK_PASSWORD - If the password is not strong enough. | |
| ERROR_INVALID_EMAIL` - If the email address is malformed. | |
| ERROR_EMAIL_ALREADY_IN_USE - If the email is already in use by a different account. | |
| ERROR_INVALID_CREDENTIAL` - If the [email] address is malformed. | |
| // sending password reset email | |
| ERROR_INVALID_EMAIL` - If the [email] address is malformed. |
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:typed_data'; | |
| import 'dart:io'; | |
| import 'package:http/http.dart'; | |
| import 'package:path_provider/path_provider.dart'; | |
| downloadFile(String url, {String filename}) async { | |
| var httpClient = http.Client(); | |
| var request = new http.Request('GET', Uri.parse(url)); |
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'; | |
| import 'package:go_router/go_router.dart'; | |
| void main() { | |
| WidgetsFlutterBinding.ensureInitialized(); | |
| GoRouter.setUrlPathStrategy(UrlPathStrategy.path); | |
| runApp(const MyApp()); | |
| } | |
| class MyApp 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
| Originall From: Posted 2015-05-29 http://ubwg.net/b/full-list-of-ffmpeg-flags-and-options | |
| This is the complete list that’s outputted by ffmpeg when running ffmpeg -h full. | |
| usage: ffmpeg [options] [[infile options] -i infile]… {[outfile options] outfile}… | |
| Getting help: | |
| -h — print basic options | |
| -h long — print more options | |
| -h full — print all options (including all format and codec specific options, very long) |
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 | |
| CYAN="$(tput bold; tput setaf 6)" | |
| RESET="$(tput sgr0)" | |
| clear | |
| if command -v python3 > /dev/null 2>&1; then | |
| if [ $(python3 -c "print('ye')") = "ye" ]; then | |
| clear |
NewerOlder