Tutorial by Examples: t

First obtain the Microsoft.CodeAnalysis.CSharp.Workspaces nuget before continuing. var workspace = Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.Create(); var project = await workspace.OpenProjectAsync(projectFilePath); var compilation = await project.GetCompilationAsync(); foreach (var diag...
A Syntax Tree is an immutable data structure representing the program as a tree of names, commands and marks (as previously configured in the editor.) For example, assume a Microsoft.CodeAnalysis.Compilation instance named compilation has been configured. There are multiple ways to list the names o...
The outline-style property is used to set the style of the outline of an element. p { border: 1px solid black; outline-color:blue; line-height:30px; } .p1{ outline-style: dotted; } .p2{ outline-style: dashed; } .p3{ outline-style: solid; } .p4{ outline-style: double; }...
Name-based virtual hosting on Apache is described on the Apache website as such: With name-based virtual hosting, the server relies on the client to report the hostname as part of the HTTP headers. Using this technique, many different hosts can share the same IP address. Therefore, more than...
This command will save the open file with sudo rights :w !sudo tee % >/dev/null You can also map w!! to write out a file as root :cnoremap w!! w !sudo tee % >/dev/null
A mixin is just a module that can be added (mixed in) to a class. one way to do it is with the extend method. The extend method adds methods of the mixin as class methods. module SomeMixin def foo puts "foo!" end end class Bar extend SomeMixin def baz puts "...
Add this to your $MYVIMRC: " Source vim configuration file whenever it is saved if has ('autocmd') " Remain compatible with earlier versions augroup Reload_Vimrc " Group name. Always use a unique name! autocmd! " Clear any preexisting autoc...
:autocmd BufWritePost * if &diff | diffupdate | endif
Get NSData from Hexadecimal String + (NSData *)dataFromHexString:(NSString *)string { string = [string lowercaseString]; NSMutableData *data= [NSMutableData new]; unsigned char whole_byte; char byte_chars[3] = {'\0','\0','\0'}; int i = 0; int length = (int) string.len...
Heatmaps are useful for visualizing scalar functions of two variables. They provide a “flat” image of two-dimensional histograms (representing for instance the density of a certain area). The following source code illustrates heatmaps using bivariate normally distributed numbers centered at 0 in bo...
An SSH key has two pieces, the public key and the private key. The private key: Is usually in a file named id_rsa, but it can be given any name. CANNOT BE REGENERATED IF LOST!!!! Do not lose this file! If you lose it, you will not be able to get back into your instance. (StackOverflow is li...
A Semantic Model offers a deeper level of interpretation and insight of code compare to a syntax tree. Where syntax trees can tell the names of variables, semantic models also give the type and all references. Syntax trees notice method calls, but semantic models give references to the precise locat...
In the root of your ionic app, there is a gulpfile.js file. Open it in an editor and paste the following gulp task: gulp.task('lint', function() { return gulp.src(['./www/js/**/*.js']) .pipe(jshint('.jshintrc')) .pipe(jshint.reporter('jshint-stylish')) .pipe(jshint...
Create a file named '.jshintrc' in the root of your app, where package.json is. *Note on windows: create a file named "jshintrc.txt". Then rename it to ".jshintrc." (notice the dot at the end). This is a configuration file. It can for example tell jshint to ignore certain varia...
FRP, or Functional Reactive Programming, has some basic terms which you need to know. Every piece of data can be represented as Observable, which is an asynchronous data stream. The power of FRP is in representation synchronous and asynchronous events as streams, Observables, and providing the same...
RxSwift offers many ways to create an Observable, let's take a look: import RxSwift let intObservale = Observable.just(123) // Observable<Int> let stringObservale = Observable.just("RxSwift") // Observable<String> let doubleObservale = Observable.just(3.14) // Observable&...

int

Denotes a signed integer type with "the natural size suggested by the architecture of the execution environment", whose range includes at least -32767 to +32767, inclusive. int x = 2; int y = 3; int z = x + y; Can be combined with unsigned, short, long, and long long (q.v.) in order...
You can restart ubuntu from command line. Below is example of restarting ubuntu immediately. sudo reboot You need to have sudo privilege in order to use this command. Another commands with same results are sudo shutdown -r now and sudo init 6.
For lots of control in a group forms, the tagbody special operator can be very helpful. The forms inside a tagbody form are either go tags (which are just symbols or integers) or forms to execute. Within a tagbody, the go special operator is used to transfer execution to a new location. This type...
When writing macros that expand into forms that might involve grouping, it is worthwhile spending some time considering what grouping construction to expand into. For definition style forms, for instance, a define-widget macro that will usually appear as a top-level form, and that several defuns, d...

Page 563 of 1132