public static final class R.styleable
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int[] |
AdsAttrs
Attributes that can be used with a AdsAttrs.
|
static int |
AdsAttrs_adSize |
static int |
AdsAttrs_adSizes |
static int |
AdsAttrs_adUnitId |
static int[] |
com_facebook_friend_picker_fragment
Attributes that can be used with a com_facebook_friend_picker_fragment.
|
static int |
com_facebook_friend_picker_fragment_multi_select
This symbol is the offset where the
R.attr.multi_select
attribute's value can be found in the com_facebook_friend_picker_fragment array. |
static int[] |
com_facebook_like_view
Attributes that can be used with a com_facebook_like_view.
|
static int |
com_facebook_like_view_auxiliary_view_position
This symbol is the offset where the
R.attr.auxiliary_view_position
attribute's value can be found in the com_facebook_like_view array. |
static int |
com_facebook_like_view_foreground_color
This symbol is the offset where the
R.attr.foreground_color
attribute's value can be found in the com_facebook_like_view array. |
static int |
com_facebook_like_view_horizontal_alignment
This symbol is the offset where the
R.attr.horizontal_alignment
attribute's value can be found in the com_facebook_like_view array. |
static int |
com_facebook_like_view_object_id
This symbol is the offset where the
R.attr.object_id
attribute's value can be found in the com_facebook_like_view array. |
static int |
com_facebook_like_view_style
This symbol is the offset where the
R.attr.style
attribute's value can be found in the com_facebook_like_view array. |
static int[] |
com_facebook_login_view
Attributes that can be used with a com_facebook_login_view.
|
static int |
com_facebook_login_view_confirm_logout
This symbol is the offset where the
R.attr.confirm_logout
attribute's value can be found in the com_facebook_login_view array. |
static int |
com_facebook_login_view_fetch_user_info
This symbol is the offset where the
R.attr.fetch_user_info
attribute's value can be found in the com_facebook_login_view array. |
static int |
com_facebook_login_view_login_text
This symbol is the offset where the
R.attr.login_text
attribute's value can be found in the com_facebook_login_view array. |
static int |
com_facebook_login_view_logout_text
This symbol is the offset where the
R.attr.logout_text
attribute's value can be found in the com_facebook_login_view array. |
static int[] |
com_facebook_picker_fragment
Attributes that can be used with a com_facebook_picker_fragment.
|
static int |
com_facebook_picker_fragment_done_button_background
This symbol is the offset where the
R.attr.done_button_background
attribute's value can be found in the com_facebook_picker_fragment array. |
static int |
com_facebook_picker_fragment_done_button_text
This symbol is the offset where the
R.attr.done_button_text
attribute's value can be found in the com_facebook_picker_fragment array. |
static int |
com_facebook_picker_fragment_extra_fields
This symbol is the offset where the
R.attr.extra_fields
attribute's value can be found in the com_facebook_picker_fragment array. |
static int |
com_facebook_picker_fragment_show_pictures
This symbol is the offset where the
R.attr.show_pictures
attribute's value can be found in the com_facebook_picker_fragment array. |
static int |
com_facebook_picker_fragment_show_title_bar
This symbol is the offset where the
R.attr.show_title_bar
attribute's value can be found in the com_facebook_picker_fragment array. |
static int |
com_facebook_picker_fragment_title_bar_background
This symbol is the offset where the
R.attr.title_bar_background
attribute's value can be found in the com_facebook_picker_fragment array. |
static int |
com_facebook_picker_fragment_title_text
This symbol is the offset where the
R.attr.title_text
attribute's value can be found in the com_facebook_picker_fragment array. |
static int[] |
com_facebook_place_picker_fragment
Attributes that can be used with a com_facebook_place_picker_fragment.
|
static int |
com_facebook_place_picker_fragment_radius_in_meters
This symbol is the offset where the
R.attr.radius_in_meters
attribute's value can be found in the com_facebook_place_picker_fragment array. |
static int |
com_facebook_place_picker_fragment_results_limit
This symbol is the offset where the
R.attr.results_limit
attribute's value can be found in the com_facebook_place_picker_fragment array. |
static int |
com_facebook_place_picker_fragment_search_text
This symbol is the offset where the
R.attr.search_text
attribute's value can be found in the com_facebook_place_picker_fragment array. |
static int |
com_facebook_place_picker_fragment_show_search_box
This symbol is the offset where the
R.attr.show_search_box
attribute's value can be found in the com_facebook_place_picker_fragment array. |
static int[] |
com_facebook_profile_picture_view
Attributes that can be used with a com_facebook_profile_picture_view.
|
static int |
com_facebook_profile_picture_view_is_cropped
This symbol is the offset where the
R.attr.is_cropped
attribute's value can be found in the com_facebook_profile_picture_view array. |
static int |
com_facebook_profile_picture_view_preset_size
This symbol is the offset where the
R.attr.preset_size
attribute's value can be found in the com_facebook_profile_picture_view array. |
static int[] |
MapAttrs
Attributes that can be used with a MapAttrs.
|
static int |
MapAttrs_cameraBearing
This symbol is the offset where the
R.attr.cameraBearing
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_cameraTargetLat
This symbol is the offset where the
R.attr.cameraTargetLat
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_cameraTargetLng
This symbol is the offset where the
R.attr.cameraTargetLng
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_cameraTilt
This symbol is the offset where the
R.attr.cameraTilt
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_cameraZoom
This symbol is the offset where the
R.attr.cameraZoom
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_mapType
This symbol is the offset where the
R.attr.mapType
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_uiCompass
This symbol is the offset where the
R.attr.uiCompass
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_uiRotateGestures
This symbol is the offset where the
R.attr.uiRotateGestures
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_uiScrollGestures
This symbol is the offset where the
R.attr.uiScrollGestures
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_uiTiltGestures
This symbol is the offset where the
R.attr.uiTiltGestures
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_uiZoomControls
This symbol is the offset where the
R.attr.uiZoomControls
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_uiZoomGestures
This symbol is the offset where the
R.attr.uiZoomGestures
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_useViewLifecycle
This symbol is the offset where the
R.attr.useViewLifecycle
attribute's value can be found in the MapAttrs array. |
static int |
MapAttrs_zOrderOnTop
This symbol is the offset where the
R.attr.zOrderOnTop
attribute's value can be found in the MapAttrs array. |
static int[] |
WalletFragmentOptions
Attributes that can be used with a WalletFragmentOptions.
|
static int |
WalletFragmentOptions_appTheme |
static int |
WalletFragmentOptions_environment |
static int |
WalletFragmentOptions_fragmentMode |
static int |
WalletFragmentOptions_fragmentStyle |
static int[] |
WalletFragmentStyle
Attributes that can be used with a WalletFragmentStyle.
|
static int |
WalletFragmentStyle_buyButtonAppearance |
static int |
WalletFragmentStyle_buyButtonHeight |
static int |
WalletFragmentStyle_buyButtonText |
static int |
WalletFragmentStyle_buyButtonWidth |
static int |
WalletFragmentStyle_maskedWalletDetailsBackground |
static int |
WalletFragmentStyle_maskedWalletDetailsButtonBackground |
static int |
WalletFragmentStyle_maskedWalletDetailsButtonTextAppearance |
static int |
WalletFragmentStyle_maskedWalletDetailsHeaderTextAppearance |
static int |
WalletFragmentStyle_maskedWalletDetailsLogoImageType |
static int |
WalletFragmentStyle_maskedWalletDetailsLogoTextColor |
static int |
WalletFragmentStyle_maskedWalletDetailsTextAppearance |
| Constructor and Description |
|---|
R.styleable() |
public static final int[] AdsAttrs
Includes the following attributes:
| Attribute | Description |
|---|---|
| The size of the ad. |
| A comma-separated list of the supported ad sizes. |
| The ad unit ID. |
AdsAttrs_adSize
,
AdsAttrs_adSizes
,
AdsAttrs_adUnitId
public static final int AdsAttrs_adSize
public static final int AdsAttrs_adSizes
public static final int AdsAttrs_adUnitId
public static final int[] MapAttrs
Includes the following attributes:
MapAttrs_cameraBearing
,
MapAttrs_cameraTargetLat
,
MapAttrs_cameraTargetLng
,
MapAttrs_cameraTilt
,
MapAttrs_cameraZoom
,
MapAttrs_mapType
,
MapAttrs_uiCompass
,
MapAttrs_uiRotateGestures
,
MapAttrs_uiScrollGestures
,
MapAttrs_uiTiltGestures
,
MapAttrs_uiZoomControls
,
MapAttrs_uiZoomGestures
,
MapAttrs_useViewLifecycle
,
MapAttrs_zOrderOnTop
public static final int MapAttrs_cameraBearing
This symbol is the offset where the R.attr.cameraBearing
attribute's value can be found in the MapAttrs
array.
Must be a floating point value, such as "1.2
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_cameraTargetLat
This symbol is the offset where the R.attr.cameraTargetLat
attribute's value can be found in the MapAttrs
array.
Must be a floating point value, such as "1.2
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_cameraTargetLng
This symbol is the offset where the R.attr.cameraTargetLng
attribute's value can be found in the MapAttrs
array.
Must be a floating point value, such as "1.2
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_cameraTilt
This symbol is the offset where the R.attr.cameraTilt
attribute's value can be found in the MapAttrs
array.
Must be a floating point value, such as "1.2
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_cameraZoom
This symbol is the offset where the R.attr.cameraZoom
attribute's value can be found in the MapAttrs
array.
Must be a floating point value, such as "1.2
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_mapType
This symbol is the offset where the R.attr.mapType
attribute's value can be found in the MapAttrs
array.
Must be one of the following constant values.
| Constant | Value | Description |
|---|---|---|
none | 0 | |
normal | 1 | |
satellite | 2 | |
terrain | 3 | |
hybrid | 4 |
public static final int MapAttrs_uiCompass
This symbol is the offset where the R.attr.uiCompass
attribute's value can be found in the MapAttrs
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_uiRotateGestures
This symbol is the offset where the R.attr.uiRotateGestures
attribute's value can be found in the MapAttrs
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_uiScrollGestures
This symbol is the offset where the R.attr.uiScrollGestures
attribute's value can be found in the MapAttrs
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_uiTiltGestures
This symbol is the offset where the R.attr.uiTiltGestures
attribute's value can be found in the MapAttrs
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_uiZoomControls
This symbol is the offset where the R.attr.uiZoomControls
attribute's value can be found in the MapAttrs
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_uiZoomGestures
This symbol is the offset where the R.attr.uiZoomGestures
attribute's value can be found in the MapAttrs
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_useViewLifecycle
This symbol is the offset where the R.attr.useViewLifecycle
attribute's value can be found in the MapAttrs
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int MapAttrs_zOrderOnTop
This symbol is the offset where the R.attr.zOrderOnTop
attribute's value can be found in the MapAttrs
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int[] WalletFragmentOptions
Includes the following attributes:
| Attribute | Description |
|---|---|
| Theme to be used for the Wallet selector |
| Google Wallet environment to use |
| Fragment mode |
| A style resource specifing attributes to customize the look and feel of WalletFragment |
public static final int WalletFragmentOptions_appTheme
public static final int WalletFragmentOptions_environment
public static final int WalletFragmentOptions_fragmentMode
public static final int WalletFragmentOptions_fragmentStyle
public static final int[] WalletFragmentStyle
Includes the following attributes:
| Attribute | Description |
|---|---|
| Appearance of the buy button. |
| Height of the buy button. |
| Text on the buy button. |
| Width of the buy button. |
| Masked wallet details background |
| "Change" button background in masked wallet details view |
| TextAppearance for the "Change" button in masked wallet details view |
| TextAppearance for headers describing masked wallet details |
| Type of the wallet logo image in masked wallet details view |
| Color of the Google Wallet logo text in masked wallet details view |
| TextAppearance for masked wallet details |
WalletFragmentStyle_buyButtonAppearance
,
WalletFragmentStyle_buyButtonHeight
,
WalletFragmentStyle_buyButtonText
,
WalletFragmentStyle_buyButtonWidth
,
WalletFragmentStyle_maskedWalletDetailsBackground
,
WalletFragmentStyle_maskedWalletDetailsButtonBackground
,
WalletFragmentStyle_maskedWalletDetailsButtonTextAppearance
,
WalletFragmentStyle_maskedWalletDetailsHeaderTextAppearance
,
WalletFragmentStyle_maskedWalletDetailsLogoImageType
,
WalletFragmentStyle_maskedWalletDetailsLogoTextColor
,
WalletFragmentStyle_maskedWalletDetailsTextAppearance
public static final int WalletFragmentStyle_buyButtonAppearance
public static final int WalletFragmentStyle_buyButtonHeight
public static final int WalletFragmentStyle_buyButtonText
public static final int WalletFragmentStyle_buyButtonWidth
public static final int WalletFragmentStyle_maskedWalletDetailsBackground
public static final int WalletFragmentStyle_maskedWalletDetailsButtonBackground
public static final int WalletFragmentStyle_maskedWalletDetailsButtonTextAppearance
public static final int WalletFragmentStyle_maskedWalletDetailsHeaderTextAppearance
public static final int WalletFragmentStyle_maskedWalletDetailsLogoImageType
public static final int WalletFragmentStyle_maskedWalletDetailsLogoTextColor
public static final int WalletFragmentStyle_maskedWalletDetailsTextAppearance
public static final int[] com_facebook_friend_picker_fragment
Includes the following attributes:
| Attribute | Description |
|---|---|
|
public static final int com_facebook_friend_picker_fragment_multi_select
This symbol is the offset where the R.attr.multi_select
attribute's value can be found in the com_facebook_friend_picker_fragment
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int[] com_facebook_like_view
Includes the following attributes:
| Attribute | Description |
|---|---|
| |
| |
| |
| |
|
public static final int com_facebook_like_view_auxiliary_view_position
This symbol is the offset where the R.attr.auxiliary_view_position
attribute's value can be found in the com_facebook_like_view
array.
Must be one of the following constant values.
| Constant | Value | Description |
|---|---|---|
bottom | 0 | Keep in sync with Enums in LikeView |
inline | 1 | |
top | 2 |
public static final int com_facebook_like_view_foreground_color
This symbol is the offset where the R.attr.foreground_color
attribute's value can be found in the com_facebook_like_view
array.
Must be a color value, in the form of "#rgb
", "#argb
",
"#rrggbb
", or "#aarrggbb
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_like_view_horizontal_alignment
This symbol is the offset where the R.attr.horizontal_alignment
attribute's value can be found in the com_facebook_like_view
array.
Must be one of the following constant values.
| Constant | Value | Description |
|---|---|---|
center | 0 | Keep in sync with Enums in LikeView |
left | 1 | |
right | 2 |
public static final int com_facebook_like_view_object_id
This symbol is the offset where the R.attr.object_id
attribute's value can be found in the com_facebook_like_view
array.
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_like_view_style
This symbol is the offset where the R.attr.style
attribute's value can be found in the com_facebook_like_view
array.
Must be one of the following constant values.
| Constant | Value | Description |
|---|---|---|
standard | 0 | Keep in sync with Enums in LikeView |
button | 1 | |
box_count | 2 |
public static final int[] com_facebook_login_view
Includes the following attributes:
| Attribute | Description |
|---|---|
| |
| |
| |
|
public static final int com_facebook_login_view_confirm_logout
This symbol is the offset where the R.attr.confirm_logout
attribute's value can be found in the com_facebook_login_view
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_login_view_fetch_user_info
This symbol is the offset where the R.attr.fetch_user_info
attribute's value can be found in the com_facebook_login_view
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_login_view_login_text
This symbol is the offset where the R.attr.login_text
attribute's value can be found in the com_facebook_login_view
array.
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_login_view_logout_text
This symbol is the offset where the R.attr.logout_text
attribute's value can be found in the com_facebook_login_view
array.
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int[] com_facebook_picker_fragment
Includes the following attributes:
| Attribute | Description |
|---|---|
| |
| |
| |
| |
| |
| |
|
com_facebook_picker_fragment_done_button_background
,
com_facebook_picker_fragment_done_button_text
,
com_facebook_picker_fragment_extra_fields
,
com_facebook_picker_fragment_show_pictures
,
com_facebook_picker_fragment_show_title_bar
,
com_facebook_picker_fragment_title_bar_background
,
com_facebook_picker_fragment_title_text
public static final int com_facebook_picker_fragment_done_button_background
This symbol is the offset where the R.attr.done_button_background
attribute's value can be found in the com_facebook_picker_fragment
array.
Must be a reference to another resource, in the form "@[+][package:]type:name
"
or to a theme attribute in the form "?[package:][type:]name
".
public static final int com_facebook_picker_fragment_done_button_text
This symbol is the offset where the R.attr.done_button_text
attribute's value can be found in the com_facebook_picker_fragment
array.
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_picker_fragment_extra_fields
This symbol is the offset where the R.attr.extra_fields
attribute's value can be found in the com_facebook_picker_fragment
array.
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_picker_fragment_show_pictures
This symbol is the offset where the R.attr.show_pictures
attribute's value can be found in the com_facebook_picker_fragment
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_picker_fragment_show_title_bar
This symbol is the offset where the R.attr.show_title_bar
attribute's value can be found in the com_facebook_picker_fragment
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_picker_fragment_title_bar_background
This symbol is the offset where the R.attr.title_bar_background
attribute's value can be found in the com_facebook_picker_fragment
array.
Must be a reference to another resource, in the form "@[+][package:]type:name
"
or to a theme attribute in the form "?[package:][type:]name
".
public static final int com_facebook_picker_fragment_title_text
This symbol is the offset where the R.attr.title_text
attribute's value can be found in the com_facebook_picker_fragment
array.
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int[] com_facebook_place_picker_fragment
Includes the following attributes:
| Attribute | Description |
|---|---|
| |
| |
| |
|
public static final int com_facebook_place_picker_fragment_radius_in_meters
This symbol is the offset where the R.attr.radius_in_meters
attribute's value can be found in the com_facebook_place_picker_fragment
array.
Must be an integer value, such as "100
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_place_picker_fragment_results_limit
This symbol is the offset where the R.attr.results_limit
attribute's value can be found in the com_facebook_place_picker_fragment
array.
Must be an integer value, such as "100
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_place_picker_fragment_search_text
This symbol is the offset where the R.attr.search_text
attribute's value can be found in the com_facebook_place_picker_fragment
array.
Must be a string value, using '\\;' to escape characters such as '\\n' or '\\uxxxx' for a unicode character.
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_place_picker_fragment_show_search_box
This symbol is the offset where the R.attr.show_search_box
attribute's value can be found in the com_facebook_place_picker_fragment
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int[] com_facebook_profile_picture_view
Includes the following attributes:
| Attribute | Description |
|---|---|
| |
|
public static final int com_facebook_profile_picture_view_is_cropped
This symbol is the offset where the R.attr.is_cropped
attribute's value can be found in the com_facebook_profile_picture_view
array.
Must be a boolean value, either "true
" or "false
".
This may also be a reference to a resource (in the form
"@[package:]type:name
") or
theme attribute (in the form
"?[package:][type:]name
")
containing a value of this type.
public static final int com_facebook_profile_picture_view_preset_size
This symbol is the offset where the R.attr.preset_size
attribute's value can be found in the com_facebook_profile_picture_view
array.
Must be one of the following constant values.
| Constant | Value | Description |
|---|---|---|
small | -2 | Keep in sync with constants in ProfilePictureView |
normal | -3 | |
large | -4 |


Uppsala Group on Tokenisation
(Chris Manning, Francis Tyers, Hèctor Martínez Alonso, Huner Kaşıkara, Aibek Makazhanov)
>1 token is 1 word
Here we define a token as a space delimited sequence of characters.
In CoNLL-U format, there is a restriction that “Fields must not contain space characters.”.1 This is problematic for a number of languages, as a word may consist of more than one token.
Outcome
We came to the conclusion that the CoNLL-U format should allow multi-token words. The options were to use space itself, another spacing character (e.g. ZWNJ) or to use some punctuation character (such as #, _, ⎵, etc.) The opinion of the group was that as CoNLL-U format is tab-separated, it would not be problematic to allow spaces.
Linguistic examples
Vietnamese
“As a result of influence from the Chinese writing system, each syllable in Vietnamese is written separately as if it were a word. In the past, syllables in multisyllabic words were concatenated with hyphens, but this practice had died out, and hyphenation is now reserved for foreign borrowings.”2
Đảng Cộng⎵sản Việt⎵Nam
Party Communist Vietnam
Danh⎵sách quốc⎵gia xã⎵hội⎵chủ⎵nghĩa
List.of.names state socialist
In a wordlist for Vietnamese extracted from Wiktionary,3 over a third of headwords were multisyllabic.
Tuvan
Мен келген мен.
I come.PAST SG1
Ол келген.
He come.PAST SG3
Мен келген-дыр мен.
I come.PAST.EVID SG1
Turkish
Eve geliyor musun?
Home come.PROG QST.SG2 ?
But:
Eve geldin mi?
Home come.PAST.SG2 QST?
1 token is >1 word
Question word
(kaz) Нан бар ма?
(kir) Нан барбы?
(tat) Ипи бармы?
(tyv) Хлеб бар бе?
(tur) Ekmek var mı?
(chv) Çăкăр пур-и?
"Bread existing [is] QST?", "Is there bread?"
For the Tatar and Kyrgyz examples we can use, for example:
1 Нан нан NOUN
2-3 барбы _ _
2 бар бар ADJ
3 бы бы PART
4 ? ?  PUNCT
Copula
Мен студентпен.
I student.COP.SG1
Onun tutkusu spor arabalardı.
His passion.SG3 sport's car.PL.COP.PAST.SG3
We can separate the copula using:
1 Onun o PRON
2 tutkusu tutku NOUN
3 spor spor NOUN
4-5 arabalardı _ _
4 arabalar araba NOUN
5 dı i AUX
6 . .  PUNCT
Productive “derivations” (-DAGI, -NIKI, -LIK, -LI, -sIz)
The -DAGI suffix has been described well here.
Ben mavi arabadakileri gördüm.
I blue car.LOC.KI.PL.ACC see.PAST.SG1
"I see the ones in the blue car."
Mavi arabadakiler gazete okuyor.
Blue car.LOC.KI.PL.NOM newspaper.ACC read.PROG.3
"The ones in the blue car read the newspaper."

The -NIKI suffix (or in Turkish -NInki) works similarly to the -DAGI suffix, but for the genitive case.
Ben adamınkini gördüm.
I man.GEN.KI.ACC see.PAST.SG1
"I saw the man's ones."
The -LI morpheme creates attributives from bare noun phrases:
Бир палаталы парламент
One chamber.LI parliament
"Unicameral parliament" (not "One-chamberly parliament")
The -LIK morpheme works similarly to the -LI morpheme.
The -sIz morpheme is sometimes called the abessive case, corresponding to the preposition ‘without’. It could also be compared with the -less derivational morpheme in English. It creates attributive (like an adjective), adverbial or substantive phrases from a bare noun. Sometimes words with -sIz in can be lexicalised, for example like “evsiz” (home.SIZ “homeless”).
Ол хабарсыз кетеді.
He news.SIZ vanished
"He vanished without news."
Kayıt belgesizlere 2 bin TL ceza kesilecek.
Registration document.SIZ.PL.DAT 2 thousand TL fine cut.PASS.FUT.
"Those without registration documents will be fined 2,000 TL"
Causative
Babam arabayı Ali ustaya yaptırmış
Father.SG1 car.ACC Ali master.DAT fix.CAUS.EVID
"My father made master Ali fix the car."
The thoughts were for this construction to use a separate relation, for example nmod:caus
or nsubj:caus
for
the causative subject (causee) of a causative verb.


Hello!
Use this document as a way to quickly start any new project.
All you get is this text and a mostly barebones HTML document.
{% load staticfiles %}
Use this document as a way to quickly start any new project.
All you get is this text and a mostly barebones HTML document.


This is a neat trick which could be useful when troubleshooting Kubernetes services or testing Kubernetes clusters. This got used in a TGIK episode a while back and I’ve been meaning to test it and write it up for a while, as I’ve not seen many docs on it.
I’ve been starting to have a look at podman recently and in doing so, I noticed something potentially interesting from a security perspective, which is how podman handles the pulling of new container images. As podman is billed as a “drop-in” replacement for Docker (and indeed provides a package to alias docker commands to their podman equivalents), it’s interesting to note how default settings might differ, as these differences could trip up unsuspecting users moving from Docker to podman.
Being able to practice exploits and attacks is always useful for security testers, whether it’s working out whether a tool is working properly, or fine-tuning the syntax for a command in a predictable environment, it’s a very handy technique. One factor that can slow this down is having to rely on external resources, like Virtual Machines or cloud based resources, for running our tests. Ideally we should be able to run everything locally on a single machine.
I recently got my beta invite to the awesome Github Actions feature. This is a free to use CI/CD system. If you’re not familiar with CI/CD, you can think of it as a system which runs a series of actions during your development process to help test/maintain/deploy it. For example you could use CI to run your test suite on every commit, so you know if someone just broke the build.
Following on from the last post in this series lets setup a rather more ambitious set of reverse shells when attacking a Kubernetes cluster.
A handy technique for any pentester is the ability to create a reverse shell. This allows for a variety of cases where you want to get access to restricted environments or want to extract information from a remote system.
I’ve been looking for a way to explain an demonstrate the “no-new-privileges” option in Docker for a little while for my training course and recently came up with a way that should work, so thought it was worth a blog post.


dummy text of desc
dummy text of desc
dummy text of desc
dummy text of desc
dummy text of desc
dummy text of desc
dummy text of desc
dummy text of desc
dummy text of desc


JavaScript is a cross-platform, object-oriented scripting language used to make webpages interactive (e.g., having complex animations, clickable buttons, popup menus, etc.). There are also more advanced server side versions of JavaScript such as Node.js, which allow you to add more functionality to a website than simply downloading files (such as realtime collaboration between multiple computers). Inside a host environment (for example, a web browser), JavaScript can be connected to the objects of its environment to provide programmatic control over them.
JavaScript contains a standard library of objects, such as Array
, Date
, and Math
, and a core set of language elements such as operators, control structures, and statements. Core JavaScript can be extended for a variety of purposes by supplementing it with additional objects; for example:
This means that in the browser, JavaScript can change the way the webpage (DOM) looks. And, likewise, Node.js JavaScript on the server can respond to custom requests from code written in the browser.
From Mozilla's MDN Web Docs, learn more here.
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python's simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.
Often, programmers fall in love with Python because of the increased productivity it provides. Since there is no compilation step, the edit-test-debug cycle is incredibly fast. Debugging Python programs is easy: a bug or bad input will never cause a segmentation fault. Instead, when the interpreter discovers an error, it raises an exception. When the program doesn't catch the exception, the interpreter prints a stack trace. A source level debugger allows inspection of local and global variables, evaluation of arbitrary expressions, setting breakpoints, stepping through the code a line at a time, and so on. The debugger is written in Python itself, testifying to Python's introspective power. On the other hand, often the quickest way to debug a program is to add a few print statements to the source: the fast edit-test-debug cycle makes this simple approach very effective.
From Python.org documentation, learn more here.
C is a middle-level programming language developed by Dennis Ritchie during the early 1970s while working at AT&T Bell Labs in the USA. The objective of its development was in the context of the re-design of the UNIX operating system to enable it to be used on multiple computers.
Earlier the language B was now used for improving the UNIX system. Being a high-level language, B allowed much faster production of code than in assembly language. Still, B suffered from drawbacks as it did not understand data-types and did not provide the use of “structures”.
These drawbacks became the driving force for Ritchie for development of a new programming language called C. He kept most of language B’s syntax and added data-types and many other required changes. Eventually, C was developed during 1971-73, containing both high-level functionality and the detailed features required to program an operating system. Hence, many of the UNIX components including UNIX kernel itself were eventually rewritten in C.
From Geeksforgeeks.org, learn more here.


Bayelsa poll: APC, PDP shift battle to court - The Nation Newspaper
Mike Odiegwu, Yenagoa
The All Progressives Congress (APC) and the Peoples Democratic Party (PDP) have shifted their battles for the soul of Bayelsa State to the Court of Appeal and the Federal High Court.
The Candidate of the APC, Chief David Lyon, won the just-concluded governorship election in the state defeating his counterpart of the PDP, Senator Douye Diri, with a wide margin.
But investigations at the weekend revealed that both parties have legal hurdles to surmount before the February 14, 2020 hand over date.
The APC, Lyon and the Deputy Governor-elect, Biobarakumo Degi, were said to be wary of the three court cases challenging their qualifications and the process that led to their emergence as the candidates of the APC.
It was observed that few days to the election, a Federal High Court sitting in Abuja and presided over by Justice Inyang Ekwo gave a judgment disqualifying Degi following discrepancies in his name.
The case was instituted by the candidate of the PDP, Senator Douye Diri and his running mate Senator Lawrence Ewrujakpor.
Read Also: Kogi poll credible, say observer groups
But the APC immediately obtained a stay of execution of the judgment and immediately filed an appeal at the Court of Appeal.
It was, however, gathered that the party and its national and state leaders were not sleeping over the matter as they had shifted their attention at vacating the judgement of the lower court.
Investigations further revealed that Lyon and the party have shifted their focus to the Federal High Court Judgement that disqualified Lyon two days to the governorship poll in a case between the party and a frontline aspirant and a former Minister of State for Agriculture, Senator Heineken Lokpobiri.
In a controversial judgement, the court presided over by Justice Kate Inyang, held that the governorship primary conducted by the APC in Bayelsa was not in compliance with the party’s guidelines.
The court, which was said to have gone beyond the reliefs sought by the plaintiff thereby acting like a Father Christmas, ruled that both Lyon and Lokpobiri were not qualified to fly the flag of the APC.
It was gathered that Lokpobiri, Lyon and the APC leadership were set to begin legal fireworks at the Court of Appeal.
Besides the APC and Lyon were said to be paying attention to a suit instituted by another aspirant, Preye Aganaba challenging the emergence of Lyon.
Aganaba asked the court to nullify the primary poll that produced Lyon alleging that the internal election fell short of the guidelines of the party.
It was further observed that the PDP and its candidate, Douye Diri, had its fair share of litigations with a frontline aspirant and former Managing Director, Niger Delta Development Commission (NDDC), Chief Timi Alaibe challenging the process that led to the party primary.
It was gathered that the court would soon pick a date for judgement having adjourned the case sine die.


 Why is this a thing? Why are to books so tiny? Why are they on the shelf like this, poised to explode if you move one.
| . . . . . | ||
| Go West | Go East | |
| Go South |


- FirstItem
- SecondItem
- ThirdItem
- FourthItem
- FifthItem
- SixthItem
- FirstItem
- SecondItem
- ThirdItem
- FourthItem
- FifthItem
- SixthItem
- seventhItem
- EightItem
- NinethItem
| Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell |
| Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell |
| Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell |
| Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell |
| Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell |
| Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell | Cell |


As you know, I am currently keeping my eye out for chickens. Thanks, then, to Ruthie Bosch for sending me this snap of a chicken alongside a smoking child, from a century or so ago. I will probably receive a stern directive from some governmental agency insisting that I airbrush the gasper out of the photograph, but history is history. Weirdly, it seems that in the early twentieth century not everyone was in thrall to some kind of Blairite-Cameronian-Third-Way-Consensus, in spite of what the BBC tells us. (See Lark Rise To Candleford, and any other period drama.)


The requested page was not found.
If you clicked on a link from my blog to get here, it's likely just unpublished. You can ask me to publish it by creating an issue on github here. Click here to go back to the homepage.


---
layout: post
title: Make me move
date: '2012-11-15T00:29:00.001-07:00'
author: April
tags:
modified_time: '2012-11-15T00:29:20.655-07:00'
blogger_id: tag:blogger.com,1999:blog-6400085873105072120.post-4818558341281115764
blogger_orig_url: http://www.svlark.com/2012/11/make-me-move.html
---
Someone responded to our Zillow 'make me move' ad, and now the most dreaded part of this whole process, getting the house ready to show, is upon us. They want to look at the house this weekend, leaving us a whopping 48 to 72 hours to get it ready. We are frantically cleaning, and making shopping lists. Unfortunately we won't be able to get to some of the bigger projects like re-tiling the bathroom. Jacob and I really do work well under pressure though so I believe in us that we will get it done in time.
It's sort of exciting that we may be able to move on to our next adventure sooner rather than later. If this doesn't pan out though at least this exercise is helping us get the house ready more quickly.


--- title: Home layout: welcome welcome_img: wglasses2.jpg vimage: kvector.png ---
Everyone knows that rails is able to generate code for all the bits and pieces necessary for a website via a lot of code under the surface, the so called rails "magic"...while I like a good magic show programming is not magic. Just like I understand the workings of my car so if it breaks down I have a better chance to get it going again or at least know how to proceed, and the same goes for rails. I think it's best to not only understand rails, but also understand the ruby code underneath. To me they go hand in hand. It makes for a smoother drive.


You can toggle the API tree, search the API tree, and toggle member details.
On the right side of the IDE, click API to open and close the API Tree.
In the search bar at the top of the API tree panel, enter the name of a QCAlgorithm base class member to search the API tree.
In the API tree panel, click on a member name in the tree to expand and collapse member details. If the member you select returns a class (for example, self.Universe
Universe
), then the members of the class are added to the API tree.


| [ Team LiB ] |
5.2 World Wide Web Applications5.2.1 Common Gateway Interface
The module cgi provides a number of helpful tools for creating CGI scripts. There are two elements to CGI, basically: (1) Reading query values. (2) Writing the results back to the requesting browser. The first of these elements is aided by the cgi module, the second is just a matter of formatting suitable text to return. The cgi module contains one class that is its primary interface; it also contains several utility functions that are not documented here because their use is uncommon (and not hard to replicate and customize for your specific needs). See the Python Library Reference for details on the utility functions. A CGI PRIMERA primer on the Common Gateway Interface is in order. A CGI script is just an application—in any programming language—that runs on a Web server. The server software recognizes a request for a CGI application, sets up a suitable environment, then passes control to the CGI application. By default, this is done by spawning a new process space for the CGI application to run in, but technologies like FastCGI and mod-python perform some tricks to avoid extra process creation. These latter techniques speed performance but change little from the point of view of the CGI application creator. A Python CGI script is called in exactly the same way any other URL is. The only difference between a CGI and a static URL is that the former is marked as executable by the Web server—conventionally, such scripts are confined to a ./cgi-bin/ subdirectory (sometimes another directory name is used); Web servers generally allow you to configure where CGI scripts may live. When a CGI script runs, it is expected to output a Content-Type header to STDOUT, followed by a blank line, then finally some content of the appropriate type—most often an HTML document. That is really all there is to it. CGI requests may utilize one of two methods: POST or GET. A POST request sends any associated query data to the STDIN of the CGI script (the Web server sets this up for the script). A GET request puts the query in an environment variable called QUERY_STRING. There is not a lot of difference between the two methods, but GET requests encode their query information in a Uniform Resource Identifier (URI) and may therefore be composed without HTML forms and saved/bookmarked. For example, the following is an HTTP GET query to a script example discussed below:
You do not actually need the cgi module to create CGI scripts. For example, let us look at the script simple.cgi mentioned above: simple.cgi#!/usr/bin/python import os,sys print "Content-Type: text/html" print print "<title>Environment test</title>
" for k,v in os.environ.items(): print k, "::", if len(v)<=40: print v else: print v[:37]+"..." print "<STDIN> ::", sys.stdin.read() print "
" I happen to have composed the above sample query by hand, but you will often call a CGI script from another Web page. Here is one that does so: http://gnosis.cx/simpleform.html<title>Test simple.cgi</title> <form action="cgi-bin/simple.cgi" method="GET" name="form"> <input type="hidden" name="this" value="that"> <input type="text" value="" name="spam" size="55" maxlength="256"> <input type="submit" value="GET"> </form> <form action="cgi-bin/simple.cgi" method="POST" name="form"> <input type="hidden" name="this" value="that"> <input type="text" value="" name="spam" size="55" maxlength="256"> <input type="submit" value="POST"> </form>  It turns out that the script simple.cgi is moderately useful; it tells the requester exactly what it has to work with. For example, the query above (which could be generated exactly by the GET form on simpleform.html) returns a Web page that looks like the one below (edited): DOCUMENT_ROOT :: /www/gnosis HTTP_ACCEPT_ENCODING :: gzip, deflate, compress;q=0.9 CONTENT_TYPE :: application/x-www-form-urlencoded SERVER_PORT :: 80 REMOTE_ADDR :: 151.203.xxx.xxx SERVER_NAME :: www.gnosis.cx HTTP_USER_AGENT :: Mozilla/5.0 (Macintosh; U; PPC Mac OS... REQUEST_URI :: /cgi-bin/simple.cgi?this=that&spam=eg... QUERY_STRING :: this=that&spam=eggs+are+good SERVER_PROTOCOL :: HTTP/1.1 HTTP_HOST :: gnosis.cx REQUEST_METHOD :: GET SCRIPT_NAME :: /cgi-bin/simple.cgi SCRIPT_FILENAME :: /www/gnosis/cgi-bin/simple.cgi HTTP_REFERER :: http://gnosis.cx/simpleform.html <STDIN> :: A few environment variables have been omitted, and those available will differ between Web servers and setups. The most important variable is QUERY_STRING; you may perhaps want to make other decisions based on the requesting REMOTE_ADDR, HTTP_USER_AGENT, or HTTP_REFERER (yes, the variable name is spelled wrong). Notice that STDIN is empty in this case. However, using the POST form on the sample Web page will give a slightly different response (trimmed): CONTENT_LENGTH :: 28 REQUEST_URI :: /cgi-bin/simple.cgi QUERY_STRING :: REQUEST_METHOD :: POST <STDIN> :: this=that&spam=eggs+are+good The CONTENT_LENGTH environment variable is new, QUERY_STRING has become empty, and STDIN contains the query. The rest of the omitted variables are the same. A CGI script need not utilize any query data and need not return an HTML page. For example, on some of my Web pages, I utilize a "Web bug"—a 1x1 transparent gif file that reports back who "looks" at it. Web bugs have a less-honorable use by spammers who send HTML mail and want to verify receipt covertly; but in my case, I only want to check some additional information about visitors to a few of my own Web pages. A Web page might contain, at bottom:  The script itself is: visitor.cgi#!/usr/bin/python import os from sys import stdout addr = os.environ.get("REMOTE_ADDR","Unknown IP Address") agent = os.environ.get("HTTP_USER_AGENT","No Known Browser") fp = open('visitor.log','a') fp.write('%s\t%s\n' % (addr, agent)) fp.close() stdout.write("Content-type: image/gif\n\n") stdout.write('GIF89a\001\000\001\000\370\000\000\000\000\000') stdout.write('\000\000\000!\371\004\001\000\000\000\000,\000') stdout.write('\000\000\000\001\000\001\000\000\002\002D\001\000;') CLASSESThe point where the cgi module becomes useful is in automating form processing. The class cgi.FieldStorage will determine the details of whether a POST or GET request was made, and decode the urlencoded query into a dictionary-like object. You could perform these checks manually, but cgi makes it much easier to do. cgi.FieldStorage([fp=sys.stdin [,headers [,ob [,environ=os.environ [,keep_blank_values=0 [,strict_parsing=0]]]]]])Construct a mapping object containing query information. You will almost always use the default arguments and construct a standard instance. A cgi.FieldStorage object allows you to use name indexing and also supports several custom methods. On initialization, the object will determine all relevant details of the current CGI invocation. import cgi query = cgi.FieldStorage() eggs = query.getvalue('eggs','default_eggs') numfields = len(query) if query.has_key('spam'): spam = query['spam'] [...] When you retrieve a cgi.FieldStorage value by named indexing, what you get is not a string, but either an instance of cgi.FieldStorage objects (or maybe cgi.MiniFieldStorage) or a list of such objects. The string query is in their .value attribute. Since HTML forms may contain multiple fields with the same name, multiple values might exist for a key—a list of such values is returned. The safe way to read the actual strings in queries is to check whether a list is returned: if type(eggs) is type([]): # several eggs for egg in eggs: print "
Egg
\n
", egg.value, "
" else: print "
Eggs
\n
", eggs.value, "
" For special circumstances you might wish to change the initialization of the instance by specifying an optional (named) argument. The argument fp specifies the input stream to read for POST requests. The argument headers contains a dictionary mapping HTTP headers to values—usually consisting of {"Content-Type":...}; the type is determined from the environment if no argument is given. The argument environ specified where the environment mapping is found. If you specify a true value for keep_blank_values, a key will be included for a blank HTML form field—mapping to an empty string. If string_parsing is specified, a ValueError will be raised if there are any flaws in the query string. METHODSThe methods .keys(), .values(), and .has_key() work as with a standard dictionary object. The method .items(), however, is not supported. cgi.FieldStorage.getfirst(key [,default=None])Python 2.2+ has this method to return exactly one string corresponding to the key key. You cannot rely on which such string value will be returned if multiple submitting HTML form fields have the same name—but you are assured of this method returning a string, not a list. cgi.FieldStorage.getlist(key [,default=None])Python 2.2+ has this method to return a list of strings whether there are one or several matches on the key key. This allows you to loop over returned values without worrying about whether they are a list or a single string. >>> spam = form.getlist('spam') >>> for s in spam: ... print s cgi.FieldStorage.getvalue(key [,default=None])Return a string or list of strings that are the value(s) corresponding to the key key. If the argument default is specified, return the specified value in case of key miss. In contrast to indexing by name, this method retrieves actual strings rather than storage objects with a .value attribute. >>> import sys, cgi, os >>> from cStringIO import StringIO >>> sys.stdin = StringIO("this=that&this=other&spam=good+eggs") >>> os.environ['REQUEST_METHOD'] = 'POST' >>> form = cgi.FieldStorage() >>> form.getvalue('this') ['that', 'other'] >>> form['this'] [MiniFieldStorage('this','that'),MiniFieldStorage('this','other')] ATTRIBUTEScgi.FieldStorage.fileIf the object handled is an uploaded file, this attribute gives the file handle for the file. While you can read the entire file contents as a string from the cgi.FieldStorage.value attribute, you may want to read it line-by-line instead. To do this, use the .readline() or .readlines() method of the file object. cgi.FieldStorage.filenameIf the object handled is an uploaded file, this attribute contains the name of the file. An HTML form to upload a file looks something like: <form action="upload.cgi" method="POST" enctype="multipart/form-data"> Name: <input name="" type="file" size="50"> <input type="submit" value="Upload"> </form> Web browsers typically provide a point-and-click method to fill in a file-upload form. cgi.FieldStorage.listThis attribute contains the list of mapping object within a cgi.FieldStorage object. Typically, each object in the list is itself a cgi.MiniStorage object instead (but this can be complicated if you upload files that themselves contain multiple parts). >>> form.list [MiniFieldStorage('this', 'that'), MiniFieldStorage('this', 'other'), MiniFieldStorage('spam', 'good eggs')] SEE ALSO: cgi.FieldStorage.getvalue() 380; cgi.FieldStorage.value
|
|
cgitb • Traceback manager for CGI scripts |
Python 2.2 added a useful little module for debugging CGI applications. You can download it for earlier Python versions from <http://lfw.org/python/cgitb.py>. A basic difficulty with developing CGI scripts is that their normal output is sent to STDOUT, which is caught by the underlying Web server and forwarded to an invoking Web browser. However, when a traceback occurs due to a script error, that output is sent to STDERR (which is hard to get at in a CGI context). A more useful action is either to log errors to server storage or display them in the client browser.
Using the cgitb module to examine CGI script errors is almost embarrassingly simple. At the top of your CGI script, simply include the lines:
import cgitb cgitb.enable()
If any exceptions are raised, a pretty-formatted report is produced (and possibly logged to a name starting with @).
Turn on traceback reporting. The argument display controls whether an error report is sent to the browser—you might not want this to happen in a production environment, since users will have little idea what to make of such a report (and there may be security issues in letting them see it). If logdir is specified, tracebacks are logged into files in that directory. The argument context indicates how many lines of code are displayed surrounding the point where an error occurred.
For earlier versions of Python, you will have to do your own error catching. A simple approach is:
import sys sys.stderr = sys.stdout def main(): import cgi # ...do the actual work of the CGI... # perhaps ending with: print template % script_dictionary print "Content-type: text/html\n\n" main()
This approach is not bad for quick debugging; errors go back to the browser. Unfortunately, though, the traceback (if one occurs) gets displayed as HTML, which means that you need to go to "View Source" in a browser to see the original line breaks in the traceback. With a few more lines, we can add a little extra sophistication.
import sys, traceback print "Content-type: text/html\n\n" try: # use explicit exception handling import my_cgi # main CGI functionality in 'my_cgi.py' my_cgi.main() except: import time errtime = '--- '+ time.ctime(time.time()) +' ---\n' errlog = open('cgi_errlog', 'a') errlog.write(errtime) traceback.print_exc(None, errlog) print "\n" print "<title>CGI Error Encountered!</title>\n" print "
A problem was encountered running MyCGI
" print "
Please check the server error log for details
" print ""
The second approach is quite generic as a wrapper for any real CGI functionality we might write. Just import a different CGI module as needed, and maybe make the error messages more detailed or friendlier.
SEE ALSO: cgi 376;
|
htmlentitydefs • HTML character entity references |
The module htmlentitydefs provides a mapping between ISO-8859-1 characters and the symbolic names of corresponding HTML 2.0 entity references. Not all HTML named entities have equivalents in the ISO-8859-1 character set; in such cases, names are mapped the HTML numeric references instead.
A dictionary mapping symbolic names to character entities.
>>> import htmlentitydefs >>> htmlentitydefs.entitydefs['omega'] 'ω' >>> htmlentitydefs.entitydefs['uuml'] '\xfc'
For some purposes, you might want a reverse dictionary to find the HTML entities for ISO-8859-1 characters.
>>> from htmlentitydefs import entitydefs >>> iso8859_1 = dict([(v,k) for k,v in entitydefs.items()]) >>> iso8859_1['\xfc'] 'uuml'
|
HTMLParser • Simple HTML and XHTML parser |
The module HTMLParser is an event-based framework for processing HTML files. In contrast to htmllib, which is based on sgmllib, HTMLParser simply uses some regular expressions to identify the parts of an HTML document—starttag, text, endtag, comment, and so on. The different internal implementation, however, makes little difference to users of the modules.
I find the module HTMLParser much more straightforward to use than htmllib, and therefore HTMLParser is documented in detail in this book, while htmllib is not. While htmllib more or less requires the use of the ancillary module formatter to operate, there is no extra difficultly in letting HTMLParser make calls to a formatter object. You might want to do this, for example, if you have an existing formatter/writer for a complex document format.
Both HTMLParser and htmllib provide an interface that is very similar to that of SAX or expat XML parsers. That is, a document—HTML or XML—is processed purely as a sequence of events, with no data structure created to represent the document as a whole. For XML documents, another processing API is the Document Object Model (DOM), which treats the document as an in-memory hierarchical data structure.
In principle, you could use xml.sax or xml.dom to process HTML documents that conformed with XHTML—that is, tightened up HTML that is actually an XML application The problem is that very little existing HTML is XHTML compliant. A syntactic issue is that HTML does not require closing tags in many cases, where XML/XHTML requires every tag to be closed. But implicit closing tags can be inferred from subsequent opening tags (e.g., with certain names). A popular tool like tidy does an excellent job of cleaning up HTML in this way. The more significant problem is semantic. A whole lot of actually existing HTML is quite lax about tag matching—Web browsers that successfully display the majority of Web pages are quite complex software projects.
For example, a snippet like that below is quite likely to occur in HTML you come across:

The IETF admonishes: Be lenient in what you accept.
If you know even a little HTML, you know that the author of this snippet presumably wanted the whole quote in italics, the word accept in bold. But converting the snippet into a data structure such as a DOM object is difficult to generalize. Fortunately, HTMLParser is fairly lenient about what it will process; however, for sufficiently badly formed input (or any other problem), the module will raise the exception HTMLParser.HTMLParseError.
SEE ALSO: htmllib 285; xml.sax 405;
The HTMLParser module contains the single class HTMLParser.HTMLParser. The class itself is fairly useful, since it does not actually do anything when it encounters any event. Utilizing HTMLParser.HTMLParser() is a matter of subclassing it and providing methods to handle the events you are interested in.
If it is important to keep track of the structural position of the current event within the document, you will need to maintain a data structure with this information. If you are certain that the document you are processing is well-formed XHTML, a stack suffices. For example:
#!/usr/bin/env python import HTMLParser html = """<title>Advice</title>
The IETF admonishes: Be strict in what you send.
  """ tagstack = [] class ShowStructure(HTMLParser.HTMLParser): def handle_starttag(self, tag, attrs): tagstack.append(tag) def handle_endtag(self, tag): tagstack.pop() def handle_data(self, data): if data.strip(): for tag in tagstack: sys.stdout.write('/'+tag) sys.stdout.write(' >> %s\n' % data[:40].strip()) ShowStructure().feed(html)
Running this optimistic parser produces:
% ./HTMLParser_stack.py /html/head/title >> Advice /html/body/p >> The /html/body/p/a >> IETF admonishes: /html/body/p/a/i >> Be strict in what you /html/body/p/a/i/b >> send /html/body/p/a/i >> .
You could, of course, use this context information however you wished when processing a particular bit of content (or when you process the tags themselves).
A more pessimistic approach is to maintain a "fuzzy" tagstack. We can define a new object that will remove the most recent starttag corresponding to an endtag and will also prevent
 and
 tags from nesting if no corresponding endtag is found. You could do more along this line for a production application, but a class like TagStack makes a good start:
class TagStack: def __init__(self, lst=[]): self.lst = lst def __getitem__(self, pos): return self.lst[pos] def append(self, tag): # Remove every paragraph-level tag if this is one if tag.lower() in ('p','blockquote'): self.lst = [t for t in self.lst if t not in ('p','blockquote')] self.lst.append(tag) def pop(self, tag): # "Pop" by tag from nearest pos, not only last item self.lst.reverse() try: pos = self.lst.index(tag) except ValueError: raise HTMLParser.HTMLParseError, "Tag not on stack" del self.lst[pos] self.lst.reverse() tagstack = TagStack()
This more lenient stack structure suffices to parse badly formatted HTML like the example given in the module discussion.
Close all buffered data, and treat any current data as if an EOF was encountered.
Send some additional HTML data to the parser instance from the string in the argument data. You may feed the instance with whatever size chunks of data you wish, and each will be processed, maintaining the previous state.
Return the current line number and offset. Generally called within a .handle_*() method to report or analyze the state of the processing of the HTML text.
Method called when a character reference is encountered, such as ϋ. Character references may be interspersed with element text, much as with entity references. You can construct a Unicode character from a character reference, and you may want to pass the Unicode (or raw character reference) to HTMLParser.HTMLParser.handle_data().
class CharacterData(HTMLParser.HTMLParser): def handle_charref(self, name): import unicodedata char = unicodedata.name(unichr(int(name))) self.handle_data(char) [...other methods...]
Method called when a comment is encountered. HTML comments begin with . The argument data contains the contents of the comment.
Method called when content data is encountered. All the text between tags is contained in the argument data, but if character or entity references are interspersed with text, the respective handler methods will be called in an interspersed fashion.
Method called when a declaration is encountered. HTML declarations with <! and end with >. The argument data contains the contents of the comment. Syntactically, comments look like a type of declaration, but are handled by the HTMLParser.HTMLParser.handle_comment() method.
Method called when an endtag is encountered. The argument tag contains the tag name (without brackets).
Method called when an entity reference is encountered, such as &. When entity references occur in the middle of an element text, calls to this method are interspersed with calls to HTMLParser.HTMLParser.handle_data(). In many cases, you will want to call the latter method with decoded entities; for example:
class EntityData(HTMLParser.HTMLParser): def handle_entityref(self, name): import htmlentitydefs self.handle_data(htmlentitydefs.entitydefs[name]) [...other methods...]
Method called when a processing instruction (PI) is encountered. PIs begin with <? and end with ?>. They are less common in HTML than in XML, but are allowed. The argument data contains the contents of the PI.
Method called when an XHTML-style empty tag is encountered, such as:

The arguments tag and attrs are identical to those passed to HTMLParser.HTMLParser.handle_starttag().
Method called when a starttag is encountered. The argument tag contains the tag name (without brackets), and the argument attrs contains the tag attributes as a list of pairs, such as [(''href'',"http://ietf.org)].
The last tag—start or end—that was encountered. Generally maintaining some sort of stack structure like those discussed is more useful. But this attribute is available automatically. You should treat it as read-only.
Restore the instance to its initial state, lose any unprocessed data (for example, content within unclosed tags).
|
urllib • Open an arbitrary URL |
The module urllib provides convenient, high-level access to resources on the Internet. While urllib lets you connect to a variety of protocols, to manage low-level details of connections—especially issues of complex authentication—you should use the module urllib2 instead. However, urllib does provide hooks for HTTP basic authentication.
The interface to urllib objects is file-like. You can substitute an object representing a URL connection for almost any function or class that expects to work with a read-only file. All of the World Wide Web, File Transfer Protocol (FTP) directories, and gopherspace can be treated, almost transparently, as if it were part of your local filesystem.
Although the module provides two classes that can be utilized or subclassed for more fine-tuned control, generally in practice the function urllib.urlopen() is the only interface you need to the urllib module.
Return a file-like object that connects to the Uniform Resource Locator (URL) resource named in url. This resource may be an HTTP, FTP, Gopher, or local file. The optional argument data can be specified to make a POST request to an HTTP URL. This data is a urlencoded string, which may be created by the urllib.urlencode() method. If no postdata is specified with an HTTP URL, the GET method is used.
Depending on the type of resource specified, a slightly different class is used to construct the instance, but each provides the methods: .read(), .readline(), .readlines(), .fileno(), .close(), .info(), and .geturl() (but not .xreadlines(), .seek(), or .tell()).
Most of the provided methods are shared by file objects, and each provides the same interface—arguments and return values—as actual file objects. The method .geturl() simply contains the URL that the object connects to, usually the same string as the url argument.
The method .info() returns mimetools.Message object. While the mimetools module is not documented in detail in this book, this object is generally similar to an email.Message.Message object—specifically, it responds to both the built-in str() function and dictionary-like indexing:
>>> u = urllib.urlopen('urlopen.py') >>> print 'u.info() ' <mimetools.Message instance at 0x62f800> >>> print u.info() Content-Type: text/x-python Content-Length: 577 Last-modified: Fri, 10 Aug 2001 06:03:04 GMT >>> u.info().keys() ['last-modified', 'content-length', 'content-type'] >>> u. info() ['content-type'] 'text/x-python'
SEE ALSO: urllib.urlretrieve() 390; urllib.urlencode() 390;
Save the resources named in the argument url to a local file. If the optional argument fname is specified, that filename will be used; otherwise, a unique temporary filename is generated. The optional argument data may contain a urlencoded string to pass to an HTTP POST request, as with urllib.urlopen().
The optional argument reporthook may be used to specify a callback function, typically to implement a progress meter for downloads. The function reporthook() will be called repeatedly with the arguments bl_transferred, bl_size, and file_size. Even remote files smaller than the block size will typically call reporthook() a few times, but for larger files, file_size will approximately equal bl_transferred*bl_size.
The return value of urllib.urlretrieve() is a pair (fname, info). The returned fname is the name of the created file—the same as the fname argument if it was specified. The info return value is a mimetools.Message object, like that returned by the .info() method of a urllib.urlopen object.
SEE ALSO: urllib.urlopen() 389; urllib.urlencode() 390;
Return a string with special characters escaped. Exclude any characters in the string safe for being quoted.
>>> urllib.quote('/~username/special&odd!') '/%7Eusername/special%26odd%21'
Same as urllib.quote(), but encode spaces as + also.
Return an unquoted string. Inverse operation of urllib.quote().
Return an unquoted string. Inverse operation of urllib.quote_plus().
Return a urlencoded query for an HTTP POST or GET request. The argument query may be either a dictionary-like object or a sequence of pairs. If pairs are used, their order is preserved in the generated query.
>>> query = urllib.urlencode([('hl','en'), ... ('q','Text Processing in Python')]) >>> print query hl=en&q=Text+Processing+in+Python >>> u = urllib.urlopen('http://google.com/search?'+query)
Notice, however, that at least as of the moment of this writing, Google will refuse to return results on this request because a Python shell is not a recognized browser (Google provides a SOAP interface that is more lenient, however). You could, but should not, create a custom urllib class that spoofed an accepted browser.
You can change the behavior of the basic urllib.urlopen() and urllib.urlretrieve() functions by substituting your own class into the module namespace. Generally this is the best way to use urllib classes:
import urllib class MyOpener(urllib.FancyURLopener): pass urllib._urlopener = MyOpener() u = urllib.urlopen("http://some.url") # uses custom class
Base class for reading URLs. Generally you should subclass from the class urllib.FancyURLopener unless you need to implement a nonstandard protocol from scratch.
The argument proxies may be specified with a mapping if you need to connect to resources through a proxy. The keyword arguments may be used to configure HTTPS authentication; specifically, you should give named arguments key_file and cert_file in this case.
import urllib proxies = {'http':'http://<IP_ADDRESS>','ftp':'ftp://192.168.256.1'} urllib._urlopener = urllib.URLopener(proxies, key_file='mykey', cert_file='mycert')
The optional initialization arguments are the same as for urllib.URLopener, unless you subclass further to use other arguments. This class knows how to handle 301 and 302 HTTP redirect codes, as well as 401 authentication requests. The class urllib.FancyURLopener is the one actually used by the urllib module, but you may subclass it to add custom capabilities.
Return the pair (user,passwd) to use for authentication. The default implementation calls the method .prompt_user_passwd() in turn. In a subclass you might want to either provide a GUI login interface or obtain authentication information from some other source, such as a database.
Open the URL url, optionally using HTTP POST query data.
SEE ALSO: urllib.urlopen() 389;
If the scheme is not recognized, the .open() method passes the request to this method. You can implement error reporting or fallback behavior here.
Prompt for the authentication pair (user,passwd) at the terminal. You may override this to prompt within a GUI. If the authentication is not obtained interactively, but by other means, directly overriding .get_user_passwd() is more logical.
Copies the URL url to the local file named fname. Callback to the progress function reporthook if specified. Use the optional HTTP POST query data in data.
SEE ALSO: urllib.urlretrieve() 390;
The User Agent string reported to a server is contained in this attribute. By default it is urllib/###, where the urllib version number is used rather than ###.
|
urlparse • Parse Uniform Resource Locators |
The module urlparse support just one fairly simple task, but one that is just complicated enough for quick implementations to get wrong. URLs describe a number of aspects of resources on the Internet: access protocol, network location, path, parameters, query, and fragment. Using urlparse, you can break out and combine these components to manipulate or generate URLs. The format of URLs is based on RFC-1738, RFC-1808, and RFC-2396.
Notice that the urlparse module does not parse the components of the network location, but merely returns them as a field. For example, the URL ftp://guest:gnosis@<IP_ADDRESS>:21//tmp/MAIL.MSG is a valid identifier on my local network (at least at the moment this is written). Tools like Mozilla and wget are happy to retrieve this file. Parsing this fairly complicated URL with urlparse gives us:
>>> import urlparse >>> url = 'ftp://guest:gnosis@<IP_ADDRESS>:21//tmp/MAIL.MSG' >>> urlparse.urlparse(url) ('ftp', 'guest:gnosis@<IP_ADDRESS>:21', '//tmp/MAIL.MSG', '', '', '',)
While this information is not incorrect, this network location itself contains multiple fields; all but the host are optional. The actual structure of a network location, using square bracket nesting to indicate optional components, is:
[user[:password]@]host[:port]
The following mini-module will let you further parse these fields:
#!/usr/bin/env python def location_parse(netloc): "Return tuple (user, passwd, host, port) for netloc" if '@' not in netloc: netloc = ':@' + netloc login, net = netloc.split('@') if ':' not in login: login += ':' user, passwd = login.split(':') if ':' not in net: net += ':' host, port = net.split(':') return (user, passwd, host, port) #-- specify network location on command-line if __name__=='__main__': import sys print location_parse(sys.argv[1])
Return a tuple consisting of six components of the URL url, (scheme, netloc, path, params, query, fragment). A URL is assumed to follow the pattern scheme://netloc/path;params?query#fragment. If a default scheme def_scheme is specified, that string will be returned in case no scheme is encoded in the URL itself. If fragments is set to a false value, any fragments will not be split from other fields.
>>> from urlparse import urlparse >>> urlparse('gnosis.cx/path/sub/file.html#sect', 'http', 1) ('http', '', 'gnosis.cx/path/sub/file.html', '', '', 'sect') >>> urlparse('gnosis.cx/path/sub/file.html#sect', 'http', 0) ('http', '', 'gnosis.cx/path/sub/file.html#sect', '', '', '') >>> urlparse('http://gnosis.cx/path/file.cgi?key=val#sect', ... 'gopher', 1) ('http', 'gnosis.cx', '/path/file.cgi', '' , 'key=val', 'sect') >>> urlparse('http://gnosis.cx/path/file.cgi?key=val#sect', ... 'gopher', 0) ('http', 'gnosis.cx', '/path/file.cgi', '', 'key=val#sect', '')
Construct a URL from a tuple containing the fields returned by urIparse.urlparse(). The returned URL has canonical form (redundancy eliminated) so urlparse.urlparse() and urlparse.urlunparse() are not precisely inverse operations; however, the composed urlunparse (urlparse (s)) should be idempotent.
Return a URL that has the same base path as base but has the file component file. For example:
>>> from urlparse import urljoin >>> urljoin('http://somewhere.lan/path/file.html', ... 'sub/other.html') 'http://somewhere.lan/path/sub/other.html'
In Python 2.2+ the functions urlparse.urlsplit() and urlparse.urlunsplit() are available. These differ from urlparse.urlparse() and urlparse.urlunparse() in returning a 5-tuple that does not split out params from path.
| [ Team LiB ] |


Welcome To Sarajevo
Beautiful Jugoslavia only a few short years ago was a most delightful vacation spot offering tourists lovely picture-postcard locations such as Mostar with its bridge across the river. Bombed to hell! There is nothing like a civil war to bring out the worst in what is euphemistically referred to as humans. Point blank shooting of prisoners who only a little while ago were one's neighbors is a daily occurrence.
This exciting film, based on true stories, is about one typical city, Sarajevo, caught up in a bloody war. It was world-famous a few years ago when it hosted the Winter Olympics. It is also about the foreign correspondents who live dangerously while snipers peck away at anyone or anything that moves.
Michael Henderson (Stephen Dillans) has been all over the world covering many Wars-Of-The-Month. But for sheer inhumanity, Yugoslavia wins the prize. His job is to get the best stories, the best pictures, for the media's viewers, readers back home. What is difficult to understand is that these correspondents risk their lives to bring us the news but back home many people have never even heard about Sarajevo and that its stories can be bumped for the less than earth-shaking news of the divorce of the Duke and Duchess of York, Andrew and Fergie.
Nightfall finds Henderson and the others meeting in the dimly generator-lit hotel's bar where they exchange stories about what they witnessed that day. . . while bombs and sniper shots are heard in the background. American journalist Flynn (Woody Harrelson) daily risks his life for a story. Some feel he is engaged in glamorizing his own heroics rather than telling the story of the war. Flynn, however, maintains that no one knows Sarajevo but they certainly have heard of Flynn.
The movie follows the story of the Ljubica-Ivezic orphanage run by Mrs. Savic (Gordana Gadzic). The orphanage houses newly-orphaned children as well as those who were orphaned before the war. Because of the political-religious climate in this divided country, some children are ruthlessly kept from being evacuated from the front line area.
At the orphanage, Henderson is enchanted by Emira (Emira Nusevic) a young orphan who is determined to get out and away from all this. Without fully realizing what difficulties and situations lie ahead, Henderson promises he will help her.
Marisa Tomei has the role of an American aid worker. Others in the cast include Kerry Fox, Gorn Visnjic and Emily Lloyd.
With heartbreak and excitement WELCOME TO SARAJEVO will keep you on edge. This is a film not to be missed.
Directed by Michael Winterbottom.
3.5 bytes
4 bytes = Superb 3 bytes = Too good to miss 2 bytes = Average 1 byte = Save your money
Copyright 1997 Ben Hoffman
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