JSON
public struct JSON
extension JSON: Swift.Collection
extension JSON: Swift.ExpressibleByStringLiteral
extension JSON: Swift.ExpressibleByIntegerLiteral
extension JSON: Swift.ExpressibleByBooleanLiteral
extension JSON: Swift.ExpressibleByFloatLiteral
extension JSON: Swift.ExpressibleByDictionaryLiteral
extension JSON: Swift.ExpressibleByArrayLiteral
extension JSON: Swift.RawRepresentable
extension JSON: Swift.CustomStringConvertible, Swift.CustomDebugStringConvertible
extension JSON: Swift.Comparable
extension JSON: Codable
todo
Remark
This should be ‘public’ for internal usage at MindAffect, but ‘internal’ for external users of the framework.-
Creates a JSON using the data.
Declaration
Swift
public init(data: Data, options opt: JSONSerialization.ReadingOptions = []) throws
Parameters
data
The NSData used to convert to json.Top level object in data is an NSArray or NSDictionary
opt
The JSON serialization reading options.
[]
by default.Return Value
The created JSON
-
Creates a JSON object
Note
this does not parse a
String
into JSON, instead useinit(parseJSON: String)
Declaration
Swift
public init(_ object: Any)
Parameters
object
the object
Return Value
the created JSON object
-
Parses the JSON string into a JSON object
Declaration
Swift
public init(parseJSON jsonString: String)
Parameters
json
the JSON string
Return Value
the created JSON object
-
Merges another JSON into this JSON, whereas primitive values which are not present in this JSON are getting added, present values getting overwritten, array values getting appended and nested JSONs getting merged the same way.
Throws
throws
ErrorWrongType
if the other JSONs differs in type on the top level.Declaration
Swift
public mutating func merge(with other: JSON) throws
Parameters
other
The JSON which gets merged into this JSON
-
Merges another JSON into this JSON and returns a new JSON, whereas primitive values which are not present in this JSON are getting added, present values getting overwritten, array values getting appended and nested JSONS getting merged the same way.
Throws
throws
ErrorWrongType
if the other JSONs differs in type on the top level.Declaration
Swift
public func merged(with other: JSON) throws -> JSON
Parameters
other
The JSON which gets merged into this JSON
Return Value
New merged JSON
-
JSON type, fileprivate setter
Declaration
Swift
public fileprivate(set) var type: JSONType
-
Error in JSON, fileprivate setter
Declaration
Swift
public fileprivate(set) var error: SwiftyJSONError?
-
Object in JSON
Declaration
Swift
public var object: Any { get set }
-
Undocumented
Declaration
Swift
public static var null: JSON { get }
-
Declaration
Swift
public typealias Index = JSONRawIndex
-
Declaration
Swift
public var startIndex: Index { get }
-
Declaration
Swift
public var endIndex: Index { get }
-
Declaration
Swift
public subscript(position: Index) -> (String, JSON) { get }
-
Find a json in the complex data structures by using array of Int and/or String as path.
Example:
let json = JSON[data] let path = [9,"list","person","name"] let name = json[path]
The same as: let name = json[9][“list”][“person”][“name”]
Declaration
Swift
public subscript(path: [JSONSubscriptType]) -> JSON { get set }
Parameters
path
The target json’s path.
Return Value
Return a json found by the path or a null json with error
-
Find a json in the complex data structures by using array of Int and/or String as path.
let name = json[9,“list”,“person”,“name”]
The same as: let name = json[9][“list”][“person”][“name”]
Declaration
Swift
public subscript(path: JSONSubscriptType...) -> JSON { get set }
Parameters
path
The target json’s path. Example:
Return Value
Return a json found by the path or a null json with error
-
Declaration
Swift
public init(stringLiteral value: StringLiteralType)
-
Declaration
Swift
public init(extendedGraphemeClusterLiteral value: StringLiteralType)
-
Declaration
Swift
public init(unicodeScalarLiteral value: StringLiteralType)
-
Declaration
Swift
public init(integerLiteral value: IntegerLiteralType)
-
Declaration
Swift
public init(booleanLiteral value: BooleanLiteralType)
-
Declaration
Swift
public init(floatLiteral value: FloatLiteralType)
-
Declaration
Swift
public init(dictionaryLiteral elements: (String, Any)...)
-
Declaration
Swift
public init(arrayLiteral elements: Any...)
-
Declaration
Swift
public init?(rawValue: Any)
-
Declaration
Swift
public var rawValue: Any { get }
-
Undocumented
Declaration
Swift
public func rawData(options opt: JSONSerialization.WritingOptions = JSONSerialization.WritingOptions(rawValue: 0)) throws -> Data
-
Undocumented
Declaration
Swift
public func rawString(_ encoding: String.Encoding = .utf8, options opt: JSONSerialization.WritingOptions = .prettyPrinted) -> String?
-
Undocumented
Declaration
Swift
public func rawString(_ options: [writingOptionsKeys : Any]) -> String?
-
Declaration
Swift
public var description: String { get }
-
Declaration
Swift
public var debugDescription: String { get }
-
Undocumented
Declaration
Swift
public var array: [JSON]? { get }
-
Undocumented
Declaration
Swift
public var arrayValue: [JSON] { get }
-
Undocumented
Declaration
Swift
public var arrayObject: [Any]? { get set }
-
Undocumented
Declaration
Swift
public var dictionary: [String : JSON]? { get }
-
Undocumented
Declaration
Swift
public var dictionaryValue: [String : JSON] { get }
-
Undocumented
Declaration
Swift
public var dictionaryObject: [String : Any]? { get set }
-
Undocumented
Declaration
Swift
public var bool: Bool? { get set }
-
Undocumented
Declaration
Swift
public var boolValue: Bool { get set }
-
Undocumented
Declaration
Swift
public var string: String? { get set }
-
Undocumented
Declaration
Swift
public var stringValue: String { get set }
-
Undocumented
Declaration
Swift
public var number: NSNumber? { get set }
-
Undocumented
Declaration
Swift
public var numberValue: NSNumber { get set }
-
Undocumented
Declaration
Swift
public var null: NSNull? { get set }
-
Undocumented
Declaration
Swift
public func exists() -> Bool
-
Undocumented
Declaration
Swift
public var url: URL? { get set }
-
Undocumented
Declaration
Swift
public var double: Double? { get set }
-
Undocumented
Declaration
Swift
public var doubleValue: Double { get set }
-
Undocumented
Declaration
Swift
public var float: Float? { get set }
-
Undocumented
Declaration
Swift
public var floatValue: Float { get set }
-
Undocumented
Declaration
Swift
public var int: Int? { get set }
-
Undocumented
Declaration
Swift
public var intValue: Int { get set }
-
Undocumented
Declaration
Swift
public var uInt: UInt? { get set }
-
Undocumented
Declaration
Swift
public var uIntValue: UInt { get set }
-
Undocumented
Declaration
Swift
public var int8: Int8? { get set }
-
Undocumented
Declaration
Swift
public var int8Value: Int8 { get set }
-
Undocumented
Declaration
Swift
public var uInt8: UInt8? { get set }
-
Undocumented
Declaration
Swift
public var uInt8Value: UInt8 { get set }
-
Undocumented
Declaration
Swift
public var int16: Int16? { get set }
-
Undocumented
Declaration
Swift
public var int16Value: Int16 { get set }
-
Undocumented
Declaration
Swift
public var uInt16: UInt16? { get set }
-
Undocumented
Declaration
Swift
public var uInt16Value: UInt16 { get set }
-
Undocumented
Declaration
Swift
public var int32: Int32? { get set }
-
Undocumented
Declaration
Swift
public var int32Value: Int32 { get set }
-
Undocumented
Declaration
Swift
public var uInt32: UInt32? { get set }
-
Undocumented
Declaration
Swift
public var uInt32Value: UInt32 { get set }
-
Undocumented
Declaration
Swift
public var int64: Int64? { get set }
-
Undocumented
Declaration
Swift
public var int64Value: Int64 { get set }
-
Undocumented
Declaration
Swift
public var uInt64: UInt64? { get set }
-
Undocumented
Declaration
Swift
public var uInt64Value: UInt64 { get set }
-
Declaration
Swift
public init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws


Message¶
-
class
O365.message.
Flag
(value)[source]¶ Bases:
O365.utils.utils.CaseEnum
An enumeration.
-
Complete
= 'complete'¶
-
Flagged
= 'flagged'¶
-
NotFlagged
= 'not_flagged'¶
-
-
class
O365.message.
MeetingMessageType
(value)[source]¶ Bases:
O365.utils.utils.CaseEnum
An enumeration.
-
MeetingAccepted
= 'meeting_accepted'¶
-
MeetingCancelled
= 'meeting_cancelled'¶
-
MeetingDeclined
= 'meeting_declined'¶
-
MeetingRequest
= 'meeting_request'¶
-
MeetingTentativelyAccepted
= 'meeting_tentatively_accepted'¶
-
-
class
O365.message.
Message
(*, parent=None, con=None, **kwargs)[source]¶ Bases:
O365.utils.utils.ApiComponent
,O365.utils.attachment.AttachableMixin
,O365.utils.utils.HandleRecipientsMixin
Management of the process of sending, receiving, reading, and editing emails.
-
__init__
(*, parent=None, con=None, **kwargs)[source]¶ Makes a new message wrapper for sending and receiving messages.
- Parameters
parent (mailbox.Folder or Account) – parent folder/account to create the message in
con (Connection) – connection to use if no parent specified
protocol (Protocol) – protocol to use if no parent specified (kwargs)
main_resource (str) – use this resource instead of parent resource (kwargs)
download_attachments (bool) – whether or not to download attachments (kwargs)
-
property
attachments
¶ List of attachments
-
property
bcc
¶ ‘BCC’ list of recipients
-
property
body
¶ Body of the email message
- Getter
Get body text of current message
- Setter
set html body of the message
- Type
str
-
property
body_preview
¶ Returns the body preview
-
property
categories
¶ Categories of this message
- Getter
Current list of categories
- Setter
Set new categories for the message
- Type
list[str] or str
-
property
cc
¶ ‘CC’ list of recipients
-
copy
(folder)[source]¶ Copy the message to a given folder
- Parameters
folder (str or mailbox.Folder) – Folder object or Folder id or Well-known name to copy this message to
- Returns
the copied message
- Return type
-
property
created
¶ Created time of the message
-
property
flag
¶ The Message Flag instance
-
forward
()[source]¶ Creates a new message that is a forward this message
- Returns
new message
- Return type
-
get_body_soup
()[source]¶ Returns the beautifulsoup4 of the html body
- Returns
BeautifulSoup object of body
- Return type
BeautifulSoup
-
get_body_text
()[source]¶ Parse the body html and returns the body text using bs4
- Returns
body as text
- Return type
str
-
property
importance
¶ Importance of the message
- Getter
Get the current priority of the message
- Setter
Set a different importance level
- Type
str or ImportanceLevel
-
property
is_delivery_receipt_requested
¶ if the delivery receipt is requested for this message
- Getter
Current state of isDeliveryReceiptRequested
- Setter
Set isDeliveryReceiptRequested for the message
- Type
bool
-
property
is_draft
¶ Check if the message is marked as draft
- Type
bool
-
property
is_event_message
¶ Returns if this message is of type EventMessage and therefore can return the related event.
-
property
is_read
¶ Check if the message is read or not
- Getter
Get the status of message read
- Setter
Mark the message as read
- Type
bool
-
property
is_read_receipt_requested
¶ if the read receipt is requested for this message
- Getter
Current state of isReadReceiptRequested
- Setter
Set isReadReceiptRequested for the message
- Type
bool
-
mark_as_read
()[source]¶ Marks this message as read in the cloud
- Returns
Success / Failure
- Return type
bool
-
mark_as_unread
()[source]¶ Marks this message as unread in the cloud
- Returns
Success / Failure
- Return type
bool
-
property
meeting_message_type
¶ If this message is a EventMessage, returns the meeting type: meetingRequest, meetingCancelled, meetingAccepted,
meetingTentativelyAccepted, meetingDeclined
-
property
modified
¶ Message last modified time
-
move
(folder)[source]¶ Move the message to a given folder
- Parameters
folder (str or mailbox.Folder) – Folder object or Folder id or Well-known name to move this message to
- Returns
Success / Failure
- Return type
bool
-
property
received
¶ Message received time
-
reply
(to_all=True)[source]¶ Creates a new message that is a reply to this message
- Parameters
to_all (bool) – whether or not to replies to all the recipients instead to just the sender
- Returns
new message
- Return type
-
property
reply_to
¶ Reply to address
-
save_as_eml
(to_path=None)[source]¶ Saves this message as and EML to the file system :param Path or str to_path: the path where to store this file
-
save_draft
(target_folder=<OutlookWellKnowFolderNames.DRAFTS: 'Drafts'>)[source]¶ Save this message as a draft on the cloud
- Parameters
target_folder – name of the drafts folder
- Returns
Success / Failure
- Return type
bool
-
save_message
()[source]¶ Saves changes to a message. If the message is a new or saved draft it will call ‘save_draft’ otherwise this will save only properties of a message that are draft-independent such as:
is_read
category
flag
- Returns
Success / Failure
- Return type
bool
-
send
(save_to_sent_folder=True)[source]¶ Sends this message
- Parameters
save_to_sent_folder (bool) – whether or not to save it to sent folder
- Returns
Success / Failure
- Return type
bool
-
property
sender
¶ Sender of the message
- Getter
Get the current sender
- Setter
Update the from address with new value
- Type
str or Recipient
-
property
sent
¶ Message sent time
-
property
subject
¶ Subject of the email message
- Getter
Get the current subject
- Setter
Assign a new subject
- Type
str
-
property
to
¶ ‘TO’ list of recipients
-
to_api_data
(restrict_keys=None)[source]¶ Returns a dict representation of this message prepared to be send to the cloud
- Parameters
restrict_keys (dict or set) – a set of keys to restrict the returned data to
- Returns
converted to cloud based keys
- Return type
dict
-
property
unique_body
¶ - The unique body of this message
Requires a select to retrieve it.
- Return type
str
-
-
class
O365.message.
MessageFlag
(parent, flag_data)[source]¶ Bases:
O365.utils.utils.ApiComponent
A flag on a message
-
__init__
(parent, flag_data)[source]¶ An flag on a message Not available on Outlook Rest Api v2 (only in beta)
- Parameters
parent (Message) – parent of this
flag_data (dict) – flag data from cloud
-
property
completition_date
¶
-
property
due_date
¶
-
property
is_completed
¶
-
property
is_flagged
¶
-
set_completed
(*, completition_date=None)[source]¶ Sets this message flag as completed :param completition_date: the datetime this followUp was completed
-
set_flagged
(*, start_date=None, due_date=None)[source]¶ Sets this message as flagged :param start_date: the start datetime of the followUp :param due_date: the due datetime of the followUp
-
property
start_date
¶
-
property
status
¶
-


