Much can be said about key–value observing (KVO). At very least, it’s an interesting use of Objective-C’s runtime dynamism. The Apple-provided API is rudimentary; I like to layer something on top that calls a block instead of a method that needs its own dispatch table. Other libraries like ReactiveCocoa wrap it in its own conventions.
But that higher-level stuff is a discussion for another time. Right now I want to talk about key path dependencies.
Key–value observing supports notifications both directly and indirectly.
Direct notifications, via [self willChangeValueForKey:@"foo"]
and [self didChangeValueForKey:@"foo"]
, are automatically wrapped around the corresponding -setFoo:
setter implementation method (by default).
But some properties don’t have direct setters. The canonical1 example for this is this class:
@interface Person : NSObject
@property (copy) NSString *givenName;
@property (copy) NSString *familyName;
@property (readonly) NSString *fullName;
@end
@implementation Person
- (NSString *)fullName {
return<EMAIL_ADDRESS>self.familyName] componentsJoinedByString:@" "];
}
@end
The fullName
getter depends on givenName
and familyName
.
As such it should be annotated as depending on those key paths, so that when an object registers to observe fullName
it will get a notification when -setGivenName:
and -setFamilyName:
are called.
The +keyPathsForValuesAffectingValueForKey: method marks that dependency. The usual way to specify the above dependency is to implement a method with a special naming convention:
@implementation Person
+ (NSSet *)keyPathsForValuesAffectingFullName {
return [NSSet setWithObjects:@"givenName", @"familyName", nil];
}
- (NSString *)fullName { … }
@end
The default implementation of +keyPathsForValuesAffectingValueForKey:
dispatches to the method with this name (if any), just as -valueForKey:@"givenName"
dispatches to -givenName
and -setValue: forKey:@"givenName"
dispatches to -setGivenName:
.
Dependency helpers
A common case that comes up is:
@implementation SomeSingleton
- (BOOL)mySetting {
return [[NSUserDefaults standardUserDefaults] boolForKey:@"someKey"];
}
@end
If user defaults can change separately from this code (and you should probably assume it can), providing correct KVO change notifications can be accomplished by having the singleton observe NSUserDefaults
with NSKeyValueObservingOptionPrior
; posting willChangeValueForKey:@"mySetting"
on the prior callback and didChangeValueForKey:@"mySetting"
on the post callback.

A simpler and more efficient approach is this:
@implementation SomeSingleton
+ (NSSet *)keyPathsForValuesAffectingMySetting {
return [NSSet<EMAIL_ADDRESS>}
- (BOOL)mySetting { … }
- (NSUserDefaults *)$defaults {
return [NSUserDefaults standardUserDefaults];
}
@end
MyLilKeyPathHelpers adds this shortcut and a couple of others as a category on NSObject
2:
$defaults
for[NSUserDefaults standardUserDefaults]
$app
for the global sharedNSApplication
orUIApplication
instance (handy as$app.delegate.someKey
)$classes
as a generic method for the above: for example,$classes.SomeSingleton.sharedInstance.someKey
These make it easier to get properties KVO-compliant.
And yes, it’s legal to use $
in identifiers, but be very restrained with it!
Specifying dependencies
Instead of implementing the dependency method with a special name, it can be convenient to override the top-level method directly. For example, each item in Delicious Library has properties for fields like title, author, LCCN3, and notes. Sorting by these fields sometimes requires custom behavior — for example, sorting by author attempts to massage “Malcolm Gladwell” into “Gladwell, Malcolm”.
The way we implement this is to append “ForSorting” to each sort descriptor key.
Then we can provide an -authorForSorting
method with this custom behavior.
We also override -valueForKey:
to strip “ForSorting” if the object didn’t have a custom implementation, and just return the plain value.
NSArrayController
observes the keys of its sort descriptors to rearrange (re-sort) when one of the values change.
Accordingly, the “ForSorting” keys needed to be KVO-compliant.
Just as we override the dispatching -valueForKey:
method, we also overrode +keyPathsForValuesAffectingValueForKey:
to declare (by default)4 that authorForSorting
depends on author
.
Hell is other people’s superclasses
SICP made me a convert to the idea of composability.
When building a component on top of another — in this case, writing a class by subclassing NSObjet
— ideally you can build use on top of it in the same manner the original was constructed.
That is, your class should behave correctly when used as a superclass.
Let’s see what happens when we extend behavior of our original Person
class by subclassing.
The FancyPerson
class provides behavior for “John Smith, Esquire”, and TitledPerson
provides “Mr Smith”.
@interface FancyPerson : Person
@property (copy) NSString *suffix;
@end
@implementation FancyPerson
- (NSString *)fullName {
return [@[[super fullName], self.suffix] componentsJoinedByString:@", "];
}
@end
@interface TitledPerson : Person
@property (copy) NSString *title;
@end
@implementation TitledPerson
- (NSString *)fullName {
return<EMAIL_ADDRESS>self.familyName] componentsJoinedByString:@" "];
}
@end
Both of these demonstrate a different behavior:
FancyPerson
enhances the fullName
method, by calling super and supplementing the return value.
TitledPerson
replaces the fullName
method, with no call to [super fullName]
.
Accordingly, -[FancyPerson fullName]
should declare that it depends on whatever -[Person fullName]
depends on, plus the suffix
key.
And -[TitledPerson fullName]
depends on only title
and familyName
, regardless of the superclass.
Let’s start with the enhancement case.
Enhancing key path dependencies
The naive approach has a compile error:
@implementation FancyPerson
+ (NSSet *)keyPathsForValuesAffectingFullName {
return [[super keyPathsForValuesAffectingFullName] setByAddingObject:@"suffix"];
// error: no known class method for selector 'keyPathsForValuesAffectingFullName'
}
@end
Key path dependencies are typically private, not declared in a class’s interface, so the call to super will be a warning or error.
You could declare that you know the superclass to implement that method, but that couples to the implementation and may not be correct if Person
is instead overriding the dispatching method +keyPathsForValuesAffectingValueForKey:
.
Similar to subclassing delegates, the correct solution is to use the defining class5:
@implementation FancyPerson
+ (NSSet *)keyPathsForValuesAffectingFullName {
NSSet *superclassKeys = [[FancyPerson superclass] keyPathsForValuesAffectingValueForKey:@"fullName"];
return [superclassKeys setByAddingObject:@"suffix"];
}
@end
This is robust against the superclass’s implementation, no matter if it specifies dependencies by implementing the specific method, overriding the dispatching one, or none at all.
Replacing key path dependencies
Now let’s consider TitledPerson
’s override:
@implementation TitledPerson
+ (NSSet *)keyPathsForValuesAffectingFullName {
return [NSSet setWithObjects:@"title", @"familyName", nil];
}
@end
This is fine.
However there will be a problem if Person
were to instead override the dispatching method:
@implementation Person
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
if ([key isEqual:@"fullName"]) { // don't do this
return [NSSet setWithObjects:@"givenName", @"familyName", nil];
} else {
return [super keyPathsForValuesAffectingValueForKey:key];
}
}
In this case, the call [TitledPerson keyPathsForValuesAffectingValueForKey:@"fullName"]
completely ignores the TitledPerson
override!
Specifically, only when the call to super hits NSObject
’s implementation of +keyPathsForValuesAffectingValueForKey:
will the subclass’s override of +keyPathsForValuesAffectingFullName
be called.

The problem here is the naive implementation of the +[Person keyPathsForValuesAffectingValueForKey:]
override.
Correctly overriding +keyPathsForValuesAffectingValueForKey:
It’s valid for dependencies to be specified in either the dispatching or specific methods, all the way up the inheritance chain.
Correctly overriding +keyPathsForValuesAffectingValueForKey:
requires some tricky code, which I’ve wrapped in a function MLHOverrideKeyPathsForValueAffectingKey in MyLilKeyPathHelpers.
The Person
class can use this to correctly override the dispatching method:
@implementation Person
+ (NSSet *)keyPathsForValuesAffectingValueForKey:(NSString *)key {
return MLHOverrideKeyPathsForValueAffectingKey(self, [Person class], NO, key, ^(NSSet *superKeyPaths) {
if ([key isEqual:@"fullName"]) { // or -hasSuffix:, etc.
return [NSSet setWithObjects:@"givenName", @"familyName", nil];
} else {
return superKeyPaths;
}
});
}
@end
With this implementation, calling [TitledPerson keyPathsForValuesAffectingValueForKey:@"fullName"]
results in a call to [TitledPerson keyPathsForValuesAffectingFullName]
and that’s all.
Accomplishing this unfortunately requires a reimplementation of the method name logic in NSObject
’s +keyPathsForValuesAffectingValueForKey:
; I believe this is inescapable.
All the parameters to this function are documented in the header; take a look.
This same technique could be applied to an override of -valueForKey:
, though that generally doesn’t have the same issues because the dispatch targets (that is, getter methods) are declared in a class’s public interface.
-
and ridden with Anglo-centric cultural assumptions; see Falsehoods Programmers Believe About Names ↩
-
As a rule I try to avoid categories on framework classes as much as possible. I feel this is one of the rare cases when it’s appropriate. ↩
-
Some “ForSorting” values depend on more than one key. For example,
-titleForSorting
depends on bothtitle
anddominantLanguageCode
, so “Die Another Day” sorts under “D” while your German copy of “Die Bourne Identität” sorts under “B”. Incidentally this causes a lot of user confusion when the language information is not correct. ↩ -
MyLilKeyPathHelpers provides a helper macro for this called
_definingClass
: ↩


{% extends "base.html" %} {% block page %} {% comment %} Just a page of links {% endcomment %}
View All Edits
View New Submissions Only
Reported Reviews
Reported Profiles
Reported Noodles


Implements functions to update Bayesian Predictive Power Computations after not stopping a clinical trial at an interim analysis. Such an interim analysis can either be blinded or unblinded. Code is provided for Normally distributed endpoints with known variance, with a prominent example being the hazard ratio.
| Version: | 1.0.0 |
| Depends: | mvtnorm, R (≥ 2.10) |
| Suggests: | knitr, rmarkdown |
| Published: | 2016-12-13 |
| Author: | Kaspar Rufibach, Paul Jordan, Markus Abt |
| Maintainer: | Kaspar Rufibach <kaspar.rufibach at roche.com> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| Materials: | NEWS |
| CRAN checks: | bpp results |
| Reference manual: | bpp.pdf |
| Vignettes: |
Sequentially updating the likelihood of success of a Phase 3 pivotal time-to-event trial based on interim analyses or external information |
| Package source: | bpp_1.0.0.tar.gz |
| Windows binaries: | r-devel: bpp_1.0.0.zip, r-release: bpp_1.0.0.zip, r-oldrel: bpp_1.0.0.zip |
| OS X binaries: | r-release: bpp_1.0.0.tgz, r-oldrel: bpp_1.0.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=bpp to link to this page.


