Tag:c

  • Interoperability between C++: string_view and CAPI

    Time:2019-8-24

    Std:: string_view is a new class added to C++ 17 and is an ownerless reference to strings. The operation on std:: string_view does not generate a new string (such as substr), but returns a new string_view but refers to the original string. This improves efficiency, but brings a problem: std:: string_view has no c_str method. […]

  • Cracking Business Staff Data Encrypted Data and Transi-id

    Time:2019-8-24

    Recently, a friend said that the business consultant was also depressed by the encrypted data crawling classmates caused great pressure, and then I also studied the data encryption, and finally cracked it out. Business Staff Encryption 1. Request headertransit-idencryption Purpose: Request filtering When data requests are made at the front end, they are added to […]

  • Using sigprocmask and sigpending to capture and process signals in the program body

    Time:2019-8-24

    Recently trying to useepollWrite a similarlibeventThe library. So, how to add the observation of signal events in event loop like libevent?I checked the information. One possible way is to use it.sigprocmask()And related functions have been realized. But please note that this method is defective. Please look out to the officials.After further research, the individual does […]

  • Detailed Explanation of the Use of C# Custom Grammar Sugar

    Time:2019-8-24

    Syntactic sugar, also translated as sugar-coated grammar, is a term invented by Peter J. Landin, a British computer scientist. It refers to a grammar added to a computer language, which has no effect on the function of the language, but is more convenient for programmers to use. Generally speaking, the use of grammatical sugar can […]

  • C/C++ – String Array

    Time:2019-8-23

    How to define string array in C language? Character pointer char *str[]=”Hello World!”; char *str; str = “Hello world” Understanding: The string pointer variable itself is a variable.The first address used to store strings。 The string itself is stored in a consecutive memory space headed by the first address and ends with 0. * a […]

  • One-to-one mapping of Entity Framework

    Time:2019-8-23

    One-to-one relationships are complex relationships in the Entity Framework, involvingHasOptional 、WithRequired 、 WithOptionalPrincipal 、 WithOptionalDependent。 In this article, we will explain the usage of these points in detail. Let’s take members and orders as an example. A member may or may not have orders, but an order belongs to a member absolutely. We first write […]

  • Unity C Mathf. Abs () Absolute Value Performance Test

    Time:2019-8-23

    It has been mentioned before that writing trinomial operators directly when taking absolute values is more efficient than using Mathf. Abs ().Today, I tested it unexpectedly. I didn’t know that it was 2 – 3 times more efficient to write a trinomial operator directly than Mathf. Abs (). This performance gap is a little unreasonable! […]

  • Advanced Programming in Unix Environment: Chapter 1 – Basic Knowledge of UNIX

    Time:2019-8-23

    1.2 UNIX Architecture 1. Architecture:(1) Kernel (2) System Call (3) Shell, Common Function Library (4) Applications 1.4 Files and Directories 1. Example: Simple implementation of LS (l) command #include “apue.h” #include <dirent.h> int main(int argc,char * argv[]) { DIR *dp; struct dirent *dirp; if(argc!=2) err_quit(“Usages: ls directory_name”); if((dp=opendir(argv[1])==NULL)) err_sys(“can’t open %s,argv[1]”); while((dirp=readdir(dp))!=NULL) printf(“%s\n”,dirp->d_name); closedir(dp); exit(0); […]

  • Examples of exception handling operations in C# multithreading

    Time:2019-8-23

    This paper gives an example of exception handling in C# multithreading. Share for your reference, as follows: Handling exceptions in conventional Thread Subthreads created with Thread need to be captured in delegates, not in context threads static void Main(string[] args) { ThreadStart threadStart = DoWork; Thread thread = new Thread(threadStart); thread.Start(); thread.Join(); } static void […]

  • The binutils toolkit under Linux

    Time:2019-8-22

    I. Overview Binutils is a set of binary tools for GNU. Tools include:addr2line、ar、as、c++filt、dlltool、gold、gprof、ld、nlmconv、nm、objcopy、objdump、ranlib、readelf、size、strings、strip、windmc、windres。 Instrumentation 1、addr2lineConvert program address to file name and line number 2、arTools for creating, modifying, and extracting archives 3、asGNU assembler 4、c++filtA filtering tool for demangle operation of coded C++ symbols 5、dlltoolTools for creating and using DLL 6、goldAn updated and faster ELF (ELF format […]

  • Entity Framework Multi-to-Multi Mapping

    Time:2019-8-22

    In the last article, we explained one-to-many mapping in EF. In this article, we explained many-to-many mapping in EF. In this article, we also use a simple example to illustrate many-to-many mapping. Zero and Automatic Generation of Relation Table Story: In a student course selection system, there are two entities: students and courses. The relationship […]

  • Is and as operators

    Time:2019-8-22

    is Reference is classjudgeReference to an instance in the heapIs it?Categories or genera of classesCreate an instance.No exception is thrown. It returns true or false. as Reference to as classReturns a reference to the class type or base class type of the instance in the heap to which the reference refers, which points to the […]