Study Notes on Deep Learning III — Numerical Computation

This article mainly explores some key concepts in the fields of deep learning and optimization, including gradient, partial derivative, constrained optimization, and the KKT method. Below is the organization and summary of these contents: ### 1. Gradient and Partial Derivative - **Univariate Function**: For a univariate function \( f(x) \), the stationary point (extreme point) can be found by solving its derivative \( df/dx = 0 \). - **Multivariate Function**: - **Partial Derivative**: For a function with multiple inputs \( z = f(x, y) \), partial derivatives can be computed by differentiating with respect to each input separately.

Read More
Study Notes on "Deep Learning" - Part 2: Probability Theory

This document covers many important concepts in probability theory and machine learning, including the distributions of random variables, commonly used functions, and correlation coefficients. Below is a summary of some key content: ### 1. Random Variables and Probability Distributions - **Bernoulli Distribution**: The distribution of a single binary random variable. - **Multinoulli Distribution (Categorical Distribution)**: The distribution over a single discrete random variable with \( k \) distinct states. - **Gaussian Distribution (Normal Distribution)**: \[ \mathcal{N}(x \]

Read More
Study Notes on Deep Learning I — Linear Algebra

This note covers various important concepts in machine learning, particularly those related to linear algebra. Below are some summaries and supplements to the content of the note: ### Fundamentals of Linear Algebra 1. **Matrices and Vectors**: Introduces matrices (arrays composed of multiple rows and columns) and vectors (essentially matrices with a single column or row). Emphasizes their importance in machine learning. 2. **Linear Combinations and Span**: - Linear Combination: Represented as $\sum_i x_i{\bf A}_{:,i}$. - Span (Note: The original content was cut off, so this is an assumption based on the context. If there was more specific content, please provide it for accurate translation.)

Read More
Various Android Notifications, Dialogs, Toasts, and Snackbars
2017-08-16 199 views Android Android

This article introduces four common notification methods in Android applications: Notification, Dialog, Toast, and Snackbar. Notification is used to display important notifications in the status bar, with customizable effects such as ringtones and vibrations; Dialog provides dialog box operations, divided into ordinary prompt boxes and dialog boxes with input options; Toast only briefly displays information on the screen without interfering with the user's current operation; Snackbar pops up a concise message below a specified View, suitable for prompting lightweight operation results. Each method... (Note: The original text cuts off at "Each method"—if there was more content beyond that, please provide the full text for accurate translation.)

Read More
View Animation in Android
2017-08-16 170 views Android Android

