"Open source" Zipkin-js-instrumentation-axios: Integrated Axios and Zipkin

"Open source" Zipkin-js-instrumentation-axios: Integrated Axios and Zipkin

Technology 2 years ago (2019-02-19) Views: 53 Comments: 0

Zipkin is a distributed tracking system developed and open source by Twitter, while Axios is a common Javascript HTTP client.Because ZIPKIN-JS officials did not provide axios suitability, and the same type of library Zipkin-jinstrumentation-axios has destroyed the original functionality of Axios, for which the very guest made this library for integration Zipkin and Axios, All of the original method properties of Axios can be supported, and their usage is exactly the same as Axios. Zipkin-js-instrumentation-axios Adds Zipkin Tracing for the Axios JS HTTP client library. It supports all features of . Installation Usage You need to I wfucntion to wrap the native Ainstance, and the Ainstance's type/functions/attributes a Re not affected. As a result, you can-zithe same as A for example:   Interceptors of Axios also supported You can intercept requests or responses before and is handled by then or catch.   The test cases all passed

"Open source" rn-expandabletext:reactnative Long text folding component

"Open source" rn-expandabletext:reactnative Long text folding component

技术 2 years ago (2018-09-19) Views: 149 Comments: 0

Introduced Mobile development often encounters this situation: we need to do a folding function for the text that is too long, so the react Native,rn-expandabletext is a component that solves the problem, and it is used in the same way as the native text component. But when your content exceeds the specified number of lines, it will help you to automatically fold the content.Click Expand to display all content. Project Address: Https://github.com/geekeren/RN-ExpandableText Install Expandabletext Usage Demos Properties Prop Description Default NumberOfLines The max number of lines the content is, the content exceed this value, the Expandview would show. 5 Expandview A callback function to return Expand-view, you can customize the Expand-view. When it ' s null, Expand-view'll disappear Unexpandview A callback function to return Unexpand-view. Usage the same as Expandview Onexpand A callback when the content expands - Oncollapse A callback when the content collapses - Follow Me Follow me on Wechat

Emmet gracefully builds the Html skeleton

Emmet gracefully builds the Html skeleton

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

Web site automatically jumps to thrilling journey on cjb.net

Web site automatically jumps to thrilling journey on cjb.net

computer technology 4 years ago (2016-11-07) Views: 20 Comments: 0

When visiting the blog of Wang Boyuan yesterday, the polar guests discovered that the website jumped to the website www.cjb.net from time to time. It almost jumped to open wangbaiyuan.cn, and other websites did not encounter such strange events. .This situation first appeared only on 360 speed browsers, even if I subconsciously clear the cache, cookies, still did not work.In the end I changed other browsers and found that this was only happening on 360-speed browsers, and it happened occasionally; I had to give up trying to solve the unsuccessful method of uninstalling browser plug-ins.Perhaps 360 speed browser poisoning it, Oh, 360 also known as safe! This evening, I noticed that the annoying automatic jump to cjb.net reappeared, and this time no matter what the browser is, including Edge, IE.This led me to believe that the website was "invaded" and that the "intrusion" method was very obvious, with the js containing the jump code.Because when I examine the element "disable js" the jump will not occur.Then I took a look at Wang Baiyuan’s blog on an article page that references 30 js. As long as one of the js files is embedded with a malicious jump code, there will be

Webview shows rich text interaction with JS and java

Webview shows rich text interaction with JS and java

Algorithm language 5 years ago (2016-01-15) Views: 90 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

Algorithm language 5 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

Multi-engine search box with auto-hint support

Multi-engine search box with auto-hint support

Algorithm language Technical application 5 years ago (2015-12-30) Views: 15 Comments: 0

