Bình thường, khi shell script đang thi hành bị lỗi, nó chỉ in ra lỗi gì và ở dòng nào
./script.sh: line 20: [: lt: binary operator expected
Ở những lỗi cú pháp thì thông thường chỉ cần nhiêu đó thông tin là đủ.
git remote -v
# origin https://github.com/NearHuscarl/dotfiles (fetch)
# origin https://github.com/NearHuscarl/dotfiles (push)
git remote set-url origin [email protected]:NearHuscarl/dotfiles.git
git remote -v
# origin [email protected]:NearHuscarl/dotfiles.git (fetch)
# -*- coding: utf-8 -*- | |
""" | |
Cho vali chứa được trọng lượng tối đa là W. Có n đồ vật được đánh số từ 1 đến n, | |
đồ vật thứ i có khối lượng weight[i] và giá trị value[i], 1 <= i <= n. Tìm cách | |
xếp đồ vật vào vali sao cho tổng giá trị các đồ vật trong vali là lớn nhất | |
""" | |
weight = [3, 4, 5, 2, 1] | |
value = [4, 5, 6, 3, 1] |
public static class Effect | |
{ | |
public static readonly string BLOOD = "BLD"; | |
// IGame.PlayEffect("CAM_S", Vector2 position, float strength, float milliseconds, bool UNDOCUMENTED) | |
// IGame.PlayEffect("CAM_S", Vector2.Zero, 1f, 500f, true) | |
public static readonly string CAMERA_SHAKER = "CAM_S"; | |
// IGame.PlayEffect("CFTXT", Vector2 Position, string Text) | |
public static readonly string CUSTOM_FLOAT_TEXT = "CFTXT"; | |
public static readonly string ELECTRIC = "Electric"; | |
public static readonly string EXPLOSION = "EXP"; |
code --list-extensions | % { "code --install-extension $_" } | |
code --install-extension CoenraadS.bracket-pair-colorizer | |
code --install-extension Dart-Code.dart-code | |
code --install-extension Dart-Code.flutter | |
code --install-extension dbaeumer.vscode-eslint | |
code --install-extension donjayamanne.githistory | |
code --install-extension DotJoshJohnson.xml | |
code --install-extension eamodio.gitlens | |
code --install-extension Equinusocio.vsc-material-theme |
// https://gist.github.com/NearHuscarl/86ce74d95798635e14c8b848863b429f | |
extension ExtendedIterable<E> on Iterable<E> { | |
/// Like Iterable<T>.map but callback have index as second argument | |
Iterable<T> mapIndexed<T>(T Function(E e, int i) f) { | |
var i = 0; | |
return map((e) => f(e, i++)); | |
} | |
void forEachIndexed(void Function(E e, int i) f) { |
// https://gist.github.com/NearHuscarl/6e8c4dff9ebaabf2980ae05fee8ae109 | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
// https://gist.github.com/NearHuscarl/29c5577b94571d00926723c85a370e43 | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
// https://gist.github.com/NearHuscarl/195907b36fef5aefbf8682133b95c01d | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
// https://gist.github.com/NearHuscarl/e5ddb59b4ed745d693f5d9025519d789 | |
// https://stackoverflow.com/a/59121771/9449426 | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |