This set of launch.json and task.json files allow you to build and debug individual C files from within Windows
while using the gcc collection installed within your WSL environment.
sudo apt-get update
sudo apt-get install -y gcc gdbThis set of launch.json and task.json files allow you to build and debug individual C files from within Windows
while using the gcc collection installed within your WSL environment.
sudo apt-get update
sudo apt-get install -y gcc gdbFor a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
| def matprint(mat, fmt="g"): | |
| col_maxes = [max([len(("{:"+fmt+"}").format(x)) for x in col]) for col in mat.T] | |
| for x in mat: | |
| for i, y in enumerate(x): | |
| print(("{:"+str(col_maxes[i])+fmt+"}").format(y), end=" ") | |
| print("") | |
| # Try it! | |
| import numpy as np |
| @echo off | |
| setlocal | |
| call :setESC | |
| cls | |
| echo %ESC%[101;93m STYLES %ESC%[0m | |
| echo ^<ESC^>[0m %ESC%[0mReset%ESC%[0m | |
| echo ^<ESC^>[1m %ESC%[1mBold%ESC%[0m | |
| echo ^<ESC^>[4m %ESC%[4mUnderline%ESC%[0m |
| #!/usr/bin/env python | |
| # -*- coding: utf-8; mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- | |
| # vim: fileencoding=utf-8 tabstop=4 expandtab shiftwidth=4 | |
| """ | |
| THIS CODE IS OUTDATED! Please use this instead: | |
| https://pypi.org/project/pyuac/ | |
| https://github.com/Preston-Landers/pyuac |
| """ | |
| setup: | |
| pip install requests | |
| pip install requests[socks] | |
| super helpful: | |
| - http://packetforger.wordpress.com/2013/08/27/pythons-requests-module-with-socks-support-requesocks/ | |
| - http://docs.python-requests.org/en/master/user/advanced/#proxies | |
| """ |
| " Don't try to be vi compatible | |
| set nocompatible | |
| " Helps force plugins to load correctly when it is turned back on below | |
| filetype off | |
| " TODO: Load plugins here (pathogen or vundle) | |
| " Turn on syntax highlighting | |
| syntax on |
| import os | |
| import ycm_core | |
| from clang_helpers import PrepareClangFlags | |
| # Set this to the absolute path to the folder (NOT the file!) containing the | |
| # compile_commands.json file to use that instead of 'flags'. See here for | |
| # more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html | |
| # Most projects will NOT need to set this to anything; you can just change the | |
| # 'flags' list of compilation flags. Notice that YCM itself uses that approach. | |
| compilation_database_folder = '' |
| # default.custom.yaml | |
| # save it to: | |
| # ~/.config/ibus/rime (linux) | |
| # ~/Library/Rime (macos) | |
| # %APPDATA%\Rime (windows) | |
| patch: | |
| schema_list: | |
| - schema: luna_pinyin # 朙月拼音 | |
| - schema: luna_pinyin_simp # 朙月拼音 简化字模式 |