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
| import React, { Component } from 'react'; | |
| import './App.css'; | |
| import { BrowserRouter as Router, Link, Redirect, Route } from 'react-router-dom'; | |
| import Auth from './modules/Auth'; | |
| import ThoughtRecordList from './components/ThoughtRecordList'; | |
| import RegisterForm from './components/RegisterForm'; | |
| import LoginForm from './components/LoginForm'; | |
| import ThoughtRecordForm from './components/ThoughtRecordForm'; | |
| import Features from './components/Features'; |
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
| import React, { Component } from 'react'; | |
| import Auth from '../modules/Auth' | |
| class Dashboard extends Component { | |
| constructor() { | |
| super(); | |
| this.state = { | |
| myThoughtRecords: null, | |
| thoughtRecordsLoaded: false, | |
| } |
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
| import React, { Component } from 'react'; | |
| class ThoughtRecordList extends Component { | |
| constructor() { | |
| super(); | |
| this.state = { | |
| thoughtRecordList: null, | |
| thoughtRecordListLoaded: false, | |
| } | |
| } |
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
| import React from 'react' | |
| import { Form, Field } from 'react-final-form' | |
| import axios from 'axios' | |
| const csrfToken = document.querySelector('[name="csrf-token"]').content; | |
| axios.defaults.headers.common['X-CSRF-TOKEN'] = csrfToken; | |
| const h1style = { | |
| color: 'blue', |
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
| //Solved by Hemant Torsekar on August 19, 2016 | |
| //1. Write a method that takes a string reverses the order of the words in that string and returns the result. | |
| func reverse(string: String)->String { | |
| let reverseString = String(string.characters.reverse()) | |
| return(reverseString) | |
| } |
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
| > open ~/.bash_profile | |
| Inside .bash_profile: | |
| export PATH=“/usr/local/bin:$PATH” | |
| > ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl | |
| > subl . |
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
| class ChargesController < ApplicationController | |
| skip_before_filter :verify_authenticity_token, :only => :deposit_payment | |
| skip_before_filter :verify_authenticity_token, :only => :balance_payment | |
| def new | |
| end | |
| def deposit_payment | |
| @guest = Guest.find(session[:guest_id]) |
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
| # This is a manifest file that'll be compiled into application.js, which will include all the files | |
| # listed below. | |
| # | |
| # Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | |
| # or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. | |
| # | |
| # It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
| # the compiled file. | |
| # | |
| # WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD |
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 'rubygems' | |
| require 'twitter' | |
| Twitter.configure do |config| | |
| config.consumer_key = " " | |
| config.consumer_secret = " " | |
| config.oauth_token = " " | |
| config.oauth_token_secret = " " | |
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 "test/unit" | |
| require_relative "hangman2" | |
| class HangmanTest < Test::Unit::TestCase | |
| def test_intialize_starts_with_eight_chances | |
| h = Hangman.new("kggdfdsa") | |
| assert_equal 8, h.chances | |
| end |
NewerOlder