Module debug
Debugging utilities.
The debug module allows to have a better look at the workings of a Lumen application. The module is available trough the sched.debug table.
Tables
| waitd.debug | Wait descriptor debug tables. |
| taskd.debug | Task descriptor debug tables. |
Fields
| track_statistics | Control statistics collection. |
| do_not_yield | Control task yielding. |
Tables
- waitd.debug
- Wait descriptor debug tables. When the track_statistics is set to true sched.waitd objects will gain this table. There use statistics will be collected.
- taskd.debug
- Task descriptor debug tables. When the track_statistics is set to true sched.taskd objects will gain this table. There use statistics will be collected.
Fields
- track_statistics
-
Control statistics collection.
When set to true, sched.taskd and sched.waitd objects gain taskd.debug and waitd.debug tables, respectivelly. This is usefull to find performance bottlenecks as well as isolating misbehaving components for bug detection.
Collectig statistics has impact on performance. - do_not_yield
-
Control task yielding.
When set to a true valor, any attempt to yield from a task will trigger an error. This flag is usefull for delimiting critical sections of a program, to make sure none of the code inside yields indirectly (for example sending a signal, or sleeping).
The error message will contain the flags valor.
If a critical section contains yielding code, you can use a mutex to control access.


This feature uses the OPML format which is used by most RSS readers.
Configure how often livemarks are updated.
All future livemarks will be saved here by default
The supplied strings will be prefixed to bookmarks to indicate status. Note that titles won't update until the next feed refresh.
This add-on is maintained by Tim Nguyen. It's based on the Foxish Chrome extension. You can support the add-on by:


Our philosophy is to target the widest possible range of devices, so that no browser or device is left behind. To pursue this, we constantly need new devices on which to test our framework to ensure that all users receive the best jQuery Mobile experience.
Your can help: donate to our test lab
The jQuery Mobile has a test lab in Boston that currently has roughly 70 devices which gives us decent coverage of the more popular platforms and devices. However, the team of volunteers who work on the project are scattered across the globe so we simply need more devices. With your help, we can arm the team with the array of devices they need to debug and test the library effectively.
Any test phone, e-reader or tablet will help us improve the library but the follow devices are urgently needed:
- Boot2Gecko
- Android 2.1-4.0
- iPhone/iPod Touch and iPad 3-5 (iOS 3-5)
- Kindle Fire
- Nook Color/Tablet
- Windows Phone 7
- Windows 8 tablets
- Blackberry (4-7)
- Blackberry Playbook
- Nokia S^60
- Samsung Bada
- Meego
- Interactive TV devices
How to donate
If you would like to support jQuery Mobile through a device donation, please send an email to<EMAIL_ADDRESS>Thanks to all donators!


Imports all content of the package or class with wildcard syntax and replaces all occurences by unqualified references.


