All Files (88.05% covered at 6.58 hits/line)
42 files in total.
435 relevant lines.
383 lines covered and
52 lines missed
- 1
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
- 1
protect_from_forgery with: :exception
- 1
before_action :configure_permitted_parameters, if: :devise_controller?
- 1
before_filter :ensure_signup_complete
- 1
protected
- 1
def ensure_signup_complete
# Ensure we don't go into an infinite loop
- 234
return if action_name == 'finish_signup'
# Redirect to the 'finish_signup' page if the user
# email hasn't been verified yet
- 233
if current_user && (!current_user.email_verified? || current_user.role.nil?)
- 1
redirect_to finish_signup_path(current_user)
end
end
- 1
def configure_permitted_parameters
- 154
devise_parameter_sanitizer.permit(:sign_up, keys: [:role] )
end
- 1
def after_sign_in_path_for(resource)
- 39
dashboard_path
end
end
- 1
class CommunitiesController < ApplicationController
- 1
before_action :authenticate_user!
- 1
before_filter :is_community?, only: [:edit, :destroy]
- 1
def index
- 8
@communities = Community.all.order('id ASC')
- 8
respond_to do |format|
- 8
format.html
- 15
format.json { render :json => @communities }
end
end
- 1
def show
- 7
@community = Community.find(params[:id])
- 7
@loan = LoanRequest.new
end
- 1
def edit
- 1
@community = Community.find(params[:id])
end
- 1
def update
- 1
@community = Community.find(params[:id])
- 1
if @community.update_attributes community_params
- 1
redirect_to dashboard_path
end
end
- 1
def new
- 4
@community = Community.new
- 4
@community.build_address
end
- 1
def create
- 2
@community = Community.new community_params
- 2
if @community.save
- 1
redirect_to dashboard_path
else
- 1
flash[:error] = "Please fill out required fields."
- 1
redirect_to :back
end
end
- 1
def destroy
@community = Community.find(params[:id])
@community.destroy
flash[:notice] =<EMAIL_ADDRESS>was successfully deleted."
redirect_to dashboard_path
end
- 1
private
- 1
def is_community?
- 1
if !current_user.is?(:Community) || current_user.community.nil?
flash[:error] = "You cannot do this action."
redirect_to dashboard_path
end
end
- 1
def community_params
- 3
params.require(:community).permit(:name, :description, :total_loan_amount, :interest_rate, :terms, :max_loan_amount, :loan_period, :number, :email, :website, :user_id, images_attributes: [:location], address_attributes: [:house_number, :street, :city, :state, :zip] )
end
end
- 1
class HomeController < ApplicationController
- 1
def index
end
- 1
def upload
uploaded_io = params[:file]
File.open(Rails.root.join('public', 'uploads', uploaded_io.original_filename), 'wb') do |file|
file.write(uploaded_io.read)
end
render json: params[:file].original_filename
end
end
- 1
class LoanRequestsController < ApplicationController
- 1
before_action :authenticate_user!
- 1
def create
- 2
@loan = LoanRequest.new loan_params
- 2
@loan.user_id = current_user.id
- 2
if @loan.save
- 1
LoanRequestMailer.send_email(Community.find(loan_params["community_id"]).user).deliver_now
- 1
flash[:notice] = "Loan request sent."
- 1
redirect_to dashboard_path
else
- 1
redirect_to :back
end
end
- 1
def inbox
- 1
@requests = LoanRequest.where(community_id: current_user.community.id, accepted: false)
end
- 1
private
- 1
def loan_params
- 3
params.require(:loan_request).permit(:body, :community_id)
end
end
- 1
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
# You should configure your model like this:
# devise :omniauthable, omniauth_providers: [:twitter]
# You should also create an action method in this controller like this:
# def twitter
# end
# More info at:
# https://github.com/plataformatec/devise#omniauth
# GET|POST /resource/auth/twitter
# def passthru
# super
# end
# GET|POST /users/auth/twitter/callback
# def failure
# super
# end
# protected
# The path used when OmniAuth fails
# def after_omniauth_failure_path_for(scope)
# super(scope)
# end
- 1
def self.provides_callback_for(provider)
- 2
class_eval %Q{
def #{provider}
@user = User.find_for_oauth(env["omniauth.auth"], current_user)
if @user.persisted?
sign_in_and_redirect @user, event: :authentication
set_flash_message(:notice, :success, kind: "#{provider}".capitalize) if is_navigational_format?
else
session["devise.#{provider}_data"] = env["omniauth.auth"]
redirect_to new_user_registration_url
end
end
}
end
- 1
[:facebook, :google_oauth2].each do |provider|
- 2
provides_callback_for provider
end
end
- 1
class Users::RegistrationsController < Devise::RegistrationsController
- 1
before_action :configure_sign_up_params, only: [:create]
- 1
before_action :configure_account_update_params, only: [:update]
# GET /resource/sign_up
# POST /resource
# def create
# super
# end
# GET /resource/edit
# def edit
# super
# end
# PUT /resource
# def update
# super
# end
- 1
def destroy
- 1
User.destroy(params[:id])
- 1
flash[:notice] = "User deleted."
- 1
redirect_to dashboard_path
end
# GET /resource/cancel
# Forces the session data which is usually expired after sign
# in to be expired now. This is useful if the user wants to
# cancel oauth signing in/up in the middle of the process,
# removing all OAuth session data.
# def cancel
# super
# end
- 1
protected
#If you have extra params to permit, append them to the sanitizer.
- 1
def configure_sign_up_params
- 3
devise_parameter_sanitizer.permit(:sign_up, keys: [:name])
end
#If you have extra params to permit, append them to the sanitizer.
- 1
def configure_account_update_params
- 2
devise_parameter_sanitizer.permit(:account_update, keys: [:name])
end
- 1
def after_update_path_for(resource)
- 2
dashboard_path
end
# The path used after sign up.
# def after_sign_up_path_for(resource)
# super(resource)
# end
# The path used after sign up for inactive accounts.
# def after_inactive_sign_up_path_for(resource)
# super(resource)
# end
end
- 1
class Users::SessionsController < Devise::SessionsController
- 48
before_filter ->{ authenticate_user!( force: true ) }, only: [:dashboard, :show, :zipcodes]
- 1
def dashboard
- 47
@loan = LoanRequest.new
- 47
if current_user.is? :Admin
- 6
@users = User.all
- 6
@communities = Community.all
- 6
render 'admin_dashboard'
- 41
elsif current_user.is? :Borrower
- 25
if !params[:search].blank?
- 2
@communities = []
- 2
decode_search
else
- 23
if params[:sort]
@communities = []
decode_sort
else
- 23
@communities = Community.all
end
end
- 25
render 'borrower_dashboard'
else
- 16
@community = current_user.community
- 16
if !current_user.community.nil?
- 12
@community.images.build
end
- 16
render 'community_dashboard'
end
end
- 1
def show
@user = User.find(params[:id])
end
- 1
private
- 1
def decode_search
- 2
if params[:search] =~ /^\d{5}$/
- 2
@addresses = Address.where(:zip => params[:search])
- 2
@communities = []
- 2
@addresses.each do |a|
@communities << a.community
end
elsif params[:search] =~ /^\d.*\d$/
@communities = Community.find_address(params[:search])
else
@communities = Community.where("name LIKE ?", "%#{params[:search]}%")
end
end
- 1
def decode_sort
if params[:sort] == "max_loan_amount"
@communities = Community.order('max_loan_amount ASC')
else
@communities = Community.order('name ASC')
end
end
end
- 1
class UsersController < ApplicationController
- 1
before_action :set_user, only: [:show, :edit, :update, :destroy, :finish_signup]
# GET /users/:id.:format
- 1
def show
# authorize! :read, @user
end
# GET /users/:id/edit
- 1
def edit
# authorize! :update, @user
end
# PATCH/PUT /users/:id.:format
- 1
def update
# authorize! :update, @user
if @user.update(user_params)
sign_in(@user == current_user ? @user : current_user, :bypass => true)
redirect_to @user, notice: 'Your profile was successfully updated.'
else
render action: 'edit'
end
end
# GET/PATCH /users/:id/finish_signup
- 1
def finish_signup
# authorize! :update, @user
- 1
if request.patch? && params[:user] #&& params[:user][:email]
if @user.update(user_params)
<EMAIL_ADDRESS>sign_in(@user, :bypass => true)
redirect_to @user, notice: 'Your profile was successfully updated.'
else
@show_errors = true
end
end
end
- 1
private
- 1
def set_user
- 1
@user = User.find(params[:id])
end
- 1
def user_params
accessible = [ :name, :email, :role ] # extend with your own params
accessible << [ :password, :password_confirmation ] unless params[:user][:password].blank?
params.require(:user).permit(accessible)
end
end
- 1
module ApplicationHelper
- 1
def bootstrap_class_for flash_type
- 51
{ success: "alert-success", error: "alert-error", alert: "alert-warning", notice: "alert-info" }[flash_type.to_sym] || flash_type.to_s
end
- 1
def flash_messages(opts = {})
- 166
flash.each do |msg_type, message|
- 51
concat(content_tag(:div, message, class: "alert #{bootstrap_class_for(msg_type)} fade in") do
- 51
concat content_tag(:button, 'x', class: "close", data: { dismiss: 'alert' })
- 51
concat message
end)
end
nil
end
end
- 1
class ApplicationMailer < ActionMailer::Base
- 1
default from<EMAIL_ADDRESS>- 1
layout 'mailer'
end
- 1
class LoanRequestMailer < ApplicationMailer
- 1
def send_email(user)
- 1
@user = user
- 1
@url = 'http://esential-2016.herokuapp.com/users/sign_in'
- 1
mail(to: @user.email, subject: 'Welcome to My Awesome Site')
end
end
- 1
class Address < ActiveRecord::Base
- 1
belongs_to :community
- 1
validates :house_number, :street, :city, :state, :zip, presence: true
- 1
validates :house_number, :zip, numericality: { only_integer: true }
- 1
def format
- 45
return "#{house_number} #{street} #{city} #{state}, #{zip}"
end
end
- 1
class Community < ActiveRecord::Base
- 1
has_one :address
- 1
belongs_to :user
- 1
has_many :images
- 1
has_many :loan_requests
- 1
accepts_nested_attributes_for :images, :address,
:reject_if => :all_blank
- 1
validates :name, :description, :total_loan_amount, :max_loan_amount, :interest_rate, :loan_period, presence: true
- 1
validates :name, uniqueness: true
- 1
validates :number, :total_loan_amount, :max_loan_amount, :interest_rate, :loan_period, numericality: { only_integer: true }
# Custom JSON format
- 1
def as_json(options={})
- 21
{ :name => self.name, :address => self.address.format, :zipcode => self.address.zip }
end
- 1
def self.find_address(address)
@community = Community.all.reject { |c| c.address.format != address}
end
- 1
def must_have_address
errors.add(:address, 'must have address') if self.address.nil?
end
end
- 1
class Identity < ActiveRecord::Base
- 1
belongs_to :user
- 1
validates_presence_of :uid, :provider
- 1
validates_uniqueness_of :uid, :scope => :provider
- 1
def self.find_for_oauth(auth)
- 1
find_or_create_by(uid: auth.uid, provider: auth.provider)
end
end
- 1
class Image < ActiveRecord::Base
- 1
belongs_to :community
- 1
belongs_to :user
end
- 1
class LoanRequest < ActiveRecord::Base
- 1
validates :body, presence: true
- 1
belongs_to :user
- 1
belongs_to :community
end
- 1
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
- 1
TEMP_EMAIL_PREFIX = 'change@me'
- 1
TEMP_EMAIL_REGEX = /\Achange@me/
- 1
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable, :omniauthable, :omniauth_providers => [:facebook, :google_oauth2]
- 1
has_one :community
- 1
has_many :images
- 1
has_many :loan_requests
- 1
validates :email, format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, on: :update }
- 1
def is?(role)
- 162
self.role == role.to_s
end
- 1
def self.find_for_oauth(auth, signed_in_resource = nil)
# Get the identity and user if they exist
- 1
identity = Identity.find_for_oauth(auth)
# If a signed_in_resource is provided it always overrides the existing user
# to prevent the identity being locked with accidentally created accounts.
# Note that this may leave zombie accounts (with no associated identity) which
# can be cleaned up at a later date.
- 1
user = signed_in_resource ? signed_in_resource : identity.user
# Create the user if needed
- 1
if user.nil?
# Get the existing user by email if the provider gives us a verified email.
# If no verified email was provided we assign a temporary email and ask the
# user to verify it on the next step via UsersController.finish_signup
- 1
email_is_verified = auth.info.email && (auth.info.verified || auth.info.verified_email)
- 1
email = auth.info.email if email_is_verified
- 1
user = User.where(:email => email).first if email
# Create the user if it's a new registration
- 1
if user.nil?
- 1
user = User.new(
name: auth.extra.raw_info.name,
#username: auth.info.nickname || auth.uid,
email: email ? email : "#{TEMP_EMAIL_PREFIX}-#{auth.uid}-#{auth.provider}.com",
password: Devise.friendly_token[0,20],
role: "Borrower"
)
- 1
user.skip_confirmation! if user.respond_to?(:skip_confirmation)
- 1
user.save!
end
end
# Associate the identity with the user if needed
- 1
if identity.user != user
- 1
identity.user = user
- 1
identity.save!
end
- 1
user
end
- 1
def email_verified?
- 122
self.email && self.email !~ TEMP_EMAIL_REGEX
end
end
- 1
require File.expand_path('../boot', __FILE__)
- 1
require "rails"
# Pick the frameworks you want:
- 1
require "active_model/railtie"
- 1
require "active_job/railtie"
- 1
require "active_record/railtie"
- 1
require "action_controller/railtie"
- 1
require "action_mailer/railtie"
- 1
require "action_view/railtie"
- 1
require "sprockets/railtie"
# require "rails/test_unit/railtie"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
- 1
Bundler.require(*Rails.groups)
- 1
module Esential
- 1
class Application < Rails::Application
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Do not swallow errors in after_commit/after_rollback callbacks.
- 1
config.active_record.raise_in_transactional_callbacks = true
end
end
- 1
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
- 1
require 'bundler/setup' # Set up gems listed in the Gemfile.
# Load the Rails application.
- 1
require File.expand_path('../application', __FILE__)
# Initialize the Rails application.
- 1
Rails.application.initialize!
- 1
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# The test environment is used exclusively to run your application's
# test suite. You never need to work with it otherwise. Remember that
# your test database is "scratch space" for the test suite and is wiped
# and recreated between test runs. Don't rely on the data there!
- 1
config.cache_classes = true
# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
- 1
config.eager_load = false
# Configure static file server for tests with Cache-Control for performance.
- 1
config.serve_static_files = true
- 1
config.static_cache_control = 'public, max-age=3600'
# Show full error reports and disable caching.
- 1
config.consider_all_requests_local = true
- 1
config.action_controller.perform_caching = false
# Raise exceptions instead of rendering exception templates.
- 1
config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment.
- 1
config.action_controller.allow_forgery_protection = false
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
- 1
config.action_mailer.delivery_method = :test
# Randomize the order test cases are executed.
- 1
config.active_support.test_order = :random
# Print deprecation notices to the stderr.
- 1
config.active_support.deprecation = :stderr
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
end
# Be sure to restart your server when you modify this file.
# Version of your assets, change this if you want to expire all your assets.
- 1
Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path
# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# Rails.application.config.assets.precompile += %w( search.js )
# Be sure to restart your server when you modify this file.
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
# Rails.backtrace_cleaner.remove_silencers!
# ClientSideValidations Initializer
# Disabled validators. The uniqueness validator is disabled by default for security issues. Enable it on your own responsibility!
# ClientSideValidations::Config.disabled_validators = [:uniqueness]
# Uncomment to validate number format with current I18n locale
# ClientSideValidations::Config.number_format_with_locale = true
# Uncomment the following block if you want each input field to have the validation messages attached.
#
# Note: client_side_validation requires the error to be encapsulated within
#
#
- 1
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
- 12
unless html_tag =~ /^<label/
- 7
%{
#{html_tag}#{instance.error_message.first}
}.html_safe
else
- 5
%{
#{html_tag}
}.html_safe
end
end
# Be sure to restart your server when you modify this file.
- 1
Rails.application.config.action_dispatch.cookies_serializer = :json
# Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
- 1
Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmation, reset password and unlock tokens in the database.
# Devise will use the `secret_key_base` as its `secret_key`
# by default. You can change it below and use your own secret key.
# config.secret_key = '03b41fecfcba5fa8a5727a4a704a56bc6f842e56545256e2af544fdf2d40294c05ff9affe157851af1d25be3c7a0d7724d2364561a0c16d31a5865caa48a5e27'
- 1
config.omniauth :facebook, ENV["FACEBOOK_APP_ID"], ENV["FACEBOOK_SECRET"]
- 1
config.omniauth :google_oauth2, "620661603685-s7p08p8fidim77nl5idh1q8b4pvtc1j7.apps.googleusercontent.com", "i9dCyig54tF_Os3AtuuScMW3", access_type: 'online', :client_options => { :ssl => { :verify => !Rails.env.development? } }
# ==> Mailer Configuration
# Configure the e-mail address which will be shown in Devise::Mailer,
# note that it will be overwritten if you use your own mailer class
# with default "from" parameter.
- 1
config.mailer_sender =<EMAIL_ADDRESS># Configure the class responsible to send e-mails.
# config.mailer = 'Devise::Mailer'
# Configure the parent class responsible to send e-mails.
# config.parent_mailer = 'ActionMailer::Base'
# ==> ORM configuration
# Load and configure the ORM. Supports :active_record (default) and
# :mongoid (bson_ext recommended) by default. Other ORMs may be
# available as additional gems.
- 1
require 'devise/orm/active_record'
# ==> Configuration for any authentication mechanism
# Configure which keys are used when authenticating a user. The default is
# just :email. You can configure it to use [:username, :subdomain], so for
# authenticating a user, both parameters are required. Remember that those
# parameters are used only when authenticating and not when retrieving from
# session. If you need permissions, you should implement that in a before filter.
# You can also supply a hash where the value is a boolean determining whether
# or not authentication should be aborted when the value is not present.
# config.authentication_keys = [:email]
# Configure parameters from the request object used for authentication. Each entry
# given should be a request method and it will automatically be passed to the
# find_for_authentication method and considered in your model lookup. For instance,
# if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
# The same considerations mentioned for authentication_keys also apply to request_keys.
# config.request_keys = []
# Configure which authentication keys should be case-insensitive.
# These keys will be downcased upon creating or modifying a user and when used
# to authenticate or find a user. Default is :email.
- 1
config.case_insensitive_keys = [:email]
# Configure which authentication keys should have whitespace stripped.
# These keys will have whitespace before and after removed upon creating or
# modifying a user and when used to authenticate or find a user. Default is :email.
- 1
config.strip_whitespace_keys = [:email]
# Tell if authentication through request.params is enabled. True by default.
# It can be set to an array that will enable params authentication only for the
# given strategies, for example, `config.params_authenticatable = [:database]` will
# enable it only for database (email + password) authentication.
# config.params_authenticatable = true
# Tell if authentication through HTTP Auth is enabled. False by default.
# It can be set to an array that will enable http authentication only for the
# given strategies, for example, `config.http_authenticatable = [:database]` will
# enable it only for database authentication. The supported strategies are:
# :database = Support basic authentication with authentication key + password
# config.http_authenticatable = false
# If 401 status code should be returned for AJAX requests. True by default.
# config.http_authenticatable_on_xhr = true
# The realm used in Http Basic Authentication. 'Application' by default.
# config.http_authentication_realm = 'Application'
# It will change confirmation, password recovery and other workflows
# to behave the same regardless if the e-mail provided was right or wrong.
# Does not affect registerable.
# config.paranoid = true
# By default Devise will store the user in session. You can skip storage for
# particular strategies by setting this option.
# Notice that if you are skipping storage for all authentication paths, you
# may want to disable generating routes to Devise's sessions controller by
# passing skip: :sessions to `devise_for` in your config/routes.rb
- 1
config.skip_session_storage = [:http_auth]
# By default, Devise cleans up the CSRF token on authentication to
# avoid CSRF token fixation attacks. This means that, when using AJAX
# requests for sign in and sign up, you need to get a new CSRF token
# from the server. You can disable this option at your own risk.
# config.clean_up_csrf_token_on_authentication = true
# When false, Devise will not attempt to reload routes on eager load.
# This can reduce the time taken to boot the app but if your application
# requires the Devise mappings to be loaded during boot time the application
# won't boot properly.
# config.reload_routes = true
# ==> Configuration for :database_authenticatable
# For bcrypt, this is the cost for hashing the password and defaults to 11. If
# using other algorithms, it sets how many times you want the password to be hashed.
#
# Limiting the stretches to just one in testing will increase the performance of
# your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
# a value less than 10 in other environments. Note that, for bcrypt (the default
# algorithm), the cost increases exponentially with the number of stretches (e.g.
# a value of 20 is already extremely slow: approx. 60 seconds for 1 calculation).
- 1
config.stretches = Rails.env.test? ? 1 : 11
# Set up a pepper to generate the hashed password.
# config.pepper = '1a1e77df7e648ee8ce1095166a07d0fc1330710d1f9a742576fd5ba17144d5eca4046b81f90879c246d9ec3bdbc3cf4ba5f5ca700838d4e1dbf1f6fdda1f29b6'
# Send a notification email when the user's password is changed
# config.send_password_change_notification = false
# ==> Configuration for :confirmable
# A period that the user is allowed to access the website even without
# confirming their account. For instance, if set to 2.days, the user will be
# able to access the website for two days without confirming their account,
# access will be blocked just in the third day. Default is 0.days, meaning
# the user cannot access the website without confirming their account.
# config.allow_unconfirmed_access_for = 2.days
# A period that the user is allowed to confirm their account before their
# token becomes invalid. For example, if set to 3.days, the user can confirm
# their account within 3 days after the mail was sent, but on the fourth day
# their account can't be confirmed with the token any more.
# Default is nil, meaning there is no restriction on how long a user can take
# before confirming their account.
# config.confirm_within = 3.days
# If true, requires any email changes to be confirmed (exactly the same way as
# initial account confirmation) to be applied. Requires additional unconfirmed_email
# db field (see migrations). Until confirmed, new email is stored in
# unconfirmed_email column, and copied to email column on successful confirmation.
- 1
config.reconfirmable = true
# Defines which key will be used when confirming an account
# config.confirmation_keys = [:email]
# ==> Configuration for :rememberable
# The time the user will be remembered without asking for credentials again.
# config.remember_for = 2.weeks
# Invalidates all the remember me tokens when the user signs out.
- 1
config.expire_all_remember_me_on_sign_out = true
# If true, extends the user's remember period when remembered via cookie.
# config.extend_remember_period = false
# Options to be passed to the created cookie. For instance, you can set
# secure: true in order to force SSL only cookies.
# config.rememberable_options = {}
# ==> Configuration for :validatable
# Range for password length.
- 1
config.password_length = 6..128
# Email regex used to validate email formats. It simply asserts that
# one (and only one) @ exists in the given string. This is mainly
# to give user feedback and not to assert the e-mail validity.
- 1
config.email_regexp = /\A[^@\s]+@[^@\s]+\z/
# ==> Configuration for :timeoutable
# The time you want to timeout the user session without activity. After this
# time the user will be asked for credentials again. Default is 30 minutes.
# config.timeout_in = 30.minutes
# ==> Configuration for :lockable
# Defines which strategy will be used to lock an account.
# :failed_attempts = Locks an account after a number of failed attempts to sign in.
# :none = No lock strategy. You should handle locking by yourself.
# config.lock_strategy = :failed_attempts
# Defines which key will be used when locking and unlocking an account
# config.unlock_keys = [:email]
# Defines which strategy will be used to unlock an account.
# :email = Sends an unlock link to the user email
# :time = Re-enables login after a certain amount of time (see :unlock_in below)
# :both = Enables both strategies
# :none = No unlock strategy. You should handle unlocking by yourself.
# config.unlock_strategy = :both
# Number of authentication tries before locking an account if lock_strategy
# is failed attempts.
# config.maximum_attempts = 20
# Time interval to unlock the account if :time is enabled as unlock_strategy.
# config.unlock_in = 1.hour
# Warn on the last attempt before the account is locked.
# config.last_attempt_warning = true
# ==> Configuration for :recoverable
#
# Defines which key will be used when recovering the password for an account
# config.reset_password_keys = [:email]
# Time interval you can reset your password with a reset password key.
# Don't put a too small interval or your users won't have the time to
# change their passwords.
- 1
config.reset_password_within = 6.hours
# When set to false, does not sign a user in automatically after their password is
# reset. Defaults to true, so a user is signed in automatically after a reset.
# config.sign_in_after_reset_password = true
# ==> Configuration for :encryptable
# Allow you to use another hashing or encryption algorithm besides bcrypt (default).
# You can use :sha1, :sha512 or algorithms from others authentication tools as
# :clearance_sha1, :authlogic_sha512 (then you should set stretches above to 20
# for default behavior) and :restful_authentication_sha1 (then you should set
# stretches to 10, and copy REST_AUTH_SITE_KEY to pepper).
#
# Require the `devise-encryptable` gem when using anything other than bcrypt
# config.encryptor = :sha512
# ==> Scopes configuration
# Turn scoped views on. Before rendering "sessions/new", it will first check for
# "users/sessions/new". It's turned off by default because it's slower if you
# are using only default views.
# config.scoped_views = false
# Configure the default scope given to Warden. By default it's the first
# devise role declared in your routes (usually :user).
# config.default_scope = :user
# Set this configuration to false if you want /users/sign_out to sign out
# only the current scope. By default, Devise signs out all scopes.
# config.sign_out_all_scopes = true
# ==> Navigation configuration
# Lists the formats that should be treated as navigational. Formats like
# :html, should redirect to the sign in page when the user does not have
# access, but formats like :xml or :json, should return 401.
#
# If you have any extra navigational formats, like :iphone or :mobile, you
# should add them to the navigational formats lists.
#
# The "*/*" below is required to match Internet Explorer requests.
# config.navigational_formats = ['*/*', :html]
# The default HTTP method used to sign out a resource. Default is :delete.
- 1
config.sign_out_via = :delete
# ==> OmniAuth
# Add a new OmniAuth provider. Check the wiki for more information on setting
# up on your models and hooks.
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
# ==> Warden configuration
# If you want to use other strategies, that are not supported by Devise, or
# change the failure app, you can configure them inside the config.warden block.
#
# config.warden do |manager|
# manager.intercept_401 = false
# manager.default_strategies(scope: :user).unshift :some_external_strategy
# end
# ==> Mountable engine configurations
# When using Devise inside an engine, let's call it `MyEngine`, and this engine
# is mountable, there are some extra configurations to be taken into account.
# The following options are available, assuming the engine is mounted as:
#
# mount MyEngine, at: '/my_engine'
#
# The router that invoked `devise_for`, in the example above, would be:
# config.router_name = :my_engine
#
# When using OmniAuth, Devise cannot automatically set OmniAuth path,
# so you need to do it manually. For the users scope, it would be:
# config.omniauth_path_prefix = '/my_engine/users/auth'
end
# Be sure to restart your server when you modify this file.
# Configure sensitive parameters which will be filtered from the log file.
- 1
Rails.application.config.filter_parameters += [:password]
- 1
Geocoder.configure(
# Geocoding options
# timeout: 3, # geocoding service timeout (secs)
# lookup: :google, # name of geocoding service (symbol)
# language: :en, # ISO-639 language code
# use_https: false, # use HTTPS for lookup requests? (if supported)
# http_proxy: nil, # HTTP proxy server (user:pass@host:port)
# https_proxy: nil, # HTTPS proxy server (user:pass@host:port)
# api_key: nil, # API key for geocoding service
# cache: nil, # cache object (must respond to #[], #[]=, and #keys)
# cache_prefix: 'geocoder:', # prefix (string) to use for all cache keys
# Exceptions that should not be rescued by default
# (if you want to implement custom error handling);
# supports SocketError and Timeout::Error
# always_raise: [],
# Calculation options
# units: :mi, # :km for kilometers or :mi for miles
# distances: :linear # :spherical or :linear
Geocoder.configure(
api_key: "AIzaSyAJfFJrG4ThonnI919v6wzummPJfYf_Tao"
)
)
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format. Inflections
# are locale specific, and you may define rules for as many different
# locales as you wish. All of these examples are active by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
# These inflection rules are supported but not enabled by default:
# ActiveSupport::Inflector.inflections(:en) do |inflect|
# inflect.acronym 'RESTful'
# end
# Be sure to restart your server when you modify this file.
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Be sure to restart your server when you modify this file.
- 1
Rails.application.config.session_store :cookie_store, key: '_esential_session'
# Be sure to restart your server when you modify this file.
# This file contains settings for ActionController::ParamsWrapper which
# is enabled by default.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
- 1
ActiveSupport.on_load(:action_controller) do
- 1
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
end
# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
# self.include_root_in_json = true
# end
- 1
Rails.application.routes.draw do
- 1
root 'home#index'
- 1
devise_for :users, controllers: { sessions: 'users/sessions', registrations: 'users/registrations', omniauth_callbacks: 'users/omniauth_callbacks' }
- 1
devise_scope :user do
- 1
get '/users/:id', to: 'users/sessions#show', as: 'user'
- 1
get '/dashboard', to: 'users/sessions#dashboard'
- 1
get '/zipcodes', to: 'users/sessions#zipcodes'
end
- 1
match '/users/:id/finish_signup' => 'users#finish_signup', via: [:get, :patch], :as => :finish_signup
- 1
post '/communities/new' => 'communities#create'
- 1
post '/images', to: 'images#create'
- 1
mount JasmineRails::Engine => '/specs' if defined?(JasmineRails)
- 1
resources :communities
- 1
resources :loan_requests, only: [:create]
- 1
get '/inbox' => 'loan_requests#inbox'
- 1
get '/loan_request/accept' => 'loan_requests#accept'
- 1
post '/upload' => 'home#upload'
- 1
get '/communities/index' => 'communities#index'
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
# Example of regular route:
# get 'products/:id' => 'catalog#view'
# Example of named route that can be invoked with purchase_url(id: product.id)
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
# Example resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Example resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Example resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Example resource route with more complex sub-resources:
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', on: :collection
# end
# end
# Example resource route with concerns:
# concern :toggleable do
# post 'toggle'
# end
# resources :posts, concerns: :toggleable
# resources :photos, concerns: :toggleable
# Example resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
end
- 1
Given(/^the following users exist:$/) do |users_table|
- 8
users_table.hashes.each do |user|
- 29
@user = User.create! name: user['name'], email: user['email'], password: user['password'], role: user['role']
end
end
- 1
Given(/^the following communities exist:$/) do |communities_table|
- 10
communities_table.hashes.each_with_index do |c, index|
- 30
@community = Community.create! name: c['name'], description: c['description'], number: c['number'], total_loan_amount: c['total_loan_amount'], max_loan_amount: c['max_loan_amount'], interest_rate: c["interest_rate"], loan_period: c["loan_period"], user_id: index
end
end
- 1
When(/^I click "([^"]*)" next to "([^"]*)"$/) do |link, name|
- 1
within("##{name.gsub(/\s+/, "")}") do
- 1
click_link(link)
end
end
- 1
Then(/^I should not see "([^"]*)"$/) do |arg1|
- 5
page.should have_no_content(arg1)
end
- 1
Then(/^I should not see "([^"]*)" next to "([^"]*)"$/) do |link, name|
- 1
find("##{name.gsub(/\s+/, "")}").should have_no_content(link)
end
- 1
When(/^I type in "([^"]*)"$/) do |arg1|
- 2
fill_in("search", :with => arg1)
end
- 1
Given(/^a community exists with the name "([^"]*)" and the zipcode "([^"]*)"$/) do |name, zip|
- 17
a = Community.create! name: name, description: "random", user_id: 1, max_loan_amount: 1, total_loan_amount: 1, interest_rate: 1, loan_period: 1, number: 1
- 17
address = Address.create! house_number: 2212, street: "Blake St", city: "Berkeley", state: "CA", zip: zip, community_id: a.id
end
- 1
Given(/^a community exists with the name "([^"]*)"$/) do |name|
- 12
Community.create! name: name, description: "random", user_id: 1, max_loan_amount: 1, total_loan_amount: 1, interest_rate: 1, loan_period: 1, number: 1
end
- 1
Then(/^I should see "([^"]*)" in the dropdown$/) do |arg1|
- 3
if page.respond_to? :expect
within('.dropdown-content') do
expect.to have_content(text)
end
end
end
- 1
Then(/^I should not see "([^"]*)" in the dropdown$/) do |arg1|
- 3
if page.respond_to? :expect
within('.dropdown-content') do
expect.to_not have_content(text)
end
end
end
- 1
Then(/^I should not be on my dashboard page$/) do
- 1
current_path = URI.parse(current_url).path
- 1
if current_path.respond_to? :should
- 1
current_path.should_not == '/dashboard'
end
end
- 1
Given(/^a borrower exists with login "(.*) (.*)"$/) do |email, pw|
- 16
User.create(email: email, password: pw, role: "Borrower")
end
- 1
Given(/^a lender exists with login "(.*) (.*)"$/) do |email, pw|
- 4
User.create!(email: email, password: pw, role: "Community")
end
- 1
Then(/^I should see a Google map$/) do
- 1
page.has_selector?('div#markers')
end
- 1
Then(/^I should be able to zoom in and out$/) do
- 1
page.has_selector?("div[title='Zoom in']")
end
- 1
When(/^I click on the marker for "Berkeley"$/) do
- 1
find("div[title='Berkeley']").click
end
- 1
Given(/^the following communities with addresses exist:$/) do |communities_table|
- 2
communities_table.hashes.each_with_index do |c, index|
- 6
@community = Community.create! name: c['name'], description: c['description'], user_id: index, max_loan_amount: 1, total_loan_amount: 1, interest_rate: 1, loan_period: 1, number: 1
- 6
@address = Address.create! house_number: c['house_number'], street: c['street'], city: c['city'], state: c['state'], zip: c['zip'], community_id: @community.id
end
end
- 1
When(/^I follow the link in the info window$/) do
- 1
within('.gm-style-iw') do
- 1
click_link('Berkeley')
end
end
- 1
Then(/^I should see its info window$/) do
- 1
within('.gm-style-iw') do
- 1
page.should have_content('Berkeley')
end
end
- 1
Then(/^I should see markers on the map$/) do
- 1
expect(page).to have_css("img[src='https://maps.gstatic.com/mapfiles/api-3/images/spotlight-poi.png']")
end
- 1
Given(/^a community exists with login "(.*) (.*)" and name "([^"]*)"$/) do |email, pw, name|
- 10
a = User.create(email: email, password: pw, role: "Community")
- 10
Community.create! name: name, description: "random", user_id: a.id, max_loan_amount: 1, total_loan_amount: 1, interest_rate: 1, loan_period: 1, number: 1
end
- 1
When /^(?:|I )fill in "([^"]*)" with "([^"]*)"$/ do |field, value|
- 20
fill_in(field, :with => value)
end
- 1
When /^(?:|I )search for name "([^"]*)"$/ do |value|
- 1
fill_in("search", :with => value)
- 1
find("#search").native.send_key(:Enter)
end
- 1
When(/^I search for zipcode "([^"]*)"$/) do |arg1|
- 2
fill_in("search", :with => arg1)
- 2
find("#search").native.send_key(:Enter)
end
- 1
Then(/^I should see "([^"]*)" before "([^"]*)"$/) do |arg1, arg2|
- 2
aString = page.body.to_s
- 2
if aString.index(arg1)!= nil && aString.index(arg2) !=nil
- 2
if aString.index(arg1) < aString.index(arg2)
else
assert false
end
else
assert false
end
end
- 1
When /^(?:|I )enter "([^"]*)" with "([^"]*)"$/ do |field, value|
- 1
within('#new_loan_request') do
- 1
fill_in(field, :with => value)
end
end
- 1
Given(/^a borrower submits a loan request to me with the text "([^"]*)"$/) do |text|
- 3
LoanRequest.create(body: text, user_id: User.ids.last, community_id: Community.ids.last)
end
- 1
When(/^I follow the link in the email$/) do
- 3
visit path_to('the login page')
end
- 1
Then(/^I attempt to sign up with "(.*) (.*) (.*)"$/) do |email, pw1, pw2|
- 3
fill_in("Email", :with => email)
- 3
fill_in("Password", :with => pw1)
- 3
fill_in("Password Confirmation", :with => pw2)
- 3
find('input[name="commit"]').click
end
- 1
Given(/^a user exists with login "(.*) (.*)"$/) do |email, pw|
- 3
User.create(email: email, password: pw)
end
- 1
And(/^I attempt to login with "(.*) (.*)"$/) do |email, pw|
- 38
fill_in("Email", :with => email)
- 38
fill_in("Password", :with => pw)
- 38
find('input[name="commit"]').click
end
# TL;DR: YOU SHOULD DELETE THIS FILE
#
# This file was generated by Cucumber-Rails and is only here to get you a head start
# These step definitions are thin wrappers around the Capybara/Webrat API that lets you
# visit pages, interact with widgets and make assertions about page content.
#
# If you use these step definitions as basis for your features you will quickly end up
# with features that are:
#
# * Hard to maintain
# * Verbose to read
#
# A much better approach is to write your own higher level step definitions, following
# the advice in the following blog posts:
#
# * http://benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories.html
# * http://dannorth.net/2011/01/31/whose-domain-is-it-anyway/
# * http://elabs.se/blog/15-you-re-cuking-it-wrong
#
- 1
require 'uri'
- 1
require 'cgi'
- 1
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
- 1
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "selectors"))
- 1
module WithinHelpers
- 1
def with_scope(locator)
locator ? within(*selector_for(locator)) { yield } : yield
end
end
- 1
World(WithinHelpers)
- 1
Given /^(?:|I )am on (.+)$/ do |page_name|
- 43
visit path_to(page_name)
end
# Then /^(?:|I )should be on "([^"]*)"$/ do |page_name|
# current_path = URI.parse(current_url).path
# if current_path.respond_to? :should
# current_path.should == path_to(page_name)
# else
# assert_equal path_to(page_name), current_path
# end
# end
- 1
When /^(?:|I )press "([^"]*)"$/ do |button|
- 10
click_button(button)
end
- 1
When /^(?:|I )follow "([^"]*)"$/ do |link|
- 67
click_link(link)
end
- 1
Then /^(?:|I )should see "([^"]*)"$/ do |text|
- 54
if page.respond_to? :expect
expect.to have_content(text)
end
end
- 1
Then /^(?:|I )should be on (.+)$/ do |page_name|
- 22
current_path = URI.parse(current_url).path
- 22
if current_path.respond_to? :should
- 22
current_path.should == path_to(page_name)
else
assert_equal path_to(page_name), current_path
end
end
# TL;DR: YOU SHOULD DELETE THIS FILE
#
# This file is used by web_steps.rb, which you should also delete
#
# You have been warned
- 1
module NavigationHelpers
# Maps a name to a path. Used by the
#
# When /^I go to (.+)$/ do |page_name|
#
# step definition in web_steps.rb
#
- 1
def path_to(page_name)
- 68
case page_name
when /^the home\s?page$/
- 45
'/'
when /^the login\s?page$/
- 7
'/users/sign_in'
when /^the signup\s?page$/
- 2
'/users'
when /"(.*)" profile/
- 1
'/users/edit'
when /^my dashboard$/
- 11
'/dashboard'
when /^the community show page$/
- 1
'/communities/1'
when /^new community page$/
- 1
'/communities/new'
# Add more mappings here.
# Here is an example that pulls values out of the Regexp:
#
# when /^(.*)'s profile page$/i
# user_profile_path(User.find_by_login($1))
else
begin
page_name =~ /^the (.*) page$/
path_components = $1.split(/\s+/)
self.send(path_components.push('path').join('_').to_sym)
rescue NoMethodError, ArgumentError
raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
"Now, go and add a mapping in #{__FILE__}"
end
end
end
end
- 1
World(NavigationHelpers)
# TL;DR: YOU SHOULD DELETE THIS FILE
#
# This file is used by web_steps.rb, which you should also delete
#
# You have been warned
- 1
module HtmlSelectorsHelpers
# Maps a name to a selector. Used primarily by the
#
# When /^(.+) within (.+)$/ do |step, scope|
#
# step definitions in web_steps.rb
#
- 1
def selector_for(locator)
case locator
when "the page"
"html > body"
# Add more mappings here.
# Here is an example that pulls values out of the Regexp:
#
# when /^the (notice|error|info) flash$/
# ".flash.#{$1}"
# You can also return an array to use a different selector
# type, like:
#
# when /the header/
# [:xpath, "//header"]
# This allows you to provide a quoted selector as the scope
# for "within" steps as was previously the default for the
# web steps:
when /^"(.+)"$/
$1
else
raise "Can't find mapping from \"#{locator}\" to a selector.\n" +
"Now, go and add a mapping in #{__FILE__}"
end
end
end
- 1
World(HtmlSelectorsHelpers)


