Documentation
Demo
Disclaimer
This is still alpha software and you should be comfortable proofreading the gcode for sanity checks before running it on your machine!
Overview
This is a way to generate gcode for 3D printing shapes that are defined by a series of curves. The first experiments I did with this idea are documented in this video and were done with a couple of Python scripts and Blender. I wanted a more interactive way to create and preview these objects, so I began work on this program. It is an okay first draft.
The shape is generated by starting with a 2D curve and applying some transformation to it many times. We then stack these curves on top of each other and connect them so they are one continous curve with continuous z travel similar to vase mode. In this program, the transformation is defined by two curves, one for rotation and one for scale. For each layer we generate, we can use its layer index to lookup the corresponding rotation and scale and apply it to the original curve (ie layer 10/100 would use the y value of the point 10% along the length of the curve). An extra line segment is added between layers as the end of the previous layer might not be the same as the start of the next layer.
How to Use
Edit in Draw mode or upload an SVG curve. Play with the scale and rotation curves. Change how many layers you want. Double check your bounding box size. Hit Generate Gcode, right click save link as..., print!
- Curve Editors
- Click and drag to move points. Double click to add points. Right click to remove points. The rotation and scale curves are catmull rom and don't have bezier handle controls.
- Draw Mode
- Same controls as Curve Editors. Toggle `Lines?` to use straight lines instead of catmull rom
- Generate Polygon
- Replaces the curve in the Draw box with an n-sided polygon
- SVG Mode
- You can upload your own SVG and pick which path to use with the dropdown. I've included a doodle of my own as an example. You might run into unsupported curve types like Ellipse curve.
- Generate Gcode
- Hit this button when you want to generate gcode. A link will appear which if you click it will open the generated gcode in a new tab. Or you can right click to download it.
- Preview Extrude
- When enabled, the preview will extrude a circular profile along the path and generate a mesh. This gives it more depth and looks a bit better, but gets slow very quickly even at only ~100 layers. When disabled, the preview is just wireframe lines with no thickness.
- Preview Rainbow
- When not using `Preview Extrude`, enabling this will color the lines with a nice rainbow gradient. This aids in seeing more depth than just the lines give alone. `By Distance to center` uses the distance from the center as the lerp value in the gradient and `By Layer` uses the z value as the lerp value.
- Clamp Distance
- Enabling this will prevent a point from moving further than this amount from its previous position in the layer below. This makes it much easier to generate printable object since the layers will stack well. You can play with this value in conjunction with line width to allow steeper angles
- Segment Length
- After generating the curve, we break it into linear segments that are of this length. A longer length will lose some quality but can remove blobs (see this video)
- Bed Size
- Currently this only impacts the generated gcode by positioning the median point of the curve on the center of the build plate. The curve drawing box below won't update but the gcode will be different
- Line Width
- I am not 100% I am calculating the extrusion rate correctly but it seems to work okay in my testing.
- Gcode Header
- Gcode Footer
- These are taken from the output of Cura for an Ender 3. Adjust to your own requirements.


User Info
Name:
Email:
Password:
Address1:
Address2:
City:
State:
ZipCode:
@if(form.hasGlobalErrors<EMAIL_ADDRESS>} @if(flash.contains("success")) {@flash.get("success")
} }Name:
Email:
Password:
Address1:
Address2:
City:
State:
ZipCode:
@if(form.hasGlobalErrors<EMAIL_ADDRESS>} @if(flash.contains("success")) {@flash.get("success")
} }


{% extends "global/Page.html" %} {% load otree %} {% block title %} This is the end of the Rely or Verify game {% endblock %} {% block content %}
You have now finished the rely or verify game!
Important! The experiment is not finished yet! Please remain at your seat.
In this game, you have made an overall profit of {{ cumulative_payoff|c }}.
You will keep this payoff for the second game!
Click "Next" in order to learn more about the second game in this experiment.
{% next_button %} {% endblock %}


CreateEntity()
Syntax
Result = CreateEntity(#Entity, MeshID, MaterialID, [x, y, z [, PickMask [, VisibilityMask]])Description
Creates a new #Entity using the specified Mesh and Material.
Parameters
#Entity The number to identify the new entity. #PB_Any can be used to auto-generate this number. MeshID The mesh to use to create the entity. To get a valid mesh id, use MeshID(). Dynamic meshes are not supported (meshes created with the #PB_Mesh_Dynamic flag). MaterialID The material to use to create the entity. To get a valid material id, use MaterialID(). #PB_Material_None can be used as parameter value, to use the .material script associated to the mesh. Parse3DScripts() should be called before using #PB_Material_None. x, y, z (optional) The position of the new entity in the world. PickMask (optional) A special value used by RayPick() and MousePick() to select which entity group will be handled. As it's a mask, each value should be a power of two. 31 different masks are available. To create a mask value easily, the '<<' operator can be used: - 1 << 1 : First valid mask value - 1 << 2 : Second valid mask value - 1 << 3 : Third valid mask value - ... - 1 << 31 : Last valid mask valueTo ease the use, constants should be used to store the mask value and used later. When calling the pick functions, masks can be combined with the '|' operator to select more than one type of entity.VisibilityMask (optional) A mask to select on which camera the entity should be displayed. If this mask match the mask specified in CreateCamera(), the entity will be displayed on the camera. See 'PickMask' to build correct masks. If this parameter is omitted, then the entity will be visible on all cameras.
Return value
Returns zero if the entity can't be created. If #PB_Any is used as '#Entity' parameter, the new entity number is returned.
See Also
FreeEntity()
Supported OS
All


Since 2014, the number of homeruns has begun to spike within the MLB. The only other time a spike like this has been seen was at the beginning of the steroid era, which started in the late 80's and went until the mid 2000's. During this era of baseball, athletes were using Performance Enhancing Drugs (PEDs) to get stronger and play better. This led the amount of homeruns hit during a season to increase drastically, as seen in the chart from 1992 to 2000. Notable steroid users like Mark McGwire and Barry Bonds hit many homeruns during this period, and were later caught for using PEDs and were not inducted into the MLB Hall of Fame because of it. When the league started cracking down on PED use, the number of homeruns slowly declined until 2015, where it began to increase rapidly. What has caused this trend? Many people believe that the baseballs are being "juiced" and are easier to hit out of the park. In the next slide, we will explore the case that MLB hitters' approach at the plate has changed by swinging for power more than swinging for contact. Click 'Slide 2' on the navbar to see how strikeouts have risen over the past 35 years. (Data from: https://www.baseball-almanac.com/hitting/hihr6.shtml)


The only thing better than a Maven archetype is a repo you can fork with everything already setup, just fork-and-code.
This repository contains a recipe/scaffolding for bootstrapping a Web Application with the features & Technology stack listed below. Delete the sample code (or keep it.) and add your own, you’re good to go.
This app can be adapted to various languages and regions without engineering changes. Textual elements, such as status messages and the GUI component labels, are not hardcoded in the program. Instead they are stored outside the source code and retrieved dynamically.
Refer `io.github.anantharajuc.sbat.backend.config.I18Nconfiguration`. The text elements are stored in `\src\main\resources\i18n` folder.
There are several ways to run a Spring Boot application on your local machine. One way is to execute the main
method in the com.arc.sbtest.SBtemplateApplication
class from your IDE.
Alternatively you can use the Spring Boot Maven plugin like so:
mvn spring-boot:run
The app will start running at http://localhost:8080
DockerHub Pull Command
docker pull anantha/spring-boot-application-template
Ensure you build a jar of the application before building a docker image.
`mvn package -Dmaven.test.skip=true` //skip all tests and build
`mvn clean package` //run all tests and build
| Command | Description |
|---|---|
docker images |
take a look at the container images. |
docker ps |
list all the running containers. |
docker ps -a |
list all the containers, including the ones that have finished executing. |
docker build -t spring-boot-application-template . |
Build docker image of the project |
docker run spring-boot-application-template |
run the project's docker container |
docker stop [container_id] |
stop a container |
docker rm $(docker ps -aq) |
stop and remove all containers |
| Security Variation | Tag |
|---|---|
| Role Based Authentication (In-memory Users) | https://github.com/Spring-Boot-Framework/Spring-Boot-Application-Template/tags |
| Permission Based Authentication (In-memory Users) | https://github.com/Spring-Boot-Framework/Spring-Boot-Application-Template/tags |
| Spring Method-Security with @PreAuthorize (In-memory Users) | https://github.com/Spring-Boot-Framework/Spring-Boot-Application-Template/tags |
| Database Authentication Authorization (In-memory Users) | https://github.com/Spring-Boot-Framework/Spring-Boot-Application-Template/tags |
| Role, Permission based User Authentication via MySQL | https://github.com/Spring-Boot-Framework/Spring-Boot-Application-Template/tags |
Refer to the ApplicationSecurityConfig
class in io.github.anantharajuc.sbat.backend.security
.
| Username | Password | Role | Permission | Resource |
|---|---|---|---|---|
johndoe |
password |
PERSON |
/api/v1/person |
|
AdminUser |
password |
ADMIN |
PERSON_CREATE,PERSON_READ,PERSON_UPDATE,PERSON_DELETE |
/management/api/v1/person |
AdminTraineeUser |
password |
ADMINTRAINEE |
PERSON_READ |
/management/api/v1/person |
Bucket4j - Rate limiting library based on token/leaky-bucket algorithm - Refer io.github.anantharajuc.sbat.backend.api.rate_limiting package
A basic solution for preventing brute force authentication attempts using Spring Security is implemented. The app keeps a record of the number of failed attempts originating from a single IP address. If that particular IP goes over a set number of requests – it will be blocked for a set amount of time.
Refer io.github.anantharajuc.sbat.backend.security.authentication.LoginAttemptService
If the application remains inactive for a specified period of time, the session will expire. The session after this period of time is considered invalid and the user has to login to the application again.
This value server.servlet.session.timeout can be configured in application.properties file
The app defines following CRUD APIs.
| URL | Method | Remarks |
|---|---|---|
http://localhost:8080/index |
GET | Home Page |
http://localhost:8080/sbat/index |
GET | Home Page |
http://localhost:8080/sbat/about |
GET | About Page |
http://localhost:8080/sbat/tech-stack |
GET | Technology Stack Table |
http://localhost:8080/sbat/close |
GET | Close App via Actuator |
http://localhost:8080/sbat/login |
GET | Login Page |
http://localhost:8080/sbat/error |
GET | Custom Error Page |
| URL | Method |
|---|---|
http://localhost:8080/api/generic-hello |
GET |
http://localhost:8080/api/personalized-hello/ |
GET |
http://localhost:8080/api/personalized-hello?name=spring-boot |
GET |
http://localhost:8080/api/loggers |
GET |
To monitor and manage your application
| URL | Method |
|---|---|
http://localhost:8080/actuator/ |
GET |
http://localhost:8080/actuator/health |
GET |
http://localhost:8080/actuator/info |
GET |
http://localhost:8080/actuator/prometheus |
GET |
http://localhost:8080/actuator/httptrace |
GET |
| URL | Method | Remarks | Sample Valid Request Body |
|---|---|---|---|
http://localhost:8080/api/v1/person |
GET | Header Accept:application/json or Accept:application/xml for content negotiation |
|
http://localhost:8080/api/v1/person |
POST | Add a person | JSON |
http://localhost:8080/api/v1/person/{id} |
GET | Header Accept:application/json or Accept:application/xml for content negotiation |
|
http://localhost:8080/management/api/v1/person/pageable |
GET | Header Accept:application/json or Accept:application/xml for content negotiation |
Pageable API Endpoint |
http://localhost:8080/api/v1/person/{id} |
PUT | Update a person | JSON |
http://localhost:8080/api/v1/person/{id} |
DELETE | Delete a person |
| URL | Method | Remarks | Sample Valid Request Body |
|---|---|---|---|
http://localhost:8080/management/api/v1/person |
GET | Header Accept:application/json or Accept:application/xml for content negotiation |
|
http://localhost:8080/management/api/v1/person |
POST | Add a person | JSON |
http://localhost:8080/management/api/v1/person/{id} |
GET | Header Accept:application/json or Accept:application/xml for content negotiation |
|
http://localhost:8080/management/api/v1/person/pageable |
GET | Header Accept:application/json or Accept:application/xml for content negotiation |
Pageable API Endpoint |
http://localhost:8080/management/api/v1/person/{id} |
PUT | Update a person | JSON |
http://localhost:8080/management/api/v1/person/{id} |
DELETE | Delete a person |
{
"name": "Jane",
"username": "janejane",
"emailPrimary"<EMAIL_ADDRESS>"emailSecondary"<EMAIL_ADDRESS>"phone":9191919191,
"gender": "FEMALE",
"age": 25,
"password": "password",
"dob":"25-12-2005",
"isAdult":true,
"address": {
"street": "Jane Plains",
"suite": "Suite 779",
"city": "Wisokyburghh",
"zipcode": "90565-7771",
"geo": {
"lat": "-43.9589",
"lng": "-34.4628"
}
}
}
http://localhost:8080/swagger-ui.html
- Documentation & Testinghttp://localhost:8080/v2/api-docs?group=Spring%20Boot%20Application%20Template
- Documentation & TestingSpring-Boot-Application-Template\target\site\apidocs
folder using the Maven command `mvn javadoc:javadoc` //Generate JavaDoc
The project (a.k.a. project directory) has a particular directory structure. A representative project is shown below:
.
├── Spring Elements
├── src
│ └── main
│ └── java
│ ├── io.github.anantharajuc.sbtest
│ │ │
│ │ ├──io.github.anantharajuc.sbtest.auditing
│ │ │
│ │ ├──io.github.anantharajuc.sbtest.security.authorization
│ │ │
│ │ ├──io.github.anantharajuc.sbtest.backend
│ │ │ │
│ │ │ ├──io.github.anantharajuc.sbtest.person
│ │ │ │
│ │ │ └──io.github.anantharajuc.sbtest.backend.persistence.repositories
│ │ │
│ │ └──io.github.anantharajuc.sbtest.backend.service
│ │
│ ├── io.github.anantharajuc.sbtest.util.config
│ │
│ ├── io.github.anantharajuc.sbtest.enums
│ │
│ ├── io.github.anantharajuc.sbtest.exception
│ │
│ ├── io.github.anantharajuc.sbtest.security
│ │
│ ├── io.github.anantharajuc.sbtest.util
│ │
│ └── io.github.anantharajuc.sbtest.web
│ │
│ ├── io.github.anantharajuc.sbtest.web.controllers
│ │
│ └── io.github.anantharajuc.sbtest.web.domain.frontend
├── src
│ └── main
│ └── resources
│ ├── data
│ │ └── mysql
│ │ └── migrations
│ │ ├── V0_0_1__initialize_structure.sql
│ │ └── V0_0_2__audit_structure.sql
│ │ └── V0_0_3__populate_data.sql
│ │ └── V0_0_4__data_geo.sql
│ │ └── V0_0_5__data_address.sql
│ │ └── V0_0_6__data_person.sql
│ │ └── V0_0_7__data_security.sql
│ ├── i18n
│ │ └── messages.properties
│ │ └── messages_es.properties
│ ├── static
│ │ ├── css
│ │ ├── images
│ │ ├── js
│ │ └── favicon.ico
│ ├── templates
│ │ ├── fragments
│ │ │ ├── body_scripts.html
│ │ │ ├── footer.html
│ │ │ ├── htmlhead.html
│ │ │ ├── navigation.html
│ │ │ ├── pagetitle.html
│ │ │ └── social_buttons.html
│ │ │
│ │ ├── pages
│ │ │ ├── about.html
│ │ │ ├── built_with.html
│ │ │ ├── close.html
│ │ │ ├── form.html
│ │ │ ├── index.html
│ │ │ ├── login.html
│ │ │ └── settings.html
│ │ │
│ │ ├── error.html
│ │ └── layout.html
│ │
│ ├── application-dev.properties
│ ├── application-production.properties
│ ├── application-qa.properties
│ ├── application-staging.properties
│ ├── application.properties
│ ├── banner.txt
│ └── log4j2.xml
├── src
│ └── test
│ └── java/io/github/anantharajuc/sbtest/service
│ └── PersonServiceImpl.test
├── JRE System Library
├── Maven Dependencies
├── bin
├── logs
│ └── application.log
├── src
├── target
│ └──application-0.0.1-SNAPSHOT
├── mvnw
├── mvnw.cmd
├── pom.xml
└── README.md
api
- API utilities;rate_limiting
- API rate limiting;auditing
- data entity auditing;authentication
- application user authentication;configuration
- app configurations;controllers
- to listen to the client;exception
- to hold custom exception handling;models
- to hold our entities;repository
- to communicate with the database;security
- security configuration;service
- to hold business logic;util
- to hold our utility classes;
resources/
- Contains all the static resources, templates and property files.
resources/data/mysql.migrations/
- Contains initial table structure & table data - used by flyway.resources/static
- contains static resources such as css, js and images.resources/templates
- contains server-side templates which are rendered by Spring.resources/templates/fragments
- contains reusable code fragments.resources/templates/pages
- contains server-side templates built using fragments.resources/application.properties
- It contains application-wide properties. Spring reads the properties defined in this file to configure your application. You can define server’s default port, server’s context path, database URLs etc, in this file.
test/
- contains unit and integration tests
pom.xml
- contains all the project dependencies
This Project uses GitHub's integrated issue tracking system to record bugs and feature requests. If you want to raise an issue, please follow the recommendations below:


class: center, middle, inverse, title-slide # 2.2 — The Coase Theorem ## ECON 315 • Economics of the Law • Spring 2021 ### Ryan Safner
Assistant Professor of Economics
<EMAIL_ADDRESS>ryansafner/lawS21
lawS21.classes.ryansafner.com
--- class: inverse # Outline ### [Property Law](#3) ### [The Coase Theorem](#18) ### [Transaction Costs](#41) --- class: inverse, center, middle # Property Law --- # Property Rights .pull-left[ .smaller[ > “.hi[Property] is a bundle of legal rights over resources that the owner is free to exercise and whose exercise is protected from interference by others” (Cooter and Ulen, p.73) - This bundle contains a lot of rights, to: > possess, use, develop, improve, transform, consume, deplete, destroy, sell, donate, bequeath, transfer, mortgage, lease, loan, or exclude others ] ] .pull-right[ .center[ ![](../images/propertybundleofrights.png) ] ] --- # Property Rights .pull-left[ - Three important legal points: 1. These rights are .hi[impersonal] — they attach to property, not persons 2. Owner is .hi[at liberty] to exercise rights over her property (law neither forbids nor obliges her to) 3. Others are .hi[forbidden to interfere] with owner’s exercise of her rights ] .pull-right[ .center[ ![:scale 100%](../images/propertyrights.png) ] ] --- # Property Rights .pull-left[ - Any property system must answer: 1. What can be privately owned? 2. What can (and can't) an owner do with her property? 3. How are property rights established? 4. What remedies are available when property rights are violated? ] .pull-right[ .center[ ![](../images/propertybundleofrights.png) ] ] --- # It's Not So Simple: A Story .center[ ![](../images/propertyline.jpg) ] --- # It's Not So Simple: A Story .pull-left[ .center[ ![](../images/fencetree.jpg) ] ] -- .pull-right[ .center[ ![](../images/shadedpool.jpg) ] ] --- # This Story Has Million Dollar Implications .pull-left[ .center[ ![](../images/miamihotel.jpg) *Fontainebleau Hotel Corp. v. Forty-Five Twenty-Five, Inc* (1959) 114 So. 2d 357, 1959 Fla. App. ] ] .pull-right[ .center[ ![](../images/miamihotelcase.png) ] .source[Source: [Florida Trend (2014)](https://www.floridatrend.com/article/17938/the-spite-wall-between-the-fontainbleau-and-the-eden-roc)] ] --- # “The Fox Case” .pull-left[ .smaller[ - In 1802, .hi-turquoise[Lodowick Post] organized a fox hunt in Southampton, NY - His dogs caught the scent, and he gave chase to a fox - .hi-purple[Jesse Pierson] appears “out of nowhere,” kills, and claims the fox for his own - Claims not to have seen Post - .hi-turquoise[Post] sued .hi-purple[Pierson] to get the fox back - Lower court sided with .hi-turquoise[Post]; .hi-purple[Pierson] appealed to NY Supreme Court ] ] .pull-right[ .center[ ![](../images/fox-hunting.jpg) ] ] --- # “The Fox Case” .left-column[ .center[ ![:scale 100%](../images/court1.jpg) ] ] .right-column[ - Legal question: When do you own an animal? - NY Supreme Court ruled for .hi-purple[Pierson] (who killed fox) .quitesmall[ > “If the first seeing, starting, or pursuing such animals...should afford the basis of actions against others for intercepting and killing them, .hi[it would prove a fertile source of quarrels and litigation]” > “However uncourteous or unkind the conduct of Pierson towards Post, in this instance, may have been, yet his act was productive of no injury or damage for which a legal remedy can be applied. We are of opinion the judgment below was erroneous, and ought to be reversed.” ] ] --- # “The Fox Case” .left-column[ .center[ ![](../images/saucyintruder.jpg) ] ] .right-column[ - Judge Livingston’s dissent: .quitesmall[ > “[A] fox is a "wild and noxious beast." Both parties have regarded him, as the law of nations does a pirate, *"hostem humani generis,"*...His depredations on farmers and on barn yards, have not been forgotten; and to put him to death wherever found, is allowed to be meritorious, and of public benefit. Hence it follows, that our decision should have in view the greatest possible encouragement to the destruction of an animal, so cunning and ruthless in his career.” > “But who would keep a pack of hounds; or what gentleman, at the sound of the horn, and at peep of day, would mount his steed, and for hours together...pursue the windings of this wily quadruped, if, just as night came on, and his stratagems and strength were nearly exhausted, a saucy intruder, who had not shared in the honours or labours of the chase, were permitted to come in at the death, and bear away in triumph the object of pursuit?” ] ] --- # What Rule? .pull-left[ - If .hi-purple[Pierson] gets the fox - simpler rule: “finders keepers” - bright-line, easy to implement, discourages disputes - If .hi-turquoise[Post] gets the fox - better incentives for hunting hard-to-catch noxious animals (like foxes) - Same tradeoff between simplicity and good incentives as the whaling cases! ] .pull-right[ .center[ ![](../images/fox-hunting.jpg) ] ] --- # Some More Examples of Disputes .pull-left[ .center[ ![:scale 100%](../images/dispute.jpg) ] ] .pull-right[ .quitesmall[ - .hi-green[My neighbor likes tall trees] - does she have the right to plant a tree on her property that shades my pool? - do I have a right to an unobstructed view? or an unshaded pool? - .hi-green[You want to have a party] - do you have the right to make noise in your house/dorm? - does your neighbor have the right to good nights sleep in their house/dorm? - .hi-green[I own a small plant located on a river] - do I have a right to use the river for cooling? - do I have a right to pollute as much as I want? ] ] .pull-right[ .center[ ![](../images/car.png) ] ] --- # How Should Property Rights Be Allocated? .pull-left[ .smaller[ .bg-washed-green.b--dark-green.ba.bw2.br3.shadow-5.ph4.mt5[ .hi-green[Example]: There is a car which you value at $3,000, and I value at $4,000. ] - It is .hi-purple[efficient] for me to end up with the car. ] ] .pull-right[ .center[ ![](../images/car.png) ] ] --- # How Should Property Rights Be Allocated? .pull-left[ .smaller[ .bg-washed-green.b--dark-green.ba.bw2.br3.shadow-5.ph4.mt5[ .hi-green[Example]: There is a car which you value at $3,000, and I value at $4,000. ] - It is .hi-purple[efficient] for me to end up with the car. - Suppose I start out with the car ] ] .pull-right[ .center[ ![](../images/car.png) ] ] --- # How Should Property Rights Be Allocated? .pull-left[ .smaller[ .bg-washed-green.b--dark-green.ba.bw2.br3.shadow-5.ph4.mt5[ .hi-green[Example]: There is a car which you value at $3,000, and I value at $4,000. ] - It is .hi-purple[efficient] for me to end up with the car. - Suppose I start out with the car - Suppose instead, *you* own the car ] ] .pull-right[ .center[ ![](../images/car.png) ] ] --- # How Should Property Rights Be Allocated? .pull-left[ .smaller[ .bg-washed-green.b--dark-green.ba.bw2.br3.shadow-5.ph4.mt5[ .hi-green[Example]: There is a car which you value at $3,000, and I value at $4,000. ] - It is .hi-purple[efficient] for me to end up with the car. - Suppose I start out with the car - Suppose instead, *you* own the car - .hi-turquoise[It does not matter who is *initially* assigned a property right, our bargaining will reach the efficient result]! ] ] .pull-right[ .center[ ![](../images/car.png) ] ] --- class: inverse, center, middle # The Coase Theorem --- # It (Often) Doesn't Matter How We Start .pull-left[ - This is the essence of what is called the .hi[Coase theorem]: > If .hi-purple[transaction costs are low], with .hi-purple[well-defined] and .hi-purple[tradeable property rights], parties can bargain voluntarily to reach the efficient outcome. - Note: the starting point *does* matter for distribution! ] .pull-right[ .center[ ![](../images/Settlement-handshake.jpg) ] ] --- # It (Often) Doesn't Matter How We Start .pull-left[ - Coase: there is nothing new or radical here, if you understand Adam Smith - Resources tend to flow to those who value them the most - .hi-green[Example]: I will pay you to acquire the car if you currently own it ] .pull-right[ .center[ ![](../images/Settlement-handshake.jpg) ] ] --- # More Interesting: Incompatible Uses .pull-left[ - We don't need to resort to law for mutually-agreeable transactions (like the car) - What's more interesting are .hi[incompatible uses] of our own property that give rise to conflict - One person's use of their own property imposes an .hi-purple[externality] on another - Here, we *do* need the law to define the rights...but that's not the end of the story ] .pull-right[ .center[ ![](../images/coasetheoremmeme.png) ] ] --- # The Pigouvian View .left-column[ .center[ ![:scale 80%](../images/pigou.png) A.C. Pigou 1877-1959 ] ] .right-column[ - Each party only considering own `\(MPC\)` and `\(MPB\)` - Injurer `\(\xrightarrow{harms}\)` Injured - .hi-green[Examples]: - polluting factory `\(\xrightarrow{harms}\)` households living nearby - neighbor planting trees `\(\xrightarrow{harms}\)` my shaded pool - partying neighbor `\(\xrightarrow{harms}\)` quiet neighbor - Tax/restrain injurer (A) until his MPC = MSC ] --- # Externalities as a Property Rights Problem .left-column[ .center[ ![:scale 70%](https://www.dropbox.com/s/16vhn3ugeyzffu0/coase.png?raw=1) .smaller[ Ronald H. Coase (1910-2013) Economics Nobel 1991] ] ] .right-column[ - Harm is actually .hi-turquoise[bilateral], not unilateral - Party A `\(\underbrace{\iff}_{harms}\)` Party B - Requires *two* associating parties to have a dispute - Settling the dispute *will* impose a cost on *some* party - Origin of the problem is unclear property rights! - Who has right/duty over activities creating the externality? ] .source[Coase, Ronald H, 1960, "The Problem of Social Cost," *Journal of Law and Economics* 3:1-44] --- # Externalities as a Property Rights Problem .left-column[ .center[ ![:scale 70%](https://www.dropbox.com/s/16vhn3ugeyzffu0/coase.png?raw=1) .smaller[ Ronald H. Coase (1910-2013) Economics Nobel 1991] ] ] .right-column[ > “The traditional approach has tended to obscure the nature of the choice that has to be made. The question is commonly thought of as one in which A inflicts harm on B and what has to be decided is: how should we restrain A? But this is wrong. We are dealing with a problem of a reciprocal nature. To avoid the harm to B would inflict harm on A. The real question that has to be decided is: should A be allowed to harm B or should B be allowed to harm A?” (p.2). ] .source[Coase, Ronald H, 1960, "The Problem of Social Cost," *Journal of Law and Economics* 3:1-44] --- # Coase's Example: Farmer and Rancher - Consider a farmer and a rancher who own adjacent land - Cattle occasionally stray and damage the farmer's crops .pull-left[ .center[ ![](../images/wheat2.jpg) ] ] .pull-right[ .center[ ![](../images/grazing_cattle.jpg) ] ] --- # Coase's Example: Farmer and Rancher - If no adjacent farmer, or no adjacent rancher, **no problem!** - Who is responsible for the crop damage? .pull-left[ .center[ ![](../images/wheat2.jpg) ] ] .pull-right[ .center[ ![](../images/grazing_cattle.jpg) ] ] --- # Coase's Example: Farmer and Rancher .pull-left[ - English common law: .hi-purple[“closed range”/“fencing in” (farmer's rights)] - Ranchers have responsibility to control their herd - Ranchers must pay for any damage done by herd ] .pull-right[ .center[ ![](../images/cattle_fenced.jpg) ] ] --- # Coase's Example: Farmer and Rancher .pull-left[ - U.S. law (at various times): .hi-orange[“open range”/“fencing out” (rancher's rights)] - Ranchers can let their herd roam free - Ranchers are not liable for damages done by herd.magenta[†] .footnote[.magenta[†] Unless the farmer had a clear fence and the cattle broke through it.] ] .pull-right[ .center[ ![](../images/wheatfarmfence.jpg) ] ] --- # Coase's Example: Farmer and Rancher .pull-left[ .smallest[ - .hi-turquoise[Which rule is more efficient?] - Consider incentives to farmer & rancher under: 1. .hi-orange[Open range (rancher's rights)] - rancher only weighs private MC and MB, imposes externality on farmer - farmer has incentive to try to reduce damage (build fence, plant different crops) 2. .hi-turquoise[Closed range (farmer's rights)] - farmer has no incentive to build a fence or plant different crops - rancher has incentive to try to reduce damage ] ] .pull-right[ .center[ ![:scale 70%](../images/wheat2.jpg) ![:scale 70%](../images/grazing_cattle.jpg) ] ] --- # Coase's Example: Farmer and Rancher .pull-left[ - Coase: .hi-purple[it doesn't matter which rule we use — both lead to efficient outcome!] - Under .hi-orange[rancher's rights], farmer will build fence or pay rancher to keep fewer cattle - Under .hi-turquoise[farmer's rights], rancher can build a fence or pay farmer to build a fence - Regardless of the rule, the parties can negotiate to reach the efficient combination of cattle, crops, fences, etc. ] .pull-right[ .center[ ![:scale 70%](../images/wheat2.jpg) ![:scale 70%](../images/grazing_cattle.jpg) ] ] --- # A Numerical Example: Farmer and Rancher .pull-left[ .quitesmall[ - Suppose there are **three solutions** to the problem: 1. Rancher builds a fence around herd: costs $400 2. Farmer builds a fence around crops: costs $200 3. Do nothing ] ] .pull-right[ .center[ ![:scale 70%](../images/wheat2.jpg) ![:scale 70%](../images/grazing_cattle.jpg) ] ] --- # A Numerical Example: Farmer and Rancher .pull-left[ .quitesmall[ - Suppose there are **three solutions** to the problem: 1. Rancher builds a fence around herd: costs $400 2. Farmer builds a fence around crops: costs $200 3. Do nothing - If expected crop damage is **$100** - Rancher's rights: farmer lives with damages - Farmer's rights: rancher pays for damages rather than fence ] ] .pull-right[ .center[ ![:scale 70%](../images/wheat2.jpg) ![:scale 70%](../images/grazing_cattle.jpg) ] ] --- # A Numerical Example: Farmer and Rancher .pull-left[ .quitesmall[ - Suppose there are **three solutions** to the problem: 1. Rancher builds a fence around herd: costs $400 2. Farmer builds a fence around crops: costs $200 3. Do nothing - If expected crop damage is **$100** - Rancher's rights: farmer lives with damages - Farmer's rights: rancher pays for damages rather than fence - If expected crop damage is **$500** - Rancher's rights: farmer builds fence - Farmer's rights: rancher pays farmer to build fence - Efficient outcome under either rule! ] ] .pull-right[ .center[ ![:scale 70%](../images/wheat2.jpg) ![:scale 70%](../images/grazing_cattle.jpg) ] ] --- # Lots of Examples in Common Law .left-column[ .center[ ![:scale 80%](../images/coase.png) .smallest[ Ronald H. Coase (1910-2013) Economics Nobel 1991 ] ] ] .right-column[ .smaller[ - Coase provides lots of examples from .hi-turquoise[nuisance] cases in common law: - *Sturges v Bridgman* 11 Ch. D. 852 (1879) - *Fontainebleau Hotel Corp. v. Forty-Five Twenty-Five, Inc* (1959) 114 So. 2d 357 (1959) - *Bryant v. Lefever* 4 C.P.D. 172 (1878-1879) - *Bass v. Gregory* 25 Q.B.D. 481 (1890) - In each case, regardless of who is held liable (or found to have the property right), parties can negotiate to undertake whatever remedy is cheapest to fix (or endure), leading to efficient outcome ] ] --- # Coase: Another Example .pull-left[ .quitesmall[ > "[Imagine] the case of a confectioner the noise and vibrations from whose machinery disturbed a doctor in his work. To avoid harming the doctor would inflict harm on the confectioner. The problem posed by this case was essentially whether it was worth while, as a result of restricting the methods of production which could be used by the confectioner, to secure more doctoring at the cost of a reduced supply of confectionery products," (p.2). ] .source[Coase, Ronald H, 1960, “The Problem of Social Cost” *Journal of Law and Economics* 3: 1-44] ] .pull-right[ .center[ ![:scale 100%](../images/sturges.png) *Sturges v Bridgman* 11 Ch. D. 852 (1879)] ] --- # Coase: Another Example .pull-left[ - Does the Doctor have the right to a quiet work environment? - Does the Confectioner have the right to use own equipment as noisily as he wants? - Note there was no problem until the Doctor expanded his waiting room! .source[Coase, Ronald H, 1960, “The Problem of Social Cost” *Journal of Law and Economics* 3: 1-44] ] .pull-right[ .center[ ![:scale 100%](../images/sturges.png) *Sturges v Bridgman* 11 Ch. D. 852 (1879)] ] --- # Coase: Another Example .pull-left[ - Again, .hi-purple[it doesn't matter for efficiency] to whom the property right is awarded, so long as parties can .hi[bargain] - .hi-turquoise[If Doctor wins]: confectioner can pay doctor to make noise, or buy soundproofing - .hi-turquoise[If Confectioner wins]: doctor can pay confectioner to slow/quiet production, or buy soundproofing ] .pull-right[ .center[ ![:scale 100%](../images/sturges.png) *Sturges v Bridgman* 11 Ch. D. 852 (1879)] ] --- # The Coase Theorem, Reprise .left-column[ .center[ ![:scale 80%](../images/coase.png) .smallest[ Ronald H. Coase (1910-2013) Economics Nobel 1991 ] ] ] .right-column[ > “Judges have to decide on legal liability but this should not confuse economists about the nature of the economic problem involved. In the case of the cattle and the crops, it is true that there would be no crop damage without the cattle. It is equally true that there would be no crop damage without the crops. The doctor’s work would not have been disturbed if the confectioner had not worked his machinery; but the machinery would have disturbed no one if the doctor had not set up his consulting room in that particular place...” (p.13). .source[Coase, Ronald H, 1960, “The Problem of Social Cost” *Journal of Law and Economics* 3: 1-44] ] --- # The Coase Theorem, Reprise .left-column[ .center[ ![:scale 80%](../images/coase.png) .smallest[ Ronald H. Coase (1910-2013) Economics Nobel 1991 ] ] ] .right-column[ > “If we are to discuss the problem in terms of causation, both parties cause the damage. If we are to attain an optimum allocation of resources, it is therefore desirable that both parties should take the harmful effects into account when deciding on their course of action. It is one of the beauties of a smoothly operating pricing system that...the fall in the value of production due to the harmful effect would be a cost for both parties,” (p.13). .source[Coase, Ronald H, 1960, “The Problem of Social Cost” *Journal of Law and Economics* 3: 1-44] ] --- # The Coase Theorem, Reprise .left-column[ .center[ ![:scale 80%](../images/coase.png) .smallest[ Ronald H. Coase (1910-2013) Economics Nobel 1991 ] ] ] .right-column[ .smallest[ - .hi[Coase Theorem]: > If transaction costs are low, with well-defined and tradeable property rights, parties can bargain voluntarily to reach the efficient outcome. - Requires: 1. low transaction costs 2. property rights to be well-defined 3. property rights to be tradeable - The initial allocation of property rights does not matter, we will always get the efficient outcome - initial allocation does matter for distribution ] ] --- # Relating Coase To Welfare Economics .pull-left[ - .hi[First Welfare Theorem]: competitive markets in equilibrium maximize efficiency - We said this is not true if there are **externalities** (or other types of market failure), a “missing market” - But defining tradeable property rights and letting parties negotiate is like introducing the “missing market”! ] .pull-right[ .center[ ![](../images/wellbeing.jpeg) ] ] --- class: inverse, center, middle # Transaction Costs --- # Back to Foxes .pull-left[ .smallest[ - Return to *Pierson v. Post* — both the majority & dissent implied the ruling *mattered* for efficiency - Doesn't Coase make the case ruling irrelevant? - If Post values it more, can buy it off Pierson, or vice versa, regardless of the ruling ] ] .pull-right[ .center[ ![](../images/fox-hunting.jpg) ] ] --- # Back to Foxes .pull-left[ .smallest[ - Return to *Pierson v. Post* — both the majority & dissent implied the ruling *mattered* for efficiency - Doesn't Coase make the case ruling irrelevant? - If Post values it more, can buy it off Pierson, or vice versa, regardless of the ruling - But it *does* matter because of .hi[transaction costs]! - .hi-purple[Majority]: if Post gets the fox, “a fertile course of quarrels and litigation” - .hi-orange[Dissent]: killing foxes is a good thing (externality), so lots of people benefit; hard to get efficient amount of fox hunting via bargaining ] ] .pull-right[ .center[ ![](../images/fox-hunting.jpg) ] ] --- # Transaction Costs Matter .pull-left[ - Recall the .hi[Coase Theorem] is about when transaction costs are low - It also implies the corollary: .hi-purple[when transaction costs are high, voluntary bargaining will not reach the efficient outcome!] ] .pull-right[ .center[ ![](../images/transactionscosts.JPG) ] ] --- # That Was Coase (1960)'s Whole Point! .left-column[ .center[ ![:scale 80%](../images/coase.png) .smallest[ Ronald H. Coase (1910-2013) Economics Nobel 1991 ] ] ] .right-column[ .quitesmall[ > “If market transactions were costless, all that matters (questions of equity apart) is that the rights of the various parties should be well-defined and the results of legal actions easy to forecast. > “But...the situation is quite different when market transactions are so costly as to make it difficult to change the arrangement of rights established by the law.” > “In such cases, the courts directly influence economic activity.” > “Even when it is possible to change the legal delimitation of rights through market transactions, it is obviously desirable to reduce the need for such transactions and thus reduce the employment of resources in carrying them out.” ] .source[Coase, Ronald H, 1960, “The Problem of Social Cost” *Journal of Law and Economics* 3: 1-44] ] --- # That Was Coase (1960)'s Whole Point! .left-column[ .center[ ![:scale 80%](../images/coase.png) .smallest[ Ronald H. Coase (1910-2013) Economics Nobel 1991 ] ] ] .right-column[ .quitesmall[ > “However, I tend to regard the Coase theorem as a stepping stone on the way to an analysis of an economy with positive transaction costs. The significance to me of the Coase theorem is that it undermines the Pigovian system. Since standard economic theory assumes transaction costs to be zero, the Coase theorem demonstrates that the Pigovian solutions are unnecessary in these circumstances. Of course, it does not imply, when transaction costs are positive, that government actions (such as government operation, regulation, or taxation, including subsidies) could not produce a better result than relying on negotiations between individuals in the market. Whether this would be so could be discovered not by studying imaginary governments but what real governments actually do. My conclusion: let us study the world of positive transaction costs,” (p.717). ] .source[Coase, Ronald H, 1992, “The Institutional Structure of Production,” *American Economic Review* 82(4): 713-719] ] --- # That Was Coase (1960)'s Whole Point! .left-column[ .center[ ![:scale 80%](../images/coase.png) .smallest[ Ronald H. Coase (1910-2013) Economics Nobel 1991 ] ] ] .right-column[ .quitesmall[ > “[W]hat are traded on the market are not, as is often supposed by economists, physical entities, but the rights to perform certain actions, and the rights which individuals possess are established by the legal system.” (p.717). > “Because of [transaction costs], the rights which individuals possess, with their duties and privileges, will be, to a large extent, what the law determines. As a result, the legal system will have a profound effect on the working of the economic system and may in certain respects be said to control it. It is obviously desirable that these rights should be as- signed to those who can use them most productively and with incentives that lead them to do so and that, to discover (and maintain) such a distribution of rights, the costs of their transference should be low...” (pp.717-718) ] .source[Coase, Ronald H, 1992, “The Institutional Structure of Production,” *American Economic Review* 82(4): 713-719] ]


'Over 2,400 Pakistani prisoners freed from Saudi Arabia, UAE'
by APPISLAMABAD: More than 2,400 Pakistani prisoners have been released from jails in Saudi Arabia and the United Arab Emirates over the past year due to the efforts of the Pakistan Tehreek-e-Insaf (PTI) government.
“Pakistan has secured the release of 1,245 prisoners from Saudi Arabia and 1,200 more from UAE during the first year of the PTI-led government, which is an unprecedented figure,” an official of the Ministry of Overseas Pakistanis and Human Resource Development (OPHED) told APP.
When the PTI government came to power, he said, there were 3,300 Pakistanis imprisoned in Saudi jails, while 2,521 were imprisoned in the UAE.
“In the one year of this government, around 38 per cent of Pakistani prisoners in Saudi Arabia and 48 per cent in UAE have been set free,” he added.
The official said the government had also extended financial and legal assistance to a total of 2,559 Pakistanis imprisoned in Middle Eastern countries for minor crimes.
“Apart from Saudi Arabia and UAE, a total of 55 Pakistani prisoners were released from jails in Oman, 18 in Kuwait, 17 in Bahrain, 14 in Qatar, and 10 in Iraq.”
The ministry, the official added, had also arranged the repatriation of 320 Pakistanis stranded in camps in Malaysia, 1,600 passengers who were stuck in Thailand due to the airspace closure, 28 drivers from Iraq, and more than five children who had been smuggled to the Middle East for immoral purposes.


Dummy App
John | Log out
> Page 1 > Breadcrumb > Current page
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
| Full name | City | Ride in group | Days of the week | Registration day |
|---|


Rusty Steele
Hi, I'm a dog. Woof!
Some of my favorit places:
The beach
The dog park
The fire hydrant
Make sure to follow me on ...


GUI.GetSliderValue
Syntax
GUI.GetSliderValue (widgetID : int) : int
Description
Returns the current value of a slider or scroll bar specified by widgetID. The widgetID must specify either scroll bar or a slider (horizontal or vertical).
Example
See the ScrollPic program in GUI.CreateHorizontalScrollBarFull for an example of GUI.GetSliderValue.
Status
Exported qualified.
This means that you can only call the function by calling GUI.GetSliderValue, not by calling GetSliderValue.
See also
GUI.SetSliderValue for setting a slider or scroll bar's value. See also GUI.CreateHorizontalScrollBar, GUI.CreateVerticalScrollBar, GUI.CreateHorizontalSlider, and GUI.CreateVerticalSlider.


Session Info
Session Id
Username
Database
API Server
Device Info
Name
VIN
Sample Actions
The example button below will do different stuff based upon iOS or Android
Tap Me


- packageElement - Variable in class com.travelbank.knitprocessor.user.UserMirror
-
- PackageStringExtractor - Class in com.travelbank.knitprocessor
-
Created by omerozer on 2/4/18.
- PackageStringExtractor() - Constructor for class com.travelbank.knitprocessor.PackageStringExtractor
-
- pool(T) - Method in class com.travelbank.knit.MemoryPool
-
Recycle an object and send it back to the pool
- Poolable - Interface in com.travelbank.knit
-
Objects that can be re-used without being destroyed and recreated can implement Poolable.
- post(Runnable) - Method in class com.travelbank.knit.schedulers.KnitIOReceiverThread
-
All results are passed through this method.
- post(Runnable) - Method in interface com.travelbank.knit.schedulers.MainHandlerSupplierInterface
-
Accepts tasks to be posted to Handler
.
- Presenter - Annotation Type in com.travelbank.knit
-
All Knit Presenters need to be tagged with this to be scanned and registered with Knit.
- PRESENTER - Static variable in class com.travelbank.knitlint.AnnotationsToCover
-
- PRESENTER - Static variable in class com.travelbank.knitlint.ClassesToLookFor
-
- PRESENTER_ANNOTATION_MISMATCH - Static variable in class com.travelbank.knitlint.KnitIssues
-
- presenterBuilder(Class<T>) - Static method in class com.travelbank.knit.KnitTestKit
-
- PresenterBuilder() - Constructor for class com.travelbank.knit.KnitTestKit.PresenterBuilder
-
- PresenterExposerWriter - Class in com.travelbank.knitprocessor.vp
-
Created by omerozer on 2/4/18.
- PresenterExposerWriter() - Constructor for class com.travelbank.knitprocessor.vp.PresenterExposerWriter
-
- PresenterInterface - Interface in com.travelbank.knit
-
Provides methods that handle Presenter specific functionality.
- process(Set<? extends TypeElement>, RoundEnvironment) - Method in class com.travelbank.knitprocessor.interactor.InteractorProcessor
-
- process(Set<? extends TypeElement>, RoundEnvironment) - Method in class com.travelbank.knitprocessor.KnitCoreProcessor
-
- process(Set<? extends TypeElement>, RoundEnvironment, Set<UserMirror>) - Method in class com.travelbank.knitprocessor.model.KnitModelProcessor
-
- process(Set<UserMirror>) - Method in class com.travelbank.knitprocessor.user.KnitUserProcessor
-
- process(Set<? extends TypeElement>, RoundEnvironment, Set<UserMirror>) - Method in class com.travelbank.knitprocessor.vp.KnitPresenterProcessor
-
- putData(String, Object) - Method in class com.travelbank.knit.KnitMessage
-
Put data inside this#data
via stub pattern.
- putMessageForView(Class<?>, KnitMessage) - Method in class com.travelbank.knit.MessageTrain
-


Cherokee-English Translate
Terms
- [1] Whenever you use our Site, you agree to be aware that the translations provided by our Site are translated by machines, are highly likely to be poor-quality, and are not supposed to be used at anywhere else without confirmation from professional Cherokee-English translators.
Support
- Need help? Please email Shiyue Zhang (shiyue At cs.unc.edu).


| < Day Day Up > |
Hack 41 Perform Client-Server Cross-Platform Backups with Bacula
Don't let the campy name fool you. Bacula is a powerful, flexible, open source backup program. . Having problems finding a backup solution that fits all your needs? One that can back up both Unix and Windows systems? That is flexible enough to back up systems with irregular backup needs, such as laptops? That allows you to run scripts before or after the backup job? That provides browsing capabilities so you can decide upon a restore point? Bacula may be what you're looking for. 4.8.1 Introducing BaculaBacula is a client-server solution composed of several distinct parts:
Each File Daemon will have an entry in the Director configuration file. Other important entries include FileSets and Jobs. A FileSet identifies a set of files to back up. A Job specifies a single FileSet, the type of backup (incremental, full, etc.), when to do the backup, and what Storage Device to use. Backup and restore jobs can be run automatically or manually. 4.8.2 InstallationBacula stores details of each backup in a database. You can use either SQLite or MySQL, and starting with Bacula Version 1.33, PostgreSQL. Before you install Bacula, decide which database you want to use.
The existing Bacula documentation provides detailed installation instructions if you're installing from source. To install instead the SQLite version of the FreeBSD port: # cd /usr/ports/sysutils/bacula # make install Or, if you prefer to install the MySQL version: # cd /usr/ports/sysutils/bacula # make -DWITH_MYSQL install
4.8.3 Configuration FilesBacula installs several configuration files that should work for your environment with few modifications. <IP_ADDRESS> File Daemon on the backup clientThe first configuration file, /usr/local/etc/bacula-fd.conf, is for the File Daemon. This file needs to reside on each machine you want to back up. For security reasons, only the Directors specified in this file will be able to communicate with this File Daemon. The name and password specified in the Director resource must be supplied by any connecting Director. You can specify more than one Director { } resource. Make sure the password matches the one in the Client resource in the Director's configuration file. The FileDaemon { } resource identifies this system and specifies the port on which it will listen for Directors. You may have to create a directory manually to match the one specified by the Working Directory. <IP_ADDRESS> Storage Daemon on the backup serverThe next configuration file, /usr/local/etc/bacula-sd.conf, is for the Storage Daemon. The default values should work unless you need to specify additional storage devices. As with the File Daemon, the Director { } resource specifies the Director(s) that may contact this Storage Daemon. The password must match that found in the Storage resource in the Director's configuration file. <IP_ADDRESS> Director on the backup serverThe Director's configuration is by necessity the largest of the daemons. Each Client, Job, FileSet, and Storage Device is defined in this file. In the following example configuration, I've defined the Job Client1 to back up the files defined by the FileSet Full Set on a laptop. The backup will be performed to the File storage device, which is really a disk located at laptop.example.org.
# more /usr/local/etc/bacula-dir.conf Director { Name = laptop-dir DIRport = 9101 QueryFile = "/usr/local/etc/query.sql" WorkingDirectory = "/var/db/bacula" PidDirectory = "/var/run" Maximum Concurrent Jobs = 1 Password = "lLftflC4QtgZnWEB6vAGcOuSL3T6n+P7jeH+HtQOCWwV" Messages = Standard } Job { Name = "Client1" Type = Backup Client = laptop-fd FileSet = "Full Set" Schedule = "WeeklyCycle" Storage = File Messages = Standard Pool = Default Write Bootstrap = "/var/db/bacula/Client1.bsr" Priority = 10 } FileSet { Name = "Full Set" Include = signature=MD5 { /usr/ports/sysutils/bacula/work/bacula-1.32c } # If you backup the root directory, the following two excluded # files can be useful # Exclude = { /proc /tmp /.journal /.fsck } } Client { Name = laptop-fd Address = laptop.example.org FDPort = 9102 Catalog = MyCatalog Password = "laptop-client-password" File Retention = 30 days Job Retention = 6 months AutoPrune = yes } # Definition of file storage device Storage { Name = File Address = laptop.example.org SDPort = 9103 Password = "TlDGBjTWkjTS/0HNMPF8ROacI3KlgIUZllY6NS7+gyUp" Device = FileStorage Media Type = File } Note that the password given by any connecting Console must match the one here. 4.8.4 Database SetupNow that you've modified the configuration files to suit your needs, use Bacula's scripts to create and define the database tables that it will use. To set up for MySQL: # cd /usr/ports/sysutils/bacula/work/bacula-1.32c/src/cats # ./grant_mysql_privileges # ./create_mysql_database # ./make_mysql_tables If you have a password set for the MySQL root account, add -p to these commands and you will be prompted for the password. You now have a working database suitable for use by Bacula. 4.8.5 Testing Your Tape DriveSome tape drives are not standard. They require their own proprietary software and can be temperamental when used with other software. Regardless of what software it uses, each drive model can have its own little quirks that need to be catered to. Fortunately, Bacula comes with btape, a handy little utility for testing your drive. My tape drive is at /dev/sa1. Bacula prefers to use the non-rewind variant of the device, but it can handle the raw variant as well. If you use the rewinding device, then only one backup job per tape is possible. This command will test the non-rewind device /dev/nrsa1: # /usr/local/sbin/btape -c /usr/local/etc/bacula-sd.conf /dev/nrsa1 4.8.6 Running Without RootIt is a good idea to run daemons with the lowest possible privileges. The Storage Daemon and the Director Daemon do not need root permissions. However, the File Daemon does, because it needs to access all files on your system. In order to run daemons with nonroot accounts, you need to create a user and a group. Here, I used vipw to create the user. I selected a user ID and group ID of 1002, as they were unused on my system. bacula:*:1002:1002::0:0:Bacula Daemon:/var/db/bacula:/sbin/nologin I also added this line to /etc/group: bacula:*:1002: The bacula user (as opposed to the Bacula daemon) will have a home directory of /var/db/bacula, which is the default location for the Bacula database. Now that you have both a bacula user and a bacula group, you can secure the bacula home directory by issuing this command: # chown -R bacula:bacula /var/db/bacula/ 4.8.7 Starting the Bacula DaemonsTo start the Bacula daemons on a FreeBSD system, issue the following command: # /usr/local/etc/rc.d/bacula.sh start To confirm they are all running: # ps auwx | grep bacula root 63416 0.0 0.3 2040 1172 ?? Ss 4:09PM 0:00.01 /usr/local/sbin/bacula-sd -v -c /usr/local/etc/bacula-sd.conf root 63418 0.0 0.3 1856 1036 ?? Ss 4:09PM 0:00.00 /usr/local/sbin/bacula-fd -v -c /usr/local/etc/bacula-fd.conf root 63422 0.0 0.4 2360 1440 ?? Ss 4:09PM 0:00.00 /usr/local/sbin/bacula-dir -v -c /usr/local/etc/bacula-dir.conf 4.8.8 Using the Bacula ConsoleThe console is the main interface through which you run jobs, query system status, and examine the Catalog contents, as well as label, mount, and unmount tapes. There are two consoles available: one runs from the command line, and the other is a GNOME GUI. I will concentrate on the command-line console. To start the console, I use this command: # /usr/local/sbin/console -c /usr/local/etc/console.conf Connecting to Director laptop:9101 1000 OK: laptop-dir Version: 1.32c (30 Oct 2003) * You can obtain a list of the available commands with the help command. The status all command is a quick and easy way to verify that all components are up and running. To label a Volume, use the label command. Bacula comes with a preset backup job to get you started. It will back up the directory from which Bacula was installed. Once you get going and have created your own jobs, you can safely remove this job from the Director configuration file. Not surprisingly, you use the run command to run a job. Once the job runs, the results will be sent to you via email, according to the Messages resource settings within your Director configuration file. To restore a job, use the restore command. You should choose the restore location carefully and ensure there is sufficient disk space available. It is easy to verify that the restored files match the original: # diff -ruN \ /tmp/bacula-restores/usr/ports/sysutils/bacula/work/bacula-1.32c \ /usr/ports/sysutils/bacula/work/bacula-1.32c # 4.8.9 Creating Backup SchedulesFor my testing, I wanted to back up files on my Windows XP machine every hour. I created this schedule: Schedule { Name = "HourlyCycle" Run = Full 1st sun at 1:05 Run = Differential 2nd-5th sun at 1:05 Run = Incremental Hourly } Any Job that uses this schedule will be run at the following times:
4.8.10 Creating a Client-only InstallSo far we have been testing Bacula on the server. With the FreeBSD port, installing a client-only version of Bacula is easy: # cd /usr/ports/sysutils/bacula # make -DWITH_CLIENT_ONLY install You will also need to tell the Director about this client by adding a new Client resource to the Director configuration file. You will also want to create a Job and FileSet resource. When you change the Bacula configuration files, remember to restart the daemons: # /usr/local/etc/rc.d/bacula.sh restart Stopping the Storage daemon Stopping the File daemon Stopping the Director daemon Starting the Storage daemon Starting the File daemon Starting the Director daemon # 4.8.11 See Also
|
| < Day Day Up > |


The backface-visibility property relates to 3D transforms. With 3D transforms, you can manage to rotate an element so what we think of as the “front” of an element no longer faces the screen. For instance, this would flip an element away from the screen(left-side).  That’s because the default for backface-visibility is visible. Instead of it being visible, you could hide it using hidden (right side).
text
text

text

text

$backface-visibility: (); $backface-visibility: map-merge( ( "visible": visible, "hidden": hidden, "inherit": inherit, "initial": initial, ), $backface-visibility );


// named parameter versions template <class Graph, class class P, class T, class R> void maximum_adjacency_search(const Graph& g, const bgl_named_params<P, T, R>& params); // non-named parameter versions template <class Graph, class WeightMap, class MASVisitor> void maximum_adjacency_search(const Graph& g, WeightMap weights, MASVisitor vis, const typename graph_traits<Graph>::vertex_descriptor start);
The maximum_adjacency_search() function performs a traversal of the vertices in an undirected graph. The next vertex visited is the vertex that has the most visited neighbors at any time. In the case of an unweighted, undirected graph, the number of visited neighbors of the very last vertex visited in the graph is also the number of edge-disjoint paths between that vertex and the next-to-last vertex visited. These can be retrieved from a visitor, an example of which is in the test harness mas_test.cpp.
The maximum_adjacency_search() function invokes user-defined actions at certain event-points within the algorithm. This provides a mechanism for adapting the generic MAS algorithm to the many situations in which it can be used. In the pseudo-code below, the event points for MAS are the labels on the right. The user-defined actions must be provided in the form of a visitor object, that is, an object whose type meets the requirements for a MAS Visitor.
 The graph type must be a model of Incidence Graph and Vertex List Graph.
IN: WeightMap weights
The weight or length of each edge in the graph. The WeightMap type must be a model of Readable Property Map and its value type must be Less Than Comparable and summable. The key type of this map needs to be the graph's edge descriptor type. Default: get(edge_weight, g)IN: visitor(MASVisitor vis)
A visitor object that is invoked inside the algorithm at the event-points specified by the MAS Visitor concept. The visitor object is passed by value [1].IN: root_vertex(typename graph_traits<VertexListGraph>::vertex_descriptor start)
Default: mas_visitor<null_visitor>
This specifies the vertex that the depth-first search should originate from. The type is the type of a vertex descriptor for the given graph.
Default: *vertices(g).first
IN: vertex_index_map(VertexIndexMap vertexIndices)
This maps each vertex to an integer in the range [0, num_vertices(g)). This is only necessary if the default is used for the assignment, index-in-heap, or distance maps. VertexIndexMap must be a model of Readable Property Map. The value type of the map must be an integer type. The key type must be the graph's vertex descriptor type.
Default: get(boost::vertex_index, g) Note: if you use this default, make sure your graph has an internal vertex_index property. For example, adjacency_list with VertexList=listS does not have an internal vertex_index property.
UTIL: vertex_assignment_map(AssignmentMap assignments)
AssignmentMap must be a model of Read/Write Property Map. The key and value types must be the graph's vertex descriptor type.
Default: A boost::iterator_property_map using a std::vector of num_vertices(g) vertex descriptors and vertexIndices for the index map.
UTIL: max_priority_queue(MaxPriorityQueue& pq)
MaxPriorityQueue must be a model of Keyed Updatable Queue and a max- Updatable Priority Queue. The value type must be the graph's vertex descriptor and the key type must be the weight type. Default: A boost::d_ary_heap_indirect using a default index-in-heap and distance map.
UTIL: index_in_heap_map(IndexInHeapMap indicesInHeap)
This parameter only has an effect when the default max-priority queue is used.
IndexInHeapMap must be a model of Read/Write Property Map. The key type must be the graph's vertex descriptor type. The value type must be a size type (typename std::vector<vertex_descriptor>::size_type).
Default: A boost::iterator_property_map using a std::vector of num_vertices(g) size type objects and vertexIndices for the index map.
UTIL: distance_map(DistanceMap wAs)
This parameter only has an effect when the default max-priority queue is used.
DistanceMap must be a model of Read/Write Property Map. The key type must be the graph's vertex descriptor type. The value type must be the weight type (typename boost::property_traits<WeightMap>::value_type).
Default: A boost::iterator_property_map using a std::vector of num_vertices(g) weight type objects and vertexIndices for the index map.
void
bad_graph
If num_vertices(g) is less than 2
std::invalid_argument
If a max-priority queue is given as an argument and it is not empty.
The time complexity is O(E + V).
A linear time 2 + epsilon approximation algorightm for edge connectivity
[1] Since the visitor parameter is passed by value, if your visitor contains state then any changes to the state during the algorithm will be made to a copy of the visitor object, not the visitor object passed in. Therefore you may want the visitor to hold this state by pointer or reference.
| Copyright © 2012 | Fernando Vilas |


--- layout: post title: Where Systems Integrators Fit in the Future of Enterprise Open Source date: '2012-01-06T16:42:48-08:00' tags: tumblr_url: http://alexhwilliams.tumblr.com/post/15423833583/where-systems-integrators-fit-in-the-future-of ---
http://bit.ly/x7E8fA


Python ExceptionsAn exception can be defined as an abnormal condition in a program resulting in the disruption in the flow of the program. Whenever an exception occurs, the program halts the execution, and thus the further code is not executed. Therefore, an exception is the error which python script is unable to tackle with. Python provides us with the way to handle the Exception so that the other part of the code can be executed without any disruption. However, if we do not handle the exception, the interpreter doesn't execute all the code that exists after the that. Common ExceptionsA list of common exceptions that can be thrown from a normal python program is given below.
Problem without handling exceptionsAs we have already discussed, the exception is an abnormal condition that halts the execution of the program. Consider the following example. ExampleOutput: Enter a:10 Enter b:0 Traceback (most recent call last): File "exception-test.py", line 3, in <module> c = a/b; ZeroDivisionError: division by zero Exception handling in pythonIf the python program contains suspicious code that may throw the exception, we must place that code in the try block. The try block must be followed with the except statement which contains a block of code that will be executed if there is some exception in the try block. SyntaxWe can also use the else statement with the try-except statement in which, we can place the code which will be executed in the scenario if no exception occurs in the try block. The syntax to use the else statement with the try-except statement is given below. ExampleOutput: Enter a:10 Enter b:2 a/b = 5 Hi I am else block The except statement with no exceptionPython provides the flexibility not to specify the name of exception with the except statement. Consider the following example. ExampleOutput: Enter a:10 Enter b:0 can't divide by zero Points to remember
ExampleOutput: File not found Declaring multiple exceptionsThe python allows us to declare the multiple exceptions with the except clause. Declaring multiple exceptions is useful in the cases where a try block throws multiple exceptions. SyntaxExampleOutput: Arithmetic Exception The finally blockWe can use the finally block with the try block in which, we can pace the important code which must be executed before the try statement throws an exception. The syntax to use the finally block is given below. syntaxExampleOutput: file closed Error Raising exceptionsAn exception can be raised by using the raise clause in python. The syntax to use the raise statement is given below. syntaxPoints to remember
ExampleOutput: Enter the age?17 The age is not valid ExampleOutput: Enter a?10 Enter b?0 The value of b can't be 0 Custom ExceptionThe python allows us to create our exceptions that can be raised from the program and caught using the except clause. However, we suggest you read this section after visiting the Python object and classes. Consider the following example. ExampleOutput: Received error: 2000
Next TopicPython Date and Time
|
Python ExceptionsAn exception can be defined as an abnormal condition in a program resulting in the disruption in the flow of the program. Whenever an exception occurs, the program halts the execution, and thus the further code is not executed. Therefore, an exception is the error which python script is unable to tackle with. Python provides us with the way to handle the Exception so that the other part of the code can be executed without any disruption. However, if we do not handle the exception, the interpreter doesn't execute all the code that exists after the that. Common ExceptionsA list of common exceptions that can be thrown from a normal python program is given below.
Problem without handling exceptionsAs we have already discussed, the exception is an abnormal condition that halts the execution of the program. Consider the following example. ExampleOutput: Enter a:10 Enter b:0 Traceback (most recent call last): File "exception-test.py", line 3, in <module> c = a/b; ZeroDivisionError: division by zero Exception handling in pythonIf the python program contains suspicious code that may throw the exception, we must place that code in the try block. The try block must be followed with the except statement which contains a block of code that will be executed if there is some exception in the try block. SyntaxWe can also use the else statement with the try-except statement in which, we can place the code which will be executed in the scenario if no exception occurs in the try block. The syntax to use the else statement with the try-except statement is given below. ExampleOutput: Enter a:10 Enter b:2 a/b = 5 Hi I am else block The except statement with no exceptionPython provides the flexibility not to specify the name of exception with the except statement. Consider the following example. ExampleOutput: Enter a:10 Enter b:0 can't divide by zero Points to remember
ExampleOutput: File not found Declaring multiple exceptionsThe python allows us to declare the multiple exceptions with the except clause. Declaring multiple exceptions is useful in the cases where a try block throws multiple exceptions. SyntaxExampleOutput: Arithmetic Exception The finally blockWe can use the finally block with the try block in which, we can pace the important code which must be executed before the try statement throws an exception. The syntax to use the finally block is given below. syntaxExampleOutput: file closed Error Raising exceptionsAn exception can be raised by using the raise clause in python. The syntax to use the raise statement is given below. syntaxPoints to remember
ExampleOutput: Enter the age?17 The age is not valid ExampleOutput: Enter a?10 Enter b?0 The value of b can't be 0 Custom ExceptionThe python allows us to create our exceptions that can be raised from the program and caught using the except clause. However, we suggest you read this section after visiting the Python object and classes. Consider the following example. ExampleOutput: Received error: 2000
Next TopicPython Date and Time
|
Python ExceptionsAn exception can be defined as an abnormal condition in a program resulting in the disruption in the flow of the program. Whenever an exception occurs, the program halts the execution, and thus the further code is not executed. Therefore, an exception is the error which python script is unable to tackle with. Python provides us with the way to handle the Exception so that the other part of the code can be executed without any disruption. However, if we do not handle the exception, the interpreter doesn't execute all the code that exists after the that. Common ExceptionsA list of common exceptions that can be thrown from a normal python program is given below.
Problem without handling exceptionsAs we have already discussed, the exception is an abnormal condition that halts the execution of the program. Consider the following example. ExampleOutput: Enter a:10 Enter b:0 Traceback (most recent call last): File "exception-test.py", line 3, in <module> c = a/b; ZeroDivisionError: division by zero Exception handling in pythonIf the python program contains suspicious code that may throw the exception, we must place that code in the try block. The try block must be followed with the except statement which contains a block of code that will be executed if there is some exception in the try block. SyntaxWe can also use the else statement with the try-except statement in which, we can place the code which will be executed in the scenario if no exception occurs in the try block. The syntax to use the else statement with the try-except statement is given below. ExampleOutput: Enter a:10 Enter b:2 a/b = 5 Hi I am else block The except statement with no exceptionPython provides the flexibility not to specify the name of exception with the except statement. Consider the following example. ExampleOutput: Enter a:10 Enter b:0 can't divide by zero Points to remember
ExampleOutput: File not found Declaring multiple exceptionsThe python allows us to declare the multiple exceptions with the except clause. Declaring multiple exceptions is useful in the cases where a try block throws multiple exceptions. SyntaxExampleOutput: Arithmetic Exception The finally blockWe can use the finally block with the try block in which, we can pace the important code which must be executed before the try statement throws an exception. The syntax to use the finally block is given below. syntaxExampleOutput: file closed Error Raising exceptionsAn exception can be raised by using the raise clause in python. The syntax to use the raise statement is given below. syntaxPoints to remember
ExampleOutput: Enter the age?17 The age is not valid ExampleOutput: Enter a?10 Enter b?0 The value of b can't be 0 Custom ExceptionThe python allows us to create our exceptions that can be raised from the program and caught using the except clause. However, we suggest you read this section after visiting the Python object and classes. Consider the following example. ExampleOutput: Received error: 2000
Next TopicPython Date and Time
|
Python ExceptionsAn exception can be defined as an abnormal condition in a program resulting in the disruption in the flow of the program. Whenever an exception occurs, the program halts the execution, and thus the further code is not executed. Therefore, an exception is the error which python script is unable to tackle with. Python provides us with the way to handle the Exception so that the other part of the code can be executed without any disruption. However, if we do not handle the exception, the interpreter doesn't execute all the code that exists after the that. Common ExceptionsA list of common exceptions that can be thrown from a normal python program is given below.
Problem without handling exceptionsAs we have already discussed, the exception is an abnormal condition that halts the execution of the program. Consider the following example. ExampleOutput: Enter a:10 Enter b:0 Traceback (most recent call last): File "exception-test.py", line 3, in <module> c = a/b; ZeroDivisionError: division by zero Exception handling in pythonIf the python program contains suspicious code that may throw the exception, we must place that code in the try block. The try block must be followed with the except statement which contains a block of code that will be executed if there is some exception in the try block. SyntaxWe can also use the else statement with the try-except statement in which, we can place the code which will be executed in the scenario if no exception occurs in the try block. The syntax to use the else statement with the try-except statement is given below. ExampleOutput: Enter a:10 Enter b:2 a/b = 5 Hi I am else block The except statement with no exceptionPython provides the flexibility not to specify the name of exception with the except statement. Consider the following example. ExampleOutput: Enter a:10 Enter b:0 can't divide by zero Points to remember
ExampleOutput: File not found Declaring multiple exceptionsThe python allows us to declare the multiple exceptions with the except clause. Declaring multiple exceptions is useful in the cases where a try block throws multiple exceptions. SyntaxExampleOutput: Arithmetic Exception The finally blockWe can use the finally block with the try block in which, we can pace the important code which must be executed before the try statement throws an exception. The syntax to use the finally block is given below. syntaxExampleOutput: file closed Error Raising exceptionsAn exception can be raised by using the raise clause in python. The syntax to use the raise statement is given below. syntaxPoints to remember
ExampleOutput: Enter the age?17 The age is not valid ExampleOutput: Enter a?10 Enter b?0 The value of b can't be 0 Custom ExceptionThe python allows us to create our exceptions that can be raised from the program and caught using the except clause. However, we suggest you read this section after visiting the Python object and classes. Consider the following example. ExampleOutput: Received error: 2000
Next TopicPython Date and Time
|