Module: DateAndTime::Calculations
| Relationships & Source Files | |
| Extension / Inclusion / Inheritance Descendants | |
|
Included In:
| |
| Defined in: | activesupport/lib/active_support/core_ext/date_and_time/calculations.rb |
Constant Summary
-
DAYS_INTO_WEEK =
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 5{ monday: 0, tuesday: 1, wednesday: 2, thursday: 3, friday: 4, saturday: 5, sunday: 6 }
-
WEEKEND_DAYS =
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 14[ 6, 0 ]
Instance Attribute Summary
-
#future? ⇒ Boolean
readonly
Returns true if the date/time is in the future.
-
#on_weekday? ⇒ Boolean
readonly
Returns true if the date/time does not fall on a Saturday or Sunday.
-
#on_weekend? ⇒ Boolean
readonly
Returns true if the date/time falls on a Saturday or Sunday.
-
#past? ⇒ Boolean
readonly
Returns true if the date/time is in the past.
-
#today? ⇒ Boolean
readonly
Returns true if the date/time is today.
Instance Method Summary
-
#all_day
Returns a ::Range representing the whole day of the current date/time.
-
#all_month
Returns a ::Range representing the whole month of the current date/time.
-
#all_quarter
Returns a ::Range representing the whole quarter of the current date/time.
-
#all_week(start_day = Date.beginning_of_week)
Returns a ::Range representing the whole week of the current date/time.
-
#all_year
Returns a ::Range representing the whole year of the current date/time.
-
#at_beginning_of_month
Alias for #beginning_of_month.
-
#at_beginning_of_quarter
Alias for #beginning_of_quarter.
-
#at_beginning_of_week(start_day = Date.beginning_of_week)
Alias for #beginning_of_week.
-
#at_beginning_of_year
Alias for #beginning_of_year.
-
#at_end_of_month
Alias for #end_of_month.
-
#at_end_of_quarter
Alias for #end_of_quarter.
-
#at_end_of_week(start_day = Date.beginning_of_week)
Alias for #end_of_week.
-
#at_end_of_year
Alias for #end_of_year.
-
#beginning_of_month
(also: #at_beginning_of_month)
Returns a new date/time at the start of the month.
-
#beginning_of_quarter
(also: #at_beginning_of_quarter)
Returns a new date/time at the start of the quarter.
-
#beginning_of_week(start_day = Date.beginning_of_week)
(also: #at_beginning_of_week)
Returns a new date/time representing the start of this week on the given day.
-
#beginning_of_year
(also: #at_beginning_of_year)
Returns a new date/time at the beginning of the year.
-
#days_ago(days)
Returns a new date/time the specified number of days ago.
-
#days_since(days)
Returns a new date/time the specified number of days in the future.
-
#days_to_week_start(start_day = Date.beginning_of_week)
Returns the number of days to the start of the week on the given day.
-
#end_of_month
(also: #at_end_of_month)
Returns a new date/time representing the end of the month.
-
#end_of_quarter
(also: #at_end_of_quarter)
Returns a new date/time at the end of the quarter.
-
#end_of_week(start_day = Date.beginning_of_week)
(also: #at_end_of_week)
Returns a new date/time representing the end of this week on the given day.
-
#end_of_year
(also: #at_end_of_year)
Returns a new date/time representing the end of the year.
-
#last_month
Alias for #prev_month.
-
#last_quarter
Alias for #prev_quarter.
-
#last_week(start_day = Date.beginning_of_week, same_time: false)
Alias for #prev_week.
-
#last_weekday
Alias for #prev_weekday.
-
#last_year
Alias for #prev_year.
-
#monday
Returns Monday of this week assuming that week starts on Monday.
-
#months_ago(months)
Returns a new date/time the specified number of months ago.
-
#months_since(months)
Returns a new date/time the specified number of months in the future.
-
#next_day
Returns a new date/time representing the next day.
-
#next_month
Short-hand for months_since(1).
-
#next_quarter
Short-hand for months_since(3).
-
#next_week(given_day_in_next_week = Date.beginning_of_week, same_time: false)
Returns a new date/time representing the given day in the next week.
-
#next_weekday
Returns a new date/time representing the next weekday.
-
#next_year
Short-hand for years_since(1).
-
#prev_day
Returns a new date/time representing the previous day.
-
#prev_month
(also: #last_month)
Short-hand for months_ago(1).
-
#prev_quarter
(also: #last_quarter)
Short-hand for months_ago(3).
-
#prev_week(start_day = Date.beginning_of_week, same_time: false)
(also: #last_week)
Returns a new date/time representing the given day in the previous week.
-
#prev_weekday
(also: #last_weekday)
Returns a new date/time representing the previous weekday.
-
#prev_year
(also: #last_year)
Short-hand for years_ago(1).
-
#sunday
Returns Sunday of this week assuming that week starts on Monday.
-
#tomorrow
Returns a new date/time representing tomorrow.
-
#weeks_ago(weeks)
Returns a new date/time the specified number of weeks ago.
-
#weeks_since(weeks)
Returns a new date/time the specified number of weeks in the future.
-
#years_ago(years)
Returns a new date/time the specified number of years ago.
-
#years_since(years)
Returns a new date/time the specified number of years in the future.
-
#yesterday
Returns a new date/time representing yesterday.
- #copy_time_to(other) private
- #days_span(day) private
- #first_hour(date_or_time) private
- #last_hour(date_or_time) private
Instance Attribute Details
#future? ⇒ Boolean
(readonly)
Returns true if the date/time is in the future.
47 48 49
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 47
def future? self > self.class.current end
#on_weekday? ⇒ Boolean
(readonly)
Returns true if the date/time does not fall on a Saturday or Sunday.
57 58 59
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 57
def on_weekday? !WEEKEND_DAYS.include?(wday) end
#on_weekend? ⇒ Boolean
(readonly)
Returns true if the date/time falls on a Saturday or Sunday.
52 53 54
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 52
def on_weekend? WEEKEND_DAYS.include?(wday) end
#past? ⇒ Boolean
(readonly)
Returns true if the date/time is in the past.
42 43 44
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 42
def past? self < self.class.current end
#today? ⇒ Boolean
(readonly)
Returns true if the date/time is today.
Instance Method Details
#all_day
Returns a ::Range representing the whole day of the current date/time.
298 299 300
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 298
def all_day beginning_of_day..end_of_day end
#all_month
Returns a ::Range representing the whole month of the current date/time.
309 310 311
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 309
def all_month beginning_of_month..end_of_month end
#all_quarter
Returns a ::Range representing the whole quarter of the current date/time.
314 315 316
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 314
def all_quarter beginning_of_quarter..end_of_quarter end
#all_week(start_day = Date.beginning_of_week)
Returns a ::Range representing the whole week of the current date/time.
Week starts on start_day, default is Date.beginning_of_week or
config.beginning_of_week
when set.
304 305 306
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 304
def all_week(start_day = Date.beginning_of_week) beginning_of_week(start_day)..end_of_week(start_day) end
#all_year
Returns a ::Range representing the whole year of the current date/time.
319 320 321
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 319
def all_year beginning_of_year..end_of_year end
#at_beginning_of_month
Alias for #beginning_of_month.
113
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 113
alias :at_beginning_of_month :beginning_of_month
#at_beginning_of_quarter
Alias for #beginning_of_quarter.
128
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 128
alias :at_beginning_of_quarter :beginning_of_quarter
#at_beginning_of_week(start_day = Date.beginning_of_week)
Alias for #beginning_of_week.
259
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 259
alias :at_beginning_of_week :beginning_of_week
#at_beginning_of_year
Alias for #beginning_of_year.
157
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 157
alias :at_beginning_of_year :beginning_of_year
#at_end_of_month
Alias for #end_of_month.
288
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 288
alias :at_end_of_month :end_of_month
#at_end_of_quarter
Alias for #end_of_quarter.
143
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 143
alias :at_end_of_quarter :end_of_quarter
#at_end_of_week(start_day = Date.beginning_of_week)
Alias for #end_of_week.
274
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 274
alias :at_end_of_week :end_of_week
#at_end_of_year
Alias for #end_of_year.
295
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 295
alias :at_end_of_year :end_of_year
#beginning_of_month Also known as: #at_beginning_of_month
Returns a new date/time at the start of the month.
today = Date.today # => Thu, 18 Jun 2015
today.beginning_of_month # => Mon, 01 Jun 2015
::DateTime objects will have a time set to 0:00.
now = DateTime.current # => Thu, 18 Jun 2015 15:23:13 +0000
now.beginning_of_month # => Mon, 01 Jun 2015 00:00:00 +0000
110 111 112
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 110
def beginning_of_month first_hour(change(day: 1)) end
#beginning_of_quarter Also known as: #at_beginning_of_quarter
Returns a new date/time at the start of the quarter.
today = Date.today # => Fri, 10 Jul 2015
today.beginning_of_quarter # => Wed, 01 Jul 2015
::DateTime objects will have a time set to 0:00.
now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000
now.beginning_of_quarter # => Wed, 01 Jul 2015 00:00:00 +0000
124 125 126 127
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 124
def beginning_of_quarter first_quarter_month = [10, 7, 4, 1].detect { |m| m <= month } beginning_of_month.change(month: first_quarter_month) end
#beginning_of_week(start_day = Date.beginning_of_week) Also known as: #at_beginning_of_week
Returns a new date/time representing the start of this week on the given
day. Week is assumed to start on start_day
, default is
Date.beginning_of_week or config.beginning_of_week
when set.
::DateTime objects have their time set to 0:00.
255 256 257 258
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 255
def beginning_of_week(start_day = Date.beginning_of_week) result = days_ago(days_to_week_start(start_day)) acts_like?(:time) ? result.midnight : result end
#beginning_of_year Also known as: #at_beginning_of_year
Returns a new date/time at the beginning of the year.
today = Date.today # => Fri, 10 Jul 2015
today.beginning_of_year # => Thu, 01 Jan 2015
::DateTime objects will have a time set to 0:00.
now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000
now.beginning_of_year # => Thu, 01 Jan 2015 00:00:00 +0000
154 155 156
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 154
def beginning_of_year change(month: 1).beginning_of_month end
#copy_time_to(other) (private)
[ GitHub ]336 337 338
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 336
def copy_time_to(other) other.change(hour: hour, min: min, sec: sec, nsec: try(:nsec)) end
#days_ago(days)
Returns a new date/time the specified number of days ago.
62 63 64
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 62
def days_ago(days) advance(days: -days) end
#days_since(days)
Returns a new date/time the specified number of days in the future.
67 68 69
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 67
def days_since(days) advance(days: days) end
#days_span(day) (private)
[ GitHub ]332 333 334
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 332
def days_span(day) (DAYS_INTO_WEEK[day] - DAYS_INTO_WEEK[Date.beginning_of_week]) % 7 end
#days_to_week_start(start_day = Date.beginning_of_week)
Returns the number of days to the start of the week on the given day. Week
is assumed to start on start_day
, default is Date.beginning_of_week or
config.beginning_of_week
when set.
245 246 247 248 249
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 245
def days_to_week_start(start_day = Date.beginning_of_week) start_day_number = DAYS_INTO_WEEK[start_day] current_day_number = wday != 0 ? wday - 1 : 6 (current_day_number - start_day_number) % 7 end
#end_of_month Also known as: #at_end_of_month
Returns a new date/time representing the end of the month. ::DateTime objects will have a time set to 23:59:59.
284 285 286 287
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 284
def end_of_month last_day = ::Time.days_in_month(month, year) last_hour(days_since(last_day - day)) end
#end_of_quarter Also known as: #at_end_of_quarter
Returns a new date/time at the end of the quarter.
today = Date.today # => Fri, 10 Jul 2015
today.end_of_quarter # => Wed, 30 Sep 2015
::DateTime objects will have a time set to 23:59:59.
now = DateTime.current # => Fri, 10 Jul 2015 18:41:29 +0000
now.end_of_quarter # => Wed, 30 Sep 2015 23:59:59 +0000
139 140 141 142
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 139
def end_of_quarter last_quarter_month = [3, 6, 9, 12].detect { |m| m >= month } beginning_of_month.change(month: last_quarter_month).end_of_month end
#end_of_week(start_day = Date.beginning_of_week) Also known as: #at_end_of_week
Returns a new date/time representing the end of this week on the given day.
Week is assumed to start on start_day
, default is
Date.beginning_of_week or config.beginning_of_week
when set.
::DateTime objects have their time set to 23:59:59.
271 272 273
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 271
def end_of_week(start_day = Date.beginning_of_week) last_hour(days_since(6 - days_to_week_start(start_day))) end
#end_of_year Also known as: #at_end_of_year
Returns a new date/time representing the end of the year. ::DateTime objects will have a time set to 23:59:59.
292 293 294
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 292
def end_of_year change(month: 12).end_of_month end
#first_hour(date_or_time) (private)
[ GitHub ]324 325 326
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 324
def first_hour(date_or_time) date_or_time.acts_like?(:time) ? date_or_time.beginning_of_day : date_or_time end
#last_hour(date_or_time) (private)
[ GitHub ]328 329 330
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 328
def last_hour(date_or_time) date_or_time.acts_like?(:time) ? date_or_time.end_of_day : date_or_time end
#last_month
Alias for #prev_month.
228
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 228
alias_method :last_month, :prev_month
#last_quarter
Alias for #prev_quarter.
234
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 234
alias_method :last_quarter, :prev_quarter
#last_week(start_day = Date.beginning_of_week, same_time: false)
Alias for #prev_week.
212
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 212
alias_method :last_week, :prev_week
#last_weekday
Alias for #prev_weekday.
222
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 222
alias_method :last_weekday, :prev_weekday
#last_year
Alias for #prev_year.
240
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 240
alias_method :last_year, :prev_year
#monday
Returns Monday of this week assuming that week starts on Monday. ::DateTime objects have their time set to 0:00.
263 264 265
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 263
def monday beginning_of_week(:monday) end
#months_ago(months)
Returns a new date/time the specified number of months ago.
82 83 84
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 82
def months_ago(months) advance(months: -months) end
#months_since(months)
Returns a new date/time the specified number of months in the future.
87 88 89
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 87
def months_since(months) advance(months: months) end
#next_day
Returns a new date/time representing the next day.
32 33 34
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 32
def next_day advance(days: 1) end
#next_month
Short-hand for months_since(1).
190 191 192
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 190
def next_month months_since(1) end
#next_quarter
Short-hand for months_since(3)
195 196 197
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 195
def next_quarter months_since(3) end
#next_week(given_day_in_next_week = Date.beginning_of_week, same_time: false)
Returns a new date/time representing the given day in the next week.
today = Date.today # => Thu, 07 May 2015
today.next_week # => Mon, 11 May 2015
The given_day_in_next_week
defaults to the beginning of the week which is
determined by Date.beginning_of_week or
config.beginning_of_week
when set.
today = Date.today # => Thu, 07 May 2015
today.next_week(:friday) # => Fri, 15 May 2015
::DateTime objects have their time set to 0:00 unless same_time
is true.
now = DateTime.current # => Thu, 07 May 2015 13:31:16 +0000
now.next_week # => Mon, 11 May 2015 00:00:00 +0000
175 176 177 178
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 175
def next_week(given_day_in_next_week = Date.beginning_of_week, same_time: false) result = first_hour(weeks_since(1).beginning_of_week.days_since(days_span(given_day_in_next_week))) same_time ? copy_time_to(result) : result end
#next_weekday
Returns a new date/time representing the next weekday.
181 182 183 184 185 186 187
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 181
def next_weekday if next_day.on_weekend? next_week(:monday, same_time: true) else next_day end end
#next_year
Short-hand for years_since(1).
200 201 202
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 200
def next_year years_since(1) end
#prev_day
Returns a new date/time representing the previous day.
22 23 24
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 22
def prev_day advance(days: -1) end
#prev_month Also known as: #last_month
Short-hand for months_ago(1).
225 226 227
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 225
def prev_month months_ago(1) end
#prev_quarter Also known as: #last_quarter
Short-hand for months_ago(3).
231 232 233
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 231
def prev_quarter months_ago(3) end
#prev_week(start_day = Date.beginning_of_week, same_time: false) Also known as: #last_week
Returns a new date/time representing the given day in the previous week.
Week is assumed to start on start_day
, default is
Date.beginning_of_week or config.beginning_of_week
when set.
::DateTime objects have their time set to 0:00 unless same_time
is true.
208 209 210 211
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 208
def prev_week(start_day = Date.beginning_of_week, same_time: false) result = first_hour(weeks_ago(1).beginning_of_week.days_since(days_span(start_day))) same_time ? copy_time_to(result) : result end
#prev_weekday Also known as: #last_weekday
Returns a new date/time representing the previous weekday.
215 216 217 218 219 220 221
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 215
def prev_weekday if prev_day.on_weekend? copy_time_to(beginning_of_week(:friday)) else prev_day end end
#prev_year Also known as: #last_year
Short-hand for years_ago(1).
237 238 239
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 237
def prev_year years_ago(1) end
#sunday
Returns Sunday of this week assuming that week starts on Monday. ::DateTime objects have their time set to 23:59:59.
278 279 280
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 278
def sunday end_of_week(:monday) end
#tomorrow
Returns a new date/time representing tomorrow.
27 28 29
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 27
def tomorrow advance(days: 1) end
#weeks_ago(weeks)
Returns a new date/time the specified number of weeks ago.
72 73 74
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 72
def weeks_ago(weeks) advance(weeks: -weeks) end
#weeks_since(weeks)
Returns a new date/time the specified number of weeks in the future.
77 78 79
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 77
def weeks_since(weeks) advance(weeks: weeks) end
#years_ago(years)
Returns a new date/time the specified number of years ago.
92 93 94
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 92
def years_ago(years) advance(years: -years) end
#years_since(years)
Returns a new date/time the specified number of years in the future.
97 98 99
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 97
def years_since(years) advance(years: years) end
#yesterday
Returns a new date/time representing yesterday.
17 18 19
# File 'activesupport/lib/active_support/core_ext/date_and_time/calculations.rb', line 17
def yesterday advance(days: -1) end


VisDA Challenge
Aeroplane
Bicycle
Bus
Car
Horse
Knife
Motorcycle
Person
Plant
Skateboard
Train
Truck


U of South Carolina fraternity suspended over hazing report
COLUMBIA, S.C. (AP) - The University of South Carolina has suspended a fraternity for three years amid allegations it hazed members.
In a statement obtained by news outlets on Monday, university spokesman Jeff Stenslad said Lambda Chi Alpha has been suspended until fall 2023.
The national fraternity’s CEO stated on behalf of the organization that the chapter was suspended Sunday over multiple reports of conduct violations. Officials said they hope the chapter can return to campus in a few years with a group of men “committed to following” its bylaws.
The university’s website said Lambda Chi Alpha was on probation for a Spring 2018 hazing report of “violent conduct” and alcohol. No additional details were released.
A national spokesman said members must move out of the house. The university will help relocate displaced members.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


Bug - Dup ID
Exit
plugin available:
Original Entry
plugin available:
Duplicate Entry
change
Created by Jesus Monroy, Jr. © 2016


Home
About
Venues
Venues
On a Saturday all the taprooms are open by 12pm. They start to close from 6pm onwards, although most stay open until at least 8pm and some stay open until 11pm. Check individual Taproom times for Saturday and other opening times and addresses.
Southwark Brewing
The Barrel Project
Hawkes Cider
Hiver/All Good Beer
Anspach & Hobday
Moor Beer
London Calling Sweden
Cloudwater
Brew By Numbers
Bianca Road
uBrew
Affinity
Spartan
EeBria
Partizan
Fourpure
Prev
Next
x
Southwark Brewing
Southwark Brewing
46 Druid Street, SE1 3PW
Open: Sat 11am-6pm
Plus: Tues 7-10pm, Thurs-Fri 5-10pm, Sun 12-5pm
website
x
The Barrel Project
The Barrel Project
80 Druid Street, SE1 2XN
Open: Sat 11am-11pm
Plus: Weds-Fri 4-11pm, Sun 12-7pm
website
x
Hawkes Cider
Hawkes Cider
92/96 Druid Street, SE1 2HQ
Open: Sat 11am-11pm
Plus: Weds-Fri 4-11pm, Sun 11am-6pm
website
x
Hiver/All Good Beer
Hiver/All Good Beer
56 Stanworth Street, SE1 3NY
Open: Sat 10am-6pm
Plus: Mon-Fri 9am-5.30pm (Hiver only), Sun 12-4.30pm
Hiver website
All Good Beer website
x
Anspach & Hobday
Anspach & Hobday
118 Druid Street, SE1 2HH
Open: Sat 10.30am-10pm
Plus: Fri 5-10pm, Sun 1-6pm
website
x
Moor Beer
Moor Beer
71 Enid Street, SE16 3RA
Open: 12-10.30pm
Plus: Weds 4-10pm, Thurs-Fri 3-10.30pm, Sun 12-9pm
website
x
London Calling Sweden
London Calling Sweden
72 Enid Street, SE16 3RA
Open: Sat 12-10.30pm
Plus: Weds-Fri 3-10.30pm, Sun 12-8pm
website
x
Cloudwater
Cloudwater
73 Enid Street, SE16 3RA
Open: Sat 10am-10pm
Plus: Weds-Fri 3-10pm, Sun 3-10pm
website
x
Brew By Numbers
Brew By Numbers
75/79 Enid Street, SE16 3RA
Open: Sat 11am-8pm
Plus: Fri 5-10pm, Sun 12-6pm
website
x
Bianca Road
Bianca Road
83 Enid Street, SE16 3RA
Open: 11am-9pm
Plus: Thurs-Fri 5-10.30pm, Sun 12-6pm
website
x
uBrew
uBrew
29-30 Old Jamaica Business Estate
24 Old Jamaica Road, SE16 4AW
Open: Sat 12-9pm
Plus: Thurs-Fri 12-11pm, Sun 12-7pm
website
x
Affinity
Affinity
7 Almond Road, SE16 3LR
Open: Sat 12-8.30pm
Plus: Fri 5-8.30pm, Sun 12-6pm
website
x
Spartan
Spartan
8 Almond Road, SE16 3LR
Open: Sat 12-7pm
website
x
EeBria
EeBria
15 Almond Road, SE16 3LR
Open: Sat 11am-8pm
Plus: Fri 5-9pm
website
x
Partizan
Partizan
34 Raymouth Road, SE16 2DB
Open: Sat 11am-8pm
Plus: Fri 5-11pm
website
x
Fourpure
Fourpure
22 Bermondsey Trading Estate, SE16 3LL
Open: Sat 11am-8pm
Plus: Tues-Thurs 12-8pm, Fri 12-9pm, Sun 12-8pm
website


Popular Areas in free online airsoft games
Website for FREE Amazon.com items, XBOX and Microsoft Points ...
Dec 28, 2011 . How to get free stuff online just by using this website. . Website for FREE Amazon.com items, XBOX and Microsoft Points, and Airsoft guns .
http://www.youtube.com/watch?v=lsPvKssmsSM
AirSplat: Airsoft Guns Free Shipping airsoft rifles, pistols, spring ...
Biggest & Best Airsoft Retailer Free Shipping* & Ships Today! Code: ILUVAS No Sales Tax Ever! (no code needed) * Orders over . Search (2+ fields required) .
http://www.airsplat.com/
Multiplayer Online Games Directory / Game Data / Airsoft War Zone
Nov 8, 2010 . Play free casino games without having to download . AWZ is the world's first and only online airsoft game. Arm your character with a variety of .
http://www.mpogd.com/games/game.asp?ID=2720
Airsoft Guns for Less - Walmart.com
Shop for Airsoft guns and accessories for less at Walmart.com. . Online. $12.97. . Free store pickup. as soon as today. with. Crosman Airsoft 12" Gel Target .
http://www.walmart.com/cp/Airsoft-Guns/1080386
Airsoft Guns Store | Fast Free Shipping | Best Pro-Shop
Shop online with fast shipping and low prices on all airsoft guns, real time store . The best advice on Airsoft games comes from our customers and staff.
http://www.airsoftatlanta.com/
Los Angeles Airsoft Teams, Games, Players, and Adult Rec Leagues
Manage Los Angeles Airsoft Teams online, find Airsoft Players and activity partners, and join recreational adult Airsoft leagues near Los Angeles. in Los Angeles. . Sportsvite makes playing Airsoft in Los Angeles hassle free. Find recreational .
http://la.sportsvite.com/sports/Airsoft


- WHAT IS THE POINT OF THIS WEBSITE? -
This website is for me to test out different things and improve on my website development skills. Here are a few of my projects, take a look!
- CLASSIC GAMES -
Games from the good old days such as Snake, Pacman and any other I conclude to benefit me in terms of programming.
- LITTLE PROJECTS -
Random projects that I code for fun. Preety much everything I will ever do will be in here. It will be like a stream of my consciousness.
- ABOUT ME -
Cool, this is the end of the site


OH Lottery
by The Associated PressCLEVELAND (AP) _ These Ohio lotteries were drawn Monday:
Estimated jackpot: $192 million
4-4-3
(four, four, three)
1-6-0-5
(one, six, zero, five)
6-6-4-2-1
(six, six, four, two, one)
Estimated jackpot: $80 million
Mega Millions
Pick 3 Midday
Pick 4 Midday
Pick 5 Midday
Powerball


Emmerdale's James Moore pulled over for drink driving after onlooker mistakes ataxic cerebral palsy for being drunk
James is part of the Emmerdale cast
by Charlotte RodriguesActor James Moore, who plays Ryan Stocks in Emmerdale, was pulled over for drink driving after an onlooker mistook his ataxic cerebral palsy for being drunk.
In a series of tweets, Ryan explained that the charity Ataxia UK are running a campaign called 'disordered not drunk' where disabled people recount their stories of mistakenly being labelled drunk and went on to say he very recently had it happen to him.
James said that he went for a meal with his girlfriend Sophie, but unbeknownst to him, an onlooker called the police.
He was later pulled over and told a concerned citizen rang claiming he was driving under influence.
James went on to say that he took a breathalyser which proved he was sober.
Read More: Emmerdale SPOILERS: Kim makes a shocking revelation
The Emmerdale star then said there needs to be more awareness as disability can affect balance and motor skills.
He also encouraged his followers just to ask if they see someone who appears drunk.
He ended his series of tweets by saying the police were "fantastic" and let him go very quickly.
Ataxic cerebral palsy is a developmental disorder that affects motor function and can cause problems with balance and coordination.
Read More: Emmerdale SPOILERS: A shock revelation throws Bernice and Liam's wedding into jeopardy
James is the first actor with ataxic cerebral palsy to be a permanent cast member in Emmerdale.
He joined the cast last year as Charity Dingle's long-lost son and earlier this year won the National Television Award for Best Newcomer.
Recently, his character has been helping Kim Tate and Al Chapman improve the disabled facilities at the new outdoors centre.
Last week, disabled Coronation Street actress Cherylee Houston revealed she was left in tears of frustration after a hotel asked if she'd mind being carried to her 'accessible' room as it had two steps.
She has since started a hashtag #takingthedis for people to share their stories of inaccessibility.
Leave us a comment on our Facebook page @EntertainmentDailyFix and let us know what you think!


| cond_logLik {pomp} | R Documentation |
The estimated conditional log likelihood from a fitted model.
## S4 method for signature 'kalmand_pomp'
cond_logLik(object, ..., format = c("numeric", "data.frame"))
## S4 method for signature 'pfilterd_pomp'
cond_logLik(object, ..., format = c("numeric", "data.frame"))
## S4 method for signature 'wpfilterd_pomp'
cond_logLik(object, ..., format = c("numeric", "data.frame"))
## S4 method for signature 'bsmcd_pomp'
cond_logLik(object, ..., format = c("numeric", "data.frame"))
## S4 method for signature 'pfilterList'
cond_logLik(object, ..., format = c("numeric", "data.frame"))
object |
result of a filtering computation |
... |
ignored |
format |
format of the returned object |
The conditional likelihood is defined to be the value of the density of
Y(t_k) | Y(t_1),\dots,Y(t_{k-1})
evaluated at Y(t_k) = y^*_k
.
Here, Y(t_k)
is the observable process, and y^*_k
the data, at time t_k
.
Thus the conditional log likelihood at time t_k
is
\ell_k(\theta) = \log f[Y(t_k)=y^*_k \vert Y(t_1)=y^*_1, \dots, Y(t_{k-1})=y^*_{k-1}],
where f
is the probability density above.
The numerical value of the conditional log likelihood.
Note that some methods compute not the log likelihood itself but instead a related quantity.
To keep the code simple, the cond_logLik
function is nevertheless used to extract this quantity.
When object
is of class ‘bsmcd_pomp’
(i.e., the result of a bsmc2
computation),
cond_logLik
returns the conditional log “evidence”
(see bsmc2
).
More on sequential Monte Carlo methods:
bsmc2()
,
eff_sample_size()
,
filter_mean()
,
filter_traj()
,
kalman
,
mif2()
,
pfilter()
,
pmcmc()
,
pred_mean()
,
pred_var()
,
saved_states()
,
wpfilter()
Other extraction methods:
coef()
,
covmat()
,
eff_sample_size()
,
filter_mean()
,
filter_traj()
,
forecast()
,
logLik
,
obs()
,
pred_mean()
,
pred_var()
,
saved_states()
,
spy()
,
states()
,
summary()
,
timezero()
,
time()
,
traces()


"A Knight's Tale"
In the days of yore only those of noble birth were allowed the honor of knighthood. The superstar athlete of his day, the knight would compete in mock battle at staged tournaments for the pleasure of the masses. One young man, lowborn William Thatcher (Heath Ledger), defies convention when he impersonates his now-dead liege lord and goes for the gold in "A Knight's Tale."
Writer/director Brian Helgeland delved into film noire, and earned a screenplay Oscar in the process, with his period crime thriller, "L.A. Confidential." He takes a sharp turn from mayhem to mirth with his latest oeuvre, covering territories that range from medieval fairytale adventure to contemporary pop culture. Mixing period and pop is a hard task that rarely meets with success, though there are exceptions, most involving Shakespeare.
There is an obvious hip ness to the material that is the crux of the juggling act the writer/director is trying to perform. Throughout the film he intersperses modern music and readily identifiable contemporary film and social references that meld the modern with the medieval. We're greeted, at the start of a jousting tournament, with the raucous refrains of Queen's "We Will Rock You" and the Middle Ages crowd of onlookers clapping and stomping and doing waves. It's slick and amusing, though the disparity in periods brings attention to itself as the film plays on.
The routine, oft-told tale of a young commoner striving to be something beyond his birthright, to "change his stars," is a staple for modern storytelling. Helgeland doesn't screw around with the rags to riches structure and concentrates on the exciting action of the tournament events - particularly the high-profile jousting matches - and his characters.
Heath Ledger is the first among equals in an ensemble effort that gives the young actor a chance to showcase himself while others get their chance at the limelight, too. The young Australian made a likable debut in "10 Things I Hate About You" and continues to build upon his good looks and easygoing charm as the ambitious Will Thatcher. Ledger handles the gamut of tasks put before him and acquits himself quite well riding, singing, dancing, sword fighting, and in comedy and stunt work.
The band of misfits accompanying William on his quest are an eclectic collection of affable rogues who are reluctantly drawn in to the young squire's hair-brained, and potentially deadly, scheme. Mark Addy ("The Full Monty") is solid as the serious-minded best friend, Roland. Alan Tudyk plays William's enforcer, Wat, a carrot-topped vassal whose hot-headedness is tempered by his loyalty to his friends. Rounding out William's merry men is a young poet and story-teller named Geoff Chaucer (Paul Bettany), who acts as Williams press agent, promoter and ring announcer, and a pretty blacksmith named Kate (Laura Fraser), a real master of metals. The only problem with these characters and their performances is you don't get enough of them. The rest of the cast is adequate, though Shannyn Sossamon as the love interest, Jocelyn, is pretty but little more than an object of affection - no sparks fly between her and William.
The production is first-class with great attention paid to medieval period details, but with a contempo feel throughout. The big tournie scenes maintain a Super Bowl atmosphere with the audience hyped to a fever pitch as the jousting action mounts.  The behind-the-camera tech team members providing the visuals for "A Knight's Tale" are equal to the director's talent and vision. Cinematographer Richard Greatrex, production designer Tony Burrough, and costumer and armor designer Caroline Harris contribute to the modern/medieval look that Helgeland seeks. The use of modern pop and rock music is handled in an amusing and interesting way, with each tune selected to appropriately fit the scene in which it is used. David Bowie's "Golden Years" is used over a Middle Ages line dance; Bachman-Turner Overdrive's "Takin' Care of Business" plays as William establishes himself as the leader and true friend of his little band; The World Series of tournaments, London, has the dream team come into town under Thin Lizzy's "The Boys Are Back In Town." Each tune works and will please the hipsters in the audience.
Brian Helgeland picked a tough nut in his combo of "Rocky" meets the knights of old yarn and, while not a great film, "A Knight's Tale" does a sound job in putting together the combination. The attractive, likable cast and excellent production values overcome the sometimes overly hip screenplay. I give it a B.
For more Reeling reviews visit www.reelingreviews.com
<EMAIL_ADDRESS><EMAIL_ADDRESS>========== X-RAMR-ID: 28669 X-RT-AuthorID: 1488 X-RT-TitleID: 1107871 X-RT-RatingText: B
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


---
title: "Accepted Papers"
updated: 2016-10-05 00:00:00
layout: default
group: program
menu: sub
ordered: 1
status: published
---
{{ page.title }}
{% assign iswc_papers = (site.data.papers | where: "Track", "research" | sort: "Lastname")) %}
{% include table-papers.html %}
{% assign iswc_papers = (site.data.papers | where: "Track", "resource" | sort: "Lastname")) %}
{% include table-papers.html %}
{% assign iswc_papers = (site.data.papers | where: "Track", "application" | sort: "Lastname")) %}
{% include table-papers.html %}
{% assign iswc_papers = (site.data.papers | where: "Track", "journal" | sort: "Lastname")) %}
{% include table-papers.html %}
{% assign iswc_papers = (site.data.papers | where: "Track", "doctoralconsortium" | sort: "Lastname")) %}
{% include table-papers.html %}


{% extends 'layouts/base.html' %} {% block title %}Page Not Found - {{ super() }}{% endblock %} {% block body_class %}error{% endblock %} {% block content %}
There doesn't appear to be anything here. If something should've been here, an email was just sent to many phones telling lots of people to fix it!


{{header}} {{nav.opaque}}
YRM2015 will be held in the Andrew Wiles Building (Mathematical Institute at the University of Oxford). A limited number of discounted rooms are available for YRM attendees at Lincoln College, a 10 minute walk away in the centre of Oxford. The conference dinner will be held at Somerville College, next door to the Mathematical Institute.
We are a short walk from Oxford train and coach stations. See National Rail, National Express, or megabus for cheap advance coach tickets.
If you are travelling by car, we recommend using the Pear Tree Park and Ride and catching the bus route 300, which stops opposite the Mathematical Institute. Accessible parking places at the Institute are available by prior booking with a clear explanation of the circumstances of need.


I knew I'd find a use for all those pennies I'd been saving up for the last several years.
April 23, 2020
On my front page, I ask "How can the dogmas of minimalism and financial independence be used together to inform a path towards environmental sustainability?" An astute reader (my brother-in-law) asked what I meant by that, so I feel like now is a good opportunity to dive into that a bit as well as discuss some of my concerns about it, after all this isn't just a sustainability blog, it's a sustainable money blog.
For those of you unfamiliar, the FIRE (Financial Independence Retire Early) movement is a growing trend among younger than traditional retirement age people to save a significant portion of their income, invest, and set themselves up to be able to retire1 significantly early.
That's really it. Of course it's easier to save 50% or more of your income if you earn more, the most frequent criticisms of the FIRE movement is it a game for 6 figure earners, and frankly it's a fair critique. One combatant to the argument is to suggest that lower earners make strides to earn more as a method to "grow the gap"3, and not accepting that they can't earn more.
In general, I think the philosophies are great, and ascribe to many of them myself. People consciously rejecting consumerism in order to lead a more fulfilling life (in the long run), creating long term goals for themselves that create for them the freedom from financial stress is in so many ways good and healthy. People who take ownership over their finances are the ones that were actually able to reap the benefits of the economy that up until the COVID crash has been booming for the last 10 years.
But what if everyone were to develop a lifestyle of less spending and less consumerism while also investing significant portions of our capital into the wider market? The thesis of Functional Inefficiency was that we could have an ever increasing economy without destroying the environment if and only if we maintained a high level of consumerism - just consuming services instead of goods. Given that one of the primary ways in which people attain their FIRE status is by investing in the market, on the guiding principle that the market over an extended period of time always grows. Now, people who are truly dedicated to the idea of retiring early and living off passive income from their assets may decide to invest in other assets like real estate, but it remains something that only a portion of the total population can participate in before the concept unravels.
If we've learned anything from the last month during the COVID-19 shutdowns, it's that we don't need quite as many new things, that it's personal connections that bring us joy, and also that when people aren't buying as much (or working as much), the economy suffers4. There have been a lot of articles in the news recently saying that the bear market will be the downfall of the FIRE Movement5 6, while others speculate it will just weed out people who aren't fully committed to making it work, but indeed this is what they had planned for all along7. I personally don't think that a recession is going to be the end of the FIRE movement, but it does put us in a scenario that simulates a shirking economy with less consumerism throughout all of society.
One thing that is talked very widely of in Vicki Robbin's book Your Money or Your Life which inspired many FIRE seekers is developing our social capital8, and how having close relationships with people can reduce our need to spend money on goods and services that might otherwise be something you can borrow from friends. Of course physically relying on friendship right now is not something we are able to do, but I have found that as a result of being physically isolated from our friends and family nearby, we've all made more effort to verbally check in with people, regardless of their physical location.
Many people who seek financial independence are not planning on retiring early (or at least not truly retire decades early), but instead move into a more entrepreneurial role, creating value for other people in one way or another. True, in some cases someone can claim financial independence because their blog about how to be like them9 earns ad revenue, but in a lot of cases it's creating something from their passions, or using their financial freedom to think about big problems (or small problems) in the world and help to fix them without worrying about whether it will bring in significant additional income. In a world where the economy is not continuously expending, where consumerism is down, that financial freedom to start something new without worrying about profitability may be reduced, but the drive to be self-sufficient outside of finances may increase.
Ultimately, the dogmas of Financial Independence and the FIRE movement are overall quite positive. Save money, stop selling your time, work for yourself, and create meaningful relationships with people, but it nevertheless depends on a continuously expanding economy. In the future I'd like to dive more into what an environmentally sustainable and socially responsible financial independence looks like, but for now I'll keep learning.
Although a panoramic of Joshua Tree National Park may not seem relevant, the wide desert view instills a sense of freedom, but with its limitations. In order to survive, just as in early retirement, you must be thoughtful with your resources. If you start running low on water, you need to either find more water or leave the desert. If you're assets have lost too much value, you may need to cancel - or postpone - early retirement.


11 Distribution Protocol
The description here is far from complete and will therefore be further refined in upcoming releases. The protocols both from Erlang nodes towards EPMD (Erlang Port Mapper Daemon) and between Erlang nodes, however, are stable since many years.
The distribution protocol can be divided into four (4) parts:
-
1. Low level socket connection.
- 2. Handshake, interchange node name and authenticate.
- 3. Authentication (done by net_kernel).
- 4. Connected.
A node fetches the Port number of another node through the EPMD (at the other host) in order to initiate a connection request.
For each host where a distributed Erlang node is running there should also be an EPMD running. The EPMD can be started explicitly or automatically as a result of the Erlang node startup.
By default EPMD listens on port 4369.
3 and 4 are performed at the same level but the net_kernel disconnects the other node if it communicates using an invalid cookie (after one (1) second).
The integers in all multi-byte fields are in big-endian order.
11.1 EPMD Protocol
The requests served by the EPMD (Erlang Port Mapper Daemon) are summarized in the figure below.
Figure 11.1: Summary of EPMD requests.
Each request *_REQ is preceded by a two-byte length field. Thus, the overall request format is:
| 2 | n |
| Length | Request |
Register a node in the EPMD
When a distributed node is started it registers itself in EPMD. The message ALIVE2_REQ described below is sent from the node towards EPMD. The response from EPMD is ALIVE2_RESP.
| 1 | 2 | 1 | 1 | 2 | 2 | 2 | Nlen | 2 | Elen |
| 120 | PortNo | NodeType | Protocol | HighestVersion | LowestVersion | Nlen | NodeName | Elen | Extra |
- PortNo
- The port number on which the node accept connection requests.
- NodeType
- 77 = normal Erlang node, 72 = hidden node (C-node),...
- Protocol
- 0 = tcp/ip-v4, ...
- HighestVersion
- The highest distribution version that this node can handle. The value in R6B and later is 5.
- LowestVersion
- The lowest distribution version that this node can handle. The value in R6B and later is 5.
- Nlen
- The length (in bytes) of the NodeName field.
- NodeName
- The NodeName as an UTF-8 encoded string of Nlen bytes.
- Elen
- The length of the Extra field.
- Extra
- Extra field of Elen bytes.
The connection created to the EPMD must be kept as long as the node is a distributed node. When the connection is closed the node is automatically unregistered from the EPMD.
The response message ALIVE2_RESP is described below.
| 1 | 1 | 2 |
| 121 | Result | Creation |
Result = 0 -> ok, Result > 0 -> error
Unregister a node from the EPMD
A node unregisters itself from the EPMD by simply closing the TCP connection towards EPMD established when the node was registered.
Get the distribution port of another node
When one node wants to connect to another node it starts with a PORT_PLEASE2_REQ request towards EPMD on the host where the node resides in order to get the distribution port that the node listens to.
| 1 | N |
| 122 | NodeName |
where N = Length - 1
| 1 | 1 |
| 119 | Result |
Or
| 1 | 1 | 2 | 1 | 1 | 2 | 2 | 2 | Nlen | 2 | Elen |
| 119 | Result | PortNo | NodeType | Protocol | HighestVersion | LowestVersion | Nlen | NodeName | Elen | Extra |
If Result > 0, the packet only consists of [119, Result].
EPMD will close the socket as soon as it has sent the information.
Get all registered names from EPMD
This request is used via the Erlang function net_adm:names/1,2. A TCP connection is opened towards EPMD and this request is sent.
| 1 |
| 110 |
The response for a NAMES_REQ looks like this:
| 4 | |
| EPMDPortNo | NodeInfo* |
NodeInfo is a string written for each active node. When all NodeInfo has been written the connection is closed by EPMD.
NodeInfo is, as expressed in Erlang:
io:format("name ~ts at port ~p~n", [NodeName, Port]).
Dump all data from EPMD
This request is not really used, it should be regarded as a debug feature.
| 1 |
| 100 |
The response for a DUMP_REQ looks like this:
| 4 | |
| EPMDPortNo | NodeInfo* |
NodeInfo is a string written for each node kept in EPMD. When all NodeInfo has been written the connection is closed by EPMD.
NodeInfo is, as expressed in Erlang:
io:format("active name ~ts at port ~p, fd = ~p ~n", [NodeName, Port, Fd]).
or
io:format("old/unused name ~ts at port ~p, fd = ~p~n", [NodeName, Port, Fd]).
 It is almost never used.
| 1 |
| 107 |
The response fo a KILL_REQ looks like this:
| 2 |
| OKString |
where OKString is "OK".
STOP_REQ (Not Used)
| 1 | n |
| 115 | NodeName |
where n = Length - 1
The current implementation of Erlang does not care if the connection to the EPMD is broken.
The response for a STOP_REQ looks like this.
| 7 |
| OKString |
where OKString is "STOPPED".
A negative response can look like this.
| 7 |
| NOKString |
where NOKString is "NOEXIST".
11.2 Distribution Handshake
This section describes the distribution handshake protocol introduced in the OTP-R6 release of Erlang/OTP. This description was previously located in $ERL_TOP/lib/kernel/internal_doc/distribution_handshake.txt, and has more or less been copied and "formatted" here. It has been more or less unchanged since the year 1999, but the handshake should not have changed much since then either.
General
The TCP/IP distribution uses a handshake which expects a connection based protocol, i.e. the protocol does not include any authentication after the handshake procedure.
This is not entirely safe, as it is vulnerable against takeover attacks, but it is a tradeoff between fair safety and performance.
The cookies are never sent in cleartext and the handshake procedure expects the client (called A) to be the first one to prove that it can generate a sufficient digest. The digest is generated with the MD5 message digest algorithm and the challenges are expected to be very random numbers.
Definitions
A challenge is a 32 bit integer number in big endian order. Below the function gen_challenge() returns a random 32 bit integer used as a challenge.
A digest is a (16 bytes) MD5 hash of the Challenge (as text) concatenated with the cookie (as text). Below, the function gen_digest(Challenge, Cookie) generates a digest as described above.
An out_cookie is the cookie used in outgoing communication to a certain node, so that A's out_cookie for B should correspond with B's in_cookie for A and the other way around. A's out_cookie for B and A's in_cookie for B need NOT be the same. Below the function out_cookie(Node) returns the current node's out_cookie for Node.
An in_cookie is the cookie expected to be used by another node when communicating with us, so that A's in_cookie for B corresponds with B's out_cookie for A. Below the function in_cookie(Node) returns the current node's in_cookie for Node.
The cookies are text strings that can be viewed as passwords.
Every message in the handshake starts with a 16 bit big endian integer which contains the length of the message (not counting the two initial bytes). In erlang this corresponds to the gen_tcp option {packet, 2}. Note that after the handshake, the distribution switches to 4 byte packet headers.
The Handshake in Detail
Imagine two nodes, node A, which initiates the handshake and node B, which accepts the connection.
- 1) connect/accept
A connects to B via TCP/IP and B accepts the connection.
- 2) send_name/receive_name
-
A sends an initial identification to B. B receives the message. The message looks like this (every "square" being one byte and the packet header removed):
+---+--------+--------+-----+-----+-----+-----+-----+-----+-...-+-----+ |'n'|Version0|Version1|Flag0|Flag1|Flag2|Flag3|Name0|Name1| ... |NameN| +---+--------+--------+-----+-----+-----+-----+-----+-----+-... +-----+
The 'n' is just a message tag. Version0 and Version1 is the distribution version selected by node A, based on information from EPMD. (16 bit big endian) Flag0 ... Flag3 are capability flags, the capabilities defined in $ERL_TOP/lib/kernel/include/dist.hrl. (32 bit big endian) Name0 ... NameN is the full nodename of A, as a string of bytes (the packet length denotes how long it is).
- 3) recv_status/send_status
-
B sends a status message to A, which indicates if the connection is allowed. The following status codes are defined:
- ok
- The handshake will continue.
- ok_simultaneous
- The handshake will continue, but A is informed that B has another ongoing connection attempt that will be shut down (simultaneous connect where A's name is greater than B's name, compared literally).
- nok
- The handshake will not continue, as B already has an ongoing handshake which it itself has initiated. (simultaneous connect where B's name is greater than A's).
- not_allowed
- The connection is disallowed for some (unspecified) security reason.
- alive
- A connection to the node is already active, which either means that node A is confused or that the TCP connection breakdown of a previous node with this name has not yet reached node B. See 3B below.
This is the format of the status message:
+---+-------+-------+-...-+-------+ |'s'|Status0|Status1| ... |StatusN| +---+-------+-------+-...-+-------+
's' is the message tag Status0 ... StatusN is the status as a string (not terminated)
- 3B) send_status/recv_status
If status was 'alive', node A will answer with another status message containing either 'true' which means that the connection should continue (The old connection from this node is broken), or 'false', which simply means that the connection should be closed, the connection attempt was a mistake.
- 4) recv_challenge/send_challenge
-
If the status was ok or ok_simultaneous, The handshake continues with B sending A another message, the challenge. The challenge contains the same type of information as the "name" message initially sent from A to B, with the addition of a 32 bit challenge:
+---+--------+--------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-...-+-----+ |'n'|Version0|Version1|Flag0|Flag1|Flag2|Flag3|Chal0|Chal1|Chal2|Chal3|Name0|Name1| ... |NameN| +---+--------+--------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-... +-----+
Where Chal0 ... Chal3 is the challenge as a 32 bit big endian integer and the other fields are B's version, flags and full nodename.
- 5) send_challenge_reply/recv_challenge_reply
-
Now A has generated a digest and its own challenge. Those are sent together in a package to B:
+---+-----+-----+-----+-----+-----+-----+-----+-----+-...-+------+ |'r'|Chal0|Chal1|Chal2|Chal3|Dige0|Dige1|Dige2|Dige3| ... |Dige15| +---+-----+-----+-----+-----+-----+-----+-----+-----+-...-+------+
Where 'r' is the tag, Chal0 ... Chal3 is A's challenge for B to handle and Dige0 ... Dige15 is the digest that A constructed from the challenge B sent in the previous step.
- 6) recv_challenge_ack/send_challenge_ack
-
B checks that the digest received from A is correct and generates a digest from the challenge received from A. The digest is then sent to A. The message looks like this:
+---+-----+-----+-----+-----+-...-+------+ |'a'|Dige0|Dige1|Dige2|Dige3| ... |Dige15| +---+-----+-----+-----+-----+-...-+------+
Where 'a' is the tag and Dige0 ... Dige15 is the digest calculated by B for A's challenge.
- 7)
A checks the digest from B and the connection is up.
 %% The node implements an atom cache (obsolete) -define(DFLAG_ATOM_CACHE,2). %% The node implements extended (3 * 32 bits) references. This is %% required today. If not present connection will be refused. -define(DFLAG_EXTENDED_REFERENCES,4). %% The node implements distributed process monitoring. -define(DFLAG_DIST_MONITOR,8). %% The node uses separate tag for fun's (lambdas) in the distribution protocol. -define(DFLAG_FUN_TAGS,16#10). %% The node implements distributed named process monitoring. -define(DFLAG_DIST_MONITOR_NAME,16#20). %% The (hidden) node implements atom cache (obsolete) -define(DFLAG_HIDDEN_ATOM_CACHE,16#40). %% The node understand new fun-tags -define(DFLAG_NEW_FUN_TAGS,16#80). %% The node is capable of handling extended pids and ports. This is %% required today. If not present connection will be refused. -define(DFLAG_EXTENDED_PIDS_PORTS,16#100). %% -define(DFLAG_EXPORT_PTR_TAG,16#200). %% -define(DFLAG_BIT_BINARIES,16#400). %% The node understands new float format -define(DFLAG_NEW_FLOATS,16#800). %% -define(DFLAG_UNICODE_IO,16#1000). %% The node implements atom cache in distribution header. -define(DFLAG_DIST_HDR_ATOM_CACHE,16#2000). %% The node understand the SMALL_ATOM_EXT tag -define(DFLAG_SMALL_ATOM_TAGS, 16#4000). %% The node understand UTF-8 encoded atoms -define(DFLAG_UTF8_ATOMS, 16#10000).
11.3 Protocol between connected nodes
As of erts version 5.7.2 the runtime system passes a distribution flag in the handshake stage that enables the use of a distribution header on all messages passed. Messages passed between nodes are in this case on the following format:
| 4 | d | n | m |
| Length | DistributionHeader | ControlMessage | Message |
where:
Length is equal to d + n + m
ControlMessage is a tuple passed using the external format of Erlang.
Message is the message sent to another node using the '!' (in external format). Note that Message is only passed in combination with a ControlMessage encoding a send ('!').
Also note that the version number is omitted from the terms that follow a distribution header.
Nodes with an erts version less than 5.7.2 does not pass the distribution flag that enables the distribution header. Messages passed between nodes are in this case on the following format:
| 4 | 1 | n | m |
| Length | Type | ControlMessage | Message |
where:
Length is equal to 1 + n + m
Type is: 112 (pass through)
ControlMessage is a tuple passed using the external format of Erlang.
Message is the message sent to another node using the '!' (in external format). Note that Message is only passed in combination with a ControlMessage encoding a send ('!').
The ControlMessage is a tuple, where the first element indicates which distributed operation it encodes.
- LINK
-
{1, FromPid, ToPid}
- SEND
-
{2, Cookie, ToPid}
Note followed by Message
- EXIT
-
{3, FromPid, ToPid, Reason}
- UNLINK
-
{4, FromPid, ToPid}
- NODE_LINK
-
{5}
- REG_SEND
-
{6, FromPid, Cookie, ToName}
Note followed by Message
- GROUP_LEADER
-
{7, FromPid, ToPid}
- EXIT2
-
{8, FromPid, ToPid, Reason}
11.4 New Ctrlmessages for distrvsn = 1 (OTP R4)
- SEND_TT
-
{12, Cookie, ToPid, TraceToken}
Note followed by Message
- EXIT_TT
-
{13, FromPid, ToPid, TraceToken, Reason}
- REG_SEND_TT
-
{16, FromPid, Cookie, ToName, TraceToken}
Note followed by Message
- EXIT2_TT
-
{18, FromPid, ToPid, TraceToken, Reason}
11.5 New Ctrlmessages for distrvsn = 2
distrvsn 2 was never used.
11.6 New Ctrlmessages for distrvsn = 3 (OTP R5C)
None, but the version number was increased anyway.
11.7 New Ctrlmessages for distrvsn = 4 (OTP R6)
These are only recognized by Erlang nodes, not by hidden nodes.
- MONITOR_P
-
{19, FromPid, ToProc, Ref} FromPid = monitoring process ToProc = monitored process pid or name (atom)
- DEMONITOR_P
-
{20, FromPid, ToProc, Ref} We include the FromPid just in case we want to trace this. FromPid = monitoring process ToProc = monitored process pid or name (atom)
- MONITOR_P_EXIT
-
{21, FromProc, ToPid, Ref, Reason} FromProc = monitored process pid or name (atom) ToPid = monitoring process Reason = exit reason for the monitored process


