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
tmp = a^n | |
answer = tmp | |
for (i = 1; i <= n; i += 1) { | |
tmp = (tmp * (n-i+1) * x )/(a * i) | |
answer = answer + tmp | |
} |
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 RPi.GPIO as GPIO | |
import time | |
import os | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(18, GPIO.IN, pull_up_down=GPIO.PUD_UP) | |
while True: | |
input_state = GPIO.input(18) | |
if input_state ==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-dates/initialize'; | |
import 'react-dates/lib/css/_datepicker.css'; | |
import React from 'react'; | |
import moment from 'moment'; | |
import { SingleDatePicker } from 'react-dates'; | |
const now = moment().format('MMM Do, YYYY'); | |
export default class ExpenseForm extends React.Component { |
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
function init_pagination() { | |
var hash, loading_articles, page_regexp, pushPage, title_of_article; | |
page_regexp = /\d+$/; | |
pushPage = function(page) { | |
if (page == "1") { | |
title_of_article = $("input#article_friendly_id")[0].value; | |
} | |
history.pushState(null, "InfiniteScrolling | Page " + page, title_of_article); | |
}; | |
window.preparePagination = function(el) { |
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
<div class='row'> | |
<div id='content-column' class="col-md-8 col-sm-9 col-xs-12"> | |
<%= yield %> | |
</div> | |
<div class="col-md-4 col-sm-3 col-xs-12"> | |
<%= render 'home/management_content' %> | |
</div> | |
</div> | |
</div> | |
</div> |
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
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. | |
/Users/hyejinahn/.rvm/rubies/ruby-2.1.3/bin/ruby extconf.rb | |
checking for rb_trap_immediate in ruby.h,rubysig.h... no | |
checking for rb_thread_blocking_region()... yes | |
checking for ruby/thread.h... yes | |
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes | |
checking for inotify_init() in sys/inotify.h... no | |
checking for __NR_inotify_init in sys/syscall.h... no |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>TestApp</title> | |
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> | |
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> | |
<%= csrf_meta_tags %> | |
<meta property="fb:app_id" content="1906292329591719" /> | |
<meta property="og:url" content="https://protected-lowlands-45584.herokuapp.com/" /> | |
<meta property="og:title" content="TestApp" /> |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. | |
/Users/hyejinan/.rvm/rubies/ruby-2.2.5/bin/ruby -r | |
./siteconf20170324-25168-3oi6k.rb extconf.rb | |
checking for gcc... yes | |
checking for Magick-config... no | |
checking for pkg-config... yes | |
checking for outdated ImageMagick version (<= 6.4.9)... no | |
checking for presence of MagickWand API (ImageMagick version >= 6.9.0)... no | |
checking for Ruby version >= 1.8.5... yes |
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
<div class="row"> | |
<div class="col-lg-12"> | |
<div class="panel"> | |
<header class="panel-heading lead">고객 사진 추가</header> | |
<div class="panel-body"> | |
<%= simple_form_for( [:staffs, @user], url: staffs_user_photo_path, html: { class: 'form-horizontal', multipart: true } ) do |f| %> | |
<% if @user.errors.present? %> | |
<script type="text/javascript"> | |
<% @user.errors.full_messages.each do |msg| %> | |
toastr.error('<%= msg %>'); |