Next
Introducing the ArchivesSpace REST API using Python 3
R. S. Doiel
Digital Services Programmer
Caltech Library
Mark Custer
Archivist and Metadata Coordinator
Beinecke Rare Book and Manuscript Library
Yale University Library
Download these slides and examples


Hard working, dedicated and a confident professional with strong academic background, skills and experience aiming to work in a firm with a professional work driven environment which would enable me to grow while fulfilling organizational goals.
My ambition is to work at the forefront of the technology with the ability to find innovative solutions to the changing needs. I believe that I possess the motivation, intellectual ability and sincerity to set out on this exhilarating path with absolute commitment.
• Software Engineer responsible for developing Ruby on Rails healthcare-centric applications and services for creating, monitoring, reviewing acute and chronic problems, procedures performed during an encounter or past encounters.
• Collaborate on component level technical designs and identify process improvements to support development ecosystem.
• Work on RSpec unit testing framework for Ruby, Jest for testing React applications and Selenium WebDriver tool for automating web application testing. Used ESLint linter rules to maintain the JavaScript code for all the components developed.
• Analyze logs from Splunk to identify application bottlenecks and provide software release support using Spinnaker.
• Collaborate with UX experts to build high quality, compelling software products that solve important health care problems.
Software Developer at Karsun Innovation Center (KIC) working for GoLeanIO project which delivers detailed views of key performance, health and diagnostic metrics across the dimensions of progress, code quality and DevOps.
• Responsible for extracting data from JIRA and Bitbucket, performing data analysis for the lean management toolkit for addressing the continuous governance in Agile and DevOps.
• Generate normalized visualizations with the data collected from multiple projects with varying processes for simplified comparison.
• Experience in implementing REST Service and backend development using Java, SQL.
• Considerate experience in Relational database design, query optimization and stored procedures.
Mobile and web applications development training
GPA: 3.8
GPA: 3.98
Built using Java programming to implement Creation of Blocks, Digital Signature using SHA256. Implementing Proof of Work System, Checking integrity of the Blockchain. Wallets with public, private keys using Elliptic Curve Cryptography, Transactions of crypto currency.
Tools/Technology: Java, Eclipse
Cloud Computing Project that focusses on applying Machine Learning algorithm (Multi Variate Linear Regression Model) to train Crime Rate data set and to predict crime rate, police funding and educational attainment with highest accuracy. Used Google Cloud Storage to store predicted results, Google Big Query to query the storage and visualized live results using Data Studio. Built Google Cloud infrastructure using terraform and automation using PowerShell scripts.
AWS:: Stored model in S3, Scala application to poll data from SQS and store results in DynamoDB and Quick Sight for visualization.
Tools/Technology: Python programming, PyCharm, Google Cloud Platform: Google Cloud Bucket, Google Big Query and Google Data Studio, Terraform, PowerShell Scripting. AWS: S3, DynamoDB, QuickSight
Database focused project that manages resident’s information, guests, packages, café orders, balance and stock. Used C# .NET, .NET Framework, MVC and SQL Server for backend development. Resident’s balance gets deducted on every café purchase. Keeps track of number of items available in stock with every café order or equipment check-out. Implemented Relational database design, stored procedures, constraints, triggers and query optimization.
Tools/Technology: MS SQL Server, .NET Framework, C# programming
Developed android mobile application for Stress Management using Ionic Framework and Java programming. Integrated YouTube for motivational videos, Books API, NY Times API for world news, Interactive stress reliever games, and Music Player. Foursquare API to have location-based experience in the application which locates nearby dance, yoga classes.
Tools/Technology: Ionic Framework, Java, Android Studio, JavaScript, Angular JS
Developed a web application for the judges to score the hackathon participants and teams. Used Google Charts API that allows judges to view scores efficiently. Use case offered by H&R Block during Hackathon 2016
Tools/Technology: JavaScript, HTML5, CSS3, MongoDB, Java programming.
Developed an online event based catering application where users can: o select among various packages like Gold, Platinum or user-customized package. o view the image and price of each food item. o view nearest party-plot using Google Maps API.
Tools/Technology: Objective C programming and Xcode tool.
Apart from being a software developer, I enjoy photography and listening to music.
I am a trained classical singer. I enjoy singing.
 I utilize the tremendous amount of online courses which has boosted my confidence to learn new tools and technology.


05 Feb 2015
Let's say we have a Todo's app, where we allow our users to create a new todo. We also want to show errors when validation errors occur:
#new.html.haml
%section.new_todo
%h3 Add a new todo
= form_for @todo do |f|
= f.label :name, "Name"
= f.text_field :name
= f.label :description, rows: 6
%br
= f.submit "Add This Todo"
The issue with this code above is that it is not pulling in the
errors on the Todos object.
We could:
#new.html.haml
%section.new_todo
%h3 Add a new todo
= form_for @todo do |f|
<EMAIL_ADDRESS>= f.label :name, "Name"
= f.text_field :name
...but this is cumbersome to do for each form.
Lets create a helper called MyFormBuilder that will customize the label:
class MyFormBuilder < ActionView::Helpers::FormBuilder
def label(method, text = nil, options = {}, &block)
errors = object.errors[method.to_sym]
if errors
text += " #{errors.first}" #pull the first error from the errors object (an array)
end
super(method, text.html_safe, options, &block) #delegates control back to the custom form builder
end
end
Update new.html.haml, make sure you add "MyFormBuilder" to your form_for block:
%section.new_todo
%h3 Add a new todo
= form_for @todo, builder: MyFormBuilder do |f|
= f.label :name, "Name"
= f.text_field :name
= f.label :description, rows: 6
%br
= f.submit "Add This Todo"
Alternate Option: my_ form_ for helper
This is still somewhat repetitive. Let's create a my_ form_ for helper. We can manually merge in the myformfor rather passing in the MyFormBuilder:
app/helpers/my_form_builder.rb
module ApplicationHelper
def my_form_for(record, options = {}, &proc) #takes 3 arguements
form_for(record, options.merge!({builder: MyFormBuidler}), &proc)
end
end
Update the new.html.haml
%section.new_todo
%h3 Add a new todo
= my_form_for @todo do |f|
= f.label :name, "Name"
= f.text_field :name
= f.label :description, rows: 6
%br
= f.submit "Add This Todo"
Custom Form Builders in The Wild!
1. Formtastic
- You can use semantic form_ for
2. Simple_form (creators of devise)
- allows integration with Twitter Bootstrap & Zurb Foundation 3
- is not best for those with alot of customization
- has default mapping - which is not the best for complex forms
3. BootstapForm
- minimal dsl
- similar flow/syntax to Rails
01 Feb 2015
Generalization or Trianglization:
Writing general code
Red-Green Refactor
TDD is a discipline for writing code, writing developer (unit) tests, and doing design work in an integrated approach. A useful mnemonic for remembering the basic TDD cycle is "red > green > refactor." Here is a short summary of each of the steps.
RED
Start by thinking of a behavior you want the software to have which could be implemented by a few lines of code (fewer than five is a good target). Then write a test (also only a few lines of code) that will fail unless that behavior is present.
GREEN
Write just enough code to get the test to pass. Focus on: Getting something to work. Simplest possible implementation, rather than the most elegant solution (even hard-coded values are okay).
REFACTOR
Now that the code does what you want, use refactoring to make the design right. Making the code readable and eliminating duplication.
The cycle then repeats with each new behavior you want to have. The entire cycle should take between 5-10 minutes.
A couple of last points to emphasize:
Tests are checked in with the rest of the code (they are essentially living documentation of the code)
Tests are run with every build
Good Article by Kent Beck: Test Driven Development
28 Jan 2015
There are several ways to integrate testing into your workflow:
1. Code First, Test Later
Benefit: Guard against regression
2. Code a Little, Test a Little
Benefit: Feedback loop is shorter
3. Test First Development
Where you write the test first, run it and make sure it fails then after which you write the code to
make it pass. It challenges to think about your expected result upfront and you're able to lock in your behavior
while working towards that
4. Test Driven Development (TDD)
Test, not only to test with an expected result in mind but you write test to interactively build up (drive out) your
implementation code.
Benefit: people normally gravitate towards TDD, when they have an end goal that is complex in nature so they start
with the simple and build up on complexity gradually.
5. Test Driven Design (TDDe)
Similar to Test Driven Development, except TDD is more logic and locally focused. while TDDe is more
expanding to the system level, more focused on the architecture (the interaction or collaboration b/w components in
your system - describing the interactions b/w various objects)
26 Jan 2015
How to create a branch and checkout at the same time:
- Anything in the master branch is deployable
- To work on something new, create a descriptively named branch off of master (ie: new-oauth2-scopes)
- Commit to that branch locally and regularly push your work to the same named branch on the server
- When you need feedback or help, or you think the branch is ready for merging, open a pull request
- After someone else has reviewed and signed off on the feature, you can merge it into master
- Once it is merged and pushed to ‘master’, you can and should deploy immediately
Read more: A successful Git branching model
23 Jan 2015
- Add Rspec to your gemfile, make sure to include in both test and development:
group :test, :development do
gem 'rspec-rails'
end
- rails g rspec:install
Generates three items:
1. .rspec file - contains "color".. just means you want your output to be color-coded
2. spec folder
3. spec helper - where configuration goes
Create models folder inside spec folder
Create a todo_spec.rb within the models folder (name of model)
Within todo_spec.rb you must:
require 'spec_helper'
describe Todo do
it "saves itself" do
todo = Todo.new(name: "cook dinner", description: "love me some din din")
todo.save
Todo.first.name.should == "cook dinner"
end
end
** "it" is a keyword that begins each test
** "do" implements the test
** .should is another keyword will test to see if we have the desired result.
** == is the matcher
How to run rspec outside of Rails
- Create a project folder
- Inside the project folder, create a lib folder. Your code that you're testing will go inside here.
- Create another folder: spec, where your .spec test files will go.
- Make sure to require your code files inside your specs.