“Would you tell me, please, which way I ought to go from here?" "That depends a good deal on where you want to get to." "I don't much care where –" "Then it doesn't matter which way you go.”


{% include head.html %}
{{ site.resume_header_contact_info }}
Software Developer with 6+ years of comprehensive experience in software development using Visual Studio through multiple programming languages. Knowledgeable in emerging technologies as well as business principles and processes. A considerate and innovative individual who has a good sense of teamwork to get results by instilling commitment, accountability, fairness, and loyalty.
Donut Locator is an open source node/ember app that lets users find donuts within a defined radius from their home.
DEUG is a local monthly meetup in Springfield where we share all the latest tips and tricks for dat donut lifestyle. I organize the group, and typically eat most of the donuts.
BirdDog Software is the leading integrated web-based software suite, including Order Fulfillment, CRM and Ecommerce software. What makes BirdDog Enterprise unique is that it's built on a single platform so sales, support, shipping and billing all use the same information on every interaction.
If you had any meaningful roles at college, feel free to write about them here.
Awarded for stopping a nuclear meltdown, even though I also started it.
Honored by Duff Beer for being an outstanding customer several years straight. Qualifications included most beer consumed at a bar, most beer purchased, and most beer ralphed.
Specifically this prestigious awarded twice for stopping a robber with my belly.
Organized fund drives and participated in fundraising events for the benefit of families in third world countries without proper access to malt beverages.
Founding member of the local nuclear workers labor union.


