Saturday, May 1, 2021

Edward Lance Lorilla

Edward Lance Lorilla


【VISUAL VB.NET】Folder Option Search

Posted: 01 May 2021 03:38 AM PDT

 Public Class Form1

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

【FLUTTER ANDROID STUDIO and IOS】Draw Graph

Posted: 01 May 2021 02:12 AM PDT

 import 'package:draw_graph/draw_graph.dart';

import 'package:draw_graph/models/feature.dart';

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: GraphScreen(),
);
}
}
class GraphScreen extends StatefulWidget {
@override
_GraphScreenState createState() => _GraphScreenState();
}

class _GraphScreenState extends State<GraphScreen> {
final List<Feature> features = [
Feature(
title: "Flutter",
color: Colors.blue,
data: [0.3, 0.6, 0.8, 0.9, 1, 1.2],
),
Feature(
title: "Kotlin",
color: Colors.black,
data: [1, 0.8, 0.6, 0.7, 0.3, 0.1],
),
Feature(
title: "Java",
color: Colors.orange,
data: [0.4, 0.2, 0.9, 0.5, 0.6, 0.4],
),
Feature(
title: "React Native",
color: Colors.red,
data: [0.5, 0.2, 0, 0.3, 1, 1.3],
),
Feature(
title: "Swift",
color: Colors.green,
data: [0.25, 0.6, 1, 0.5, 0.8, 1, 4],
),
];

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white54,
appBar: AppBar(
title: Text("Flutter Draw Graph Demo"),
automaticallyImplyLeading: false,
),
body: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,

children: <Widget>[
Padding(
padding: const EdgeInsets.symmetric(vertical: 1.0),
child: Text(
"Tasks Management",
style: TextStyle(
fontSize: 28,
fontWeight: FontWeight.bold,
letterSpacing: 2,
),
),
),
LineGraph(
features: features,
size: Size(420, 450),
labelX: ['Day 1', 'Day 2', 'Day 3', 'Day 4', 'Day 5', 'Day 6'],
labelY: ['25%', '45%', '65%', '75%', '85%', '100%'],
showDescription: true,
graphColor: Colors.black87,
),

],
),
);
}
}

【VISUAL VB.NET】Screen Capture

Posted: 30 Apr 2021 07:22 PM PDT

 ' make sure that using System.IO; is included

Imports System.IO' make sure that using System.Drawing.Imaging; is included Imports System.Drawing.ImagingPublic Class Form1 Private tempfile As String = "C:\\Users\\Lorilla Family\\temp.jpg" Private Sub ScreanCapture() If Directory.Exists(Path.GetDirectoryName(tempfile)) Then pictureBox1.Image = Nothing File.Delete(tempfile) End If Dim bounds As Rectangle = Me.Bounds Using bitmap As New Bitmap(bounds.Width, bounds.Height) Using g As Graphics = Graphics.FromImage(bitmap) g.CopyFromScreen(New Point(bounds.Left, bounds.Top), Point.Empty, bounds.Size) End Using bitmap.Save(tempfile, ImageFormat.Jpeg) End Using End Sub 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 ScreanCapture() Dim fs As New FileStream(tempfile, FileMode.Open) ' pictureBox1.Image = new Bitmap(tempfile); PictureBox1.Image = New Bitmap(fs) fs.Close() End SubEnd Class

【GAMEMAKER】Ship Mini Game

Posted: 30 Apr 2021 08:18 AM PDT

 Information about object: obj_bubble

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

image_xscale*=0.99;
image_yscale*=0.99;
if image_xscale<0.05 instance_destroy();
Information about object: obj_beam_1
Sprite: spr_beam_1
Solid: false
Visible: true
Depth:
0
Persistent: false
Parent: obj_collision_parent
Children:
Mask:

No Physics Object
Information about object: obj_beam_2
Sprite: spr_beam_2
Solid: false
Visible: true
Depth:
0
Persistent: false
Parent: obj_collision_parent
Children:
Mask:

No Physics Object

Information about object: obj_beam_3
Sprite: spr_beam_3
Solid: false
Visible: true
Depth:
0
Persistent: false
Parent: obj_collision_parent
Children:
Mask:

No Physics Object
Information about object: obj_beam_4
Sprite: spr_beam_4
Solid: false
Visible: true
Depth:
0
Persistent: false
Parent: obj_collision_parent
Children:
Mask:

No Physics Object

Information about object: obj_game_end
Sprite: spr_flag
Solid: false
Visible: true
Depth:
0
Persistent: false
Parent:
Children:
Mask:

No Physics Object

Information about object: obj_collision_parent
Sprite:
Solid: false
Visible: true
Depth:
0
Persistent: false
Parent:

Children
obj_beam_1
obj_beam_2
obj_beam_3
obj_beam_4
obj_crate_floating
obj_crate_path
Mask:


No Physics Object

Information about object: obj_crate_floating
Sprite: spr_crate
Solid: false
Visible: true
Depth:
0
Persistent: false
Parent: obj_collision_parent
Children:
Mask:

No Physics Object

Create Event:
execute code:

angle=0;//initial angle
sw=5;//for sine wave
Step Event:
execute code:

sw += 0.3;//for sin wave
angle= sin(sw) * 5;//for sin wave
image_angle=angle;

Information about object: obj_crate_path
Sprite: spr_crate
Solid: false
Visible: true
Depth:
0
Persistent: false
Parent: obj_collision_parent
Children:
Mask:

No Physics Object

Create Event:
execute code:

angle=0;//initial angle
sw=5;//for sine wave
path_start(path_crate_1,3,path_action_continue,true);
Step Event:
execute code:

sw += 0.3;//for sin wave
angle= sin(sw) * 5;//for sin wave
image_angle=direction+angle;

【PYTHON OPENCV】Face detection using OpenCV DNN face detector feeding several images to the network

Posted: 30 Apr 2021 08:13 AM PDT

 """

Face detection using OpenCV DNN face detector when feeding several images to the network """ # Import required packages:import cv2import numpy as npfrom matplotlib import pyplot as plt def show_img_with_matplotlib(color_img, title, pos): """Shows an image using matplotlib capabilities""" img_RGB = color_img[:, :, ::-1] ax = plt.subplot(2, 2, pos) plt.imshow(img_RGB) plt.title(title) plt.axis('off') # Load pre-trained model:net = cv2.dnn.readNetFromCaffe("deploy.prototxt", "res10_300x300_ssd_iter_140000_fp16.caffemodel") # Load images and get the list of images:image = cv2.imread("face_test.png")image2 = cv2.imread("face_test2.jpg")images = [image.copy(), image2.copy()] # Call cv2.dnn.blobFromImages():blob_images = cv2.dnn.blobFromImages(images, 1.0, (300, 300), [104., 117., 123.], False, False) # Set the blob as input and obtain the detections:net.setInput(blob_images)detections = net.forward() # Iterate over all detections:# We have to check the first element of each detection to know which image it belongs to:for i in range(0, detections.shape[2]): # First, we have to get the image the detection belongs to: img_id = int(detections[0, 0, i, 0]) # Get the confidence of this prediction: confidence = detections[0, 0, i, 2] # Filter out weak predictions: if confidence > 0.25: # Get the size of the current image: (h, w) = images[img_id].shape[:2] # Get the (x,y) coordinates of the detection: box = detections[0, 0, i, 3:7] * np.array([w, h, w, h]) (startX, startY, endX, endY) = box.astype("int") # Draw bounding box and probability: text = "{:.2f}%".format(confidence * 100) y = startY - 10 if startY - 10 > 10 else startY + 10 cv2.rectangle(images[img_id], (startX, startY), (endX, endY), (0, 0, 255), 2) cv2.putText(images[img_id], text, (startX, y), cv2.FONT_HERSHEY_SIMPLEX, 0.45, (0, 0, 255), 2) # Create the dimensions of the figure and set title:fig = plt.figure(figsize=(16, 8))plt.suptitle("OpenCV DNN face detector when feeding several images", fontsize=14, fontweight='bold')fig.patch.set_facecolor('silver') # Show the input and the output images with the detections:show_img_with_matplotlib(image, "input img 1", 1)show_img_with_matplotlib(image2, "input img 2", 2)show_img_with_matplotlib(images[0], "output img 1", 3)show_img_with_matplotlib(images[1], "output img 2", 4) # Show the Figure:plt.show()

【VUE JS】Checking out with payment request API

Posted: 30 Apr 2021 08:09 AM PDT

No comments:

Post a Comment