help
?
sys.argv
work?
### What are some things we can do to prepare for CS?
### Why is there such a debate between OOP and functional programming, and why should we care?
There are a lot of programming paradigms and they all have their strengths and weaknesses when it comes to solving different types of problems.
People can be quite opinionated about their favorites, but it’s important to remember that no one language or paradigm is the right tool for all jobs. And, additionally, that virtually all problems can be solved in any of the declarative or imperative paradigms. (Some might produce cleaner, more elegant code for a particular problem.)
Paradigms are the hardest thing to learn because you often have to take all the knowledge you have about solving a problem in another paradigm and throw it out the window. You have to learn new patterns and techniques to be effective.
But we encourage this kind of learning because most popular languages are to some degree multi-paradigm, and the more techniques you know from more paradigms, the more effective you are in that multi-paradigm langage.
### In regard to the code challenge solution, why is the ‘+’ operator being used to concatenate strings? I thought we were supposed to use the join() method in Python?
Using join()
to join large numbers of strings is definitely faster in Python than using the +
operator to do it. The reason is that every time you join()
or use the +
operator, a new string is created. So if you only have to join()
once, versus using +
hundreds of times, you’ll run faster.
That said, if you want to use the join()
approach, you’ll have to have all your strings in a list, which uses more memory than just having the two or three that you need at a time to use +
. So there’s a tradeoff.
Another tradeoff might be in readability. It might be easier to read the +
version. That’s worth something.
Finally, if +
is fast enough for this case, it might not be worth the time to bother with making a list of strings to join()
.
### How do you get out of the Python built-in help
?
Hit q
for “quit”.
It’s a common command in Unix “pagers” (programs that show documents a page at a time).
### Are there any helpful VS Code extensions that are recommend for using with Python?
### I’m on Windows; what command do I use to run Python?
If you’re running in PowerShell or cmd, use:
py
If in bash, use python
or python3
.
### What version of Python do I need?
You should have version 3.7 or higher. Test with:
python --version
You should. Good Python devs know how.
### How do I get out of the Python REPL?
Hit CTRL-D
. This is the way End-Of-File is signified in Unix-likes.
Read, Evaluate, Print Loop.
It reads your input, evaluates it, and prints the result. And loops.
### I’m on a Mac and when I run Python it says I’m on version 2.7. Why?
Macs come with version 2.7 by default. You’ll need to install version 3.
And preferable use pipenv
after that.
### Does Python use tabs or spaces?
PEP 8 says four spaces.
### How do I convert an iterator into a list?
Cast it:
produces:
### Does Python have hoisting?
No.
### Does scoping work similar to other languages?
Generally, and also not really. Variables are either global or function-local.
Since there are no declarations, there’s no block-level scope.
It is similar to var
in JavaScript.
### Can you return a reference to a function from another function? Or store it in a variable?
Yes. Functions are first-class citizens.
### Can you use boolean shortcut assignments?
Yes, you can. This is common in Perl and JavaScript, but it’s not particularly idiomatic in Python.
### Can you do anonymous functions?
You can use lambda
for simple functions:
### Is a dict like a JavaScript object?
Sort of.
The syntax is different, though. In Python you must use []
notation to access elements. And you must use "
around the key names.
### What are all those method names with double underscores around them?
Those are function you typically don’t need to use, but can override or call if you wish.
Most commonly used are:
init()
is the constructor for objects
str()
returns a string representation of the object
repr()
returns a string representation of the object, for debugging
### How do I get a value from a dict?
You don’t use dot notation.
### When do we run pipenv shell?
pipenv shell
puts you into your work environment. When you’re ready to work, or run the code, or install new dependencies, you should be in your pipenv shell.
### How do I get out of the pipenv shell?
Type exit
.
### How do I install additional packages from pipenv?
pipenv install packagename
### Is it possible to use system-wide packages from inside the virtual environment?
This is not recommended.
### Where are good Python docs?
The official docs might be hard to read at first, but you’ll get used to them quickly
Pylint or Flake8. The latter seems to be a bit more popular.
### Can you dynamically add new methods/properties to class through other functions? Or must all properties/methods be declared at once?
You can add them dynamically at runtime, but you have to add them to the class itself:
class Foo():
pass
f = Foo()
Foo.x = 12 # Dynamically add property to class
f.x == 12 # True!
def a_method(self):
print("Hi")
Foo.hi = a_method # Dynamically add method to class
f.hi() # Prints "Hi"
This is not a common thing to see in Python, however.
### Following this flow: 1) class Dog is created with attributes size and weight. 2) New instance called Snoopy of class Dog is created. 3) Class Dog gets the method bark() dynamically added to it. Question: will Snoopy now have access to bark() method?
Yes.
### If a subclass inherits from two superclasses with a method of the same name, which method will the subclass use?
The answer to this is twofold:
Lots of devs and shops frown on multiple inheritance, so maybe just don’t do it. (Discussion)
As for the order in which methods of the same name are resolved, check out the MRO Algorithm which is what Python uses.
### How to handle multiple inheritance and why/when to do it in the first place?
Sometimes multiple inheritance can lead to elegant solutions when a subclass needs attributes from multiple, otherwise-unrelated parent classes.
However, a lot of people find it’s not worth the trouble) and opt for other solutions, like composition.
### Why use tuples instead of lists?
dict
keys.
### What’s the difference between repr and str?
Generally speaking, repr
is the string a dev would want to see if they dumped an object to the screen. str
is the string a user would want to see if the object were print()
ed.
The output of repr
should be valid Python code that can reproduce the object.
class Goat:
def __init__(self, leg_count):
self.leg_count = leg_count
def __repr__(self):
return f'Goat(leg_count={self.leg_count})'
def __str__(self):
return f'a goat with {self.leg_count} legs'
In action:
>>> g = Goat(4)
>>> str(g)
'a goat with 4 legs'
>>> g
Goat(leg_count=4)
>>> Goat(leg_count=4) # output of __repr__ makes a clone of that object!
Goat(leg_count=4)
It’s a list that holds command line arguments. This is a way for a user to run your program and specify different behavior from the command line.
Here’s a small program that prints the command line arguments:
and here’s some output, assuming you named the script foo.py
:
$ python foo.py
Argument #0 is: foo.py
$ python foo.py antelope buffalo
Argument #0 is: foo.py
Argument #1 is: antelope
Argument #2 is: buffalo
Note that the 0th element in the list is the name of the program.
Here’s another program that prints up to whatever number the user specifies:
Example runs:
$ python foo.py 2
1
2
$ python foo.py 4
1
2
3
4
### How do I concatenate two arrays into a single array?
Use extend()
.
### What are some ways to learn a new language?
Things to look for in the new language:
It’s often better to make progress in small increments than to write a bunch of stuff and test it in one go.
Also, it’s easier to stay motivated if you spend 10 minutes getting a first version going, even if it’s missing 99% of its features, and then starting to iterate on that.
### Why isn’t official documentation more helpful than Stack Overflow?
Often official documentation is more geared toward being a concise reference. Stack Overflow is more of an example-based learning environment.
Sometimes you need to know the specific details. In those cases, you can dig into the spec, with all it’s lawyerly language, and try to decipher what it is you have to do.
Other times, you just need a getting-started example, and Stack Overflow is great for that.
Both types of documentation have their purpose.
### During an interview, what do I do if I can’t remember the exact syntax?
Just say so.
“I can’t remember how to add an element to the end of the list in Python… is it push()
? In any case, we’ll call the function here that does that.”
(Turns out it’s append()
in Python, but being honest and describing what it is your’re trying to do will get you 99% of the way there in an interview.)


Meeting of Congress-NCP leaders tomorrow in Delhi
Both parties contested the recently culminated Assembly polls in an alliance.
by ANINew Delhi: A meeting of Congress and NCP leaders is scheduled to be held on Wednesday evening in the national capital.
NCP leaders including party chief Sharad Pawar, Praful Patel, Ajit Pawar and Congress leaders Ahmed Patel, Mallikarjun Kharge, Prithviraj Chavan, Ashok Chavan, amongst others will be present in the meeting.
On Monday, Sharad Pawar met Congress interim president Sonia Gandhi in the latter's residence here. However, the NCP leader said that they did not talk about government formation in Maharashtra.
Both parties contested the recently culminated Assembly polls in alliance but could not reach the halfway figure in the 288-member Assembly.
Maharashtra came under President's Rule on November 9 after all parties failed to form the government in the state.
The BJP emerged as the single-largest party in Maharashtra Assembly polls with 105 seats.
While Shiv Sena bagged 56 seats, NCP and Congress have 54 and 44 MLAs respectively in the state assembly.


Introduction
Installation
Building CIL on Windows with Microsoft Visual C
Distribution Contents
Compiling C to CIL
How to Use CIL
Using
cilly
, the CIL driver
Using CIL as a library
CIL API Documentation
Using the visitor
Interpreted Constructors and Deconstructors
Printing and Debugging support
Attributes
The CIL Driver
cilly
Options
cilly.asm
Options
Internal Options
Specifying a machine model
Library of CIL Modules
Control-Flow Graphs
Data flow analysis framework
Inliner
Dominators
Points-to Analysis
StackGuard
Heapify
One Return
Partial Evaluation and Constant Folding
Reaching Definitions
Available Expressions
Liveness Analysis
Dead Code Elimination
Simple Memory Operations
Simple Three-Address Code
Converting C to C++
Generating LLVM code (new in 1.3.7)
Controlling CIL
GCC Extensions
CIL Limitations
Known Bugs and Limitations
Code that CIL won’t compile
Code that behaves differently under CIL
Effects of the CIL translation
Using the merger
Using the patcher
Debugging support
Who Says C is Simple?
Standard C
GCC ugliness
Microsoft VC ugliness
Authors
License
Bug reports
This document was translated from L
A
T
E
X by
H
E
V
E
A
.


Places you've been
Add Info:
Name of Place
Landmarks Nearby
Restaurants Nearby
People Visited
Add
Places You've Been:
Name:
Landmarks:
Restaurants:
Visited:


Honzi/Personal Bests/Hearthstone/Blackrock Mountain
| Dragon Egg
| 1
| Rare
| Neutral
| 2
|
|
| Twilight Whelp
| 1
| Common
| Priest
| 2
|
|
| Gang Up
| 2
| Common
| Rogue
| 2
|
|
| Lava Shock
| 2
| Rare
| Shaman
| 2
|
|
| Quick Shot
| 2
| Common
| Hunter
| 2
|
|
| Resurrect
| 2
| Rare
| Priest
| 2
|
|
| Revenge
| 2
| Rare
| Warrior
| 2
|
|
| Blackwing Technician
| 3
| Common
| Neutral
| 2
|
|
| Demonwrath
| 3
| Rare
| Warlock
| 2
|
|
| Druid of the Flame
| 3
| Common
| Druid
| 2
|
|
| Flamewaker
| 3
| Rare
| Mage
| 2
|
|
| Imp Gang Boss
| 3
| Common
| Warlock
| 2
|
|
| Axe Flinger
| 4
| Common
| Warrior
| 2
|
|
| Core Rager
| 4
| Rare
| Hunter
| 2
|
|
| Dragonkin Sorcerer
| 4
| Common
| Neutral
| 2
|
|
| Fireguard Destroyer
| 4
| Common
| Shaman
| 2
|
|
| Hungry Dragon
| 4
| Common
| Neutral
| 2
|
|
| Blackwing Corruptor
| 5
| Common
| Neutral
| 2
|
|
| Dark Iron Skulker
| 5
| Rare
| Rogue
| 2
|
|
| Dragon Consort
| 5
| Rare
| Paladin
| 2
|
|
| Dragon's Breath
| 5
| Common
| Mage
| 2
|
|
| Grim Patron
| 5
| Rare
| Neutral
| 2
|
|
| Solemn Vigil
| 5
| Common
| Paladin
| 2
|
|
| Drakonid Crusher
| 6
| Common
| Neutral
| 2
|
|
| Emperor Thaurissan
| 6
| Legendary
| Neutral
| 1
|
|
| Volcanic Drake
| 6
| Common
| Neutral
| 2
|
|
| Rend Blackhand
| 7
| Legendary
| Neutral
| 1
|
|
| Chromaggus
| 8
| Legendary
| Neutral
| 1
|
|
| Majordomo Executus
| 9
| Legendary
| Neutral
| 1
|
|
| Nefarian
| 9
| Legendary
| Neutral
| 1
|
|
| Volcanic Lumberer
| 9
| Rare
| Druid
| 2
|
|


SVG Font Converter
The TrueType Font to SVG (ttf2svg) application lets you convert a range of characters from a TrueType Font into the SVG font format.
Running the font converter
If you are using the Batik binary distribution, type the following at the command line:
java -jar batik-ttf2svg.jar OPTIONS
If you are using the Batik source distribution, type the following at the command line:
build ttf2svg OPTIONS
In both cases, the options are the same:
ttf-path [-l range-begin] [-h range-end] [-ascii] [-id id] [-o output-path] [-testcard]
where:
For example:
java -jar batik-ttf2svg.jar /usr/home/myFont.ttf -l 48 -h 57 -id MySVGFont -o mySVGFont.svg -testcard
will convert characters 48 to 57, i.e., '0' to '9', in the myFont.ttf file into their SVG equivalent in the mySVGFont.svg file, appending a test card so that the font can be visualized.
Use cases
The TrueType Font converter application is helpful to be able to embed font definitions in SVG files. This will ensure that the SVG document will look exactly the same on all platform by not relying on system fonts.
Note that users of the tool should make sure that they have the right to embed the font before embedding it in an SVG file and should refer to the font license for information. Note that TrueType Font files contain a flag that defines the “embeddability” of a font and there are tools for checking that flag.


Ticket or Leave it
Movies
Calendar
Register/Log In
Register
Log in
First Name
Last Name
Username
Email address
Password
Confirm Password
Username
Password


Live DOM Viewer
Markup to test (permalink, save, upload, download, hide):
<!DOCTYPE HTML><html></html>
Script not loaded.
This script puts a function w(s)
into the
global scope of the test page, where s is a string or
object to output to the log.
Some files are available for testing purposes, notably "image" is an image.
-
image
and image.swf
- a GIF image of two cats
-
null
- a PNG image of the word "null"
-
flash
- a Flash file
-
flash-as-text
and flash-as-text.swf
- a Flash file sent as text/plain
-
flash-as-image.swf
- a Flash file sent as image/gif
-
script
- a JS file
-
style
- a CSS file
-
document
- an HTML file
-
alertdoc
- an HTML file with a script that alerts
-
delayed-image
- a GIF image after a two-second pause
-
delayed-script
- a JS file after a two-second pause
-
xhtml
- an XHTML file
-
xml
- an XML file
-
xml-as-svg
- an XML file sent with the SVG MIME type
-
xml-broken
- a malformed XML file
-
svg
- an SVG file
-
svg-as-xml
- an SVG file sent with the XML MIME type
-
download
- the same file as
image
, but with a Content-Disposition header set to inline
with a filename


{% extends 'emails/email_root.html' %} {% block title %} {% endblock %} {% block body %} Hello user. You've requested to reset your token. You can do so by clicking here. {{ context.verification_link }} {% endblock %}