---
title: Verifying SSL Certificate Request Details
date: '2011-01-21T09:52:00.000-08:00'
tags:
- SSL
modified_time: '2011-07-26T13:34:32.248-07:00'
blogger_id: tag:blogger.com,1999:blog-19111454.post-8770493890739323384
blogger_orig_url: http://www.bryansgeekspeak.com/2011/01/verifying-ssl-certificate-request.html
---
Certificate Details
Now that I manage a lot of SSL certificates and generate requests/renewals, I've gotten used to using OpenSSL for double checking all my cert request info. Right now, I use Cygwin (a linux emulator for windows) to run OpenSSL on my windows box. From there I can open a Cygwin prompt and run OpenSSL commands directly on a cert request


Pokemon
store
Home
Attributes
text only
text only
text only
text only
Cart
Contact
all pokemon
grass pokemon
fire pokemon
water pokemon
bug pokemon
poison pokemon
flying pokemon
electric pokemon
normal pokemon
fighting pokemon


1 write to _deserializer
Microsoft.PowerShell.Commands.Utility (1)
commands\utility\XmlCommands.cs (1)
738
_deserializer
= new Deserializer(_xr);
6 references to _deserializer
Microsoft.PowerShell.Commands.Utility (6)
commands\utility\XmlCommands.cs (6)
752
while (!
_deserializer
.Done())
754
object result =
_deserializer
.Deserialize();
763
while (!
_deserializer
.Done() && count < first)
765
object result =
_deserializer
.Deserialize();
806
if (
_deserializer
!= null)
808
_deserializer
.Stop();


Bhishan Poudel,
Ph.D. Candidate
Data Scientist
Home
Education
Deep Learning
Data Science
Topics
Mini Projects
Pandas
Algorithms
Bash
C++
SQL
Mixed
Big Data
Dask
PySpark
Statistics
Resources
Entertainment
Projects
Contacts
Logistic Regression with Deep Learning Mindset
Planar Data Classification With One Hidden Layer
Building Your Deep Neural Network Step By Step
Deep Neural Network Application
Deep Learning Initialization
Deep Learning Regularization
Deep Learning Gradient Checking
Deep Learning Optimization Methods
Deep Learning Tensorflow Tutorial
Convolution Model Application
Convolution Model Step by Step
Keras Tutorial Happy House
Residual Networks
Autonomous Driving Application Car Detection
Art Generation with Neural Style Transfer
Face Recognition for the Happy House
Building a RNN Model Step by Step
Dinosaur Island Character Level Language Model
Jazz Improvisation with LSTM
Word to Vector Representation
Emojify with Deep learning
Neural Machine Translation
Trigger Word Detection


org-ruby
by Brian Dewey http://github.com/bdewey/org-ruby
DESCRIPTION:
This gem contains Ruby routines for parsing org-mode files.The most significant thing this library does today is convert org-mode files to HTML or textile. Currently, you cannot do much to customize the conversion. The supplied textile conversion is optimized for extracting “content” from the orgfile as opposed to “metadata.”
FEATURES/PROBLEMS:
-
Converts org-mode files to HTML or Textile
-
Supports tables, block quotes, and block code
-
Supports bold, italic, underline, strikethrough, and code inline formatting.
-
Supports hyperlinks that are in double-brackets
-
Upcoming: Handle export options specified in the org buffer.
SYNOPSIS:
From the command line:
org-ruby sample.org
…will output a HTML version of sample.org.
org-ruby --translate textile sample.org
…will output a textile version of sample.org.
From Ruby code:
Orgmode::Parser.new(data)
…will construct a new Parser object.
INSTALL:
sudo gem install org-ruby
LICENSE:
(The MIT License)
Copyright © 2009 Brian Dewey
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


