PyGromosTools
Welcome to PyGromosTools
Examples
Turtorials
Pygromos: OOP in python 3
Gromos Tutorial Pipeline
Documentation
PyGromosTools
»
Turtorials
View page source
Turtorials
¶
Pygromos: OOP in python 3
Implementations of OOP in Python3
Definition of a Class
Magic functions (****)
Class Attributes
Accessibility
Mutability of Class Attributes
Methods
Levels
Overwriting methods on Runtime
Inheritance
Type Testing & implicit Polymorphism
Using Pygromos
PyGromos Wrapper:
Example gromosPP:
Example for gromosXX:
PyGromos Files:
Additional: functional programming
Lambda functions
preimplemented functions
list/dict - comprehensions
decorators - how they work
Gromos Tutorial Pipeline
Build initial files
generate Topology
build single topologies
combine topology
generate coordinates
add hydrogens
cnf to pdb
energy minimization - Vacuum
Solvatistation and Solvent Energy Minimization
build box system
Add Ions
Energy Minimization BOX
Simulation
Equilibration NVP
MD NVP
Analysis


Are you sure you want to delete server {{name}} ({{url}})? This will remove all data for this server.


Test schema with deprecated in description
[Deprecated]
[Deprecated - Use not_deprecated instead]
not_deprecated
This is [Deprecated]
This is [Deprecated - Use not_deprecated instead]


Usage Examples¶
In this page some examples about using WaveDec and WaveDecActive. Examples are found in the folder WaveDec/examples
.
The maximum likelihood estimates of the parameters are found in the files LoveWaves.csv
and RayleighWaves.csv
or appropriate output files.
The M2.1 SESAME synthetic dataset (ambient vibrations)¶
This synthetic dataset was developed within the SESAME project. The M2.1 model corresponds to a structural model of a layer over half-space. Several sources are present and the ambient vibrations wavefield is analyzed using recordings from an array of 14 triaxial sensors. The dataset is also analyzed and discussed in [Maranò_et_al_2012].
Analysis of Rayleigh waves using WaveDec leads to the identification of dispersion and ellipticity curves for the fundamental and the first higher mode. In the figures below, the green line shows the theoretical values computed with the propagator-matrix method.
Download the SAC input files from here. Extract the files from the compressed archive.
$ cd WaveDec/examples/01_SESAME_M2.1 $ WaveDec.py
Warning
The SESAME files are generated assuming the vertical z
axes pointing downward (i.e., positive sign of the signal implying downward motion). This is the opposite of what is assumed
by WaveDec and by most of the seismic instrumentation. As a result, the estimated ellipticity angle values have opposite sign of the intended one (prograde and retrograde particle motion are exchanged).
You may wish to see how the results differ by allowing or not WaveDec to model the lack of waves. Set ModelNoise
to true
or false
. See also Model selection: Love wave, Rayleigh wave, or nothing?.
The Brigerbad dataset (ambient vibrations)¶
This is a dataset from a ambient vibrations survey collected in Switzerland. The dataset is analyzed and discussed in [Maranò_et_al_2012].
Download the SAC input files from here. Extract the files from the compressed archive.
The folder contains three configuration files corresponding to three different processing strategies. In config_LoveAndRayleigh.yaml
both Love and Rayleigh wave are processed together.
In config_LoveOnly.yaml
and config_RayleighOnly.yaml
only one wave type is processed.
To analyze solely Love waves we run
$ cd WaveDec/examples/02_Brigerbad $ WaveDec.py --config_file=config_LoveOnly.yaml
Output is saved in the folder ./LoveOnly/
.
Tip
Our experience shows that it is better to model both Love and Rayleigh waves in the same analysis. See [Maranò_et_al_2017a] for details.
Zurich Airport (active and passive)¶
This is a dataset from an active survey collected in Switzerland. In the picture, yellow dots mark the sensors and red stars mark shooting locations. The dataset is also analyzed and discussed in [Maranò_et_al_2017a] and [Maranò_et_al_2017b].
Download the SAC input files from here. Data for solely one shooting location is provided in the download.
The configuration file config_5Rayleigh.yaml
is already set to process Rayleigh waves. The configuration file contains information about the source position and the timing of the twelve shots considered. We observed that the parameter gamma
plays an important role in the analysis of active seismic surveys.
The code for the analysis of circular wavefront is used, i.e. WaveDecActive.py
.
In order to quickly see all the traces and each shot, type
$ cd WaveDec/examples/03_ZurichAirport_Active $ WaveDecActive.py --config_file=config_5Rayleigh.yaml --plot
In order to perform the actual processing run
$ cd WaveDec/examples/14_ZurichAirport_Active $ WaveDecActive.py --config_file=config_5Rayleigh.yaml
Debugging examples¶
The examples in this section are provided for the sake of verifying the functioning of the software and any future modification. They can also be used to understand limitations of the algorithm in a controlled environment.
To print more console output, showing the functioning of WaveDec you may want to increase the verbosity as
$ WaveDec.py --verbosity 2
The wavefield is composed of seismic waves and additive Gaussian noise. Seismic waves are ideal as in the mathematical model used beyond the development of WaveDec. The synthetic wavefield is specified in a YAML
file, whose syntax is not documented.
Plane waves (translational motions)¶
The plane wavefront assumption is used in this section. This is the assumption commonly used in the processing of ambient vibrations.
A single Love wave¶
In this example, a synthetic wavefield containing a single Love wave is analyzed. The configuration file config.yaml
specifies the file OneLove.yaml
as INPUT
. This latter file specifies the synthetic wavefield and its syntax is not documented here.
Change directory to the folder contains the examples.
$ cd WaveDec/examples/11_OneLoveWave/ $ WaveDec.py --verbosity 2
With the increased output verbosity we can get insights on the functioning of the algorithm. Notice that it is attempted to fit a second wave but such model is rejected as in the wavefield there is a single wave.
Look at the output file LoveWaves.csv
to see the value of the estimated parameters.
A single Rayleigh wave¶
This example is similar to the previous one, but a Rayleigh wave is present instead of a Love wave.
$ cd WaveDec/examples/12_OneRayleighWave/ $ WaveDec.py --verbosity 2
A single vertical wave¶
This example is similar to the previous ones. A plane wave measured solely at the vertical component is measured and modeled.
$ cd WaveDec/examples/13_OneVerticalWave/ $ WaveDec.py --verbosity 2
Two Love and Two Rayleigh waves¶
In this example, the synthetic wavefield specified in TwoLoveTwoRayleigh.yaml
consists of the superposition of two Love and two Rayleigh waves at the same frequency.
This example is akin to an example discussed in [Maranò_et_al_2012].
The synthetic wavefield is described in the file TwoLoveTwoRayleigh.yaml
. All waves are at the same frequency . There are two Love and two Rayleigh waves with the following parameters:
The first Love wave has amplitude , wavenumber , and azimuth
The second Love wave has parameters , ,
The first Rayleigh wave has amplitude , wavenumber , azimuth , and ellipticty angle (circular polarization, prograde particle motion)
The second Rayleigh wave has parameters , , ,
In addition, it is added Gaussian white noise with variance .
We run WaveDec using the following command
$ cd WaveDec/examples/14_TwoLoveTwoRayleigh $ WaveDec.py
We can look at the output files LoveWaves.csv
and RayleighWaves.csv
to verify that the wavefield parameters are correctly estimated.
$ cat LoveWaves.csv # WaveDec output file for Love waves # MODEL_LOVE # Frequency Amplitude Wavenumber Velocity Azimuth # [Hz] [a.u.] [1/m] [m/s] [rad] 6.000e+00 7.992e-01 4.005e-02 1.498e+02 5.498e+00 6.000e+00 2.002e-01 4.003e-02 1.499e+02 3.142e+00 $ cat RayleighWaves.csv # WaveDec output file for Rayleigh waves # MODEL_RAYLEIGH # Frequency Amplitude Wavenumber Velocity Azimuth EllipticityAngle # [Hz] [a.u.] [1/m] [m/s] [rad] [rad] 6.000e+00 9.021e-01 3.002e-02 1.999e+02 7.861e-01 7.823e-01 6.000e+00 6.996e-01 3.004e-02 1.997e+02 1.569e+00 7.848e-01
Multiple frequencies¶
In this example, two Love and two Rayleigh waves are present. But they are at two different frequencies.
$ cd WaveDec/examples/15_MultipleFrequencies $ WaveDec.py
Tricky interference¶
In this example, one Love wave and one Rayleigh wave are present. The wave parameters are chosen in order to create a difficult scenario:
Love wave azimuth is
Rayleigh wave azimuth is . The ellipticty angle is (horizontal polarization)
With these parameters both waves have all of their energy solely on the axis (East-West component). Rayleigh wave has no energy on the vertical component.
In addition,
Both waves propagate at the same frequency and with the same velocity ( Hz and )
Rayleigh wave amplitude is and Love wave amplitude is
It is added white Gaussian noise with variance
To run the code we do the following
$ cd WaveDec/examples/16_TrickyInterference $ WaveDec.py
Looking at the output files, we see that –despite the tricky setup– the wave parameters are retrieved correctly
$ cat LoveWaves.csv # WaveDec output file for Love waves # MODEL_LOVE # Frequency Amplitude Wavenumber Velocity Azimuth # [Hz] [a.u.] [1/m] [m/s] [rad] 6.000e+00 9.963e-02 2.980e-02 2.013e+02 1.565e+00 $ cat RayleighWaves.csv # WaveDec output file for Rayleigh waves # MODEL_RAYLEIGH # Frequency Amplitude Wavenumber Velocity Azimuth EllipticityAngle # [Hz] [a.u.] [1/m] [m/s] [rad] [rad] 6.000e+00 1.002e+00 3.000e-02 2.000e+02 1.299e-03 1.568e+00
Plane waves (translational and rotational motions)¶
These examples showcase the joint analysis of translational and rotational motions. Including the use of single six-components (6C) sensors. The theory and algorithm were developed in [Maranò_et_al_2014]. The following examples use simple synthetic wavefield to verify the correct functioning of the WaveDec.
Warning
It is important that the translational and rotational input files are consistent with the equations for translational and rotational motions presented in the Section Rayleigh wave. In practice, it is necessary that translational and rotational measurements are both in velocity (i.e. and ). Alternatively, both type of measurements are in acceleration, i.e. and .
A single Love wave (single 6C sensor)¶
The wavefield is composed of a single Love wave and is measured with a single six-components sensors.
We run WaveDec with no arguments, so that the default configuration file config.yaml
is used
$ cd WaveDec/examples/21_OneLoveWaveSingle6cSensor $ WaveDec.py
After the processing is completed, we can check the output file LoveWaves.csv
and read the parameters of the estimated Love wave.
$ cat LoveWaves.csv # WaveDec output file for Love waves # MODEL_LOVE # Frequency Amplitude Wavenumber Velocity Azimuth # [Hz] [a.u.] [1/m] [m/s] [rad] 6.000e+00 1.001e+00 2.032e-02 2.953e+02 7.847e-01
The true parameters for the Love wave were set in the input file OneLoveRotationalSensor.yaml
which was read by WaveDec and used to generate the synthetic wavefield. The output file for Rayleigh waves is empty, since no Rayleigh waves are present in the wavefield.
$ cat RayleighWaves.csv # WaveDec output file for Rayleigh waves # MODEL_RAYLEIGH # Frequency Amplitude Wavenumber Velocity Azimuth EllipticityAngle # [Hz] [a.u.] [1/m] [m/s] [rad] [rad]
A single Rayleigh wave (single 6C sensor)¶
The wavefield is composed of a single Rayleigh wave and is measured with a single six-components sensors. The
$ cd WaveDec/examples/22_OneRayleighWaveSingle6cSensor $ WaveDec.py
The estimated parameters are found in the RayleighWaves.csv
output file
$ cat RayleighWaves.csv # WaveDec output file for Rayleigh waves # MODEL_RAYLEIGH # Frequency Amplitude Wavenumber Velocity Azimuth EllipticityAngle # [Hz] [a.u.] [1/m] [m/s] [rad] [rad] 6.000e+00 9.986e-01 2.007e-02 2.989e+02 7.867e-01 -7.035e-01
A single Rayleigh wave (single 6C sensor) - Difficult case¶
We repeat the case with a single Rayleigh wave measured with a single six-components sensor.
We choose the ellipticity angle , corresponding to a wave with horizontal polarization. The other wave parameters are amplitude , wavenumber , and azimuth .
All the energy of the Rayleigh wave is on the horizontal translational components. The Rayleigh wave does not generate any rotational motion. Compare with the equations in Section Rayleigh wave.
As usual we run WaveDec
$ cd WaveDec/examples/23_OneRayleighWaveSingle6cSensor_Difficult $ WaveDec.py
We look at the output file and see that the estimated parameters are wrong!
$ cat RayleighWaves.csv # WaveDec output file for Rayleigh waves # MODEL_RAYLEIGH # Frequency Amplitude Wavenumber Velocity Azimuth EllipticityAngle # [Hz] [a.u.] [1/m] [m/s] [rad] [rad] 6.000e+00 9.999e-01 4.939e-02 1.215e+02 3.927e+00 -1.570e+00
The estimated wavenumber is wrong, in fact, since there is no energy on the rotational components, it is not possible to estimate this parameter using solely the translational components from a single sensor. We may also speculate that when the ellipticity angle is close to (and therefore there is very little energy on the rotational components) it will be difficult to estimate the wavenumber. For more details, see our publication [Maranò_et_al_2014].
We also observe that the estimated azimuth and the ellipticty angle are incorrect. Do you know why?
Two Love and Two Rayleigh waves (6C array)¶
The synthetic wavefield is described in the file TwoLoveTwoRayleigh.yaml
. All waves are at the same frequency . There are two Love and two Rayleigh waves with the following parameters:
The first Love wave has amplitude , wavenumber , and azimuth
The second Love wave has parameters , ,
The first Rayleigh wave has amplitude , wavenumber , azimuth , and ellipticty angle (circular polarization, prograde particle motion)
The second Rayleigh wave has parameters , , ,
In addition, it is added Gaussian white noise with variance .
We run WaveDec using the following command
$ cd WaveDec/examples/23_TwoLoveTwoRayleigh6cArray $ WaveDec.py
We can look at the output files LoveWaves.csv
and RayleighWaves.csv
to verify that the wavefield parameters are correctly estimated.
$ cat LoveWaves.csv # WaveDec output file for Love waves # MODEL_LOVE # Frequency Amplitude Wavenumber Velocity Azimuth # [Hz] [a.u.] [1/m] [m/s] [rad] 6.000e+00 7.992e-01 4.005e-02 1.498e+02 5.498e+00 6.000e+00 2.002e-01 4.003e-02 1.499e+02 3.142e+00 $ cat RayleighWaves.csv # WaveDec output file for Rayleigh waves # MODEL_RAYLEIGH # Frequency Amplitude Wavenumber Velocity Azimuth EllipticityAngle # [Hz] [a.u.] [1/m] [m/s] [rad] [rad] 6.000e+00 9.021e-01 3.002e-02 1.999e+02 7.861e-01 7.823e-01 6.000e+00 6.996e-01 3.004e-02 1.997e+02 1.569e+00 7.848e-01
Circular wavefront (active seismic)¶
These examples showcase the modeling of a seismic wave in the proximity of the source. Circular wavefront and amplitude decay are accounted for. This scenario is useful in active seismic. The theory and algorithm were developed in [Maranò_et_al_2017b]. Only translational motions are analyzed.
These examples use the executable file WaveDecActive.py
(and not WaveDec.py
as above).
As customary in active seismic, the source position is known and it is specified in the configuration file.
A single Rayleigh wave with circular wavefront¶
In this example, a synthetic wavefield containing a single Rayleigh wave with circular wavefront is analyzed. The configuration file config.yaml
specifies the file OneCircularRayleigh.yaml
as INPUT
. This latter file specifies the synthetic wavefield and its syntax is not documented here.
$ cd WaveDec/examples/31_CircularRayleighWave/ $ WaveDecActive.py
A single vertical wave with circular wavefront¶
This example is similar to the previous one. A plane wave measured solely at the vertical component is measured and modeled.
$ cd WaveDec/examples/32_CircularVerticalWave/ $ WaveDecActive.py
Two Rayleigh waves with circular wavefront¶
In this example, the wavefield is composed of two Rayleigh waves with circular wavefront. The waves propagate from the same source and have a different velocity. This setting imitates the presence of two modes and the wave superposition is accounted for.
$ cd WaveDec/examples/33_TwoCircularRayleigh/ $ WaveDecActive.py


