text:
<repo_name>non/pronoun.is<file_sep>/src/pronouns/pages.clj
(ns pronouns.pages
  (:require [clojure.string :as s]
            [pronouns.util :as u]
            [hiccup.core :refer :all]))

(defn wrap-pronoun
  [pronoun]
  [:b pronoun])

(defn wrap-para
  [whatever]
  [:p whatever])

(defn subject-example
  [subject]
  (wrap-para
   [:span#sentence (wrap-pronoun subject) " went to the park."]))

(defn object-example
  [object]
  (wrap-para
   [:span#sentence "I went with " (wrap-pronoun object) "."]))

(defn posessive-determiner-example
  [subject possessive-determiner]
  (wrap-para
   [:span#sentence (wrap-pronoun subject) " brought " (wrap-pronoun possessive-determiner) " frisbee."]))

(defn possessive-pronoun-example
  [possessive-pronoun]
  (wrap-para
   [:span#sentence "At least I think it was " (wrap-pronoun possessive-pronoun) "."]))

(defn reflexive-example
  [subject reflexive]
  (wrap-para
   [:span#sentence (wrap-pronoun subject) " threw it to " (wrap-pronoun reflexive)]))

(defn twitter-name [name]
  [:a {:href (str "https://www.twitter.com/" name)} (str "@" name)])

(defn contact-block []
  [:div {:class "contact"}
   [:p "Written by " (twitter-name "morganastra") " and " (twitter-name "thelseraphim") ". "
   "Visit the project on " [:a {:href "https://github.com/witch-house/pronoun.is"} "github!"]]])

(defn about-block []
  [:div {:class "about"}
   [:p "Full usage:"]
   [:p
    [:tt "http://pronoun.is/subject-pronoun/object-pronoun/possessive-determiner/possessive-pronoun/reflexive"]
    " displays examples of your pronouns. If we have a good guess we'll let you use just the first one or two."]
   [:p "Quick examples:"]
   [:p "My name is <NAME>, my " [:a {:href "http://pronoun.is/she"} "pronoun.is/she"] "."]
   [:p "My name is Morgan, my " [:a {:href "http://pronoun.is/ze/zir"} "pronoun.is/ze/zir"] "."]])

(defn examples-block
  [subject object possessive-determiner possessive-pronoun reflexive]
  [:div {:class "examples"}
   [:p [:h1 "Here are some usage examples for my pronouns:"]]
   (subject-example subject)
   (object-example object)
   (posessive-determiner-example subject possessive-determiner)
   (possessive-pronoun-example possessive-pronoun)
   (reflexive-example subject reflexive)])

(defn format-pronoun-examples
  [subject object possessive-determiner possessive-pronoun reflexive]
  (html
   [:html
    [:head
     [:title "Pronoun examples"]
     [:link {:rel "stylesheet" :href "/pronouns.css"}]]
    [:body
     (examples-block subject object possessive-determiner possessive-pronoun reflexive)
     (about-block)
     (contact-block)]]))

(defn parse-pronouns-with-lookup [pronouns-string pronouns-table]
  (let [inputs (s/split pronouns-string #"/")
        n (count inputs)]
    (if (>= n 5)
      (take 5 inputs)
      (u/table-lookup inputs pronouns-table))))

(defn front []
  (str "pronoun.is is a www site for showing people how to use pronouns"))

(defn not-found []
  (str "We couldn't find those pronouns in our database, please ask us to "
       "add them, or issue a pull request at "
       "https://github.com/witch-house/pronoun.is/blob/master/resources/pronouns.tab"))

(defn pronouns [path pronouns-table]
  (let [pronouns (parse-pronouns-with-lookup path pronouns-table)]
    (if pronouns
      (apply format-pronoun-examples pronouns)
      (not-found))))
<file_sep>/src/pronouns/util.clj
(ns pronouns.util
  (:require [clojure.string :as s]))

(defn slurp-tabfile [path]
  (let [lines (s/split (slurp path) #"\n")]
    (map #(s/split % #"\t") lines)))

(defn table-lookup
  [query-key table]
  (let [arity (count query-key)
        filtered-table (filter #(= query-key (take arity %)) table)]
    (first filtered-table)))

(defn tabfile-lookup
  [query-key tabfile]
  (table-lookup query-key (slurp-tabfile tabfile)))

repo_language: Clojure


text:
<repo_name>adengz/reactnd-project-myreads-starter<file_sep>/src/components/Book.js
import React from 'react';

function Book(props) {
  const { bookObj, changeShelf } = props;
  const shelfChangeHandler = (e) => {
    const newShelf = e.target.value;
    changeShelf(bookObj, newShelf);
  }

  return (

        <div
          className="book-cover"
          style={{
            width: 128,
            height: 193,
            backgroundImage: `url(${bookObj.imageLinks && bookObj.imageLinks.thumbnail})`
          }}
        >

          <select value={bookObj.shelf? bookObj.shelf:'none'} onChange={shelfChangeHandler}>
            <option value="move" disabled>Move to...</option>
            <option value="currentlyReading">Currently Reading</option>
            <option value="wantToRead">Want to Read</option>
            <option value="read">Read</option>
            <option value="none">None</option>
          </select>

{bookObj.title}

{bookObj.authors && bookObj.authors[0]}

  );
}

export default Book;<file_sep>/src/App.js
import React from 'react';
import { Route } from 'react-router-dom';
import MainPage from './views/MainPage';
import SearchPage from './views/SearchPage';
import * as BooksAPI from './BooksAPI';
import './App.css';

class BooksApp extends React.Component {
  state = {
    myBooks: []
  }

  changeShelf = (book, newShelf) => {
    const idx = this.state.myBooks.findIndex(b => b.id === book.id);
    let myBooksUpdated = [...this.state.myBooks];
    if (idx === -1) {
      book.shelf = newShelf;
      myBooksUpdated.push(book);
    } else if (newShelf === 'none') {
      myBooksUpdated = myBooksUpdated.filter(b => b.id !== book.id);
    } else {
      myBooksUpdated[idx].shelf = newShelf;
    }
    BooksAPI.update(book, newShelf).then(() => {
      this.setState({myBooks: myBooksUpdated});
    });
  }

  componentDidMount() {
    BooksAPI.getAll().then((books) => {
      this.setState({myBooks: books});
    });
  }

  render() {
    return (

        <Route exact path="/" render={() => (
          <MainPage myBooks={this.state.myBooks} changeShelf={this.changeShelf} />
        )}/>
        <Route path="/search" render={() => (
          <SearchPage myBooks={this.state.myBooks} changeShelf={this.changeShelf} />
        )}/>

    );
  }
}

export default BooksApp;
<file_sep>/src/views/MainPage.js
import React from 'react';
import { Link } from 'react-router-dom';
import BookShelf from '../components/BookShelf';

function MainPage(props) {
  const { myBooks, changeShelf } = props;
  const currentlyReading = myBooks.filter(book => book.shelf === 'currentlyReading');
  const wantToRead = myBooks.filter(book => book.shelf === 'wantToRead');
  const read = myBooks.filter(book => book.shelf === 'read');

  return (

MyReads

          <BookShelf title="Currently Reading" books={currentlyReading} changeShelf={changeShelf}/>
          <BookShelf title="Want to Read" books={wantToRead} changeShelf={changeShelf}/>
          <BookShelf title="Read" books={read} changeShelf={changeShelf}/>

        <Link to="/search">
          <button>Add a book</button>
        </Link>

  );
}

export default MainPage;

branch_name: refs/heads/master

repo_language: JavaScript

repo_name: adengz/reactnd-project-myreads-starter


text:
<file_sep>#!/bin/sh

# SOLAR SANDBOX + CAPE COD
# October 2015 v 0.1
# by Asher & Co STA

# ABOUT: syncronize our two computers

# TODO: file paths
# TODO: our own cksum $file
# TODO: bitwise copy/link

# • Our own Custom Web Server Tools (Adding to Todd's Github Project)
# • Login (SSH / SFTP) Creating Username + Passwords + https & SSL + DNS TABLES
# • Continuous Backups (2 nodes) + SSD Disk Drives (power) + Town Chat
# • Schematic + Network + Wireless gateway to Ethernet
# • Solar Panels, Alternators + Wind + Car Batteries + Voltage Regulators
# • Free for Cape Coders
# • Solar Sandbox Locations: Mashpee (@Todd's), Hyannis (@Shanes), Falmouth (@CCMakers?)

# DATE TIME DETAILS: http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/
DAY=$(date +"%A") # day of week
TIME=$(date +"%I:%M:%S %p") # time

echo "RSYNC - SOLAR LINK ($TIME)"

# create an array with all users
USERS=$(ls /home/)
# rsync: settings / config
# get an array list of all users
# chown
DIR[0]="/public_html"
DIR[1]=""
FILE[0]="rsync.log"
#mkdir -p $PATH2FILE
LOG='rsync.log'
cat > $LOG <<EOF
RSYNC - LOG
EOF

# iterate through array using a counter
for ((i=0; i<${#USERS[@]}; i++)); do
    #do something to each element of array
    echo "${USERS[$i]}"
done

# -e is for the protocol type
rsync -avzhe ssh Asher@localhost:/home/Asher/rsync_test/rsync.log /tmp/
#rsync --recursive --verbose --include=$TEST_FILE --exclude=* rsync://12192.168.127.12/centos-test /var/log/

echo "STATUS" . $?

repo_language: Shell

repo_name: tmcosta/solar


text:
<repo_name>susanlmarsh/Invoicing-App<file_sep>/README.md
# Invoicing-App
Invoicing mobile app

branch_name: refs/heads/main

repo_language: Markdown

repo_name: susanlmarsh/Invoicing-App


text:
<repo_name>Hug00/nang<file_sep>/nang-proj/MyTableViewController.swift
//
//  ViewController.swift
//  nang
//
//  Created by 黄晋雪 on 8/20/16.
//  Copyright © 2016 黄晋雪. All rights reserved.
//

import UIKit

class MyTabeViewController: UITableViewController{

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
//        只显示有内容的列表项
        self.tableView.tableFooterView = UIView()
//        分割线的左边距
//        self.tableView.separatorInset.left = 0
        let leftBarButton = UIBarButtonItem(title: "", style: .Plain, target: self, action: "toSetPage")
//        设置图片并设置图片无渲染
        leftBarButton.image = UIImage(named: "set")?.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)
        self.navigationItem.leftBarButtonItem = leftBarButton
        self.navigationItem.titleView = UIImageView(image: UIImage(named: "nang"))
//        取消左边空隙
        let spacer = UIBarButtonItem(barButtonSystemItem: .FixedSpace, target: nil,
                                     action: nil)
        spacer.width = -10;
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }

//    override func numberOfSectionsInTableView(tableView: UITableView) -> Int {
//        return 1
//    }

    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        self.tableView.rowHeight = 60
        return 5
    }

    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCellWithIdentifier("Itemscell")
        return cell!
    }

}

<file_sep>/nang-proj/DetailWebViewController.swift
//
//  DetailWebViewController.swift
//  nang
//
//  Created by 黄晋雪 on 8/21/16.
//  Copyright © 2016 黄晋雪. All rights reserved.
//

import Foundation

repo_language: Swift