Coronavirus Disease 2019 (COVID-19) Cases in MA
As of April 5, 2020
CATEGORY |
NUMBER OF CONFIRMED CASES |
|---|---|
County |
|
Barnstable |
347 |
Berkshire |
258 |
Bristol |
659 |
Dukes |
8 |
Essex |
1506 |
Franklin |
100 |
Hampden |
768 |
Hampshire |
128 |
Middlesex |
2632 |
Nantucket |
9 |
Norfolk |
1271 |
Plymouth |
963 |
Suffolk |
2658 |
Worcester |
978 |
Unknown |
215 |
Sex |
|
Female |
6528 |
Male |
5901 |
Unknown |
71 |
| Age Group | |
≤19 years of age |
290 |
20-29 years of age |
1773 |
30-39 years of age |
2064 |
40-49 years of age |
2074 |
50-59 years of age |
2465 |
60-69 years of age |
1735 |
≥ 70 years of age |
2098 |
Unknown |
1 |
Deaths |
|
Attributed to COVID-19 |
231 |
COVID-19 Cases in Long-Term Care Facilities* |
|
Residents/Healthcare workers of Long-Term Care Facilities |
551 |
Long-Term Care Facilities Reporting At Least One Case of COVID-19 |
102 |
Hospitalization |
|
Patient was hospitalized |
1145 |
Patient was not hospitalized |
3675 |
Under Investigation |
7680 |
| Reported Deaths – April 5, 2020 | ||||
|---|---|---|---|---|
| Sex | Age | County | Preexisting Conditions | Hospitalized |
| Female | 80s | Essex | Unknown | Yes |
| Female | 80s | Middlesex | Yes | No |
| Male | 60s | Plymouth | Yes | Yes |
| Female | 100s | Berkshire | Unknown | Unknown |
| Male | 50s | Norfolk | Unknown | Unknown |
| Male | 70s | Bristol | Yes | Yes |
| Female | 90s | Middlesex | Yes | No |
| Female | 80s | Bristol | Yes | Yes |
| Male | 50s | Middlesex | No | Yes |
| Female | 60s | Berkshire | Unknown | Unknown |
| Male | 50s | Plymouth | Yes | Yes |
| Female | 70s | Bristol | Unknown | Unknown |
| Female | 90s | Berkshire | Unknown | Unknown |
| Male | 80s | Essex | Yes | Yes |
| Male | 80s | Suffolk | Unknown | Yes |
These data are cumulative and current as of April 5, 2020 at 12:30PM *Reflects improved facility definitions and data collection. These include positive cases at nursing homes, rest homes, and skilled nursing facilities.
| Laboratory | Total Patients Positive | Total Patients Tested |
|---|---|---|
| MA State Public Health Laboratory | 1021 | 7729 |
| ARUP Laboratories | 17 | 186 |
| Baystate Medical Center | 3 | 8 |
| Bedford Research Foundation | 43 | 303 |
| Beth Israel Deaconess Medical Center | 964 | 5278 |
| BioReference Laboratories | 12 | 47 |
| Boston Medical Center | 436 | 1005 |
| BROAD Institute CRSP | 721 | 3598 |
| Centers for Disease Control and Prevention | 1 | 10 |
| Children’s Hospital Boston | 15 | 247 |
| East Side Clinical Laboratory | 12 | 90 |
| Genesys Diagnostics | 116 | 209 |
| LabCorp | 1006 | 5787 |
| Mayo Clinic Labs | 415 | 2138 |
| Orig3n | 16 | 40 |
| Partners Healthcare | 1024 | 5129 |
| Quest Laboratories | 5778 | 35226 |
| South Shore Hospital | 13 | 78 |
| Steward Health Care | 68 | 128 |
| Tufts Medical Center | 624 | 2923 |
| UMASS Memorial Medical Center | 81 | 455 |
| VA Boston Healthcare System | 12 | 13 |
| Viracor | 71 | 1216 |
| Other | 31 | 94 |
| Total Patients Tested* | 12500 | 71937 |
Data are cumulative and current as of April 5, 2020 at 12:30PM.
*Other commercial and clinical laboratories continue to come on line. As laboratory testing results are processed and the source verified, they will be integrated into this daily report.


BSP Tree¶
BSP means Binary Space partitioning. It’s an advanced container which parts area into smaller areas randomically.
The algorithm of partitioning is here: http://www.roguebasin.com/index.php?title=Basic_BSP_Dungeon_generation
Properties¶
-
property
display
:
bsp-tree;
Required YES
-
property
body
:
DRAW-OBJ-SELECTOR;
Default null
Link to subareas with draw-obj
-
property
padding
:
INTEGER;
Default 0
Padding between subareas.
-
property
justify
:
JUSTIFY-X, JUSTIFY-Y | center | random;
Default start, start
Align of body element.
-
property
iterations-count
:
INTEGER;
Default 3
How many iterations will be executed to parts area into two smaller areas. Each iteration split each area to two smaller areas (vertically or horizontally). Max number of areas is
(iterations-count - 1) ** 2
where**
is a power operatorIf area is too small to split (with min-width and min-height) then splitting will be stopped.
If iteration is greater than iterations-count and width of area is greater than max-width (or vice-versa with height), then area should split into two areas again.
-
property
min-width
:
INTEGER;
Default 0
If width of subarea (+ padding) is smaller than min-width then splitting will be stopped.
-
property
min-height
:
INTEGER;
Default 0
If height of subarea (+ padding) is smaller than min-height then splitting will be stopped.
-
property
max-width
:
INTEGER;
Default width of subarea
If iteration is greater than iterations-count and width of area if greater than max-width, then area should split into two areas again.
-
property
max-height
:
INTEGER;
Default height of subarea
If iteration is greater than iterations-count and height of area if greater than max-height, then area should split into two areas again.
Example¶
district {
display: bsp-tree;
body: house;
iterations-count: 4;
padding: 10;
justify: center;
width: 500;
depth: 500;
min-width: 100;
min-height: 100;
}
You can try on https://pixelopolis.herokuapp.com/examples/Containers/Bsp-tree


LatLong_lens
shader for Softimage x64October 28, 2014 - Version 2.1
The original latlong_lens
shader was written by Ralf Habel
<EMAIL_ADDRESS>Softimage port by Andrew Hazelden
<EMAIL_ADDRESS>http://www.andrewhazelden.com/blog
This package includes the Windows x64 and Linux x64 builds of the latlong_lens
mental ray shader for Softimage. The latlong_lens
shader is designed to render equirectangular images. The shader can be used to create panoramic images with a single click of the render button.
The latlong_lens shader is included in the Domemaster3D Softimage Addon.
After you install the shader you need to restart Softimage so the shader is loaded into mental ray. If you don't restart Softimage after installing the shader you will get a "shader not found error".
The latlong_lens
shader for Windows has been compiled with Visual Studio 2012. If your system doesn't have the Visual Studio 2012 (VC++ 11.0) x64 Redistributable Package installed you can download it here:
http://www.microsoft.com/en-us/download/details.aspx?id=30679
To use the latlong_lens
shader, open your the camera's property window. Click on the "Lens Shaders" tab and click the "Add" button to create a new lens shader. In the pop-menu select "latlong_lens"
.
It is possible to mirror the rendering by enabling the lens shader's flipHorizontal attribute.
The best equirectangular image output is from rendering with a 2:1 aspect ratio. (Like a 2048x1024 pixel or 4096x2048 pixel output)
A sample softimage 2014 project file is included.
The latlong_project_softimage_2014sp1.zip
scene can be used to test the latlong_lens
shader installation.
For more information about the x64 builds of the latlong_lens
shader check out the blog page:


Traffic Park Road to be closed till March 31, 2020
by Nagpur Today, Nagpur NewsNagpur: The road between Dharampeth Zend chowk to Traffic Park Road will be closed till March 31, 2020 due to the construction of Cement Concrete road project.
NMC has issued instructions in that regard. Under this project concretisation is being done on Gokulpeth Bazar road, Coffee House Chowk (West High Court Road) to Ram Nagar Hilltop and Coffee House square to Dharampeth Zenda Chowk to Gajanan Mandir to Traffic Park.
Due to this work, the road between Dharampeth Zenda Chowk to Traffic Park will remain closed from November 25,2019 to March 31, 2020


Reset password
{% if request.params.reset_requested %}
{% if request.params.reset_missingdata %}
For a password reset you must specify both your user name and the registered e-mail address!
{% else %}
An e-mail with a password reset link will be sent to {{request.params.email}} provided that this is your registered e-mail address.
{% endif %}
{% endif %}


|
Spring Security Framework | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
| Interface Summary | |
|---|---|
| AccessDeniedHandler | Used by ExceptionTranslationFilter to handle an
AccessDeniedException . |
| AuthenticationDetailsSource | Provides a Authentication.getDetails() object for
a given web request. |
| AuthenticationEntryPoint | Used by ExceptionTranslationFilter to commence an authentication
scheme. |
| TargetUrlResolver | Used by AbstractProcessingFilter to determine target URL in case of
successful authentication. |
| Class Summary | |
|---|---|
| AbstractProcessingFilter | Abstract processor of browser-based HTTP-based authentication requests. |
| AccessDeniedHandlerImpl | Base implementation of AccessDeniedHandler . |
| AuthenticationDetails | A holder of the context as a string. |
| AuthenticationDetailsSourceImpl | Base implementation of AuthenticationDetailsSource . |
| ExceptionTranslationFilter | Handles any AccessDeniedException and AuthenticationException thrown within the
filter chain. |
| FilterChainOrder | Stores the default order numbers of all Spring Security filters for use in configuration. |
| SessionFixationProtectionFilter | Detects that a user has been authenticated since the start of the request and starts a new session. |
| SpringSecurityFilter | Implements Ordered interface as required by security namespace configuration and implements unused filter lifecycle methods and performs casting of request and response to http versions in doFilter method. |
| TargetUrlResolverImpl | Default implementation for TargetUrlResolver |
| WebAuthenticationDetails | A holder of selected HTTP details related to a web authentication request. |
| WebAuthenticationDetailsSource | Implementation of AuthenticationDetailsSource which builds the details object from
an HttpServletRequest object. |
Authentication processing mechanisms, which respond to the submission of authentication credentials using various protocols (eg BASIC, CAS, form login etc).
|
Spring Security Framework | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


Example: Vector Projection
u:
(
,
,
)
v:
(
,
,
)
Visualization goes here once you compute the projection
Compute Projection of u onto v
Projection u onto v:
Perpendicular projection u onto v:


Welcome to my personal website!
Well hello there! This is a work in progress, Big thanks to Mr.Eisaman for inspiring me through his Coding class to start my own website.
Well hello there! This is a work in progress, Big thanks to Mr.Eisaman for inspiring me through his Coding class to start my own website.


--- layout: post title: WRT54G Notes date: '2012-05-23 22:06:41 -0700' mt_id: 1495 blog_id: 1 post_id: 1495 basename: wrt54g-notes categories: - high-geekery ---
I'm having some trouble with my Linksys WRT-54G router. It's a very old router—I think I bought it at least eight years ago. Basically, my wife is complaining that our Macs suddenly lose the signal and she has to turn Airport off and then on. Sometimes she even has to restart the router itself.
I've searched Apple's support forums thoroughly and tried everything recommended there. Given that this happens on Snow Leopard and Lion, on an iMac and a MacBook, and even on her iPhone, I'm leaning towards the router being the problem.
This is going to be an ongoing blog entry covering my efforts to resolve the issue. I'm going to tweak one setting at a time and see if it has any effect.
Some of you are probably thinking: a) just buy a new freaking router already and b) why not just throw DD-WRT or Tomato on already and be done with it. Points taken, but home networking isn't my thing. I'm afraid that I won't set it up correctly, resulting in an inability to connect to work's VPN or general hassle with all the connected devices.
I'm not ruling out either of those as the eventual result but for now I'm going to tweak.
[UPDATE (5/26/2012): Argh, still having the same problems. After pondering the issue more, I concluded that it has to be related to OS X Lion. My MacBook Pro is still on Snow Leopard and it can stay hooked up to VPN over wireless for hours and hours. The troubles seem isolated to our MacBook and iMac, which are both on Lion. So I just deleted com.apple.alf.plist
as recommended here and removed my network passwords from the system Keychain as recommended by Apple.]
[UPDATE (5/29/2012): Trying this tip after the problem re-surfaced yet again.]


