New Http status code – 451

New Http status code – 451

4 years ago (2015-12-24) Views: 17 Comments: 0

December 24, according to foreign media reports, Internet Engineering Steering Committee IESG recently passed a new Internet HTTP status code - 451 (UnavailableForLegal Reasons), on behalf of legal factors, the site content has been blocked. The status code for Fahrenheit 451 451 by Ray Bradbury comes from Ray Bradbury's influential novel Fahrenheit 451 (Fahrenheit 451).As early as three years ago, Google Tim Bray proposed to the Internet Engineering Task Force (IETF) to allow developers to implement "451" HTTP status codes, but it was not officially approved until last week. He believes that it should separate the code that is not visible from web pages due to technical and non-technical reasons.Previously, many websites used the "403" HTTP status code to describe the prohibition of access due to technical reasons. The "451" will be widely implemented in the future. This error code should help users solve the confusion that they cannot visit the website. The original intention of the 451 status code is to identify which content is forbidden by law and can be used on a network device or a web server.Now, GitHub, Twitter, Facebook and Google have all started using this status code to deal with censorship requirements in various

Assembled instruction corresponds to the English word

Assembled instruction corresponds to the English word

4 years ago (2015-10-16) Views: 6 Comments: 0

Many command books encountered in the learning compendium are forcibly given. They do not tell the reason of the command word. The command is the abbreviation of which English word. It is very troublesome to remember it. First, the register class (register): General registers: AX, BX, CX, DX - these are nothing to write, and that's it. Segment registers: CS--code segment, DS--data segment, SS--stack segment, and ES--extra segment. Special function registers: instruction pointer register IP--instruction pointer, stack pointer SP--stack pointer, base pointer BP--base pointer, source index register SI--source index, target index register DI--destination index, Flag register FR--flag register (or program status word PSW--program status word). PSW common signs are: Marker Flagged with a value of 0 OF(overflow flag) OV(overflow) NV(not overflow) ZF(zero flag) ZR(zero) NZ(not zero) PF (parity flag) PE (parity even) PO (parity odd) CF(carry flag) CY(carried) NC(not carried) DF(direction flag) DN(down) UP(up) SF(sign flag) NG(negtive) PL(plus) TF(trap flag) IF (interrupt flag) AF(auxiliary flag) Command class 1. General data transfer instructions. MOV----> move MOVSX---->extended move with sign data MOVZX---->extended move with zero data PUSH---->push POP---->pop PUSHA---->push all POPA---->pop all PUSHAD---->push all data POPAD---->pop all data BSWAP---->byte swap XCHG---->exchange CMPXCHG---->compare and change XADD---->exchange and add XLAT---->translate 2. Input and output

[data] curl_setopt function related parameters

[data] curl_setopt function related parameters

4 years ago (2015-06-30) Views: 10 Comments: 0

The curl_setopt() function will set options for a CURL session.The option parameter is the setting you want, and value is the value given by this option. The values ​​of the following options will be used as long integers (specified in the option parameter): CURLOPT_INFILESIZE: When you upload a file to a remote site, this option tells PHP the size of your uploaded file. CURLOPT_VERBOSE: Set this option to a non-zero value if you want CURL to report every unexpected event. CURLOPT_HEADER: Set this option to a non-zero value if you want to include a header in the output. CURLOPT_NOPROGRESS: Set this option to a non-zero value if you don't want PHP to display a progress bar for CURL transfers. Note: PHP automatically sets this option to a non-zero value. You should change this option only for debugging purposes. CURLOPT_NOBODY: Set this option to a non-zero value if you do not want to include the body part in the output. CURLOPT_FAILONERROR: If you want PHP to fail (the HTTP code returns 300 or more), do not display it. Set this option to a non-zero value.The default behavior is to return a normal page, ignoring the code. CURLOPT_UPLOAD: Set this option to

PHP generates letters, symbols, digital captcha pictures

PHP generates letters, symbols, digital captcha pictures

4 years ago (2015-06-29) Views: 8 Comments: 0

Recently, Wang Baiyuan’s blog was frequently registered by robots or maliciously attempted login. Occasionally, he received 100 rubbish registration records in one night and received 100 login error email notifications in 10 minutes, which made the very guests very silent and bored.Try to shield IP and other methods still have little effect on the situation, the very guests can not consider joining the verification code, and currently only added a verification code in the registration page, use the Limit Login Attempts plug-in control login (Chinese version of the plug-in see articles :). The following is the PHP code to generate letters, symbols, and digital captchas. It is the extreme guest who has made some modifications to the Internet code: $strpol defines which letters, symbols, and numbers to use for verification codes. Effect demonstration: Http://wangbaiyuan.cn/others/tools/captcha.php Php code generates letters, symbols, digital captcha pictures    

Self-made absolute time relativization java method TimeToString

Self-made absolute time relativization java method TimeToString

4 years ago (2015-06-23) Views: 9 Comments: 0

This method realizes converting absolute date such as 2015-6-23 8:00:00 time string to yesterday 8:00, tomorrow 21:00, today 5:23 and so on.It is quite practical to involve time display in the beginning of Android. Pay attention to the parameters required by the code to pass the time string time TimeToString(String time) code:  

Homemade software update, download, install BYupdate