| DOSE: |
7 nuts |
oral |
Nutmeg |
(ground / crushed) |
I have recently taken nutmeg a few times. I have eaten it raw, after grinding. I have also made tea, and boiled it in milk (following various recipes I have seen on this site).
The best preparation method for me was to grind about eight nuts (start with a smaller amount, and note that I am about 210 lbs). I then put it into a measuring cup and filled the cup up to 2 dl of milk. After stirring it to mix it into the milk a bit, I put it on the stove and slowly bring it to a very soft boil. I use an electric stove and watch it carefully, as others recommended not to let it burn at all.
As it heats up, you can see what appears to be the nutmeg oil being released into the milk. I assume that it is this oil that gives the high. I let it simmer just at the soft boil for about a half-hour. The idea is to let some of the milk evaporate or steam off. I would imagine that cooking it a little longer would likely increase its potency, so experiment a bit.
When it's done, I pour the whole thing back into the measuring cup and add enough fresh milk to bring it back up to the 2 dl mark. You can add more milk if you like, because the milk is only to cool off the mixture and cut the strong taste.
I then chug down the whole mixture, usually without too much trouble. It's the last swallow that is the hardest, because it's loaded with nutmeg, but occasionally one must suffer to get a buzz. You can also put some honey or suger in it. Try hot chocolate, or whatever you like. Have some water or a soda nearby to flush it down.
My experiences have all been positive. It takes about an hour or maybe two for the noticable buzz to take effect. Then a very pleasant pot-like state came over me, and it lasted for several hours. I found that the next day or two was pretty cool too. I liked the mild feeling of disorentiation. Be sure that you don't have to do anything like give a speech or participate in important meetings. I have a wife and three kids, none of whom knew that I was taking the nutmeg for a high (they thought it was a potpourri kind of thing for clearing a headcold, which it also does while it's boiling).
Give it a whirl, but as with all drugs legal and otherwise, start with a small dose and do it a few times to get comfortable with it. I had long heard about the nutmeg high, but had never really tried it. I intend to try some of the other interesting ingestion methods too. I see Nutmeg as yet another of nature's gifts. Peace.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


