Skip to content

Instantly share code, notes, and snippets.

View lecuseasar's full-sized avatar
💻
Focusing

emrepbu lecuseasar

💻
Focusing
View GitHub Profile
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Material App',
home: Page1(),
import 'package:flutter/material.dart';
import 'package:flutter/physics.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Material App',
@lecuseasar
lecuseasar / MyRiveWidget.dart
Last active March 11, 2021 13:45
Continuously playing a Looping Animation https://pub.dev/packages/rive
import 'package:flutter/services.dart';
import 'package:rive/rive.dart';
import 'package:flutter/material.dart';
class MyRiveWidget extends StatefulWidget {
final String riveFile;
final String animationName;
final BoxFit fit;
const MyRiveWidget({
import 'package:expansion_card/expansion_card.dart';
import 'package:flutter/material.dart';
import 'package:speed_reader/widgets/rive_widget/rive_widget.dart';
String text =
'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes oContrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lore
@lecuseasar
lecuseasar / random_alphanumeric_generator.py
Created March 17, 2021 13:25
1. En az bir büyük harf, en az bir küçük harf, en az 8 karakter alfanumerik bir şifre oluşturma politikasına göre rastgele şifre üreten bir program yazınız. 2. Rastgele şifreler belirleyerek yada üreterek 1.maddede ki kriterlere uymayan şifreleri belirleyiniz
import string
import random
# * https://docs.python.org/3/library/string.html
letters_lowercase = string.ascii_lowercase
letters_uppercase = string.ascii_uppercase
numbers = string.digits
length = 8
@lecuseasar
lecuseasar / lottery.py
Created March 17, 2021 13:59
Konsoldan oynanan bir sayısal-loto programı geliştirin. Programın tuttuğu ile bizim girdiğimiz sayıdan kaç tanesi tutacak.
import random
def sayi_uret(s=1, f=49, c=6):
numbers = set()
while len(numbers) < c:
numbers.add(random.randrange(s, f))
return numbers
@lecuseasar
lecuseasar / FixedPoint.m
Last active April 23, 2021 19:40
my matlab homework
% Aşağıdaki lineer olmayan bir denklem verilmektedir.
% f(x)=e^(-x)-x
% Denkleminin köklerini hem grafik yöntemi hem de Fixed Point yöntemi ile çözen programı yazınız. x1 =0, tol=0.01 bitirme koşulu olarak abs(x2-x1) <tol ifadesini kullanınız.
clc; clear; close all;
fprintf('Fixed Point yontemi kullanarak f(x)=e^(-x)-x denkleminin koklerini bulmak\n');
%Bilir kişinin verdiği değerler verdiğiniz değerler
@lecuseasar
lecuseasar / GaussSeidel.m
Last active April 23, 2021 19:39
my matlab homework
clc; clear; close all; format('long', 'g');
fprintf("Gauss Seidel\n3x-0.1y-0.2z = 7.85 AND\n 0.1x+7y-0.3z = -19.3 AND\n 0.3x-0.2y+10z = 71.4 AND\n if error_x < 0.01 break; \n\n");
index = 1;
x(index) = 0;
y(index) = 0;
z(index) = 0;
error_x = 9999;
while error_x(index) >= 0.01
x(index + 1) = (7.85 + 0.1 * y(index) + 0.2 * z(index)) / 3;
@lecuseasar
lecuseasar / Jacobi.m
Last active April 23, 2021 19:39
my matlab homework
clc; clear; close all;
fprintf("Jacobi iter. x^2 - 2 * x - y = .5 AND x^2 + 4 * y^2 = 4 \n");
x_0 = 0;
y_0 = 0;
E = 1.0E-4;
fprintf("i x_1 y_1 error_x error_y \n");
for index = 1:100
x_1 = (x_0^2 - y_0 + .5) / 2;
y_1 = sqrt((4 - x_0^2) / 4);
error_x = abs(x_1 - x_0);
@lecuseasar
lecuseasar / read_file.cpp
Last active June 12, 2021 16:12
I/O Redirection
#include <iostream>
#include <fstream>
#include <string>
void readFile(){
std::fstream file;
file.open(R"(C:\Users\emrep\Documents\everyday\cpp\one_day\a.txt)", std::ios::out);
std::string line;
//std::cout << line << std::endl;
std::streambuf* stream_buffer_cout = std::cout.rdbuf();