Module field2D
Field2D: an object representing a 2D densely packed array.
Functions
| field2D:set (value, x, y) | set the value of a cell, or of all cells. |
| field2D:get (x, y) | return the value of a cell If x or y is out of range of the field, it wraps around (positive modulo) If x or y are not integers, the fractional component is discarded (rounded down) |
| field2D:sample (x, y) | return the value at a normalized index (0..1 range maps to field dimensions) Uses linear interpolation between nearest cells. |
| field2D:update (value, x, y) | Update the field at a normalized (0..1) index Like field2D:set(), but uses linear interpolation to distribute the update between nearest cells (thus it is an inverse of field:sample()). |
| field2D:splat (value, x, y) | Add a value to the field at a normalized (0..1) index Uses linear interpolation to distribute the value between nearest cells, for accumulation. |
| field2D:scale (value, x, y) | Multiply the field by a value, optionally at a normalized (0..1) index If indices are not given, all cells are multipled by the value. |
| field2D:diffuse (sourcefield, diffusion, passes) | fill the field with a diffused (blurred) copy of another |
| field2D:map (func) | Apply a function to each cell of the field in turn The function arguments will be the current value of the cell and the x and y position, and the return value should be the new value of the cell (or nil to indicate no change). |
| field2D:normalize () | normalize the field values to a 0..1 range |
| field2D:sum () | return the sum of all cells |
| field2D:max () | return the maximum value of all cells |
| field2D:min () | return the minimum value of all cells |
| field2D:draw (x, y, w, h, unit) | Draw the field in greyscale from 0..1 |
| field2D:drawHueRange (range) | Draw the field as a Hue spectrum from red to blue |
| drawFlow (fx, fy) | draw two fields representing X and Y vector components |
| field2D:copy () | Create a copy of the field with the same dimensions and contents |
Functions
- field2D:set (value, x, y)
-
set the value of a cell, or of all cells.
If the x,y coordinate is not specified, it will apply the value for all cells.
If the value to set is a function, this function is called (passing the x, y coordinates as arguments). If the function returns a value, the cell is set to this value; otherwise the cell is left unchanged.
Parameters:
- value number or function to set
- x optional int coordinate (row) to set a single cell
- y optional int coordinate (column) to set a single cell
- field2D:get (x, y)
-
return the value of a cell
If x or y is out of range of the field, it wraps around (positive modulo)
If x or y are not integers, the fractional component is discarded (rounded down)
Parameters:
- x optional int coordinate (row) to get a single cell
- y optional int coordinate (column) to get a single cell
- field2D:sample (x, y)
-
return the value at a normalized index (0..1 range maps to field dimensions)
Uses linear interpolation between nearest cells.
Indices out of range will wrap.
Parameters:
- x coordinate (0..1) to sample
- y coordinate (0..1) to sample
- field2D:update (value, x, y)
-
Update the field at a normalized (0..1) index
Like field2D:set(), but uses linear interpolation to distribute the update between nearest cells (thus it is an inverse of field:sample()). If the index falls exactly in the center of one cell, it is equivalent to field:set(). Otherwise, the four nearest cells will be updated as a weighted average of their current and the new value.
If the value is a function, this function is called for each nearby cell to generate a new value. The function argument is the old value of the cell.
Indices out of range will wrap.
Parameters:
- value (number or function) the value to update the field
- x coordinate (0..1) to update
- y coordinate (0..1) to update
Returns:
-
self
- field2D:splat (value, x, y)
-
Add a value to the field at a normalized (0..1) index
Uses linear interpolation to distribute the value between nearest cells, for accumulation.
Indices out of range will wrap.
Parameters:
- value the value to add to the field
- x coordinate (0..1) to update
- y coordinate (0..1) to update
Returns:
-
self
- field2D:scale (value, x, y)
-
Multiply the field by a value, optionally at a normalized (0..1) index
If indices are not given, all cells are multipled by the value.
Otherwise, uses linear interpolation to distribute the value between nearest cells, for multiplication. If the position index is exactly in the center of a cell, it performs a normal multiplcation. Otherwise the four nearest cells are updated according to a weighted average of their current and modified value.
Indices out of range will wrap.
Parameters:
- value the value to scale to the field
- x coordinate (0..1) to update (optional)
- y coordinate (0..1) to update (optional)
Returns:
-
self
- field2D:diffuse (sourcefield, diffusion, passes)
-
fill the field with a diffused (blurred) copy of another
Parameters:
- sourcefield the field to be diffused
- diffusion the rate of diffusion
- passes ?int the number of iterations to improve numerical accuracy (default 10)
- field2D:map (func)
-
Apply a function to each cell of the field in turn
The function arguments will be the current value of the cell and the x and y position, and the return value should be the new value of the cell (or nil to indicate no change). E.g. to multiply all cells by 2: field:map(function(value, x, y) return value * 2 end)
Parameters:
- func the function to apply
Returns:
-
self
- field2D:normalize ()
-
normalize the field values to a 0..1 range
Returns:
-
self
- field2D:sum ()
-
return the sum of all cells
Returns:
-
sum
- field2D:max ()
-
return the maximum value of all cells
Returns:
-
max
- field2D:min ()
-
return the minimum value of all cells
Returns:
-
min
- field2D:draw (x, y, w, h, unit)
-
Draw the field in greyscale from 0..1
Parameters:
- x left coordinate (optional, defaults to 0)
- y bottom coordinate (optional, defaults to 0)
- w width (optional, defaults to 1)
- h height (optional, defaults to 1)
- unit texture unit to use (defaults to 0)
- field2D:drawHueRange (range)
-
Draw the field as a Hue spectrum from red to blue
Parameters:
- range the maximum field value (renders as blue)
- drawFlow (fx, fy)
-
draw two fields representing X and Y vector components
Parameters:
- fx X component field
- fy Y component field
- field2D:copy ()
- Create a copy of the field with the same dimensions and contents


--- sort_order: 111 tei_id: rdx_b6zxc.p.idp198892528 annotation_count: 0 images: small-thumbnail: https://readux.ecds.emory.edu/books/emory:b6zxc/pages/emory:h6x6j/mini-thumbnail/ json: https://readux.ecds.emory.edu/books/emory:b6zxc/pages/emory:h6x6j/info/ full: https://readux.ecds.emory.edu/books/emory:b6zxc/pages/emory:h6x6j/fs/ page: https://readux.ecds.emory.edu/books/emory:b6zxc/pages/emory:h6x6j/single-page/ thumbnail: https://readux.ecds.emory.edu/books/emory:b6zxc/pages/emory:h6x6j/thumbnail/ title: Page 107 number: 107 permalink: "/pages/107/" ---


| Package | Description |
|---|---|
| com.communote.server.api.core.task | |
| com.communote.server.core.tasks | |
| com.communote.server.model.task | |
| com.communote.server.persistence.tasks |
| Modifier and Type | Method and Description |
|---|---|
Collection<TaskExecution> |
TaskManagement.getTaskExecutions(String instanceName)
Return all task executions running on the Communote with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<TaskExecution> |
TaskManagementImpl.getTaskExecutions(String instanceName) |
| Modifier and Type | Class and Description |
|---|---|
class |
TaskExecutionImpl |
| Modifier and Type | Method and Description |
|---|---|
static TaskExecution |
TaskExecution.Factory.newInstance()
Constructs a new instance of
TaskExecution . |
static TaskExecution |
TaskExecution.Factory.newInstance(String instanceName,
Task task)
Constructs a new instance of
TaskExecution ,
taking all possible properties (except the identifier(s))as arguments. |
| Modifier and Type | Method and Description |
|---|---|
TaskExecution |
TaskExecutionDaoBase.create(TaskExecution taskExecution) |
TaskExecution |
TaskExecutionDao.create(TaskExecution taskExecution)
Creates an instance of com.communote.server.persistence.tasks.TaskExecution and adds it to
the persistent store.
|
TaskExecution |
TaskExecutionDaoBase.findTaskExecution(String uniqueTaskName) |
TaskExecution |
TaskExecutionDao.findTaskExecution(String uniqueTaskName) |
protected TaskExecution |
TaskExecutionDaoImpl.handleFindTaskExecution(String uniqueTaskName)
Performs the core logic for
TaskExecutionDaoBase.findTaskExecution(String) |
protected abstract TaskExecution |
TaskExecutionDaoBase.handleFindTaskExecution(String uniqueTaskName)
Performs the core logic for
TaskExecutionDaoBase.findTaskExecution(String) |
TaskExecution |
TaskExecutionDaoBase.load(Long id) |
TaskExecution |
TaskExecutionDao.load(Long id)
Loads an instance of com.communote.server.persistence.tasks.TaskExecution from the persistent
store.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<TaskExecution> |
TaskExecutionDaoBase.create(Collection<TaskExecution> entities) |
Collection<TaskExecution> |
TaskExecutionDao.create(Collection<TaskExecution> entities)
Creates a new instance of com.communote.server.persistence.tasks.TaskExecution and adds from
the passed in
entities collection |
Collection<TaskExecution> |
TaskExecutionDaoBase.create(int transform,
Collection<TaskExecution> entities) |
Collection<TaskExecution> |
TaskExecutionDaoBase.findTaskExecutions(String instanceName) |
Collection<TaskExecution> |
TaskExecutionDao.findTaskExecutions(String instanceName) |
protected Collection<TaskExecution> |
TaskExecutionDaoImpl.handleFindTaskExecutions(String instanceName)
Performs the core logic for
TaskExecutionDaoBase.findTaskExecutions(String) |
protected abstract Collection<TaskExecution> |
TaskExecutionDaoBase.handleFindTaskExecutions(String instanceName)
Performs the core logic for
TaskExecutionDaoBase.findTaskExecutions(String) |
Collection<TaskExecution> |
TaskExecutionDaoBase.loadAll() |
Collection<TaskExecution> |
TaskExecutionDao.loadAll()
Loads all entities of type
TaskExecution . |
| Modifier and Type | Method and Description |
|---|---|
Object |
TaskExecutionDaoBase.create(int transform,
TaskExecution taskExecution) |
Object |
TaskExecutionDao.create(int transform,
TaskExecution taskExecution)
Does the same thing as
TaskExecutionDao.create(com.communote.server.model.task.TaskExecution) with an
additional flag called transform . |
TaskExecution |
TaskExecutionDaoBase.create(TaskExecution taskExecution) |
TaskExecution |
TaskExecutionDao.create(TaskExecution taskExecution)
Creates an instance of com.communote.server.persistence.tasks.TaskExecution and adds it to
the persistent store.
|
void |
TaskExecutionDaoBase.evict(TaskExecution entity)
Evicts (removes) the entity from the hibernate cache
|
void |
TaskExecutionDao.evict(TaskExecution entity)
Evicts (removes) the entity from the hibernate cache
|
void |
TaskExecutionDaoBase.remove(TaskExecution taskExecution) |
void |
TaskExecutionDao.remove(TaskExecution taskExecution)
Removes the instance of com.communote.server.persistence.tasks.TaskExecution from the
persistent store.
|
protected Object |
TaskExecutionDaoBase.transformEntity(int transform,
TaskExecution entity)
Allows transformation of entities into value objects (or something else for that matter),
when the
transform flag is set to one of the constants defined in
com.communote.server.persistence.tasks.TaskExecutionDao , please note that the
TaskExecutionDao.TRANSFORM_NONE constant denotes no transformation, so the entity itself will be
returned. |
void |
TaskExecutionDaoBase.update(TaskExecution taskExecution) |
void |
TaskExecutionDao.update(TaskExecution taskExecution)
Updates the
taskExecution instance in the persistent store. |
| Modifier and Type | Method and Description |
|---|---|
Collection<TaskExecution> |
TaskExecutionDaoBase.create(Collection<TaskExecution> entities) |
Collection<TaskExecution> |
TaskExecutionDao.create(Collection<TaskExecution> entities)
Creates a new instance of com.communote.server.persistence.tasks.TaskExecution and adds from
the passed in
entities collection |
Collection<TaskExecution> |
TaskExecutionDaoBase.create(int transform,
Collection<TaskExecution> entities) |
Collection<?> |
TaskExecutionDao.create(int transform,
Collection<TaskExecution> entities)
Does the same thing as
TaskExecutionDao.create(com.communote.server.model.task.TaskExecution) with an
additional flag called transform . |
void |
TaskExecutionDaoBase.remove(Collection<TaskExecution> entities) |
void |
TaskExecutionDao.remove(Collection<TaskExecution> entities)
Removes all entities in the given
entities |
void |
TaskExecutionDaoBase.update(Collection<TaskExecution> entities) |
void |
TaskExecutionDao.update(Collection<TaskExecution> entities)
Updates all instances in the
entities collection in the persistent store. |
Copyright © 2019 Communote team. All rights reserved.


+++ title = "Apache SkyWalking" linkTitle = "Apache SkyWalking" +++ {{< blocks/cover title="Apache SkyWalking" image_anchor="top" height="full" color="orange" >}}
Application performance monitor tool for distributed systems, especially designed for microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures.
SkyWalking is an Observability Analysis Platform and Application Performance Management system.
Provide distributed tracing, service mesh telemetry analysis, metric aggregation and visualization all-in-one solution.
Java, .Net Core, PHP, NodeJS, Golang, LUA, C++ agents supported
Istio + Envoy Service Mesh supported
Tracing
Metrics
Logging
Browser monitoring
Java
Golang
.Net Core
Python
NodeJS
C++
PHP
Lua
No big data stack
Adopt different scale
Storage pluggable
Cluster cooridinator pluggable
Support pull/push transportation
Alarm HTTP/gRPC forwarder
Slack notification
Dingding notification
WeChat notification
Raw metrics data exporter
Customizable dashboard
Topology map
Trace and profile explorer
CLI dashboard
IntelliJ IDE plugin, metrics side by side with codes
Various companies and organizations use SkyWalking for research, production and commercial products.
The PoweredBy page includes more users of the project.


--- layout: page title: How to generate forecasts with Foresee? group: articles --- {% include JB/setup %}
The forecasts generated from the same data file are stored inside a project, which makes further access to the results easier. You can keep as many projects as you want in your account!
To create a project, click on New project.
You will be automatically redirected to a new page (see image below), where you'll need to provide the necessary information in order to create a new project.
You're ready! In a few moments you will be automatically redirected to the project page, which you just created (see image below).
By clicking on any series name that is on this project (Product 1, for instance), you'll seeplot and table with the forecasts related to the series (see image below).


My name is Sophia Reed, and I am a rising sophomore at the University of Michigan. I became passionate in nutrition and well-being along side my passion for computers. Combing the two, I strive to build a website through my coding background that can help people learn and grow.
With all the different fitness/food trends and tips, it can be overwhelming. As you go through the feed, find what interests you. It is time to have fun and experiment with tips that seem beneficial and introduce new foods in your life. Everyone is different and there is no one size fits all way of living. Take some tips I provide here, whatever it may be, and make your own recipe of healthy and happy living.
Remember to keep moving, focus on the good, and be kind.


Hi there! We are the new kids on the block
and we build awesome websites and mobile apps.
We are working with both individuals and businesses from all over the globe
to create awesome websites and applications.


1) Install Python 3.6 or newer.
https://www.python.org/downloads/
2) Open cmd/terminal and type:
pip install ursina
If you want to install the newest version from GitHub, you can install like this:
or
pip install git+https://github.com/pokepetter/ursina.git
Keep in mind that things *could* break.
If you want to easily edit the source, it's recommended to clone the git
repo and install as develop like this. Make sure you have git installed.
https://git-scm.com/
Also install any of the optional dependencies you want from the list below,
or install them all with:
pip install ursina[extras]
On some systems you might have to use pip3 instead of pip in order to use Python 3 and not the old Python 2.
If the pip command is not found, you can use:
python -m pip install ursina
Dependencies
• python 3.6+
• panda3d
• screeninfo, for detecting screen resolution
• pillow, for texture manipulation
• psutil, for measuring memory usage (optional)
• hurry.filesize, for converting bytes to megabytes (optional)
• imageio, for recording and converting to gifs (optional)
• psd-tools3, for converting .psd files (optional)
• blender, for converting .blend files (optional)
Optional dependencies must be installed manually.
Examples
Entity Example:
from ursina
import *
# import everything we need with one line.
app = Ursina()
ground =
Entity(
model =
'cube',
color = color.magenta,
z = -.
1,
y = -
3,
origin = (
0, .
5),
scale = (
50,
1,
10),
collider =
'box'
)
app.run()
# opens a window and starts the game.
How do I make a game?
Ursina games are made by writing Python code. You can use any text editor you want.
1) Create an empty .py file called 'ursina_game.py'
2) Copy this text into your new file:
from ursina
import *
app = Ursina()
player =
Entity(
model=
'cube',
color=color.orange, scale_
y=
2)
def update():
# update gets automatically called.
player.x += held_keys[
'd'] * .
1
player.x -= held_keys[
'a'] * .
1
app.run()
# opens a window and starts the game.
3) Type this in the terminal to start the game. I recommend setting a hotkey
for this in your text editor:
python ursina_game.py
The game should start! You can now move the orange box around with 'a' and 'd'!
To close the window, you can by default, press shift+q or press the red x.
A variety of games made with Ursina


Christmas Connection
Christmas Connection is a TV movie starring Brooke Burns, Tom Everett Scott, and Sophie Neudorf. Flight attendant Sydney (Brooke Burns) is tasked with looking after Leah, an eight-year-old unaccompanied minor flying back to Chicago...


Self-confessed Chinese spy spills secrets in Australia
by The Associated PressPERTH, Australia — Australian media say a self-confessed Chinese spy has given Australia’s counterespionage agency inside intelligence on how Beijing conducts its interference operations abroad and revealed the identities of China’s senior military intelligence officers in Hong Kong.
Australia’s Treasurer Josh Frydenberg told reporters Saturday that the detailed accusations of China infiltrating and disrupting democratic systems in Australia, Hong Kong and Taiwan are “very disturbing.”
The Nine network newspapers reported Chinese defector Wang “William” Liqiang told ASIO — the country’s counterespionage agency — that he was involved in the kidnapping in 2015 of one of five Hong Kong booksellers suspected of selling dissident materials. The incident has been a reference point for protesters during the ongoing unrest in Hong Kong.
He is the first Chinese intelligence operative to blow his cover.
The Associated Press


The alert() method displays an alert box with a specified message and an OK button.
An alert box is often used if you want to make sure information comes through to the user.
Note: The alert box takes the focus away from the current window, and forces the browser to read the message. Do not overuse this method, as it prevents the user from accessing other parts of the page until the box is closed.
click me to see how alert works
alert(message)


1 02 Collaboration Support System
1 04 New York State School Finance Reform Archive
1 05 Multimedia Exhibitions At The Gottesman Libraries
1 06 Media Design Center At The Gottesman Libraries
1 10 Journal Article Recommendation System Jars
1 11 Networked Education Database
1 Charting The Future Of Libraries
2 01 Sociology Of Online Learning
2 05 Understanding Fiscal Responsibility
2 08 Discussion Forum Analyzer Tool
2 10 Supporting Early Career Teachers Through Online Resources Sec Tt Or
2 Innovations For Online Learning
3 08 Your Permanent Record Ypr
3 11 Automated Author Feedback Tool Aaft
3 13 Teachers College Record Redesign
3 14 Conflict Resolution Videos
3 16 New Learning Times Book Series
3 New Directions For Online Publishing
4 03 Your Summer Learning Contest
4 04 Teachers College Health Conceptual Framework
4 11 Pundit Intelligent Recommender Of Courses
4 12 The Learning Opportunities Laboratory
4 13 Adaptive Learning Opportunities
4 14 The Strage Prize Competition
5 02 Collaboration Opportunities At Ed Lab
5 03 Gottesman Libraries Art Commission
6 02 Ed Lab Summer Internship Program Esip
6 04 Internship Opportunities At Ed Lab
6 Efficiencies In Educational Research
7 01 Library Design Event With Matt Taylor
7 02 Aera Conference Blog 2006
7 03 Arthur Levine On The Future Of Ed Schools
7 04 Arthur Levine Tribute Video
7 05 Barbara Tversky On Graphics And Diagrams
7 06 Design Processes Presentation By Pravin Sathe And Erin Murphy
7 07 Edmund W Gordon Documentary
7 08 Edward Bakst On Encouraging Creativity And Innovation
7 09 Gary Natriello On Ed Lab S Foundational Projects
7 10 Henry Levin Discussion On Educational Entrepreneurism
7 11 Joe Krajcik On Bringing Intellect And Innovation Into The K 12 Science Classroom
7 12 Learning Personalization And Discovery
7 13 Online Publishing Mini Course
7 14 Pocket Knowledge Claymation Commercial
7 15 Telling Stories With Data Presentation By Pravin Sathe
7 16 The Next Stage Of The Library Renovation
7 17 Tony Cline On Trends In Technology And Society
7 18 Ulises Mejias On Social Agency In A Digital World
8 01 An Online Journal As A Virtual Learning Environment
8 02 Beyond Courses The Search For New Forms Of Education Online
8 03 Bridging The Second Digital Divide What Can Sociologists Of Education Contribute
8 05 Data Sharing A Workshop On Understanding And Promoting Knowledge Accumulation In Education
8 09 Modest Changes Revolutionary Possibilities Distance Learning And The Future Of Education
8 10 Psychology Type And Asynchronous Written Dialogue In Adult Learning
8 11 Rethinking The Organization And Effects Of Schooling The Post Industrial Conundrum
8 12 Second Look A Research Platform For Second Life
8 13 Strong Ties Weak Ties Relational Dimensions Of Learning Settings
8 15 The Middle Way The Very Low Cost Model For Scholarly Publishing
8 16 Using E Learning Systems To Scale Up Educational Research
8 17 Using Social Network Analysis To Highlight An Emerging Online Community Of Practice
9 01 Collaboration Support System Fall 2005 Semester Report
9 03 Pocket Knowledge Creating Historical And Practical Pockets
9 04 Pocket Knowledge Design And Implementation Of Fa Qs And Context Specific Help
9 05 Seminar On The Future Of Libraries Progress Report


Reminder Settings
These values are taken from the package insert. Please customize them according to your doctors recommendations and your personal preferences.
-
expand_morepill(s)expand_moredeleteadd_circle_outline
Add Intake
-
weekly intake option has not been implemented yet. It will work analogously to the daily intake option.
monthly intake option has not been implemented yet. It will work analogously to the daily intake option


Casual Meet and Greet (and beer!)
Date: Sunday, October 19th @ 6pm
Asgard Tavern / Odin Brewing Company Tasting Room
1300 N. Northlake Way
Seattle, WA 98103
Join Margrét, Justin and Adam for beer, casual conversation
and to chat with other people in your special interest groups.
Fall Icelandic Classes Begin
Our First Meeting!
Date: Sunday, October 12th at 7:00 pm
Location: 826 Seattle / Greenwood Space Travel Supply Co
8414 Greenwood Ave N, Seattle
(On Greenwood Ave, just south of 85th street.)
Agenda: Meet and greet followed by watching an Icelandic movie, Djúpið.
Taste Of Iceland - Seattle
Our first (planning) meeting ever!
Date: Sunday, September 7th at 5 pm
Location:
Margrét's House


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Serves 4-6
A tasty, simple and fast way to cook a whole chicken on the barbecue. Add a little spice to the marinade if you like - it will complement the fruity salad.
Preheat the barbecue or oven to 180C/350F/Gas 4.
For the spatchcock chicken, slash each chicken leg two or three times with a sharp knife. Season with salt and freshly ground pepper, sprinkle with chopped rosemary and thyme leaves and drizzle with extra virgin olive oil.
Transfer to a roasting tin. Place skin-side upwards and tuck the whole garlic cloves underneath. Roast on the barbeque or in a preheated oven for 50 minutes to an hour, or until the juices run clear
For the fennel and mango salad, lightly crush the hazelnuts in a pestle and mortar or place in a plastic bag and use a rolling pin to break them up. Set aside.
In a bowl, mix together the mango and fennel with the olive oil, lemon juice and mint. Season to taste with salt and pepper.
To serve, cut the chicken into portions, then divide the salad between plates, scatter over the toasted hazelnuts and crumble over the feta cheese.


|
|
CIFXDeviceTextureOGL Class ReferenceInheritance diagram for CIFXDeviceTextureOGL:
List of all members.
Constructor & Destructor Documentation
| CIFXDeviceTextureOGL::CIFXDeviceTextureOGL |
( |
|
) |
[protected] |
|
| CIFXDeviceTextureOGL::~CIFXDeviceTextureOGL |
( |
|
) |
[protected, virtual] |
|
Member Function Documentation
| U32 CIFXDeviceTextureOGL::AddRef |
( |
|
) |
[virtual] |
|
|
|
This method increments the reference count for an interface on a component.
- Note:
- It should be called for every new copy of a pointer to an interface on a given component.
- Returns:
- It returns a U32 that contains a value from 1 to 2^32 - 1 that defines the new reference count. The return value should only be used for debugging purposes.
Reimplemented from CIFXDeviceTexture. |
| IFXRESULT CIFXDeviceTextureOGL::Construct |
( |
|
) |
[protected] |
|
| void CIFXDeviceTextureOGL::DeleteSurfaceCache |
( |
|
) |
[static] |
|
| GLenum CIFXDeviceTextureOGL::GetGLTextureType |
( |
IFXenum |
eType, |
|
|
GLenum * |
glBinding = 0 |
|
) |
[protected] |
|
| IFXenum IFXAPI CIFXDeviceTextureOGL::GetType |
( |
|
) |
const [inline] |
|
| GLuint CIFXDeviceTextureOGL::Id |
( |
|
) |
[inline] |
|
| void CIFXDeviceTextureOGL::InitData |
( |
|
) |
[protected] |
|
| IFXRESULT CIFXDeviceTextureOGL::QueryInterface |
( |
IFXREFIID |
interfaceId, |
|
|
void ** |
ppInterface |
|
) |
[virtual] |
|
|
|
This method provides access to the various interfaces supported by a component.
Upon success, it increments the component's reference count and hands back a pointer to the specified interface.
- Note:
- A number of rules must be adhered to by all implementations of IFXAPI QueryInterface . For a list of such rules, refer to the IFXCOM usage guidelines.
- Returns:
- Upon success, IFX_OK is returned. Otherwise, either IFX_E_INVALID_POINTER or IFX_E_UNSUPPORTED are returned.
Reimplemented from CIFXDeviceTexture. |
| U32 CIFXDeviceTextureOGL::Release |
( |
|
) |
[virtual] |
|
|
|
This method decrements the reference count for the calling interface on a component.
- Note:
- If the reference count on a component falls to zero, the component is destroyed.
- Returns:
- It returns a U32 that contains a value from 1 to 2^32 - 1 that defines the new reference count. The return value should only be used for debugging purposes.
Reimplemented from CIFXDeviceTexture. |
| IFXRESULT CIFXDeviceTextureOGL::SetHWDepth |
( |
U32 |
uDepth |
) |
[protected, virtual] |
|
| IFXRESULT CIFXDeviceTextureOGL::SetHWDynamic |
( |
BOOL |
bDyanmic |
) |
[protected, virtual] |
|
| IFXRESULT CIFXDeviceTextureOGL::SetHWHeight |
( |
U32 |
uHeight |
) |
[protected, virtual] |
|
| IFXRESULT CIFXDeviceTextureOGL::SetHWMagFilter |
( |
IFXenum |
eFilter |
) |
[protected, virtual] |
|
| IFXRESULT CIFXDeviceTextureOGL::SetHWMaxMipLevel |
( |
U32 |
uMipLevel |
) |
[protected, virtual] |
|
| IFXRESULT CIFXDeviceTextureOGL::SetHWMinFilter |
( |
IFXenum |
eFilter |
) |
[protected, virtual] |
|
| IFXRESULT CIFXDeviceTextureOGL::SetHWMipMode |
( |
IFXenum |
eMode |
) |
[protected, virtual] |
|
| IFXRESULT CIFXDeviceTextureOGL::SetHWRenderFormat |
( |
IFXenum |
eFormat |
) |
[protected, virtual] |
|
| IFXRESULT CIFXDeviceTextureOGL::SetHWTexture |
( |
|
) |
[protected, virtual] |
|
| IFXRESULT CIFXDeviceTextureOGL::SetHWType |
( |
IFXenum |
eType |
) |
[protected, virtual] |
|
| IFXRESULT CIFXDeviceTextureOGL::SetHWWidth |
( |
U32 |
uWidth |
) |
[protected, virtual] |
|
Friends And Related Function Documentation
| IFXRESULT IFXAPI_CALLTYPE CIFXDeviceTextureOGLFactory |
( |
IFXREFIID |
intId, |
|
|
void ** |
ppUnk |
|
) |
[friend] |
|
Member Data Documentation
© 1999 - 2006 Intel Corporation. All rights reserved.
* Other names and brands may be claimed as the property of others.
|
|


This sample demonstrates that by usage of concepts, external geometries can be handled by GGL, just calling by a one-line registration macro. In this case for the Qt Widget Library.
The example, code shown below, results in this window-output:
#include <sstream>
#include <QtGui>
#include <boost/geometry/geometry.hpp>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QPolygonF polygon;
polygon
<< QPointF(10, 20) << QPointF(20, 30)
<< QPointF(30, 20) << QPointF(20, 10)
<< QPointF(10, 20);
std::ostringstream out;
QPointF p(20,20);
out << "Qt contains: "
<< (polygon.containsPoint(p, Qt::WindingFill) ? "yes" : "no")
<< std::endl
<< "Boost.Geometry within: "
<< std::endl;
QPolygonF::const_iterator it;
for (it = polygon.begin(); it != polygon.end(); ++it)
{
out << boost::geometry::dsv(*it) << std::endl;
}
out << boost::geometry::dsv(polygon) << std::endl;
QLabel label(out.str().c_str());
label.show();
return app.exec();
}


CRC32Fingerprint()
语法
Result = CRC32Fingerprint(*Buffer, Size [, InitialValue])概要
Perform a CRC32 checksum on the given buffer.
参数
*Buffer The buffer containing the data for the checksum calculation. Size The size of the given buffer. InitialValue (optional) The optional InitialValue parameter can be used to pass the checksum of a previous buffer. The result will then be the checksum of both buffers, as if it were calculated from one continuous buffer. This way calculating the checksum of large data can be broken down into a number of calculations on smaller buffers.
返回值
Returns the calculated checksum.
备注
CRC32 is a 32-bit fingerprint not intended for password storage as it's easily crackable, but for quick data integrity check. For example, zip files have a CRC32 checksum at the end of each file to be sure that the zip is not corrupted. The main advantage of CRC32 over MD5 or other hash algorithm is its very high speed.
示例
*Buffer = AllocateMemory(200) ; Prepare a buffer with data If *Buffer PokeS(*Buffer, "The quick brown fox jumps over the lazy dog.") Length = MemoryStringLength(*Buffer) CRC32 = CRC32Fingerprint(*Buffer, Length) ; Calculate the checksum in 1 step Debug "CRC32 checksum = " + Str(CRC32) Part1 = CRC32Fingerprint(*Buffer, Length/2) ; Calculate the checksum in 2 steps CRC32 = CRC32Fingerprint(*Buffer+Length/2, Length/2, Part1) Debug "CRC32 checksum = " + Str(CRC32) FreeMemory(*Buffer) EndIf
参阅
CRC32FileFingerprint(), MD5Fingerprint(), SHA1Fingerprint()
已支持操作系统
所有


