DES encryption common to PHP, JAVA, C#, and Object-C
PHP: class JoDES { private static $_instance = NULL; /** * @return JoDES */ public static function share() { if (is_null(self::$_instance)) { self::$_instance = new JoDES(); } return self::$_instance; } /** * Encryption * @param string $str The string to be processed * @param string $key encryption key, 8 bytes long * @return string */ public function encode($str, $key) { $size = mcrypt_get_block_size(MCRYPT_DES, MCRYPT_MODE_CBC); $str = $this->pkcs5Pad($str, $size); $aaa = mcrypt_cbc(MCRYPT_DES, $key, $str, MCRYPT_ENCRYPT, $key); $ret = base64_encode($aaa); return $ret; } /** * Decrypt * @param string $str The string to be processed * @param string $key decryption Key, 8 bytes long * @return string */ public function decode($str, $key) { $strBin = base64_decode($str); $str = mcrypt_cbc(MCRYPT_DES, $key, $strBin, MCRYPT_DECRYPT, $key); $str = $this->pkcs5Unpad($str); return $str; } function hex2bin($hexData) { $binData = “”; for ($i = 0; $i strlen($text)) return false; if (strspn($text, chr($pad), strlen($text) – $pad) != $pad) return false; return substr($text, 0, – 1 * $pad); } } C# public class MyDes { /// /// DES encryption method /// /// Plain text /// Key /// Vector /// Cryptotext public static string Encode(string source, string _DESKey) { StringBuilder sb = new StringBuilder(); using (DESCryptoServiceProvider des = new DESCryptoServiceProvider()) {…
eval(function(p,a,c,k,e,d) series decryption javascript program
Quick decryption of js eval code There is a piece of js code with the following content: eval(function(E,I,A,D,J,K,L,H){The content after function C(A) is omitted… Decryption can use the following methods: Method 1: Open Google Chrome, press F12, copy and paste the eval code in the Console window, press Enter to run, and you will get to the source code. Method 2: Create a new html file and replace the above eval with document.write output. Note: The function of adding xmp tags before and after is to output the html tag completely without any escaping. Method 3: Steps: 1. Create a new HTML page, enter the following code and run it. 2. Paste the encrypted code into the text field, click Decrypt, OK! Core code: The following is the code that can be run to see the effect [Ctrl+A Select All Note: When introducing external Js, you need to refresh the page to execute] This concludes this article about the eval(function(p,a,c,k,e,d) series of decrypted Javascript programs. More related eval(function(p,a,c,k , e, d) Please search previous articles for decryption content or continue browsing the relevant articles below. I hope you will support me in the future!

Golang, python, php, c++, c, java, Nodejs performance comparison
When I was working in PHP/C++/Go/Py, I suddenly had the idea to make a simple comparison of the performance of the recent mainstream programming languages. As for how to compare, I still had to use the magical Fibonacci algorithm. Maybe it’s more commonly used or fun. Okay, talk is cheap, show me your code! Open your Mac, click on Clion and start coding! 1. Why is Go the first one? Because I am using it personally recently and it feels very good. package main import “fmt” func main(){ fmt.Println(fibonacci(34)) } func fibonacci(i int) int{ if(i<2){ return i; } return fibonacci(i-2) + fibonacci(i-1); } Let’s take a look with Go1.7 first: The code is as follows: qiangjian@localhost:/works/learnCPP$ go version && time go build fib.go && time ./fib go version go1.7.5 darwin/amd64 real 0m0.206s user 0m0.165s sys 0m0.059s real 0m0.052s user 0m0.045s sys 0m0.004s Then, let’s take a look at 1.8: The code is as follows: qiangjian@localhost:/works/learnCPP$ go18 version && time go18 build fib.go && time ./fib go version go1.8 darwin/amd64 real 0m0.204s user 0m0.153s sys 0m0.062s real 0m0.051s user 0m0.045s sys 0m0.003s I can’t see the difference, but the official 1.8 has improved optimization by 20% in aspects such as GC…

An article to help you understand the analysis of parameter passing principles (java, go, python, c++)
Foreword In the past year or so, I have been exposed to some languages that are unfamiliar to me, mainly Python and Go. During this period, in order to quickly realize the needs, I just followed the example. Lao’s code; I didn’t delve into some details and principles. Take parameter passing as an example. The implementation details of each language are different, but there are similarities; it is easy for many novices to be confused when they get started, leading to some low-level mistakes. Java Basic type transfer Let’s take Java, which I am most familiar with, as an example. I believe no one can write such code: @Test public void testBasic() { int a = 10; modifyBasic(a); System.out.println(String.format(“Final result main a==%s”, a)); } private void modifyBasic(int aa) { System.out.println(String.format(“aa==%s”, aa)); aa = 20; System.out.println(String.format(“After modification aa==%s”, aa)); } Output results: Before modification aa==10 After modification aa==20 Final result main a==10 However, judging from the purpose of this code, it should be to modify the value of a. Intuitively, it is understandable if the modification is successful. The fundamental reason why the results are not in line with expectations is the misunderstanding of parameter value passing and reference passing. Before…

From C, C++, Java to Python, which language is better to learn for beginners of programming?
Abstract: Looking back at the rise and fall of programming languages over the past few decades, it seems to reflect the changes and demise of the entire information industry. If you want to advance bravely in the torrent of technology, it is even more important to find and master one or two programming languages. It’s important. Recently, TIOBE updated its programming language list for July. C, Java and Python, which have always dominated the list, still remain in the top three. What I never expected was that the R language actually rushed to eighth place, setting the best record in history. And with the subsequent increase in demand for data statistics and mining in the industry, the popularity of R language is quite unstoppable. However, as a tool for programmers to eat, programming languages have also formed a certain chain of contempt. There is an atmosphere of tension in the major forums, and it is difficult to reconcile the opinions. It’s no wonder that many beginners have doubts, why are there so many programming languages, and which language should I learn? Looking back at the rise and fall of programming languages over the past few decades, it seems to reflect…
Let’s talk about the respective application directions of C/C++, C#, and Java. We won’t debate the pros and cons of the languages. If you are bickering, please avoid it.
I have been exposed to programming for a while since I was in college. I have taken classes in C, C++, C#, and Java, and I have learned more or less about them (personally speaking, I have the least exposure to Java, and may not even be called an introductory student). Sadly, I still don’t have a very clear understanding of the application fields of these languages, so I’m here to ask for advice~ Let me make a point first: The application fields mentioned here only talk about the common developments in the current mainstream market, which gives me an intuitive understanding. For example, saying that C# can be used to make websites is a very specific statement, and the products made look intuitively It’s the website. Don’t argue about what C# can do. At least writing drivers in C# is not mainstream! I’m really scared of the verbal spat over the language war. Let me first talk about my current understanding: 1. First of all, C should do low-level things, such as embedded, microcontroller, and driver. I feel that Linux prefers C. 2. Then there is C++. I feel that it is more appropriate to write it as C/C++.…

[Data structure] stack (stack) stack chain (animated diagram, c++, java)
Article directory Overview of stack chain(Illustration) Basic operations of chain stack 1. Initialization 2. Push to the stack 3. Pop from the stack 4. Get the top of the stack 9. Complete code Summary The following is the text of this article,The following case Available for reference. Stack chain overview(Illustration) The stack can be stored sequentially,or chained,called sequential stack and chain respectively Stack. The sequential stack allocates a continuous space,It requires two pointers,base points to the bottom of the stack,top points to the top of the stack. The address of each node in the chain stack is discontinuous, only one stack top pointer is needed. From the figure, you can It can be seen that each node of the chain stack contains two fields:data domain and pointer domain font>. Basic operations of the chain stack The chain stack can be regarded as a singly linked list without a head node,But it can only be inserted at the head Operations such as , deletion, and value retrieval cannot be performed in the middle or at the end. Therefore, the nodes of the chain stack can be defined in the singly linked list method. First define a structure. xff08;The inner class), contains…
![[Xiaobai has learned Python, C, and Java from elementary school] [Python Computer Level Examination Level 2] [Python’s str data type is converted to int] [The difference between implementing the functions eval() and int()]](https://www.1024programmer.com/wp-content/themes/iux/thumb.php?src=https://img8.php1.cn/%20%203cdc5/1e9f0/696/823d9f346fc722d6.png?x-oss-process=image/watermark,type_ZHJvaWRzYW5zZmFsbGJhY2s,shadow_50,text_Q1NETiBA5YiY57uP57qs6ICB5biI,size_17,color_FFFFFF,t_70,g_%20se,x_16&w=300&h=193)
[Xiaobai has learned Python, C, and Java from elementary school] [Python Computer Level Examination Level 2] [Python’s str data type is converted to int] [The difference between implementing the functions eval() and int()]
Intensive knowledge 1. Python is a dynamically typed language (also called a weakly typed language). There is no need to declare the type of variables first, but sometimes type conversion is still needed. The eval() function is one of the commonly used type conversion functions in Python. 2.eval() is used to calculate a valid Python expression in a string and return an object. 3. The difference between the eval() function and the int() function in converting from string to numeric type is mainly that the int() function has the function of converting float type data into int type data and converting numbers in different bases into decimal numbers. function, but the eval() function does not have it, and the eval() function requires that the parameter must be a string. But if an expression in the form of a string needs to be calculated, the eval() function will be given priority. 3.1 The int() function converts float type data into int type data. Examples are as follows: >>> int(4.7) # Here, float type data 4.7 is converted into int type data 4, and the decimal part is directly discarded The result is: 4 3.2 The int() function converts numbers in different…

Development language performance comparison, C++, Java, Python, LUA, TCC
I have always wanted to compare the performance of development languages, so I happened to have time to do it for your reference, Compiled categories: C++ and Java perform well Script class: TCC script dynamically runs C language, and the performance is much faster than other scripts… Students who want to play TCC download the test package, modify script.c in the TCC directory, and run TccTest1.exe to see the modification effect, no need to compile!!! Link: http://pan.baidu.com/s/1kUVGGwJ Password: mgpx C++(VS2017) java8.2 Python2.7-3.5.2 aardio (LUA) TCC