The New Directions in the Study of the Mind Project investigates the viability of non-physicalist and non-reductionist accounts of the mind and mental phenomena, in both philosophy and psychology. The Project is based at the University of Cambridge, and is funded by the John Templeton Foundation.
Traditionally, the question of physicalism is a question about the metaphysics of the mind. A metaphysical account of the mind specifies the most general categories in terms of which we should understand mental phenomena.
Contemporary metaphysics of mind tends to be physicalist, and physicalism holds that the world is fundamentally physical. The fundamental reality of the world is the reality described by physics and physical science: the world of particles, spacetime, forces and fields.
Contemporary metaphysics of mind also tends to be reductionist. All phenomena must be shown to ‘reduce’ (in one or another sense) to physical phenomena. If the mind is real, it must reduce to something physical. If mental phenomena such as consciousness, intentionality, or metaphysical categories such as that of substance, event and property cannot be shown to be physical, then their reality must be called into question.
For the last sixty years or so, reductive physicalism has dominated the metaphysics of mind. The New Directions in the Study of the Mind project at Cambridge aims to investigate alternative options for the metaphysics of mind. Focusing on the two central mental categories of consciousness and intentionality, the project will examine the viability of non-physicalist and non-reductive approaches to the study of the mind.
The project will not explicitly reject physicalism nor all forms of reductionism. Rather, it will open up the discussion and explore alternative approaches in the philosophical and scientific study of the mind. The project is exploratory, not ideological.
However, the New Directions project does reject the assumption that a scientific approach to the mind — in psychology and neuroscience— demands the truth of physicalism. In this way, the project combines a skeptical attitude to physicalism with a fully scientific approach to the mind. In particular, it assumes that questions about consciousness and intentionality can be addressed by the philosophy and science of the mind without assuming that physicalism or reductionism are true.
The following booklet lays out the historical and intellectual background of the project, as well as its guiding research questions.
Principal Investigator
Postdoctoral Fellow
Lecturer
Postdoctoral Fellow
Research Associate and Project Manager


About Me
Hello, my name is Elie, and this is my HTML website! I am currently enrolled as a sophomore at Western Reserve Academy.
I like all things school, books, talking to friends, and sleeping.
My favorite subjects are history and English, and I also enjoy math and Spanish.
This website is for my digital engineering class and I will be posting about all of the class projects.
I am interested in learning about how to design and build different things, and I look forward to working in this class.
Back to index


Network diagrams (or Graphs) show interconnections between a set of entities. Each entity is represented by a Node
(or vertice). Connections between nodes are represented by links
(or edges). Three packages are of interest in R: igraph
for data preparation and plotting, ggraph
for plotting using the grammar of graphic, and networkD3
for interactivity. Datacamp offers a good online course on the topic.
igraph
Building a network diagram is always complicated since many different input formats are available:
Moreover, you need to know wheter the network you're trying to build is directed or undirected, and weighted or unweighted. In any case, the igraph package is the best tool to read that kind of data and transform it into a graph object that is required to make a chart.
Read full post Online Courseigraph
The igraph
package is the most important R
package when it comes to build network diagrams with R. It basically allows to build any type of network with R. The following examples should allow you to get started and master the most common tasks concerning graph building.
The networkD3
package allows to build interactive network diagrams with R. On the chart below, try to hover a node and drag it to see how it works. You can also scroll to zoom in and out. Visit the corresponding post to see how to use this tool on your dataset.


?PLANTS
OF
JAMAICA
Upper
slopes
of
Mount
Dlabolo;
altitude
500-300
meters
t
/
WILLIAM
R.
MAXON
L,
ã
.
No.
ELLSWORTH
P.
KILLIP/CoIIectors
February
23-28,
1920
1604884
Legend -
Level of confidence that token is an accurately-transcribed word
extremely low
very low
low
undetermined
medium
high
very high


How to develop Java programs in VS Code
Pre-Requisites
you should have these software installed:
- VS Code
- Java Development Kit (JDK)
Install the Java Extension Pack
which contains extensions:
- Language Support for Java by Red Hat
- Debugger for Java
- Java Test Runner
- Maven for Java
- Project Manager for Java
- Visual Studio IntelliCode
Configure JDK
there are 2 configurations: java.home
and java.configuration.runtimes
.
The former specifies your language server’s execution environment; the latter specifies options for your project’s execution environment.
Command Palette (Ctrl + Shift + P), run:
java: configure java runtime
-
java.home
settings -> user settings -> java.home
-
java.configuration.runtimes
"java.configuration.runtimes": [ { "name": "JavaSE-1.8", "path": "/usr/local/jdk1.8.0_201" }, { "name": "JavaSE-11", "path": "/usr/local/jdk-11.0.3", "sources" : "/usr/local/jdk-11.0.3/lib/src.zip", "javadoc" : "https://docs.oracle.com/en/java/javase/11/docs/api", "default": true }, { "name": "JavaSE-12", "path": "/usr/local/jdk-12.0.2" }, { "name": "JavaSE-13", "path": "/usr/local/jdk-13" } ]
Library Configuration
config through java.project.referencedLibaries
in settings.json
:
"java.project.referencedLibraries": {
"include": [
"library/**/*.jar",
"/home/username/lib/foo.jar"
],
"exclude": [
"library/sources/**"
],
"sources": {
"library/bar.jar": "library/sources/bar-src.jar"
}
}