{% extends "base.html" %} {% block title %}Methodology{% endblock %} {% block content %}
The data included dozens of metrics by county or county-equivalent for every state and territory in the country, more than 8,000 unique reporting jurisdictions. In Maryland, there are 24 county or county equivalents that reported data. The data I was interested in include total registration rates, total turnout, turnout at the polling place, number of polling places, and number of poll workers for each federal election. Other data exist that speak to election administration, but I chose these data for their relative completeness and accuracy.
I would have liked to use the data above and regress it against whether the county had higher than average wait times at the polling place. For example, if a medium sized jurisdiction with average size polling places but fewer poll workers per voter was experiencing higher than average lines, we could use the data to find potentially optimal levels of poll worker staffing. Alas, election line data do not exist at the county level, though, there are numerous competing efforts to bring such data into the public eye in 2016 and beyond.
Until those outcome data are available, I was forced to compare a county's relative rank in the generated metrics election over election.


Student Bio
Faraz Butt
I live in Brampton and planning on going into the tech field mainly web development
Contact Info
GitHub
Email
Linkedin


Error connecting database
Connection to database failed
connectDB() failed: Is the
postmaster running and
accepting TCP/IP (with -i)
connections at 'localhost' on
port '5432'?
This usually occurs because the "postmaster" (the postgreSQL backend) was not
started with the -i option. Usually just adding -i to
the command line that starts the postmaster and restarting will fix this.
ftp://ftp.flex.ro/pub/pgaccess
is one place that you can download precompiled libpgtcl libraries for
PgAccess.libpgtcl not found
PgAccess requires a library of functions named libpgtcl. This
should be available with the postgreSQL distribution, and is usually placed in
the correct location when installing postgreSQL. First check that there is a
file named libpgtcl.so (perhaps with a number appended - or
libpgtcl.dll on Windows systems) on your
system. If not, you will have to download and perhaps compile this library.


