├── .DS_Store ├── .gitignore ├── .vscode ├── c_cpp_properties.json ├── launch.json ├── settings.json └── tasks.json ├── Algorithm ├── .DS_Store ├── SkipList │ ├── SkipList.cpp │ ├── SkipList.out │ └── SkipList.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── SkipList.out ├── astar_dijkstra │ └── astar_dijkstra.cpp ├── back_origin │ ├── back_origin.cpp │ ├── back_origin.t │ ├── back_origin.t.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── back_origin.t │ ├── eight_queens.cpp │ ├── eight_queens.t │ ├── eight_queens.t.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── eight_queens.t │ ├── package_problem.cpp │ ├── package_problem.t │ ├── package_problem.t.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── package_problem.t │ ├── sortAll.cpp │ ├── sortAll.t │ ├── sortAll.t.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── sortAll.t │ ├── whoStolen.cpp │ ├── whoStolen.t │ └── whoStolen.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── whoStolen.t ├── bfsGraph │ ├── bfsGraph.cpp │ ├── bfsGraph.t │ └── bfsGraph.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── bfsGraph.t ├── binarySearch │ ├── binarySearch.cpp │ ├── binarySearch.out │ └── binarySearch.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── binarySearch.out ├── binaryTree │ ├── binaryTree.cpp │ ├── binaryTree.i.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── binaryTree.i │ ├── binaryTree.t │ └── binaryTree.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── binaryTree.t ├── bit_problem │ └── bit_problem.cc ├── bmstring │ └── bmstring.cpp ├── bplustree │ └── bplus_tree.cpp ├── bubble_insertSort │ ├── bubbleInsertSort.cpp │ ├── bubbleInsertSort.out │ ├── bubbleInsertSort.out.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── bubbleInsertSort.out │ └── bubbleInsertSort.t ├── dynamic_program │ ├── coin_problem.cpp │ ├── coin_problem.t │ ├── coin_problem.t.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── coin_problem.t │ ├── dynamic_pro.cpp │ ├── dynamic_pro.t │ ├── package_in.cpp │ ├── triangle_pro.cpp │ └── triangle_pro.t ├── graphStorage │ ├── graphStorage.cpp │ ├── graphStorage.t │ └── graphStorage.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── graphStorage.t ├── hashMap │ ├── hasMap.cpp │ ├── hasMap.out │ ├── hasMap.out.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── hasMap.out │ └── haspMapHead.h ├── heapApply │ ├── middienNum.cpp │ └── sortFiles.cpp ├── heapSort │ ├── heapSort.cpp │ └── heapSort.t ├── kmpstring │ └── kmp.cpp ├── lineSort │ ├── countSort.cpp │ ├── countSort.out │ └── countSort.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── countSort.out ├── merge_nums │ ├── merge_nums.cpp │ ├── merge_nums.t │ ├── merge_nums.t.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── merge_nums.t │ ├── merge_td.cpp │ ├── merge_td.t │ └── merge_td.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── merge_td.t ├── merge_quickSort │ ├── mergeQuickSort.cpp │ ├── mergeQuickSort.out │ ├── mergeQuickSort.out.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── mergeQuickSort.out │ └── mergeQuickSort.t ├── outBandary │ ├── outbandary.cpp │ ├── outbandary.out │ └── outbandary.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── outbandary.out ├── queue │ ├── queueUse.cpp │ ├── queueUse.out │ └── queueUse.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── queueUse.out ├── shorterPath │ └── shorterPath.cpp ├── singleLinkOper │ ├── singleLinkOper │ ├── singleLinkOper.cpp │ ├── singleLinkOper.out │ ├── singleLinkOper.out.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── singleLinkOper.out │ ├── singleLinkOper.t │ └── singleLinkOper.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── singleLinkOper.t ├── singleLink_Palindrome.cpp ├── singleLink_Palindrome.out ├── stack │ ├── stackUse │ ├── stackUse.cpp │ ├── stackUse.out │ └── stackUse.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── stackUse.out ├── stolen_man │ └── stolen_man.cpp ├── swordtooffer │ ├── bigNumAdd │ │ ├── bigNumAdd.cpp │ │ ├── bigNumAdd.out │ │ └── bigNumAdd.out.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── bigNumAdd.out │ ├── binaryTreeToDList │ │ └── binaryTree_list.cpp │ ├── dynamic_greedy │ │ ├── dynamic_greedy.cpp │ │ ├── dynamic_greedy.out │ │ └── dynamic_greedy.out.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── dynamic_greedy.out │ ├── expandMode │ │ ├── expandMode.cpp │ │ ├── expandMode.out │ │ └── expandMode.out.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── expandMode.out │ ├── greatCode │ │ └── greatCode.cpp │ ├── levelPrint │ │ ├── levelPrint.cpp │ │ ├── levelPrint.t │ │ └── levelPrint.t.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── levelPrint.t │ ├── matrixPrint │ │ └── matrixPrint.cpp │ ├── middienNumStream │ │ ├── middienNums.cpp │ │ └── middienNums.t │ ├── minKnums │ │ ├── minKnums.cpp │ │ ├── minKnums.t │ │ └── minKnums.t.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── minKnums.t │ ├── newcodetest │ │ ├── cpp_c.cpp │ │ ├── method.h │ │ ├── newcoder.cpp │ │ ├── newcoder.t │ │ └── newcoder.t.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── newcoder.t │ ├── numOverHalf │ │ ├── numOverhalf.cpp │ │ └── numOverhalf.t │ ├── originBack │ │ └── OriginBack.cpp │ ├── rebuildTree │ │ ├── rebuildTree.cpp │ │ ├── rebuildTree.t │ │ └── rebuildTree.t.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── rebuildTree.t │ ├── repeatNum │ │ ├── repeatNum.cpp │ │ └── repeatNum.out │ ├── stackMin │ │ └── stackMin.cpp │ └── tree │ │ └── treeUse.cpp ├── topoSort │ └── topoSort.cpp ├── trieTree │ ├── trieTree.cpp │ ├── trieTree.t │ └── trieTree.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── trieTree.t ├── 单链表反转.md ├── 数据结构与算法之美_复杂度分析.md └── 数组.md ├── CSSNotes ├── flexBoxGuide.md ├── flex_text.html └── img │ ├── align-content.png │ ├── align-items.png │ ├── align-self-items.png │ ├── flex-basis-items.png │ ├── flex-box-justify.png │ ├── flex-box-main.png │ ├── flex-box-row-code.png │ ├── flex-box-row.png │ ├── flex-grow-items.png │ ├── flex-stractch.png │ ├── flexbox_container_items.png │ ├── order-flex-items.png │ └── shrink.png ├── CppNotes ├── C++55 │ └── 55item.md ├── CppOperatorRe_Conversion_Operator.md ├── Cpp_OOP.md ├── Cpp_copy_control.md ├── Cpp_expression_function_sentance_class.md ├── Cpp_genericAlogrithm_associative-container_dynamicMemory.md ├── Cpp_io_order_vector.md ├── Cpp_template_program.md ├── Cppprimer_var_type_string_vector_arr.md ├── Person │ ├── Person.cpp │ ├── Person.out │ └── Person.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── Person.out ├── a.out ├── bigProgramTool │ ├── bigProgramTool.cpp │ ├── bigProgramTool.o │ └── bigProgramTool.o.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── bigProgramTool.o ├── deepCopy_shallowCopy │ ├── deep_shallow.cpp │ └── deep_shallow.t ├── img │ ├── 1103576888.jpg │ ├── 486910598.jpg │ ├── Query_Base_Map.png │ └── strVecStragy.png ├── importImpl │ ├── importImpl.cpp │ └── importImpl.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── importImpl.out ├── lambdaExper │ ├── lambdaExpr.cpp │ ├── lambdaExpr.t │ └── lambdaExpr.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── lambdaExpr.t ├── makefile ├── pointer_refer.cc ├── review │ ├── compoundType.cpp │ ├── compoundType.o │ ├── compoundType.o.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── compoundType.o │ ├── externFile │ │ ├── externFile1.cpp │ │ ├── externFile2.cpp │ │ └── externfile.o.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── externfile.o │ ├── oopdesign │ │ ├── oopdesign.cpp │ │ ├── oopdesign.u │ │ └── oopdesign.u.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── oopdesign.u │ └── share_smartptr │ │ ├── shareSmartptr.cpp │ │ ├── shareSmartptr.t │ │ └── shareSmartptr.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── shareSmartptr.t ├── stlib │ ├── stlib.cpp │ ├── stlib.out │ └── stlib.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── stlib.out ├── structPointer │ ├── structPointer.cpp │ └── structPointer.t ├── tcpl │ ├── base.cpp │ ├── baseTcpl.cpp │ ├── baseTcpl.out │ └── baseTcpl.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── baseTcpl.out ├── tcplstl │ ├── algorithm │ │ ├── stlalog.cpp │ │ ├── stlalog.t │ │ └── stlalog.t.dSYM │ │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── stlalog.t │ └── container │ │ ├── container.cpp │ │ ├── container.t │ │ └── container.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── container.t ├── template │ ├── templateExtern.cpp │ ├── templateExtern.o.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── templateExtern.o │ ├── templateImpl.h │ ├── templateImpl.out │ └── templateImpl.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── templateImpl.out └── test.cpp ├── Cpp_Program ├── StrVec │ ├── StrVec.cpp │ ├── StrVec.h │ └── StrVec.out ├── assocontainer │ ├── assocontainer.cpp │ └── assocontainer.out ├── container │ ├── seqcontainer.cpp │ └── seqcontainer.out ├── copy_control │ └── copyControl.cpp ├── dynamicmemory │ ├── StrBlob.h │ ├── StrBlobPtr.h │ ├── dynamicMemory.cpp │ ├── dynamicmemory.out │ ├── phone.txt │ ├── smartptr.cpp │ └── smartptr.out ├── fileRead │ ├── a.out │ ├── sales_record.txt │ ├── simpleCode.cpp │ ├── simpleCode.h │ ├── simpleCode.out │ ├── simpleCodeVer2.cpp │ ├── simpletest.cpp │ └── simpletest.out ├── genericAlogrithm │ ├── a.txt │ ├── genericAlog.out │ ├── genericAlogrithm.cpp │ └── genericAlogrithm.out ├── newCoder │ ├── protest.cpp │ ├── protest.out │ ├── protest.t │ └── protest.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── protest.t ├── oopProgram │ ├── ooprogram.cpp │ ├── ooprogram.h │ └── pureBase.h ├── operatorRe │ ├── operator.cpp │ └── operator.h ├── privateClass │ ├── privateClass.cpp │ └── privateClass.t ├── readStream │ ├── readStory.txt │ ├── readStream.cpp │ ├── readStream.h │ ├── readStream.out │ └── storyQuery.txt ├── review │ ├── review.cpp │ ├── review.out │ └── review.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── review.out ├── rightRef │ ├── rightRef.cpp │ └── rightRef.t ├── screen │ ├── a.out │ ├── screen.cpp │ ├── screen.h │ └── window_mgr.h ├── selectName │ ├── account.cpp │ ├── account.h │ └── account.out ├── smartPtr │ ├── smartPtrUse.cpp │ ├── smartPtrUse.out │ └── smartPtrUse.out.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── smartPtrUse.out ├── sstream │ ├── phone.txt │ ├── strstream.cpp │ └── strstream.out └── threadpool │ └── threadpool.h ├── DesignPattern ├── CreateMode.md ├── DecoratorMode │ └── decoratorMode.cpp ├── OOPCpp │ ├── oopCpp.cpp │ └── oopCpp.out ├── Single_Pattern │ ├── singleton.cpp │ ├── singleton.t │ └── singleton.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── singleton.t ├── Single_Resp_Pri │ ├── Single_Resp_pri.cpp │ ├── impleClass.cpp │ └── impleClass.out ├── StructMode.md ├── abstractFactory │ └── abstractFactory.cpp ├── command_Mode │ └── commandMode.cpp ├── designPatternPrincple.md ├── factoryPattern │ ├── factoryPattern.cpp │ ├── factoryPattern.t │ └── factoryPattern.t.dSYM │ │ └── Contents │ │ ├── Info.plist │ │ └── Resources │ │ └── DWARF │ │ └── factoryPattern.t ├── proxyMode │ ├── proxyMode.cpp │ └── proxyMode.t └── templateMethod │ ├── templateMethod.cpp │ ├── templateMethod.t │ └── templateMethod.t.dSYM │ └── Contents │ ├── Info.plist │ └── Resources │ └── DWARF │ └── templateMethod.t ├── Js_Tutorial ├── EcmaScript │ ├── redBookTravel.md │ └── useJavaScript.md ├── aysnc_await_solve_call-back.md ├── closure.md ├── deepCopy.js ├── es6_7_8.md ├── example │ └── index.html ├── img │ ├── async_await.png │ ├── async_grammer.png │ ├── async_simple.png │ ├── async_then.png │ ├── error_async.png │ └── es6_7_8.png ├── js_Algrothm │ └── js_quickSort.md ├── js_Event_Loop.md ├── js_Pomise_Deffer.md ├── js_emit_on.md ├── js_learning │ └── ch1 │ │ └── key_save.js ├── js_socket.js ├── js_to_excel.md ├── websocket_simple.md ├── 闭包与高阶函数.md └── 面向对象的js.md ├── NodeNotes ├── NodeApi.md ├── Node_web_program.md ├── Nodejs_Memory_control.md ├── Nodejs_know_Buffer.md ├── Nodejs_origin_Module_async.md ├── Nodejs_process.md ├── example │ ├── master.js │ └── work.js ├── img │ ├── connection.png │ ├── deferred_promise.png │ ├── httpmodal.png │ ├── jinsheng25.png │ ├── jinshengscaven.png │ ├── node_heap_status.png │ ├── nodejs_middle.png │ ├── nodeudp.png │ └── v8_memory.png └── understand_restFul.md ├── OS ├── dead_lock.md ├── img │ ├── access_time_clock.jpeg │ ├── amend_page.jpeg │ ├── bank_safe.png │ ├── bitmap_link.png │ ├── bitmap_memory.jpeg │ ├── bitmap_page.png │ ├── circle_wait.jpg │ ├── dead_lock_transportation.jpg │ ├── deadlock_no_deadlock.png │ ├── dispatch_resource.jpg │ ├── increa.png │ ├── link_memory.jpeg │ ├── live_lock.png │ ├── multi_multi.png │ ├── multi_one.png │ ├── mutilthread.jpeg │ ├── one_to_one.png │ ├── os_memory_no_image.png │ ├── page_addr_transfer.png │ ├── page_link_algri.jpeg │ ├── page_storage.jpeg │ ├── page_table_menory.jpeg │ ├── process.png │ ├── process_addr.jpeg │ ├── process_lifecircle.png │ ├── process_of_memory_storage.jpeg │ ├── process_page_table.png │ ├── process_thread_relative.png │ ├── program_source.png │ ├── record_page.jpeg │ ├── redirect_addr.png │ ├── request_table.png │ ├── resource_system.jpg │ ├── resource_threads.jpg │ ├── resource_wait.jpg │ ├── second_chance.jpeg │ ├── segment_addr.png │ ├── segment_addr_transfer.png │ ├── segment_memory.jpeg │ ├── short_page.jpeg │ ├── single_mutilple_thread.png │ ├── swap_tech.png │ ├── tasks_os.png │ ├── thread_lifecircle.png │ ├── virtualStorage.jpg │ ├── virtual_addr_page.jpeg │ ├── virtual_memory.png │ ├── virtual_translate_addr.jpeg │ ├── wait_resource.jpg │ └── work_set.jpeg ├── input_output.md ├── memory_manage.md ├── process_signal_lock.md ├── process_thread.md ├── process_thread_apply.md ├── process_thread_use.md ├── signal_linux │ ├── signal_linux.c │ ├── signal_linux.out │ ├── signal_unlock.c │ └── signal_unlock.t └── virtual_cloud.md ├── PythonNotes └── python_read_excel.md ├── README.md ├── advanceAlgorithm ├── linklist │ ├── doublelink.cc │ └── singelink.cc └── queue_p_c │ └── queue_p_c.cc ├── cppInterviewTest ├── .DS_Store ├── cppInterview1.md ├── cppInterview10.md ├── cppInterview11.md ├── cppInterview12.md ├── cppInterview13.md ├── cppInterview14.md ├── cppInterview15.md ├── cppInterview16.md ├── cppInterview17.md ├── cppInterview2.md ├── cppInterview3.md ├── cppInterview4.md ├── cppInterview5.md ├── cppInterview6.md ├── cppInterview7.md ├── cppInterview8.md ├── cppInterview9.md ├── cppIntviw │ ├── cppInt10.cpp │ ├── cppInt10.t │ ├── cppInt11.cpp │ ├── cppInt11.t │ ├── cppInt12.cpp │ ├── cppInt12.t │ ├── cppInt13.cpp │ ├── cppInt13.t │ ├── cppInt3.cpp │ ├── cppInt3.t │ ├── cppInt4.cpp │ ├── cppInt4.t │ ├── cppInt5.cpp │ ├── cppInt5.t │ ├── cppInt6.cpp │ ├── cppInt6.t │ ├── cppInt7.cpp │ ├── cppInt7.t │ ├── cppInt8.cpp │ ├── cppInt8.t │ ├── cppInt9.cpp │ ├── cppInt9.t │ ├── cppInterview2.cpp │ ├── cppInterview2.t │ ├── cppIntviwOne.cpp │ └── cppIntviwOne.t └── img │ ├── .DS_Store │ ├── Myclass.jpg │ ├── map_rb_tree.png │ ├── mutil_virtual.png │ ├── mutil_virtuals.png │ ├── rewrite_virtual.png │ ├── set_rb_tree.png │ ├── single_virtual.png │ └── virtualtableclass.jpg ├── interview ├── sangfor │ ├── cpy.cc │ └── cpy.t └── virClass │ ├── virclass.cc │ ├── virclass.o │ ├── virclass.s │ └── virclass.t ├── leetcode ├── BinaryTree_Travel.js ├── InOrder_binary.cc ├── Maxim_SubArray.cc ├── ValidParenthess.cc ├── add-binary.cc ├── addTwoNum.cc ├── balanced_tree.cc ├── binary-tree-preorder.cc ├── binary_zigzag_travel.cc ├── longestPrefix.cc ├── longestSubstring.js ├── mergeTwoSortLists.cc ├── mergeTwoSortedArray.cc ├── mysqrt.cc ├── palindrom.cc ├── removeDuplicates.cc ├── reverseInt.cc ├── romantoint.cc ├── searchInsertPosition.cc ├── sortArraytoBst.cc ├── subtree.cc ├── symetricTree.cc └── twoSum.cc ├── nowcoder_wrong ├── img │ ├── addr.png │ └── save_addr.png ├── nowcoder_1.md ├── nowcoder_2.md ├── nowcoder_3.md ├── nowcoder_4.md ├── nowcoder_5.md ├── nowcoder_6.md └── nowcoder_7.md ├── tcp_ip ├── .DS_Store ├── CDN.md ├── DNS_address.md ├── HTTPS.md ├── QUIC-http3.md ├── TCP与UDP.md ├── cache_status.md ├── http2.md ├── https_http.md ├── img │ ├── 000001.png │ ├── 100.png │ ├── 101.png │ ├── 101_2.png │ ├── 200_from_cache.png │ ├── 201.png │ ├── 204_RFC.png │ ├── 206.png │ ├── 301.png │ ├── 301_REPOST.png │ ├── 302.png │ ├── 302_REPOST.png │ ├── 302_REPOST2.png │ ├── 303.png │ ├── 304.png │ ├── 400.png │ ├── 401.png │ ├── 401_CORRECT.png │ ├── 405.png │ ├── 412.png │ ├── 500.png │ ├── 502.png │ ├── DNS_decode.jpg │ ├── DNS_static_resource.jpg │ ├── aetag.png │ ├── async_cache.jpg │ ├── cache-aside.jpg │ ├── cache_control.png │ ├── cache_manage.jpg │ ├── cdn_dns.jpg │ ├── cdn_enode.jpg │ ├── controldata.jpg │ ├── cookies.png │ ├── dataControl1.jpg │ ├── dataControl2.jpg │ ├── dataControl3.jpg │ ├── dataControl4.jpg │ ├── dataControl5.jpg │ ├── dataControl6.jpg │ ├── dataControl7.jpg │ ├── dns_tree.jpg │ ├── frame_http2.jpg │ ├── frame_transfer_http2.jpg │ ├── handshake.jpg │ ├── header_compress.jpg │ ├── http1_0tcp.png │ ├── http1_http2_frame.png │ ├── http2_STATIC_TABLE.png │ ├── http2_frame.png │ ├── http2_multiplex_1.png │ ├── http2_multiplex_2.png │ ├── http2_youdian.jpg │ ├── http_streaming.png │ ├── http_unsafe.png │ ├── httpdns_asignment.jpg │ ├── https_cover.png │ ├── ipaddress.png │ ├── layers.jpg │ ├── long_polling.png │ ├── mapDataControl.jpg │ ├── phone_httpdns.jpg │ ├── process_etag.png │ ├── quic.jpeg │ ├── quic_transtrage.jpg │ ├── recieved.jpg │ ├── request_head_http.jpg │ ├── request_header.png │ ├── request_headers.png │ ├── response_http.jpg │ ├── saybye.jpg │ ├── server_Push.png │ ├── spdy_struct.png │ ├── status_code_cover.png │ ├── statustcp.jpg │ ├── sticky_package1.png │ ├── sticky_package2.png │ ├── sticky_package3.png │ ├── sticky_package4.png │ ├── tcp_protocol.jpg │ ├── tcphs.png │ ├── udp_offset_stream.jpg │ ├── udp_protocol.jpg │ └── window.jpg ├── mac层与链路层,ip网际层.md └── socketProgram │ ├── client.t │ ├── handShakeClient.c │ ├── handShakeServer.c │ └── server.t └── unixAdvance ├── APUE-ADVANCEIO.md ├── APUE-COMUNICARTION.md ├── APUE-FILE_INDEX.md ├── APUE-NETIPC_SOCKET.md ├── APUE-PROCESS.md ├── APUE-PROCESS_CONTROL.md ├── APUE-PROCESS_RELATIVE_DEFEND.md ├── APUE-SIGNAL.md ├── APUE-STDIO.md ├── APUE-SYSIO.md ├── APUE-SYS_MSG.md ├── APUE-THREAD.md ├── APUE-THREAD_CONTROL.md ├── a.out ├── advanceIO ├── a.out ├── advance.txt ├── advanceio.c ├── lock_fcntl.c ├── lock_fcntl.t ├── mmap_text.c ├── mmap_text.t └── shared_mem.c ├── bar ├── communication ├── comm_popen.c ├── comm_process.c ├── comm_process.t ├── comm_rec.c ├── comm_rec.t ├── comm_rsnd.c ├── comm_rsnd.t ├── comm_sem.c ├── comm_sem.t ├── comm_shm.c ├── comm_shm.t ├── mkfifo_process.c ├── mkfifo_process.t ├── proto.h └── test.txt ├── competeCondi ├── a.out └── competecon.c ├── data ├── deamonProcess ├── a.out └── deamonprocess.c ├── execut ├── a.out ├── echoall ├── echoall.c └── executeFun.c ├── exitfunc ├── a.out └── exitfunc.c ├── file_index ├── file_index.c ├── file_index.t ├── foo │ ├── a │ └── testfir ├── globUse.c ├── link.c ├── link.t ├── statfunc.c └── statfunc.t ├── foo ├── img ├── authority.png ├── bigsmall.png ├── conver.png ├── cprostroage.png ├── detel.png ├── dipareas.png ├── eachProcess.png ├── env.png ├── fmemopentype.png ├── fork.png ├── index.jpg ├── inner_data_struct.png ├── limitstatus.png ├── linuxlogin.png ├── lockf.png ├── lwp.png ├── mode_t.png ├── pipe_process.png ├── popen_smd.png ├── print.png ├── process_exit.png ├── process_session.png ├── relatedID.png ├── scanf.png ├── scanfconv.png ├── setuid.png ├── shadow.png ├── shell.png ├── signal_stand_deal.png ├── signal_thread.png ├── sizeof.png ├── stat.png ├── strformat.png ├── tmpfile.png ├── token.png ├── type.png └── workqueue.png ├── include └── apue.h ├── io ├── bits.c ├── bits.t ├── file.hole ├── file.txt ├── get_put.c ├── get_put.t ├── holefile.c ├── holefile.no ├── holefile.t ├── iofile.c ├── iofile.out ├── iofile.t ├── memopen.c ├── memopen.t ├── shareFile.c ├── shareFile.hole ├── shareFile.t ├── stdio_sysio.c ├── stdio_sysio.out ├── stdio_sysio.t └── testfile.txt ├── linuxDeep10 └── thread_com.c ├── linuxDeep11 └── mmap.c ├── linuxDeep12 └── process_control.c ├── linuxDeep3 └── thread_create.c ├── linuxDeep4 └── process_com.c ├── linuxDeep5 └── sharelib.c ├── linuxDeep6 └── fileSystem.c ├── linuxDeep7 └── signal_handle.c ├── linuxDeep8 └── timer_set.c ├── linuxDeep9 └── sys_sec.c ├── linux_Deep1 ├── elf_header.c ├── elf_header.o ├── elf_header.t ├── elf_header.txt └── makefile ├── linux_Deep2 └── processMem.c ├── myls.c ├── myls.t ├── netWorkIpc ├── proto.h ├── rcver.c └── snder.c ├── processFork ├── a.out ├── forkzomb.c ├── forkzomb.t ├── processfork2.c ├── processfork2.t ├── processfrok.c ├── re.txt ├── result.txt ├── temp.out ├── test.out └── testForkSub.c ├── processcollect ├── ash.sh ├── dojs.js ├── niceprocess.c ├── niceprocess.t ├── processcol.c ├── processcol.t ├── processexec.c ├── processexec.t ├── processsub_par.c ├── processsub_par.t ├── processwaitpid.c └── processwaitpid.t ├── processgroup ├── processgid.c └── processgid.t ├── processjmp ├── a.out └── processjmp.c ├── rlimt ├── a.out └── rlimit_test.c ├── signal_process ├── a.out ├── count_alarm.c ├── count_alarm.t ├── count_time.c ├── count_time.t ├── sigaction_te.c ├── sigaction_te.t ├── sigjmp.c ├── sigjmp.t ├── signal_inagain.c ├── signal_process.c ├── signal_re.c ├── signal_re.t ├── signal_select.c ├── signal_select.t └── volatiletest.c ├── sysuidmsg └── sysuidmsg.c ├── tcp_comm ├── client.c ├── client.t ├── proto.h ├── server.c └── server.t ├── testinterp ├── thread_control ├── thread_control.c ├── thread_control.t ├── thread_signal.c └── thread_signal.t ├── thread_create ├── thread_apply.c ├── thread_apply.t ├── thread_apply.txt ├── thread_create.c ├── thread_create.t ├── thread_join.c ├── thread_join.t ├── thread_mutex.c └── thread_mutex.t ├── thread_token ├── mytbf.c └── mytbf.h ├── wait_waitpid ├── a.out ├── wait_waitpid.c └── waitpid_wait.c ├── wrio.c └── wrio.out /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode 2 | .vscode/ -------------------------------------------------------------------------------- /.vscode/c_cpp_properties.json: -------------------------------------------------------------------------------- 1 | { 2 | "configurations": [ 3 | { 4 | "name": "Mac", 5 | "includePath": [ 6 | "${workspaceFolder}/**" 7 | ], 8 | "defines": [], 9 | "macFrameworkPath": [ 10 | "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks" 11 | ], 12 | "compilerPath": "/usr/bin/clang", 13 | "cStandard": "c11", 14 | "cppStandard": "c++17", 15 | "intelliSenseMode": "clang-x64" 16 | } 17 | ], 18 | "version": 4 19 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "files.associations": { 3 | "ostream": "cpp", 4 | "new": "cpp", 5 | "chrono": "cpp", 6 | "random": "cpp", 7 | "iostream": "cpp", 8 | "map": "cpp", 9 | "memory": "cpp", 10 | "vector": "cpp", 11 | "utility": "cpp", 12 | "atomic": "cpp" 13 | } 14 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=733558 3 | // for the documentation about the tasks.json format 4 | "version": "2.0.0", 5 | "tasks": [ 6 | { 7 | "label": "echo", 8 | "type": "shell", 9 | "command": "echo Hello" 10 | } 11 | ] 12 | } -------------------------------------------------------------------------------- /Algorithm/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/.DS_Store -------------------------------------------------------------------------------- /Algorithm/SkipList/SkipList.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/SkipList/SkipList.out -------------------------------------------------------------------------------- /Algorithm/SkipList/SkipList.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.SkipList.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/SkipList/SkipList.out.dSYM/Contents/Resources/DWARF/SkipList.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/SkipList/SkipList.out.dSYM/Contents/Resources/DWARF/SkipList.out -------------------------------------------------------------------------------- /Algorithm/astar_dijkstra/astar_dijkstra.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/astar_dijkstra/astar_dijkstra.cpp -------------------------------------------------------------------------------- /Algorithm/back_origin/back_origin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/back_origin/back_origin.t -------------------------------------------------------------------------------- /Algorithm/back_origin/back_origin.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.back_origin.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/back_origin/back_origin.t.dSYM/Contents/Resources/DWARF/back_origin.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/back_origin/back_origin.t.dSYM/Contents/Resources/DWARF/back_origin.t -------------------------------------------------------------------------------- /Algorithm/back_origin/eight_queens.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/back_origin/eight_queens.t -------------------------------------------------------------------------------- /Algorithm/back_origin/eight_queens.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.eight_queens.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/back_origin/eight_queens.t.dSYM/Contents/Resources/DWARF/eight_queens.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/back_origin/eight_queens.t.dSYM/Contents/Resources/DWARF/eight_queens.t -------------------------------------------------------------------------------- /Algorithm/back_origin/package_problem.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/back_origin/package_problem.t -------------------------------------------------------------------------------- /Algorithm/back_origin/package_problem.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.package_problem.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/back_origin/package_problem.t.dSYM/Contents/Resources/DWARF/package_problem.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/back_origin/package_problem.t.dSYM/Contents/Resources/DWARF/package_problem.t -------------------------------------------------------------------------------- /Algorithm/back_origin/sortAll.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/back_origin/sortAll.t -------------------------------------------------------------------------------- /Algorithm/back_origin/sortAll.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.sortAll.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/back_origin/sortAll.t.dSYM/Contents/Resources/DWARF/sortAll.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/back_origin/sortAll.t.dSYM/Contents/Resources/DWARF/sortAll.t -------------------------------------------------------------------------------- /Algorithm/back_origin/whoStolen.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/back_origin/whoStolen.t -------------------------------------------------------------------------------- /Algorithm/back_origin/whoStolen.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.whoStolen.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/back_origin/whoStolen.t.dSYM/Contents/Resources/DWARF/whoStolen.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/back_origin/whoStolen.t.dSYM/Contents/Resources/DWARF/whoStolen.t -------------------------------------------------------------------------------- /Algorithm/bfsGraph/bfsGraph.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/bfsGraph/bfsGraph.t -------------------------------------------------------------------------------- /Algorithm/bfsGraph/bfsGraph.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.bfsGraph.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/bfsGraph/bfsGraph.t.dSYM/Contents/Resources/DWARF/bfsGraph.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/bfsGraph/bfsGraph.t.dSYM/Contents/Resources/DWARF/bfsGraph.t -------------------------------------------------------------------------------- /Algorithm/binarySearch/binarySearch.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/binarySearch/binarySearch.out -------------------------------------------------------------------------------- /Algorithm/binarySearch/binarySearch.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.binarySearch.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/binarySearch/binarySearch.out.dSYM/Contents/Resources/DWARF/binarySearch.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/binarySearch/binarySearch.out.dSYM/Contents/Resources/DWARF/binarySearch.out -------------------------------------------------------------------------------- /Algorithm/binaryTree/binaryTree.i.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.binaryTree.i 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/binaryTree/binaryTree.i.dSYM/Contents/Resources/DWARF/binaryTree.i: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/binaryTree/binaryTree.i.dSYM/Contents/Resources/DWARF/binaryTree.i -------------------------------------------------------------------------------- /Algorithm/binaryTree/binaryTree.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/binaryTree/binaryTree.t -------------------------------------------------------------------------------- /Algorithm/binaryTree/binaryTree.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.binaryTree.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/binaryTree/binaryTree.t.dSYM/Contents/Resources/DWARF/binaryTree.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/binaryTree/binaryTree.t.dSYM/Contents/Resources/DWARF/binaryTree.t -------------------------------------------------------------------------------- /Algorithm/bit_problem/bit_problem.cc: -------------------------------------------------------------------------------- 1 | /*** 2 | * 遇到一个很特别的算法题 3 | * 求一组数组中,其他所有都都出现两次,就一个数出现一次,找出这个数 4 | * 异或,两个相同的数异或为0 5 | * 最后一个不同的数可以 6 | * 求出来***/ 7 | #include 8 | #include 9 | 10 | namespace bit_problem{ 11 | class Bit_Problem{ 12 | public: 13 | Bit_Problem(std::vector& vec_):vec(vec_){ 14 | bit_calc(vec); 15 | } 16 | private: 17 | std::vector vec; 18 | void bit_calc(std::vector &vec){ 19 | int res = 0; 20 | for(auto num:vec){ 21 | res^=num; 22 | } 23 | std::cout<<"alone num"< 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.graphStorage.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/graphStorage/graphStorage.t.dSYM/Contents/Resources/DWARF/graphStorage.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/graphStorage/graphStorage.t.dSYM/Contents/Resources/DWARF/graphStorage.t -------------------------------------------------------------------------------- /Algorithm/hashMap/hasMap.cpp: -------------------------------------------------------------------------------- 1 | #include "haspMapHead.h" 2 | #include 3 | 4 | int main(){ 5 | HashMapLru hasLru; 6 | for(int i = 0;i<40;i++){ 7 | if(hasLru.hash_value_addto_key(i)){ 8 | cout << "input" << i << endl; 9 | } 10 | } 11 | if(hasLru.hash_value_find(5)){ 12 | cout << "find" << endl; 13 | } 14 | if(hasLru.hash_value_delete(20)){ 15 | if(hasLru.hash_value_find(5)) 16 | cout << "find" << endl; 17 | } 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /Algorithm/hashMap/hasMap.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/hashMap/hasMap.out -------------------------------------------------------------------------------- /Algorithm/hashMap/hasMap.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.hasMap.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/hashMap/hasMap.out.dSYM/Contents/Resources/DWARF/hasMap.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/hashMap/hasMap.out.dSYM/Contents/Resources/DWARF/hasMap.out -------------------------------------------------------------------------------- /Algorithm/heapApply/middienNum.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/heapApply/middienNum.cpp -------------------------------------------------------------------------------- /Algorithm/heapApply/sortFiles.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/heapApply/sortFiles.cpp -------------------------------------------------------------------------------- /Algorithm/heapSort/heapSort.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/heapSort/heapSort.t -------------------------------------------------------------------------------- /Algorithm/lineSort/countSort.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/lineSort/countSort.out -------------------------------------------------------------------------------- /Algorithm/lineSort/countSort.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.countSort.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/lineSort/countSort.out.dSYM/Contents/Resources/DWARF/countSort.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/lineSort/countSort.out.dSYM/Contents/Resources/DWARF/countSort.out -------------------------------------------------------------------------------- /Algorithm/merge_nums/merge_nums.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/merge_nums/merge_nums.t -------------------------------------------------------------------------------- /Algorithm/merge_nums/merge_nums.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.merge_nums.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/merge_nums/merge_nums.t.dSYM/Contents/Resources/DWARF/merge_nums.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/merge_nums/merge_nums.t.dSYM/Contents/Resources/DWARF/merge_nums.t -------------------------------------------------------------------------------- /Algorithm/merge_nums/merge_td.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 二维平面上有n个点 3 | * 如何快速计算出两个举例最近的点对 4 | * 5 | * 有两个n*n的矩阵A,B,如何快速求解两个矩阵的乘积C=A*B 6 | * 7 | * 分治思想 8 | * ***/ 9 | 10 | #include 11 | #include 12 | 13 | using namespace std; 14 | 15 | vector > vec_two_demin; // 构造点的存在 16 | 17 | // 暴力法 18 | // 首先进行组合 去掉重复 放入容器 19 | // 进行组合中的计算 20 | // 进行归并排序 21 | // 取出第一个距离最短 22 | 23 | int main(){ 24 | vec_two_demin.push_back({1,2}); 25 | cout< 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.merge_td.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/merge_nums/merge_td.t.dSYM/Contents/Resources/DWARF/merge_td.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/merge_nums/merge_td.t.dSYM/Contents/Resources/DWARF/merge_td.t -------------------------------------------------------------------------------- /Algorithm/merge_quickSort/mergeQuickSort.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/merge_quickSort/mergeQuickSort.out -------------------------------------------------------------------------------- /Algorithm/merge_quickSort/mergeQuickSort.out.dSYM/Contents/Resources/DWARF/mergeQuickSort.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/merge_quickSort/mergeQuickSort.out.dSYM/Contents/Resources/DWARF/mergeQuickSort.out -------------------------------------------------------------------------------- /Algorithm/merge_quickSort/mergeQuickSort.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/merge_quickSort/mergeQuickSort.t -------------------------------------------------------------------------------- /Algorithm/outBandary/outbandary.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | 4 | int main(){ 5 | int i = 0; 6 | int arr[3] = {0}; 7 | for(;i<=3;i++){ 8 | arr[i] = 0; 9 | printf("hello,world\n"); 10 | } 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /Algorithm/outBandary/outbandary.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/outBandary/outbandary.out -------------------------------------------------------------------------------- /Algorithm/outBandary/outbandary.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.outbandary.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/outBandary/outbandary.out.dSYM/Contents/Resources/DWARF/outbandary.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/outBandary/outbandary.out.dSYM/Contents/Resources/DWARF/outbandary.out -------------------------------------------------------------------------------- /Algorithm/queue/queueUse.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/queue/queueUse.out -------------------------------------------------------------------------------- /Algorithm/queue/queueUse.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.queueUse.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/queue/queueUse.out.dSYM/Contents/Resources/DWARF/queueUse.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/queue/queueUse.out.dSYM/Contents/Resources/DWARF/queueUse.out -------------------------------------------------------------------------------- /Algorithm/singleLinkOper/singleLinkOper: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/singleLinkOper/singleLinkOper -------------------------------------------------------------------------------- /Algorithm/singleLinkOper/singleLinkOper.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/singleLinkOper/singleLinkOper.out -------------------------------------------------------------------------------- /Algorithm/singleLinkOper/singleLinkOper.out.dSYM/Contents/Resources/DWARF/singleLinkOper.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/singleLinkOper/singleLinkOper.out.dSYM/Contents/Resources/DWARF/singleLinkOper.out -------------------------------------------------------------------------------- /Algorithm/singleLinkOper/singleLinkOper.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/singleLinkOper/singleLinkOper.t -------------------------------------------------------------------------------- /Algorithm/singleLinkOper/singleLinkOper.t.dSYM/Contents/Resources/DWARF/singleLinkOper.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/singleLinkOper/singleLinkOper.t.dSYM/Contents/Resources/DWARF/singleLinkOper.t -------------------------------------------------------------------------------- /Algorithm/singleLink_Palindrome.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/singleLink_Palindrome.out -------------------------------------------------------------------------------- /Algorithm/stack/stackUse: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/stack/stackUse -------------------------------------------------------------------------------- /Algorithm/stack/stackUse.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/stack/stackUse.out -------------------------------------------------------------------------------- /Algorithm/stack/stackUse.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.stackUse.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/stack/stackUse.out.dSYM/Contents/Resources/DWARF/stackUse.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/stack/stackUse.out.dSYM/Contents/Resources/DWARF/stackUse.out -------------------------------------------------------------------------------- /Algorithm/stolen_man/stolen_man.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | 5 | using namespace std; 6 | 7 | vector -------------------------------------------------------------------------------- /Algorithm/swordtooffer/bigNumAdd/bigNumAdd.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/bigNumAdd/bigNumAdd.out -------------------------------------------------------------------------------- /Algorithm/swordtooffer/bigNumAdd/bigNumAdd.out.dSYM/Contents/Resources/DWARF/bigNumAdd.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/bigNumAdd/bigNumAdd.out.dSYM/Contents/Resources/DWARF/bigNumAdd.out -------------------------------------------------------------------------------- /Algorithm/swordtooffer/dynamic_greedy/dynamic_greedy.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/dynamic_greedy/dynamic_greedy.out -------------------------------------------------------------------------------- /Algorithm/swordtooffer/dynamic_greedy/dynamic_greedy.out.dSYM/Contents/Resources/DWARF/dynamic_greedy.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/dynamic_greedy/dynamic_greedy.out.dSYM/Contents/Resources/DWARF/dynamic_greedy.out -------------------------------------------------------------------------------- /Algorithm/swordtooffer/expandMode/expandMode.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/expandMode/expandMode.out -------------------------------------------------------------------------------- /Algorithm/swordtooffer/expandMode/expandMode.out.dSYM/Contents/Resources/DWARF/expandMode.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/expandMode/expandMode.out.dSYM/Contents/Resources/DWARF/expandMode.out -------------------------------------------------------------------------------- /Algorithm/swordtooffer/greatCode/greatCode.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 考虑异常输入情况 3 | * 考虑边界调节 4 | * 考虑错误抛出如何获知 5 | * 定义全局变量,获知错误情况 6 | * ***/ 7 | // 实现base的次方 8 | double PowerWithNumber(double base,int exponent){ 9 | if(exponent == 1) 10 | return base; 11 | if(exponent == 0) 12 | return 1; 13 | double result = PowerWithNumber(base,exponent>>1); 14 | result *= result; // 求出两个数的平方,例如2的平方4,4再到8,8再到16如此类推咯 15 | if(exponent & 0x1 == 1) // 位与运算判断一个exponent是奇数还是偶数 16 | result *= base; // 奇数则多乘一次base!!! 17 | return result; 18 | } 19 | 20 | /*** 21 | * 打印从1到n的数字,打印到n位数 22 | * 考虑大数问题 23 | * 引入字符串 24 | * 进1考虑与打印考虑 25 | * ***/ 26 | -------------------------------------------------------------------------------- /Algorithm/swordtooffer/levelPrint/levelPrint.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/levelPrint/levelPrint.t -------------------------------------------------------------------------------- /Algorithm/swordtooffer/levelPrint/levelPrint.t.dSYM/Contents/Resources/DWARF/levelPrint.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/levelPrint/levelPrint.t.dSYM/Contents/Resources/DWARF/levelPrint.t -------------------------------------------------------------------------------- /Algorithm/swordtooffer/middienNumStream/middienNums.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/middienNumStream/middienNums.t -------------------------------------------------------------------------------- /Algorithm/swordtooffer/minKnums/minKnums.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/minKnums/minKnums.t -------------------------------------------------------------------------------- /Algorithm/swordtooffer/minKnums/minKnums.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.minKnums.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/swordtooffer/minKnums/minKnums.t.dSYM/Contents/Resources/DWARF/minKnums.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/minKnums/minKnums.t.dSYM/Contents/Resources/DWARF/minKnums.t -------------------------------------------------------------------------------- /Algorithm/swordtooffer/newcodetest/cpp_c.cpp: -------------------------------------------------------------------------------- 1 | #include "method.h" 2 | 3 | void sample::method(){ 4 | std::cout << "hello cpp method" << std::endl; 5 | } -------------------------------------------------------------------------------- /Algorithm/swordtooffer/newcodetest/method.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | class sample{ 4 | public: 5 | void method(); 6 | }; -------------------------------------------------------------------------------- /Algorithm/swordtooffer/newcodetest/newcoder.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/newcodetest/newcoder.t -------------------------------------------------------------------------------- /Algorithm/swordtooffer/newcodetest/newcoder.t.dSYM/Contents/Resources/DWARF/newcoder.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/newcodetest/newcoder.t.dSYM/Contents/Resources/DWARF/newcoder.t -------------------------------------------------------------------------------- /Algorithm/swordtooffer/numOverHalf/numOverhalf.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/numOverHalf/numOverhalf.t -------------------------------------------------------------------------------- /Algorithm/swordtooffer/rebuildTree/rebuildTree.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/rebuildTree/rebuildTree.t -------------------------------------------------------------------------------- /Algorithm/swordtooffer/rebuildTree/rebuildTree.t.dSYM/Contents/Resources/DWARF/rebuildTree.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/rebuildTree/rebuildTree.t.dSYM/Contents/Resources/DWARF/rebuildTree.t -------------------------------------------------------------------------------- /Algorithm/swordtooffer/repeatNum/repeatNum.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/swordtooffer/repeatNum/repeatNum.out -------------------------------------------------------------------------------- /Algorithm/swordtooffer/stackMin/stackMin.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | /*** 4 | * 利用辅助栈解决 5 | * 一个数据栈 6 | * 一个辅助栈 7 | * 数据栈存储压入元素 8 | * 辅助栈存储最小元素,不停存储最元素,元素数目与之前的数目一样 9 | * ***/ 10 | using namespace std; 11 | 12 | template class Stack{ 13 | public: 14 | Stack(T *arr):array(arr){} 15 | void pop(); 16 | void push(); 17 | void min(); 18 | private: 19 | T *array; 20 | }; -------------------------------------------------------------------------------- /Algorithm/trieTree/trieTree.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/trieTree/trieTree.t -------------------------------------------------------------------------------- /Algorithm/trieTree/trieTree.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.trieTree.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Algorithm/trieTree/trieTree.t.dSYM/Contents/Resources/DWARF/trieTree.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Algorithm/trieTree/trieTree.t.dSYM/Contents/Resources/DWARF/trieTree.t -------------------------------------------------------------------------------- /Algorithm/单链表反转.md: -------------------------------------------------------------------------------- 1 | # 如何实现LRU缓存淘汰算法? 2 | 聊表的应用,LRU缓存淘汰算法
3 | 缓存是一种提高数据读取性能的技术,常见CPU缓存、数据库缓存,浏览器缓存
4 | 缓存的大小有限,需要清理!缓存淘汰策略出现,FIFO,LUFU,LRU
5 | ### 链表,最基础,最常用的数据结构 6 | 数组需要连续的内存空间 7 | 链表并不需要连续的内存空间,通过指针将一组零散的内存块串联起来使用。
8 | 链表⛓️ 第一个结点叫作头结点,把最后一个结点叫作尾结点。
9 | ### 头结点用来记录链表的基地址... 10 | 有了头结点就可以遍历整个链表, 11 | ### 而尾结点特殊的地方是... 12 | 指针不是指向下一个结点,而是指向一个空地址NULL,表示这是链表上的最后一个结点
13 | ### 插入删除 O(1) 14 | 相邻的结点改变 15 | ### 遍历需要 O(n) 16 | 需要指针一个一个依次遍历,直到找到结点。
17 | #### 循环链表和双向链表 18 | 双向链表支持两个方向,prev data next
19 | ## 删除 20 | 实际需要 21 | > 删除结点中“值等于某个给定值”的结点
22 | > 删除给定指针指向的结点
23 | 1.从头开始,直到找到,遍历查找O(n)
24 | 2.删除给定,需要前驱O(1)
25 | #### 空间换时间 26 | 缓存利用空间换时间
27 | #### 时间换空间 28 | 消耗时间 29 | #### 双向循环链表 30 | 31 | # 解答 32 | 遍历链表,查找是否存在缓存,存在,提前,不存在,头插。 33 | -------------------------------------------------------------------------------- /Algorithm/数据结构与算法之美_复杂度分析.md: -------------------------------------------------------------------------------- 1 | # 数据结构与算法之复杂度分析 2 | ### 如何分析、统计算法的执行效率和资源消耗? 3 | ## 时间、空间复杂度分析 4 | -------------------------------------------------------------------------------- /Algorithm/数组.md: -------------------------------------------------------------------------------- 1 | # 为什么很多编程语言中数组都从0开始编号? 2 | ### 数组是最基础的数据结构 3 | ### 寻址公式 4 | ``` 5 | a[i]_address = base_address + i * data_type_size; 6 | ``` 7 | ### 如何实现随机访问? 8 | 数组是一种线性表数据结构,他用一组连续的内存空间来存储一组具有相同类型的数据。
9 | 10 | 数组支持随机访问,根据下标随机访问的时间复杂度为O(1)
11 | 12 | 增删查改。内存连续。 13 | 很多时候我们并不是要去死记硬背某个数据结构,而是学习它背后的思想和处理技巧,这些东西才是最有价值的。 14 | 15 | > Java ArrayList无法存储基本类型,比如 int,long,需要封装为Integer、Long类,而AutoBoxing、Unboxing则有一定的性能消耗,所以如果特别关注性能,或者希望使用基本类型,就可以选用数组
16 | > 如果数据大小事先已知,并且对数据的操作非常简单,用不到ArrayList提供大部分方法,也可以直接使用数组
17 | > 当表示多维数组时,用数组往往会更加直观,比图object[][] array;而用容器的话需要这样定义ArrayList array 18 | 19 | ### 二维寻址公式 20 | m*n 21 | `a[i][j] = base_address+(i*n+j)*data_type_size` 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /CSSNotes/img/align-content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/align-content.png -------------------------------------------------------------------------------- /CSSNotes/img/align-items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/align-items.png -------------------------------------------------------------------------------- /CSSNotes/img/align-self-items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/align-self-items.png -------------------------------------------------------------------------------- /CSSNotes/img/flex-basis-items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/flex-basis-items.png -------------------------------------------------------------------------------- /CSSNotes/img/flex-box-justify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/flex-box-justify.png -------------------------------------------------------------------------------- /CSSNotes/img/flex-box-main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/flex-box-main.png -------------------------------------------------------------------------------- /CSSNotes/img/flex-box-row-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/flex-box-row-code.png -------------------------------------------------------------------------------- /CSSNotes/img/flex-box-row.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/flex-box-row.png -------------------------------------------------------------------------------- /CSSNotes/img/flex-grow-items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/flex-grow-items.png -------------------------------------------------------------------------------- /CSSNotes/img/flex-stractch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/flex-stractch.png -------------------------------------------------------------------------------- /CSSNotes/img/flexbox_container_items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/flexbox_container_items.png -------------------------------------------------------------------------------- /CSSNotes/img/order-flex-items.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/order-flex-items.png -------------------------------------------------------------------------------- /CSSNotes/img/shrink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CSSNotes/img/shrink.png -------------------------------------------------------------------------------- /CppNotes/Person/Person.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/Person/Person.out -------------------------------------------------------------------------------- /CppNotes/Person/Person.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.Person.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/Person/Person.out.dSYM/Contents/Resources/DWARF/Person.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/Person/Person.out.dSYM/Contents/Resources/DWARF/Person.out -------------------------------------------------------------------------------- /CppNotes/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/a.out -------------------------------------------------------------------------------- /CppNotes/bigProgramTool/bigProgramTool.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/bigProgramTool/bigProgramTool.o -------------------------------------------------------------------------------- /CppNotes/bigProgramTool/bigProgramTool.o.dSYM/Contents/Resources/DWARF/bigProgramTool.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/bigProgramTool/bigProgramTool.o.dSYM/Contents/Resources/DWARF/bigProgramTool.o -------------------------------------------------------------------------------- /CppNotes/deepCopy_shallowCopy/deep_shallow.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/deepCopy_shallowCopy/deep_shallow.t -------------------------------------------------------------------------------- /CppNotes/img/1103576888.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/img/1103576888.jpg -------------------------------------------------------------------------------- /CppNotes/img/486910598.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/img/486910598.jpg -------------------------------------------------------------------------------- /CppNotes/img/Query_Base_Map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/img/Query_Base_Map.png -------------------------------------------------------------------------------- /CppNotes/img/strVecStragy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/img/strVecStragy.png -------------------------------------------------------------------------------- /CppNotes/importImpl/importImpl.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.importImpl.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/importImpl/importImpl.out.dSYM/Contents/Resources/DWARF/importImpl.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/importImpl/importImpl.out.dSYM/Contents/Resources/DWARF/importImpl.out -------------------------------------------------------------------------------- /CppNotes/lambdaExper/lambdaExpr.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/lambdaExper/lambdaExpr.t -------------------------------------------------------------------------------- /CppNotes/lambdaExper/lambdaExpr.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.lambdaExpr.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/lambdaExper/lambdaExpr.t.dSYM/Contents/Resources/DWARF/lambdaExpr.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/lambdaExper/lambdaExpr.t.dSYM/Contents/Resources/DWARF/lambdaExpr.t -------------------------------------------------------------------------------- /CppNotes/makefile: -------------------------------------------------------------------------------- 1 | default:pointer_refer.o 2 | g++ -std=c++11 -o pointer_refer.t pointer_refer.o 3 | 4 | pointer_refer.o:pointer_refer.cc 5 | g++ -std=c++11 -c pointer_refer.cc 6 | 7 | .PONY:clean 8 | clean: 9 | -rm pointer_refer.o pointer_refer.t -------------------------------------------------------------------------------- /CppNotes/review/compoundType.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/review/compoundType.o -------------------------------------------------------------------------------- /CppNotes/review/compoundType.o.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.compoundType.o 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/review/compoundType.o.dSYM/Contents/Resources/DWARF/compoundType.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/review/compoundType.o.dSYM/Contents/Resources/DWARF/compoundType.o -------------------------------------------------------------------------------- /CppNotes/review/externFile/externFile1.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | int main(){ 6 | int bufSize = 32; 7 | cout << bufSize << endl; 8 | return 0; 9 | } -------------------------------------------------------------------------------- /CppNotes/review/externFile/externFile2.cpp: -------------------------------------------------------------------------------- 1 | extern int bufSize; 2 | 3 | #include 4 | using namespace std; 5 | 6 | int func(){ 7 | cout << "file2 " << bufSize << endl; 8 | return 0; 9 | } -------------------------------------------------------------------------------- /CppNotes/review/externFile/externfile.o.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.externfile.o 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/review/externFile/externfile.o.dSYM/Contents/Resources/DWARF/externfile.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/review/externFile/externfile.o.dSYM/Contents/Resources/DWARF/externfile.o -------------------------------------------------------------------------------- /CppNotes/review/oopdesign/oopdesign.u: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/review/oopdesign/oopdesign.u -------------------------------------------------------------------------------- /CppNotes/review/oopdesign/oopdesign.u.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.oopdesign.u 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/review/oopdesign/oopdesign.u.dSYM/Contents/Resources/DWARF/oopdesign.u: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/review/oopdesign/oopdesign.u.dSYM/Contents/Resources/DWARF/oopdesign.u -------------------------------------------------------------------------------- /CppNotes/review/share_smartptr/shareSmartptr.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 动态内存与智能指针 3 | * shared_ptr 4 | * weak_ptr 5 | * unique_ptr 6 | * ***/ 7 | #include 8 | #include 9 | 10 | using namespace std; 11 | 12 | int main(){ 13 | shared_ptr p3 = make_shared(42); 14 | cout << *p3 << endl; 15 | return 0; 16 | } -------------------------------------------------------------------------------- /CppNotes/review/share_smartptr/shareSmartptr.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/review/share_smartptr/shareSmartptr.t -------------------------------------------------------------------------------- /CppNotes/review/share_smartptr/shareSmartptr.t.dSYM/Contents/Resources/DWARF/shareSmartptr.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/review/share_smartptr/shareSmartptr.t.dSYM/Contents/Resources/DWARF/shareSmartptr.t -------------------------------------------------------------------------------- /CppNotes/stlib/stlib.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/stlib/stlib.out -------------------------------------------------------------------------------- /CppNotes/stlib/stlib.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.stlib.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/stlib/stlib.out.dSYM/Contents/Resources/DWARF/stlib.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/stlib/stlib.out.dSYM/Contents/Resources/DWARF/stlib.out -------------------------------------------------------------------------------- /CppNotes/structPointer/structPointer.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/structPointer/structPointer.t -------------------------------------------------------------------------------- /CppNotes/tcpl/base.cpp: -------------------------------------------------------------------------------- 1 | int xbase = 10; -------------------------------------------------------------------------------- /CppNotes/tcpl/baseTcpl.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/tcpl/baseTcpl.out -------------------------------------------------------------------------------- /CppNotes/tcpl/baseTcpl.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.baseTcpl.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/tcpl/baseTcpl.out.dSYM/Contents/Resources/DWARF/baseTcpl.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/tcpl/baseTcpl.out.dSYM/Contents/Resources/DWARF/baseTcpl.out -------------------------------------------------------------------------------- /CppNotes/tcplstl/algorithm/stlalog.cpp: -------------------------------------------------------------------------------- 1 | /*** 2 | * 谓词是一个高级用法 3 | * 掌握谓词 4 | * 在stl算法中很有帮助 5 | * 举个具体的例子 6 | * 7 | * mismatch() 查找两个序列中第一对不匹配的元素,返回指向这两个元素的迭代器。重点是两个序列 8 | * 9 | * ***/ 10 | #include 11 | #include 12 | #include 13 | 14 | using namespace std; 15 | 16 | int main(){ 17 | vector vnum = {1,2,3,4,5,6,7,7,8,9}; 18 | for_each(vnum.begin(),vnum.end(),[](int &x){++x;}); 19 | for(auto iter = vnum.begin();iter!=vnum.end();++iter){ 20 | cout << *iter << endl; 21 | } 22 | assert(all_of(vnum.begin(),vnum.end(),[](double x){return 0 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.stlalog.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/tcplstl/algorithm/stlalog.t.dSYM/Contents/Resources/DWARF/stlalog.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/tcplstl/algorithm/stlalog.t.dSYM/Contents/Resources/DWARF/stlalog.t -------------------------------------------------------------------------------- /CppNotes/tcplstl/container/container.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/tcplstl/container/container.t -------------------------------------------------------------------------------- /CppNotes/tcplstl/container/container.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.container.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/tcplstl/container/container.t.dSYM/Contents/Resources/DWARF/container.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/tcplstl/container/container.t.dSYM/Contents/Resources/DWARF/container.t -------------------------------------------------------------------------------- /CppNotes/template/templateExtern.o.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.templateExtern.o 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/template/templateExtern.o.dSYM/Contents/Resources/DWARF/templateExtern.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/template/templateExtern.o.dSYM/Contents/Resources/DWARF/templateExtern.o -------------------------------------------------------------------------------- /CppNotes/template/templateImpl.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/template/templateImpl.out -------------------------------------------------------------------------------- /CppNotes/template/templateImpl.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.templateImpl.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /CppNotes/template/templateImpl.out.dSYM/Contents/Resources/DWARF/templateImpl.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/CppNotes/template/templateImpl.out.dSYM/Contents/Resources/DWARF/templateImpl.out -------------------------------------------------------------------------------- /Cpp_Program/StrVec/StrVec.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | using namespace std; 5 | 6 | int main(){ 7 | int i = 42; 8 | const int &r = i * 42; 9 | int &&rv = i*42; 10 | cout << rv << endl; 11 | int &&rr1 = 42; 12 | int &&rr2 = std::move(rr1); 13 | cout << rr1 << endl; 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /Cpp_Program/StrVec/StrVec.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/StrVec/StrVec.out -------------------------------------------------------------------------------- /Cpp_Program/assocontainer/assocontainer.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/assocontainer/assocontainer.out -------------------------------------------------------------------------------- /Cpp_Program/container/seqcontainer.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/container/seqcontainer.out -------------------------------------------------------------------------------- /Cpp_Program/dynamicmemory/dynamicmemory.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/dynamicmemory/dynamicmemory.out -------------------------------------------------------------------------------- /Cpp_Program/dynamicmemory/phone.txt: -------------------------------------------------------------------------------- 1 | trans 30624770 2332213223 2 | david 34232321 232455 3 | olie 342324353 23242535 231432432 4 | -------------------------------------------------------------------------------- /Cpp_Program/dynamicmemory/smartptr.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "StrBlobPtr.h" 3 | #include "StrBlob.h" 4 | #include 5 | using namespace std; 6 | 7 | int main(){ 8 | ifstream ifs("./phone.txt"); 9 | StrBlob sb; 10 | string s; 11 | while(getline(ifs,s)){ 12 | sb.push_back(s); 13 | } 14 | for(StrBlobPtr sbp = sb.begin();sbp != sb.end();sbp.incr()){ 15 | cout << sbp.deref() << endl; 16 | } 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /Cpp_Program/dynamicmemory/smartptr.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/dynamicmemory/smartptr.out -------------------------------------------------------------------------------- /Cpp_Program/fileRead/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/fileRead/a.out -------------------------------------------------------------------------------- /Cpp_Program/fileRead/sales_record.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/fileRead/sales_record.txt -------------------------------------------------------------------------------- /Cpp_Program/fileRead/simpleCode.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/fileRead/simpleCode.out -------------------------------------------------------------------------------- /Cpp_Program/fileRead/simpletest.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "simpleCode.h" 4 | 5 | using namespace std; 6 | 7 | int main(){ 8 | Sales_data rhs,lhs; 9 | read(cin,rhs); 10 | read(cin,lhs); 11 | rhs.operator+=(lhs); 12 | print(cout,rhs); 13 | operator<<(cout,lhs); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /Cpp_Program/fileRead/simpletest.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/fileRead/simpletest.out -------------------------------------------------------------------------------- /Cpp_Program/genericAlogrithm/a.txt: -------------------------------------------------------------------------------- 1 | fuck? 2 | go and fuck! 3 | -------------------------------------------------------------------------------- /Cpp_Program/genericAlogrithm/genericAlog.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/genericAlogrithm/genericAlog.out -------------------------------------------------------------------------------- /Cpp_Program/genericAlogrithm/genericAlogrithm.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/genericAlogrithm/genericAlogrithm.out -------------------------------------------------------------------------------- /Cpp_Program/newCoder/protest.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/newCoder/protest.out -------------------------------------------------------------------------------- /Cpp_Program/newCoder/protest.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/newCoder/protest.t -------------------------------------------------------------------------------- /Cpp_Program/newCoder/protest.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.protest.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Cpp_Program/newCoder/protest.t.dSYM/Contents/Resources/DWARF/protest.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/newCoder/protest.t.dSYM/Contents/Resources/DWARF/protest.t -------------------------------------------------------------------------------- /Cpp_Program/oopProgram/ooprogram.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "ooprogram.h" 4 | 5 | using namespace std; 6 | 7 | int main(){ 8 | Bulk_quote bqu; 9 | Quote item(bqu); 10 | item = bqu; 11 | Quote *p = &item; // p指向Quote对象 12 | p = &bqu; 13 | Quote &r = bqu; 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /Cpp_Program/oopProgram/pureBase.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/oopProgram/pureBase.h -------------------------------------------------------------------------------- /Cpp_Program/operatorRe/operator.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | // string s = "world"; 7 | // string t = s+')'; 8 | // string u = "hi"+s; 9 | -------------------------------------------------------------------------------- /Cpp_Program/operatorRe/operator.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | class Sales_data{ 7 | friend istream& operator>>(istream&,Sales_data&); 8 | friend ostream& operator<<(ostream&,const Sales_data&); 9 | friend Sales_data operator+(const Sales_data&, const Sales_data&); 10 | public: 11 | Sales_data& operator+=(const Sales_data&); 12 | }; 13 | 14 | ostream &operator<<(ostream &os,const Sales_data &item){ 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Cpp_Program/privateClass/privateClass.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | class Person{ 6 | public: 7 | Person(){ 8 | cout << "Person" << endl; 9 | }; 10 | virtual void run() = 0; 11 | ~Person(){ 12 | cout << "~person" < 4 | #include 5 | 6 | class readStream{ 7 | 8 | }; 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /Cpp_Program/readStream/readStream.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/readStream/readStream.out -------------------------------------------------------------------------------- /Cpp_Program/readStream/storyQuery.txt: -------------------------------------------------------------------------------- 1 | Alice Emma has long flowing red hair. 2 | Her Daddy says when the wind blows 3 | through her hair, it looks almost alive, 4 | like a fiery bird in flight. 5 | A beautiful fiery bird, he tells her, 6 | magical but untamed. 7 | "Daddy, shush, there is no such thing," 8 | she tells him, at the same time wanting 9 | him to her more. 10 | Shyly, she asks, "I mean, Daddy, is there?" 11 | -------------------------------------------------------------------------------- /Cpp_Program/review/review.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/review/review.out -------------------------------------------------------------------------------- /Cpp_Program/review/review.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.review.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Cpp_Program/review/review.out.dSYM/Contents/Resources/DWARF/review.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/review/review.out.dSYM/Contents/Resources/DWARF/review.out -------------------------------------------------------------------------------- /Cpp_Program/rightRef/rightRef.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/rightRef/rightRef.t -------------------------------------------------------------------------------- /Cpp_Program/screen/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/screen/a.out -------------------------------------------------------------------------------- /Cpp_Program/screen/screen.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "screen.h" 3 | using namespace std; 4 | 5 | int main(){ 6 | Screen myScreen(5,3,' '); 7 | // char ch = myScreen.get(); 8 | // ch = myScreen.get(0,0); 9 | // myScreen.move(5,3).set('#'); 10 | const Screen blank(5,3,'*'); 11 | myScreen.set('#').display(cout); 12 | blank.display(cout); 13 | return 0; 14 | }; 15 | -------------------------------------------------------------------------------- /Cpp_Program/screen/window_mgr.h: -------------------------------------------------------------------------------- 1 | #ifndef WINDOW_MGR_H 2 | #define WINDOW_MGR_H 3 | 4 | #include "screen.h" 5 | #include 6 | #include 7 | using namespace std; 8 | class Screen; // 低级错误!!! 9 | 10 | class Window_mgr 11 | { 12 | public: 13 | using ScreenIndex = vector::size_type; 14 | ScreenIndex addScreen(const Screen&); 15 | inline void clear(ScreenIndex); 16 | private: 17 | vector screens; 18 | }; 19 | 20 | Window_mgr::ScreenIndex Window_mgr::addScreen(const Screen &s){ 21 | screens.push_back(s); 22 | return screens.size() - 1; 23 | } 24 | // void Window_mgr::clear(ScreenIndex i) 25 | // { 26 | // Screen &s = screens[i]; 27 | // s.contents = string(s.height * s.width, ' '); 28 | // } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /Cpp_Program/selectName/account.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "account.h" 3 | #include 4 | 5 | int main(){ 6 | Account ac1; 7 | Account *ac2 = &ac1; 8 | double r; 9 | r = ac1.rate(); 10 | r = ac2->rate(); 11 | r = Account::rate(); 12 | } 13 | -------------------------------------------------------------------------------- /Cpp_Program/selectName/account.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/selectName/account.out -------------------------------------------------------------------------------- /Cpp_Program/smartPtr/smartPtrUse.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/smartPtr/smartPtrUse.out -------------------------------------------------------------------------------- /Cpp_Program/smartPtr/smartPtrUse.out.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.smartPtrUse.out 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /Cpp_Program/smartPtr/smartPtrUse.out.dSYM/Contents/Resources/DWARF/smartPtrUse.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/smartPtr/smartPtrUse.out.dSYM/Contents/Resources/DWARF/smartPtrUse.out -------------------------------------------------------------------------------- /Cpp_Program/sstream/phone.txt: -------------------------------------------------------------------------------- 1 | trans 30624770 2332213223 2 | david 34232321 232455 3 | olie 342324353 23242535 231432432 4 | -------------------------------------------------------------------------------- /Cpp_Program/sstream/strstream.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Cpp_Program/sstream/strstream.out -------------------------------------------------------------------------------- /DesignPattern/OOPCpp/oopCpp.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | /*** 5 | * 首先搞清楚继承 6 | * 基类 虚函数 7 | * 所以虚函数必须要有自己的实现***/ 8 | class Quote{ 9 | public: 10 | Quote() = default; 11 | string isbn() const; 12 | virtual double net_price() const = 0; 13 | }; 14 | 15 | class Bulk_quote:private Quote{ 16 | public: 17 | Bulk_quote():Quote(){ 18 | 19 | } 20 | double net_price() const override; 21 | private: 22 | double num = 12.33; 23 | }; 24 | 25 | double Bulk_quote::net_price() const{ 26 | return num; 27 | } 28 | 29 | int main(){ 30 | Bulk_quote *bulk_qupte = new Bulk_quote(); 31 | cout << bulk_qupte->net_price() << endl; 32 | return 0; 33 | } 34 | 35 | 36 | -------------------------------------------------------------------------------- /DesignPattern/OOPCpp/oopCpp.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/DesignPattern/OOPCpp/oopCpp.out -------------------------------------------------------------------------------- /DesignPattern/Single_Pattern/singleton.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/DesignPattern/Single_Pattern/singleton.t -------------------------------------------------------------------------------- /DesignPattern/Single_Pattern/singleton.t.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.singleton.t 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleVersion 18 | 1 19 | 20 | 21 | -------------------------------------------------------------------------------- /DesignPattern/Single_Pattern/singleton.t.dSYM/Contents/Resources/DWARF/singleton.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/DesignPattern/Single_Pattern/singleton.t.dSYM/Contents/Resources/DWARF/singleton.t -------------------------------------------------------------------------------- /DesignPattern/Single_Resp_Pri/impleClass.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/DesignPattern/Single_Resp_Pri/impleClass.out -------------------------------------------------------------------------------- /DesignPattern/abstractFactory/abstractFactory.cpp: -------------------------------------------------------------------------------- 1 | // 女娲造人的故事 2 | class Human{ 3 | public: 4 | Human() = default; 5 | virtual void getColor(); 6 | virtual void talk(); 7 | virtual void getSex(); 8 | }; 9 | -------------------------------------------------------------------------------- /DesignPattern/factoryPattern/factoryPattern.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/DesignPattern/factoryPattern/factoryPattern.t -------------------------------------------------------------------------------- /DesignPattern/factoryPattern/factoryPattern.t.dSYM/Contents/Resources/DWARF/factoryPattern.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/DesignPattern/factoryPattern/factoryPattern.t.dSYM/Contents/Resources/DWARF/factoryPattern.t -------------------------------------------------------------------------------- /DesignPattern/proxyMode/proxyMode.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/DesignPattern/proxyMode/proxyMode.t -------------------------------------------------------------------------------- /DesignPattern/templateMethod/templateMethod.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/DesignPattern/templateMethod/templateMethod.t -------------------------------------------------------------------------------- /DesignPattern/templateMethod/templateMethod.t.dSYM/Contents/Resources/DWARF/templateMethod.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/DesignPattern/templateMethod/templateMethod.t.dSYM/Contents/Resources/DWARF/templateMethod.t -------------------------------------------------------------------------------- /Js_Tutorial/EcmaScript/useJavaScript.md: -------------------------------------------------------------------------------- 1 | # 在HTML中使用JS 2 | ```html 3 | 4 | ``` 5 | async 6 | -------------------------------------------------------------------------------- /Js_Tutorial/closure.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Js_Tutorial/closure.md -------------------------------------------------------------------------------- /Js_Tutorial/example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
1
4 |
2
5 |
3
6 |
4
7 |
5
8 |
6
9 | 10 | 23 | 24 | -------------------------------------------------------------------------------- /Js_Tutorial/img/async_await.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Js_Tutorial/img/async_await.png -------------------------------------------------------------------------------- /Js_Tutorial/img/async_grammer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Js_Tutorial/img/async_grammer.png -------------------------------------------------------------------------------- /Js_Tutorial/img/async_simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Js_Tutorial/img/async_simple.png -------------------------------------------------------------------------------- /Js_Tutorial/img/async_then.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Js_Tutorial/img/async_then.png -------------------------------------------------------------------------------- /Js_Tutorial/img/error_async.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Js_Tutorial/img/error_async.png -------------------------------------------------------------------------------- /Js_Tutorial/img/es6_7_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Js_Tutorial/img/es6_7_8.png -------------------------------------------------------------------------------- /Js_Tutorial/js_Algrothm/js_quickSort.md: -------------------------------------------------------------------------------- 1 | ## 这是一个简单的快排 js实现 2 | 其实快排的原理很简单。
3 | 快速排序,顾名思义,快!有多快?反正比基础排序,冒泡排序,堆排序,插入排序等都快。
4 | 例如我们来排一下 "3,6,7,8,1,9,4,5,2,10",这十个数。逻辑是什么呢?
5 | 首先,在这个序列随便找一个数作为基准数(就是一个随便的数,名字高大上,实际很简单),为了方便,就拿第二个数吧,6!。
6 | 接下来将这个序列中的所有比这个6(基准数)大的数放右边,小的放左边。就得到
7 | 3,1,4,5,2,6,7,8,9,10 8 | -------------------------------------------------------------------------------- /Js_Tutorial/js_Event_Loop.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Js_Tutorial/js_Event_Loop.md -------------------------------------------------------------------------------- /Js_Tutorial/js_Pomise_Deffer.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Js_Tutorial/js_Pomise_Deffer.md -------------------------------------------------------------------------------- /Js_Tutorial/js_emit_on.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Js_Tutorial/js_emit_on.md -------------------------------------------------------------------------------- /Js_Tutorial/js_learning/ch1/key_save.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | 3 | message = "hi"; 4 | -------------------------------------------------------------------------------- /Js_Tutorial/js_socket.js: -------------------------------------------------------------------------------- 1 | let net = require('net'); 2 | 3 | let client = net.createConnection( 4 | { 5 | host:'10.7.1.235', 6 | port: 1024 7 | }, 8 | (socket) => { 9 | //'connect' listener 10 | console.log('成功连接到TCP服务器...'); 11 | console.log(socket) 12 | client.write('这条消息来自于客户端...!\r\n'); 13 | } 14 | ) 15 | client.on('error',err=>{ 16 | console.log('连接失败') 17 | }) 18 | client.on('data', (data) => { 19 | console.log('客户端收到了消息:'+ data.toString()); 20 | client.end(); 21 | }); 22 | client.on('end', () => { 23 | console.log('disconnected from server'); 24 | }); 25 | 26 | 27 | -------------------------------------------------------------------------------- /Js_Tutorial/js_to_excel.md: -------------------------------------------------------------------------------- 1 | # javacript 将json导出为excel 2 | 这是一个简单的将json数据导出为excel的简单demo
3 | 这是一个简单的在vue上实现的简单demo
4 | 首先引用xlsx,这是一个模块,一个npm包,直接用npm下载即可npm install xlsx
5 | ### talk is cheap, show me the code 6 | ```js 7 | import XLSX from 'xlsx'; 8 | handlejsontosheet(jsonData,fileName){ 9 | let wsName = 'wsName'; 10 | let wb = XLSX.utils.book_new(); 11 | let ws = XLSX.utils.json_to_sheet(jsonData); 12 | XLSX.utils.book_append_sheet(wb,ws,wsName); 13 | XLSX.writeFile(wb,fileName); 14 | }, 15 | ``` 16 | ### 参考文档 17 | https://github.com/SheetJS/js-xlsx
18 | 19 | ### 结束语 20 | 就这样结束了?对啊,你仲想点,结束了,以后直接调用就得了。 -------------------------------------------------------------------------------- /Js_Tutorial/websocket_simple.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/Js_Tutorial/websocket_simple.md -------------------------------------------------------------------------------- /NodeNotes/NodeApi.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/NodeNotes/NodeApi.md -------------------------------------------------------------------------------- /NodeNotes/img/connection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/NodeNotes/img/connection.png -------------------------------------------------------------------------------- /NodeNotes/img/deferred_promise.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/NodeNotes/img/deferred_promise.png -------------------------------------------------------------------------------- /NodeNotes/img/httpmodal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/NodeNotes/img/httpmodal.png -------------------------------------------------------------------------------- /NodeNotes/img/jinsheng25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/NodeNotes/img/jinsheng25.png -------------------------------------------------------------------------------- /NodeNotes/img/jinshengscaven.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/NodeNotes/img/jinshengscaven.png -------------------------------------------------------------------------------- /NodeNotes/img/node_heap_status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/NodeNotes/img/node_heap_status.png -------------------------------------------------------------------------------- /NodeNotes/img/nodejs_middle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/NodeNotes/img/nodejs_middle.png -------------------------------------------------------------------------------- /NodeNotes/img/nodeudp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/NodeNotes/img/nodeudp.png -------------------------------------------------------------------------------- /NodeNotes/img/v8_memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/NodeNotes/img/v8_memory.png -------------------------------------------------------------------------------- /NodeNotes/understand_restFul.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/NodeNotes/understand_restFul.md -------------------------------------------------------------------------------- /OS/img/access_time_clock.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/access_time_clock.jpeg -------------------------------------------------------------------------------- /OS/img/amend_page.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/amend_page.jpeg -------------------------------------------------------------------------------- /OS/img/bank_safe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/bank_safe.png -------------------------------------------------------------------------------- /OS/img/bitmap_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/bitmap_link.png -------------------------------------------------------------------------------- /OS/img/bitmap_memory.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/bitmap_memory.jpeg -------------------------------------------------------------------------------- /OS/img/bitmap_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/bitmap_page.png -------------------------------------------------------------------------------- /OS/img/circle_wait.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/circle_wait.jpg -------------------------------------------------------------------------------- /OS/img/dead_lock_transportation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/dead_lock_transportation.jpg -------------------------------------------------------------------------------- /OS/img/deadlock_no_deadlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/deadlock_no_deadlock.png -------------------------------------------------------------------------------- /OS/img/dispatch_resource.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/dispatch_resource.jpg -------------------------------------------------------------------------------- /OS/img/increa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/increa.png -------------------------------------------------------------------------------- /OS/img/link_memory.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/link_memory.jpeg -------------------------------------------------------------------------------- /OS/img/live_lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/live_lock.png -------------------------------------------------------------------------------- /OS/img/multi_multi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/multi_multi.png -------------------------------------------------------------------------------- /OS/img/multi_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/multi_one.png -------------------------------------------------------------------------------- /OS/img/mutilthread.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/mutilthread.jpeg -------------------------------------------------------------------------------- /OS/img/one_to_one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/one_to_one.png -------------------------------------------------------------------------------- /OS/img/os_memory_no_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/os_memory_no_image.png -------------------------------------------------------------------------------- /OS/img/page_addr_transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/page_addr_transfer.png -------------------------------------------------------------------------------- /OS/img/page_link_algri.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/page_link_algri.jpeg -------------------------------------------------------------------------------- /OS/img/page_storage.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/page_storage.jpeg -------------------------------------------------------------------------------- /OS/img/page_table_menory.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/page_table_menory.jpeg -------------------------------------------------------------------------------- /OS/img/process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/process.png -------------------------------------------------------------------------------- /OS/img/process_addr.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/process_addr.jpeg -------------------------------------------------------------------------------- /OS/img/process_lifecircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/process_lifecircle.png -------------------------------------------------------------------------------- /OS/img/process_of_memory_storage.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/process_of_memory_storage.jpeg -------------------------------------------------------------------------------- /OS/img/process_page_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/process_page_table.png -------------------------------------------------------------------------------- /OS/img/process_thread_relative.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/process_thread_relative.png -------------------------------------------------------------------------------- /OS/img/program_source.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/program_source.png -------------------------------------------------------------------------------- /OS/img/record_page.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/record_page.jpeg -------------------------------------------------------------------------------- /OS/img/redirect_addr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/redirect_addr.png -------------------------------------------------------------------------------- /OS/img/request_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/request_table.png -------------------------------------------------------------------------------- /OS/img/resource_system.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/resource_system.jpg -------------------------------------------------------------------------------- /OS/img/resource_threads.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/resource_threads.jpg -------------------------------------------------------------------------------- /OS/img/resource_wait.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/resource_wait.jpg -------------------------------------------------------------------------------- /OS/img/second_chance.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/second_chance.jpeg -------------------------------------------------------------------------------- /OS/img/segment_addr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/segment_addr.png -------------------------------------------------------------------------------- /OS/img/segment_addr_transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/segment_addr_transfer.png -------------------------------------------------------------------------------- /OS/img/segment_memory.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/segment_memory.jpeg -------------------------------------------------------------------------------- /OS/img/short_page.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/short_page.jpeg -------------------------------------------------------------------------------- /OS/img/single_mutilple_thread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/single_mutilple_thread.png -------------------------------------------------------------------------------- /OS/img/swap_tech.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/swap_tech.png -------------------------------------------------------------------------------- /OS/img/tasks_os.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/tasks_os.png -------------------------------------------------------------------------------- /OS/img/thread_lifecircle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/thread_lifecircle.png -------------------------------------------------------------------------------- /OS/img/virtualStorage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/virtualStorage.jpg -------------------------------------------------------------------------------- /OS/img/virtual_addr_page.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/virtual_addr_page.jpeg -------------------------------------------------------------------------------- /OS/img/virtual_memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/virtual_memory.png -------------------------------------------------------------------------------- /OS/img/virtual_translate_addr.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/virtual_translate_addr.jpeg -------------------------------------------------------------------------------- /OS/img/wait_resource.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/wait_resource.jpg -------------------------------------------------------------------------------- /OS/img/work_set.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/img/work_set.jpeg -------------------------------------------------------------------------------- /OS/input_output.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/input_output.md -------------------------------------------------------------------------------- /OS/signal_linux/signal_linux.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/signal_linux/signal_linux.out -------------------------------------------------------------------------------- /OS/signal_linux/signal_unlock.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/signal_linux/signal_unlock.t -------------------------------------------------------------------------------- /OS/virtual_cloud.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/OS/virtual_cloud.md -------------------------------------------------------------------------------- /advanceAlgorithm/linklist/doublelink.cc: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | template 5 | struct doubNode{ 6 | T data; 7 | doubNode *pre; 8 | doubNode *next; 9 | }; 10 | 11 | -------------------------------------------------------------------------------- /advanceAlgorithm/linklist/singelink.cc: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | template 5 | struct singNode{ 6 | T data; 7 | singNode* next; 8 | }; -------------------------------------------------------------------------------- /advanceAlgorithm/queue_p_c/queue_p_c.cc: -------------------------------------------------------------------------------- 1 | /*** 2 | * 基于阻塞队列 3 | * 实现生产者消费者模型 4 | * 队列为空,消费者等待 5 | * 队列满了,生产者等待 6 | * 7 | * 队列使用循环队列 8 | * **/ 9 | #include 10 | // 首先实现一个循环队列 11 | 12 | -------------------------------------------------------------------------------- /cppInterviewTest/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/.DS_Store -------------------------------------------------------------------------------- /cppInterviewTest/cppInterview10.md: -------------------------------------------------------------------------------- 1 | #### C++写一个线程池框架(list/queue/conditional),多线程操作,C++面向对象建模和多态以及单元测试 2 | CPU之间的负载调度、做异步编程、非阻塞线程的拓展思路、非阻塞线程与可阻塞线程之间死锁关系。 -------------------------------------------------------------------------------- /cppInterviewTest/cppInterview11.md: -------------------------------------------------------------------------------- 1 | #### 生产者消费者消息队列 线程 2 | -------------------------------------------------------------------------------- /cppInterviewTest/cppInterview13.md: -------------------------------------------------------------------------------- 1 | ## 浅谈模版元编程 2 | -------------------------------------------------------------------------------- /cppInterviewTest/cppInterview17.md: -------------------------------------------------------------------------------- 1 | #### 编译生成的二进制文件计算机是怎么识别的 2 | 3 | #### cpp文件是怎么运行起来的 4 | #### 优先队列的时间复杂度 5 | #### 堆的维护时间复杂度 6 | #### c++继承和虚函数 7 | #### 虚函数的作用 8 | #### tcp以什么保证可靠 9 | 10 | #### tcp数据校验是怎么做的 11 | #### 死锁怎么发生的 12 | #### hash表是什么 13 | #### 谈谈对归一化方法的了解 14 | #### 找出排序数组中离第k个数最近的m个数,最近的意思是相减绝对值最小 15 | #### 求数组中最小的10个数,用堆写 16 | #### 分段分页机制 17 | #### C++垃圾回收,shared_ptr的引用计数出现循环引用怎么办 18 | #### C中的malloc和free做了哪些事情,free怎么知道free多长,C++中的delete又怎么知道delete多长 19 | #### 问STL库,vector的内存管理,deque的内存管理,list的排序 -------------------------------------------------------------------------------- /cppInterviewTest/cppInterview6.md: -------------------------------------------------------------------------------- 1 | ## 省略符参数,参数列表以及可变模版 是什么?怎么用? -------------------------------------------------------------------------------- /cppInterviewTest/cppInterview8.md: -------------------------------------------------------------------------------- 1 | ## 讲讲cpp多线程与任务 -------------------------------------------------------------------------------- /cppInterviewTest/cppInterview9.md: -------------------------------------------------------------------------------- 1 | #### C中如何调用C++函数?并重写类内成员函数声明 2 | [c中如何调用C++函数](https://blog.csdn.net/nizqsut/article/details/52148973)
3 | [综合C调用C++,C++调用C](https://www.cnblogs.com/ruili07/p/9728389.html) -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInt10.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInt10.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInt11.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInt11.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInt12.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInt12.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInt13.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInt13.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInt3.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInt3.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInt4.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInt4.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInt5.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInt5.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInt6.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInt6.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInt7.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInt7.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInt8.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInt8.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInt9.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInt9.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppInterview2.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppInterview2.t -------------------------------------------------------------------------------- /cppInterviewTest/cppIntviw/cppIntviwOne.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/cppIntviw/cppIntviwOne.t -------------------------------------------------------------------------------- /cppInterviewTest/img/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/img/.DS_Store -------------------------------------------------------------------------------- /cppInterviewTest/img/Myclass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/img/Myclass.jpg -------------------------------------------------------------------------------- /cppInterviewTest/img/map_rb_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/img/map_rb_tree.png -------------------------------------------------------------------------------- /cppInterviewTest/img/mutil_virtual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/img/mutil_virtual.png -------------------------------------------------------------------------------- /cppInterviewTest/img/mutil_virtuals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/img/mutil_virtuals.png -------------------------------------------------------------------------------- /cppInterviewTest/img/rewrite_virtual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/img/rewrite_virtual.png -------------------------------------------------------------------------------- /cppInterviewTest/img/set_rb_tree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/img/set_rb_tree.png -------------------------------------------------------------------------------- /cppInterviewTest/img/single_virtual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/img/single_virtual.png -------------------------------------------------------------------------------- /cppInterviewTest/img/virtualtableclass.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/cppInterviewTest/img/virtualtableclass.jpg -------------------------------------------------------------------------------- /interview/sangfor/cpy.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/interview/sangfor/cpy.t -------------------------------------------------------------------------------- /interview/virClass/virclass.cc: -------------------------------------------------------------------------------- 1 | class MyClass{ 2 | int var; 3 | public: 4 | virtual void func(){ 5 | 6 | } 7 | }; 8 | -------------------------------------------------------------------------------- /interview/virClass/virclass.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/interview/virClass/virclass.o -------------------------------------------------------------------------------- /interview/virClass/virclass.s: -------------------------------------------------------------------------------- 1 | .section __TEXT,__text,regular,pure_instructions 2 | .build_version macos, 10, 14 sdk_version 10, 14 3 | 4 | .subsections_via_symbols 5 | -------------------------------------------------------------------------------- /interview/virClass/virclass.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/interview/virClass/virclass.t -------------------------------------------------------------------------------- /leetcode/Maxim_SubArray.cc: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace std; 3 | 4 | class Solution { 5 | public: 6 | int maxSubArray(vector& nums) { 7 | // 比较sum 8 | if(nums.size() ==0)return 0; 9 | int greatSum = 0; 10 | int nGreatSum = 0x80000000;// 将其设置成足够小,是min_value 11 | 12 | for(int i = 0;inGreatSum) nGreatSum = greatSum; 16 | } 17 | return nGreatSum; 18 | } 19 | }; -------------------------------------------------------------------------------- /leetcode/longestSubstring.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @param {string} s 3 | * @return {number} 4 | */ 5 | var lengthOfLongestSubstring = function(s) { 6 | let numLen = s.length; 7 | let arrIndex = new Array(128); 8 | let ans = 0; 9 | // 尝试获取i到j的最大长度 10 | // 将数据放进桶内计算 11 | for(let i=0,j=0;j 3 | 4 | struct ListNode { 5 | int val; 6 | ListNode *next; 7 | ListNode(int x) : val(x), next(NULL) {} 8 | }; 9 | class Solution { 10 | public: 11 | ListNode* mergeTwoLists(ListNode* l1, ListNode* l2) { 12 | // 这个方法真的很好! 13 | if(l1 == nullptr) return l2; 14 | if(l2 == nullptr) return l1; 15 | 16 | ListNode* pHeadList = nullptr; 17 | 18 | if(l1->valval){ 19 | pHeadList = l1; 20 | pHeadList->next = mergeTwoLists(l1->next,l2); 21 | }else{ 22 | pHeadList = l2; 23 | pHeadList->next = mergeTwoLists(l1,l2->next); 24 | } 25 | return pHeadList; 26 | } 27 | }; -------------------------------------------------------------------------------- /leetcode/mysqrt.cc: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | int mySqrt(int x) { 4 | if(x == 0) return 0; 5 | double pre = 0,result = 1; 6 | while(result!=pre){ 7 | pre = result; 8 | // 牛顿迭代法,求K斜率值公式,求得result值 9 | result = (result+x/result)/2; 10 | } 11 | return (int)result; 12 | } 13 | }; -------------------------------------------------------------------------------- /leetcode/palindrom.cc: -------------------------------------------------------------------------------- 1 | class Solution { 2 | public: 3 | bool isPalindrome(int x) { 4 | if(x<0||(x!=0)&&x%10==0) return false; 5 | // 因为负数,不需要回文判断就知道false 6 | // 尝试将x求余放入链表,利用快慢指针 7 | // 最高位等于个位,那么我直接将x求余得到的个位持续相加 8 | int ret = 0; 9 | while(x>ret){ 10 | ret = ret*10+x%10; 11 | x/=10; 12 | } 13 | // 减少一半数字的判断 14 | return (x==ret)||(x==ret/10); 15 | // 最后的判断 16 | } 17 | }; -------------------------------------------------------------------------------- /leetcode/removeDuplicates.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | using namespace std; 4 | 5 | class Solution { 6 | public: 7 | int removeDuplicates(vector& nums) { 8 | // 遇到相同的就删掉 9 | // 进行数据搬移操作 10 | if(nums.size()<=1) return nums.size(); 11 | // 快慢指针 12 | int i=0,j=1; 13 | while(i 2 | using namespace std; 3 | 4 | class Solution { 5 | public: 6 | int reverse(int x) { 7 | int ret = 0; 8 | while(x!=0){ 9 | int pop = x%10; 10 | x/=10; 11 | // 我真的不知道可以这么分析,余数与整数的分析 12 | if((ret>INT_MAX/10)||(ret==INT_MAX/10&&pop>7)) return 0; 13 | if((ret& nums, int target) { 4 | // 容器vector的使用 插入排序,将有序区作为nums target为插入对象 5 | // 其实就是插入排序的改版 6 | // 重点考虑异常 7 | if(nums.size() == 0) return 0; 8 | nums.push_back(target); 9 | int j = nums.size()-2; 10 | for(;j>=0;j--){ 11 | if(nums[j]>=target){ 12 | nums[j+1] = nums[j]; 13 | }else{ 14 | break; 15 | } 16 | } 17 | return j+1; 18 | } 19 | }; -------------------------------------------------------------------------------- /leetcode/symetricTree.cc: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | struct TreeNode { 4 | int val; 5 | TreeNode *left; 6 | TreeNode *right; 7 | TreeNode(int x) : val(x), left(NULL), right(NULL) {} 8 | }; 9 | class Solution { 10 | public: 11 | bool isSymmetric(TreeNode* root) { 12 | return isSymetric(root,root); 13 | } 14 | 15 | bool isSymetric(TreeNode* sroot,TreeNode* proot){ 16 | if(sroot==nullptr&&proot==nullptr) return true; 17 | if(sroot == nullptr||proot==nullptr) return false; 18 | 19 | if(sroot->val!=proot->val) return false; 20 | 21 | return isSymetric(sroot->left,proot->right)&&isSymetric(sroot->right,proot->left); 22 | } 23 | }; -------------------------------------------------------------------------------- /nowcoder_wrong/img/addr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/nowcoder_wrong/img/addr.png -------------------------------------------------------------------------------- /nowcoder_wrong/img/save_addr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/nowcoder_wrong/img/save_addr.png -------------------------------------------------------------------------------- /nowcoder_wrong/nowcoder_4.md: -------------------------------------------------------------------------------- 1 | #### C++中的构造函数和析构函数可以抛出异常吗? 2 | 其实不建议在构造函数抛出异常,一旦抛出异常,所有的程序都将停止执行,析构函数也不会执行,需要手动去释放内存。
3 | 析构函数不应该抛出异常,析构函数抛出异常,程序自动立刻杀死进程。析构函数处理异常应该将异常封装在析构函数内部,而不是抛出。如果抛出,就会继续递归自己的析构函数,无限递归。
4 | 5 | #### memmove() 可以在源地址和目的地址的位置任意的情况下,在源地址和目的地址的空间大小任意的情况下实现二进制代码块的复制 6 | memcpy与memmove的目的都是将N个自己的源内存地址的内容拷贝到目标内存地址中。但当源内存和目标内存存在重叠时,memcpy会出错,而memmove能正确地实施拷贝,但也增加了一点点开销。 7 | 8 | #### 如果要实现一个多线程(非mfc)程序,选择多线程CRT,创建线程的时候应该用CreateThread还是_beginthreadex()? 9 | _beginthreadex()比较于CreateThread()有更高的线程安全性,不会造成多个线程共用同一个全局变量的情况。每个线程都将拥有自己专用的一块内存区域来供白准C运行库中所有需要的函数使用。 10 | 11 | #### 函数模板的实例化是由编译程序在处理函数调用时自动完成的 12 | 类模版的实例化必须由程序员在程序中显式地指定 13 | -------------------------------------------------------------------------------- /tcp_ip/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/.DS_Store -------------------------------------------------------------------------------- /tcp_ip/HTTPS.md: -------------------------------------------------------------------------------- 1 | ## HTTPS 为了安全🔐,我愿意带上套 2 | ![http_cover](./img/https_cover.png) 3 | 4 | 好了,这次渣男要带上🔐安全套了,妈妈再也不用担心我的安全了。
5 | [https加密流程传送门](https://github.com/HXWfromDJTU/blog/blob/master/network/http/https.md) 6 | 7 | 具体的加密🔐通过以上来了解,加密套路,三个随机数生成一样的密钥,一对密钥一样,解密双方加密的数据,那么这里要讲一下重放和篡改 8 | #### 重放与篡改 9 | 重放即黑客通过截取的包,用来发送N次,达到攻击服务端,令服务端崩溃的策略。而这个即通过唯一的timestamp和Nonce随机数联合起来,做一个不可逆的签名来保证,timestamp设定在60秒后过期。要是这个请求被截取,需要在60秒内重放,过期失效,但是要是加上nonce,随机数,就足够难重放了。因为在短时间内,连续生成连个相同的nonce的情况几乎为0。
10 | 还有就是服务器也可以将多余的请求去掉,使黑客根本没办法重放攻击。
11 | 例如下面这个请求`http://a.com?uid=123×tamp=1480556543&nonce=43f34f33&sign=80b886d71449cb33355d017893720666` 12 | 服务端工作:
13 | 1. 先验证签名sign是不是合理的,证明请求参数没有被中途篡改 14 | 2. 验证timestamp是否过期,证明请求是在最近60s被发出的 15 | 3. 最后验证nonce是不是已经有了,证明这个请求不是60s内的重放请求 16 | 17 | -------------------------------------------------------------------------------- /tcp_ip/img/000001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/000001.png -------------------------------------------------------------------------------- /tcp_ip/img/100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/100.png -------------------------------------------------------------------------------- /tcp_ip/img/101.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/101.png -------------------------------------------------------------------------------- /tcp_ip/img/101_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/101_2.png -------------------------------------------------------------------------------- /tcp_ip/img/200_from_cache.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/200_from_cache.png -------------------------------------------------------------------------------- /tcp_ip/img/201.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/201.png -------------------------------------------------------------------------------- /tcp_ip/img/204_RFC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/204_RFC.png -------------------------------------------------------------------------------- /tcp_ip/img/206.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/206.png -------------------------------------------------------------------------------- /tcp_ip/img/301.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/301.png -------------------------------------------------------------------------------- /tcp_ip/img/301_REPOST.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/301_REPOST.png -------------------------------------------------------------------------------- /tcp_ip/img/302.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/302.png -------------------------------------------------------------------------------- /tcp_ip/img/302_REPOST.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/302_REPOST.png -------------------------------------------------------------------------------- /tcp_ip/img/302_REPOST2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/302_REPOST2.png -------------------------------------------------------------------------------- /tcp_ip/img/303.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/303.png -------------------------------------------------------------------------------- /tcp_ip/img/304.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/304.png -------------------------------------------------------------------------------- /tcp_ip/img/400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/400.png -------------------------------------------------------------------------------- /tcp_ip/img/401.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/401.png -------------------------------------------------------------------------------- /tcp_ip/img/401_CORRECT.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/401_CORRECT.png -------------------------------------------------------------------------------- /tcp_ip/img/405.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/405.png -------------------------------------------------------------------------------- /tcp_ip/img/412.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/412.png -------------------------------------------------------------------------------- /tcp_ip/img/500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/500.png -------------------------------------------------------------------------------- /tcp_ip/img/502.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/502.png -------------------------------------------------------------------------------- /tcp_ip/img/DNS_decode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/DNS_decode.jpg -------------------------------------------------------------------------------- /tcp_ip/img/DNS_static_resource.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/DNS_static_resource.jpg -------------------------------------------------------------------------------- /tcp_ip/img/aetag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/aetag.png -------------------------------------------------------------------------------- /tcp_ip/img/async_cache.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/async_cache.jpg -------------------------------------------------------------------------------- /tcp_ip/img/cache-aside.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/cache-aside.jpg -------------------------------------------------------------------------------- /tcp_ip/img/cache_control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/cache_control.png -------------------------------------------------------------------------------- /tcp_ip/img/cache_manage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/cache_manage.jpg -------------------------------------------------------------------------------- /tcp_ip/img/cdn_dns.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/cdn_dns.jpg -------------------------------------------------------------------------------- /tcp_ip/img/cdn_enode.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/cdn_enode.jpg -------------------------------------------------------------------------------- /tcp_ip/img/controldata.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/controldata.jpg -------------------------------------------------------------------------------- /tcp_ip/img/cookies.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/cookies.png -------------------------------------------------------------------------------- /tcp_ip/img/dataControl1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/dataControl1.jpg -------------------------------------------------------------------------------- /tcp_ip/img/dataControl2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/dataControl2.jpg -------------------------------------------------------------------------------- /tcp_ip/img/dataControl3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/dataControl3.jpg -------------------------------------------------------------------------------- /tcp_ip/img/dataControl4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/dataControl4.jpg -------------------------------------------------------------------------------- /tcp_ip/img/dataControl5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/dataControl5.jpg -------------------------------------------------------------------------------- /tcp_ip/img/dataControl6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/dataControl6.jpg -------------------------------------------------------------------------------- /tcp_ip/img/dataControl7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/dataControl7.jpg -------------------------------------------------------------------------------- /tcp_ip/img/dns_tree.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/dns_tree.jpg -------------------------------------------------------------------------------- /tcp_ip/img/frame_http2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/frame_http2.jpg -------------------------------------------------------------------------------- /tcp_ip/img/frame_transfer_http2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/frame_transfer_http2.jpg -------------------------------------------------------------------------------- /tcp_ip/img/handshake.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/handshake.jpg -------------------------------------------------------------------------------- /tcp_ip/img/header_compress.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/header_compress.jpg -------------------------------------------------------------------------------- /tcp_ip/img/http1_0tcp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/http1_0tcp.png -------------------------------------------------------------------------------- /tcp_ip/img/http1_http2_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/http1_http2_frame.png -------------------------------------------------------------------------------- /tcp_ip/img/http2_STATIC_TABLE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/http2_STATIC_TABLE.png -------------------------------------------------------------------------------- /tcp_ip/img/http2_frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/http2_frame.png -------------------------------------------------------------------------------- /tcp_ip/img/http2_multiplex_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/http2_multiplex_1.png -------------------------------------------------------------------------------- /tcp_ip/img/http2_multiplex_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/http2_multiplex_2.png -------------------------------------------------------------------------------- /tcp_ip/img/http2_youdian.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/http2_youdian.jpg -------------------------------------------------------------------------------- /tcp_ip/img/http_streaming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/http_streaming.png -------------------------------------------------------------------------------- /tcp_ip/img/http_unsafe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/http_unsafe.png -------------------------------------------------------------------------------- /tcp_ip/img/httpdns_asignment.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/httpdns_asignment.jpg -------------------------------------------------------------------------------- /tcp_ip/img/https_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/https_cover.png -------------------------------------------------------------------------------- /tcp_ip/img/ipaddress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/ipaddress.png -------------------------------------------------------------------------------- /tcp_ip/img/layers.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/layers.jpg -------------------------------------------------------------------------------- /tcp_ip/img/long_polling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/long_polling.png -------------------------------------------------------------------------------- /tcp_ip/img/mapDataControl.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/mapDataControl.jpg -------------------------------------------------------------------------------- /tcp_ip/img/phone_httpdns.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/phone_httpdns.jpg -------------------------------------------------------------------------------- /tcp_ip/img/process_etag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/process_etag.png -------------------------------------------------------------------------------- /tcp_ip/img/quic.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/quic.jpeg -------------------------------------------------------------------------------- /tcp_ip/img/quic_transtrage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/quic_transtrage.jpg -------------------------------------------------------------------------------- /tcp_ip/img/recieved.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/recieved.jpg -------------------------------------------------------------------------------- /tcp_ip/img/request_head_http.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/request_head_http.jpg -------------------------------------------------------------------------------- /tcp_ip/img/request_header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/request_header.png -------------------------------------------------------------------------------- /tcp_ip/img/request_headers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/request_headers.png -------------------------------------------------------------------------------- /tcp_ip/img/response_http.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/response_http.jpg -------------------------------------------------------------------------------- /tcp_ip/img/saybye.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/saybye.jpg -------------------------------------------------------------------------------- /tcp_ip/img/server_Push.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/server_Push.png -------------------------------------------------------------------------------- /tcp_ip/img/spdy_struct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/spdy_struct.png -------------------------------------------------------------------------------- /tcp_ip/img/status_code_cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/status_code_cover.png -------------------------------------------------------------------------------- /tcp_ip/img/statustcp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/statustcp.jpg -------------------------------------------------------------------------------- /tcp_ip/img/sticky_package1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/sticky_package1.png -------------------------------------------------------------------------------- /tcp_ip/img/sticky_package2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/sticky_package2.png -------------------------------------------------------------------------------- /tcp_ip/img/sticky_package3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/sticky_package3.png -------------------------------------------------------------------------------- /tcp_ip/img/sticky_package4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/sticky_package4.png -------------------------------------------------------------------------------- /tcp_ip/img/tcp_protocol.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/tcp_protocol.jpg -------------------------------------------------------------------------------- /tcp_ip/img/tcphs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/tcphs.png -------------------------------------------------------------------------------- /tcp_ip/img/udp_offset_stream.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/udp_offset_stream.jpg -------------------------------------------------------------------------------- /tcp_ip/img/udp_protocol.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/udp_protocol.jpg -------------------------------------------------------------------------------- /tcp_ip/img/window.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/img/window.jpg -------------------------------------------------------------------------------- /tcp_ip/socketProgram/client.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/socketProgram/client.t -------------------------------------------------------------------------------- /tcp_ip/socketProgram/server.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/tcp_ip/socketProgram/server.t -------------------------------------------------------------------------------- /unixAdvance/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/a.out -------------------------------------------------------------------------------- /unixAdvance/advanceIO/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/advanceIO/a.out -------------------------------------------------------------------------------- /unixAdvance/advanceIO/advance.txt: -------------------------------------------------------------------------------- 1 | 20 2 | ssssssss -------------------------------------------------------------------------------- /unixAdvance/advanceIO/advanceio.c: -------------------------------------------------------------------------------- 1 | #include "../include/apue.h" 2 | #include 3 | #include 4 | #define BUFSIZE 1024 5 | int main(){ 6 | int fd; 7 | char buf[BUFSIZE]; 8 | int size; 9 | if((fd = open("./advance.txt",O_RDONLY|O_NONBLOCK))<0){ 10 | err_sys("wrong open"); 11 | } 12 | while(1){ 13 | if((size = read(fd,buf,BUFSIZE))<0){ 14 | if(EAGAIN = errno){ 15 | continue; 16 | } 17 | err_sys("read()"); 18 | exit(1); 19 | } 20 | // dosth 21 | } 22 | } -------------------------------------------------------------------------------- /unixAdvance/advanceIO/lock_fcntl.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/advanceIO/lock_fcntl.t -------------------------------------------------------------------------------- /unixAdvance/advanceIO/mmap_text.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/advanceIO/mmap_text.t -------------------------------------------------------------------------------- /unixAdvance/bar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/bar -------------------------------------------------------------------------------- /unixAdvance/communication/comm_process.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/communication/comm_process.t -------------------------------------------------------------------------------- /unixAdvance/communication/comm_rec.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/communication/comm_rec.t -------------------------------------------------------------------------------- /unixAdvance/communication/comm_rsnd.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/communication/comm_rsnd.t -------------------------------------------------------------------------------- /unixAdvance/communication/comm_sem.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/communication/comm_sem.t -------------------------------------------------------------------------------- /unixAdvance/communication/comm_shm.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/communication/comm_shm.t -------------------------------------------------------------------------------- /unixAdvance/communication/mkfifo_process.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/communication/mkfifo_process.t -------------------------------------------------------------------------------- /unixAdvance/communication/proto.h: -------------------------------------------------------------------------------- 1 | /*定义双方都需要使用的数据或对象*/ 2 | #ifndef PROTO_H__ 3 | #define PROTO_H__ 4 | #define NAMESIZE 32 5 | // 通讯双方生成key值共同使用的文件 6 | #define KEYPATH "./test.txt" 7 | // 通讯双方生成key值共同使用的salt值 8 | #define KEYPROJ 'a' 9 | 10 | // 消息类型,只要是大于0的合法整数即可 11 | #define MSGTYPE 10 12 | 13 | // 通讯双方约定的协议 14 | struct msg_st{ 15 | long mtype; 16 | char name[NAMESIZE]; 17 | int math; 18 | int chinese; 19 | }; 20 | #endif // PROTO_H__ -------------------------------------------------------------------------------- /unixAdvance/communication/test.txt: -------------------------------------------------------------------------------- 1 | 20 2 | -------------------------------------------------------------------------------- /unixAdvance/competeCondi/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/competeCondi/a.out -------------------------------------------------------------------------------- /unixAdvance/competeCondi/competecon.c: -------------------------------------------------------------------------------- 1 | #include "../include/apue.h" 2 | 3 | static void charatatimr(char *); 4 | 5 | int main(void){ 6 | pid_t pid; 7 | //TELL_WAIT(); 8 | if((pid=fork())<0){ 9 | err_sys("fork error"); 10 | }else if(pid==0){ 11 | // WAIT_PARENT(); 12 | charatatimr("output from child\n"); 13 | }else{ 14 | sleep(10); 15 | charatatimr("out put from parent\n"); 16 | //TELL_CHILD(pid); 17 | } 18 | exit(0); 19 | } 20 | 21 | static void charatatimr(char *ctr){ 22 | char *ptr; 23 | int c; 24 | 25 | setbuf(stdout,NULL); // 将标准输出设置为不带缓冲,就是完全由内核调用输出,每个字符的输出都需要调用一次write 26 | for(ptr=ctr;(c=*ptr++)!=0;) // 逐个字符输出 27 | putc(c,stdout); 28 | } -------------------------------------------------------------------------------- /unixAdvance/data: -------------------------------------------------------------------------------- 1 | #include "include/apue.h" 2 | #include 3 | 4 | int main(int argc,char* argv[]){ 5 | DIR *dp; 6 | struct dirent *dirp; 7 | if(argc !=2) 8 | err_quit("Usage:is directory_name"); 9 | if((dp = opendir(argv[1]))==NULL) 10 | err_sys("can't open %s",argv[1]); 11 | while((dirp = readdir(dp))!=NULL) 12 | printf("%s\n",dirp->d_name); 13 | 14 | closedir(dp); 15 | exit(0); 16 | } -------------------------------------------------------------------------------- /unixAdvance/deamonProcess/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/deamonProcess/a.out -------------------------------------------------------------------------------- /unixAdvance/execut/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/execut/a.out -------------------------------------------------------------------------------- /unixAdvance/execut/echoall: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/execut/echoall -------------------------------------------------------------------------------- /unixAdvance/execut/echoall.c: -------------------------------------------------------------------------------- 1 | #include "../include/apue.h" 2 | 3 | int main(int argc,char *argv[]){ 4 | int i; 5 | char **ptr; 6 | extern **environ; 7 | 8 | for(i=0;i 3 | 4 | int main(void){ 5 | if(open("file.txt",O_RDWR)<0) 6 | err_sys("open error"); 7 | if(unlink("file.txt")<0) 8 | err_sys("unlinke error"); 9 | printf("file unlinked\n"); 10 | sleep(15); 11 | printf("done\n"); 12 | exit(0); 13 | } -------------------------------------------------------------------------------- /unixAdvance/file_index/link.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/file_index/link.t -------------------------------------------------------------------------------- /unixAdvance/file_index/statfunc.c: -------------------------------------------------------------------------------- 1 | #include "../include/apue.h" 2 | #include 3 | 4 | int main(int argc,char *argv[]){ 5 | if(argc!=2) 6 | err_quit("usage:statfunc.t < pathname>\n"); 7 | if(access(argv[1],R_OK)<0) 8 | err_ret("access error for %s",argv[1]); 9 | else 10 | printf("read access OK\n"); 11 | if(open(argv[1],O_RDONLY)<0) 12 | err_ret("open error for %s",argv[1]); 13 | else 14 | printf("open for reading OK\n"); 15 | exit(0); 16 | } -------------------------------------------------------------------------------- /unixAdvance/file_index/statfunc.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/file_index/statfunc.t -------------------------------------------------------------------------------- /unixAdvance/foo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/foo -------------------------------------------------------------------------------- /unixAdvance/img/authority.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/authority.png -------------------------------------------------------------------------------- /unixAdvance/img/bigsmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/bigsmall.png -------------------------------------------------------------------------------- /unixAdvance/img/conver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/conver.png -------------------------------------------------------------------------------- /unixAdvance/img/cprostroage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/cprostroage.png -------------------------------------------------------------------------------- /unixAdvance/img/detel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/detel.png -------------------------------------------------------------------------------- /unixAdvance/img/dipareas.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/dipareas.png -------------------------------------------------------------------------------- /unixAdvance/img/eachProcess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/eachProcess.png -------------------------------------------------------------------------------- /unixAdvance/img/env.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/env.png -------------------------------------------------------------------------------- /unixAdvance/img/fmemopentype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/fmemopentype.png -------------------------------------------------------------------------------- /unixAdvance/img/fork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/fork.png -------------------------------------------------------------------------------- /unixAdvance/img/index.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/index.jpg -------------------------------------------------------------------------------- /unixAdvance/img/inner_data_struct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/inner_data_struct.png -------------------------------------------------------------------------------- /unixAdvance/img/limitstatus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/limitstatus.png -------------------------------------------------------------------------------- /unixAdvance/img/linuxlogin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/linuxlogin.png -------------------------------------------------------------------------------- /unixAdvance/img/lockf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/lockf.png -------------------------------------------------------------------------------- /unixAdvance/img/lwp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/lwp.png -------------------------------------------------------------------------------- /unixAdvance/img/mode_t.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/mode_t.png -------------------------------------------------------------------------------- /unixAdvance/img/pipe_process.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/pipe_process.png -------------------------------------------------------------------------------- /unixAdvance/img/popen_smd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/popen_smd.png -------------------------------------------------------------------------------- /unixAdvance/img/print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/print.png -------------------------------------------------------------------------------- /unixAdvance/img/process_exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/process_exit.png -------------------------------------------------------------------------------- /unixAdvance/img/process_session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/process_session.png -------------------------------------------------------------------------------- /unixAdvance/img/relatedID.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/relatedID.png -------------------------------------------------------------------------------- /unixAdvance/img/scanf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/scanf.png -------------------------------------------------------------------------------- /unixAdvance/img/scanfconv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/scanfconv.png -------------------------------------------------------------------------------- /unixAdvance/img/setuid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/setuid.png -------------------------------------------------------------------------------- /unixAdvance/img/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/shadow.png -------------------------------------------------------------------------------- /unixAdvance/img/shell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/shell.png -------------------------------------------------------------------------------- /unixAdvance/img/signal_stand_deal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/signal_stand_deal.png -------------------------------------------------------------------------------- /unixAdvance/img/signal_thread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/signal_thread.png -------------------------------------------------------------------------------- /unixAdvance/img/sizeof.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/sizeof.png -------------------------------------------------------------------------------- /unixAdvance/img/stat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/stat.png -------------------------------------------------------------------------------- /unixAdvance/img/strformat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/strformat.png -------------------------------------------------------------------------------- /unixAdvance/img/tmpfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/tmpfile.png -------------------------------------------------------------------------------- /unixAdvance/img/token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/token.png -------------------------------------------------------------------------------- /unixAdvance/img/type.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/type.png -------------------------------------------------------------------------------- /unixAdvance/img/workqueue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/img/workqueue.png -------------------------------------------------------------------------------- /unixAdvance/io/bits.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../include/apue.h" 3 | #include 4 | 5 | int main(){ 6 | FILE *fp; 7 | // 打开或者创建一个文件 8 | int fd; 9 | if((fd = creat("./bits.txt",O_WRONLY))<0) 10 | err_sys("open false"); 11 | close(fd); 12 | if((fp=fopen("./bits.txt","r+"))<0){ 13 | err_sys("open error"); 14 | } 15 | float data[10]; 16 | data[2] = 12.3; 17 | data[3] = 23.4; 18 | data[4] = 45.2; 19 | data[5] = 36.7; 20 | if(fwrite(&data[2],sizeof(float),4,fp)!=4) 21 | err_sys("fwrite error"); 22 | fclose(fp); 23 | exit(0); 24 | } -------------------------------------------------------------------------------- /unixAdvance/io/bits.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/io/bits.t -------------------------------------------------------------------------------- /unixAdvance/io/file.txt: -------------------------------------------------------------------------------- 1 | abcdefghijABCDEFGHIJabcdeabcdeaa -------------------------------------------------------------------------------- /unixAdvance/io/get_put.c: -------------------------------------------------------------------------------- 1 | #include "../include/apue.h" 2 | #include 3 | /*** 4 | * 搞清楚,是对一个流操作 5 | * 而不是一个文件 6 | * ***/ 7 | int main(void){ 8 | int c; 9 | FILE *fp; 10 | fp = freopen("./file.txt","r+",stdin); // 指定为输入流 11 | char buf[3]; 12 | while(fgets(buf,2,stdin)!=NULL) // 输入一行 13 | if(fputs(buf,stdout)==EOF) // 输出一行 14 | err_sys("output error"); 15 | // printf("%s\n",buf); 16 | if(ferror(fp)) 17 | err_sys("gets error"); 18 | // if(feof(fp)) 19 | // err_sys("end of file"); 20 | fclose(fp); 21 | exit(0); 22 | } -------------------------------------------------------------------------------- /unixAdvance/io/get_put.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/io/get_put.t -------------------------------------------------------------------------------- /unixAdvance/io/holefile.no: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/io/holefile.no -------------------------------------------------------------------------------- /unixAdvance/io/holefile.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/io/holefile.t -------------------------------------------------------------------------------- /unixAdvance/io/iofile.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/io/iofile.out -------------------------------------------------------------------------------- /unixAdvance/io/iofile.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/io/iofile.t -------------------------------------------------------------------------------- /unixAdvance/io/memopen.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/io/memopen.t -------------------------------------------------------------------------------- /unixAdvance/io/shareFile.hole: -------------------------------------------------------------------------------- 1 | i am your fatherwho the hell are you? -------------------------------------------------------------------------------- /unixAdvance/io/shareFile.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/io/shareFile.t -------------------------------------------------------------------------------- /unixAdvance/io/stdio_sysio.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/io/stdio_sysio.out -------------------------------------------------------------------------------- /unixAdvance/io/stdio_sysio.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/io/stdio_sysio.t -------------------------------------------------------------------------------- /unixAdvance/io/testfile.txt: -------------------------------------------------------------------------------- 1 | qwertyuyuiABCDEFGHIJd 2 | f 3 | g 4 | h 5 | s 6 | a 7 | d 8 | d 9 | g 10 | h 11 | h 12 | h 13 | jd 14 | s 15 | s 16 | sa 17 | f 18 | g 19 | -------------------------------------------------------------------------------- /unixAdvance/linuxDeep9/sys_sec.c: -------------------------------------------------------------------------------- 1 | /** 2 | * 不动笔墨不读书系列 3 | * 继续打探理解系统安全 保护重要资产 4 | * 5 | * linux密码登陆过程 6 | * 常见的用户验证方法有 用户名密码登陆和证书登陆 7 | * 密码验证方法 对比以下输入与预设是否匹配 8 | * 使用单向散列算法,这样即使散列后的密码被泄漏,攻击者也需要可观的算力才能得到原始的明文密码 9 | * 10 | * crypt 用于计算密码散列值的函数 11 | * char *crypt(const char *key,const char *salt); 12 | * key 输入的密码字符串 salt盐值 字符串 13 | * crypt的返回结果是放在一块静态分配的内存区,所以不能同时在多个线程中执行 14 | * 15 | * Linux对用户敏感信息的保护 16 | * 访问权限 17 | * 账号密码保存存在访问权限 18 | * passwd文件有权限读没权限改,root有权限更改 19 | * shadow没权限做 20 | * 21 | * Set-User-ID程序 22 | * 文件权限控制是一道屏障 23 | * ***/ -------------------------------------------------------------------------------- /unixAdvance/linux_Deep1/elf_header.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/linux_Deep1/elf_header.o -------------------------------------------------------------------------------- /unixAdvance/linux_Deep1/elf_header.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/linux_Deep1/elf_header.t -------------------------------------------------------------------------------- /unixAdvance/linux_Deep1/elf_header.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/linux_Deep1/elf_header.txt -------------------------------------------------------------------------------- /unixAdvance/linux_Deep1/makefile: -------------------------------------------------------------------------------- 1 | default:elf_header.o 2 | gcc -o elf_header.t elf_header.o 3 | 4 | elf_header.o:elf_header.c 5 | 6 | .PONY:complie 7 | complie: 8 | gcc -o elf_header.txt -s elf_header.c 9 | 10 | 11 | .PONY: clean 12 | clean: 13 | -rm elf_header.t elf_header.o -------------------------------------------------------------------------------- /unixAdvance/myls.c: -------------------------------------------------------------------------------- 1 | #include "include/apue.h" 2 | #include 3 | #define RWRWRW (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) 4 | 5 | int main(int argc,char* argv[]){ 6 | umask(0); 7 | if(creat("foo",RWRWRW)<0) 8 | err_sys("creat error for foo"); 9 | umask(S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); // umask禁止所有组和其他用户的访问权限 10 | if(creat("bar",RWRWRW)<0) 11 | err_sys("creat error for bar"); 12 | exit(0); 13 | } 14 | /*** 15 | * 所以实际上,umask是用来禁止权限的 16 | * ***/ -------------------------------------------------------------------------------- /unixAdvance/myls.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/myls.t -------------------------------------------------------------------------------- /unixAdvance/netWorkIpc/proto.h: -------------------------------------------------------------------------------- 1 | #ifndef PROTO_H__ 2 | #define PROTO_H__ 3 | 4 | #include 5 | 6 | #define RCVPORT "8089" 7 | #define NAMESIZE 13 8 | 9 | struct msg_st{ 10 | uint8_t name[NAMESIZE]; 11 | uint32_t math; 12 | uint32_t chinese; 13 | }__attribute__((packed)); 14 | // 这里对齐 15 | #endif -------------------------------------------------------------------------------- /unixAdvance/processFork/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/processFork/a.out -------------------------------------------------------------------------------- /unixAdvance/processFork/forkzomb.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int main(void){ 7 | pid_t pid; 8 | int i = 0; 9 | for(i = 0;i<10;i++){ 10 | fflush(NULL); 11 | pid = fork(); 12 | if(pid<0){ 13 | perror("fork() error"); 14 | exit(1); 15 | }else if(0==pid){ 16 | printf("pid = %d\n",getpid()); 17 | sleep(10); 18 | exit(0); 19 | } 20 | } 21 | return 0; 22 | } -------------------------------------------------------------------------------- /unixAdvance/processFork/forkzomb.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/processFork/forkzomb.t -------------------------------------------------------------------------------- /unixAdvance/processFork/processfork2.c: -------------------------------------------------------------------------------- 1 | #include "../include/apue.h" 2 | #include 3 | #include 4 | 5 | int main(void){ 6 | pid_t pid; 7 | int i = 0; 8 | for(;i<10;i++){ 9 | fflush(NULL); 10 | if((pid = fork())<0){ 11 | err_sys("fork error"); 12 | exit(1); 13 | }else if(0==pid){ 14 | // sleep(100); 15 | printf("pid=%d\n",getpid()); 16 | exit(0); 17 | } 18 | } 19 | for(i=0;i<10;i++){ 20 | wait(NULL); 21 | } 22 | exit(0); 23 | } -------------------------------------------------------------------------------- /unixAdvance/processFork/processfork2.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/processFork/processfork2.t -------------------------------------------------------------------------------- /unixAdvance/processFork/re.txt: -------------------------------------------------------------------------------- 1 | a write to stdout; 2 | before fork 3 | before fork 4 | i am subProcess and i will add globvar 1 5 | a=20 6 | pid=1521,glob=7,vr=89 7 | i=22 8 | pid=1520,glob=6,vr=88 9 | i=22 10 | -------------------------------------------------------------------------------- /unixAdvance/processFork/result.txt: -------------------------------------------------------------------------------- 1 | a write to stdout; 2 | before fork 3 | i am subProcess and i will add globvar 1 4 | a=20 5 | pid=1452,glob=7,vr=89 6 | i=22 7 | before fork 8 | pid=1451,glob=6,vr=88 9 | i=22 10 | -------------------------------------------------------------------------------- /unixAdvance/processFork/temp.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/processFork/temp.out -------------------------------------------------------------------------------- /unixAdvance/processFork/test.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/processFork/test.out -------------------------------------------------------------------------------- /unixAdvance/processFork/testForkSub.c: -------------------------------------------------------------------------------- 1 | #include "../include/apue.h" 2 | 3 | static void f1(void),f2(void); 4 | 5 | int main(void){ 6 | f1(); 7 | f2(); 8 | _exit(0); 9 | } 10 | 11 | static void f1(void){ 12 | pid_t pid; 13 | 14 | if((pid=vfork())<0) 15 | err_sys("err fork"); 16 | } 17 | 18 | static void f2(void){ 19 | char buf[1000]; 20 | int i; 21 | for(i=0;i 3 | 4 | int main(){ 5 | pid_t pid; 6 | pid = getpgrp(); 7 | printf("gid = %d\n",pid); 8 | return 0; 9 | } -------------------------------------------------------------------------------- /unixAdvance/processgroup/processgid.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/processgroup/processgid.t -------------------------------------------------------------------------------- /unixAdvance/processjmp/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/processjmp/a.out -------------------------------------------------------------------------------- /unixAdvance/rlimt/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/rlimt/a.out -------------------------------------------------------------------------------- /unixAdvance/signal_process/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/signal_process/a.out -------------------------------------------------------------------------------- /unixAdvance/signal_process/count_alarm.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/signal_process/count_alarm.t -------------------------------------------------------------------------------- /unixAdvance/signal_process/count_time.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(void){ 5 | long long count = 0; 6 | time_t t; 7 | t = time(NULL)+5; // 延迟5秒 8 | while(time(NULL) 3 | 4 | static void my_alarm(int sig){ 5 | struct passwd *rootptr; 6 | printf("in signal handler\n"); 7 | if((rootptr = getpwnam("root"))==NULL) 8 | err_sys("getpwnam(root) error"); 9 | alarm(1); 10 | } 11 | 12 | int main(void){ 13 | struct passwd *ptr; 14 | signal(SIGALRM,my_alarm); 15 | alarm(1); 16 | for(;;){ 17 | if((ptr = getpwnam("transcheung"))==NULL) 18 | err_sys("getpwnam error"); 19 | if(strcmp(ptr->pw_name,"transcheung")!=0) 20 | printf("return value corrupted!,pw_name=%s\n",ptr->pw_name); 21 | } 22 | } -------------------------------------------------------------------------------- /unixAdvance/signal_process/signal_process.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | static void handler(int s){ 6 | write(1,"!",1); 7 | } 8 | struct point{ 9 | int x,y; 10 | }p; 11 | 12 | int main(){ 13 | p.x = 1; 14 | char c = '\72'; 15 | int i = 0; 16 | signal(SIGINT,handler); 17 | for(i = 0;i<10;i++){ 18 | write(1,"*",1); 19 | sleep(1); 20 | } 21 | return 0; 22 | } -------------------------------------------------------------------------------- /unixAdvance/signal_process/signal_re.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/signal_process/signal_re.t -------------------------------------------------------------------------------- /unixAdvance/signal_process/signal_select.c: -------------------------------------------------------------------------------- 1 | #include "../include/apue.h" 2 | #include 3 | 4 | int main(void){ 5 | int i = 0; 6 | struct timeval timeout; 7 | 8 | for(i = 0;i<5;i++){ 9 | timeout.tv_sec = 1; 10 | timeout.tv_usec = 0; 11 | // 定时器只需要给定时间就可可以了 12 | if(select(0,0,0,0,&timeout)<0){ 13 | err_sys("select()"); 14 | exit(1); 15 | } 16 | printf("hehe\n");// 不写\n就会全缓冲 17 | // 写了\n就是行缓冲 18 | } 19 | return 0; 20 | } -------------------------------------------------------------------------------- /unixAdvance/signal_process/signal_select.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/signal_process/signal_select.t -------------------------------------------------------------------------------- /unixAdvance/signal_process/volatiletest.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | volatile int n = 1; 4 | // 当要求使用volatile声明变量时,系统总是重新从它坐在的内存读取数据,即使它 5 | // 前面的指令刚刚从该处读取过数据 6 | // 7 | 8 | int main(){ 9 | 10 | return 0; 11 | } -------------------------------------------------------------------------------- /unixAdvance/tcp_comm/client.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/tcp_comm/client.t -------------------------------------------------------------------------------- /unixAdvance/tcp_comm/proto.h: -------------------------------------------------------------------------------- 1 | #ifndef PROTO_H__ 2 | #define PROTO_H__ 3 | // 服务器端口号 4 | #define SERVERPORT "8086" 5 | #define FMT_STAMP "%lld\r\n" 6 | 7 | #endif // !1 -------------------------------------------------------------------------------- /unixAdvance/tcp_comm/server.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/tcp_comm/server.t -------------------------------------------------------------------------------- /unixAdvance/testinterp: -------------------------------------------------------------------------------- 1 | #!/Users/transcheung/Documents/RegularNotes/unixAdvance/wrio.out -------------------------------------------------------------------------------- /unixAdvance/thread_control/thread_control.c: -------------------------------------------------------------------------------- 1 | #include "../include/apue.h" 2 | #include 3 | #include 4 | 5 | static void *func(void *p){ 6 | puts("Thread is working.\n"); 7 | pthread_exit(NULL); 8 | } 9 | 10 | int main(){ 11 | pthread_t tid; 12 | int err,i; 13 | pthread_attr_t attr; 14 | 15 | pthread_attr_init(&attr); 16 | // 修改每个线程的栈大小 17 | pthread_attr_setstacksize(&attr,1024*1024); 18 | 19 | for(i = 0;;i++){ 20 | err = pthread_create(&tid,&attr,func,NULL); // attr就是修改后的线程属性 21 | if(err){ 22 | err_sys("pthread_create()"); 23 | break; 24 | } 25 | } 26 | printf("i = %d\n",i); 27 | pthread_attr_destroy(&attr); 28 | exit(0); 29 | } -------------------------------------------------------------------------------- /unixAdvance/thread_control/thread_control.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/thread_control/thread_control.t -------------------------------------------------------------------------------- /unixAdvance/thread_control/thread_signal.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/thread_control/thread_signal.t -------------------------------------------------------------------------------- /unixAdvance/thread_create/thread_apply.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/thread_create/thread_apply.t -------------------------------------------------------------------------------- /unixAdvance/thread_create/thread_apply.txt: -------------------------------------------------------------------------------- 1 | 60 2 | -------------------------------------------------------------------------------- /unixAdvance/thread_create/thread_create.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include 4 | #include "../include/apue.h" 5 | 6 | 7 | pthread_t ntid; 8 | 9 | void printids(const char *s){ 10 | pid_t pid; 11 | pthread_t tid; 12 | 13 | pid = getpid(); // 获得当前进程id 14 | tid = pthread_self(); 15 | printf("%s pid %lu tid %lu(0x%lx)\n",s,(unsigned long)pid, 16 | (unsigned long)tid,(unsigned long)tid); 17 | } 18 | 19 | void* thr_fn(void *arg){ 20 | printids("new thread:"); 21 | return((void *)0); 22 | } 23 | 24 | int main(void){ 25 | int err; 26 | err = pthread_create(&ntid,NULL,thr_fn,NULL); 27 | if(err!=0) 28 | err_exit(err,"can't create thread"); 29 | printids("main thread:"); 30 | sleep(1); 31 | exit(0); 32 | } -------------------------------------------------------------------------------- /unixAdvance/thread_create/thread_create.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/thread_create/thread_create.t -------------------------------------------------------------------------------- /unixAdvance/thread_create/thread_join.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/thread_create/thread_join.t -------------------------------------------------------------------------------- /unixAdvance/thread_create/thread_mutex.t: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/thread_create/thread_mutex.t -------------------------------------------------------------------------------- /unixAdvance/thread_token/mytbf.h: -------------------------------------------------------------------------------- 1 | #ifndef MYTBF_H_ 2 | #define MYTBF_H_ 3 | 4 | #define MYTBF_MAX 1024 5 | typedef void mytbf_t; 6 | 7 | mytbf_t *mytbf_init(int cps,int burst); 8 | 9 | int mytbf_fetchtoken(mytbf_t *,int); 10 | 11 | int mytbf_returntoken(mytbf_t *,int); 12 | 13 | void mytbf_destory(mytbf_t*); 14 | 15 | #endif -------------------------------------------------------------------------------- /unixAdvance/wait_waitpid/a.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/wait_waitpid/a.out -------------------------------------------------------------------------------- /unixAdvance/wait_waitpid/waitpid_wait.c: -------------------------------------------------------------------------------- 1 | #include "../include/apue.h" 2 | #include 3 | 4 | int main(void){ 5 | pid_t pid; 6 | if((pid=fork())<0){ 7 | err_sys("fork error"); 8 | }else if(pid==0){ // 子进程 9 | if((pid=fork())<0) // 子进程的子进程 10 | err_sys("fork error"); 11 | else if(pid>0) 12 | exit(0); 13 | //sleep(5); 14 | printf("second child,parent pid=%ld\n",(long)getppid()); 15 | exit(0); 16 | } 17 | if(waitpid(pid,NULL,0)!=pid) 18 | err_sys("waitpid error"); 19 | printf("i am parent pid=%ld\n",(long)getpid()); 20 | exit(0); 21 | } -------------------------------------------------------------------------------- /unixAdvance/wrio.c: -------------------------------------------------------------------------------- 1 | #include "./include/apue.h" 2 | 3 | int main(int argc,char *argv[]){ 4 | // int c; 5 | // while((c=getc(stdin))!=EOF) 6 | // if(putc(c,stdout)==EOF) 7 | // err_sys("output error"); 8 | // if(ferror(stdin)) 9 | // err_sys("input error"); 10 | // printf("hello world from process ID %ld\n",(long)getpid()); 11 | int n; 12 | char buf[4096]; 13 | printf("%s\n",argv[2]); 14 | while((n=read(STDIN_FILENO,buf,4096))>0) 15 | if(write(STDOUT_FILENO,buf,n)!=n) 16 | err_sys("write error"); 17 | 18 | if(n<0){ 19 | err_sys("read_error"); 20 | } 21 | exit(0); 22 | } 23 | 24 | -------------------------------------------------------------------------------- /unixAdvance/wrio.out: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mrchuanxu/RegularNotes/d35375ba3b37cf35c73f471f4ad992a24cfb0052/unixAdvance/wrio.out --------------------------------------------------------------------------------