Emmet gracefully builds the Html skeleton

Emmet gracefully builds the Html skeleton

4 years ago (2016-12-05) Views: 7 Comments: 0

I once saw an academic who entered a strange code on PHP-Storm. When he pressed the Tab key, something magic happened. If HTML is also a programming language, it is privately thought that Html will be the most popular programming language we have come into contact with.Someone may not know what HTML (Hypertext Markup Language) is, but when he first opened the web browser to browse the web in his life, he and the HTML began to humble.... But when he didn't know it was very colorful. Behind the web page is the silent support of the HTML language; HTML+JS+CSS is the front-end three languages.If we compare web pages to humans, HTML gives people skeletons, CSS unknowns give flesh and blood, even clothes and clothing, and JS gives him the soul of sports. This article starts with HTML. The basic knowledge of HTML is beyond the scope of this article. You know, Google.Here, I mainly talk about how to quickly build up the skeleton of HTML. Thinking of HTML as a skeleton is not my whim. I'm just telling myself to write HTML pages with a sense of framework.It goes without saying that my previous HTML code was patchwork.Wherever it

Solve htacess RewriteRule contains?The problem

Solve htacess RewriteRule contains?The problem

4 years ago (2016-11-07) Views: 6 Comments: 0

I recently wrote an IP for the geographic location of the online API using PHP and java. Since I wanted to make my URL look more beautiful, I used the htaccess Rewrite syntax to rewrite the URL."The situation was finally solved. I would like to share it here: The effect I want to achieve is toSo it's easy to write the following rules: And then it can't always achieve the relevant effect. The initial reason is that rewrite can't match QUERY_STRING with a question mark, and finally it succeeds with the following rules: %{variable name} can get the requested parameter

Android monitor bottom navigation bar to expand and hide

Android monitor bottom navigation bar to expand and hide

4 years ago (2016-08-12) Views: 57 Comments: 0

Some Android phones now have navigation bars at the bottom of the virtual buttons. This design removes physical buttons and further increases the screen share of smartphones.But this sometimes brings some compatibility issues. To prevent the navigation bar from covering the layout, add the "fitSystemWindows=true" attribute to the layout. If you want to listen to the navigation bar hidden and displayed, we can add an empty layout with "match_parent" width and height under the root node of the layout file, add the "fitSystemWindows=true" attribute to the layout, and then listen to the layout. onLayoutChange event, you can listen to the navigation bar.

Implementation of Android webview ad filtering

Implementation of Android webview ad filtering

4 years ago (2016-05-02) Views: 368 Comments: 0

Most of the Android browsers now have ad filtering, and most websites have ads.The advertising industry is a hugely profitable industry. From my point of view, most of the Internet products nowadays generally have two kinds of profit models: free advertising and no advertising for members; most of them (including websites and APPs, etc.) are profitable advertising sources. .As a user, they are very disgusted with advertising, but the services on the Internet we can enjoy and support for these services for free to continue and grow but benefit from advertising. Baidu took a look. There was no Android browser to screen out the code for advertising, so the very guests could only do it by themselves.The advertisement on the webpage is generally the webmaster implanting a js code on the webpage. To block the advertisement, it is only necessary to shield the js. WebViewClient several callback functions To implement some advanced operations on WebView, we must first learn the usage of WebViewClient, which is a few commonly used Webview callback function 1, public boolean shouldOverrideUrlLoading (WebView view, String url) : In the click of the request is the link is called, overriding this method returns true indicates that click

A simple LAN UDP real-time video

A simple LAN UDP real-time video

4 years ago (2016-04-12) Views: 49 Comments: 0

In the past, I had always planned to make a video communication software based on UDP communication on the local area network. I did not know how the video stream was transmitted on the network. Although I know the encoding format of several video streams, I have not actually put it into practice. When learning Android watch development, I saw a project on the github that transferred the real-time video of the mobile phone to the watch, and found a LAN video transmission method that seems to be low-grade but should be more practical on the local area network: directly compress the image obtained from the camera. Send it.This project GitHub homepage: https://github.com/retravel/AndroidRealTimeVideo Get webcam real-time pictures, UDP send pictures  UDP server  

Baidu map API position offset calibration algorithm

Baidu map API position offset calibration algorithm

4 years ago (2016-02-17) Views: 1018 Comments: 0