The Goddard Police Department asked for help Sunday in locating the owners of the “three friends traveling together (towards a Northern star).”
Police said in a Facebook post that if they couldn’t find the owners, they would be “halfway toward a live Nativity this Christmas season.”
Sedgwick County Sheriff’s Lt. Tim Meyers says the animals belong to an employee of the nearby Tanganyika Wildlife Park.
One person who replied to the Facebook post inquired, “Are there 3 wise looking men near?” Another speculated that they “may lead you to the Second Coming.”
Goddard is about 15 miles west of Wichita.


WITNESS LIST General Investigating & Ethics Committee March 30, 2005-8:00A Anabolic Steroids On: Breithaupt, Charles (University Interscholastic League) Crawford, Linda (Texas Education Agency) Farney, Bill (University Interscholastic League) Odenwald, Cliff (Tx. High School Athletic Directors Association & Plano ISD)


Thatswhatcheesesaid.io will be a website for Mac and Cheese lovers to submit/rank local restaurants' Mac and Cheese dishes and submit photos of their own Mac and Cheese creations to be voted on and ranked. The website will rely heavily on user submitted data. Users will have two options for the restaurant ranking, "upfork" and "downfork". Restaurants will be ranked based on the difference between upforks and downforks. Submitted photos will also be displayed side by side randomly for the website user to pick which photo looks the "cheesiest". The top 5 cheesiest photos will be displayed on the front page. Rankings will be updated periodically.


---
layout: home
---
The currency on this server are the Bits. A bit is a fraction of a Crown (1/1000000) that you can obtain by killing monsters, trading with users or transfering from an outside wallet. All of it is stored on a standard Crown wallet on the Blockchain.
The level system is different that in a vanilla server. You gather experience from killing mobs and is never lost. Your XP allows you to become stronger and gain extra health.
CrownQuest is made having the concept of fun in it. Bots and AFK farming are strictly banned.
{{ post.content | strip_html | truncatewords: 33 }}


acdecom - acoustic mode decomposition in flow ducts¶
Acdecom is a Python module that makes the post-processing of acoustic data in flow ducts easy. It is developed and maintained by the Marcus Wallenberg Laboratory for Sound and Vibration Research.
The package features:
An easy-to-set-up three-step decomposition scheme for experiments and simulations
Predefined wavenumbers, acoustic mode shapes, and attenuation models for the most common geometries
Preparation of decomposition matrices based on auto-detected cut-on modes
High customizability
Installation¶
The module can be easily installed using PiPy:
>> pip install acdecom
The source code is available at GitHub.
Documentation¶
Acknowledgement¶
This project was conducted as part of a project within the Competence Center for Gas Exchange (CCGEx) at KTH. The authors would like to acknowledge the Swedish Energy Agency, Volvo Cars, Volvo GTT, Scania, BorgWarner Turbo Systems Engineering, and Wärtsilä for their support and contributions. The authors also wish to acknowledge the financial support of the European Commission provided in the framework of the FP7 Collaborative Project IDEALVENT (Grant Agreement 314066).
Icons made by iconixar from www.flaticon.com. Some of the artwork was found on https://www.pexels.com/.
The Module¶
|
This class can be used to decompose in-duct sounds into acoustic modes. |


Authoring New Problem
Title:
Language:
C
JAVA
Section:
Description:
Examples:
Explaination:
Instructor Code:
Solved Code:
User Code:
Test Cases:
Description:
Input:
Output:
Description
Input
Sample Output
Action
{{testCase.description}}
{{testCase.input}}
{{testCase.output}}
Submit
Preview
Run


an attempt to use mustache
Test:
{{title}}
Use at least 8 characters with at least 1 non-alphabete character. Don't use a password from another site, or something too obvious like your pet's name.


|
BL3 SDK
0.0.1
Borderlands 3 Class Documentation
|
#include <BL3_OakGame_classes.hpp>
Static Public Member Functions | |
| static UClass * | StaticClass () |
| Static Public Member Functions inherited from UStanceDataSelector | |
| static UClass * | StaticClass () |
| Static Public Member Functions inherited from UStanceDataProvider | |
| static UClass * | StaticClass () |
| Static Public Member Functions inherited from UGbxDataAsset | |
| static UClass * | StaticClass () |
| Static Public Member Functions inherited from UDataAsset | |
| static UClass * | StaticClass () |
| Static Public Member Functions inherited from UObject | |
| static FChunkedFixedUObjectArray & | GetGlobalObjects () |
| template<typename T > | |
| static T * | FindObject (const std::string &name) |
| static UClass * | FindClass (const std::string &name) |
| template<typename T > | |
| static T * | GetObjectCasted (std::size_t index) |
| static UClass * | StaticClass () |
Additional Inherited Members | |
| Public Member Functions inherited from UObject | |
| std::string | GetName () const |
| std::string | GetFullName () const |
| bool | IsA (UClass *cmp) const |
| void | ProcessEvent (class UFunction *function, void *parms) |
| void | ExecuteUbergraph (int EntryPoint) |
| Static Public Attributes inherited from UObject | |
| static FUObjectArray * | GObjects |
|
inlinestatic |
| class UStanceDataProvider* AIAlertStanceProvider |
| class UStanceDataProvider* AIAngryPatrolStanceProvider |
| struct FGbxBlackboardKeySelector AICombatStanceKey |
| class UStanceDataProvider* AICombatStanceProvider |
| struct FGbxBlackboardKeySelector AIFlyingStanceKey |
| class UStanceDataProvider* AIFlyingStanceProvider |
| struct FGbxBlackboardKeySelector AIFriendlyTargetStanceKey |
| class UStanceDataProvider* AIFriendlyTargetStanceProvider |
| class UStanceDataProvider* CrouchingStanceProvider |
| class UStanceDataProvider* InjuredSprintStanceProvider |
| class UStanceDataProvider* InjuredStanceProvider |
| class UStanceDataProvider* SprintingStanceProvider |
| struct FGbxParam UseAIAlertStance |