| Completed by (PM or MyVR) | PM |
| Estimated time to complete | 5 minutes |
| Requirements | n/a |
| Why this step is necessary | Some channels will use this information for your profile. |
| What to watch out for | n/a |
| What else to know | n/a |
| MyVR instruction links | Account Settings |
| Completed by (PM or MyVR) | PM |
| Estimated time to complete | 2 minutes to connect your account Setting up a new Stripe account can take as little as a few minutes. |
| Requirements | You must operate in a supported country (https://stripe.com/global). If you do not, contact your Onboarding Specialist for further guidance. |
| Why this step is necessary | - To integrate with VRBO or Expedia. - To integrate with Booking.com, unless you're using "Payments by Booking.com". - To enable online payments for your website. |
| What to watch out for | Contact your Onboarding Specialist if you have trouble creating a Stripe account. |
| What else to know | n/a |
| MyVR instruction links | Merchant Accounts |
| Completed by (PM or MyVR) | PM |
| Estimated time to complete | 2 minutes to connect your account Setting up a new Stripe account can take as little as a few minutes. |
| Requirements | You must operate in a supported country (https://stripe.com/global). If you do not, contact your Onboarding Specialist for further guidance. |
| Why this step is necessary | - To integrate with VRBO or Expedia. - To integrate with Booking.com, unless you're using "Payments by Booking.com". - To enable online payments for your website. |
| What to watch out for | Contact your Onboarding Specialist if you have trouble creating a Stripe account. |
| What else to know | n/a |
| MyVR instruction links | Merchant Accounts |
| Completed by (PM or MyVR) | PM |
| Estimated time to complete | A few minutes per new item |
| Requirements | n/a |
| Why this step is necessary | If you plan to use custom payment schedules other than what MyVR offers out of the box, you can create them. |
| What to watch out for | n/a |
| What else to know | Not all channels support custom payment schedules. |
| MyVR instruction links | Creating Payment Schedules |


COMPETENCY RELATED INFORMATION
8 of 12
Specify the tools or methods used to assess a candidate for a job.


--- title: Recalibration keywords: fastai sidebar: home_sidebar summary: "Functions related to recalibrating" description: "Functions related to recalibrating" nb_path: "nbs/07_recalibration.ipynb" ---
This notebook contains evertyhing related to recalibration of data.
Recalibration refers to the computational step where masses are recalibrated after a first search. The identified peptides are used to calculate the deviations of experimental masses to their theoretical masses. After recalibration, a second search with decreased precursor tolerance is performed.
The recalibration is largely motivated by the software lock mass paper:
Here, mass offsets are piecewise linearly approximated. The positions for approximation need to fulfill a number of criteria (e.g., a minimum number of samples and a minimum distance). The AlphaPept implementation is slightly modified by employing a more general KNeighborsRegressor
-approach. In brief, the calibration is calculated for each point individually by estimating the deviation from its identified neighbors in n-dimensional space (e.g., retention time, mass, mobility).
More specifically, the algorithm consists of the following steps:
The fragment mass calibration is based on the identified ions (i.e., b-hits and y-hits). For each hit, we calculate the offset to its theoretical mass. The correction is then applied by taking the median offset in ppm and applying it globally.


Ann Stein's research center.
Let go back to work...
According to Hans Stein’s relative model, space is centered around its origin.
“zero” coordinates origin isthe point (x,y,z) where the Universe was created.
Created exactly 13.787±0.020 billion years ago, Universe can be interpreted with the Lambda-CDM concordance model.
Teleposition is just a question of manipulating an object relative space coordinates system (RSCS)
Building a 3D model of the Universe.
Then build atele-positionning machine.
We moved a stone!
Tele-positioning is now possible!
Now let's try to tele-position a living organism...
The flower died.
No! I just killed a plant!
The plant was so stressed!
You must relaxthe flower first.
To calm a flower?Are you kidding me?
I know so much about tele-positioning.
Do not neglect the importance of sleep!
At night flowers get some rest.
A sleeping flower is easy to tele-position.
The flower has moved on the planet!


Filebrowser
×
An Exception has been occurred!
/
Roots:
Name
Size
Type
Date
Actions
[..]
[directories]
Download
Zip
Show


@(env:String,processList:Seq[models.Process])(implicit messages: MessagesApi) @main {
| Process Id | Process Name | Process Description | Active Flag | Created at | Create user | Can restart if completed |
|---|---|---|---|---|---|---|
| @process.id | @process.process_name | @process.description | @process.active_flag | @process.created_at | @process.create_user | @process.can_restart_if_completed |


The idea of Rep With Me came about during the beginning week of finals in the spring semester of 2015 when we noticed how difficult it was to find someone with the perfect schedule to rep with. The benefits of exercise on the body are very commonly known. The physical benefits are advertised almost everywhere you look, but the mental and emotional benefits from exercise are commonly undervalued and fail to receive the attention they truly deserve. After enduring the brutal challenges, and obstacles of finals week we got together to figure out how we could solve this problem. During the summer of 2015 we teamed up and spent countless hours, and nights creating a solution.
So why us? We have been friends for quite some time now, with a cornerstone of our relationship revolving around physical activity, and constantly competing with each other in school, sports, and the weight room. We understand the difficulties that arise when you’re new to an area, and lack someone to rep with. Whether it is finding someone to help you achieve your goals, both mentally and physically, or simply finding someone to help you make it through your workout; Rep With Me will connect a repper in your area to help you solve these problems. We are extremely passionate on solving this problem and hope you will support us on our journey!
In the very simplest of forms Rep With Me connects reppers together who are working out in the same area. Partners can be chosen based on the exercise that is agreed upon, or by activities the gym offers in their area. We plan to release blog posts periodically, which will mostly be written to educate our reppers as well as serve as an outlet for us to share our personal experiences in the gym. These posts will include suggested workouts, balanced meals, health tips, and etiquette in the gym (and we may also include some music suggestions, so keep your ears open!). Whether you’re experienced, or completely new to the healthy lifestyle, Rep With Me will find ways to reward you on your consistency and your willingness to connect with others around you. Above all here at Rep With Me we want to motivate, and connect the world to enjoy the benefits of living a healthier lifestyle.


Node administration
Welcome,
FinalPrep Admin
.
View site
/
Change password
/
Log out
Site administration
Auth Token
Tokens
Add
Change
Authentication and Authorization
Groups
Add
Change
Permissions
Add
Change
Users
Add
Change
Django_Backend
Achivementlists
Add
Change
Branch sectionss
Add
Change
Branch subjectss
Add
Change
Branchs
Add
Change
Disclosuress
Add
Change
Events
Add
Change
Expert talks and seminars
Add
Change
Faculty publicationss
Add
Change
Facultys
Add
Change
Industrial tours and work shopss
Add
Change
Lab resourcess
Add
Change
Lesson plans
Add
Change
Marquees
Add
Change
Nbas
Add
Change
Newss
Add
Change
Notices
Add
Change
Photo gallery titles
Add
Change
Photo gallerys
Add
Change
Placement_ teams
Add
Change
Recruiter_ statss
Add
Change
Recruiterss
Add
Change
Self learnings
Add
Change
Society picss
Add
Change
Societys
Add
Change
Student placeds
Add
Change
Student projectss
Add
Change
Student publicationss
Add
Change
Study material assignments
Add
Change
Study material mcqs
Add
Change
Study material presentations
Add
Change
Study material question papers
Add
Change
Time tables
Add
Change
Trainings
Add
Change
Recent actions
My actions
Dr. Deepali
Faculty
Dr. Achal
Faculty
BPIT is the only self financing institute affiliated to GGSIP University having NBA accreditation for all UG Engineering programs namely, B.Tech. CSE, B.Tech. ECE, B.Tech. IT, B.Tech. EEE
Marquee
Kritika
Faculty
Mugdha
Faculty
Anjali
Faculty
Nikita
Faculty
Kanika
Faculty
Preeti
Faculty
Dinesh
Faculty


Tutorial
Difficulty: ★
Star Catcher
Difficulty: ★
Apple Catcher
Difficulty: ★
Hungry Crab
Difficulty: ★
Squid Chase
Difficulty: ★
Rocket Race
Difficulty: ★ ★
Obstacle Dodger
Difficulty: ★ ★
Flappy Bird
Difficulty: ★ ★
Candyland Escape
Difficulty: ★ ★
Boss Fight
Difficulty: ★ ★ ★
Woof Golf
Difficulty: ★ ★ ★


this is a javascript app that provides secure file encryption using the AES-GCM 256 algorithm from WebCryptoAPI provided by your browser.
It's fast, secure and Serverless, the app never uploads the files to the server.
in a small amount of code the app can encrypt any **type** of files at any **size** within seconds.
To use the app all you have to do is Browse a file , Type a Decryption Key or Generate one through our secure key generator . and your encrypted file is ready to download.
NO. hat.sh never stores any files or passwords, it all happens locally in your browser.
YES. hat.sh is free and always will be, we depend only on donations
it's very simple, browse a file, generate a key or type one, click the button!.
No, the app accepts any type at any size.
Yes, the app encrypts the file using the AES-GCM algorithm
provided by the Web Crypto.
everything is done offline in your browser. No data
is going to be sent to any server
NO as mentioned above, we don't keep any data. once you encrypt a file make sure to save the Key.
Hat.sh is an open-source app, it's currently in the beta version, you can help making it better by commiting. it's maintained only in the free time , Will appreciate your help by donating.


This is a set of utilities for viewing over/under stereo panoramas on the web. Primary focus is on Ansel, but any panorama in the over/under format should work (e.g. converted Cardboard Camera images).
Works with Experimental Chromium. The vive controllers do not work properly with the latest Chromium build, so use Sep. 23 for now.
Load a panorama stored on your computer by dragging and dropping into the browser window.
RemoteLoad a panorama uploaded to an image hosting service (e.g. Imgur). Also generates URLs that can be shared with friends.
Simple RedditFor viewing the front page of r/overundervr.
Out of VR, press the spacebar to advance. In VR, press the trigger on a Vive remote. Also, I threw in the drag-and-drop functionality for convenience.
A super experimental viewer for Vive. The product of a few days spent messing around with a Three.js example made by mrdoob.
Questions, comments, bug reports? Please file an issue on GitHub.
Made by Ben Pyrik using A-Frame and three.js over the 2016 Christmas break.


--- title: 'SHAP Visualization in R (first post)' author: Yang Liu date: '2018-10-14' slug: shap-visualization-for-xgboost categories: - Machine Learning - Data Visualization tags: - XGBoost - SHAP output: blogdown::html_page: toc: true ---
Update 19/07/21:
Since my R Package SHAPforxgboost has been released on CRAN, I updated this post using the new functions and illustrate how to use these functions using two datasets. For more information, please refer to: SHAP visualization for XGBoost in R
This is the example I used in the package SHAPforxgboost
# Example use iris
suppressPackageStartupMessages({
library(SHAPforxgboost)
library(xgboost)
library(data.table)
library(ggplot2)
})
X1 = as.matrix(iris[,-5])
mod1 = xgboost::xgboost(
data = X1, label = iris$Species, gamma = 0, eta = 1,
lambda = 0,nrounds = 1, verbose = F)
# shap.values(model, X_dataset) returns the SHAP
# data matrix and ranked features by mean|SHAP|
shap_values <- shap.values(xgb_model = mod1, X_train = X1)
shap_values$mean_shap_score
## Petal.Length Petal.Width Sepal.Length Sepal.Width
## 0.62935975 0.21664035 0.02910357 0.00000000
shap_values_iris <- shap_values$shap_score
# shap.prep() returns the long-format SHAP data from either model or
shap_long_iris <- shap.prep(xgb_model = mod1, X_train = X1)
# is the same as: using given shap_contrib
shap_long_iris <- shap.prep(shap_contrib = shap_values_iris, X_train = X1)
shap.plot.summary(shap_long_iris)
# option of dilute is offered to make plot faster if there are over thousands of observations
# please see documentation for details.
shap.plot.summary(shap_long_iris, x_bound = 1.5, dilute = 10)
# option 1: from the xgboost model
shap.plot.summary.wrap1(mod1, X1, top_n = 3)
# option 2: supply a self-made SHAP values dataset (e.g. sometimes as output from cross-validation)
shap.plot.summary.wrap2(shap_score = shap_values$shap_score, X1, top_n = 3)
shap.plot.dependence(data_long = shap_long_iris, x="Petal.Length",
y = "Petal.Width", color_feature = "Petal.Width")
The without color version, just plot SHAP value against feature value:
shap.plot.dependence(data_long = shap_long_iris, "Petal.Length")
# To get the interaction SHAP dataset for plotting:
# fit the xgboost model
mod1 = xgboost::xgboost(
data = as.matrix(iris[,-5]), label = iris$Species,
gamma = 0, eta = 1, lambda = 0,nrounds = 1, verbose = FALSE)
# Use either:
data_int <- shap.prep.interaction(xgb_mod = mod1,
X_train = as.matrix(iris[,-5]))
# or:
shap_int <- predict(mod1, as.matrix(iris[,-5]),
predinteraction = TRUE)
# **SHAP interaction effect plot **
shap.plot.dependence(data_long = shap_long_iris,
data_int = shap_int_iris,
x="Petal.Length",
y = "Petal.Width",
color_feature = "Petal.Width")
# **SHAP force plot**
plot_data <- shap.prep.stack.data(shap_contrib = shap_values_iris,
n_groups = 4)
shap.plot.force_plot(plot_data)
shap.plot.force_plot(plot_data, zoom_in_group = 2)
# plot all the clusters:
shap.plot.force_plot_bygroup(plot_data)
This example is based on the slum data I used in the earilier post.
geom_sina
from ggforce
to make the sina plotLoad the xgboost model
best_rmse_index <- 56
best_rmse <- 0.2102
best_seednumber <- 3660
best_param <- list(objective = "reg:linear", # For regression
eval_metric = "rmse", # rmse is used for regression
max_depth = 9,
eta = 0.09822, # Learning rate, default: 0.3
subsample = 0.64,
colsample_bytree = 0.6853,
min_child_weight = 6, # These two are important
max_delta_step = 8)
# The best index (min_rmse_index) is the best "nround" in the model
nround <- best_rmse_index
set.seed(best_seednumber)
mod1 <- xgboost::xgboost(data = X_train, label = Y_train, params = best_param, nround = nround, verbose = F)
## [23:14:47] WARNING: amalgamation/../src/objective/regression_obj.cu:174: reg:linear is now deprecated in favor of reg:squarederror.
shap.plot.summary.wrap1(mod1, X_train, top_n = 10)
data_long <- shap.prep(mod1, X_train = X_train)
shap_values <- shap.values(mod1, X_train)
features_ranked <- names(shap_values$mean_shap_score)[1:4]
fig_list <- lapply(features_ranked, shap.plot.dependence, data_long = data_long)
gridExtra::grid.arrange(grobs = fig_list, ncol = 2)
xgb.shap.plot
functionxgboost::xgb.plot.shap(data = X_train, model = mod1, top_n = 4, n_col = 2)
Since there are so many features in this dataset, we pick only top 6 and merge the rest.
geom_col
to show features each contributing to push the model output from the base value (the average model output) to the model output.force_plot_data <- shap.prep.stack.data(shap_contrib = shap_values$shap_score, top_n = 5, n_groups = 4)
shap.plot.force_plot(force_plot_data)
shap.plot.force_plot_bygroup(force_plot_data)


This simulation solves the Navier-Stokes equations for incompressible fluids. The fluid visualization includes thousands of Lagrangian particles that follow the fluid's velocity field and leave behind semi-transparent trails as they move. All computation happens in several GPU fragment shaders for real-time performance.
Instructions: Click and drag to apply a force to the fluid. This simulation can also be used to export vector graphics and toolpaths for pen plotting, see instructions on Github.
To learn more about the math involved, check out the following sources:
Real-time ink simulation using a grid-particle method - mixing Eulerian and Lagrangian techniques for fluids.Fast Fluid Dynamics Simulation on the GPU - a very well written tutorial about programming the Navier-Stokes equations on a GPU. Though not WebGL specific, it was still very useful.
Fluid Simulation (with WebGL demo) - this article has some nice, interactive graphics that helped me debug my code.
Stable Fluids - a paper about stable numerical methods for evaluating Navier-Stokes on a discrete grid. Also check out Stam's book The Art of Fluid Animation.
By Amanda Ghassaei, code on Github.


Go Rules:
- Players take turns placing tokens on the board, which consists of clicking
on one of the intersection of two lines.
- Goal is to enclose the most amount of space on the board.
- If a group of one opponent's tokens are completely surrounded by the other
opponent's tokens, the surrounded tokens are removed from play.


| PostgreSQL 9.0.10 Documentation | ||||
|---|---|---|---|---|
| Prev | Up | Chapter 37. The Rule System | Next |
Rules that are defined on INSERT, UPDATE, and DELETE are significantly different from the view rules described in the previous section. First, their CREATE RULE command allows more:
They are allowed to have no action.
They can have multiple actions.
They can be INSTEAD or ALSO (the default).
The pseudorelations NEW and OLD become useful.
They can have rule qualifications.
Second, they don't modify the query tree in place. Instead they create zero or more new query trees and can throw away the original one.
Keep the syntax:
CREATE [ OR REPLACE ] RULE name AS ON event TO table [ WHERE condition ] DO [ ALSO | INSTEAD ] { NOTHING | command | ( command ; command ... ) }
in mind. In the following, update rules means rules that are defined on INSERT, UPDATE, or DELETE.
Update rules get applied by the rule system when the result relation and the command type of a query tree are equal to the object and event given in the CREATE RULE command. For update rules, the rule system creates a list of query trees. Initially the query-tree list is empty. There can be zero (NOTHING key word), one, or multiple actions. To simplify, we will look at a rule with one action. This rule can have a qualification or not and it can be INSTEAD or ALSO (the default).
What is a rule qualification? It is a restriction that tells when the actions of the rule should be done and when not. This qualification can only reference the pseudorelations NEW and/or OLD, which basically represent the relation that was given as object (but with a special meaning).
So we have three cases that produce the following query trees for a one-action rule.
the query tree from the rule action with the original query tree's qualification added
the query tree from the rule action with the rule qualification and the original query tree's qualification added
the query tree from the rule action with the rule qualification and the original query tree's qualification; and the original query tree with the negated rule qualification added
Finally, if the rule is ALSO, the unchanged original query tree is added to the list. Since only qualified INSTEAD rules already add the original query tree, we end up with either one or two output query trees for a rule with one action.
For ON INSERT rules, the original query (if not suppressed by INSTEAD) is done before any actions added by rules. This allows the actions to see the inserted row(s). But for ON UPDATE and ON DELETE rules, the original query is done after the actions added by rules. This ensures that the actions can see the to-be-updated or to-be-deleted rows; otherwise, the actions might do nothing because they find no rows matching their qualifications.
The query trees generated from rule actions are thrown into the rewrite system again, and maybe more rules get applied resulting in more or less query trees. So a rule's actions must have either a different command type or a different result relation than the rule itself is on, otherwise this recursive process will end up in an infinite loop. (Recursive expansion of a rule will be detected and reported as an error.)
The query trees found in the actions of the pg_rewrite system catalog are only templates. Since they can reference the range-table entries for NEW and OLD, some substitutions have to be made before they can be used. For any reference to NEW, the target list of the original query is searched for a corresponding entry. If found, that entry's expression replaces the reference. Otherwise, NEW means the same as OLD (for an UPDATE) or is replaced by a null value (for an INSERT). Any reference to OLD is replaced by a reference to the range-table entry that is the result relation.
After the system is done applying update rules, it applies view rules to the produced query tree(s). Views cannot insert new update actions so there is no need to apply update rules to the output of view rewriting.
Say we want to trace changes to the sl_avail column in the shoelace_data relation. So we set up a log table and a rule that conditionally writes a log entry when an UPDATE is performed on shoelace_data.
CREATE TABLE shoelace_log ( sl_name text, -- shoelace changed sl_avail integer, -- new available value log_who text, -- who did it log_when timestamp -- when ); CREATE RULE log_shoelace AS ON UPDATE TO shoelace_data WHERE NEW.sl_avail <> OLD.sl_avail DO INSERT INTO shoelace_log VALUES ( NEW.sl_name, NEW.sl_avail, current_user, current_timestamp );
Now someone does:
UPDATE shoelace_data SET sl_avail = 6 WHERE sl_name = 'sl7';
and we look at the log table:
SELECT * FROM shoelace_log; sl_name | sl_avail | log_who | log_when ---------+----------+---------+---------------------------------- sl7 | 6 | Al | Tue Oct 20 16:14:45 1998 MET DST (1 row)
That's what we expected. What happened in the background is the following. The parser created the query tree:
UPDATE shoelace_data SET sl_avail = 6 FROM shoelace_data shoelace_data WHERE shoelace_data.sl_name = 'sl7';
There is a rule log_shoelace that is ON UPDATE with the rule qualification expression:
NEW.sl_avail <> OLD.sl_avail
and the action:
INSERT INTO shoelace_log VALUES ( new.sl_name, new.sl_avail, current_user, current_timestamp ) FROM shoelace_data new, shoelace_data old;
(This looks a little strange since you cannot normally write INSERT ... VALUES ... FROM. The FROM clause here is just to indicate that there are range-table entries in the query tree for new and old. These are needed so that they can be referenced by variables in the INSERT command's query tree.)
The rule is a qualified ALSO rule, so the rule system has to return two query trees: the modified rule action and the original query tree. In step 1, the range table of the original query is incorporated into the rule's action query tree. This results in:
INSERT INTO shoelace_log VALUES ( new.sl_name, new.sl_avail, current_user, current_timestamp ) FROM shoelace_data new, shoelace_data old, shoelace_data shoelace_data;
In step 2, the rule qualification is added to it, so the result set is restricted to rows where sl_avail changes:
INSERT INTO shoelace_log VALUES ( new.sl_name, new.sl_avail, current_user, current_timestamp ) FROM shoelace_data new, shoelace_data old, shoelace_data shoelace_data WHERE new.sl_avail <> old.sl_avail;
(This looks even stranger, since INSERT ... VALUES doesn't have a WHERE clause either, but the planner and executor will have no difficulty with it. They need to support this same functionality anyway for INSERT ... SELECT.)
In step 3, the original query tree's qualification is added, restricting the result set further to only the rows that would have been touched by the original query:
INSERT INTO shoelace_log VALUES ( new.sl_name, new.sl_avail, current_user, current_timestamp ) FROM shoelace_data new, shoelace_data old, shoelace_data shoelace_data WHERE new.sl_avail <> old.sl_avail AND shoelace_data.sl_name = 'sl7';
Step 4 replaces references to NEW by the target list entries from the original query tree or by the matching variable references from the result relation:
INSERT INTO shoelace_log VALUES ( shoelace_data.sl_name, 6, current_user, current_timestamp ) FROM shoelace_data new, shoelace_data old, shoelace_data shoelace_data WHERE 6 <> old.sl_avail AND shoelace_data.sl_name = 'sl7';
Step 5 changes OLD references into result relation references:
INSERT INTO shoelace_log VALUES ( shoelace_data.sl_name, 6, current_user, current_timestamp ) FROM shoelace_data new, shoelace_data old, shoelace_data shoelace_data WHERE 6 <> shoelace_data.sl_avail AND shoelace_data.sl_name = 'sl7';
That's it. Since the rule is ALSO, we also output the original query tree. In short, the output from the rule system is a list of two query trees that correspond to these statements:
INSERT INTO shoelace_log VALUES ( shoelace_data.sl_name, 6, current_user, current_timestamp ) FROM shoelace_data WHERE 6 <> shoelace_data.sl_avail AND shoelace_data.sl_name = 'sl7'; UPDATE shoelace_data SET sl_avail = 6 WHERE sl_name = 'sl7';
These are executed in this order, and that is exactly what the rule was meant to do.
The substitutions and the added qualifications ensure that, if the original query would be, say:
UPDATE shoelace_data SET sl_color = 'green' WHERE sl_name = 'sl7';
no log entry would get written. In that case, the original query tree does not contain a target list entry for sl_avail, so NEW.sl_avail will get replaced by shoelace_data.sl_avail. Thus, the extra command generated by the rule is:
INSERT INTO shoelace_log VALUES ( shoelace_data.sl_name, shoelace_data.sl_avail, current_user, current_timestamp ) FROM shoelace_data WHERE shoelace_data.sl_avail <> shoelace_data.sl_avail AND shoelace_data.sl_name = 'sl7';
and that qualification will never be true.
It will also work if the original query modifies multiple rows. So if someone issued the command:
UPDATE shoelace_data SET sl_avail = 0 WHERE sl_color = 'black';
four rows in fact get updated (sl1, sl2, sl3, and sl4). But sl3 already has sl_avail = 0. In this case, the original query trees qualification is different and that results in the extra query tree:
INSERT INTO shoelace_log SELECT shoelace_data.sl_name, 0, current_user, current_timestamp FROM shoelace_data WHERE 0 <> shoelace_data.sl_avail AND shoelace_data.sl_color = 'black';
being generated by the rule. This query tree will surely insert three new log entries. And that's absolutely correct.
Here we can see why it is important that the original query tree is executed last. If the UPDATE had been executed first, all the rows would have already been set to zero, so the logging INSERT would not find any row where 0 <> shoelace_data.sl_avail.
A simple way to protect view relations from the mentioned possibility that someone can try to run INSERT, UPDATE, or DELETE on them is to let those query trees get thrown away. So we could create the rules:
CREATE RULE shoe_ins_protect AS ON INSERT TO shoe DO INSTEAD NOTHING; CREATE RULE shoe_upd_protect AS ON UPDATE TO shoe DO INSTEAD NOTHING; CREATE RULE shoe_del_protect AS ON DELETE TO shoe DO INSTEAD NOTHING;
If someone now tries to do any of these operations on the view relation shoe, the rule system will apply these rules. Since the rules have no actions and are INSTEAD, the resulting list of query trees will be empty and the whole query will become nothing because there is nothing left to be optimized or executed after the rule system is done with it.
A more sophisticated way to use the rule system is to create rules that rewrite the query tree into one that does the right operation on the real tables. To do that on the shoelace view, we create the following rules:
CREATE RULE shoelace_ins AS ON INSERT TO shoelace DO INSTEAD INSERT INTO shoelace_data VALUES ( NEW.sl_name, NEW.sl_avail, NEW.sl_color, NEW.sl_len, NEW.sl_unit ); CREATE RULE shoelace_upd AS ON UPDATE TO shoelace DO INSTEAD UPDATE shoelace_data SET sl_name = NEW.sl_name, sl_avail = NEW.sl_avail, sl_color = NEW.sl_color, sl_len = NEW.sl_len, sl_unit = NEW.sl_unit WHERE sl_name = OLD.sl_name; CREATE RULE shoelace_del AS ON DELETE TO shoelace DO INSTEAD DELETE FROM shoelace_data WHERE sl_name = OLD.sl_name;
If you want to support RETURNING queries on the view, you need to make the rules include RETURNING clauses that compute the view rows. This is usually pretty trivial for views on a single table, but it's a bit tedious for join views such as shoelace. An example for the insert case is:
CREATE RULE shoelace_ins AS ON INSERT TO shoelace DO INSTEAD INSERT INTO shoelace_data VALUES ( NEW.sl_name, NEW.sl_avail, NEW.sl_color, NEW.sl_len, NEW.sl_unit ) RETURNING shoelace_data.*, (SELECT shoelace_data.sl_len * u.un_fact FROM unit u WHERE shoelace_data.sl_unit = u.un_name);
Note that this one rule supports both INSERT and INSERT RETURNING queries on the view — the RETURNING clause is simply ignored for INSERT.
Now assume that once in a while, a pack of shoelaces arrives at the shop and a big parts list along with it. But you don't want to manually update the shoelace view every time. Instead we setup two little tables: one where you can insert the items from the part list, and one with a special trick. The creation commands for these are:
CREATE TABLE shoelace_arrive ( arr_name text, arr_quant integer ); CREATE TABLE shoelace_ok ( ok_name text, ok_quant integer ); CREATE RULE shoelace_ok_ins AS ON INSERT TO shoelace_ok DO INSTEAD UPDATE shoelace SET sl_avail = sl_avail + NEW.ok_quant WHERE sl_name = NEW.ok_name;
Now you can fill the table shoelace_arrive with the data from the parts list:
SELECT * FROM shoelace_arrive; arr_name | arr_quant ----------+----------- sl3 | 10 sl6 | 20 sl8 | 20 (3 rows)
Take a quick look at the current data:
SELECT * FROM shoelace; sl_name | sl_avail | sl_color | sl_len | sl_unit | sl_len_cm ----------+----------+----------+--------+---------+----------- sl1 | 5 | black | 80 | cm | 80 sl2 | 6 | black | 100 | cm | 100 sl7 | 6 | brown | 60 | cm | 60 sl3 | 0 | black | 35 | inch | 88.9 sl4 | 8 | black | 40 | inch | 101.6 sl8 | 1 | brown | 40 | inch | 101.6 sl5 | 4 | brown | 1 | m | 100 sl6 | 0 | brown | 0.9 | m | 90 (8 rows)
Now move the arrived shoelaces in:
INSERT INTO shoelace_ok SELECT * FROM shoelace_arrive;
and check the results:
SELECT * FROM shoelace ORDER BY sl_name; sl_name | sl_avail | sl_color | sl_len | sl_unit | sl_len_cm ----------+----------+----------+--------+---------+----------- sl1 | 5 | black | 80 | cm | 80 sl2 | 6 | black | 100 | cm | 100 sl7 | 6 | brown | 60 | cm | 60 sl4 | 8 | black | 40 | inch | 101.6 sl3 | 10 | black | 35 | inch | 88.9 sl8 | 21 | brown | 40 | inch | 101.6 sl5 | 4 | brown | 1 | m | 100 sl6 | 20 | brown | 0.9 | m | 90 (8 rows) SELECT * FROM shoelace_log; sl_name | sl_avail | log_who| log_when ---------+----------+--------+---------------------------------- sl7 | 6 | Al | Tue Oct 20 19:14:45 1998 MET DST sl3 | 10 | Al | Tue Oct 20 19:25:16 1998 MET DST sl6 | 20 | Al | Tue Oct 20 19:25:16 1998 MET DST sl8 | 21 | Al | Tue Oct 20 19:25:16 1998 MET DST (4 rows)
It's a long way from the one INSERT ... SELECT to these results. And the description of the query-tree transformation will be the last in this chapter. First, there is the parser's output:
INSERT INTO shoelace_ok SELECT shoelace_arrive.arr_name, shoelace_arrive.arr_quant FROM shoelace_arrive shoelace_arrive, shoelace_ok shoelace_ok;
Now the first rule shoelace_ok_ins is applied and turns this into:
UPDATE shoelace SET sl_avail = shoelace.sl_avail + shoelace_arrive.arr_quant FROM shoelace_arrive shoelace_arrive, shoelace_ok shoelace_ok, shoelace_ok old, shoelace_ok new, shoelace shoelace WHERE shoelace.sl_name = shoelace_arrive.arr_name;
and throws away the original INSERT on shoelace_ok. This rewritten query is passed to the rule system again, and the second applied rule shoelace_upd produces:
UPDATE shoelace_data SET sl_name = shoelace.sl_name, sl_avail = shoelace.sl_avail + shoelace_arrive.arr_quant, sl_color = shoelace.sl_color, sl_len = shoelace.sl_len, sl_unit = shoelace.sl_unit FROM shoelace_arrive shoelace_arrive, shoelace_ok shoelace_ok, shoelace_ok old, shoelace_ok new, shoelace shoelace, shoelace old, shoelace new, shoelace_data shoelace_data WHERE shoelace.sl_name = shoelace_arrive.arr_name AND shoelace_data.sl_name = shoelace.sl_name;
Again it's an INSTEAD rule and the previous query tree is trashed. Note that this query still uses the view shoelace. But the rule system isn't finished with this step, so it continues and applies the _RETURN rule on it, and we get:
UPDATE shoelace_data SET sl_name = s.sl_name, sl_avail = s.sl_avail + shoelace_arrive.arr_quant, sl_color = s.sl_color, sl_len = s.sl_len, sl_unit = s.sl_unit FROM shoelace_arrive shoelace_arrive, shoelace_ok shoelace_ok, shoelace_ok old, shoelace_ok new, shoelace shoelace, shoelace old, shoelace new, shoelace_data shoelace_data, shoelace old, shoelace new, shoelace_data s, unit u WHERE s.sl_name = shoelace_arrive.arr_name AND shoelace_data.sl_name = s.sl_name;
Finally, the rule log_shoelace gets applied, producing the extra query tree:
INSERT INTO shoelace_log SELECT s.sl_name, s.sl_avail + shoelace_arrive.arr_quant, current_user, current_timestamp FROM shoelace_arrive shoelace_arrive, shoelace_ok shoelace_ok, shoelace_ok old, shoelace_ok new, shoelace shoelace, shoelace old, shoelace new, shoelace_data shoelace_data, shoelace old, shoelace new, shoelace_data s, unit u, shoelace_data old, shoelace_data new shoelace_log shoelace_log WHERE s.sl_name = shoelace_arrive.arr_name AND shoelace_data.sl_name = s.sl_name AND (s.sl_avail + shoelace_arrive.arr_quant) <> s.sl_avail;
After that the rule system runs out of rules and returns the generated query trees.
So we end up with two final query trees that are equivalent to the SQL statements:
INSERT INTO shoelace_log SELECT s.sl_name, s.sl_avail + shoelace_arrive.arr_quant, current_user, current_timestamp FROM shoelace_arrive shoelace_arrive, shoelace_data shoelace_data, shoelace_data s WHERE s.sl_name = shoelace_arrive.arr_name AND shoelace_data.sl_name = s.sl_name AND s.sl_avail + shoelace_arrive.arr_quant <> s.sl_avail; UPDATE shoelace_data SET sl_avail = shoelace_data.sl_avail + shoelace_arrive.arr_quant FROM shoelace_arrive shoelace_arrive, shoelace_data shoelace_data, shoelace_data s WHERE s.sl_name = shoelace_arrive.sl_name AND shoelace_data.sl_name = s.sl_name;
The result is that data coming from one relation inserted into another, changed into updates on a third, changed into updating a fourth plus logging that final update in a fifth gets reduced into two queries.
There is a little detail that's a bit ugly. Looking at the two queries, it turns out that the shoelace_data relation appears twice in the range table where it could definitely be reduced to one. The planner does not handle it and so the execution plan for the rule systems output of the INSERT will be
Nested Loop -> Merge Join -> Seq Scan -> Sort -> Seq Scan on s -> Seq Scan -> Sort -> Seq Scan on shoelace_arrive -> Seq Scan on shoelace_data
while omitting the extra range table entry would result in a
Merge Join -> Seq Scan -> Sort -> Seq Scan on s -> Seq Scan -> Sort -> Seq Scan on shoelace_arrive
which produces exactly the same entries in the log table. Thus, the rule system caused one extra scan on the table shoelace_data that is absolutely not necessary. And the same redundant scan is done once more in the UPDATE. But it was a really hard job to make that all possible at all.
Now we make a final demonstration of the PostgreSQL rule system and its power. Say you add some shoelaces with extraordinary colors to your database:
INSERT INTO shoelace VALUES ('sl9', 0, 'pink', 35.0, 'inch', 0.0); INSERT INTO shoelace VALUES ('sl10', 1000, 'magenta', 40.0, 'inch', 0.0);
We would like to make a view to check which shoelace entries do not fit any shoe in color. The view for this is:
CREATE VIEW shoelace_mismatch AS SELECT * FROM shoelace WHERE NOT EXISTS (SELECT shoename FROM shoe WHERE slcolor = sl_color);
Its output is:
SELECT * FROM shoelace_mismatch; sl_name | sl_avail | sl_color | sl_len | sl_unit | sl_len_cm ---------+----------+----------+--------+---------+----------- sl9 | 0 | pink | 35 | inch | 88.9 sl10 | 1000 | magenta | 40 | inch | 101.6
Now we want to set it up so that mismatching shoelaces that are not in stock are deleted from the database. To make it a little harder for PostgreSQL, we don't delete it directly. Instead we create one more view:
CREATE VIEW shoelace_can_delete AS SELECT * FROM shoelace_mismatch WHERE sl_avail = 0;
and do it this way:
DELETE FROM shoelace WHERE EXISTS (SELECT * FROM shoelace_can_delete WHERE sl_name = shoelace.sl_name);
Voilà:
SELECT * FROM shoelace; sl_name | sl_avail | sl_color | sl_len | sl_unit | sl_len_cm ---------+----------+----------+--------+---------+----------- sl1 | 5 | black | 80 | cm | 80 sl2 | 6 | black | 100 | cm | 100 sl7 | 6 | brown | 60 | cm | 60 sl4 | 8 | black | 40 | inch | 101.6 sl3 | 10 | black | 35 | inch | 88.9 sl8 | 21 | brown | 40 | inch | 101.6 sl10 | 1000 | magenta | 40 | inch | 101.6 sl5 | 4 | brown | 1 | m | 100 sl6 | 20 | brown | 0.9 | m | 90 (9 rows)
A DELETE on a view, with a subquery qualification that in total uses 4 nesting/joined views, where one of them itself has a subquery qualification containing a view and where calculated view columns are used, gets rewritten into one single query tree that deletes the requested data from a real table.
There are probably only a few situations out in the real world where such a construct is necessary. But it makes you feel comfortable that it works.


val targetParseFunction: (Header, Row) -> TTarget
A function to parse the target of each row in the CSV file.
targetParseFunction - A function to parse the target of each row in the CSV file.
targetParseFunction


Medusa is an automatic Video Library Manager for TV Shows.
It watches for new episodes of your favorite shows, and when they are posted it does its magic: automatic torrent/nzb searching, downloading, and processing at the qualities you want.
Can notify Kodi, XBMC, Growl, Trakt, Twitter, WDTV and more when new episodes are available.
Anime is also supported.
Don't miss your weekly episodes!
Automatic subtitle matching and downloads from Addic7ed, OpenSubtitles, Podnapisi, TVSubtitles and more.
In addition to torrent trackers, Medusa also supports usenet: NZBs, BinSearch, Usenet-Crawler and many more are available.
Available for all platforms, with a simple responsive web interface.
Poster/banner/fanart downloads, and NFO/TBN generation
Configurable automatic episode renaming, sorting, and other forms of processing
Searches TheTVDB.com and AniDB.net for shows, seasons, episodes, and metadata
Episode status management allows for mass failing seasons/episodes to force retries
DVD Order numbering to return results in DVD order instead of Air-By-Date order
Allows you to choose which indexer to have Medusa fetch its show info from when importing
Automatic XEM Scene Numbering/Naming for seasons/episodes
Specials and multi-episode torrent/nzb support
Improved handling of failed downloads
Real SSL certificate validation
It's simpler than you imagine. Let's have a look.
Before using this with your existing database (sickbeard.db) please make a backup copy of it and delete any other database files such as cache.db and failed.db if present. We HIGHLY recommend starting out with no database files at all to make this a fresh start but the choice is at your own risk
We're always looking for more hands to code. Don't hesitate to contribute by reporting an issue or pulling out some code!
Join UsDon't wait anymore. Try it. Adopt it.
Download now


Multiple Reports
this table displays the simple information of issue reports.
| Issue Number |
Issue Title |
Type |
Issue Status |
Priority |
Last Updated |
Assigned To |
| 560001 |
Bug_1 |
Code Defect |
UNCONFIRMED |
Point5 |
2/25/2015 |
Kenny |
| 560002 |
Bug_2 |
Code Defect |
UNCONFIRMED |
Point4 |
2/25/2015 |
Amy |
| 560003 |
Bug_3 |
Code Defect |
UNCONFIRMED |
Point5 |
2/25/2015 |
Joshua |
| 560004 |
Bug_4 |
Code Defect |
UNCONFIRMED |
Point5 |
2/25/2015 |
Joe |
| 560005 |
Bug_5 |
Code Defect |
UNCONFIRMED |
Point5 |
2/25/2015 |
Jerrold |
| 560006 |
Bug_6 |
XXXXX |
XXXXX |
Point5 |
2/25/2015 |
Samer |


Home
Gallery
Photography
Sketches
Songs-Videos
Literature
Non Technical
Technical
Articles
Technical Articles
Non Technical Articles
Events and Achievements
Events
Achievements
ABOUT
Close
Technical Articles
Featured Article
Is Cloud Computing promising for your organization?
The Magic of Artificial Intelligence
What is IoT?
Java.NET: Integration of Java and .NET
What is Steganography
About Saturn and its Moon
Search Engine Optimization
Thin Client Project
Detection and Avoidance of Co-operative black hole attack in MANET
Coping with the Internet of Unnecessary Things
IONIC: Not the Chemistry Stuff
Basics of Virtualization
Critical analysis of phishing websites methods
End of Articles


Comments
-
Greg Hurrell
Are you running the experimental 3.5 alpha series? If so you might be seeing bug #640, the bug in Leopard's NSApplesScript API when running under Garbage Collection. See that bug for the full details. If you are running into bug #640 then I recommend going back to the stable 3.2 series, which also works on Leopard, but which isn't affected by the Apple bug because it doesn't use Garbage Collection.
-
Parscheese
Yes. I am running 3.5a5. I will try 3.2 and see how I go. Thanks.
-
anonymous
I bought Synergy after 3.5 was released. How do I get the 3.2 version? Thanks.
-
Greg Hurrell
Both are listed on the downloads page:
https://wincent.com/a/products/synergy-classic/download/
And specifically, this page is dedicated to the 3.2 series:
https://wincent.com/a/products/synergy-classic/download/tiger/
-
Greg Hurrell
Going to mark this one as CLOSED but you're welcome to add additional comments if you have further questions or feedback.
Add a comment
Comments are now closed for this issue.


Expressing ideas into code : My journey begin
I'm from Tezpur, Assam. My first real run-in with programming happened in the second year
of my undergraduate.JavaScript and Python are my primary weapons.
"Which is more important, The journey or the destination ? " asked Big Panda.
"The Company ." said Tiny Dragon.
Basic JavaScript Demonstration


Sara Alshater About me page
- My name is Sara. I am 24, I am intrested in arts
- I graduated from the Art and Design factualy from The University of Jordan.
- I worked as a Ui/Ux Designer.
- My dream is to never stop learning.
Top ten songs:
- Luana Schwengber, Peter Power - Come Forest
- Fleetwood Mac - Dreams
- Ramayana Soul - Almunium Foil
- Gitkin - Footsteps (feat. Carol C)
- Monster Rally & RUMTUM - Forest
- Mildlife - The Magnificent Moon
- Books - Nomathemba
- Kinkajous - All Kinds (STW Premiere)
- Leon Lowman - Morning Song
- Meitei / 冥丁 - Sankai / 山怪


Produces shadow/illusion knitting patterns from images.
Go
Knit images into polygons in the round.
Produces lace patterns based on the edges found in an image.
Work in progress
Generates patterns based on cellular automata rules.


Even though my legal name is Mark I have always gone by Guy, it just seems to fit me a lot more. I have always been a creative and fun individual and my name should reflect that. Currently I am prospective master’s student who has finally found my home in the tech world. It took me a while as my undergraduate degree was in human biology which in itself was gearing me up for med school. But while pursuing further application goodies I realized that the world of health wasn’t for me. So, I started a period of growth to figure out who I am and what I wanted to do as a career. Upon entering the master’s program at Northeastern University, at their Silicon Valley Campus , I was finally able to answer those questions. I am a developer.
My time at the University of California Merced was enlightening. It taught me so many concepts in addition to my understanding of the human body. In my chemistry and biology classes I learned how your body works mechanically, and in my psychology classes I learned how we interact with the world. Getting involved with my campus helped me gain many lifelong friends, and learn about all of the different perspectives that ended up at my school.
Close ProjectFinding the career path, I want to be on has been affirming. Learning about how computers work, and how to get them to work for me has been extremely interesting. The close-knit community of the small school has really created a strong network that I think will follow me for the rest of my life. Getting the opportunity to help others through the program as a Teaching Assistant has been eye opening about how much we have learned in such a short time.
Close Project
Developed and deployed a scalable IM chat server capable of sending and recieving message from mutiple online users. Chat system includes logging, parental control features, expansion of features easily. Fully scalable, and readily deployed.
Designed and implemented card game system in Java capable of playing a variety of games such as Go Fish, Blackjack, etc.
When I’m not spending time coding and learning I often will be thinking out the details of my D&D world. I really enjoy thinking about how all levels of a society would react/think/live out their daily lives in a world that I have created. Fantasy has always been so interesting to me and I love to read and experience it in almost every form its delivered in. I also really enjoy making games, thinking through the logic of a game mechanic, or an idea for a story is a fun past time. I can often be found doing logic puzzles or Rubik’s cubes to pass the time. When I’m stressed, I like to try and make sense of the world through baking, orange chocolate cookies are my favorite!
Close Project


Welcome!
Hello There. My name is Muhammed Anwar and welcome to my website. On here you can read about my past projects and find more information on my current work and research interests. Visit the About Me page to get a glimpse of my past accomplisments, or visit the Blog to see my latest adventures.
{{>fromblog sectionTitle = 'From Blog'}}
{{> footer template='page' }}


#!/usr/bin/env python
"""The planner module manages goals and goal paths for the robot.
The planner can be either: simple, in which it picks a random
feasible point on the map as a goal pose; particle-based, in which
it selects a goal pose from a particle cloud; or probability-based,
in which it selects a goal pose from a continuous probability
distribution.
The goal path generated uses the A* planning algorithm, and the
goal pose is generated as the best location from which the robot
can view its target.
"""
__author__ = "Nick Sweet"
__copyright__ = "Copyright 2015, Cohrint"
__credits__ = ["Nick Sweet", "Nisar Ahmed"]
__license__ = "GPL"
__version__ = "1.0.0"
__maintainer__ = "Nick Sweet"
__email__ =<EMAIL_ADDRESS>__status__ = "Development"
import logging
import random
import math
import numpy as np
from shapely.geometry import Point, LineString
[docs]class Planner(object):
"""The planner class generates goal poses and paths for a robot.
The goal poses are generated either as the exact target pose, or as a
view pose from which to see the target. Goal paths are generated as a
deterministic path from the robot's current location to the goal pose.
.. image:: img/classes_Planner.png
Attributes
----------
types : {'simple','particle','MAP'}
A collection of all methods in which the goal planner finds its goal
point:
* a `simple` planner randomly picks a point in the feasible
region;
* a `particle` planner selects the particle with greatest
probability (or randomly selects from the particles that share
the greatest probability if more than one exists.)
* a `MAP` or maximum a posteriori planner uses the point of
greatest posterior probability as the goal point.
Parameters
----------
type_ : {'simple','particle','MAP'}
The choice of planner type.
feasible_layer : FeasibleLayer
A layer object providing both permissible point regions for any object
and permissible pose regions for any robot with physical dimensions.
view_distance : float, optional
The distance in meters from the target goal to place the view goal.
Default is 0.3m.
use_target_as_goal : bool, optional
Use the target location as a goal, rather than using a view pose as
the goal.
"""
types = ['simple', 'particle', 'MAP']
def __init__(self, type_, feasible_layer, view_distance=0.3,
use_target_as_goal=True):
if type_ not in Planner.types:
raise ValueError('{} is not a type from the list '
'of acceptable types: {}'
.format(type_, Planner.types))
self.type = type_
self.feasible_layer = feasible_layer
self.view_distance = view_distance
self.use_target_as_goal = use_target_as_goal
[docs] def find_goal_pose(self, fusion_engine=None,):
"""Find a goal pose, agnostic of planner type.
Parameters
----------
fusion_engine : FusionEngine, optional
If using a non-simple planner, a provided fusion engine is used
to generate the goal poses. Defaults to None, using a `simple`
planners.
Returns
-------
array_like
A pose as [x,y,theta] in [m,m,degrees].
"""
if self.type == 'simple':
target_pose = self.find_goal_simply()
elif self.type == 'particle':
target_pose = self.find_goal_from_particles(fusion_engine)
elif self.type == 'MAP':
target_pose = self.find_goal_from_probability(fusion_engine)
if self.use_target_as_goal:
self.goal_pose = target_pose
logging.info("New goal: {}".format(["{:.2f}".format(a) for a in
self.goal_pose]))
else:
self.goal_pose = self.view_goal(target_pose)
logging.info("New view goal: {} to see {}"
.format(["{:.2f}".format(a) for a in target_pose],
["{:.2f}".format(a) for a in self.goal_pose]))
return self.goal_pose
[docs] def update_path(self, current_pose, goal_pose=None):
"""Find path to a goal_pose, agnostic of planner type.
Parameters
----------
current_pose : array_like
The robot's current pose as [x,y,theta] in [m,m,degrees].
goal_pose : array_like, optional
The goal pose as [x,y,theta] in [m,m,degrees] used to generate
the path. Defaults to ``None`` which uses the planner's current
goal pose.
Returns
-------
array_like
Returns both a complete goal path (as a Shapely `LineString`) and
the angle between the robot's current pose and the first path
segment.
"""
if not goal_pose:
goal_pose = self.goal_pose
# <>TODO: Expand to A* instead of direct paths
self.goal_path = LineString((current_pose[0:2], goal_pose[0:2]))
# <>TODO: Generate a list of path_theta values, one per path segment
self.path_theta = math.atan2(goal_pose[1] - current_pose[1],
goal_pose[0] - current_pose[0]) # [rad]
self.path_theta = math.degrees(self.path_theta) % 360
return self.goal_path, self.path_theta
[docs] def view_goal(self, target_pose):
"""Generate a goal as a view pose from which to see the target.
Translate a target's position to a feasible goal pose for the robot,
such that the robot can easily see the target. It is not expected
that the target's heading matters (i.e. the view pose need only
capture the target, not the target from any side).
Parameters
----------
target_pose : array_like
The target pose as [x,y,theta] in [m,m,degrees].
Returns
-------
array_like
A pose as [x,y,theta] in [m,m,degrees].
"""
# <>TODO: Extend this to deterministically view the target's face(s)
# Define a circle as view_distance from the target_pose
view_circle = Point(target_pose[0:2])\
.buffer(self.view_distance).exterior
# Find any feasible point on the view_circle
feasible_arc = self.feasible_layer\
.pose_region.intersection(view_circle)
pt = feasible_arc.representative_point()
theta = math.atan2(pt.y - target_pose[1],
pt.x - target_pose[0]) # [rad]
theta = math.degrees(theta) % 360
goal_pose = pt.x, pt.y, theta
return goal_pose
[docs] def find_goal_simply(self):
"""Find a random goal pose on the map.
Find a random goal pose within map boundaries, residing in the
feasible pose regions associated with the map.
Returns
-------
array_like
A pose as [x,y,theta] in [m,m,degrees].
"""
theta = random.uniform(0, 360)
feasible_point_generated = False
bounds = self.feasible_layer.bounds
while not feasible_point_generated:
x = random.uniform(bounds[0], bounds[2])
y = random.uniform(bounds[1], bounds[3])
goal_pt = Point(x, y)
if self.feasible_layer.pose_region.contains(goal_pt):
feasible_point_generated = True
return [x, y, theta]
[docs] def find_goal_from_particles(self, fusion_engine):
"""Find a goal from the most likely particle(s).
Find a goal pose taken from the particle with the greatest associated
probability. If multiple particles share the maximum probability, the
goal pose will be randomly selected from those particles.
Parameters
----------
fusion_engine : FusionEngine
A fusion engine with a particle filter.
Returns
-------
array_like
A pose as [x,y,theta] in [m,m,degrees].
"""
# <>TODO: @Nick Test this!
if not next(fusion_engine.filters.iteritems()):
raise ValueError('The fusion_engine must have a '
'particle_filter.')
theta = random.uniform(0, 360)
# If tracking multiple targets, use the combined particle filter
if len(fusion_engine.filters) > 1:
particles = fusion_engine.filters['combined'].particles
else:
particles = next(fusion_engine.filters.iteritems()).particles
max_prob = particles[:, 2].max()
max_particle_i = np.where(particles[:, 2] == max_prob)
max_particles = particles[max_particle_i, :]
# Select randomly from max_particles
max_particle = random.choice(max_particles[0])
goal_pose = np.append(max_particle[0:2], theta)
return goal_pose
[docs] def find_goal_from_probability(self, fusion_engine):
"""Find a goal pose from the point of highest probability (the
Maximum A Posteriori, or MAP, point).
Parameters
----------
fusion_engine : FusionEngine
A fusion engine with a probabilistic filter.
Returns
-------
array_like
A pose as [x,y,theta] in [m,m,degrees].
"""
# <>TODO: Implement this!
pass


Organization administrators can use their registered credentials and add individual users onto Sunbird. To add users on Sunbird, the administrator must upload required details of the users.
| Step | Screen |
|---|---|
| 1. You are logged in 2. You are currently on Profile page. You want to upload users 3. You have clicked on Upload Users Note: Ensure that the administrator of your organization has assigned user roles on the portal. For details on how to assign user roles, refer Assigning User Roles |
Enter OrgID. Unique ID of the admin organization must be entered here
Descriptions and valid values for each columns are as listed below:
| Sl.No | Column Name | Description | Valid Value | Field Type |
|---|---|---|---|---|
| 1 | firstName | User’s first name | Alphabetic Value | Mandatory |
| 2 | lastName | User’s last name | Alphabetic Value | Optional |
| 3 | phone | User’s phone number | Ten digit mobile number | Optional |
| 4 | User’s email ID | Alphanumeric, standard email ID format | Mandatory | |
| 5 | userName | Unique name assigned to the user by the organization | Alphanumeric | Mandatory |
| 6 | password | Unique/common password given by the organization | Alphanumeric | Optional |
| 7 | provider | Channel ID shared to the system administrator by Sunbird. Note: Enter values in the provider column and the phoneVerified column or keep both columns blank |
Alphanumeric | Conditional |
| 8 | phoneVerified | Whether user’s phone number is verified. Note: Enter values in the provider column and the phoneVerified column or keep both columns blank |
TRUE, if phone number is provided | Conditional |
| 9 | roles | User’s role on Sunbird | Select one or more of the following roles: CONTENT_CREATOR, CONTENT_REVIEWER, FLAG_REVIEWER, COURSE_MENTOR, ORG_ADMIN, SYSTEM_ADMINISTRATION, PUBLIC |
Optional |
| 10 | position | User’s designation in the organization hierarchy | Alphanumeric | Optional |
| 11 | grade | Classes taught by the user | Select one or more of the following grades: Class 1, Class 2, Class 3, Class 4, Class 5, Class 6, Class 7, Class 8, Class 9, Class 10, Kindergarten, Other |
Optional |
| 12 | location | User’s geographical location | Alphanumeric | Optional |
| 13 | DOB | User’s date of birth | YYYY-MM-DD | Optional |
| 14 | gender | User’s gender | Male, Female, Transgender | Optional |
| 15 | language | User’s language preferences | English, Gujarati, Hindi, Kannada, Marathi, Punjabi, Tamil, Telugu | Optional |
| 16 | profileSummary | User’s professional profile summary, skills, certifications etc. | Alphanumeric | Optional |
| 17 | subject | Subjects taught by the user | Assamese, Bengali, English, Hindi, Kannada, Malayalam, Oriya, Punjabi, Tamil, Telugu, Urdu, Biology, Chemistry, Physics, Mathematics, Environmental Studies, Geography, History, Political Science, Economics, Sanskrit, Gujarati, Marathi, Nepali | Optional |
Note: You can select more than one value for the columns grade, language and subject. Ensure that you separate the values with a comma when you select more than one value for any column
9.Click UPLOAD USERS CSV.The explorer window is displayed
10.Select the csv file and click Open
11.The csv file is uploaded
12.On successful file upload, a process ID is generated, else an error message is displayed
13. Possible causes for failure of upload includes:
a. The csv file is not saved in the right format. Select CSV (Comma delimited) (.csv) as the file type while saving
b. Using the same email, phonenumber etc. for more than one user. Details must be unique for each user
c. Providing invalid values in the csv file. In such cases, the error message denotes the column name for which incorrect value is provided


{% extends "account/keys/base.html" %} {% block content %}
{% trans -%} These are your API keys. They're useful for building applications that perform tasks on Mozilla Badges on your behalf. If you have stopped using any of them, or suspect one has been exposed to parties you don't trust with your account, delete or disable the key. It's easy to create a replacement key at any time. {%- endtrans %}
{% if not keys %}You have no API keys, yet.
{% else %}| {{ _('Key') }} | {{ _('Created') }} | |
|---|---|---|
| {{ key.description }} | {{ key.created }} | {{ _('History') }} ({{ key.history.count() }}) {% if key.is_disabled %} {{ _('Activate') }} {% else %} {{ _('Disable') }} {% endif %} {{ _('Delete') }} |


This is Words and Buttons Online — a collection of interactive #tutorials, #demos, and #quizzes about #mathematics, #algorithms and #programming.
What if I told you that every analytic function in complex numbers is a conformal mapping?
This wouldn't be very helpful since you either know this already or have no idea what am I talking about. If you want, I can explain it in a very simple but probably not entirely correct manner. It'll only take five minutes.
So complex numbers are numbers with imaginary parts. Numbers like this.
a + bi, i2 = -1
Let's pretend they are something else. Let's pretend they are vectors. The real part then shall go as the usual x-axis, and the imaginary
Summing them up works just like with vectors: real parts sum up separately from the imaginary parts, just like
(a + bi) + (c + di) = (a + c) + (b + d)i
Here is an interactive plot. Feel free to move red and blue arrows around. The barber-shop arrow is the sum, it's made unmoveable by itself.
Complex multiplication is somewhat different from what we usually do with vectors. The formula doesn't look too inspiring.
(a + bi) * (c + di) = (ac - bd) + (bc + ad)i
However, geometrically, multiplying a complex number to a normalized complex number is a rotation.
Ok, but what if the complex multiplier isn't normalized?
We can normalize it by dividing by its length and then multiply the result by this length. Multiplying a complex number by a scalar is just like scaling a vector.
c*(a + bi) = ca + cbi
So, additions and multiplications are all translations, rotations, and scales. There is no shear. These three transformations preserve the angles locally. And preserving angles locally is what constitutes a conformal transformation in geometry. In the analysis, transformations are usually called maps. It's just a convention. “Conformal map” and “conformal transformation” is the same thing.
And now for analytic functions. Their definition might not be too helpful for our case, but they have a property that is.
The property is: a function is analytic if and only if its Taylor series about x0 converges to the function in some neighborhood for every x0 in its domain.
The Taylor series is a polynomial series, and polynomes consist only of additions, multiplications, and scales.
So if a function acts as a polynomial locally, it can only move, rotate, and scale complex-numbers made vectors, preserving the angles locally, therefore, forming a conformal transformation or, which is the same, a conformal map.
Here is the living example. It transforms a grid from
Feel free to propose your own transformation. The formula box from below accepts
There is also a t variable that oscilates in
I hope you now have a good understanding of conformal mapping and the geometry of complex numbers in general. Did it take the full 5 minutes?
| Index #mathematics #tutorials | ← there's more. |
+
So You Think You Know C (free book) + Geometry for Programmers (paid book) + Github & RSS |


An element of the Hometown Hero Project (HHP) is to create a mural welcoming travelers to Martinez the birthplace of Joe DiMaggio. A well-known community business, Waters Moving and Storage, has graciously offered their storage facility for the mural. A family owned and operated moving company, Waters has been a fixture in Martinez for over 37 years. Their warehouse is strategically located between the Amtrak rail lines and Interstate 680 leading into Martinez. This 150,000 cubic square foot warehouse, could accommodate a large mural display visible from both routes into the City. Next step for the HHP is to contract with a muralist.
Waters Storage Mural