LINQtoObjects, LINQtoDataSet and LINQtoXML in C#

Table of Contents 1. Use LINQ to operate arrays and collections 2. Use LINQ to operate DataSet data set 1.AsEnumerable() method 2.CopyToDataTable() method 3.AsDataView() method 4.Take() method 5.Sum() method 6.Example (1) Source code (2) Generate effect 3. Use LINQ to operate XML 1.Load() method of XElement class 2.SetAttributeValue() method of XElement class 3.Add() method of […]

AutoX – Lazy loading of objects and image resources + Storage persistence

AutoX-lazy loading of objects and image resources + Storage persistence 1. Usage scenarios There are many scenarios that require lazy loading. The first time I needed the lazy loading function was when writing a game automation script. I needed to detect the coordinates of an item in advance before subsequent clicks. The item’s position on […]

Ticket grabbing based on the automation tool autox.js (Maoyan)

1. I saw information about how difficult it is to grab tickets to Jay Chou and JJ Lin’s concerts in Moments, so I studied for a while and wrote an automated ticket grabbing script using autox.js. The ticket purchase page automatically clicks to place an order (only for Android phones). 2. Script operation diagram 3. […]

Autox.js script development environment construction, from case to packaged apk (detailed process)

1. Introduction After thinking about it again, Autox.js is continuously maintained based on Auto.js 4.1.1, so I plan to build the Autox.js environment directly. 2. Construction 1. Install VSCode. 2. Install the autox.js plug-in. If you have used the auto.js plug-in before, you need to remove it to avoid affecting the use of the autox.js […]

(11) CSharp-LINQ-LINQToXML (4)

1. XML class 1. Create, save, load and display XML documents static void Main(string[] args) { XDocument employees1 = new XDocument(//Create XML document new XElement(“Employees”,//Create root element new XElement(“Name”, “Box Smith”),//create element new XElement(“Name”, “Sally Jones”)//create element ) ); employees1.Save(“EmployeesFile.xml”);//save to file //Load the saved document into a new variable XDocument employees2 = XDocument. Load(“EmployeesFile. […]

Based on STM microcontroller and MQ2 smoke sensor human body induction temperature and humidity toxic gas serial buzzer alarm optocoupler relay cooling control 1602 liquid crystal display proteus simulation design

1 development environment Simulation diagram: proteus8.15 Program code: KEIL5 Schematic: proteus 2 Function Description Introduction Combined with the actual situation, based on STM microcontroller and MQ2 smoke sensor human body induction temperature and humidity toxic gas serial buzzer alarm optocoupler relay cooling control proteus simulation design. The functional requirements that the system should meet are: […]

Henan 2023CCPC Problem G. Toxel and Character Painting

One day, Toxel found a mathematical expression of the form x^y, where x and y are both positive integers. He wanted to draw this expression into a character painting in a “self-contained” way. Specifically, Toxel will first evaluate x^y to be equal to z. If z ≤ 10^18, Toxel will plot x y = z; […]