Homemade software update, download, install BYupdate

4 years ago (2015-06-22) Views: 6 Comments: 0

Class BYupdate Brief description: Implement software information display and software update function java.lang.Object cn.wangbaiyuan.tools.BYupdate Implement software information display and software update functions Author: Wang Baiyuan Field summary Fields  Qualifiers and types Fields and instructions Constructor Summary Constructor  Constructors and instructions Method summary All Methods Instance Methods Concrete Methods  Qualifiers and types Methods and instructions Check for updates Set the software update service address Methods inherited from class java.lang.Object Field details Download_listener Constructor details BYupdate parameter: Icontext - context is generally an activity that references this class Url - Software update service address Version - the current software version number Method details setDownload_url Set the software update service address parameter: Url - Checkupdate Check for updates Code:  

Detailed AndroidFragment life cycle

Detailed AndroidFragment life cycle

5 years ago (2015-06-15) Views: 8 Comments: 0

1 two charts of life cycle Fragment life cycle diagram:   Fragment and Activity life cycle comparison chart: 2 Life cycle analysis 1. When a fragment is created, it goes through the following states. onAttach() onCreate() onCreateView() onActivityCreated() 2. When this fragment is visible to the user, it goes through the following states. onStart() onResume() 3. When this fragment enters "background mode", it will experience the following state. onPause() onStop() 4. When this fragment is destroyed (or the activity holding it is destroyed), it will experience the following state. onPause() onStop() onDestroyView() onDestroy() // originally missed this callback, thanks to xiangxue336. onDetach() 5. Just like activitie, in the following state, you can use the Bundle object to save a fragment of the object. onCreate() onCreateView() onActivityCreated() 6. Most of the states of the fragments are similar to activitie, but the fragment has some new states. onAttached() - called when the fragment is added to the activity (in this method you can get the activity). onCreateView() - This method is called when the activity wants the layout of the fragment. Fragment creates its own layout in it. onActivityCreated() - This method is called after the activity's onCreated() method returns onDestroyView() -

Self-made tool class BYhttpClient based on http post

Self-made tool class BYhttpClient based on http post

5 years ago (2015-06-10) Views: 4 Comments: 0

Class BYhttpClient Introduction java.lang.Object cn.wangbaiyuan.tools.BYhttpClient Constructor Summary Constructor Constructors and instructions Method summary All MethodsInstance MethodsConcrete Methods Qualifiers and types Methods and instructions Methods inherited from class java.lang.Object Constructor details BYhttpClient parameter: Iurl - root address, your server plus your project folder address Iencode - encoding format Method details sendHttpClientPOSTRequest parameter: Path - the URL to which you requested the URL relative to the file address of the root address Params - MAP format key-value pairs Returns: the string that completes the post request and gets the server's reply Throws: Class BYhttpClient code  

WordPress function hook (Hook) (3)

WordPress function hook (Hook) (3)

5 years ago (2015-05-29) Views: 8 Comments: 0

Management interface related Activate_ (plugin file name) This action function is executed the first time a plugin is activated.See the commonly used function -register_activation_hook. Activity_box_end This action function is performed at the end of the active box on the dashboard interface. Add_category_form_pre This action function is executed when the added category text box is not displayed on the interface of the management menu. Admin_head Perform this action function in the <head> HTML block of the dashboard. Admin_head-(page_hook) or admin_head-(plguin_page) This action function is executed in the HTML section <head> of the dashboard of the page generated by the plugin. Admin_init Perform this action function before loading the management interface.See wp-admin/admin.php, wp-admin/admin-post.php, and wp-admin/admin-ajax.php. Admin_footer This action function is performed at the end of the dashboard in the main tab. Admin_print_scripts This action function is executed in the header portion of the HTML to allow the plug-in to add JavaScript scripts to all management interfaces. Admin_print_styles This action function is performed in the header portion of the HTML to allow the plug-in to add CSS or style sheets to all management interfaces. Admin_print_scripts-(page_hook) or admin_print_scripts-(plugin_page) This action function is executed to input the JavaScript script into the HTML message header portion

WordPress function hook (2)

WordPress function hook (2)

5 years ago (2015-05-29) Views: 3 Comments: 0

Backlink action hook function Add_link This action function is executed when the new backlink is added to the database for the first time.Function received parameters: link ID. Delete_link Perform this action function when deleting a backlink.Function received parameters: link ID. Edit_link Perform this action function when editing a backlink.Function received parameters: link ID. Feed action hook function Atom_entry In the atom subscription, after displaying a blog post (but before closing the log tag), this action function is executed. Atom_head In the atom subscription, after displaying the subscribed blog information, the action function is executed before the first blog of the blog is displayed. Atom_ns performs this action function (to add a namespace) for the root XML element of the atom subscription. Commentrss2_item In the comment subscription, after displaying a piece of comment information (but before closing the tag of the comment), this action function is executed.Function received parameters: comment ID, log ID. Do_feed_(feed) This action function is executed when the subscription information is generated. The subscription refers to the subscription type (rss2, atom, rdf, etc.).The priority for displaying subscription information should be less than 10.The parameters received by the function: true (comment subscription), or false (log subscription). Rdf_header In the

登录

Forget password?

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

切换登录

注册

TW