Throughout DBC, I have visited many a question forum.  Your are searching. You are lost. That feeling gets inside of your soul: you feel like little red riding hood lost in the forums. You have played with your code for what feels like forever. You have looked over every line and finally you just have to google. The google search results pose another problem. Then, it happens. You found the answer to your question whether it was in w3school.com or stackoverflow: it doesn't matter. A smile creeps over your lips. You found your way to grandmother's house...your program is debugged.
BUT, what if your question is not in the hundreds of posts. What should you do then? How to pose a good question is crucial. Only by asking the right questions will you ever be given the correct answer.Here are a few essential rules to live by:
FIRST and foremost, it may seem very obvious but spell correctly. It may not be fourth grade yet, correct spelling is a fundamental. Why should anyone take the time to read or respond to your question if clearly you did not take the time to read through it. If you would like to go a step further, also take a look at your punctuation and grammar. I have read many a question with a hanging gerand and it did not make a bit of difference to me however, I am not responding to most quesitons I am simply scrolling through their answers.
Secondly, the title is the thing. The title is the first thing an answerer will see: therefore, it is in your best interest to make it as interesting and simultaneously as simple as possible. You want to sum up the entire question in to one sentence. This may be painstaking but it will be worth it and it will also help me out when I come searching for answers. Also try to include any error messages, key APIS or unusual circumstances. It makes you more appealing. If you have any trouble writing the title: write your question first. Edit it. And then try writing the title.
Title Examples:
Bad: C# Math Confusion
Good: What does using floating instead of int give me a different result when all of my inputs are integers?
Bad: if else problems
Good: Why does str=="value" evaluate to false when str is set to "value"?
Bad: Why doesn't this work?
Next, upon having a title, now it is time to write the context of your question. Here you must show that you have put due dilligence into researching the issues/problem with your code: in other words, why other posts within that forum have not helped you and why. If you can explain why your code is unique that may also help. It also helps to share with the reader what your input is and what you would like your output to be. Showing your original code also is highly suggested and smiled upon. Summarize what your problem is. Point out why your code is failing. In other words, write an executive summary followed by a detailed description if at all necessary.
Finally, tags. Tags are convenient for grouping your question with other similar questions. Tags allow for quick responses from experts: tags are composed of a word or phrase that describe the topic of the question. Tags group questions into categories and it behooves you to use them.
Good luck questioning!! And don't get lost in the forums...


Presentations
Oral Presentations
Gazing into the Metaboverse — Automated exploration and contextualization of metabolic data
            Slides
XPRESSyourself: Enhancing, Standardizing, and Automating Ribosome Profiling Computational Analyses Yields Improved Insights
            Program
Poster Presentations
Multi-omics reaction pattern recognition reveals signatures of mitochondrial dysfunction
            Poster
A novel metabolic signature in malignant human lung adenocarcinomas is revealed by contextual, reaction-resolution analysis of metabolic data
            Poster
            Poster
Gazing into the Metaboverse — Automated exploration and contextualization of metabolic data
            Poster