Search
Preparing search index...


Tables
Documentation and examples for opt-in styling of tables (given their prevalent use in JavaScript plugins) with Bootstrap.
Examples
Due to the widespread use of tables across third-party widgets like calendars and date pickers, we’ve designed our tables to be opt-in. Just add the base class .table
to any

, then extend with custom styles or our various included modifier classes.
Using the most basic table markup, here’s how .table
-based tables look in Bootstrap. All table styles are inherited in Bootstrap 4, meaning any nested tables will be styled in the same manner as the parent.
| # | First | Last | Handle |
|---|---|---|---|
| 1 | Mark | Otto | @mdo |
| 2 | Jacob | Thornton | @fat |
| 3 | Larry | the Bird |

#
First
Last
Handle

1
Mark
Otto
@mdo

2
Jacob
Thornton
@fat

3
Larry
the Bird
@twitter

Striped rows
Use .table-striped
to add zebra-striping to any table row within the

.
| # | First | Last | Handle |
|---|---|---|---|
| 1 | Mark | Otto | @mdo |
| 2 | Jacob | Thornton | @fat |
| 3 | Larry | the Bird |

#
First
Last
Handle

1
Mark
Otto
@mdo

2
Jacob
Thornton
@fat

3
Larry
the Bird
@twitter

Bordered table
| # | First | Last | Handle |
|---|---|---|---|
| 1 | Mark | Otto | @mdo |
| 2 | Jacob | Thornton | @fat |
| 3 | Larry | the Bird |

#
First
Last
Handle

1
Mark
Otto
@mdo

2
Jacob
Thornton
@fat

3
Larry
the Bird
@twitter

Responsive tables
Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by wrapping a .table
with .table-responsive
. Or, pick a maximum breakpoint with which to have a responsive table up to by using .table-responsive{-sm|-md|-lg|-xl}
.
Vertical clipping/truncation
Responsive tables make use of overflow-y: hidden
, which clips off any content that goes beyond the bottom or top edges of the table. In particular, this can clip off dropdown menus and other third-party widgets.
Always responsive
Across every breakpoint, use .table-responsive
for horizontally scrolling tables.
| # | Heading | Heading | Heading | Heading | Heading | Heading | Heading | Heading | Heading |
|---|---|---|---|---|---|---|---|---|---|
| 1 | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell |
| 2 | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell |
| 3 | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell |

...

Breakpoint specific
Use .table-responsive{-sm|-md|-lg|-xl}
as needed to create responsive tables up to a particular breakpoint. From that breakpoint and up, the table will behave normally and not scroll horizontally.
| # | Heading | Heading | Heading | Heading | Heading |
|---|---|---|---|---|---|
| 1 | Cell | Cell | Cell | Cell | Cell |
| 2 | Cell | Cell | Cell | Cell | Cell |
| 3 | Cell | Cell | Cell | Cell | Cell |
| # | Heading | Heading | Heading | Heading | Heading |
|---|---|---|---|---|---|
| 1 | Cell | Cell | Cell | Cell | Cell |
| 2 | Cell | Cell | Cell | Cell | Cell |
| 3 | Cell | Cell | Cell | Cell | Cell |
| # | Heading | Heading | Heading | Heading | Heading |
|---|---|---|---|---|---|
| 1 | Cell | Cell | Cell | Cell | Cell |
| 2 | Cell | Cell | Cell | Cell | Cell |
| 3 | Cell | Cell | Cell | Cell | Cell |
| # | Heading | Heading | Heading | Heading | Heading |
|---|---|---|---|---|---|
| 1 | Cell | Cell | Cell | Cell | Cell |
| 2 | Cell | Cell | Cell | Cell | Cell |
| 3 | Cell | Cell | Cell | Cell | Cell |

...

...

...

...


bower install pure-extras
You can fork it from Github too.
Styling of three different types are available for images, eliptical, rounded, bordered.
To use them, just add one of these classes to the
tag
When using class pure-img-eliptical
, if the width and height of the image
are equal, it will appear as a circle. Otherwise, it will appear as an ellipse.
Add the class pure-thumbnails
to the container

,
Then add one of the classes, pure-thumb-eliptical
, pure-thumb-rounded
, or pure-thumb-bordered
, to the
.
Adding a

allows you to customize the thumbnail with additional content.
if you have YUI grids on the page, add pure-u-*
for multi-column thumbnails that scale to fit the columns.
To create a badge, use a
tag, and add one of the badge classes as shown below.
Create alerts by adding a class to it's

