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
void main() { | |
Solution solution = Solution(); | |
// Test Case 1 | |
String s1 = "Hello World"; | |
print('Test Case 1:'); | |
print('Input: "$s1"'); | |
print('Expected Output: 5'); | |
print('Actual Output: ${solution.lengthOfLastWord(s1)}'); | |
print(''); |
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
void main() { | |
Solution solution = Solution(); | |
// Test Case 1 | |
List<int> nums1 = [3, 0, 1]; | |
print('Test Case 1:'); | |
print('Input: $nums1'); | |
print('Expected Output: 2'); | |
print('Actual Output: ${solution.missingNumber(nums1)}'); | |
print(''); |
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/rendering.dart'; | |
import 'dart:math' as math; | |
class CustomLayout extends MultiChildRenderObjectWidget { | |
CustomLayout({ | |
Key key, | |
List<Widget> children = const <Widget>[], | |
}) : super(key: key, children: children); |
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
Context context = view.getContext(); | |
ContentResolver cr = context.getContentResolver(); | |
ContentValues values; | |
try { | |
// create a file for test | |
File file = new File(context.getFilesDir(), "1234568"); | |
file.createNewFile(); | |
try (OutputStream os = new FileOutputStream(file)) { | |
os.write("test".getBytes()); |
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 os | |
from fontTools import ttLib | |
# Declare your font file names and the correct weights here | |
to_change = { | |
'Galano Grotesque Thin.otf': 100, | |
'Galano Grotesque Thin Italic.otf': 100, | |
'Galano Grotesque Extra Light.otf': 200, | |
'Galano Grotesque Extra Light Italic.otf': 200, | |
'Galano Grotesque Light.otf': 300, |
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
{ | |
"USD": { | |
"symbol": "$", | |
"name": "US Dollar", | |
"symbol_native": "$", | |
"decimal_digits": 2, | |
"rounding": 0, | |
"code": "USD", | |
"name_plural": "US dollars" | |
}, |
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_driver/driver_extension.dart'; | |
import 'package:intlphonenumberinputtest/main.dart' as app; | |
main() { | |
enableFlutterDriverExtension(); | |
app.main(); | |
} |
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
void main() { | |
print(resistorColor('Red')); | |
} | |
const List<String> colors = [ | |
'Black', | |
'Brown', | |
'Red', | |
'Orange', | |
'Yellow', |
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
void main() { | |
print(resistorColor('Red')); | |
} | |
const List<String> colors = [ | |
'Black', | |
'Brown', | |
'Red', | |
'Orange', | |
'Yellow', |
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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override |
NewerOlder