When starting to use the Baidu Maps API for development, you may encounter quite a strange thing. Using Baidu's latitude and longitude to locate on the map is quite inaccurate. This problem was encountered during the development of WeChat and Android.The first time using the Baidu map api to get the location and display it on the map is when the WeChat development, it is not knowing the specific reason but can't get an offset in the WeChat acquisition location to calibrate, although it can barely solve, but Not quite accurate.Later on at the beginning of Android also encountered this problem, only to find Baidu map API positioning offset is not an accidental problem. Baidu map API positioning offset reason The following is from the internet: First, the coordinate system First of all, we have to understand what coordinate systems developers can access? The first classification: 1, GPS, WGS-84, the original coordinate system.The coordinates recorded by an international standard GPS recorder are all GPS coordinates.Unfortunately, in China, GPS coordinates are not allowed on any of the map products. It is said to be confidential.The GPS coordinates are shown in the form of latitude and longitude in latitude and longitude: 2,

Webview shows rich text interaction with JS and java

Webview shows rich text interaction with JS and java

4 years ago (2016-01-15) Views: 70 Comments: 0

WebView is a control for displaying web pages under Android. Using it can implement a simple browser to access web pages on the Internet.It can also be used as a local text display control, similar to textView.WebView or TextView is used to display HTML content. There are big differences in the way they interact. Take the image click event in HTML content as an example. In WebView mode, developers need to respond to a click event by injecting JavaScript code. The Android system provides a mechanism for a JavaScript web page script in a WebView to call a Java class method; in the TextView, the image is parsed as an ImageSpan and responds by registering a click event on ImageSpan.   One, webview shows rich text For example iniHtml is a string of HTML code, useThis html can be displayed on the webview.   Second, webview display project resources in the web page file We can put an html file index.html under the project assets file, use WebView.loadUrl ("file:///android_asset/index.html") to display the html file, in this html file if you want to reference the asserts file The folder css and js files are also accessed using file:///android_asset/ ;. Third, java

Webpage Add Link Call APP and Jump Download Website

Webpage Add Link Call APP and Jump Download Website

4 years ago (2016-01-09) Views: 5 Comments: 0

On the mobile-end web pages of JD.com, Baidu.com, etc., there is often a hovering prompt “Click to open the client”. If the user has installed the client on the mobile phone, the client will be automatically invoked to open the client with the same content as the current web page. End page; if the user does not install these apps, the browser will jump to the download site, allowing the user to download the client.This function is also implemented in Wang Baiyuan's blog client. Previously in the "Android implementation to open a specified link to invoke other applications" describes how to automatically invoke the client software if the client clicks on a specific link (APPLINK), and repeat it again here: AndroidManifest in the Activity that you want to jump to when you open the specified link Add an intent-filter tag to the .xml manifest file, and set the scheme, HOST, and other attributes as in the following example. How to link to the client specified page by Category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="wbyblog" android:host="wangbaiyuan.cn" android:pathPrefix="/home"/> This Intent call Activity can not only start the app when the applink is clicked, but also supports HTTP-like GET pass values. This is the prerequisite

Baidu Cloud Push Blog New Article Alert

Baidu Cloud Push Blog New Article Alert

4 years ago (2016-01-07) Views: 15 Comments: 0

In the development of Wang Baiyuan's blog client, in order to participate in the new article published to achieve the effect of client notification, extremely guests use Baidu cloud push platform, using Baidu official SDK and demo provided to achieve.When the server sends a notification, the client executes the onNotificationClicked callback function.The formal parameters of the function are Context context: context String title: Notification title String description: notification content String customContentString: custom field, through the json access to the server's value. Android end Server-side code requires the introduction of sdk.php. The key is that the server must support the cUrl module.My Alibaba Cloud Free Host does not support it. Later, my message push code was placed on Jingan's virtual host and the Alibaba Cloud URL was used to execute the PHP files on Jingan's host. This solved the problem. PHP server side    

Syntax learning swift(1) Language Description

Syntax learning swift(1) Language Description

4 years ago (2015-12-30) Views: 7 Comments: 0

Due to participate in an iOS contest, very guests have recently started learning swift language.The swift language is a new programming language released by Apple in 2014 that develops Apple-owned software. It seems that there is a tendency to suppress the objective c language that was used to develop Apple software. Therefore, individuals feel that learning swift is still promising.Since the development of iOS requires the MAC system, it took a lot of time for my Dell computer to install the “black apple”. However, because of the driving problem, it was impossible to connect to the Internet, which greatly affected learning.To this end, I am very grateful to Mr. Fan Yang for borrowing an idle MAC computer. Compared to the c++, java, php, and javascript languages ​​that have been studied previously, the swift language seems to me more advanced or "Advanced" is more concise than swift in Java and other languages. It is extremely powerful for some data types such as arrays. Writing a large amount of swift code can do a lot of things.The simple, advanced swift can save the programmer's typing workload, but it also means that the language may be more encapsulated.Encapsulation makes members easy to operate

登录

Forget password?

您也可以使用第三方帐号快捷登录

切换登录

注册

TW