--- title: Scheduling keywords: fastai sidebar: home_sidebar nb_path: "nbs/init.ipynb" ---
import yaml
pdt = pd.to_datetime
def test_opening():
per = Period(**{'start': "6:00", 'end': "18:00"})
TESTCASE.assertTrue(per.during( pdt('2021-01-01 6:01') ))
TESTCASE.assertFalse(per.during( pdt('2021-01-01 20:00') ))
alwayson = Period(start="0:00", end="0:00", status='some other status')
TESTCASE.assertTrue(alwayson.during( pdt('2021-01-01 00:00')))
print('✅ Passing')
test_opening()
day_config = yaml.safe_load('''
periods:
- start: '9:00'
end: '17:00'
status: occupied
name: workday
''')
closed_for_lunch = yaml.safe_load('''
periods:
- start: '9:00'
end: '12:00'
status: occupied
- start: '13:00'
end: '20:00'
status: occupied
name: split_workday
''')
def test_day():
day = Day(**day_config)
#too early
TESTCASE.assertFalse(day.within_period( pdt('2021-01-01 8:00')))
#1 min into the workday
TESTCASE.assertTrue(day.within_period( pdt('2021-01-01 9:01')))
#status of the period does not match the passed in status
TESTCASE.assertFalse(day.within_period( pdt('2021-01-01 9:01'), status='otherstatus'))
cfl = Day(**closed_for_lunch)
#too early
TESTCASE.assertFalse(cfl.within_period( pdt('2021-01-01 8:00')))
TESTCASE.assertIsNone(cfl.get_status( pdt('2021-01-01 8:00')))
#1 min into the workday
TESTCASE.assertTrue(cfl.within_period( pdt('2021-01-01 9:01')))
#lunch
TESTCASE.assertFalse(cfl.within_period( pdt('2021-01-01 12:01')))
#1 min into the workday
TESTCASE.assertTrue(cfl.within_period( pdt('2021-01-01 19:59')))
TESTCASE.assertEqual(cfl.get_status( pdt('2021-01-01 19:59')), 'occupied')
two_status_day = yaml.safe_load('''
periods:
- start: '9:00'
end: '17:00'
status: occupied
- start: '17:00'
end: '19:00'
status: cleaning
name: workday
''')
daystats = Day(**two_status_day)
TESTCASE.assertEqual(set(daystats.get_all_status()), set(['occupied', 'cleaning']))
print('✅ Passing')
test_day()
After defining different types of days (e.g. workdays, offdays, etc) we need logic to see whether a certain date corresponds to that type of day.
Logic functions must accept a pd.Timestamp
object ts
as the first argument. Other optional keywords can be given. These will be fed in from the kwargs
in the config for the Logic
object defined below.
def test_logic_functions():
TESTCASE.assertTrue(is_month(pdt('2021-11-01'), [11, 12]))
#because july 4th 2021 was a sunday
TESTCASE.assertTrue(is_weekend(pdt('2021-07-04')))
#july 5th was a holiday in the US on 2021, because july 4th was a sunday
TESTCASE.assertTrue(is_holiday(pdt('2021-07-05')))
feb1 = pdt('2021-02-01')
TESTCASE.assertTrue(before(feb1, month=3, day=1))
TESTCASE.assertFalse(after(feb1, month=3, day=1))
TESTCASE.assertFalse(before(feb1, month=1, day=31))
TESTCASE.assertTrue(after(feb1, month=1, day=31))
TESTCASE.assertTrue(specific_weekday(pdt('2021-07-05'), 'Monday'))
print('✅ Passing')
test_logic_functions()
def test_logic():
with TESTCASE.assertRaises(ValueError):
log = Logic(select='doesnotexist')
#always will give you true for any value
TESTCASE.assertTrue(Logic(select='always').evaluate(0))
halloween = yaml.safe_load('''
select: months
kwargs:
months:
- 10
''')
TESTCASE.assertTrue(Logic(**halloween).evaluate(pdt('2020-10-31')))
closed_on_holidays = yaml.safe_load('''
select: holidays
exclude: true
kwargs:
holiday_calendar: US
''')
TESTCASE.assertFalse(Logic(**closed_on_holidays).evaluate(pdt('2020-12-25')))
test_logic()
def test_daytype():
workday = yaml.safe_load('''
name: workday-type
day:
periods:
- start: '9:00'
end: '17:00'
status: occupied
name: workday
logic:
- select: weekday
''')
dt = DayType(**workday)
TESTCASE.assertIs(dt.evaluate(pdt('2021-07-07')), dt.day)
TESTCASE.assertIsNone(dt.evaluate(pdt('2021-07-10')))
test_daytype()
def test_logics():
october_weekdays = yaml.safe_load('''
day: {}
logic:
- select: months
kwargs:
months:
- 10
- select: weekday
''')
octs = DayType(**october_weekdays)
#true for october weekday
TESTCASE.assertTrue(octs.evaluate(pdt('2020-10-30')))
#halloween was a saturday
TESTCASE.assertFalse(octs.evaluate(pdt('2020-10-31')))
TESTCASE.assertFalse(octs.evaluate_logic(pdt('2020-10-31')))
#false for any day in november
TESTCASE.assertFalse(octs.evaluate(pdt('2020-11-10')))
# order doesnt matter since the logic is AND
october_weekdays_reversed = yaml.safe_load('''
day: {}
logic:
- select: weekday
- select: months
kwargs:
months:
- 10
''')
octs_rev = DayType(**october_weekdays_reversed)
#true for october weekday
TESTCASE.assertTrue(octs_rev.evaluate(pdt('2020-10-30')))
#halloween was a saturday
TESTCASE.assertFalse(octs_rev.evaluate(pdt('2020-10-31')))
#false for any day in november
TESTCASE.assertFalse(octs_rev.evaluate(pdt('2020-11-10')))
weekdays_no_holidays = yaml.safe_load('''
day: {}
logic:
- select: weekdays
- select: holidays
exclude: true
''')
#july 5th 2021 was a monday observation of independence day
wnh = DayType(**weekdays_no_holidays)
TESTCASE.assertFalse(wnh.evaluate(pdt('2021-07-05')))
TESTCASE.assertTrue(wnh.evaluate(pdt('2021-07-06')))
#empty lists always evaluate to false
TESTCASE.assertFalse(DayType(day={}, funcs=[]).evaluate(0))
print('✅ Passing')
test_logics()
def test_schedule():
worksched = yaml.safe_load('''
daytypes:
- name: workday-type
day:
periods:
- start: '6:30'
end: '18:30'
status: occupied
name: workday
logic:
- select: weekdays
- select: holidays
exclude: true
- select: months
exclude: true
kwargs:
months:
- 1
- name: half-day-janurary
day:
periods:
- start: '6:30'
end: '12:00'
status: 'occupied'
name: halfday
logic:
- select: weekdays
- select: months
kwargs:
months:
- 1
''')
sched = Schedule(**worksched)
jul6 = pdt('2021-07-06 01:00')
#jul 6 picks up the workday-type of day
TESTCASE.assertIs(sched.find_relevant_day(jul6), sched.daytypes[0].day)
#but it evaluates to unoccupied at 1am
TESTCASE.assertFalse(sched.is_occupied(jul6))
jul6noon = pdt('2021-07-06 12:00')
TESTCASE.assertIs(sched.find_relevant_day(jul6noon), sched.daytypes[0].day)
#however it is occupied at noon
TESTCASE.assertTrue(sched.is_occupied(jul6noon))
#they work a half day all weekdays in jan.
jan1 = pdt('2021-01-01 08:00')
TESTCASE.assertIs(sched.find_relevant_day(jan1), sched.daytypes[1].day)
TESTCASE.assertTrue(sched.is_occupied(jan1))
TESTCASE.assertEqual(sched.get_status(jan1), 'occupied')
#but jan2 is a saturday
TESTCASE.assertFalse(sched.is_occupied(pdt('2021-01-02 08:00')))
print('✅ Passing')
test_schedule()
def test_multistatus_schedule():
worksched = yaml.safe_load('''
daytypes:
- name: workday-type
day:
periods:
- start: '6:30'
end: '18:30'
status: occupied
name: workday
logic:
- select: weekdays
- select: holidays
exclude: true
- select: months
exclude: true
kwargs:
months:
- 1
- name: half-day-janurary
day:
periods:
- start: '6:30'
end: '12:00'
status: 'lightly occupied'
name: halfday
logic:
- select: weekdays
- select: months
kwargs:
months:
- 1
''')
sched = Schedule(**worksched)
jul6 = pdt('2021-07-06 01:00')
TESTCASE.assertDictEqual(sched.check_all_status(jul6),
{'occupied': False, 'lightly occupied': False}
)
jul6noon = pdt('2021-07-06 12:00')
TESTCASE.assertDictEqual(sched.check_all_status(jul6noon),
{'occupied': True, 'lightly occupied': False})
print('✅ Passing')
test_multistatus_schedule()
from nbdev.export import notebook2script
_nbpath = os.path.join(_dh[0], _FNAME+'.ipynb')
notebook2script(_nbpath)


The Administration Client Interface
The Administration Client interface is comprised of the following:
• Application Window
• Title Bar
• Menu Bar
• Toolbar
• Navigator Pane
• Contents Pane
• Shortcut Menu


Film Festivals datatable
Accuracy from 2007-2017
Name
year
best_picture
best_actor
best_actress
best_foreign_language_film


Watch Russian Military Police and Turkish Troops First Patrol of Syrian-Turkish Border
The joint Russian-Turkish patrols along the Syrian border began on Friday. The Russian military said the operation had been successful.
The Russian Defence Ministry said that the patrol covered a distance of more than 110 kilometres [some 68 miles] to the west of the Ad Darbasiyah crossing at a depth of six kilometres from the Syrian-Turkish border.
Footage shows a convoy of military vehicles, including armoured personnel carriers and mine-resistant trucks – from Russia and Turkey – moving through the Syrian countryside.
The patrolling is carried out under an agreement on the withdrawal of Kurdish forces for the border area in northern Syria, which was reached by Moscow and Ankara in the wake of the beginning of Turkey’s security operation there.


Initializer.
For example, the following code fragment requests a search for
documents where 'first' occurs in subject and 'good' occurs anywhere,
returning at most 20 documents, starting the search from 'cursor token',
returning another single document cursor for the results, sorting by
subject in descending order, returning the author, subject, and summary
fields as well as a snippeted field content.
results = index.search(Query(
query_string='subject:first good',
options=QueryOptions(
limit=20,
cursor=Cursor(),
sort_options=SortOptions(
expressions=[
SortExpression(expression='subject')],
limit=1000),
returned_fields=['author', 'subject', 'summary'],
snippeted_fields=['content'])))
In order to get a Cursor, you specify a Cursor in QueryOptions.cursor
and extract the Cursor for the next request from results.cursor to
continue from the last found document, as shown below:
results = index.search(
Query(query_string='subject:first good',
options=QueryOptions(cursor=results.cursor)))
Args:
query_string: The query to match against documents in the index. A query
is a boolean expression containing terms. For example, the query
'job tag:"very important" sent <= 2011-02-28'
finds documents with the term job in any field, that contain the
phrase "very important" in a tag field, and a sent date up to and
including 28th February, 2011. You can use combinations of
'(cat OR feline) food NOT dog'
to find documents which contain the term cat or feline as well as food,
but do not mention the term dog. A further example,
'category:televisions brand:sony price >= 300 price < 400'
will return documents which have televisions in a category field, a
sony brand and a price field which is 300 (inclusive) to 400
(exclusive). See
https://developers.google.com/appengine/docs/python/search/overview#Expressions
for a list of expressions that can be used in queries.
options: A QueryOptions describing post-processing of search results.
Raises:
QueryError: If the query string is not parseable.


What Not to Say to a Birth Mom or Adoptee
Choose your words wisely.
This is solely my opinion. Every person is different, so the things that I have experienced in no way reflect EVERY birth mother or adoptee.
What Not to Ask or Say to a Birth Mom
First, the biggest mistake I often hear in adoption talk is “giving a baby up for adoption.” I know this a common mistake. I’ve said it too, and I’m a birth mom AND an adoptee! This phrase is such a stab in the heart to most birth moms because it presumes we just gave our baby away because we did not want him or her. Giving something away typically means you did not want whatever it was. In the adoption world, we use the term “place.” I placed my birth son for adoption. This phrase is much more loving and just sounds better. We placed our baby in the arms of their parents. We placed them in a good home. Placing something somewhere is usually done with care and caution because you have love and concern for what you are placing. In the adoption world, placing our children is done with love and concern.
“Birth moms are just lazy.”
I know someone who used to have this notion about birth moms. He said he thought birth mother simply did not want the responsibility of taking care of a child. Being a birth mother is much more difficult than one might think. Choosing to be a birth mom is choosing an emotionally difficult path, a path far from lazy. I hope not many people think this, but if you do, do not say it to a birth mom. Go talk to one so she can change your mind!
“So, did you not want your baby?”
Yes, people actually ask this. I know for many people, they really cannot comprehend why I, or any other birth mother, would allow someone else to raise their child. The reasons are usually very personal. Every birth mom I have met all wanted their children, but for their personal and very emotional reasons, chose adoption for their baby.
“Do you think your birth son will be mad at you for choosing adoption?”
He might be mad. He might question why I did choose adoption. I also trust his parents. I trust that they will tell him how much I loved him and that I wanted him to have the very best life from the start. Will this ease his questioning? I do not know. I do know that it eased mine. I was never angry with my own birth mother because my parents always told me the great love she had for me. There was never a question or doubt of her love for me. I trust that my birth son will feel the same.
This question is hurtful, but it allows a birth mother to share her testimony of why she chose adoption. We can never determine what the future holds. A birth mom cannot determine the future effects that an adoption will have on a child.
“Can you get your baby back?”
I hate to think that people really do not understand what adoption is. Adoption is much different from foster care. In the foster care system, most children were taken out of the home due to the parents not doing what was best for their child. Yes, they can get their children back after they get things in order and clean up their life. However, adoption is different. An expectant parent chooses a family for their child and when that child is born, the birth mother then signs all parental rights away to the new parents. It varies by state, but usually the birth mother only has a limited amount of time to change her mind (in California it is 24 hours). I do not think this question is appropriate to ask any birth mother. The choice she made was not easy and a question like this may generate painful feelings.
What Not to Ask or Say to an Adoptee
“Do you know your real parents?”
I love my birth mother and she is just that: my birth mother. My mom is the woman that raised me–my adoptive mother. So, to ask an adoptee if they know their real parents is thoughtless and can be hurtful. Many adoptees do not even know their birth parents.
“You know your birth mom didn’t love you.”
Someone once said this too me. It was someone who did not know me but knew I was adopted. I did not let this comment get to me because I knew without any doubt that my birth mom did love me. I knew because my parents had told me and my birth mother had written me a letter when I was just hours old. A comment like this is completely horrible and heartless. Yes, my birth mother loved me. That is why she chose life for me and gave me a wonderful family.
“All adopted kids are messed up.”
I have heard that my siblings and I are the exception to this rule because someone knows one family who has one adopted kid that has some problems. This must mean all adopted kids are messed up right? How many families do you know who have biological children who are “messed up”? I know plenty! Therefore, I do not think there is any merit to this comment. The child might have had problems if he or she was not adopted. Maybe their bad behavior is just their personality. If children are adopted at an older age and have experienced traumatic things, then yes, they may have some issues to be addressed. However, categorizing all adoptees into being “messed up” is wrong and hurtful.
These comments and questions are just a few of the things not to say to a birth mom or adoptee. I picked these particular comments and questions because they have been directed at me at some point. Just remember: When speaking to an adoptee or birth mom, it is okay to ask questions. I am an open book! However, be sensitive. I know many people are curious, but maybe the adoptee or birth mom is not ready to answer certain questions. Let certain things stay personal. If the adoptee or birth mom chooses to share, they will.
Comments


#### Halting Callbacks
* **Rails 4:** Returning `false` halted a callback
* **Rails 5:** Only `throw(:abort)` halts a callback
#### Passing AR records into find/where
* **Rails 4:** `User.find(user) => user`
* **Rails 5:** `User.find(user) => Error`
* **Rails 5:** `User.find(user.id) => user`
Controller specs keyword arguments
# Rails 4
get :index, params, headers
# Rails 5
get :index, params: params, headers: headers
Migrations
In Rails 5 migrations need to have the version of Rails they were
written in specified.
class MyMigration < ActiveRecord::Migration[4.2]
...
#### Parameters to unsafe hash
* **Rails 4:** Parameters subclassed from `HashWithIndifferentAccess`
* **Rails 5:** No longer true, calls to `to_hash` without permitting params will error
* **Rails 5:** Especially noteworthy on forms and Virtus
#### Bug in .empty? on relations with table aliases
* Bug is fixed in Rails 5.2
* For now avoid empty in production and coerce to arrays in tests
#### Evoke rails/rake
* **Rails 4:** `rake db:migrate`
* **Rails 5:** `rails db:migrate`
#### \*_action over \*_filter
### Questions?
#### Extra Resources
* https://github.com/ShippingEasy/ship-it/wiki/Rails-5-Upgrade
* http://guides.rubyonrails.org/5_0_release_notes.html
* http://guides.rubyonrails.org/5_1_release_notes.html


--- layout: post title: Modified Building Violations update process date: '2015-03-07T18:01:22-06:00' author: Open Data Portal Team categories: - Open Data - Data Portal tags: - 22u3-xenr - improvement ---
We have upgraded the mechanism that updates the Building Violations dataset every day. The main visible effect of this change is that the record counts for 2013-2015 have increased by about 80 percent. We found some modifications and new building violations were not updating or being correctly added on the portal but are now doing a complete re-query of the source database and complete replace of the dataset each time we update.
The last version of the dataset before the change in update mechanism is visible at https://data.cityofchicago.org/id/f4ic-vjbw. This link may expire at some point so if you need the records, we recommend extracting and saving them.


{{stats.count}}/{{stats.total}} indicators areis rated.
No indicator has been rated for this {{item}}.
{{stats.minCount}} indicators areis rated