Home
Install
MobileBroadband 4G Driver (HP1040 G2)
L'Oreal Connect
HP Connection Manager
TREND
IT_Console
TREND
BitLocker
THINKPAD (X230)
Uninstall
TREND
L'Oreal Connect
HP Connection Manager
IT_Console
Troubleshoot
MERCURE
PULSE
Group Policy Update
Credentials
Share Drive Access
Programs Installed
Copy Data
My HUB
Hornbill
© L'Oreal(UK)Ltd License
Version 1.0
Created by
Javier RUIDIAZ


libr-bridge
Bridging module: JavaScript < - > R
Sorry! It's under development.
- Some important features including factor, dataframe, console handling, S3/S4 object handling and expression are not supported yet!
- Incompatible API changes may be held.
- Please do not use in the production environment until specifications are fixed.
- Pull requests are always welcome.
What is libr-bridge?
libr-bridge is a very powerful npm package which enables you to use R function/statistical method in Node.js environment.
R (The R Foundation, Vienna, Austria) is a free software environment for statistical computing. With libr-bridge, you can use function in R as if they were JavaScript native function.
How to Use
Following samples and libr-bridge are written with ECMAScript 6 modules syntex (import/export). Please use esm or --experimental-modules.
let r = new R();
const arrA = [1.00, 3.36, 8.01, 1.22, 3.74, 2.43, 7.95, 8.32, 7.45, 4.36];
const arrB = [1.04, 3.65, 6.82, 1.46, 2.70, 2.49, 7.48, 8.28, 8.93, 5.63];
/* Some functions are already loaded to libr-bridge */
console.log("Mean of arrA: " + r.mean(arrA));
console.log("Mean of arrB: " + r.mean(arrB));
console.log("Peason's correlation coefficient: " + r.cor(arrA, arrB));
/* You can pass data to R */
r.setVar("a", arrA);
/* And data can be used in R */
console.log(r.eval('sum(a)'));
r.eval('b <- a / 2');
console.log(r.eval('b'));
/* You can receive data from R */
let b = r.getVar("b");
/* Execute complex command with eval. */
r.eval(`
myfactorial <- function(x) {
if (x == 0) {
return(1)
} else {
return(x * myfactorial(x - 1))
}
}
`);
let factorial_50 = r.func("myfactorial")(50);
console.log(factorial_50);
console.log(r.eval("iris"));
API
Document
Please see doc directory.
Depending package
npm
- node-ffi: Node.js Foreign Function Interface
- ref * Turn Buffer instances into "pointers"
- arian/Complex: Calculations with Complex Numbers in JavaScript
My TODO list
- [x] Factor
- [x] Dataframe
- [x] Console handling
- [ ] S3 class
- [ ] S4 class
- [ ] Graphic handling
Author information
Programmed by kcrt (TAKAHASHI, Kyohei) http://profile.kcrt.net/
License
Copyright © 2017 kcrt (TAKAHASHI, Kyohei)
Released under the MIT license
http://opensource.org/licenses/mit-license.php
Reference
English
- R Internals
- R internals (by Hadley)
- Advanced R by Hadley Wickham
- You can buy Physical copy of this material. Especially recommended!
- Rccp: Seamless R anc C++ Integration
- Rcpp documentation
- Rcpp for everyone (Masaki E. Tsuda)


--- layout: post title: Tips for working with MongoDB & Mongoid date: '2010-05-13T10:39:00.000-07:00' author: Rimas Silkaitis tags: - rails - mongodb modified_time: '2010-05-13T10:39:24.466-07:00' blogger_id: tag:blogger.com,1999:blog-6201986.post-626824900541751289 blogger_orig_url: http://neovintage.blogspot.com/2010/05/tips-for-working-with-mongodb-mongoid.html ---
As with anything I do on this blog, it's to make sure that I don't forget what I just learned. Below are some of the things that I've learned while using Mongoid on my current project, Be The Builders. Just to note, I'm working off the current beta version of Mongoid 2.0.0.beta4 and MongoDB 1.4.0.
class Post include Mongoid::Document field :author field :text field :publish_date, :type => Date embeds_many :comments index [:author, :asc] end class Comment include Mongoid::Document field :author field :text field :publish_date, :type => Date embedded_in :post, :inverse_of => :comments index [:publish_date, :desc] endUnfortunately, I kept getting an InvalidCollection Error from Mongoid and for the life of me couldn't figure it out. I knew MongoDB allowed its users to create indexes on an embedded document. After a little testing, I came up with this instead:
class Post include Mongoid::Document field :author field :text field :publish_date, :type => Date embeds_many :comments index [:author, :asc] index ["comments.publish_date", :desc] end class Comment include Mongoid::Document field :author field :text field :publish_date, :type => Date embedded_in :post, :inverse_of => :comments endLesson: If you want to create indexes on embedded documents, create the index in the parent document. Then use a string to denote what you want indexed.
m = 'function(){ this.tags.forEach( function(z){ emit( z , { count : 1 } ); } ); };' r = <<-REDUCE function( key , values ){ var total = 0; for ( var i=0; i < values.length; i++ ) total += values[i].count; return { count : total }; }; REDUCE Post.collection.map_reduce(m, r)There are plenty more functions that can be found in the mongo driver, but if you're looking for map_reduce, you can find it in the main docs and the RDoc.
That's all I've got for now. When I figure out more you can bet that I will be posting it here. MongoDB / Mongoid have been a joy to work with.