Click here to demonstrate fade in boxes
Click here to see slide
Stop SlideDown
Hello this is slideDown !


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import controllers.auth.requests.UserRequest @import viewmodels.HomeViewModel @import scala.concurrent.ExecutionContext @import components.H2 @import config.ConfigDecorator @this( main: MainView, hmrcPageHeading: HmrcPageHeading, govukInsetText: GovukInsetText, h2: H2, govukNotificationBanner : GovukNotificationBanner, configDecorator: ConfigDecorator ) @(viewModel: HomeViewModel, shutteringMessaging: Boolean)(implicit request: UserRequest[_], messages: play.api.i18n.Messages) @bannerHtml = {
} @main( pageTitle = messages("label.account_home"), fullWidth = true, showUserResearchBanner = viewModel.showUserResearchBanner, accountHome = true ) { @if(shutteringMessaging) { @govukNotificationBanner(NotificationBanner( content = HtmlContent(bannerHtml) )) }


--- layout: default title: Atosa Italy - News permalink: /news/ description: --- {% include navbar.html %}
{{ new.excerpt }}


Rapid Prototyping with Rails: Lesson 4, Twilio: Two-factor Auth
22 Nov 2014Two factor authentication upon login:
Pseudo code:
- We need a phone number and pin columns
- Change login logic:
- If phone number not present, normal login
- If phone number present
- generate pin to save to db, not show user
- send pin to Twilio to sms user's phone
- show a form to enter the pin (generate new route myapp.com/pin)
- must ensure its secure, can only be seen after user has logged in
1. Add column phone and pin column to users:
- rails g migration add_phone_and_pin_to_users
- class AddPhoneAndPinToUsers < ActiveRecord::Migration
def change
add_column :users, :phone, :string
add_column :users, :pin, :string
end
end
2. Add phone input field to your users/new.html.erb

<%= f.label :phone, "Phone Number (numbers only)".html_safe %>
<%= f.text_field :phone, maxlength: 9 %>
<%= link_to '#', id: 'two_factor_phone' do %>

<% end %>

3. Also, we need to add :phone to strong_parameters
def user_params
params.require(:user).permit(:username, :password, :time_zone, :phone)
end
4. So after the phone number is entered by the user, we want to prevent them from
logging in directly and prompt them for their pin and connect with Twilio. The login occurs in the sessions controller:
def create
user = User.where(username: params[:username]).first
if user && user.authenticate(params[:password])
****if user.two_factor_auth? #must create this method
else
session[:user_id] = user.id
flash[:notice] = "Welcome, you've logged in."
redirect_to root_path
end
else
flash[:error] = "There is something with your username & password."
redirect_to login_path
end
end
5. Create twofactorauth? method in your user model:
def two_factor_auth?
!self.phone.blank?
end
6. We have to now breakdown what else we need
def create
user = User.where(username: params[:username]).first
if user && user.authenticate(params[:password])
if user.two_factor_auth?
#generate a pin
user.generate_pin!
#send pin to twilio, sms user's phone
#show pin form for user input after sms
else
session[:user_id] = user.id
flash[:notice] = "Welcome, you've logged in."
redirect_to root_path
end
else
flash[:error] = "There is something with your username & password."
redirect_to login_path
end
end
7. Create generate_pin! method:
def generate_pin!
self.update_column(:pin, rand(10 **6)) #generate a random six digit number
end
8. Skip the send pin to twilio part for now
9. Show pin form for the user input:
#routes.rb:
get '/pin', to: 'sessions#pin'
post '/pin', to: 'sessions#pin'
10. Adding the above routes, gives us the pin_path route which we can redirect to:
def create
user = User.where(username: params[:username]).first
if user && user.authenticate(params[:password])
if user.two_factor_auth?
#generate a pin
user.generate_pin!
#send pin to twilio, sms user's phone
#show pin form for user input after sms
redirect_to pin_path
else
session[:user_id] = user.id
flash[:notice] = "Welcome, you've logged in."
redirect_to root_path
end
else
flash[:error] = "There is something with your username & password."
redirect_to login_path
end
end
11. Now create a pin.html.erb file under views
12. Now when attempting to go to the get '/pin' upon being redirected to the pin_path,
notice that the get method work without even creating the action. ** When there is a link, the default is to render. This will not work when the method post is called bc you are inputing parameters:
#sessions_controller.rb
def pin
if request.post?
user = User.find_by(pin: params[:pin])
if user
#remove pin
user.remove_pin!
#normal login success route
login_user!(user)
else
flash[:error] = "Sorry, something is wrong with the pin you've entered."
redirect_to pin_path
end
end
end
private
def login_user!(user)
session[:user_id] = user.id
flash[:notice] = "Welcome, you've logged in."
redirect_to root_path
end
13. Now we must set prevent users from going to the '/pin' url by entering it
in their browser: We can do so by setting a session hash to true/false after login attempt/sucessful login in the sessions_controller:
#sessions_controller.rb
#login attempt
def create
user = User.where(username: params[:username]).first
if user && user.authenticate(params[:password])
if user.two_factor_auth?
session[:two_factor] = true
#successful login
def pin
if request.post?
user = User.find_by(pin: params[:pin])
if user
session[:two_factor] = nil
#remove pin
.
.
.
14. Now we can lock down the url using our access_denied method we previously created:
We can put this in the session#pin bc it impacts both the get and post
#sessions_controller.rb
def pin
access_denied if session[:two_factor].nil?
if request.post?
user = User.find_by(pin: params[:pin])
if user
session[:two_factor] = nil
#remove pin
user.remove_pin!
#normal login success route
login_user!(user)
else
flash[:error] = "Sorry, something is wrong with the pin you've entered."
redirect_to pin_path
end
15. remove.pin! method
#user.rb
def remove_pin!
self.update_column(:pin, nil)
end
16. Now its time to intergrate Twilio
- install the Twilio-Ruby gem
17. Create a method to send to text to user using Twilio api
#sessions_controller.rb
def create
user = User.where(username: params[:username]).first
if user && user.authenticate(params[:password])
if user.two_factor_auth?
session[:two_factor] = true
#generate a pin
user.generate_pin!
#send pin to twilio, sms user's phone
user.send_pin_to_twilio
#show pin form for user input after sms
redirect_to pin_path
18. Create sendpinto_twilio method in user.rb (using Twilio two factor authentication)
def send_pin_to_twilio
account_sid ='AC47bdb7f569ae31aa59309f81981aaf37'
auth_token = 'f3d9c378bba9272d3ed9fec659e353b0'
# set up a client to talk to the Twilio REST API
client = Twilio::REST::Client.new account_sid, auth_token
msg = "Hello, Please enter this pin to continue login: #{self.pin}."
account = client.account
message = account.sms.messages.create({
:from => '123-456-789',
:to => '123-456-789',
:body => msg,
})
end


{% extends 'base.html' %} {% block content %} Courses {{ course.name }} My Project
{{ project.idea }}
You have not submitted the project yet.
{{ project.review }}
{{ comment.text|linebreaks }}
No comments here yet :(
{{ comment.text|linebreaks }}


#include <OvFlowPostprocessor.h>
Public Member Functions | |
| OvFlowPostprocessor () | |
| virtual | ~OvFlowPostprocessor () |
| virtual bool | postProcessFlow (OvImageT< double > &u1, OvImageT< double > &v1, OvImageT< double > &o1, OvImageT< double > &u2, OvImageT< double > &v2, OvImageT< double > &o2)=0 |
| virtual bool | setParams (int nparams, double *params)=0 |
The OvFlowPostprocessor class defines a basic interface for postprocessing optical flow results. Subclasses can implement the interface to provide a variety of preprocessors (e.g., occlusion filling, median filtering, plane fitting, etc.)
| OvFlowPostprocessor::OvFlowPostprocessor | ( | ) |
Default constructor with no parameters
| OvFlowPostprocessor::~OvFlowPostprocessor | ( | ) | [virtual] |
Destructor
| virtual bool OvFlowPostprocessor::postProcessFlow | ( | OvImageT< double > & | u1, | |
| OvImageT< double > & | v1, | |||
| OvImageT< double > & | o1, | |||
| OvImageT< double > & | u2, | |||
| OvImageT< double > & | v2, | |||
| OvImageT< double > & | o2 | |||
| ) | [pure virtual] |
Main method for postprocessing flow results. Note: This method modifies the inputs, so be careful.
| u1 | the horizontal flow for image 1. (method sets this). | |
| v1 | the vertical flow for image 1. (method sets this). | |
| o1 | the occlusion map for image 1. (method sets this). | |
| u2 | the horizontal flow for image 2. (method sets this). | |
| v2 | the vertical flow for image 2. (method sets this). | |
| o2 | the occlusion map for image 2. (method sets this). |
| virtual bool OvFlowPostprocessor::setParams | ( | int | nparams, | |
| double * | params | |||
| ) | [pure virtual] |
Used for specifying any parameters required.
| nparams | number of parameters which are being passed | |
| params | the values of the parameters |


{% extends 'base.html' %} {% block content %} MY ORDERS Please call us to schedule your pets appointment today! {% for order in orders %} {{ order.service.name }} {{ service.master.full_name }} adipiscing eliteger gravida velit quis dolo {{ order.date_created }} Fee {{ order.service.price }} $ Update Delete {% endfor %} {% endblock %}
Please call us to schedule your pets appointment today!


7.1. Log Output¶
Table of contents
Provides a function to output logs.
7.1.1. Function overview¶
<IP_ADDRESS>. Implementation of the log output function can be replaced¶
The log output is composed of three processes, and the implementation of each of which can be replaced.
Can be replaced with the LogWriter and LogFormatter units, and if these do not meet the requirements Logger / LoggerFactory can be implemented to replace almost all processes.
For example, if the use of open source log output library is preferred, replacing Logger / LoggerFactory is better.
Note that the logging framework with extensive operating experience in open source, is already equipped with a dedicated logger/logger factory.
For details, see log Adapter .
For comparison of features between this function and the frequently utilized log4j, see Functional comparison with log4j .
The default class provided by the log output function is shown.
- Logger/LoggerFactory
- LogWriter
- LogFormatter
Important
If you want to use SynchronousFileLogWriter, see Notes on using the SynchronousFileLogWriter .
Tip
For the log level used in the log output function, see Log level definition .
<IP_ADDRESS>. Provides various log output functions in advance¶
This framework provides the output function of various logs commonly required by the applications.
The log format can be changed with configuration and used according to the application requirements.
As described in the Configure various logs, the output function of various logs is performing formatting only,
and this function is used for the output processing of the logs.
The blank project generated from the archetype provided by Nablarch has various log formats set.
See Default configuration list
for more information.
| Log type | Description |
|---|---|
| Failure notification log | Outputs the information necessary to identify the person in charge of primary isolation during failure incidents. |
| Failure analysis log | Outputs information necessary to identify the cause of failure. |
| SQL log | Outputs the SQL statement execution time and SQL statement to be used for performance tuning of SQL statement execution that is likely to cause acute performance degradation. |
| Performance log | Outputs execution time and memory usage for performance tuning of an arbitrary process. |
| HTTP access log | Outputs the information to grasp the execution status of application in the web application. The log includes the output information required to measure the application performance and also for load measurement of the application. It is also used as a trace log that outputs all request and response information to detect unauthorized use of the application. |
| Messaging log | The log outputs information for grasping the status of message send and receive in the messaging process. |
Tip
In this framework, Failure notification log and Failure analysis log are collectively called failure log.
7.1.2. Module list¶
<dependency>
<groupId>com.nablarch.framework</groupId>
<artifactId>nablarch-core</artifactId>
</dependency>
<dependency>
<groupId>com.nablarch.framework</groupId>
<artifactId>nablarch-core-applog</artifactId>
</dependency>
<!-- Only when using SQL logs-->
<dependency>
<groupId>com.nablarch.framework</groupId>
<artifactId>nablarch-core-jdbc</artifactId>
</dependency>
<!-- Only when using HTTP access logs-->
<dependency>
<groupId>com.nablarch.framework</groupId>
<artifactId>nablarch-fw-web</artifactId>
</dependency>
<!-- Only when using messaging logs -->
<dependency>
<groupId>com.nablarch.framework</groupId>
<artifactId>nablarch-fw-messaging</artifactId>
</dependency>
7.1.3. How to use¶
<IP_ADDRESS>. Output the log.¶
Use Logger to output logs Get Logger from LoggerManager .
// Get logger by specifying a class.
// Logger is stored in class variable.
private static final Logger LOGGER = LoggerManager.get(UserManager.class);
// Check the log output in advance and output the log.
if (LOGGER.isDebugEnabled()) {
String message = "userId[" + user.getId() + "],name[" + user.getName() + "]";
LOGGER.logDebug(message);
}
Specify the logger name in the acquisition of Logger . A string or class can be specified for the logger name. If a class is specified, FQCN of the specified class will be the logger name.
Important
At the level where the log is constantly being output in the application, advance check is not required as the readability of the source code is reduced. For example, it is not necessary to check in advance from the FATAL level to the INFO level if the log level output during production operation has to be changed to the INFO level.
Tip
Specify the logger name (SQL, MONITOR, etc.) indicating the usage if required to output logs for a specific purpose such as SQL log or monitoring log, and specify the FQCN of the class for other cases.
<IP_ADDRESS>. Configure log output¶
Configure the log output in the property file.
- Property file location
Use log.properties directly below the classpath. If the location is to be changed, specify the file path in the system property with nablarch.log.filePath as a key. See FileUtil#getResource how to specify file path.
>java -Dnablarch.log.filePath=classpath:nablarch/example/log.properties ...
- Description rules of property files
The description rules of the property file are shown below.
- LoggerFactory
-
- Description rules
-
- loggerFactory.className
- Specify FQCN of the class that implements loggerFactory.className LoggerFactory. To use this function, specify BasicLoggerFactory .
- Example of the description
# LoggerFactory determines the implementation (this function, Log4J, etc.) used for log output. loggerFactory.className=nablarch.core.log.basic.BasicLoggerFactory
- LogWriter
-
- Description rules
-
- writerNames
- Specify the names of all LogWriters that use writerNames. Use comma as a delimiter if more than one is specified.
- writer. <name>.className
- Specify FQCN of the class that implemented LogWriter.
- writer. <name>.<property name>
- Specify the value to be set in the property for each LogWriter. Refer to Javadoc of the LogWriter used for the properties that can be specified.
- Example of the description
# Define 2 names. writerNames=appLog,stdout # Configure appLog. writer.appLog.className=nablarch.core.log.basic.FileLogWriter writer.appLog.filePath=/var/log/app/app.log # Configure stdout. writer.stdout.className=nablarch.core.log.basic.StandardOutputLogWriter
- Logger configuration
-
- Description rules
-
- availableLoggersNamesOrder
Specify the names of all Logger configurations that use availableLoggersNamesOrder. Use comma as a delimiter if more than one is specified.
Important
Note that the order of description in the availableLoggersNamesOrder property has a meaning.
The acquisition process Logger matches Logger in the order described here for the logger name specified by the class that performs log output and returns the first match Logger .
For example, if the description order of availableLoggersNamesOrder in the following description example is described as availableLoggersNamesOrder = root, sql, all logger acquisitions will end up matching the logger configuration
root
. As a result, even if the log is output with the logger nameSQL
, the log is not output tosqlLog
but is output to theappLog
specified in the logger configurationroot
.Therefore, the availableLoggersNamesOrder property is described in sequence from the logger configuration that specifies a more restrictive regular expression.
Important
The names of the logger configuration specified in the availableLoggersNamesOrder and loggers.* are required to match. The match is checked in the initial process of BasicLoggerFactory , and an exception is thrown if they do not match. For example, if
access
is removed from availableLoggersNamesOrder in the above configuration, an exception will be thrown.This check is performed to avoid the occurrence of configuration omissions. If
access
is removed from avaialableLoggersNameOrder in the above configuration, it is necessary to explicitly remove the loggers.access.* configuration.- loggers.<name>.nameRegex
- loggers.<name>.nameRegex specifies the regular expression used to match the logger name. The regular expressions are used to narrow down the loggers that are the targets of logger configuration. Matched to logger name specified when acquiring the logger (that is, the logger name specified in the argument of LoggerManager#get).
- loggers.<name>.level
- Specify the name of loggers.<Name>.level LogLevel . All the logs that are above the level specified here will be output.
- loggers.<name>.writerNames
- loggers.<name>.writerNames specifies the name of the LogWriter, which is the output destination. Use comma as a delimiter if more than one is specified. Logs are written for all the LogWriters specified here.
- Example of the description
# Define the names of the two logger configurations. availableLoggersNamesOrder=sql,root # Set root. loggers.root.nameRegex=.* loggers.root.level=WARN loggers.root.writerNames=appLog #Set sql. loggers.sql.nameRegex=SQL loggers.sql.level=DEBUG loggers.sql.writerNames=sqlLog
- Description example of property files
A description example of the entire property file is shown below.
loggerFactory.className=nablarch.core.log.basic.BasicLoggerFactory writerNames=appLog,sqlLog,monitorLog,stdout # Example of configuring a log file for application writer.appLog.className=nablarch.core.log.basic.FileLogWriter writer.appLog.filePath=/var/log/app/app.log # Example of configuring a log file for SQL output writer.sqlLog.className=nablarch.core.log.basic.FileLogWriter writer.sqlLog.filePath=/var/log/app/sql.log # Example of configuring a log file for monitoring writer.monitorLog.className=nablarch.core.log.basic.FileLogWriter writer.monitorLog.filePath=/var/log/app/monitoring.log # Configuring example for standard output writer.stdout.className=nablarch.core.log.basic.StandardOutputLogWriter availableLoggersNamesOrder=sql,monitoring,access,validation,root # Example of configuring all logger names for log output # Output WARN level or higher to appLog for all logger acquisition. loggers.root.nameRegex=.* loggers.root.level=WARN loggers.root.writerNames=appLog # Example of configuring a specific logger name as a log output target. # For logger acquisition with "MONITOR" specified in logger name # Output ERROR level or higher to appLog, monitorLog. loggers.monitoring.nameRegex=MONITOR loggers.monitoring.level=ERROR loggers.monitoring.writerNames=appLog,monitorLog # Example of configuring a specific logger name as a log output target. # For logger acquisition with "SQL" specified in logger name # Output DEBUG level or higher to sqlLog. loggers.sql.nameRegex=SQL loggers.sql.level=DEBUG loggers.sql.writerNames=sqlLog # Example of configuring a specific class as a log output target. # For logger acquisition with "app.user.UserManager" specified in logger name # Output INFO level or higher to appLog and stdout. loggers.access.nameRegex=app\\.user\\.UserManager loggers.access.level=INFO loggers.access.writerNames=appLog,stdout # Configuration example for targeting specific packages and below for log output. # For logger acquisition in which the name starting from "nablarch.core.validation" is specified in logger name # output DEBUG level or higher to stdout. loggers.validation.nameRegex=nablarch\\.core\\.validation\\..* loggers.validation.level=DEBUG loggers.validation.writerNames=stdout
Tip
Preparing one logger configuration that matches all the log output and specifying the logger configuration at the end of availableLoggersNamesOrder is recommended. Outputs of important logs are prevented from being missed even if the configuration is omitted. Refer to the logger configuration
root
in the above description example for the configuration example.
<IP_ADDRESS>. Overwrite log output configuration¶
The log output configuration can be overwritten by using system property and specifying the value with the same key name as the property file. By this, it is possible to prepare a common property file and change the log output configuration for each process.
Below is an example of how to change the log level of logger configuration root
to INFO.
>java -Dloggers.root.level=INFO ...
<IP_ADDRESS>. Specify the log format¶
This function provides BasicLogFormatter as LogFormatter that can be used for general purpose.
Placeholders are used to specify the format in BasicLogFormatter . For placeholders that can be used, see BasicLogFormatter.
A configuration example for format is shown below. Specify the format in the LogWriter property.
# When specifying the format, specify BasicLogFormatter explicitly.
writer.appLog.formatter.className=nablarch.core.log.basic.BasicLogFormatter
# Specify the format using the placeholder.
writer.appLog.formatter.format=$date$ -$logLevel$- $loggerName$ $message$
# Specify the pattern to be used for date and time format.
#If not specified, "yyyy-MM-ddHH:mm:ss.SSS" is used.
writer.appLog.formatter.datePattern=yyyy/MM/dd HH:mm:ss[SSS]
# Specify the log level text
# If not specified, the LogLevel enumeration type (FATAL, INFO, etc.) names will be used.
writer.appLog.formatter.label.fatal=F
writer.appLog.formatter.label.error=E
writer.appLog.formatter.label.warn=W
writer.appLog.formatter.label.info=I
writer.appLog.formatter.label.debug=D
writer.appLog.formatter.label.trace=T
The following items can be output in BasicLogFormatter to identify the status of the output log. Descriptions are provided for these output items.
- Boot process
The boot process is the name used to identify the execution environment in which the application was started. By using a name that combines the server name and identification string such as JOBID for the boot process, the execution environment of the log output from multiple processes of the same server can be specified. The boot process is assumed to define a system such as an ID system for each project.
The boot process is specified in the system property with the
nablarch.bootProcess
key. If the system property is not specified, the boot process will be blank.
- Processing architecture
Processing architecture refers to web, batch, etc. If the application process architecture is to be identified separately, it is specified and used for each project.
The process architecture is specified in the property file that was explained in Configure log output , with the key
nablarch.processingSystem
. If the property is not specified, it will be blank.
- Execution ID
The execution ID is given with respect to the request ID to identify each execution of the application. Since the execution ID is issued based on the number of executions for one request ID, the relationship between request ID and run time ID is one to many.
When multiple logs are output, the execution ID is used to link the multiple logs that have been output.
The execution ID is issued at the timing of initializing : ThreadContext, and is configured in ThreadContext.
- ID system for Execution ID
# Added only when the boot process is specified. Boot process + system date and time (yyyyMMddHHmmssSSS) + serial number (4 digits)
Important
When the request ID, execution ID and user ID are output, Thread Context Variable Management Handler must be included in the handler configuration as they are acquired from ThreadContext. In particular, you need to set a value for the user ID in your application by referring to Setting a User ID.
- When line feed code and tab character are to be included
When line feed code and tab character are to be included in the format, use the same description as Java shown below.
Line feed code \n Tab character \t
The line feed code is obtained from
line.separator
included in the system property of standard Java. Therefore, the OS line feed code is used if theline.separator
in the system property is not changed.Tip
Strings
\n
and\t
cannot be output by BasicLogFormatter .
<IP_ADDRESS>. Configure various logs¶
The output function of each log only performs the format process according to the purpose of each log, and the process of log output uses this function. In other words, the message specified in Logger is created in the output function of various logs.
Therefore, to use the output function of various logs, configurations are required for various logs in addition to Configure log output . Configure various logs in the property file.
- Property file location
Use app-log.properties directly below the classpath. If the location is to be changed, specify the file path in the system property with nablarch.appLog.filePath as a key. See FileUtil#getResource how to specify file path.
>java -Dnablarch.appLog.filePath=file:/var/log/app/app-log.properties ...
- Description rules of property files
Refer to the following, as the rules differs for each log.
7.1.4. Expansion example¶
<IP_ADDRESS>. Add LogWriter¶
When adding a new LogWriter, create a class that implements the LogWriter interface. When creating a LogWriter that uses LogFormatter , create by providing common processing, inheriting LogWriterSupport.
<IP_ADDRESS>. Add LogFormatter¶
hen adding a new LogFormatter, create a class that implements the LogFormatter interface. To enable changing the text that indicates the log level in the configuration, use LogLevelLabelProvider .
Along with the addition of a new LogFormatter, there may be a need to increase parameters specified during log output, and receive the parameters increased by LogFormatter. To increase the parameters specified during log output in this function, object types with variable length argument options are provided in the log output method of Logger interface.
// Logger # logInfo method signature
public void logInfo(String message, Object... options)
public void logInfo(String message, Throwable cause, Object... options)
To increase the number of parameters for log output, specify and use the options argument.
<IP_ADDRESS>. Add log output items (placeholders)¶
BasicLogFormatter uses the LogItem interface to get all the output items corresponding to each placeholder. Therefore, if a new placeholder is to be added, create the following classes.
- Create a class that implements LogItem .
- Create a class that inherits BasicLogFormatter and add a placeholder.
An example of change to acquire the boot process from the LogFormatter configuration is shown. The configuration of LogFormatter assumes the following.
# Specifies a custom LogFormatter.
writer.appLog.formatter.className=nablarch.core.log.basic.CustomLogFormatter
# Specify the format
writer.appLog.formatter.format=$date$ -$logLevel$- $loggerName$ [$bootProcess$] $message$
# Specifies the boot process in the LogFormatter configuration.
# Outputs the boot process specified here to $bootProcess$.
writer.appLog.formatter.bootProcess=CUSTOM_PROCESS
- Create a class that implements LogItem .
// Class to get a custom boot process. public class CustomBootProcessItem implements LogItem<LogContext> { private String bootProcess; public CustomBootProcessItem(ObjectSettings settings) { // Get the boot process from LogFormatter configuration. bootProcess = settings.getProp("bootProcess"); } @Override public String get(LogContext context) { // Return the boot process obtained from the configuration. return bootProcess; } }
- Create a class that inherits BasicLogFormatter and add a placeholder
public class CustomLogFormatter extends BasicLogFormatter { // Override the method to get the log output items to be formatted. @Override protected Map<String, LogItem<LogContext>> getLogItems(ObjectSettings settings) { // Overwrite the placeholder of the boot process. Map<String, LogItem<LogContext>> logItems = super.getLogItems(settings); logItems.put("$bootProcess$", new CustomBootProcessItem(settings)); return logItems; } }
<IP_ADDRESS>. Do not output the log initialization message¶
An initialization message is output by this function to the log when each logger is initialized. If the initialization message is not required for the monitored log, etc, then support by creating a Writer that does not output the initialization message based on the Writer provided by this function.
If the log Adapter is used for the purpose of unifying the logger with the web application server or OSS product, this support is not necessary as initialization messages are not output.
The corresponding example shown below.
Import (copy) the source code of the Writer class that will be the base to the project. For example, when the log is output to a the file, copy FileLogWriter .
Delete the part that outputs the initialization log.
In the case of FileLogWriter , delete the part that outputs the initialization message as shown in the modification example given below.
private void initializeWriter() { try { out = new BufferedOutputStream(new FileOutputStream(filePath, true), outputBufferSize); currentFileSize = new File(filePath).length(); // Delete the output process of the initialization message that was performed here } catch (IOException e) { throw new IllegalArgumentException(String.format("failed to create %s. file name = [%s], encoding = [%s], buffer size =[%s]", Writer.class.getName(), filePath, charset.displayName(), outputBufferSize), e); } }
Change such that the initialization message after the log function initialization is not output.
Override needsToWrite , and change such that the initialization message that is called the first time is not output.
/** Define the flag for initial determination */ private boolean suppressionWriting = true; @Override public boolean needsToWrite(final LogContext context) { final String message = context.getMessage(); if (suppressionWriting) { // Since it is an initialization message if the log to be output starts from "initialized.", // "false" is returned indicating that it is not the output target. if (StringUtil.hasValue(message) && message.startsWith("initialized.")) { suppressionWriting = false; return false; } } return super.needsToWrite(context); }
- Configure the created class in log.properties.
Configure the class name of the writer created in the project side, in log.properties.
The configuration example shown below.
writerNames=sample # Configure the class created in the class name of the writer # Configuration example when the fully qualified class name is "sample.CustomFileLogWriter" writer.sample.className = sample.CustomFileLogWriter
7.1.5. Notes on using the SynchronousFileLogWriter¶
Important
As SynchronousFileLogWriter has the following restrictions, use after sufficient consideration.
- Cannot rotate logs.
- Log contents that are output may not be normal.
SynchronousFileLogWriter writes the log to the file while performing exclusive control using the lock file. If the lock cannot be acquired even if the lock acquisition wait time is exceeded, the lock file is force deleted, and a lock file is generated for own thread use and the log output is generated.
If the lock file cannot be force deleted, outputs the log forcibly while the lock is still not acquired. Also, if the lock file generation fails or even if an interruption occurs while waiting for lock acquisition, force outputs the log when the lock is still not acquired.
Note that when the log is forcibly output without acquiring the lock, the log may not output normally if there is a conflict between logs output from multiple processes.
If such failures occur, the error log will be output to the same log file along with the forced output log. Although the log prepared by this framework is output by default, by configuring the failure code in the property of SynchronousFileLogWriter, the log can be output in the failure notification log format (includes the failure code). Configuring the failure code is recommended, as it is possible to monitor the log in the same way as the normal failure notification log, with output in the format for failure notification log.
The property names that configure the failure code are shown below.
- failureCodeCreateLockFile
Details of the failure: Cannot generate the lock file Log level: FATAL Message configuration example (lock file path is set in {0}): Failed to generate the lock file. The lock file path may be wrong.Lock file path = [{0}]. Default log output (failure code etc, are not output): failed to create lock file. perhaps lock file path was invalid. lock file path=[{0}]. - failureCodeReleaseLockFile
Details of the failure: The generated lock file cannot be released (deleted) Log level: FATAL Message configuration example (lock file path is set in {0}): Failed to delete the lock file. Lock file path = [{0}]. Default log output (failure code etc, are not output): failed to delete lock file. lock file path=[{0}]. - failureCodeForceDeleteLockFile
Details of the failure: Unable to force delete the lock files that are not released Log level: FATAL Message configuration example (lock file path is set in {0}): Force delete of the lock file failed. The lock file has been opened incorrectly.Lock file path = [{0}]. Default log output (failure code etc, are not output): failed to delete lock file forcedly. lock file was opened illegally. lock file path=[{0}]. - failureCodeInterruptLockWait
Details of the failure: Interruption occurs when the thread is sleeping waiting for lock acquisition. Log level: FATAL Configuration example of message: An interruption occurred when acquiring the lock. Default log output (failure code etc, are not output): Interrupted while waiting for lock retry.
Important
Note that, although the log is output to the same log file in the failure notification log format if a failure code has been configured, the failure analysis log will not be output.
A configuration example of SynchronousFileLogWriter is shown below.
writerNames=monitorLog
# Specifies the SynchronousFileLogWriter class
writer.monitorLog.className=nablarch.core.log.basic.SynchronousFileLogWriter
# Specifies the write destination file path.
writer.monitorLog.filePath=/var/log/app/monitor.log
# Specifies the character encoding to be used when writing.
writer.monitorLog.encoding=UTF-8
# Specifies the size of the output buffer.(Unit is kilobytes.Calculate 1000 bytes as 1 kilobyte. 8KB if not specified )
writer.monitorLog.outputBufferSize=8
# Specifies the class name of log formatter.
writer.monitorLog.formatter.className=nablarch.core.log.basic.BasicLogFormatter
# Specifies the name of the LogLevel enumeration type. All the logs that are above the level specified here will be output.
writer.monitorLog.level=ERROR
# Specifies the file name of the lock file.
writer.monitorLog.lockFilePath=/var/log/lock/monitor.lock
# Specifies the lock acquisition retrial interval (milliseconds)
writer.monitorLog.lockRetryInterval=10
# Specifies the wait time (milliseconds) to acquire the lock.
writer.monitorLog.lockWaitTime=3000
# Specifies the failure notification code when lock file cannot be generated.
writer.monitorLog.failureCodeCreateLockFile=MSG00101
# Specifies the failure notification code when the generated lock file cannot be released (deleted)
writer.monitorLog.failureCodeReleaseLockFile=MSG00102
# Specifies the failure notification code when the unreleased lock file cannot be forcibly deleted.
writer.monitorLog.failureCodeForceDeleteLockFile=MSG00103
# Specifies the failure notification code when an interruption occurs while the thread is sleeping waiting for the lock.
writer.monitorLog.failureCodeInterruptLockWait=MSG00104
Important
Do not specify the maxFileSize property because log rotation may occur and log may not be output.
7.1.6. Log level definition¶
This function uses the following log levels.
| Log level | Description |
|---|---|
| FATAL | Indicates that a serious problem has occurred that makes it impossible for the application to continue. Monitoring is required and prompt notification and immediate response are necessary. |
| ERROR | Indicates that a problem has occurred that interferes with the continuation of the application. Although monitoring is required, notification and response are not as urgent as the FATAL level. |
| WARN | Though there is no immediate impact, it indicates that the event if not addressed could cause a problem that may interfere with the continuation of the application. The event should be monitored if possible, but it is not as urgent as the ERROR level. |
| INFO | Log level that outputs the application information during the production operation. Applicable to access and statistics logs. |
| DEBUG | Log level to output debug information during development. Applicable to SQL and performance logs. |
| TRACE | Log level to be used when a more detailed information output is required over debug information during development. |
The log consists of 6 levels, and decrease from FATAL to TRACE. The log output function outputs all logs of a level or higher, as specified by the setting. For example, when WARN level is specified in the configuration, only the logs specified with the FATAL level, ERROR level and WARN level are output.
Tip
During production operation, logs are assumed to be output at the INFO level. Specify the log output contents of each project so that the log file size does not become big.
Tip
Even this framework outputs log using the log output function. For the log output by the framework, see Framework log output policy .
7.1.7. Framework log output policy¶
The framework outputs logs based on the below output policy.
| Log level | Output policy |
|---|---|
| FATAL/ERROR | Outputs at the FATAL/ERROR level when the failure log is output. Since the failure log is the target of failure monitoring, it is the starting point for primary isolation during failure, and the policy is to output one failure log for each failure. Therefore, the policy is to output an failure notification log from the runtime platform with a single handler (handler that processes exceptions). |
| WARN | When the exceptions are linked when an error occurs, exceptions that cannot be output as failure logs are output at WARN level. For example, if an exception occurs in both the business process and end process of transaction, the business process exception is output to the failure log, and the end process exception of transaction is output at the WARN level. |
| INFO | When an error related to the application execution status is detected, output is at INFO level. For example, for errors of tampering URL parameters or permission check errors, output is at INFO level. |
| DEBUG | Outputs debug information used during application development. During application development, the information required for development is considered to be output by configuring at the DEBUG level. |
| TRACE | Outputs the debug information for use during framework development. Not intended for use in application development. |
7.1.8. Functional comparison with log4j¶
Function comparison between Nablrach and log4j (external site, English) are shown below.
| Function | Nablarch | log4j |
|---|---|---|
| Whether to output logs can be controlled at the log level | A
To the manual |
A |
| Whether to output the log can be controlled by category (package unit, name, etc.) | A
To the manual |
A |
| One log can be output to multiple output destinations | A
To the manual |
A |
| Log can be output to standard output | A
To the manual |
A |
| Log can be output to a file | A
To the manual |
A |
| Log files can be rotated by file size | B [1]
To the manual |
A |
| Log files can be rotated by date and time | C [2] | A |
| Log can be sent by email | C [2] | A |
| Logs can be sent by Telnet | C [2] | A |
| Log can be sent by Syslog | C [2] | A |
| Logs can be added to the Windows NT event log | C [2] | A |
| Can output logs to the database | C [2] | A |
| Log can be output asynchronously | C [2] | A |
| Log format can be specified with a pattern string | A
To the manual |
A |
| Can output failure log | A
To the manual |
D |
| Can output HTTP access log | A
To the manual |
D |
| Can output SQL log | A
To the manual |
D |
| Can output performance log | A
To the manual |
D |
| Can output messaging log | A
To the manual |
D |
| [1] | Nablarch log output does not provide file generation management, so it is partially provided. |
| [2] | (1, 2, 3, 4, 5, 6, 7) Use log Adapter . Or create it in the project. For the creation method, see Add LogWriter . |


2 Samuel 9:9
Then the king called to Ziba, Saul's servant, and said unto him, I have given unto thy master's son all that pertained to Saul and to all his house.


Before Change
features_width = static_shape.get_width(image_features.get_shape())
flattened_predictions_size = (features_height * features_width *
num_predictions_per_location)
box_encodings = tf.reshape(
box_encodings,
[-1, flattened_predictions_size, 1, self._box_code_size])
class_predictions_with_background = tf.reshape(
class_predictions_with_background,
[-1, flattened_predictions_size, num_class_slots])
else:
After Change
1, self._box_code_size]))
class_predictions_with_background = tf.reshape(
class_predictions_with_background,
tf.stack([combined_feature_map_shape[0],
combined_feature_map_shape[1] *
combined_feature_map_shape[2] *
num_predictions_per_location,
num_class_slots]))
return {BOX_ENCODINGS: box_encodings,
CLASS_PREDICTIONS_WITH_BACKGROUND:
class_predictions_with_background}


B.Sc. in Home Science is a 3-year full-time undergraduate program divided across 6 semesters. Home Science is the application of science to bring home and family life in sync with changing surroundings, the program being only open to women. Theoretical projects in each subject and lab practical are a regular feature in the academic life of a Home Science student.
Home Science may be defined as the study required to develop home or family life within a changing society, with the aid of scientific knowledge and methods. The subjects involved in making Home Science an efficient learning tool for better-living are PCB, good hygiene, efficient rural development, well community living, art, better food, clothing, textiles, and proper home management etc.
In current times, Home Science is gaining huge popularity among students owing to its wide application in industries such as food preservation, clothing, textiles and home interior decoration etc. The course is not just restricted to cooking and stitching, and is multidisciplinary in nature, incorporating knowledge of social sciences, physical and biological sciences in addition to the five core areas of Communication and Extension, Human Development, Fabric and Apparel Sciences, Resource Management, and Nutrition and Food.
Given below are some of the major highlights of the course.
| Course Level | Under Graduate |
| Duration | 3 years |
| Examination Type | Semester System |
| Eligibility | 10+2 |
| Admission Process | Counselling after qualification of entrance examination |
| Course Fee | INR 3,000 to 2,00,000 |
| Average Starting Salary | INR 3 to 10 lacs |
Home science is the science of managing the home, and includes all matters that concern the house, the family members, and their resources. This is the science of ‘better living’ and the core of the specialization is the family ecosystem. The program also deals with reciprocal relations between the family and its natural and man-made environments.
The training aims at preparing candidates for procuring maximum satisfaction for the themselves and their family members through an efficient and scientific use of available resources. Candidates are imparted advanced knowledge of the scientific procedures involved in making a home happy. The course integrates the application of various Sciences and Humanities to improve human environment, management of resources, family nutrition, and child development.
Listed here are the minimum criteria of eligibility needed to be fulfilled for admission to the course.
Most institutes shortlist students for the course on the basis of their performance in a relevant entrance test. Some institutes conduct their own entrance tests for offering admission. Admission process may vary from college to college.
Often, a round of Personal Interview is also conducted for assessment of the candidate’s aptitude, in cases of some institutes.
Some institutes in the country also offer admission on the basis of the candidate’s obtained merit at the 10+2 level.
Home Science opens doors for job opportunities for successful graduates in fields such as schools and colleges, welfare organizations, hospitals, apparel merchandising, fashion journalism, restaurants, service sectors, cafeterias and counselling.
Researches are hired as Food Scientists, Demonstrators, Nutrition Consultants, and Research Assistants. Sales promotion companies involved in baby foods, foodstuffs and adult food products also employ Home Science graduates, as do manufacturing companies.
Some of the popular professional avenues open to such graduates are listed below with the corresponding salaries offered for the respective positions.


Ezekiel 35:7
Thus will I make mount Seir most desolate, and cut off from it him that passeth out and him that returneth.


This package implements nonparametric smoothing methods for circular data.
| Version: | 2.0.1 |
| Depends: | R (≥ 2.15.0), circular |
| Imports: | misc3d, movMF, plotrix, rgl, shape |
| Published: | 2014-10-16 |
| Author: | María Oliveira, Rosa M. Crujeiras and Alberto Rodríguez-Casal |
| Maintainer: | María Oliveira <maria.oliveira at usc.es> |
| License: | GPL-2 |
| URL: | http://www.jstatsoft.org/v61/i09/ |
| NeedsCompilation: | no |
| Citation: | NPCirc citation info |
| Materials: | NEWS |
| CRAN checks: | NPCirc results |
| Reference manual: | NPCirc.pdf |
| Package source: | NPCirc_2.0.1.tar.gz |
| Windows binaries: | r-devel: NPCirc_2.0.1.zip, r-release: NPCirc_2.0.1.zip, r-oldrel: NPCirc_2.0.1.zip |
| OS X binaries: | r-release: NPCirc_2.0.1.tgz, r-oldrel: NPCirc_2.0.1.tgz |
| Old sources: | NPCirc archive |
Please use the canonical form https://CRAN.R-project.org/package=NPCirc to link to this page.


Davids Song Library
{% for genre in genres %}
Browse {{genre}} titles
{% endfor %}
Search for songs by artist
Enter new song info
Enter new genre info


ALBusSeatView 💺
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Screenshots
| Start |
Select |
Gender Selection |
Voilà! |
|
|
|
|
Installation
ALBusSeatView is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'ALBusSeatView'
Usage
// If you want to config more
// let config = ALBusSeatViewConfig()
// ALBusSeatView(withConfig: config)
let seatView = ALBusSeatView()
seatView.delegate = self
seatView.dataSource = self
view.addSubview(seatView)
//ALBusSeatViewDataSource
func seatView(_ seatView: ALBusSeatView, numberOfSeatInSection section: Int) -> Int {
return 43 // Total seat count
}
func seatView(_ seatView: ALBusSeatView, seatNumberForIndex indexPath: IndexPath) -> String {
return "10" // Seat Number
}
func seatView(_ seatView: ALBusSeatView,
seatTypeForIndex indexPath: IndexPath) -> ALBusSeatType {
return .empty
}
// Seat Types
public enum ALBusSeatType: Int {
/// Free to pick
case empty
/// Already sold by woman or man
case sold
/// Being selected
case selected
/// Already sold by woman
case soldWoman
/// Already sold by man
case soldMan
/// Not a seat. Can not be able to select
case none
}
Documentation
Config (ALBusSeatViewConfig)
Layout
| Param |
Desc |
Default |
Type |
| leftHandDrivePosition |
Left drive position status |
True |
Bool |
| marginBetweenSeats |
Margin between seats |
5.0 |
CGFloat |
Seat
| Param |
Desc |
Default |
Type |
| seatEmptyBGColor |
Empty seat color |
.white |
UIColor |
| seatSoldBGColor |
Seat color purchased by woman or man. (Common seat) |
.gray |
UIColor |
| seatSelectedBGColor |
Selected seat color |
.green |
UIColor |
| seatSoldWomanBGColor |
Seat color purchased by woman |
.red |
UIColor |
| seatSoldManBGColor |
Seat color purchased by man |
.blue |
UIColor |
| seatCornerRadius |
Seat corner radius |
8.0 |
CGFloat |
| seatBorderColor |
Seat border color |
.clear |
UIColor |
| seatBorderWidth |
Seat border width |
0 |
CGFloat |
| seatShadowColor |
Seat shadow color |
.lightGray |
UIColor |
| seatShadowRadius |
Seat shadow radius |
5.0 |
CGFloat |
| seatShadowSize |
Seat shadow size |
1,1 |
CGSize |
| seatShadowOpacity |
Seat shadow opacity |
0.7 |
Float |
| seatRemoveImage |
The remove button image for selected seat |
nil |
UIImage? |
| seatNumberFont |
Seat number label font |
.system(15) |
UIFont |
| seatNumberSelectedFont |
Selected seat number label font |
.systemBold(15) |
UIFont |
| seatNumberColor |
Seat number label color |
.black |
UIColor |
| seatNumberSelectedColor |
Selected seat number label color |
.white |
UIColor |
Hall
| Param |
Desc |
Default |
Type |
| centerHallHeight |
Bus hall height |
20 |
CGFloat |
| centerHallInfoText |
Hall information label text |
“” |
String |
| centerHallInfoTextColor |
Hall information label text color |
.black |
UIColor |
| centerHallInfoTextFont |
Hall information label text font |
.system(12) |
UIFont |
Bus Front Section
| Param |
Desc |
Default |
Type |
| busFrontImage |
Bus front image |
nil |
UIImage? |
| busFrontImageWidth |
Bus front image width |
50 |
CGFloat |
Bus Floor Section
| Param |
Desc |
Default |
Type |
| floorSeperatorWidth |
Floor section width |
50 |
CGFloat |
| floorSeperatorImage |
Floor section image |
nil |
UIImage? |
| Param |
Desc |
Default |
Type |
| tooltipText |
Gender selection tooltip title |
“Select Gender” |
String |
Author
sonifex<EMAIL_ADDRESS>License
ALBusSeatView is available under the MIT license. See the LICENSE file for more info.


iterami
/
Guides.htm
/
EVE Online
/Catalyst
Fittings:
REPAIR-CHEAP
Fittings
Code
Notes
Repair Cheap
[Catalyst, REPAIR-CHEAP] Type-D Restrained Capacitor Power Relay Type-D Restrained Capacitor Power Relay Type-D Restrained Capacitor Power Relay Eutectic Compact Cap Recharger Eutectic Compact Cap Recharger Small Asymmetric Enduring Remote Shield Booster Small I-ax Enduring Remote Armor Repairer Small Remote Hull Repairer I Small 'Regard' Remote Capacitor Transmitter Salvager I Civilian Gatling Pulse Laser Small Capacitor Control Circuit I Small Capacitor Control Circuit I Small Capacitor Control Circuit I


---
layout: post
status: publish
published: true
title: "
Video of Minor League Camp and Carlos Zambrano at Fitch Park
"
author:
display_name: Corey Fineran
login: Corey
email<EMAIL_ADDRESS>url: ''
author_login: Corey
author_email<EMAIL_ADDRESS>wordpress_id: 4541
wordpress_url: http://ivyenvy.com/?p=4541
date: '2011-03-24 19:56:29 +0000'
date_gmt: '2011-03-25 00:56:29 +0000'
categories:
- Ivy Envy
- Minor Leagues
- Spring Training
tags:
- Carlos Zambrano
- Spring Training
- Fitch Park
- Cubs Minor League Camp
comments:
- id: 2937
author: Ryan
author_email<EMAIL_ADDRESS>author_url: ''
date: '2011-03-24 20:28:47 +0000'
date_gmt: '2011-03-25 01:28:47 +0000'
content: "Awesome. \r\n\r\nSpring Training looks like the ultimate fan experience.
\ \r\n\r\nMeehan"
---
Here are a few video clips that we took of the Minor League camp at Fitch Park. You will see some scrimmage action and some of the drills and coaching that happens at the camp. Carlos Zambrano showed up and you can see how close to the action you are able to get at Spring Training.


Derek Eder
@derekeder
.@chicityclerk also check out this Chicago building age map by @transitized http://buildings.transitized.com/
3/23/2015, 5:24:12 PM
Favs: 9
Retweets: 5
link← @derekeder Twitter archive
Derek Eder
@derekeder
.@chicityclerk also check out this Chicago building age map by @transitized http://buildings.transitized.com/
3/23/2015, 5:24:12 PM
Favs: 9
Retweets: 5
link


WITNESS LIST Jurisprudence Committee April 2, 1997-1:30P HB 368 For: Cole, Christopher (DSC Communication), Austin Registering, but not testifying: For: Kamm, Robert (TX Assn of Buss/Chamber), Austin HB 506 Registering, but not testifying: For: Hile, Richard (Tx Trial Lawyers), Austin HB 680 Registering, but not testifying: For: Cain, Randy (Tx Fire Chiefs Assn.), Austin Ivie, Lisa (St Firemen's & Marshals), Austin Joiner, Gary (Texas Farm Bureau), Austin SB 318 For: Herman, Guy Judge (Probate Courts), Houston Mitchell, Beth (Advocacy Inc.), Austin Registering, but not testifying: For: Schaffer, Susan (ARC of Texas), Austin Written materials submitted: For: Kidd, Waylan (Parent Assn. Retarde Ct), Georgetown Schneider, Ruth (Self), Austin SB 507 For: Tatsch, Bill (Senator Nixon), Austin Registering, but not testifying: For: Freeman, Bill Judge (Justice of Peace Assn.), Gainsville Ott, Patricia Judge (Justice of Peace Assn.), West Williams, John Judge (Justice of Peace Assn.), West SB 838 Against: Hile, Richard S. (Texas Trial Lawyers), Austin SB 966 For: Windell, Don Judge (Probate & County Court), Denton SB 1063 Registering, but not testifying: For: Pondrom, Joe (City of Richardson), Richardson SB 1094 Registering, but not testifying: For: Hyden, Larry (Jim Walter Homes), Corpus Christi Kennard, Don (Jim Walter Homes), Austin Stinson, Bill (Tx Assn. of Realtors), Austin SB 1173 For: Indorf, David Judge (Self), Dallas O'Neal, Michael Judge (TX Munic. Courts Assn.), Dallas Registering, but not testifying: For: Freeman, Bill Judge (Self), Gainesville SB 1176 Written materials submitted: For: Watson, Robert C. (Self), Houston SB 1314 For: Carter, Joan (Ctr for Battered Woman), Austin Registering, but not testifying: For: Denton, Mike (Travis Co. Attorney's), Austin Schneider, Christina (Tx Council Family Viol), Austin Sonleitner, Karen Comm (Travis Co. Comm. Court), Austin SB 1385 For: Carrillo, Louis (Office of Attorney Gen.), Austin Kraatz, Ann (Office of Attorney Gen.), Austin SB 1547 Registering, but not testifying: For: Ott, Patricia Judge (Self), Round Rock Taylor, Gene (Williamson County), Georgetown SB 1559 Registering, but not testifying: On: Mills, Ken (Tx Gen. Land Office), Austin SB 1689 For: Evans, Frank Judge (Self), Houston Registering, but not testifying: For: Rentz, Rebecca (Judge Eckels Office), Houston Written materials submitted: For: Eckels, Robert Judge (Self), Houston SB 1864 For: Guillory, L.J., Jr. (Self), Houston Jones, Harvella (Family), Houston Against: Gainer, Michael T. (C.C.U. Civic Assn.), Houston Meyers, Marjorie Jean (Community Assn Inst TX), Houston Nieman, Larry (Community Assn Inst TX), Austin Zobel, Ray (C.C.U. Civic Assn.), Houston SJR 36 Registering, but not testifying: For: Freeman, Bill Judge (Self), Gainesville Indorf, David, Judge (Self), Dallas O'Neal, Michael Judge (TX Munic. Courts), Dallas


public interface Formatter
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
format(FormattableObject obj)
Formats a given FormattableObject with this formatter
|
java.lang.String |
getContentType()
Return a String representation of this formatter that can be used in the HTTP Responses as ContentType Header
|
Format |
getFormat()
Return the Format implemented by this Formatter
|
java.lang.String |
getFormatString()
Return the Format-String used to recognize this Format in HTTP Accept Headers
This includes only the part denoting the media type, but not additional information provided.
|
boolean |
isValid()
Returns whether this formatter is valid.
|
void |
setAcceptPart(java.lang.String acceptPart,
FormattableObject.Type type)
Updates this formatter with additional information provided by the HTTP Accept header.
|
Format getFormat()
java.lang.String getFormatString()
This includes only the part denoting the media type, but not additional information provided.
java.lang.String format(FormattableObject obj)
obj
- The Object for formatboolean isValid()
void setAcceptPart(java.lang.String acceptPart, FormattableObject.Type type)
This method must always be called, eventually with a null value, if the format does not need additional info, or this formatter cannot be used / is inValid
acceptPart
- The part of the HTTP Accept Header with additional informationtype
- The type of Object this formatter will be used with. May be null.java.lang.String getContentType()


Images Today Noruega AURORAS space show Himalaya EVEREST amazing challenge Past week India FACE The big monument Transilvania CASTLE dracula's


PICO Extended (V0.7)
We take the latest version of Pico V0.7, modify / extend the pico library so that we can customize any way we choose with little or no fear of breaking our apps on future releases, this gives us the flexibility to modify and customize pico functions that we choose.


|
gtsam 4.1.1
gtsam
|
FastMap is a thin wrapper around std::map that uses the boost fast_pool_allocator instead of the default STL allocator.
FastMap is a thin wrapper around std::map that uses the boost fast_pool_allocator instead of the default STL allocator.
Disjoint Set Forest class.
Binary tree.
This class stores a dense matrix and allows it to be accessed as a collection of vertical blocks.
A testable concept check that should be placed in applicable unit tests and in generic algorithms.
This class stores a dense matrix and allows it to be accessed as a collection of blocks.
FastVector is a type alias to a std::vector with a custom memory allocator.
FastSet is a thin wrapper around std::set that uses the boost fast_pool_allocator instead of the default STL allocator.
FastList is a thin wrapper around std::list that uses the boost fast_pool_allocator instead of the default STL allocator.
DSFVector additionally keeps a vector of keys to support more expensive operations.
A fast implementation of disjoint set forests that uses vector as underly data structure.
Disjoint set forest using an STL map data structure underneath Uses rank compression and union by rank, iterator version.
This is just a convenience to avoid having lengthy types in the code. Through timing, we've seen that the fast_pool_allocator can lead to speedups of several percent.
This is the absolute minimal DSF data structure, and only allows size_t keys Uses rank compression but not union by rank :-(
This is just a convenience to avoid having lengthy types in the code. Through timing, we've seen that the fast_pool_allocator can lead to speedups of several %.
The particular allocator depends on GTSAM's cmake configuration.
When constructed, the caller must provide the dimensions of the blocks.
The block structure is symmetric, but the underlying matrix does not necessarily need to be.
This class also has a parameter that can be changed after construction to change the apparent matrix view. firstBlock() determines the block that appears to have index 0 for all operations (except re-setting firstBlock()).
See macros for details on using this structure
| T | is the objectype this constrains to be testable - assumes print() and equals() |
The dimensions of the blocks are provided when constructing this class.
This class also has three parameters that can be changed after construction that change the apparent view of the matrix without any reallocation or data copying. firstBlock() determines the block that has index 0 for all operations (except for re-setting firstBlock()). rowStart() determines the apparent first row of the matrix for all operations (except for setting rowStart() and rowEnd()). rowEnd() determines the apparent exclusive (one-past-the-last) last row for all operations. To include all rows, rowEnd() should be set to the number of rows in the matrix (i.e. one after the last true row index).
Quoting from CLR: A disjoint-set data structure maintains a collection S = {S_1,S_2,...} of disjoint dynamic sets. Each set is identified by a representative, which is some member of the set.


Class ToroidalSurface
A toroidal surface which implements ISurface. The surface represents a torus in space.
It is defined by its position in space (three directions) and two radii. The u parameter describes
the "big" circles around the main axis, the v parameter describes the "small" circles.
Inheritance
System.Object
ToroidalSurface
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: CADability.dll
Syntax
[Serializable]
public class ToroidalSurface : ISurfaceImpl, ISurface, IOctTreeInsertable, ISerializable, IDeserializationCallback, IImplicitPSurface, IExportStep, ISurfaceOfArcExtrusion, ISurfaceOfExtrusion
Constructors
|
Improve this Doc
View Source
ToroidalSurface(GeoPoint, GeoVector, GeoVector, GeoVector, Double, Double)
Declaration
public ToroidalSurface(GeoPoint loc, GeoVector dirx, GeoVector diry, GeoVector dirz, double majorRadius, double minorRadius)
Parameters
|
Improve this Doc
View Source
ToroidalSurface(SerializationInfo, StreamingContext)
Declaration
protected ToroidalSurface(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
|
| System.Runtime.Serialization.StreamingContext |
context |
|
Properties
|
Improve this Doc
View Source
Axis
Declaration
public GeoVector Axis { get; }
Property Value
|
Improve this Doc
View Source
IsUPeriodic
Declaration
public override bool IsUPeriodic { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
IsVPeriodic
Declaration
public override bool IsVPeriodic { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
Location
Declaration
public GeoPoint Location { get; }
Property Value
|
Improve this Doc
View Source
MinorRadius
Declaration
public double MinorRadius { get; }
Property Value
| Type |
Description |
| System.Double |
|
|
Improve this Doc
View Source
Oriented
Declaration
public override bool Oriented { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
UPeriod
Declaration
public override double UPeriod { get; }
Property Value
| Type |
Description |
| System.Double |
|
Overrides
|
Improve this Doc
View Source
VPeriod
Declaration
public override double VPeriod { get; }
Property Value
| Type |
Description |
| System.Double |
|
Overrides
|
Improve this Doc
View Source
XAxis
Declaration
public GeoVector XAxis { get; }
Property Value
|
Improve this Doc
View Source
YAxis
Declaration
public GeoVector YAxis { get; }
Property Value
|
Improve this Doc
View Source
ZAxis
Declaration
public GeoVector ZAxis { get; }
Property Value
Methods
|
Improve this Doc
View Source
Clone()
Declaration
public override ISurface Clone()
Returns
Overrides
|
Improve this Doc
View Source
CopyData(ISurface)
Declaration
public override void CopyData(ISurface CopyFrom)
Parameters
Overrides
|
Improve this Doc
View Source
Derivation2At(GeoPoint2D, out GeoPoint, out GeoVector, out GeoVector, out GeoVector, out GeoVector, out GeoVector)
Declaration
public override void Derivation2At(GeoPoint2D uv, out GeoPoint location, out GeoVector du, out GeoVector dv, out GeoVector duu, out GeoVector dvv, out GeoVector duv)
Parameters
Overrides
|
Improve this Doc
View Source
FixedU(Double, Double, Double)
Declaration
public override ICurve FixedU(double u, double vmin, double vmax)
Parameters
| Type |
Name |
Description |
| System.Double |
u |
|
| System.Double |
vmin |
|
| System.Double |
vmax |
|
Returns
Overrides
|
Improve this Doc
View Source
FixedV(Double, Double, Double)
Declaration
public override ICurve FixedV(double v, double umin, double umax)
Parameters
| Type |
Name |
Description |
| System.Double |
v |
|
| System.Double |
umin |
|
| System.Double |
umax |
|
Returns
Overrides
|
Improve this Doc
View Source
GetAxisEllipse()
Declaration
public Ellipse GetAxisEllipse()
Returns
|
Improve this Doc
View Source
GetDualSurfaceCurves(BoundingRect, ISurface, BoundingRect, List<GeoPoint>, List<Tuple<Double, Double, Double, Double>>)
Declaration
public override IDualSurfaceCurve[] GetDualSurfaceCurves(BoundingRect thisBounds, ISurface other, BoundingRect otherBounds, List<GeoPoint> seeds, List<Tuple<double, double, double, double>> extremePositions)
Parameters
| Type |
Name |
Description |
| BoundingRect |
thisBounds |
|
| ISurface |
other |
|
| BoundingRect |
otherBounds |
|
| System.Collections.Generic.List<GeoPoint> |
seeds |
|
| System.Collections.Generic.List<System.Tuple<System.Double, System.Double, System.Double, System.Double>> |
extremePositions |
|
Returns
Overrides
|
Improve this Doc
View Source
GetExtrema()
Declaration
public override GeoPoint2D[] GetExtrema()
Returns
Overrides
|
Improve this Doc
View Source
GetImplicitPolynomial()
Declaration
public override Polynom GetImplicitPolynomial()
Returns
Overrides
|
Improve this Doc
View Source
GetLineIntersection(GeoPoint, GeoVector)
Declaration
public override GeoPoint2D[] GetLineIntersection(GeoPoint startPoint, GeoVector direction)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
GetModified(ModOp)
Declaration
public override ISurface GetModified(ModOp m)
Parameters
| Type |
Name |
Description |
| ModOp |
m |
|
Returns
Overrides
|
Improve this Doc
View Source
GetNaturalBounds(out Double, out Double, out Double, out Double)
Declaration
public override void GetNaturalBounds(out double umin, out double umax, out double vmin, out double vmax)
Parameters
| Type |
Name |
Description |
| System.Double |
umin |
|
| System.Double |
umax |
|
| System.Double |
vmin |
|
| System.Double |
vmax |
|
Overrides
|
Improve this Doc
View Source
GetNonPeriodicSurface(ICurve[])
Declaration
public override ISurface GetNonPeriodicSurface(ICurve[] orientedCurves)
Parameters
| Type |
Name |
Description |
| ICurve[] |
orientedCurves |
|
Returns
Overrides
|
Improve this Doc
View Source
GetNormal(GeoPoint2D)
Declaration
public override GeoVector GetNormal(GeoPoint2D uv)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
GetOffsetSurface(Double)
Declaration
public override ISurface GetOffsetSurface(double offset)
Parameters
| Type |
Name |
Description |
| System.Double |
offset |
|
Returns
Overrides
|
Improve this Doc
View Source
GetPlaneIntersection(PlaneSurface, Double, Double, Double, Double, Double)
Declaration
public override IDualSurfaceCurve[] GetPlaneIntersection(PlaneSurface pl, double umin, double umax, double vmin, double vmax, double precision)
Parameters
| Type |
Name |
Description |
| PlaneSurface |
pl |
|
| System.Double |
umin |
|
| System.Double |
umax |
|
| System.Double |
vmin |
|
| System.Double |
vmax |
|
| System.Double |
precision |
|
Returns
Overrides
|
Improve this Doc
View Source
GetProjectedCurve(ICurve, Double)
Declaration
public override ICurve2D GetProjectedCurve(ICurve curve, double precision)
Parameters
| Type |
Name |
Description |
| ICurve |
curve |
|
| System.Double |
precision |
|
Returns
Overrides
|
Improve this Doc
View Source
GetPropertyEntry(IFrame)
Declaration
public override IPropertyEntry GetPropertyEntry(IFrame frame)
Parameters
| Type |
Name |
Description |
| IFrame |
frame |
|
Returns
Overrides
|
Improve this Doc
View Source
GetSaveUSteps()
Declaration
protected override double[] GetSaveUSteps()
Returns
| Type |
Description |
| System.Double[] |
|
Overrides
|
Improve this Doc
View Source
GetSaveVSteps()
Declaration
protected override double[] GetSaveVSteps()
Returns
| Type |
Description |
| System.Double[] |
|
Overrides
|
Improve this Doc
View Source
GetSelfIntersections(BoundingRect)
Declaration
public override ICurve2D[] GetSelfIntersections(BoundingRect bounds)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
GetTangentCurves(GeoVector, Double, Double, Double, Double)
Declaration
public override ICurve2D[] GetTangentCurves(GeoVector direction, double umin, double umax, double vmin, double vmax)
Parameters
| Type |
Name |
Description |
| GeoVector |
direction |
|
| System.Double |
umin |
|
| System.Double |
umax |
|
| System.Double |
vmin |
|
| System.Double |
vmax |
|
Returns
Overrides
|
Improve this Doc
View Source
GetVSingularities()
Declaration
public override double[] GetVSingularities()
Returns
| Type |
Description |
| System.Double[] |
|
Overrides
|
Improve this Doc
View Source
GetZMinMax(Projection, Double, Double, Double, Double, ref Double, ref Double)
Declaration
public override void GetZMinMax(Projection p, double umin, double umax, double vmin, double vmax, ref double zMin, ref double zMax)
Parameters
| Type |
Name |
Description |
| Projection |
p |
|
| System.Double |
umin |
|
| System.Double |
umax |
|
| System.Double |
vmin |
|
| System.Double |
vmax |
|
| System.Double |
zMin |
|
| System.Double |
zMax |
|
Overrides
|
Improve this Doc
View Source
HitTest(BoundingCube, out GeoPoint2D)
Declaration
public override bool HitTest(BoundingCube bc, out GeoPoint2D uv)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
Intersect(BoundingRect, ISurface, BoundingRect)
Declaration
public override ICurve[] Intersect(BoundingRect thisBounds, ISurface other, BoundingRect otherBounds)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
Intersect(BoundingRect, ISurface, BoundingRect, GeoPoint)
Declaration
public override ICurve Intersect(BoundingRect thisBounds, ISurface other, BoundingRect otherBounds, GeoPoint seed)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
Intersect(ICurve, BoundingRect, out GeoPoint[], out GeoPoint2D[], out Double[])
Declaration
public override void Intersect(ICurve curve, BoundingRect uvExtent, out GeoPoint[] ips, out GeoPoint2D[] uvOnFaces, out double[] uOnCurve3Ds)
Parameters
Overrides
|
Improve this Doc
View Source
Make3dCurve(ICurve2D)
Declaration
public override ICurve Make3dCurve(ICurve2D curve2d)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
MaxDist(GeoPoint2D, GeoPoint2D, out GeoPoint2D)
Declaration
public override double MaxDist(GeoPoint2D sp, GeoPoint2D ep, out GeoPoint2D mp)
Parameters
Returns
| Type |
Description |
| System.Double |
|
Overrides
|
Improve this Doc
View Source
Modify(ModOp)
Declaration
public override void Modify(ModOp m)
Parameters
| Type |
Name |
Description |
| ModOp |
m |
|
Overrides
|
Improve this Doc
View Source
Orientation(GeoPoint)
Declaration
public override double Orientation(GeoPoint p)
Parameters
Returns
| Type |
Description |
| System.Double |
|
Overrides
|
Improve this Doc
View Source
PointAt(GeoPoint2D)
Declaration
public override GeoPoint PointAt(GeoPoint2D uv)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
PositionOf(GeoPoint)
Declaration
public override GeoPoint2D PositionOf(GeoPoint p)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
ReverseOrientation()
Declaration
public override ModOp2D ReverseOrientation()
Returns
Overrides
|
Improve this Doc
View Source
SameGeometry(BoundingRect, ISurface, BoundingRect, Double, out ModOp2D)
Declaration
public override bool SameGeometry(BoundingRect thisBounds, ISurface other, BoundingRect otherBounds, double precision, out ModOp2D firstToSecond)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
Overrides
|
Improve this Doc
View Source
UDirection(GeoPoint2D)
Declaration
public override GeoVector UDirection(GeoPoint2D uv)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
VDirection(GeoPoint2D)
Declaration
public override GeoVector VDirection(GeoPoint2D uv)
Parameters
Returns
Overrides
Explicit Interface Implementations
|
Improve this Doc
View Source
IExportStep.Export(ExportStep, Boolean)
Declaration
int IExportStep.Export(ExportStep export, bool topLevel)
Parameters
| Type |
Name |
Description |
| ExportStep |
export |
|
| System.Boolean |
topLevel |
|
Returns
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
IImplicitPSurface.GetImplicitPSurface()
Declaration
ImplicitPSurface IImplicitPSurface.GetImplicitPSurface()
Returns
|
Improve this Doc
View Source
IDeserializationCallback.OnDeserialization(Object)
Declaration
void IDeserializationCallback.OnDeserialization(object sender)
Parameters
| Type |
Name |
Description |
| System.Object |
sender |
|
|
Improve this Doc
View Source
ISerializable.GetObjectData(SerializationInfo, StreamingContext)
Declaration
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
|
| System.Runtime.Serialization.StreamingContext |
context |
|
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback