All Files
(19.07%
covered at
0.2
hits/line)
17 files in total.
257 relevant lines.
49 lines covered and
208 lines missed
Controllers
(10.82%
covered at
0.12
hits/line)
6 files in total.
194 relevant lines.
21 lines covered and
173 lines missed
Models
(52.83%
covered at
0.54
hits/line)
6 files in total.
53 relevant lines.
28 lines covered and
25 lines missed
Mailers
(100.0%
covered at
0.0
hits/line)
0 files in total.
0.0 relevant lines.
0.0 lines covered and
0.0 lines missed
| File |
% covered |
Lines |
Relevant Lines |
Lines covered |
Lines missed |
Avg. Hits / Line |
Helpers
(0.0%
covered at
0.0
hits/line)
5 files in total.
10 relevant lines.
0 lines covered and
10 lines missed
Jobs
(100.0%
covered at
0.0
hits/line)
0 files in total.
0.0 relevant lines.
0.0 lines covered and
0.0 lines missed
| File |
% covered |
Lines |
Relevant Lines |
Lines covered |
Lines missed |
Avg. Hits / Line |
Libraries
(100.0%
covered at
0.0
hits/line)
0 files in total.
0.0 relevant lines.
0.0 lines covered and
0.0 lines missed
| File |
% covered |
Lines |
Relevant Lines |
Lines covered |
Lines missed |
Avg. Hits / Line |
-
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: :null_session
-
1
before_action :require_login
-
-
1
private
-
-
1
def not_authenticated
-
redirect_to login_path, alert: "Please login first"
-
end
-
end
-
class GoalsController < ApplicationController
-
def index
-
@user = current_user
-
@daily_goals = @user.goals.where(duration: "daily", completed: true).order('created_at DESC')
-
@weekly_goals = @user.goals.where(duration: "weekly", completed: true).order('created_at DESC')
-
@phase_goals = @user.goals.where(duration: "phase", completed: true).order('created_at DESC')
-
end
-
-
def show
-
@goal = find_goal
-
end
-
-
def new
-
@goal = Goal.new
-
end
-
-
def edit
-
@goal = find_goal
-
end
-
-
def create
-
@user = current_user
-
@goal = @user.goals.new(goal_params)
-
-
if @goal.save
-
redirect_to progress_path
-
else
-
#This might be different with react
-
redirect_to prog
-
end
-
end
-
-
def update
-
@goal = find_goal
-
-
if @goal.update(goal_params)
-
redirect_to progress_path
-
else
-
#this may be different with react
-
render "edit"
-
end
-
end
-
-
def destroy
-
@goal = find_goal
-
@goal.destroy
-
redirect_to progress_path
-
end
-
-
def completed
-
@goal = find_goal
-
if @goal.completed
-
@goal.update_attributes(completed: false)
-
redirect_to root_path
-
else
-
@goal.update_attributes(completed: true)
-
redirect_to root_path
-
end
-
end
-
-
private
-
-
def goal_params
-
params.require(:goal).permit(:description, :duration, :due_date)
-
end
-
-
def find_goal
-
Goal.find(params[:id])
-
end
-
-
end
-
class GroupsController < ApplicationController
-
def show
-
end
-
-
def new
-
end
-
-
def create
-
end
-
-
def edit
-
end
-
end
-
class RatingsController < ApplicationController
-
def new
-
@rating = Rating.new
-
end
-
-
def create
-
@goal = Goal.find(params[:goal_id])
-
user = @goal.user
-
@rating = @goal.ratings.new(rating_params)
-
@rating.rater_id = current_user.id
-
-
respond_to do |format|
-
if @rating.save
-
user.update_attributes(experience: user.experience + @rating.score)
-
format.html { redirect_to '/', notice: 'Rating was successfully created.' }
-
format.json { render json: [@rating, user.current_level, user.progress_bar_width] }
-
else
-
format.html { render :new }
-
format.json { render json: @user.errors, status: :unprocessable_entity }
-
end
-
end
-
end
-
-
def edit
-
@rating = find_rating
-
end
-
-
-
private
-
-
def rating_params
-
params.require(:rating).permit(:score, :comment)
-
end
-
-
def find_rating
-
Rating.find(params[:id])
-
end
-
-
end
-
class UserSessionsController < ApplicationController
-
skip_before_action :require_login, except: [:destroy]
-
-
def new
-
@user = User.new
-
end
-
-
def create
-
if @user = login(params[:email], params[:password])
-
redirect_to '/'
-
else
-
flash.now[:alert] = 'Login failed'
-
render action: 'new'
-
end
-
end
-
-
def destroy
-
logout
-
redirect_to('/', notice: 'Logged out')
-
end
-
end
-
1
class UsersController < ApplicationController
-
1
before_action :set_user, only: [:show, :edit, :update, :destroy, :progress]
-
1
skip_before_action :require_login, only: [:index, :new, :create]
-
-
# GET /users
-
# GET /users.json
-
1
def index
-
1
redirect_to '/'
-
end
-
-
# GET /users/1
-
# GET /users/1.json
-
1
def show
-
@user = User.find(session[:user_id])
-
@experience = @user.experience
-
end
-
-
# GET /users/new
-
1
def new
-
1
@user = User.new
-
end
-
-
1
def progress
-
@user = current_user
-
@goals = @user.goals
-
@daily_goals = @user.goals.where(duration: "daily")
-
@weekly_goals = @user.goals.where(duration: "weekly")
-
@phase_goals = @user.goals.where(duration: "phase")
-
end
-
-
# GET /users/1/edit
-
1
def edit
-
@user = current_user
-
end
-
-
# POST /users
-
# POST /users.json
-
1
def create
-
@user = User.new(user_params)
-
@user.experience = 1
-
-
respond_to do |format|
-
if @user.save
-
format.html { redirect_to @user, notice: 'User was successfully created.' }
-
format.json { render :progress, status: :created, location: @user }
-
else
-
format.html { render :new }
-
format.json { render json: @user.errors, status: :unprocessable_entity }
-
end
-
end
-
end
-
-
# PATCH/PUT /users/1
-
# PATCH/PUT /users/1.json
-
1
def update
-
respond_to do |format|
-
if @user.update(user_params)
-
format.html { redirect_to '/', notice: 'User was successfully updated.' }
-
format.json { render json: @user }
-
else
-
format.html { render :edit }
-
format.json { render json: @user.errors, status: :unprocessable_entity }
-
end
-
end
-
end
-
-
# DELETE /users/1
-
# DELETE /users/1.json
-
1
def destroy
-
@user.destroy
-
respond_to do |format|
-
format.html { redirect_to '/', notice: 'User was successfully destroyed.' }
-
format.json { head :no_content }
-
end
-
end
-
-
1
private
-
# Use callbacks to share common setup or constraints between actions.
-
1
def set_user
-
@user = current_user || User.find(params[:id])
-
end
-
-
# Never trust parameters from the scary internet, only allow the white list through.
-
1
def user_params
-
params.require(:user).permit(:email, :password, :password_confirmation, :username, :avatar_url)
-
end
-
end
-
module ApplicationHelper
-
end
-
module UserSessionsHelper
-
end
-
1
class Goal < ActiveRecord::Base
-
1
belongs_to :user
-
1
has_many :ratings, dependent: :destroy
-
1
has_many :taggings
-
1
has_many :tags, through: :taggings
-
-
1
validates :description, presence: true
-
1
validates :duration, presence: true
-
1
validates :due_date, presence: true
-
-
1
def current_score
-
1
if !self.ratings.empty?
-
1
self.ratings.last.score
-
else
-
1
-
end
-
end
-
end
-
class Group < ActiveRecord::Base
-
has_many :users
-
end
-
1
class Rating < ActiveRecord::Base
-
1
belongs_to :goal
-
1
belongs_to :rater, class_name: "User"
-
end
-
-
class Tag < ActiveRecord::Base
-
has_many :taggings
-
has_many :goals, through: :taggings
-
end
-
-
class Tagging < ActiveRecord::Base
-
belongs_to :tag
-
belongs_to :goal
-
end
-
-
1
class User < ActiveRecord::Base
-
1
authenticates_with_sorcery!
-
-
1
before_save :default_values
-
-
1
validates :password, length: { minimum: 3 }, if: -> { new_record? || changes[:crypted_password] }
-
1
validates :password, confirmation: true, if: -> { new_record? || changes[crypted_password] }
-
1
validates :password_confirmation, presence: true, if: -> { new_record? || changes[crypted_password] }
-
-
1
validates :email, uniqueness: true
-
-
1
belongs_to :group
-
1
has_many :goals
-
1
has_many :ratings, through: :goals, source: :rater
-
-
1
LEVELS = [1, 25, 60, 120, 250, 420, 600, 850]
-
-
1
def current_level
-
new_level = LEVELS.index { |level| experience < level }
-
return new_level < 1 ? 1 : new_level
-
end
-
-
1
def progress_bar_width
-
above_last_level = self.experience - LEVELS[current_level - 1]
-
p above_last_level
-
proportion = above_last_level.to_f / LEVELS[current_level]
-
p proportion
-
width = proportion * 100
-
p width
-
rounded_width = width.round
-
return rounded_width
-
end
-
-
1
def default_values
-
self.avatar_url = 'http://www.twpinc.com/media/catalog/category/TWPCAT_GOPHER.jpg' if self.avatar_url.empty?
-
end
-
-
end


Projector Augmented Wave Density Functional Theory¶
Let us motivate our discussion of the specifics of projector augmented wave density functional theory (PAW-DFT):cite:blochl1994_paw,kresse1999_paw, by revisiting the implication of crystalline arrangements of atoms on the electron density. Suppose we have the real space lattice vectors: , , and , which produces the Bravais lattice , where .
Due to periodicity, all functions dependent upon the Bravais lattice must have a periodic representation. This includes the electronic density in an atomic crystal which can be written as a periodic function
And it is useful to represent it as a Fourier series expansion, an expansion in sines and cosines.
Since the function is periodic, then for any choice of
Then the reciprocal lattice vectors are defined
Bloch’s Theorem¶
The electron wavefunctions of a crystal have a basis consisting entirely of Bloch wave energy eigenstates.
The energy eigenstates for an electron in a crystal can be written as Bloch waves.
A wavefunction is a Bloch wave if it has the form:
Energy Cutoff¶
For a DFT calculation with plane waves, the electronic wavefunction is represented as the infinite summation of plane waves, which mus be truncated to a finite series.
With more plane waves, there is more accuracy, but also at higher computational cost.
Plane waves with less kinetic energy
have a higher contribution to the sum, so the plane waves with lower energy have the highest contribution.
the deermination of the energy cutoff. Detemining of the energy cutoff for the plane wave basis set expansion has a large effect on the cost of calculation as well as the accuracy of calculation. If is the energy cutoff, then plane waves with kinetic energy less than are excluded from the basis set.
where
Additional Reading¶
`The Projector Augmented-wave method <https://arxiv.org/pdf/0910.1921v2.pdf>_ by Carsten Rostgaard


In a webpage, HTML, CSS, and Javascript work together to create one interactive entity that is the site. They all do quite different things though, HTML builds the skeleton of the website, this is where the texts were inserted, sections are made. CSS, on the other hand, don't create any additional content, but works only to stylise whatever that already exists in the HTML file. Javascript is a programming language that builds any interactive features on the page, it can talk to the different things in a HTML and CSS files, and make them do different things.
Control flow is the order in which actions happen when a script is ran, this is like going to the pantry to grab a snack, You have to be hungry first, walk to the pantry. You want to have chips if there is chips, but if not you will settle for a piece of fruit, but if you really can't find any snacks you might gulp some milk or a spoonful of peanut butter. These things need to happen in that order, and the result of each informs the next action. Loops, on the other hand, makes an action happen over and over again until a conditions is met where the computer is told to stop. An example for this could be if you are sweeping the floor, the action of sweeping is repeated until the floor is clean.
The DOM stands for Document Object Model, is the way through which javascript is able to communicate with HTML and CSS files and makes things happen. The HTML document is organised in a particular way and all the elements in it can be grabbed (selected) and work it. To use it, you might use document.getElementById() or document.getElementsByClass to grab the different elements in the file you might want to manipulate, and through there you can do whatever you want with them with javascript.
An array is a list that could look like: dogs['Poodles', 'Labradors', 'Great Danes']. To access data from this array, you need to first know that all arrays counting starts with 0. Therefor no.0 stands for the first item in dogs which is Poodles, 1 stands for Labradors and 2 stands for Great Danes. If you want to accessing Labradors, you would write: dogs[1].
Objects on the other hand, contain a lot more data, and within which could be arrays. There are two ways to access data from objects, one is with ., and the other is with []. Your code would look like objectName.prop.value[], or objetNmae[prop][balue][].
Functions is a choreography that you determine in your javascript code. You can give it a name, determine the variables in this choreography, and determine what it does. It can take different variables and produce different output, and can also have nesting if else statements and loops.


Welcome to CH Payments, a simple paymentprovider wrapper for stuff you want CH to get money for. Payments makes it easy to create products, and implement it in your own website. No hassle with keys, accounts and webhooks, just a single call to initiate a payment.
Below you can find some ready-to-use code examples for your website.
The administration panel (for now) is only available for board members. They can create products to generate the keys required.
W.I.S.V. ‘Christiaan Huygens’ (CH) is the study association for students of Applied Mathematics and Computer Science at the Delft University of Technology.
Copyright © 2015-2021 by W.I.S.V. ‘Christiaan Huygens’. All rights reserved.


Ripple effect
Click anywhere on the to move the ripple effect (hosted in an :after element) under the cursor.


Pet Vet Records
Account Information
Either your Email or Username
The Password you chose
Save Account Info
Saving...


What is the offline "internet" project? The offline "internet project is a collection of .html files. Why .html files? Because 1. they run in your browser and, 2. html is about all i know. Why is it offline? It is offline so it can be downloaded and used in places without wifi. If its offline then isn't it not the internet? Thats why i put quotes around internet, because it is not online.
How does it work?
It is a collection of html apps and games that are connected to each other to make it look the the internet.


|
SimpleITK
1.1.0
|
Given an intensity image and a label map, compute min, max, variance and mean of the pixels associated with each label or segment. More...
#include <sitkLabelStatisticsImageFilter.h>
Public Types | |
| typedef BasicPixelIDTypeList | PixelIDTypeList |
| typedef LabelStatisticsImageFilter | Self |
| Public Types inherited from itk::simple::ImageFilter< 0 > | |
| typedef ImageFilter | Self |
| Public Types inherited from itk::simple::ProcessObject | |
| typedef ProcessObject | Self |
Public Member Functions | |
| void | Execute (const Image &image, const Image &labelImage) |
| void | Execute (const Image &image, const Image &labelImage, bool useHistograms) |
| std::vector< int > | GetBoundingBox (int64_t label) const |
| uint64_t | GetCount (int64_t label) const |
| std::vector< int64_t > | GetLabels () const |
| double | GetMaximum (int64_t label) const |
| double | GetMean (int64_t label) const |
| double | GetMedian (int64_t label) const |
| double | GetMinimum (int64_t label) const |
| std::string | GetName () const |
| uint64_t | GetNumberOfLabels () |
| std::vector< unsigned int > | GetRegion (int64_t label) const |
| double | GetSigma (int64_t label) const |
| double | GetSum (int64_t label) const |
| bool | GetUseHistograms () const |
| double | GetVariance (int64_t label) const |
| bool | HasLabel (int64_t label) |
| LabelStatisticsImageFilter () | |
| Self & | SetUseHistograms (bool UseHistograms) |
| std::string | ToString () const |
| Self & | UseHistogramsOff () |
| Self & | UseHistogramsOn () |
| virtual | ~LabelStatisticsImageFilter () |
| Public Member Functions inherited from itk::simple::ImageFilter< 0 > | |
| ImageFilter () | |
| virtual | ~ImageFilter ()=0 |
| Public Member Functions inherited from itk::simple::ProcessObject | |
| virtual void | Abort () |
| virtual int | AddCommand (itk::simple::EventEnum event, itk::simple::Command &cmd) |
| Add a Command Object to observer the event. More... | |
| virtual float | GetProgress () const |
| An Active Measurement of the progress of execution. More... | |
| virtual bool | HasCommand (itk::simple::EventEnum event) const |
| Query of this object has any registered commands for event. More... | |
| ProcessObject () | |
| virtual void | RemoveAllCommands () |
| Remove all registered commands. More... | |
| virtual | ~ProcessObject () |
| virtual void | DebugOn () |
| virtual void | DebugOff () |
| virtual bool | GetDebug () const |
| virtual void | SetDebug (bool debugFlag) |
| virtual void | SetNumberOfThreads (unsigned int n) |
| virtual unsigned int | GetNumberOfThreads () const |
Private Types | |
| typedef void(Self::* | MemberFunctionType) (const Image *image, const Image *labelImage) |
Private Member Functions | |
| template<class TImageType1 , class TImageType2 > | |
| void | DualExecuteInternal (const Image *image, const Image *labelImage) |
Private Attributes | |
| nsstd::auto_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > | m_DualMemberFactory |
| itk::ProcessObject * | m_Filter |
| std::vector< int64_t > | m_Labels |
| nsstd::function< std::vector< int >int64_t)> | m_pfGetBoundingBox |
| nsstd::function< uint64_t(int64_t)> | m_pfGetCount |
| nsstd::function< double(int64_t)> | m_pfGetMaximum |
| nsstd::function< double(int64_t)> | m_pfGetMean |
| nsstd::function< double(int64_t)> | m_pfGetMedian |
| nsstd::function< double(int64_t)> | m_pfGetMinimum |
| nsstd::function< std::vector< unsigned int >int64_t)> | m_pfGetRegion |
| nsstd::function< double(int64_t)> | m_pfGetSigma |
| nsstd::function< double(int64_t)> | m_pfGetSum |
| nsstd::function< double(int64_t)> | m_pfGetVariance |
| bool | m_UseHistograms |
Friends | |
| struct | detail::DualExecuteInternalAddressor< MemberFunctionType > |
Additional Inherited Members | |
| Static Public Member Functions inherited from itk::simple::ProcessObject | |
| static bool | GetGlobalDefaultDebug () |
| static void | GlobalDefaultDebugOff () |
| static void | GlobalDefaultDebugOn () |
| static void | SetGlobalDefaultDebug (bool debugFlag) |
| static void | GlobalWarningDisplayOn () |
| static void | GlobalWarningDisplayOff () |
| static void | SetGlobalWarningDisplay (bool flag) |
| static bool | GetGlobalWarningDisplay () |
| static void | SetGlobalDefaultNumberOfThreads (unsigned int n) |
| static unsigned int | GetGlobalDefaultNumberOfThreads () |
| static double | GetGlobalDefaultCoordinateTolerance () |
| Access the global tolerance to determine congruent spaces. More... | |
| static void | SetGlobalDefaultCoordinateTolerance (double) |
| Access the global tolerance to determine congruent spaces. More... | |
| static double | GetGlobalDefaultDirectionTolerance () |
| Access the global tolerance to determine congruent spaces. More... | |
| static void | SetGlobalDefaultDirectionTolerance (double) |
| Access the global tolerance to determine congruent spaces. More... | |
| Protected Member Functions inherited from itk::simple::ProcessObject | |
| virtual unsigned long | AddITKObserver (const itk::EventObject &, itk::Command *) |
| virtual itk::ProcessObject * | GetActiveProcess () |
| virtual void | OnActiveProcessDelete () |
| virtual void | onCommandDelete (const itk::simple::Command *cmd) SITK_NOEXCEPT |
| virtual void | PreUpdate (itk::ProcessObject *p) |
| virtual void | RemoveITKObserver (EventCommand &e) |
| Protected Member Functions inherited from itk::simple::NonCopyable | |
| NonCopyable () | |
| Static Protected Member Functions inherited from itk::simple::ImageFilter< 0 > | |
| static void | FixNonZeroIndex (TImageType *img) |
| Static Protected Member Functions inherited from itk::simple::ProcessObject | |
| template<class TImageType > | |
| static TImageType::ConstPointer | CastImageToITK (const Image &img) |
| template<class TPixelType , unsigned int VImageDimension, unsigned int VLength, template< typename, unsigned int > class TVector> | |
| static Image | CastITKToImage (itk::Image< TVector< TPixelType, VLength >, VImageDimension > *img) |
| template<class TImageType > | |
| static Image | CastITKToImage (TImageType *img) |
| static const itk::EventObject & | GetITKEventObject (EventEnum e) |
| template<typename T > | |
| static std::ostream & | ToStringHelper (std::ostream &os, const T &v) |
| static std::ostream & | ToStringHelper (std::ostream &os, const char &v) |
| static std::ostream & | ToStringHelper (std::ostream &os, const signed char &v) |
| static std::ostream & | ToStringHelper (std::ostream &os, const unsigned char &v) |
Given an intensity image and a label map, compute min, max, variance and mean of the pixels associated with each label or segment.
LabelStatisticsImageFilter computes the minimum, maximum, sum, mean, median, variance and sigma of regions of an intensity image, where the regions are defined via a label map (a second input). The label image should be integral type. The filter needs all of its input image. It behaves as a filter with an input and output. Thus it can be inserted in a pipline with other filters and the statistics will only be recomputed if a downstream filter changes.
Optionally, the filter also computes intensity histograms on each object. If histograms are enabled, a median intensity value can also be computed, although its accuracy is limited to the bin width of the histogram. If histograms are not enabled, the median returns zero.
The filter passes its intensity input through unmodified. The filter is threaded. It computes statistics in each thread then combines them in its AfterThreadedGenerate method.
Definition at line 53 of file sitkLabelStatisticsImageFilter.h.
|
private |
Setup for member function dispatching
Definition at line 202 of file sitkLabelStatisticsImageFilter.h.
Define the pixels types supported by this filter
Definition at line 65 of file sitkLabelStatisticsImageFilter.h.
Definition at line 55 of file sitkLabelStatisticsImageFilter.h.
|
virtual |
Destructor
| itk::simple::LabelStatisticsImageFilter::LabelStatisticsImageFilter | ( | ) |
Default Constructor that takes no arguments and initializes default parameters
|
private |
| void itk::simple::LabelStatisticsImageFilter::Execute | ( | const Image & | image, |
| const Image & | labelImage | ||
| ) |
Execute the filter on the input image
| void itk::simple::LabelStatisticsImageFilter::Execute | ( | const Image & | image, |
| const Image & | labelImage, | ||
| bool | useHistograms | ||
| ) |
Execute the filter on the input image with the given parameters
|
inline |
Return the computed bounding box for a label. A vector of minIndex, maxIndex pairs for each axis. The intervals include the endpoints.
This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.
Definition at line 159 of file sitkLabelStatisticsImageFilter.h.
Return the number of pixels for a label.
This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.
Definition at line 150 of file sitkLabelStatisticsImageFilter.h.
|
inline |
This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.
Definition at line 176 of file sitkLabelStatisticsImageFilter.h.
|
inline |
Return the computed Maximum for a label.
This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.
Definition at line 96 of file sitkLabelStatisticsImageFilter.h.
|
inline |
Return the computed Mean for a label.
This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.
Definition at line 105 of file sitkLabelStatisticsImageFilter.h.
|
inline |
Return the computed Median for a label. Requires histograms to be enabled!
This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.
Definition at line 114 of file sitkLabelStatisticsImageFilter.h.
|
inline |
Return the computed Minimum for a label.
This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.
Definition at line 87 of file sitkLabelStatisticsImageFilter.h.
|
inlinevirtual |
Name of this class
Implements itk::simple::ProcessObject.
Definition at line 179 of file sitkLabelStatisticsImageFilter.h.
| uint64_t itk::simple::LabelStatisticsImageFilter::GetNumberOfLabels | ( | ) |
Return the number of labels after execution .
|
inline |
Return the computed region.
This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.
Definition at line 168 of file sitkLabelStatisticsImageFilter.h.
|
inline |
Return the computed Standard Deviation for a label.
This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.
Definition at line 123 of file sitkLabelStatisticsImageFilter.h.
|
inline |
Return the compute Sum for a label.
This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.
Definition at line 141 of file sitkLabelStatisticsImageFilter.h.
|
inline |
Definition at line 79 of file sitkLabelStatisticsImageFilter.h.
|
inline |
Return the computed Variance for a label.
This is an active measurement. It may be accessed while the filter is being executing in command call-backs and can be accessed after execution.
Definition at line 132 of file sitkLabelStatisticsImageFilter.h.
| bool itk::simple::LabelStatisticsImageFilter::HasLabel | ( | int64_t | label | ) |
Does the specified label exist? Can only be called after a call a call to Update().
|
inline |
Definition at line 71 of file sitkLabelStatisticsImageFilter.h.
|
virtual |
Print ourselves out
Reimplemented from itk::simple::ProcessObject.
|
inline |
Definition at line 75 of file sitkLabelStatisticsImageFilter.h.
|
inline |
Set the value of UseHistograms to true or false respectfully.
Definition at line 74 of file sitkLabelStatisticsImageFilter.h.
|
friend |
Definition at line 204 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 208 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 237 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 234 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 230 of file sitkLabelStatisticsImageFilter.h.
Definition at line 228 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 216 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 218 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 220 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 214 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 232 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 222 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 226 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 224 of file sitkLabelStatisticsImageFilter.h.
|
private |
Definition at line 212 of file sitkLabelStatisticsImageFilter.h.


{% extends "fantalega/base.html" %} {% load bootstrap3 %} {% block title %}activation key expired{% endblock %} {% block content %} {{ user }} Your activation key has expired ...try to register again {% endblock %}


White on roll, cube action?
pips White=150 Black=128
(CorrectAnswer= 0/0, ErrorScore= 0)
No double Player Winning Chances: 55.87% (G:18.95% B:0.55%) Opponent Winning Chances: 44.13% (G:11.08% B:0.56%) Double/Take Player Winning Chances: 55.96% (G:18.93% B:0.52%) Opponent Winning Chances: 44.04% (G:10.76% B:0.53%) Cubeless Equities: No double=+0.196 Double=+0.402 Cubeful Equities No double: +0.282 Double/Take: +0.058 (-0.224) Double/Pass: +1.000 (+0.718) Best Cube action: No double / Take Percentage of wrong pass needed to make the double decision right: 19.2%


| DOSE: |
4 hits |
oral |
LSD |
(blotter / tab) |
This is a two part report of my most dramatic experiences on LSD.
===========================================================
PART 1
Living in Ft. Worth in spring of 1999, my brother one day brought home a strip of purple paper, and gave me 'about 4 hits worth'. I still to this day have not been able to find out where he got it, what the name of that particular street paper was, or if that really was 4 hits. However about two days later I decided to give half the strip a go, since I had a day off. At the time, I had no alcohol in my system, nor any other drugs besides a couple of bottles of Coca Cola.
I took the paper at about 6 in the evening, keeping it in my mouth for 15 minutes before swallowing what was left. This was far from the first time I had used Acid, so I expected the trip to hit after an hour or so.
The first moment that I noticed I was tripping (my own personal test- if I look at a cigarette right out of the pack and it somehow looks kind of bent, I'm probably starting the trip) about 25 minutes after eating the paper. Soon my skin began to tingle in a familiar way, and my mind began to branch out in its thought processes. It was to be a very strange trip indeed.
After an hour, I was hallucinating lightly and my brain was beginning to process thoughts that I now cannot remember or fathom. At 7:30ish (thanks to my watch) I put on my combat boots, and started walking through my neighborhood. This in and of itself was a strange reaction to the acid- usually LSD makes me very introspective and reclusive. I began to hear a 4 bar melody playing in my head, one I had never heard before. The music stayed in my head, looping infinitely throughout the rest of the trip.
As I rounded the corner from my house, I noticed that the sun appeared to be setting in a most remarkable and amazing display of colors. Glancing at my watch proved that this could not be- the sun had set almost an hour beforehand. As I walked, I found it amazing that my own brain could hallucinate in such vivid color and realism. The colors did not bleed over into the nearby objects, such as houses and trees, but instead stayed perfectly within my view of the sky.
As I walked, part of my brain latched onto the fact that my brother was partying at a friend's house that night. I decided to see if I could find out where the party was. I had no idea what his friend's name was, where his house was, or what area of the city the house was in. However, as I walked I began to have images popping into my head (in a sequence that appeared to be random) - A big American Flag. A silver wristwatch (mine was black). A Super Nintendo gaming console. A four foot green glass bong.
At about this time is where my trip became very heavy. I often find that when tripping on good acid, my memories at the peak of the trip become a mixed jumble of hallucinogenic and fantastic concepts, most of which are also (in this universe, anyhoo) impossible. When I sober up it becomes hard to put them into chronological order. This is what I remember from that particular trip. Keep in mind that I am not insisting that any of this really happened- this is only what I remember in Dolby Surround Sound and Technicolor imagination:
- Running along the top of a wrought iron fence, not unlike a ninja in a kung fu movie.
- Walking through an alleyway where the brick walls were covered in odd graffiti. At first, the number 1 was scrawled across a dumpster. Then, in two separate places, the number 2. About fifteen seconds farther down the alley, three instances of the number 3 spray painted on the walls. Four 4's, five 5's etc. on up to 10. I have since visited the alley in question, and found nary a number painted there.
- Drinking a cappuccino at a coffee bar two miles from my house, and feeling the fluid actually get absorbed into my body on a cellular level. I also met up with my friend Brian at this time, and he has since put my arrival at the coffee shop at about 1:30 am.
- Being able to actually control the direction of the breeze for about half an hour.
There are more, but those are the biggest.
Sometime around daybreak, I began to come down. I could still, however, hear the music of the melody I had been hearing all night. Upon my arrival home, I drank roughly half a gallon of orange juice, sat down, took off my boots, and began to write down the notes to the melody. By the time I was done, I was no longer tripping at all- just very, very tired. My legs felt as if I had been walking all night. (I have since ascertained that this was exactly the case- I walked for about 10 hours, through back roads, main streets, around the empty parking lot of a mall, etc.)
Two very strange after-effects of this trip:
A) The song I heard in my head that night was actually very good. Four bar melody, almost Trip-Hop in style with an industrial beat. Any musicians reading this will understand my wonder at this: The song is COMPLETELY unlike anything else I have written. I am a heavy metal musician, and most my stuff is 8 bar riffs with aggressive feels to it. The song I wrote that night is WORLDS apart from anything else I have ever written.
B) When my brother came home, I told him about my mental flashes and visions from earlier. He told me that his friend had a big American flag on the wall of his living room, a silver Timex wristwatch that he always wore, and they had spent the evening smoking weed from a large green bong and playing Super Nintendo.
I am a hardcore skeptic.  However, I am also convinced that for that evening, I somehow was able to remotely view my brother's habitat by merely concentrating on it.
As a footnote, I have done acid about 15 times in my life, in varying doses (once was tricked into eating a cube with 8 hits of strong liquid on it). I have experienced a mild recurrence of HPPD-like hallucinations at times (they are usually VERY faint), and also have had some rather strong flashbacks. It has been 2 years since I took my last LSD, and about 9 weeks ago I had a flashback so strong it almost felt as if I had done another hit. I actually look forward to the flashbacks at times- they are much more smooth than actually doing acid, and last only a couple of hours. The only bad side effect I have experienced is that during one trip, my skin broke out in a visible rash.
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.


Omashola tells people to stop entering his DM to talk about taking their life (video)
- Former BBNaija housemate Omashola has asked people to stop sending him messages about taking their lives
- The ex-housemate said he has been advising them not to take their lives
- Omashola asked why they would want to die and why they keep coming to him
Former Big Brother Naija housemate Omashola has addressed his fans on social media after he continued to get messages from some of them claiming that they want to take their life.
The former reality star shared a video of himself addressing the issue on his Instagram page. He said that some depressed people have entered his direct message to reveal that they wish to take their life.
Omashola said he has tried his best to stop them and inspire them to continue to live. He noted that he does not wish to post the chats because he does not want to give the impression that taking ones' life is okay.
PAY ATTENTION: Read best news on Nigeria's #1 news app
He also added that he does not understand why they have been coming to him to reveal the desire to take their own life.
The former reality star asked them to stop sending him messages about taking their life. He said it is not bad that they do, adding that he was glad to advise them against it.
PAY ATTENTION: Do you have news to share? Contact Legit.ng instantly
READ ALSO: NAIJ.com upgrades to Legit.ng: a letter from our Editor-in-Chief Bayo Olupohunda
Meanwhile, Legit.ng had earlier reported that the former Big Brother Naija housemate recently used his social media platform to celebrate his mother on her birthday ceremony. The ex-reality star also used the moment to thank his supporters.
NAIJ.com (naija.ng) -> Legit.ng We have upgraded to serve you better
I want to return the money you paid me - Singer Duncan Mighty writes open letter to Senator Okorocha
BBNaija Exclusive: Omashola apologises to Venita for attacking her on stage - on Legit TV


Exclusive for EU residents, full Android scholarships from Google and Udacity! Learn more.
All
Android
Data Science
Georgia Tech Masters in CS
iOS
Non-Tech
Software Engineering
Web Development
594 Built by {{course.author}}


Compute a symmetric distance matrix¶
Use the symmetric_distance_matrix()
function to create a SciPy CSR sparse distance matrix from the current dataset:
>>> from FPSim2 import FPSim2Engine
>>> fp_filename = 'chembl_27.h5'
>>> fpe = FPSim2Engine(fp_filename)
>>> csr_matrix = fpe.symmetric_distance_matrix(0.7, n_workers=4)
Note
Code above generating the symmetric matrix of ChEMBL 27 (1941405 compounds) took 3.5h, using 4 cores, running in a 2019 core i9 laptop. 12.5h in a single core.
The order of the compounds is the same one than in the fps file (the compounds get sorted by number of fingerprint features). To get the fps ids:
>>> ids = fpe.fps[:, 0]
The CSR distance matrix can be used as an input for some scikit-learn algorithms supporting “precomputed” distance metrics. Some others may need a similarity matrix. A CSR distance matrix can be easily converted into a similarity matrix:
csr_matrix.data = 1 - csr_matrix.data
# 0's in the diagonal of the matrix are implicit so they are not affected by the instruction above
csr_matrix.setdiag(1)
Finally, some algorithms (e.g. MDS) require a dense matrix. Conversion to a dense matrix can be easily done but bear in mind that the number of elements in the dense matrix will be the square of the number of your compounds and this may not fit in your memory:
# classic MDS doesn't work with missing values, so it's better to only use it with threshold 0.0
# in case you still want to run MDS on missing values matrices
# this example uses the SMACOF algorithm which is known for being able to deal with missing data.
# Use it at your own risk!
from sklearn.manifold import MDS
dense_matrix = csr_matrix.todense()
# with metric=False it uses the SMACOF algorithm
mds = MDS(dissimilarity="precomputed", metric=False)
pos = mds.fit_transform(dense_matrix)


Protocols:
Hostnames:
Ports:
Pathnames:
Open new tab next to the current one
Hide tooltips and keyboard shortcut reminders
Disable browser's built-in autocomplete (autofill)
Window width:
Single-line font:
Multi-line font:
Launch key: Configure Keyboard Shortcuts
Created by Denilson Sá Maia.
Full documentation is available at README.md.
Source-code available at GitHub (MIT license).
Includes punycode.js by Mathias Bynens for internationalized domain name support.


Madeira Rum matured underwater
The first batch of 242 of 605 bottles of “Rum Agrícola Madeira 970 Reserva” from the Engenhos do Norte Distillery, which have been maturing underwater since March, have been removed from the sea.
“The operation went very well and, after tasting, we have something fabulous, it is a very tasty rum, very round, very easy to drink because it has matured. It is an experience to continue,” manager, Miguel Faria told the Lusa agency.
The 363 still-submerged bottles will remain at a depth of between eight-ten metres for 12 months. They are subjected to seawater temperatures between 17-24ºC. The animal life that has attached to the bottles will be studied by MARE - Centre for Marine Sciences and the Environment.
605 bottles of “Rum Agrícola Madeira 970 Reserva” packed in five metal cages, were put into the sea of the Quinta do Lorde Marina, in Caniçal, on March 30, in an unprecedented experiment.
The aim was to determine the evolution of the organoleptic properties (which impress the senses) of the rum in underwater maturation.
The rum produced by the distillery, which has already won several international awards, is mostly destined for export to the United Kingdom, France, Germany and Italy.
The rum deposited in the ocean is the ‘970 Reserve’, obtained exclusively from the alcoholic fermentation of fresh sugar cane juice and subsequent distillation, and then aged for six years in French oak barrels.
Located in the small, quiet village of Porto da Cruz, Engenhos do Norte is one of the few distilleries operating in Madeira and the only one with steam machinery that goes back to the times of the Industrial Revolution.
According to the IVBAM - Instituto do Vinho, do Bordado e do Artesanato da Madeira, in 2018, 518,062 litres of Madeira Rum were bottled, which generated a revenue of €2.5 million.


PWMOut
public final class PWMOut
The PWMOut class is used to vary the output voltage by controlling the duration of high output in the time period on the pin.
Example: Light a LED
import SwiftIO
// Initiate a PWMOut to Pin PWM0.
let led = PWMOut(Id.PWM0)
// Set the brightness of the LED by setting the duty cycle.
while true {
led.setDutycycle(0.5)
}
-
Initialize a PWM output on a specified pin.
Usage Example
// The most simple way of initiating a pin PWM0, with all other parameters set to default. let pin = PWMOut(Id.PWM0) // Initialize the pin PWM0 with the frequency set to 2000hz. let pin = PWMOut(Id.PWM0, frequency: 2000) // Initialize the pin PWM0 with the frequency set to 2000hz and the dutycycle set to 0.5. let pin = PWMOut(Id.PWM0, frequency: 2000, dutycycle: 0.5)
Declaration
Swift
public init(_ id: IdName, frequency: Int = 1000, dutycycle: Float = 0.0)
Parameters
id
REQUIRED The name of PWMOut pin. See Id for reference.
frequency
OPTIONAL The frequency of the PWM signal.
dutycycle
OPTIONAL The duration of high output in the time period from 0.0 to 1.0.
-
Set the frequency and the dutycycle of a PWM output signal. The value of the dutycycle should be a float between 0.0 and 1.0.
Declaration
Swift
@inline(__always) public func set(frequency: Int, dutycycle: Float)
Parameters
frequency
The frequency of the PWM signal.
dutycycle
The duration of high output in the time period from 0.0 to 1.0.
-
Set the period and pulse width of a PWM output signal.
Declaration
Swift
@inline(__always) public func set(period: Int, pulse: Int)
Parameters
period
The period of the PWM ouput signal in microsecond.
pulse
The pulse width in the PWM period. This time can’t be longer than the period.
-
Set the duty cycle of a PWM output signal, that’s to say, set the duration of the on-state of a signal. The value should be a float between 0.0 and 1.0.
Declaration
Swift
@inline(__always) public func setDutycycle(_ dutycycle: Float)
Parameters
dutycycle
The duration of high output in the time period from 0.0 to 1.0.


{% extends "portal/base.html" %} {% load static %} {% block head %} {% endblock head %} {% block content %}
Hello, I'm a just a dummy contact in your contact list and this is my presentation text. Have fun!


SECTION: 900-Content
TITLE: WebDav
QUESTION: Can Jetty do WebDAV
Jetty does not provide native support for WebDAV, but servlets can be plugged in that
will provide WebDAV support:
Jakarta Slide provides WebDAV as part of a full featured
content management system.
Pier Fumagalli has written a
Tiny WebDAV
implementation.


--- layout: post esbma_id: 1158 title: Code Complete date: 2004-07-23 20:41:53 keywords: book_dev ---
I've got my copy of the second edition.
I read the original back when it first came out. This book is truly a classic. Recommended reading for all coders.


Default profiler page:
Request / Response
Performance
Exception
Logs
Events
Routing
Cache
Twig
Doctrine
Debug
Configuration


Using cktool
The cktool utility is located
in bin/macosx and bin/win
Its usage is:
Usage:
cktool buildbank [common_options] <infile> [<outfile>]
builds a bank file (.ckb) from an xml bank description file (.ckbx)
cktool buildbank [common_options] -single [sound_attributes] <infile> [<outfile>]
builds a bank file (.ckb) containing one sound
cktool buildstream [common_options] [sound_attributes] <infile> [<outfile>]
builds a stream file (.cks)
cktool info [common_options] <file>
prints info about a bank (.ckb) or stream (.cks) file
cktool extract [common_options] <infile>
extracts sounds from bank (.ckb) or stream (.cks) into .wav files
Available common options are:
-verbose
Available sound attribute options are:
-format <format>
-volume <volume>
-pan <pan>
-loopStart <frame>
-loopEnd <frame>
-loopCount <count>
Building bank files
Creating a bank file from a bank description file
To create a bank file, first
create an XML bank description file.
A sample bank description file used by the hellocricket sample projects
can be found at src/samples/hellocricket/common/hellocricket.ckbx:
<?xml version="1.0" encoding="utf-8" ?>
<bank name="test">
<sound name="hello" source="hellocricket.wav"
/>
</bank>
The first line (which is optional) just indicates that this is
an XML file.
The second line starts the "bank" block. Each bank description
file must contain one bank block. Each bank should have a name,
which should be 31 characters or less.
The third line is a "sound" block, which defines one sound.
There
should be at least one sound in a bank, though typically there will be
more. Each sound has a name (which, like the bank name, should be
31 characters or less) and a source file (which must be a WAV or AIFF
file). The source file can be an absolute path (such as /Users/steve/sound.wav or C:/sounds/sound.wav) or a relative path (such as sounds/sound.wav). If it's a relative path, it is assumed to be relative to the bank description file.
To create the binary bank file (.ckb) from this XML bank description
file (.ckbx), run
cktool buildbank infile.ckbx outfile.ckb
where infile.ckbx is the input bank
description file and outfile.ckb is
the output binary bank file. If the output file is omitted, the
output will be written to a file with the same name as the input file
but with the .ckb file extension, in
the same directory as the input file.
Creating a bank file from a single audio file
If you are building a bank file containing only one sound, you can do so without creating an XML file; simply specify the -single option, and pass in the source audio file as the input file. For example:
cktool buildbank -single explosion.wav explosion.ckb
will create a bank called explosion.ckb from the file explosion.wav.
Sound attributes
You can also specify some optional attributes for each sound:
attribute
|
description
|
default value
|
format
|
The format of the audio data; can be one of pcm8, pcm16, or adpcm.
|
pcm16
|
volume
|
Default volume of the sound, in the range from 0.0 to 1.0.
|
1.0
|
pan
|
Default pan of the sound, in the range from -1.0 (pan left) to 1.0 (pan right).
|
0.0 (center)
|
loopStart
|
Default starting sample frame
for looping, in the range from 0 (loop from the first sample) to one
less than the number of sample frames in the sound.
|
0
|
loopEnd
|
Default ending sample frame for
looping in the range from 1 to the number of sample frames in the
sound, or -1 to indicate the end of the sound. (The sample frame specified here is the sample after the end of the loop.)
|
number of sample frames
|
loopCount
|
Number of times the sound
loops. 0 means no looping; -1 means loop indefinitely; 1 means it
will play twice, 2 means it will play three times, etc.
|
0 (no looping), or -1 (infinite looping) if either loopStart or loopEnd were set
|
If you are using a bank description file, those attributes are
specified as XML attributes on the sound elements. For example, here is a more complex bank description file:
<?xml version="1.0" encoding="utf-8" ?>
<bank name="sound effects">
<sound name="explosion"
source="explosion.wav"
format="adpcm" volume="0.72" />
<sound name="hooray"
source="/Users/steve/sounds/hooray.aif" format="pcm8"
loopStart="1200" loopEnd="-1"/>
<sound name="buzz"
source="moresounds/buzzsound.wav" volume="0.3" pan="-1" />
</bank>
If you are building a single-sound bank using the -single
option, the attributes are specified as command-line options. For
example, here is how you would create the "explosion" sound from the
bank description file above:
cktool buildbank -format adpcm -volume 0.72 explosion.wav explosion.ckb
Building stream files
To create a .cks stream file, run
cktool buildstream infile.wav outfile.cks
where infile.wav is the input audio
file, and outfile.cks
is the output stream file. If the output file is omitted, the
output will be written to a file with the same name as the input file
but with the .cks file extension, in the same directory as the input
file.
When creating a stream, you can specify sound attributes on the command line:
cktool buildstream -format adpcm -pan -1 infile.wav outfile.cks


Wed Feb 27, 2008
I’m glad I was able to attend Northern Voice this year - it was informative and inspiring for the most part. All the clicking laptops around me were a bit daunting, but gave me something to aspire to.
The morning kicked off with the keynote address by Matt Mullenweg, founder of Wordpress (the excellent blogging platform on which this website is based). Listen to the audio here.
I then listened to a talk by the CEO of Broadband Mechanics, Marc Canter on bringing social to software. Next was an inspirational diatribe on the state of our stats-obsessed blogging world by Dave Olson.
In the afternoon, Alan Levine gave us 50 web 2.0 ways to tell a story (his was a tearjerker about a dog). Vancouver photographer Kris Krug then faced off against his mentor Alex Waterhouse-Hayward on the best medium for photography - hard copy or digital?
Finally, Rob Cottingham gave a talk called Blogger 911, about using blogs for crisis communications, something we’re doing a lot of in PR class. He also draws some great cartoons about social media - check them out on his page.
Overall it was worth going and I’ll be going next year - hopefully with a laptop this time!


class SleeperRb::Resources::NflState
The NflState
resource represents the current state of the NFL (week number, year, etc) as defined by Sleeper.
Attributes
display_week[R]
league_create_season[R]
league_season[R]
leg[R]
previous_season[R]
season[R]
season_start_date[R]
season_type[R]
week[R]


def setup(self, dtype):
N = 10000
self.s = Series(np.random.randint(1, 10, N)).astype(dtype)
self.values = [1, 2]
def time_isin(self, dtypes):
param_names = ["keep"]
def setup(self, keep):
self.s = Series(np.random.randint(1, 10, 100000))
def time_nlargest(self, keep):
self.s.nlargest(3, keep=keep)
def time_nsmallest(self, keep):


Name: Training
Type: Training Obsolete This directive does not analyse any parameters, but reads arguments on individual lines until it encounters a line starting with an asterisk.


Module SubLua
Lua binding to SubCpp - a C++ Subversion library.
Usage:
local SubLua = require( "SubLua" ) local svn = SubLua.new( { username = "user", password = "my_password" } )
Info:
- Release: 1.00 <04/21/2012>
- License: MIT/X11
- Author: Ryan P.
Functions
| new (options) | Create a new SVN client to work with. |
| SubLua:Cat (path, options) | Output the content of specified files or URLs. |
| SubLua:Upgrade (path) | Upgrade the working copy format of the specified path. |
| SubLua:GetWorkingCopyFormatVersion (path) | Get the format version of the working copy at the specified path. |
| SubLua:Checkout (url, path, options) | Checks out a working copy from a url to a path. |
| SubLua:Update (path, options) | Updates the file or directory. |
| SubLua:Export (srcPath, destPath, options) | Create an unversioned copy of a tree. |
| SubLua:Get (path, destPath, options) | Retrieves the contents for a specific revision of a path and saves it to the destination file dstPath . |
| SubLua:Add (path, options) | Schedule a working copy path for addition to the repository. |
| SubLua:Import (path, url, message, options) | Commit an unversioned file or tree into the repository. |
| SubLua:MkDir (path, message) | Create a new directory under version control. |
| SubLua:Delete (path, message, options) | Remove files and directories from version control. |
| SubLua:Revert (path, options) | Revert files and directories from version control. |
| SubLua:Lock (path, message, options) | Locks files and directories. |
| SubLua:Unlock (path, options) | Unlocks files and directories. |
| SubLua:Commit (path, message, options) | Commit files or directories into repository |
| SubLua:DiffRevisions (path, startRevision, endRevision, summarizeCallback, options) | Display the differences between two revisions of a path. |
| SubLua:DiffPaths (path1, path2, summarizeCallback, options) | Produce a diff summary which lists the changed items between path1@revision and path2@revision2 without creating text deltas. |
| SubLua:Copy (srcPath, srcRevision, destPath) | Copies one path to another |
| SubLua:Info (path, infoReceiverCallback, options) | Return information about pathOrUrl |
| SubLua:PropGet (propertyName, path, options) | Gets the value of a property on files, dirs, or revisions. |
| SubLua:PropSet (propName, propValue, path, options) | set property in @a path no matter whether local or repository |
| SubLua:Cleanup (path) | Recursively cleans up a local directory, finishing any incomplete operations, removing lockfiles, etc. |
| ReleaseWorkingCopyLock () | Release the lock on the working copy Does nothing and is unnecessary in svn versions 1.6 and below |
Tables
| Options | The Options class. |
| SvnInfo | The SvnInfo class. |
| Enums | The Subverison enums. |
Functions
- new (options)
-
Create a new SVN client to work with.
- Available listener callbacks are:
Notify( path, svn.action, kind, mimeType, contentState, propState, revision )
GetLogin( realm, username, password, maySave )
GetLogMessage()
and it should return the log message.- Incomplete may not function
Cancel()
Parameters:
- options {table} [OPT] The table can contain key of 'username' for the username, 'password' for the password, 'no_auth_cache' to control if the is saved, and 'listener' which is a table of the listeners you want to overwride.
Returns:
-
{table} The SubLua object.
- SubLua:Cat (path, options)
-
Output the content of specified files or URLs.
Parameters:
- path {string} The path or URL to output.
- options {table} [OPT] Options table. Possible Options: peg, revision
Returns:
-
{string} String of the contents of
@path
. - SubLua:Upgrade (path)
-
Upgrade the working copy format of the specified path.
Parameters:
- path {string} The path to a working copy to upgrade.
- SubLua:GetWorkingCopyFormatVersion (path)
-
Get the format version of the working copy at the specified path.
Parameters:
- path {string} The absolute path to a working copy to get the format for.
Returns:
-
The format version of the working copy specified (eg 29 for Subversion 1.7.13 and 31 for Subversion 1.8.0)
- SubLua:Checkout (url, path, options)
-
Checks out a working copy from a url to a path.
Parameters:
- url {string} The URL to check out.
- path {string} The local path to check out to.
- options {table} [OPT] Options table. Possible Options: peg, revision, depth, ignore_externals, force
Returns:
-
Revision of the checkout.
see also:
- SubLua:Update (path, options)
-
Updates the file or directory.
Parameters:
- path {string} The path or URL to output.
- options {table} [OPT] Options table. Possible Options: revision, depth, set_depth, ignore_externals, force
Returns:
-
Revision of the checkout.
see also:
- SubLua:Export (srcPath, destPath, options)
-
Create an unversioned copy of a tree.
Parameters:
- srcPath {string} The source path or URL to export from.
- destPath {string} The destination path to export to.
- options {table} [OPT] Options table. Possible Options: peg, revision, force, ignore_externals, depth, native_eol
Returns:
-
Revision of the Export.
see also:
- SubLua:Get (path, destPath, options)
-
Retrieves the contents for a specific
revision
of apath
and saves it to the destination filedstPath
.If
destPath
is empty (""), then this path will be constructed from the temporary directory on this system and the filename inpath
.destPath
will still have the file extension frompath
and uniqueness of the temporary filename will be ensured.Parameters:
- path {string} path or url
- destPath {string} destination path
- options {table} [OPT] Options table. Possible Options: peg, revision
Returns:
-
{string} the destPath or the temp file path if
destPath
was an empty stringsee also:
- SubLua:Add (path, options)
-
Schedule a working copy path for addition to the repository. Adds a file to the repository.
Parameters:
- path {string} The path to add to the working copy. Path's parent must be under revision control already.
- options {table} [OPT] Options table. Possible Options: depth, force, no_ignore, add_parents
see also:
- SubLua:Import (path, url, message, options)
-
Commit an unversioned file or tree into the repository. Parent directories are created as necessary in the repository.
Parameters:
- path {string} The path to add to the working copy. Path's parent must be under revision control already.
- url {string} The URL to check out.
- message {string} [OPT] The commit message.
- options {table} [OPT] Options table. Possible Options: depth, no_ignore, auto_props
see also:
- SubLua:MkDir (path, message)
-
Create a new directory under version control.
Parameters:
- path {string}/{table} The path(s) or URL(s) to output. If it is a local path then the directory is created and scheduled for addition upon the next commit. If it is a URL then the commit is immediate.
- message {string} [OPT] Log message as a string.
- SubLua:Delete (path, message, options)
-
Remove files and directories from version control.
Parameters:
- path {string}/{table} The path(s) or URL(s) to remove. If it is a local path(s) then the paths are scheduled for deletion upon the next commit. If it is a URL(s) then they are deleted immediatly.
- message {string} [OPT] Log message.
- options {table} [OPT] Options table. Possible Options: force, keep_local
see also:
- SubLua:Revert (path, options)
-
Revert files and directories from version control.
Parameters:
- path {string}/{table} The path(s) or URL(s) to revert.
- options {table} [OPT] Options table. Possible Options: depth
see also:
- SubLua:Lock (path, message, options)
-
Locks files and directories.
Parameters:
- path {string}/{table} The path(s) or URL(s) to lock.
- message {string} [OPT] The message for the lock.
- options {table} [OPT] Options table. Possible Options: force
see also:
- SubLua:Unlock (path, options)
-
Unlocks files and directories.
Parameters:
- path {string}/{table} The path(s) or URL(s) to unlock.
- options {table} [OPT] Options table. Possible Options: force
see also:
- SubLua:Commit (path, message, options)
-
Commit files or directories into repository
Parameters:
- path {string}/{table} The path(s) to commit.
- message {string} The commit message.
- options {table} [OPT] Options table. Possible Options: depth, keep_locks, keep_changelists
see also:
- SubLua:DiffRevisions (path, startRevision, endRevision, summarizeCallback, options)
-
Display the differences between two revisions of a path.
The function may report false positives if
notice_ancestry
is true, since a file might have been modified between two revisions, but still have the same contents. IfsummarizeCallback
andoptions.summarize = true
then the results passed to thesummarizeCallback
. IfsummarizeCallback
is not provided, butoptions.summarize = true
then an array of summaryInfo is returned.Parameters:
- path {string} The path to diff. Can be either a working-copy path or a URL.
- startRevision {string}/{number} The start revisions to check.
- endRevision {string}/{number} The end revision to check.
- summarizeCallback
{function} [OPT] Called for every difference found when . For each invocation it passes
summaryInfo
table that has keyspath
,summarize_kind
,prop_changed
, andnode_kind
. ??Return true from the summarizeCallback() to have the function continue, if you return false it will stop the operation and throw an error.??summarize_kind
available values are found in the Enum section under the summarize.kind.node_kind
available values are found in the Enums section under node.kind The prototype for the callback isfunction SubLua:MyDiffSummarizeReceiver( summaryInfo ) print( summaryInfo.path, summaryInfo.summarize_kind, summaryInfo.prop_changed, summaryInfo.node_kind ) return true end
- options {table} [OPT] Options table. Possible Options: depth, summarize, peg, notice_ancestry, no_diff_deleted, ignore_content_type
Returns:
-
Normally the differences are returned as a {string} of file differences.
see also:
- SubLua:DiffPaths (path1, path2, summarizeCallback, options)
-
Produce a diff summary which lists the changed items between path1@revision and path2@revision2 without creating text deltas.
The function may report false positives if
notice_ancestry
is true, since a file might have been modified between two revisions, but still have the same contents. IfsummarizeCallback
andoptions.summarize = true
then the results passed to thesummarizeCallback
. IfsummarizeCallback
is not provided, butoptions.summarize = true
then an array of summaryInfo is returned.Parameters:
- path1 {string} The first path to diff. Can be either a working-copy path or a URL.
- path2 {string} The second path to diff. Can be either a working-copy path or a URL.
- summarizeCallback
{function} Called for every difference found. For each invocation it passes
summaryInfo
table that has keyspath
,summarize_kind
,prop_changed
, andnode_kind
. ??Return true from the summarizeCallback() to have the function continue, if you return false it will stop the operation and throw an error.??summarize_kind
available values are found in the Enum section under the summarize.kind.node_kind
available values are found in the Enums section under node.kind The prototype for the callback isfunction SubLua:MyDiffSummarizeReceiver( summaryInfo ) print( summaryInfo.path, summaryInfo.summarize_kind, summaryInfo.prop_changed, summaryInfo.node_kind ) return true end
- options {table} [OPT] Options table. Possible Options: depth, revision, revision2, summarize, peg, notice_ancestry.
Returns:
-
Normally the differences are returned as a {string} of file differences.
see also:
- SubLua:Copy (srcPath, srcRevision, destPath)
-
Copies one path to another
Parameters:
- srcPath {string} The source path to copy from.
- srcRevision {string} The source revision to copy from.
- destPath {string} The destination path to copy to.
- SubLua:Info (path, infoReceiverCallback, options)
-
Return information about pathOrUrl
Parameters:
- path {string}/{table} The path or URL to get the specified information from.
- infoReceiverCallback
{function} [OPT] Called everytime a file is found during receiving information. For each invocation it passes
path
with the information present ininfo
. Return true from the InfoReceiver() to have the function contiue, if you return false it will stop the operation and throw an error. The prototype for the callback isfunction SubLua:MyInfoReceiver( path, info ) print( path, info ) return true end
- options {table} [OPT] Options table. Possible Options: peg, revision, depth
see also:
- SubLua:PropGet (propertyName, path, options)
-
Gets the value of a property on files, dirs, or revisions.
property table. In the property table there are keys of property names to their value, both as strings.
Parameters:
- propertyName {string} The property to get from path.
- path {string}/{table} The path or URL to get the specified property from.
- options {table} [OPT] Options table. Possible Options: revision, depth
Returns:
-
{table} Table of properties. The list will contain tables where the keys are the path, and the values are a
see also:
- SubLua:PropSet (propName, propValue, path, options)
-
set property in @a path no matter whether local or repository
Parameters:
- propName {string} The property name to set.
- propValue {string} The value of the property to set
- path {string} Path where property to be set
- options {table} Options table. Possible Options: depth
see also:
- SubLua:Cleanup (path)
-
Recursively cleans up a local directory, finishing any
incomplete operations, removing lockfiles, etc.
Parameters:
- path {string} Path to a local directory.
- ReleaseWorkingCopyLock ()
- Release the lock on the working copy Does nothing and is unnecessary in svn versions 1.6 and below
Tables
- Options
-
The Options class.
Fields:
- revision the revision you want to update to; defaults to "HEAD".
- revision2 the revision for path2 when finding the differences in paths; defaults to "HEAD".
- peg the peg revision you want to update using; defaults to "HEAD".
- depth limit operation by depth ARG ('empty', 'files', 'immediates', or 'infinity'); defaults to unknown.
- force force operation to run; defaults to false.
- ignore_externals set to ignore the externals; defaults to false.
- ignore_keywords set to ignore the keyword substitution; defaults to false.
- no_ignore set to disregard default and svn:ignore property ignores; defaults to false.
- native_eol use a different EOL marker than the standard system marker for files with the svn:eol-style property set to 'native'. ARG may be one of 'LF', 'CR', 'CRLF'; defaults to NULL (no change).
- set_depth
set new working copy depth to
depth
. Ifdepth
is not specified then this does nothing; defaults to false. - parents If true, create any non-existent parent directories also; defaults to false.
- add_parents If true, recurse up path's directory and look for a versioned directory. If found, add all intermediate paths between it and path; defaults to false.
- keep_changelists After the commit completes successfully, remove changelist associations from the targets, unless keep_changelists is true; defaults to false.
- keep_locks Unlock paths in the repository, unless keep_locks is true; defaults to false.
- auto_props Enable automatic properties; defaults to true.
- ignore_unknown_node_types Ignore files of which the node type is unknown, such as device files and pipes.; defaults to false.
- keep_local if true then the paths will not be removed from the working copy, only scheduled for removal from the repository. Once the scheduled deletion is committed, they will appear as unversioned paths in the working copy; defaults to false.
- no_diff_deleting Do not print differences for deleted files; defaults to false.
- notice_ancestry Notice ancestry when calculating differences; defaults to false.
- ignore_content_type if true, Diff output will be generated for binary files, in which case diffs will be shown regardless of the content types; defaults to false.
- summarize if true, during a diff operation only produce a summary which lists the changed items without creating text deltas; defaults to false.
- SvnInfo
-
The SvnInfo class.
Fields:
- isValid Is it valid?
- url The url
- revision The revision
- kind The kind
- rootUrl The root URL
- uuid The uuid
- lastChangedRevision Last changed revision
- lastChangedDate Last changed date
- lastChangedAuthor Last changed author
- lock Lock
- hasWCInfo Has working copy info?
- schedule The schedule
- copyFromUrl Copy from URL
- copyFromRev Copy from revision
- textTime Time in text
- propTime Properties time
- checksum The checksum
- conflictOld Conflict old
- conflictNew Conflict new
- conflictWrk Conflict working
- propRejectFile Prop reject file
- changelist The changelist
- depth Depth
- workingSize Working size
- size Size
- size64 Size64
- workingSize64 Working Size64
- treeConflict the TreeConflict
- Enums
-
The Subverison enums. These are part of the SubLua object returned after calling new().
Fields:
- wc.notify.action.add Adding a path to revision control.
- wc.notify.action.copy Copying a versioned path.
- wc.notify.action.delete Deleting a versioned path.
- wc.notify.action.restore Restoring a missing path from the pristine text-base.
- wc.notify.action.revert Reverting a modified path.
- wc.notify.action.failed_revert A revert operation has failed.
- wc.notify.action.resolved Resolving a conflict.
- wc.notify.action.skip Skipping a path.
- wc.notify.action.update_delete Got a delete in an update.
- wc.notify.action.update_add Got an add in an update.
- wc.notify.action.update_update Got any other action in an update.
- wc.notify.action.update_completed The last notification in an update (including updates of externals).
- wc.notify.action.update_external Updating an external module.
- wc.notify.action.status_completed The last notification in a status (including status on externals).
- wc.notify.action.status_external Running status on an external module.
- wc.notify.action.commit_modified Committing a modification.
- wc.notify.action.commit_added Committing an addition.
- wc.notify.action.commit_deleted Committing a deletion.
- wc.notify.action.commit_replaced Committing a replacement.
- wc.notify.action.commit_postfix_txdelta Transmitting post-fix text-delta data for a file.
- wc.notify.action.blame_revision Processed a single revision's blame.
- wc.notify.action.locked Locking a path. New in 1.2.
- wc.notify.action.unlocked Unlocking a path. New in 1.2.
- wc.notify.action.failed_lock Failed to lock a path. New in 1.2.
- wc.notify.action.failed_unlock Failed to unlock a path. New in 1.2.
- wc.notify.action.exists Tried adding a path that already exists. New in 1.5.
- wc.notify.action.changelist_set Changelist name set. New in 1.5.
- wc.notify.action.changelist_clear Changelist name cleared. New in 1.5.
- wc.notify.action.changelist_moved Warn user that a path has moved from one changelist to another. New in 1.5. Deprecated: As of 1.7, separate clear and set notifications are sent.
- wc.notify.action.merge_begin A merge operation (to path) has begun.
- wc.notify.action.foreign_merge_begin A merge operation (to path) from a foreign repository has begun.
- wc.notify.action.update_replace Replace notification. New in 1.5.
- wc.notify.action.property_added Property added. New in 1.6.
- wc.notify.action.property_modified Property updated. New in 1.6.
- wc.notify.action.property_deleted Property deleted. New in 1.6.
- wc.notify.action.property_deleted_nonexistentNonexistent property deleted. New in 1.6.
- wc.notify.action.revprop_set Revprop set. New in 1.6.
- wc.notify.action.revprop_deleted Revprop deleted. New in 1.6.
- wc.notify.action.merge_completed The last notification in a merge. New in 1.6.
- wc.notify.action.tree_conflict The path is a tree-conflict victim of the intended action (not a persistent tree-conflict from an earlier operation, but this operation caused the tree-conflict). New in 1.6.
- wc.notify.action.failed_external The path is a subdirectory referenced in an externals definition which is unable to be operated on. New in 1.6.
- wc.notify.action.update_started Starting an update operation. New in 1.7.
- wc.notify.action.update_skip_obstruction An update tried to add a file or directory at a path where a separate working copy was found. New in 1.7.
- wc.notify.action.update_skip_working_only An explicit update tried to update a file or directory that doesn't live in the repository and can't be brought in. New in 1.7.
- wc.notify.action.update_skip_access_denied An update tried to update a file or directory to which access could not be obtained. New in 1.7.
- wc.notify.action.update_external_removed An update operation removed an external working copy. New in 1.7.
- wc.notify.action.update_shadowed_add A node below an existing node was added during update. New in 1.7.
- wc.notify.action.update_shadowed_update A node below an exising node was updated during update. New in 1.7.
- wc.notify.action.update_shadowed_delete A node below an existing node was deleted during update. New in 1.7.
- wc.notify.action.merge_record_info The mergeinfo on path was updated. New in 1.7.
- wc.notify.action.upgraded_path An working copy directory was upgraded to the latest format. New in 1.7.
- wc.notify.action.merge_record_info_begin Mergeinfo describing a merge was recorded. New in 1.7.
- wc.notify.action.merge_elide_info Mergeinfo was removed due to elision. New in 1.7.
- wc.notify.action.patch A file in the working copy was patched. New in 1.7.
- wc.notify.action.patch_applied_hunk A hunk from a patch was applied. New in 1.7.
- wc.notify.action.patch_rejected_hunk A hunk from a patch was rejected. New in 1.7.
- wc.notify.action.patch_hunk_already_applied A hunk from a patch was found to already be applied. New in 1.7.
- wc.notify.action.commit_copied Committing a non-overwriting copy (path is the target of the copy, not the source). New in 1.7.
- wc.notify.action.commit_copied_replaced Committing an overwriting (replace) copy (path is the target of the copy, not the source). New in 1.7.
- wc.notify.action.url_redirect The server has instructed the client to follow a URL redirection. New in 1.7.
- wc.notify.action.path_nonexistent The operation was attempted on a path which doesn't exist. New in 1.7.
- wc.notify.action.exclude Removing a path by excluding it. New in 1.7.
- wc.notify.action.failed_conflict Operation failed because the node remains in conflict. New in 1.7.
- wc.notify.action.failed_missing Operation failed because an added node is missing. New in 1.7.
- wc.notify.action.failed_out_of_date Operation failed because a node is out of date. New in 1.7.
- wc.notify.action.failed_no_parent Operation failed because an added parent is not selected. New in 1.7.
- wc.notify.action.failed_locked Operation failed because a node is locked by another user and/or working copy. New in 1.7.
- wc.notify.action.failed_forbidden_by_server Operation failed because the operation was forbidden by the server. New in 1.7.
- wc.notify.action.skip_conflicted The operation skipped the path because it was conflicted. New in 1.7.
- wc.notify.state.unknown Notifier doesn't know or isn't saying.
- wc.notify.state.unchanged The state did not change.
- wc.notify.state.missing The item wasn't present.
- wc.notify.state.obstructed An unversioned item obstructed work.
- wc.notify.state.changed Pristine state was modified.
- wc.notify.state.merged Modified state had mods merged in.
- wc.notify.state.conflicted Modified state got conflicting mods.
- wc.notify.state.source_missing The source to copy the file from is missing. New in 1.7
- wc.schedule.normal Nothing special here.
- wc.schedule.add Slated for addition.
- wc.schedule.delete Slated for deletion.
- wc.schedule.replace Slated for replacement (delete + add)
- wc.conflict.action.edit attempting to change text or props.
- wc.conflict.action.add attempting to add object.
- wc.conflict.action.delete attempting to delete object.
- wc.conflict.action.replace attempting to replace object. New in 1.7
- wc.conflict.reason.edited Local edits are already present.
- wc.conflict.reason.obstructed Another object is in the way.
- wc.conflict.reason.deleted Object is already schedule-delete.
- wc.conflict.reason.missing Object is unknown or missing.
- wc.conflict.reason.unversioned Object is unversioned.
- wc.conflict.reason.added Object is already added or schedule-add.
- wc.conflict.reason.replaced Object is already replaced. New in 1.7
- wc.conflict.kind.text textual conflict (on a file)
- wc.conflict.kind.property property conflict (on a file or dir)
- wc.conflict.kind.tree tree conflict (on a dir)
- wc.operation.none No user operation exposed a conflict.
- wc.operation.update User operation 'update' exposed a conflict.
- wc.operation.switch User operation 'switch' exposed a conflict.
- wc.operation.merge User operation 'merge' exposed a conflict.
- node.kind.none Absent node in the Subversion filesystem.
- node.kind.file Regular file node in the Subversion filesystem.
- node.kind.dir Directory node in the Subversion filesystem.
- node.kind.unknown "something's here, but we don't know what" node in the Subversion filesystem.
- node.action.change Changed "action" attached to nodes in the dumpfile.
- node.action.add Added "action" attached to nodes in the dumpfile.
- node.action.delete Deleted "action" attached to nodes in the dumpfile.
- node.action.replace Replaced "action" attached to nodes in the dumpfile.
- depth.unknown Depth undetermined or ignored. In some contexts, this means the client should choose an appropriate default depth. The server will generally treat it as depth.infinity.
- depth.exclude Exclude (i.e., don't descend into) directory D.
- depth.empty Just the named directory D, no entries. Updates will not pull in any files or subdirectories not already present.
- depth.files D + its file children, but not subdirs. Updates will pull in any files not already present, but not subdirectories.
- depth.immediates D + immediate children (D and its entries). Updates will pull in any files or subdirectories not already present; those subdirectories' this_dir entries will have depth-empty.
- depth.infinity D + all descendants (full recursion from D). Updates will pull in any files or subdirectories not already present; those subdirectories' this_dir entries will have depth-infinity. Equivalent to the pre-1.5 default update behavior.
- recurse.kind.nonrecursive Indicates recursion is NOT needed.
- recurse.kind.recursive Indicates recursion is needed.
- summarize.kind.normal An item with no text modifications. @see SubLua:DiffRevisions @see SubLua:DiffPaths
- summarize.kind.added An added item. @see SubLua:DiffRevisions @see SubLua:DiffPaths
- summarize.kind.modified An item with text modifications. @see SubLua:DiffRevisions @see SubLua:DiffPaths
- summarize.kind.deleted A deleted item. @see SubLua:DiffRevisions @see SubLua:DiffPaths