What I've learn about Rails so far II
Sept 26 2016
It's been 9 months since I worked as a professional rails developer. What have I learned?

Instance Variable (@article) vs Calling method
When you working on rails app, and need to create API that contains customized information from database, I was told that make instance variables like @articles, @reviews are the best way. Here is example from my Favorite Food Truck app
There is nothing wrong with above code. @review is new instance of Review class, @foods represents all Food instance etc. This is definitely how I learned to do.
Compaire with this controller.
I guarantee you there are lots of stuff going on index.html.erb file. There are several model rendering, display user information, startup accounts etc. but where are the methods?
They are mostly in the view. Technically speaking, it is in model. Instead of making instance variable, each time when we need information, just call the method and get information from database. Here is the example
So Why this is better than having @other_events in controller? First, In case there is an error on the instance method, let's say we called @events, which returns all events and render 1) event.name and 2) event.date. What happen if one of event doesn't have a date? As soon as you load the event.html.erb, it will throw an error. You don't want that. If there is going to be an issue, you want to have it as smallest scale as possible.
Second, functions can be used everywhere but instance variable in the controller isn't. You need to keep specify what @events are in the each controller.
Last, it is much easier to test functions in the model than controller.
Thus, the argument of fat model vs thin controller.
Fat Model and Thin Controller
Controller is the happening place. If route.rb is the map of the app, the controller is the agency to hook up with actions and views. It dictates what to do - like CRUD, and what will render. The reason I am a big fan of thin controller is that it will make easier to figure out what is going on or what is wrong. Because as the app grow, it will have more complicated routes and actions. So I like to have all functions in the model and keep controller small.
DRYer code - Another benefit of moving functions to the model is recyclability of your code(functions). When you made functions in the model, you can use everywhere as long as you can call it via its instance (or class).
Rails Helper Functions
Concerns
One fine afternoon, I've landed in a task to check all the urls in every model and put 'http://' if it is external link. For instance, our startup model has attribute - company_url, document model has video_url, user has facebook_url, linkedin_url etc.
So whenever new instance of these class created, check the external url related attribute and put http:// if there is non (e.g. www.youtube.com).
I had pretty good idea how to check url related attribute and change it but the question is Where am I gonna put this function??
First, my reaction is 'helper' folder - more exact, application_helper.rb. The great thing about application_help is that these functions are available cross the stack. You can call it anywhere! But how can I check the class attributes with functions?
You may have noticed that Rails 4 creates concerns file under 'controller' and 'model'. What is concern and how we can use it?
Here comes 'concerns'
Concerns are essentially modules that allow you to encapsulate model roles into separate files to DRY up your code.Here you can use concern in the model
This callback(before_save) will run before any instance saved and call url_convertor. This magic is all posible due to ActiveSupport::Concern
If you are wondering why I used self.send(url), please read this.
Services Object
So far I've reasoned why we need to maintain controller skinny. But how? We've already moved all object related methods to the model and we've used ActiveSupport::Concerns to even dry up more for common methods like changing external url address starting to http://. Can we do more?
Happens to be, our app does use lots of mailers. We triggers mail when a user register our website, request to change password, get more points, new deals opened etc. So each controller action, for instance, when we create new 'deal', it triggers "UserMailer:new_deal_announcement". The mailer is different and the email contents are different but put all these details in the controller seem little unfair. Well then, where should I move to?
Service Object implements the user’s interactions with the applicationThe common way of using service object is 3 stages:
You might suspect that services will be used on the boundary between user interface and application - and you’d be right! In the context of Rails, this boundary is the controller. An application using services would instantiate them in controller actions, tell them to perform work and respond back to the user. Let’s see an example:
So, we see how we call it from the controller, so what this service object look like:
The service object's action contains one thing and one thing only. Triggers mailer. But now that we have removed this from the controller, we can keep our controller skinny and focus on what they need to do - publish and redirect. The rest of them will be taken cared by service object. This also help to DRY your code in case you need to send this email from other controller action.
If you want to read more about Service object, check this article.


WebSiteName
Home
Page 1
Page 2
Page 3
Home
About
Contact
UID
Leaves
Tasks
Role
1
25
System Clean
Development
1
25
System Clean
Development
1
25
System Clean
Development
Success
Warning
info
Primary


{% extends 'layout.html' %} {% block head %} {{ head|raw }} {% endblock %} {% block content %}
Embed with:
Or in Markdown:
Some people don't really appreciate too much bling, so here's compact=true
:
https://gitteri.co/gitter/through.png?compact=true
Really don't like clutter but don't want to be left out? Try mini=true
:


{% extends "nav.html" %} {% block title %} View File {% endblock %} {% block extraHead %} {% endblock %} {% block body %}
Gallery is in Lockdown! Members cannot view content.
This file has been hidden from members. Avoid viewing in public rooms!
Description: {{ description }}
Date Uploaded: {{ file.date() }}


CURRENT_SCHEMAS
Returns an array of the names of any schemas in the current search path. The current search path is defined in the search_path parameter.
Syntax
Note
This is a leader-node function. This function returns an error if it references a user-created table, an STL or STV system table, or an SVV or SVL system view.
current_schemas(include_implicit)
Argument
- include_implicit
-
If true, specifies that the search path should include any implicitly included system schemas. Valid values are
true
andfalse
. Typically, iftrue
, this parameter returns thepg_catalog
schema in addition to the current schema.
Return Type
Returns a CHAR or VARCHAR string.
Examples
The following example returns the names of the schemas in the current search path, not including implicitly included system schemas:
select current_schemas(false); current_schemas ----------------- {public} (1 row)
The following example returns the names of the schemas in the current search path, including implicitly included system schemas:
select current_schemas(true); current_schemas --------------------- {pg_catalog,public} (1 row)


=
\( \sqrt[4] {625}\) =
\( \sqrt{1024}\)
You may finddufheuhfsa7udfjhe7y http://saasmath.seattleacademy.org/wiki/index.php/Help:Contents helpful, but rather than the <math> tag, use the \( and \( for inline expressions and open and close with $$ for block expressions.


Today
Building a Simple User Interface
In this lesson, you create a layout in XML that includes a text field and a button. In the next lesson, your app responds when the
Blueberry Cheesecake Dessert Recipe
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes.
Your Finances Don't Have to Be Perfect to Work
In this lesson, you create a layout in XML that includes a text field and a button. In the next lesson, your app responds when the
Yesterday
An Engineer Explains Why You Should Always Order the Larger Pizza
In this lesson, you create a layout in XML that includes a text field and a button. In the next lesson, your app responds when the
The Strange Persistence of First Languages
In this lesson, you create a layout in XML that includes a text field and a button. In the next lesson, your app responds when the
December 20, 2017
How to Win Your Next Political Argument
In this lesson, you create a layout in XML that includes a text field and a button. In the next lesson, your app responds when the
Your Finances Don't Have to Be Perfect to Work
Elisse Joson San Francisco, CA
In this lesson, you create a layout in XML that includes a text field and a button...
The Condensed Guide to Running Meetings
Elisse Joson San Francisco, CA
We love to hate meetings. And with good reason — they clog up our days, making it hard to get work done in the gaps...
What Romance Really Means After 10 Years of Marriage
Elisse Joson San Francisco, CA
In this lesson, you create a layout in XML that includes a text field and a button...
Buying organic veggies at the supermarket is a waste of money
Elisse Joson San Francisco, CA
In this lesson, you create a layout in XML that includes a text field and a button...


What channel is Livingston vs Rangers? Live stream, TV and kick-off details
The Ibrox side are flying high off the back of their impressive win against Porto midweek.
by Chris Doyle, https://www.dailyrecord.co.uk/authors/chris-doyle/Rangers will do battle with Livingston in their quest to topple Celtic from the Premiership summit.
Steven Gerrard's trail their city rivals only by goal difference and can keep the heat on with a win in West Lothian.
Livi are no pushovers, however, defeating Celtic last month. They also made Rangers work for a 1-0 Betfred Cup success earlier in the season.
The Light Blues dispatched Porto in the Europa League in mid-week, and this clash has been given an extra edge by Gary Holt taking aiming at his counterpart Gerrard.
Here's all the details you need to know ahead of the Premiership clash.
When and where will the game take place?
The match will take place on Sunday, November 10 at the Tony Macaroni Arena.
Kick-off is at 3pm.
What channel is it on?
You can watch the game live on Sky Sports Football.
Coverage begins at 2.30pm.
Is it being streamed online?
Yes, subscribers can watch on the Sky Go app.
Where else can I follow the game?
You can follow it right here on dailyrecord.co.uk of course! We'll be running a live blog well ahead of the TV coverage, bringing you all the key moments as well as post-match reaction and analysis.
A match report and much, much more will also be available on our website following the final whistle.


thought I saw somewhere that you are going with no lvl req on items. I think there are alot of ups and downs on this.
personally I think that it should be a lvl req on items. This has always made people play more just to reach the lvl to be
able to use the items they find. so if you are lvl 15 and find a sp leather, using it at once would be nice and all, but if it was lvl 20
req it will be a really nice thing to lvl after. people tend to play more and be way more dedicated when they got something to play for.
and I wonder also how will drops of good items be? will you have mystic be really rare, and items better then that almost impossbile to find?
will sun staff/moon staff/black cloth/moon robe/dirus armor/vis gladius etc be aquirrable items, or reserved for corsix/valentra etc?
will you add hidden props (hope not), will the items have the stats they have now, with amd etc and not like before where it was almost only prot on em?
will the propping shrine work like it used to (aka only work randomly) will you have a higher selections on props, like there are maybe 12 possible props and only 7 that can
be applied on an item, so we can have 100 of different variations of the same item. (maybe add spell resists, faster cast rate, faster hit rate, shield blocking etc). would make the game much more varied then it was/is.
Will there be new items? like actual sets with maybe bonuses (not suggesting that this will actually happen at first, but atleast something that you can have in the back off your mind)
just throwing out ideas here


Toggle navigation
Your Brand
About
(current)
CV
my posts
Tutorials
Web Design
Data Science
Computational biology
Cooking receipts
Research
Motif discovery
Population genetics
Something else here
Separated link
Others
Action
Another action
Something else here
Separated link
Keywords
Abstract
Github Pages is a free website server. Your free url will be your_user_name.github.io. It is pretty cool, isn't it?
Use GitHub Pages to Build Your Blog
Git
GitHub Pages
Bundle & Gem
Jekyll


Please help me to decide what library to choose for my everyday usage.
If you have some experience in that area please tell your word here. Also please distribute this to as many colleges as you can.
Much appreciated!
--- layout: post title: JavaScript Library survey date: 2009-04-17 16:18:00.000000000 +10:00 comments: true categories: - javascript - development - survey ---
Thanks for that. I'm aware of that. But had to mention that I'm not looking for server-side specific library. Instead I want it to be platform independent. Or at the very bad end - .NET specific :)
Another thing is that I really had to include MootTools. But, honestly, for me the choice is between jQuery and YUI at this stage.
I had enough licensing problems with ExtJS and I don't want to deal with it again.
Cheers.
First one is really coooool for large javascript projects - it performs some optimizations during java2js compilation, and second one is one used by some people for small projects well.
By the way ,there's analog of extjs built for google web tookit. Here's their demo: http://extjs.com/explorer/
It is called ext-gwt


Project 2: Armageddon - Atmospheric entry and disruption of asteroids¶
Synopsis:¶
Asteroids entering Earth’s atmosphere are subject to extreme drag forces that decelerate, heat and disrupt the space rocks. The fate of an asteroid is a complex function of its initial mass, speed, trajectory angle and internal strength.
Asteroids 10-100 m in diameter can penetrate deep into Earth’s atmosphere and disrupt catastrophically, generating an atmospheric disturbance (airburst) that can cause damage on the ground. Such an event occurred over the city of Chelyabinsk in Russia, in 2013, releasing energy equivalent to about 520 kilotons of TNT (1 kt TNT is equivalent to \(4.184 \times 10^{12}\) J), and injuring thousands of people (Popova et al., 2013; Brown et al., 2013). An even larger event occurred over Tunguska, an unpopulated area in Siberia, in 1908.
The purpose of this exercise is to develop a fast numerical simulator to predict the fate of asteroids entering Earth’s atmosphere for the purposes of hazard assessment.
Problem definition¶
Equations¶
The dynamics of an asteroid in Earth’s atmosphere is governed by a coupled set of ordinary differential equations:
In these equations, \(v\), \(m\), and \(A\) are the asteroid speed (along trajectory), mass and cross-sectional area, respectively. \(\theta\) is the meteoroid trajectory angle to the horizontal (in radians), \(x\) is the downrange distance of the meteoroid from its entry position, \(z\) is the altitude and \(t\) is time; \(C_D\) is the drag coefficient, \(\rho_a\) is the atmospheric density (a function of altitude ), \(C_H\) is an ablation efficiency coefficient, \(Q\) is the specific heat of ablation; \(C_L\) is a lift coefficient; and \(R_P\) is the planetary radius. All terms use MKS units.
It is common to assume (for simplicity) that, prior to break-up, the radius (and cross-sectional area) of the asteroid remains constant; that is, any mass-loss by ablation does not change the cross-sectional area of the asteroid. We will further assume a spherical asteroid.
A commonly used criterion for the break-up of an asteroid in the atmosphere is when the ram pressure of the air interacting with the asteroid \(\rho_a v^2\) first exceeds the strength of the asteroid \(Y\).
Should break-up occur, the asteroid deforms and spreads laterally as it continues its passage through the atmosphere. As a result its radius and cross-sectional area increase, but the asteroid density is assumed to remain constant (often referred to as ‘pancaking’). It is conventional to define the cross-sectional area of the expanding cloud of fragments as \(A = \pi r^2\) (i.e., assuming a circular cross-section), for use in the above equations.
Several models for the spreading rate \(\frac{dr}{dt}\) have been proposed. In the simplest model, the fragmented asteroid’s spreading rate is related to its along trajectory speed (Hills and Goda, 1993):
Where \(r\) is the asteroid radius, \(\rho_m\) is the asteroid density and \(\alpha\) is a spreading coefficient, often taken to be 0.3.
Note that fragmentation and spreading ceases (\(\frac{dr}{dt} = 0\)) when the ram pressure drops back below the strength of the asteroid \(\rho_a v^2 < Y\).
The figure below shows a typical solution to the above set of equations for an impact airburst scenario. The kinetic energy loss per unit height, which is a good approximation for the energy transferred to the atmosphere as heat (and is often referred to as the energy deposited per km altitude), is shown as a function of altitude.
In this scenario the asteroid experiences breakup at approximately 48-km altitude (denoted by the star), before spreading and decelerating rapidly until an altitude of approximately 15 km at which point the energy loss per unit height is maximum. This point is often considered to be the burst altitude. The total kinetic energy lost by the asteroid at this point is a good estimate of the airburst energy (i.e., the total energy deposited into the atmosphere) for hazard analysis.
Impact scenarios with a burst altitude well (>5 km) above the surface can be considered to be airburst events and are unlikely to form a sizable crater on the ground. In such cases, even if a substantial fraction of the original asteroid survives to the ground it will be decelerated to a very small fraction of its initial speed.
Impact scenarios with a burst altitude below the surface (i.e., peak energy deposition per unit height is not reached before the asteroid strikes the ground) will form a sizable impact crater on the ground and can be considered as a cratering event (although a sizable proportion of the original kinetic energy of the asteroid may be transferred to the air).
Between these scenarios is a complex regime where a low altitude airburst combined with a substantial crater-forming event is likely. This regime is not well understood.
Function API¶
Python asteroid airburst calculator
-
class
armageddon.
Planet
(atmos_func='exponential', atmos_filename='data/AltitudeDensityTable.csv', Cd=1.0, Ch=0.1, Q=10000000.0, Cl=0.001, alpha=0.3, Rp=6371000.0, g=9.81, H=8000.0, rho0=1.2)¶ The class called Planet is initialised with constants appropriate for the given target planet, including the atmospheric density profile and other constants
Set up the initial parameters and constants for the target planet
- Parameters
atmos_func (string, optional) – Function which computes atmospheric density, rho, at altitude, z. Default is the exponential function
rho = rho0 exp(-z/H)
. Options areexponential
,tabular
,constant
andmars
atmos_filename (string, optional) – If
atmos_func
='tabular'
, then set the filename of the table to be read in here.Cd (float, optional) – The drag coefficient
Ch (float, optional) – The heat transfer coefficient
Q (float, optional) – The heat of ablation (J/kg)
Cl (float, optional) – Lift coefficient
alpha (float, optional) – Dispersion coefficient
Rp (float, optional) – Planet radius (m)
rho0 (float, optional) – Air density at zero altitude (kg/m^3)
g (float, optional) – Surface gravity (m/s^2)
H (float, optional) – Atmospheric scale height (m)
- Returns
- Return type
None
-
RK4
(f, u0, t0, t_max, dt, strength, density)¶ Solve the a coupled set of (total six) ordinary differential equations. Implement RK4 algorithm
- Parameters
velocity (float) – The entery speed of the asteroid in meters/second
mass (float) – Initial mass
angle (float) – The initial trajectory angle of the asteroid to the horizontal By default, input is in degrees. If ‘radians’ is set to True, the input should be in radians
altitude (float) – Initial z-position (m)
distance (float) – Initial x-position (m)
radius (float) – The radius of the asteroid in meters
t_max (float) – The maximum of setting time
dt (float) – The timestep
strength (float) – The strength of the asteroid (i.e., the ram pressure above which fragmentation and spreading occurs) in N/m^2 (Pa)
density (float) – The density of the asteroid in kg/m^3
- Returns
Result – u = [velocity, mass, angle, altitude, distance, radius] t = [time]
- Return type
array
-
analyse_outcome
(result, strength=100000.0, plotting=False)¶ Inspect a prefound solution to calculate the impact and airburst stats
- Parameters
result (DataFrame) – pandas DataFrame with velocity, mass, angle, altitude, horizontal distance, radius and dedz as a function of time
strength (float) – Specified by user when calling the impact function. Here it is used in the calcuations of the break-up altitude
plotting (logical, optional) – Allows the user to choose whether to graphically display the results. Default is set to False (no plotting).
- Returns
outcome – dictionary with details of airburst and/or cratering event. For an airburst, this will contain the following keys:
burst_peak_dedz
,burst_altitude
,burst_total_ke_lost
.For a cratering event, this will contain the following keys:
impact_time
,impact_mass
,impact_speed
.All events should also contain an entry with the key
outcome
, which should contain one of the following strings:Airburst
,Cratering
orAirburst and cratering
- Return type
Dict
-
calculate_energy
(result, method='central')¶ Function to calculate the kinetic energy lost per unit altitude in kilotons TNT per km, for a given solution.
- Parameters
result (DataFrame) – A pandas DataFrame with columns for the velocity, mass, angle, altitude, horizontal distance and radius as a function of time
method (string) – Method to be used for numerical differenciation. Choice in: ‘forward’, ‘backward’, ‘central’, ‘undertermined_coeff’ and ‘analytical’. By default, analytical calculations are used.
- Returns
Result – Returns the DataFrame with additional column
dedz
which is the kinetic energy lost per unit altitude- Return type
DataFrame
-
deg_to_rad
(deg)¶ Convert degree to radians.
- Parameters
deg (float) – The degree of the input angle.
- Returns
Result – The radians of the input angle.
- Return type
float
-
f_msd
(t, u, strength, density)¶ Define a coupled set of (total six) ordinary differential equations
f[0]:dv/dt f[1]:dm/dt f[2]:d(theta)/dt f[3]:dz/dt f[4]:dx/dt f[5]:dr/dt
- Parameters
velocity (float) – The entery speed of the asteroid in meters/second
mass (float) – Initial mass
angle (float) – The initial trajectory angle of the asteroid to the horizontal By default, input is in degrees. If ‘radians’ is set to True, the input should be in radians
altitude (float) – Initial z-position (m)
distance (float) – Initial x-position (m)
radius (float) – The radius of the asteroid in meters
strength (float) – The strength of the asteroid (i.e., the ram pressure above which fragmentation and spreading occurs) in N/m^2 (Pa)
density (float) – The density of the asteroid in kg/m^3
a list of u (Define) –
= [velocity, mass, angle, altitude, distance, radius] (u) –
- Returns
Result – f[0, 1, 2, 3, 4, 5] f[0]:dv/dt f[1]:dm/dt f[2]:d(theta)/dt f[3]:dz/dt f[4]:dx/dt f[5]:dr/dt
- Return type
list of function
-
impact
(radius, velocity, density, strength, angle, init_altitude=100000.0, dt=0.05, radians=False, plotting=False)¶ Solve the system of differential equations for a given impact event. Also calculates the kinetic energy lost per unit altitude and analyses the result to determine the outcome of the impact.
- Parameters
radius (float) – The radius of the asteroid in meters
velocity (float) – The entery speed of the asteroid in meters/second
density (float) – The density of the asteroid in kg/m^3
strength (float) – The strength of the asteroid (i.e., the ram pressure above which fragmentation and spreading occurs) in N/m^2 (Pa)
angle (float) – The initial trajectory angle of the asteroid to the horizontal By default, input is in degrees. If ‘radians’ is set to True, the input should be in radians
init_altitude (float, optional) – Initial altitude in m
dt (float, optional) – The output timestep, in s
radians (logical, optional) – Whether angles should be given in degrees or radians. Default=False Angles returned in the DataFrame will have the same units as the input
plotting (logical, optional) – Allows the user to choose whether to plot the results graphically or not. Default is set to False (no plotting).
- Returns
Result (DataFrame) – A pandas DataFrame containing the solution to the system. Includes the following columns:
velocity
,mass
,angle
,altitude
,distance
,radius
,time
,dedz
outcome (Dict) – dictionary with details of airburst and/or cratering event. For an airburst, this will contain the following keys:
burst_peak_dedz
,burst_altitude
,burst_total_ke_lost
.For a cratering event, this will contain the following keys:
impact_time
,impact_mass
,impact_speed
.All events should also contain an entry with the key
outcome
, which should contain one of the following strings:Airburst
,Cratering
orAirburst and cratering
-
solve_atmospheric_entry
(radius, velocity, density, strength, angle, init_altitude=100000.0, dt=0.05, radians=False)¶ Solve the system of differential equations for a given impact scenario
- Parameters
radius (float) – The radius of the asteroid in meters
velocity (float) – The entery speed of the asteroid in meters/second
density (float) – The density of the asteroid in kg/m^3
strength (float) – The strength of the asteroid (i.e., the ram pressure above which fragmentation and spreading occurs) in N/m^2 (Pa)
angle (float) – The initial trajectory angle of the asteroid to the horizontal By default, input is in degrees. If ‘radians’ is set to True, the input should be in radians
init_altitude (float, optional) – Initial altitude in m
dt (float, optional) – The output timestep, in s
radians (logical, optional) – Whether angles should be given in degrees or radians. Default=False Angles returned in the DataFrame will have the same units as the input
- Returns
Result – A pandas DataFrame containing the solution to the system. Includes the following columns:
velocity
,mass
,angle
,altitude
,distance
,radius
,time
- Return type
DataFrame
-
armageddon.
analyse_data
(planet, rho_m, theta, velocity_entry, datapath, r_tol=0.01, r_min=0.01, r_max=4500.0, Y_tol=1000.0, Y_min=1000.0, Y_max=1000000000000.0, plotting=True, step=False, max_step=20)¶ Function to fit asteroid parameters (radius r and strength Y) to a given dataset.
- Parameters
planet – Class
rho_m (float) – Meteor density in kg/m-3
theta (float) – Meteor entry angle in degrees
velocity_entry (float) – Meteor entry velocity in m/s
datapath (string) – Path to csv file containing event altitude in km in first column and event energy per km altitude in the second column in Kt/km
r_tol (float, optional) – Tolerance of radius result. As default, the radius is given to the closest cm (1e-2 m)
r_min (float, optional) – Estimated minimum possible initial radius for the event. As default, r_min is taken as default r_tol
r_max (float, optional) – Estimated maximum possible initial radius for the event. As default, r_max is taken as the radius of a one per 100Ma event (4500m)
Y_tol (float, optional) – Tolerance of strength result. As default, the strength is given to the nearest kPa (1e3 Pa)
Y_min (float, optional) – Estimated minimum possible material strength. As default, Y_min is taken as default Y_tol
Y_max (float, optional) – Estimated maximum possible material strength. As default, Y_max is taken as the strength of graphine (1e12Pa)
plotting (boolean, optional) – If plotting is ‘True’, plotting is turned on. By default, plotting is ‘True’.
step (boolean, optional) – If step is ‘True’ and plotting is ‘True’, returns a plot including the intermediate convergence.
- Returns
- Return type
None
-
armageddon.
calculate_mse
(earth, radius=10, strength=100000.0)¶ calculate the mean square error of fit model to the original model
- Parameters
radius (float) – asteroid radius
strength (float) – asteroid strength
- Returns
mse – square distance between burst points of fit model and raw data
- Return type
float
-
armageddon.
compute
(*args, **kwargs)¶ Compute several dask collections at once.
- Parameters
args (object) – Any number of objects. If it is a dask object, it’s computed and the result is returned. By default, python builtin collections are also traversed to look for dask objects (for more information see the
traverse
keyword). Non-dask arguments are passed through unchanged.traverse (bool, optional) – By default dask traverses builtin python collections looking for dask objects passed to
compute
. For large collections this can be expensive. If none of the arguments contain any dask objects, settraverse=False
to avoid doing this traversal.scheduler (string, optional) – Which scheduler to use like “threads”, “synchronous” or “processes”. If not provided, the default is to check the global settings first, and then fall back to the collection defaults.
optimize_graph (bool, optional) – If True [default], the optimizations for each collection are applied before computation. Otherwise the graph is run as is. This can be useful for debugging.
kwargs – Extra keywords to forward to the scheduler function.
Examples
>>> import dask.array as da >>> a = da.arange(10, chunks=2).sum() >>> b = da.arange(10, chunks=2).mean() >>> compute(a, b) (45, 4.5)
By default, dask objects inside python collections will also be computed:
>>> compute({'a': a, 'b': b, 'c': 1}) # doctest: +SKIP ({'a': 45, 'b': 4.5, 'c': 1},)
-
armageddon.
cpu_count
()¶ Returns the number of CPUs in the system
-
armageddon.
delayed
¶ Wraps a function or object to produce a
Delayed
.Delayed
objects act as proxies for the object they wrap, but all operations on them are done lazily by building up a dask graph internally.- Parameters
obj (object) – The function or object to wrap
name (string or hashable, optional) – The key to use in the underlying graph for the wrapped object. Defaults to hashing content. Note that this only affects the name of the object wrapped by this call to delayed, and not the output of delayed function calls - for that use
dask_key_name=
as described below.pure (bool, optional) – Indicates whether calling the resulting
Delayed
object is a pure operation. If True, arguments to the call are hashed to produce deterministic keys. If not provided, the default is to check the globaldelayed_pure
setting, and fallback toFalse
if unset.nout (int, optional) – The number of outputs returned from calling the resulting
Delayed
object. If provided, theDelayed
output of the call can be iterated intonout
objects, allowing for unpacking of results. By default iteration overDelayed
objects will error. Note, thatnout=1
expectsobj
, to return a tuple of length 1, and consequently fornout=0
,obj
should return an empty tuple.traverse (bool, optional) – By default dask traverses builtin python collections looking for dask objects passed to
delayed
. For large collections this can be expensive. Ifobj
doesn’t contain any dask objects, settraverse=False
to avoid doing this traversal.
Examples
Apply to functions to delay execution:
>>> def inc(x): ... return x + 1
>>> inc(10) 11
>>> x = delayed(inc, pure=True)(10) >>> type(x) == Delayed True >>> x.compute() 11
Can be used as a decorator:
>>> @delayed(pure=True) ... def add(a, b): ... return a + b >>> add(1, 2).compute() 3
delayed
also accepts an optional keywordpure
. If False, then subsequent calls will always produce a differentDelayed
. This is useful for non-pure functions (such astime
orrandom
).>>> from random import random >>> out1 = delayed(random, pure=False)() >>> out2 = delayed(random, pure=False)() >>> out1.key == out2.key False
If you know a function is pure (output only depends on the input, with no global state), then you can set
pure=True
. This will attempt to apply a consistent name to the output, but will fallback on the same behavior ofpure=False
if this fails.>>> @delayed(pure=True) ... def add(a, b): ... return a + b >>> out1 = add(1, 2) >>> out2 = add(1, 2) >>> out1.key == out2.key True
Instead of setting
pure
as a property of the callable, you can also set it contextually using thedelayed_pure
setting. Note that this influences the call and not the creation of the callable:>>> import dask >>> @delayed ... def mul(a, b): ... return a * b >>> with dask.config.set(delayed_pure=True): ... print(mul(1, 2).key == mul(1, 2).key) True >>> with dask.config.set(delayed_pure=False): ... print(mul(1, 2).key == mul(1, 2).key) False
The key name of the result of calling a delayed object is determined by hashing the arguments by default. To explicitly set the name, you can use the
dask_key_name
keyword when calling the function:>>> add(1, 2) # doctest: +SKIP Delayed('add-3dce7c56edd1ac2614add714086e950f') >>> add(1, 2, dask_key_name='three') Delayed('three')
Note that objects with the same key name are assumed to have the same result. If you set the names explicitly you should make sure your key names are different for different results.
>>> add(1, 2, dask_key_name='three') # doctest: +SKIP >>> add(2, 1, dask_key_name='three') # doctest: +SKIP >>> add(2, 2, dask_key_name='four') # doctest: +SKIP
delayed
can also be applied to objects to make operations on them lazy:>>> a = delayed([1, 2, 3]) >>> isinstance(a, Delayed) True >>> a.compute() [1, 2, 3]
The key name of a delayed object is hashed by default if
pure=True
or is generated randomly ifpure=False
(default). To explicitly set the name, you can use thename
keyword:>>> a = delayed([1, 2, 3], name='mylist') >>> a Delayed('mylist')
Delayed results act as a proxy to the underlying object. Many operators are supported:
>>> (a + [1, 2]).compute() [1, 2, 3, 1, 2] >>> a[1].compute() 2
Method and attribute access also works:
>>> a.count(2).compute() 1
Note that if a method doesn’t exist, no error will be thrown until runtime:
>>> res = a.not_a_real_method() >>> res.compute() # doctest: +SKIP AttributeError("'list' object has no attribute 'not_a_real_method'")
“Magic” methods (e.g. operators and attribute access) are assumed to be pure, meaning that subsequent calls must return the same results. This behavior is not overrideable through the
delayed
call, but can be modified using other ways as described below.To invoke an impure attribute or operator, you’d need to use it in a delayed function with
pure=False
:>>> class Incrementer(object): ... def __init__(self): ... self._n = 0 ... @property ... def n(self): ... self._n += 1 ... return self._n ... >>> x = delayed(Incrementer()) >>> x.n.key == x.n.key True >>> get_n = delayed(lambda x: x.n, pure=False) >>> get_n(x).key == get_n(x).key False
In contrast, methods are assumed to be impure by default, meaning that subsequent calls may return different results. To assume purity, set pure=True. This allows sharing of any intermediate values.
>>> a.count(2, pure=True).key == a.count(2, pure=True).key True
As with function calls, method calls also respect the global
delayed_pure
setting and support thedask_key_name
keyword:>>> a.count(2, dask_key_name="count_2") Delayed('count_2') >>> with dask.config.set(delayed_pure=True): ... print(a.count(2).key == a.count(2).key) True
-
armageddon.
fit_out
(earth, radius, strength)¶ calculate altitude and energy applying solver
- Parameters
radius (float) – ateroid radius
strength (float) – ateroid strength
- Returns
com_z (array) – the altitude sliced to range after brea-up
com_ek (array) – energy per heiight sliced to range after brea-up
-
armageddon.
mars
(z)¶ Atmosphere density calculation on Mars.
- Parameters
z (float) – The altitude.
- Returns
Result – The atmosphere density at input altitude on Mars.
- Return type
float
-
armageddon.
solve_ensemble
(planet, fiducial_impact={'angle': 45, 'density': 3000.0, 'radius': 10, 'strength': 100000.0, 'velocity': 21000.0}, variables=['radius', 'angle', 'strength', 'velocity', 'density'], radians=False, rmin=8, rmax=12, visual=False, sample_num=10)¶ Run asteroid simulation for a distribution of initial conditions and find the burst distribution
- Parameters
planet (object) – The Planet class instance on which to perform the ensemble calculation
fiducial_impact (dict) – Dictionary of the fiducial values of radius, angle, strength, velocity and density
variables (list) – List of strings of all impact parameters to be varied in the ensemble calculation
rmin (float, optional) – Minimum radius, in m, to use in the ensemble calculation, if radius is one of the parameters to be varied.
rmax (float, optional) – Maximum radius, in m, to use in the ensemble calculation, if radius is one of the parameters to be varied.
- Returns
ensemble – DataFrame with columns of any parameters that are varied and the airburst altitude
- Return type
DataFrame


When an electrical outage occurs.
- Remain calm.
- Stay at your work station.
- If you are in a dark area, slowly make your way to a place that is well-lit until the
situation returns to normal.
- Find people who may be in spaces without windows: washrooms, storages areas, etc.
- Make sure that the outage does not affect your area.
- Ask the person in charge of your group to contact Security at extension 55 (internal phone
system).
- Stop any dangerous activity (for example, handling chemical products).
- Put away dangerous products.
- Turn off all sources of heat and burners.
- Listen to instructions announced over the loudspeakers.
There may be a delay between the beginning of the outage and emergency systems being
activated.
General outage
- Wait for instructions from Security.
- Following an evacuation order, take the stairs. Elevators should only be used for
emergencies and for people with reduced mobility.
- When an evacuation occurs following an electricity outage, people leave school for the rest
of the day. They should not go to the meeting point.
- If the outage is of a longer duration, you can obtain information on the ÉTS Web site or by
listening to its greeting message at<PHONE_NUMBER>.
End of the outage
- Wait for instructions before entering the building.


Other Protocols
The following protocols are available globally.
-
Abstracts over different concurrency abstractions.
Some environments have different concurrency abstractions, such as fundamental locks, threads and condition variables. This protocol allows writing code that is generic across the different concurrency environments.
These abstractions are designed to be relatively minimialistic in order to be easy to port to a variety of environments. Key environments include: macOS, Linux, Android, Windows, and Google’s internal enviornment.
See moreDeclaration
Swift
public protocol ConcurrencyPlatform
-
Represents a thread of execution.
See moreDeclaration
Swift
public protocol ThreadProtocol
-
Mutual exclusion locks.
See moreDeclaration
Swift
public protocol MutexProtocol
-
Allows for waiting until a given condition is satisifed.
See moreDeclaration
Swift
public protocol ConditionMutexProtocol : MutexProtocol
-
A condition variable.
Only perform operations on
See moreself
when holding the mutex associated withself
.Declaration
Swift
public protocol ConditionVariableProtocol
-
Abstracts over thread local storage.
See moreDeclaration
Swift
public protocol RawThreadLocalStorage
-
Allows efficient use of multi-core CPUs by managing a fixed-size collection of threads.
From first-principles, a (CPU) compute-bound application will run at peak performance when overheads are minimized. Once enough parallelism is exposed to leverage all cores, one of the key overheads to minimize is context switching, and thead creation / destruction. The optimal system configuration is thus a fixed-size threadpool where there is exactly one thread per CPU core (or rather, hyperthread). This configuration results in zero context switching, no additional kernel calls for thread creation & deletion, and full utilization of the hardware.
Unfortunately, in practice, it is infeasible to statically schedule work apriori onto a fixed pool of threads. Even when applying the same operation to a homogenous dataset, there will inevitably be variability in execution time. (This can arise from I/O interrupts taking over a core [briefly], or page faults, or even different latencies for memory access across NUMA domains.) As a result, it is important for peak performance to build abstractions that are flexible and dynamic in their work allocation.
The
ComputeThreadPool
protocol is a foundational API designed to enable efficient use of hardware resources. There are two APIs exposed to support two kinds of parallelism. For additional details, please see the documentation associated with each.Note: be sure to avoid executing code on the
ComputeThreadPool
that is not compute-bound. If you are doing I/O, be sure to use a dedicated threadpool, or use Swift NIO for high performance non-blocking I/O.Note: while there should be only one “physical” threadpool process-wide, there can be many virtual threadpools that compose on top of this one to allow configuration and tuning. (This is why
ComputeThreadPool
is a protocol and not static methods.) Examples of additional threadpool abstractions could include a separate threadpool per-NUMA domain, to support different priorities for tasks, or higher-level parallelism primitives such as “wait-groups”.See moreSee also
ComputeThreadPools
Declaration
Swift
public protocol ComputeThreadPool


ba_interp3 is a fast interpolation routine for 3D volumes. It can be used as a drop in replacement for matlabs interp3 function. It supports nearest neighbour, tri-linear, and tri-cubic interpolation.
Restrictions: The only restriction is, that the data has to be on a regularly spaced grid (i.e. coming from meshgrid.
Enhancements: The first advantage of ba_interp3 is that it is a lot faster:
Additionally, it can interpolate layered data. If you interpolate a
matrix of size MxNxO x L1xL2x...xLk then each
of the L1*L2*...*Lk layers is interpolated
simultaneously. Think of this as in RGB images, where there would be a
single additional dimension of size three.
An volume of 3x3 Matrices (i.e. the volume derivative) would have two
additional dimensions of size three.


//Accela Automation //File: jsMessageResoruce.js //Accela, Inc. //Copyright (C): 2008-2014 // //Description: This javascript is about support I18N. var jsMessageResoruce = { asitabledrilldown_series_delete_error_label : "delete series error ", asitabledrilldown_series_select_parentcolumn_label : "Please select a Parent Column. ", asitabledrilldown_series_select_parentdropdown_label : "Please select a Parent Drop Down.", asitabledrilldown_series_select_childcolumn_label : "Please select a Child Column.", asitabledrilldown_series_select_childdropdown_label : "Please select a Child Drop Down.", error_js_newAPOSelection_noAddrAvailable : "No address information available for this parcel.", error_js_newAPOSelection_noAddrOwnerAvailable : "No address and owner information available for this parcel.", error_js_newAPOSelection_noOwnerAvailableForAddr : "No owner information available for this address.", error_js_newAPOSelection_noOwnerAvailableForParcel : "No owner information available for this parcel.", error_js_newAPOSelection_noParcelAvailable : "No parcel information available for this address.", error_js_newAPOSelection_noParcelOwnerAvailable : "No parcel and owner information available for this address.", error_js_newAPOSelection_searchAddr : "Please wait while we search for the address.", error_js_newAPOSelection_searchAddrOwner : "Please wait while we search for the address and owner.", error_js_newAPOSelection_searchOwner : "Please wait while we search for the owner.", error_js_newAPOSelection_searchParcel : "Please wait while we search for the parcel.", error_js_newAPOSelection_searchParcelOwner : "Please wait while we search for the parcel and owner.", common_select_label : "--Select--", expression_message_isRequired_lable : "is required", expression_message_Required_lable : "Required", expression_message_Length_lable : "The Length of this field can not exceed to", expression_message_FailedToValidate_lable : "Failed to validate.", expression_message_ShouldInput_lable : "You should input at least one Calculation!", expression_message_ValidationPassed_lable : "Validation passed.", expression_message_OnlyBeTarget_lable : "Calculation Field should only be target portlet field", expression_message_onlybetemplate_lable : "Calculation Field should only be Template Table Field.", expression_message_ReferencePortletValue_lable : "Reference Portlet Value Should only use fields as below:\nCAP\nASI\nSession\nTarget Portlet\nConstant.", expression_message_NotSupported_lable : "Pay Fields is not supported to this fields in current release.", expression_message_Validatefailed_label : "Validation failed. Please see error message(s) below.", expression_refExpression_error_calculationDel : "Please select at least one calculation to delete.", expression_refExpression_error_CAPTypeAndTargetNotEmpty : "Cap type and target portlet should not be empty.", expression_refExpression_error_CAPTypeNotEmpty : "Cap type should not be empty.", expression_refExpression_error_changeAppSpec : "Are you sure you want to change Custom Lists Subgroup and clear the content of expression?", expression_refExpression_error_changeCAPType : "Are you sure you want to change CAP Type and clear the content of expression?", expression_refExpression_error_changeNoFieldFocus : "No field get the focus. To use tree nodes, you have to have a field getting focus by clicking it.", expression_refExpression_error_changeTargetPortlet : "Are you sure you want to change Target Portlet and clear the content of expression?", expression_refExpression_error_clearLookupForm : "This operation will clear the lookup form, are you sure you want to proceed?", expression_refExpression_error_criteriaDel : "Please select at least one criteria to delete.", expression_refExpression_error_failedValidate : "Failed to validate.", expression_refExpression_error_functionUsedExpression : "The lookup function can only be used in Calculation Expression, please select a Calculation Expression field first by clicking it.", expression_refExpression_error_inputCalculation : "You should input at least one Calculation!", expression_refExpression_error_inputCriteria : "You should input at least one Criteria.", expression_refExpression_error_lookupCriteriaDel : "Please select at least one lookup criteria to delete.", expression_refExpression_error_nameVariable : "Expression Field Name should only be Custom Lists Variable.", expression_refExpression_error_openLookupExpression : "Open the lookup expression defining window to view the errors.", expression_refExpression_error_operatorCalculate : "Operator can only be used in Calculate Expression or Criteria Value or Lookup Criteria Value.", expression_refExpression_error_replaceCalculate : "This operation replaces the existing Calculated Expression with the Lookup criteria. Do you want to proceed?", expression_refExpression_error_sessionVariables : "Session Variables cannot be used in Expression Field Name.", expression_refExpression_error_standardChoices : "Standard Choices can only be used in Calculate Expression or Criteria Value or Lookup Criteria Value.", expression_refExpression_error_subgroupNotEmpty : "Custom Lists Subgroup should not be empty.", expression_refExpression_error_targetNotEmpty : "Target portlet should not be empty.", expression_refExpression_error_validationPass : "Validation passed.", common_required_label : "Required", error_js_menuTree_addFail : "Failed to add.", error_js_menuTree_copyFail : "Failed to copy.", error_js_menuTree_cutFail : "Failed to cut.", error_js_menuTree_delConfirm : "Are you sure you want to delete?", error_js_menuTree_delFail : "Failed to delete.", error_js_menuTree_delHasChildren : "Please delete subitems first.", error_js_menuTree_menuItemMaxNumber : "Maximum of sixteen menu items are allowed per menu.", error_js_menuTree_menuMaxNumber : "Maximum of sixteen menus are allowed per menu template.", error_js_menuTree_nameFormmat : "The name of menu template, menu or menu item is not in the correct format.", error_js_menuTree_nameLength : "The name length of menu template, menu or menu item should be less than 50.", error_js_menuTree_nameRequired : "The name of menu template, menu or menu item is required.", error_js_menuTree_noCutSameParent : "Please cut node under a different parent node.", error_js_menuTree_noMoveItem : "The Menu Item should be moved to Menu node.", error_js_menuTree_noMoveMenu : "The Menu should be moved to Template node.", error_js_menuTree_noMoveTemplate : "The Template should be moved to Agency, Module or User Group node.", error_js_menuTree_noNodeSelected : "No node selected", error_js_menuTree_noOtherPortlet : "Please operate in the same portlet.", error_js_menuTree_noSourceSelected : "No source node selected", error_js_menuTree_noTargetSelected : "No target node selected", error_js_menuTree_templateExisted : "A menu template already exist here. Only one menu template is allowed per Agency, Module and Group.", error_js_menuTree_updateFail : "Failed to update.", error_js_stdcondition_conditionRemove : "Conditions must be removed from the Condition Type before it can be deleted.", error_js_stdcondition_copyFail : "Copying failed.", error_js_stdcondition_creat : "Creating ......", error_js_stdcondition_createConditionSuccess : "Create condition type successfully.", error_js_stdcondition_delConfirm : "Are you sure you want to delete?", error_js_stdcondition_disableConfirm : "Are you sure you want to disable the condition?", error_js_stdcondition_disableSuccess : "Condition is disabled successfully.", error_js_stdcondition_fail : "failed.", error_js_stdcondition_inputCondition : "Please input condition type.", error_js_stdcondition_inputConditionName : "Please input the condition type name.", error_js_stdcondition_inputConditionName2 : "Please input the condition name.", error_js_stdcondition_noSourceSelected : "No source condition selected", error_js_stdcondition_RPCError : "RPC error. Please contact system administrator.", standardcondition_stdNavigationTree_assignTypes_label : "Select Condition Types", standardcondition_stdNavigationTree_originalgroup_label : "Original Group", standardcondition_stdNavigationTree_newgroup_label : "New Group", standardcondition_stdNavigationTree_selectgroup_label : "Please select a New Group.", standardcondition_stdNavigationTree_inputgroup_label : "Please input the condition group name.", htmlarea_editor_aboutEditor_label : "About this editor", htmlarea_editor_bgColor_label : "Background Color", htmlarea_editor_bold_label : "Bold", htmlarea_editor_bulletlist_label : "Bulleted List", htmlarea_editor_center_label : "Justify Center", htmlarea_editor_decreaseIndent_label : "Decrease Indent", htmlarea_editor_enlargeEditor_label : "Enlarge Editor", htmlarea_editor_fontColor_label : "Font Color", htmlarea_editor_horizontalRule_label : "Horizontal Rule", htmlarea_editor_increaseIndent_label : "Increase Indent", htmlarea_editor_insertImage_label : "Insert Image", htmlarea_editor_insertTable_label : "Insert Table", htmlarea_editor_insertWebLink_label : "Insert Web Link", htmlarea_editor_italic_label : "Italic", htmlarea_editor_left_label : "Justify Left", htmlarea_editor_orderlist_label : "Ordered List", htmlarea_editor_right_label : "Justify Right", htmlarea_editor_strikethrough_label : "Strikethrough", htmlarea_editor_subscript_label : "Subscript", htmlarea_editor_superscript_label : "Superscript", htmlarea_editor_underline_label : "Underline", htmlarea_editor_viewHtml_label : "View HTML Source", error_js_editor_customButton : "Hello, I am custom button 1!", error_js_editor_editor : "about this editor", error_js_editor_errorAttach : "Error attaching event to form!", error_js_editor_htmlAreaError : "htmlArea error: 'linebreak' must be in a subgroup by itself, not with other buttons.\n\nhtmlArea wysiwyg editor not created.", error_js_editor_htmlAreaErrorButton : "htmlArea error: button {0} not found in button list when creating the wysiwyg editor for {1}.\nPlease make sure you entered the button name correctly.\n\nhtmlArea wysiwyg editor not created.", error_js_editor_unableInsertHTML : "Unable to insert HTML.Invalid object name {0}.", error_js_editor_unableInsertHTML2 : "Unable to insert HTML. Try highlighting content instead of selecting it.", error_js_editor_unableInsertHTMLUnknown : "Unable to insert HTML. Unknown object tag type {0}.", error_js_editor_unableInsertSelect : "Unable to insert HTML. You must select something first.", error_js_editor_unableInsertSelection : "Unable to insert HTML for current selection.", error_js_editor_unknownAction : "editor_cMenu, unknown action: {0}", error_js_ac360_commentMaxlength : "you can only enter comment of up to {0} characters!", error_js_ac360_selectInspection : "Please select an inspection type.", error_js_ac360_selectRowDel : "Please select at lease one row to delete.", error_js_ajaxAnyWhere_contentType : "AjaxAnywhere error : content-type in not text/xml : [{0}]", error_js_ajaxAnyWhere_disableBlocker : "Please, disable your pop-up blocker for this site first.", error_js_ajaxAnyWhere_formNotFound : "AjaxAnywhere error: Form with name [{0}] not found", error_js_cashier_cashDrawerError : "Cash drawer error. Check to make sure that the cash drawer power is on, that the cables are securely connected, and that the cash drawer is closed. If this does not solve the problem contact your system administrator for help.", error_js_cashier_cashierSessionClosed : "The current cashier session of #{0} has been closed by another user. Please start a new session.", error_js_cashier_cashierSessionNotStart : "The cashier session has not been started. Please start a session.", error_js_cashier_installActiveX : "Please install ActiveX", error_js_cashier_openCashDrawerFail : "Open cash drawer failed.", error_js_fle_elementOverlap : "Elements overlap each other.", error_js_fle_elementOutOfPanel : "Elements must be on the layout panel.", error_js_fle_elementRequired : "Some elements are required.", error_js_fle_selectElement : "Please select an element.", error_js_fle_thisElementRequired : "This element is required.", genericview_fle_dynamic_label : "This is a dynamic label.", genericview_genericviewform_expand_label : "Expand", error_js_lookupTable_capDel : "Current CAP Type has been deleted or is not associated with any Application Specific Information.", error_js_lookupTable_capNotAssociated : "The CAP Type selected is not associated with any Application Specific Information.", error_js_lookupTable_capRequired : "CAP type is required.", error_js_lookupTable_columnName : "Column Name: {0} is duplicated, please select another one.", error_js_lookupTable_defineTableColumn : "Please define the table column firstly.", error_js_lookupTable_enterOneColumn : "Please enter at least one Column Name to submit.", error_js_lookupTable_lookupTableName : "Lookup Table Name is required.", error_js_lookupTable_lookupTableNameDuplicate : "Lookup Table Name is duplicated, please enter anther one.", error_js_lookupTable_reserveOneDel : "Please reserve at lease one row to delete.", error_js_lookupTable_selectCAP : "Please select a CAP Type.", error_js_lookupTable_selectOneDel : "Please select at lease one row to delete.", error_js_masked_AV360MaskAttach : "The AV360Mask object has already been attached by another element.", error_js_opos_closeCover : "Please close the cover!", error_js_opos_confirm : "\nClick OK to continue. Click Cancel to stop.", error_js_opos_insertEndorsement : "Please insert endorsement!", error_js_opos_printerError : "Printer error, please check it!\nClick OK to continue. Click Cancel to stop.", error_js_opos_printerError2 : "Printer error, please check it!", error_js_opos_redefineEndorsement : "The endorsement ran out of space. Please redefine endorsement layout.", error_js_opos_removeEndorsement : "Please remove endorsement!", error_js_opos_removeSplit : "Please Remove slip!", error_js_timepicker_comboBoxRetrieve : "The ComboBox tried to retrieve information from the server, but an error occured. Please try again later.", error_js_timepicker_endRecord : "End of records.", error_js_timepicker_error : "Error. The values must be valid XML attributes.", error_js_timepicker_missLink : "You are missing a link to the Web ComboBoxes' style sheet.", error_js_timepicker_noNewRecord : "No new records.", error_js_timepicker_record : "records.", error_js_timepicker_textboxNotExist : "You have bound the textbox to a column that does not exist.\nThe textboxDataFieldIndex is {0}.\nThe number of values in the selected row is {1}.", error_js_timepicker_wait : "Please Wait...", error_js_watermark_AV360WatermarkAttach : "The AV360Watermark object has already been attached by another element.", error_js_wzDragdrop_alignCommandError : "alignCommand not get Error!", error_js_wzDragdrop_pressCtrl : "Please Press Ctrl key to Select Many Objects", error_js_flash_contentRequireRecent : "This content requires a more recent version of the Macromedia Flash Player.", error_js_flash_errorDownload : "There was an error downloading the Flash Player update. Please try again later, or visit macromedia.com to download the latest version of the Flash plugin.", error_js_dateformat_label : "Date format: mm/dd/yyyy. Date will be replaced with ", error_js_dateformat_yearformat_label : "Date format: mm/dd/yyyy. Year will be replaced with ", lefttree_categoryNameRequired_label : "Category name required.", lefttree_invalidate_label : "The category name must not include \'<\', \'>\', or single quotation mark.", lefttree_validateLength_label : "The category name should be less than 32.", lefttree_reportNameRequired_label : "The report name is required.", lefttree_reportNameLength_label : "The report name should be no more than 32 characters in length.", lefttree_reportNameValidate_label : "The first character of the report name must be letter or number.", lefttree_addSuccess_label : "Added successfully.", lefttree_addFail_label : "Failed to add.", lefttree_updateSuccess_label : "Updated successfully.", lefttree_updateFail_label : "Failed to updated.", lefttree_deleteSuccess_label : "Deleted successfully.", lefttree_deleteFail_label : "Failed to deleted.", lefttree_copySuccess_label : "Copied successfully.", lefttree_copyFail_label : "Failed to copy.", lefttree_moveSuccess_label : "Moved successfully.", lefttree_moveFail_label : "Failed to move.", lefttree_reportPlace_label : "Reports must be placed on category heading.", lefttree_deleteConfirm_label : "Are you sure you want to delete?", lefttree_noNodeSelect_label : "No node selected", error_js_lefttree_cancel : "Cancel", error_js_lefttree_delError : "Delete error!", error_js_lefttree_save : "Save", error_js_stdcondition_renamedgroup_refenced : "Condition Types under Condition Group {0} must be re-assigned or removed from the Group before it can be renamed.", error_js_stdcondition_deletegroup_refenced : "Condition Types under Condition Group {0} must be re-assigned or removed from the Group before it can be deleted.", sequence_js_changeStatues_label : "Are you sure that you want to change its status to be 'Inactive' ?", error_notAllowedSpecialCharacter_label : "special character are not allowed.", error_duplicateName_label : "Duplicate name", errors_ams_asset_sumofpercentage_fail : "The allocation must total 100%.", errors_ams_asset_sumofcost_fail : "Total cost must equal the amount allocated for distribution.", ams_asset_distribute_closeinfo_label : "Closing the browser will result in a loss of data, continue?", ams_asset_distribute_inputteddata_error : "Invalid entry. Value must be a number.", ams_workorder_asset_confirmSave_label : "Your changes have not been saved. Click 'OK' to save changes and continue, or click 'Cancel' to continue without saving.", error_js_pageHeader_sort : "sort descending", error_js_pageHeader_sortAscending : "sort ascending", error_js_exceeds_max_length : "Your copied text exceeds the max length defined on admin side.", section508_iframenonsupportmessage_label : "
If you can see this text, your browser does not support iframes. View the content of this inline frame within your browser.", section508_common_onchange_message_label : "Some values are populated successfully.", common_error_prompt : "One or more error(s) occurred on the page. ", common_actions : "Actions", common_actions_edit : "Edit", common_actions_Remove : "Remove", common_actions_GoTo_InspectionType : "Go To Inspection Type" , related_list_addanotherinspection_label : "Add Another Inspection Type", document_chenge_label : "Change", document_acapermission_noaccess_label : "No Access", common_errors_not_less_than_one : "Please select at least one record.", error_payment_trustaccount_required : "Please select a trust account.", document_acapermission_followdoctypesecurity_label : "Follow Document Type Security", reviewer_exist_for_task : "The current file is already assigned to the selected user to review.", reviewer_exist_for_task_department : "The current file is already assigned to the selected department to review.", expression_message_tasknameerror_lable : "Task name cannot be used as calculation filed.", exam_daily_confirmscheduleexamfromready_label : "Are you sure you want to schedule the examination?", exam_daily_resetscheduleexamfromready_label : "Are you sure you want to reset the examination?" };


Password must be at least 8 characters long and contain 1 uppercase, 1 number and a special symbol !@#$%^&*_=+-
Already have an account? Log in


Customer name is required.
company name is required.
email is required.
phone is required.
Customer address is required.


--- layout: post title: WebDrawer (and Web Client) auto filter search categories: [] tags: webdrawer serviceapi web-client status: publish type: post published: true meta: {} ---
While all users may configure default filters and have ACLs restricting access to certain records it can be desirable to configure an instance of WebDrawer to only return a subset of Records. Maybe this is the planning portal and you only want it to return planning permission related Records?
The hptrim.config file contains a section called routeDefaults, there are two of these elements you will need to modify. The first has the model 'Records', add a filter attribute as seen below. This example filters out all .doc files.
<add name="Record" model="Records" template="WDRecordList" filter="not extension:doc" properties="RecordRecordType,RecordExtension,RecordTitle,RecordNumber,RecordIsElectronic" />
If you are using custom search forms you will also need to filter the FormSearch route.
<add name="FormSearch" model="FormSearch" filter="not extension:doc" properties="RecordRecordType,RecordExtension,RecordTitle,RecordNumber,RecordIsElectronic" />
The Web Client may be similarly filtered, edit hptrimServiceAPI.config and edit the Records route, as seen here:
<add name="Record" model="Records" filter="not extension:doc" sortBy="recRegisteredOn- unkUri" includePropertyDefs="true" />
A slightly more elegant twist on the above approach is to not use the actual search string but to use a saved search. The example below filters using the Saved Search named 'NotDocuments'.
<add name="Record" model="Records" template="WDRecordList" filter="saved:NotDocuments" properties="RecordRecordType,RecordExtension,RecordTitle,RecordNumber,RecordIsElectronic" />
It is best to not copy the XML snippets directly to your config file as the other attributes may be different in your version. Just add the filter attribute.


Download and display a syndication feed from a specific address.
Feed Address:
Get Feed
Previous Item
0 of 0
Next Item
Feed Title:
Item Title:
Link:
Item Extensions (Node Name, Node Namespace, Node Value):


{{/* Copyright © 2019 CDAP 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. */}} {{ define "main" }} {{ $data := index .Site.Data .Site.Language.Lang }} ᛫ {{ .Site.Params.description | safeHTML }} {{ .Site.Params.about | safeHTML }} {{ partial "components/homepage/cdap.html" }} {{ with $tabs := $data.homepage.hero_tabs }} {{ partial "components/homepage/hero-tabs" . }} {{ end }} {{ with $data.news.items }} {{ partial "components/announcement.html" . }} {{ end }} {{ with $why := $data.homepage.why }} {{ range $why }} {{ partial "components/why" . }} {{ end }} {{ end }} {{ with $features := $data.homepage.features_home }} {{ range $features }} {{ partial "components/homepage/features" .}} {{ end }} {{ end }} {{ partial "components/homepage/get-started-button" . }} {{ with $accelerators := $data.homepage.accelerators_home }} {{ range $accelerators }} {{ partial "components/homepage/accelerators" . }} {{ end }} {{ end }} {{ partial "components/homepage/get-started-button" . }} {{ with $companies := $data.homepage.companies }} {{ partial "components/homepage/companies" . }} {{ end }} {{ end }}
{{ .Site.Params.about | safeHTML }}


-
local_diningAboutItalian Cuisine, $$$
-
placeContact Us432 Powell St San Francisco, CA 94102
(415) 395-8555 -
whatshotReviewsMost Recent ReviewJosh, 3/3/2017
The fog of time probably distorts my memory of Scala's somewhat but the standard of quality is down quite a bit and it's evident in the service, menu, and food. It's unfortunate but it is what it is - just another okay restaurant serving passable food to tourists. It was once so much better. (Full review...)


There are a few easy things that you can reduce to help get a better night of sleep.
Avoid bringing gadgets, such as mobile phones, into your bedroom because they emit blue light which suppresses the secretion of melatonin. Melatonin being a hormone that regulates sleep/wake cycles – with it increasing in the evening to induce sleep. Learn how to enable night mode on most of your gadgets.
Try not to have caffeine in the late afternoon as its effects can remain for upto 8 hours. If you enjoy having something warm to drink before bed try a herbal tea as they contain little to no caffeine. However some teas do contain caffeine, so be mindful of them.
Avoid large meals and beverages right before bed to ensure you don't wake up with digestive discomfort or the need to urinate.
While naps are great, try not to take one after 3pm because it can make it harder to fall asleep at night.
It’s important to have time before bed to unwind. Try to schedule your days so that there is time to relax before bed.
Help relax your body by having a warm shower or bath. The drop in body temperature after a shower or bath may help you to feel sleepy, and can help you to unwind and relax before bed.
Try reading a book before you head to bed.
Practicing mindfulness or meditation before bed will help reduce any busy thoughts that may be clouding your mind at the end of the day. Aswell as relaxing your body through conscious control of your breathing. Some great meditation resources are Headspace and Waking Up.
Now it is time for bed, following the previous tips should give you a great headstart on a good night of sleep.
If you find yourself still tossing and turning the best thing to do is to get up and get out of bed into a quiet room where you can read next to a dim light. This will help train your mind that your bed is only a place for sleeping, and not a place to remain awake. It is important to not use any technology or eat anything at this point, because this will just make it harder for you to get to sleep.


Dear {{ pledge.gift_recipient_name }},
{{ pledge.first_name }} has made a donation of ${{ donation.amount }} on your behalf to Effective Altruism
Australia, which will be granted in full to {{ pledge.partner_charity_str }}. |
{% endblock content %}
{% block extracontent %}
{% if pledge.gift_personal_message %}
Message from {{ pledge.first_name }} |
{{ pledge.gift_personal_message|linebreaksbr }} |
|
|
|
{% endif %}
{% for component in components %}
{{ component.pledge_component.partner_charity.name }}
|
{{ component.pledge_component.partner_charity.bio }}
Impact of your {{ component.amount_str }}
donation
{{ component.impact_str }}
Learn
more
|
|
|
|
|
|
{% endfor %}
About Effective Altruism Australia
|
Effective Altruism Australia partners with charities evaluated to be
implementing the most transparent, cost-effective, and
evidence-based programs for saving and improving lives. Your
donation will go directly to support their programs, thereby helping
to end poverty as soon as possible.
|
|
|
|
|
|
{% endblock extracontent %}
{% block footer %}
You received this email because the donor opted to send you an email as part of their donation. You have not been
signed up to any mailing lists because of this.
{% endblock footer %}


My Region
Get details about office hours, events, and important updates.
My Classrooms
Manage your rosters, lesson plans, and receive guidance from your peers and MTLDs.
Resource Library
Search our curated database of teaching resources.


Fortune Cookie Generator
How many people just ate?
1
2
3
4
5
6
Your Fortune
Click the button to generate a saying.
Generate Fortune
Previous Fortunes


|
| | cCamera (cWorld *a_parentWorld) |
| | Constructor of cCamera. More...
|
| |
| virtual | ~cCamera () |
| | Destructor of cCamera. More...
|
| |
| cWorld * | getParentWorld () |
| | This method returns a pointer to the parent world. More...
|
| |
| virtual bool | selectWorld (const int a_windowPosX, const int a_windowPosY, const int a_windowWidth, const int a_windowHeight, cCollisionRecorder &a_collisionRecorder, cCollisionSettings &a_collisionSettings) |
| | This method queries whether the specified position is 'pointing at' any objects in the world. More...
|
| |
| virtual bool | selectFrontLayer (const int a_windowPosX, const int a_windowPosY, const int a_windowWidth, const int a_windowHeight, cCollisionRecorder &a_collisionRecorder, cCollisionSettings &a_collisionSettings) |
| | This method queries whether the specified position is 'pointing at' any widget on the front layer. More...
|
| |
| virtual bool | selectBackLayer (const int a_windowPosX, const int a_windowPosY, const int a_windowWidth, const int a_windowHeight, cCollisionRecorder &a_collisionRecorder, cCollisionSettings &a_collisionSettings) |
| | This method queries whether the specified position is 'pointing at' any widget on the back layer. More...
|
| |
| virtual bool | selectLayers (const int a_windowPosX, const int a_windowPosY, const int a_windowWidth, const int a_windowHeight, cCollisionRecorder &a_collisionRecorder, cCollisionSettings &a_collisionSettings, bool a_checkFrontLayer=true, bool a_checkBackLayer=true) |
| | This method queries whether the specified position is 'pointing at' any widget on selected layers. More...
|
| |
| virtual bool | set (const cVector3d &a_localPosition, const cVector3d &a_localLookAt, const cVector3d &a_localUp) |
| | This method set the position and orientation of the camera. More...
|
| |
| cVector3d | getLookVector () const |
| | This method returns the camera "look at" position vector for this camera. More...
|
| |
| cVector3d | getUpVector () const |
| | This method returns the "up" vector for this camera. More...
|
| |
| cVector3d | getRightVector () const |
| | This method returns the "right direction" vector for this camera. More...
|
| |
| void | setSphericalRad (const double &a_radius, const double &a_polarRad, const double &a_azimuthRad) |
| | This method sets the position and orientation of the camera in spherical coordinates in radians. More...
|
| |
| void | setSphericalDeg (const double &a_radius, const double &a_polarDeg, const double &a_azimuthDeg) |
| | This method sets the position and orientation of the camera in spherical coordinates in degrees. More...
|
| |
| void | setSphericalReferences (const cVector3d &a_originReference, const cVector3d &a_zenithReference, const cVector3d &a_azimuthReference) |
| | This method sets the reference vectors that define the basis of the spherical coordinate system. More...
|
| |
| void | setSphericalRadius (const double &a_radius) |
| | This method sets the radius position of the camera (spherical coordinates). More...
|
| |
| double | getSphericalRadius () |
| | This method returns the radius position of the camera (spherical coordinates). More...
|
| |
| void | setSphericalPolarRad (const double &a_polarRad) |
| | This method sets the polar position of the camera in radians (spherical coordinates). More...
|
| |
| double | getSphericalPolarRad () |
| | This method returns the polar position of the camera in radians (spherical coordinates). More...
|
| |
| void | setSphericalPolarDeg (const double &a_polarDeg) |
| | This method sets the polar position of the camera in degrees (spherical coordinates). More...
|
| |
| double | getSphericalPolarDeg () |
| | This method returns the polar position of the camera in degrees (spherical coordinates). More...
|
| |
| void | setSphericalAzimuthRad (const double &a_azimuthRad) |
| | This method sets the azimuth position of the camera in radians (spherical coordinates). More...
|
| |
| double | getSphericalAzimuthRad () |
| | This method returns the azimuth position of the camera in radians (spherical coordinates). More...
|
| |
| void | setSphericalAzimuthDeg (const double &a_azimuthDeg) |
| | This method sets the azimuth position of the camera in degrees (spherical coordinates). More...
|
| |
| double | getSphericalAzimuthDeg () |
| | This method returns the azimuth position of the camera in degrees (spherical coordinates). More...
|
| |
| void | setSphericalZenithReference (const cVector3d &a_zenithReference) |
| | This method sets the zenith reference direction vector of the camera (spherical coordinates). More...
|
| |
| cVector3d | getSphericalZenithReference () |
| | This method returns the zenith reference direction vector of the camera (spherical coordinates). More...
|
| |
| void | setSphericalAzimuthReference (const cVector3d &a_azimuthReference) |
| | This method sets the azimuth reference direction vector of the camera (spherical coordinates). More...
|
| |
| cVector3d | getSphericalAzimuthReference () |
| | This method returns the azimuth reference direction vector of the camera (spherical coordinates). More...
|
| |
| void | setSphericalOriginReference (const cVector3d &a_originReference) |
| | This method sets the origin target point of the camera (spherical coordinates). More...
|
| |
| cVector3d | getSphericalOriginReference () |
| | This method returns the origin target point of the camera (spherical coordinates). More...
|
| |
| void | setClippingPlanes (const double a_distanceNear, const double a_distanceFar) |
| | This method sets the near and far clipping plane distances. More...
|
| |
| double | getNearClippingPlane () |
| | This method returns the near clipping plane distance. More...
|
| |
| double | getFarClippingPlane () |
| | This method returns the far clipping plane distance. More...
|
| |
| void | adjustClippingPlanes () |
| | This method automatically adjust back and front clipping planes. More...
|
| |
| void | setOrthographicView (double a_viewWidth) |
| | This method sets the camera in orthographic mode. More...
|
| |
| void | setFieldViewAngleDeg (double a_fieldViewAngleDeg) |
| | This method sets the field of view angle (in degrees). More...
|
| |
| double | getFieldViewAngleDeg () |
| | This method returns the field of view angle (in degrees). More...
|
| |
| void | setFieldViewAngleRad (double a_fieldViewAngleRad) |
| | This method set the field of view angle (in radians). More...
|
| |
| double | getFieldViewAngleRad () |
| | This method returns the field of view angle (in radians). More...
|
| |
| double | getAspectRatio () |
| | This method returns the aspect ratio. More...
|
| |
| void | setStereoFocalLength (double a_stereoFocalLength) |
| | This method sets the stereo focal length. More...
|
| |
| double | getStereoFocalLength () |
| | This method returns the stereo focal length. More...
|
| |
| void | setStereoEyeSeparation (double a_stereoEyeSeparation) |
| | This method sets the stereo eye separation. More...
|
| |
| double | getStereoEyeSeparation () |
| | This method returns the stereo eye separation. More...
|
| |
| virtual void | renderView (const int a_windowWidth, const int a_windowHeight, const cEyeMode a_eyeMode=C_STEREO_LEFT_EYE, const bool a_defaultBuffer=true) |
| | This method renders the the camera view in OpenGL. More...
|
| |
| void | copyImageBuffer (cImagePtr a_image) |
| | This method copies the output image data to an image structure. More...
|
| |
| virtual void | setUseMultipassTransparency (bool a_enabled) |
| | This method enables or disables additional rendering passes for transparency. More...
|
| |
| bool | getUseMultipassTransparency () |
| | This method returns true if multipass rendering is enabled, false otherwise. More...
|
| |
| int | getDisplayWidth () |
| | This method returns the width of the current window display in pixels. More...
|
| |
| int | getDisplayHeight () |
| | This method returns the height of the current window display in pixels. More...
|
| |
| void | updateGPU () |
| | This method resets textures and display lists for the world associated with this camera. More...
|
| |
| virtual void | setStereoMode (cStereoMode a_stereoMode) |
| | This method sets the desired stereo mode. More...
|
| |
| cStereoMode | getStereoMode () |
| | This method returns the current stereo mode being used. More...
|
| |
| void | setMirrorHorizontal (bool a_enabled) |
| | This method enables or disables output image mirroring horizontally. More...
|
| |
| void | setMirrorVertical (bool a_enabled) |
| | This method enables or disables output image mirroring vertically. More...
|
| |
| bool | getMirrorHorizontal () |
| | This method returns true then output image is mirrored horizontally, false otherwise. More...
|
| |
| bool | getMirrorVertical () |
| | This method returns true then output image is mirrored vertically, false otherwise. More...
|
| |
| void | attachAudioDevice (cAudioDevice *a_audioDevice) |
| | This method attaches an audio device to the camera. More...
|
| |
| void | detachAudioDevice () |
| | This method detaches the current audio device from the camera. More...
|
| |
| | cGenericObject () |
| | Constructor of cGenericObject. More...
|
| |
| virtual | ~cGenericObject () |
| | Destructor of cGenericObject. More...
|
| |
| virtual void | setEnabled (bool a_enabled, const bool a_affectChildren=false) |
| | This method enables or disable this object. When an object is disabled, both haptic and graphic rendering no longer occur. More...
|
| |
| bool | getEnabled () const |
| | This method returns true if the object is enabled, false otherwise. More...
|
| |
| virtual cGenericObject * | copy (const bool a_duplicateMaterialData=false, const bool a_duplicateTextureData=false, const bool a_duplicateMeshData=false, const bool a_buildCollisionDetector=true) |
| | This method creates a copy of itself. More...
|
| |
| virtual void | setLocalPos (const cVector3d &a_localPos) |
| | This method sets the local position of this object. More...
|
| |
| void | setLocalPos (const double a_x=0.0, const double a_y=0.0, const double a_z=0.0) |
| | This method sets the local position of this object. More...
|
| |
| cVector3d | getLocalPos () const |
| | This method returns the local position of this object. More...
|
| |
| cVector3d | getGlobalPos () const |
| | This method returns the global position of this object. More...
|
| |
| virtual void | setLocalRot (const cMatrix3d &a_localRot) |
| | This method sets the local rotation matrix for this object. More...
|
| |
| cMatrix3d | getLocalRot () const |
| | This method returns the local rotation matrix of this object. More...
|
| |
| cMatrix3d | getGlobalRot () const |
| | This method returns the global rotation matrix of this object. More...
|
| |
| void | setLocalTransform (const cTransform &a_transform) |
| | This method returns the local position and rotation matrix by passing a transformation matrix. More...
|
| |
| cTransform | getLocalTransform () |
| | This method returns the local position and rotation matrix in a transformation matrix. More...
|
| |
| cTransform | getGlobalTransform () |
| | This method returns the global position and rotation matrix in a transformation matrix. More...
|
| |
| void | translate (const cVector3d &a_translation) |
| | This method translates this object by a specified offset. More...
|
| |
| void | translate (const double a_x, const double a_y, const double a_z=0.0) |
| | This method translates this object by a specified offset. More...
|
| |
| void | rotateAboutLocalAxisRad (const cVector3d &a_axis, const double a_angleRad) |
| | This method rotates this object around a local axis. Angle magnitude is defined in radians. More...
|
| |
| void | rotateAboutLocalAxisDeg (const cVector3d &a_axis, const double a_angleDeg) |
| | This method rotates this object around a local axis. Angle magnitude is defined in degrees. More...
|
| |
| void | rotateAboutLocalAxisRad (const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleRad) |
| | This method rotates this object around a local axis. Angle magnitude is defined in radians. More...
|
| |
| void | rotateAboutLocalAxisDeg (const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleDeg) |
| | This method rotates this object around a local axis. Angle magnitude is defined in degrees. More...
|
| |
| void | rotateAboutGlobalAxisRad (const cVector3d &a_axis, const double a_angleRad) |
| | This method rotates this object around a global axis. Angle magnitude is defined in radians. More...
|
| |
| void | rotateAboutGlobalAxisDeg (const cVector3d &a_axis, const double a_angleDeg) |
| | This method rotates this object around a global axis. Angle magnitude is defined in degrees. More...
|
| |
| void | rotateAboutGlobalAxisRad (const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleRad) |
| | This method rotate this object around a local axis. Angle magnitude is defined in radians. More...
|
| |
| void | rotateAboutGlobalAxisDeg (const double a_axisX, const double a_axisY, const double a_axisZ, const double a_angleDeg) |
| | This method rotates this object around a local axis. Angle magnitude is defined in degrees. More...
|
| |
| void | rotateExtrinsicEulerAnglesRad (const double &a_angleRad1, const double &a_angleRad2, const double &a_angleRad3, const cEulerOrder a_eulerOrder) |
| | This method rotates this object using fixed Euler representation. Angles are defined in radians. More...
|
| |
| void | rotateExtrinsicEulerAnglesDeg (const double &a_angleDeg1, const double &a_angleDeg2, const double &a_angleDeg3, const cEulerOrder a_eulerOrder) |
| | This method rotates this object using fixed Euler representation. Angles are defined in radians. More...
|
| |
| void | rotateIntrinsicEulerAnglesRad (const double &a_angleRad1, const double &a_angleRad2, const double &a_angleRad3, const cEulerOrder a_eulerOrder) |
| | This method rotates this object using co-moving Euler representation. Angles are defined in radians. More...
|
| |
| void | rotateIntrinsicEulerAnglesDeg (const double &a_angleDeg1, const double &a_angleDeg2, const double &a_angleDeg3, const cEulerOrder a_eulerOrder) |
| | This method rotates this object using co-moving Euler representation. Angles are defined in radians. More...
|
| |
| virtual void | computeGlobalPositions (const bool a_frameOnly=true, const cVector3d &a_globalPos=cVector3d(0.0, 0.0, 0.0), const cMatrix3d &a_globalRot=cIdentity3d()) |
| | This method computes the global position and rotation of this object and its children. More...
|
| |
| void | computeGlobalPositionsFromRoot (const bool a_frameOnly=true) |
| | This method computes the global position and rotation of current object only. More...
|
| |
| bool | addEffect (cGenericEffect *a_effect) |
| | This method adds a haptic effect to this object. More...
|
| |
| bool | removeEffect (cGenericEffect *a_effect) |
| | This method removes a haptic effect from this object. More...
|
| |
| void | deleteAllEffects () |
| | This method removes all haptic effects. More...
|
| |
| bool | createEffectMagnetic () |
| | This method creates a magnetic haptic effect. More...
|
| |
| bool | deleteEffectMagnetic () |
| | This method deletes any current magnetic haptic effect. More...
|
| |
| bool | createEffectStickSlip () |
| | This method creates a stick-and-slip haptic effect. More...
|
| |
| bool | deleteEffectStickSlip () |
| | This method delete any current stick-and-slip haptic effect. More...
|
| |
| bool | createEffectSurface () |
| | This method creates a surface haptic effect. More...
|
| |
| bool | deleteEffectSurface () |
| | This method deletes any current surface haptic effect. More...
|
| |
| bool | createEffectVibration () |
| | This method creates a vibration haptic effect. More...
|
| |
| bool | deleteEffectVibration () |
| | This method deletes any current vibration haptic effect. More...
|
| |
| bool | createEffectViscosity () |
| | This method creates a viscous haptic effect. More...
|
| |
| bool | deleteEffectViscosity () |
| | This method deletes any current viscous haptic effect. More...
|
| |
| virtual void | setHapticEnabled (const bool a_hapticEnabled, const bool a_affectChildren=true) |
| | This method enables or disables haptic perception of this object, optionally propagating the change to children. More...
|
| |
| bool | getHapticEnabled () const |
| | This method returns the haptic status of object (true means it can be felt when visible). More...
|
| |
| virtual void | setStiffness (const double a_stiffness, const bool a_affectChildren=true) |
| | This method sets the haptic stiffness of the object, optionally recursively affecting children. More...
|
| |
| virtual void | setFriction (double a_staticFriction, double a_dynamicFriction, const bool a_affectChildren=true) |
| | This method sets the static and dynamic friction properties (polygonal models only), optionally recursively affecting children. More...
|
| |
| virtual void | setShowEnabled (const bool a_show, const bool a_affectChildren=true) |
| | This method enables or disables the graphic display of this object, optionally propagating the change to children. More...
|
| |
| bool | getShowEnabled () const |
| | This method returns the display status of object (true means it's visible). More...
|
| |
| virtual void | setWireMode (const bool a_showWireMode, const bool a_affectChildren=false) |
| | This method enables or disables wireframe rendering, optionally propagating the operation to my children. More...
|
| |
| bool | getWireMode () const |
| | This method returns whether wireframe rendering is enabled. More...
|
| |
| virtual void | setUseCulling (const bool a_useCulling, const bool a_affectChildren=false) |
| | This method enables or disables face-culling, optionally propagating the operation to my children. More...
|
| |
| bool | getUseCulling () const |
| | This method returns true if face-culling is enabled, false otherwise. More...
|
| |
| virtual void | setUseTransparency (const bool a_useTransparency, const bool a_affectChildren=false) |
| | This method enables or disables transparency. More...
|
| |
| bool | getUseTransparency () const |
| | This method returns true if transparency is enabled, false otherwise. More...
|
| |
| virtual void | setTransparencyLevel (const float a_level, const bool a_applyToVertices=false, const bool a_applyToTextures=false, const bool a_affectChildren=false) |
| | This method sets the transparency level of the object. More...
|
| |
| virtual void | setUseDisplayList (const bool a_useDisplayList, const bool a_affectChildren=false) |
| | This method enabled or disables the use of a display list for rendering, optionally propagating the operation to its children. More...
|
| |
| bool | getUseDisplayList () const |
| | This method returns true if a display list is activated, false otherwise. More...
|
| |
| virtual void | markForUpdate (const bool a_affectChildren=false) |
| | This method invalidates any existing display lists, optionally propagating the operation to its children. More...
|
| |
| virtual void | setUseVertexColors (const bool a_useColors, const bool a_affectChildren=false) |
| | This method enables or disables the use of per-vertex colors, optionally propagating the operation to its children. More...
|
| |
| bool | getUseVertexColors () const |
| | This method returns true is per-vertex color properties are enabled, false otherwise. More...
|
| |
| virtual void | setUseMaterial (const bool a_useMaterial, const bool a_affectChildren=false) |
| | This method enables or disables the use of material properties, optionally propagating the operation to its children. More...
|
| |
| bool | getUseMaterial () const |
| | This method returns true is material properties are enabled, false otherwise. More...
|
| |
| virtual void | setMaterial (cMaterialPtr a_material, const bool a_affectChildren=false) |
| | This method sets the material properties of this object, optionally propagating the operation to its children. More...
|
| |
| virtual void | setMaterial (cMaterial &a_material, const bool a_affectChildren=false) |
| | This method setd the material properties of this object, optionally propagating the operation to its children. More...
|
| |
| virtual void | backupMaterialColors (const bool a_affectChildren=false) |
| | This method creates a backup of the material colors of this object, optionally propagating the operation to its children. More...
|
| |
| virtual void | restoreMaterialColors (const bool a_affectChildren=false) |
| | This method restores the material color properties of this object from a previous backup, optionally propagating the operation to its children. More...
|
| |
| virtual void | setUseTexture (const bool a_useTexture, const bool a_affectChildren=false) |
| | This method enables or disables the use of texture-mapping, optionally propagating the operation to its children. More...
|
| |
| bool | getUseTexture () const |
| | This method returns true if texture-mapping is enabled, false otherwise. More...
|
| |
| virtual void | setTexture (cTexture1dPtr a_texture, const bool a_affectChildren=false) |
| | This method sets a texture to this object, optionally propagating the operation to its children. More...
|
| |
| virtual void | setShaderProgram (cShaderProgramPtr a_shaderProgram, const bool a_affectChildren=false) |
| | This method assigns a shader program to this object, optionally propagating the operation to its children.. More...
|
| |
| virtual cShaderProgramPtr | getShaderProgram () |
| | This method returns a pointer to the current shader program. More...
|
| |
| virtual void | setShowBoundaryBox (const bool a_showBoundaryBox, const bool a_affectChildren=false) |
| | This method enables or disabled the graphic display of the boundary box for this object, optionally propagating the change to its children. More...
|
| |
| bool | getShowBoundaryBox () const |
| | This method returns true if the boundary box is being displayed, false otherwise. More...
|
| |
| cVector3d | getBoundaryMin () const |
| | This method returns the minimum point of this object's boundary box. More...
|
| |
| cVector3d | getBoundaryMax () const |
| | This method returns the maximum point of this object's boundary box. More...
|
| |
| cVector3d | getBoundaryCenter () const |
| | This method computes and returns the center of this object's boundary box. More...
|
| |
| bool | getBoundaryBoxEmpty () |
| | This method returns true, if the boundary box is empty, otherwise false. More...
|
| |
| virtual void | computeBoundaryBox (const bool a_includeChildren=true) |
| | This method computes this object's boundary box, optionally forcing it to bound child objects. More...
|
| |
| virtual void | setShowFrame (const bool a_showFrame, const bool a_affectChildren=false) |
| | This method enables or disables the graphic display of the reference frame arrows for this object, optionally propagating the change to its children. More...
|
| |
| bool | getShowFrame (void) const |
| | This method returns true if the display of the reference frame is enabled, false otherwise. More...
|
| |
| virtual void | setFrameSize (const double a_size=1.0, const bool a_affectChildren=false) |
| | This method sets the size of the rendered reference frame, optionally propagating the change to its children. More...
|
| |
| double | getFrameSize () const |
| | This method returns the size of the graphical reference frame. More...
|
| |
| void | setCollisionDetector (cGenericCollision *a_collisionDetector) |
| | This method sets a collision detector to this current object. More...
|
| |
| cGenericCollision * | getCollisionDetector () const |
| | This method returns a pointer to this object's current collision detector. More...
|
| |
| virtual void | deleteCollisionDetector (const bool a_affectChildren=false) |
| | This method deletes any existing collision detector. More...
|
| |
| virtual bool | computeCollisionDetection (const cVector3d &a_segmentPointA, const cVector3d &a_segmentPointB, cCollisionRecorder &a_recorder, cCollisionSettings &a_settings) |
| | This method computes any collision between a segment and this object. More...
|
| |
| virtual void | setShowCollisionDetector (const bool a_showCollisionDetector, const bool a_affectChildren=false) |
| | This method enables or disables the display of the collision detector, optionally propagating the change to its children. More...
|
| |
| bool | getShowCollisionDetector () |
| | This method returns true if the collision detector is being displayed graphically, false otherwise. More...
|
| |
| virtual void | setCollisionDetectorProperties (unsigned int a_displayDepth, cColorf &a_color, const bool a_affectChildren=false) |
| | This method sets the collision detector graphic display properties. More...
|
| |
| void | setParent (cGenericObject *a_parent) |
| | This method sets the parent of this object. More...
|
| |
| cGenericObject * | getParent () const |
| | This method returns the parent of this object. More...
|
| |
| void | setOwner (cGenericObject *a_owner) |
| | This method sets a link to an object that owns this object. This could be a super parent for instance. More...
|
| |
| cGenericObject * | getOwner () |
| | This method returns the owner of this object. More...
|
| |
| cGenericObject * | getChild (const unsigned int a_index) const |
| | This method returns a selected child from the list of children. More...
|
| |
| bool | addChild (cGenericObject *a_object) |
| | This method add an object to the list of children. More...
|
| |
| bool | removeChild (cGenericObject *a_object) |
| | This method removes an object from the list of children, without deleting it. More...
|
| |
| bool | removeFromGraph () |
| | This method removes this object from its parent's list of children. More...
|
| |
| bool | deleteChild (cGenericObject *a_object) |
| | This method removes an object from its list of children and deletes it. More...
|
| |
| void | clearAllChildren () |
| | This method clears all objects from its list of children, without deleting them. More...
|
| |
| void | deleteAllChildren () |
| | This method clears and delete all objects from its list of children. More...
|
| |
| unsigned int | getNumChildren () |
| | This method returns the number of children from its list of children. More...
|
| |
| unsigned int | getNumDescendants (bool a_includeCurrentObject=false) |
| | This method returns the total number of descendants, optionally including this object. More...
|
| |
| void | setGhostEnabled (bool a_ghostEnabled) |
| | This method enables or disables this object to be a ghost node. More...
|
| |
| bool | getGhostEnabled () |
| | This method returns truee if this object is a ghost node. More...
|
| |
| virtual void | scale (const double &a_scaleFactor, const bool a_affectChildren=true) |
| | This method scales the size of this object. More...
|
| |
| virtual void | renderSceneGraph (cRenderOptions &a_options) |
| | This method renders the entire scene graph, starting from this object. More...
|
| |
| virtual void | adjustCollisionSegment (cVector3d &a_segmentPointA, cVector3d &a_segmentPointAadjusted) |
| | This method adjusts the collision segment to handle objects in motion. More...
|
| |
| virtual cVector3d | computeInteractions (const cVector3d &a_toolPos, const cVector3d &a_toolVel, const unsigned int a_IDN, cInteractionRecorder &a_interactions) |
| | This method computes all haptic interaction between a tool and this object using the haptic effects. More...
|
| |
| | cGenericType () |
| | Constructor of cGenericType. More...
|
| |
| virtual | ~cGenericType () |
| | Destructor of cGenericType. More...
|
| |


i
Illustration and design
Medical Illustration
Pencil
Graphic Design
Animation
Miscellaneous
About me
Contact