|
tesseract
5.0.0-alpha-619-ge9db
|
#include <fontinfo.h>
Public Member Functions | |
| UnicityTable () | |
| ~UnicityTable () | |
| Clear the structures and deallocate internal structures. More... | |
| void | reserve (int size) |
| int | size () const |
| Return the size used. More... | |
| const T & | get (int id) const |
| Return the object from an id. More... | |
| T * | get_mutable (int id) |
| int | get_id (T object) const |
| bool | contains (T object) const |
| Return true if T is in the table. More... | |
| T | contains_id (int id) const |
| Return true if the id is valid. More... | |
| int | push_back (T object) |
| Add an element in the table. More... | |
| void | set_clear_callback (std::function< void(T)> cb) |
| void | set_compare_callback (std::function< bool(const T &, const T &)> cb) |
| void | clear () |
| void | move (UnicityTable< T > *from) |
| bool | write (FILE *f, std::function< bool(FILE *, const T &)> cb) const |
| bool | read (tesseract::TFile *f, std::function< bool(tesseract::TFile *, T *)> cb) |
Definition at line 30 of file fontinfo.h.
| UnicityTable< T >::UnicityTable | ( | ) |
Definition at line 116 of file unicity_table.h.
| UnicityTable< T >::~UnicityTable | ( | ) |
Clear the structures and deallocate internal structures.
Definition at line 122 of file unicity_table.h.
| void UnicityTable< T >::clear | ( | ) |
Clear the table, calling the callback function if any. All the owned Callbacks are also deleted. If you don't want the Callbacks to be deleted, before calling clear, set the callback to nullptr.
Definition at line 178 of file unicity_table.h.
| bool UnicityTable< T >::contains | ( | T | object | ) | const |
Return true if T is in the table.
Definition at line 162 of file unicity_table.h.
| T UnicityTable< T >::contains_id | ( | int | id | ) | const |
Return true if the id is valid.
Definition at line 150 of file unicity_table.h.
| const T & UnicityTable< T >::get | ( | int | id | ) | const |
Return the object from an id.
Definition at line 140 of file unicity_table.h.
| int UnicityTable< T >::get_id | ( | T | object | ) | const |
Return the id of the T object. This method NEEDS a compare_callback to be passed to set_compare_callback.
Definition at line 156 of file unicity_table.h.
| T * UnicityTable< T >::get_mutable | ( | int | id | ) |
Definition at line 145 of file unicity_table.h.
| void UnicityTable< T >::move | ( | UnicityTable< T > * | from | ) |
This method clear the current object, then, does a shallow copy of its argument, and finally invalidate its argument.
Definition at line 185 of file unicity_table.h.
| int UnicityTable< T >::push_back | ( | T | object | ) |
|
inline |
Definition at line 96 of file unicity_table.h.
| void UnicityTable< T >::reserve | ( | int | size | ) |
Reserve some memory. If there is size or more elements, the table will then allocate size * 2 elements.
Definition at line 134 of file unicity_table.h.
|
inline |
Add a callback to be called to delete the elements when the table took their ownership.
Definition at line 68 of file unicity_table.h.
|
inline |
Add a callback to be called to compare the elements when needed (contains, get_id, ...)
Definition at line 74 of file unicity_table.h.
| int UnicityTable< T >::size | ( | ) | const |
Return the size used.
Definition at line 127 of file unicity_table.h.
|
inline |
Read/Write the table to a file. This does NOT read/write the callbacks. The Callback given must be permanent since they will be called more than once. The given callback will be deleted at the end. Returns false on read/write error.
Definition at line 93 of file unicity_table.h.


{% extends "enren/base.html" %}
learning_log
{% block content %}learning log helps you keep track of your learning topic you are learning about
.text-primary
.text-secondary
.text-success
.text-danger
.text-warning
.text-info
.text-light
.text-dark
.text-body
.text-muted
.text-white
.text-black-50
.text-white-50
{% endblock content %}


Basics
API url:
https://api4.leadingproperties.com/
Definitions and references
Definitions:
property object
- JSON object with real estate property datalocalized
- translated (if translation is present) accordingly to locale set in constructor or passed as request parameter-
price on demand
,
deposit on demand
,
commission on demand
-on_demand=true
means that price (or deposit, or commission) isn't public. I.e. it can be provided only by a seller/owner privately. (Contact form request, phone call, etc.) slug
- part of Semantic URL
References:
- Country code format: ISO 3166-1
- Currency code format: ISO 4217
- Locales codes format: ISO 639-1
- Timestamps format: https://www.w3.org/TR/NOTE-datetime
Authentication
Use simple token-based authorization.
Send it in the header of your request:
Send it in the header of your request:
Authorization: Token token=YOUR_TOKEN_HERE
Token may be obtained from your profile settings in mylpw.io
Properties list
Method:
Path:
GET
Path:
(/:locale)/property_objects
Examples:
https://api4.leadingproperties.com/property_objects
https://api4.leadingproperties.com/ru/property_objects
Locale in path
Locale in path is not required. You can send it in query string instead.
Accepts arguments
Language
Answer localization (title, description, etc.)
| Name | Type | Examples | Description |
|---|---|---|---|
| locale | string |
JSON:{ "locale": "fr" }Query string: ?locale=fr
|
List of available locales depends on your settings in mylwp.io. Full list of available locales can be found here. |
Filters: Offer type (sale/rent)
Allows to filter properties by a rent or sale type.
Note:
- Properties for sale are returned by default. So, properties for sale will be returned, if you will not send any of these filters.
- If both set to
true
, only properties with both offer types will be returned.
| Name | Type | Examples | Description |
|---|---|---|---|
| for_sale | boolean |
JSON:{ "for_sale": true }Query string: ?for_sale=true
|
Show only properties for sale |
| for_rent | boolean |
JSON:{ "for_rent": true }Query string: ?for_rent=true
|
Show only properties for rent |
Filters: Location
Location point
Geographical point. Allows to search for a properties around this point accordingly to specified radius.
| Name | Type | Examples | Description |
|---|---|---|---|
| location_point | object |
JSON:{"location_point": { "lat": 50.0755381, "lon": 14.43780049999998, "radius": 5, "country_code": "CZ" }}Query string:
?location_point[country_code]=CZ
&location_point[lat]=50.0755381
&location_point[lon]=14.43780049999998
&location_point[radius]=5
|
|
Location shape
Geographical rectangle consisting of 2 geographical points (top-right and bottom-left).
Allows to search for properties inside of this rectangle.
| Name | Type | Examples | Description |
|---|---|---|---|
| location_point | object |
JSON:{"location_shape": { "top_right": { "lat": 50.177403, "lon": 14.7067945 }, "bottom_left": { "lat": 49.94193629999999 "lon": 14.22445330000005 }, "country_code": "CZ" }}Query string:
?location_shape[bottom_left][lat]=49.94193629999999
&location_shape[bottom_left][lon]=14.22445330000005
&location_shape[country_code]=CZ
&location_shape[top_right][lat]=50.177403
&location_shape[top_right][lon]=14.7067945
|
|
Filters: Price
Allows to filter properties by price
| Name | Type | Examples | Description |
|---|---|---|---|
| price | object |
JSON:{ "price": { "min": 100000, "max": 150000, "currency": 1, "period": "week" } }Query string: ?price[currency]=1&price[max]=150000
&price[min]=100000&price[period]=week
|
Range value, so only min, or only max, or both allowed.
|
Filters: Features
Allows to filter properties by features: property type, rooms, area
| Name | Type | Examples | Description |
|---|---|---|---|
| property_types | array |
JSON:{ "property_types": [1, 2] }Query string: ?property_types[]=1&property_types[]=2
|
Available property types:
|
| rooms | array |
JSON:{ "rooms": [4, 5] }Query string: ?rooms[]=4&rooms[]=5
|
Available values:
|
| area | object |
JSON:{ "area": { "min": 100, "max": 200 } }Query string: ?area[min]=100&area[max]=200
|
Filter by area range. Allowed to send only min or only max .
|
Filters: Other
| Name | Type | Examples | Description |
|---|---|---|---|
| hd_photos | boolean |
JSON:{ "hd_photos": true }Query string: ?hd_photos=true
|
Show properties only with high-quality photos |
Filters: Rent only
| Name | Type | Examples | Description |
|---|---|---|---|
| long_rent | boolean |
JSON:{ "long_rent": true }Query string: ?long_rent=true
|
for_rent=true only!Only properties with long term rent |
| short_rent | boolean |
JSON:{ "short_rent": true }Query string: ?short_rent=true
|
for_rent=true only!Only properties with short term rent |
| child_friendly | boolean |
JSON:{ "child_friendly": true }Query string: ?child_friendly=true
|
for_rent=true only!Only child-friendly properties |
| pets_allowed | boolean |
JSON:{ "pets_allowed": true }Query string: ?pets_allowed=true
|
for_rent=true only!Only properties where pets allowed |
| persons | number |
JSON:{ "persons": 3 }Query string: ?persons=true
|
for_rent=true only!Only properties where number of persons allowed |
Pagination
| Name | Type | Examples | Description |
|---|---|---|---|
| page | number |
JSON:{ "page": 4 }Query string: ?page=4
|
Page number |
| per_page | number |
JSON:{ "per_page": 9 }Query string: ?per_page=9
|
Property objects per page |
Order
| Name | Type | Examples | Description |
|---|---|---|---|
| order_by | object |
JSON:{ "order_by": { "order": "desc" } }Query string: ?order_by[order]=desc
|
Order properties. Allowed values: 'asc' | 'desc'
|
Direct selection
| Name | Type | Examples | Description |
|---|---|---|---|
| id | number |
JSON:{ "id": 1 }Query string: ?id=1
|
Property ID |
| ids | array |
JSON:{ "ids": [1, 2, 3] }Query string: ?ids[]=1&ids[]=2&ids[]=3
|
Array of property IDs |
Answer
Properties answer description.
Answer scheme:
{ "property_objects": {Array}, "total": {Number}, "offmarket": {Number} }
Answer scheme description:
| Name | Type | Description |
|---|---|---|
| property_objects | array | Array of property objects. See array item description below |
| total | number | Total number of properties matching your request |
| offmarket | number | Total number of off-market properties matching your request |
property_objects array item scheme:
{ "id" : {Number}, "code" : {String}, "slug" : {String}, "rent_slug" : {String}, "country" : { "code" : {String}, "title": {String}, "id" : {Number} }, "region" : { "title": {String}, "id" : {Number} }, "city" : { "title": {String}, "id" : {Number} }, "district" : { "title": {String}, "id" : {String} }, "parameters" : { "price" : { "min" : {Number}, "max" : {Number}, "conv_min" : {Number}, "conv_max" : {Number}, "euro_min" : {Number}, "euro_max" : {Number}, "on_demand" : {Boolean}, "currency_id": {Number}, "currency" : {String} }, "area" : { "min": {Number}, "max": {Number} }, "rooms" : { "min": {Number}, "max": {Number} }, "bedrooms" : { "min": {Number}, "max": {Number} }, "bathrooms": { "min": {Number}, "max": {Number} } }, "image" : {String}, "description" : { "title" : {String}, "rent_title": {String} }, "property_rent": { "persons_max": {Number}, "short_rent" : {Boolean}, "long_rent" : {Boolean}, "rent_long" : { "on_demand" : {Boolean}, "sort_price": {Object} }, "rent_short" : { "on_demand" : {Boolean}, "sort_price": {Object}, "min_day" : {Boolean}, "min_week" : {Boolean}, "min_month" : {Boolean}, } } }
property_objects array item scheme description:
| Name | Type | Description |
|---|---|---|
| id | Number | ID |
| code | String | System property code. |
| slug | String | Item slug used in leadingproperties.com sale route. |
| rent_slug | String | Item slug used in leadingproperties.com rent route. |
| country | Object |
Country where property located. Where:
|
| region | Object |
Country region where property located. Where:
|
| city | Object |
City where property located. Where:
|
| district | Object |
District where property located. Where:
|
| parameters | Object |
Main property features:
|
| image | String | Property thumbnail (348x205 px). |
| description | Object |
Contains 2 properties:
|
| property_rent | Object |
Rent only data. Has these properties:
|
Single property
Contains additional property data.
Method:
Path:
Method:
GET
Path:
(/:locale)/property_objects/:id
Examples:
https://api4.leadingproperties.com/1
https://api4.leadingproperties.com/ru/1
Locale in path
Locale in path is not required. You can send it in query string instead.
Allowed parameters
Language
Answer localization (title, description, etc.)
| Name | Type | Examples | Description |
|---|---|---|---|
| locale | string |
JSON:{ "locale": "fr" }Query string: ?locale=fr
|
List of available locales depends on your settings in mylwp.io. Full list of available locales can be found here. |
Answer
Single property answer description
Answer scheme:
{ "id" : {Number}, "code" : {String}, "status_id" : {Number}, "offmarket" : {Boolean}, "sold_state" : {Boolean}, "location" : { "lat": {Number}, "lon": {Number} }, "slugs" : {Object}, "slug" : {String}, "rent_slugs" : {Object}, "rent_slug" : {String}, "country" : { "code" : {String}, "title": {String}, "id" : {Number} }, "region" : { "title": {String}, "id" : {Number} }, "city" : { "title": {String}, "id" : {Number} }, "district" : { "title": {String}, "id" : {Number} }, "parameters" : { "property_object_type": {String}, "price" : { "min" : {Number}, "max" : {Number}, "conv_min" : {Number}, "conv_max" : {Number}, "euro_min" : {Number}, "euro_max" : {Number}, "on_demand" : {Boolean}, "currency_id": {Number}, "currency" : {String} }, "area" : { "min": {Number}, "max": {Number} }, "rooms" : { "min": {Number}, "max": {Number} }, "images" : {Array} }, "features" : { "bedrooms" : { "min": {Number}, "max": {Number} }, "bathrooms" : { "min": {Number}, "max": {Number} }, "land_area" : { "min": {Number}, "max": {Number} }, "building_storeys": {Number}, "pool" : {Boolean}, "garage_parking" : {Boolean}, "terrace_balcony" : {Boolean}, "utility_rooms" : {Boolean} }, "description" : { "title" : {String}, "rent_title" : {String}, "main_text" : {String}, "short_text" : {String}, "rent_short_text" : {String} }, "seo_fields" : { "focus_keyword" : {String}, "seo_title" : {String}, "meta_description": {String}, }, "property_rent": { "id" : {Number}, "persons_max" : {Number}, "child_friendly" : {Boolean}, "pets_allowed" : {Boolean}, "long_rent" : {Boolean}, "short_rent" : {Boolean}, "rent_long" : {Object}, "rent_short" : {Object}, "slug_translations" : {Object}, "rent_title_translations" : {Object}, "rent_short_text_translations": {Object} } }
Answer scheme description:
| Name | Type | Description |
|---|---|---|
| id | Number | ID |
| code | String | System property code. |
| status_id | Number |
Property status:
|
| offmarket | Boolean | Is property offmarket or not |
| sold_state | Boolean | Is property sold or not |
| location | Object | Geographical point |
| slugs | Object |
Object with all available localizations of property slug. (sale) Example: { "ar" : {String} "bg" : {String} ... "ind": {String} }List of locales for a property name reference can be found here |
| slug | String | Slug in current locale (sale) |
| slugs | Object |
Object with all available localizations of property slug (rent). Example: { "ar" : {String} "bg" : {String} ... "ind": {String} }List of locales for a property name reference can be found here |
| rent_slug | String | Slug in current locale (rent) |
| country | Object |
Country where property located. Where:
|
| region | Object |
Country region where property located. Where:
|
| city | Object |
City where property located. Where:
|
| district | Object |
District where property located. Where:
|
| parameters | Object |
Primary property features:
|
| features | Object |
Secondary property features:
|
| description | Object |
|
| seo_fields | Object |
SEO components:
|
| property_rent | Object |
|
Currencies
Retrieves currencies
Method:
Path:
Method:
GET
Path:
(/:locale)/currencies
Examples:
https://api4.leadingproperties.com/currencies
Answer
Currencies answer description
Answer scheme:
{ "currencies": {Array} }
Answer scheme description:
| Name | Type | Description |
|---|---|---|
| currencies | Array |
Array of available currencies. Currency object described below |
Currency
Currency object scheme:
{ "id" : {Number}, "code" : {String}, "currency_rate": { "rate": {Number} }, "symbol" : {String}, "created_at" : {String}, "updated_at" : {String} }
Currency object scheme description:
| Name | Type | Description |
|---|---|---|
| id | Number | ID |
| code | String | Code (ISO_4217) |
| currency_rate.rate | Number | Currency rate relatively to USD. |
| symbol | String | Symbol |
| created_at | String | Creation timestamp. |
| updated_at | String | Update timestamp. |
Geographical points
Sale
Retrieves geographical point for properties for sale
Method:
Path:
Method:
GET
Path:
(/:locale)/property_objects/geo_points
Examples:
https://api4.leadingproperties.com/property_objects/geo_points
Rent
Retrieves geographical point for properties for rent
Method:
Path:
Method:
GET
Path:
(/:locale)/property_objects/rent_geo_points
Examples:
https://api4.leadingproperties.com/property_objects/rent_geo_points
Commercial
Retrieves geographical point for commercial properties
Method:
Path:
Method:
GET
Path:
(/:locale)/property_objects/invest_geo_points
Examples:
https://api4.leadingproperties.com/property_objects/invest_geo_points
Note:
All geographical points are cached. Cache is rebuilt once per day (1:00 AM)
Answer
Answer scheme:
{ "points": {Array} }
Answer scheme description:
| Name | Type | Description |
|---|---|---|
| points | Array |
Array of geographical points. Geographical point object described here |
Retrieves link to pdf file with property information
Method:
Path:
Method:
GET
Path:
(/:locale)/pdf/:property_id
Examples:
https://api4.leadingproperties.com/pdf/1
Accepts arguments
| Name | Type | Examples | Description |
|---|---|---|---|
| for_rent | boolean |
JSON:{ "for_rent": true }Query string: ?for_rent=true
|
Retrieve pdf with rent (if possible) or sale information |
Answer
Answer scheme:
//Scheme 1 { "error": {string} } //Scheme 2 { "pdf_path": {string} //url to pdf file }
Answer scheme description:
If pdf was generated before it would return scheme 2
immediately.
In other case scheme 1
will be returned unless PDF file will be generated and scheme 2
returned.
I.e. you can ping that path until file will be ready.
Counters (total)
Retrieves total properties counts, organized by offer type (for sale, for rent, commercial)
Method:
Path:
Method:
GET
Path:
(/:locale)/counters/global
Examples:
https://api4.leadingproperties.com/counters/global
Answer
Answer scheme:
{ "global_counters": { "for_sale": {Number}, "for_rent": {Number}, "commercial": {Number} } }
Answer scheme description:
| Name | Type | Description |
|---|---|---|
| for_sale | Number | Total count of properties available for sale |
| for_rent | Number | Total count of properties available for rent |
| commercial | Number | Total count of commercial properties |
Answer: price (sale)
| Name | Type | Description |
|---|---|---|
| min | Number | minimum price |
| max | Number | maximum price |
| conv_min | Number | minimum price, converted to currency sent in request |
| conv_max | Number | maximum price, converted to currency sent in request |
| euro_min | Number | minimum price, converted to EUR |
| euro_max | Number | maximum price, converted to EUR |
| on_demand | Boolean | price on demand |
| currency_id | Number | Original price currency id. |
| currency | String | Original price currency code (ISO_4217). |
Answer: price (rent)
| Name | Type | Description |
|---|---|---|
| currency_code | String | Original price currency code |
| currency_id | Number | Original price system currency id |
| day | Number |
Short-term rent only daily rent price |
| euro_day | Number |
Short-term rent only daily rent price converted to EUR |
| conv_day | Number |
Short-term rent only daily rent price, converted to currency sent in request |
| month | Number |
Long-term rent only monthly rent price |
| euro_month | Number |
Long-term rent only monthly rent price converted to EUR |
| conv_month | Number |
Long-term rent only monthly rent price, converted to currency sent in request |
| on_demand | Boolean | price on demand |
Answer: rent long
| Name | Type | Description |
|---|---|---|
| id | Number | Database record ID |
| property_rent_id | Number | Database record ID |
| monthly_rate | Number | Monthly rental price |
| currency_id | Number | Monthly rental price currency ID |
| currency_code | String | Monthly rental price currency code |
| sort_price | Object | Described here |
| vat | Number | the amount of VAT, % |
| vat_in_price | Boolena | VAT included in price |
| deposit | Number | the amount of deposit |
| deposit_type | Number |
Deposit type, where:
|
| deposit_on_demand | Boolean | deposit on demand |
| commission | Number | the amount of commission |
| commission_type | Number |
Commission type, where:
|
| commission_on_demand | Boolean | commission on demand |
Answer: rent short
| Name | Type | Description |
|---|---|---|
| id | Number | Database record ID |
| property_rent_id | Number | Database record ID |
| min_day | Boolean | Minimum stay - 1 day |
| ls_daily_rate | Number | Low season daily rate. (When minimum stay is below 1 week) |
| ms_daily_rate | Number | Medium season daily rate (When minimum stay is below 1 week) |
| hs_daily_rate | Number | High season daily rate (When minimum stay is below 1 week) |
| min_week | Boolean | Minimum stay - 1 week |
| ls_weekly_rate | Number | Low season daily rate. (When minimum stay is above 1 week) |
| ms_weekly_rate | Number | Medium season daily rate (When minimum stay is above 1 week) |
| hs_weekly_rate | Number | High season daily rate (When minimum stay is above 1 week) |
| min_month | Boolean | Minimum stay - 1 month |
| ls_monthly_rate | Number | Low season daily rate. (When minimum stay is above 1 month) |
| ms_monthly_rate | Number | Medium season daily rate (When minimum stay is above 1 month) |
| hs_monthly_rate | Number | High season daily rate (When minimum stay is above 1 month) |
| currency_id | Number | Rental price currency ID |
| currency_code | String | Rental price currency code |
| sort_price | Object | Described here |
| vat | Number | the amount of VAT, % |
| vat_in_price | Boolena | VAT included in price |
| deposit | Number | the amount of deposit |
| deposit_type | Number |
Deposit type, where:
|
| deposit_on_demand | Boolean | deposit on demand |
| commission | Number | the amount of commission |
| commission_type | Number |
Commission type, where:
|
| commission_on_demand | Boolean | commission on demand |
Answer: geographical point
{ "id": {Number}, "location": { "lat": {Number}, "lon": {Number}, }, "place_id": {String} }
| Name | Type | Description |
|---|---|---|
| id | Number | Property object ID |
| location | Object |
Geographical point, where:
|
| place_id | Object | Google maps place ID |
Locales
- "en" - "English"
- "fr" - "Français"
- "de" - "Deutsch"
- "ru" - "Русский"
- "cs" - "Čeština"
- "zh" - "简体中文"
- "da" - "Dansk"
- "nl" - "Nederlands"
- "it" - "Italiano"
- "ja" - "日本語"
- "es" - "Español"
- "ar" - "العربية"
- "he" - "עברית"
- "hi" - "हिन्दी"
- "ko" - "한국어"
- "nb" - "Norwegian Bokmål"
- "pt" - "Português"
- "sv" - "Svenska"
- "th" - "ไทย"
- "tr" - "Türkçe"
- "ur" - "Urdu"
- "vi" - "Vietnamese"
- "bg" - "Български език"
- "pl" - "Polszczyzna"
- "lv" - "Latviešu valoda"
- "hr" - "Hrvatski jezik"
- "et" - "Eesti"
- "is" - "Íslenska"
- "sr" - "Српски језик"
- "hu" - "Magyar"
- "ro" - "Limba română"
- "lt" - "Lietuvių kalba"
- "uk" - "Українська"
- "sk" - "Slovenčina"
- "sl" - "Slovenščina"
- "el" - "ελληνικά"
- "ind" - "Bahasa Indonesia"
- "fil" - "Filipino"
- "ca" - "Català"
- "fi" - "Suomi"
License
MIT License Copyright (c) 2016 The Leading Properties of the World 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.


