[daily leetcode] realizes strStr()

Implement the strStr() function. Given a haystack string and a needle string, find the first place (starting from 0) where the needle string appears in the haystack string. If not, returns - 1. Example 1: Input: haystack = "hello", needle = "ll" Output: 2 Example 2: Input: haystack = "aaaaa", needle ...

Added by PLaT on Thu, 26 Dec 2019 21:53:34 +0200

A simple python crawler, crawling Zhihu

The main implementation is to crawl the pictures under all the answers in a favorite The text message is not included yet. It can be realized by itself and is simpler than the picture There are detailed notes in the specific code, please read them by yourself Project source code: 1 # -*- coding:utf-8 -*- 2 3 from spider import S ...

Added by JimmyD on Wed, 25 Dec 2019 16:26:26 +0200

C + + rewrites pattern example 4 (strategy pattern) in Dahua design pattern

(statement: if you want to see the detailed analysis of the example, please see "Dahua design pattern". Here, the article is just to deepen the impression of learning design pattern and write it with C + + program and share the code with you. It's just to replace c language with C + + expression, not to make personal ...

Added by hucklebezzer on Sat, 21 Dec 2019 16:41:28 +0200

Windows API resolves IAT address

Complete code #include <stdio.h> #include <windows.h> int main(int argc,char* argv[]){ /* typedef struct _IMAGE_IMPORT_DESCRIPTOR { union{ DWORD Characteristics; DWORD OriginalFirstThunk; }; DWORD TimeDateStamp; DWORD ForwarderChain; DWORD Name; ...

Added by turboprop on Fri, 13 Dec 2019 19:04:23 +0200

c language variable parameter list function

In the function prototype, the number of parameters is fixed in general, but what to do if you want to receive an indefinite number of parameters at different times? c language Variable parameter list is provided for implementation. The variable parameter list is implemented by macros, which are defined in the header file of s ...

Added by shadysaiyan on Wed, 11 Dec 2019 21:02:47 +0200

php compiles and installs mysqli extension, reporting fatal error: ext/mysqlnd/mysqlnd.h: No such file or directory

Compiling and installing php mysqli extension phpize ./configure && make && make install The following error message was encountered. /bin/sh /usr/local/src/php-7.2.11/ext/mysqli/libtool --mode=compile cc -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/usr/local/src/php-7.2.11/ext/mysqli -DPHP_ATOM_INC -I/usr/local/src/php-7.2.11/e ...

Added by markhard on Tue, 10 Dec 2019 13:52:00 +0200

[C + +] embarrassment ability of 28 friends

The concept of friend What is friendship? Friend is a relationship in C + + Friendships occur between functions and classes or between classes The relationship of friends is single and cannot be transferred Usage of friends Declare friends in a class with the friend keyword A friend of a class can be another class or a concrete functio ...

Added by Jaspal on Fri, 06 Dec 2019 02:13:34 +0200

The first step of html login and registration

On the road of web Security~~~ After learning C language and completing course design, HTML (Hypertext Markup Language) is studied. The purpose of learning html is to understand the structure of those web pages, how his head is, and body, etc. ~ ~ although it's very simple, HTML can't be ignored. The most basic syntax and some comm ...

Added by simon13 on Tue, 03 Dec 2019 21:10:51 +0200

Basic topic 1 of C language

This topic is related to C language structure, function pointer and sorting subject Xiao Wang is the warehouse keeper of the company. One day, he received a task: find a steel pipe from the warehouse (the number of steel pipes to be tested in the warehouse is not more than 1000). This doesn't sound like much, but the requirements of this steel ...

Added by allex01 on Tue, 03 Dec 2019 04:42:53 +0200

How to change a matrix into a triple in R (row, col, value)

Search on bing: How to change the matrix to triple form and search the result on bing: All kinds of C language can't find the way to realize R language R language writing cycle is very slow, just use the ready-made package Matrix Matrix is a very powerful package. It can convert matrix to sparse matrix, change 0 to... And sav ...

Added by ph0ngwh0ng on Tue, 26 Nov 2019 22:02:06 +0200