Cuauhtémoc Calvario
Software Developer
Software developer with experience in mobile apps, 3D graphics, video games and web applications.
I graduated in 2008 from the Instituto Tecnológico de Mexicali in Electronic Engineering. I speak Spanish (native), English (fluent) and Italian (intermediate). Currently living in Mexicali, México.
Systems Analyst April 2017 - July 2018
Systems development for internal use of the institution. Development of the Human Resources Systems using .NET Framework, ASP.NET MVC, Telerik UI and Oracle Database (C#, HTML, CSS, Javascript, Python, SQL).
Android developer August 2010 - April 2017
Video games development for Android devices. Porting video games from iOS to Android, debugging, optimization, 3D graphics using OpenGL ES, social networks integration and implementing new features (C, C++, C#, Java, Python, GLSL, ActionScript).
Brew developer July 2009 - August 2010
Video games development for BREW mobile phones. Porting video games from Java to Brew, debugging, 2D graphics and optimization (C, C++, Java, Python).
Here a few things I am experienced with.
Android application
This application helps you to calculate the electricity monthly consumption of your home. Add your home appliances and devices or pick them from the list of samples and get the monthly electricity consumption in kilowatts hour (kWh) or money. Built in Java, implements AdMob ads, Google Analytics for Firebase, Crashlytics.
Feel free to email me at


USEFUL LINKS
Home
List of Puzzles
FAQs
Leaderboard
Errata
Credits
Errata
Home
: Questions that require 8 points and above require 2 hints (including final puzzle).
There are no clues on this page to any of the puzzles.


Did you know?
You've probably heard of abusive relationships. You might be in an abusive relationship in your future. You might have been in an abusive relationship previously. You might be an abusive relationship right now. I couldn't tell you because I'm a webpage.
It might seem like an abusive relationsip is an abstract concept that won't really affect you, but that's not necessarily the case. It can happen to anyone, even if they appear to be completely suave and in control.
| Type |
| |
Explanation |
| Psychological |
| |
Manipulating an individual's thoughts and emotions. |
| Physical |
| |
Hurting an individual's body. |
| Sexual |
| |
Sexual actions without an individual's consent. |
Common Misconceptions
- Only women are the victims of abusive relationships.
- Only weak people stay in abusive relationships.
- Abusive relationships always involve physical abuse.
- People say that they are being abused only for attention.
- Abusive relationships are rare.
How to Recognize an Abusive Relationship
- Your partner belittles you and makes you feel small.
- Your partner blames things they did on you.
- Your partner doesn't listen to you when you say "no."
- Your partner has a pattern of doing something bad and then convincing you they will never do it again.

- Your partner controls other aspects of your life such as what you wear, what you eat, what job you have, etc.
- Your partner hurts you by hitting, kicking, punching, pinching, cutting, burning, biting, or any other form of physical violence.

- Your partner touches your body without your permission, including while you are sleeping.

I'm in an Abusive Relationship. What Should I Do?
- Call 911 or the emergency number in your area if it is an emergency.
- Find local resources. They probably exist no matter where you are. If you need to escape the house, you can find a shelter for that purpose. You can use a search engine or call 211. 211 is a very useful resource.
- Find online resources. Online support groups, forums, and chat rooms can help you feel less alone.
- Tell a family member or friend that you trust.
- If you are afraid of retaliation from your partner when you break up with them, get a local organization involved and they can help you.
- Know that this is not how your life is going to be forever and you're going to get out of this.
- Get professional counseling. A local or online charity may provide it for free or for a low cost. You're not crazy, but you've been through something horrible and it's hard to process it.
- Remember that it's not your fault.
How can I help others?
- If you see signs of abuse in someone's relationship, you can talk to the person and ask them if they're okay. You can be a listening ear for them in a time when they might be afraid to talk to anyone.
- You can find out about local organizations and see if you can volunteer.
- You can volunteer for a telephone hotline and talk to people in distress.
- Interject if you think that something someone does could be considered abusive.
- Oppose messages that condone abusive relationships, even in jest.
- Be willing to talk to anyone and to help them.


class: center, middle, inverse, title-slide # Lecture 3 ## Theory of environmental policy ### Ivan Rudik ### AEM 6510 --- exclude: true ```r if (!require("pacman")) install.packages("pacman") pacman::p_load( tidyverse, tidylog, xaringanExtra, rlang, patchwork ) options(htmltools.dir.version = FALSE) knitr::opts_hooks$set(fig.callout = function(options) { if (options$fig.callout) { options$echo <- FALSE } knitr::opts_chunk$set(echo = TRUE, fig.align="center") options }) ``` ``` ## Warning: 'xaringanExtra::style_panelset' is deprecated. ## Use 'style_panelset_tabs' instead. ## See help("Deprecated") ``` ``` ## Warning in style_panelset_tabs(...): The arguments to `syle_panelset()` changed in xaringanExtra 0.1.0. Please refer to the documentation to update your slides. ``` --- # Roadmap Develop a simple model of - Pollution damages - Abatement costs - Characteristics of efficient pollution allocations This will guide us in - Describing the set of policy instruments and their properties - Information needs for using each kind of policy --- class: inverse, center, middle name: base_model # The base model

 --- # A model of damages and costs Here's our set up: -- We have a number of households in a given area -- There are `\(J\)` electricity-generating firms -- The firms use coal and emit sulfur dioxide `\((SO_2)\)` that negatively affects the households -- The firms take output prices as given, and sell electricity in the national market, households buy electricity on the national market --- # A model of damages and costs Each firm emits `\(e_j\)` units of pollution and total emissions are `\(E = \sum_{j=1}^J e_j\)` -- The model is .hi-blue[non-spatial:] -- - All firms' emissions count the same toward aggregate emissions `\(E\)` -- - All households experience the same level of pollution `\(E\)` --- # The damage function Assume households have utility: `$$U_i(y_i, E) = y_i - D_i(E)$$` where `\(y_i\)` is income spent on market goods and `\(D_i(E)\)` is the household-specific disutility caused by aggregate pollution -- With this utility function, we can interpret `\(D_i(E)\)` as the *dollar value of lost utility for household `\(i\)` from aggregate emissions* --- # The damage function We call `\(D_i(E)\)` the .hi-blue[damage function] -- Assume that the damage function is increasing and convex: `$$D_i'(E) > 0, \,\, D_i''(E) > 0$$` -- Aggregate damages are then `$$D(E) = \sum_{i=1}^N D_i(E)$$` where `\(N\)` is the number of households --- # Abatement costs Generating electricity has costs -- There are also costs of reducing emissions of `\(SO_2\)` -- For now we assume that these costs are separable (i.e. don't depend on each other) so we can focus solely on costs of abating pollution - A separable abatement cost would be for something like an `\(SO_2\)` scrubber that does not affect electricity generation -- Define the .hi-blue[abatement cost function] for firm `\(j\)` by `\(C_j(e_j)\)` --- # Abatement costs Let `\(\hat{e}_j\)` be the firm's freely chosen abatement level, this means that `\(C_j(\hat{e}_j) = 0\)` because they will not incur abatement cost unless they have to -- `\(C_j(e_j) > 0\)` for any `\(e_j < \hat{e}_j\)` so that `\(C_j'(e_j) < 0\)` for `\(e_j < \hat{e}_j\)` -- Abatement cost is positive for any emission level below `\(\hat{e}_j\)` -- Abatement costs are decreasing in emissions (increasing in abatement) --- # Abatement costs Define the .hi-blue[marginal abatement cost] (MAC) as: `$$MAC_j(e) \equiv -C_j'(e_j) > 0, e_j < \hat{e}_j$$` -- We will also assume that the MAC weakly increases as we reduce emissions, i.e. `\(C\)` is weakly convex: `$$MAC_j'(e) = -C_j''(e_j) \leq 0, e_j < \hat{e}_j$$` -- As you reduce emissions, the cost of reducing the next unit is higher than the previous1 .footnote[ 1 Written another way, if `\(\mathcal{C}(A)\)` is the cost of abatement, we are assuming `\(\mathcal{C}'(A), \mathcal{C}''(A) > 0\)` ] --- # Abatement costs assumptions These assumptions on marginal abatement cost are pretty reasonable: -- 1. MACs are increasing because firms will choose among different abatement technologies in order of their marginal cost if they are profit-maximizing or cost-minimizing -- 2. *Weakly* increasing MACs is a reasonable approximation of piecewise constant MAC functions, which is what many MACs look like empirically --- # Efficient allocation of emissions In our setting emissions negatively affects households, and controlling emissions imposes a cost on firms An efficient outcome optimally balances these two different costs to the economy -- The efficient emission level for each firm `\(j\)` can be found by minimizing the social costs of emissions: `$$SC(e_1,\dots,e_J) = \sum_{j=1}^J C_j(e_j) + D(E)$$` --- # Efficient allocation of emissions The first-order conditions for minimizing social costs are: -- `$$-C_j'(e_j) = D'(E){\partial E \over \partial e_j}, \,\, \forall j=1,\dots,J$$` where `\({\partial E \over \partial e_j} = 1\)` and also that -- `$$-C_j'(e_j) = -C_k'(e_k), \,\, \forall k,j$$` These are the two fundamental characteristics of the efficient allocation of pollution --- # Efficient allocation of emissions For each firm, its marginal abatement cost is equal to the marginal damage from pollution `$$-C_j'(e_j) = D'(E), \,\, \forall j=1,\dots,J$$` -- Marginal abatement costs are equal across all polluters `$$-C_j'(e_j) = -C_k'(e_k), \,\, \forall k,j$$` -- An optimal regulation will satisfy these two condition --- # Abatement costs and damages .pull-left[ ![Abatement cost functions are decreasing in emissions](3-theory-of-environmental-policy_files/figure-html/abatement_cost-1.png) ] .pull-right[ ![Damage functions are increasing](3-theory-of-environmental-policy_files/figure-html/damages-1.png) ] --- # Marginal abatement cost .pull-left[ ![MACs are decreasing](3-theory-of-environmental-policy_files/figure-html/mac-1.png) ] .pull-right[ Marginal abatement costs are decreasing in emissions, increasing in abatement The area under the MAC is total abatement cost .hi-blue[A]: Total abatement cost of abating `\(\hat{e}_1 - e_1^*\)` units .hi-blue[A+B+C]: Total abatement cost of abating `\(\hat{e}_1 -\bar{e}_1\)` units ] --- # Marginal damages .pull-left[ ![MACs are decreasing](3-theory-of-environmental-policy_files/figure-html/md-1.png) ] .pull-right[ Marginal damage curve is increasing in emissions, decreasing in abatement The area under the MD is total damages ] --- # The optimal allocation .pull-left[ ![Where MAC and MD intersect minimizes total cost](3-theory-of-environmental-policy_files/figure-html/mac_and_md-1.png) ] .pull-right[ The optimal allocation is where MAC and MD intersect This minimizes the total cost to `\(A+F\)` ] --- # Property rights Do we need government intervention to solve environmental problems? Is it possible to reach an efficient outcome with negotiation? -- Let's think about a special case of our model: 1 firm and 1 household All damages are borne by the household, all abatement costs are borne by the firm -- In this setting, simply assigning property rights to the firm or household and allowing for negotiation may lead to the efficient outcome --- # Household ownership of pollution rights Suppose the household owns the right of zero pollution, but the efficient level is greater than zero How can we get to the efficient level without government intervention? -- The firm could propose a contract where the household accepts some pollution, in exchange for a transfer payment --- # Household ownership of pollution rights The firm could propose a contract `\((E,\theta)\)` consisting of emissions `\(E\)` and transfer payment `\(\theta\)` -- The household can then accept or refuse the contract -- Negotiating is costly and has its own transactions cost `\(tr\)` -- We assume both players are fully informed about each others preferences and technologies --- # Household ownership of pollution rights When does the household accept the contract? -- The household is weakly better off accepting the contract if `\(\theta \geq D(E)\)` (assuming the firm bears the transactions costs `\(tr\)`) -- What contract does the firm offer in equilibrium? --- # Household ownership of pollution rights The firm will choose to offer `\(\theta = D(E)\)`, the least amount required for the household to accept This means we can write the firm's total cost as: -- `$$TC(E) = C(E) + D(E) + tr$$` -- It's optimal choice of `\(E\)` (and therefore `\(\theta\)`) is given by the first-order condition: -- `$$-C'(E) = D'(E)$$` which matches our condition for efficiency in pollution Note that this still requires `\(tr \leq \underbrace{C(0) - [C(E^*) + D(E^*)]}_{\text{total welfare gain}}\)` --- # Firm ownership of pollution rights If the firm has the rights to pollution, we just flip the script The household proposes a contract `\((E, \theta)\)` where the firm reduces pollution in exchange for a transfer payment The firm accepts or rejects the contract When does the firm accept the contract? -- The firm accepts if `\(\theta \geq C(E)\)` -- The household will then offer the minimum required: `\(\theta = C(E)\)` --- # Firm ownership of pollution rights The household's utility maximization problem is then: `$$\max_{E} y - (D(E) + C(E) + tr)$$` -- giving the first-order condition: `$$-C'(E) = D'(E)$$` -- where we again reach the social optimum, as long as: `$$tr \leq \underbrace{D(\hat{E}) - (D(E^*) + C(E^*))}_{\text{total welfare gain}}$$` where `\(\hat{E}\)` is the firms initial emission level --- # The Coase theorem These two examples showed that if properties rights are clearly defined and the affected parties can negotiate, private contracts between rational agents can achieve the efficient pollution level -- The assignment of property rights .hi-red[doesn't] matter for efficiency But it does matter for the distribution of wealth -- These observations are known as the .hi-blue[Coase Theorem] --- # The Coase theorem > Suppose party A imposes an externality on party B. Provided transactions costs are sufficiently small, irrespective of the initial allocation of property rights: the parties can achieve the socially optimal level of pollution `\(E^*\)` using a transfer payment `\(\theta\)` where both parties are at least as well off as they were before With small enough transactions costs, the party that does not own the property rights can propose a contract that is mutually beneficial --- # The Coase theorem: real world The Coase theorem is not just a useful theoretical exercise: .footnote[ Depres, Christophe, Gilles Grolleau, and Naoufel Mzoughi. "Contracting for Environmental Property Rights: The Case of Vittel." Economica, New Series, 75, no. 299 (2008) ] -- Vittel sells luxury mineral water -- In 1988 nitrates from farm runoff was polluting their water supply -- Vittel contacted all upstream farmers and negotiated contracts for reducing nitrogen runoff --- # The Coase theorem: real world .footnote[ Dieperink, C. International water negotiations under asymmetry, Lessons from the Rhine chlorides dispute settlement (1931–2004). Int Environ Agreements 11, 139–157 (2011). ] Mines de Potasse d'Alsace heavily polluted the Rhine river with chlorides in potash production -- MdPA was thought to have low abatement costs because filtering out chlorides is cheap -- In 1972 Switzerland, France, Germany, and the Netherlands contracted to pay MdPA 532 million francs to reduce emissions --- # Policy instruments The Coase theorem is applicable for local environmental problems with few and easily identifiable parties -- .hi-red[Many] of the largest environmental pollution problems have many parties, households and polluters, making transactions costs likely to be very high -- This, i.e. most settings we think about, is where there is a role for public intervention --- # Command and control .hi-blue[Command and control] policies require polluting firms to carry out prescribed pollution-reducing actions -- The most common CC policies are emissions limits and technology standards -- - Standard on absolute amount of emissions - Standard on emissions per unit of output, input, etc - Must install `\(SO_2\)` scrubber - Must use best available technology -- We're going to focus on absolute emissions standards --- # Emission standard The simplest policy is one where the regulator requires all firms to emit no more than their socially optimal level `\(e_j^*\)` -- By definition, this policy achieves the efficient level of pollution at minimum total abatement cost -- Is this a realistic option? Why or why not? --- # Emission standard Firm-specific emission standards aren't very realistic -- The regulator needs to know: -- - The social damage function -- - Each firm's abatement cost function -- And the regulator needs to be able to: -- - Impose a policy that is different across firms and is unlikely to be politically feasible --- # Uniform emission standard An alternative is to impose a .hi-blue[uniform emission standard] such that `\(e_j \leq \bar{e}\)` for all firms `\(j\)` We could imagine setting `\(\bar{e} = E^*/J\)` where `\(E^*\)` is the socially efficient level of emissions -- If firms are identical this achieves the efficient outcome -- If they're not identical it won't --- # Uniform standard costs .pull-left[ ![MACs are not equal under a uniform standard](3-theory-of-environmental-policy_files/figure-html/uniform_standard-1.png) ] .pull-right[ Even though `\(\bar{e}\times J = E^*\)`, the MACs may not be equal If MACs aren't equal we can maintain `\(E^*\)` and reduce costs How? Firm 1 abates 1 unit more, firm 2 abates 1 unit less ] --- # Uniform standard costs .pull-left[ ![MACs are not equal under a uniform standard](3-theory-of-environmental-policy_files/figure-html/uniform_standard_2-1.png) ] .pull-right[ Now firm 1, the lower MAC firm, is abating more than firm 2 This changed the total abatement cost ] --- # Uniform standard costs .pull-left[ ![Gains from equating macs](3-theory-of-environmental-policy_files/figure-html/uniform_standard_3-1.png) ] .pull-right[ Now firm 1, the lower MAC firm, is abating more than firm 2 This changed the total abatement cost Firm 1 has costs .hi-red[increase] Firm 2 has costs .hi-blue[decrease] Net effect is a .hi-blue[decrease] in costs ] --- # Uniform standard costs .pull-left[ ![Gains from equating macs](3-theory-of-environmental-policy_files/figure-html/uniform_standard_4-1.png) ] .pull-right[ We can keep obtaining cost reductions until MACs are equal across firms With net reductions in deadweight loss equal to the dark gray area (light blue minus light red) We want low MAC firms to abate more than high MAC firms ] --- # Emission taxes An emission tax is a fee that the pollution firm must pay per unit of emissions These aren't very common in the US but are more widespread in Europe -- Suppose the government imposes a tax of size `\(\tau\)` per unit of pollution --- # Emission taxes The firm's problem is then to minimize total pollution-related costs: `$$TC_j(e_j) = C_j(e_j) + \tau e_j$$` -- The first-order conditions are then: `$$-C'_j(e_j) = \tau$$` -- The firm's optimal choice is to set marginal abatement cost equal to the tax rate -- The firm reduces emissions as long as the cost of emissions reductions is less than the alternative: paying the tax --- # Emission taxes .pull-left[ ![MACs are decreasing](3-theory-of-environmental-policy_files/figure-html/taxes-1.png) ] .pull-right[ Under a tax `\(\tau\)`, the emission choice is a function of the tax: `\(e_j(\tau)\)` The firm pays total tax `\(A\)` and incurs abatement cost `\(B\)` Now the government has revenue `\(\tau \times e_j(\tau)\)` that it can use for different purposes, we will look at this more closely in a few classes ] --- # Emission taxes If all firms face the same marginal tax rate, what does the firm first-order condition imply? -- `$$-C'_j(e_j) \equiv MAC_j(e_j) = \tau \,\, \forall j$$` -- This then implies that: `$$MAC_j(e_j) = MAC_j(e_k) \,\, \forall j,k$$` Marginal abatement costs across firms are equal and we have obtained the given emissions reduction at least-cost --- # Emission taxes If we change the tax rate what do we expect to happen to emissions? -- Return to the firm FOC: `$$-C'_j(e_j) = \tau$$` and differentate it with respect to `\(\tau\)` and recognize that `\(e_j\)` is a function of `\(\tau\)`: `$$-C''_j(e_j) {de_j(\tau) \over d\tau} = 1$$` -- This gives us that: `\({de_j(\tau) \over d\tau} = {1 \over -C''_j(e_j)} < 0\)`: higher taxes lower emissions if MACs are decreasing in emissions --- # Auctioned pollution permits Instead of charging a fee *ex post*, what if the government auctioned off a fixed number of *ex ante* rights to emit a unit of pollution? -- In the case, firms need to purchase the right to pollute from the public -- Let there be `\(L\)` permits for sale, and let `\(\sigma\)` be the auction price that emerges --- # Auctioned pollution permits If firms are price-takers then their total cost is given by: `$$TC_j(e_j) = C_j(e_j) + \sigma e_j$$` -- The second term is the permit purchase cost, the first term is the abatement cost -- Cost-minimization gives us: `$$-C'_j(e_j) = \sigma$$` which indicates that firms set their MACs equal to the permit price (and implicitly each other's MACs) --- # Auctioned permits .pull-left[ ![MACs are decreasing](3-theory-of-environmental-policy_files/figure-html/auctioned_permits-1.png) ] .pull-right[ Under a permit price `\(\sigma\)`, the emission choice is a function of the price: `\(e_j(\sigma)\)` The firm pays permit costs `\(A\)` and incurs abatement cost `\(B\)` This is .hi-blue[identical] to an emission tax if `\(\sigma = \tau\)` ] --- # Auctioned pollution permits We can then invert the MAC to get the firm's emission-response to permit prices `$$e_j(\sigma) = C'^{-1}_j(-\sigma)$$` -- What is this expression? -- `\(e_j(\sigma)\)` is just firm `\(j\)`'s .hi-blue[permit demand] as a function of permit price `\(\sigma\)` -- Aggregate demand for permits is then the sum of the individual demands: `$$E(\sigma) = \sum_{j=1}^J e_j(\sigma)$$` --- # Auctioned pollution permits The price `\(\sigma\)` that clears the market equates supply of permits `\(L\)` and demand for permits: `$$L = \sum_{j=1}^J e_j(\sigma)$$` This equation (supply = demand) defines the market equilibrium like the market for any product --- # Taxes, permits, and efficiency Both taxes and permits achieve `\(MAC_j = MAC_k\)` `\(\forall j,k\)`, so both achieve any given emission reduction at least-cost -- With knowledge of the damage function `\(D(E)\)`, both can also be used by a regulator to achieve the socially optimal emission level `\(E^*\)` --- # Freely distributed transferable permits Most permits aren't auctioned but freely distributed to firms based on historical emissions -- This is a *de facto* subsidy to firms so there are long run and distributional consequences from allocation choices -- How does this system work? --- # Freely distributed transferable permits 1. Regulator sets total amount of pollution 2. Regulator disburses permits 3. Firms can trade permits -- Suppose firm `\(j\)` is given an allocation of `\(\bar{e}_j\)` permits, their total cost is: `$$TC_j(e_j) = C_j(e_j) + \sigma(e_j - \bar{e}_j)$$` -- FOCs are: $$ -C'_j(e_j) = \sigma$$ identical to auctioned permits! --- # Freely distributed transferable permits Why do we get the same result for auctioned and freely distributed permits? -- The initial giveaway of permits is basically just a .hi-blue[lump sum transfer] -- It does not affect firm's .hi-blue[marginal] decision making -- As before, market equilibrium is given by: `$$L = \sum_{j=1}^J e_j(\sigma) = \sum_{j=1}^J \bar{e}_j(\sigma)$$` -- In short: efficiency is the same, but distributional outcomes will be different --- # Freely distributed transferable permits ![Initial distribution matters for how costs and benefits are spread out](3-theory-of-environmental-policy_files/figure-html/distribution_permits-1.png) Firm 1: Abatement cost (D `\(\rightarrow\)` D+E); Permit revenues (0 `\(\rightarrow\)` E+F) Firm 2: Abatement cost (A+B+C `\(\rightarrow\)` A); Permit costs (0 `\(\rightarrow\)` B) Total cost reductions: .hi-blue[C+F] (A+B+C+D - (A+D+E) = B+C-E = (E+F)+C-E = C+F) --- # Subsidies So far we've put the responsibility of expenditures on firms But, for political economy reasons, regulators may not want to put this extra burden on firms -- Often regulators subsidize abatement How does this different from taxation and permits? --- # Subsidies Suppose we subsidize a firm `\(\xi\)` for each unit their emissions are below some baseline level `\(\hat{e}_j\)`, its total costs are now `$$TC_j(e_j) = C_j(e_j) + \xi(e_j - \hat{e}_j)$$` -- The firm's FOC is then: `$$-C'_j(e_j) = \xi$$` The per-unit abatement subsidy `\(\xi\)` has the same behavioral effect as a per-unit emission tax `\(\tau\)`: firms set MAC equal to the subsidy1 .footnote[ This is conditional on the total subsidy payment being large enough to induce abatement. ] --- # Abatement subsidies .pull-left[ ![MACs are decreasing](3-theory-of-environmental-policy_files/figure-html/subsidies-1.png) ] .pull-right[ Under a subsidy `\(\xi\)`, the emission choice is a function of the subsidy: `\(e_j(\xi)\)` The firm incurs abatement cost `\(A+B\)` and receives total subsidy `\(B+C\)` with a baseline level of emissions of `\(\hat{e}_j\)` Total benefits to the firm are `\(C-A\)` which needs to be positive for the firm to abate ] --- # Abatement subsidies .pull-left[ ![MACs are decreasing](3-theory-of-environmental-policy_files/figure-html/subsidies_2-1.png) ] .pull-right[ If we change the emission baseline to `\(\bar{e}_j\)` the incentives are identical! Total costs change: Abatement cost is now: A Total subsidy is now: A + B ] --- # Abatement subsidies The key difference between taxes and subsidies is the distribution of costs -- Under taxes, firms must pay fees to the regulator -- Under subsidies, the regulator pays the firms -- .hi-blue[The efficiency properties are the same] --- # Aggregate marginal abatement cost What the regulator cares about when designing policy is the .hi-blue[aggregate marginal abatement cost] This is the horizontal sum of individual MACs -- It reflects the industry's marginal abatement cost when an efficient (i.e. least-cost) policy is implemented -- Lets develop this formally --- # Aggregate marginal abatement cost Suppose firms pay a per-unit tax `\(\tau\)`, we know the firm's optimal emission decision is given by: `$$-C'_j(e_j) = \tau$$` with a resulting emission response function `\(e_j(\tau) = C_j'^{-1}(-\tau)\)` which we can interpret as the firm's .hi-blue[demand for emissions] --- # Aggregate marginal abatement cost Aggregate demand for emissions is then: `$$E(\tau) = \sum_{j=1}^J e_j(\tau)$$` -- and the .hi-blue[aggregate MAC] is derived by inverting the aggregate demand: `$$AMAC = E^{-1}(\cdot)$$` This allows us to characterize socially optimal emissions in a more direct way --- # Aggregate marginal abatement cost We can do this with simple linear MACs by horizontally summing -- Suppose our two MACs are: `\(MAC_1 = 4-e, MAC_2 = 2-e\)` -- We first need to invert the MACs: `\(e_1 = 4 - MAC, e_2 = 2 - MAC\)` -- The sum horizontally: `\(E = e_1 + e_2 = 6 - 2\times MAC\)` -- And re-invert: `\(MAC = 3 - {1 \over 2} E\)` -- What's the last step? --- # Aggregate marginal abatement cost Recall our two MACs are: `\(MAC_1 = 4-e, MAC_2 = 2-e\)` Recognize that firm 2 can't abatement any more than 2 units, so any emission reductions for prices greater than 2 .hi-red[must] come from firm 1 -- So `\(MAC = 3 - {1 \over 2} E\)` is only defined for `\(P \leq 2, E \geq 2\)` -- This gives us that: `\begin{align} AMAC(E) = \begin{cases} 4 - E, & \text{for } 0 \leq E < 2 \\ 3 - {1 \over 2} E & \text{for } E \geq 2 \end{cases} \end{align}` --- # Aggregate MAC .pull-left[ ![We care about AMAC for social regulation](3-theory-of-environmental-policy_files/figure-html/agg_mac-1.png) ] .pull-right[ The social objective is to minimize the sum of total abatement costs, so we care about where .hi-blue[aggregate MAC] crosses marginal damage AMAC tells us: at a given price, what is the total quantity we can abatement? ]


School pupils among 12 dead in Slovak bus crash
BRATISLAVA: At least 12 people were killed, including four students, when a public bus carrying school pupils and a truck loaded with rocks and soil collided in mountainous western Slovakia on Wednesday (Nov 13), rescuers and officials said.
Officials said some 17 people were hurt in the crash, which happened on the outskirts of the city of Nitra, a regional capital some 80 kilometres east of Bratislava.
Images from the site showed the truck lying on its side and the bus wedged in a ditch, with a large amount of soil and rocks strewn on the road.
"Mostly teenagers, secondary grammar students, were aboard this regular bus line from Nitra to Jelenec," Nitra fire brigade spokesman Michal Varga told AFP, adding that the truck was "fully loaded with rocks".
He added that the causes of the crash were unknown.
The fire and rescue department said on its Facebook page that the toll was 12 dead and 17 injured.
Minister of Health Andrea Kalavska told journalists at the accident site that of those killed, "at least four were underage".
Interior Minister Denisa Sakova told the press at the site that the truck was "probably overloaded".
According to reports on Slovak commercial TV channel Markiza, the truck skidded and hit the bus from the side.
The bus serves as a regular line between Nitra and the village of Jelenec east of the city.
Rescuers at first put the number of dead at 13, with 20 injured, before correcting the toll.
Some 30 firefighters are at the scene to help the injured, while rescuers have deployed helicopters and sent in psychologists.
They said rescue work was hampered by bad weather as Slovakia was hit by heavy rain on Wednesday, although there was no rain when the accident occurred.


We specialize in the application of sound ecological advice in combination with sustainable development to ensure a balance is created between development and conservation.
The main member is Bertus Fourie, a SACNASP registered Professional Natural Scientist in the field of Ecology. See his work experience here.
We are a multifaceted team of connected specialists to ensure that we provide a full range of services to our clients. Our core functions are aquatic ecosystem with a focus on terrestrial components. We are up to date with the newest biodiversity regulations and can advise on all aspects of authorisations processes. Water use licenses are a big part of our company processes and we are adequately qualified and equipped to resolve any issues arising during the application process.
The monitoring of construction related impacts as required by environment authorisations and compliance monitoring are part and parcel of our daily activities. We can advise on correct mythologies and application time periods. We are also SASS 5 accredited and biomonitoring can easily be done in house. Compliance to authorisations including water use licenses through a basic auditing process are at our core of monitoring.
We can also assist with planning and implementation with a large emphasis on post development mitigation through ecologically sound rehabilitation processes. From conceptually compiling terrestrial and aquatic (including wetland) rehabilitation plans to implementation and post rehabilitation care can be completed by our company.
Company registration: 2015/295861/07
Director: AJ. Fourie
cell: +27 82 921 5445
email: limnologysa@gmail.com


{% extends "layout.html" %} {% block title %}Is there a single address for your search area?{% endblock %} {% block body %} {% include 'partials/phase_banner_beta.html' %} {% include 'partials/ko_validation_partial.html' %} Is there a single address for your search area? Is there a single address for your search area? Yes {% include 'partials/address_finder_partial.html' %} No Describe the area you have searched For example, 'flats 1-5 Church Lane' or 'land to the north of the bypass'. {% if validation_errors and validation_errors['charge-geographic-description'] %} {{ validation_errors['charge-geographic-description'].inline_message }} {% endif %} Describe the location of this charge {% if charge_geographic_description %}{{charge_geographic_description}}{% endif %} Answer must be shorter than 1000 characters (about 160 words) {% endblock %} {% block scripts %} {% endblock %}
Answer must be shorter than 1000 characters (about 160 words)


| G.A.R. 39 |
| [ See rule 165 (2) ] |
| MONTHLY ABSTRACT OF SHORT TERM ADVANCE PAYMENTS/RECOVERIES ETC. TO BE FURNISHED BY THE DRAWING
OFFICER
|
| (For the month of...........................19
........) |
|
| NAME OF D.D.O............................................ |
Head of account relevant to advance: |
| MINISTRY/DEPTT........................................... |
*(i) Advances for purchase of other conveyances |
| |
OR *(ii) Festival Advances |
| |
OR *(iii) Other advances |
| |
(* Delete whichever is not applicable and prepare separate abstract for advances under each
Head)
|
|
| Opening balance as on 1st of the month. |
Advances paid during the month |
Outstanding balance amount shown in LPCs of 'transfer in cases during the month |
Amount recovered through pay bill/ other bill/in cash during the month |
Outstanding balance, amount shown in LPC of 'transfer out' casesduring the month |
Closing balance at the end of the month i.e Cols (1+ 2+ 3) less (4+ 5) |
| Bill No. (a) |
Amount (b) |
No. of employees (a) |
Total amount taken on book (b) |
Bill No. / Challan No. (a) |
Amount of advances recovered (b) |
No. of employees (a) |
Total amount dropped from book (b) |
| 1 |
2 |
3 |
4 |
5 |
6 |
|
| Certificates 1. Certified that all relevant bills passed and paid during the month have been
detailed in Cols. 2 and 4 above and correct amounts have been shown there against. |
| 2. (Certificate to be recorded on the abstract for April). The total (viz Rs
.................................................)
the amount outstanding on 31st Match, 19......(excluding
recoveries from pay bills for March) against the employee on the rolls of the office
on that date and accepted by them individually as correct is equal to the closing balance
indicated in the abstract for February, plus payments minus repayments received in cash
during March of that year.
|
| Signature of Drawing Officer |
| Notes: (1) "Transfer 'in'/'out', from/to foreign service to Departments of P&T/Railways/Defence/State
Governments will not be included under Cols. 3 & 5 since cash settlement is to be affected
in these cases. |
| (2) Amounts of interest recovered in respect of interest bearing advances should not be included
in this monthly abstract. |
|


Host tools are available to help manage the target: adding/removing apps, starting/stopping apps and updating firmware.
Run bin/legs
to add the host tools to the shell's executable path.
stoplegato
configtargetssh
mklegatoimg
av-pack
gettargettype
startlegato
settz
startapp
simu
legato-qemu
security-pack
fwupdate
update
instlegato
statapp
setname
createsdk
lsapp
update-pack
rmapp
releaselegato
settime
stopapp
To display usage, run
[toolname] --help
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.


AWS::StepFunctions::Activity
An activity is a task that you write in any programming language and host on any machine
that has access to AWS Step Functions. Activities must poll Step Functions using the
GetActivityTask
API action and respond using SendTask*
API
actions. This function lets Step Functions know the existence of your activity and returns
an identifier for use in a state machine and when polling from the activity.
For information about creating an activity, see Creating an Activity State Machine in the AWS Step Functions Developer Guide and CreateActivity in the AWS Step Functions API Reference.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::StepFunctions::Activity", "Properties" : { "Name" :
String
, "Tags" :[ TagsEntry, ... ]
} }
Properties
Name
-
The name of the activity.
A name must not contain:
-
white space
-
brackets
< > { } [ ]
-
wildcard characters
? *
-
special characters
" # % \ ^ | ~ ` $ & , ; : /
-
control characters (
U+0000-001F
,U+007F-009F
)
To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _.
Required: Yes
Type: String
Update requires: Replacement
-
Tags
-
The list of tags to add to a resource.
Tags may only contain Unicode letters, digits, white space, or these symbols:
_ . : / = + - @
.Required: No
Type: List of TagsEntry
Update requires: No interruption
Return values
Ref
When you provide the logical ID of this resource to the Ref
intrinsic
function, Ref
returns the ARN of the created activity. For example:
{ "Ref": "MyActivity" }
Returns a value similar to the following:
arn:aws:states:us-east-1:111122223333:activity:myActivity
For more information about using the Ref
function, see Ref.
Fn::GetAtt
Fn::GetAtt
returns a value for a specified attribute of this type. The
following are the available attributes and sample return values.
Arn
Property description not available.
Name
-
Returns the name of the activity. For example:
{ "Fn::GetAtt": ["MyActivity", "Name"] }
Returns a value similar to the following:
myActivity
For more information about using
Fn::GetAtt
, see Fn::GetAtt.
Examples
The following examples create a Step Functions activity.
JSON
{ "AWSTemplateFormatVersion" : "2010-09-09", "Description" : "An example template for a Step Functions activity.", "Resources" : { "MyActivity" : { "Type" : "AWS::StepFunctions::Activity", "Properties" : { "Name" : "myActivity", "Tags": [ { "Key": "keyname1", "Value": "value1" }, { "Key": "keyname2", "Value": "value2" } ] } } } }
YAML
AWSTemplateFormatVersion: "2010-09-09" Description: "A sample template for a Step Functions activity" Resources: MyActivity: Type: "AWS::StepFunctions::Activity" Properties: Name: myActivity Tags: - Key: "keyname1" Value: "value1" - Key: "keyname2" Value: "value2"


$def with (name,appdescription,getheader) $:getheader
Instant threading, automated event planning and execution management, and more.

Vault grade security that encrypts data in transit and at rest, so you can rest easy.


Guest Service volunteers will greet guests upon arrival, checking them in Airtable, and finding their pre-printed lanyard card which should be given to the buddy. Once check-in is complete, volunteers will assist in various areas as needed. At the end of the evening, the Guest Services team will help with the check-out process alongside the coat check and favors team.
Check-in: 3:00PM
Event Location: Liquid Church, 299 Webro Rd. Parsippany NJ 07054
OFF-SITE Parking: There will be a shuttle bus to and from the off-site parking lots. The shuttle bus will drop you off at the volunteer entrance. Please allow extra time to park and ride the shuttle to the Webro building. Note: Parking at the Webro building is for event guests only.
Attire: All black attire. We will provide you with a Night to Shine t-shirt. If you would like to assist as a buddy, please dress in modest “Prom Attire” and comfortable shoes


{{pkmCtrl.pokemon.name}}#001
Seed Pokemon
Pokedex
Type
Grass, Poison
Height
2'4" (0.71m)
Weight
15.2 lbs (6.9kg)
Abilities
Overgrow, Chlorophyll


K5SRVUTIL
Section: User Commands (1)Index Return to Main Contents
NAME
k5srvutil - host key table (keytab) manipulation utilitySYNOPSIS
k5srvutil operation [ -i ] [ -f filename ]DESCRIPTION
k5srvutil allows a system manager to list or change keys currently in his keytab or to add new keys to the keytab.
Operation must be one of the following:
- list
- lists the keys in a keytab showing version number and principal name.
- change
- changes all the keys in the keytab to new randomly-generated keys, updating the keys in the Kerberos server's database to match by using the kadmin protocol. If a key's version number doesn't match the version number stored in the Kerberos server's database, then the operation will fail. The old keys are retained so that existing tickets continue to work. If the -i flag is given, k5srvutil will prompt for yes or no before changing each key. If the -k option is used, the old and new keys will be displayed.
- delold
- Deletes keys that are not the most recent version from the keytab. This operation should be used some time after a change operation to remove old keys. If the -i flag is used, then the program prompts the user whether the old keys associated with each principal should be removed.
- delete
-
deletes particular keys in the keytab, interactively prompting for
each key.
In all cases, the default file used is /etc/krb5.keytab file
unless this is overridden by the -f option.
k5srvutil uses the kadmin program to edit the keytab in place. However, old keys are retained, so they are available in case of failure.
SEE ALSO
kadmin(8), ktutil(8)
Index
This document was created by man2html, using the manual pages.
Time: 05:29:05 GMT, December 24, 2015


1.0.6
Default reconnection delay - 3000 ms
Type: number
(string)
(ReliableEventSource)
Performs no-store cors post request to the magix server broadcasting the message
(Message)
(string = 'message')
'message'
Promise<Response>
Observable<Message>
((string | number))
(any)


Pop the boloons by drawing graphs.
Description
Specifications
Math
Credits
Using different typs of equations, make graphs that draw a line through the balloons to pop them.
Requires Javascript
Math Behind it


|
VirtualSCADA
1.0
VirtualSCADA Senior Design Project
|
Public Member Functions | |
| __construct (\Closure $closure, SerializerInterface $serializer=null) | |
| getClosure () | |
| __invoke () | |
| serialize () | |
| unserialize ($serialized) | |
| __debugInfo () | |
This class acts as a wrapper for a closure, and allows it to be serialized.
With the combined power of the Reflection API, code parsing, and the infamous eval()
function, you can serialize a closure, unserialize it somewhere else (even a different PHP process), and execute it.
Definition at line 12 of file SerializableClosure.php.
| __construct | ( | \Closure | $closure, |
| SerializerInterface | $serializer = null |
||
| ) |
Create a new serializable closure instance.
| \Closure | $closure | |
| SerializerInterface | null | $serializer |
Definition at line 41 of file SerializableClosure.php.
| __debugInfo | ( | ) |
Returns closure data for var_dump()
.
Definition at line 162 of file SerializableClosure.php.
| __invoke | ( | ) |
Delegates the closure invocation to the actual closure object.
Important Notes:
ReflectionFunction::invokeArgs()
should not be used here, because it does not work with closure bindings.__invoke()
. This is is an unfortunate, but understandable, limitation of PHP that will probably never change.Definition at line 72 of file SerializableClosure.php.
| getClosure | ( | ) |
| serialize | ( | ) |
Serializes the code, context, and binding of the closure.
Definition at line 84 of file SerializableClosure.php.
| unserialize | ( | $serialized | ) |
Unserializes the closure.
Unserializes the closure's data and recreates the closure using a simulation of its original context. The used variables (context) are extracted into a fresh scope prior to redefining the closure. The closure is also rebound to its former object and scope.
| string | $serialized |
| ClosureUnserializationException |
Definition at line 114 of file SerializableClosure.php.


PlayStation Vue Is Closing Down, Will Stop Accepting New Subscribers Soon
PlayStation Vue is closing down.
The service will soon stop accepting new subscribers soon.
Sony has confirmed PlayStation Vue will end operations completely on January 30, 2020.
Advertisement
The end of PlayStation Vue
For the past few months there had been much speculation about the future of PlayStation Vue. That speculation ended a couple of days ago when Sony confirmed it was shutting Vue down.
In the announcement Sony confirmed the reason was the slow change of the "highly competitive Pay TV industry." Adding that the company plans to focus on "our core gaming business" going forward.
Sony has confirmed the final end date for PlayStation Vue is January 30, 2020.
Advertisement
Existing subscribers will be billed for the last time in December. After which they will continue to have access to the service until the close date.
Vue to stop accepting new subscribers
While Sony has confirmed when PlayStation Vue will come to an end, the company says nothing is changing in the meantime.
For example, existing subscribers will retain access to the service and all of the features and perks associated with their streaming package.
Advertisement
The only exception to this no-change rule is new subscriptions.
Sony has recently posted a message on the PlayStation Vue welcome page explaining that it will stop accepting new subscribers soon.
Sony has yet to specify exactly when it will remove the option to sign up, but it's likely to happen in the coming weeks, if not days.
Advertisement
Evidently, with the service in its final few months, it makes sense that PlayStation plans to discontinue the option to subscribe.
What should subscribers do now?
Sony is right about the "highly competitive" TV industry. In the wake of live TV streaming, a number of services have launched.
While this is good news for consumers, it does place additional pressure on services like PlayStation Vue, as well as traditional TV providers.
Advertisement
If you are a current PlayStation Vue subscriber, you will soon have to start deciding on what to do either before January 30, 2020 or when the service eventually shuts down.
Currently, there are a number of similar alternative you can opt for. These include AT&T TV NOW, fuboTV, Hulu + Live TV, Sling TV, and YouTube TV
Similar to PlayStation Vue, all of these services provide access to live TV over the internet.
Advertisement
All of them also offer a free trial so they are available to test out before having to commit and pay for the service.


Main Menu
Tags
Admin
Tags
List
Add New Tag
Filters
Tag Name
Parent Name
Ancestor Name
Created By
Committee
People for Good
Applies To
ID
Path
Name
Owner Committee
Created By
Date Created
Description
Tags • 1 Page


class LoopResult implements Iterator
Properties
| $resultsCollection |
Methods
|
__construct($resultsCollection)
|
||
|
setCountable(boolean $countable = true)
|
||
|
setTimestamped(boolean $timestamped = true)
|
||
|
setVersioned(boolean $versioned = true)
|
||
|
isEmpty()
|
||
|
addRow(LoopResultRow $row)
|
||
|
getCount()
|
||
|
getResultDataCollectionCount()
|
||
|
getResultDataCollection()
|
||
| LoopResultRow |
current()
(PHP 5 >= 5.0.0) |
|
| void |
next()
(PHP 5 >= 5.0.0) |
|
| mixed |
key()
(PHP 5 >= 5.0.0) |
|
| boolean |
valid()
(PHP 5 >= 5.0.0) |
|
| void |
rewind()
(PHP 5 >= 5.0.0) |
Details
at line 29
public
__construct($resultsCollection)
at line 38
public
setCountable(boolean $countable = true)
at line 46
public
setTimestamped(boolean $timestamped = true)
at line 54
public
setVersioned(boolean $versioned = true)
at line 59
public
isEmpty()
at line 64
public
addRow(LoopResultRow $row)
at line 84
public
getCount()
at line 89
public
getResultDataCollectionCount()
at line 100
public
getResultDataCollection()
at line 111
public LoopResultRow
current()
(PHP 5 >= 5.0.0)
Return the current element
at line 122
public void
next()
(PHP 5 >= 5.0.0)
Move forward to next element
at line 133
public mixed
key()
(PHP 5 >= 5.0.0)
Return the key of the current element
at line 145
public boolean
valid()
(PHP 5 >= 5.0.0)
Checks if current position is valid
at line 156
public void
rewind()
(PHP 5 >= 5.0.0)
Rewind the Iterator to the first element


--- layout: page title: Lean Prover Zulip Chat Archive permalink: archive/113488general/12885transfiniteinduction.html ---
Just for curiosity, is this a thing in Lean?
https://gitter.im/leanprover_public/Lobby?at=5a4a3b7a232e79134db2c204
{% endraw %}


This page has moved to a /posts/2012-12-03-using-rst-for-documentation-on-both-github-and-sphinxrtfd-code-block-tip.


Calculates the nonparametric adaptive MAMSE weights for univariate, right-censored or multivariate data. The MAMSE weights can be used in a weighted likelihood or to define a mixture of empirical distribution functions. The package includes functions for the MAMSE weighted Kaplan-Meier estimate and for MAMSE weighted ROC curves.
| Version: | 0.2-1 |
| Depends: | R (≥ 2.4.0) |
| Published: | 2017-01-07 |
| Author: | Jean-Francois Plante |
| Maintainer: | Jean-Francois Plante <jfplante at hec.ca> |
| License: | GPL-2 |
| NeedsCompilation: | yes |
| Materials: | ChangeLog |
| In views: | Survival |
| CRAN checks: | MAMSE results |
| Reference manual: | MAMSE.pdf |
| Package source: | MAMSE_0.2-1.tar.gz |
| Windows binaries: | r-devel: MAMSE_0.2-1.zip, r-release: MAMSE_0.2-1.zip, r-oldrel: MAMSE_0.2-1.zip |
| OS X binaries: | r-release: MAMSE_0.2-1.tgz, r-oldrel: MAMSE_0.2-1.tgz |
| Old sources: | MAMSE archive |
Please use the canonical form https://CRAN.R-project.org/package=MAMSE to link to this page.


--- layout: default title: mountains in the sea ---
Mountains in the Sea
(july 2018)
Leif: Nik and I enjoy going on adventures. During the summer of 2018 we went on our third major trip together. There exists this inexplicable force that pulls me towards Lofoten, and having been there I am longing back ever since. Perhaps it is the fresh air, the breathtakingly beautiful mountains, the vast calmness, a sun that never sets, or perhaps it was being able to experience all of that alongside a good friend. The hikes and bike rides were as always exhausting, but an integral part of allowing me to really find and attempt to be the best version of myself. For these memories I am forever grateful. I hope you too can follow your dreams and make wonderful experiences a reality.
Nik: In Oslo the train conductor said we couldn't bring our bikes on the train. On the inside I thought "Huh, I guess we won't make it up north after all." On the outside my jaw dropped a bit and I stared blankly at the lady. The train was about to go and so she let us stay and lectured us. We were beyond stoked just to be on the train! Somewhere in Sweden I ran to buy some bananas and we nearly missed our train to the arctic. Thankfully we made it, and having hid our bikes where they put skis in the winter, we ate, watched the world cup, slept, and woke up in Sápmi.
The train turned back into Norway, to Narvik. It was time to buy a load of food, pack our stuff, lie in the grass, and find a bus that would take us westward, to the ocean and the mountains that rise out of it; Lofoten.
Leif goes over the bars and nearly falls to his death. The 'what if's' shook us.
The next morning. Out of the mist and into the city. The sunshine and food were appreciated, the army of campervans and air-conditioned-shopping-mall vibe not so much. We finished a litre of chocolate soymilk and got out out of there.
Justadtinden. If you are in the area, ride it! The trail is sick. We learnt our lesson and ditched the bikes before it got too gnarly.
From up here we saw a big mountain on the other side of the island, right on the water. 'Why not go there?' we thought. And so we did.
I felt too inspired by our surroundings to sleep. I meditated on the edge of our boulder. This photo was taken at 00:00.
Dinner, just before our tent started flying down the hill. It was late and we were weary, but the weather was good so we carried on. On Lofoten the weather is fickle but the light is not, so we hiked whenever it was good, which meant hiking in the middle of the night sometimes.
There was a day here without photos. Coming down from the mountain we took the road westward, to the very end of Lofoten, to Å. Rainy wind in our faces. We got to Å soaked and frozen to our bones. We rented a tiny cabin by the water, turned the heating way up, it became our little sauna, and we were warm again.
Again the weather was good, and so we went for the summit after dinner.
Can ya tell that Leif is a bit afraid of heights?
This one was magical to us. We sat there, on top of a mountain in the ocean, in the middle of the night, in awe.
Bushwacked along a fjord and found a little village. We set up camp early to leave our stuff behind and try to get to the top of Helvetestinden, which translates to 'hell-ridge'.
Into civilization for a moment...
...and back into the jungle. As we get used to the life of moving all day and wild camping, things once normal become weirder and weirder, like sleeping in a bed, pooping in a toilet, chairs.
We left our bikes behind, then left our tent behind, and went on one last hike.
On the road back to Narvik we met this dude. He was from Barcelona and riding the length of Norway. Leif and I undertook that trip a few years ago, and it changed our lives profoundly. Writing this I hope he made it, and that it was meaningful to him.
In Narvik again. As we tried to enter the train to get back to the south, the train conductor blocked our way, and simply said 'No. No bikes allowed.' There was a bit of a discussion, and as he looked the other way I got on. Leif went to another door and was having another discussion with another conductor, when an old man from the pub, with whom we watched the world cup final the previous night, covered one eye with his hand and asked the conductor, gently, to "Look the other way." They did.
Reentering normality, slowly.
We stuck our heads out the window with joy. We were coming home with our heads full of wonderful memories; the stuff of friendship, the stuff of life. And the sun finally set. ■
Thanks to Sydvang and Fjellsport for supporting this trip.


