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
| <%= navigation([ | |
| {:overview => root_url}, | |
| {:courses => courses_path}, | |
| {:admin => admin_root_path} | |
| ], :authorize => [:admin], :with => :administrator?)%> |
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
| set nocompatible | |
| " have command-line completion <Tab> (for filenames, help topics, option names) | |
| " first list the available options and complete the longest common part, then | |
| " have further <Tab>s cycle through the possibilities: | |
| set wildmode=list:longest,full | |
| " display the current mode and partially-typed commands in the status line: | |
| set showmode | |
| set showcmd |
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 <iostream> | |
| #include <string> | |
| #include <sstream> | |
| using namespace std; | |
| #define DAYS_IN_YEAR 360 // In order to simplify the program | |
| #define DAYS 30 // use 30 days in each month. | |
| #define MONTHS 12 // This still gives a rough estimate on how | |
| // well the hashing functions work. |
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 <iostream> | |
| #include <string> | |
| #include <sstream> | |
| using namespace std; | |
| #define DAYS_IN_YEAR 360 // In order to simplify the program | |
| #define DAYS 30 // use 30 days in each month. | |
| #define MONTHS 12 // This still gives a rough estimate on how | |
| // well the hashing functions work. |
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 <iostream> | |
| #include <string> | |
| #include <sstream> | |
| using namespace std; | |
| #define DAYS_IN_YEAR 360 // In order to simplify the program | |
| #define DAYS 30 // use 30 days in each month. | |
| #define MONTHS 12 // This still gives a rough estimate on how | |
| // well the hashing functions work. |
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
| !!! strict | |
| !!! | |
| %h1.header HI! | |
| %table | |
| - @images.each do |i| | |
| %tr | |
| %td | |
| %img{ :src => "#{i.path}" } |
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
| get '/rugs/?' do | |
| @images = Image.all | |
| haml(:home) | |
| end | |
| get '/rugs/:id' do | |
| @image = Image.get(params[:id]) | |
| haml :show | |
| end | |
| ----------------------- |
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
| public void ParseFile(string strPath) | |
| { | |
| XmlTextReader xmlReader = new XmlTextReader(strPath); | |
| int iTab = 0; | |
| // Read the line of the xml file | |
| while (xmlReader.Read()) | |
| { | |
| switch (xmlReader.NodeType) | |
| { | |
| case XmlNodeType.Element: |
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
| def deg2ra(num) | |
| if num < 0 | |
| deg = deg + 360 | |
| elsif num > 360 | |
| puts "input should not exceed 360!" | |
| end | |
| hour = (num/15).to_i() | |
| min = ((num-15*hour)*4).to_i() | |
| sec = (4*num-60*hour-min)*60 |
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
| #!/usr/bin/python | |
| # Program to convert a number into the format | |
| # hh mm ss.sssss | |
| # Input format: ./converter.py DEC RA | |
| import math | |
| import sys | |
| import string | |
| def to_dec(inp): |