| -- Cap-enforced answer submit: at most `max_answers` answers per question, | |
| -- at most one answer per (question, user). | |
| -- | |
| -- One transaction = the counter and the answers table cannot diverge; | |
| -- a crash mid-way rolls back, nothing leaks. The row lock taken by the | |
| -- UPDATE is the linearization point -- READ COMMITTED is sufficient, | |
| -- because the WHERE clause re-evaluates after lock acquisition. | |
| -- | |
| -- INSERT goes first on purpose: a duplicate user bounces off the PK | |
| -- without ever touching the hot question row, and a retry after an |
| void main() { | |
| var list1 = ['I', '💙', 'Flutter']; | |
| final list2 = list1; | |
| list2[2] = 'Dart'; | |
| // const list3 = list1; | |
| } | |
| class User { |
| class User{ | |
| final String id; | |
| final String name; | |
| final String email; | |
| final String? subscriptionId; | |
| const User( | |
| this.subscriptionId, { | |
| required this.id, | |
| required this.name, |
| import SwiftUI | |
| extension View { | |
| /// Proposes a percentage of its received proposed size to `self`. | |
| /// | |
| /// This modifier multiplies the proposed size it receives from its parent | |
| /// with the given factors for width and height. | |
| /// | |
| /// If the parent proposes `nil` or `.infinity` to us in any dimension, | |
| /// we’ll forward these values to our child view unchanged. |
| import 'package:flutter/material.dart'; | |
| import 'dart:math'; | |
| const Color darkBlue = Color.fromARGB(255, 18, 32, 47); | |
| void main() { | |
| runApp(MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { |
Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.
- Go to: https://twitter.com/{username}/likes
- Open the console and run the following JavaScript code:
setInterval(() => {
for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
d.click()
}There are a lot of blog posts on medium and videos on youtube about how to create commonly used widgets in Flutter. In this talk, we'll dive into how to create non-trivial widgets like SoundCloud audio player from the ground up.
- How to build SoundCloud audio player style widget in Flutter.
- How to playback audio files in Flutter apps.
Sasha Prokhorenko has more than a decade of experience in software engineering and in particular more than eight years in the mobile ecosystem.
He's been working on very different products, different markets, and various technologies.
For high-profile clients like PepsiCo, Philip Morris International, Vorwerk, and start-ups on different stages.
He developed, led, architect, and distributed through different channels more than twenty mobile apps and games. Delivered numerous IoT projects, web apps, and services.
| import 'dart:convert'; | |
| import 'dart:io'; | |
| import 'dart:math' as math; | |
| import 'dart:ui'; | |
| import 'package:async/async.dart'; | |
| import 'package:auto_size_text/auto_size_text.dart'; | |
| import 'package:cached_network_image/cached_network_image.dart'; | |
| import 'package:flutter/gestures.dart'; | |
| import 'package:flutter/material.dart'; |