After using the online open-source navigation station source code to create my navigation page "hundred yuan navigation", I always feel that it lost a very important thing in the navigation site - the search box.So the extremely guest has added the function of the search box for their navigation station, supports Baidu search, good search, geek search, CSDN search, dandelion PT search, etc. (can easily increase the code expansion), in addition to the site interface using the online code, The js code of the logic processing part is entirely realized by me. Html code: The following is the html part of the search box interface, CSS is not posted below, if you need to leave a message: Javascript code To think of the search box as supporting multi-search engine switching, you first need to grasp the URL parameters of the search engine's search keywords, and check that there are several GET parameters (search engines generally use GET values). For example, the following is the search engine search for Wang Baiyuan’s The URL of the blog's results page: https://www.baidu.com/s?ie=UTF-8&wd=%E7%8E%8B%E6%9F%8F%E5%85%83 ?Ie followed by the encoding format, wd is followed by the URLEncode encoding of the searched keyword. So just make a form,

A cool, fast PC site navigation station – hundred yuan navigation

A cool, fast PC site navigation station – hundred yuan navigation

Front end and interface 5 years ago (2015-12-29) Views: 12 Comments: 0

A cool navigation page was found on a website a few days ago. The interface was beautiful and atmospheric, and the windows8 tile style was adopted. The website icons were flattened.Later found that this navigation page is open source, so I downloaded a copy, and made a slight modification and optimization on my host, named "hundred yuan navigation."After that I was proud to set "Hundred Dollar Navigation" as the homepage of all my browsers.Because I can confidently tell you that the secondary loading speed of this navigation page is absolutely faster than any navigation site (unfriendly), including mainstream Baidu search, 360 navigation.Not much to say, hundred yuan navigation website: http://wangbaiyuan.cn/daohang, welcome everyone to set it as your browser home page and put forward valuable suggestions. 0.3s fast loading experience Hundred yuan navigation speed for the first time in my 15M broadband, 360 speed browser Google kernel test speed is 851ms, secondary loading speed 260ms, and supports the second time no networking can access.The reason why the loading can be completed in less than 0.3 seconds is because all the resources in the webpage, including CSS, js, and the webpage's own html are cached locally.A second visit is equivalent to opening

Let the blog insert the video width adaptive

Let the blog insert the video width adaptive

Front end and interface 5 years ago (2015-10-14) Views: 11 Comments: 0

I haven't written a technical post for a long time. This time, I have made a video of personal production in the blog for the time being. I use the code provided by Youku: It's an embed video tag, but the video length and width provided by Youku is helpless. The appearance of 600*400 is OK on the computer. The width of the mobile phone is too large to directly detonate the mobile phone screen. The user experience is very bad. The following code is implemented in different devices to automatically adapt to the width.The implementation principle is very simple. It is to use js (jquery) to dynamically set the long width of the video. Add the following code to the theme's functions.php file, and replace all #main-wrap-left in the code with the class name or ID of the article's div.  

JavaScript to achieve article copy plus copyright information

JavaScript to achieve article copy plus copyright information

Algorithm language 6 years ago (2015-03-14) Views: 12 Comments: 0

As the saying goes, “The World Website is generally copied.” Online blog posts are often reproduced numerous times. Although blogging has no income, I want to write articles that should also be copyrighted.Even though blog posts often include copyright information under the “reproduced request source” below, for example, my is “unless specifically noted, all articles on this site are original blogs of Wang Baiyuan. In order to respect the author’s labor, reprint please specify Source http://wangbaiyuan.cn”; however, some adages are “too lazy to cramp” and copy and paste without copyright notice. The following code is designed for people who are too lazy to cramps. It is the function of automatically adding copyright information to the copy content when using JavaScript to realize the copy of the article. If so, there are people who intentionally delete the copyright information, and I will be silent.   JavaScript to achieve article copy plus copyright information 1. Background theme options add custom code   You can add this code to the end of the web page. If your theme doesn't have custom code, you can refer to the following method: 2.js script function in 2.functions.php Place the following code in the template function file

登录

Forget password?

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

切换登录

注册

TW