Class STBEasyFont
- java.lang.Object
-
- org.lwjgl.stb.STBEasyFont
-
public class STBEasyFont extends java.lang.Object
Native bindings to stb_easy_font.h from the stb library.Bitmap font for use in 3D APIs:
- Easy-to-deploy
- reasonably compact
- extremely inefficient performance-wise
- crappy-looking
- ASCII-only
Intended for when you just want to get some text displaying in a 3D app as quickly as possible.
Doesn't use any textures, instead builds characters out of quads.
SAMPLE CODE
Here's sample code for old OpenGL; it's a lot more complicated to make work on modern APIs, and that's your problem.
void print_string(float x, float y, char *text, float r, float g, float b) { static char buffer[99999]; // ~500 chars int num_quads; num_quads = stb_easy_font_print(x, y, text, NULL, buffer, sizeof(buffer)); glColor3f(r,g,b); glEnableClientState(GL_VERTEX_ARRAY); glVertexPointer(2, GL_FLOAT, 16, buffer); glDrawArrays(GL_QUADS, 0, num_quads*4); glDisableClientState(GL_VERTEX_ARRAY); }
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static int
stb_easy_font_height(java.nio.ByteBuffer text)
Takes a string and returns the vertical size (which can vary iftext
has newlines).static int
stb_easy_font_height(java.lang.CharSequence text)
Takes a string and returns the vertical size (which can vary iftext
has newlines).static int
stb_easy_font_print(float x, float y, java.nio.ByteBuffer text, java.nio.ByteBuffer color, java.nio.ByteBuffer vertex_buffer)
Takes a string (which can contain '\n') and fills out a vertex buffer with renderable data to draw the string.static int
stb_easy_font_print(float x, float y, java.lang.CharSequence text, java.nio.ByteBuffer color, java.nio.ByteBuffer vertex_buffer)
Takes a string (which can contain '\n') and fills out a vertex buffer with renderable data to draw the string.static void
stb_easy_font_spacing(float spacing)
Use positive values to expand the space between characters, and small negative values (no smaller than-1.5
) to contract the space between characters.static int
stb_easy_font_width(java.nio.ByteBuffer text)
Takes a string and returns the horizontal size.static int
stb_easy_font_width(java.lang.CharSequence text)
Takes a string and returns the horizontal size.
-
-
-
Method Detail
-
stb_easy_font_width
public static int stb_easy_font_width(java.nio.ByteBuffer text)
Takes a string and returns the horizontal size.- Parameters:
text
- an ASCII string- Returns:
- the horizontal size, in pixels
-
stb_easy_font_width
public static int stb_easy_font_width(java.lang.CharSequence text)
Takes a string and returns the horizontal size.- Parameters:
text
- an ASCII string- Returns:
- the horizontal size, in pixels
-
stb_easy_font_height
public static int stb_easy_font_height(java.nio.ByteBuffer text)
Takes a string and returns the vertical size (which can vary iftext
has newlines).- Parameters:
text
- an ASCII string- Returns:
- the vertical size, in pixels
-
stb_easy_font_height
public static int stb_easy_font_height(java.lang.CharSequence text)
Takes a string and returns the vertical size (which can vary iftext
has newlines).- Parameters:
text
- an ASCII string- Returns:
- the vertical size, in pixels
-
stb_easy_font_print
public static int stb_easy_font_print(float x, float y, java.nio.ByteBuffer text, java.nio.ByteBuffer color, java.nio.ByteBuffer vertex_buffer)
Takes a string (which can contain '\n') and fills out a vertex buffer with renderable data to draw the string. Output data assumes increasing x is rightwards, increasing y is downwards.The vertex data is divided into quads, i.e. there are four vertices in the vertex buffer for each quad.
The vertices are stored in an interleaved format:
x:float y:float z:float color:uint8[4]
You can ignore z and color if you get them from elsewhere. This format was chosen in the hopes it would make it easier for you to reuse existing buffer-drawing code.
If you pass in
NULL
for color, it becomes255,255,255,255
.If the buffer isn't large enough, it will truncate. Expect it to use an average of ~270 bytes per character.
If your API doesn't draw quads, build a reusable index list that allows you to render quads as indexed triangles.
- Parameters:
x
- the x offsety
- the y offsettext
- an ASCII stringcolor
- the text color, in RGBA (4 bytes)vertex_buffer
- a pointer to memory in which to store the vertex data- Returns:
- the number of quads
-
stb_easy_font_print
public static int stb_easy_font_print(float x, float y, java.lang.CharSequence text, java.nio.ByteBuffer color, java.nio.ByteBuffer vertex_buffer)
Takes a string (which can contain '\n') and fills out a vertex buffer with renderable data to draw the string. Output data assumes increasing x is rightwards, increasing y is downwards.The vertex data is divided into quads, i.e. there are four vertices in the vertex buffer for each quad.
The vertices are stored in an interleaved format:
x:float y:float z:float color:uint8[4]
You can ignore z and color if you get them from elsewhere. This format was chosen in the hopes it would make it easier for you to reuse existing buffer-drawing code.
If you pass in
NULL
for color, it becomes255,255,255,255
.If the buffer isn't large enough, it will truncate. Expect it to use an average of ~270 bytes per character.
If your API doesn't draw quads, build a reusable index list that allows you to render quads as indexed triangles.
- Parameters:
x
- the x offsety
- the y offsettext
- an ASCII stringcolor
- the text color, in RGBA (4 bytes)vertex_buffer
- a pointer to memory in which to store the vertex data- Returns:
- the number of quads
-
stb_easy_font_spacing
public static void stb_easy_font_spacing(float spacing)
Use positive values to expand the space between characters, and small negative values (no smaller than-1.5
) to contract the space between characters.E.g.
spacing = 1
adds one "pixel" of spacing between the characters.spacing = -1
is reasonable but feels a bit too compact to me;-0.5
is a reasonable compromise as long as you're scaling the font up.- Parameters:
spacing
- the font spacing
-
-


Firstly comes from Mustafa. It’s a list of the things need to do to start working with group: 1. BNL+RCF ACCOUNTS: 1. Apply for a BNL Life Number * Note: You will need this nuymber to proceed with the next steps 2. Online Cyber-Security Training 3. Read + Sign + Fax(scan+email) the computer user agreement * Signed Computer Use Agreements for employees and contractors are to be sent to Human Resources. The signed forms can be sent via inter-office mail to Bonnie Miller, Building 400B. Signed forms can also be faxed to HR at<PHONE_NUMBER> or be sent via email to<EMAIL_ADDRESS>* In the following steps, if asked about BNL host, it is Zhangbu Xu, you might also need his number which you can find it here 4. Apply for an account at BNL account here * Request: * SSH Gateway Access * Unix Systems 5. Apply for an RCF account here * Group is rhstar 6. After receiving all those accounts, you will also receive instructions on how to setup your ssh keys and how to access RCF grids. Please come and see if you need any help. 2. PDSF Accounts: You will need this for embedding analysis (we will discuss this and relevant concepts later) 1. Application 2. Agreement 3. STAR Hypernews (mailing lists) You need to subscribe to some mailing lists to start receiving emails of talks between the collaboration members on many topics relevant to your work here You need to subscribe to the following lists: * EMC2 Sub-Systems * Embedding issues and discussions * Offline production * PDSF at STAR * PWG Light Flavor Spectra discussions * STAR Operations * STAR Shift Information / check forms * STAR Shift Information / report * STAR Talks - discussions on public presentations * STARSOFT - Software issues of broad interest * Simulation discussion list
All the following steps can be done before you get the accounts above.


w
Enter Name to play:
Player 1:
Player 2:
Submit
Pig Dice
Total Score:
0
Roll:
Hold:
Play Again
Oh snap! You rolled a one, next player's turn!


%d Model(s) used. Highest mapping duration: %d ms (
%s
), greatest number of fields: %d (
%s
)
Reset statistics


Additional remarks for GetDocumentSummary
Returns the document summary of a person, account or contact person


Before Change
self.progress.new("Profiling w/%d threads" % self.num_threads, progress_total_items=self.num_contigs)
self.progress.update("initializing threads ...")
// FIXME: memory usage should be generalized.
last_memory_update = int(time.time())
self.progress.update("contigs are being processed ...")
while received_contigs < self.num_contigs:
try:
contig = output_queue.get()
// if we have a contig back, it means we are good to go with it,
// otherwise it is garbage.
if contig:
self.contigs.append(contig)
else:
discarded_contigs += 1
received_contigs += 1
if (int(time.time()) - last_memory_update) > 5:
memory_usage = utils.get_total_memory_usage()
last_memory_update = int(time.time())
After Change
self.progress.update("initializing threads ...")
mem_tracker = terminal.TrackMemory(at_most_every=5)
mem_usage, mem_diff = mem_tracker.start()
self.progress.update("contigs are being processed ...")
while received_contigs < self.num_contigs:
try:


Used for analyzing your schema and exporting a model.yml file for Rx Provides facilities to convert an existing Rails application schema.rb file to RestfulX model.yml file
Methods
Classes and Modules
Module SchemaToRxYaml::SettingsPublic Class methods
SchemaToRxYaml.schema_to_rx_yaml
- set of commands that introspects your database and formats your model.yml for export
[ show source ]
# File lib/restfulx/schema_to_rx_yaml.rb, line 91 91: def self.schema_to_rx_yaml 92: # Iterates through your database, and sets up table_arr with all columns 93: # - excludes schema_info/schema_migrations/and any other tables you specify in restfulx.yml 94: table_arr = ActiveRecord::Base.connection.tables - 95: %w(schema_info schema_migrations).map - 96: RxSettings.ignored.tables[0].split 97: 98: # Excludes columns from each table 99: disregarded_columns = %w(id created_at updated_at) + RxSettings.ignored.fields[0].split 100: 101: # Schema variable is appended to throughout, and is the variable exported to model.yml 102: schema = [] 103: 104: # Set up empty array for has_many relationships 105: @array_of_has_manies = [] 106: 107: # Iterates through each table, and checks for any database field ending in _id 108: table_arr.each do |table| 109: column_arr = ActiveRecord::Base.connection.columns(table) 110: column_arr.each do |col| 111: col_name = col.name.to_s 112: @array_of_has_manies << "#{col_name.gsub(/_id\b/,'')}_#{table}" if col_name[-3,3]=='_id' 113: end 114: end 115: 116: table_arr.each do |table| 117: # Set up empty arrays for other associations 118: belong_tos = [] 119: has_manies = [] 120: polymorphics = [] 121: 122: # Append table name to schema 123: # - project: 124: schema << "#{table.singularize}:\n" 125: column_arr = ActiveRecord::Base.connection.columns(table) 126: 127: column_arr.each do |col| 128: col_name = col.name.to_s 129: 130: # Ignore certain columns 131: columns_check = [] 132: disregarded_columns.each {|dc| columns_check << col_name.include?(dc) } 133: 134: # Sets up polymorphics array, we'll need to check for duplicates below 135: polymorphics << col_name.gsub('_id','PMCHECK').gsub('_type','PMCHECK') 136: 137: # Appends each column under respective table 138: schema << " - #{col_name}: #{col.type}\n" unless columns_check.include?(true) 139: 140: # Checks for certain column names 141: # - If it finds parent_id it sets up a tree_model for generation 142: # - If it finds _file_size it sets up attachment for generation 143: # - Sets up belong_tos 144: if col_name == 'parent_id' 145: schema << " - tree_model: [#{col_name.gsub(/_id\b/,'')}]\n" 146: elsif col_name =~ /_file_size$/ 147: schema << " - attachment_field: [#{col_name.gsub(/_file_size$/,'')}]\n" 148: else 149: belong_tos << col_name.gsub(/_id\b/,', ') if col_name[-3,3]=='_id' && !disregarded_columns.include?(col_name) 150: end 151: end 152: 153: # Checks for duplicates in the polymorphics array (used for error checking) 154: if polymorphics.dups.size > 0 155: schema << " - polymorphic: [#{polymorphics.dups.first.gsub('PMCHECK','')}]\n" 156: @polymorphic = polymorphics.dups.first.gsub('PMCHECK','') 157: end 158: 159: # Cleans up has many 160: @array_of_has_manies.each do |hm| 161: sanity_check = hm.gsub(/^#{table.singularize}_/,'') 162: if hm =~ /^#{table.singularize}_/ && table_arr.include?(sanity_check) 163: has_manies << hm.gsub(/^#{table.singularize}_/,'') + ', ' 164: end 165: end 166: 167: # Appends belong_to's to schema 168: if belong_tos.size > 0 169: belong_tos = belong_tos.delete_if {|x| x == "#{@polymorphic}, " } 170: break if belong_tos.size == 0 # fixing to get around nil error when you only have one polymorphic belong_to 171: last_in_array_fix = belong_tos.last 172: last_in_array_fix = last_in_array_fix.gsub(', ','') 173: belong_tos.pop 174: belong_tos << last_in_array_fix 175: schema << " - belongs_to: [#{belong_tos}]\n" 176: end 177: 178: # Appends has_manies' to schema 179: if has_manies.size > 0 180: last_in_array_fix = has_manies.last 181: last_in_array_fix = last_in_array_fix.gsub(', ','') unless last_in_array_fix.nil? 182: has_manies.pop 183: has_manies << last_in_array_fix 184: schema << " - has_many: [#{has_manies}]\n" 185: end 186: 187: schema << "\n" 188: end 189: 190: # Writes model.yml file 191: yml_file = File.join(RAILS_ROOT, "db", "model.yml") 192: File.open(yml_file, "w") { |f| f << schema.to_s } 193: puts "model.yml created at db/model.yml" 194: end


The files of the formal specification of the Grader project are represented in the packages below.
These files are located in the specification project directory. Below is a link to the javadoc subdirectory, which contains the generated model documentation


Abyssal Saintess Elcadia:
Monastery of Silence was where Saintess Solina and her pupils were staying. The Monastery's true history is known only to a few... Anyway, according to this book, we can learn more about Solina and her pupils from inside the Monastery.
I will make plans to sneak inside the Monastery. Let's meet here again later. And good work, my friend.


Decomposition of 2D polygons into convex pieces in JavaScript. See the Github repo.
Try drawing a polygon below!


Calculation of the mean convective heat transfer coefficient kc for a laminar fluid flow over an even surface. See more information .
Calculation of the mean convective heat transfer coefficient kc for a hydrodynamically developed turbulent fluid flow over an even surface. See more information.
Calculation of the mean convective heat transfer coefficient kc for an laminar and turbulent fluid flow over an even surface. See more information.
| Name | Description |
|---|---|
| kc_laminar | Mean heat transfer coefficient of plate | laminar regime |
| kc_laminar_KC | Mean heat transfer coefficient of plate | laminar regime |
| kc_laminar_IN_con | Input record for function kc_laminar and kc_laminar_KC |
| kc_laminar_IN_var | Input record for function kc_laminar and kc_laminar_KC |
| kc_overall | Mean heat transfer coefficient of even plate | overall regime | constant wall temperature |
| kc_overall_KC | Mean heat transfer coefficient of even plate | overall regime | constant wall temperature |
| kc_overall_IN_con | Input record for function kc_overall and function kc_overall_KC |
| kc_overall_IN_var | Input record for function kc_overall and function kc_overall_KC |
| kc_turbulent | Mean heat transfer coefficient of even plate | turbulent regime | constant wall temperature |
| kc_turbulent_KC | Mean heat transfer coefficient of even plate | turbulent regime | constant wall temperature |
| kc_turbulent_IN_con | Input record for function kc_turbulent and kc_turbulent_KC |
| kc_turbulent_IN_var | Input record for function kc_turbulent and kc_turbulent_KC |


Item 1
Shader
Flat
Gouraud
Phong
Cel
Model
Teapot
Csie
Car_road
Fighter
Longteap
Mig27
Plant
Tomcat
Church_s
Easter
Kangaroo
Mercedes
Patchair
Hide
Scale
x
y
z
Shear
°
Rotate
° / sec
Auto-rotate
Rotate about
x-axis
y-axis
z-axis
Ka
Kd
Ks
Shininess
Location: (
,
,
)
Item 2
Shader
Flat
Gouraud
Phong
Cel
Model
Teapot
Csie
Car_road
Fighter
Longteap
Mig27
Plant
Tomcat
Church_s
Easter
Kangaroo
Mercedes
Patchair
Hide
Scale
x
y
z
Shear
°
Rotate
° / sec
Auto-rotate
Rotate about
x-axis
y-axis
z-axis
Ka
Kd
Ks
Shininess
Location: (
,
,
)
Item 3
Shader
Flat
Gouraud
Phong
Cel
Model
Teapot
Csie
Car_road
Fighter
Longteap
Mig27
Plant
Tomcat
Church_s
Easter
Kangaroo
Mercedes
Patchair
Hide
Scale
x
y
z
Shear
°
Rotate
° / sec
Auto-rotate
Rotate about
x-axis
y-axis
z-axis
Ka
Kd
Ks
Shininess
Location: (
,
,
)
Light Position
Light 1 Position: (
,
,
)
Light 2 Position: (
,
,
)
Light 3 Position: (
,
,
)
Light Color
Light 1
Color:
rgb(255, 255, 255)
Brightness
Light 2
Color:
rgb(255, 255, 255)
Brightness
Light 3
Color:
rgb(255, 255, 255)
Brightness
Enable Party Mode