-- https://news.ycombinator.com/item?id=11396045
SELECT count(1)
FROM (SELECT id, repo_name, path
FROM `bigquery-public-data.github_repos.sample_files`
) AS F
JOIN (SELECT id
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_riverpod/flutter_riverpod.dart'; | |
void main() { | |
runApp(const ProviderScope(child: App())); | |
} | |
class App extends StatelessWidget { | |
const App({super.key}); |
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
"explorer.experimental.fileNesting.enabled": true, | |
"explorer.experimental.fileNesting.expand": false, | |
"explorer.experimental.fileNesting.patterns": { | |
"pubspec.yaml": ".flutter-plugins, .packages, .dart_tool, .flutter-plugins-dependencies, .metadata, .packages, pubspec.lock, build.yaml, analysis_options.yaml, all_lint_rules.yaml, l10n.yaml", | |
".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*", | |
"readme.*": "authors, backers.md, changelog*, citation*, code_of_conduct.md, codeowners, contributing.md, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors.md", | |
}, |
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()); | |
// Mimicking the behavior of VSyncProvider through a global variable | |
TickerProvider vsync; |
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() { | |
runApp(_SwitchingThemeApp()); | |
} | |
/// Properties that help me keep track of the example being run. | |
bool _useMaterial = false; | |
class _SwitchingThemeApp extends StatefulWidget { | |
@override | |
_SwitchingThemeAppState createState() => _SwitchingThemeAppState(); |
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_web/material.dart'; | |
// Full screen box that's filled with the theme's primary color. | |
// Contains an icon and 'Hello World' text. | |
class PrimaryBox extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return Container( | |
alignment: Alignment.center, | |
color: Theme.of(context).primaryColor, |
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
// https://gist.github.com/ha1f/884ce4870dc395639e86c4395f5ea947 の案1のweak版 | |
extension UIView { | |
/// Returns UILayoutGuide compatible with safeAreaLayoutGuide. | |
/// `.safeAreaLayoutGuide` is available only iOS 11+, but safeAreaLayoutGuide | |
/// should be same as layoutguide of UIView under iOS 11. | |
/// | |
/// - returns safeAreaLayoutGuide or layoutGuide of self | |
func safeLayoutGuideOrSelfLayoutGuide() -> UILayoutGuide { | |
if #available(iOS 11.0, *) { |
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
// | |
// Activity.swift | |
// | |
// Created by Zachary Waldowski on 8/21/16. | |
// Copyright © 2016 Zachary Waldowski. Licensed under MIT. | |
// | |
import os.activity | |
private final class LegacyActivityContext { |
storyboard上で、initial view controllerから他のview controllerに対してrelationshipを確立します。同様に、それらのview controllerから他のview controllerにrelationshipを確立します。最終的に、storyboard上のほとんど、あるいは全てのview controllerを一つのグラフに接続します。接続されたview controllerが、iOSによっていつインスタンス化されるかは、relationshipのタイプによって決まります。
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
<!-- copy this to YOUR_THEME.tmTheme--> | |
<dict> | |
<key>name</key> | |
<string>diff: deleted</string> | |
<key>scope</key> | |
<string>markup.deleted</string> | |
<key>settings</key> | |
<dict> | |
<key>background</key> | |
<string>#EAE3CA</string> |
NewerOlder