- Rails Casts;
- Codecademy has a few Ruby and RoR classes;
- Mit Ruby Class
- And releted resources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- index.html --> | |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>React Tutorial</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.3/react-dom.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <string.h> | |
| /* c implementation to test is an ASCII string has deplicated characters */ | |
| /** | |
| * [main description] | |
| * @param argc [number of argument] | |
| * @param argv [argument values] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'pp' | |
| require 'time' | |
| class Item | |
| attr_accessor :index, :start_time, :end_time, :text | |
| def initialize(list) | |
| @index = list[0] | |
| @start_time, @end_time = list[1].split(' --> ').map{|a1| Time.parse(a1)} | |
| @text = list[2..-1].join(' ') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rem Try the following. | |
| rem Open Notepad and paste the below code. | |
| taskkill /F /IM explorer.exe | |
| cd /d %UserProfile%\AppData\Local | |
| attrib –h IconCache.db | |
| del IconCache.db | |
| start explorer | |
| rem save the file as a .bat file on your desktop. Then open explorer and navigate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by gwang2 on 8/24/2015. | |
| * The code was based on the book "The ThoughWorks Anthology 2" with a minor bug fix. (see comments below) | |
| */ | |
| class XmlBuilder { | |
| Str content | |
| Int indent | |
| new make() { this.content = ""; this.indent = 0} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "in_process_packages": | |
| [ | |
| ], | |
| "installed_packages": | |
| [ | |
| "AdvancedNewFile", | |
| "Alignment", | |
| "All Autocomplete", | |
| "Autoprefixer", |
The MarkdownEditing plugin by default use a theme that becomes annoying when your sublime system theme is of a dark one such as Centurion. More problematic, the plugin's default settings are not editable since it was not automatically saved in the file sysetm
c:\Users\username\Appdata\Roaming\Sublime Text 3\Packages.
- Install the PackageResourceViewer plugin
- ctrl+shift+p and type
prvto bring the PackageResourceViewer up, findMarkdownEditingand hit return. Now the setting files are saved in the file system. - Open
c:\Users\username\Appdata\Roaming\Sublime Text 3\Packages\MarkdownEditing\Markdown.sublime-settings, and make the following changes:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| int combine(int n, int m) | |
| { | |
| int s1, s2, i; | |
| s1=s2=1; | |
| for (i = m+1; i<=n; i++) s1 *= i; | |
| for (i = 1; i<=(n-m); i++) s2 *= i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <string> | |
| #include <iostream> | |
| using namespace std; | |
| void reverse(string s) | |
| { | |
| cout << "input = " << s << endl; | |
| cout << "size = " << s.length() << endl; |