Variable category learning of 06 Tkinter learning
There are four categories of variables
IntVar(): integer variable, default is 0.
DoubleVar(): floating point variable, default is 0.0
StringVar(): string variable, null by default
Boolean var(): boolean variable, True is 1, False is 0.
41 set() and get() usage:
from tkinter import *
win=Tk()
def view():
global Message
if Message==False ...
Posted by Clerma on Wed, 27 Nov 2019 07:36:43 -0800
Kotlin core syntax: kotlin Lambda programming
Lambda programming
1. Lambda expressions and member references
Introduction to Lambda: code blocks as function parameters
// lambda expression presentation listener
button.setOnClickListener { /* ... */ }
Lambda and sets
data class Person(
val name: String,
val age: Int
)
>>> val list = listOf(Person("kerwin", 12), Person( ...
Posted by wkrauss on Tue, 26 Nov 2019 04:10:20 -0800
Java learning note 11 - multithreaded tool class practice
Runnable interface
Runnable is an interface. There are only run methods in it. Thread also implements runnable interface, so to realize multithreading, you need to realize runnable interface finally, not to mention to directly demonstrate the code.
Runnable test code
public class RunnableDemo {
public static void main(String[] args) {
...
Posted by ilovetoast on Mon, 25 Nov 2019 21:23:15 -0800
spring initializes beans in different order: SpringUtils.getBean(SpringUtils.java:50) null null null pointer exception,
spring initializes bean s in different environments in different order.
For the same code, there is no error in the local startup, and there was no error in the test environment before, but now there is an error in the test environment
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' e ...
Posted by robinjohn on Mon, 25 Nov 2019 13:22:50 -0800
MATLAB implementation of Wu Enda's machine learning regularized Logistic regression algorithm
plotData.m file
This function file is to distinguish the results of which the results are 0 and 1, mainly through the find function.
function plotData(X, y)
%PLOTDATA Plots the data points X and y into a new figure
% PLOTDATA(x,y) plots the data points with + for the positive examples
% and o for the negative examples. X ...
Posted by vikela on Thu, 21 Nov 2019 10:22:38 -0800
Asynchronous programming with completable future
A scenario will be encountered in the development, as follows
Object result1 = service1.func1();//Implementation 80 ms
Object result2 =service2.func2();//Implementation 50 ms
service3.func3(result1,result2);
func3() needs to wait for func1 and func2 to execute. If func1 and func2 can be executed at the same time, the minimum waiting ...
Posted by david-remone123 on Wed, 20 Nov 2019 07:43:57 -0800
Python data interpretation of the most popular bread in Jingdong
Preface
What's the best brand of bread to sell? What is the most popular taste? I believe that every friend who likes bread will care about these problems. By crawling the bread data of Jingdong, on the one hand, this paper answers all kinds of questions about bread before, on the other hand, it brings you a complete data r ...
Posted by mechamecha on Mon, 18 Nov 2019 11:01:58 -0800
AI: PYTHON - KMEANS clustering practice - divide classes according to performance and other characteristics
Clustering is a problem that we often need to solve. Using Python - > kmeans to achieve clustering is very simple. The following is an example to show you how to simply cluster and show the clustering results. The data source of this paper is from Baidu Library: https://wenku.baidu.com/view/eb73005f9b6648d7c1c746db?from=searc ...
Posted by kid_drew on Sun, 17 Nov 2019 11:27:47 -0800
Groovy Unit Test Framework spock Data Driven Demo
spock is an all-round unit testing framework.
The last article shared the use of the basic features of the spock framework, and on that basis, I made some attempts based on Groovy encapsulation, data-driven, and some advanced Groovy syntax I wrote.There's still a bit of a problem, I don't know if it's because I'm a Java and Groovy hybrid proj ...
Posted by MLJJ on Sun, 17 Nov 2019 00:01:42 -0800
Closures and advanced functions in JavaScript
In JavaScript, functions are first-class citizens. JavaScript is an object-oriented programming language, but it also has many features of functional programming, such as Lambda expressions, closures, high-order functions, etc. functional programming is a programming paradigm.
function dada() {
var a = 1;
var b = function() {
console.log(a ...
Posted by Petran76 on Thu, 14 Nov 2019 21:49:39 -0800