.
The default alert can be set by adding the pure-alert
class name.
Alerts in red have the connotation of something going wrong. The error alert can be set by appending the pure-alert-error
class name in addition to the pure-alert
class name.
If you want to send a warning notification, use the warning alert. It can be set by appending the pure-alert-warning
class name in addition to the pure-alert
class name.
Mission successful? Use the Success Alert! It can be set by appending the pure-alert-succes
class name in addition to the pure-alert
class name.
You have no new notifications.
Receive notifications when you comment or discuss content with friends on Yahoo!
You have no new notifications.
Receive notifications when you comment or discuss content with friends on Yahoo!
You have no new notifications.
Receive notifications when you comment or discuss content with friends on Yahoo!
You have no new notifications.
Receive notifications when you comment or discuss content with friends on Yahoo!
You can use grids within these contextual menus for interesting effects.
Buttons are provided through the cssbutton
, so you'll need the following stylesheet:
cssbutton
provides the basic button styles, but CSSExtras adds more styling on top of that, as seen below.
Secondary Error Success Warning
Large buttons have twice the padding of regular buttons. Apply the pure-button-large
class name.
Small buttons have half the padding of regular buttons. Apply the pure-button-small
class name.


Leonard Chan PiJoules
- Gotta increase that Github score
- Not in Kansas
-<EMAIL_ADDRESS>- http://leonardchan.me/
- Joined on
Popular repositories
- MLG-ifier 3 A chrome extension that will turn those cheeky websites into Reddit 420 blaze it blunts that MLG pros will find euphoric.
- atchannel 2 The goal of this repo is to replicate the @channel as seen in the anime Steins;Gate
- OCR 1 An optical character recognizer that I tried to work on one time but probably won't have time to finish any time soon. Hopefully I will come back to this.
- Polygon 1 Android app for EPED 2
- flipboard-layout 1 An experimental page layout that let's you navigate pages by swiping or dragging as in a booklet, inspired by Flipboard.
Repositories contributed to
- 3341B-is-dank-temporary-name/website 0 1v1 me m80s
- jmal0/quotesmyquotes-website 0 I wrote this song
- awwx/meteor-mongo-counter 6 Atomic counters stored in MongoDB.
- jmal0/Pente 0 A java implementation of the board game Pente
- catfan/Medoo 1,260 The lightest PHP database framework to accelerate development
Contributions
Contributions in the last year
253 total
May 11, 2014 – May 11, 2015
Longest streak
17 days
March 20 –
April 5
Current streak
3 days
May 8 –
May 10


World’s Only Brown Panda Who Was Bullied as a Cub Finally Gets Adopted
by Carl SamsonQizai, the world’s only known brown panda in captivity, has been adopted by a U.S.-based charity last week.
The male bear, aged 10 — equivalent to 30 human years — is said to possess his unique brown-and-white coat as a result of genetic anomaly.
Qizai was adopted by Pandas International, a Colorado-based nonprofit founded by Suzanne Braden and Diane Rees in 2000 committed to the conservation of pandas.
However, he will continue living in Qinling Giant Panda Research Center, located in Shaanxi province, northwestern China.
Rescued as a two-month-old cub, Qizai, whose name means “seventh son,” was first brought to the Shaanxi Rare Wildlife Rescue, Breeding and Research Center for feeding and medical treatment.
He was eventually attended by his current keeper, He Xin, who spends up to 18 hours a day taking care of him.
According to He, Qizai was “bullied” by his black-and-white peers, who took away and ate his bamboo when he was little.
“When I call out their names, the other black-and-white pandas would react and come to me quickly, but for Qizai, it usually takes some time for him to realize that,” He said in a 2016 interview.
Last year, Qizai made headlines when his caretakers prepared him for his first natural mating attempt.
He was paired with Zhuzhu, an “energetic” panda who has given birth to four healthy cubs at the time.
While the pair have shown interest toward each other, they failed to copulate after several attempts.
Without any other option, researchers decided to artificially inseminate Zhuzhu with Qizai’s sperm, but it did not work out and Zhuzhu received another insemination in March 2019 (which produced twins).
With Qizai’s adoption, Pandas International is granted access to him and will receive regular updates about his life.
The Chinese breeding center allowed the organization to adopt Qizai for life to thank them for helping in their daily work and donating vaccines, lab instruments, baby panda cribs and milk powder, according to Xinhua.
Only five brown-and-white pandas have been spotted since 1985, making them a rare part of a species already vulnerable in numbers.
There are currently 1,864 pandas living in the wild around the world, according to World Wildlife.
Images via Xinhua


--- layout: page title: Infotip ---
Infotip is a click-activated flyout.
Use TAB key to reach infotip button, then use ENTER or SPACEBAR to expand content.
Please read the documentation to understand how these examples were created.
This is a infotip with static content.
This is an infotip with interactive content.
Updated: Feb 12th, 2020


{% extends "base.html" %} {% load blog_tags %} {% block title %} {{ post.title }} {% endblock %} {% block content %}
{{post.body|safe}}
Have no similar posts
Comment {{ forloop.counter }} by {{ comment.name }} {{ comment.created }}
There are no comments yet.
Comment {{ forloop.counter }} by {{ comment.name }} {{ comment.created }}
{{ comment.body|linebreaks }}


Cuberific
Cuberific is a Rubik’s Cube timer web application. The back end service is written in Go Golang.org. The front end is an Angular JS application. On the web server front Nginx was used to serve the Angular JS application and proxy the Go web service. For the database MongoDB was used.
THIS APPLICATION IS NOT READY FOR PRODUCTION USE
Shortcuts were taken with some aspects of security and would need to be fixed before used in production.
- Currently no password to connect to mongo
- API Security needs more work.
Disclaimer
If you find and errors with this documentation please let me know and I will update the document ASAP. As well if you modify the code and wish to have it added to the repository issue pull requests.
Also keep in mind I was learning both Angular and GO when working on this application so it may not be a perfect example of how to write Go/Angular code properly. With that said I have a couple thousand solves in my local server that I have been running.
Prerequisites
- Golang http://golang.org/
- Nginx http://nginx.org/
- MongoDB http://www.mongodb.org/
- GOHOME and GOPATH Environment variables set correctly
Getting the code
$ git clone https://github.com/spectre013/cuberific
$ cd $PATH TO CODE/src/cuberific
Get the dependencies
$ go get code.google.com/p/gorest
$ go get code.google.com/p/go.crypto
$ go get github.com/nu7hatch/gouuid
$ go get labix.org/v2/mgo
building the go service
Since this is the complete application and Cuberfic was not meant as a go library it is not set up to be used with go get.
A couple things need to be done before we can run the service.
- Create a database called cuberific in your MongoDB Server.
Open main.go and go to line 386 and change the path to the solves.json (only need to do this if you want to import some solves for testing purposes)
$ cd $PATH TO CODE/src/cuberific $ go build $ cuberific
Eventually you will want to run the cuberific as a service. For now it would be best to run in the console until you have every thing working correctly.
Web Front end
Only changes that need to be made here is to add the domain for the cookies to be stored in.
Navigate to /var/www/vhosts/
Replace
Nginx conf
For a front facing server Nginx was used. Below is the site configuration that will work. Replace
The port in the proxy_pass line will need to change if the Go server is running on a different port.
server {
listen 80;
root /var/www/vhosts/<SITE_NAME>/httpdocs;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name <SITE_NAME>;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.html /api;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
location /api {
proxy_pass http://localhost:9090;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off;
}
}
start the server and navigate to http://localhost or the domain or IP used to create the server.
Getting Started
Navigate to the domain / IP used in the Nginx section and you should be presented with the web application if not please view the Nginx logs or the console that the go service is running in to look for errors.
Mongo Collections
In this file you will find the collections for mongo. This is mostly for reference as the application will create the applications as needed.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