Object Encryption¶
Swift supports the optional encryption of object data at rest on storage nodes. The encryption of object data is intended to mitigate the risk of users’ data being read if an unauthorised party were to gain physical access to a disk.
Note
Swift’s data-at-rest encryption accepts plaintext object data from the client, encrypts it in the cluster, and stores the encrypted data. This protects object data from inadvertently being exposed if a data drive leaves the Swift cluster. If a user wishes to ensure that the plaintext data is always encrypted while in transit and in storage, it is strongly recommended that the data be encrypted before sending it to the Swift cluster. Encrypting on the client side is the only way to ensure that the data is fully encrypted for its entire lifecycle.
Encryption of data at rest is implemented by middleware that may be included in the proxy server WSGI pipeline. The feature is internal to a Swift cluster and not exposed through the API. Clients are unaware that data is encrypted by this feature internally to the Swift service; internally encrypted data should never be returned to clients via the Swift API.
The following data are encrypted while at rest in Swift:
- Object content i.e. the content of an object PUT request’s body
- The entity tag (ETag) of objects that have non-zero content
- All custom user object metadata values i.e. metadata sent using X-Object-Meta- prefixed headers with PUT or POST requests
Any data or metadata not included in the list above are not encrypted, including:
- Account, container and object names
- Account and container custom user metadata values
- All custom user metadata names
- Object Content-Type values
- Object size
- System metadata
Note
This feature is intended to provide confidentiality of data that is at rest i.e. to protect user data from being read by an attacker that gains access to disks on which object data is stored.
This feature is not intended to prevent undetectable modification of user data at rest.
This feature is not intended to protect against an attacker that gains access to Swift’s internal network connections, or gains access to key material or is able to modify the Swift code running on Swift nodes.
Deployment and operation¶
Encryption is deployed by adding two middleware filters to the proxy server WSGI pipeline and including their respective filter configuration sections in the proxy-server.conf file. Additional steps are required if the container sync feature is being used.
The keymaster and encryption middleware filters must be to the right of all other middleware in the pipeline apart from the final proxy-logging middleware, and in the order shown in this example:
<other middleware> keymaster encryption proxy-logging proxy-server
[filter:keymaster]
use = egg:swift#keymaster
encryption_root_secret = your_secret
[filter:encryption]
use = egg:swift#encryption
# disable_encryption = False
See the proxy-server.conf-sample file for further details on the middleware configuration options.
The keymaster config option encryption_root_secret
MUST be set to a value
of at least 44 valid base-64 characters before the middleware is used and
should be consistent across all proxy servers. The minimum length of 44 has
been chosen because it is the length of a base-64 encoded 32 byte value.
Note
The encryption_root_secret
option holds the master secret key used for
encryption. The security of all encrypted data critically depends on this
key and it should therefore be set to a high-entropy value. For example, a
suitable encryption_root_secret
may be obtained by base-64 encoding a
32 byte (or longer) value generated by a cryptographically secure random
number generator.
The encryption_root_secret
value is necessary to recover any encrypted
data from the storage system, and therefore, it must be guarded against
accidental loss. Its value (and consequently, the proxy-server.conf file)
should not be stored on any disk that is in any account, container or
object ring.
The encryption_root_secret
value should not be changed once deployed.
Doing so would prevent Swift from properly decrypting data that was
encrypted using the former value, and would therefore result in the loss of
that data.
One method for generating a suitable value for encryption_root_secret
is to
use the openssl
command line tool:
openssl rand -base64 32
Once deployed, the encryption filter will by default encrypt object data and metadata when handling PUT and POST requests and decrypt object data and metadata when handling GET and HEAD requests. COPY requests are transformed into GET and PUT requests by the Server Side Copy middleware before reaching the encryption middleware and as a result object data and metadata is decrypted and re-encrypted when copied.
Upgrade Considerations¶
When upgrading an existing cluster to deploy encryption, the following sequence of steps is recommended:
- Upgrade all object servers
- Upgrade all proxy servers
- Add keymaster and encryption middlewares to every proxy server’s middleware
pipeline with the encryption
disable_encryption
option set toTrue
and the keymasterencryption_root_secret
value set as described above. - If required, follow the steps for Container sync configuration.
- Finally, change the encryption
disable_encryption
option toFalse
Objects that existed in the cluster prior to the keymaster and encryption middlewares being deployed are still readable with GET and HEAD requests. The content of those objects will not be encrypted unless they are written again by a PUT or COPY request. Any user metadata of those objects will not be encrypted unless it is written again by a PUT, POST or COPY request.
Disabling Encryption¶
Once deployed, the keymaster and encryption middlewares should not be removed from the pipeline. To do so will cause encrypted object data and/or metadata to be returned in response to GET or HEAD requests for objects that were previously encrypted.
Encryption of inbound object data may be disabled by setting the encryption
disable_encryption
option to True
, in which case existing encrypted
objects will remain encrypted but new data written with PUT, POST or COPY
requests will not be encrypted. The keymaster and encryption middlewares should
remain in the pipeline even when encryption of new objects is not required. The
encryption middleware is needed to handle GET requests for objects that may
have been previously encrypted. The keymaster is needed to provide keys for
those requests.
Container sync configuration¶
If container sync is being used then the keymaster and encryption middlewares must be added to the container sync internal client pipeline. The following configuration steps are required:
Create a custom internal client configuration file for container sync (if one is not already in use) based on the sample file internal-client.conf-sample. For example, copy internal-client.conf-sample to /etc/swift/container-sync-client.conf.
Modify this file to include the middlewares in the pipeline in the same way as described above for the proxy server.
Modify the container-sync section of all container server config files to point to this internal client config file using the
internal_client_conf_path
option. For example:internal_client_conf_path = /etc/swift/container-sync-client.conf
Note
The encryption_root_secret
value is necessary to recover any encrypted
data from the storage system, and therefore, it must be guarded against
accidental loss. Its value (and consequently, the custom internal client
configuration file) should not be stored on any disk that is in any
account, container or object ring.
Note
These container sync configuration steps will be necessary for container sync probe tests to pass if the encryption middlewares are included in the proxy pipeline of a test cluster.
Implementation¶
Encryption scheme¶
Plaintext data is encrypted to ciphertext using the AES cipher with 256-bit keys implemented by the python cryptography package. The cipher is used in counter (CTR) mode so that any byte or range of bytes in the ciphertext may be decrypted independently of any other bytes in the ciphertext. This enables very simple handling of ranged GETs.
In general an item of unencrypted data, plaintext
, is transformed to an
item of encrypted data, ciphertext
:
ciphertext = E(plaintext, k, iv)
where E
is the encryption function, k
is an encryption key and iv
is a unique initialization vector (IV) chosen for each encryption context. For
example, the object body is one encryption context with a randomly chosen IV.
The IV is stored as metadata of the encrypted item so that it is available for
decryption:
plaintext = D(ciphertext, k, iv)
where D
is the decryption function.
The implementation of CTR mode follows NIST SP800-38A, and the full IV passed to the encryption or decryption function serves as the initial counter block.
In general any encrypted item has accompanying crypto-metadata that describes the IV and the cipher algorithm used for the encryption:
crypto_metadata = {"iv": <16 byte value>,
"cipher": "AES_CTR_256"}
This crypto-metadata is stored either with the ciphertext (for user metadata and etags) or as a separate header (for object bodies).
Key management¶
A keymaster middleware is responsible for providing the keys required for each encryption and decryption operation. Two keys are required when handling object requests: a container key that is uniquely associated with the container path and an object key that is uniquely associated with the object path. These keys are made available to the encryption middleware via a callback function that the keymaster installs in the WSGI request environ.
The current keymaster implementation derives container and object keys from the
encryption_root_secret
in a deterministic way by constructing a SHA256
HMAC using the encryption_root_secret
as a key and the container or object
path as a message, for example:
object_key = HMAC(encryption_root_secret, "/a/c/o")
Other strategies for providing object and container keys may be employed by future implementations of alternative keymaster middleware.
During each object PUT, a random key is generated to encrypt the object body. This random key is then encrypted using the object key provided by the keymaster. This makes it safe to store the encrypted random key alongside the encrypted object data and metadata.
This process of key wrapping enables more efficient re-keying events when the object key may need to be replaced and consequently any data encrypted using that key must be re-encrypted. Key wrapping minimizes the amount of data encrypted using those keys to just other randomly chosen keys which can be re-wrapped efficiently without needing to re-encrypt the larger amounts of data that were encrypted using the random keys.
Note
Re-keying is not currently implemented. Key wrapping is implemented in anticipation of future re-keying operations.
Encryption middleware¶
The encryption middleware is composed of an encrypter component and a decrypter component.
Encrypter operation¶
Custom user metadata¶
The encrypter encrypts each item of custom user metadata using the object key provided by the keymaster and an IV that is randomly chosen for that metadata item. The encrypted values are stored as Object Transient-Sysmeta with associated crypto-metadata appended to the encrypted value. For example:
X-Object-Meta-Private1: value1
X-Object-Meta-Private2: value2
are transformed to:
X-Object-Transient-Sysmeta-Crypto-Meta-Private1:
E(value1, object_key, header_iv_1); swift_meta={"iv": header_iv_1,
"cipher": "AES_CTR_256"}
X-Object-Transient-Sysmeta-Crypto-Meta-Private2:
E(value2, object_key, header_iv_2); swift_meta={"iv": header_iv_2,
"cipher": "AES_CTR_256"}
The unencrypted custom user metadata headers are removed.
Object body¶
Encryption of an object body is performed using a randomly chosen body key and a randomly chosen IV:
body_ciphertext = E(body_plaintext, body_key, body_iv)
The body_key is wrapped using the object key provided by the keymaster and a randomly chosen IV:
wrapped_body_key = E(body_key, object_key, body_key_iv)
The encrypter stores the associated crypto-metadata in a system metadata header:
X-Object-Sysmeta-Crypto-Body-Meta:
{"iv": body_iv,
"cipher": "AES_CTR_256",
"body_key": {"key": wrapped_body_key,
"iv": body_key_iv}}
Note that in this case there is an extra item of crypto-metadata which stores the wrapped body key and its IV.
Entity tag¶
While encrypting the object body the encrypter also calculates the ETag (md5 digest) of the plaintext body. This value is encrypted using the object key provided by the keymaster and a randomly chosen IV, and saved as an item of system metadata, with associated crypto-metadata appended to the encrypted value:
X-Object-Sysmeta-Crypto-Etag:
E(md5(plaintext), object_key, etag_iv); swift_meta={"iv": etag_iv,
"cipher": "AES_CTR_256"}
The encrypter also forces an encrypted version of the plaintext ETag to be sent with container updates by adding an update override header to the PUT request. The associated crypto-metadata is appended to the encrypted ETag value of this update override header:
X-Object-Sysmeta-Container-Update-Override-Etag:
E(md5(plaintext), container_key, override_etag_iv);
meta={"iv": override_etag_iv, "cipher": "AES_CTR_256"}
The container key is used for this encryption so that the decrypter is able to decrypt the ETags in container listings when handling a container request, since object keys may not be available in that context.
Since the plaintext ETag value is only known once the encrypter has completed
processing the entire object body, the X-Object-Sysmeta-Crypto-Etag
and
X-Object-Sysmeta-Container-Update-Override-Etag
headers are sent after the
encrypted object body using the proxy server’s support for request footers.
Conditional Requests¶
In general, an object server evaluates conditional requests with
If[-None]-Match
headers by comparing values listed in an
If[-None]-Match
header against the ETag that is stored in the object
metadata. This is not possible when the ETag stored in object metadata has been
encrypted. The encrypter therefore calculates an HMAC using the object key and
the ETag while handling object PUT requests, and stores this under the metadata
key X-Object-Sysmeta-Crypto-Etag-Mac
:
X-Object-Sysmeta-Crypto-Etag-Mac: HMAC(object_key, md5(plaintext))
Like other ETag-related metadata, this is sent after the encrypted object body using the proxy server’s support for request footers.
The encrypter similarly calculates an HMAC for each ETag value included in
If[-None]-Match
headers of conditional GET or HEAD requests, and appends
these to the If[-None]-Match
header. The encrypter also sets the
X-Backend-Etag-Is-At
header to point to the previously stored
X-Object-Sysmeta-Crypto-Etag-Mac
metadata so that the object server
evaluates the conditional request by comparing the HMAC values included in the
If[-None]-Match
with the value stored under
X-Object-Sysmeta-Crypto-Etag-Mac
. For example, given a conditional request
with header:
If-Match: match_etag
the encrypter would transform the request headers to include:
If-Match: match_etag,HMAC(object_key, match_etag)
X-Backend-Etag-Is-At: X-Object-Sysmeta-Crypto-Etag-Mac
This enables the object server to perform an encrypted comparison to check whether the ETags match, without leaking the ETag itself or leaking information about the object body.
Decrypter operation¶
For each GET or HEAD request to an object, the decrypter inspects the response for encrypted items (revealed by crypto-metadata headers), and if any are discovered then it will:
- Fetch the object and container keys from the keymaster via its callback
- Decrypt the
X-Object-Sysmeta-Crypto-Etag
value - Decrypt the
X-Object-Sysmeta-Container-Update-Override-Etag
value - Decrypt metadata header values using the object key
- Decrypt the wrapped body key found in
X-Object-Sysmeta-Crypto-Body-Meta
- Decrypt the body using the body key
For each GET request to a container that would include ETags in its response body, the decrypter will:
- GET the response body with the container listing
- Fetch the container key from the keymaster via its callback
- Decrypt any encrypted ETag entries in the container listing using the container key
Impact on other Swift services and features¶
Encryption has no impact on Object Versioning other than that any
previously unencrypted objects will be encrypted as they are copied to or from
the versions container. Keymaster and encryption middlewares should be placed
after versioned_writes
in the proxy server pipeline, as described in
Deployment and operation.
Container Sync uses an internal client to GET objects that are to be sync’d. This internal client must be configured to use the keymaster and encryption middlewares as described above.
Encryption has no impact on the object-auditor service. Since the ETag header saved with the object at rest is the md5 sum of the encrypted object body then the auditor will verify that encrypted data is valid.
Encryption has no impact on the object-expirer service. X-Delete-At
and
X-Delete-After
headers are not encrypted.
Encryption has no impact on the object-replicator and object-reconstructor services. These services are unaware of the object or EC fragment data being encrypted.
Encryption has no impact on the container-reconciler service. The container-reconciler uses an internal client to move objects between different policy rings. The destination object has the same URL as the source object and the object is moved without re-encryption.
Considerations for developers¶
Developers should be aware that keymaster and encryption middlewares rely on
the path of an object remaining unchanged. The included keymaster derives keys
for containers and objects based on their paths and the
encryption_root_secret
. The keymaster does not rely on object metadata to
inform its generation of keys for GET and HEAD requests because when handling
Conditional Requests it is required to provide the object key before any
metadata has been read from the object.
Developers should therefore give careful consideration to any new features that would relocate object data and metadata within a Swift cluster by means that do not cause the object data and metadata to pass through the encryption middlewares in the proxy pipeline and be re-encrypted.
The crypto-metadata associated with each encrypted item does include some key_id metadata that is provided by the keymaster and contains the path used to derive keys. This key_id metadata is persisted in anticipation of future scenarios when it may be necessary to decrypt an object that has been relocated without re-encrypting, in which case the metadata could be used to derive the keys that were used for encryption. However, this alone is not sufficient to handle conditional requests and to decrypt container listings where objects have been relocated, and further work will be required to solve those issues.


Web-Responsive Applications!
http://www.agroseal.com/
Python Programmer!
https://github.com/ednasawe
Teach Kids Robotics!
https://www.linkedin.com/in/sawe-edna-65765baa/


Protest against book
DC book Fair closed down temporarily in Kannur
by Staff ReporterDC Books mega book fair at the Town Square here had to be temporarily closed down after a group of protesters who came to attend the farmers protest march organised by the Thallassery Archidocese allegedly stormed into the fair where the book written by Sister Lucy Kalapura's autobiography titled Karthavinte Namathil was kept for sale.
After protesters marched to the venue demanding closure of the book fair, few more joined them from the Collectorate group, the venue where the farmers protest march was organised. The commotion also caused huge traffic block on the road for for some time.
Following which the book fair was temporarily shut down to avert tension. However the book fair later resumed under police protection.
Sister Lisiya Joseph of the Sisters of Mary Immaculate Congregation had filed a petition in the High Court last week demanding a ban on printing and distribution of the book.