Monday, May 17, 2021

Edward Lance Lorilla

Edward Lance Lorilla


【FLUTTER ANDROID STUDIO and IOS】 SelectableText Widget

Posted: 16 May 2021 08:25 AM PDT

import 'package:flutter/material.dart';

void main() {
runApp(MyApp());
}

class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
// This is the theme of your application.
//
// Try running your application with "flutter run". You'll see the
// application has a blue toolbar. Then, without quitting the app, try
// changing the primarySwatch below to Colors.green and then invoke
// "hot reload" (press "r" in the console where you ran "flutter run",
// or simply save your changes to "hot reload" in a Flutter IDE).
// Notice that the counter didn't reset back to zero; the application
// is not restarted.
primarySwatch: Colors.blue,
// This makes the visual density adapt to the platform that you run
// the app on. For desktop platforms, the controls will be smaller and
// closer together (more dense) than on mobile platforms.
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: SelectableTextRichScreen(),
);
}
}

class SelectableTextRichScreen extends StatefulWidget {
@override
_SelectableTextRichScreenState createState() =>
_SelectableTextRichScreenState();
}

class _SelectableTextRichScreenState extends State<SelectableTextRichScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
title: Text("Flutter SelectableText Widget Demo"),
),
body: Center(
child: SelectableText.rich(
TextSpan(
children: <TextSpan>[
TextSpan(text: 'Flutter', style: TextStyle(color: Colors.blue)),
TextSpan(text: 'Lorem', style: TextStyle(color: Colors.black)),
TextSpan(text: 'ipsum', style: TextStyle(color: Colors.red)),
],
),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 48),
textAlign: TextAlign.center,
onTap: () => print('Tapped'),
toolbarOptions: ToolbarOptions(copy: true, selectAll: false),
showCursor: true,
cursorWidth: 2,
cursorColor: Colors.black,
cursorRadius: Radius.circular(5),
),
)
);
}
}

【VISUAL VB NET】Lock Screen

Posted: 16 May 2021 08:24 AM PDT

 Public Class Form1

Dim cmdProcess As Process = New Process() Dim fileArgs As String Dim path As String = "C:\Windows\System32\" Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click fileArgs = "user32.dll,LockWorkStation" cmdProcess.StartInfo.Arguments = fileArgs ' cmdProcess.StartInfo.WorkingDirectory = path cmdProcess.StartInfo.FileName = "RunDll32.exe" cmdProcess.Start() cmdProcess.WaitForExit() Me.Show() End SubEnd Class

【VISUAL Csharp】Firewall

Posted: 16 May 2021 08:22 AM PDT

 using System;

using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows.Forms; // make sure that using System.Diagnostics; is included using System.Diagnostics; using System.Threading; namespace Template{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Process firewall = new Process(); firewall.StartInfo.FileName = "cmd.exe"; firewall.StartInfo.WorkingDirectory = @"\windows\system32\"; firewall.StartInfo.Arguments = "/c netsh firewall set opmode mode=enable"; firewall.Start(); } private void button2_Click(object sender, EventArgs e) { Process firewall = new Process(); firewall.StartInfo.FileName = "cmd.exe"; firewall.StartInfo.WorkingDirectory = @"\windows\system32\"; firewall.StartInfo.Arguments = "/c netsh firewall set opmode mode=disable"; firewall.Start(); } }}

【PYTHON PYTORCH】metric auc

Posted: 16 May 2021 08:21 AM PDT

 from pandas import read_csv

from sklearn.model_selection import KFold
from sklearn.model_selection import cross_val_score
from sklearn.linear_model import LogisticRegression

filename = 'pima-indians-diabetes.csv'
names = ['preg''plas''pres''skin''test''mass''pedi''age''class']
dataframe = read_csv(filename, names=names)

array = dataframe.values

#splitting the array to input and output
X = array[:,0:8]
Y = array[:,8]



kfold = KFold(n_splits=10, random_state = 7)
model = LogisticRegression(solver='liblinear')
scoring = 'roc_auc'

results = cross_val_score(model, X, Y, cv=kfold, scoring=scoring)
print("AUC : %.3f (%.3f) " % (results.mean(), results.std()))

【GAMEMAKER】Character Selected

Posted: 16 May 2021 08:19 AM PDT

 Information about object: object0

Sprite: sprite0
Solid: false
Visible: true
Depth: 0
Persistent: false
Parent:
Children:
Mask:
No Physics Object
Create Event:
execute code:

image_single = (x/50)+(((y-17)/50)*3)-1

Information about object: object1
Sprite: sprite1
Solid: false
Visible: true
Depth: 0
Persistent:
false
Parent:
Children:
Mask:

No Physics Object

Create Event:
execute code:



a = 0
b = 17
while (a+b<250) {
a += 50
if a > 150 {
a = 50
b += 50
}
instance_create(a,b,object0)
}
Step Event:
execute code:

if x < 50 { x = 150 }
if x > 150 { x = 50 }
if y < 50 { y = 150 }
if y > 150 { y = 50 }
Key Press Event for <any key> Key:
execute code:

if keyboard_check(vk_enter) {
global.selection = ((x/50)-1)+(((y/50)-1)*3)
room_goto_next()
}

if keyboard_check(vk_left) { x -= 50 }
if keyboard_check(vk_right) { x += 50 }
if keyboard_check(vk_up) { y -= 50 }
if keyboard_check(vk_down) { y += 50 }

Information about object: object2
Sprite: sprite1
Solid: false
Visible: false
Depth:
0
Persistent: false
Parent:
Children:
Mask:

No Physics Object

Create Event:
execute code:

zzz = instance_create(200,50,object0)
zzz.image_single = global.selection

No comments:

Post a Comment