Skip to content

Instantly share code, notes, and snippets.

View console.log
Failed to find the latest git commit date: VersionCheckError: Command exited with code -9: git -c log.showSignature=false log -n 1 --pretty=format:%ad --date=iso
Standard out: 1
Standard error:
Returning 1970-01-01 03:00:00.000 instead.
Flutter 0.0.0-unknown • channel 1 • unknown source
Framework • revision 27321ebbad (1) • 1970-01-01 03:00:00.000
Engine • revision 2994f7e1e6
Tools • Dart 2.8.1
1
View map_bloc.dart
class MapBloc extends Bloc<MapEvent, MapState> { ...
Set<Marker> _markers = Set();
Set<Marker> getMarkers() {
return _markers;
}
...
@override
Stream<MapState> mapEventToState(
View main.go
func main() {
PlayFade()
}
func PlayFade() {
sr := beep.SampleRate(44100)
speaker.Init(sr, sr.N(time.Second/10))
go pf(track1)
go pf(track2)
View example.go
package main
import (
"fmt"
"github.com/faiface/beep/effects"
"log"
"os"
"time"
"github.com/faiface/beep"
View TV.cpp
#include "TV.h"
#include <iostream>
using namespace std;
TV::TV()
{
is_on = 0;
View dialog.dart
import 'package:flutter/material.dart';
import 'package:gusli_flutter/utils/gusli_icons.dart';
class IconDialog extends StatelessWidget {
final String titleText;
final Icon icon;
final Widget content;
final String positiveButton;
final Function positiveClick;
final String negativeButton;
View test.kt
@Test
fun intervalOrderNotEnough() {
runBlocking {
intervalRepository.insertAll(arrayListOf(
Interval(1, 0, 0, 86399)
))
playListRepository.insertAll(arrayListOf(
PlayList(1, "pl1", ""),
PlayList(2, "pl2", "")
))
View test.kt
@RunWith(MockitoJUnitRunner::class)
class SampleUnitTest {
lateinit var syncUseCase: SyncUseCaseImpl
lateinit var mdr: MusicDataRepository
lateinit var plr: TestPlayListRepositoryImpl
@Before
fun createUseCase() {
MockitoAnnotations.initMocks(this)
mdr = Mockito.mock(MusicDataRepository::class.java)
plr = TestPlayListRepositoryImpl()
View sample.swift
songsService.callApiGetArtists(onSuccess: { (response) in
self.artists = response.getArtists()
self.tableView.reloadData()
}) { (error) in
self.handleError(error: error)
}
//=--------------------------
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
View scrollcontrollerbug.swift
//
// ViewController.swift
// TestSearchView
//
// Created by Gusli Android Dev on 17.09.2018.
// Copyright © 2018 Gusli Dev. All rights reserved.
//
import UIKit