Posted: 2016-04-20
, Modified: 2016-04-20
Tags: none
Notes from Vershynin’s course Geometric functional analysis.
Functional analysis and convex geometry
Theorem (Approximate Caratheodory): Let \(x\in \conv A\). There exist \(N\) points \(x_i\in A\) such that \[\ve{x-\rc N\sumo iN x_i}\le \fc{r(A)}{N}.\] (Given \(x\) as a linear combination of elements of \(A\), there is a probabilistic algorithm to find this combination.)
(Here, \(r(A)\) is the radius of \(A\).)
Proof. If \(x=\sum a_i z_i\), sample by \(a_i=\Pj(x=z_i)\). By Chebyshev, \[\E\ve{x-\rc N \sumo jN z_j}\le \fc{r(A)^2}{N}.\]
Remark: This can be adapted to \(L_p\).
Banach-Mazur distance
(Skipped.)
Concentration of measure and Euclidean sections of convex bodies
Observation: Convex bodies like spheres tend to have a lot of mass concentrated in the “middle”. This is a very powerful observation: concentration of measure for a set implies concentration for Lipschitz functions on the set.
Johnson-Lindenstrauss says that a random projection approximately preserves distances. A sophisticated way to look at this is the following. We can view this as a concentration result: the norm of the projection of \(x\) is a Lipschitz function; it must be concentrated around its mean.
A powerful application of concentration of measure is Dvoretzky’s Theorem (big generalization of JL?), which find large Euclidean-like subspaces in general Banach spaces. (What’s the relationship between the \(\log\) here and in Dvoretzky?)
Concentration of measure
For a set \(A\) let \(A_\ep\) denote the \(\ep\)-neighborhood.
Sphere
- (Isoperimetric inequality) Among all sets with given measure, spherical caps minimize \(\si(A_\ep)\). (Proof?)
- Let \(\si\) be the measure on the sphere. For any measurable \(A\subeq \bS^{n-1}\) with \(\si(A)\ge \rc 2\), \(\si(A_\ep)\ge 1-e^{-\fc{n\ep^2}2}\). Proof:
- For the equator \(E\), \(\si(E_\ep)\ge 1-2e^{-\fc{n\ep^2}{2}}\). Use isoperimetric inequality.
- Corollary: For \(f:\bS^{n-1}\to \R\) 1-Lipschitz, letting \(M\) be the median, \[\si(|f-M|\le \ep) \ge 1-2e^{-\fc{n\ep^2}{2}}.\] This remains true if \(M\) is replaced by the mean.
Gaussians
Consider \(\R^n\) with measure \(\ga\) given by \(N(0,I)\).
- (Isoperimetric inequality) Among all sets with given measure, halfspaces minimize \(\si(A_\ep)\).
- If \(\ga(A)\ge \rc2\), then \(\ga(A_t)\ge 1-e^{-\fc{t^2}{2}}\).
- Corollary: For \(f:\R^{n-1}\to \R\) 1-Lipschitz, letting \(M\) be the median, \[\ge(|f-M|\le \ep) \ge 1-2e^{-\fc{n\ep^2}{2}}.\] This remains true if \(M\) is replaced by \((\E|X|^p)^{\rc p}\) for any \(p\ge 1\).
Johnson-Lindenstrauss
See JL.
Theorem (Johnson-Lindenstrauss): Let \(|X|=n\), \(X\) a subset of Hilbert space. For any \(\ep>0\), there exists a \((1+\ep)\)-embedding of \(X\) into \(\ell_2^k\), \(k\ge \fc{C}{\ep^2}\ln n\).
Proof. Project randomly using gaussians. We can directly bound the concentration, but let’s be more sophisticated.
- Project randomly using gaussians. Let \(f:\R^{k\times n}\to \R\) be defined by \(G\mapsto \ve{Gx}_2\). This is 1-Lipschitz. Use concentration of measure for Gaussian space, and then union bound.
- Take a uniformly random projection (ise the Grassmannian, or equivalently, take a uniform rotation followed by a fixed projection). Let \(f:\bS^{n-1}\to \R\) be defined by \(x\mapsto \ve{Tx}_2\). Use concentration of measure for the sphere.
Dvoretzky’s Theorem
Statements
Dvoretzky finds large Euclidean subspaces.
- Theorem (General Dvoretzky): Let \[M(K) = \int_{\bS^{n-1}}\ve{x}\,d\si(x).\] There exists a subspace \(E\), \(\dim E=c(\ep) nM^2\) such that \[ \ve{x}\in [1-\ep,1+\ep] M \ve{x}_2.\] We can take \(c(\ep) = C\fc{\ep^2}{\ln \rc{\ep}}\).
- Theorem (Dvoretzky): Let \(X\) be \(n\)-dimensional Banach. Given \(\ep>0\) there exists a subspace \(E\) of \(X\) of dimension \(k=k(n,\ep)\to \iy\) as \(n\to \iy\), such that \(d(E,\ell_2^k)\le 1+\ep\).
- Theorem (Geometric Dvoretzky): Let \(K\) be a symmetric convex body in \(\R^n\). Given any \(\ep > 0\), there exists a section \(K \cap E\) of \(K\) by a subspace \(E\) of \(\R^n\) of dimension \(k = k(n, \ep)\to \iy\) as \(n \to \iy\) such that \(E \subeq K \subeq (1 + \ep)\mathcal E\) for some ellipsoid \(\mathcal E\).
There is an alternative formulation for gaussian space, which is often computationally easier.
Define \(\ell_X:=\pa{\int_{\R^n} \ve{x}^2\,d\ga_n(x)}^{\rc 2} = (\E\ve{g}^2)^{\rc 2}\). This is off from \(M\) by a factor of \(\sqrt n\): \[ \ell_X\sim \sqrt n M_X.\] Thus we can replace \(M_X\) by \(\fc{\ell_X}{\sqrt n}\) in the bound.
Proofs
- Show it suffices to bound on \(\ep\)-nets, and bound the size of the smallest \(\ep\)-net.
- Let \(\mathcal{N}_\de\) be a \(\de\)-net of \(S_X\). Then
\[\begin{align}
\ve{T}&\le \rc{1-\de} \sup_{x\in \mathcal{N}_\de}\ve{Tx}\\
\inf_{y\in S_X} &\ge \inf_{x\in N} - \de\ve{T}.
\end{align}\]
Applying this to the identity map from \(\ved_2\) to \(\ved\), obtain: if \(\ve{x}\in [1-\ep,1+\ep]M\) for all \(x\in \cal N\), then for all \(x\in \bS^{n-1}\), \[\ve{x} \in \ba{1-\ep-2\de, \pf{1+\ep}{1-\de}M}.\]
- There is an \(\ep\)-net of size \(\pa{1+\fc 2\ep}^n\).
- General Dvoretzky: Apply concentration of measure to a fixed vector \(x\) of the function \(\ved\). Union bound over a \(\de\)-net and approximate the sphere by the \(\de\)-net using 1.
- (Aside) We can calculate \(\ell_X\) for many spaces. Standard concentration bounds give
\[\begin{align}
1\le p\le 2\implies \ell_{\ell_p^n} &= c(\ep) n&\implies k(\ell_p^n) &\ge c(\ep)n\\
q\ge 2\implies \ell_{\ell_q^n} &= c(\ep) q n^{\fc 2q}&\implies k(\ell_q^n) & \ge c(\ep)q n^{\fc 2q}\\
\ell_{\ell_{\iy}^n} & c\sqrt{\ln n} &\implies k(\ell_\iy^n) & \ge c(\ep)\ln n.
\end{align}\]
- We show \(k(\ell_\iy^n) \asymp\ln n\). Spherical caps!