The quality that enables us to confront with patience insight and imagination the many problems
that we face in the relationships with ourselves and other people
How is it different to IQ?
IQ is a measure of the intelligence level of an individual, that is reflected in the score obtained by the person in
the intelligence test as compared to the scores received by other people of the same age in the same test.
EQ is an abbreviation for the term Emotional Quotient, which is defined as a person’s capability of identifying his
own and other’s person’s emotions. It is a measure of the emotional intelligence level of an individual, which
demarcates between different feelings and use this intelligence to guide thinking and behaviour.
Why is it important?
EQ determines how you interact and treat people in your life, it shows how you are going to cope with pressures or
face the crisis. This is very important especially in the EDA scenario this is because it is a highly stressful and
high pressure scenario.


Entrapment (1999) Reviewed by Eugene Novikov http://www.ultimate-movie.com/entrapment.html Member: Online Film Critics Society
*** out of four
Starring Sean Connery, Catherine Zeta-Jones, Ving Rhames. Rated PG-13.
There are some pairs of actors and actresses that can light up the screen when they are together. Can you recall how well Jack Lemmon and Walter Matthau mixed before they degraded to the likes of such travesties as The Odd Couple 2? Remember how luminous a screen pair Julia Roberts and Rupert Everett were in My Best Friend's Wedding? If movie stars have chemistry they can do wonders for a film, and there is no better example than the terrific action thriller Entrapment, in which the show belongs to the aging Sean Connery and the gorgeous Catherine Zeta-Jones.
Entrapment is a tricky little movie that stars Jones as Gin, an unusually agile insurance agent who has plans to track down and capture a notorious art thief named Robert MacDougal. She plans to accomplish this by presenting herself to him another thief and give him an opportunity to steal an ancient Chinese mask worth a reported $40 million dollars. Evidently he trusts her -- but not before stealing a few microchips worth millions and threaten to frame her if she betrays him.
Ving Rhames, one of my favorite actors, has a minor, although deceptive role in the movie, but it is not minor enough to dissappoint; it is so underwritten that Rhames is not given the opportunity to inject his trademark charisma into the script. The rest of the cast fares far better: as a matter of fact, Connery and Jones shine. Despite their fairly obvious age difference, the two seem to be made for each other and the script made just for them. It is always a virtue for an otherwise inconsistent film for its stars to invariably grab our attention.
Although Entrapment is always fun, sometimes outrageously exciting, sometimes wickedly tricky and sometimes intriguing in human aspects of the story, much of the plot and continuity will not stand to close scrutiny. To wit, essential plausibility is often sacrificed for the sake of showing us something cool. Sometimes it is but sometimes it just makes so little sense that it undermines the flow of the movie.
On the bright side, although the movie does feature its share of nifty high-tech gadgets, director Jon Amiel (Copycat, The Man Who Knew Too Little) for the most part avoids utilizing those gadgets to neatly rescue his characters when they back themselves into a corner. So many James Bond-type thrillers do that, and it's often times frustrating because it usually demonstrates a lack of creativity on the part of the filmmakers.
Of course movies about thieves, deceptions and lies of all sorts have to have some sort of surprise at the end, but Entrapment does this interestingly. The movie drops all sorts of clues to the movie's big secret -- even some that are blatantly obvious, but you don't realize how obvious they were until after the secret is revealed. It's refreshing to see a film that plays fair with it's audience; there is nothing that it throws at you that the perceptive viewer couldn't have suspected.
There's a difference between this and predictability. If the film were to be predictable, Amiel and his screenwriters would've had to have done their best to conceal their trick from you but blunder so that you were able to guess it. But here, they purposely and seemingly subtly give you a chance to figure out what's going on before coming right out and saying it at the end. When this method succeeds it's not predictability.
Entrapment is an engrossing, fun, effective thriller that triumphs despite its continuity errors. It works because of its stars, because of its smarts and because of its deftess in bringing a script to throbbing, pulsating life. ©1999 Eugene Novikov
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


southern-company
Businessmodel of Southern Company
Customer Segments
Southern Company provides energy and energy services to more than four million customers, including general consumers, commercial business, and industrial entities. The Company’s customers can be divided into two principal categories:
- Retail Customers, comprising commercial and industrial businesses across multiple sectors, as well as general electricity consumers across various residential buildings; and
- Wholesale Customers, comprising independent power producers, power transmission companies, competitive suppliers and marketers of electricity, and energy retailers. The top three customers of Southern Power, which principally sells energy on the wholesale market, include Georgia Power, Florida Power and Light Company, and Duke Energy Corporation, which accounted for 15.8%, 10.7%, and 8.2%, respectively, of Southern Power’s total revenues for 2015.
Southern Company exclusively serves a domestic customer base across the US. The Company’s four traditional operating companies supply electric service in the states of Alabama, Georgia, Florida, and Mississippi, while the Company’s Southern Power business is permitted to do business in the States of Alabama, California, Florida, Georgia, Mississippi, Nevada, New Mexico, North Carolina, Oklahoma, South Carolina, and Texas.
Value Propositions
Southern Company provides value to its customers in the following ways:
- Its reputation and industry standing, with the Company established as a reliable and efficient energy provider across a number of US states, and being one of only two companies named in the top three Most Admired Electric and Gas Utilities in the US by Fortune in the last seven years;
- Its growth in renewable energy, with the Company controlling approximately 3,800 megawatts of renewable capacity, including facilities under development, including the largest voluntary solar portfolio in the US;
- Its high-quality customer service, with the Company providing efficient and effective customer service to its customers, being consistently named among the top US electric service providers in terms of customer satisfaction;
- Its energy mix, with the Company being the only electric utility in the US committed to a full portfolio of carbon-free nuclear, 21st Century coal gasification, natural gas, solar, wind, biomass and energy efficiency; and
- Its specialist personnel and industry experience, with the Company employing highly-trained technical staff across its operating divisions, as well as an experienced team of industry executives. ### Channels
Southern Company operates a website at www.southerncompany.com, through which it provides information on its various services, facilities, and operating regions. The Company does not operate an online sales channel, however, it does provide an online customer care portal, through which customers are able to access resources and information, manage account details, and pay utility bills.
Southern Company makes its retail sales through a dedicated in-house sales force, organised by geographic region. The Company’s four traditional operating companies – Alabama Power, Georgia Power, Gulf Power, and Mississippi Power – operated independently, serving customers in their respective operating states. Each of these operating companies owns and operates its generation, transmission, and distribution facilities.
Southern Power also operates its own power generation and transmission assets, selling its energy across multiple states through regional wholesale electricity markets, through which it serves power retailers.
Customer Relationships
Southern Company does not make sales to customers on a self-service basis. The Company, however, does operate an online customer care portal, through which customers are able to access information, manage their account details, and pay utility bills online without interacting with members of the Company’s sales and support personnel.
Southern Company makes its sales through a direct sales force to retail customers, with its individual operating companies consulting with customers directly before finalising purchases. Sales are typically made under fixed-term power purchase agreements that can last several years. The Company works closely with its large commercial, industrial, and wholesale customers, with a view to establishing longstanding customer relationships.
Southern Company provides a range of support services to its customers. This includes a range of support resources that can be access through the Company’s online customer care portal, including FAQs and guides. Customers can also access personalised responses to queries and concerns by contacting the Company’s customer care teams directly over the phone or online.
Additionally, Southern Company is able to interact directly with its customers through its social media accounts, including with Twitter, Facebook, and LinkedIn.
Key Activities
Southern Company is an energy utility holding company. The Company operates through four traditional energy providers and Southern Power, as well as through several other direct and indirect subsidiaries.
The Company’s operations are organised into two business segments: Traditional Operating Companies, comprising the activities of Alabama Power, Georgia Power, Gulf Power, and Mississippi Power, which generate and sell electricity to retail customers; and Southern Power, which develops and manages energy generating assets, and sell s electricity on the wholesale market.
The Company’s traditional operating companies are vertically integrated and serve customer in four Southeastern US states, while Southern Power is permitted to serve customers across multiple states, including Alabama, California, Florida, Georgia, Mississippi, Nevada, New Mexico, North Carolina, Oklahoma, South Carolina, and Texas.
Key Partners
Southern Company works closely with a range of companies and organisations in the process of generating and distributing energy to customers. These partners include:
- Supplier and Vendor Partners, comprising suppliers of materials, tools, equipment, and services that are utilised across the Company’s various operating division in support of the Company’s overall generation and distribution activities;
- Energy Generation and Distribution Partners, comprising various energy and transmission companies that work with the Company on various power generation and distribution projects, both through joint ventures and strategic partnerships;
- Technology Partners, comprising various technology and software companies that support the Company’s IT and communications infrastructure, as well as provide technologies that can be utilised as part of the Company’s power solutions; and
- Environmental and Community Partners, comprising various non-profit and charitable organisations that collaborate with the Company on social and community projects, with a focus on the environment and sustainability. Southern Company has launched a number of partnerships in recent years. This includes a partnership with Bloom Energy to utilise its fuel cells as part of power generation and storage solutions for commercial entities, and a natural gas transmission tie-up with Kinder Morgan.
Key Resources
Southern Company’s key resources are its intellectual properties and technologies, its supply chain, its power generation facilities, its energy distribution infrastructure, its online customer portal, its IT and communications infrastructure, its sales and marketing channels, its partnerships, and its personnel.
Southern Company relies on its various energy production facilities and distribution infrastructure to operate effectively. This includes numerous fossil steam, nuclear steam, combustion turbine, combined cycle, hydroelectric, solar, wind, landfill gas, and biomass power plants, as well as its network of distribution cables.
Searches of records published by the US Patent and Trademark Office identified several patent applications filed in Southern Company’s name, including applications entitled ‘Gasification of high ash, high ash fusion temperature bituminous coals’, ‘Systems and methods for commissioning lighting fixtures’ and ‘Apparatus and methods for regeneration of precipitating solvent’.
Cost Structure
Southern Company incurs costs in relation to the acquisition and operation of its power generation facilities, its procurement of supplies – notably fuel, the development and maintenance of its power distribution infrastructure, the maintenance of its It and communications infrastructure, the operation of its sales and marketing channels, the management of its partnerships, and the retention of its personnel.
In 2015 Southern Company accrued total electric operating expenses in the amount of $13.07 billion. This included fuel costs totalling $4.75 billion and other operations and maintenance costs in the amount of $4.29 billion. The Company also recorded costs of $645 million in relation to purchased power.
Revenue Streams
Southern Company generates revenue through the generation and sale of energy to retail customers – including residential, commercial, and industrial customers – as well as wholesale customers through dedicated regional wholesale energy markets.
In 2015 Southern Company generated operating revenue of $17.49 billion, down slightly on the $18.47 billion recorded by the Company in 2014. The majority of this revenue as attributed to the Company’s retail revenue, which amounted to $14.99 billion for the year, with wholesale revenue totalling $1.80 billion. The largest portion of the Company’s retail revenue is attributed to its residential customers, which accounted for $6.38 billion in revenue.


