├── .gitignore ├── .gitmodules ├── README.md ├── bash ├── basics │ ├── function │ │ ├── get_return_value.sh │ │ ├── parameter_expantion.sh │ │ └── shift.sh │ ├── getopts │ │ ├── arguments.sh │ │ └── flags.sh │ ├── import │ │ ├── Foo.sh │ │ ├── main.sh │ │ └── subdir │ │ │ └── SubFoo.sh │ ├── pipe │ │ └── reader.sh │ └── string │ │ ├── escape.sh │ │ ├── length.sh │ │ ├── replace.sh │ │ ├── split.sh │ │ └── string.sh └── cmds │ ├── awk │ ├── data │ └── print.sh │ ├── chmod │ └── recursive.sh │ ├── cut │ └── n_th_word.sh │ ├── du │ └── test.sh │ ├── expect │ ├── arguments.exp │ ├── login.exp │ ├── read.exp │ ├── scp.exp │ ├── scp.sh │ └── scpex.sh │ ├── find │ └── find.sh │ ├── grep │ └── grep.sh │ ├── sed │ └── print_nth_line.sh │ ├── tcpdump │ └── test.sh │ ├── wc │ ├── count_lines.sh │ └── count_words.sh │ └── xargs │ └── xargs.sh ├── cpp ├── README.md ├── basics │ ├── iostream │ │ ├── locale │ │ │ ├── facets.cpp │ │ │ └── locale.cpp │ │ └── manipulator │ │ │ └── format_save_restore.cpp │ └── makefile_build │ │ ├── easymake.mk │ │ └── makefile ├── gcc │ ├── dependency │ │ ├── Makefile │ │ ├── foo.cpp │ │ └── foo.h │ ├── find_macro_definition │ │ ├── Makefile │ │ ├── foo.cpp │ │ └── foo.h │ └── link_order │ │ ├── Foo.cpp │ │ ├── foo.a │ │ ├── main.cpp │ │ └── test.sh ├── linux_programming │ ├── backtrace │ │ ├── basic.cpp │ │ ├── demangle.cpp │ │ ├── get_caller.cpp │ │ └── set_terminate_back_trace.cpp │ ├── core_dumped.cpp │ ├── coroutine │ │ ├── README.md │ │ ├── README.zh_CN.md │ │ ├── coroutime.cpp │ │ └── coroutime_demonstration.cpp │ ├── dynamic_library │ │ └── undefined_symbol │ │ │ ├── add_1.c │ │ │ ├── add_2.c │ │ │ ├── add_3.c │ │ │ ├── add_4.c │ │ │ ├── clean.sh │ │ │ ├── some_external_function.c │ │ │ └── test.sh │ ├── easymake.mk │ ├── exception │ │ ├── abort.cpp │ │ └── set_terminate.cpp │ ├── glibc_check.cpp │ ├── make │ │ ├── include │ │ │ ├── Makefile │ │ │ ├── custom_makefile │ │ │ ├── deepdir │ │ │ │ └── msg.mk │ │ │ ├── subdir │ │ │ │ └── foo.mk │ │ │ └── test.sh │ │ └── variables │ │ │ ├── Makefile │ │ │ └── test.sh │ ├── makefile │ ├── rlib_networking │ │ ├── rlibns │ │ │ └── networking │ │ │ │ └── UdpClient.h │ │ └── test │ │ │ ├── Makefile │ │ │ └── client.cpp │ └── socket │ │ └── udp │ │ ├── Makefile │ │ ├── client │ │ ├── client.cpp │ │ ├── server │ │ └── server.cpp ├── makefile │ ├── define.mk │ ├── eval │ │ ├── eval.mk │ │ ├── hello.mk │ │ └── recursive_eval.mk │ ├── features.mk │ ├── include │ │ ├── Makefile │ │ └── sub │ │ │ └── test.mk │ ├── python │ │ └── test.mk │ ├── variables.mk │ └── wildcard │ │ └── wildcard.mk ├── rlib │ ├── .cproject │ ├── .project │ ├── .settings │ │ └── org.eclipse.cdt.codan.core.prefs │ ├── require.mk │ ├── samples │ │ └── singleton.cpp │ └── src │ │ ├── Makefile │ │ ├── easymake.mk │ │ └── rlibns │ │ ├── Singleton.h │ │ └── log │ │ ├── LOG_MACRO.h │ │ ├── LogAppender.h │ │ ├── LogCapture.cpp │ │ ├── LogCapture.h │ │ ├── LogDispatcher.cpp │ │ ├── LogDispatcher.h │ │ ├── LogLine.cpp │ │ └── LogLine.h └── rlib_lockfree │ ├── codeblocks │ ├── codeblocks.cbp │ ├── codeblocks.depend │ └── codeblocks.layout │ ├── inc │ └── rlib │ │ └── lockfree │ │ ├── CycleBufferMwsr.h │ │ ├── CycleBufferSwsr.h │ │ └── _LightWeightMutex.h │ └── test │ ├── CycleBufferSwsr.cpp │ ├── LightWeightMutexTest.cpp │ ├── PreSizedExtensibleBufferTest.cpp │ └── test.cpp ├── linux_env ├── README.md ├── ctags │ └── init.sh ├── golang │ ├── golang.org │ │ └── x │ │ │ ├── README │ │ │ ├── net-35ec611a141ee705590b9eb64d673f9e6dfeb1ac.zip │ │ │ └── tools-0b2f4dcf4db5371000beb66b65cde17aa91a28a2.zip │ ├── merge_tools.sh │ └── roxma_golang_workspace_init.sh ├── merge_tools.sh ├── networking │ ├── tcp_send.py │ └── udp_send.py ├── nix-env-setup.sh ├── proxychains │ └── init.sh ├── string │ ├── base64_decode.sh │ ├── base64_encode.sh │ ├── hex_decode.py │ ├── url_decode.py │ └── url_encode.py ├── tmux │ ├── init.sh │ ├── merge_tools.sh │ ├── tmux-powerline.conf │ └── tmux.conf ├── utils │ ├── make_print_include_path_for_ctags.sh │ ├── scpex.sh │ ├── ssh_command.exp │ └── utils.sh ├── vim │ ├── README.md │ ├── init.sh │ ├── merge_tools.sh │ └── neovim.sh └── weechat │ ├── init.sh │ ├── lua │ └── autoload │ │ └── roxma_init.lua │ └── merge_tools.sh ├── mysql ├── admin │ └── size.sql ├── insert │ ├── duplicate_key.sql │ └── load_data_infile.sql ├── performance │ └── datetime_vs_bigint.sh └── select │ ├── found_rows.sql │ └── union.sql ├── php_learn ├── .buildpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.core.runtime.prefs │ ├── org.eclipse.php.core.prefs │ └── org.eclipse.wst.common.project.facet.core.xml ├── apps │ ├── PhpLearnDbConfig.php │ ├── appointment │ │ ├── CgiCommon.php │ │ ├── Dao.php │ │ ├── PHPMailerSendFromQqConfig.php │ │ ├── appointment.html │ │ ├── appointment_validate.html │ │ ├── cgi_appointment_request.php │ │ ├── cgi_appointment_validate.php │ │ ├── cgi_create_issue.php │ │ ├── cgi_create_sub_issue.php │ │ ├── cgi_get_issue.php │ │ ├── cgi_get_issue_list.php │ │ ├── database.sql │ │ ├── issues.html │ │ ├── readme │ │ └── send_validate_mail.php │ ├── common │ │ ├── Cgi.php │ │ ├── CgiRequireLogin.php │ │ ├── Dao.php │ │ ├── GetLogger.php │ │ ├── Login.php │ │ ├── PHPMailerSendFromQqConfig.php │ │ ├── README.md │ │ ├── Singleton.php │ │ ├── database.sql │ │ ├── login_logout.php │ │ ├── login_request.php │ │ ├── login_require.js │ │ ├── login_validate.html │ │ ├── login_validate.php │ │ └── session_start.php │ ├── libs_js │ │ ├── artTemplate │ │ │ ├── template-syntax.js │ │ │ └── template.js │ │ └── jquery-2.1.1.js │ ├── libs_jscss │ │ ├── bootstrap-3.2.0-dist │ │ │ ├── css │ │ │ │ ├── bootstrap-theme.css │ │ │ │ ├── bootstrap-theme.css.map │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ └── bootstrap.min.css │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ └── glyphicons-halflings-regular.woff │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ └── bootstrap.min.js │ │ └── select2-3.4.8 │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bower.json │ │ │ ├── component.json │ │ │ ├── composer.json │ │ │ ├── package.json │ │ │ ├── release.sh │ │ │ ├── select2-bootstrap.css │ │ │ ├── select2-spinner.gif │ │ │ ├── select2.css │ │ │ ├── select2.jquery.json │ │ │ ├── select2.js │ │ │ ├── select2.min.js │ │ │ ├── select2.png │ │ │ ├── select2_locale_en.js.template │ │ │ ├── select2_locale_zh-CN.js │ │ │ └── select2x2.png │ ├── series_update_reminder │ │ ├── Dao.php │ │ ├── PHPMailerSendFromQqConfig.php │ │ ├── README.md │ │ ├── cgi_add_rule.php │ │ ├── cgi_delete_rule.php │ │ ├── cgi_query_rules.php │ │ ├── cgi_rules_query.php │ │ ├── check.php │ │ ├── config.html │ │ ├── database.sql │ │ ├── doc_load.php │ │ ├── make_tags.sh │ │ ├── tags │ │ └── test.php │ └── test │ │ ├── log.php │ │ └── tpl.html ├── libs │ ├── PHPExcel_1.7.9 │ │ ├── PHPExcel.php │ │ └── PHPExcel │ │ │ ├── Autoloader.php │ │ │ ├── CachedObjectStorage │ │ │ ├── APC.php │ │ │ ├── CacheBase.php │ │ │ ├── DiscISAM.php │ │ │ ├── ICache.php │ │ │ ├── Igbinary.php │ │ │ ├── Memcache.php │ │ │ ├── Memory.php │ │ │ ├── MemoryGZip.php │ │ │ ├── MemorySerialized.php │ │ │ ├── PHPTemp.php │ │ │ ├── SQLite.php │ │ │ ├── SQLite3.php │ │ │ └── Wincache.php │ │ │ ├── CachedObjectStorageFactory.php │ │ │ ├── CalcEngine │ │ │ ├── CyclicReferenceStack.php │ │ │ └── Logger.php │ │ │ ├── Calculation.php │ │ │ ├── Calculation │ │ │ ├── Database.php │ │ │ ├── DateTime.php │ │ │ ├── Engineering.php │ │ │ ├── Exception.php │ │ │ ├── ExceptionHandler.php │ │ │ ├── Financial.php │ │ │ ├── FormulaParser.php │ │ │ ├── FormulaToken.php │ │ │ ├── Function.php │ │ │ ├── Functions.php │ │ │ ├── Logical.php │ │ │ ├── LookupRef.php │ │ │ ├── MathTrig.php │ │ │ ├── Statistical.php │ │ │ ├── TextData.php │ │ │ ├── Token │ │ │ │ └── Stack.php │ │ │ └── functionlist.txt │ │ │ ├── Cell.php │ │ │ ├── Cell │ │ │ ├── AdvancedValueBinder.php │ │ │ ├── DataType.php │ │ │ ├── DataValidation.php │ │ │ ├── DefaultValueBinder.php │ │ │ ├── Hyperlink.php │ │ │ └── IValueBinder.php │ │ │ ├── Chart.php │ │ │ ├── Chart │ │ │ ├── DataSeries.php │ │ │ ├── DataSeriesValues.php │ │ │ ├── Exception.php │ │ │ ├── Layout.php │ │ │ ├── Legend.php │ │ │ ├── PlotArea.php │ │ │ ├── Renderer │ │ │ │ ├── PHP Charting Libraries.txt │ │ │ │ └── jpgraph.php │ │ │ └── Title.php │ │ │ ├── Comment.php │ │ │ ├── DocumentProperties.php │ │ │ ├── DocumentSecurity.php │ │ │ ├── Exception.php │ │ │ ├── HashTable.php │ │ │ ├── IComparable.php │ │ │ ├── IOFactory.php │ │ │ ├── NamedRange.php │ │ │ ├── Reader │ │ │ ├── Abstract.php │ │ │ ├── CSV.php │ │ │ ├── DefaultReadFilter.php │ │ │ ├── Excel2003XML.php │ │ │ ├── Excel2007.php │ │ │ ├── Excel2007 │ │ │ │ ├── Chart.php │ │ │ │ └── Theme.php │ │ │ ├── Excel5.php │ │ │ ├── Excel5 │ │ │ │ └── Escher.php │ │ │ ├── Exception.php │ │ │ ├── Gnumeric.php │ │ │ ├── HTML.php │ │ │ ├── IReadFilter.php │ │ │ ├── IReader.php │ │ │ ├── OOCalc.php │ │ │ └── SYLK.php │ │ │ ├── ReferenceHelper.php │ │ │ ├── RichText.php │ │ │ ├── RichText │ │ │ ├── ITextElement.php │ │ │ ├── Run.php │ │ │ └── TextElement.php │ │ │ ├── Settings.php │ │ │ ├── Shared │ │ │ ├── CodePage.php │ │ │ ├── Date.php │ │ │ ├── Drawing.php │ │ │ ├── Escher.php │ │ │ ├── Escher │ │ │ │ ├── DgContainer.php │ │ │ │ ├── DgContainer │ │ │ │ │ ├── SpgrContainer.php │ │ │ │ │ └── SpgrContainer │ │ │ │ │ │ └── SpContainer.php │ │ │ │ ├── DggContainer.php │ │ │ │ └── DggContainer │ │ │ │ │ ├── BstoreContainer.php │ │ │ │ │ └── BstoreContainer │ │ │ │ │ ├── BSE.php │ │ │ │ │ └── BSE │ │ │ │ │ └── Blip.php │ │ │ ├── Excel5.php │ │ │ ├── File.php │ │ │ ├── Font.php │ │ │ ├── JAMA │ │ │ │ ├── CHANGELOG.TXT │ │ │ │ ├── CholeskyDecomposition.php │ │ │ │ ├── EigenvalueDecomposition.php │ │ │ │ ├── LUDecomposition.php │ │ │ │ ├── Matrix.php │ │ │ │ ├── QRDecomposition.php │ │ │ │ ├── SingularValueDecomposition.php │ │ │ │ └── utils │ │ │ │ │ ├── Error.php │ │ │ │ │ └── Maths.php │ │ │ ├── OLE.php │ │ │ ├── OLE │ │ │ │ ├── ChainedBlockStream.php │ │ │ │ ├── PPS.php │ │ │ │ └── PPS │ │ │ │ │ ├── File.php │ │ │ │ │ └── Root.php │ │ │ ├── OLERead.php │ │ │ ├── PCLZip │ │ │ │ ├── gnu-lgpl.txt │ │ │ │ ├── pclzip.lib.php │ │ │ │ └── readme.txt │ │ │ ├── PasswordHasher.php │ │ │ ├── String.php │ │ │ ├── TimeZone.php │ │ │ ├── XMLWriter.php │ │ │ ├── ZipArchive.php │ │ │ ├── ZipStreamWrapper.php │ │ │ └── trend │ │ │ │ ├── bestFitClass.php │ │ │ │ ├── exponentialBestFitClass.php │ │ │ │ ├── linearBestFitClass.php │ │ │ │ ├── logarithmicBestFitClass.php │ │ │ │ ├── polynomialBestFitClass.php │ │ │ │ ├── powerBestFitClass.php │ │ │ │ └── trendClass.php │ │ │ ├── Style.php │ │ │ ├── Style │ │ │ ├── Alignment.php │ │ │ ├── Border.php │ │ │ ├── Borders.php │ │ │ ├── Color.php │ │ │ ├── Conditional.php │ │ │ ├── Fill.php │ │ │ ├── Font.php │ │ │ ├── NumberFormat.php │ │ │ ├── Protection.php │ │ │ └── Supervisor.php │ │ │ ├── Worksheet.php │ │ │ ├── Worksheet │ │ │ ├── AutoFilter.php │ │ │ ├── AutoFilter │ │ │ │ ├── Column.php │ │ │ │ └── Column │ │ │ │ │ └── Rule.php │ │ │ ├── BaseDrawing.php │ │ │ ├── CellIterator.php │ │ │ ├── ColumnDimension.php │ │ │ ├── Drawing.php │ │ │ ├── Drawing │ │ │ │ └── Shadow.php │ │ │ ├── HeaderFooter.php │ │ │ ├── HeaderFooterDrawing.php │ │ │ ├── MemoryDrawing.php │ │ │ ├── PageMargins.php │ │ │ ├── PageSetup.php │ │ │ ├── Protection.php │ │ │ ├── Row.php │ │ │ ├── RowDimension.php │ │ │ ├── RowIterator.php │ │ │ └── SheetView.php │ │ │ ├── WorksheetIterator.php │ │ │ ├── Writer │ │ │ ├── Abstract.php │ │ │ ├── CSV.php │ │ │ ├── Excel2007.php │ │ │ ├── Excel2007 │ │ │ │ ├── Chart.php │ │ │ │ ├── Comments.php │ │ │ │ ├── ContentTypes.php │ │ │ │ ├── DocProps.php │ │ │ │ ├── Drawing.php │ │ │ │ ├── Rels.php │ │ │ │ ├── StringTable.php │ │ │ │ ├── Style.php │ │ │ │ ├── Theme.php │ │ │ │ ├── Workbook.php │ │ │ │ ├── Worksheet.php │ │ │ │ └── WriterPart.php │ │ │ ├── Excel5.php │ │ │ ├── Excel5 │ │ │ │ ├── BIFFwriter.php │ │ │ │ ├── Escher.php │ │ │ │ ├── Font.php │ │ │ │ ├── Parser.php │ │ │ │ ├── Workbook.php │ │ │ │ ├── Worksheet.php │ │ │ │ └── Xf.php │ │ │ ├── Exception.php │ │ │ ├── HTML.php │ │ │ ├── IWriter.php │ │ │ ├── PDF.php │ │ │ └── PDF │ │ │ │ ├── Core.php │ │ │ │ ├── DomPDF.php │ │ │ │ ├── mPDF.php │ │ │ │ └── tcPDF.php │ │ │ └── locale │ │ │ ├── cs │ │ │ ├── config │ │ │ └── functions │ │ │ ├── da │ │ │ ├── config │ │ │ └── functions │ │ │ ├── de │ │ │ ├── config │ │ │ └── functions │ │ │ ├── en │ │ │ └── uk │ │ │ │ └── config │ │ │ ├── es │ │ │ ├── config │ │ │ └── functions │ │ │ ├── fi │ │ │ ├── config │ │ │ └── functions │ │ │ ├── fr │ │ │ ├── config │ │ │ └── functions │ │ │ ├── hu │ │ │ ├── config │ │ │ └── functions │ │ │ ├── it │ │ │ ├── config │ │ │ └── functions │ │ │ ├── nl │ │ │ ├── config │ │ │ └── functions │ │ │ ├── no │ │ │ ├── config │ │ │ └── functions │ │ │ ├── pl │ │ │ ├── config │ │ │ └── functions │ │ │ ├── pt │ │ │ ├── br │ │ │ │ ├── config │ │ │ │ └── functions │ │ │ ├── config │ │ │ └── functions │ │ │ ├── ru │ │ │ ├── config │ │ │ └── functions │ │ │ ├── sv │ │ │ ├── config │ │ │ └── functions │ │ │ └── tr │ │ │ ├── config │ │ │ └── functions │ ├── PHPMailer-master │ │ ├── .gitignore │ │ ├── .scrutinizer.yml │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── PHPMailerAutoload.php │ │ ├── README.md │ │ ├── changelog.md │ │ ├── class.phpmailer.php │ │ ├── class.pop3.php │ │ ├── class.smtp.php │ │ ├── composer.json │ │ ├── docs │ │ │ ├── Callback_function_notes.txt │ │ │ ├── DomainKeys_notes.txt │ │ │ ├── Note_for_SMTP_debugging.txt │ │ │ ├── extending.html │ │ │ ├── faq.html │ │ │ ├── generatedocs.sh │ │ │ └── pop3_article.txt │ │ ├── examples │ │ │ ├── LGPLv3.txt │ │ │ ├── code_generator.phps │ │ │ ├── contents.html │ │ │ ├── exceptions.phps │ │ │ ├── gmail.phps │ │ │ ├── images │ │ │ │ ├── phpmailer.png │ │ │ │ └── phpmailer_mini.png │ │ │ ├── index.html │ │ │ ├── mail.phps │ │ │ ├── mailing_list.phps │ │ │ ├── pop_before_smtp.phps │ │ │ ├── scripts │ │ │ │ ├── XRegExp.js │ │ │ │ ├── shAutoloader.js │ │ │ │ ├── shBrushPhp.js │ │ │ │ ├── shCore.js │ │ │ │ └── shLegacy.js │ │ │ ├── sendmail.phps │ │ │ ├── smtp.phps │ │ │ ├── smtp_no_auth.phps │ │ │ └── styles │ │ │ │ ├── shCore.css │ │ │ │ ├── shCoreDefault.css │ │ │ │ ├── shCoreDjango.css │ │ │ │ ├── shCoreEclipse.css │ │ │ │ ├── shCoreEmacs.css │ │ │ │ ├── shCoreFadeToGrey.css │ │ │ │ ├── shCoreMDUltra.css │ │ │ │ ├── shCoreMidnight.css │ │ │ │ ├── shCoreRDark.css │ │ │ │ ├── shThemeAppleScript.css │ │ │ │ ├── shThemeDefault.css │ │ │ │ ├── shThemeDjango.css │ │ │ │ ├── shThemeEclipse.css │ │ │ │ ├── shThemeEmacs.css │ │ │ │ ├── shThemeFadeToGrey.css │ │ │ │ ├── shThemeMDUltra.css │ │ │ │ ├── shThemeMidnight.css │ │ │ │ ├── shThemeRDark.css │ │ │ │ ├── shThemeVisualStudio.css │ │ │ │ └── wrapping.png │ │ ├── extras │ │ │ ├── EasyPeasyICS.php │ │ │ ├── class.html2text.php │ │ │ ├── htmlfilter.php │ │ │ └── ntlm_sasl_client.php │ │ ├── language │ │ │ ├── phpmailer.lang-ar.php │ │ │ ├── phpmailer.lang-be.php │ │ │ ├── phpmailer.lang-br.php │ │ │ ├── phpmailer.lang-ca.php │ │ │ ├── phpmailer.lang-ch.php │ │ │ ├── phpmailer.lang-cz.php │ │ │ ├── phpmailer.lang-de.php │ │ │ ├── phpmailer.lang-dk.php │ │ │ ├── phpmailer.lang-el.php │ │ │ ├── phpmailer.lang-eo.php │ │ │ ├── phpmailer.lang-es.php │ │ │ ├── phpmailer.lang-et.php │ │ │ ├── phpmailer.lang-fa.php │ │ │ ├── phpmailer.lang-fi.php │ │ │ ├── phpmailer.lang-fo.php │ │ │ ├── phpmailer.lang-fr.php │ │ │ ├── phpmailer.lang-gl.php │ │ │ ├── phpmailer.lang-he.php │ │ │ ├── phpmailer.lang-hr.php │ │ │ ├── phpmailer.lang-hu.php │ │ │ ├── phpmailer.lang-it.php │ │ │ ├── phpmailer.lang-ja.php │ │ │ ├── phpmailer.lang-ka.php │ │ │ ├── phpmailer.lang-lt.php │ │ │ ├── phpmailer.lang-lv.php │ │ │ ├── phpmailer.lang-nl.php │ │ │ ├── phpmailer.lang-no.php │ │ │ ├── phpmailer.lang-pl.php │ │ │ ├── phpmailer.lang-pt.php │ │ │ ├── phpmailer.lang-ro.php │ │ │ ├── phpmailer.lang-ru.php │ │ │ ├── phpmailer.lang-se.php │ │ │ ├── phpmailer.lang-sk.php │ │ │ ├── phpmailer.lang-sr.php │ │ │ ├── phpmailer.lang-tr.php │ │ │ ├── phpmailer.lang-uk.php │ │ │ ├── phpmailer.lang-vi.php │ │ │ ├── phpmailer.lang-zh.php │ │ │ └── phpmailer.lang-zh_cn.php │ │ ├── test │ │ │ ├── bootstrap.php │ │ │ ├── fakepopserver.sh │ │ │ ├── fakesendmail.sh │ │ │ ├── phpmailerLangTest.php │ │ │ ├── phpmailerTest.php │ │ │ ├── runfakepopserver.sh │ │ │ ├── test_callback.php │ │ │ └── testbootstrap-dist.php │ │ └── travis.phpunit.xml.dist │ ├── log4php-2.3.0 │ │ ├── Logger.php │ │ ├── LoggerAppender.php │ │ ├── LoggerAppenderPool.php │ │ ├── LoggerAutoloader.php │ │ ├── LoggerConfigurable.php │ │ ├── LoggerConfigurator.php │ │ ├── LoggerException.php │ │ ├── LoggerFilter.php │ │ ├── LoggerHierarchy.php │ │ ├── LoggerLayout.php │ │ ├── LoggerLevel.php │ │ ├── LoggerLocationInfo.php │ │ ├── LoggerLoggingEvent.php │ │ ├── LoggerMDC.php │ │ ├── LoggerNDC.php │ │ ├── LoggerReflectionUtils.php │ │ ├── LoggerRoot.php │ │ ├── LoggerThrowableInformation.php │ │ ├── appenders │ │ │ ├── LoggerAppenderConsole.php │ │ │ ├── LoggerAppenderDailyFile.php │ │ │ ├── LoggerAppenderEcho.php │ │ │ ├── LoggerAppenderFile.php │ │ │ ├── LoggerAppenderFirePHP.php │ │ │ ├── LoggerAppenderMail.php │ │ │ ├── LoggerAppenderMailEvent.php │ │ │ ├── LoggerAppenderMongoDB.php │ │ │ ├── LoggerAppenderNull.php │ │ │ ├── LoggerAppenderPDO.php │ │ │ ├── LoggerAppenderPhp.php │ │ │ ├── LoggerAppenderRollingFile.php │ │ │ ├── LoggerAppenderSocket.php │ │ │ └── LoggerAppenderSyslog.php │ │ ├── configurators │ │ │ ├── LoggerConfigurationAdapter.php │ │ │ ├── LoggerConfigurationAdapterINI.php │ │ │ ├── LoggerConfigurationAdapterPHP.php │ │ │ ├── LoggerConfigurationAdapterXML.php │ │ │ └── LoggerConfiguratorDefault.php │ │ ├── filters │ │ │ ├── LoggerFilterDenyAll.php │ │ │ ├── LoggerFilterLevelMatch.php │ │ │ ├── LoggerFilterLevelRange.php │ │ │ └── LoggerFilterStringMatch.php │ │ ├── helpers │ │ │ ├── LoggerFormattingInfo.php │ │ │ ├── LoggerOptionConverter.php │ │ │ ├── LoggerPatternParser.php │ │ │ └── LoggerUtils.php │ │ ├── layouts │ │ │ ├── LoggerLayoutHtml.php │ │ │ ├── LoggerLayoutPattern.php │ │ │ ├── LoggerLayoutSerialized.php │ │ │ ├── LoggerLayoutSimple.php │ │ │ ├── LoggerLayoutTTCC.php │ │ │ └── LoggerLayoutXml.php │ │ ├── pattern │ │ │ ├── LoggerPatternConverter.php │ │ │ ├── LoggerPatternConverterClass.php │ │ │ ├── LoggerPatternConverterCookie.php │ │ │ ├── LoggerPatternConverterDate.php │ │ │ ├── LoggerPatternConverterEnvironment.php │ │ │ ├── LoggerPatternConverterFile.php │ │ │ ├── LoggerPatternConverterLevel.php │ │ │ ├── LoggerPatternConverterLine.php │ │ │ ├── LoggerPatternConverterLiteral.php │ │ │ ├── LoggerPatternConverterLocation.php │ │ │ ├── LoggerPatternConverterLogger.php │ │ │ ├── LoggerPatternConverterMDC.php │ │ │ ├── LoggerPatternConverterMessage.php │ │ │ ├── LoggerPatternConverterMethod.php │ │ │ ├── LoggerPatternConverterNDC.php │ │ │ ├── LoggerPatternConverterNewLine.php │ │ │ ├── LoggerPatternConverterProcess.php │ │ │ ├── LoggerPatternConverterRelative.php │ │ │ ├── LoggerPatternConverterRequest.php │ │ │ ├── LoggerPatternConverterServer.php │ │ │ ├── LoggerPatternConverterSession.php │ │ │ ├── LoggerPatternConverterSessionID.php │ │ │ ├── LoggerPatternConverterSuperglobal.php │ │ │ └── LoggerPatternConverterThrowable.php │ │ ├── renderers │ │ │ ├── LoggerRenderer.php │ │ │ ├── LoggerRendererDefault.php │ │ │ ├── LoggerRendererException.php │ │ │ └── LoggerRendererMap.php │ │ └── xml │ │ │ └── log4php.dtd │ └── rlib │ │ ├── Cgi.php │ │ ├── Db.php │ │ ├── DbMysql.php │ │ ├── DbMysqli.php │ │ ├── ExportXls.php │ │ ├── ImportXls.php │ │ ├── MysqlExportXls.php │ │ ├── NetUtils.php │ │ └── RenderPhpToString.php └── test │ ├── helloworld.php │ ├── phpexceltest.php │ ├── phpinfo.php │ ├── rlib │ ├── Db.php │ ├── ExportXls.php │ ├── MysqlExportXls.php │ ├── NetUtilsHttpLoad.php │ ├── Render.php │ └── Render.tpl.php │ └── script_name.php ├── python ├── basics │ ├── arguments.py │ ├── networking │ │ ├── tcp_client.py │ │ ├── tcp_server.py │ │ ├── udp_client.py │ │ └── udp_server.py │ ├── print.py │ └── threading │ │ └── hello.py ├── libs_examples │ └── mysql │ │ └── test.py ├── python_libs │ ├── MySQL-python-1.2.5.zip │ ├── get-pip.py │ ├── install.sh │ └── xlwt-0.7.5.tar.gz └── tools │ └── mysql_to_csv.py └── tools └── mysql2csv ├── Makefile ├── README.md ├── README.zh_CN.md ├── csv2mysql.cpp ├── demo.sh ├── input.csv └── mysql2csv.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | linux_env/output.sh 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vim-plug"] 2 | path = linux_env/vim/plugins/vim-plug 3 | url = git@github.com:junegunn/vim-plug.git 4 | [submodule "linux_env/vim/plugins/vim-tweak"] 5 | path = linux_env/vim/plugins/vim-tweak 6 | url = git@github.com:roxma/vim-tweak.git 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | This project contains code for study purpose. Here is a list of sub-directories worth to notice: 4 | 5 | - [tools/mysql2csv](tools/mysql2csv) Tools for importing or exporting MySQL data using .csv format. 6 | - [cpp/linux_programming/coroutine](cpp/linux_programming/coroutine) A cplusplus implementation of coroutine, without asm code. 7 | - [linux_env](linux_env) Customizing linux developing environment. 8 | -------------------------------------------------------------------------------- /bash/basics/function/get_return_value.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | GetMessage(){ 4 | echo "Hello world" 5 | } 6 | 7 | echo $(GetMessage) 8 | 9 | -------------------------------------------------------------------------------- /bash/basics/function/parameter_expantion.sh: -------------------------------------------------------------------------------- 1 | 2 | function ShowParameters() 3 | { 4 | echo "parameter count:$#" 5 | local index=1 6 | while [[ "$#" != 0 ]] 7 | do 8 | echo "parameter $index: [$1]" 9 | index=$(($index+1)) 10 | shift 11 | done 12 | } 13 | 14 | echo "1" 15 | ShowParameters one two three 16 | 17 | echo "2" 18 | ShowParameters "one two three" 19 | 20 | echo "3" 21 | ShowParameters * 22 | 23 | echo "4" 24 | ShowParameters "*" 25 | 26 | echo "5" 27 | ShowParameters $(echo "one space[ ]") 28 | 29 | echo "6" 30 | ShowParameters "$(echo "one space[ ]")" 31 | 32 | 33 | echo "7" 34 | param=$(echo $'more spaces\n\\n[ ]') 35 | ShowParameters "$param" 36 | ShowParameters $param 37 | 38 | 39 | echo "8" 40 | param=`echo $'more spaces\n\\n${tmp}[ ]'` 41 | ShowParameters "$param" 42 | ShowParameters $param 43 | 44 | -------------------------------------------------------------------------------- /bash/basics/function/shift.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "parameter 1:$1" 4 | echo "parameter 2:$2" 5 | echo "parameter 2:$3" 6 | 7 | shift && echo "shift." 8 | 9 | echo "parameter 1:$1" 10 | echo "parameter 2:$2" 11 | echo "parameter 2:$3" 12 | -------------------------------------------------------------------------------- /bash/basics/getopts/arguments.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # for example: 4 | # ./flags.sh -a valuea -b valueb 5 | # ./flags.sh -b valueb 6 | 7 | while getopts ":a:b:" opt; do 8 | case $opt in 9 | a) 10 | echo "option a is triggered, argument: $OPTARG" 11 | ;; 12 | b) 13 | echo "option b is triggered, argument: $OPTARG" 14 | ;; 15 | \?) 16 | echo "Invalid flag: -$OPTARG" >&2 17 | ;; 18 | esac 19 | done 20 | 21 | 22 | -------------------------------------------------------------------------------- /bash/basics/getopts/flags.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # for example: ./flags.sh -abc 4 | 5 | 6 | while getopts ":ab" opt; do 7 | case $opt in 8 | a) 9 | echo "flag a is triggered" 10 | ;; 11 | b) 12 | echo "flag b is triggered" 13 | ;; 14 | \?) 15 | echo "Invalid flag: -$OPTARG" >&2 16 | ;; 17 | esac 18 | done 19 | 20 | 21 | -------------------------------------------------------------------------------- /bash/basics/import/Foo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | Foo(){ 4 | echo "Foo" 5 | echo "Hello world" 6 | } 7 | 8 | 9 | -------------------------------------------------------------------------------- /bash/basics/import/main.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | source ./Foo.sh 4 | source ./subdir/SubFoo.sh 5 | 6 | Foo 7 | 8 | SubFoo 9 | 10 | -------------------------------------------------------------------------------- /bash/basics/import/subdir/SubFoo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | SubFoo(){ 4 | print "pwd: " 5 | pwd 6 | echo "\$0: $0" 7 | echo "\$_: $_" 8 | echo "\$BASH_SOURCE: $BASH_SOURCE" 9 | } 10 | -------------------------------------------------------------------------------- /bash/basics/pipe/reader.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pipe=/tmp/testpipe 4 | 5 | trap "rm -f $pipe" EXIT 6 | 7 | if [[ ! -p $pipe ]]; then 8 | mkfifo $pipe 9 | fi 10 | 11 | while true 12 | do 13 | cat $pipe 14 | # if read line <$pipe; then 15 | # if [[ "$line" == 'quit' ]]; then 16 | # break 17 | # fi 18 | # echo $line 19 | # fi 20 | done 21 | 22 | echo "Reader exiting" 23 | -------------------------------------------------------------------------------- /bash/basics/string/escape.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # set -x 4 | 5 | 6 | name="roxma" 7 | 8 | 9 | 10 | echo "1. Hello\nMy name is $name" 11 | 12 | echo '2. Hello\nMy name is $name' 13 | 14 | # Words of the form $'string' are treated as ANSI-C Quoting 15 | echo $'3. Hello\nMy name is $name' 16 | 17 | 18 | 19 | # For double quoting, the backslash retains its special meaning only when followed by one of the following characters: ‘$’, ‘`’, ‘"’, ‘\’, or newline. 20 | echo "4. Hello My \$name is \"$name\" This is a backlash: \\" 21 | 22 | # the "'" character, for example, cannot be escapes 23 | echo "5. Hello My name is \'$name\'" 24 | 25 | echo "6. Hello 26 | Nice to meet you\ 27 | What's your name?" 28 | 29 | 30 | 31 | #A non-quoted backslash ‘\’ is the Bash escape character. It preserves the literal value of the next character that follows, with the exception of newline. If a \newline pair appears, and the backslash itself is not quoted, the \newline is treated as a line continuation (that is, it is removed from the input stream and effectively ignored). 32 | msg=7.\ Hello\ 33 | My\ name\ is\ $name 34 | echo "$msg" 35 | 36 | # ill formed 37 | echo "8. an ill formed example:" 38 | msg=Hello world 39 | 40 | echo '9. msg=hello cmd' 41 | msg=hello bash -c 'echo $msg' 42 | 43 | -------------------------------------------------------------------------------- /bash/basics/string/length.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | msg="Hello world" 4 | echo "msg=$msg" 5 | echo "len=${#msg}" 6 | -------------------------------------------------------------------------------- /bash/basics/string/replace.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "1. Postfix remved:" 4 | message="Hello world" 5 | echo "${message/%world/}" 6 | 7 | echo "2. Prefix remved:" 8 | message="Hello world" 9 | echo "${message/#Hello/}" 10 | 11 | echo "3. replace:" 12 | message="Hello, my name is my_name, nice to meet you" 13 | echo "${message/my_name/roxma}" 14 | 15 | -------------------------------------------------------------------------------- /bash/basics/string/split.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | str="a;b;c" 4 | 5 | # printf "%s\n" "$str" | awk -F";" '{ 6 | # for(i=0; i> dir/file 5 | echo my name is roxma >>dir>file 6 | mkdir dir/subdir 7 | echo hello >>dir/subdir/fie2 8 | 9 | set -x 10 | 11 | grep hello * 12 | 13 | grep hello dir/file 14 | 15 | grep -r hello ./ 16 | 17 | 18 | set +x 19 | echo "begin clean ..." 20 | rm -r dir 21 | 22 | -------------------------------------------------------------------------------- /bash/cmds/sed/print_nth_line.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | echo 1 haha >> tmp 4 | echo 2 hehe >> tmp 5 | echo 3 heihei >> tmp 6 | 7 | sed -n 2p tmp 8 | 9 | rm tmp 10 | 11 | 12 | -------------------------------------------------------------------------------- /bash/cmds/tcpdump/test.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | # for ((; 1 < 2; )); do sleep 2 ; udpsend -h localhost -p 1234 -d 123 ; done 4 | 5 | 6 | # -X 7 | # show content in hex format and ASCII format 8 | # -i any 9 | # monitoring any interface 10 | # port 1234 11 | # both udp port 1234 and tcp port 1234 12 | # -nn 13 | # don't resolve host name and port name 14 | tcpdump -X -nn -i any port 1234 15 | 16 | -------------------------------------------------------------------------------- /bash/cmds/wc/count_lines.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Hello world 4 | Hello world" | wc -l 5 | 6 | -------------------------------------------------------------------------------- /bash/cmds/wc/count_words.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Hello world" | wc -w 4 | 5 | -------------------------------------------------------------------------------- /bash/cmds/xargs/xargs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -x 4 | echo 1 2 3 4 | xargs -I numbers echo "[numbers]" 5 | -------------------------------------------------------------------------------- /cpp/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## rlib 3 | 4 | Require POSIX or C++ 11 compiler 5 | 6 | -------------------------------------------------------------------------------- /cpp/basics/iostream/locale/locale.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main() 5 | { 6 | std::wcout << "current global locale setting is " << std::locale().name().c_str() << '\n'; 7 | std::wcout << "User-preferred locale setting is " << std::locale("").name().c_str() << '\n'; 8 | // on startup, the global locale is the "C" locale 9 | std::wcout << 1000.01 << '\n'; 10 | // replace the C++ global locale as well as the C locale with the user-preferred locale 11 | std::locale::global(std::locale("")); 12 | // use the new global locale for future wide character output 13 | std::wcout.imbue(std::locale()); 14 | // output the same number again 15 | std::wcout << 1000.01 << '\n'; 16 | } 17 | -------------------------------------------------------------------------------- /cpp/basics/iostream/manipulator/format_save_restore.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | using namespace std; 5 | 6 | int main() 7 | { 8 | 9 | std::ios state(NULL); 10 | state.copyfmt(std::cout); 11 | 12 | cout << std::hex; 13 | cout << "Hex of 42: " << 42 << "\n"; 14 | cout << "Hex of 84: " << 82 << "\n"; 15 | 16 | std::cout.copyfmt(state); 17 | 18 | cout << "This should not be in hex: " << 42 << "\n"; 19 | } 20 | 21 | /* 22 | * output: 23 | * Hex of 42: 2a 24 | * Hex of 84: 52 25 | * This should not be in hex: 42 26 | */ 27 | -------------------------------------------------------------------------------- /cpp/basics/makefile_build/makefile: -------------------------------------------------------------------------------- 1 | VPATH+=.. 2 | 3 | COMPILE_FLAGS=-I../../rlib/inc/ 4 | LINK_FLAGS=-lpthread 5 | 6 | BUILD_ROOT=../bin 7 | include easymake.mk 8 | -------------------------------------------------------------------------------- /cpp/gcc/dependency/foo.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "foo.h" 4 | 5 | int main(){ 6 | std::cout< 2 | 3 | #include "foo.h" 4 | 5 | int main(){ 6 | std::cout< 2 | 3 | void Foo(){ 4 | std::cout<<"Foo"< 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | int outputFd = 0; 12 | 13 | /* Obtain a backtrace and print it to stdout. */ 14 | void print_trace (void) 15 | { 16 | void *array[10]; 17 | size_t size; 18 | char **strings; 19 | size_t i; 20 | 21 | size = backtrace (array, 10); 22 | strings = backtrace_symbols (array, size); 23 | 24 | printf ("Obtained %zd stack frames.\n", size); 25 | 26 | for (i = 0; i < size; i++) 27 | printf ("%s\n", strings[i]); 28 | 29 | // The backtrace_symbols_fd writes the strings, one per line, 30 | // to the file descriptor fd. 31 | // It does not use malloc, and so can be employed in situations 32 | // where the latter function might fail 33 | if(outputFd) 34 | backtrace_symbols_fd(array,size,outputFd); 35 | 36 | free (strings); 37 | } 38 | 39 | /* A dummy function to make the backtrace more interesting. */ 40 | void dummy_function (void) 41 | { 42 | print_trace (); 43 | } 44 | 45 | int main (int argc, char** argv) 46 | { 47 | if(argc>1){ 48 | outputFd = open(argv[1], O_CREAT | O_WRONLY); 49 | } 50 | 51 | dummy_function (); 52 | return 0; 53 | } 54 | -------------------------------------------------------------------------------- /cpp/linux_programming/backtrace/demangle.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | int outputFd = 0; 11 | 12 | /* Obtain a backtrace and print it to stdout. */ 13 | void print_trace (void) 14 | { 15 | void *array[10]; 16 | size_t size; 17 | char **strings; 18 | size_t i; 19 | 20 | size = backtrace (array, 10); 21 | strings = backtrace_symbols (array, size); 22 | 23 | 24 | // Find the first mangled function name 25 | char mangled[256] = {0}; 26 | char* firstTrace = (char*)(strings[0]); 27 | const char* left = "("; 28 | const char* right = "+"; 29 | char* begin = std::find_first_of(firstTrace,firstTrace+strlen(firstTrace),left,left+1) + 1; 30 | char* end = std::find_first_of(firstTrace,firstTrace+strlen(firstTrace),right,right+1) ; 31 | memcpy(mangled,begin,end-begin); 32 | 33 | printf("firstTrace: %s\nbegin: %s\nmangled: %s\n",firstTrace,begin,mangled); 34 | 35 | const char * mangled_name = NULL; 36 | size_t length = 1024; 37 | int status = 0; 38 | 39 | char* demangled = abi::__cxa_demangle(mangled,NULL,&length,&status); 40 | printf("mangled [%s] length [%zu] status [%i] demangled [%s]\n",mangled,length,status,demangled); 41 | 42 | free (demangled); 43 | 44 | free (strings); 45 | } 46 | 47 | /* A dummy function to make the backtrace more interesting. */ 48 | void dummy_function (void) 49 | { 50 | print_trace (); 51 | } 52 | 53 | int main (int argc, char** argv) 54 | { 55 | dummy_function (); 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /cpp/linux_programming/backtrace/set_terminate_back_trace.cpp: -------------------------------------------------------------------------------- 1 | // Note: please compile and link the program with -rdynamic options 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | 8 | #include 9 | 10 | static std::terminate_handler prev_handler; 11 | 12 | /* Obtain a backtrace and print it to stdout. */ 13 | void print_trace (void) 14 | { 15 | void *array[10]; 16 | size_t size; 17 | char **strings; 18 | size_t i; 19 | 20 | size = backtrace (array, 10); 21 | strings = backtrace_symbols (array, size); 22 | 23 | printf ("Obtained %zd stack frames.\n", size); 24 | 25 | for (i = 0; i < size; i++) 26 | printf ("%s\n", strings[i]); 27 | 28 | free (strings); 29 | 30 | prev_handler(); 31 | abort(); 32 | } 33 | 34 | /* A dummy function to make the backtrace more interesting. */ 35 | void dummy_function (void) 36 | { 37 | throw 0; 38 | } 39 | 40 | 41 | int main (int argc, char** argv) 42 | { 43 | prev_handler = std::set_terminate(print_trace); 44 | dummy_function(); 45 | return 0; 46 | } 47 | -------------------------------------------------------------------------------- /cpp/linux_programming/core_dumped.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | using namespace std; 4 | 5 | int dummy_function(){ 6 | delete (int*)5; 7 | } 8 | 9 | int main(){ 10 | dummy_function(); 11 | return 0; 12 | } 13 | -------------------------------------------------------------------------------- /cpp/linux_programming/dynamic_library/undefined_symbol/add_1.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int undefined_symbol(); 4 | 5 | int add(int a, int b) { 6 | return a+b; 7 | } 8 | -------------------------------------------------------------------------------- /cpp/linux_programming/dynamic_library/undefined_symbol/add_2.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int add(int a, int b) { 4 | printf("a+b\n"); 5 | return a+b; 6 | } 7 | -------------------------------------------------------------------------------- /cpp/linux_programming/dynamic_library/undefined_symbol/add_3.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int some_external_function(); 4 | 5 | int add(int a, int b) { 6 | some_external_function(); // call an external function 7 | return a+b; 8 | } 9 | -------------------------------------------------------------------------------- /cpp/linux_programming/dynamic_library/undefined_symbol/add_4.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int some_external_function(); 4 | 5 | int add(int a, int b) { 6 | some_external_function(); // call an external function 7 | return a+b; 8 | } 9 | -------------------------------------------------------------------------------- /cpp/linux_programming/dynamic_library/undefined_symbol/clean.sh: -------------------------------------------------------------------------------- 1 | rm -rf *.o *.so *.a bin 2 | -------------------------------------------------------------------------------- /cpp/linux_programming/dynamic_library/undefined_symbol/some_external_function.c: -------------------------------------------------------------------------------- 1 | 2 | int some_external_function() { 3 | return 0; 4 | } 5 | -------------------------------------------------------------------------------- /cpp/linux_programming/exception/abort.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | int main(){ 5 | abort(); 6 | } 7 | -------------------------------------------------------------------------------- /cpp/linux_programming/exception/set_terminate.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | std::terminate_handler prev_handler; 6 | 7 | void myterminate () { 8 | std::cerr << "terminate handler called\n"; 9 | prev_handler(); 10 | std::cerr << "calling abort.\n"; 11 | abort(); 12 | } 13 | 14 | int main (void) { 15 | prev_handler = std::set_terminate (myterminate); 16 | throw 0; // unhandled exception: calls terminate handler 17 | return 0; 18 | } 19 | -------------------------------------------------------------------------------- /cpp/linux_programming/glibc_check.cpp: -------------------------------------------------------------------------------- 1 | // comment the following include directive, 2 | // You will see a different result. 3 | // The features.h of the glibc is included in every 4 | // header file. 5 | #include "stdint.h" 6 | 7 | int test(){ 8 | #ifdef __GNU_LIBRARY__ 9 | return __GNU_LIBRARY__; 10 | #else 11 | return -1; 12 | #endif 13 | } 14 | 15 | 16 | #include 17 | 18 | using namespace std; 19 | 20 | int main(){ 21 | cout< 5 | 6 | int main(){ 7 | 8 | rlibns::networking::UdpClient client; 9 | 10 | int openErr = client.Open("127.0.0.1",1234); 11 | std::cout<<"openErr="< 5 | 6 | class Foo: rlibns::Singleton{ 7 | public: 8 | static Foo* GetInstance(){ 9 | return rlibns::Singleton::GetSingleton(); 10 | } 11 | ~Foo(){ 12 | std::cout<<"~Foo"<(); 21 | // } 22 | // }; 23 | 24 | int main(){ 25 | std::cout< // pthread_once 5 | #include // atexit 6 | #include // cerr 7 | 8 | /** 9 | * @file rlibns/Singleton.h 10 | */ 11 | 12 | namespace rlibns{ 13 | 14 | class Singleton{ 15 | 16 | // Support circular reference detection in the future 17 | 18 | protected: 19 | Singleton(){} 20 | virtual ~Singleton(){} 21 | 22 | private: // make client class impossible to be derived 23 | struct PrivateStruct{}; 24 | virtual void FinalMethod(PrivateStruct) = 0; 25 | 26 | protected: // client class must derived from this class 27 | 28 | template 29 | static Derived* GetSingleton(){ 30 | class GrandChild: public Derived{ 31 | virtual void FinalMethod(PrivateStruct){} 32 | public: 33 | virtual ~GrandChild(){} 34 | static Derived** GetPtr(){ 35 | static Derived* ptr = 0; 36 | return &ptr; 37 | } 38 | static void DeInit(){ 39 | delete *GetPtr(); 40 | *GetPtr() = 0; 41 | } 42 | static void Init(){ 43 | *GetPtr() = new GrandChild(); 44 | atexit(DeInit); 45 | } 46 | }; 47 | static pthread_once_t onceControl = PTHREAD_ONCE_INIT; 48 | pthread_once(&onceControl, GrandChild::Init); 49 | Derived* ret = *GrandChild::GetPtr(); 50 | if(!ret){ 51 | std::cerr<<"Dead reference, never expect to happen."< 5 | 6 | #include 7 | 8 | #include "rlibns/log/LogLine.h" 9 | namespace rlibns{ namespace log{ 10 | class LogLine; 11 | }} 12 | 13 | #include "rlibns/log/LogCapture.h" 14 | namespace rlibns{ namespace log{ 15 | struct LogCaptureInfo; 16 | }} 17 | 18 | 19 | namespace rlibns{ namespace log{ 20 | 21 | class LogAppender{ 22 | public: 23 | virtual int32_t OnLogLine( 24 | const LogLine& logLine 25 | , const std::vector& LogCaptures 26 | , size_t threadId 27 | ) = 0; 28 | virtual ~LogAppender(){} 29 | 30 | 31 | }; 32 | 33 | }} 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /cpp/rlib/src/rlibns/log/LogCapture.cpp: -------------------------------------------------------------------------------- 1 | #include "rlibns/log/LogCapture.h" 2 | 3 | #include "rlibns/log/LogDispatcher.h" 4 | using rlibns::log::LogDispatcher; 5 | 6 | 7 | namespace rlibns{ namespace log{ 8 | LogCaptureGuard::LogCaptureGuard( 9 | const char* inFileName 10 | , const char* inFunctionName 11 | , size_t inLineNumber 12 | , const char* inPrettyFunction 13 | , const std::string& inName 14 | , const std::string& inValue 15 | , LogDispatcher& inoutDispatcher 16 | ) 17 | : LogCaptureInfo(inFileName,inFunctionName,inLineNumber, inPrettyFunction, inName, inValue) 18 | , dispatcher(inoutDispatcher) 19 | { 20 | dispatcher.OnLogCaptureInfoPush(*this); 21 | } 22 | 23 | LogCaptureGuard::~LogCaptureGuard(){ 24 | dispatcher.OnLogCaptureInfoPop(*this); 25 | } 26 | 27 | }} 28 | -------------------------------------------------------------------------------- /cpp/rlib/src/rlibns/log/LogCapture.h: -------------------------------------------------------------------------------- 1 | #ifndef RLIBNS_LOG_LOGCAPTURE_H 2 | #define RLIBNS_LOG_LOGCAPTURE_H 3 | 4 | #include 5 | #include 6 | 7 | #include "rlibns/log/LogDispatcher.h" 8 | namespace rlibns{ namespace log{ 9 | class LogDispatcher; 10 | }} // namespace rlibns::log 11 | 12 | namespace rlibns{ namespace log{ 13 | 14 | /** 15 | * @struct Log capture information. Name - value pair. 16 | */ 17 | struct LogCaptureInfo{ 18 | const char * const fileName; 19 | const char * const functionName; 20 | const size_t lineNumber; 21 | const char * const prettyFunction; 22 | std::string name; 23 | std::string value; 24 | 25 | LogCaptureInfo( 26 | const char* inFileName 27 | , const char* inFunctionName 28 | , size_t inLineNumber 29 | , const char* inPrettyFunction 30 | , const std::string& inName 31 | , const std::string& inValue 32 | ) : fileName(inFileName) 33 | , functionName(inFunctionName) 34 | , lineNumber(inLineNumber) 35 | , prettyFunction(inPrettyFunction) 36 | , name(inName) 37 | , value(inValue) 38 | {} 39 | }; 40 | 41 | struct LogCaptureGuard: protected LogCaptureInfo{ 42 | LogDispatcher& dispatcher; 43 | LogCaptureGuard( 44 | const char* inFileName 45 | , const char* inFunctionName 46 | , size_t inLineNumber 47 | , const char* inPrettyFunction 48 | , const std::string& inName 49 | , const std::string& inValue 50 | , LogDispatcher& inoutDispatcher 51 | ); 52 | ~LogCaptureGuard(); 53 | }; 54 | 55 | }} // namespace rlibns::log 56 | 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /cpp/rlib/src/rlibns/log/LogDispatcher.cpp: -------------------------------------------------------------------------------- 1 | #include "rlibns/log/LogDispatcher.h" 2 | 3 | #include "rlibns/log/LogLine.h" 4 | using rlibns::log::LogLine; 5 | 6 | #include 7 | using std::string; 8 | 9 | #include 10 | using std::cout; 11 | using std::endl; 12 | 13 | namespace rlibns{ namespace log{ 14 | 15 | void LogDispatcher::OnLogLine(const rlibns::log::LogLine& logLine){ 16 | if(GetAppenderCount() == 0){ 17 | cout<< "[ " 18 | < 5 | // type size_t 6 | 7 | #include "rlibns/log/LogLine.h" 8 | namespace rlibns{ namespace log{ 9 | class LogLine; 10 | }} 11 | 12 | #include "rlibns/log/LogAppender.h" 13 | 14 | #include "rlibns/log/LogCapture.h" 15 | namespace rlibns{ namespace log{ 16 | class LogCaptureInfo; 17 | }} 18 | 19 | #include 20 | 21 | namespace rlibns { namespace log{ 22 | 23 | class LogDispatcher{ 24 | 25 | public: 26 | 27 | /** 28 | * Handle a LogLine event, this function is thread safe. 29 | */ 30 | virtual void OnLogLine(const rlibns::log::LogLine& logLine); 31 | 32 | /** 33 | * Handle a LogCapture push event, this function is thread safe. 34 | */ 35 | virtual void OnLogCaptureInfoPush(const LogCaptureInfo& inLogCaptureInfo); 36 | 37 | /** 38 | * 39 | */ 40 | virtual void OnLogCaptureInfoPop(const LogCaptureInfo& outLogCaptureInfo); 41 | 42 | virtual size_t GetAppenderCount() { return 0; } 43 | virtual LogAppender* GetAppender(size_t index) { return (LogAppender*)0; } 44 | 45 | virtual ~LogDispatcher(); 46 | }; 47 | 48 | }} 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /cpp/rlib/src/rlibns/log/LogLine.cpp: -------------------------------------------------------------------------------- 1 | #include "rlibns/log/LogLine.h" 2 | 3 | #include 4 | using std::streambuf; 5 | 6 | #include 7 | using std::string; 8 | 9 | #include "rlibns/log/LogDispatcher.h" 10 | using rlibns::log::LogDispatcher; 11 | 12 | namespace rlibns{ namespace log { 13 | 14 | LogLine::~LogLine(){ 15 | if(!thisLogDone) 16 | logDispatcher.OnLogLine(*this); 17 | } 18 | 19 | }} // namespace rlibns::log 20 | -------------------------------------------------------------------------------- /cpp/rlib_lockfree/test/test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | void UpdateProgress(std::ostream& o, size_t current, size_t total, int bars = 50){ 6 | o<<'\r'; 7 | o<<"["; 8 | size_t percents = current*100/total; 9 | for(int i=0; i 37 | #include 38 | using namespace std; 39 | 40 | int main(){ 41 | cout<<"hello world"<&3 10 | fi 11 | } 12 | 13 | # tmux installation script: https://gist.github.com/roxma/1f8a3c51314d439a5cd816c811673467 14 | 15 | function roxma_install_ctags() { 16 | if [ -d $(dirname ${BASH_SOURCE[0]})/.local_software/ctags/bin/ ] 17 | then 18 | echo "You've already installed proxychains!" 19 | return 0 20 | fi 21 | { 22 | cd "$(dirname ${BASH_SOURCE[0]})"/.local_software && mkdir -p tmp && cd tmp && rm -rf ctags && git clone git@github.com:universal-ctags/ctags.git 23 | cd ctags && ./autogen.sh && ./configure --prefix="$(dirname ${BASH_SOURCE[0]})/.local_software/ctags/" && make && make install 24 | } | tee 25 | } 26 | 27 | eval "$((_roxma_ctags_init) 3>&1 1>&2 )" 28 | 29 | -------------------------------------------------------------------------------- /linux_env/golang/golang.org/x/README: -------------------------------------------------------------------------------- 1 | 妈的 golang.org 被墙了,上去 https://gopm.io/download 把平常需要的工具下载下 zip 来,在这里方便打包使用。 2 | -------------------------------------------------------------------------------- /linux_env/golang/golang.org/x/net-35ec611a141ee705590b9eb64d673f9e6dfeb1ac.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/linux_env/golang/golang.org/x/net-35ec611a141ee705590b9eb64d673f9e6dfeb1ac.zip -------------------------------------------------------------------------------- /linux_env/golang/golang.org/x/tools-0b2f4dcf4db5371000beb66b65cde17aa91a28a2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/linux_env/golang/golang.org/x/tools-0b2f4dcf4db5371000beb66b65cde17aa91a28a2.zip -------------------------------------------------------------------------------- /linux_env/golang/merge_tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "function roxma_golang_x_zip_encoded(){" 4 | echo -n "cat <<< '" 5 | (cd golang.org/x/ && tar -cz *.zip | base64) 6 | echo "'" 7 | echo "}" 8 | 9 | cat roxma_golang_workspace_init.sh 10 | 11 | -------------------------------------------------------------------------------- /linux_env/nix-env-setup.sh: -------------------------------------------------------------------------------- 1 | 2 | # before executing this script, 3 | # install nix with `curl https://nixos.org/nix/install | sh` 4 | # The user installing nix needs sudo previlege 5 | 6 | nix-env --install python3 7 | nix-env --install git 8 | nix-env --install lua 9 | nix-env --install elixir 10 | nix-env --install neovim 11 | nix-env --install tmux 12 | nix-env --install proxychains 13 | 14 | # nix-env -i php-7.0.12 15 | # 16 | # pecl config-set ext_dir ~/.pecl/ext_dir 17 | # pecl config-set doc_dir ~/.pecl/doc_dir 18 | # pecl config-set bin_dir ~/.pecl/bin_dir 19 | # pecl config-set data_dir ~/.pecl/data_dir 20 | # pecl config-set cfg_dir ~/.pecl/cfg_dir 21 | # pecl config-set www_dir ~/.pecl/www_dir 22 | # # pecl config-set man_dir ~/.pecl/man_dir 23 | # # pecl config-set temp_dir ~/.pecl/temp_dir 24 | # # pecl config-set temp ~/.pecl/temp 25 | # # pecl config-set download_dir ~/.pecl/download_dir 26 | # 27 | # pecl install redis 28 | # pecl install mongodb 29 | 30 | # nix-env --install llvm 31 | 32 | # python-dev config 33 | pip install --user neovim 34 | 35 | -------------------------------------------------------------------------------- /linux_env/proxychains/init.sh: -------------------------------------------------------------------------------- 1 | 2 | function _roxma_proxychains_init() { 3 | 4 | cd $(dirname ${BASH_SOURCE[0]}) 5 | 6 | if [ -d .local_software/proxychains/bin ] 7 | then 8 | echo 'export PATH='$(pwd)/.local_software/proxychains/bin':$PATH' 9 | echo 'export PATH='$(pwd)/.local_software/proxychains/bin':$PATH' 1>&3 10 | fi 11 | } 12 | 13 | # tmux installation script: https://gist.github.com/roxma/1f8a3c51314d439a5cd816c811673467 14 | 15 | function roxma_install_proxychains() { 16 | if [ -d $(dirname ${BASH_SOURCE[0]})/.local_software/proxychains/bin/ ] 17 | then 18 | echo "You've already installed proxychains!" 19 | return 0 20 | fi 21 | { 22 | cd "$(dirname ${BASH_SOURCE[0]})"/.local_software && mkdir -p tmp && cd tmp && rm -rf proxychains-ng && git clone https://github.com/rofl0r/proxychains-ng.git 23 | cd proxychains-ng && ./configure --prefix="$(dirname ${BASH_SOURCE[0]})/.local_software/proxychains/" && make && make install && make install-config 24 | } | tee 25 | } 26 | 27 | eval "$((_roxma_proxychains_init) 3>&1 1>&2 )" 28 | 29 | # used togethre with shadowsocks: 30 | # pip3 install shadowsocks 31 | # /bin/ssserver -p port -k password -m rc4-md5 --user nobody -d start 32 | # sslocal -c /etc/shadowsocks.json -d start 33 | # 34 | # /etc/shadowsocks.json file: 35 | # { 36 | # "server" : "server", 37 | # "server_port" : port, 38 | # "local_address" : "127.0.0.1", 39 | # "local_port" : 1080, 40 | # "password" : "password", 41 | # "timeout" : 1000, 42 | # "method" : "rc4-md5" 43 | # } 44 | -------------------------------------------------------------------------------- /linux_env/string/base64_decode.sh: -------------------------------------------------------------------------------- 1 | 2 | function base64_decode(){ 3 | python -u -c ' 4 | import base64, sys 5 | if sys.version_info.major==2: 6 | sys.stdout.write(base64.b64decode(sys.stdin.read())) 7 | else: 8 | sys.stdout.buffer.write(base64.b64decode(sys.stdin.buffer.read())) 9 | ' 10 | } 11 | -------------------------------------------------------------------------------- /linux_env/string/base64_encode.sh: -------------------------------------------------------------------------------- 1 | 2 | function base64_encode(){ 3 | python -u -c ' 4 | import base64, sys 5 | if sys.version_info.major==2: 6 | sys.stdout.write(base64.b64encode(sys.stdin.read())) 7 | else: 8 | sys.stdout.buffer.write(base64.b64encode(sys.stdin.buffer.read())) 9 | ' 10 | } 11 | -------------------------------------------------------------------------------- /linux_env/string/hex_decode.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | 4 | import sys 5 | inputString = sys.stdin.read() 6 | import re 7 | pattern = re.compile(r'\s+') 8 | hexString = re.sub(pattern, '', inputString) 9 | sys.stdout.write(hexString.decode("hex")) 10 | 11 | -------------------------------------------------------------------------------- /linux_env/string/url_decode.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | 4 | def Entry(): 5 | 6 | from urllib import urlencode, unquote 7 | import sys 8 | if len(sys.argv)>1: 9 | sys.stdout.write(unquote(sys.argv[1])) 10 | else: 11 | sys.stdout.write(unquote(sys.stdin.read())) 12 | 13 | Entry() 14 | 15 | -------------------------------------------------------------------------------- /linux_env/string/url_encode.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | 4 | def Entry(): 5 | 6 | from urllib import quote 7 | import sys 8 | if len(sys.argv)>1: 9 | sys.stdout.write(quote(sys.argv[1])) 10 | else: 11 | sys.stdout.write(quote(sys.stdin.read())) 12 | 13 | Entry() 14 | -------------------------------------------------------------------------------- /linux_env/tmux/init.sh: -------------------------------------------------------------------------------- 1 | 2 | function _roxma_tmux_init() { 3 | 4 | cd $(dirname ${BASH_SOURCE[0]}) 5 | 6 | if [ -d .local_software ] 7 | then 8 | 9 | # Generate tmux.conf 10 | mkdir -p .local_software/tmux/etc 11 | roxma_tmux_conf_generate > ".local_software/tmux/etc/tmux.conf" 12 | 13 | # tmux-powerline this project is not not maintained anymore 14 | # if [ ! -d .local_software/tmux-powerline ] 15 | # then 16 | # echo "roxma_install_tmux_powerline ### use this command to install https://github.com/erikw/tmux-powerline" 17 | # else 18 | # roxma_install_tmux_powerline_conf 19 | # fi 20 | 21 | tmux=tmux 22 | if [ -f .local_software/tmux/bin/tmux ] 23 | then 24 | tmux=$(readlink -f .local_software/tmux/bin/tmux) 25 | echo 'export PATH='$(dirname $tmux)':$PATH' 26 | echo 'export PATH='$(dirname $tmux)':$PATH' 1>&3 27 | fi 28 | 29 | echo 'unalias tmux 2>/dev/null' 1>&3 30 | unalias tmux 2>/dev/null 31 | alias tmux="$tmux -f $(readlink -f .local_software/tmux/etc/tmux.conf)" 32 | alias tmux 1>&3 33 | # show message 34 | alias tmux 35 | 36 | fi 37 | } 38 | 39 | # tmux installation script: https://gist.github.com/roxma/1f8a3c51314d439a5cd816c811673467 40 | 41 | eval "$((_roxma_tmux_init) 3>&1 1>&2 )" 42 | 43 | -------------------------------------------------------------------------------- /linux_env/tmux/merge_tools.sh: -------------------------------------------------------------------------------- 1 | 2 | echo "function roxma_tmux_conf_generate() {" 3 | vimrcEncodedContent="$(cat ./tmux.conf | base64)" 4 | cat <<< "cat <<< '$vimrcEncodedContent' | base64_decode" 5 | echo "}" 6 | 7 | echo "function roxma_tmux_powerline_conf_generate() {" 8 | vimrcEncodedContent="$(cat ./tmux-powerline.conf | base64)" 9 | cat <<< "cat <<< '$vimrcEncodedContent' | base64_decode" 10 | echo "}" 11 | 12 | cat init.sh 13 | 14 | -------------------------------------------------------------------------------- /linux_env/tmux/tmux-powerline.conf: -------------------------------------------------------------------------------- 1 | set-option -g status on 2 | set-option -g status-interval 2 3 | set-option -g status-utf8 on 4 | set-option -g status-justify "centre" 5 | set-option -g status-left-length 60 6 | set-option -g status-right-length 90 7 | set-option -g status-left "#(__tmux_powerline_path/powerline.sh left)" 8 | set-option -g status-right "#(__tmux_powerline_path/powerline.sh right)" 9 | -------------------------------------------------------------------------------- /linux_env/utils/scpex.sh: -------------------------------------------------------------------------------- 1 | 2 | ## 3 | # Read ssh password from std input 4 | function scpex(){ 5 | 6 | read -p "password: " password 7 | 8 | local expectCmd=' 9 | 10 | # read password 11 | # send_user "password:\ " 12 | # expect_user -re "(.*)\n" 13 | # set password "$expect_out(0,string)" 14 | 15 | set password "'"$password"'" 16 | set password_sent 0 17 | 18 | set timeout 30 19 | spawn scp '"$@"' 20 | 21 | expect { 22 | "*yes/no" { 23 | send "yes\r" 24 | expect "*password" { 25 | send "$password\r" 26 | set password_sent 1 27 | } 28 | } 29 | "*assword" { 30 | send "$password\r" 31 | set password_sent 1 32 | } 33 | } 34 | 35 | expect eof 36 | 37 | ' 38 | 39 | expect -c "$expectCmd" -f /dev/null 40 | } 41 | 42 | -------------------------------------------------------------------------------- /linux_env/utils/ssh_command.exp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env expect 2 | 3 | set host localhost 4 | set port 22 5 | set user roxma 6 | set password 84839829 7 | 8 | # log_user 0 9 | 10 | spawn ssh $user@$host -p$port 11 | set password_sended 0 12 | expect { 13 | "*yes/no" { send "yes\r" } 14 | "*password" { 15 | send "$password\r" ; 16 | set password_sended 1 17 | } 18 | } 19 | 20 | if {$password_sended==0} { 21 | expect { 22 | "*password" { 23 | send "$password\r" ; 24 | set password_sended 1 25 | } 26 | } 27 | } 28 | 29 | 30 | send "exit\r" 31 | 32 | # expect eof 33 | 34 | -------------------------------------------------------------------------------- /linux_env/utils/utils.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | 3 | set -o emacs 4 | 5 | # npm 6 | if which --skip-alias npm 2>/dev/null 1>/dev/null ; then 7 | alias cnpm="$(which --skip-alias npm) --registry=https://registry.npm.taobao.org \ 8 | --cache=$HOME/.npm/.cache/cnpm \ 9 | --disturl=https://npm.taobao.org/dist \ 10 | --userconfig=$HOME/.cnpmrc" 11 | fi 12 | 13 | function enject_env() { 14 | gdb -batch -ex 'attach '$1 -ex 'call putenv ("'$2'")' -ex 'detach'; 15 | } 16 | 17 | 18 | function tmux_renumber_windows() { 19 | local windows=$(tmux list-windows | awk -F: '{print $1}') 20 | local i=0 21 | local n 22 | for n in $windows 23 | do 24 | if [ "$n" -ne "$i" ] 25 | then 26 | tmux move-window -s $n -t $i 27 | fi 28 | i=$((i+1)) 29 | done 30 | } 31 | 32 | -------------------------------------------------------------------------------- /linux_env/vim/merge_tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | basicVimrcFiles="/dev/null" 4 | 5 | echo "function roxma_vim_rcfile(){" 6 | vimrcEncodedContent="$(cat $basicVimrcFiles | base64)" 7 | echo 'local roxVimrcFile=/tmp/rox_vimrc_$(echo "$(whoami)" | base64_encode )' 8 | echo "echo '$vimrcEncodedContent' | base64_decode > \$roxVimrcFile" 9 | echo "echo \"\$roxVimrcFile\"" 10 | echo "}" 11 | 12 | echo "function roxma_nvim_rcfile_name(){" 13 | echo 'local roxVimrcFile=/tmp/rox_nvimrc_$(echo "$(whoami)" | base64_encode )' 14 | echo "echo \"\$roxVimrcFile\"" 15 | echo "}" 16 | 17 | echo "function roxma_nvim_rcfile_generate(){" 18 | vimrcEncodedContent="$(cat $basicVimrcFiles | base64)" 19 | echo "echo '$vimrcEncodedContent' | base64_decode > \$(roxma_nvim_rcfile_name)" 20 | echo "}" 21 | 22 | echo "function roxma_vim_plugins_tgz_encoded(){" 23 | pluginsTgzEncodedContent="$(tar -cz plugins | base64)" 24 | echo "echo '$pluginsTgzEncodedContent'" 25 | echo "}" 26 | 27 | echo "function roxma_vim_plugins_tgz_encoded_content_md5sum(){" 28 | echo "echo '$(echo $pluginsTgzEncodedContent | md5sum)'" 29 | echo "}" 30 | 31 | 32 | cat init.sh 33 | 34 | cat neovim.sh 35 | 36 | -------------------------------------------------------------------------------- /linux_env/weechat/init.sh: -------------------------------------------------------------------------------- 1 | 2 | function _roxma_weechat_init() 3 | { 4 | cd $(dirname ${BASH_SOURCE[0]}) 5 | 6 | if [ -d .local_software -a -n "$(which weechat 2>/dev/null)" ] 7 | then 8 | # Generate tmux.conf 9 | mkdir -p .local_software/weechat_data 10 | cd .local_software/weechat_data 11 | roxma_weechat_scripts_tgz > roxma_scripts.tar.gz 12 | tar -zxf roxma_scripts.tar.gz 13 | echo 'unalias weechat 2>/dev/null' 1>&3 14 | unalias weechat 2>/dev/null 15 | alias weechat="$(which weechat) -d $(readlink -f $(dirname ${BASH_SOURCE[0]})/.local_software/weechat_data)" 16 | alias weechat 1>&3 17 | alias weechat 18 | fi 19 | } 20 | 21 | eval "$((_roxma_weechat_init) 3>&1 1>&2 )" 22 | 23 | -------------------------------------------------------------------------------- /linux_env/weechat/lua/autoload/roxma_init.lua: -------------------------------------------------------------------------------- 1 | weechat.register("roxma_inittt", "roxma", "1.0", "GPL3", "roxma's init script", "", "") 2 | 3 | freenode = weechat.config_string(weechat.config_get("irc.server.freenode.addresses")) 4 | 5 | if (freenode == "") 6 | then 7 | weechat.command("", "/server add freenode chat.freenode.net") 8 | weechat.command("", "/set irc.server.freenode.addresses chat.freenode.net/7000") 9 | weechat.command("", "/set irc.server.freenode.ssl on") 10 | weechat.command("", "/set irc.server.freenode.nicks roxma") 11 | weechat.command("", "/set irc.server.freenode.autoconnect on") 12 | 13 | end 14 | 15 | -- smart filter 16 | weechat.command("", "/set irc.look.smart_filter on") 17 | weechat.command("", "/filter add irc_smart * irc_smart_filter *") 18 | 19 | -- status bar 20 | weechat.command("", "/set weechat.bar.status.color_bg 8") 21 | -- more simple status bar, the time item is distracting me, disable it 22 | weechat.command("", "weechat.bar.status.items ' buffer_number+:+buffer_plugin+.+buffer_plugin+.+buffer_name'") 23 | 24 | -------------------------------------------------------------------------------- /linux_env/weechat/merge_tools.sh: -------------------------------------------------------------------------------- 1 | 2 | echo "function roxma_weechat_scripts_tgz(){" 3 | echo "cat <<< '$(tar -cz lua | base64)' | base64_decode" 4 | echo "}" 5 | 6 | cat init.sh 7 | 8 | -------------------------------------------------------------------------------- /mysql/admin/size.sql: -------------------------------------------------------------------------------- 1 | 2 | ## 3 | # get the size of tables in current database 4 | # 5 | SELECT DATABASE() FROM DUAL into @dbName; 6 | 7 | (SELECT 8 | table_name AS "Tables" 9 | , format(((data_length + index_length) / 1024 / 1024), 2) as size_mb 10 | , format((data_free)/1024/1024,2) as free_mb 11 | FROM information_schema.TABLES 12 | WHERE table_schema = @dbName) 13 | union all 14 | (select 15 | "All" 16 | , format(sum(((data_length + index_length) / 1024 / 1024)),2) as size_mb 17 | , format((sum(data_free))/1024/1024,2) as free_mb 18 | FROM information_schema.TABLES 19 | WHERE table_schema = @dbName) 20 | ORDER BY size_mb DESC; 21 | 22 | # get the size of databases 23 | select table_schema as database_name, round(sum(((data_length + index_length) / 1024 / 1024)),2) as size_mb, round((data_free)/1024/1024,2) as free_mb from information_schema.TABLES group by table_schema; 24 | 25 | -------------------------------------------------------------------------------- /mysql/insert/duplicate_key.sql: -------------------------------------------------------------------------------- 1 | 2 | create table duplicate_test(id bigint primary key, cnt bigint not null)engine=Innodb, charset=utf8; 3 | 4 | insert into duplicate_test(id, cnt) values(1,1), (2,2), (3, 3); 5 | 6 | select * from duplicate_test; 7 | 8 | insert into duplicate_test(id, cnt) values(1,5) on duplicate key update cnt=cnt+values(cnt); 9 | 10 | insert into duplicate_test(id, cnt) values(2,6),(3,7) on duplicate key update cnt=cnt+values(cnt); 11 | 12 | select * from duplicate_test; 13 | 14 | drop table duplicate_test; 15 | 16 | -------------------------------------------------------------------------------- /mysql/insert/load_data_infile.sql: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | mysql> source load_data_infile.sql 4 | */ 5 | 6 | 7 | create table load_data_infile_test(str_val varchar(4096) not null default "" )engine=Innodb, charset=utf8; 8 | 9 | load data LOCAL infile "duplicate_key.sql" into table load_data_infile_test FIELDS TERMINATED BY "_______" LINES TERMINATED BY "___EOF___"; 10 | 11 | select * from load_data_infile_test \G 12 | 13 | drop table load_data_infile_test; 14 | 15 | -------------------------------------------------------------------------------- /mysql/select/found_rows.sql: -------------------------------------------------------------------------------- 1 | 2 | create table found_rows_test(value int); 3 | 4 | insert into found_rows_test(value) values(1), (2), (3), (4), (5), (6), (7), (8), (9), (10); 5 | 6 | # example 7 | select SQL_CALC_FOUND_ROWS * from found_rows_test limit 0,5; 8 | select found_rows(); 9 | 10 | 11 | select * from found_rows_test limit 0,5; # error 12 | select found_rows(); 13 | 14 | drop table found_rows_test; 15 | -------------------------------------------------------------------------------- /mysql/select/union.sql: -------------------------------------------------------------------------------- 1 | 2 | use test; 3 | # Database changed 4 | 5 | create temporary table union_test(val1 int)engine=Innodb, charset=utf8; 6 | # Query OK, 0 rows affected (0.01 sec) 7 | 8 | create temporary table union_test2(val1 int)engine=Innodb, charset=utf8; 9 | # Query OK, 0 rows affected (0.00 sec) 10 | 11 | insert into union_test set val1=1; 12 | # Query OK, 1 row affected (0.00 sec) 13 | 14 | insert into union_test2 set val1=1; 15 | # Query OK, 1 row affected (0.01 sec) 16 | 17 | insert into union_test2 set val1=2; 18 | # Query OK, 1 row affected (0.01 sec) 19 | 20 | select * from union_test union select * from union_test2; 21 | # +------+ 22 | # | val1 | 23 | # +------+ 24 | # | 1 | 25 | # | 2 | 26 | # +------+ 27 | # 2 rows in set (0.00 sec) 28 | 29 | select * from union_test union all select * from union_test2; 30 | # +------+ 31 | # | val1 | 32 | # +------+ 33 | # | 1 | 34 | # | 1 | 35 | # | 2 | 36 | # +------+ 37 | # 3 rows in set (0.00 sec) 38 | 39 | -------------------------------------------------------------------------------- /php_learn/.buildpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /php_learn/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | php_learn 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.validation.validationbuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.dltk.core.scriptbuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.common.project.facet.core.builder 20 | 21 | 22 | 23 | 24 | 25 | org.eclipse.wst.common.project.facet.core.nature 26 | org.eclipse.php.core.PHPNature 27 | 28 | 29 | -------------------------------------------------------------------------------- /php_learn/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding/=UTF-8 3 | -------------------------------------------------------------------------------- /php_learn/.settings/org.eclipse.core.runtime.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | line.separator=\n 3 | -------------------------------------------------------------------------------- /php_learn/.settings/org.eclipse.php.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | include_path=0;/php_learn 3 | -------------------------------------------------------------------------------- /php_learn/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /php_learn/apps/PhpLearnDbConfig.php: -------------------------------------------------------------------------------- 1 | userName = "root"; 8 | $config->password = ""; 9 | $config->charset = "utf8"; 10 | $config->useDatabase = "php_learn"; 11 | 12 | return $config; 13 | } 14 | 15 | ?> -------------------------------------------------------------------------------- /php_learn/apps/appointment/CgiCommon.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php_learn/apps/appointment/cgi_appointment_validate.php: -------------------------------------------------------------------------------- 1 | issueId = CgiInput("issue_id", ""); 11 | $input->subIssueId = CgiInput("sub_issue_id", ""); 12 | $input->mail = CgiInput("mail", ""); 13 | 14 | $input->validateKey = CgiInput("validate_key", ""); 15 | 16 | $dao = new AppointmentDao(); 17 | $error = $dao->Validate($input, $output); 18 | CgiOutput($error, $output->errorMessage); 19 | ?> -------------------------------------------------------------------------------- /php_learn/apps/appointment/cgi_create_issue.php: -------------------------------------------------------------------------------- 1 | name = CgiInput("name", ""); 11 | $input->desc = CgiInput("desc", ""); 12 | $input->creator = CgiInput("creator", ""); 13 | 14 | if($input->name==""){ 15 | CgiOutput(__LINE__,"标题不能为空"); 16 | } 17 | 18 | $dao = new AppointmentDao(); 19 | $error = $dao->CreateIssue($input, $output); 20 | 21 | CgiOutput($error, $output->errorMessage); 22 | 23 | ?> -------------------------------------------------------------------------------- /php_learn/apps/appointment/cgi_create_sub_issue.php: -------------------------------------------------------------------------------- 1 | issueId = CgiInput("issue_id", ""); 11 | $input->name = CgiInput("name", ""); 12 | $input->desc = CgiInput("desc", ""); 13 | $input->fields = CgiInput("fields", "[]"); 14 | $input->max = CgiInput("max", ""); 15 | 16 | if($input->name==""){ 17 | CgiOutput(__LINE__,"标题不能为空"); 18 | } 19 | 20 | $dao = new AppointmentDao(); 21 | $error = $dao->CreateSubIssue($input, $output); 22 | 23 | CgiOutput($error, $output->errorMessage); 24 | 25 | ?> -------------------------------------------------------------------------------- /php_learn/apps/appointment/cgi_get_issue.php: -------------------------------------------------------------------------------- 1 | issueId = CgiInput("issue_id", ""); 11 | 12 | 13 | $dao = new AppointmentDao(); 14 | $error = $dao->GetInfo($input, $output); 15 | 16 | $data = array(); 17 | 18 | $data["issue_info"] = $output->issueInfo; 19 | $data["sub_issues"]= $output->subIssues; 20 | $data["requests"] = $output->requests; 21 | 22 | CgiOutput($error, $output->errorMessage,$data); 23 | 24 | ?> -------------------------------------------------------------------------------- /php_learn/apps/appointment/cgi_get_issue_list.php: -------------------------------------------------------------------------------- 1 | issueId = CgiInput("issue_id", ""); 11 | 12 | 13 | $dao = new AppointmentDao(); 14 | $error = $dao->GetIssues($input, $output); 15 | 16 | $data = array(); 17 | 18 | $data["issues"] = $output->issues; 19 | 20 | CgiOutput($error, $output->errorMessage,$data); 21 | 22 | ?> -------------------------------------------------------------------------------- /php_learn/apps/appointment/database.sql: -------------------------------------------------------------------------------- 1 | use php_learn; 2 | 3 | drop table if exists appointment_issue ; 4 | create table appointment_issue( 5 | issue_id bigint primary key auto_increment 6 | , s_creator varchar(255) not null 7 | , s_name varchar(1024) not null 8 | , s_desc varchar(10000) default "" not null 9 | , d_create_time datetime not null 10 | , i_next_sub_id bigint default 1 not null 11 | )engine = INNODB charset=utf8; 12 | 13 | drop table if exists appointment_sub_issue; 14 | create table appointment_sub_issue( 15 | issue_id bigint not null 16 | , sub_issue_id bigint not null 17 | , s_name varchar(1024) not null 18 | , s_desc varchar(10000) default "" not null 19 | , i_cur_request bigint default 0 not null 20 | , i_max_request bigint not null 21 | , s_field_list_json varchar(10000) not null 22 | , d_create_time datetime not null 23 | , primary key(issue_id,sub_issue_id) 24 | ); 25 | 26 | drop table if exists appointment_request; 27 | create table appointment_request( 28 | issue_id bigint not null 29 | , sub_issue_id bigint not null 30 | , s_mail varchar(255) not null 31 | , d_create_time datetime not null 32 | , s_fields_json varchar(10000) not null 33 | , i_mail_sended int default 0 not null 34 | , i_validated int default 0 not null 35 | , s_validate_key varchar(64) not null 36 | , primary key(issue_id,sub_issue_id,s_mail) 37 | ); 38 | 39 | replace into common_singleton set s_name="appointment/send_validate_mail.php"; 40 | -------------------------------------------------------------------------------- /php_learn/apps/appointment/readme: -------------------------------------------------------------------------------- 1 | # 配置 2 | 3 | ## crontab 配置 4 | 5 | 每分钟执行一次 6 | 7 | ``` shell 8 | * * * * * /root/job/php_learn/send_validate_mail.sh 9 | 10 | ``` shell 11 | #!/bin/sh 12 | for((i=1;i<=60;i++)) 13 | do 14 | sleep 1 15 | cd /data/php_learn/apps/appointment/ && /usr/bin/php send_validate_mail.php > /dev/null 2>&1 16 | done -------------------------------------------------------------------------------- /php_learn/apps/common/CgiRequireLogin.php: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /php_learn/apps/common/Dao.php: -------------------------------------------------------------------------------- 1 | db = new DbMysqli(PhpLearnDbConfig()); 12 | } 13 | 14 | function SetConfig($name, $value){ 15 | $result = $this->db->Execute( 16 | "insert into common_config " 17 | , " set s_name=", DbWrapStr($name) 18 | , ", s_value=", DbWrapStr($value) 19 | , " on duplicate key update s_value=",DbWrapStr($value) 20 | ); 21 | return $result->errorCode; 22 | } 23 | 24 | function GetConfig($name, &$value){ 25 | $result = $this->db->Execute( 26 | " select * from common_config " 27 | , " where s_name=", DbWrapStr($name) 28 | ); 29 | if($result->errorCode){ 30 | return $result->errorCode; 31 | } 32 | if(count($result->selectResult)==0){ 33 | $value = ""; 34 | return 0; 35 | } 36 | $value = $result->selectResult[0]["s_value"]; 37 | return 0; 38 | } 39 | 40 | }; 41 | 42 | ?> 43 | -------------------------------------------------------------------------------- /php_learn/apps/common/README.md: -------------------------------------------------------------------------------- 1 | 2 | # GetLogger.php 3 | 4 | If you need to use GetLogger.php, you should set the date.timezone option in you php.ini file to suppress The following Warning: 5 | 6 | PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /data/git/cpp_learn/php_learn/libs/log4php-2.3.0/pattern/LoggerPatternConverterDate.php on line 89 7 | 8 | 9 | -------------------------------------------------------------------------------- /php_learn/apps/common/Singleton.php: -------------------------------------------------------------------------------- 1 | db = new Db(PhpLearnDbConfig()); 17 | else 18 | $this->db = new Db($dbConfig); 19 | 20 | $this->tableName = $tableName; 21 | } 22 | 23 | function Init($name){ 24 | $result = $this->db->Begin(); 25 | if($result->errorCode){ 26 | return __LINE__; 27 | } 28 | 29 | $result = $this->db->Execute("select * from " . $this->tableName 30 | , " where s_name=", DbWrapStr($name), " for update"); 31 | 32 | return $result->errorCode; 33 | } 34 | 35 | }; 36 | 37 | ?> -------------------------------------------------------------------------------- /php_learn/apps/common/database.sql: -------------------------------------------------------------------------------- 1 | 2 | CREATE DATABASE php_learn DEFAULT CHARACTER SET utf8; 3 | 4 | use php_learn; 5 | 6 | drop table if exists common_config ; 7 | create table common_config( 8 | s_name varchar(255) primary key not null 9 | , s_value varchar(255) default "" not null 10 | , last_modify timestamp 11 | )engine = INNODB charset=utf8; 12 | 13 | drop table if exists common_singleton ; 14 | create table common_singleton( 15 | s_name varchar(255) primary key not null 16 | , s_comment varchar(1024) default "" not null 17 | )engine = INNODB charset=utf8; 18 | -------------------------------------------------------------------------------- /php_learn/apps/common/login_logout.php: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /php_learn/apps/common/login_require.js: -------------------------------------------------------------------------------- 1 | 2 | jQuery.ajax({ 3 | url: "/php_learn/apps/common/login_request.php" 4 | , success: function(response){ 5 | if(response.user == ""){ 6 | jQuery("body").html(""); 7 | var mail = ""; 8 | while(mail==""){ 9 | mail = prompt("您还没有登录,请输入您的邮箱",""); 10 | } 11 | jQuery.ajax({ 12 | url: "/php_learn/apps/common/login_request.php" 13 | , data:{ mail:mail, return_page: window.location.href } 14 | , success: function(response){ 15 | if(!response.result){ 16 | return ; 17 | } 18 | alert("已经发送验证邮件到您的邮箱,请在同一浏览器中验证登录"); 19 | 20 | setInterval(function(){ 21 | jQuery.ajax({ 22 | url: "/php_learn/apps/common/login_request.php" 23 | , success: function(response){ 24 | if(response.user != ""){ 25 | window.location.reload(); 26 | } 27 | } 28 | }); 29 | }, 1500); 30 | } 31 | }); 32 | } 33 | } 34 | }); 35 | -------------------------------------------------------------------------------- /php_learn/apps/common/login_validate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 登录验证 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /php_learn/apps/common/login_validate.php: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /php_learn/apps/common/session_start.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/bootstrap-3.2.0-dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/php_learn/apps/libs_jscss/bootstrap-3.2.0-dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/bootstrap-3.2.0-dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/php_learn/apps/libs_jscss/bootstrap-3.2.0-dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/bootstrap-3.2.0-dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/php_learn/apps/libs_jscss/bootstrap-3.2.0-dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/select2-3.4.8/.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | 3 | -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/select2-3.4.8/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2014 Igor Vaynberg 2 | 3 | Version: @@ver@@ Timestamp: @@timestamp@@ 4 | 5 | This software is licensed under the Apache License, Version 2.0 (the "Apache License") or the GNU 6 | General Public License version 2 (the "GPL License"). You may choose either license to govern your 7 | use of this software only upon the condition that you accept all of the terms of either the Apache 8 | License or the GPL License. 9 | 10 | You may obtain a copy of the Apache License and the GPL License at: 11 | 12 | http://www.apache.org/licenses/LICENSE-2.0 13 | http://www.gnu.org/licenses/gpl-2.0.html 14 | 15 | Unless required by applicable law or agreed to in writing, software distributed under the Apache License 16 | or the GPL Licesnse is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 17 | either express or implied. See the Apache License and the GPL License for the specific language governing 18 | permissions and limitations under the Apache License and the GPL License. 19 | -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/select2-3.4.8/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "select2", 3 | "version": "3.4.8", 4 | "main": ["select2.js", "select2.css", "select2.png", "select2x2.png", "select2-spinner.gif"], 5 | "dependencies": { 6 | "jquery": ">= 1.7.1" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/select2-3.4.8/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": 3 | "ivaynberg/select2", 4 | "description": "Select2 is a jQuery based replacement for select boxes.", 5 | "version": "3.4.8", 6 | "type": "component", 7 | "homepage": "http://ivaynberg.github.io/select2/", 8 | "license": "Apache-2.0", 9 | "require": { 10 | "robloach/component-installer": "*", 11 | "components/jquery": ">=1.7.1" 12 | }, 13 | "extra": { 14 | "component": { 15 | "scripts": [ 16 | "select2.js" 17 | ], 18 | "files": [ 19 | "select2.js", 20 | "select2_locale_*.js", 21 | "select2.css", 22 | "select2-bootstrap.css", 23 | "select2-spinner.gif", 24 | "select2.png", 25 | "select2x2.png" 26 | ] 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/select2-3.4.8/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Select2", 3 | "description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.", 4 | "homepage": "http://ivaynberg.github.io/select2", 5 | "author": "Igor Vaynberg", 6 | "repository": {"type": "git", "url": "git://github.com/ivaynberg/select2.git"}, 7 | "main": "select2.js", 8 | "version": "3.4.8", 9 | "jspm": { 10 | "main": "select2", 11 | "files": ["select2.js", "select2.png", "select2.css", "select2-spinner.gif"], 12 | "shim": { 13 | "select2": { 14 | "imports": ["jquery", "./select2.css!"], 15 | "exports": "$" 16 | } 17 | }, 18 | "buildConfig": { "uglify": true } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/select2-3.4.8/select2-spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/php_learn/apps/libs_jscss/select2-3.4.8/select2-spinner.gif -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/select2-3.4.8/select2.jquery.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "select2", 3 | "title": "Select2", 4 | "description": "Select2 is a jQuery based replacement for select boxes. It supports searching, remote data sets, and infinite scrolling of results.", 5 | "keywords": [ 6 | "select", 7 | "autocomplete", 8 | "typeahead", 9 | "dropdown", 10 | "multiselect", 11 | "tag", 12 | "tagging" 13 | ], 14 | "version": "3.4.8", 15 | "author": { 16 | "name": "Igor Vaynberg", 17 | "url": "https://github.com/ivaynberg" 18 | }, 19 | "licenses": [ 20 | { 21 | "type": "Apache", 22 | "url": "http://www.apache.org/licenses/LICENSE-2.0" 23 | }, 24 | { 25 | "type": "GPL v2", 26 | "url": "http://www.gnu.org/licenses/gpl-2.0.html" 27 | } 28 | ], 29 | "bugs": "https://github.com/ivaynberg/select2/issues", 30 | "homepage": "http://ivaynberg.github.com/select2", 31 | "docs": "http://ivaynberg.github.com/select2/", 32 | "download": "https://github.com/ivaynberg/select2/tags", 33 | "dependencies": { 34 | "jquery": ">=1.7.1" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/select2-3.4.8/select2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/php_learn/apps/libs_jscss/select2-3.4.8/select2.png -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/select2-3.4.8/select2_locale_en.js.template: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 translation. 3 | * 4 | * Author: Your Name 5 | */ 6 | (function ($) { 7 | "use strict"; 8 | 9 | $.extend($.fn.select2.defaults, { 10 | formatMatches: function (matches) { return matches + " results are available, use up and down arrow keys to navigate."; }, 11 | formatNoMatches: function () { return "No matches found"; }, 12 | formatInputTooShort: function (input, min) { var n = min - input.length; return "Please enter " + n + " more character" + (n == 1 ? "" : "s"); }, 13 | formatInputTooLong: function (input, max) { var n = input.length - max; return "Please delete " + n + " character" + (n == 1 ? "" : "s"); }, 14 | formatSelectionTooBig: function (limit) { return "You can only select " + limit + " item" + (limit == 1 ? "" : "s"); }, 15 | formatLoadMore: function (pageNumber) { return "Loading more results…"; }, 16 | formatSearching: function () { return "Searching…"; } 17 | }); 18 | })(jQuery); 19 | -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/select2-3.4.8/select2_locale_zh-CN.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Select2 Chinese translation 3 | */ 4 | (function ($) { 5 | "use strict"; 6 | $.extend($.fn.select2.defaults, { 7 | formatNoMatches: function () { return "没有找到匹配项"; }, 8 | formatInputTooShort: function (input, min) { var n = min - input.length; return "请再输入" + n + "个字符";}, 9 | formatInputTooLong: function (input, max) { var n = input.length - max; return "请删掉" + n + "个字符";}, 10 | formatSelectionTooBig: function (limit) { return "你只能选择最多" + limit + "项"; }, 11 | formatLoadMore: function (pageNumber) { return "加载结果中…"; }, 12 | formatSearching: function () { return "搜索中…"; } 13 | }); 14 | })(jQuery); 15 | -------------------------------------------------------------------------------- /php_learn/apps/libs_jscss/select2-3.4.8/select2x2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/php_learn/apps/libs_jscss/select2-3.4.8/select2x2.png -------------------------------------------------------------------------------- /php_learn/apps/series_update_reminder/README.md: -------------------------------------------------------------------------------- 1 | 2 | # 部署 3 | 4 | ## DB 5 | 6 | - 根据 ../common/database.sql 和 database.sql 的内容来创建 DB 和表,DB 的配置在 ../PhpLearnDbConfig.php 这个文件里面修改。 7 | - 在 common_config 中插入两条记录,s_name 字段分别是 "mail.user_name" 和 "mail.password",s_value 字段分别是用来发送邮件的 QQ 邮箱贴和密码,注意 QQ邮箱需要设置开通SMTP服务。 8 | 9 | ## crontab 10 | 11 | 每10分钟检查一次 12 | 13 | */20 * * * * cd /data/git/cpp_learn/php_learn/apps/series_update_reminder/ && /usr/bin/php check.php 14 | 15 | -------------------------------------------------------------------------------- /php_learn/apps/series_update_reminder/cgi_add_rule.php: -------------------------------------------------------------------------------- 1 | creator = LoginGetUser(); 25 | $addIn->url = $url; 26 | $addIn->pattern = $pattern; 27 | 28 | $dao->AddRule($addIn, $addOut); 29 | 30 | CgiOutput($addOut->errorCode,$addOut->errorMessage); 31 | } 32 | 33 | Entry(); 34 | 35 | ?> 36 | -------------------------------------------------------------------------------- /php_learn/apps/series_update_reminder/cgi_delete_rule.php: -------------------------------------------------------------------------------- 1 | user = LoginGetUser(); 21 | $delIn->ruleId = $ruleId; 22 | 23 | $dao->DeleteRule($delIn, $delOut); 24 | 25 | CgiOutput($delOut->errorCode,$delOut->errorMessage); 26 | } 27 | 28 | Entry(); 29 | 30 | ?> 31 | -------------------------------------------------------------------------------- /php_learn/apps/series_update_reminder/cgi_query_rules.php: -------------------------------------------------------------------------------- 1 | user = LoginGetUser(); 14 | $getOut = new Dao_GetRulesOut(); 15 | 16 | $addIn->user = LoginGetUser(); 17 | 18 | $dao->GetRules($getIn, $getOut); 19 | 20 | CgiOutput($getOut->errorCode,$geeOut->errorMessage, $getOut->rules); 21 | } 22 | 23 | Entry(); 24 | 25 | ?> 26 | -------------------------------------------------------------------------------- /php_learn/apps/series_update_reminder/cgi_rules_query.php: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /php_learn/apps/series_update_reminder/database.sql: -------------------------------------------------------------------------------- 1 | use php_learn; 2 | 3 | drop table if exists series_update_reminder_config ; 4 | create table series_update_reminder_config( 5 | s_name varchar(255) primary key not null 6 | , s_value varchar(255) default "" not null 7 | , last_modify timestamp 8 | )engine = INNODB charset=utf8; 9 | 10 | drop table if exists series_update_reminder_rules ; 11 | create table series_update_reminder_rules( 12 | id bigint primary key auto_increment 13 | , s_url varchar(255) not null 14 | , s_pattern varchar(1024) not null 15 | , s_pattern_type varchar(16) default "" not null 16 | , s_last_result text not null 17 | , d_last_update datetime not null 18 | , last_modify timestamp 19 | , s_creator varchar(255) not null 20 | )engine = INNODB charset=utf8; 21 | 22 | # If d_last_mail is earlier than the corresponding series_update_reminder_rules.d_last_update 23 | # Then a mail should be sent to the user, imforming the update 24 | create table series_update_reminder_subscribers( 25 | i_rule_id bigint not null 26 | , s_subscriber varchar(255) not null 27 | , d_last_mail datetime not null 28 | , primary key(i_rule_id, s_subscriber) 29 | )engine = INNODB charset=utf8; 30 | 31 | -------------------------------------------------------------------------------- /php_learn/apps/series_update_reminder/doc_load.php: -------------------------------------------------------------------------------- 1 | url = $url; 17 | $options->method = "GET"; 18 | $options->timeoutSeconds = 20; // 20s timeout 19 | $options->headers[] = $_SERVER['HTTP_USER_AGENT']; 20 | $loadData = ""; 21 | $errorMessage = NetUtilsHttpLoad($options, $loadData); 22 | 23 | // $metaTag = ""; 24 | //$baseTag = ""; 25 | 26 | echo $errorMessage; 27 | //echo str_replace("","$baseTag",$loadData); 28 | echo $loadData; 29 | 30 | 31 | ?> 32 | -------------------------------------------------------------------------------- /php_learn/apps/series_update_reminder/make_tags.sh: -------------------------------------------------------------------------------- 1 | 2 | # source make_tags.sh 3 | 4 | ctags -R ../../ 5 | -------------------------------------------------------------------------------- /php_learn/apps/series_update_reminder/test.php: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /php_learn/apps/test/log.php: -------------------------------------------------------------------------------- 1 | warn("Warning"); 6 | 7 | ?> 8 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/Chart/Renderer/PHP Charting Libraries.txt: -------------------------------------------------------------------------------- 1 | ChartDirector 2 | http://www.advsofteng.com/cdphp.html 3 | 4 | GraPHPite 5 | http://graphpite.sourceforge.net/ 6 | 7 | JpGraph 8 | http://www.aditus.nu/jpgraph/ 9 | 10 | LibChart 11 | http://naku.dohcrew.com/libchart/pages/introduction/ 12 | 13 | pChart 14 | http://pchart.sourceforge.net/ 15 | 16 | TeeChart 17 | http://www.steema.com/products/teechart/overview.html 18 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/IComparable.php: -------------------------------------------------------------------------------- 1 | abs($b)) { 16 | $r = $b / $a; 17 | $r = abs($a) * sqrt(1 + $r * $r); 18 | } elseif ($b != 0) { 19 | $r = $a / $b; 20 | $r = abs($b) * sqrt(1 + $r * $r); 21 | } else { 22 | $r = 0.0; 23 | } 24 | return $r; 25 | } // function hypo() 26 | 27 | 28 | /** 29 | * Mike Bommarito's version. 30 | * Compute n-dimensional hyotheneuse. 31 | * 32 | function hypot() { 33 | $s = 0; 34 | foreach (func_get_args() as $d) { 35 | if (is_numeric($d)) { 36 | $s += pow($d, 2); 37 | } else { 38 | throw new PHPExcel_Calculation_Exception(JAMAError(ArgumentTypeException)); 39 | } 40 | } 41 | return sqrt($s); 42 | } 43 | */ 44 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/cs/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = Kč 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULL! 42 | DIV0 = #DIV/0! 43 | VALUE = #HODNOTA! 44 | REF = #REF! 45 | NAME = #NÁZEV? 46 | NUM = #NUM! 47 | NA = #N/A 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/da/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = kr 36 | 37 | 38 | 39 | ## 40 | ## Excel Error Codes (For future use) 41 | ## 42 | NULL = #NUL! 43 | DIV0 = #DIVISION/0! 44 | VALUE = #VÆRDI! 45 | REF = #REFERENCE! 46 | NAME = #NAVN? 47 | NUM = #NUM! 48 | NA = #I/T 49 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/de/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULL! 42 | DIV0 = #DIV/0! 43 | VALUE = #WERT! 44 | REF = #BEZUG! 45 | NAME = #NAME? 46 | NUM = #ZAHL! 47 | NA = #NV 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/en/uk/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ## 30 | ## (For future use) 31 | ## 32 | currencySymbol = £ 33 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/es/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rather than € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #¡NULO! 42 | DIV0 = #¡DIV/0! 43 | VALUE = #¡VALOR! 44 | REF = #¡REF! 45 | NAME = #¿NOMBRE? 46 | NUM = #¡NÚM! 47 | NA = #N/A 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/fi/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = $ # Symbol not known, should it be a € (Euro)? 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #TYHJÄ! 42 | DIV0 = #JAKO/0! 43 | VALUE = #ARVO! 44 | REF = #VIITTAUS! 45 | NAME = #NIMI? 46 | NUM = #LUKU! 47 | NA = #PUUTTUU 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/fr/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NUL! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALEUR! 44 | REF = #REF! 45 | NAME = #NOM? 46 | NUM = #NOMBRE! 47 | NA = #N/A 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/hu/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = Ft 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULLA! 42 | DIV0 = #ZÉRÓOSZTÓ! 43 | VALUE = #ÉRTÉK! 44 | REF = #HIV! 45 | NAME = #NÉV? 46 | NUM = #SZÁM! 47 | NA = #HIÁNYZIK 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/it/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULLO! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALORE! 44 | REF = #RIF! 45 | NAME = #NOME? 46 | NUM = #NUM! 47 | NA = #N/D 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/nl/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #LEEG! 42 | DIV0 = #DEEL/0! 43 | VALUE = #WAARDE! 44 | REF = #VERW! 45 | NAME = #NAAM? 46 | NUM = #GETAL! 47 | NA = #N/B 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/no/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = kr 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULL! 42 | DIV0 = #DIV/0! 43 | VALUE = #VERDI! 44 | REF = #REF! 45 | NAME = #NAVN? 46 | NUM = #NUM! 47 | NA = #I/T 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/pl/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = zł 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #ZERO! 42 | DIV0 = #DZIEL/0! 43 | VALUE = #ARG! 44 | REF = #ADR! 45 | NAME = #NAZWA? 46 | NUM = #LICZBA! 47 | NA = #N/D! 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/pt/br/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = R$ 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULO! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALOR! 44 | REF = #REF! 45 | NAME = #NOME? 46 | NUM = #NÚM! 47 | NA = #N/D 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/pt/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = € 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #NULO! 42 | DIV0 = #DIV/0! 43 | VALUE = #VALOR! 44 | REF = #REF! 45 | NAME = #NOME? 46 | NUM = #NÚM! 47 | NA = #N/D 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/ru/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = р 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #ПУСТО! 42 | DIV0 = #ДЕЛ/0! 43 | VALUE = #ЗНАЧ! 44 | REF = #ССЫЛ! 45 | NAME = #ИМЯ? 46 | NUM = #ЧИСЛО! 47 | NA = #Н/Д 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/sv/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = kr 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #Skärning! 42 | DIV0 = #Division/0! 43 | VALUE = #Värdefel! 44 | REF = #Referens! 45 | NAME = #Namn? 46 | NUM = #Ogiltigt! 47 | NA = #Saknas! 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPExcel_1.7.9/PHPExcel/locale/tr/config: -------------------------------------------------------------------------------- 1 | ## 2 | ## PHPExcel 3 | ## 4 | ## Copyright (c) 2006 - 2013 PHPExcel 5 | ## 6 | ## This library is free software; you can redistribute it and/or 7 | ## modify it under the terms of the GNU Lesser General Public 8 | ## License as published by the Free Software Foundation; either 9 | ## version 2.1 of the License, or (at your option) any later version. 10 | ## 11 | ## This library is distributed in the hope that it will be useful, 12 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | ## Lesser General Public License for more details. 15 | ## 16 | ## You should have received a copy of the GNU Lesser General Public 17 | ## License along with this library; if not, write to the Free Software 18 | ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | ## 20 | ## @category PHPExcel 21 | ## @package PHPExcel_Settings 22 | ## @copyright Copyright (c) 2006 - 2013 PHPExcel (http://www.codeplex.com/PHPExcel) 23 | ## @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL 24 | ## @version 1.7.9, 2013-06-02 25 | ## 26 | ## 27 | 28 | 29 | ArgumentSeparator = ; 30 | 31 | 32 | ## 33 | ## (For future use) 34 | ## 35 | currencySymbol = YTL 36 | 37 | 38 | ## 39 | ## Excel Error Codes (For future use) 40 | ## 41 | NULL = #BOŞ! 42 | DIV0 = #SAYI/0! 43 | VALUE = #DEĞER! 44 | REF = #BAŞV! 45 | NAME = #AD? 46 | NUM = #SAYI! 47 | NA = #YOK 48 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/.gitignore: -------------------------------------------------------------------------------- 1 | docs/phpdoc/ 2 | test/message.txt 3 | test/testbootstrap.php 4 | .idea 5 | build/ 6 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | php: 3 | - 5.5 4 | - 5.4 5 | - 5.3 6 | before_install: 7 | - sudo apt-get update -qq 8 | - sudo apt-get install -y -qq postfix 9 | before_script: 10 | - sudo service postfix stop 11 | - smtp-sink -d "%d.%H.%M.%S" localhost:2500 1000 & 12 | - mkdir -p build/logs 13 | - cd test 14 | - cp testbootstrap-dist.php testbootstrap.php 15 | - chmod +x fakesendmail.sh 16 | - sudo mkdir -p /var/qmail/bin 17 | - sudo cp fakesendmail.sh /var/qmail/bin/sendmail 18 | - sudo cp fakesendmail.sh /usr/sbin/sendmail 19 | - echo 'sendmail_path = "/usr/sbin/sendmail -t -i "' | sudo tee "/home/travis/.phpenv/versions/`php -i|grep "PHP Version"|head -n 1|grep -o -P '\d+\.\d+\.\d+.*'`/etc/conf.d/sendmail.ini" 20 | - pwd 21 | - ls -al 22 | script: 23 | - phpunit --configuration ../travis.phpunit.xml.dist 24 | after_script: 25 | - wget https://scrutinizer-ci.com/ocular.phar 26 | - php ocular.phar code-coverage:upload --format=php-clover ../build/logs/clover.xml 27 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "phpmailer/phpmailer", 3 | "type": "library", 4 | "description": "PHPMailer is a full-featured email creation and transfer class for PHP", 5 | "authors": [ 6 | { 7 | "name": "Marcus Bointon", 8 | "email": "phpmailer@synchromedia.co.uk" 9 | }, 10 | { 11 | "name": "Jim Jagielski", 12 | "email": "jimjag@gmail.com" 13 | }, 14 | { 15 | "name": "Andy Prevost", 16 | "email": "codeworxtech@users.sourceforge.net" 17 | }, 18 | { 19 | "name": "Brent R. Matzelle" 20 | } 21 | ], 22 | "require": { 23 | "php": ">=5.0.0" 24 | }, 25 | "require-dev": { 26 | "phpdocumentor/phpdocumentor": "*", 27 | "phpunit/phpunit": "4.0.*" 28 | }, 29 | "autoload": { 30 | "classmap": ["class.phpmailer.php", "class.pop3.php", "class.smtp.php"] 31 | }, 32 | "license": "LGPL-2.1" 33 | } -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/docs/Callback_function_notes.txt: -------------------------------------------------------------------------------- 1 | NEW CALLBACK FUNCTION: 2 | ====================== 3 | 4 | We have had requests for a method to process the results of sending emails 5 | through PHPMailer. In this new release, we have implemented a callback 6 | function that passes the results of each email sent (to, cc, and/or bcc). 7 | We have provided an example that echos the results back to the screen. The 8 | callback function can be used for any purpose. With minor modifications, the 9 | callback function can be used to create CSV logs, post results to databases, 10 | etc. 11 | 12 | Please review the test.php script for the example. 13 | 14 | It's pretty straight forward. 15 | 16 | Enjoy! 17 | Andy 18 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/docs/Note_for_SMTP_debugging.txt: -------------------------------------------------------------------------------- 1 | If you are having problems connecting or sending emails through your SMTP server, the SMTP class can provide more information about the processing/errors taking place. 2 | Use the debug functionality of the class to see what's going on in your connections. To do that, set the debug level in your script. For example: 3 | 4 | $mail->SMTPDebug = 1; 5 | $mail->isSMTP(); // telling the class to use SMTP 6 | $mail->SMTPAuth = true; // enable SMTP authentication 7 | $mail->Port = 26; // set the SMTP port 8 | $mail->Host = "mail.yourhost.com"; // SMTP server 9 | $mail->Username = "name@yourhost.com"; // SMTP account username 10 | $mail->Password = "your password"; // SMTP account password 11 | 12 | Notes on this: 13 | $mail->SMTPDebug = 0; ... will disable debugging (you can also leave this out completely, 0 is the default) 14 | $mail->SMTPDebug = 1; ... will echo errors and server responses 15 | $mail->SMTPDebug = 2; ... will echo errors, server responses and client messages 16 | 17 | And finally, don't forget to disable debugging before going into production. 18 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/docs/generatedocs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Regenerate PHPMailer documentation 3 | # Run from within the docs folder 4 | rm -rf phpdoc/* 5 | phpdoc --directory .. --target ./phpdoc --ignore test/,examples/,extras/,test_script/ --sourcecode --force --title PHPMailer --template="clean" 6 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/examples/contents.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PHPMailer Test 6 | 7 | 8 |
9 |