Source code for hemlock.clients.hemlock_runner
#!/usr/bin/env python
#
# Copyright (c) 2013 In-Q-Tel, Inc/Lab41, All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""
This module gets all needed credentials in preparation for getting data from
clients and into Hemlock's metadata/data store.
Created on 26 August 2013
@author: Charlie Lewis
"""
from hemlock_debugger import Hemlock_Debugger
import hemlock_base
import ast
import datetime
import MySQLdb as mdb
import sys
import time
[docs]class Hemlock_Runner():
"""
This class is responsible for pulling out the credentials from the Hemlock
server for both the client system and the Hemlock metadata/data store.
"""
def __init__(self):
self.log = Hemlock_Debugger()
[docs] def mysql_server(self, debug, server, user, pw, db):
"""
Connects to the Hemlock MySQL server to get an instance for retrieving
credentials.
:param debug: instance of
:class:`~hemlock.clients.hemlock_debugger.Hemlock_Debugger`
:param server: server address of the Hemlock MySQL server
:param user: user account to connect to the Hemlock MySQL server
:param pw: password of the user account
:param db: database to connect to in the Hemlock MySQL server
:return: returns an instance of the mysql connection
"""
# DEBUG
# connect to the mysql server
try:
m_server = mdb.connect(server, user, pw, db)
except:
print "MySQL server failure"
sys.exit(0)
return m_server
[docs] def get_creds(self, debug, m_server, client_id, aes_key):
"""
Retrieves the credentials for both the client system as well as the
Hemlock server that are stored in the Hemlock MySQL server.
:param debug: instance of
:class:`~hemlock.clients.hemlock_debugger.Hemlock_Debugger`
:param m_server: instance of MySQL connection
:param client_id: uuid of the client to get credentials for
:param aes_key: AES key for decrypting the stored credentials
:return: returns two dictionaries for the client system and Hemlock
server credentials
"""
# DEBUG
# get client_dict
cur = m_server.cursor()
data_action = "SELECT AES_DECRYPT(credentials, '"+aes_key+"') from clients where uuid = '"+client_id+"'"
cur.execute(data_action)
results = cur.fetchall()
client_dict = ast.literal_eval(results[0][0])
# DEBUG
# get server_dict
cur = m_server.cursor()
data_action = "SELECT AES_DECRYPT(credentials, '"+aes_key+"') from hemlock_server"
cur.execute(data_action)
results = cur.fetchall()
server_dict = ast.literal_eval(results[0][0])
return client_dict, server_dict


Dr-FiStCaKe wrote:http://www.team-des-fra.fr/CoM/bf3.php?
Could this be melded into the BBL some where so we can see at a glance what they person C-o-m number is. I have found this to be very helpful for sorting out hackers and damage modders quickly when adming a server. normally i have to cut and paste there name from battlelog then go to this page. if it was melded to bbl, it would be great. Can it be done? Thanks for reading :)


Remembering the Cosmos Flower * * (out of * * * * )
Directed by Junichi Suzuki. Cast: Akane Oda, Megumi Matsushita, Mari Natsuki. 1999 - 103 minutes (in Japanese w/English Subtitles). Not Rated (equivalent of a PG rating for mature themes). Reviewed July 19, 1999.
Japanese filmmaker Junichi Suzuki's "Remembering the Cosmos Flower" is such a well-meaning drama that you almost feel guilty criticizing it, but, ultimately, the movie paints a decidedly syrupy, manipulative picture on the subject of the AIDS virus. Foreign films, more often than not, are far more intelligent than American films, because it is often said that foreigners write about adults while Americans write about children. With "Remembering the Cosmos Flower," this theory unfortunately doesn't hold up, as you can always see Suzuki straining to get the viewer to shed some tears. I almost did once; I admittedly felt myself welling up all so slightly, but only because my tear ducts felt as if they were being violently yanked about.
After being away for seven years in South America, 15-year-old Akiko (Akane Oda) returns to her hometown in Japan with her mother. While overseas, she and her father were in an automobile accident; he died, while she was given a blood transfusion, as well as AIDS. Word spreads quickly through the Japanese town as many parents start threatening to keep their children out of school if Akiko attends, oblivious to the reality of AIDS, which is that it can't be passed through the air or simple touch. Akiko and her caring mother (Mari Natsuki) are strong-willed people, and things brighten up when Akiko is reunited with her childhood friend, Natsumi (Megumi Matsushita), who is also cautious at first until she is educated more on the disease and realizes how much pain Akiko is going through, both physically and emotionally. Akiko knows she isn't going to be living for much longer and is terrified of death, but keeps her chin held high and desperately tries to not let anything negative affect her. As the town's festival approaches, Akiko and Natsumi plan out a comedy skit to perform in the school talent show, but when Akiko falls ill in the hospital, Natsumi is urged to carry on their original plans alone.
"Remembering the Cosmos Flower" is mature and realistic when it deals with Akiko and Natsumi's close friendship, as well as the portrayal of how everyone deals with her inevitable death, but along the way Suzuki has felt the need to include several melodramtic scenes that ring with a resounding falseness. One such scene comes toward the end, when Natsumi goes on-stage to perform their comedy act alone and is greeted by the audience with several prejudiced remarks about Akiko. Standing up there in front of everyone, Natsumi makes a heartfelt speech defending her friend and educating everyone on the seriousness of AIDS, which concludes with half the audience crying and everyone clapping. Film scenes like this always rub me the wrong way because they are so far-strung from reality, and it doesn't help that the movie seems outdated. Ten or fifteen years ago I may have believed this story because AIDS was a relatively new disease that not many people knew much about. Coming in the late-'90s, however, the characters that inhabit the town in this film apparently know nothing about AIDS and react in a ludicrous manner that I couldn't believe for a second.
On the positive side, the performances by the two leads are winning and poignant. Akane Oda effectively presents Akika as a girl coping day by day with her disease, even amidst all of the negativity that is thrown at her and her mother. Megumi Matsushita is equally superb as Natsumi, Akika's best friend who gradually studies up on AIDS and learns that Akika is just like everyone else, except that she has a far more difficult battle ahead of her for the rest of her life. Natsumi's conflicted relationship with her stubborn father is well-done also, as he constantly is trying to stop his daughter and Akika from spending time together, and in one of the film's more truthful moments, Natsumi blows up at her dad for being so narrow-minded under the circumstances.
"Remembering the Cosmos Flower" cannot be faulted for its superior actors or some of the memorable relationships that are developed here, but it is an otherwise mechanical motion picture, one that is both predictable, in a sappy sort of way, and out-of-date. Its heart is obviously in the right place, but as a portrait of a closed-up, uneducated society on the reality of the very serious AIDS virus, it comes at least a decade too late.
- Copyright 1999 by Dustin Putman Http://hometown.aol.com/FilmFan16/index.html
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Create Water. You create up to 10 gallons of clean water within range in an open container. Alternatively, the water falls as rain in a 30-foot cube within range, extinguishing exposed flames in the area.
D estroy Water. You destroy up to 10 gallons of water in an open container within range. Alternatively, you destroy fog in a 30-foot cube within range.
A t Higher Levels. When you cast this spell using a spell slot of 2nd level or higher, you create or destroy 10 additional gallons of water, or the size of the cube increases by 5 feet, for each slot level above 1st.


3 Things To Know About OPEC’s Latest Oil Forecast
by Jude ClementeOPEC’s annual World Oil Outlook 2019 came out this past week and as usual offers some keen insight into the global oil market. Let me make some key points on it.
Oil leads and accounts for 35% of global energy supply, and OPEC supplies 35% of the world’s oil.
After some hesitation, OPEC’s annual outlook has become more bullish on U.S. shale oil production.
In fact, OPEC now expects that the U.S. shale boom will continue, and our light tight oil will easily be adding the majority of new production over the next five years - the main bearish factor for pricing.
Even from 2019-2030, U.S. tight oil output will balloon by another 5.3 million b/d to nearly 17.5 million b/d.
And a great article this past week from NYT also warned market bulls about Canada, Brazil, Norway, and Guyana.
A “flood of oil is coming” from these four that will add an additional ~2 million b/d of supply in 2020 and 2021, perhaps enough to totally cover new global demand.
No wonder then that OPEC is feeling the pressure to not just extend its 1.2 million b/d production cut deal beyond March 2020, but to actually deepen it.
We all know about the ongoing importance for oil in transportation, about as irreplaceable a fuel as we have.
Road transport accounts for about 45% of the world’s oil demand and lacks a significant substitute.
Electric cars simply aren’t realistic: the average Tesla buyer, for instance, has a household income of $400,000 per year - more than six times the national average.
Indeed, some 90 million oil cars are sold globally per year.
Just look around you, here in the U.S., where oil powers some 97% of transportation.
At ~9.6 million b/d, U.S. gasoline usage remains higher than ever.
But it’s really petrochemicals that will quietly maintain “the oil age” for a lot longer than many are telling you.
Often ignored, not just inherent to renewable energy manufacturing and development, oil is integral to literally over 6,000 products that we humans rely on everyday.
Road transport and petrochemicals explain why OPEC estimates that a $10.6 trillion investment is required in the global oil upstream, midstream, and downstream sectors over the next 20 years to meet non-stop rising demand.
Americans still consume four times more oil than Chinese and 18 times more than Indians.
As such, the growth opportunities for oil usage in China and India are immense.
These two have accounted for 55% of new oil demand since 2010 alone.
China’s “down years” are when 26 million oil cars are bought.
India’s oil demand is expected to double over the next two decades.
Looking forward, China and India will combine to add ~9-10 million b/d of incremental oil demand over the next 20 years, compensating for any potential consumption declines in the developed OECD nations.


{% include 'header.html' %}
A Mini-Hack is a shorter and generally less intense form of a hackathon. In this case we are going to holding the event for 12 hours with 10 or so hours of programming and a couple of hours for setup and presentations. Where a full hackathon generally has judges and a lot of sponsors. This hackathon is going to have a very few dedicated sponsors and no judges. Just a day to come out and hack. Food, drink, and internet will be provided.
Something different about this hack compared to the Valley Hackathon is that we are going to have some pre-defined problems for you to work on. You don't have to do them, but they will provide easy targets for those who don't want to plan something larger. Since we are in the valley we are going to target some agriculture related projects.
Really this is just a day for the community to get together and hack together. So come on out bring your laptop and have fun!
The first place team (two participants per team): Will each receive a CODE Keyboard from WASD - https://codekeyboards.com/
Judging will be by audience vote.
NO EXPERIENCE IS NECESSARY, PLEASE COME AND ENJOY A DAY OF PROGRAMMING WITH US. We are limiting the signups to 10 teams of two so signup early. Teams will be taken before individual signups so find a partner and drop us a line. If we have open spots individuals will be allowed, but with only 10 team openings it will likely fill up quickly.
If you want to just come out and hang with us, write some code, and not present anything that is great too. Just let us know you are coming so we can plan for food.
To sign up email: Nathan Bunney at<EMAIL_ADDRESS>| Saturday May 30, 2015 | |
|---|---|
| 7:00am | Check in, rules, safety briefing, continental breakfast |
| 7:30am | Hackathon begins |
| 10:00am | Snacks arrive |
| 12:00pm | Pizza arrives |
| 5:30pm | Hack ends |
| 5:45pm-7:00pm | Presentations |
Ultimately you can do whatever you would like to do for a project but we are theming this event toward agricultural apps. Projects can be pure software or they can be software + hardware. Want to build a drone that does something? Want to use a Raspberry-Pi, Arduino, or Tessel in your project? Go for it! In keeping with the theme here are some ideas for projects.


mosquitto_sub
A simple MQTT version 3.1.1 client that will subscribe to topics and print the messages that it receives.
More information: home page
- Subscribe to the topic `sensors/temperature` information with Quality of Service (`QoS`) set to 1. (The default hostname is `localhost` and port 1883):
mosquitto_sub -t sensors/temperature -q 1
- Subscribe to all broker status messages publishing on `iot.eclipse.org` port 1885 and print published messages verbosely:
mosquitto_sub -v -h "iot.eclipse.org" -p 1885 -t \$SYS/#
- Subscribe to multiple topics matching a given pattern. (+ takes any metric name):
mosquitto_sub -t sensors/machines/+/temperature/+


Disclaimer / Privacy Notice
TimesUP has made reasonable efforts to ensure the accuracy of the information throughout this website. However, TimesUP reserves the right to make appropriate changes in information found on this website.
Nothing contained in this website shall be construed as contractual rights. TimesUP has many links to other websites. These include links to websites operated by other government agencies, nonprofit organizations and private businesses. TimesUP does not endorse any content or linked materials found on websites or web services provided by and/or developed by TimesUP.
When linked to another site, you are no longer on the TimesUP website and this Privacy Notice will not apply. When linked to another website, you are subject to the privacy policy of that new site. TimesUP does not warrant the accuracy, reliability or timeliness of any information published by this system, nor endorses any content, viewpoints, products, or services linked from this system, and shall not be held liable for any losses caused by reliance on the accuracy, reliability or timeliness of such information. Portions of such information may be incorrect or not current.
Any person or entity that relies on any information obtained from this system does so at their own risk.


Control Panel
- See History Log
- Set Schedule
- Share live location
location_on
History
Schedule
Share
Test 3
//


The required
attribute
is a boolean attribute.When present, it specifies that an input field must be filled out before submitting
the form.
Note: The required attribute works with the following input types: text, search, url,
tel,
email, password,
date pickers, number, checkbox, radio, and file.
Example:
An HTML form with a required input field:
<form action="/action_page.php">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
<input type="submit">
</form>


Follow Senator Wicker on social media & share this game with friends!
While celebrating Independence Day, remember that our freedoms weren’t handed to us and that they came through great sacrifice! I wish you all a great Independence Day!
Match each part of the National Anthem to its match!


Class SenseSource
Represents a source location to be used in a SenseMap. One would typically create these and call SenseMap.AddSenseSource with them, and perhaps retain a reference for the sake of moving it around or toggling it on-off. The player might have one of these that follows it around if SenseMap is being used as a lighting map, for instance. Note that changing values such as Position and Radius after the source is created is possible, however changes will not be reflected in any SenseSources using this source until their next Calculate call.
Inheritance
Inherited Members
Namespace: GoRogue.SenseMapping
Assembly: GoRogue.dll
Syntax
public class SenseSource
Constructors
| Improve this Doc View SourceSenseSource(SourceType, Coord, Double, Distance, Double)
Constructor. Takes all initial parameters, and allocates the necessary underlying arrays used for calculations.
Declaration
public SenseSource(SourceType type, Coord position, double radius, Distance distanceCalc, double intensity = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| SourceType | type | The spread mechanics to use for source values. |
| Coord | position | The position on a map that the source is located at. |
| System.Double | radius | The maximum radius of the source -- this is the maximum distance the source values will emanate, provided the area is completely unobstructed. |
| Distance | distanceCalc | The distance calculation used to determine what shape the radius has (or a type implicitly convertible to Distance, eg. Radius). |
| System.Double | intensity | The starting intensity value of the source. Defaults to 1.0. |
SenseSource(SourceType, Coord, Double, Distance, Double, Double, Double)
Constructor. Creates a source whose spread is restricted to a certain angle and span.
Declaration
public SenseSource(SourceType type, Coord position, double radius, Distance distanceCalc, double angle, double span, double intensity = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| SourceType | type | The spread mechanics to use for source values. |
| Coord | position | The position on a map that the source is located at. |
| System.Double | radius | The maximum radius of the source -- this is the maximum distance the source values will emanate, provided the area is completely unobstructed. |
| Distance | distanceCalc | The distance calculation used to determine what shape the radius has (or a type implicitly convertible to Distance, eg. Radius). |
| System.Double | angle | The angle in degrees that specifies the outermost center point of the cone formed by the source's values. 0 degrees points right. |
| System.Double | span | The angle, in degrees, that specifies the full arc contained in the cone formed by the source's values -- angle/2 degrees are included on either side of the cone's center line. |
| System.Double | intensity | The starting intensity value of the source. Defaults to 1.0. |
SenseSource(SourceType, Int32, Int32, Double, Distance, Double)
Constructor. Takes all initial parameters, and allocates the necessary underlying arrays used for calculations.
Declaration
public SenseSource(SourceType type, int positionX, int positionY, double radius, Distance distanceCalc, double intensity = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| SourceType | type | The spread mechanics to use for source values. |
| System.Int32 | positionX | The X-value of the position on a map that the source is located at. |
| System.Int32 | positionY | The Y-value of the position on a map that the source is located at. |
| System.Double | radius | The maximum radius of the source -- this is the maximum distance the source values will emanate, provided the area is completely unobstructed. |
| Distance | distanceCalc | The distance calculation used to determine what shape the radius has (or a type implicitly convertible to Distance, eg. Radius). |
| System.Double | intensity | The starting intensity value of the source. Defaults to 1.0. |
SenseSource(SourceType, Int32, Int32, Double, Distance, Double, Double, Double)
Constructor. Creates a source whose spread is restricted to a certain angle and span.
Declaration
public SenseSource(SourceType type, int positionX, int positionY, double radius, Distance distanceCalc, double angle, double span, double intensity = 1)
Parameters
| Type | Name | Description |
|---|---|---|
| SourceType | type | The spread mechanics to use for source values. |
| System.Int32 | positionX | The x-value for the position on a map that the source is located at. |
| System.Int32 | positionY | The y-value for the position on a map that the source is located at. |
| System.Double | radius | The maximum radius of the source -- this is the maximum distance the source values will emanate, provided the area is completely unobstructed. |
| Distance | distanceCalc | The distance calculation used to determine what shape the radius has (or a type implicitly convertible to Distance, eg. Radius). |
| System.Double | angle | The angle in degrees that specifies the outermost center point of the cone formed by the source's values. 0 degrees points right. |
| System.Double | span | The angle, in degrees, that specifies the full arc contained in the cone formed by the source's values -- angle/2 degrees are included on either side of the cone's center line. |
| System.Double | intensity | The starting intensity value of the source. Defaults to 1.0. |
Properties
| Improve this Doc View SourceAngle
If IsAngleRestricted is true, the angle in degrees that represents a line from the source's start to the outermost center point of the cone formed by the source's calculated values. 0 degrees points right. If IsAngleRestricted is false, this will be 0.0 degrees.
Declaration
public double Angle { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
DistanceCalc
The distance calculation used to determine what shape the radius has (or a type implicitly convertible to Distance, eg. Radius)
Declaration
public Distance DistanceCalc { get; set; }
Property Value
| Type | Description |
|---|---|
| Distance |
Enabled
Whether or not this source is enabled. If a source is disabled when its SenseMap's Calculate function is called, the source does not calculate values and is effectively assumed to be "off".
Declaration
public bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Intensity
The starting value of the source to spread. Defaults to 1.0.
Declaration
public double Intensity { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
IsAngleRestricted
Whether or not the spreading of values from this source is restricted to an angle and span.
Declaration
public bool IsAngleRestricted { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Position
The position on a map that the source is located at.
Declaration
public Coord Position { get; }
Property Value
| Type | Description |
|---|---|
| Coord |
Radius
The maximum radius of the source -- this is the maximum distance the source values will emanate, provided the area is completely unobstructed. Changing this will trigger resizing (re-allocation) of the underlying arrays.
Declaration
public double Radius { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Span
If IsAngleRestricted is true, the angle in degrees that represents the full arc of the cone formed by the source's calculated values. If IsAngleRestricted is false, it will be 360 degrees.
Declaration
public double Span { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Type
The spread mechanics to use for source values.
Declaration
public SourceType Type { get; set; }
Property Value
| Type | Description |
|---|---|
| SourceType |
Methods
| Improve this Doc View SourceToString()
Returns a string representation of the configuration of this SenseSource.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | A string representation of the configuration of this SenseSource. |


This is a walk-through of regex functionality in JS from Programming from A to Z. To use this you'll need to see the results in the browser's JavaScript console.
File issues and view source on github
The function test()
returns true or false if the regex finds a match:
The function search()
returns the index of a match:
The string function match()
returns all the data around a match, the match, any captured groups, the index of the match, and input text.
The function exec()
does exactly the same thing, returning all the data around a match.
The difference between match()
and exec()
becomes apparent when using the global flag. match()
returns an array of all the matches, but does not include the captured groups.
If you want to get all of the captured groups with the global flag, you can use exec()
in a loop. exec()
will return all the data around each match each time it is called and null
when no more matches found.
Another special function you can use with a regular expression is replace()
The first argument is a regular expression to match text you would like to replace.
The replacement text can also include back references to captured groups in the regular expression. A common scenario is matching text between tags, changing the tags, but keeping the same text.
One of the most powerful things you can do with replace()
is pass a callback function as the second argument. Instead of just replacing with a string/regex, you can perform complex logic inside a function to generate a string and return that string as the replacement value. The callback function receives arguments: full match, followed by captured groups.
Finally, in my regular expression notes, I described how the p5 methods split()
and splitTokens
chop a text up into "tokens", separated by a delimiter. From now on, I'll be using the native JavaScript split()
function which is part of the String
object. This split()
function takes a regular expression as an argument — anything that matches that regular expression acts as a delimiter. If the regular expression is contained in a capturing group, the delimiters are included in the returned array.


Although all built-in WAL-logged modules have their own types of WAL records, there is also a generic WAL record type, which describes changes to pages in a generic way. This is useful for extensions that provide custom access methods, because they cannot register their own WAL redo routines.
The API for constructing generic WAL records is defined in access/generic_xlog.h and implemented in access/transam/generic_xlog.c.
To perform a WAL-logged data update using the generic WAL record facility, follow these steps:
state = GenericXLogStart(relation)
— start
construction of a generic WAL record for the given relation.
page = GenericXLogRegisterBuffer(state, buffer, flags)
— register a buffer to be modified within the current generic WAL
record. This function returns a pointer to a temporary copy of the
buffer's page, where modifications should be made. (Do not modify the
buffer's contents directly.) The third argument is a bitmask of flags
applicable to the operation. Currently the only such flag is
GENERIC_XLOG_FULL_IMAGE, which indicates that a full-page
image rather than a delta update should be included in the WAL record.
Typically this flag would be set if the page is new or has been
rewritten completely.
GenericXLogRegisterBuffer
can be repeated if the
WAL-logged action needs to modify multiple pages.
Apply modifications to the page images obtained in the previous step.
GenericXLogFinish(state)
— apply the changes to
the buffers and emit the generic WAL record.
WAL record construction can be canceled between any of the above steps by
calling GenericXLogAbort(state)
. This will discard all
changes to the page image copies.
Please note the following points when using the generic WAL record facility:
No direct modifications of buffers are allowed! All modifications must
be done in copies acquired from GenericXLogRegisterBuffer()
.
In other words, code that makes generic WAL records should never call
BufferGetPage()
for itself. However, it remains the
caller's responsibility to pin/unpin and lock/unlock the buffers at
appropriate times. Exclusive lock must be held on each target buffer
from before GenericXLogRegisterBuffer()
until after
GenericXLogFinish()
.
Registrations of buffers (step 2) and modifications of page images (step 3) can be mixed freely, i.e., both steps may be repeated in any sequence. Keep in mind that buffers should be registered in the same order in which locks are to be obtained on them during replay.
The maximum number of buffers that can be registered for a generic WAL record is MAX_GENERIC_XLOG_PAGES. An error will be thrown if this limit is exceeded.
Generic WAL assumes that the pages to be modified have standard layout, and in particular that there is no useful data between pd_lower and pd_upper.
Since you are modifying copies of buffer
pages, GenericXLogStart()
does not start a critical
section. Thus, you can safely do memory allocation, error throwing,
etc. between GenericXLogStart()
and
GenericXLogFinish()
. The only actual critical section is
present inside GenericXLogFinish()
. There is no need to
worry about calling GenericXLogAbort()
during an error
exit, either.
GenericXLogFinish()
takes care of marking buffers dirty
and setting their LSNs. You do not need to do this explicitly.
For unlogged relations, everything works the same except that no actual WAL record is emitted. Thus, you typically do not need to do any explicit checks for unlogged relations.
The generic WAL redo function will acquire exclusive locks to buffers in the same order as they were registered. After redoing all changes, the locks will be released in the same order.
If GENERIC_XLOG_FULL_IMAGE is not specified for a registered buffer, the generic WAL record contains a delta between the old and the new page images. This delta is based on byte-by-byte comparison. This is not very compact for the case of moving data within a page, and might be improved in the future.


<titlealts>
The <titlealts>
element allows the insertion of alternate titles, such
as titles that should be used in creating a table of contents for navigation or a title
specific to search results. When the <titlealts>
element is absent, the
<title>
element is used for all title purposes.
Category: Basic topic elements


Latent Patters in Activities: A Field Study of How Developers Manage Context
Souti Chattopadhyay, Nicholas Nelson, Yenifer Ramirez Gonzalez, Annel Amelia Leon, Rahul Pandita, Anita Sarma.
In order to build efficient tools that support complex programming tasks, it is imperative that we understand how developers program. Important gaps exist in our knowledge about (i) the role that context plays in supporting smaller units of tasks, (ii)the relationship that might exist among these smaller units, and (iii)how context flows across them.
The goal of this research is to gain a better understanding of how developers structure their tasks and manage context through a field study of ten professional developers in an industrial setting.
Our analysis reveals that developers decompose their tasks into smaller units with distinct goals, that specific patterns exist in how they sequence these smaller units, and that developers may maintain context between those smaller units with related goals.


in the HTML code add the image
<img id="sample" src="test.png" style="position:fixed;bottom: 0px;left:0px;margin: 0px">
and add a simple script
$("#sample").shakker({x: true, y: false});
Note that:
- It's a jquery plugin, it needs jquery!
- It works on images only
- Right now it doesn't work on window resize, but I'll work on that only if you use it!
- Available on github at: mebjas/


Hello, Code School!
Node.js
Working with API's
SQL
noSQL
Express
React
Developer Tools
Version Control / GitHub


Factory API
Element
createFactory(
type: function|string|Element
): (...args) => h(type, ...args)
Client
createFactory(
type: {...}
): object
A client for the DOM is shipped by default, however the createFactory
API allows us to also create different clients that might target different platforms.
The creation of a client is assumed when an object argument supplied to createFactory
does not satisfy the conditions for an element factory.
This object should implement the methods it needs to render to the desired target enviroment.
A polyfill for setTimeout
is required if the platforms runtime does not provide an implementation.
setHost
Called when mounting to a host container. Use this to setup references that you can retrieve in getHost.
setHost: (element: Element, node: object) => void
setNode
Called when assigning an elements node. Use this to set references to instances created in createElement, createText and createEmpty
setNode: (element: Element, node: object) => void
setContent
Called when initialiazing a mount container. Use this to setup the native view before a mount.
setContent: (parent: Element) => void
setText
Called when updating a text nodes value has changed. Use this to update a native text instance value.
setText: (element: Element, value: string) => void
setEvent
Called when assigning an elements event listeners. Use this to setup native event listeners. To dispatch events call Element.handleEvent
with an Event object. The type
of the event is the only required property in the event object.
setEvent: (element: Element, type: string) => void
setProps
Called when setting an elements individual properties. Use this to update or initialize properties.
setProps: (element: Element, name: string, value: any, xmlns: string) => void
getHost
Called when retrieving a host container. Use this to retrieve host elements assigned in setHost.
getHost: (node: node) => Element
getNode
Called when retrieving an elements node. Use this to retrieve references to instances assigned in setNode.
getNode: (element: Element) => Node
getDocument
Called when retrieving a default container. Use this to setup a default container when a container is not explicity passed to render
getDocument: () => Node
getTarget
Called when retrieving a node from an event object.
getTarget: (event) => Node
getType
Called when retrieving an element namespace, before createElement, createText or createEmpty. Use this to setup a new element namespace based on an elements type or props.
getType: (element, xmlns) => string
getProps
Called when retrieving an element props, after createElement but before setProps.
getProps: (element) => object
getPortal
Called when retrieving a portal instance. Use this to query or find a portal instance.
getPortal: (element) => node
getQuery
Called when hydrating a container. Use this to find the existing instance.
getQuery: (
element: Element,
parent: Element,
previous: Element,
next: Element
) => node
isValidHost
Called when validating a host container. Use this to determine if the container has a host element associated with it.
isValidHost: (node: object) => boolean
isValidNode
Called when validating a instance object.
isValidNode: (node: object) => boolean
isValidEvent
Called when validating an event object.
isValidEvent: (event: object) => boolean
removeNode
Called when removing an element, text or empty instance.
removeNode: (element: Element, parent: Element) => void
insertNode
Called when inserting an element, text or empty instance.
insertNode: (element: Element, sibling: Element,parent: Element) => void
appendNode
Called when appending an element, text or empty instance.
appendNode: (element: Element, parent: Element) => void
createElement
Called when creating a element instance.
createElement: (element: Element) => Node
createText
Called when creating a text instance.
createText: (element: Element) => Node
createEmpty
Called when creating a empty instance.
createEmpty: (element: Element) => Node
createExport
Called when creating a client, before createFactory returns a clients exports. Use this to define the clients public API.
createExport: (
exports: object,
Element: function,
getComponentChildren: function,
getComponentElement: function,
getElementDefinition: function,
mountComponentElement: function,
invokeErrorBoundary: function
) => object


Header Setting
Match Path:
MatchType:
File Match
Directory Match
Redirect:
Redirect 301
Redirect 302
410 Gone
Redirect Host:
Start with "http://" or "https://". Leaving blank means same host
Redirect Path:
New Header
Cancel


The initial conditions of the particle are given by specifying the initial location (R,ϕ,Z), initial parallel velocity v∥, and the magnetic moment μ (which acts as a parameter since μ is exactly conserved). In some cases, we prefer to specify the initial velocity in terms of the initial kinetic energy 𝜀 and the initial pitch angle 𝜃 (the include angle between velocity and the local magnetic ﬁeld). The relation between (𝜀,𝜃) and (v∥,μ) is given by
|
| (53) |
and
|
| (54) |
The relation between (𝜀,𝜃) and the normalized quantities (μ,v∥) is given by
|
| (55) |
and
|
| (56) |
There are three constants of motion for the guiding center motion, namely, the canonical toroidal angular momentum Pϕ, the magnetic moment μ, and the total kinetic energy 𝜀. Examining how well the kinetic energy 𝜀 and the toroidal angular momentum Pϕare conserved provides a way to evaluate the accuracy of the numerical code. The kinetic energy 𝜀 and toroidal angular momentum Pϕ are deﬁned by
|
| (57) |
|
| (58) |
Deﬁne 𝜀n = mvn2 and Pϕn = ZeBnLn2, then the normalized forms of 𝜀 and Pϕ are written as
|
| (59) |


Welcome to my curriculum
About me
I'm Henrique Sartori Siqueira a Computer Engineering student at Pontifícia Universidade Católica of Campinas (PUCCAMP).
Languages
- Portuguese (native)
- English (Intermediate)
- Spanish (Basic)
Programming languages
- Assembly X86
Recent Github activity
My social medias & Contact


Duration: December 2016- January 2017
Team: Ashwath Anand, Jordan Lawler, Robbie Whiting, J.P.Zundel
My role: creative technologist, research facilitator
Tech stack: Messenger platform, Watson knowledge studio, node.js, express
Team project at Junior to build a messenger based, AI driven chatbot concierge for delegates at a conference. I have seen this project from inception to its current state.
To start off the project, I facilitated a workshop with the client to understand their deeper problems and insights. After a synthesis of the insights from the workshop, we were able to draft up a feature set for the product.
For the feature presentation I built seven chatbot flows on Facebook's messenger platform to prototype what the manifestation of those features would look like.
I am not allowed to share this work yet but here is a semi blurred out screenshot of one of the chatbot flows.
I am glad to show the messenger chatbot flows in person on request.
Copyright 2017 Ashwath Anand


Covid Articles
Built by following
biorxiv
and
arxiv-sanity
to help with influx of papers on COVID-19, currently indexing {{ gvars.num_papers }} papers.


"Angel's Ladies"
Mack Moore, a cemetery kingpin in Eugene, Oregon, and his second wife, Angel, a widowed funeral director, sold it all and moved to the frontier hamlet of Beatty, Nevada, located halfway between Death Valley and the Nuclear Weapons Testing Range. The couple purchased the local brothel, Fran's Star Ranch, and shifted careers from caring for the dead to servicing the living in the documentary film, "Angel's Ladies."
The idea of "Angel's Ladies" is an interesting one. A middle aged couple, he 70 and she 55, pick up their long-established roots in the damp northwest and plunk themselves down right next to the hottest place on earth to run a cat house. There is ready made interest in why they did it, what their plans are, who are the women working for the Moores and why are they there.
Things start off in a pretty straightforward manner with a succession of talking heads and panoramic view of the scrub brush of the desert and the ticky-tacky brothel building. But, it becomes obvious very fast that the video makers have not learned their craft too well. In this day of inexpensive, high quality video and audio equipment, there is no reason for poor camera work and bad sound from a so-called professional filmmaker. Both of these quality problems are rampant through the entire film. I have seen local cable access programs that have better production values. The cheesy production also extends to the lousy use of music to bridge many moments in the documentary.
The subject matter is intriguing, but the execution of it is not. What starts out as a document of the Moores and their unusual business in the middle of nowhere, Nevada, turns into a rather strange tale of misperceptions, labor problems and Angel taking an active part in servicing the brothel's clients. Moore, at one point, claims that he never "dates" his girls. The ladies counter his claim saying, sure, he always hits on them. Mack and Angel say that the women are totally loyal to the couple. Then, we hear about the labor problems from the hookers. As the docu progresses, we become increasingly confused as to the point of the film and why we are here.
The docu glosses over any in-depth investigation, like the impact of brothels on the local community. This is glossed over with a few interview shots of town officials telling us that the brothel tax pays for the town's emergency services and it's all a good thing. We don't get into the heads of Mack and Angel (nor would I want to be) or really learn much about the why and wherefore of the women working at Angel's Ladies Brothel. When the film ended, I wondered about the point of the film and the time I wasted watching it.
I give "Angel's Ladies" a D-.
For more Reeling reviews visit www.reelingreviews.com
<EMAIL_ADDRESS><EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Register new user
Hooray, you have been
successfully
registered!
Username
Enjoy! Go on homepage and log in »


| GS1 Member Organisation |
|
Member Company Name |
|
Accounts |
|
| Email address: | |
| Password: | New password: Repeat new password to change it: |
| First name: | |
| Surname: | |
| Administrator Level: | Allow login / Account Enable: |
| Account Notes: | |
| Account ID: |
| Status: | ||
| Last Updated: | ||
| Message from Resolver: | ||


 I thought back, fondly, to CANDYMAN, an intensely disturbing little movie that took the idea of urban legends and invested it with a grand and primordial dread. The only dread I felt during URBAN LEGEND was the fear that my watch had stopped.
Okay, maybe I'm being too cruel.  LEGEND is competent and amusing, and gory without being excessive, but barely worth more than a glance when it comes on cable TV. We've seen it all before, better.
This time around, the premise is that various students on a college campus are being stalked by a nutcase whose methods of dispatching his victims are patterned after various urban legends. There's the Man With The Axe In The Backseat, the Microwave Death, and so on. About all that's missing is the Death By Broiling In A Tanning Salon and the Choking Doberman -- and if you don't know about those, go ask the guy who writes "The Straight Dope".
Once the movie gets rolling, though, there's not much to look forward to beyond the unmasking of the killer. But along the way there are some cute stops. Robert Englund (the voice and face of "Freddy Krueger" from the NIGHTMARE ON ELM STREET movies) plays a professor on campus who runs a class on urban legends, and one of his hallmarks is that the camera never just seems to SHOW him. We'll see a bunch of students in a hallway or something, and then the camera will slam-pan to the side with a ZOINK! of horror-movie synth music, and there he is. I guess it goes without saying that he's one of the suspects.
Movies like this inspire a great deal of free-association in me. For instance, why is it in films like this that the killer always chooses to dress so homogenously? In ...SUMMER, it was a yellow rain slicker; in this movie, it's a parka with a fur-trimmed hood, which in the middle of a non-snowbound campus, would be sure to grab anyone's attention. And do the people who compose the scores for these movies all use the same orchestra hit synthesizer patch? It sure sounds like it.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Soumil GuptaCo-founder & Developer at ECCube Open lab I am a web & iOS Developer Embedded Design Engineer |
| Date | work |
|---|---|
| 1996-2001 | Lead Developer at Magna Steyr India (P) Ltd |
| 2001-2005 | Sr.Project Manager at Varroc India (P) Ltd |
| 2005-till Date | CTO at ECCube Open Lab |
|
|


Dirt Jump and Pump-Track
Black Market MOB Custom Build $1999.99
Killswitch Custom $3299.99
Black Market MOB Custom Build w/ gears $2279.99


Let's talk about: Health Costs
If you like this post and would like to read more of my posts,
Subscribe!Drug prices are similar to the points in “Whose Line is it Anyway?” - they’re made up. The price that is shown in the infographic (250$) is purely artificial, considering the drug maker gives a $62.50 rebate, meaning the actual cost to the drug maker is only $187.5.
Image from Kaiser Health News shared under a CC license.
Textual description
What happens is, the company that makes the drug sets a price, let’s say 250$ (this is a “fake” price as you will see). Now, the drug is sold to a wholesaler for a certain price (237.50$ in the figure). The wholesaler then sells it to pharmacies for a profit (240$). Notice how the price dropped from 250 to 237.5? It’s because the 250 price is a lie. The actual price was always 237.50$ and 250$ was chosen to inflate the price and make it seem like the buyer is getting a great “deal”.
Now the employer pays 232$ to the pharmacy, of which the Pharmacy Benefit Managers (PBMs) pocket 3$. The pharmacy gets 229$ + another 25$ from the patient, giving the pharmacies 254$, or a 14$ profit. What’s hilarious is that the drugmaker ends up paying a 62.50$ rebate! It’s the same as someone selling you a bridge for 250$ and immediately offering you a 100$ “discount”. Assuming the drug maker never charged you the “fake” price up front, the wholesaler would be charged only 175$. Then, the wholesaler could charge the pharmacy 177.5$, meaning the pharmacy could charge 191.5$ and still get the same profit (14$) as before. This would require employers/insurers to pay just 166.5$ instead of (effectively) 182$. The 15.5$ saved by the employer comes from removing the 12.5$ “rebate” to PBMs and the 3$ profit they make. You’ll notice the 12.5$ is not really a “rebate”, but rather is profit the PBMs make.
Fixing the system
Now, how can society get to a world where the system works better than the current state? To disrupt this in a capitalistic system (meaning everyone still operates trying to make a profit) in a way that the end-customer pays lower sums, employers/insurers need to go directly to pharmacies (cut out the PBMs). Even more efficient would be cutting out the pharmacies by having employers act as “pharmacies” and buying from the wholesellers. The most “cost-efficient” approach would be for employers/insurers to start making drugs themselves. PBMs not adding anything to the process is why Hasan Minhaj focuses on them in his segment on drug pricing.
Another way would be for the employers to operate a “competing pharmacy” that sells medicines to their employees. As employers would be saving costs, they wouldn’t need to make as much profits as these pharmacies for this to be a good decision financially for them. This may be what Amazon is doing with Pillpack.
What’s preventing these fixes? I would guess lobbying by pharmaceutical companies (and other players in the chain) and/or ensuring that the market is not entirely free (no competition from abroad allowed, no freedom for drug makers to make deals directly with employers/insurers, etc.).
Does stuff work the same way in healthcare?
I would guess yes. Except now there are three sources of payments - your premiums (monthly payment to your insurance plan), your co-pays/deductibles and your insurance’s payment. These are all decided by your insurance, so maybe if you could pay your hospital directly these costs could be lower. However, the hospital/care provider may need to charge you more than just the costs they incurred to care for you, in order to account for those who don’t have insurance. So, insurance plans may seem better (there are lots of debates on this). Some of this is covered by Adam Conover in Adam Ruins Everything.
Things I still don’t understand
Why is the 300$ number even mentioned in the infographic?
Why do uninsured people pay 300$? The general idea for uninsured people paying more is to offset the costs of other people who are uninsured who won’t end up paying. However, unliked healthcare, I would assume to get a drug, you pay first and get the drug only after payment has been made.


Submit
Convert to Space Time
Earth
Mercury
Venus
Mars
Jupiter
Find your age!
!