I felt like my portfolio was too flashy and showed off too much of my incomplete projects. I'll get another portfolio up, but only when I have something I'm really proud of.


--- layout: overview_common title: Covids ---
How do you connect with people while being physically distant? How are trust and emotions used and manipulated in crises? The COVID-19 pandemic has compelled us to ask many such questions ranging from the simple to the profound. If you have many questions about all the information around you, come and explore Science Gallery Bengaluru’s Co-Vids series.
In this series of three-minute videos, experts from disciplines such as medicine, epidemiology, public policy, history, and psychiatry draw on their deep experience of thinking about contagions to pose—and explore—the top three questions on their minds.


Booknate is a non-profit organization working towards making education more accessible for students in undeveloped countries. From shipping books and educational material to connecting students with the real world, we are committed to improving education through technology and sympathy.
Everyone is welcome to join Booknate. If you are a student from an undeveloped country needing books or materials for a project you are invited to fill in our online survey to let us know how we can help. On the other hand, if you are a person or organization wanting to help our students, you should fill in our “donor's survey”. Together, we can change education!
If you are a student located in an undeveloped country and are needing some books or educational material, we are here to help you! Go to the survey for students we have published on this website and let us know what you need and where you need it. We will make our best to help you find those things you are looking for!
Survey for studentsThere are multiple ways to help our students succeed. From donating the materials they need to sponsoring its shipment, any help is welcome. Please go to the "survey for collaborators/donators" published on our website and tell us how do you plan on contributing to this initiative.
Survey for donors & sponsorsOff course! Notes are great ways to share knowledge among students. Please be specific on the content and the language in which they are written so we can find the perfect student for them.
Education goes beyond books! We are committed to helping students get all the tools to thrive in their education. Any materials that can be safely shipped to students can work: these could be but are not limited to notebooks, boards, and electronic components.


First Name : Ivana
Last Name : Clairine Irsan
Hobbies : Swimming, Reading, Exploring
My Twitter : @ivanaclairine
Social : @goodylabs
Top 75 Winner Application in Hackathon Competition held by Telkom Indonesia
I and my team made a web-based application which helps people search for a recipe. This application will filter the recipe recommendation based on your recent illness or allergic.
I have used several web programming language for school project. Not only web programming, I've used Java, C++, C, Prolog, and some other programming language.
My English TOEFL IBT score is 89


These hibernate based generic DAO implementations can either be used directly to handle persistent object operations in an application or extended to meet more specific needs.


Women Chiffon Tops Long Sleeve Sexy Zip V Neck T Shirt Casual Blouse Lady Shirt
US $5.99
Summer Fashion V Neck Women Casual Sexy Loose Half Sleeve Lace Blouse Tops Shirt
US $7.99
Fashion Boho Women Casual Summer Short Sleeve Cartoon Cotton T-Shirt Blouse Tops
US $4.99
Fashion Women Ladies Loose Casual Long Sleeve T-Shirt Cotton Blouse Tops T-Shirt
US $9.99
Women Loose Long Sleeve V Neck Chiffon Casual Solid Blouse Shirt Tops Blouse
US $5.99
Women Lady Girls Work Office Loose Long Sleeve Work Shirt Blouse Tops Dress
US $5.99
Women's Unicorn Print Tank Top Vest Girls Sleeveless Sports Camisole T-shirt
US $4.99
Women Lady Tank Top Mini Dress Floral Summer Casual Prom Party Loose Tunic Shirt
US $5.99
Vintage Women Back Split Loose Shirt Dress Short Sleeve T-Shirt Dress Kaftan Top
US $9.99
ZANZEA Womens V Neck Long Sleeve Floral Loose Tops Casual Plain Tee Shirt Blouse
US $7.99
Summer Fashion V Neck Women Casual Sexy Loose Half Sleeve Lace Blouse Tops Shirt
US $6.99
ZANZEA Women V Neck Loose Oversize Solid Long Sleeve Casual Blouse Tops T Shirt
US $5.99
Womens Slit Flared Palazzo Trousers Wide Leg High Loose Chiffon Harem Yoga Pants
US $9.53
Women Winter Warm Fluffy Coat Overcoat Button Jacket Tops Outwear Loose Sweater
US $14.53
Lady Hollow Out Dress Star Sequins Vintage Mesh Elegant Fairy Gothic Lolita New
US $22.99
Parent Child Outfit Mother Daughter Womens Girls Print Casual Party Dress US
US $9.99
Bandage Bodycon Evening Party Cocktail Short Mini Dress Summer Women Sleeveless
US $6.99


