Tag:Printout

  • Description method [dead loop]

    Time:2021-3-5

    #import “MaTsonga .h” @implementation MaTsonga -(NSString *)description{ return [NSString stringWithFormat:@”{name:%@,age:%i}”,self.name,self.age]; } @end #import “MaTsonga .h” int main(int argc, const char * argv[]) { MaTsonga *ma=[[MaTsonga alloc]init]; ma.name= @”Is it like being silly”; ma.age=24; Nslog (@ “% @”, MA); // the object description method will be called to return the corresponding description information return 0; } […]

  • [technology sharing] log cutting (log cutting by day)

    Time:2021-2-11

    uselogrusand go-file-rotatelogsCut log by day, source code: Iris framework package config import ( config “IrisFramework/config/Log” rotatelogs “github.com/lestrrat/go-file-rotatelogs” “github.com/rifflock/lfshook” “github.com/sirupsen/logrus” “os” “path” “time” ) const LogPath = “./storage/logs” const FileSuffix = “.log” var Log = logrus.New() func InitLog() { Log.Out = os.Stdout var loglevel logrus.Level err := loglevel.UnmarshalText([]byte(“info”)) if err != nil { Log.Panicf (failed to […]

  • What can we learn from HelloWorld

    Time:2021-1-28

    A series of articles: Rust has questions and answers What is cargo Rust has questions and answers What is toml in rust Q & A What can we learn from HelloWorld fn main() { println!(“Hello, world!”); } Main function Trust also takes the main function as the entry point of the executable program. The main […]

  • Custom exception of Java exception

    Time:2021-1-21

    Custom exception class custom exception   1. Java built-in exception classes can be used to describe most of the exceptions in programming. In addition, users can customize exceptions. User defined exception class, just inherit the exception class. 2. Using custom exception classes in programs can be divided into the following steps: Create a custom exception […]

  • Pat (basic) 1004 score ranking (implemented in Python)

    Time:2020-5-27

    Ideas: This problem is relatively simple. My idea is to store the scores in a list, and then store other information in a dictionary with the scores as the key. After finding out the maximum and minimum scores, I will access the dictionary values with scores and print them out. code N = int (input()) […]

  • Debugging electron project under vscode

    Time:2020-5-9

    Recently, a set of software has been developed by using electron to record the debugging problems encountered Tools required Vscode official website link; Electron, the version used this time is: Electron: 1.7.9 Node: 7.9.0 Chromium: 58.0.3029.110 V8: 5.8.283.38 The direct use of the electronic quick start git link Nodejs official website link; collocation method The […]

  • IOS – about GCD semaphores

    Time:2020-4-8

    Talk about it casually In fact, GCD has been contacted by all of us, and we are not explaining what GCD is. Why do we suddenly want to talk about semaphore? In recent interviews, when I asked the interviewers how to deal with a series of operations after multiple requests are completed, some said to […]

  • MySQL management – commands for operating and viewing databases

    Time:2019-11-8

    MySQL management – commands for operating and viewing databases Absrtact: This paper mainly studies the common commands of operating and querying database. View basic information of database Query all databases Syntax: show databases; Example: mysql> show databases; + | Database | + | information_schema | | mysql | | performance_schema | + 3 rows in […]