The RaspberrySTEM is a kit geared towards teaching programming and electronics. Before we go any further, it’s important to discuss what “programming” is and what “electronics” are – as well as to discuss why learning programming and electronics are important skills.
Let’s start with the seemingly simple question – What is a computer?
Most people probably think…
Sometimes you’ll follow the instructions for a project, but things won’t work exactly the way you expect them to. This is typically due to a mistake in wiring the components or a mistake in the code you have written. While we try to lay out the projects in simple step-by-step instructions with detailed diagrams, mistakes are going to happen (even seasoned engineers make lots of mistakes!).
When something in your project isn’t working correctly, there are steps you can take to try to determine where the problem is and how to fix it. This is referred to as “debugging” your project, and the rest of this section will be devoted to…


Admit it, 3D is cool. But, you know what's cooler? 2D.
I love WebGL, but unfortunately it doesn't work everywhere.
This lighting simulation can be configured to use either the 2D context of a canvas element or an array of SVG polygons to draw the triangles. It also utilises native Float32Arrays to store numerical data for highly optimised calculations.
This is a collaborative effort between
Matthew Wagerfield and Tobias van Schneider – a couple of pandas trying to make the web a more magical place.


RSDActiveStepViewController
open class RSDActiveStepViewController : RSDFullscreenImageStepViewController
RSDActiveStepViewController
is a simple timer for displaying a longer activity where the user is doing an action while
the countdown timer is running.
This view controller includes a default nib implementation that is included in this framework. It includes various UI elements that can indicate to the user how much time is remaining in a longer-running step. For example, this could be used during a walk step to indicate to the user how long they have been walking as well as how much longer they have to walk before the step is complete.
Seealso
RSDTaskViewController.vendDefaultViewController(for:)
-
An instruction label that is updated to show the same text that is spoken as a spoken instruction to the user.
Seealso
`speakInstruction(_:, at:, completion:)Declaration
Swift
@IBOutlet open var instructionLabel: UILabel?
-
The countdown dial is a graphical element used to display progress to the user.
Declaration
Swift
@IBOutlet open var countdownDial: RSDProgressIndicator?
-
The unit label is a label that can be used to indicate the unit of the progress label. It is included as a separate label to allow that text to be easily defined with a different font, color, and/or position in the associated nib or storyboard.For example, in a walking step, a subclass may use the progress label to display the distance the user walked (calulated using GPS or pedometer sensor data) and would then assign this label to the
feet
ormeters
showing the unit of measurement.Note
The default implementation does not use this label, but it is included so that subclasses may take advantage of it and still use the default nib included in this framework.
Seealso
progressLabel
Declaration
Swift
@IBOutlet open var unitLabel: UILabel?
-
A label that is updated to show a countdown. For example,
5:35
.Declaration
Swift
@IBOutlet open var countdownLabel: UILabel?
-
A label that is displayed to the user when the countdown is finished.
Declaration
Swift
@IBOutlet open var doneLabel: UILabel?
-
Returns the allowed countdown units for the countdown label. Default is to show only seconds if the duration is less than 90 seconds.
Declaration
Swift
open var allowedCountdownUnits: NSCalendar.Unit { get }
-
Formatter for the countdown label.
Declaration
Swift
lazy open var countdownFormatter: DateComponentsFormatter { get set }
-
This class overrides
didSet
to update thecountdownLabel
to the new value formatted as a time interval in seconds. ThecountdownFormatter
is used to format the string derived from this time interval.Declaration
Swift
open override var countdown: Int { get set }
-
Update the countdown labels
Declaration
Swift
open func updateCountdownLabels()
-
This class overrides the speak instruction method and will set the
instructionLabel
to the same text that the voice synthesizer speaks.Declaration
Swift
open override func speakInstruction(_ instruction: String, at timeInterval: TimeInterval, completion: RSDVoiceBoxCompletionHandler?)
-
The start method is overridden to start the countdown dial animation.
Declaration
Swift
open override func start()
-
The pause method is overridden to pause the countdown dial animation.
Declaration
Swift
override open func pause()
-
The pause method is overridden to resume the countdown dial animation.
Declaration
Swift
override open func resume()
-
Override the timer to check if finished.
Declaration
Swift
override open func timerFired()
-
Stop any recorders that are attached to this step which would normally be stopped when the participant navigates away from the step.
Declaration
Swift
open func stopAsyncActions()
-
Called when the timer has fired and should either transition to the next step or update the display.
Declaration
Swift
open func timerFinished(_ duration: TimeInterval)
-
List of views that are hidden when transitioning to the
finished
state.Seealso
timerFinished()
Declaration
Swift
@IBOutlet open var activeViews: [UIView]?
-
Override
viewDidLoad
to set up initial values for the labels and progress indicators.Declaration
Swift
open override func viewDidLoad()
-
Declaration
Swift
open override func viewWillAppear(_ animated: Bool)
-
Declaration
Swift
open override func setupViews()
-
Declaration
Swift
override open func setColorStyle(for placement: RSDColorPlacement, background: RSDColorTile)
-
The default nib name to use when instantiating the view controller using
init(step:)
.Declaration
Swift
open class var nibName: String { get }
-
The default bundle to use when instantiating the view controller using
init(step:)
.Declaration
Swift
open class var bundle: Bundle { get }
-
Initialize the class using the given nib and bundle.
Note
If this initializer is used with anil
nib, then it must assign the expected outlets.Declaration
Parameters
nibNameOrNil
The name of the nib or
nil
.nibBundleOrNil
The name of the bundle or
nil
. -
Required initializer. This is the initializer used by a
UIStoryboard
.Declaration
Swift
public required init?(coder aDecoder: NSCoder)
Parameters
aDecoder
The decoder used to initialize this view controller.


Welcome to Lambda Luminaries.

We meet in Sandton, Johannesburg (across from the Gautrain station), and our members are typically based in Pretoria and Johannesburg.
We started this group in August 2011 on Google Groups. Our first physical meetup was held on Monday, September 12, 2011.
We get together once a month (every second Monday of the month) to discuss functional programming concepts and languages e.g. Haskell, Clojure, Scala, Erlang etc. We also like comparing these to other languages.
Our goal is to:
- help foster and grow a healthy FP community.
- build skills by learning from each other.
- have some interesting conversations with like-minded people.
- keep the fun in functional programming.


Templates¶
-
class
dragonfly.template.classes.
Clause
(content, opening_line, closing_line)¶ Bases:
object
A Clause represents an entire command structure. This includes the Snippet`s for its opening and closing tags and any `Clause or Snippet contained within it.
-
increment_depth
()¶
-
to_snippets
()¶
-
-
class
dragonfly.template.classes.
Snippet
(content, line)¶ Bases:
object
A Snippet represents a line of templating code e.g if, etc…
-
increment_depth
()¶
-
-
class
dragonfly.template.classes.
Stack
¶ Bases:
object
A simple stack structure for the Parser
-
pop
()¶
-
push
(item)¶
-
push_many
(items)¶
-
-
dragonfly.template.classes.
identify
(string)¶ Identifies what clause the string is e.g opening.
- Parameters
string (str) – The string to identify.
- Returns
The identity of the clause.
- Return type
int
-
dragonfly.template.classes.
identify_python
(string)¶ Identifies the ‘python’ in the template.
- Parameters
string (str) – The string to identify.
- Returns
The identity of the python, if any.
- Return type
int
-
class
dragonfly.template.template.
Converter
(file)¶ Bases:
object
The Converter converts the given template file to the .py equivalent. This enables control structures and variables to be easily injected into HTML.
The Converter calls the Parser class first before generating the .py file.
- Parameters
file (str) – The template file to convert.
-
convert
()¶ Converts the template HTML to python.
-
fix_clause
(snippet_str)¶ Fixes clauses in if and else if statements.
- Parameters
snippet_str (str) – The templating language to fix.
:returns The fixed clause string :rtype str
-
class
dragonfly.template.template.
Parser
(file)¶ Bases:
object
The Parser reads from the given template file and converts it to a flat list of Snippet objects.
- Parameters
file (str) – The file to convert.
-
parse
()¶ Parses the given file to a list of Snippets
-
class
dragonfly.template.template.
View
(view, **kwargs)¶ Bases:
object
Returns a HTML version of the requested template.
The class first finds the desired view. If a pre-compiled python version of the template does not exist or is out of date, the class will generate one. Otherwise it imports the compiled python file and runs the .get_html method, passing in any variables that the user has given to the constructor (via **kwargs). It then returns a Response with this HTML.
- Parameters
view (str) – The view to return


Apache HTTP Server Version 1.3
Special Purpose Environment Variables
Interoperability problems have led to the introduction of
mechanisms to modify the way Apache behaves when talking to particular
clients. To make these mechanisms as flexible as possible, they
are invoked by defining environment variables, typically with
BrowserMatch, though
SetEnv and
PassEnv could also be used, for
example.
nokeepalive
This disables KeepAlive when set. Because
of problems with Netscape 2.x and KeepAlive, we recommend the following
directive be used:
BrowserMatch Mozilla/2 nokeepalive
force-response-1.0
This forces an HTTP/1.0 response when set. It was originally implemented as a
result of a problem with AOL's proxies. Some clients may not behave correctly
when given an HTTP/1.1 response, and this can be used to interoperate with
them.
downgrade-1.0
This forces the request to be treated as a HTTP/1.0 request even if it
was in a later dialect.
Apache HTTP Server Version 1.3


The Latest: Police say deaths were result of family dispute
by The Associated PressSAN DIEGO — The Latest on a shooting in San Diego (all times local):
2:35 p.m.
San Diego police believe the deaths of three young boys and their parents were the result of a domestic dispute involving a husband and wife who were apparently going through a divorce.
Police Chief David Nisleit told a news conference Saturday afternoon that the couple had split up some time ago and that the 29-year-old mother had recently obtained a restraining order against the 31-year-old father. No names were disclosed.
Police Lt. Matt Dobbs says officers were summoned to the home shortly before 7 a.m. Saturday by someone who made a 911 call from the residence.
They arrived to see a boy inside the home covered in blood and found others severely wounded when they broke in.
The man, woman and three of the children have died.
Police say another young boy is hospitalized in critical condition.
Authorities say all were the victims of gunshot wounds.
___
This story has been updated to remove reference to the surviving child’s age after new information from authorities.
___
12:20 p.m.
Five members of a family, including three young boys, have died and another boy was hospitalized with injuries in an apparent murder-suicide in San Diego.
Lt. Matt Dobbs said officers responded to a report of arguing and what sounded like a nail gun being fired inside a house in the Paradise Hills neighbourhood Saturday morning.
He said when officers arrived, they found a 3-year-old boy, a 29-year-old woman and a 31-year-old man dead inside. A 5-year-old boy and 9-year-old boy were taken to the hospital where they were pronounced dead.
An 11-year-old boy was also taken to the hospital to undergo surgery. His condition has not been released.
Dobbs said investigators found a gun in the house. Police believe the shooter was one of the deceased.
The Associated Press


Ruby wrapper around the Trello API
First, set up your key information. You can get this information by clicking here.
Trello.public_key = 'xxxxxxxxxxxxxxxxx' Trello.secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
All the calls this library make to Trello require authentication using these keys. Be sure to protect them.
So lets say you want to get information about the user bobtester. We can do something like this:
bob = Member.find("bobtester") # Print out his name puts bob.full_name # "Bob Tester" # Print his bio puts bob.bio # A wonderfully delightful test user # How about a list of his boards? bob.boards
And so much more. Consult the rest of the documentation for more information.
Feel free to peruse and participate in our Trello board. It’s completely open to the public.
Version of the Trello API that we use by default.
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.


This tool generates a .bin file from any image.
Output bin contains raw image data as BGR (blue, green, red) or ABGR (alpha + BGR).
Read the 3DS homebrew tutorial to learn how to use these BIN files in your homebrews.
The 3DS screens are rotated -90 degrees. To fix that, the tool rotates your image +90 degrees.


"I Can't Be Tricked by Anyone Who Looks Like Mark Zuckerberg"
November 2014
In 2013 a New York Times article quoted me as saying "I can be tricked by anyone who looks like Mark Zuckerberg."
That sentence has since become a minor Internet meme, as cherished by its adherents as the idea that Obama was born outside the US.
Is it true? Of course not. That statement was a joke. I have a strange ability to notice things about faces. In 2010 we had one applicant that I noticed during the interview looked like Zuck. Afterward I bored the other partners with an explanation of why. After years of hearing this sort of thing, my observations about faces had become an ongoing joke within YC. The startup in question fell apart almost immediately due to a cofounder dispute, and afterward the other partners kidded me for talking so much about how he looked like Zuck.
It was not only a joking reference to a single incident, but the fact that we joked about it shows we knew that looking like Zuck had no predictive value.
As if anyone would think it did. Could anyone be so naive as to think that resembling Zuck would be enough to make a founder succeed? And is it plausible that we, of all people, who'd interviewed thousands of founders, would think such a thing?
So why have so many people since believed I was serious? For the same reason, presumably, that others cling so tenaciously to the idea that Obama was born outside the US: because they so want to believe it.
Will writing this fix the problem? Not entirely, I'm sure. In fact one of the reasons I wrote it was that I'm curious how fixable this sort of bogus meme is. But it will be harder now to make an honest mistake. People will probably still repeat that quote, but now if someone does it will be proof that either (a) they didn't do their research or (b) they have an ideological axe to grind.


About
Reading to Kids is a grassroots organization dedicated to inspiring underserved children with a love of reading, thereby enriching their lives and opportunities for success in the future. To this end, Reading to Kids gathers on average 554 children and 287 volunteers at reading clubs on the second Saturday of every month at eight Los Angeles elementary schools.
At the monthly reading clubs, pairs of volunteers read aloud to small groups of children, while their parents receive training on how to encourage their children to read at home. Kids, parents, teachers, and school libraries receive book donations at the end of the reading clubs. These are important donations, as 60 percent of low-income homes do not have age-appropriate reading materials for children.
Since its inception in 1999, Reading to Kids has given 177,421 prize books to children who attend the reading clubs, donated 32,813 hardcover books to school libraries, and our volunteers have spent more than 219,777 hours reading to kids. Click here to see our entry on Wikipedia.
Reading to Kids is incorporated as a nonprofit corporation under the laws of the state of California and has been classified as an organization described in section 501(c)(3) of the federal Internal Revenue Code. The organization is exempt from both state and federal taxes; our tax ID number is 95-4758698.


MediaCenter
public class MediaCenter
| Field Summary | |
|---|---|
| private mixed | The folder whose subfolders contain the albums. |
| Constructor Summary | |
|---|---|
MediaCenter(string pathToAlbums) Constructor. |
| Method Summary | |
|---|---|
| private void | _addImagesToAlbum(Album album, string folder) Retrieves all images of the given folder and adds them to the album. |
| array | getAlbums(string albumName) Returns the albums sorted by date. |
private mixed $pathToAlbums = null
The folder whose subfolders contain the albums. */
public MediaCenter(string pathToAlbums)
Constructor.
private void _addImagesToAlbum(Album album, string folder)
Retrieves all images of the given folder and adds them to the album.
public array getAlbums(string albumName)
Returns the albums sorted by date.
Used to handle Albums. /