Tag:Garbled code

  • After Tomcat is started, JS loading is garbled.

    Time:2020-11-23

    After Tomcat is started, the browser visits the local website, all JS loads are garbled, but the text on the page is displayed normally. It’s normal to use a colleague’s computer to access Ben’s machine. However, this problem occurs when you use a local browser to access Ben’s machine. All kinds of eggs hurt. Later, […]

  • Summary of JAVA Chinese garbled code

    Time:2020-11-17

    1. HTML garbled code   2. JSP garbled codeAdd at the beginning of the page   3. XMLHttpRequest garbled   4. Servlet garbled codeAdd these two sentences to the method request.setCharacterEncoding(“utf-8”); response.setContentType(“text/html;charset=utf-8”);   5. Chinese notes are garbledCause: the default encoding for text file encoding in eclipse is GBK solve: Eclipse – > right click […]

  • Format conversion of front-end images such as canvas, file, blob, data URL, etc

    Time:2020-11-15

    Convert file to blob utilize URL.createObjectURL () let $img = document.getElementById(‘img’) file.onchange = function (e) { let file = e.target.files[0] let fileUrl = window.URL.createObjectURL(file) $img.src = fileUrl img.onload = function () { //Manual recycling URL.revokeObjectURL(fileUrl) } } When a picture is selected, the generated img SRC is similar“ blob:null/4304d4f3-c13b-43e8-83f6-8c80426520ff “, can display pictures normally. Convert […]

  • Solve the garbled problem of JSP page using network path to access images

    Time:2020-11-4

    Using JSP page to display the image of network path has garbled problem, as shown in the following figure: It needs to be in Tomcat server.xml Add an attribute to the configuration file: uriencoding = “UTF-8”, which is modified as follows: Copy codeThe code is as follows: <Connector port=”8080″ protocol=”HTTP/1.1″ maxThreads=”150″ connectionTimeout=”20000″ redirectPort=”8443″ URIEncoding=”UTF-8″/> At this […]

  • When Ajax requests the local JSON file, it always goes wrong

    Time:2020-11-4

    $.ajax({ url: ” data.json “, // JSON file location, file name Type: “get”, // the request method is get Datatype: “JSON”, // the returned data format is JSON Success: function (data) {// the method to be executed after the successful completion of the request console.log (data, ‘success’) }, error: function(data){ console.log (data, ‘error’) } }) […]

  • Axios does not receive the correct blob object after setting responsetype

    Time:2020-11-2

    Some project export functions are implemented through blob objects, and the code may be similar to the long one var params={ XX:xx, } this.$axios.get(‘/XXX/XXX’,{ params: params, responseType: ‘blob’ }).then(res => { console.log(res); }); The key statement is responsetype. It represents the data type of the server response. Normally, the response body res can be printed […]

  • Visio 2019 inserts formula steps; Visio 2019 inserts formula garbled steps; Visio 2019 inserts formulas without MathType

    Time:2020-10-30

    Recently, we need to use Visio 2019 to draw many graphs. However, when we need to insert formulas into the block diagram, we find that we can’t insert formulas; Methods on the Internet:https://www.cnblogs.com/xglove/p/6275235.htmlThe main ideas are as follows: Draw the formula in word; Copy formula, select Paste selectively; paste as word document object; But there […]

  • The first Python Programming challenge on the Internet (end)

    Time:2020-10-25

    Date of establishment: March 28, 2020Update Date: April 22, 2020 (end)Personal collection Tool.pywebsite:http://www.pythonchallenge.com/Note: please quote or change this article at will, just mark the source and the author. The author does not guarantee that the content is absolutely correct. Please be responsible for any consequences Title: the first Python Programming challenge on the web Find […]

  • Hyperf full project – 3 – email – SMS

    Time:2020-10-17

    mail [email protected]://github.com/Yurunsoft/PHPMailer-Swoole “yurunsoft/phpmailer-swoole”:”~1.0″ Service layer <?php short message [email protected]://hyperf.wiki/#/zh-cn/guzzle use <?php This work adoptsCC agreementThe author and the link to this article must be indicated in the reprint

  • Lua calls the simple demo of DLL

    Time:2020-10-16

    Lua and C under Windows interact, I am a novice, can only do so much C code //#include “stdio.h” #include “windows.h” #ifdef _cplusplus extern “C”{ #endif #include “lua.h” #include “lauxlib.h” #include “lualib.h” extern int isquare(lua_State *L); extern int alert(lua_State *L); #ifdef _cplusplus } #endif int luaopen_add(lua_State *L){ lua_register( 50. / * Lua state machine*/ “Square”, […]

  • Redis solves the key garbled problem and cleans up the detailed explanation

    Time:2020-10-15

    Key garbled code problem Since redis uses the jdkserializationredisserializer by default, the key is garbled, as follows: keys ‘*!report:flag:phon*’ 1) “\xac\xed\x00\x05t\x00!report:flag:phone_156464” 2) “\xac\xed\x00\x05t\x00!report:flag:phone_198946” 3) “\xac\xed\x00\x05t\x00!report:flag:phone_183302” Solve key garbled code private RedisTemplate redisTemplate; @Autowired(required = false) public void setRedisTemplate(RedisTemplate redisTemplate) { RedisSerializer stringSerializer = new StringRedisSerializer(); redisTemplate.setKeySerializer(stringSerializer); redisTemplate.setValueSerializer(stringSerializer); redisTemplate.setHashKeySerializer(stringSerializer); redisTemplate.setHashValueSerializer(stringSerializer); this.redisTemplate = redisTemplate; } Clean up […]

  • Userenv and NLS of Oracle_ Lang

    Time:2020-10-13

    Userenv and NLS of Oracle_ Lang 1. The most common use of userenv The userenv function returns information about the current session. The following SQL statement can query the database character set of the current session connection select userenv(‘language’) from dual; ofuserenv(‘parameter’)The official website of the return value is as follows Return the language and […]