Java- reflection

//Test class 1 package com.test; 2 3 public class Student { 4 5 private int stuNum; 6 private String stuName; 7 private String stuClass; 8 9 private Student(int stuNum) { 10 this.stuNum = stuNum; 11 } 12 Student(int stuNum, String stuName) { 13 this.stuNum = stuNum; 14 this.stuName = stuName; 15 } 16 public Student() { 17 18 } 19 public Student(int stuNum, String stuName, String stuClass) { 20 this.stuNum = stuNum; 21 this.stuName = stuName; 22 this.stuClass = stuClass; 23 } ...

The use of broadcast variables – which province is it querying through IP?

1,Why broadcast variables? To give a simple example, we have to deal with a log file with IP address. 20090121000132095572000|125.213.100.123|show.51.com|/shoplist.php?phpfile=shoplist2.php&style=1&s We can get IP through segmentation. Now we are asked to get the IP province from this IP. The IP rules are as follows (a small part): 1.0.1.0|1.0.3.255|16777472|16778239|Asia, China, Fujian, Fuzhou, China Telecom |350100|China|CN|119.306239|26.0753021.0.8.0|1.0.15.255|16779264|16781311|Asia, China, Guangdong, Guangzhou, China Telecom |440100|China|CN|113.280637|23.1251781.0.32.0|1.0.63....

QT how to install a scene event filter for the graphic element?

void QGraphicsItem::installSceneEventFilter(QGraphicsItem *filterItem) class LabCrossEvent : public QGraphicsObject { Q_OBJECT public: LabCrossEvent() {} virtual ~LabCrossEvent() {} virtual QRectF boundingRect() const { return QRectF(); } virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = Q_NULLPTR) { } signals: void hover(); public slots: protected: bool LabCrossEvent::sceneEventFilter(QGraphicsItem * watched, QEvent * event) { qDebug() << "||" << event->type(); ...

Linux restart and turn off system commands

Label: Use the 65 Restart order: 1、reboot 2、shutdown -r now Restart immediately (root user use) 3、shutdown -r 10 Auto restart in 10 minutes (root user) 4、shutdown -r 20:35 Restart at 20:35 Shutdown command: 1、halt   shutdown -h now 2、poweroff  shutdown -h now 3、shutdown -h now Shut down immediately (root users use) 4、shutdown -h 10 10Automatic shutdown in minutes linuxRestart and close system commands Label: Use the 65 Original: http://www.cnblogs.com/tomcatx/p/4442994.html

Using mpvue to develop small programs how to define global variables

After we created the mpvue project, we found src/main.js and added a line of code behind it. (Note: cannot be added before const app = new Vue (App). Vue.prototype.globalData = getApp().globalData This line of code means that the global variables of the applet are mounted on the Vue prototype so that we can get the global data on different pages Different pages can be acquired or modified by this.globalData. For example, I need to store some basic information of users. this.globalData.userInfo = {name:aaa} Different pages get the same way. console.log(this.globalData.userInfo.name) modify...

CAP 2.3 release, support MongoDB

background story In the 2.3 version, we made some adjustments to Api. Why do we make these adjustments? I’ll talk about this process. I believe that all of you who are using CAP know that there is a Bug in 2.2 and previous versions that persists messages to the database in the case of transactions and if no transactions have been committed, then the CAP will start sending messages to the message queue, but one question askedThe problem is that if the next transaction fails to commit, then the message has actually been sent, and the consumer receives the message, corresponding to the Gi...

The tenth chapter is the foundation of neural network.

The first10chapterNeural network foundation       In this chapter, we will further study the foundation of neural networks. We’ll start by discussing artificial neural networks and how they can be inspired by real biological neural networks in our own bodies. After that, we will review the classic perceptron algorithm (P).Erceptron algorithm) and its role in the history of neural networks.       A perceptron is constructed, and we will learn the back propagation algorithm, which is the cornerstone of modern neural networks. We will use Python to implement the BP algorithm from...

HTML tag marquee to achieve rolling effect

Using & lt; marquee & gt; & lt; / marquee & gt; can achieve a variety of scrolling effects without JS control; using this tag can not only move text, but also certain pictures, tables and so on. 1、Grammar: <marquee>Scroll content < /marquee> Add contents to scroll between labels. 2、Important attributes: (1)Scroll direction direction (including 4 values: up, down, left and right); (2)Rolling mode behavior;   1>  scroll:Cycle rolling, default effect;   2> slide:Just stop rolling once.   3> alternate:Roll back and forth. ...