Skip to content

Instantly share code, notes, and snippets.

View ercantomac's full-sized avatar
:shipit:

Ercan Tomac ercantomac

:shipit:
  • Genova, Italy
View GitHub Profile
@ercantomac
ercantomac / Program.fs
Created December 24, 2023 17:22
F# program to convert binary numbers to decimal numbers
let rec power (number: int) (pow: int) =
match pow with
| pow when pow < 0 -> 0
| 0 -> 1
| 1 -> number
| _ -> number * power number (pow - 1)
let getDecimalValue (input: (int * char)) =
let (index, bit) = input
@ercantomac
ercantomac / main.dart
Created December 20, 2023 09:56
skeuomorphic button by DALL-E
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
import 'dart:math';
import 'dart:ui';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
static int view = 1;
static PageController controllerPageView = PageController(viewportFraction: 1 / 3), controllerListView = PageController(viewportFraction: 1 / 5);
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',