News
-
12/2017: Check out our "Purple" release.
-
12/2017: "Purple" got accepted by EWSN 2018.
-
06/2017: One paper got accepted by ICSDE 2017.
-
02/2017: Awarded Best Poster Runner Up at HotMobile 2017.
-
12/2016: Spectrometer work got accepted by HotMobile
2017.
-
07/2016: One paper got accepted by GLOBECOM 2016.
-
05/2016: Summer at Philips Lighting Research.
-
12/2015: One workshop paper got accepted by MadCom 2016.
-
06/2015: OpenVLC1.0 platform (Demo) accepted by MobiCom
2015.
-
05/2015: Summer at Philips Research.
Papers
-
Purple VLC: Accelerating Visible Light Communication in Room-Area
through PRU Offloading
Shengrong Yin, Nour Smaoui, Milad Heydariaan and Omprakash
Gnawali.
In Proceedings of the International Conference on Embedded Wireless
Systems and Networks. (EWSN 2018) Madrid, Spain, February 2018.
-
Room Occupancy Estimation Through WiFi, UWB, and Light
Sensors Mounted on Doorways
Hessam Mohammadmoradi, Shengrong Yin and Omprakash Gnawali.
In Proceedings of the International Conference on Smart Digital
Environment (ICSDE'17). Rabat, Morocco, July, 2017.
-
Automated Lamp-Type Identification for City-Wide Outdoor Lighting
Infrastructures Shengrong Yin, Talmai Oliveira and
Abhishek Murthy.
In Proceedings of the 18th International Workshop on Mobile Computing
Systems and Applications. (HotMobile 2017) Sonoma, California,
February 2017.
-
Towards Embedded Visible Light Communication Robust to Dynamic Ambient Light
Shengrong Yin, Omprakash Gnawali.
In Proceedings of the 2016 IEEE Global Communications Conference (GLOBECOM 2016), Washington, D.C., December 2016.
-
Embedded Visible Light Communication: Link Measurements and Interpretation
Milad Heydariaan, Shengrong Yin, Omprakash Gnawali, Daniele Puccinelli, and Domenico Giustiniano.
In Proceedings of the International Workshop on New Wireless Communication Paradigms for the Internet of Things (MadCom 2016), Graz, Austria, February 2016.
-
Interconnecting WiFi Devices with IEEE 802.15.4 Devices Without Using a Gateway
Shengrong Yin, Qiang Li, Omprakash Gnawali.
In Proceedings of the 11th IEEE International Conference on Distributed Computing in Sensor Systems (DCOSS 2015), Fortaleza, Brazil, June 2015.
-
Multi Channel Performance of Dual Band Low Power Wireless Network
Shengrong Yin, Omprakash Gnawali, Philipp Sommer, and Branislav Kusy.
In Proceedings of the 11th IEEE International Conference on Mobile Ad-hoc and Sensor Systems
(IEEE MASS 2014), Philadelphia, PA, October 2014.
Demos & Posters
-
OpenVLC1.0 Platform for Research in Visible Light Communication Networks
Qing Wang, Shengrong Yin, Omprakash Gnawali, and Domenico Giustiniano.
In Proceedings of the 21st Annual International Conference on Mobile Computing and Networking
(MobiCom 2015), Paris, France, September 2015.
-
Concurrent Wireless Channel Survey on Dual Band Sensor Network Testbed
Shengrong Yin, Omprakash Gnawali, Philipp Sommer, and Branislav Kusy.
In Proceedings of the 11th IEEE International Conference on Mobile Ad-hoc and Sensor Systems
(IEEE MASS 2014), Philadelphia, PA, October 2014.
Media
Service
-
Shadow PC member for ACM IPSN 2015.
|


Cas C. Lindsey
Biography
- PhD Cambridge University 1952
- University of British Columbia faculty member 1953-1956, 1979-1989
- University of Manitoba faculty member 1966-1979
- Research on the biogeography, ecology and taxonomy of western and northern fresh water fishes
CSZ
- Founding member 1961
- Council member 1969-1972
- President 1977-1978
- Honorary Member 1992
- Cas Lindsey Book Prize named
Honors
- Wildlife Society Award 1972
- Fellow Royal Society of Canada 1974
References
- Bousfield, E.L. and G.C. Gibson 1992 A History of the Canadian Society of Zoologists, 1971-1991: The Presidencies. CSZ Bull. 23(3): 34-59


Write a TCP time server!
Your server should listen to TCP connections on the port provided by the first argument to your program. For each connection you must write the current date & 24 hour time in the format:
"YYYY-MM-DD hh:mm"
followed by a newline character. Month, day, hour and minute must be zero-filled to 2 integers. For example:
"2013-07-06 17:42"
For this exercise we'll be creating a raw TCP server. There's no HTTP involved here so we need to use the net
module from Node core which has all the basic networking functions.
The net
module has a method named net.createServer()
that takes a callback function. Unlike most callbacks in Node, the callback used by createServer()
is called more than once. Every connection received by your server triggers another call to the callback. The callback function has the signature:
function callback (socket) { /* ... */ }
net.createServer()
also returns an instance of your server
. You must call server.listen(portNumber)
to start listening on a particular port.
A typical Node TCP server looks like this:
var net = require('net')
var server = net.createServer(function (socket) {
// socket handling logic
})
server.listen(8000)
Remember to use the port number supplied to you as the first command-line argument.
The socket
object contains a lot of meta-data regarding the connection, but it is also a Node duplex Stream, in that it can be both read from, and written to. For this exercise we only need to write data and then close the socket.
Use socket.write(data)
to write data to the socket and socket.end()
to close the socket. Alternatively, the .end()
method also takes a data object so you can simplify to just: socket.end(data)
.
Documentation on the net
module can be found by pointing your browser here:
To create the date, you'll need to create a custom format from a new Date()
object. The methods that will be useful are:
date.getFullYear()
date.getMonth() // starts at 0
date.getDate() // returns the day of month
date.getHours()
date.getMinutes()
Or, if you want to be adventurous, use the strftime
package from npm. The strftime(fmt, date)
function takes date formats just like the unix date
command. You can read more about strftime at: https://github.com/samsonjs/strftime


HACL APIs¶
Stream ciphers¶
Chacha20¶
Chacha20 comes in three different variants.
The AVX variant is found in file Hacl_Chacha20_Vec128.h
and exposes two
functions.
void
Hacl_Chacha20_Vec128_chacha20_encrypt_128(
uint32_t len,
uint8_t *out,
uint8_t *text,
uint8_t *key,
uint8_t *n1,
uint32_t ctr
);
In addition to the encryption, there’s also
Hacl_Chacha20_Vec128_chacha20_decrypt_128
but since they do exactly the same
thing I’m not sure why there’s two variants.
Randomness¶
HACL* is equipped with a randomness function implemented with platform dependant code for Unix and Windows.
extern bool Lib_RandomBuffer_System_randombytes(uint8_t *buf1, uint32_t len);
It takes a pointer to a memory location and a number of random bytes to be written from that location. Beware of not asking for more bytes than owned.
Internally, read_random_bytes
is implemented using
CryptGenRandom
for Microsoft Windows and using /dev/urandom
for Unix platforms.
Warning
This file is handwritten and is part of the TCB, hence it should be minimally reviewed before being used.


Epicodus
Answer these questions to find your course track
Please enter your name:
Submit Name
Change Name
Do you like to work on the appearance of things or know the behind-the-scenes workings?
The appearance (front-end)
Behind-the-scenes (back-end)
Which of these options would you like to work on?
Desktop Applications
Mobile Applications
Websites
Which of these languages would you like to work with most?
C#
CSS
Ruby
Which of these companies would you like to join most?
Microsoft
Netflix
AirBnB
Are you more interested in joining an established corporation or a startup?
Established Corporation
Startup Company
Find your track!
, you should take the Ruby/Rails track at Epicodus!
, you should take the CSS/React track at Epicodus!
, you should take the C#/.Net track at Epicodus!
, you should take either Ruby/Rails or C#/.Net track at Epicodus!


In a weird fit of synchronicity, I'm sitting in this coffee shop, and they have the Cure on the stereo. The "Boys Don't Cry" album I think. The Jungian cosmic coincidence part: I saw the Mike Leigh film last night, "Career Girls", and, in the flashbacks, the Cure provides aural texture for many of its scenes. The movie is about the reunion of two college roommates, 6 years after they last saw each other. The time they were in college was the late 1980s, and I guess Leigh fixed on the Cure as signature music of that time and place.
Movies that take place in whatever decade uses signature music: the Fifties with Elvis and Buddy Holly, the Sixties with the Beatles, Beach Boys, Stones or whatever, the Seventies with disco. Films that span decades, like "Grace of My Heart", changed musical style by the scene. I'm not sure what the music of the Eighties should be. Early Madonna? Boy George? U2 when the filmmaker is trying to convey "earnest?" And ten years from now I suppose we'll hear Trent Reznor and Garth Brooks interspersed with images of Alan Greenspan in "Forest Gump III: Irrational Exuberance".
In any case, Leigh's previous film was the great "Secrets and Lies". The events of that film unfolded when a young black woman decides to find her biological mother.  The latter freaks: she never saw the baby, and put her up for adoption immediately after birth. The film also has a second major story, concerning the mother's brother and his family, and their particular struggles. I can't say much more: you'll have to see the movie. It's a fantastic film.
"Career Girls" therefore has to follow one of the best films of that year. It's not a bad film in its own right, but comes up as disappointing given its predecessor. I expected more.
I'm probably following some of the reviews I've read in these comments, but so be it; many of their points are correct. The film takes place in the present, over a weekend reunion. There are extensive flashbacks back to their college days, illuminating certain significant events. In the present, as they go through London, they bump into people who figure in or trigger these flashbacks. Note that the flashbacks don't necessarily happen after they meet someone, but may precede the encounter. Synchronicity by example. It feels forced.
This may be one of the flaws of the film. Or, rather, it's in contrast to Leigh's usual style, as someone noted: the past is used to illuminate the present. In "Secrets and Lies", the present speaks for itself: small gestures, looks and silences describe the characters' histories and relationships. In "Secrets", there is nothing so crude as a handycam traipsing through a messy flat, Robert Smith crooning "Just Like Heaven" in the background. These flashbacks, in my opinion, don't necessarily make it a bad film, but they make it far less subtle than the other one; it's less than what the director is capable of.
I have more or a problem with the past as it's depicted. The characters in their youth are collections of ticks and nervous gestures verging on neurological trauma. These characteristics are actually funny at first, and at second for that matter, but they get tired by the end. And it feels like the film is using a collection of hyperactive spasms in place of more concrete development.
The relationship between past and present is another problem. As said, synchronicity abounds. It closes the events and characters in a tight circle: very little of what's shown in the past and what happens in the present are outside of this circle. I don't necessarily find fault with this particular structure: one can argue that it's tight story telling, with these characters existing solely for this particular tale. But it's different from depth of character found in the previous film. In "Secrets and Lines", there is a background that's not quite illuminated, a feeling that there's a great deal more than what's shown on screen, that there's a lifetime of experience off-camera. In "Career Girls", the matter is closed; there's nothing more here.
And perhaps this leads to a final point. The characters' lives are shown as "empty" in the present. There is a curious disconnect from between the past and the present in this regard. The flashbacks do little to illuminate their lives just before the film starts. They only serve to give background to events during the reunion, and little else. It's as if the characters exist only at two points in time: their years in college and this weekend.
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


| < Day Day Up > |
DRDA FunctionsThree functions are utilized by DRDA to provide distributed relational data access:
These three functions inter-operate with one another to enable distributed access (see Figure 41.1). Figure 41.1. The three DRDA functions.Let's further examine these three functions. Application RequesterThe DRDA application requester (AR) function enables SQL and program preparation requests to be requested by application programs. The AR accepts SQL requests from an application and sends them to the appropriate application server (or servers) for subsequent processing. Using this function, application programs can access remote data. In theory, if all of the data that you are interested in is physically located somewhere else (for example, remote), there may be no need for a local RDBMS, and DRDA does not require the requester to run on a system with a local RDBMS. For the DB2 Family, the DRDA AR function is implemented using DB2 Connect. Application ServerThe DRDA application server (AS) function receives requests from application requesters and processes them. These requests can be either SQL statements or program-preparation requests. The AS acts upon the portions that can be processed and forwards the remainder to DRDA database servers for subsequent processing. This is necessary if the local RDBMS cannot process the request. The AR is connected to the AS using a communication protocol called the Application Support Protocol. The Application Support Protocol is responsible for providing the appropriate level of data conversion. This is only necessary when different data representations are involved in the request. An example of this is the conversion of ASCII characters to EBCDIC (or vice versa). Database ServerThe DRDA database server (DS) function receives requests from application servers or other database servers. These requests can be either SQL statements or program preparation requests. Like the application server, the database server will process what it can and forward the remainder on to another database server. It is important to note that a database server request may be for a component of an SQL statement. This would occur when data is distributed across two subsystems and a join is requested. The join statement is requesting data from tables at two different locations. As such, one portion must be processed at one location; the other portion at a different location. Because the database servers involved in a distributed request need not be the same, the Database Support Protocol is used. It exists for the following reasons:
Like the Application Support Protocol, the Database Support Protocol is used to ensure compatibility of requests between different database servers. What Is ReturnedWhen a request is completely processed, the application server must inform the requesting process, the application requester. How is this accomplished? The AS passes a return code and a result set (if one was produced) back to the AR. The return code is the SQLSTATE (or SQLCODE). A result set is not generated under the following circumstances:
This protocol is used unless a cursor is employed. When rows are fetched from a read-only cursor limited block protocol can be used. Limited block protocol passes multiple rows across the network at a time, even though one fetch can process only a single row at a time. Limited block protocol enhances overall performance by minimizing network traffic. If the cursor is not read-only (that is, rows can be updated) limited block protocol is not employed. |
| < Day Day Up > |


| Path: | vendor/plugins/betternestedset/README |
| Last Update: | Wed Jun 25 13:50:51 -0700 2008 |
This plugin provides an enhanced acts_as_nested_set mixin for ActiveRecord, the object-relational mapping layer of the framework Ruby on Rails. The original nested set in Rails lacks many important features, such as moving branches within a tree.
script/plugin install svn://rubyforge.org/var/svn/betternestedset/trunk
A nested set is a smart way to implement an ordered tree that allows for fast, non-recursive queries. For example, you can fetch all descendants of a node in a single query, no matter how deep the tree. The drawback is that insertions/moves/deletes require complex SQL, but that is handled behind the curtains by this plugin!
Nested sets are appropriate for ordered trees (e.g. menus, commercial categories) and big trees that must be queried efficiently (e.g. threaded posts).
See www.dbmsmag.com/9603d06.html for nested sets theory, and a tutorial here: threebit.net/tutorials/nestedset/tutorial1.html
An easy way to visualize how a nested set works is to think of a parent entity surrounding all of its children, and its parent surrounding it, etc. So this tree:
root |_ Child 1 |_ Child 1.1 |_ Child 1.2 |_ Child 2 |_ Child 2.1 |_ Child 2.2
Could be visualized like this:
___________________________________________________________________ | Root | | ____________________________ ____________________________ | | | Child 1 | | Child 2 | | | | __________ _________ | | __________ _________ | | | | | C 1.1 | | C 1.2 | | | | C 2.1 | | C 2.2 | | | 1 2 3_________4 5________6 7 8 9_________10 11_______12 13 14 | |___________________________| |___________________________| | |___________________________________________________________________|
The numbers represent the left and right boundaries. The table then might look like this:
id | parent_id | lft | rgt | data 1 | | 1 | 14 | root 2 | 1 | 2 | 7 | Child 1 3 | 2 | 3 | 4 | Child 1.1 4 | 2 | 5 | 6 | Child 1.2 5 | 1 | 8 | 13 | Child 2 6 | 5 | 9 | 10 | Child 2.1 7 | 5 | 11 | 12 | Child 2.2
To get all children of an entry parent, you
SELECT * WHERE lft IS BETWEEN parent.lft AND parent.rgt
To get the number of children, it‘s
(right - left - 1)/2
To get a node and all its ancestors going back to the root, you
SELECT * WHERE node.lft IS BETWEEN lft AND rgt
As you can see, queries that would be recursive and prohibitively slow on ordinary trees are suddenly quite fast. Nifty, isn‘t it? There are instance methods for each of the above, plus many others.
Method names are mostly the same as in acts_as_tree, to make replacment from one by another easier, except for object creation:
in acts_as_tree:
my_item.children.create(:name => "child1")
in acts_as_nested_set:
# adds a new item at the "end" of the tree, i.e. with child.left = max(tree.right) + 1 child = MyClass.create(:name => "child1") # now move the item to its desired location child.move_to_child_of my_item
You can use:
and pass them an id or an object.
Other instance methods added by this plugin include:
These should not be of interest, unless you want to write schema-independent SQL:
Please see the generated RDoc files in doc/ for the full API (run ‘rake rdoc’ if they need to be created).
ActiveRecord does not yet provide a way to treat columns as read-only, which causes problems for nested sets and other things (dev.rubyonrails.org/ticket/6896). As a workaround, we have overridden ActiveRecord::Base#update to prevent it from writing to the left/right columns. This protects the left/right values from corruption under concurrent usage, but it breaks the update-related callbacks (before_update and friends). If you need the callbacks and aren‘t worried about concurrency, you can comment out the update method and the two methods below it (all at the very bottom of better_nested_set.rb).
If this situation bugs you as much as it does us, leave a comment on the above ticket asking the core team to please apply the patch soon.
Scope separates trees from each other, and roots are nodes without a parent. The complication is that a tree can have multiple ("virtual") roots.
Virtual roots?! In some situations, such as a menu, the root of the tree is ignored, and becomes a nuisance to the programmer. In that case it makes sense to remove the root, turning each of its children into a ‘virtual root’.
Here‘s an example that demonstrates scopes, roots and virtual roots:
class Set < ActiveRecord::Base acts_as_nested_set :scope => :tree_id end # This will create two trees, each with a single (real) root. a = Set.create(:tree_id => 1) b = Set.create(:tree_id => 2) # This will add a second root to tree #2, so it will have two (virtual) roots. # New objects are by default created as virtual roots at the right side of the tree. c = Set.create(:tree_id => 2) # c.lft is 3, c.rgt is 4 -- the lft/rgt values are contiguous between the two roots # When we move c to be a child of b, tree #2 will have a single (real) root again. c.move_to_child_of(b) # The table would now look like this: id | parent_id | tree_id | lft | rgt | data 1 | NULL | 1 | 1 | 2 | a 2 | NULL | 2 | 1 | 4 | b 3 | 2 | 2 | 2 | 3 | c
Don‘t name your left and right columns ‘left’ and ‘right’, since most databases reserve these words. Use something like ‘lft’ and ‘rgt’ instead.
If you have a choice between multiple separate trees or one large tree with multiple roots, separate trees will offer better performance when altering tree structure (inserts/moves/deletes).
This plugin is provided by Jean-Christophe Michel from Symétrie, and the home page is:
http://opensource.symetrie.com/trac/better_nested_set/
The code has so far been tested on MySQL 5, SQLite3 and PostgreSQL 8, but is thought to work on others. Databases featuring transactions will help protect the left/right indexes from corruption during concurrent usage.
Future versions of this code will break compatibility with the original acts_as_nested_set, but this version is intended to be (almost completely) compatible. Differences include:
1) Set up a test database as specified in database.yml. Example for MySQL:
create database acts_as_nested_set_plugin_test; grant all on acts_as_nested_set_plugin_test.* to 'rails'@'localhost' identified by '';
2) The tests must be run with the plugin installed in a Rails project, so do that if you haven‘t already.
3) Run ‘rake test_mysql’ (or test_sqlite3 or test_postgresql) in plugins/betternestedset. The default rake task attempts to use all three adapters.
Copyright (c) 2006 Jean-Christophe Michel, Symétrie
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE


Support
Should you need to contact Irving Estate, please feel free to email<EMAIL_ADDRESS>We will be happy to provide a resolution to your inquiry.


{% extends 'email.server.view.html' %}
{% block content %}
{{name}},
Thank you very much for signing up with us.
Confirm your email address ({{email}}) to complete your Trustroots account.
It's easy — just click on the link below.
<{{urlConfirmPlainText}}>
{% endblock %}


Holly Willoughby leads the best-dressed ladies at ITV's glitzy Palooza
They pulled out all the stops!
by Nancy BrownITV's annual star-studded Palooza took place at London's Royal Festival Hall last night and it was a veritable fashion feast.
Stunning This Morning host Holly Willoughby led the way as she graced the red carpet in a simple LBD.
The Christopher Kane vest-style midi dress featured silver embellishment around the neckline. Holly paired the dress with a pair of black Gina shoes.
Read more: Bookies reveal their favourite to win this year's I'm A Celebrity
"Beautiful," said her pal Emma Bunton.
New mum Stacey Solomon enjoyed her first red carpet event since the birth of baby Rex.
"Excited to be dressed up and on my way to meet Joe," she said of partner Joe Swash.
"Not sure he will recognise me," she joked.
Read more: Katie Price "may set up soft porn app" to get "revenge" on pal Danielle Lloyd
Stacey wore a tiered Olivia Rubin metallic dress, platform metallic shoes and a pair of chandelier earrings.
Fresh from celebrating her 40th birthday, Love Island host Caroline Flack wore a silver sequinned Zara shorts suit.

Davina McCall and Loose Women star Andrea McLean brought the sunshine to the winter red carpet wearing beautiful bright yellow dresses.
Andrea looked stunning in a floor-length Nadine Merabi dress with a thigh-high slit and a keyhole cutout.
Davina, meanwhile, wore a one-shouldered asymmetric 1980s-inspired dress, complete with a structured shoulder pad.
Rochelle Humes, who was accompanied by husband Marvin, wore a floor-length Redemption dress and cute black fluffy heels.
The singer-turned-presenter showed off her toned pins in the dress, which featured a thigh-high split.
However, the mum of two made sure she was warm on the red carpet, accessorising her look with a black jacket.
Meanwhile, Coronation Street star Tina O'Brien dazzled in a beaded flapper-style cocktail dress.
Last week, Tina was out on the town with her Corrie co-stars as they attended Kym Marsh's leaving party.
Who was your best-dressed star? Tell us on our Facebook page @EntertainmentDailyFix.