TranslateAnimation translateAnimation = new TranslateAnimation( A

Read More
Learning SpringMVC Notes——Creating a SpringMVC Project with Intellij IDEA
2017-08-16 171 views Backend Java web SpringMVC

This article introduces the creation and configuration of a SpringMVC project. First, a Spring project is created, the Spring MVC option is checked, and the required JAR packages are downloaded. Next, the lib folder is moved to WEB-INF and the configuration file path settings are adjusted. Path prefixes/suffixes are configured in `applicationContext.xml` and `dispatcher-servlet.xml` respectively, and the package scan is used to automatically scan Controller classes. Define Cont

Read More
Saving Account and Password Using SharedPreferences in Android
2017-08-16 171 views Android Android

This example demonstrates how to use `SharedPreferences` to save a user's account and password with simple encryption for enhanced security. The main steps of the code are as follows: 1. **Layout Initialization**: Obtain the input fields (`EditText`), buttons (`Button`), and the `SharedPreferences` object used for storing data from the interface. 2. **Reading Stored Data**: When the Activity starts, retrieve data from the `SharedPreference`

Read More
Learning Notes on OKHttp3, an Android Network Framework
2017-08-16 164 views Android Android

This is a complete project for fetching and displaying network images using HTTP GET and POST requests in Android, as well as saving these images to the SD card. The project involves basic network communication, thread handling, and UI updates via Handler, among other key knowledge points. Here are the detailed steps of the project: 1. **Permission Setup** - Add the necessary permissions in the `AndroidManifest.xml` file: ```xml <uses-permission android:

Read More
Android Booting and Startup
2017-08-16 158 views Android Android

The article introduces the steps and code implementation for achieving the boot - start function using broadcast receivers in Android. First, create a BroadcastReceiver class through Android Studio. Then, register this BroadcastReceiver in the <receiver> element in the manifest file, and add the attributes android:enabled="true" and android:exported="true" to ensure its availability. At the same time, in the <intent - filt

Read More
Implementation of an Android Drawing Board
2017-08-16 153 views Android Android

This article introduces how to implement a simple drawing board function. The layout includes three buttons and an image for operation and display. The key part in the Java code is the touch event handling of ImageView. When pressed, the starting point coordinates are recorded; when sliding, a straight line is drawn on the canvas and the image is updated; when released, the ending point coordinates are recorded. In addition, the program also provides color and thickness adjustment functions (implemented through buttons) and a function to save the image. When the user clicks the "Save Image" button, the current Bitmap is saved as a PNG file, and a success prompt message is displayed. Overall,

Read More
Playing Music with Android Service
2017-08-16 183 views Android Android

This article introduces the method of implementing a music player using a Service. First, a custom Service named MusicService is created, and related operations of MediaPlayer are implemented within it. Then, in MainActivity, the Service is bound to control music playback, including functions such as play and pause, and the progress bar can be updated in real-time. In addition, the article also mentions how to load audio files from the network and adds necessary permission declarations. Throughout the implementation process, time-consuming operations such as preparing audio resources are moved to the background.

Read More
Implementing WeChat-Style Bottom Navigation with Fragments in Android
2017-08-16 226 views Android Android

You have successfully implemented a simple bottom navigation bar, where each tab corresponds to a Fragment. This is a common feature in Android applications. Below are some supplementary explanations and suggestions for your code and workflow: ### Code Structure Summary - **MainActivity**: Responsible for loading and switching between different Fragments. - **Four Fragments** (WeiXinFragment, ContactFragment, FindFragment, M

Read More
Displaying Network Images Directly on ImageView in Android
2017-08-16 220 views Android Android

This code demonstrates how to implement image network downloading and local caching functionality in an Android application. The following is a detailed analysis of the code: ### 1. **Network Image Download** #### a. Obtain Image URL ```java String url = "https://pic.cnblogs.com/avatar/1142647/20170416093225.png"; ``` #### b. Create `BitmapWorker` Class

Read More
Reading SMS and Contacts on Android
2017-08-16 223 views Android Android

This tutorial explains in detail how to read SMS and contact information in an Android application. To help you better understand and practice, I will organize and simplify these steps and provide some improvement suggestions. ### 1. Accessing SMS #### Steps: - Ensure the following permission is added in `AndroidManifest.xml`: ```xml <uses-permission android:name="android.permission.READ_SMS"/> ```

Read More
SQL Format Notes
2017-07-06 208 views Backend SQL database

This content mainly introduces the basic SQL statements for creating, modifying, and deleting tables, as well as data querying, inserting, updating, and deleting. First, when creating a table, you need to define the data types and constraints of columns; for modifying a table, you can add or delete columns/constraints, or change the properties of columns; for deletion, you can directly use the `drop table` command and optionally cascade delete related dependencies. Query statements use the `select` keyword to retrieve data from specified tables and support grouping and sorting. In addition, various conditional expressions are also introduced, such as `like`, `insert into...value` (note: the original text may have an incomplete `insert into...value` statement, which has been retained as is).

Read More
Solving Chinese Garbled Characters in MySQL under XAMPP
2017-05-27 204 views Backend XAMPP

This article introduces how to set up UTF-8 encoding in MySQL integrated with XAMPP. First, open the configuration file my.ini in the control panel and add four lines of code: default_character_set = utf8, character-set-server = utf8, collation-server = utf8_general_ci, and default_character_set = utf8. Then restart the MySQL service and ensure that when creating the database (the original content is incomplete, the translation ends here based on the provided text).

Read More
Developing Java Web Projects with IntelliJ IDEA
2017-05-21 197 views Backend JavaWeb

This article introduces the basic steps to develop Java Web applications using IntelliJ IDEA Ultimate. First, download and install the software from the official website, choosing the trial version during installation. When creating a new Java Web project, configure the Tomcat path in the Application Server and add a JSP file. Finally, click the run button to automatically open the homepage in the browser; directly click the browse icon in the upper right corner of IDEA to preview the newly created hello.jsp page. The entire process simplifies the complex

Read More
Installing Ubuntu Linux Subsystem on Windows 10
2017-05-14 349 views Other Ubuntu Windows Linux subsystem

This article introduces two methods to install the Ubuntu subsystem on Windows 10. The first method is to search and obtain it through the Microsoft Store, which requires opening the Settings and enabling Developer Mode first. The second method is to use the command `lxrun /install` in PowerShell for installation. The detailed process includes downloading the installation package, setting up the username and password, and other steps. After installation, you can launch the Ubuntu subsystem by entering "bash" in PowerShell and check the root directory to confirm the successful installation. If uninstallation is needed, you can use the PowerShell command... (Note: The original Chinese text was cut off at "uninstall can be done in Powe", so the translation assumes the continuation with relevant commands, but only the provided content is translated as per the user's input.) (根据用户提供的原文结尾截断情况,上述翻译中保留了原文最后不完整的部分“can be done in Powe”,完整翻译需基于完整原文。若用户实际原文末尾还有内容,需补充完整后再次翻译。)

Read More
Log.d() Not Outputting in Android Debugging
2017-05-13 193 views Android Android

The article discusses the differences in log output between real devices and emulators during Android application debugging. The author found that when debugging on a real device, the logs from Log.d() were not printed, and only error logs could be seen, whereas in the emulator, all levels of logs were displayed normally. The reason is that some mobile phone manufacturers restrict the output of low-level logs. Therefore, the author proposes a solution: creating a `LogUtil` utility class to wrap the Android Log methods. This class decides whether to print corresponding log entries by judging whether it is a debug environment and the current log level, allowing flexible control over... (Note: The original text seems to be cut off at the end, so the translation ends here as per the provided content.)

Read More
Receiving and Sending Cookies in Android
2017-05-13 225 views Android Android Cookie

This article author shares the difficulties encountered when implementing automatic login on the web using Okhttp3 and provides solutions. By default, Android does not save cookies, so it is necessary to manually save the obtained cookies into SharedPreferences; at the same time, read the cookies from SharedPreferences and add them to the request headers in each request. The specific steps include: defining constants ISLOGINED and COOKIE; writing the saveCookiePreference() method to save

Read More
Setting up a Java Web Server on Ubuntu Server
2017-04-16 257 views Backend Ubuntu server JavaWeb server

This article details the steps to install and configure Tomcat, PHPMyAdmin, and resolve MySQL Chinese garbled characters issues on an Ubuntu server. Below is a summary of the content along with some supplementary information: 1. **Installing and Setting Up Apache2** - Changed the Apache2 service port to 8022 to avoid conflicts with other web services. - Started Apache. 2. **Installing PHPMyAdmin and Associating with Apache2** - Configured Apache to support p

Read More
Uploading a Project to Gitee
2017-04-15 166 views Other Gitee Free

This article introduces the method of uploading a project to Gitee, with reasons including: high brand awareness suitable for domestic users; all projects being free; and simple operation easy for beginners to start with. The specific steps are: first, register and log in to the account, create a project on the official website, and fill in relevant information; then, select an appropriate IDE locally to create project files; clone the project to the local machine via Git Bash; add the files to version control, commit and synchronize them. Finally, the uploaded project can be viewed on Gitee. The entire process is straightforward and clear, suitable for beginners to operate.

Read More