This is a test of PHPMailer.

10 |
11 | PHPMailer rocks 12 |
13 |

This example uses HTML.

14 |

The PHPMailer image at the top has been embedded automatically.

15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/examples/images/phpmailer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/php_learn/libs/PHPMailer-master/examples/images/phpmailer.png -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/examples/images/phpmailer_mini.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/php_learn/libs/PHPMailer-master/examples/images/phpmailer_mini.png -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/examples/mail.phps: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PHPMailer - mail() test 6 | 7 | 8 | setFrom('from@example.com', 'First Last'); 15 | //Set an alternative reply-to address 16 | $mail->addReplyTo('replyto@example.com', 'First Last'); 17 | //Set who the message is to be sent to 18 | $mail->addAddress('whoto@example.com', 'John Doe'); 19 | //Set the subject line 20 | $mail->Subject = 'PHPMailer mail() test'; 21 | //Read an HTML message body from an external file, convert referenced images to embedded, 22 | //convert HTML into a basic plain-text alternative body 23 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 24 | //Replace the plain text body with one created manually 25 | $mail->AltBody = 'This is a plain-text message body'; 26 | //Attach an image file 27 | $mail->addAttachment('images/phpmailer_mini.png'); 28 | 29 | //send the message, check for errors 30 | if (!$mail->send()) { 31 | echo "Mailer Error: " . $mail->ErrorInfo; 32 | } else { 33 | echo "Message sent!"; 34 | } 35 | ?> 36 | 37 | 38 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/examples/sendmail.phps: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PHPMailer - sendmail test 6 | 7 | 8 | isSendmail(); 15 | //Set who the message is to be sent from 16 | $mail->setFrom('from@example.com', 'First Last'); 17 | //Set an alternative reply-to address 18 | $mail->addReplyTo('replyto@example.com', 'First Last'); 19 | //Set who the message is to be sent to 20 | $mail->addAddress('whoto@example.com', 'John Doe'); 21 | //Set the subject line 22 | $mail->Subject = 'PHPMailer sendmail test'; 23 | //Read an HTML message body from an external file, convert referenced images to embedded, 24 | //convert HTML into a basic plain-text alternative body 25 | $mail->msgHTML(file_get_contents('contents.html'), dirname(__FILE__)); 26 | //Replace the plain text body with one created manually 27 | $mail->AltBody = 'This is a plain-text message body'; 28 | //Attach an image file 29 | $mail->addAttachment('images/phpmailer_mini.png'); 30 | 31 | //send the message, check for errors 32 | if (!$mail->send()) { 33 | echo "Mailer Error: " . $mail->ErrorInfo; 34 | } else { 35 | echo "Message sent!"; 36 | } 37 | ?> 38 | 39 | 40 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/examples/styles/wrapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/php_learn/libs/PHPMailer-master/examples/styles/wrapping.png -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/language/phpmailer.lang-ch.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: '; 13 | $PHPMAILER_LANG['execute'] = 'Kunne ikke køre: '; 14 | $PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: '; 15 | $PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/language/phpmailer.lang-eo.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; 9 | $PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; 11 | $PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; 12 | $PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה'; 13 | $PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; 14 | $PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; 15 | $PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; 16 | $PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; 17 | $PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; 18 | $PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; 20 | $PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; 22 | $PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; 25 | $PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; 26 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/language/phpmailer.lang-hu.php: -------------------------------------------------------------------------------- 1 | 5 | */ 6 | 7 | $PHPMAILER_LANG['authenticate'] = 'SMTP klaida: autentifikacija nepavyko.'; 8 | $PHPMAILER_LANG['connect_host'] = 'SMTP klaida: nepavyksta prisijungti prie SMTP stoties.'; 9 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP klaida: duomenys nepriimti.'; 10 | $PHPMAILER_LANG['empty_message'] = 'Laiško turinys tuščias'; 11 | $PHPMAILER_LANG['encoding'] = 'Neatpažinta koduotė: '; 12 | $PHPMAILER_LANG['execute'] = 'Nepavyko įvykdyti komandos: '; 13 | $PHPMAILER_LANG['file_access'] = 'Byla nepasiekiama: '; 14 | $PHPMAILER_LANG['file_open'] = 'Bylos klaida: Nepavyksta atidaryti: '; 15 | $PHPMAILER_LANG['from_failed'] = 'Neteisingas siuntėjo adresas: '; 16 | $PHPMAILER_LANG['instantiate'] = 'Nepavyko paleisti mail funkcijos.'; 17 | $PHPMAILER_LANG['invalid_address'] = 'Neteisingas adresas'; 18 | $PHPMAILER_LANG['mailer_not_supported'] = ' pašto stotis nepalaikoma.'; 19 | $PHPMAILER_LANG['provide_address'] = 'Nurodykite bent vieną gavėjo adresą.'; 20 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP klaida: nepavyko išsiųsti šiems gavėjams: '; 21 | $PHPMAILER_LANG['signing'] = 'Prisijungimo klaida: '; 22 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP susijungimo klaida'; 23 | $PHPMAILER_LANG['smtp_error'] = 'SMTP stoties klaida: '; 24 | $PHPMAILER_LANG['variable_set'] = 'Nepavyko priskirti reikšmės kintamajam: '; 25 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/language/phpmailer.lang-lv.php: -------------------------------------------------------------------------------- 1 | 5 | */ 6 | 7 | $PHPMAILER_LANG['authenticate'] = 'SMTP kļūda: Autorizācija neizdevās.'; 8 | $PHPMAILER_LANG['connect_host'] = 'SMTP Kļūda: Nevar izveidot savienojumu ar SMTP serveri.'; 9 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Kļūda: Nepieņem informāciju.'; 10 | $PHPMAILER_LANG['empty_message'] = 'Ziņojuma teksts ir tukšs'; 11 | $PHPMAILER_LANG['encoding'] = 'Neatpazīts kodējums: '; 12 | $PHPMAILER_LANG['execute'] = 'Neizdevās izpildīt komandu: '; 13 | $PHPMAILER_LANG['file_access'] = 'Fails nav pieejams: '; 14 | $PHPMAILER_LANG['file_open'] = 'Faila kļūda: Nevar atvērt failu: '; 15 | $PHPMAILER_LANG['from_failed'] = 'Nepareiza sūtītāja adrese: '; 16 | $PHPMAILER_LANG['instantiate'] = 'Nevar palaist sūtīšanas funkciju.'; 17 | $PHPMAILER_LANG['invalid_address'] = 'Nepareiza adrese'; 18 | $PHPMAILER_LANG['mailer_not_supported'] = ' sūtītājs netiek atbalstīts.'; 19 | $PHPMAILER_LANG['provide_address'] = 'Lūdzu, norādiet vismaz vienu adresātu.'; 20 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP kļūda: neizdevās nosūtīt šādiem saņēmējiem: '; 21 | $PHPMAILER_LANG['signing'] = 'Autorizācijas kļūda: '; 22 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP savienojuma kļūda'; 23 | $PHPMAILER_LANG['smtp_error'] = 'SMTP servera kļūda: '; 24 | $PHPMAILER_LANG['variable_set'] = 'Nevar piešķirt mainīgā vērtību: '; 25 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/language/phpmailer.lang-nl.php: -------------------------------------------------------------------------------- 1 | 5 | */ 6 | 7 | $PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.'; 8 | $PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.'; 9 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.'; 10 | $PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg'; 11 | $PHPMAILER_LANG['encoding'] = 'Onbekende codering: '; 12 | $PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: '; 13 | $PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: '; 14 | $PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: '; 15 | $PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: '; 16 | $PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.'; 17 | $PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres'; 18 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.'; 19 | $PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.'; 20 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: '; 21 | $PHPMAILER_LANG['signing'] = 'Signeerfout: '; 22 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.'; 23 | $PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: '; 24 | $PHPMAILER_LANG['variable_set'] = 'Kan de volgende variablen niet instellen of resetten: '; 25 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/language/phpmailer.lang-no.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.'; 11 | //$PHPMAILER_LANG['empty_message'] = 'Message body empty'; 12 | $PHPMAILER_LANG['encoding'] = 'Okänt encode-format: '; 13 | $PHPMAILER_LANG['execute'] = 'Kunde inte köra: '; 14 | $PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: '; 15 | $PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.'; 18 | //$PHPMAILER_LANG['invalid_address'] = 'Not sending, email address is invalid: '; 19 | $PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.'; 20 | $PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: '; 22 | //$PHPMAILER_LANG['signing'] = 'Signing Error: '; 23 | //$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; 24 | //$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; 25 | //$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; 26 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/language/phpmailer.lang-sk.php: -------------------------------------------------------------------------------- 1 | 6 | */ 7 | 8 | $PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.'; 9 | $PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dáta neboli prijaté'; 11 | $PHPMAILER_LANG['empty_message'] = 'Prázdne telo správy.'; 12 | $PHPMAILER_LANG['encoding'] = 'Neznáme kódovanie: '; 13 | $PHPMAILER_LANG['execute'] = 'Nedá sa vykonať: '; 14 | $PHPMAILER_LANG['file_access'] = 'Súbor nebol nájdený: '; 15 | $PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: '; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne '; 22 | $PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.'; 24 | $PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: '; 25 | $PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: '; 26 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/language/phpmailer.lang-vi.php: -------------------------------------------------------------------------------- 1 | 6 | * @license GNU/GPL version 2 or GNU/LGPL version 2.1 or any later version 7 | */ 8 | $PHPMAILER_LANG['authenticate'] = 'Lỗi SMTP: Không thể xác thực.'; 9 | $PHPMAILER_LANG['connect_host'] = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.'; 10 | $PHPMAILER_LANG['data_not_accepted'] = 'Lỗi SMTP: Dữ liệu không được chấp nhận.'; 11 | $PHPMAILER_LANG['empty_message'] = 'Không có nội dung'; 12 | $PHPMAILER_LANG['encoding'] = 'Mã hóa không xác định: '; 13 | $PHPMAILER_LANG['execute'] = 'Không thực hiện được: '; 14 | $PHPMAILER_LANG['file_access'] = 'Không thể truy cập tệp tin '; 15 | $PHPMAILER_LANG['file_open'] = 'Lỗi Tập tin: Không thể mở tệp tin: '; 16 | $PHPMAILER_LANG['from_failed'] = 'Lỗi địa chỉ gửi đi: '; 17 | $PHPMAILER_LANG['instantiate'] = 'Không dùng được các hàm gửi thư.'; 18 | $PHPMAILER_LANG['invalid_address'] = 'Đại chỉ emai không đúng'; 19 | $PHPMAILER_LANG['mailer_not_supported'] = ' trình gửi thư không được hỗ trợ.'; 20 | $PHPMAILER_LANG['provide_address'] = 'Bạn phải cung cấp ít nhất một địa chỉ người nhận.'; 21 | $PHPMAILER_LANG['recipients_failed'] = 'Lỗi SMTP: lỗi địa chỉ người nhận: '; 22 | $PHPMAILER_LANG['signing'] = 'Lỗi đăng nhập: '; 23 | $PHPMAILER_LANG['smtp_connect_failed'] = 'Lỗi kết nối với SMTP'; 24 | $PHPMAILER_LANG['smtp_error'] = 'Lỗi máy chủ smtp '; 25 | $PHPMAILER_LANG['variable_set'] = 'Không thể thiết lập hoặc thiết lập lại biến: '; 26 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/language/phpmailer.lang-zh.php: -------------------------------------------------------------------------------- 1 | 6 | * @author Peter Dave Hello 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; 12 | $PHPMAILER_LANG['empty_message'] = '郵件內容為空'; 13 | $PHPMAILER_LANG['encoding'] = '未知編碼: '; 14 | $PHPMAILER_LANG['file_access'] = '無法存取檔案:'; 15 | $PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; 16 | $PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; 17 | $PHPMAILER_LANG['execute'] = '無法執行:'; 18 | $PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; 19 | $PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; 20 | $PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; 21 | $PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:收件人地址錯誤:'; 23 | $PHPMAILER_LANG['signing'] = '登入失敗: '; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP連線失敗'; 25 | $PHPMAILER_LANG['smtp_error'] = 'SMTP伺服器錯誤: '; 26 | $PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; 27 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/language/phpmailer.lang-zh_cn.php: -------------------------------------------------------------------------------- 1 | 6 | * @author young blog:binaryoung.com 7 | */ 8 | 9 | $PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; 10 | $PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; 11 | $PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; 12 | $PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; 13 | $PHPMAILER_LANG['encoding'] = '未知编码: '; 14 | $PHPMAILER_LANG['execute'] = '无法执行:'; 15 | $PHPMAILER_LANG['file_access'] = '无法访问文件:'; 16 | $PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; 17 | $PHPMAILER_LANG['from_failed'] = '发送地址错误:'; 18 | $PHPMAILER_LANG['instantiate'] = '未知函数调用。'; 19 | $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的。'; 20 | $PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; 21 | $PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; 22 | $PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; 23 | $PHPMAILER_LANG['signing'] = '登录失败:'; 24 | $PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; 25 | $PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错: '; 26 | $PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; 27 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/test/bootstrap.php: -------------------------------------------------------------------------------- 1 | $numPath/num 12 | fi 13 | num=`cat $numPath/num` 14 | num=$(($num + 1)) 15 | echo $num > $numPath/num 16 | 17 | name="$numPath/message_$num.eml" 18 | while read line 19 | do 20 | echo $line >> $name 21 | done 22 | exit 0 23 | -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/test/runfakepopserver.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Run the fake pop server from bash 4 | # Idea from http://blog.ale-re.net/2007/09/ipersimple-remote-shell-with-netcat.html 5 | # Defaults to port 1100 so it can be run by unpriv users and not clash with a real server 6 | # Optionally, pass in in a port number as the first arg 7 | 8 | mkfifo fifo 9 | nc -l ${1:-1100} fifo 10 | rm fifo -------------------------------------------------------------------------------- /php_learn/libs/PHPMailer-master/test/testbootstrap-dist.php: -------------------------------------------------------------------------------- 1 | 2 | 15 | 16 | 17 | ./test/ 18 | 19 | 20 | 21 | 22 | ./extras 23 | 24 | 25 | 26 | 27 | languages 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/LoggerConfigurator.php: -------------------------------------------------------------------------------- 1 | getLocationInformation()->getFileName(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/pattern/LoggerPatternConverterLevel.php: -------------------------------------------------------------------------------- 1 | getLevel()->toString(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/pattern/LoggerPatternConverterLine.php: -------------------------------------------------------------------------------- 1 | getLocationInformation()->getLineNumber(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/pattern/LoggerPatternConverterLiteral.php: -------------------------------------------------------------------------------- 1 | literalValue = $literalValue; 35 | } 36 | 37 | public function convert(LoggerLoggingEvent $event) { 38 | return $this->literalValue; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/pattern/LoggerPatternConverterLocation.php: -------------------------------------------------------------------------------- 1 | getLocationInformation()->getClassName() . '.' . 35 | $event->getLocationInformation()->getMethodName() . '(' . 36 | $event->getLocationInformation()->getFileName() . ':' . 37 | $event->getLocationInformation()->getLineNumber() . ')'; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/pattern/LoggerPatternConverterMessage.php: -------------------------------------------------------------------------------- 1 | getRenderedMessage(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/pattern/LoggerPatternConverterMethod.php: -------------------------------------------------------------------------------- 1 | getLocationInformation()->getMethodName(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/pattern/LoggerPatternConverterNDC.php: -------------------------------------------------------------------------------- 1 | getNDC(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/pattern/LoggerPatternConverterNewLine.php: -------------------------------------------------------------------------------- 1 | getRelativeTime(); 34 | return number_format($ts, 4); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/pattern/LoggerPatternConverterRequest.php: -------------------------------------------------------------------------------- 1 | getThrowableInformation(); 33 | if (isset($info)) { 34 | $ex = $info->getThrowable(); 35 | return (string) $ex . PHP_EOL; 36 | } 37 | return ''; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/renderers/LoggerRenderer.php: -------------------------------------------------------------------------------- 1 | input to a string. 32 | * @param mixed $input The entity to render. 33 | * @return string The rendered string. 34 | */ 35 | public function render($input); 36 | } 37 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/renderers/LoggerRendererDefault.php: -------------------------------------------------------------------------------- 1 | print_r. 25 | * 26 | * @package log4php 27 | * @subpackage renderers 28 | * @since 0.3 29 | */ 30 | class LoggerRendererDefault implements LoggerRenderer { 31 | 32 | /** @inheritdoc */ 33 | public function render($input) { 34 | return print_r($input, true); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /php_learn/libs/log4php-2.3.0/renderers/LoggerRendererException.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php_learn/libs/rlib/Db.php: -------------------------------------------------------------------------------- 1 | value=$value; 24 | } 25 | }; 26 | 27 | /** 28 | * The same as DbEscape 29 | * @param unknown $str 30 | * @return DbWrapStringHelper 31 | */ 32 | function DbWrapStr($str){ 33 | return new DbWrapStringHelper($str); 34 | } 35 | 36 | class DbResult{ 37 | public $errorCode = 0; 38 | public $errorMessage = ""; 39 | 40 | /** 41 | * The executed statement 42 | */ 43 | public $statement = ""; 44 | 45 | /** 46 | * The result for update statement 47 | */ 48 | public $affectedRows = 0; 49 | 50 | /** 51 | * the result for select statement. for example: 52 | * array( 53 | * array("id"=>"1", "value"=>"value1") 54 | * , array("id"=>"2", "value"=>"value2") 55 | * ); 56 | */ 57 | public $selectResult = array(); 58 | }; 59 | 60 | 61 | ?> 62 | -------------------------------------------------------------------------------- /php_learn/libs/rlib/ImportXls.php: -------------------------------------------------------------------------------- 1 | load($inputFileName); 18 | 19 | $arr = $objPHPExcel->getActiveSheet()->toArray(null,true,true,false); 20 | } 21 | 22 | ?> -------------------------------------------------------------------------------- /php_learn/libs/rlib/RenderPhpToString.php: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /php_learn/test/helloworld.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /php_learn/test/phpexceltest.php: -------------------------------------------------------------------------------- 1 | getProperties()->setCreator("Maarten Balliauw"); 17 | $objPHPExcel->getProperties()->setLastModifiedBy("Maarten Balliauw"); 18 | $objPHPExcel->getProperties()->setTitle("Office 2007 XLSX Test Document"); 19 | $objPHPExcel->getProperties()->setSubject("Office 2007 XLSX Test Document"); 20 | $objPHPExcel->getProperties()->setDescription("Test document for Office 2007 XLSX, generated using PHP classes."); 21 | 22 | 23 | // Add some data 24 | echo date('H:i:s') . " Add some data\n"; 25 | $objPHPExcel->setActiveSheetIndex(0); 26 | $activeSheet = $objPHPExcel->getActiveSheet(); 27 | $activeSheet->SetCellValue('A1', 'Hello'); 28 | $activeSheet->SetCellValue('B2', 'world!'); 29 | $activeSheet->SetCellValue('C1', 'Hello'); 30 | $activeSheet->SetCellValue('D2', 'world!'); 31 | 32 | // Rename sheet 33 | echo date('H:i:s') . " Rename sheet\n"; 34 | $activeSheet->setTitle('Simple'); 35 | 36 | 37 | // Save Excel 2007 file 38 | echo date('H:i:s') . " Write to Excel2007 format\n"; 39 | $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); 40 | $objWriter->save(str_replace('.php', '.xlsx', __FILE__)); 41 | 42 | // Echo done 43 | echo date('H:i:s') . " Done writing file.\r\n"; 44 | 45 | ?> -------------------------------------------------------------------------------- /php_learn/test/phpinfo.php: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /php_learn/test/rlib/ExportXls.php: -------------------------------------------------------------------------------- 1 | name = "ExportXlsFromArray.xls"; 7 | 8 | 9 | $array = array(); 10 | $array[] = array( 11 | "col1" => "col1l1" 12 | , "col2" => "col2l1" 13 | , "col3" => "col3l1" 14 | ); 15 | $array[] = array( 16 | "col1" => "col1l2" 17 | , "col2" => "col2l2222" 18 | , "col3" => "col3l2" 19 | ); 20 | $array[] = array( 21 | "col1" => "col1l2" 22 | //, "col2" => "col2l2222" 23 | , "col3" => "col3l2" 24 | ); 25 | 26 | ExportXlsFromArray($file, $array); 27 | 28 | ?> -------------------------------------------------------------------------------- /php_learn/test/rlib/MysqlExportXls.php: -------------------------------------------------------------------------------- 1 | password = ""; 9 | $connectOptions->useDatabase = "rlib_test"; 10 | 11 | $fileOptions = new MysqlExportXlsFileOptions(); 12 | 13 | MysqlExportXls($connectOptions,$fileOptions, "select * from test"); 14 | 15 | ?> -------------------------------------------------------------------------------- /php_learn/test/rlib/NetUtilsHttpLoad.php: -------------------------------------------------------------------------------- 1 | url = "www.qq.com"; 7 | $loadData = ""; 8 | NetUtilsHttpLoad($options, $loadData); 9 | echo $loadData; 10 | 11 | ?> -------------------------------------------------------------------------------- /php_learn/test/rlib/Render.php: -------------------------------------------------------------------------------- 1 | "hello world"), $output); 8 | 9 | var_dump($output); 10 | 11 | } 12 | 13 | Entry(); 14 | 15 | 16 | ?> 17 | -------------------------------------------------------------------------------- /php_learn/test/rlib/Render.tpl.php: -------------------------------------------------------------------------------- 1 | Message is: 2 | -------------------------------------------------------------------------------- /php_learn/test/script_name.php: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /python/basics/arguments.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | 4 | import sys 5 | 6 | print 'Number of arguments:', len(sys.argv), 'arguments.' 7 | print 'Argument List:', str(sys.argv) 8 | -------------------------------------------------------------------------------- /python/basics/networking/tcp_client.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | 4 | #!/usr/bin/env python 5 | 6 | import socket 7 | 8 | 9 | TCP_IP = '127.0.0.1' 10 | TCP_PORT = 5005 11 | BUFFER_SIZE = 1024 12 | MESSAGE = "Hello, World!" 13 | 14 | 15 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 16 | 17 | s.connect((TCP_IP, TCP_PORT)) 18 | 19 | s.send(MESSAGE) 20 | 21 | data = s.recv(BUFFER_SIZE) 22 | print "received: " , data 23 | 24 | s.close() 25 | 26 | # print "received data:", data 27 | -------------------------------------------------------------------------------- /python/basics/networking/tcp_server.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | 4 | import sys 5 | import socket 6 | 7 | 8 | TCP_IP = '127.0.0.1' 9 | TCP_PORT = 5005 10 | BUFFER_SIZE = 200000 # Normally 1024, but we want fast response 11 | 12 | s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) 13 | s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 14 | s.bind((TCP_IP, TCP_PORT)) 15 | s.listen(1) 16 | 17 | conn, addr = s.accept() 18 | # sys.stderr.write('Connection address: %s\n' % (addr) ) 19 | 20 | while 1: 21 | data = conn.recv(BUFFER_SIZE) 22 | if not data: break 23 | sys.stdout.write(data) 24 | sys.stderr.write("received %s bytes\n" % (len(data)) ) 25 | 26 | break 27 | 28 | conn.send('ok') 29 | sys.stderr.write("response sent") 30 | 31 | conn.close() 32 | 33 | -------------------------------------------------------------------------------- /python/basics/networking/udp_client.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | 4 | # This program send a udp packet and then exit 5 | 6 | def Entry(): 7 | content = "hello" 8 | host = "localhost" 9 | port = 12345 10 | UdpSendPacket(content, host, port) 11 | 12 | def UdpSendPacket(content, host, port): 13 | import socket 14 | udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 15 | address = (host,port) 16 | udp.sendto(content, address) 17 | udp.close() 18 | 19 | 20 | Entry() 21 | 22 | 23 | -------------------------------------------------------------------------------- /python/basics/networking/udp_server.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | 4 | # This program receive a udp packet 5 | # response a packet with the same content 6 | # and then exit 7 | 8 | def Entry(): 9 | 10 | port = 12345 11 | maxReceiveSize = 1024 12 | timeout = 60 13 | 14 | import socket 15 | udp = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) 16 | udp.bind(("",port)) 17 | udp.settimeout(timeout) 18 | buffer, address = udp.recvfrom(maxReceiveSize) 19 | 20 | udp.sendto(buffer,address) 21 | 22 | print("address:" + str(address)) 23 | print("content size = " + str(len(buffer))) 24 | 25 | import pprint 26 | pprint.pprint(buffer) 27 | 28 | 29 | Entry() 30 | 31 | -------------------------------------------------------------------------------- /python/basics/print.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | 4 | print "Hi" 5 | 6 | print "%s %s" % ("hei" , "man") 7 | 8 | print "%(message)s" % {"message":"hello world"} 9 | -------------------------------------------------------------------------------- /python/basics/threading/hello.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # -*- coding: utf-8 -*- 3 | 4 | import Queue 5 | import threading 6 | 7 | 8 | def TestThread(q, msg): 9 | q.put(msg) 10 | 11 | def Entry(): 12 | 13 | count = 5 14 | 15 | q = Queue.Queue() 16 | 17 | for i in range(count): 18 | t = threading.Thread(target=TestThread, args=(q,"hello %d" % i)) 19 | # t.deamon = True 20 | t.start() 21 | 22 | for i in range(count): 23 | s = q.get() 24 | print "%d:%s" % (i,s) 25 | s = q.get() 26 | 27 | 28 | Entry() 29 | 30 | -------------------------------------------------------------------------------- /python/libs_examples/mysql/test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | # -*- coding: utf-8 -*- 3 | 4 | import MySQLdb 5 | 6 | db = MySQLdb.connect(host="127.0.0.1",db="python_learn",user="root",passwd="",charset="utf8") 7 | 8 | # cur = db.cursor() 9 | cur = db.cursor(MySQLdb.cursors.DictCursor) 10 | 11 | cur.execute("drop table if exists mysql_test") 12 | cur.execute("create table mysql_test(id int, value varchar(1024))ENGINE=innodb DEFAULT CHARSET=utf8") 13 | ret = cur.execute("insert into mysql_test(id,value) values(1,'1234'),(2,'234')") 14 | print "insert ret=",ret 15 | 16 | cur.execute("select * from mysql_test") 17 | print cur.fetchall() 18 | 19 | db.commit() 20 | 21 | db.close() 22 | -------------------------------------------------------------------------------- /python/python_libs/MySQL-python-1.2.5.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/python/python_libs/MySQL-python-1.2.5.zip -------------------------------------------------------------------------------- /python/python_libs/install.sh: -------------------------------------------------------------------------------- 1 | pip install xlwt 2 | pip install mysql-python 3 | -------------------------------------------------------------------------------- /python/python_libs/xlwt-0.7.5.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/roxma/cpp_learn/71dafa42c399c715b8091c43d96d3950cb3073aa/python/python_libs/xlwt-0.7.5.tar.gz -------------------------------------------------------------------------------- /tools/mysql2csv/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | g++ mysql2csv.cpp -omysql2csv -g -L/usr/lib64/mysql/ -lmysqlclient 3 | g++ csv2mysql.cpp -ocsv2mysql -g -L/usr/lib64/mysql/ -lmysqlclient 4 | 5 | clean: 6 | rm -f mysql2csv csv2mysql output.csv 7 | -------------------------------------------------------------------------------- /tools/mysql2csv/demo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # create table 4 | mysql -u root --default-character-set=utf8 --database=test -e" 5 | drop table if exists test_mysql2csv; 6 | create table test_mysql2csv(id bigint primary key, message varchar(1024))engine=Innodb, charset=utf8 7 | " 8 | 9 | # import data 10 | ./csv2mysql --input=input.csv --database=test --user=root --password="" --host=127.0.0.1 --port=3306 --execute="insert into test_mysql2csv set id=?id, message=?message" \ 11 | # --begin="insert into test_mysql2csv set id=777,message='hey, 777'" \ 12 | # --end="insert into test_mysql2csv set id=666,message='hey, 666'" 13 | 14 | # export data 15 | ./mysql2csv --output=output.csv --database=test --user=root --password="" --host=127.0.0.1 --port=3306 --execute="select * from test_mysql2csv" 16 | 17 | -------------------------------------------------------------------------------- /tools/mysql2csv/input.csv: -------------------------------------------------------------------------------- 1 | id,message 2 | 1,hello 3 | 2,"comma , double quotes "" " 4 | 3,NULL 5 | --------------------------------------------------------------------------------