TL:DR: This is a temporary option that will be removed once we have better ways of granting access to applications. We recommend you grant read and write access by default, but it depends on the application you want to trust.
Applications provide very useful ways of consuming and producing data. Solid provides functionality that allows you to grant access to applications that you trust. This trust might be misplaced sometimes though, which Solid tries to mitigate to lessen the harm that malicious applications can cause.
One of the strategies available in Solid is to check the origins of applications, and in solid-server in Node version 5 (NSS5) we set the configuration for this to be true by default. This strengthens the security of instances running on this codebase, but it also makes it more difficult for users to test applications without explicitly granting them access beforehand.
To facilitate a better user experience, we introduced the option of granting access to applications as part of the authentication process. We believe this is a better flow then forcing users to navigate to their profile and use the functionality provided in the trusted applications pane, and offer this as a temporary solution.
That really depends on what the application needs to do. In general we suggest granting it Read and Write access.
This is what the various modes allows the application to do:
The last mode is a very powerful mode to grant an application. An application could use this to remove all of your control access, essentially locking you out of your pod. (This would also mean that the application couldn't get access to your pod though, as it is still relying on your authentication.)
The way this solutions works "behind the scenes" is that you are granting the application access to all resources that you have access to and that is connected to your profile (in general this would be the pod that was created alongside your WebID). This is probably fine when you want to test an application that you or someone you trust are developing, but it's definitely not the granular access control we want to offer.
We do not have a solution ready yet, but we are working on it. When the solution is specified and implemented in NSS, we will remove the option in the login flow, as you would go through another process of granting applications access that would result in a more granular control.
The way that we handle access control in Solid is described in the Web Access Control specification (WAC). If you want to understand the reasoning for why we chose to turn origin checking on by default, you can read about it in the Meeting W3 Solid Community Group had March 7th 2019 (last point on the agenda).


above |
Sun The Gentle, Wind |
|
below |
Tui The Joyous, Lake |
Inner Truth. Pigs and fishes.
Good fortune.
It furthers one to cross the great water.
Perseverance furthers.
Wind over lake: the image of Inner Truth.
Thus the superior man discusses criminal cases
In order to delay executions.
Nine at the beginning means:
Being prepared brings good fortune.
If there are secret designs, it is disquieting.
Nine in the second place means:
A crane is calling in the shade.
Its young answers it.
I have a good goblet.
I will share it with you.
Six in the third place means:
He finds a comrade.
Now he beats the drum, now he stops.
Now he sobs, now he sings.
Six in the fourth place means:
The moon nearly at the full.
The team horse goes astray.
No blame.
Nine in the fifth place means:
He possesses truth, which links together.
No blame.
Nine at the top means:
Cockcrow penetrating to heaven.
Perseverance brings misfortune.


NetworkCheck
@available(iOS 12.0, *)
class NetworkCheck
The purpose of the NetworkCheck
class is to check in background the network status.
-
Undocumented
See moreDeclaration
Swift
struct NetworkChangeObservation
-
- The network status can be:
- .satisfied
- .unsatisfied
- .requiresConnection
Declaration
Swift
var currentStatus: NWPath.Status { get }
- The network status can be:
-
Undocumented
Declaration
Swift
class func sharedInstance() -> NetworkCheck
-
Undocumented
Declaration
Swift
init()
-
Undocumented
Declaration
Swift
func addObserver(observer: NetworkCheckObserver)
-
Undocumented
Declaration
Swift
func removeObserver(observer: NetworkCheckObserver)


--- title: 痛点议题 layout: default permalink: /challenges/ slug: challenges --- {% include breadcrumbs.html %}
{{ challenge.description | truncate: 50 }}


{% extends "base.html" %} {% block styles %} {{ super() }} {% include "_h2_border.html" %} {% endblock %} {% block page_content %}
This video shows you the intro to my scratch project. NO cheating on anything! No! No! No!
(Add text about videos here)
(Note: Please be patient as this project is quite large.)


Issue: ASSOC-RASSOC-IF-KEYReferences: ASSOC-IF (p280), ASSOC-IF-NOT (p280), RASSOC-IF (p281),
RASSOC-IF-NOT (p281)
Category: ENHANCEMENT
Edit history: 22-Apr-87, Version 1 by Pitman
20-Nov-87, Versions 2,3 by Masinter
23-Nov-87, Version 4 by Masinter
Problem Description:
The descriptions of ASSOC-IF, ASSOC-IF-NOT, RASSOC-IF, and RASSOC-IF-NOT do not
mention a :KEY option, although ASSOC and RASSOC have one.
This is often reported as an inconsistency in Common Lisp.
Proposal (ASSOC-RASSOC-IF-KEY:YES):
Allow a :KEY keyword for ASSOC-IF, ASSOC-IF-NOT, RASSOC-IF, and RASSOC-IF-NOT.
If not supplied, it should default to #'IDENTITY as do the :KEY keywords for
other -IF and -IF-NOT functions. The function, as with the :KEY argument for
ASSOC and RASSOC, is applied to the CAR of the pair in the association list for
ASSOC-IF and ASSOC-IF-NOT and the CDR of the pair for RASSOC-IF and
Documentation impact:
A better description of the intent might be to say that the car /contains/ the
key of the association, and by default the car /is/ the key of the association.
Example:
(assoc-if #'zerop pathnames :key #'pathname-version)
could be used to search a list indexed by pathnames finding one with zero
version.
Rationale:
This is an inconsistency in the language that is simple to fix.
Current Practice:
Symbolics implements :KEY for the -IF and -IF-NOT assoc functions. Others follow
the book and allow :KEY only for ASSOC.
Cost to Common Lisp implementors:
A small amount of additional code is necessary to support this in
implementations not already offering it as an extension.
Cost to Common Lisp users:
The change is essentially upward compatible with user code.
Benefits:
This would make the set of -IF and -IF-NOT functions be more regular in their
calling conventions.
Aesthetics:
All the other -IF and -IF-NOT variations of list operations omit the :TEST and
:TEST-NOT keywords, but allow :KEY. For example, consider the family of MEMBER,
MEMBER-IF, and MEMBER-IF-NOT. Although this introduces additional mechanism, it
does so in a way that probably makes it easier to think about which functions do
what, so it would likely be seen as a simplification.
Discussion:
The omission of :KEY in this situation in CLtL was probably an oversight.
The cleanup committee supports this proposal.


Class SpeechClient
{% verbatim %}public class SpeechClient implements BackgroundResource
Service Description: Service that implements Google Cloud Speech API.
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
try (SpeechClient speechClient = SpeechClient.create()) {
RecognitionConfig config = RecognitionConfig.newBuilder().build();
RecognitionAudio audio = RecognitionAudio.newBuilder().build();
RecognizeResponse response = speechClient.recognize(config, audio);
}
Note: close() needs to be called on the SpeechClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of SpeechSettings to create(). For example:
To customize credentials:
SpeechSettings speechSettings =
SpeechSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SpeechClient speechClient = SpeechClient.create(speechSettings);
To customize the endpoint:
SpeechSettings speechSettings = SpeechSettings.newBuilder().setEndpoint(myEndpoint).build();
SpeechClient speechClient = SpeechClient.create(speechSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Inheritance
java.lang.Object > SpeechClientImplements
com.google.api.gax.core.BackgroundResourceConstructors
SpeechClient(SpeechSettings settings)
protected SpeechClient(SpeechSettings settings)
Constructs an instance of SpeechClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
| Type | Name | Description |
|---|---|---|
| SpeechSettings | settings |
SpeechClient(SpeechStub stub)
protected SpeechClient(SpeechStub stub)
| Type | Name | Description |
|---|---|---|
| SpeechStub | stub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
| Type | Name | Description |
|---|---|---|
| long | duration | |
| java.util.concurrent.TimeUnit | unit |
| Type | Description |
|---|---|
| boolean |
| Type | Condition |
|---|---|
| java.lang.InterruptedException |
close()
public final void close()
create()
public static final SpeechClient create()
Constructs an instance of SpeechClient with default settings.
| Type | Description |
|---|---|
| Type | Condition |
|---|---|
| java.io.IOException |
create(SpeechSettings settings)
public static final SpeechClient create(SpeechSettings settings)
Constructs an instance of SpeechClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
| Type | Name | Description |
|---|---|---|
| SpeechSettings | settings |
| Type | Description |
|---|---|
| Type | Condition |
|---|---|
| java.io.IOException |
create(SpeechStub stub)
public static final SpeechClient create(SpeechStub stub)
Constructs an instance of SpeechClient, using the given stub for making calls. This is for advanced usage - prefer using create(SpeechSettings).
| Type | Name | Description |
|---|---|---|
| SpeechStub | stub |
| Type | Description |
|---|---|
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
| Type | Description |
|---|---|
| com.google.longrunning.OperationsClient |
getSettings()
public final SpeechSettings getSettings()
| Type | Description |
|---|---|
| SpeechSettings |
getStub()
public SpeechStub getStub()
| Type | Description |
|---|---|
| SpeechStub |
isShutdown()
public boolean isShutdown()
| Type | Description |
|---|---|
| boolean |
isTerminated()
public boolean isTerminated()
| Type | Description |
|---|---|
| boolean |
longRunningRecognizeAsync(LongRunningRecognizeRequest request)
public final OperationFuture<LongRunningRecognizeResponse,LongRunningRecognizeMetadata> longRunningRecognizeAsync(LongRunningRecognizeRequest request)
Performs asynchronous speech recognition: receive results via the google.longrunning.Operations interface. Returns either an `Operation.error` or an `Operation.response` which contains a `LongRunningRecognizeResponse` message. For more information on asynchronous speech recognition, see the [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
Sample code:
try (SpeechClient speechClient = SpeechClient.create()) {
LongRunningRecognizeRequest request =
LongRunningRecognizeRequest.newBuilder()
.setConfig(RecognitionConfig.newBuilder().build())
.setAudio(RecognitionAudio.newBuilder().build())
.build();
LongRunningRecognizeResponse response = speechClient.longRunningRecognizeAsync(request).get();
}
| Type | Name | Description |
|---|---|---|
| LongRunningRecognizeRequest | request | The request object containing all of the parameters for the API call. |
| Type | Description |
|---|---|
| com.google.api.gax.longrunning.OperationFuture<LongRunningRecognizeResponse,LongRunningRecognizeMetadata> |
longRunningRecognizeAsync(RecognitionConfig config, RecognitionAudio audio)
public final OperationFuture<LongRunningRecognizeResponse,LongRunningRecognizeMetadata> longRunningRecognizeAsync(RecognitionConfig config, RecognitionAudio audio)
Performs asynchronous speech recognition: receive results via the google.longrunning.Operations interface. Returns either an `Operation.error` or an `Operation.response` which contains a `LongRunningRecognizeResponse` message. For more information on asynchronous speech recognition, see the [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
Sample code:
try (SpeechClient speechClient = SpeechClient.create()) {
RecognitionConfig config = RecognitionConfig.newBuilder().build();
RecognitionAudio audio = RecognitionAudio.newBuilder().build();
LongRunningRecognizeResponse response =
speechClient.longRunningRecognizeAsync(config, audio).get();
}
| Type | Name | Description |
|---|---|---|
| RecognitionConfig | config | Required. Provides information to the recognizer that specifies how to process the request. |
| RecognitionAudio | audio | Required. The audio data to be recognized. |
| Type | Description |
|---|---|
| com.google.api.gax.longrunning.OperationFuture<LongRunningRecognizeResponse,LongRunningRecognizeMetadata> |
longRunningRecognizeCallable()
public final UnaryCallable<LongRunningRecognizeRequest,Operation> longRunningRecognizeCallable()
Performs asynchronous speech recognition: receive results via the google.longrunning.Operations interface. Returns either an `Operation.error` or an `Operation.response` which contains a `LongRunningRecognizeResponse` message. For more information on asynchronous speech recognition, see the [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
Sample code:
try (SpeechClient speechClient = SpeechClient.create()) {
LongRunningRecognizeRequest request =
LongRunningRecognizeRequest.newBuilder()
.setConfig(RecognitionConfig.newBuilder().build())
.setAudio(RecognitionAudio.newBuilder().build())
.build();
ApiFuture future = speechClient.longRunningRecognizeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
| Type | Description |
|---|---|
| com.google.api.gax.rpc.UnaryCallable<LongRunningRecognizeRequest,com.google.longrunning.Operation> |
longRunningRecognizeOperationCallable()
public final OperationCallable<LongRunningRecognizeRequest,LongRunningRecognizeResponse,LongRunningRecognizeMetadata> longRunningRecognizeOperationCallable()
Performs asynchronous speech recognition: receive results via the google.longrunning.Operations interface. Returns either an `Operation.error` or an `Operation.response` which contains a `LongRunningRecognizeResponse` message. For more information on asynchronous speech recognition, see the [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).
Sample code:
try (SpeechClient speechClient = SpeechClient.create()) {
LongRunningRecognizeRequest request =
LongRunningRecognizeRequest.newBuilder()
.setConfig(RecognitionConfig.newBuilder().build())
.setAudio(RecognitionAudio.newBuilder().build())
.build();
OperationFuture future =
speechClient.longRunningRecognizeOperationCallable().futureCall(request);
// Do something.
LongRunningRecognizeResponse response = future.get();
}
| Type | Description |
|---|---|
| com.google.api.gax.rpc.OperationCallable<LongRunningRecognizeRequest,LongRunningRecognizeResponse,LongRunningRecognizeMetadata> |
recognize(RecognitionConfig config, RecognitionAudio audio)
public final RecognizeResponse recognize(RecognitionConfig config, RecognitionAudio audio)
Performs synchronous speech recognition: receive results after all audio has been sent and processed.
Sample code:
try (SpeechClient speechClient = SpeechClient.create()) {
RecognitionConfig config = RecognitionConfig.newBuilder().build();
RecognitionAudio audio = RecognitionAudio.newBuilder().build();
RecognizeResponse response = speechClient.recognize(config, audio);
}
| Type | Name | Description |
|---|---|---|
| RecognitionConfig | config | Required. Provides information to the recognizer that specifies how to process the request. |
| RecognitionAudio | audio | Required. The audio data to be recognized. |
| Type | Description |
|---|---|
| RecognizeResponse |
recognize(RecognizeRequest request)
public final RecognizeResponse recognize(RecognizeRequest request)
Performs synchronous speech recognition: receive results after all audio has been sent and processed.
Sample code:
try (SpeechClient speechClient = SpeechClient.create()) {
RecognizeRequest request =
RecognizeRequest.newBuilder()
.setConfig(RecognitionConfig.newBuilder().build())
.setAudio(RecognitionAudio.newBuilder().build())
.build();
RecognizeResponse response = speechClient.recognize(request);
}
| Type | Name | Description |
|---|---|---|
| RecognizeRequest | request | The request object containing all of the parameters for the API call. |
| Type | Description |
|---|---|
| RecognizeResponse |
recognizeCallable()
public final UnaryCallable<RecognizeRequest,RecognizeResponse> recognizeCallable()
Performs synchronous speech recognition: receive results after all audio has been sent and processed.
Sample code:
try (SpeechClient speechClient = SpeechClient.create()) {
RecognizeRequest request =
RecognizeRequest.newBuilder()
.setConfig(RecognitionConfig.newBuilder().build())
.setAudio(RecognitionAudio.newBuilder().build())
.build();
ApiFuture future = speechClient.recognizeCallable().futureCall(request);
// Do something.
RecognizeResponse response = future.get();
}
| Type | Description |
|---|---|
| com.google.api.gax.rpc.UnaryCallable<RecognizeRequest,RecognizeResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
streamingRecognizeCallable()
public final BidiStreamingCallable<StreamingRecognizeRequest,StreamingRecognizeResponse> streamingRecognizeCallable()
Performs bidirectional streaming speech recognition: receive results while sending audio. This method is only available via the gRPC API (not REST).
Sample code:
try (SpeechClient speechClient = SpeechClient.create()) {
BidiStream bidiStream =
speechClient.streamingRecognizeCallable().call();
StreamingRecognizeRequest request = StreamingRecognizeRequest.newBuilder().build();
bidiStream.send(request);
for (StreamingRecognizeResponse response : bidiStream) {
// Do something when a response is received.
}
}
| Type | Description |
|---|---|
| com.google.api.gax.rpc.BidiStreamingCallable<StreamingRecognizeRequest,StreamingRecognizeResponse> |