Skip to content

Instantly share code, notes, and snippets.


Dbank daisukenagata

View GitHub Profile
daisukenagata / AutoOpenTextField.swift
Last active Nov 28, 2021
View AutoOpenTextField.swift
import SwiftUI
@available(iOS 15.0, *)
struct AutoOpenTextField: View {
@State private var name = ""
@FocusState var isFocused: Bool {
didSet {
DispatchQueue.main.async {
isFocused = true
View welcome.dart
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Welcome to Flutter',
home: new Scaffold(
View Mathematics.swift
import UIKit
class Pointted {
var horizonal: CGPoint
var vertical: CGPoint
init(h: CGPoint, v: CGPoint) {
horizonal = h
vertical = v
View Samplem4a.swift
// ViewController.swift
// Samplem4a
// Created by 永田大祐 on 2021/03/28.
import UIKit
import AVFoundation
View Get_DepthData.swift
import UIKit
import AVFoundation
class ViewController: UIViewController, AVCapturePhotoCaptureDelegate {
private var videoPreviewLayer: AVCaptureVideoPreviewLayer?
private var stillImageOutput = AVCapturePhotoOutput()
private var captureSession = AVCaptureSession()
private var capturepDevice: AVCaptureDevice?
private var session: AVCaptureSession?
daisukenagata / SimpleDesign_SwiftUI.swift
Last active Mar 22, 2021
View SimpleDesign_SwiftUI.swift
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
.frame(maxWidth: .infinity, maxHeight: .infinity)
VStack {
HStack {
View String_Split.swift
import UIKit
var str = "Hell12o, p3laygrou4.5nd"
var ans = ""
str.forEach { s in
if (s.description.range(of: "[0-9-.]",
options: .regularExpression,
range: nil,
locale: nil) != nil) {
View gist:b7dc924f2ec9ab0105f538083b6350d6
<?xml version="1.0" encoding="UTF-8"?>
<document type="" version="3.0" toolsVersion="17156" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_0" orientation="portrait" appearance="light"/>
<plugIn identifier="" version="17126"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
View gist:082955c365f263bd9c17a76d5041153f
func FirebaseAppCrashlytics() {
let userInfo = [
NSLocalizedDescriptionKey: NSLocalizedString("The request failed.", comment: ""),
NSLocalizedFailureReasonErrorKey: NSLocalizedString("The response returned a 404.", comment: ""),
NSLocalizedRecoverySuggestionErrorKey: NSLocalizedString("Does this page exist?", comment: ""),
View gist:40fa8807833c1206bfd8d9dd77ffb219
import SwiftUI
final class TextModel: ObservableObject {
@Published var roomIndex = Array<String>()
struct ContentView: View {
@State private var tag : Int?
@State private var view: AnyView?