text
stringlengths
2
99.9k
meta
dict
use netlink_packet_core::{ NetlinkDeserializable, NetlinkHeader, NetlinkMessage, NetlinkPayload, NetlinkSerializable, }; use std::error::Error; use std::fmt; // PingPongMessage represent the messages for the "ping-pong" netlink // protocol. There are only two types of messages. #[derive(Debug, Clone, Eq, PartialEq)] pub enum PingPongMessage { Ping(Vec<u8>), Pong(Vec<u8>), } // The netlink header contains a "message type" field that identifies // the message it carries. Some values are reserved, and we // arbitrarily decided that "ping" type is 18 and "pong" type is 20. pub const PING_MESSAGE: u16 = 18; pub const PONG_MESSAGE: u16 = 20; // A custom error type for when deserialization fails. This is // required because `NetlinkDeserializable::Error` must implement // `std::error::Error`, so a simple `String` won't cut it. #[derive(Debug, Clone, Eq, PartialEq)] pub struct DeserializeError(&'static str); impl Error for DeserializeError { fn description(&self) -> &str { self.0 } fn source(&self) -> Option<&(dyn Error + 'static)> { None } } impl fmt::Display for DeserializeError { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "{}", self.0) } } // NetlinkDeserializable implementation impl NetlinkDeserializable<PingPongMessage> for PingPongMessage { type Error = DeserializeError; fn deserialize(header: &NetlinkHeader, payload: &[u8]) -> Result<Self, Self::Error> { match header.message_type { PING_MESSAGE => Ok(PingPongMessage::Ping(payload.to_vec())), PONG_MESSAGE => Ok(PingPongMessage::Pong(payload.to_vec())), _ => Err(DeserializeError( "invalid ping-pong message: invalid message type", )), } } } // NetlinkSerializable implementation impl NetlinkSerializable<PingPongMessage> for PingPongMessage { fn message_type(&self) -> u16 { match self { PingPongMessage::Ping(_) => PING_MESSAGE, PingPongMessage::Pong(_) => PONG_MESSAGE, } } fn buffer_len(&self) -> usize { match self { PingPongMessage::Ping(vec) | PingPongMessage::Pong(vec) => vec.len(), } } fn serialize(&self, buffer: &mut [u8]) { match self { PingPongMessage::Ping(vec) | PingPongMessage::Pong(vec) => { buffer.copy_from_slice(&vec[..]) } } } } // It can be convenient to be able to create a NetlinkMessage directly // from a PingPongMessage. Since NetlinkMessage<T> already implements // From<NetlinkPayload<T>>, we just need to implement // From<NetlinkPayload<PingPongMessage>> for this to work. impl From<PingPongMessage> for NetlinkPayload<PingPongMessage> { fn from(message: PingPongMessage) -> Self { NetlinkPayload::InnerMessage(message) } } fn main() { let ping_pong_message = PingPongMessage::Ping(vec![0, 1, 2, 3]); let mut packet = NetlinkMessage::from(ping_pong_message); // Before serializing the packet, it is very important to call // finalize() to ensure the header of the message is consistent // with its payload. Otherwise, a panic may occur when calling // `serialize()` packet.finalize(); // Prepare a buffer to serialize the packet. Note that we never // set explicitely `packet.header.length` above. This was done // automatically when we called `finalize()` let mut buf = vec![0; packet.header.length as usize]; // Serialize the packet packet.serialize(&mut buf[..]); // Deserialize the packet let deserialized_packet = NetlinkMessage::<PingPongMessage>::deserialize(&buf) .expect("Failed to deserialize message"); // Normally, the deserialized packet should be exactly the same // than the serialized one. assert_eq!(deserialized_packet, packet); // This should print: // NetlinkMessage { header: NetlinkHeader { length: 20, message_type: 18, flags: 0, sequence_number: 0, port_number: 0 }, payload: InnerMessage(Ping([0, 1, 2, 3])) } println!("{:?}", packet); }
{ "pile_set_name": "Github" }
########################################################################### # Markdown Snippets # ########################################################################### extends pelican ############# # Headers # ############# snippet h1 "Header h1" b # ${1:Header name} $0 endsnippet snippet h1i "Header h1 with id" b # ${1:Header name} {#${2:id}} $0 endsnippet snippet h2 "Header h2" b ## ${1:Header name} $0 endsnippet snippet h2i "Header h2 with id" b ## ${1:Header name} {#${2:id}} $0 endsnippet snippet h3 "Header h3" b ### ${1:Header name} $0 endsnippet snippet h3i "Header h3 with id" b ### ${1:Header name} {#${2:id}} $0 endsnippet snippet h4 "Header h4" b #### ${1:Header name} $0 endsnippet snippet h4i "Header h4 with id" b #### ${1:Header name} {#${2:id}} $0 endsnippet snippet h5 "Header h5" b ##### ${1:Header name} $0 endsnippet snippet h5i "Header h5 with id" b ##### ${1:Header name} {#${2:id}} $0 endsnippet snippet h6 "Header h6" b ###### ${1:Header name} $0 endsnippet snippet h6i "Header h6 with id" b ###### ${1:Header name} {#${2:id}} $0 endsnippet snippet hrlnk "Header ID Link" [${1:Text}](#${2:Header ID})$0 endsnippet snippet hrlac "Header ID Link auto-complete" [${1:Text}](#${1/(\w+)(\s*)/\L$1\E(?2:-)/g})$0 endsnippet ########### # Links # ########### snippet lnk "Inline Link" [${1:${VISUAL:Text}}](${3:http://${2:www.url.com}}${4/.+/ "/}${4:opt title}${4/.+/"/})$0 endsnippet snippet rlnk "Reference-style link" [${1:${VISUAL:Text}}][${2:Reference}]$0 endsnippet snippet rdef "Reference-style link ID" [${1}]: ${3:http://${2:www.url.com}} $0 endsnippet snippet flnk "Fast link" <http://${1:url}>$0 endsnippet ############## # Emphasis # ############## snippet * "Italic" *${1:${VISUAL:Text}}*$0 endsnippet snippet _ "Strong" __${1:${VISUAL:Text}}__$0 endsnippet snippet *_ "Italic and Strong" ***${1:${VISUAL:Text}}***$0 endsnippet ############ # Quotes # ############ snippet > "Quote" !b > ${1:${VISUAL:Text}:${VISUAL:Text}} $0 endsnippet ########### # Lists # ########### snippet ol "Ordered List" 1. ${1} 2. ${2} 3. ${3} 4. ${4} $0 endsnippet snippet ul "Unordered List" * ${1} * ${2} * ${3} * ${4} $0 endsnippet ###################### # Definition Lists # ###################### snippet dl "Definition List" !b ${1:Word 1} : ${2:Definition} ${3:Word 2} : ${4:Definition} ${5:Word 3} : ${6:Definition} ${7:Word 4} : ${8:Definition} $0 endsnippet ############ # Images # ############ snippet img! "Image" ![${1:pic alt}](${2:path}${3/.+/ "/}${3:opt title}${3/.+/"/})$0 endsnippet snippet ilnk "Reference-style Image" ![${1:${VISUAL:Text}}][${2:Reference}] $0 endsnippet snippet idef "Reference-style Image ID" [${1}]: ${2:path}${3/.+/ "/}${3:opt title}${3/.+/"/} $0 endsnippet ############ # Tables # ############ snippet table "Table" ${1:First Header} | ${6:First Header} --------------------|-------------------- ${2:Content Cell} | ${7:Content Cell} ${3:Content Cell} | ${8:Content Cell} ${4:Content Cell} | ${9:Content Cell} ${5:Content Cell} | ${10:Content Cell} $0 endsnippet ########## # Code # ########## snippet ` "Inline code" \`${1:code}\` $0 endsnippet snippet ~ "Code" b ~~~ ${1:${VISUAL:Code}} ~~~ $0 endsnippet ##################### # Horizontal Rule # ##################### snippet hr "Horizontal Rule" b ---------- $0 endsnippet ############### # Footnotes # ############### snippet ft "Footnote Reference" [^${1:Footnote label}] endsnippet snippet ftd "Footnote Definition" [^${1:footnote label}]: ${2:Footnote} $0 endsnippet ################## # Abbreviations # ################## snippet abb "Abbreviation" b *[${1:abbreviation}]: ${2:definition} endsnippet
{ "pile_set_name": "Github" }
package shanyao.tabpagerindicatordemo.activity; import android.graphics.Color; import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentStatePagerAdapter; import android.support.v4.view.ViewPager; import shanyao.tabpagerindicatordemo.R; import shanyao.tabpagerindicatordemo.ShanYaoApplication; import shanyao.tabpagerindicatordemo.FragmentFactory; import shanyao.tabpagerindicatordemo.utils.CommonUtils; import shanyao.tabpagerindictor.TabPageIndicator; /** * Created by HuaChing904 on 2016/6/23. */ public class WeightNoExpandNoSame extends FragmentActivity { private TabPageIndicator indicator; private ViewPager viewPager; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.viewpager_indicator); indicator = (TabPageIndicator)findViewById(R.id.indicator); viewPager = (ViewPager)findViewById(R.id.viewPager); BasePagerAdapter adapter = new BasePagerAdapter(getSupportFragmentManager()); viewPager.setAdapter(adapter); indicator.setViewPager(viewPager); setTabPagerIndicator(); } private void setTabPagerIndicator() { indicator.setIndicatorMode(TabPageIndicator.IndicatorMode.MODE_WEIGHT_NOEXPAND_NOSAME);// 设置模式,一定要先设置模式 indicator.setDividerColor(Color.parseColor("#00bbcf"));// 设置分割线的颜色 indicator.setDividerPadding(CommonUtils.dip2px(ShanYaoApplication.getContext(), 10)); indicator.setIndicatorColor(Color.parseColor("#43A44b"));// 设置底部导航线的颜色 indicator.setTextColorSelected(Color.parseColor("#43A44b"));// 设置tab标题选中的颜色 indicator.setTextColor(Color.parseColor("#797979"));// 设置tab标题未被选中的颜色 indicator.setTextSize(CommonUtils.sp2px(ShanYaoApplication.getContext(), 16));// 设置字体大小 } class BasePagerAdapter extends FragmentStatePagerAdapter { String[] titles; public BasePagerAdapter(FragmentManager fm) { super(fm); this.titles = CommonUtils.getStringArray(R.array.no_expand_titles); } @Override public Fragment getItem(int position) { return FragmentFactory.createForNoExpand(position); } @Override public int getCount() { return titles.length; } @Override public CharSequence getPageTitle(int position) { return titles[position]; } } }
{ "pile_set_name": "Github" }
.class public final Lcom/facebook/R$attr; .super Ljava/lang/Object; # static fields .field public static final actionBarDivider:I = 0x7f01004e .field public static final actionBarItemBackground:I = 0x7f01004f .field public static final actionBarPopupTheme:I = 0x7f010048 .field public static final actionBarSize:I = 0x7f01004d .field public static final actionBarSplitStyle:I = 0x7f01004a .field public static final actionBarStyle:I = 0x7f010049 .field public static final actionBarTabBarStyle:I = 0x7f010044 .field public static final actionBarTabStyle:I = 0x7f010043 .field public static final actionBarTabTextStyle:I = 0x7f010045 .field public static final actionBarTheme:I = 0x7f01004b .field public static final actionBarWidgetTheme:I = 0x7f01004c .field public static final actionButtonStyle:I = 0x7f010069 .field public static final actionDropDownStyle:I = 0x7f010065 .field public static final actionLayout:I = 0x7f010130 .field public static final actionMenuTextAppearance:I = 0x7f010050 .field public static final actionMenuTextColor:I = 0x7f010051 .field public static final actionModeBackground:I = 0x7f010054 .field public static final actionModeCloseButtonStyle:I = 0x7f010053 .field public static final actionModeCloseDrawable:I = 0x7f010056 .field public static final actionModeCopyDrawable:I = 0x7f010058 .field public static final actionModeCutDrawable:I = 0x7f010057 .field public static final actionModeFindDrawable:I = 0x7f01005c .field public static final actionModePasteDrawable:I = 0x7f010059 .field public static final actionModePopupWindowStyle:I = 0x7f01005e .field public static final actionModeSelectAllDrawable:I = 0x7f01005a .field public static final actionModeShareDrawable:I = 0x7f01005b .field public static final actionModeSplitBackground:I = 0x7f010055 .field public static final actionModeStyle:I = 0x7f010052 .field public static final actionModeWebSearchDrawable:I = 0x7f01005d .field public static final actionOverflowButtonStyle:I = 0x7f010046 .field public static final actionOverflowMenuStyle:I = 0x7f010047 .field public static final actionProviderClass:I = 0x7f010132 .field public static final actionViewClass:I = 0x7f010131 .field public static final activityChooserViewStyle:I = 0x7f010071 .field public static final alertDialogButtonGroupStyle:I = 0x7f010096 .field public static final alertDialogCenterButtons:I = 0x7f010097 .field public static final alertDialogStyle:I = 0x7f010095 .field public static final alertDialogTheme:I = 0x7f010098 .field public static final allowStacking:I = 0x7f0100b1 .field public static final alpha:I = 0x7f0100ce .field public static final alphabeticModifiers:I = 0x7f01012d .field public static final arrowHeadLength:I = 0x7f0100e0 .field public static final arrowShaftLength:I = 0x7f0100e1 .field public static final autoCompleteTextViewStyle:I = 0x7f01009d .field public static final autoSizeMaxTextSize:I = 0x7f010037 .field public static final autoSizeMinTextSize:I = 0x7f010036 .field public static final autoSizePresetSizes:I = 0x7f010035 .field public static final autoSizeStepGranularity:I = 0x7f010034 .field public static final autoSizeTextType:I = 0x7f010033 .field public static final background:I = 0x7f01000c .field public static final backgroundSplit:I = 0x7f01000e .field public static final backgroundStacked:I = 0x7f01000d .field public static final backgroundTint:I = 0x7f01019c .field public static final backgroundTintMode:I = 0x7f01019d .field public static final barLength:I = 0x7f0100e2 .field public static final borderlessButtonStyle:I = 0x7f01006e .field public static final buttonBarButtonStyle:I = 0x7f01006b .field public static final buttonBarNegativeButtonStyle:I = 0x7f01009b .field public static final buttonBarNeutralButtonStyle:I = 0x7f01009c .field public static final buttonBarPositiveButtonStyle:I = 0x7f01009a .field public static final buttonBarStyle:I = 0x7f01006a .field public static final buttonGravity:I = 0x7f010191 .field public static final buttonPanelSideLayout:I = 0x7f010021 .field public static final buttonStyle:I = 0x7f01009e .field public static final buttonStyleSmall:I = 0x7f01009f .field public static final buttonTint:I = 0x7f0100cf .field public static final buttonTintMode:I = 0x7f0100d0 .field public static final cardBackgroundColor:I = 0x7f0100b2 .field public static final cardCornerRadius:I = 0x7f0100b3 .field public static final cardElevation:I = 0x7f0100b4 .field public static final cardMaxElevation:I = 0x7f0100b5 .field public static final cardPreventCornerOverlap:I = 0x7f0100b7 .field public static final cardUseCompatPadding:I = 0x7f0100b6 .field public static final checkboxStyle:I = 0x7f0100a0 .field public static final checkedTextViewStyle:I = 0x7f0100a1 .field public static final closeIcon:I = 0x7f010152 .field public static final closeItemLayout:I = 0x7f01001e .field public static final collapseContentDescription:I = 0x7f010193 .field public static final collapseIcon:I = 0x7f010192 .field public static final color:I = 0x7f0100dc .field public static final colorAccent:I = 0x7f01008d .field public static final colorBackgroundFloating:I = 0x7f010094 .field public static final colorButtonNormal:I = 0x7f010091 .field public static final colorControlActivated:I = 0x7f01008f .field public static final colorControlHighlight:I = 0x7f010090 .field public static final colorControlNormal:I = 0x7f01008e .field public static final colorError:I = 0x7f0100ad .field public static final colorPrimary:I = 0x7f01008b .field public static final colorPrimaryDark:I = 0x7f01008c .field public static final colorSwitchThumbNormal:I = 0x7f010092 .field public static final com_facebook_auxiliary_view_position:I = 0x7f0101a2 .field public static final com_facebook_confirm_logout:I = 0x7f0101a4 .field public static final com_facebook_foreground_color:I = 0x7f01019e .field public static final com_facebook_horizontal_alignment:I = 0x7f0101a3 .field public static final com_facebook_is_cropped:I = 0x7f0101a9 .field public static final com_facebook_login_text:I = 0x7f0101a5 .field public static final com_facebook_logout_text:I = 0x7f0101a6 .field public static final com_facebook_object_id:I = 0x7f01019f .field public static final com_facebook_object_type:I = 0x7f0101a0 .field public static final com_facebook_preset_size:I = 0x7f0101a8 .field public static final com_facebook_style:I = 0x7f0101a1 .field public static final com_facebook_tooltip_mode:I = 0x7f0101a7 .field public static final commitIcon:I = 0x7f010157 .field public static final contentDescription:I = 0x7f010133 .field public static final contentInsetEnd:I = 0x7f010017 .field public static final contentInsetEndWithActions:I = 0x7f01001b .field public static final contentInsetLeft:I = 0x7f010018 .field public static final contentInsetRight:I = 0x7f010019 .field public static final contentInsetStart:I = 0x7f010016 .field public static final contentInsetStartWithNavigation:I = 0x7f01001a .field public static final contentPadding:I = 0x7f0100b8 .field public static final contentPaddingBottom:I = 0x7f0100bc .field public static final contentPaddingLeft:I = 0x7f0100b9 .field public static final contentPaddingRight:I = 0x7f0100ba .field public static final contentPaddingTop:I = 0x7f0100bb .field public static final controlBackground:I = 0x7f010093 .field public static final customNavigationLayout:I = 0x7f01000f .field public static final defaultQueryHint:I = 0x7f010151 .field public static final dialogPreferredPadding:I = 0x7f010063 .field public static final dialogTheme:I = 0x7f010062 .field public static final displayOptions:I = 0x7f010005 .field public static final divider:I = 0x7f01000b .field public static final dividerHorizontal:I = 0x7f010070 .field public static final dividerPadding:I = 0x7f010129 .field public static final dividerVertical:I = 0x7f01006f .field public static final drawableSize:I = 0x7f0100de .field public static final drawerArrowStyle:I = 0x7f010000 .field public static final dropDownListViewStyle:I = 0x7f010082 .field public static final dropdownListPreferredItemHeight:I = 0x7f010066 .field public static final editTextBackground:I = 0x7f010077 .field public static final editTextColor:I = 0x7f010076 .field public static final editTextStyle:I = 0x7f0100a2 .field public static final elevation:I = 0x7f01001c .field public static final expandActivityOverflowButtonDrawable:I = 0x7f010020 .field public static final font:I = 0x7f0100f1 .field public static final fontFamily:I = 0x7f010038 .field public static final fontProviderAuthority:I = 0x7f0100ea .field public static final fontProviderCerts:I = 0x7f0100ed .field public static final fontProviderFetchStrategy:I = 0x7f0100ee .field public static final fontProviderFetchTimeout:I = 0x7f0100ef .field public static final fontProviderPackage:I = 0x7f0100eb .field public static final fontProviderQuery:I = 0x7f0100ec .field public static final fontStyle:I = 0x7f0100f0 .field public static final fontWeight:I = 0x7f0100f2 .field public static final gapBetweenBars:I = 0x7f0100df .field public static final goIcon:I = 0x7f010153 .field public static final height:I = 0x7f010001 .field public static final hideOnContentScroll:I = 0x7f010015 .field public static final homeAsUpIndicator:I = 0x7f010068 .field public static final homeLayout:I = 0x7f010010 .field public static final icon:I = 0x7f010009 .field public static final iconTint:I = 0x7f010135 .field public static final iconTintMode:I = 0x7f010136 .field public static final iconifiedByDefault:I = 0x7f01014f .field public static final imageButtonStyle:I = 0x7f010078 .field public static final indeterminateProgressStyle:I = 0x7f010012 .field public static final initialActivityCount:I = 0x7f01001f .field public static final isLightTheme:I = 0x7f010002 .field public static final itemPadding:I = 0x7f010014 .field public static final layout:I = 0x7f01014e .field public static final listChoiceBackgroundIndicator:I = 0x7f01008a .field public static final listDividerAlertDialog:I = 0x7f010064 .field public static final listItemLayout:I = 0x7f010025 .field public static final listLayout:I = 0x7f010022 .field public static final listMenuViewStyle:I = 0x7f0100aa .field public static final listPopupWindowStyle:I = 0x7f010083 .field public static final listPreferredItemHeight:I = 0x7f01007d .field public static final listPreferredItemHeightLarge:I = 0x7f01007f .field public static final listPreferredItemHeightSmall:I = 0x7f01007e .field public static final listPreferredItemPaddingLeft:I = 0x7f010080 .field public static final listPreferredItemPaddingRight:I = 0x7f010081 .field public static final logo:I = 0x7f01000a .field public static final logoDescription:I = 0x7f010196 .field public static final maxButtonHeight:I = 0x7f010190 .field public static final measureWithLargestChild:I = 0x7f010127 .field public static final multiChoiceItemLayout:I = 0x7f010023 .field public static final navigationContentDescription:I = 0x7f010195 .field public static final navigationIcon:I = 0x7f010194 .field public static final navigationMode:I = 0x7f010004 .field public static final numericModifiers:I = 0x7f01012e .field public static final overlapAnchor:I = 0x7f01013f .field public static final paddingBottomNoButtons:I = 0x7f010141 .field public static final paddingEnd:I = 0x7f01019a .field public static final paddingStart:I = 0x7f010199 .field public static final paddingTopNoTitle:I = 0x7f010142 .field public static final panelBackground:I = 0x7f010087 .field public static final panelMenuListTheme:I = 0x7f010089 .field public static final panelMenuListWidth:I = 0x7f010088 .field public static final popupMenuStyle:I = 0x7f010074 .field public static final popupTheme:I = 0x7f01001d .field public static final popupWindowStyle:I = 0x7f010075 .field public static final preserveIconSpacing:I = 0x7f010137 .field public static final progressBarPadding:I = 0x7f010013 .field public static final progressBarStyle:I = 0x7f010011 .field public static final queryBackground:I = 0x7f010159 .field public static final queryHint:I = 0x7f010150 .field public static final radioButtonStyle:I = 0x7f0100a3 .field public static final ratingBarStyle:I = 0x7f0100a4 .field public static final ratingBarStyleIndicator:I = 0x7f0100a5 .field public static final ratingBarStyleSmall:I = 0x7f0100a6 .field public static final searchHintIcon:I = 0x7f010155 .field public static final searchIcon:I = 0x7f010154 .field public static final searchViewStyle:I = 0x7f01007c .field public static final seekBarStyle:I = 0x7f0100a7 .field public static final selectableItemBackground:I = 0x7f01006c .field public static final selectableItemBackgroundBorderless:I = 0x7f01006d .field public static final showAsAction:I = 0x7f01012f .field public static final showDividers:I = 0x7f010128 .field public static final showText:I = 0x7f010169 .field public static final showTitle:I = 0x7f010026 .field public static final singleChoiceItemLayout:I = 0x7f010024 .field public static final spinBars:I = 0x7f0100dd .field public static final spinnerDropDownItemStyle:I = 0x7f010067 .field public static final spinnerStyle:I = 0x7f0100a8 .field public static final splitTrack:I = 0x7f010168 .field public static final srcCompat:I = 0x7f01002c .field public static final state_above_anchor:I = 0x7f010140 .field public static final subMenuArrow:I = 0x7f010138 .field public static final submitBackground:I = 0x7f01015a .field public static final subtitle:I = 0x7f010006 .field public static final subtitleTextAppearance:I = 0x7f010189 .field public static final subtitleTextColor:I = 0x7f010198 .field public static final subtitleTextStyle:I = 0x7f010008 .field public static final suggestionRowLayout:I = 0x7f010158 .field public static final switchMinWidth:I = 0x7f010166 .field public static final switchPadding:I = 0x7f010167 .field public static final switchStyle:I = 0x7f0100a9 .field public static final switchTextAppearance:I = 0x7f010165 .field public static final textAllCaps:I = 0x7f010032 .field public static final textAppearanceLargePopupMenu:I = 0x7f01005f .field public static final textAppearanceListItem:I = 0x7f010084 .field public static final textAppearanceListItemSecondary:I = 0x7f010085 .field public static final textAppearanceListItemSmall:I = 0x7f010086 .field public static final textAppearancePopupMenuHeader:I = 0x7f010061 .field public static final textAppearanceSearchResultSubtitle:I = 0x7f01007a .field public static final textAppearanceSearchResultTitle:I = 0x7f010079 .field public static final textAppearanceSmallPopupMenu:I = 0x7f010060 .field public static final textColorAlertDialogListItem:I = 0x7f010099 .field public static final textColorSearchUrl:I = 0x7f01007b .field public static final theme:I = 0x7f01019b .field public static final thickness:I = 0x7f0100e3 .field public static final thumbTextPadding:I = 0x7f010164 .field public static final thumbTint:I = 0x7f01015f .field public static final thumbTintMode:I = 0x7f010160 .field public static final tickMark:I = 0x7f01002f .field public static final tickMarkTint:I = 0x7f010030 .field public static final tickMarkTintMode:I = 0x7f010031 .field public static final tint:I = 0x7f01002d .field public static final tintMode:I = 0x7f01002e .field public static final title:I = 0x7f010003 .field public static final titleMargin:I = 0x7f01018a .field public static final titleMarginBottom:I = 0x7f01018e .field public static final titleMarginEnd:I = 0x7f01018c .field public static final titleMarginStart:I = 0x7f01018b .field public static final titleMarginTop:I = 0x7f01018d .field public static final titleMargins:I = 0x7f01018f .field public static final titleTextAppearance:I = 0x7f010188 .field public static final titleTextColor:I = 0x7f010197 .field public static final titleTextStyle:I = 0x7f010007 .field public static final toolbarNavigationButtonStyle:I = 0x7f010073 .field public static final toolbarStyle:I = 0x7f010072 .field public static final tooltipForegroundColor:I = 0x7f0100ac .field public static final tooltipFrameBackground:I = 0x7f0100ab .field public static final tooltipText:I = 0x7f010134 .field public static final track:I = 0x7f010161 .field public static final trackTint:I = 0x7f010162 .field public static final trackTintMode:I = 0x7f010163 .field public static final voiceIcon:I = 0x7f010156 .field public static final windowActionBar:I = 0x7f010039 .field public static final windowActionBarOverlay:I = 0x7f01003b .field public static final windowActionModeOverlay:I = 0x7f01003c .field public static final windowFixedHeightMajor:I = 0x7f010040 .field public static final windowFixedHeightMinor:I = 0x7f01003e .field public static final windowFixedWidthMajor:I = 0x7f01003d .field public static final windowFixedWidthMinor:I = 0x7f01003f .field public static final windowMinWidthMajor:I = 0x7f010041 .field public static final windowMinWidthMinor:I = 0x7f010042 .field public static final windowNoTitle:I = 0x7f01003a # direct methods .method public constructor <init>()V .locals 0 invoke-direct {p0}, Ljava/lang/Object;-><init>()V return-void .end method
{ "pile_set_name": "Github" }
DON'T POST ISSUES HERE, GO TO https://github.com/phonegap/phonegap-plugin-barcodescanner/issues
{ "pile_set_name": "Github" }
{-# LANGUAGE RankNTypes #-} module ShouldFail where -- With the new typechecker (GHC 7.1), these now all pass f1 :: (forall a. Eq a => [a]) -> Bool f1 xs@(x:_) = x f2 :: (forall a. Eq a => [a]) -> Bool f2 [x] = x f3 :: (forall a. Eq a => [a]) -> Bool f3 (x:[]) = x
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <!-- Copyright (c) 2000, 2020, Oracle and/or its affiliates. Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. --> <report-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/coherence/coherence-report-config" xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-report-config coherence-report-config.xsd"> <!-- This report is for use by the Coherence JVisualVM plugin only. --> <report> <file-name>{date}-member-stats.txt</file-name> <delim>{tab}</delim> <filters /> <query> <pattern>Coherence:type=Node,*</pattern> </query> <row> <column id="BatchCounter"> <type>global</type> <name>{batch-counter}</name> <header>Batch Counter</header> </column> <column id="NodeId"> <type>key</type> <name>nodeId</name> <header>Node Id</header> </column> <column id="PublisherSuccessRate"> <name>PublisherSuccessRate</name> </column> <column id="ReceiverSuccessRate"> <name>ReceiverSuccessRate</name> </column> <column id="SendQueueSize"> <name>SendQueueSize</name> </column> <column id="MemoryMaxMB"> <name>MemoryMaxMB</name> </column> <column id="MemoryAvailableMB"> <name>MemoryAvailableMB</name> </column> <column id="UnicastAddress"> <name>UnicastAddress</name> </column> <column id="RoleName"> <name>RoleName</name> </column> <column id="UnicastPort"> <name>UnicastPort</name> </column> <column id="MachineName"> <name>MachineName</name> </column> <column id="RackName"> <name>RackName</name> </column> <column id="SiteName"> <name>SiteName</name> </column> <column id="ProductEdition"> <name>ProductEdition</name> </column> </row> </report> </report-config>
{ "pile_set_name": "Github" }
ISO-10303-21; HEADER; /* C_Rect_L9.0mm_W9.8mm_P7.50mm_MKT.step 3D STEP model for use in ECAD systems * Copyright (C) 2017, kicad StepUp * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see http://www.gnu.org/licenses/. * * As a special exception, if you create a design which uses this symbol, * and embed this symbol or unaltered portions of this symbol into the design, * this symbol does not by itself cause the resulting design to be covered by * the GNU General Public License. * This exception does not however invalidate any other reasons why the design * itself might be covered by the GNU General Public License. * If you modify this symbol, you may extend this exception to your version of the symbol, * but you are not obligated to do so. * If you do not wish to do so, delete this exception statement from your version * Risk disclaimer * *USE 3D CAD DATA AT YOUR OWN RISK* * *DO NOT RELY UPON ANY INFORMATION FOUND HERE WITHOUT INDEPENDENT VERIFICATION.* * */ FILE_DESCRIPTION( /* description */ ('model of C_Rect_L9.0mm_W9.8mm_P7.50mm_MKT'), /* implementation_level */ '2;1'); FILE_NAME( /* name */ 'C_Rect_L9.0mm_W9.8mm_P7.50mm_MKT.step', /* time_stamp */ '2017-06-04T20:40:26', /* author */ ('kicad StepUp','ksu'), /* organization */ ('FreeCAD'), /* preprocessor_version */ 'OCC', /* originating_system */ 'kicad StepUp', /* authorisation */ ''); FILE_SCHEMA(('AUTOMOTIVE_DESIGN_CC2 { 1 2 10303 214 -1 1 5 4 }')); ENDSEC; DATA; #1 = APPLICATION_PROTOCOL_DEFINITION('committee draft', 'automotive_design',1997,#2); #2 = APPLICATION_CONTEXT( 'core data for automotive mechanical design processes'); #3 = SHAPE_DEFINITION_REPRESENTATION(#4,#10); #4 = PRODUCT_DEFINITION_SHAPE('','',#5); #5 = PRODUCT_DEFINITION('design','',#6,#9); #6 = PRODUCT_DEFINITION_FORMATION('','',#7); #7 = PRODUCT('C_Rect_L90mm_W98mm_P750mm_MKT', 'C_Rect_L90mm_W98mm_P750mm_MKT','',(#8)); #8 = MECHANICAL_CONTEXT('',#2,'mechanical'); #9 = PRODUCT_DEFINITION_CONTEXT('part definition',#2,'design'); #10 = ADVANCED_BREP_SHAPE_REPRESENTATION('',(#11,#15),#655); #11 = AXIS2_PLACEMENT_3D('',#12,#13,#14); #12 = CARTESIAN_POINT('',(0.,0.,0.)); #13 = DIRECTION('',(0.,0.,1.)); #14 = DIRECTION('',(1.,0.,-0.)); #15 = MANIFOLD_SOLID_BREP('',#16); #16 = CLOSED_SHELL('',(#17,#34,#93,#141,#181,#191,#215,#273,#290,#302, #333,#357,#381,#398,#444,#475,#499,#540,#557,#592,#635,#646)); #17 = ADVANCED_FACE('',(#18),#29,.F.); #18 = FACE_BOUND('',#19,.F.); #19 = EDGE_LOOP('',(#20)); #20 = ORIENTED_EDGE('',*,*,#21,.T.); #21 = EDGE_CURVE('',#22,#22,#24,.T.); #22 = VERTEX_POINT('',#23); #23 = CARTESIAN_POINT('',(0.25,0.,-1.9)); #24 = CIRCLE('',#25,0.25); #25 = AXIS2_PLACEMENT_3D('',#26,#27,#28); #26 = CARTESIAN_POINT('',(0.,0.,-1.9)); #27 = DIRECTION('',(0.,0.,1.)); #28 = DIRECTION('',(1.,0.,0.)); #29 = PLANE('',#30); #30 = AXIS2_PLACEMENT_3D('',#31,#32,#33); #31 = CARTESIAN_POINT('',(-4.440892098501E-16,2.18439881135E-17,-1.9)); #32 = DIRECTION('',(1.235882084846E-29,-1.305749077555E-31,1.)); #33 = DIRECTION('',(1.,0.,-1.235882084846E-29)); #34 = ADVANCED_FACE('',(#35),#88,.T.); #35 = FACE_BOUND('',#36,.T.); #36 = EDGE_LOOP('',(#37,#48,#54,#55,#56,#65,#73,#82)); #37 = ORIENTED_EDGE('',*,*,#38,.F.); #38 = EDGE_CURVE('',#39,#41,#43,.T.); #39 = VERTEX_POINT('',#40); #40 = CARTESIAN_POINT('',(0.25,0.,0.)); #41 = VERTEX_POINT('',#42); #42 = CARTESIAN_POINT('',(0.,0.25,0.)); #43 = CIRCLE('',#44,0.25); #44 = AXIS2_PLACEMENT_3D('',#45,#46,#47); #45 = CARTESIAN_POINT('',(0.,0.,0.)); #46 = DIRECTION('',(0.,0.,1.)); #47 = DIRECTION('',(1.,0.,0.)); #48 = ORIENTED_EDGE('',*,*,#49,.T.); #49 = EDGE_CURVE('',#39,#22,#50,.T.); #50 = LINE('',#51,#52); #51 = CARTESIAN_POINT('',(0.25,0.,7.5)); #52 = VECTOR('',#53,1.); #53 = DIRECTION('',(-0.,-0.,-1.)); #54 = ORIENTED_EDGE('',*,*,#21,.T.); #55 = ORIENTED_EDGE('',*,*,#49,.F.); #56 = ORIENTED_EDGE('',*,*,#57,.F.); #57 = EDGE_CURVE('',#58,#39,#60,.T.); #58 = VERTEX_POINT('',#59); #59 = CARTESIAN_POINT('',(0.,-0.25,0.)); #60 = CIRCLE('',#61,0.25); #61 = AXIS2_PLACEMENT_3D('',#62,#63,#64); #62 = CARTESIAN_POINT('',(0.,0.,0.)); #63 = DIRECTION('',(0.,0.,1.)); #64 = DIRECTION('',(1.,0.,0.)); #65 = ORIENTED_EDGE('',*,*,#66,.T.); #66 = EDGE_CURVE('',#58,#67,#69,.T.); #67 = VERTEX_POINT('',#68); #68 = CARTESIAN_POINT('',(0.,-0.25,7.5)); #69 = LINE('',#70,#71); #70 = CARTESIAN_POINT('',(0.,-0.25,7.5)); #71 = VECTOR('',#72,1.); #72 = DIRECTION('',(0.,0.,1.)); #73 = ORIENTED_EDGE('',*,*,#74,.F.); #74 = EDGE_CURVE('',#75,#67,#77,.T.); #75 = VERTEX_POINT('',#76); #76 = CARTESIAN_POINT('',(0.,0.25,7.5)); #77 = CIRCLE('',#78,0.25); #78 = AXIS2_PLACEMENT_3D('',#79,#80,#81); #79 = CARTESIAN_POINT('',(0.,0.,7.5)); #80 = DIRECTION('',(0.,0.,1.)); #81 = DIRECTION('',(1.,0.,0.)); #82 = ORIENTED_EDGE('',*,*,#83,.F.); #83 = EDGE_CURVE('',#41,#75,#84,.T.); #84 = LINE('',#85,#86); #85 = CARTESIAN_POINT('',(0.,0.25,7.5)); #86 = VECTOR('',#87,1.); #87 = DIRECTION('',(0.,0.,1.)); #88 = CYLINDRICAL_SURFACE('',#89,0.25); #89 = AXIS2_PLACEMENT_3D('',#90,#91,#92); #90 = CARTESIAN_POINT('',(0.,0.,7.5)); #91 = DIRECTION('',(0.,0.,1.)); #92 = DIRECTION('',(1.,0.,0.)); #93 = ADVANCED_FACE('',(#94),#136,.F.); #94 = FACE_BOUND('',#95,.F.); #95 = EDGE_LOOP('',(#96,#104,#112,#120,#128,#134,#135)); #96 = ORIENTED_EDGE('',*,*,#97,.F.); #97 = EDGE_CURVE('',#98,#58,#100,.T.); #98 = VERTEX_POINT('',#99); #99 = CARTESIAN_POINT('',(0.,-4.9,0.)); #100 = LINE('',#101,#102); #101 = CARTESIAN_POINT('',(0.,-4.9,0.)); #102 = VECTOR('',#103,1.); #103 = DIRECTION('',(0.,1.,0.)); #104 = ORIENTED_EDGE('',*,*,#105,.T.); #105 = EDGE_CURVE('',#98,#106,#108,.T.); #106 = VERTEX_POINT('',#107); #107 = CARTESIAN_POINT('',(0.375,-4.9,0.)); #108 = LINE('',#109,#110); #109 = CARTESIAN_POINT('',(0.,-4.9,0.)); #110 = VECTOR('',#111,1.); #111 = DIRECTION('',(1.,0.,0.)); #112 = ORIENTED_EDGE('',*,*,#113,.T.); #113 = EDGE_CURVE('',#106,#114,#116,.T.); #114 = VERTEX_POINT('',#115); #115 = CARTESIAN_POINT('',(0.375,4.9,0.)); #116 = LINE('',#117,#118); #117 = CARTESIAN_POINT('',(0.375,-4.9,0.)); #118 = VECTOR('',#119,1.); #119 = DIRECTION('',(0.,1.,0.)); #120 = ORIENTED_EDGE('',*,*,#121,.F.); #121 = EDGE_CURVE('',#122,#114,#124,.T.); #122 = VERTEX_POINT('',#123); #123 = CARTESIAN_POINT('',(0.,4.9,0.)); #124 = LINE('',#125,#126); #125 = CARTESIAN_POINT('',(0.,4.9,0.)); #126 = VECTOR('',#127,1.); #127 = DIRECTION('',(1.,0.,0.)); #128 = ORIENTED_EDGE('',*,*,#129,.F.); #129 = EDGE_CURVE('',#41,#122,#130,.T.); #130 = LINE('',#131,#132); #131 = CARTESIAN_POINT('',(0.,-4.9,0.)); #132 = VECTOR('',#133,1.); #133 = DIRECTION('',(0.,1.,0.)); #134 = ORIENTED_EDGE('',*,*,#38,.F.); #135 = ORIENTED_EDGE('',*,*,#57,.F.); #136 = PLANE('',#137); #137 = AXIS2_PLACEMENT_3D('',#138,#139,#140); #138 = CARTESIAN_POINT('',(0.,-4.9,0.)); #139 = DIRECTION('',(0.,0.,1.)); #140 = DIRECTION('',(1.,0.,0.)); #141 = ADVANCED_FACE('',(#142),#176,.F.); #142 = FACE_BOUND('',#143,.F.); #143 = EDGE_LOOP('',(#144,#154,#160,#161,#162,#168,#169,#170)); #144 = ORIENTED_EDGE('',*,*,#145,.F.); #145 = EDGE_CURVE('',#146,#148,#150,.T.); #146 = VERTEX_POINT('',#147); #147 = CARTESIAN_POINT('',(0.,-4.9,8.)); #148 = VERTEX_POINT('',#149); #149 = CARTESIAN_POINT('',(0.,4.9,8.)); #150 = LINE('',#151,#152); #151 = CARTESIAN_POINT('',(0.,-4.9,8.)); #152 = VECTOR('',#153,1.); #153 = DIRECTION('',(0.,1.,0.)); #154 = ORIENTED_EDGE('',*,*,#155,.F.); #155 = EDGE_CURVE('',#98,#146,#156,.T.); #156 = LINE('',#157,#158); #157 = CARTESIAN_POINT('',(0.,-4.9,0.)); #158 = VECTOR('',#159,1.); #159 = DIRECTION('',(0.,0.,1.)); #160 = ORIENTED_EDGE('',*,*,#97,.T.); #161 = ORIENTED_EDGE('',*,*,#66,.T.); #162 = ORIENTED_EDGE('',*,*,#163,.T.); #163 = EDGE_CURVE('',#67,#75,#164,.T.); #164 = LINE('',#165,#166); #165 = CARTESIAN_POINT('',(0.,-2.45,7.5)); #166 = VECTOR('',#167,1.); #167 = DIRECTION('',(0.,1.,1.305749077555E-31)); #168 = ORIENTED_EDGE('',*,*,#83,.F.); #169 = ORIENTED_EDGE('',*,*,#129,.T.); #170 = ORIENTED_EDGE('',*,*,#171,.T.); #171 = EDGE_CURVE('',#122,#148,#172,.T.); #172 = LINE('',#173,#174); #173 = CARTESIAN_POINT('',(0.,4.9,0.)); #174 = VECTOR('',#175,1.); #175 = DIRECTION('',(0.,0.,1.)); #176 = PLANE('',#177); #177 = AXIS2_PLACEMENT_3D('',#178,#179,#180); #178 = CARTESIAN_POINT('',(0.,-4.9,0.)); #179 = DIRECTION('',(1.,0.,0.)); #180 = DIRECTION('',(0.,0.,1.)); #181 = ADVANCED_FACE('',(#182),#186,.T.); #182 = FACE_BOUND('',#183,.T.); #183 = EDGE_LOOP('',(#184,#185)); #184 = ORIENTED_EDGE('',*,*,#163,.T.); #185 = ORIENTED_EDGE('',*,*,#74,.T.); #186 = PLANE('',#187); #187 = AXIS2_PLACEMENT_3D('',#188,#189,#190); #188 = CARTESIAN_POINT('',(-4.440892098501E-16,2.18439881135E-17,7.5)); #189 = DIRECTION('',(1.235882084846E-29,-1.305749077555E-31,1.)); #190 = DIRECTION('',(1.,0.,-1.235882084846E-29)); #191 = ADVANCED_FACE('',(#192),#210,.T.); #192 = FACE_BOUND('',#193,.T.); #193 = EDGE_LOOP('',(#194,#195,#196,#204)); #194 = ORIENTED_EDGE('',*,*,#121,.F.); #195 = ORIENTED_EDGE('',*,*,#171,.T.); #196 = ORIENTED_EDGE('',*,*,#197,.T.); #197 = EDGE_CURVE('',#148,#198,#200,.T.); #198 = VERTEX_POINT('',#199); #199 = CARTESIAN_POINT('',(0.375,4.9,8.)); #200 = LINE('',#201,#202); #201 = CARTESIAN_POINT('',(0.,4.9,8.)); #202 = VECTOR('',#203,1.); #203 = DIRECTION('',(1.,0.,0.)); #204 = ORIENTED_EDGE('',*,*,#205,.F.); #205 = EDGE_CURVE('',#114,#198,#206,.T.); #206 = LINE('',#207,#208); #207 = CARTESIAN_POINT('',(0.375,4.9,0.)); #208 = VECTOR('',#209,1.); #209 = DIRECTION('',(0.,0.,1.)); #210 = PLANE('',#211); #211 = AXIS2_PLACEMENT_3D('',#212,#213,#214); #212 = CARTESIAN_POINT('',(0.,4.9,0.)); #213 = DIRECTION('',(0.,1.,0.)); #214 = DIRECTION('',(0.,0.,1.)); #215 = ADVANCED_FACE('',(#216,#234),#268,.T.); #216 = FACE_BOUND('',#217,.T.); #217 = EDGE_LOOP('',(#218,#226,#227,#228)); #218 = ORIENTED_EDGE('',*,*,#219,.F.); #219 = EDGE_CURVE('',#106,#220,#222,.T.); #220 = VERTEX_POINT('',#221); #221 = CARTESIAN_POINT('',(0.375,-4.9,8.)); #222 = LINE('',#223,#224); #223 = CARTESIAN_POINT('',(0.375,-4.9,0.)); #224 = VECTOR('',#225,1.); #225 = DIRECTION('',(0.,0.,1.)); #226 = ORIENTED_EDGE('',*,*,#113,.T.); #227 = ORIENTED_EDGE('',*,*,#205,.T.); #228 = ORIENTED_EDGE('',*,*,#229,.F.); #229 = EDGE_CURVE('',#220,#198,#230,.T.); #230 = LINE('',#231,#232); #231 = CARTESIAN_POINT('',(0.375,-4.9,8.)); #232 = VECTOR('',#233,1.); #233 = DIRECTION('',(0.,1.,0.)); #234 = FACE_BOUND('',#235,.T.); #235 = EDGE_LOOP('',(#236,#246,#254,#262)); #236 = ORIENTED_EDGE('',*,*,#237,.T.); #237 = EDGE_CURVE('',#238,#240,#242,.T.); #238 = VERTEX_POINT('',#239); #239 = CARTESIAN_POINT('',(0.375,-4.88,2.E-02)); #240 = VERTEX_POINT('',#241); #241 = CARTESIAN_POINT('',(0.375,-4.88,7.98)); #242 = LINE('',#243,#244); #243 = CARTESIAN_POINT('',(0.375,-4.88,2.E-02)); #244 = VECTOR('',#245,1.); #245 = DIRECTION('',(0.,0.,1.)); #246 = ORIENTED_EDGE('',*,*,#247,.T.); #247 = EDGE_CURVE('',#240,#248,#250,.T.); #248 = VERTEX_POINT('',#249); #249 = CARTESIAN_POINT('',(0.375,4.88,7.98)); #250 = LINE('',#251,#252); #251 = CARTESIAN_POINT('',(0.375,-4.88,7.98)); #252 = VECTOR('',#253,1.); #253 = DIRECTION('',(0.,1.,0.)); #254 = ORIENTED_EDGE('',*,*,#255,.F.); #255 = EDGE_CURVE('',#256,#248,#258,.T.); #256 = VERTEX_POINT('',#257); #257 = CARTESIAN_POINT('',(0.375,4.88,2.E-02)); #258 = LINE('',#259,#260); #259 = CARTESIAN_POINT('',(0.375,4.88,2.E-02)); #260 = VECTOR('',#261,1.); #261 = DIRECTION('',(0.,0.,1.)); #262 = ORIENTED_EDGE('',*,*,#263,.F.); #263 = EDGE_CURVE('',#238,#256,#264,.T.); #264 = LINE('',#265,#266); #265 = CARTESIAN_POINT('',(0.375,-4.88,2.E-02)); #266 = VECTOR('',#267,1.); #267 = DIRECTION('',(0.,1.,0.)); #268 = PLANE('',#269); #269 = AXIS2_PLACEMENT_3D('',#270,#271,#272); #270 = CARTESIAN_POINT('',(0.375,-4.9,0.)); #271 = DIRECTION('',(1.,0.,0.)); #272 = DIRECTION('',(0.,0.,1.)); #273 = ADVANCED_FACE('',(#274),#285,.F.); #274 = FACE_BOUND('',#275,.F.); #275 = EDGE_LOOP('',(#276,#277,#278,#284)); #276 = ORIENTED_EDGE('',*,*,#105,.F.); #277 = ORIENTED_EDGE('',*,*,#155,.T.); #278 = ORIENTED_EDGE('',*,*,#279,.T.); #279 = EDGE_CURVE('',#146,#220,#280,.T.); #280 = LINE('',#281,#282); #281 = CARTESIAN_POINT('',(0.,-4.9,8.)); #282 = VECTOR('',#283,1.); #283 = DIRECTION('',(1.,0.,0.)); #284 = ORIENTED_EDGE('',*,*,#219,.F.); #285 = PLANE('',#286); #286 = AXIS2_PLACEMENT_3D('',#287,#288,#289); #287 = CARTESIAN_POINT('',(0.,-4.9,0.)); #288 = DIRECTION('',(0.,1.,0.)); #289 = DIRECTION('',(0.,0.,1.)); #290 = ADVANCED_FACE('',(#291),#297,.T.); #291 = FACE_BOUND('',#292,.T.); #292 = EDGE_LOOP('',(#293,#294,#295,#296)); #293 = ORIENTED_EDGE('',*,*,#145,.F.); #294 = ORIENTED_EDGE('',*,*,#279,.T.); #295 = ORIENTED_EDGE('',*,*,#229,.T.); #296 = ORIENTED_EDGE('',*,*,#197,.F.); #297 = PLANE('',#298); #298 = AXIS2_PLACEMENT_3D('',#299,#300,#301); #299 = CARTESIAN_POINT('',(0.,-4.9,8.)); #300 = DIRECTION('',(0.,0.,1.)); #301 = DIRECTION('',(1.,0.,0.)); #302 = ADVANCED_FACE('',(#303),#328,.F.); #303 = FACE_BOUND('',#304,.F.); #304 = EDGE_LOOP('',(#305,#313,#314,#322)); #305 = ORIENTED_EDGE('',*,*,#306,.F.); #306 = EDGE_CURVE('',#238,#307,#309,.T.); #307 = VERTEX_POINT('',#308); #308 = CARTESIAN_POINT('',(7.125,-4.88,2.E-02)); #309 = LINE('',#310,#311); #310 = CARTESIAN_POINT('',(0.375,-4.88,2.E-02)); #311 = VECTOR('',#312,1.); #312 = DIRECTION('',(1.,0.,0.)); #313 = ORIENTED_EDGE('',*,*,#237,.T.); #314 = ORIENTED_EDGE('',*,*,#315,.T.); #315 = EDGE_CURVE('',#240,#316,#318,.T.); #316 = VERTEX_POINT('',#317); #317 = CARTESIAN_POINT('',(7.125,-4.88,7.98)); #318 = LINE('',#319,#320); #319 = CARTESIAN_POINT('',(0.375,-4.88,7.98)); #320 = VECTOR('',#321,1.); #321 = DIRECTION('',(1.,0.,0.)); #322 = ORIENTED_EDGE('',*,*,#323,.F.); #323 = EDGE_CURVE('',#307,#316,#324,.T.); #324 = LINE('',#325,#326); #325 = CARTESIAN_POINT('',(7.125,-4.88,2.E-02)); #326 = VECTOR('',#327,1.); #327 = DIRECTION('',(0.,0.,1.)); #328 = PLANE('',#329); #329 = AXIS2_PLACEMENT_3D('',#330,#331,#332); #330 = CARTESIAN_POINT('',(0.375,-4.88,2.E-02)); #331 = DIRECTION('',(0.,1.,0.)); #332 = DIRECTION('',(0.,0.,1.)); #333 = ADVANCED_FACE('',(#334),#352,.F.); #334 = FACE_BOUND('',#335,.F.); #335 = EDGE_LOOP('',(#336,#337,#338,#346)); #336 = ORIENTED_EDGE('',*,*,#263,.F.); #337 = ORIENTED_EDGE('',*,*,#306,.T.); #338 = ORIENTED_EDGE('',*,*,#339,.T.); #339 = EDGE_CURVE('',#307,#340,#342,.T.); #340 = VERTEX_POINT('',#341); #341 = CARTESIAN_POINT('',(7.125,4.88,2.E-02)); #342 = LINE('',#343,#344); #343 = CARTESIAN_POINT('',(7.125,-4.88,2.E-02)); #344 = VECTOR('',#345,1.); #345 = DIRECTION('',(0.,1.,0.)); #346 = ORIENTED_EDGE('',*,*,#347,.F.); #347 = EDGE_CURVE('',#256,#340,#348,.T.); #348 = LINE('',#349,#350); #349 = CARTESIAN_POINT('',(0.375,4.88,2.E-02)); #350 = VECTOR('',#351,1.); #351 = DIRECTION('',(1.,0.,0.)); #352 = PLANE('',#353); #353 = AXIS2_PLACEMENT_3D('',#354,#355,#356); #354 = CARTESIAN_POINT('',(0.375,-4.88,2.E-02)); #355 = DIRECTION('',(0.,0.,1.)); #356 = DIRECTION('',(1.,0.,0.)); #357 = ADVANCED_FACE('',(#358),#376,.T.); #358 = FACE_BOUND('',#359,.T.); #359 = EDGE_LOOP('',(#360,#361,#362,#370)); #360 = ORIENTED_EDGE('',*,*,#347,.F.); #361 = ORIENTED_EDGE('',*,*,#255,.T.); #362 = ORIENTED_EDGE('',*,*,#363,.T.); #363 = EDGE_CURVE('',#248,#364,#366,.T.); #364 = VERTEX_POINT('',#365); #365 = CARTESIAN_POINT('',(7.125,4.88,7.98)); #366 = LINE('',#367,#368); #367 = CARTESIAN_POINT('',(0.375,4.88,7.98)); #368 = VECTOR('',#369,1.); #369 = DIRECTION('',(1.,0.,0.)); #370 = ORIENTED_EDGE('',*,*,#371,.F.); #371 = EDGE_CURVE('',#340,#364,#372,.T.); #372 = LINE('',#373,#374); #373 = CARTESIAN_POINT('',(7.125,4.88,2.E-02)); #374 = VECTOR('',#375,1.); #375 = DIRECTION('',(0.,0.,1.)); #376 = PLANE('',#377); #377 = AXIS2_PLACEMENT_3D('',#378,#379,#380); #378 = CARTESIAN_POINT('',(0.375,4.88,2.E-02)); #379 = DIRECTION('',(0.,1.,0.)); #380 = DIRECTION('',(0.,0.,1.)); #381 = ADVANCED_FACE('',(#382),#393,.T.); #382 = FACE_BOUND('',#383,.T.); #383 = EDGE_LOOP('',(#384,#385,#386,#392)); #384 = ORIENTED_EDGE('',*,*,#247,.F.); #385 = ORIENTED_EDGE('',*,*,#315,.T.); #386 = ORIENTED_EDGE('',*,*,#387,.T.); #387 = EDGE_CURVE('',#316,#364,#388,.T.); #388 = LINE('',#389,#390); #389 = CARTESIAN_POINT('',(7.125,-4.88,7.98)); #390 = VECTOR('',#391,1.); #391 = DIRECTION('',(0.,1.,0.)); #392 = ORIENTED_EDGE('',*,*,#363,.F.); #393 = PLANE('',#394); #394 = AXIS2_PLACEMENT_3D('',#395,#396,#397); #395 = CARTESIAN_POINT('',(0.375,-4.88,7.98)); #396 = DIRECTION('',(0.,0.,1.)); #397 = DIRECTION('',(1.,0.,0.)); #398 = ADVANCED_FACE('',(#399,#433),#439,.F.); #399 = FACE_BOUND('',#400,.F.); #400 = EDGE_LOOP('',(#401,#411,#419,#427)); #401 = ORIENTED_EDGE('',*,*,#402,.F.); #402 = EDGE_CURVE('',#403,#405,#407,.T.); #403 = VERTEX_POINT('',#404); #404 = CARTESIAN_POINT('',(7.125,-4.9,0.)); #405 = VERTEX_POINT('',#406); #406 = CARTESIAN_POINT('',(7.125,-4.9,8.)); #407 = LINE('',#408,#409); #408 = CARTESIAN_POINT('',(7.125,-4.9,0.)); #409 = VECTOR('',#410,1.); #410 = DIRECTION('',(0.,0.,1.)); #411 = ORIENTED_EDGE('',*,*,#412,.T.); #412 = EDGE_CURVE('',#403,#413,#415,.T.); #413 = VERTEX_POINT('',#414); #414 = CARTESIAN_POINT('',(7.125,4.9,0.)); #415 = LINE('',#416,#417); #416 = CARTESIAN_POINT('',(7.125,-4.9,0.)); #417 = VECTOR('',#418,1.); #418 = DIRECTION('',(0.,1.,0.)); #419 = ORIENTED_EDGE('',*,*,#420,.T.); #420 = EDGE_CURVE('',#413,#421,#423,.T.); #421 = VERTEX_POINT('',#422); #422 = CARTESIAN_POINT('',(7.125,4.9,8.)); #423 = LINE('',#424,#425); #424 = CARTESIAN_POINT('',(7.125,4.9,0.)); #425 = VECTOR('',#426,1.); #426 = DIRECTION('',(0.,0.,1.)); #427 = ORIENTED_EDGE('',*,*,#428,.F.); #428 = EDGE_CURVE('',#405,#421,#429,.T.); #429 = LINE('',#430,#431); #430 = CARTESIAN_POINT('',(7.125,-4.9,8.)); #431 = VECTOR('',#432,1.); #432 = DIRECTION('',(0.,1.,0.)); #433 = FACE_BOUND('',#434,.F.); #434 = EDGE_LOOP('',(#435,#436,#437,#438)); #435 = ORIENTED_EDGE('',*,*,#323,.T.); #436 = ORIENTED_EDGE('',*,*,#387,.T.); #437 = ORIENTED_EDGE('',*,*,#371,.F.); #438 = ORIENTED_EDGE('',*,*,#339,.F.); #439 = PLANE('',#440); #440 = AXIS2_PLACEMENT_3D('',#441,#442,#443); #441 = CARTESIAN_POINT('',(7.125,-4.9,0.)); #442 = DIRECTION('',(1.,0.,0.)); #443 = DIRECTION('',(0.,0.,1.)); #444 = ADVANCED_FACE('',(#445),#470,.F.); #445 = FACE_BOUND('',#446,.F.); #446 = EDGE_LOOP('',(#447,#455,#456,#464)); #447 = ORIENTED_EDGE('',*,*,#448,.F.); #448 = EDGE_CURVE('',#403,#449,#451,.T.); #449 = VERTEX_POINT('',#450); #450 = CARTESIAN_POINT('',(7.5,-4.9,0.)); #451 = LINE('',#452,#453); #452 = CARTESIAN_POINT('',(7.125,-4.9,0.)); #453 = VECTOR('',#454,1.); #454 = DIRECTION('',(1.,0.,0.)); #455 = ORIENTED_EDGE('',*,*,#402,.T.); #456 = ORIENTED_EDGE('',*,*,#457,.T.); #457 = EDGE_CURVE('',#405,#458,#460,.T.); #458 = VERTEX_POINT('',#459); #459 = CARTESIAN_POINT('',(7.5,-4.9,8.)); #460 = LINE('',#461,#462); #461 = CARTESIAN_POINT('',(7.125,-4.9,8.)); #462 = VECTOR('',#463,1.); #463 = DIRECTION('',(1.,0.,0.)); #464 = ORIENTED_EDGE('',*,*,#465,.F.); #465 = EDGE_CURVE('',#449,#458,#466,.T.); #466 = LINE('',#467,#468); #467 = CARTESIAN_POINT('',(7.5,-4.9,0.)); #468 = VECTOR('',#469,1.); #469 = DIRECTION('',(0.,0.,1.)); #470 = PLANE('',#471); #471 = AXIS2_PLACEMENT_3D('',#472,#473,#474); #472 = CARTESIAN_POINT('',(7.125,-4.9,0.)); #473 = DIRECTION('',(0.,1.,0.)); #474 = DIRECTION('',(0.,0.,1.)); #475 = ADVANCED_FACE('',(#476),#494,.T.); #476 = FACE_BOUND('',#477,.T.); #477 = EDGE_LOOP('',(#478,#479,#480,#488)); #478 = ORIENTED_EDGE('',*,*,#428,.F.); #479 = ORIENTED_EDGE('',*,*,#457,.T.); #480 = ORIENTED_EDGE('',*,*,#481,.T.); #481 = EDGE_CURVE('',#458,#482,#484,.T.); #482 = VERTEX_POINT('',#483); #483 = CARTESIAN_POINT('',(7.5,4.9,8.)); #484 = LINE('',#485,#486); #485 = CARTESIAN_POINT('',(7.5,-4.9,8.)); #486 = VECTOR('',#487,1.); #487 = DIRECTION('',(0.,1.,0.)); #488 = ORIENTED_EDGE('',*,*,#489,.F.); #489 = EDGE_CURVE('',#421,#482,#490,.T.); #490 = LINE('',#491,#492); #491 = CARTESIAN_POINT('',(7.125,4.9,8.)); #492 = VECTOR('',#493,1.); #493 = DIRECTION('',(1.,0.,0.)); #494 = PLANE('',#495); #495 = AXIS2_PLACEMENT_3D('',#496,#497,#498); #496 = CARTESIAN_POINT('',(7.125,-4.9,8.)); #497 = DIRECTION('',(0.,0.,1.)); #498 = DIRECTION('',(1.,0.,0.)); #499 = ADVANCED_FACE('',(#500),#535,.F.); #500 = FACE_BOUND('',#501,.F.); #501 = EDGE_LOOP('',(#502,#510,#511,#512,#520,#529)); #502 = ORIENTED_EDGE('',*,*,#503,.F.); #503 = EDGE_CURVE('',#413,#504,#506,.T.); #504 = VERTEX_POINT('',#505); #505 = CARTESIAN_POINT('',(7.5,4.9,0.)); #506 = LINE('',#507,#508); #507 = CARTESIAN_POINT('',(7.125,4.9,0.)); #508 = VECTOR('',#509,1.); #509 = DIRECTION('',(1.,0.,0.)); #510 = ORIENTED_EDGE('',*,*,#412,.F.); #511 = ORIENTED_EDGE('',*,*,#448,.T.); #512 = ORIENTED_EDGE('',*,*,#513,.T.); #513 = EDGE_CURVE('',#449,#514,#516,.T.); #514 = VERTEX_POINT('',#515); #515 = CARTESIAN_POINT('',(7.5,-0.25,0.)); #516 = LINE('',#517,#518); #517 = CARTESIAN_POINT('',(7.5,-4.9,0.)); #518 = VECTOR('',#519,1.); #519 = DIRECTION('',(0.,1.,0.)); #520 = ORIENTED_EDGE('',*,*,#521,.F.); #521 = EDGE_CURVE('',#522,#514,#524,.T.); #522 = VERTEX_POINT('',#523); #523 = CARTESIAN_POINT('',(7.5,0.25,0.)); #524 = CIRCLE('',#525,0.25); #525 = AXIS2_PLACEMENT_3D('',#526,#527,#528); #526 = CARTESIAN_POINT('',(7.5,0.,0.)); #527 = DIRECTION('',(0.,0.,1.)); #528 = DIRECTION('',(1.,0.,0.)); #529 = ORIENTED_EDGE('',*,*,#530,.T.); #530 = EDGE_CURVE('',#522,#504,#531,.T.); #531 = LINE('',#532,#533); #532 = CARTESIAN_POINT('',(7.5,-4.9,0.)); #533 = VECTOR('',#534,1.); #534 = DIRECTION('',(0.,1.,0.)); #535 = PLANE('',#536); #536 = AXIS2_PLACEMENT_3D('',#537,#538,#539); #537 = CARTESIAN_POINT('',(7.125,-4.9,0.)); #538 = DIRECTION('',(0.,0.,1.)); #539 = DIRECTION('',(1.,0.,0.)); #540 = ADVANCED_FACE('',(#541),#552,.T.); #541 = FACE_BOUND('',#542,.T.); #542 = EDGE_LOOP('',(#543,#544,#545,#546)); #543 = ORIENTED_EDGE('',*,*,#503,.F.); #544 = ORIENTED_EDGE('',*,*,#420,.T.); #545 = ORIENTED_EDGE('',*,*,#489,.T.); #546 = ORIENTED_EDGE('',*,*,#547,.F.); #547 = EDGE_CURVE('',#504,#482,#548,.T.); #548 = LINE('',#549,#550); #549 = CARTESIAN_POINT('',(7.5,4.9,0.)); #550 = VECTOR('',#551,1.); #551 = DIRECTION('',(0.,0.,1.)); #552 = PLANE('',#553); #553 = AXIS2_PLACEMENT_3D('',#554,#555,#556); #554 = CARTESIAN_POINT('',(7.125,4.9,0.)); #555 = DIRECTION('',(0.,1.,0.)); #556 = DIRECTION('',(0.,0.,1.)); #557 = ADVANCED_FACE('',(#558),#587,.T.); #558 = FACE_BOUND('',#559,.T.); #559 = EDGE_LOOP('',(#560,#561,#562,#563,#571,#579,#585,#586)); #560 = ORIENTED_EDGE('',*,*,#481,.F.); #561 = ORIENTED_EDGE('',*,*,#465,.F.); #562 = ORIENTED_EDGE('',*,*,#513,.T.); #563 = ORIENTED_EDGE('',*,*,#564,.T.); #564 = EDGE_CURVE('',#514,#565,#567,.T.); #565 = VERTEX_POINT('',#566); #566 = CARTESIAN_POINT('',(7.5,-0.25,7.5)); #567 = LINE('',#568,#569); #568 = CARTESIAN_POINT('',(7.5,-0.25,7.5)); #569 = VECTOR('',#570,1.); #570 = DIRECTION('',(0.,0.,1.)); #571 = ORIENTED_EDGE('',*,*,#572,.T.); #572 = EDGE_CURVE('',#565,#573,#575,.T.); #573 = VERTEX_POINT('',#574); #574 = CARTESIAN_POINT('',(7.5,0.25,7.5)); #575 = LINE('',#576,#577); #576 = CARTESIAN_POINT('',(7.5,-2.45,7.5)); #577 = VECTOR('',#578,1.); #578 = DIRECTION('',(0.,1.,1.305749077555E-31)); #579 = ORIENTED_EDGE('',*,*,#580,.F.); #580 = EDGE_CURVE('',#522,#573,#581,.T.); #581 = LINE('',#582,#583); #582 = CARTESIAN_POINT('',(7.5,0.25,7.5)); #583 = VECTOR('',#584,1.); #584 = DIRECTION('',(0.,0.,1.)); #585 = ORIENTED_EDGE('',*,*,#530,.T.); #586 = ORIENTED_EDGE('',*,*,#547,.T.); #587 = PLANE('',#588); #588 = AXIS2_PLACEMENT_3D('',#589,#590,#591); #589 = CARTESIAN_POINT('',(7.5,-4.9,0.)); #590 = DIRECTION('',(1.,0.,0.)); #591 = DIRECTION('',(0.,0.,1.)); #592 = ADVANCED_FACE('',(#593),#630,.T.); #593 = FACE_BOUND('',#594,.T.); #594 = EDGE_LOOP('',(#595,#604,#612,#619,#620,#627,#628,#629)); #595 = ORIENTED_EDGE('',*,*,#596,.F.); #596 = EDGE_CURVE('',#597,#573,#599,.T.); #597 = VERTEX_POINT('',#598); #598 = CARTESIAN_POINT('',(7.75,0.,7.5)); #599 = CIRCLE('',#600,0.25); #600 = AXIS2_PLACEMENT_3D('',#601,#602,#603); #601 = CARTESIAN_POINT('',(7.5,0.,7.5)); #602 = DIRECTION('',(0.,0.,1.)); #603 = DIRECTION('',(1.,0.,0.)); #604 = ORIENTED_EDGE('',*,*,#605,.T.); #605 = EDGE_CURVE('',#597,#606,#608,.T.); #606 = VERTEX_POINT('',#607); #607 = CARTESIAN_POINT('',(7.75,0.,-1.9)); #608 = LINE('',#609,#610); #609 = CARTESIAN_POINT('',(7.75,0.,7.5)); #610 = VECTOR('',#611,1.); #611 = DIRECTION('',(-0.,-0.,-1.)); #612 = ORIENTED_EDGE('',*,*,#613,.T.); #613 = EDGE_CURVE('',#606,#606,#614,.T.); #614 = CIRCLE('',#615,0.25); #615 = AXIS2_PLACEMENT_3D('',#616,#617,#618); #616 = CARTESIAN_POINT('',(7.5,0.,-1.9)); #617 = DIRECTION('',(0.,0.,1.)); #618 = DIRECTION('',(1.,0.,0.)); #619 = ORIENTED_EDGE('',*,*,#605,.F.); #620 = ORIENTED_EDGE('',*,*,#621,.F.); #621 = EDGE_CURVE('',#565,#597,#622,.T.); #622 = CIRCLE('',#623,0.25); #623 = AXIS2_PLACEMENT_3D('',#624,#625,#626); #624 = CARTESIAN_POINT('',(7.5,0.,7.5)); #625 = DIRECTION('',(0.,0.,1.)); #626 = DIRECTION('',(1.,0.,0.)); #627 = ORIENTED_EDGE('',*,*,#564,.F.); #628 = ORIENTED_EDGE('',*,*,#521,.F.); #629 = ORIENTED_EDGE('',*,*,#580,.T.); #630 = CYLINDRICAL_SURFACE('',#631,0.25); #631 = AXIS2_PLACEMENT_3D('',#632,#633,#634); #632 = CARTESIAN_POINT('',(7.5,0.,7.5)); #633 = DIRECTION('',(0.,0.,1.)); #634 = DIRECTION('',(1.,0.,0.)); #635 = ADVANCED_FACE('',(#636),#641,.T.); #636 = FACE_BOUND('',#637,.T.); #637 = EDGE_LOOP('',(#638,#639,#640)); #638 = ORIENTED_EDGE('',*,*,#621,.T.); #639 = ORIENTED_EDGE('',*,*,#596,.T.); #640 = ORIENTED_EDGE('',*,*,#572,.F.); #641 = PLANE('',#642); #642 = AXIS2_PLACEMENT_3D('',#643,#644,#645); #643 = CARTESIAN_POINT('',(7.5,2.18439881135E-17,7.5)); #644 = DIRECTION('',(-1.314768175368E-31,-1.305749077555E-31,1.)); #645 = DIRECTION('',(1.,0.,1.314768175368E-31)); #646 = ADVANCED_FACE('',(#647),#650,.F.); #647 = FACE_BOUND('',#648,.F.); #648 = EDGE_LOOP('',(#649)); #649 = ORIENTED_EDGE('',*,*,#613,.T.); #650 = PLANE('',#651); #651 = AXIS2_PLACEMENT_3D('',#652,#653,#654); #652 = CARTESIAN_POINT('',(7.5,2.18439881135E-17,-1.9)); #653 = DIRECTION('',(-1.314768175368E-31,-1.305749077555E-31,1.)); #654 = DIRECTION('',(1.,0.,1.314768175368E-31)); #655 = ( GEOMETRIC_REPRESENTATION_CONTEXT(3) GLOBAL_UNCERTAINTY_ASSIGNED_CONTEXT((#659)) GLOBAL_UNIT_ASSIGNED_CONTEXT ((#656,#657,#658)) REPRESENTATION_CONTEXT('Context #1', '3D Context with UNIT and UNCERTAINTY') ); #656 = ( LENGTH_UNIT() NAMED_UNIT(*) SI_UNIT(.MILLI.,.METRE.) ); #657 = ( NAMED_UNIT(*) PLANE_ANGLE_UNIT() SI_UNIT($,.RADIAN.) ); #658 = ( NAMED_UNIT(*) SI_UNIT($,.STERADIAN.) SOLID_ANGLE_UNIT() ); #659 = UNCERTAINTY_MEASURE_WITH_UNIT(LENGTH_MEASURE(1.E-07),#656, 'distance_accuracy_value','confusion accuracy'); #660 = PRODUCT_TYPE('part',$,(#7)); #661 = MECHANICAL_DESIGN_GEOMETRIC_PRESENTATION_REPRESENTATION('',(#662, #670,#677,#684,#691,#698,#705,#712,#719,#726,#734,#741,#748,#755, #762,#769,#776,#783,#790,#797,#804,#811),#655); #662 = STYLED_ITEM('color',(#663),#17); #663 = PRESENTATION_STYLE_ASSIGNMENT((#664)); #664 = SURFACE_STYLE_USAGE(.BOTH.,#665); #665 = SURFACE_SIDE_STYLE('',(#666)); #666 = SURFACE_STYLE_FILL_AREA(#667); #667 = FILL_AREA_STYLE('',(#668)); #668 = FILL_AREA_STYLE_COLOUR('',#669); #669 = COLOUR_RGB('',0.824000000954,0.819999992847,0.78100001812); #670 = STYLED_ITEM('color',(#671),#34); #671 = PRESENTATION_STYLE_ASSIGNMENT((#672)); #672 = SURFACE_STYLE_USAGE(.BOTH.,#673); #673 = SURFACE_SIDE_STYLE('',(#674)); #674 = SURFACE_STYLE_FILL_AREA(#675); #675 = FILL_AREA_STYLE('',(#676)); #676 = FILL_AREA_STYLE_COLOUR('',#669); #677 = STYLED_ITEM('color',(#678),#93); #678 = PRESENTATION_STYLE_ASSIGNMENT((#679)); #679 = SURFACE_STYLE_USAGE(.BOTH.,#680); #680 = SURFACE_SIDE_STYLE('',(#681)); #681 = SURFACE_STYLE_FILL_AREA(#682); #682 = FILL_AREA_STYLE('',(#683)); #683 = FILL_AREA_STYLE_COLOUR('',#669); #684 = STYLED_ITEM('color',(#685),#141); #685 = PRESENTATION_STYLE_ASSIGNMENT((#686)); #686 = SURFACE_STYLE_USAGE(.BOTH.,#687); #687 = SURFACE_SIDE_STYLE('',(#688)); #688 = SURFACE_STYLE_FILL_AREA(#689); #689 = FILL_AREA_STYLE('',(#690)); #690 = FILL_AREA_STYLE_COLOUR('',#669); #691 = STYLED_ITEM('color',(#692),#181); #692 = PRESENTATION_STYLE_ASSIGNMENT((#693)); #693 = SURFACE_STYLE_USAGE(.BOTH.,#694); #694 = SURFACE_SIDE_STYLE('',(#695)); #695 = SURFACE_STYLE_FILL_AREA(#696); #696 = FILL_AREA_STYLE('',(#697)); #697 = FILL_AREA_STYLE_COLOUR('',#669); #698 = STYLED_ITEM('color',(#699),#191); #699 = PRESENTATION_STYLE_ASSIGNMENT((#700)); #700 = SURFACE_STYLE_USAGE(.BOTH.,#701); #701 = SURFACE_SIDE_STYLE('',(#702)); #702 = SURFACE_STYLE_FILL_AREA(#703); #703 = FILL_AREA_STYLE('',(#704)); #704 = FILL_AREA_STYLE_COLOUR('',#669); #705 = STYLED_ITEM('color',(#706),#215); #706 = PRESENTATION_STYLE_ASSIGNMENT((#707)); #707 = SURFACE_STYLE_USAGE(.BOTH.,#708); #708 = SURFACE_SIDE_STYLE('',(#709)); #709 = SURFACE_STYLE_FILL_AREA(#710); #710 = FILL_AREA_STYLE('',(#711)); #711 = FILL_AREA_STYLE_COLOUR('',#669); #712 = STYLED_ITEM('color',(#713),#273); #713 = PRESENTATION_STYLE_ASSIGNMENT((#714)); #714 = SURFACE_STYLE_USAGE(.BOTH.,#715); #715 = SURFACE_SIDE_STYLE('',(#716)); #716 = SURFACE_STYLE_FILL_AREA(#717); #717 = FILL_AREA_STYLE('',(#718)); #718 = FILL_AREA_STYLE_COLOUR('',#669); #719 = STYLED_ITEM('color',(#720),#290); #720 = PRESENTATION_STYLE_ASSIGNMENT((#721)); #721 = SURFACE_STYLE_USAGE(.BOTH.,#722); #722 = SURFACE_SIDE_STYLE('',(#723)); #723 = SURFACE_STYLE_FILL_AREA(#724); #724 = FILL_AREA_STYLE('',(#725)); #725 = FILL_AREA_STYLE_COLOUR('',#669); #726 = STYLED_ITEM('color',(#727),#302); #727 = PRESENTATION_STYLE_ASSIGNMENT((#728)); #728 = SURFACE_STYLE_USAGE(.BOTH.,#729); #729 = SURFACE_SIDE_STYLE('',(#730)); #730 = SURFACE_STYLE_FILL_AREA(#731); #731 = FILL_AREA_STYLE('',(#732)); #732 = FILL_AREA_STYLE_COLOUR('',#733); #733 = COLOUR_RGB('',0.273000001907,0.273000001907,0.273000001907); #734 = STYLED_ITEM('color',(#735),#333); #735 = PRESENTATION_STYLE_ASSIGNMENT((#736)); #736 = SURFACE_STYLE_USAGE(.BOTH.,#737); #737 = SURFACE_SIDE_STYLE('',(#738)); #738 = SURFACE_STYLE_FILL_AREA(#739); #739 = FILL_AREA_STYLE('',(#740)); #740 = FILL_AREA_STYLE_COLOUR('',#733); #741 = STYLED_ITEM('color',(#742),#357); #742 = PRESENTATION_STYLE_ASSIGNMENT((#743)); #743 = SURFACE_STYLE_USAGE(.BOTH.,#744); #744 = SURFACE_SIDE_STYLE('',(#745)); #745 = SURFACE_STYLE_FILL_AREA(#746); #746 = FILL_AREA_STYLE('',(#747)); #747 = FILL_AREA_STYLE_COLOUR('',#733); #748 = STYLED_ITEM('color',(#749),#381); #749 = PRESENTATION_STYLE_ASSIGNMENT((#750)); #750 = SURFACE_STYLE_USAGE(.BOTH.,#751); #751 = SURFACE_SIDE_STYLE('',(#752)); #752 = SURFACE_STYLE_FILL_AREA(#753); #753 = FILL_AREA_STYLE('',(#754)); #754 = FILL_AREA_STYLE_COLOUR('',#733); #755 = STYLED_ITEM('color',(#756),#398); #756 = PRESENTATION_STYLE_ASSIGNMENT((#757)); #757 = SURFACE_STYLE_USAGE(.BOTH.,#758); #758 = SURFACE_SIDE_STYLE('',(#759)); #759 = SURFACE_STYLE_FILL_AREA(#760); #760 = FILL_AREA_STYLE('',(#761)); #761 = FILL_AREA_STYLE_COLOUR('',#669); #762 = STYLED_ITEM('color',(#763),#444); #763 = PRESENTATION_STYLE_ASSIGNMENT((#764)); #764 = SURFACE_STYLE_USAGE(.BOTH.,#765); #765 = SURFACE_SIDE_STYLE('',(#766)); #766 = SURFACE_STYLE_FILL_AREA(#767); #767 = FILL_AREA_STYLE('',(#768)); #768 = FILL_AREA_STYLE_COLOUR('',#669); #769 = STYLED_ITEM('color',(#770),#475); #770 = PRESENTATION_STYLE_ASSIGNMENT((#771)); #771 = SURFACE_STYLE_USAGE(.BOTH.,#772); #772 = SURFACE_SIDE_STYLE('',(#773)); #773 = SURFACE_STYLE_FILL_AREA(#774); #774 = FILL_AREA_STYLE('',(#775)); #775 = FILL_AREA_STYLE_COLOUR('',#669); #776 = STYLED_ITEM('color',(#777),#499); #777 = PRESENTATION_STYLE_ASSIGNMENT((#778)); #778 = SURFACE_STYLE_USAGE(.BOTH.,#779); #779 = SURFACE_SIDE_STYLE('',(#780)); #780 = SURFACE_STYLE_FILL_AREA(#781); #781 = FILL_AREA_STYLE('',(#782)); #782 = FILL_AREA_STYLE_COLOUR('',#669); #783 = STYLED_ITEM('color',(#784),#540); #784 = PRESENTATION_STYLE_ASSIGNMENT((#785)); #785 = SURFACE_STYLE_USAGE(.BOTH.,#786); #786 = SURFACE_SIDE_STYLE('',(#787)); #787 = SURFACE_STYLE_FILL_AREA(#788); #788 = FILL_AREA_STYLE('',(#789)); #789 = FILL_AREA_STYLE_COLOUR('',#669); #790 = STYLED_ITEM('color',(#791),#557); #791 = PRESENTATION_STYLE_ASSIGNMENT((#792)); #792 = SURFACE_STYLE_USAGE(.BOTH.,#793); #793 = SURFACE_SIDE_STYLE('',(#794)); #794 = SURFACE_STYLE_FILL_AREA(#795); #795 = FILL_AREA_STYLE('',(#796)); #796 = FILL_AREA_STYLE_COLOUR('',#669); #797 = STYLED_ITEM('color',(#798),#592); #798 = PRESENTATION_STYLE_ASSIGNMENT((#799)); #799 = SURFACE_STYLE_USAGE(.BOTH.,#800); #800 = SURFACE_SIDE_STYLE('',(#801)); #801 = SURFACE_STYLE_FILL_AREA(#802); #802 = FILL_AREA_STYLE('',(#803)); #803 = FILL_AREA_STYLE_COLOUR('',#669); #804 = STYLED_ITEM('color',(#805),#635); #805 = PRESENTATION_STYLE_ASSIGNMENT((#806)); #806 = SURFACE_STYLE_USAGE(.BOTH.,#807); #807 = SURFACE_SIDE_STYLE('',(#808)); #808 = SURFACE_STYLE_FILL_AREA(#809); #809 = FILL_AREA_STYLE('',(#810)); #810 = FILL_AREA_STYLE_COLOUR('',#669); #811 = STYLED_ITEM('color',(#812),#646); #812 = PRESENTATION_STYLE_ASSIGNMENT((#813)); #813 = SURFACE_STYLE_USAGE(.BOTH.,#814); #814 = SURFACE_SIDE_STYLE('',(#815)); #815 = SURFACE_STYLE_FILL_AREA(#816); #816 = FILL_AREA_STYLE('',(#817)); #817 = FILL_AREA_STYLE_COLOUR('',#669); ENDSEC; END-ISO-10303-21;
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_10-ea) on Mon Apr 22 19:50:39 PDT 2013 --> <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> <title>TypeNameIdResolver (jackson-databind 2.2.0 API)</title> <meta name="date" content="2013-04-22"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="TypeNameIdResolver (jackson-databind 2.2.0 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/TypeNameIdResolver.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeIdResolverBase.html" title="class in com.fasterxml.jackson.databind.jsontype.impl"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeSerializerBase.html" title="class in com.fasterxml.jackson.databind.jsontype.impl"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html" target="_top">Frames</a></li> <li><a href="TypeNameIdResolver.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">com.fasterxml.jackson.databind.jsontype.impl</div> <h2 title="Class TypeNameIdResolver" class="title">Class TypeNameIdResolver</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> <li> <ul class="inheritance"> <li><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeIdResolverBase.html" title="class in com.fasterxml.jackson.databind.jsontype.impl">com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase</a></li> <li> <ul class="inheritance"> <li>com.fasterxml.jackson.databind.jsontype.impl.TypeNameIdResolver</li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/TypeIdResolver.html" title="interface in com.fasterxml.jackson.databind.jsontype">TypeIdResolver</a></dd> </dl> <hr> <br> <pre>public class <span class="strong">TypeNameIdResolver</span> extends <a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeIdResolverBase.html" title="class in com.fasterxml.jackson.databind.jsontype.impl">TypeIdResolverBase</a></pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== FIELD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="field_summary"> <!-- --> </a> <h3>Field Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>protected <a href="../../../../../../com/fasterxml/jackson/databind/cfg/MapperConfig.html" title="class in com.fasterxml.jackson.databind.cfg">MapperConfig</a>&lt;?&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html#_config">_config</a></strong></code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../../../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind">JavaType</a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html#_idToType">_idToType</a></strong></code> <div class="block">Mappings from type id to JavaType, used for deserialization</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;</code></td> <td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html#_typeToId">_typeToId</a></strong></code> <div class="block">Mappings from class name to type id, used for serialization</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="fields_inherited_from_class_com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase"> <!-- --> </a> <h3>Fields inherited from class&nbsp;com.fasterxml.jackson.databind.jsontype.impl.<a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeIdResolverBase.html" title="class in com.fasterxml.jackson.databind.jsontype.impl">TypeIdResolverBase</a></h3> <code><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeIdResolverBase.html#_baseType">_baseType</a>, <a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeIdResolverBase.html#_typeFactory">_typeFactory</a></code></li> </ul> </li> </ul> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier</th> <th class="colLast" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>protected </code></td> <td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html#TypeNameIdResolver(com.fasterxml.jackson.databind.cfg.MapperConfig, com.fasterxml.jackson.databind.JavaType, java.util.HashMap, java.util.HashMap)">TypeNameIdResolver</a></strong>(<a href="../../../../../../com/fasterxml/jackson/databind/cfg/MapperConfig.html" title="class in com.fasterxml.jackson.databind.cfg">MapperConfig</a>&lt;?&gt;&nbsp;config, <a href="../../../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind">JavaType</a>&nbsp;baseType, <a href="http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;typeToId, <a href="http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../../../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind">JavaType</a>&gt;&nbsp;idToType)</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method_summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>protected static <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html#_defaultTypeId(java.lang.Class)">_defaultTypeId</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;cls)</code> <div class="block">If no name was explicitly given for a class, we will just use non-qualified class name</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static <a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html" title="class in com.fasterxml.jackson.databind.jsontype.impl">TypeNameIdResolver</a></code></td> <td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html#construct(com.fasterxml.jackson.databind.cfg.MapperConfig, com.fasterxml.jackson.databind.JavaType, java.util.Collection, boolean, boolean)">construct</a></strong>(<a href="../../../../../../com/fasterxml/jackson/databind/cfg/MapperConfig.html" title="class in com.fasterxml.jackson.databind.cfg">MapperConfig</a>&lt;?&gt;&nbsp;config, <a href="../../../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind">JavaType</a>&nbsp;baseType, <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../../com/fasterxml/jackson/databind/jsontype/NamedType.html" title="class in com.fasterxml.jackson.databind.jsontype">NamedType</a>&gt;&nbsp;subtypes, boolean&nbsp;forSer, boolean&nbsp;forDeser)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="http://fasterxml.github.com/jackson-annotations/javadoc/2.1.1/com/fasterxml/jackson/annotation/JsonTypeInfo.Id.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation">JsonTypeInfo.Id</a></code></td> <td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html#getMechanism()">getMechanism</a></strong>()</code> <div class="block">Accessor for mechanism that this resolver uses for determining type id from type.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html#idFromValue(java.lang.Object)">idFromValue</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)</code> <div class="block">Method called to serialize type of the type of given value as a String to include in serialized JSON content.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html#idFromValueAndType(java.lang.Object, java.lang.Class)">idFromValueAndType</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type)</code> <div class="block">Alternative method used for determining type from combination of value and type, using suggested type (that serializer provides) and possibly value of that type.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> <td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html#toString()">toString</a></strong>()</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind">JavaType</a></code></td> <td class="colLast"><code><strong><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html#typeFromId(java.lang.String)">typeFromId</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id)</code> <div class="block">Method called to resolve type from given type identifier.</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase"> <!-- --> </a> <h3>Methods inherited from class&nbsp;com.fasterxml.jackson.databind.jsontype.impl.<a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeIdResolverBase.html" title="class in com.fasterxml.jackson.databind.jsontype.impl">TypeIdResolverBase</a></h3> <code><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeIdResolverBase.html#idFromBaseType()">idFromBaseType</a>, <a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeIdResolverBase.html#init(com.fasterxml.jackson.databind.JavaType)">init</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> <code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ============ FIELD DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="field_detail"> <!-- --> </a> <h3>Field Detail</h3> <a name="_config"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>_config</h4> <pre>protected final&nbsp;<a href="../../../../../../com/fasterxml/jackson/databind/cfg/MapperConfig.html" title="class in com.fasterxml.jackson.databind.cfg">MapperConfig</a>&lt;?&gt; _config</pre> </li> </ul> <a name="_typeToId"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>_typeToId</h4> <pre>protected final&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt; _typeToId</pre> <div class="block">Mappings from class name to type id, used for serialization</div> </li> </ul> <a name="_idToType"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>_idToType</h4> <pre>protected final&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../../../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind">JavaType</a>&gt; _idToType</pre> <div class="block">Mappings from type id to JavaType, used for deserialization</div> </li> </ul> </li> </ul> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="TypeNameIdResolver(com.fasterxml.jackson.databind.cfg.MapperConfig, com.fasterxml.jackson.databind.JavaType, java.util.HashMap, java.util.HashMap)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>TypeNameIdResolver</h4> <pre>protected&nbsp;TypeNameIdResolver(<a href="../../../../../../com/fasterxml/jackson/databind/cfg/MapperConfig.html" title="class in com.fasterxml.jackson.databind.cfg">MapperConfig</a>&lt;?&gt;&nbsp;config, <a href="../../../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind">JavaType</a>&nbsp;baseType, <a href="http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&gt;&nbsp;typeToId, <a href="http://docs.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util">HashMap</a>&lt;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="../../../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind">JavaType</a>&gt;&nbsp;idToType)</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="construct(com.fasterxml.jackson.databind.cfg.MapperConfig, com.fasterxml.jackson.databind.JavaType, java.util.Collection, boolean, boolean)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>construct</h4> <pre>public static&nbsp;<a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html" title="class in com.fasterxml.jackson.databind.jsontype.impl">TypeNameIdResolver</a>&nbsp;construct(<a href="../../../../../../com/fasterxml/jackson/databind/cfg/MapperConfig.html" title="class in com.fasterxml.jackson.databind.cfg">MapperConfig</a>&lt;?&gt;&nbsp;config, <a href="../../../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind">JavaType</a>&nbsp;baseType, <a href="http://docs.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../../../../com/fasterxml/jackson/databind/jsontype/NamedType.html" title="class in com.fasterxml.jackson.databind.jsontype">NamedType</a>&gt;&nbsp;subtypes, boolean&nbsp;forSer, boolean&nbsp;forDeser)</pre> </li> </ul> <a name="getMechanism()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getMechanism</h4> <pre>public&nbsp;<a href="http://fasterxml.github.com/jackson-annotations/javadoc/2.1.1/com/fasterxml/jackson/annotation/JsonTypeInfo.Id.html?is-external=true" title="class or interface in com.fasterxml.jackson.annotation">JsonTypeInfo.Id</a>&nbsp;getMechanism()</pre> <div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/TypeIdResolver.html#getMechanism()">TypeIdResolver</a></code></strong></div> <div class="block">Accessor for mechanism that this resolver uses for determining type id from type. Mostly informational; not required to be called or used.</div> </li> </ul> <a name="idFromValue(java.lang.Object)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>idFromValue</h4> <pre>public&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;idFromValue(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value)</pre> <div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/TypeIdResolver.html#idFromValue(java.lang.Object)">TypeIdResolver</a></code></strong></div> <div class="block">Method called to serialize type of the type of given value as a String to include in serialized JSON content.</div> </li> </ul> <a name="idFromValueAndType(java.lang.Object, java.lang.Class)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>idFromValueAndType</h4> <pre>public&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;idFromValueAndType(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;value, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;type)</pre> <div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/TypeIdResolver.html#idFromValueAndType(java.lang.Object, java.lang.Class)">TypeIdResolver</a></code></strong></div> <div class="block">Alternative method used for determining type from combination of value and type, using suggested type (that serializer provides) and possibly value of that type. Most common implementation will use suggested type as is.</div> </li> </ul> <a name="typeFromId(java.lang.String)"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>typeFromId</h4> <pre>public&nbsp;<a href="../../../../../../com/fasterxml/jackson/databind/JavaType.html" title="class in com.fasterxml.jackson.databind">JavaType</a>&nbsp;typeFromId(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;id) throws <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></pre> <div class="block"><strong>Description copied from interface:&nbsp;<code><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/TypeIdResolver.html#typeFromId(java.lang.String)">TypeIdResolver</a></code></strong></div> <div class="block">Method called to resolve type from given type identifier.</div> <dl><dt><span class="strong">Throws:</span></dt> <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code></dd></dl> </li> </ul> <a name="toString()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>toString</h4> <pre>public&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;toString()</pre> <dl> <dt><strong>Overrides:</strong></dt> <dd><code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a></code>&nbsp;in class&nbsp;<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></dd> </dl> </li> </ul> <a name="_defaultTypeId(java.lang.Class)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>_defaultTypeId</h4> <pre>protected static&nbsp;<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;_defaultTypeId(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;cls)</pre> <div class="block">If no name was explicitly given for a class, we will just use non-qualified class name</div> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="class-use/TypeNameIdResolver.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeIdResolverBase.html" title="class in com.fasterxml.jackson.databind.jsontype.impl"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../../../com/fasterxml/jackson/databind/jsontype/impl/TypeSerializerBase.html" title="class in com.fasterxml.jackson.databind.jsontype.impl"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?com/fasterxml/jackson/databind/jsontype/impl/TypeNameIdResolver.html" target="_top">Frames</a></li> <li><a href="TypeNameIdResolver.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small>Copyright &#169; 2012-2013 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p> </body> </html>
{ "pile_set_name": "Github" }
dojo.provide("dojox.lang.oo.Decorator"); (function(){ var oo = dojox.lang.oo, D = oo.Decorator = function(value, decorator){ // summary: // The base class for all decorators. // description: // This object holds an original function or another decorator // object, and implements a special mixin algorithm to be used // by dojox.lang.oo.mixin. // value: Object: // a payload to be processed by the decorator. // decorator: Function|Object: // a function to handle the custom assignment, or an object with exec() // method. The signature is: // decorator(/*String*/ name, /*Function*/ newValue, /*Function*/ oldValue). this.value = value; this.decorator = typeof decorator == "object" ? function(){ return decorator.exec.apply(decorator, arguments); } : decorator; }; oo.makeDecorator = function(decorator){ // summary: // creates new custom decorator creator // decorator: Function|Object: // a function to handle the custom assignment, // or an object with exec() method // returns: Function: // new decorator constructor return function(value){ return new D(value, decorator); }; }; })();
{ "pile_set_name": "Github" }
# osm_vector_maps_install: True # osm_vector_maps_enabled: True # iiab_map_url : http://download.iiab.io/content/OSM/vector-tiles/maplist/hidden # vector_map_path: "{{ content_base }}/www/osm-vector-maps" # All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml # If nec, change them by editing /etc/iiab/local_vars.yml prior to installing! # The following soft coded variables allow testing, before pulling PR's into master osm_repo_url: https://raw.githubusercontent.com/iiab/maps #osm_repo_url: https://raw.githubusercontent.com/georgejhunt/maps maps_branch: 'master' #maps_branch: '7.2-maps' # soft code sources archive_org_url: https://archive.org/download map_catalog_url: http://download.iiab.io/content/OSM/vector-tiles satellite_version: satellite_z0-z9_v3.mbtiles
{ "pile_set_name": "Github" }
/*============================================================================= Copyright (c) 1998-2003 Joel de Guzman http://spirit.sourceforge.net/ Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ #if !defined(BOOST_SPIRIT_SKIPPER_HPP) #define BOOST_SPIRIT_SKIPPER_HPP /////////////////////////////////////////////////////////////////////////////// #include <cctype> #include <boost/spirit/home/classic/namespace.hpp> #include <boost/spirit/home/classic/core/scanner/scanner.hpp> #include <boost/spirit/home/classic/core/primitives/impl/primitives.ipp> #include <boost/spirit/home/classic/core/scanner/skipper_fwd.hpp> namespace boost { namespace spirit { BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN /////////////////////////////////////////////////////////////////////////// // // skipper_iteration_policy class // /////////////////////////////////////////////////////////////////////////// template <typename BaseT> struct skipper_iteration_policy : public BaseT { typedef BaseT base_t; skipper_iteration_policy() : BaseT() {} template <typename PolicyT> skipper_iteration_policy(PolicyT const& other) : BaseT(other) {} template <typename ScannerT> void advance(ScannerT const& scan) const { BaseT::advance(scan); scan.skip(scan); } template <typename ScannerT> bool at_end(ScannerT const& scan) const { scan.skip(scan); return BaseT::at_end(scan); } template <typename ScannerT> void skip(ScannerT const& scan) const { while (!BaseT::at_end(scan) && impl::isspace_(BaseT::get(scan))) BaseT::advance(scan); } }; /////////////////////////////////////////////////////////////////////////// // // no_skipper_iteration_policy class // /////////////////////////////////////////////////////////////////////////// template <typename BaseT> struct no_skipper_iteration_policy : public BaseT { typedef BaseT base_t; no_skipper_iteration_policy() : BaseT() {} template <typename PolicyT> no_skipper_iteration_policy(PolicyT const& other) : BaseT(other) {} template <typename ScannerT> void skip(ScannerT const& /*scan*/) const {} }; /////////////////////////////////////////////////////////////////////////// // // skip_parser_iteration_policy class // /////////////////////////////////////////////////////////////////////////// namespace impl { template <typename ST, typename ScannerT, typename BaseT> void skipper_skip( ST const& s, ScannerT const& scan, skipper_iteration_policy<BaseT> const&); template <typename ST, typename ScannerT, typename BaseT> void skipper_skip( ST const& s, ScannerT const& scan, no_skipper_iteration_policy<BaseT> const&); template <typename ST, typename ScannerT> void skipper_skip( ST const& s, ScannerT const& scan, iteration_policy const&); } template <typename ParserT, typename BaseT> class skip_parser_iteration_policy : public skipper_iteration_policy<BaseT> { public: typedef skipper_iteration_policy<BaseT> base_t; skip_parser_iteration_policy( ParserT const& skip_parser, base_t const& base = base_t()) : base_t(base), subject(skip_parser) {} template <typename PolicyT> skip_parser_iteration_policy(PolicyT const& other) : base_t(other), subject(other.skipper()) {} template <typename ScannerT> void skip(ScannerT const& scan) const { impl::skipper_skip(subject, scan, scan); } ParserT const& skipper() const { return subject; } private: ParserT const& subject; }; /////////////////////////////////////////////////////////////////////////////// // // Free parse functions using the skippers // /////////////////////////////////////////////////////////////////////////////// template <typename IteratorT, typename ParserT, typename SkipT> parse_info<IteratorT> parse( IteratorT const& first, IteratorT const& last, parser<ParserT> const& p, parser<SkipT> const& skip); /////////////////////////////////////////////////////////////////////////////// // // Parse function for null terminated strings using the skippers // /////////////////////////////////////////////////////////////////////////////// template <typename CharT, typename ParserT, typename SkipT> parse_info<CharT const*> parse( CharT const* str, parser<ParserT> const& p, parser<SkipT> const& skip); /////////////////////////////////////////////////////////////////////////////// // // phrase_scanner_t and wide_phrase_scanner_t // // The most common scanners. Use these typedefs when you need // a scanner that skips white spaces. // /////////////////////////////////////////////////////////////////////////////// typedef skipper_iteration_policy<> iter_policy_t; typedef scanner_policies<iter_policy_t> scanner_policies_t; typedef scanner<char const*, scanner_policies_t> phrase_scanner_t; typedef scanner<wchar_t const*, scanner_policies_t> wide_phrase_scanner_t; /////////////////////////////////////////////////////////////////////////////// BOOST_SPIRIT_CLASSIC_NAMESPACE_END }} // namespace BOOST_SPIRIT_CLASSIC_NS #include <boost/spirit/home/classic/core/scanner/impl/skipper.ipp> #endif
{ "pile_set_name": "Github" }
// Copyright (c) 2006-2013, Andrey N. Sabelnikov, www.sabelnikov.net // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // * Neither the name of the Andrey N. Sabelnikov nor the // names of its contributors may be used to endorse or promote products // derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER BE LIABLE FOR ANY // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // #pragma once #include "" #include "net_helper.h" #include "levin_base.h" namespace epee { namespace levin { /************************************************************************ * levin_client_async - probably it is not really fast implementation, * each handler thread could make up to 30 ms latency. * But, handling events in reader thread will cause dead locks in * case of recursive call (call invoke() to the same connection * on reader thread on remote invoke() handler) ***********************************************************************/ class levin_client_async { levin_commands_handler* m_pcommands_handler; volatile uint32_t m_is_stop; volatile uint32_t m_threads_count; ::critical_section m_send_lock; std::string m_local_invoke_buff; ::critical_section m_local_invoke_buff_lock; volatile int m_invoke_res; volatile uint32_t m_invoke_data_ready; volatile uint32_t m_invoke_is_active; boost::mutex m_invoke_event; boost::condition_variable m_invoke_cond; size_t m_timeout; ::critical_section m_recieved_packets_lock; struct packet_entry { bucket_head m_hd; std::string m_body; uint32_t m_connection_index; }; std::list<packet_entry> m_recieved_packets; /* m_current_connection_index needed when some connection was broken and reconnected - in this case we could have some received packets in que, which shoud not be handled */ volatile uint32_t m_current_connection_index; ::critical_section m_invoke_lock; ::critical_section m_reciev_packet_lock; ::critical_section m_connection_lock; net_utils::blocked_mode_client m_transport; public: levin_client_async():m_pcommands_handler(NULL), m_is_stop(0), m_threads_count(0), m_invoke_data_ready(0), m_invoke_is_active(0) {} levin_client_async(const levin_client_async& /*v*/):m_pcommands_handler(NULL), m_is_stop(0), m_threads_count(0), m_invoke_data_ready(0), m_invoke_is_active(0) {} ~levin_client_async() { boost::interprocess::ipcdetail::atomic_write32(&m_is_stop, 1); disconnect(); while(boost::interprocess::ipcdetail::atomic_read32(&m_threads_count)) ::Sleep(100); } void set_handler(levin_commands_handler* phandler) { m_pcommands_handler = phandler; } bool connect(uint32_t ip, uint32_t port, uint32_t timeout) { loop_call_guard(); critical_region cr(m_connection_lock); m_timeout = timeout; bool res = false; CRITICAL_REGION_BEGIN(m_reciev_packet_lock); CRITICAL_REGION_BEGIN(m_send_lock); res = levin_client_impl::connect(ip, port, timeout); boost::interprocess::ipcdetail::atomic_inc32(&m_current_connection_index); CRITICAL_REGION_END(); CRITICAL_REGION_END(); if(res && !boost::interprocess::ipcdetail::atomic_read32(&m_threads_count) ) { //boost::interprocess::ipcdetail::atomic_write32(&m_is_stop, 0);//m_is_stop = false; boost::thread( boost::bind(&levin_duplex_client::reciever_thread, this) ); boost::thread( boost::bind(&levin_duplex_client::handler_thread, this) ); boost::thread( boost::bind(&levin_duplex_client::handler_thread, this) ); } return res; } bool is_connected() { loop_call_guard(); critical_region cr(m_cs); return levin_client_impl::is_connected(); } inline bool check_connection() { loop_call_guard(); critical_region cr(m_cs); if(!is_connected()) { if( !reconnect() ) { LOG_ERROR("Reconnect Failed. Failed to invoke() becouse not connected!"); return false; } } return true; } //------------------------------------------------------------------------------ inline bool recv_n(SOCKET s, char* pbuff, size_t cb) { while(cb) { int res = ::recv(m_socket, pbuff, (int)cb, 0); if(SOCKET_ERROR == res) { if(!m_connected) return false; int err = ::WSAGetLastError(); LOG_ERROR("Failed to recv(), err = " << err << " \"" << socket_errors::get_socket_error_text(err) <<"\""); disconnect(); //reconnect(); return false; }else if(res == 0) { disconnect(); //reconnect(); return false; } LOG_PRINT_L4("[" << m_socket <<"] RECV " << res); cb -= res; pbuff += res; } return true; } //------------------------------------------------------------------------------ inline bool recv_n(SOCKET s, std::string& buff) { size_t cb_remain = buff.size(); char* m_current_ptr = (char*)buff.data(); return recv_n(s, m_current_ptr, cb_remain); } bool disconnect() { //boost::interprocess::ipcdetail::atomic_write32(&m_is_stop, 1);//m_is_stop = true; loop_call_guard(); critical_region cr(m_cs); levin_client_impl::disconnect(); CRITICAL_REGION_BEGIN(m_local_invoke_buff_lock); m_local_invoke_buff.clear(); m_invoke_res = LEVIN_ERROR_CONNECTION_DESTROYED; CRITICAL_REGION_END(); boost::interprocess::ipcdetail::atomic_write32(&m_invoke_data_ready, 1); //m_invoke_data_ready = true; m_invoke_cond.notify_all(); return true; } void loop_call_guard() { } void on_leave_invoke() { boost::interprocess::ipcdetail::atomic_write32(&m_invoke_is_active, 0); } int invoke(const GUID& target, int command, const std::string& in_buff, std::string& buff_out) { critical_region cr_invoke(m_invoke_lock); boost::interprocess::ipcdetail::atomic_write32(&m_invoke_is_active, 1); boost::interprocess::ipcdetail::atomic_write32(&m_invoke_data_ready, 0); misc_utils::destr_ptr hdlr = misc_utils::add_exit_scope_handler(boost::bind(&levin_duplex_client::on_leave_invoke, this)); loop_call_guard(); if(!check_connection()) return LEVIN_ERROR_CONNECTION_DESTROYED; bucket_head head = {0}; head.m_signature = LEVIN_SIGNATURE; head.m_cb = in_buff.size(); head.m_have_to_return_data = true; head.m_id = target; #ifdef TRACE_LEVIN_PACKETS_BY_GUIDS ::UuidCreate(&head.m_id); #endif head.m_command = command; head.m_protocol_version = LEVIN_PROTOCOL_VER_1; head.m_flags = LEVIN_PACKET_REQUEST; LOG_PRINT("[" << m_socket <<"] Sending invoke data", LOG_LEVEL_4); CRITICAL_REGION_BEGIN(m_send_lock); LOG_PRINT_L4("[" << m_socket <<"] SEND " << sizeof(head)); int res = ::send(m_socket, (const char*)&head, sizeof(head), 0); if(SOCKET_ERROR == res) { int err = ::WSAGetLastError(); LOG_ERROR("Failed to send(), err = " << err << " \"" << socket_errors::get_socket_error_text(err) <<"\""); disconnect(); return LEVIN_ERROR_CONNECTION_DESTROYED; } LOG_PRINT_L4("[" << m_socket <<"] SEND " << (int)in_buff.size()); res = ::send(m_socket, in_buff.data(), (int)in_buff.size(), 0); if(SOCKET_ERROR == res) { int err = ::WSAGetLastError(); LOG_ERROR("Failed to send(), err = " << err << " \"" << socket_errors::get_socket_error_text(err) <<"\""); disconnect(); return LEVIN_ERROR_CONNECTION_DESTROYED; } CRITICAL_REGION_END(); LOG_PRINT_L4("LEVIN_PACKET_SENT. [len=" << head.m_cb << ", flags=" << head.m_flags << ", is_cmd=" << head.m_have_to_return_data <<", cmd_id = " << head.m_command << ", pr_v=" << head.m_protocol_version << ", uid=" << string_tools::get_str_from_guid_a(head.m_id) << "]"); //hard coded timeout in 10 minutes for maximum invoke period. if it happens, it could mean only some real troubles. boost::system_time timeout = boost::get_system_time()+ boost::posix_time::milliseconds(100); size_t timeout_count = 0; boost::unique_lock<boost::mutex> lock(m_invoke_event); while(!boost::interprocess::ipcdetail::atomic_read32(&m_invoke_data_ready)) { if(!m_invoke_cond.timed_wait(lock, timeout)) { if(timeout_count < 10) { //workaround to avoid freezing at timed_wait called after notify_all. timeout = boost::get_system_time()+ boost::posix_time::milliseconds(100); ++timeout_count; continue; }else if(timeout_count == 10) { //workaround to avoid freezing at timed_wait called after notify_all. timeout = boost::get_system_time()+ boost::posix_time::minutes(10); ++timeout_count; continue; }else { LOG_PRINT("[" << m_socket <<"] Timeout on waiting invoke result. ", LOG_LEVEL_0); //disconnect(); return LEVIN_ERROR_CONNECTION_TIMEDOUT; } } } CRITICAL_REGION_BEGIN(m_local_invoke_buff_lock); buff_out.swap(m_local_invoke_buff); m_local_invoke_buff.clear(); CRITICAL_REGION_END(); return m_invoke_res; } int notify(const GUID& target, int command, const std::string& in_buff) { if(!check_connection()) return LEVIN_ERROR_CONNECTION_DESTROYED; bucket_head head = {0}; head.m_signature = LEVIN_SIGNATURE; head.m_cb = in_buff.size(); head.m_have_to_return_data = false; head.m_id = target; #ifdef TRACE_LEVIN_PACKETS_BY_GUIDS ::UuidCreate(&head.m_id); #endif head.m_command = command; head.m_protocol_version = LEVIN_PROTOCOL_VER_1; head.m_flags = LEVIN_PACKET_REQUEST; CRITICAL_REGION_BEGIN(m_send_lock); LOG_PRINT_L4("[" << m_socket <<"] SEND " << sizeof(head)); int res = ::send(m_socket, (const char*)&head, sizeof(head), 0); if(SOCKET_ERROR == res) { int err = ::WSAGetLastError(); LOG_ERROR("Failed to send(), err = " << err << " \"" << socket_errors::get_socket_error_text(err) <<"\""); disconnect(); return LEVIN_ERROR_CONNECTION_DESTROYED; } LOG_PRINT_L4("[" << m_socket <<"] SEND " << (int)in_buff.size()); res = ::send(m_socket, in_buff.data(), (int)in_buff.size(), 0); if(SOCKET_ERROR == res) { int err = ::WSAGetLastError(); LOG_ERROR("Failed to send(), err = " << err << " \"" << socket_errors::get_socket_error_text(err) <<"\""); disconnect(); return LEVIN_ERROR_CONNECTION_DESTROYED; } CRITICAL_REGION_END(); LOG_PRINT_L4("LEVIN_PACKET_SENT. [len=" << head.m_cb << ", flags=" << head.m_flags << ", is_cmd=" << head.m_have_to_return_data <<", cmd_id = " << head.m_command << ", pr_v=" << head.m_protocol_version << ", uid=" << string_tools::get_str_from_guid_a(head.m_id) << "]"); return 1; } private: bool have_some_data(SOCKET sock, int interval = 1) { fd_set fds; FD_ZERO(&fds); FD_SET(sock, &fds); fd_set fdse; FD_ZERO(&fdse); FD_SET(sock, &fdse); timeval tv; tv.tv_sec = interval; tv.tv_usec = 0; int sel_res = select(0, &fds, 0, &fdse, &tv); if(0 == sel_res) return false; else if(sel_res == SOCKET_ERROR) { if(m_is_stop) return false; int err_code = ::WSAGetLastError(); LOG_ERROR("Filed to call select, err code = " << err_code); disconnect(); }else { if(fds.fd_array[0]) {//some read operations was performed return true; }else if(fdse.fd_array[0]) {//some error was at the socket return true; } } return false; } bool reciev_and_process_incoming_data() { bucket_head head = {0}; uint32_t conn_index = 0; bool is_request = false; std::string local_buff; CRITICAL_REGION_BEGIN(m_reciev_packet_lock);//to protect from socket reconnect between head and body if(!recv_n(m_socket, (char*)&head, sizeof(head))) { if(m_is_stop) return false; LOG_ERROR("Failed to recv_n"); return false; } conn_index = boost::interprocess::ipcdetail::atomic_read32(&m_current_connection_index); if(head.m_signature!=LEVIN_SIGNATURE) { LOG_ERROR("Signature missmatch in response"); return false; } is_request = (head.m_protocol_version == LEVIN_PROTOCOL_VER_1 && head.m_flags&LEVIN_PACKET_REQUEST); local_buff.resize((size_t)head.m_cb); if(!recv_n(m_socket, local_buff)) { if(m_is_stop) return false; LOG_ERROR("Filed to reciev"); return false; } CRITICAL_REGION_END(); LOG_PRINT_L4("LEVIN_PACKET_RECIEVED. [len=" << head.m_cb << ", flags=" << head.m_flags << ", is_cmd=" << head.m_have_to_return_data <<", cmd_id = " << head.m_command << ", pr_v=" << head.m_protocol_version << ", uid=" << string_tools::get_str_from_guid_a(head.m_id) << "]"); if(is_request) { CRITICAL_REGION_BEGIN(m_recieved_packets_lock); m_recieved_packets.resize(m_recieved_packets.size() + 1); m_recieved_packets.back().m_hd = head; m_recieved_packets.back().m_body.swap(local_buff); m_recieved_packets.back().m_connection_index = conn_index; CRITICAL_REGION_END(); /* */ }else {//this is some response CRITICAL_REGION_BEGIN(m_local_invoke_buff_lock); m_local_invoke_buff.swap(local_buff); m_invoke_res = head.m_return_code; CRITICAL_REGION_END(); boost::interprocess::ipcdetail::atomic_write32(&m_invoke_data_ready, 1); //m_invoke_data_ready = true; m_invoke_cond.notify_all(); } return true; } bool reciever_thread() { LOG_PRINT_L3("[" << m_socket <<"] Socket reciever thread started.[m_threads_count=" << m_threads_count << "]"); log_space::log_singletone::set_thread_log_prefix("RECIEVER_WORKER"); boost::interprocess::ipcdetail::atomic_inc32(&m_threads_count); while(!m_is_stop) { if(!m_connected) { Sleep(100); continue; } if(have_some_data(m_socket, 1)) { if(!reciev_and_process_incoming_data()) { if(m_is_stop) { break;//boost::interprocess::ipcdetail::atomic_dec32(&m_threads_count); //return true; } LOG_ERROR("Failed to reciev_and_process_incoming_data. shutting down"); //boost::interprocess::ipcdetail::atomic_dec32(&m_threads_count); //disconnect_no_wait(); //break; } } } boost::interprocess::ipcdetail::atomic_dec32(&m_threads_count); LOG_PRINT_L3("[" << m_socket <<"] Socket reciever thread stopped.[m_threads_count=" << m_threads_count << "]"); return true; } bool process_recieved_packet(bucket_head& head, const std::string& local_buff, uint32_t conn_index) { net_utils::connection_context_base conn_context; conn_context.m_remote_ip = m_ip; conn_context.m_remote_port = m_port; if(head.m_have_to_return_data) { std::string return_buff; if(m_pcommands_handler) head.m_return_code = m_pcommands_handler->invoke(head.m_id, head.m_command, local_buff, return_buff, conn_context); else head.m_return_code = LEVIN_ERROR_CONNECTION_HANDLER_NOT_DEFINED; head.m_cb = return_buff.size(); head.m_have_to_return_data = false; head.m_protocol_version = LEVIN_PROTOCOL_VER_1; head.m_flags = LEVIN_PACKET_RESPONSE; std::string send_buff((const char*)&head, sizeof(head)); send_buff += return_buff; CRITICAL_REGION_BEGIN(m_send_lock); if(conn_index != boost::interprocess::ipcdetail::atomic_read32(&m_current_connection_index)) {//there was reconnect, send response back is not allowed return true; } int res = ::send(m_socket, (const char*)send_buff.data(), send_buff.size(), 0); if(res == SOCKET_ERROR) { int err_code = ::WSAGetLastError(); LOG_ERROR("Failed to send, err = " << err_code); return false; } CRITICAL_REGION_END(); LOG_PRINT_L4("LEVIN_PACKET_SENT. [len=" << head.m_cb << ", flags=" << head.m_flags << ", is_cmd=" << head.m_have_to_return_data <<", cmd_id = " << head.m_command << ", pr_v=" << head.m_protocol_version << ", uid=" << string_tools::get_str_from_guid_a(head.m_id) << "]"); } else { if(m_pcommands_handler) m_pcommands_handler->notify(head.m_id, head.m_command, local_buff, conn_context); } return true; } bool handler_thread() { LOG_PRINT_L3("[" << m_socket <<"] Socket handler thread started.[m_threads_count=" << m_threads_count << "]"); log_space::log_singletone::set_thread_log_prefix("HANDLER_WORKER"); boost::interprocess::ipcdetail::atomic_inc32(&m_threads_count); while(!m_is_stop) { bool have_some_work = false; std::string local_buff; bucket_head bh = {0}; uint32_t conn_index = 0; CRITICAL_REGION_BEGIN(m_recieved_packets_lock); if(m_recieved_packets.size()) { bh = m_recieved_packets.begin()->m_hd; conn_index = m_recieved_packets.begin()->m_connection_index; local_buff.swap(m_recieved_packets.begin()->m_body); have_some_work = true; m_recieved_packets.pop_front(); } CRITICAL_REGION_END(); if(have_some_work) { process_recieved_packet(bh, local_buff, conn_index); }else { //Idle when no work Sleep(30); } } boost::interprocess::ipcdetail::atomic_dec32(&m_threads_count); LOG_PRINT_L3("[" << m_socket <<"] Socket handler thread stopped.[m_threads_count=" << m_threads_count << "]"); return true; } }; } }
{ "pile_set_name": "Github" }
lennar corp len nd qtr may shr cts vs cts net vs revs mln vs mln six mths shr dlrs vs cts net mln vs revs mln vs mln reuter
{ "pile_set_name": "Github" }
!!!COM: Palestrina, Giovanni Perluigi da !!!OPR: Missa In semidupl. maj. (II) !!!OMD: Credo !!!OTL: Et ex Patre **kern **kern **kern **kern **kern *Ibass *Itenor *Itenor *Icalto *Icant !Bassus !Tenor 2 !Tenor 1 !Altus !Cantus *clefF4 *clefGv2 *clefGv2 *clefG2 *clefG2 *k[b-] *k[b-] *k[b-] *k[b-] *k[b-] *F:ion *F:ion *F:ion *F:ion *F:ion *M4/2 *M4/2 *M4/2 *M4/2 *M4/2 =19 =19 =19 =19 =19 0r 0r 0r 1B- 1r . . . 1F 2r . . . . [2f =20 =20 =20 =20 =20 1r 0r 0r 2B- 2f] . . . 2c 2e 1BB- . . 1d 2f . . . . 2g =21 =21 =21 =21 =21 1FF 2r 0r 2.c 1a . 1F . . . . . . 4A . 2BB- . . 2d 1g 2C 2E . 4c . . . . 4B- . =22 =22 =22 =22 =22 2D 2F 0r 4A 2f . . . 4B- . 4C 2G . 4c 2.e 4BB- . . 4d . 2AA 1A . [1c . . . . . 4c 2FF . . . [2f =23 =23 =23 =23 =23 1C 1G 2r 1c] 2f] . . 2C . 2e 1r 4F 2D 1A 2f . 4G . . . . 4A [2F . 2f . 4B- . . . =24 =24 =24 =24 =24 0r 2c 4F] 2r 2a . . 4F . . . 2C 2E 2c 2.cc . 1F 2D 2d . . . . . 4b- . . 2D [2f 2b- =25 =25 =25 =25 =25 0r 2r 0C 4f] 2a . . . 4e . . 2G . 2e 4g . . . . 4f . 2A . 2.c 2.e . [2c . . . . . . 4d 4f =26 =26 =26 =26 =26 0r 4c] 0r 4e 4g . 4c . 4c 4e . 2B- . 2.d 2.f . 2A . . . . . . 4c 4e . 2A . [2c 2c =27 =27 =27 =27 =27 1r 1G 2r 2c] 2.d . . 2G 2B . . . . . 4e 2r 2F 2A 1c 2f 2C 2E [2c . 2g =28 =28 =28 =28 =28 2D 1D 4c] 1r 2f . . 4B- . . 2.F . 2B- . 2f . 1C 2A 2r 2a 4E . . . . 2E . 2G 2c [2cc =29 =29 =29 =29 =29 2D 2r 2F 2d 2cc] 2D 2F 2D 2f 2b 2C 2G 2E 2e 2cc [2BB- [2B- 2F [2d [2f =30 =30 =30 =30 =30 4BB-] 4B-] 2F 2d] 4f] 4BB- 4B- . . 4g 2FF 2A 2c 1f 4a . . . . 4f 2C 2G 2.c . 2g 2C 2G . 2e 2g . . 4c . . =31 =31 =31 =31 =31 [0FF [0F [0c [0f [0a =32 =32 =32 =32 =32 0FF] 0F] 0c] 0f] 0a] *- *- *- *- *- !!!CDT: 1525/^1526/-1594/2/2 !!!OCY: Italia !!!AGN: Mass (Paraphrase) !!!AST: renaissance, vocal !!!ASW: Gregorian Mass !!!PWK: Masses, Book Mantuan II !!!RNB: Cadence finals: C !!!YOR: Le Opere Complete, v. 19, p. 87 !!!YOO: Rome, Italy: Fratelli Scalera !!!END: 1992// !!!EED: John Miller !!!YEC: Copyright 2000, John Miller !!!YEN: United States of America !!!YEM: Rights to all derivative electronic formats reserved. !!!YEM: Refer to licensing agreement for further details. !!!YEM: This file must be accompanied by the licensing agreement. !!!YEM: A copy of the licensing agreement may be found at http://www.music-cog.ohio-state.edu/HumdrumDatabases/Palestrina/license.txt !!!EMD: converted to Humdrum by Bret Aarden
{ "pile_set_name": "Github" }
// Copyright 2013 the V8 project authors. All rights reserved. // Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions // are met: // 1. Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE // DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON // ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. description( "This test checks that parentheses are preserved when significant, and not added where inappropriate. " + "We need this test because the JavaScriptCore parser removes all parentheses and the serializer then adds them back." ); function compileAndSerialize(expression) { var f = eval("(function () { return " + expression + "; })"); var serializedString = f.toString(); serializedString = serializedString.replace(/[ \t\r\n]+/g, " "); serializedString = serializedString.replace("function () { return ", ""); serializedString = serializedString.replace("; }", ""); return serializedString; } function compileAndSerializeLeftmostTest(expression) { var f = eval("(function () { " + expression + "; })"); var serializedString = f.toString(); serializedString = serializedString.replace(/[ \t\r\n]+/g, " "); serializedString = serializedString.replace("function () { ", ""); serializedString = serializedString.replace("; }", ""); return serializedString; } var removesExtraParentheses = compileAndSerialize("(a + b) + c") == "a + b + c"; function testKeepParentheses(expression) { shouldBe("compileAndSerialize('" + expression + "')", "'" + expression + "'"); } function testOptionalParentheses(expression) { stripped_expression = removesExtraParentheses ? expression.replace(/\(/g, '').replace(/\)/g, '') : expression; shouldBe("compileAndSerialize('" + expression + "')", "'" + stripped_expression + "'"); } function testLeftAssociativeSame(opA, opB) { testKeepParentheses("a " + opA + " b " + opB + " c"); testOptionalParentheses("(a " + opA + " b) " + opB + " c"); testKeepParentheses("a " + opA + " (b " + opB + " c)"); } function testRightAssociativeSame(opA, opB) { testKeepParentheses("a " + opA + " b " + opB + " c"); testKeepParentheses("(a " + opA + " b) " + opB + " c"); testOptionalParentheses("a " + opA + " (b " + opB + " c)"); } function testHigherFirst(opHigher, opLower) { testKeepParentheses("a " + opHigher + " b " + opLower + " c"); testOptionalParentheses("(a " + opHigher + " b) " + opLower + " c"); testKeepParentheses("a " + opHigher + " (b " + opLower + " c)"); } function testLowerFirst(opLower, opHigher) { testKeepParentheses("a " + opLower + " b " + opHigher + " c"); testKeepParentheses("(a " + opLower + " b) " + opHigher + " c"); testOptionalParentheses("a " + opLower + " (b " + opHigher + " c)"); } var binaryOperators = [ [ "*", "/", "%" ], [ "+", "-" ], [ "<<", ">>", ">>>" ], [ "<", ">", "<=", ">=", "instanceof", "in" ], [ "==", "!=", "===", "!==" ], [ "&" ], [ "^" ], [ "|" ], [ "&&" ], [ "||" ] ]; for (i = 0; i < binaryOperators.length; ++i) { var ops = binaryOperators[i]; for (j = 0; j < ops.length; ++j) { var op = ops[j]; testLeftAssociativeSame(op, op); if (j != 0) testLeftAssociativeSame(ops[0], op); if (i < binaryOperators.length - 1) { var nextOps = binaryOperators[i + 1]; if (j == 0) for (k = 0; k < nextOps.length; ++k) testHigherFirst(op, nextOps[k]); else testHigherFirst(op, nextOps[0]); } } } var assignmentOperators = [ "=", "*=", "/=" , "%=", "+=", "-=", "<<=", ">>=", ">>>=", "&=", "^=", "|=" ]; for (i = 0; i < assignmentOperators.length; ++i) { var op = assignmentOperators[i]; testRightAssociativeSame(op, op); if (i != 0) testRightAssociativeSame("=", op); testLowerFirst(op, "+"); shouldThrow("compileAndSerialize('a + b " + op + " c')"); shouldThrow("compileAndSerialize('(a + b) " + op + " c')"); testKeepParentheses("a + (b " + op + " c)"); } var prefixOperators = [ "delete", "void", "typeof", "++", "--", "+", "-", "~", "!" ]; var prefixOperatorSpace = [ " ", " ", " ", "", "", " ", " ", "", "" ]; for (i = 0; i < prefixOperators.length; ++i) { var op = prefixOperators[i] + prefixOperatorSpace[i]; testKeepParentheses("" + op + "a + b"); testOptionalParentheses("(" + op + "a) + b"); if (prefixOperators[i] !== "++" && prefixOperators[i] !== "--") testKeepParentheses("" + op + "(a + b)"); else shouldThrow("compileAndSerialize('" + op + "(a + b)')"); testKeepParentheses("!" + op + "a"); testOptionalParentheses("!(" + op + "a)"); } testKeepParentheses("!a++"); testOptionalParentheses("!(a++)"); shouldThrow("compileAndSerialize('(!a)++')"); testKeepParentheses("!a--"); testOptionalParentheses("!(a--)"); shouldThrow("compileAndSerialize('(!a)--')"); testKeepParentheses("(-1)[a]"); testKeepParentheses("(-1)[a] = b"); testKeepParentheses("(-1)[a] += b"); testKeepParentheses("(-1)[a]++"); testKeepParentheses("++(-1)[a]"); testKeepParentheses("(-1)[a]()"); testKeepParentheses("new (-1)()"); testKeepParentheses("(-1).a"); testKeepParentheses("(-1).a = b"); testKeepParentheses("(-1).a += b"); testKeepParentheses("(-1).a++"); testKeepParentheses("++(-1).a"); testKeepParentheses("(-1).a()"); testKeepParentheses("(- 0)[a]"); testKeepParentheses("(- 0)[a] = b"); testKeepParentheses("(- 0)[a] += b"); testKeepParentheses("(- 0)[a]++"); testKeepParentheses("++(- 0)[a]"); testKeepParentheses("(- 0)[a]()"); testKeepParentheses("new (- 0)()"); testKeepParentheses("(- 0).a"); testKeepParentheses("(- 0).a = b"); testKeepParentheses("(- 0).a += b"); testKeepParentheses("(- 0).a++"); testKeepParentheses("++(- 0).a"); testKeepParentheses("(- 0).a()"); testOptionalParentheses("(1)[a]"); testOptionalParentheses("(1)[a] = b"); testOptionalParentheses("(1)[a] += b"); testOptionalParentheses("(1)[a]++"); testOptionalParentheses("++(1)[a]"); shouldBe("compileAndSerialize('(1)[a]()')", removesExtraParentheses ? "'1[a]()'" : "'(1)[a]()'"); shouldBe("compileAndSerialize('new (1)()')", removesExtraParentheses ? "'new 1()'" : "'new (1)()'"); testKeepParentheses("(1).a"); testKeepParentheses("(1).a = b"); testKeepParentheses("(1).a += b"); testKeepParentheses("(1).a++"); testKeepParentheses("++(1).a"); testKeepParentheses("(1).a()"); for (i = 0; i < assignmentOperators.length; ++i) { var op = assignmentOperators[i]; shouldThrow("compileAndSerialize('(-1) " + op + " a')"); shouldThrow("compileAndSerialize('(- 0) " + op + " a')"); shouldThrow("compileAndSerialize('1 " + op + " a')"); } shouldBe("compileAndSerializeLeftmostTest('({ }).x')", "'({ }).x'"); shouldBe("compileAndSerializeLeftmostTest('x = { }')", "'x = { }'"); shouldBe("compileAndSerializeLeftmostTest('(function () { })()')", "'(function () { })()'"); shouldBe("compileAndSerializeLeftmostTest('x = function () { }')", "'x = function () { }'"); shouldBe("compileAndSerializeLeftmostTest('var a')", "'var a'"); shouldBe("compileAndSerializeLeftmostTest('var a = 1')", "'var a = 1'"); shouldBe("compileAndSerializeLeftmostTest('var a, b')", "'var a, b'"); shouldBe("compileAndSerializeLeftmostTest('var a = 1, b = 2')", "'var a = 1, b = 2'"); shouldBe("compileAndSerializeLeftmostTest('var a, b, c')", "'var a, b, c'"); shouldBe("compileAndSerializeLeftmostTest('var a = 1, b = 2, c = 3')", "'var a = 1, b = 2, c = 3'"); shouldBe("compileAndSerializeLeftmostTest('const a = 1')", "'const a = 1'"); shouldBe("compileAndSerializeLeftmostTest('const a = (1, 2)')", "'const a = (1, 2)'"); shouldBe("compileAndSerializeLeftmostTest('const a, b = 1')", "'const a, b = 1'"); shouldBe("compileAndSerializeLeftmostTest('const a = 1, b')", "'const a = 1, b'"); shouldBe("compileAndSerializeLeftmostTest('const a = 1, b = 1')", "'const a = 1, b = 1'"); shouldBe("compileAndSerializeLeftmostTest('const a = (1, 2), b = 1')", "'const a = (1, 2), b = 1'"); shouldBe("compileAndSerializeLeftmostTest('const a = 1, b = (1, 2)')", "'const a = 1, b = (1, 2)'"); shouldBe("compileAndSerializeLeftmostTest('const a = (1, 2), b = (1, 2)')", "'const a = (1, 2), b = (1, 2)'"); shouldBe("compileAndSerialize('(function () { new (a.b()).c })')", "'(function () { new (a.b()).c })'");
{ "pile_set_name": "Github" }
/** * Module that checks if a given wikia exists * in a user's native language (based on a Geo cookie) * and displays a notification with a link. * * @author - Adam Karmiński <[email protected]> */ require( [ 'jquery', 'mw', 'wikia.window', 'wikia.geo', 'wikia.cache', 'wikia.tracker', 'BannerNotification' ], function ($, mw, w, geo, cache, tracker, BannerNotification) { 'use strict'; // Get user's geographic data and a country code var targetLanguage = getTargetLanguage(), contentLanguage = w.wgContentLanguage, // Cache version cacheVersion = '1.02', // LinkTitle from Cache linkTitle = retrieveLinkTitle(); function init() { var interlangExist = false; if (targetLanguage !== false && shouldShowWikiaInYourLang(targetLanguage, contentLanguage) && cache.get(getWIYLNotificationShownKey()) !== true ) { // Check local browser cache to see if a request has been sent // in the last month if (cache.get(getWIYLRequestSentKey()) !== true) { interlangExist = getInterlangFromArticleInterlangList(); if (!interlangExist) { getNativeWikiaInfo(); } } else if (typeof cache.get(getWIYLMessageKey()) === 'string') { displayNotification(cache.get(getWIYLMessageKey())); } } } // Per request we should unify dialects like pt and pt-br // Feature is enabled only for languages in targetLanguageFilter // @see CE-1220 // @see INT-302 function shouldShowWikiaInYourLang(targetLanguage, contentLanguage) { var targetLanguageLangCode = targetLanguage.split('-')[0], contentLanguageLangCode = contentLanguage.split('-')[0], targetLanguageFilter = [ 'zh', 'ko', 'vi', 'ru', 'ja']; if (targetLanguageFilter.indexOf(targetLanguageLangCode) === -1) { return false; } return targetLanguageLangCode !== contentLanguageLangCode; } function getTargetLanguage() { var browserLanguage = window.navigator.language || window.navigator.userLanguage, geoCountryCode = geo.getCountryCode().toLowerCase(), targetLanguage; if (w.wgUserName !== null) { // Check if a user is logged and if so - use a lang from settings targetLanguage = w.wgUserLanguage; } else if (typeof browserLanguage === 'string') { // Check if a browser's language is accessible targetLanguage = browserLanguage.split('-')[0]; } else if (typeof geoCountryCode === 'string') { // Check if a langcode from Geo cookie is accessible targetLanguage = geoCountryCode; } else { // If neither - return false targetLanguage = false; } return targetLanguage; } function getInterlangFromArticleInterlangList() { var i, interlangData; if (Array.isArray(w.wgArticleInterlangList)) { for(i = 0; i < w.wgArticleInterlangList.length; i++) { interlangData = w.wgArticleInterlangList[i].split(':'); if (targetLanguage === interlangData[0]) { //we have interlang for this user. Pass the interlang article title getNativeWikiaInfo(interlangData[1]); return true; } } } return false; } function getNativeWikiaInfo(interlangTitle) { /** * Sends a request to the WikiaInYourLangController via Nirvana. * Response consists of: * { * success: bool True if a native wikia is found * wikiaSitename: string A wgSitename value for the wikia * wikiaUrl: string A city_url valur for the wikia * } */ $.nirvana.sendRequest({ controller: 'WikiaInYourLangController', method: 'getNativeWikiaInfo', format: 'json', type: 'GET', data: { targetLanguage: targetLanguage, articleTitle: w.wgPageName, interlangTitle: interlangTitle }, callback: function (results) { if (results.success === true) { // Save link address if it is different from this article title saveLinkTitle(results.linkAddress); // Re-initialize linkTitle with linkAddress linkTitle = retrieveLinkTitle(); // Display notification displayNotification(results.message); // Update JS cache and set the notification shown indicator to true // Cache for a day cache.set(getWIYLRequestSentKey(), true, cache.CACHE_STANDARD); // Save the message in cache to display until a user closes it // Cache for a day cache.set( getWIYLMessageKey(), results.message, cache.CACHE_STANDARD ); } } }); } function displayNotification(message) { var bannerNotification = new BannerNotification(message, 'notify').show(), label = getTrackingLabel('notification-view'), // Track a view of the notification trackingParams = { trackingMethod: 'analytics', category: 'wikia-in-your-lang', action: tracker.ACTIONS.VIEW, label: label }; tracker.track(trackingParams); // Bind tracking of clicks on a link and events on close bindEvents(bannerNotification); } function bindEvents(bannerNotification) { bannerNotification .onClose(onNotificationClosed); bannerNotification .$element .on('click', '.text', onLinkClick); } function onNotificationClosed() { // Track closing of a notification var label = getTrackingLabel('notification-close'), trackingParams = { trackingMethod: 'analytics', category: 'wikia-in-your-lang', action: tracker.ACTIONS.CLOSE, label: label, }; tracker.track(trackingParams); cache.set(getWIYLMessageKey(), null); // Cache for a month cache.set(getWIYLNotificationShownKey(), true, cache.CACHE_LONG); } function onLinkClick() { // Track a click on a notification link var label = getTrackingLabel('notification-link-click'), trackingParams = { trackingMethod: 'analytics', category: 'wikia-in-your-lang', action: tracker.ACTIONS.CLICK_LINK_TEXT, label: label, }; tracker.track(trackingParams); } function getWIYLRequestSentKey() { return 'wikiaInYourLangRequestSent' + linkTitle + cacheVersion; } function getWIYLNotificationShownKey() { return 'wikiaInYourLangNotificationShown' + cacheVersion; } function getWIYLMessageKey() { return targetLanguage + 'WikiaInYourLangMessage' + linkTitle + cacheVersion; } function getWIYLLinkTitlesKey() { return targetLanguage + 'WikiaInYourLangLinkTitles' + cacheVersion; } function saveLinkTitle(linkAddress) { var articleTitle = w.wgPageName, linkAddressAry = linkAddress.match(/.+\.com\/wiki\/(.*)/), listOfCachedTitles = {}, linkTitle = ''; if ( linkAddressAry && linkAddressAry.length > 1 ) { linkTitle = linkAddressAry[1]; } else { linkTitle = 'main'; } listOfCachedTitles = cache.get(getWIYLLinkTitlesKey()); if ( !listOfCachedTitles ) { listOfCachedTitles = {}; } listOfCachedTitles[articleTitle] = linkTitle; cache.set(getWIYLLinkTitlesKey(),listOfCachedTitles, cache.CACHE_LONG); } /** * Retrieve linkTitle for this articleTitle from cache. * articleTitle is a current article title of this wiki. * linkTitle is wikia-in-your-lang link's article title, which may or may not be the same as the articleTitle. * listOfCachedTitles is a map of articleTitle => linkTitle * @returns {string} wikia-in-your-lang link's article title */ function retrieveLinkTitle() { var articleTitle = w.wgPageName, listOfCachedTitles = cache.get(getWIYLLinkTitlesKey()); return (listOfCachedTitles && listOfCachedTitles[articleTitle]) ? listOfCachedTitles[articleTitle] : ''; } function getTrackingLabel(postfix) { var label = targetLanguage; if ( linkTitle.length > 0 && linkTitle != 'main' ) { label += '-article'; } label += '-' + postfix; return label; } if (!w.wikiaPageIsCorporate) { $(init); } } );
{ "pile_set_name": "Github" }
import * as request from 'superagent'; import config from '../config'; export function getAllThemes(callback) { request .get(`${config.api_origin}/themes`) .end((err, res) => { if (err) { return callback(err); } callback(null, res.body); }); } export function getThemeFromId(id, callback) { request .get(`${config.api_origin}/themes/${id}`) .end((err, res) => { if (err) { return callback(err); } callback(null, res.body); }); }
{ "pile_set_name": "Github" }
/* * Copyright (C) 2015 Ribot Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package uk.co.ribot.easyadapter.util; public class DefaultConfig { //The api level that Robolectric will use to run the unit tests public static final int EMULATE_SDK = 21; }
{ "pile_set_name": "Github" }
module Location = struct type t = string end let dirs : (string * Dune_section.t, string) Hashtbl.t = Hashtbl.create 10 (* multi-bindings first is the one with least priority *) (* TODO already exists in stdue/bin.ml *) let path_sep = if Sys.win32 then ';' else ':' let () = match Sys.getenv_opt "DUNE_DIR_LOCATIONS" with | None -> () | Some s -> let rec aux = function | [] -> () | package :: section :: dir :: l -> let section = match Dune_section.of_string section with | None -> invalid_arg ("Dune-site: Unknown section " ^ section) | Some s -> s in Hashtbl.add dirs (package, section) dir; aux l | _ -> invalid_arg "Error parsing DUNE_DIR_LOCATIONS" in let l = String.split_on_char path_sep s in aux l (* Parse the replacement format described in [artifact_substitution.ml]. *) let eval s = let len = String.length s in if s.[0] = '=' then let colon_pos = String.index_from s 1 ':' in let vlen = int_of_string (String.sub s 1 (colon_pos - 1)) in (* This [min] is because the value might have been truncated if it was too large *) let vlen = min vlen (len - colon_pos - 1) in Some (String.sub s (colon_pos + 1) vlen) else None [@@inline never] let get_dir ~package ~section = Hashtbl.find_all dirs (package, section) module Hardcoded_ocaml_path = struct type t = | None | Relocatable | Hardcoded of string list | Findlib_config of string let t = lazy ( match eval Dune_site_data.hardcoded_ocamlpath with | None -> None | Some "relocatable" -> Relocatable | Some s -> ( let l = String.split_on_char '\000' s in match l with | "hardcoded" :: l -> Hardcoded l | [ "findlibconfig"; p ] -> Findlib_config p | _ -> invalid_arg "dune error: hardcoded_ocamlpath parsing error" ) ) end let relocatable = lazy ( match Lazy.force Hardcoded_ocaml_path.t with | Relocatable -> true | _ -> false ) let prefix = lazy (let path = Sys.executable_name in let bin = Filename.dirname path in let prefix = Filename.dirname bin in prefix) let relocate_if_needed path = if Lazy.force relocatable then Filename.concat (Lazy.force prefix) path else path let site ~package ~section ~suffix ~encoded = let dirs = get_dir ~package ~section in let dirs = match eval encoded with | None -> dirs | Some d -> relocate_if_needed d :: dirs in List.rev_map (fun dir -> Filename.concat dir suffix) dirs [@@inline never] let sourceroot local = match eval local with | Some "" -> None | Some _ as x -> x | None -> (* None if the binary is executed from _build but not by dune, which should not happend *) Sys.getenv_opt "DUNE_SOURCEROOT" let ocamlpath = lazy (let env = match Sys.getenv_opt "OCAMLPATH" with | None -> [] | Some x -> String.split_on_char path_sep x in let static = match Lazy.force Hardcoded_ocaml_path.t with | Hardcoded_ocaml_path.None -> String.split_on_char path_sep (Sys.getenv "DUNE_OCAML_HARDCODED") | Hardcoded_ocaml_path.Relocatable -> [ Filename.concat (Lazy.force prefix) "lib" ] | Hardcoded_ocaml_path.Hardcoded l -> l | Hardcoded_ocaml_path.Findlib_config _ -> assert false in env @ static) let stdlib = lazy ( match eval Dune_site_data.stdlib_dir with | None -> Sys.getenv "DUNE_OCAML_STDLIB" | Some s -> s )
{ "pile_set_name": "Github" }
/* iCheck plugin Minimal skin, yellow ----------------------------------- */ .icheckbox_minimal-yellow, .iradio_minimal-yellow { display: inline-block; *display: inline; vertical-align: middle; margin: 0; padding: 0; width: 18px; height: 18px; background: url(yellow.png) no-repeat; border: none; cursor: pointer; } .icheckbox_minimal-yellow { background-position: 0 0; } .icheckbox_minimal-yellow.hover { background-position: -20px 0; } .icheckbox_minimal-yellow.checked { background-position: -40px 0; } .icheckbox_minimal-yellow.disabled { background-position: -60px 0; cursor: default; } .icheckbox_minimal-yellow.checked.disabled { background-position: -80px 0; } .iradio_minimal-yellow { background-position: -100px 0; } .iradio_minimal-yellow.hover { background-position: -120px 0; } .iradio_minimal-yellow.checked { background-position: -140px 0; } .iradio_minimal-yellow.disabled { background-position: -160px 0; cursor: default; } .iradio_minimal-yellow.checked.disabled { background-position: -180px 0; } /* HiDPI support */ @media (-o-min-device-pixel-ratio: 5/4), (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi), (min-resolution: 1.25dppx) { .icheckbox_minimal-yellow, .iradio_minimal-yellow { background-image: url([email protected]); -webkit-background-size: 200px 20px; background-size: 200px 20px; } }
{ "pile_set_name": "Github" }
PetscSF Object: 3 MPI processes type: basic sort=rank-order [0] Number of roots=6, leaves=2, remote ranks=2 [0] 0 <- (2,2) [0] 2 <- (1,0) [1] Number of roots=4, leaves=3, remote ranks=2 [1] 0 <- (0,2) [1] 2 <- (2,0) [1] 4 <- (0,4) [2] Number of roots=4, leaves=3, remote ranks=2 [2] 0 <- (1,2) [2] 2 <- (0,0) [2] 4 <- (0,4) [0] Roots referenced by my leaves, by rank [0] 1: 1 edges [0] 2 <- 0 [0] 2: 1 edges [0] 0 <- 2 [1] Roots referenced by my leaves, by rank [1] 0: 2 edges [1] 0 <- 2 [1] 4 <- 4 [1] 2: 1 edges [1] 2 <- 0 [2] Roots referenced by my leaves, by rank [2] 0: 2 edges [2] 2 <- 0 [2] 4 <- 4 [2] 1: 1 edges [2] 0 <- 2 ## Bcast Rootdata [0] 0: 100 -1 101 -1 102 -1 [1] 0: 200 -1 201 -1 [2] 0: 300 -1 301 -1 ## Bcast Leafdata [0] 0: 301 -1 200 -1 [1] 0: 101 -1 300 -1 102 -1 [2] 0: 201 -1 100 -1 102 -1
{ "pile_set_name": "Github" }
; <<>> DiG 9.9.5-3ubuntu0.8-Ubuntu <<>> AXFR link. @c.link.dyntld.net. +nocomments +nocmd +noquestion +nostats +time=15 ;; global options: +cmd ; Transfer failed.
{ "pile_set_name": "Github" }
*> \brief \b DLARFT * * =========== DOCUMENTATION =========== * * Online html documentation available at * http://www.netlib.org/lapack/explore-html/ * *> \htmlonly *> Download DLARFT + dependencies *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarft.f"> *> [TGZ]</a> *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarft.f"> *> [ZIP]</a> *> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarft.f"> *> [TXT]</a> *> \endhtmlonly * * Definition: * =========== * * SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT ) * * .. Scalar Arguments .. * CHARACTER DIRECT, STOREV * INTEGER K, LDT, LDV, N * .. * .. Array Arguments .. * DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * ) * .. * * *> \par Purpose: * ============= *> *> \verbatim *> *> DLARFT forms the triangular factor T of a real block reflector H *> of order n, which is defined as a product of k elementary reflectors. *> *> If DIRECT = 'F', H = H(1) H(2) . . . H(k) and T is upper triangular; *> *> If DIRECT = 'B', H = H(k) . . . H(2) H(1) and T is lower triangular. *> *> If STOREV = 'C', the vector which defines the elementary reflector *> H(i) is stored in the i-th column of the array V, and *> *> H = I - V * T * V**T *> *> If STOREV = 'R', the vector which defines the elementary reflector *> H(i) is stored in the i-th row of the array V, and *> *> H = I - V**T * T * V *> \endverbatim * * Arguments: * ========== * *> \param[in] DIRECT *> \verbatim *> DIRECT is CHARACTER*1 *> Specifies the order in which the elementary reflectors are *> multiplied to form the block reflector: *> = 'F': H = H(1) H(2) . . . H(k) (Forward) *> = 'B': H = H(k) . . . H(2) H(1) (Backward) *> \endverbatim *> *> \param[in] STOREV *> \verbatim *> STOREV is CHARACTER*1 *> Specifies how the vectors which define the elementary *> reflectors are stored (see also Further Details): *> = 'C': columnwise *> = 'R': rowwise *> \endverbatim *> *> \param[in] N *> \verbatim *> N is INTEGER *> The order of the block reflector H. N >= 0. *> \endverbatim *> *> \param[in] K *> \verbatim *> K is INTEGER *> The order of the triangular factor T (= the number of *> elementary reflectors). K >= 1. *> \endverbatim *> *> \param[in] V *> \verbatim *> V is DOUBLE PRECISION array, dimension *> (LDV,K) if STOREV = 'C' *> (LDV,N) if STOREV = 'R' *> The matrix V. See further details. *> \endverbatim *> *> \param[in] LDV *> \verbatim *> LDV is INTEGER *> The leading dimension of the array V. *> If STOREV = 'C', LDV >= max(1,N); if STOREV = 'R', LDV >= K. *> \endverbatim *> *> \param[in] TAU *> \verbatim *> TAU is DOUBLE PRECISION array, dimension (K) *> TAU(i) must contain the scalar factor of the elementary *> reflector H(i). *> \endverbatim *> *> \param[out] T *> \verbatim *> T is DOUBLE PRECISION array, dimension (LDT,K) *> The k by k triangular factor T of the block reflector. *> If DIRECT = 'F', T is upper triangular; if DIRECT = 'B', T is *> lower triangular. The rest of the array is not used. *> \endverbatim *> *> \param[in] LDT *> \verbatim *> LDT is INTEGER *> The leading dimension of the array T. LDT >= K. *> \endverbatim * * Authors: * ======== * *> \author Univ. of Tennessee *> \author Univ. of California Berkeley *> \author Univ. of Colorado Denver *> \author NAG Ltd. * *> \date April 2012 * *> \ingroup doubleOTHERauxiliary * *> \par Further Details: * ===================== *> *> \verbatim *> *> The shape of the matrix V and the storage of the vectors which define *> the H(i) is best illustrated by the following example with n = 5 and *> k = 3. The elements equal to 1 are not stored. *> *> DIRECT = 'F' and STOREV = 'C': DIRECT = 'F' and STOREV = 'R': *> *> V = ( 1 ) V = ( 1 v1 v1 v1 v1 ) *> ( v1 1 ) ( 1 v2 v2 v2 ) *> ( v1 v2 1 ) ( 1 v3 v3 ) *> ( v1 v2 v3 ) *> ( v1 v2 v3 ) *> *> DIRECT = 'B' and STOREV = 'C': DIRECT = 'B' and STOREV = 'R': *> *> V = ( v1 v2 v3 ) V = ( v1 v1 1 ) *> ( v1 v2 v3 ) ( v2 v2 v2 1 ) *> ( 1 v2 v3 ) ( v3 v3 v3 v3 1 ) *> ( 1 v3 ) *> ( 1 ) *> \endverbatim *> * ===================================================================== SUBROUTINE DLARFT( DIRECT, STOREV, N, K, V, LDV, TAU, T, LDT ) * * -- LAPACK auxiliary routine (version 3.4.1) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * April 2012 * * .. Scalar Arguments .. CHARACTER DIRECT, STOREV INTEGER K, LDT, LDV, N * .. * .. Array Arguments .. DOUBLE PRECISION T( LDT, * ), TAU( * ), V( LDV, * ) * .. * * ===================================================================== * * .. Parameters .. DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Local Scalars .. INTEGER I, J, PREVLASTV, LASTV * .. * .. External Subroutines .. EXTERNAL DGEMV, DTRMV * .. * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. * .. Executable Statements .. * * Quick return if possible * IF( N.EQ.0 ) $ RETURN * IF( LSAME( DIRECT, 'F' ) ) THEN PREVLASTV = N DO I = 1, K PREVLASTV = MAX( I, PREVLASTV ) IF( TAU( I ).EQ.ZERO ) THEN * * H(i) = I * DO J = 1, I T( J, I ) = ZERO END DO ELSE * * general case * IF( LSAME( STOREV, 'C' ) ) THEN * Skip any trailing zeros. DO LASTV = N, I+1, -1 IF( V( LASTV, I ).NE.ZERO ) EXIT END DO DO J = 1, I-1 T( J, I ) = -TAU( I ) * V( I , J ) END DO J = MIN( LASTV, PREVLASTV ) * * T(1:i-1,i) := - tau(i) * V(i:j,1:i-1)**T * V(i:j,i) * CALL DGEMV( 'Transpose', J-I, I-1, -TAU( I ), $ V( I+1, 1 ), LDV, V( I+1, I ), 1, ONE, $ T( 1, I ), 1 ) ELSE * Skip any trailing zeros. DO LASTV = N, I+1, -1 IF( V( I, LASTV ).NE.ZERO ) EXIT END DO DO J = 1, I-1 T( J, I ) = -TAU( I ) * V( J , I ) END DO J = MIN( LASTV, PREVLASTV ) * * T(1:i-1,i) := - tau(i) * V(1:i-1,i:j) * V(i,i:j)**T * CALL DGEMV( 'No transpose', I-1, J-I, -TAU( I ), $ V( 1, I+1 ), LDV, V( I, I+1 ), LDV, ONE, $ T( 1, I ), 1 ) END IF * * T(1:i-1,i) := T(1:i-1,1:i-1) * T(1:i-1,i) * CALL DTRMV( 'Upper', 'No transpose', 'Non-unit', I-1, T, $ LDT, T( 1, I ), 1 ) T( I, I ) = TAU( I ) IF( I.GT.1 ) THEN PREVLASTV = MAX( PREVLASTV, LASTV ) ELSE PREVLASTV = LASTV END IF END IF END DO ELSE PREVLASTV = 1 DO I = K, 1, -1 IF( TAU( I ).EQ.ZERO ) THEN * * H(i) = I * DO J = I, K T( J, I ) = ZERO END DO ELSE * * general case * IF( I.LT.K ) THEN IF( LSAME( STOREV, 'C' ) ) THEN * Skip any leading zeros. DO LASTV = 1, I-1 IF( V( LASTV, I ).NE.ZERO ) EXIT END DO DO J = I+1, K T( J, I ) = -TAU( I ) * V( N-K+I , J ) END DO J = MAX( LASTV, PREVLASTV ) * * T(i+1:k,i) = -tau(i) * V(j:n-k+i,i+1:k)**T * V(j:n-k+i,i) * CALL DGEMV( 'Transpose', N-K+I-J, K-I, -TAU( I ), $ V( J, I+1 ), LDV, V( J, I ), 1, ONE, $ T( I+1, I ), 1 ) ELSE * Skip any leading zeros. DO LASTV = 1, I-1 IF( V( I, LASTV ).NE.ZERO ) EXIT END DO DO J = I+1, K T( J, I ) = -TAU( I ) * V( J, N-K+I ) END DO J = MAX( LASTV, PREVLASTV ) * * T(i+1:k,i) = -tau(i) * V(i+1:k,j:n-k+i) * V(i,j:n-k+i)**T * CALL DGEMV( 'No transpose', K-I, N-K+I-J, $ -TAU( I ), V( I+1, J ), LDV, V( I, J ), LDV, $ ONE, T( I+1, I ), 1 ) END IF * * T(i+1:k,i) := T(i+1:k,i+1:k) * T(i+1:k,i) * CALL DTRMV( 'Lower', 'No transpose', 'Non-unit', K-I, $ T( I+1, I+1 ), LDT, T( I+1, I ), 1 ) IF( I.GT.1 ) THEN PREVLASTV = MIN( PREVLASTV, LASTV ) ELSE PREVLASTV = LASTV END IF END IF T( I, I ) = TAU( I ) END IF END DO END IF RETURN * * End of DLARFT * END
{ "pile_set_name": "Github" }
package com.vaadin.tests; import com.vaadin.server.VaadinRequest; import com.vaadin.tests.components.AbstractReindeerTestUI; import com.vaadin.ui.Label; public class VerifyJreVersion extends AbstractReindeerTestUI { @Override protected void setup(VaadinRequest request) { String jreVersion = "Using Java " + System.getProperty("java.version") + " by " + System.getProperty("java.vendor"); Label jreVersionLabel = new Label(jreVersion); jreVersionLabel.setId("jreVersionLabel"); addComponent(jreVersionLabel); } @Override protected String getTestDescription() { return "Test used to detect when the JRE used to run these tests have changed."; } @Override protected Integer getTicketNumber() { return Integer.valueOf(11835); } }
{ "pile_set_name": "Github" }
// Copyright 2012 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build aix hurd linux darwin dragonfly freebsd openbsd netbsd solaris package tar import ( "os" "os/user" "runtime" "strconv" "sync" "syscall" ) func init() { sysStat = statUnix } // userMap and groupMap caches UID and GID lookups for performance reasons. // The downside is that renaming uname or gname by the OS never takes effect. var userMap, groupMap sync.Map // map[int]string func statUnix(fi os.FileInfo, h *Header) error { sys, ok := fi.Sys().(*syscall.Stat_t) if !ok { return nil } h.Uid = int(sys.Uid) h.Gid = int(sys.Gid) // Best effort at populating Uname and Gname. // The os/user functions may fail for any number of reasons // (not implemented on that platform, cgo not enabled, etc). if u, ok := userMap.Load(h.Uid); ok { h.Uname = u.(string) } else if u, err := user.LookupId(strconv.Itoa(h.Uid)); err == nil { h.Uname = u.Username userMap.Store(h.Uid, h.Uname) } if g, ok := groupMap.Load(h.Gid); ok { h.Gname = g.(string) } else if g, err := user.LookupGroupId(strconv.Itoa(h.Gid)); err == nil { h.Gname = g.Name groupMap.Store(h.Gid, h.Gname) } h.AccessTime = statAtime(sys) h.ChangeTime = statCtime(sys) // Best effort at populating Devmajor and Devminor. if h.Typeflag == TypeChar || h.Typeflag == TypeBlock { dev := uint64(sys.Rdev) // May be int32 or uint32 switch runtime.GOOS { case "aix": var major, minor uint32 if runtime.GOARCH == "ppc64" { major = uint32((dev & 0x3fffffff00000000) >> 32) minor = uint32((dev & 0x00000000ffffffff) >> 0) } else { major = uint32((dev >> 16) & 0xffff) minor = uint32(dev & 0xffff) } h.Devmajor, h.Devminor = int64(major), int64(minor) case "linux": // Copied from golang.org/x/sys/unix/dev_linux.go. major := uint32((dev & 0x00000000000fff00) >> 8) major |= uint32((dev & 0xfffff00000000000) >> 32) minor := uint32((dev & 0x00000000000000ff) >> 0) minor |= uint32((dev & 0x00000ffffff00000) >> 12) h.Devmajor, h.Devminor = int64(major), int64(minor) case "darwin": // Copied from golang.org/x/sys/unix/dev_darwin.go. major := uint32((dev >> 24) & 0xff) minor := uint32(dev & 0xffffff) h.Devmajor, h.Devminor = int64(major), int64(minor) case "dragonfly": // Copied from golang.org/x/sys/unix/dev_dragonfly.go. major := uint32((dev >> 8) & 0xff) minor := uint32(dev & 0xffff00ff) h.Devmajor, h.Devminor = int64(major), int64(minor) case "freebsd": // Copied from golang.org/x/sys/unix/dev_freebsd.go. major := uint32((dev >> 8) & 0xff) minor := uint32(dev & 0xffff00ff) h.Devmajor, h.Devminor = int64(major), int64(minor) case "netbsd": // Copied from golang.org/x/sys/unix/dev_netbsd.go. major := uint32((dev & 0x000fff00) >> 8) minor := uint32((dev & 0x000000ff) >> 0) minor |= uint32((dev & 0xfff00000) >> 12) h.Devmajor, h.Devminor = int64(major), int64(minor) case "openbsd": // Copied from golang.org/x/sys/unix/dev_openbsd.go. major := uint32((dev & 0x0000ff00) >> 8) minor := uint32((dev & 0x000000ff) >> 0) minor |= uint32((dev & 0xffff0000) >> 8) h.Devmajor, h.Devminor = int64(major), int64(minor) default: // TODO: Implement solaris (see https://golang.org/issue/8106) } } return nil }
{ "pile_set_name": "Github" }
# Release Notes > Release Early, Release Often > > &mdash; Eric S. Raymond, [The Cathedral and the Bazaar][cite]. ## Versioning Minor version numbers (0.0.x) are used for changes that are API compatible. You should be able to upgrade between minor point releases without any other code changes. Medium version numbers (0.x.0) may include API changes, in line with the [deprecation policy][deprecation-policy]. You should read the release notes carefully before upgrading between medium point releases. Major version numbers (x.0.0) are reserved for substantial project milestones. ## Deprecation policy REST framework releases follow a formal deprecation policy, which is in line with [Django's deprecation policy][django-deprecation-policy]. The timeline for deprecation of a feature present in version 1.0 would work as follows: * Version 1.1 would remain **fully backwards compatible** with 1.0, but would raise `PendingDeprecationWarning` warnings if you use the feature that are due to be deprecated. These warnings are **silent by default**, but can be explicitly enabled when you're ready to start migrating any required changes. For example if you start running your tests using `python -Wd manage.py test`, you'll be warned of any API changes you need to make. * Version 1.2 would escalate these warnings to `DeprecationWarning`, which is loud by default. * Version 1.3 would remove the deprecated bits of API entirely. Note that in line with Django's policy, any parts of the framework not mentioned in the documentation should generally be considered private API, and may be subject to change. ## Upgrading To upgrade Django REST framework to the latest version, use pip: pip install -U djangorestframework You can determine your currently installed version using `pip freeze`: pip freeze | grep djangorestframework --- ## 3.5.x series ### 3.5.3 **Date**: [7th November 2016][3.5.3-milestone] * Don't raise incorrect FilterSet deprecation warnings. ([#4660][gh4660], [#4643][gh4643], [#4644][gh4644]) * Schema generation should not raise 404 when a view permission class does. ([#4645][gh4645], [#4646][gh4646]) * Add `autofocus` support for input controls. ([#4650][gh4650]) ### 3.5.2 **Date**: [1st November 2016][3.5.2-milestone] * Restore exception tracebacks in Python 2.7. ([#4631][gh4631], [#4638][gh4638]) * Properly display dicts in the admin console. ([#4532][gh4532], [#4636][gh4636]) * Fix is_simple_callable with variable args, kwargs. ([#4622][gh4622], [#4602][gh4602]) * Support 'on'/'off' literals with BooleanField. ([#4640][gh4640], [#4624][gh4624]) * Enable cursor pagination of value querysets. ([#4569][gh4569]) * Fix support of get_full_details() for Throttled exceptions. ([#4627][gh4627]) * Fix FilterSet proxy. ([#4620][gh4620]) * Make serializer fields import explicit. ([#4628][gh4628]) * Drop redundant requests adapter. ([#4639][gh4639]) ### 3.5.1 **Date**: [21st October 2016][3.5.1-milestone] * Make `rest_framework/compat.py` imports. ([#4612][gh4612], [#4608][gh4608], [#4601][gh4601]) * Fix bug in schema base path generation. ([#4611][gh4611], [#4605][gh4605]) * Fix broken case of ListSerializer with single item. ([#4609][gh4609], [#4606][gh4606]) * Remove bare `raise` for Python 3.5 compat. ([#4600][gh4600]) ### 3.5.0 **Date**: [20th October 2016][3.5.0-milestone] --- ## 3.4.x series ### 3.4.7 **Date**: [21st September 2016][3.4.7-milestone] * Fallback behavior for request parsing when request.POST already accessed. ([#3951][gh3951], [#4500][gh4500]) * Fix regression of `RegexField`. ([#4489][gh4489], [#4490][gh4490], [#2617][gh2617]) * Missing comma in `admin.html` causing CSRF error. ([#4472][gh4472], [#4473][gh4473]) * Fix response rendering with empty context. ([#4495][gh4495]) * Fix indentation regression in API listing. ([#4493][gh4493]) * Fixed an issue where the incorrect value is set to `ResolverMatch.func_name` of api_view decorated view. ([#4465][gh4465], [#4462][gh4462]) * Fix `APIClient.get()` when path contains unicode arguments ([#4458][gh4458]) ### 3.4.6 **Date**: [23rd August 2016][3.4.6-milestone] * Fix malformed Javascript in browsable API. ([#4435][gh4435]) * Skip HiddenField from Schema fields. ([#4425][gh4425], [#4429][gh4429]) * Improve Create to show the original exception traceback. ([#3508][gh3508]) * Fix `AdminRenderer` display of PK only related fields. ([#4419][gh4419], [#4423][gh4423]) ### 3.4.5 **Date**: [19th August 2016][3.4.5-milestone] * Improve debug error handling. ([#4416][gh4416], [#4409][gh4409]) * Allow custom CSRF_HEADER_NAME setting. ([#4415][gh4415], [#4410][gh4410]) * Include .action attribute on viewsets when generating schemas. ([#4408][gh4408], [#4398][gh4398]) * Do not include request.FILES items in request.POST. ([#4407][gh4407]) * Fix rendering of checkbox multiple. ([#4403][gh4403]) * Fix docstring of Field.get_default. ([#4404][gh4404]) * Replace utf8 character with its ascii counterpart in README. ([#4412][gh4412]) ### 3.4.4 **Date**: [12th August 2016][3.4.4-milestone] * Ensure views are fully initialized when generating schemas. ([#4373][gh4373], [#4382][gh4382], [#4383][gh4383], [#4279][gh4279], [#4278][gh4278]) * Add form field descriptions to schemas. ([#4387][gh4387]) * Fix category generation for schema endpoints. ([#4391][gh4391], [#4394][gh4394], [#4390][gh4390], [#4386][gh4386], [#4376][gh4376], [#4329][gh4329]) * Don't strip empty query params when paginating. ([#4392][gh4392], [#4393][gh4393], [#4260][gh4260]) * Do not re-run query for empty results with LimitOffsetPagination. ([#4201][gh4201], [#4388][gh4388]) * Stricter type validation for CharField. ([#4380][gh4380], [#3394][gh3394]) * RelatedField.choices should preserve non-string values. ([#4111][gh4111], [#4379][gh4379], [#3365][gh3365]) * Test case for rendering checkboxes in vertical form style. ([#4378][gh4378], [#3868][gh3868], [#3868][gh3868]) * Show error traceback HTML in browsable API ([#4042][gh4042], [#4172][gh4172]) * Fix handling of ALLOWED_VERSIONS and no DEFAULT_VERSION. [#4370][gh4370] * Allow `max_digits=None` on DecimalField. ([#4377][gh4377], [#4372][gh4372]) * Limit queryset when rendering relational choices. ([#4375][gh4375], [#4122][gh4122], [#3329][gh3329], [#3330][gh3330], [#3877][gh3877]) * Resolve form display with ChoiceField, MultipleChoiceField and non-string choices. ([#4374][gh4374], [#4119][gh4119], [#4121][gh4121], [#4137][gh4137], [#4120][gh4120]) * Fix call to TemplateHTMLRenderer.resolve_context() fallback method. ([#4371][gh4371]) ### 3.4.3 **Date**: [5th August 2016][3.4.3-milestone] * Include fallaback for users of older TemplateHTMLRenderer internal API. ([#4361][gh4361]) ### 3.4.2 **Date**: [5th August 2016][3.4.2-milestone] * Include kwargs passed to 'as_view' when generating schemas. ([#4359][gh4359], [#4330][gh4330], [#4331][gh4331]) * Access `request.user.is_authenticated` as property not method, under Django 1.10+ ([#4358][gh4358], [#4354][gh4354]) * Filter HEAD out from schemas. ([#4357][gh4357]) * extra_kwargs takes precedence over uniqueness kwargs. ([#4198][gh4198], [#4199][gh4199], [#4349][gh4349]) * Correct descriptions when tabs are used in code indentation. ([#4345][gh4345], [#4347][gh4347])* * Change template context generation in TemplateHTMLRenderer. ([#4236][gh4236]) * Serializer defaults should not be included in partial updates. ([#4346][gh4346], [#3565][gh3565]) * Consistent behavior & descriptive error from FileUploadParser when filename not included. ([#4340][gh4340], [#3610][gh3610], [#4292][gh4292], [#4296][gh4296]) * DecimalField quantizes incoming digitals. ([#4339][gh4339], [#4318][gh4318]) * Handle non-string input for IP fields. ([#4335][gh4335], [#4336][gh4336], [#4338][gh4338]) * Fix leading slash handling when Schema generation includes a root URL. ([#4332][gh4332]) * Test cases for DictField with allow_null options. ([#4348][gh4348]) * Update tests from Django 1.10 beta to Django 1.10. ([#4344][gh4344]) ### 3.4.1 **Date**: [28th July 2016][3.4.1-milestone] * Added `root_renderers` argument to `DefaultRouter`. ([#4323][gh4323], [#4268][gh4268]) * Added `url` and `schema_url` arguments. ([#4321][gh4321], [#4308][gh4308], [#4305][gh4305]) * Unique together checks should apply to read-only fields which have a default. ([#4316][gh4316], [#4294][gh4294]) * Set view.format_kwarg in schema generator. ([#4293][gh4293], [#4315][gh4315]) * Fix schema generator for views with `pagination_class = None`. ([#4314][gh4314], [#4289][gh4289]) * Fix schema generator for views with no `get_serializer_class`. ([#4265][gh4265], [#4285][gh4285]) * Fixes for media type parameters in `Accept` and `Content-Type` headers. ([#4287][gh4287], [#4313][gh4313], [#4281][gh4281]) * Use verbose_name instead of object_name in error messages. ([#4299][gh4299]) * Minor version update to Twitter Bootstrap. ([#4307][gh4307]) * SearchFilter raises error when using with related field. ([#4302][gh4302], [#4303][gh4303], [#4298][gh4298]) * Adding support for RFC 4918 status codes. ([#4291][gh4291]) * Add LICENSE.md to the built wheel. ([#4270][gh4270]) * Serializing "complex" field returns None instead of the value since 3.4 ([#4272][gh4272], [#4273][gh4273], [#4288][gh4288]) ### 3.4.0 **Date**: [14th July 2016][3.4.0-milestone] * Don't strip microseconds in JSON output. ([#4256][gh4256]) * Two slightly different iso 8601 datetime serialization. ([#4255][gh4255]) * Resolve incorrect inclusion of media type parameters. ([#4254][gh4254]) * Response Content-Type potentially malformed. ([#4253][gh4253]) * Fix setup.py error on some platforms. ([#4246][gh4246]) * Move alternate formats in coreapi into separate packages. ([#4244][gh4244]) * Add localize keyword argument to `DecimalField`. ([#4233][gh4233]) * Fix issues with routers for custom list-route and detail-routes. ([#4229][gh4229]) * Namespace versioning with nested namespaces. ([#4219][gh4219]) * Robust uniqueness checks. ([#4217][gh4217]) * Minor refactoring of `must_call_distinct`. ([#4215][gh4215]) * Overridable offset cutoff in CursorPagination. ([#4212][gh4212]) * Pass through strings as-in with date/time fields. ([#4196][gh4196]) * Add test confirming that required=False is valid on a relational field. ([#4195][gh4195]) * In LimitOffsetPagination `limit=0` should revert to default limit. ([#4194][gh4194]) * Exclude read_only=True fields from unique_together validation & add docs. ([#4192][gh4192]) * Handle bytestrings in JSON. ([#4191][gh4191]) * JSONField(binary=True) represents using binary strings, which JSONRenderer does not support. ([#4187][gh4187]) * JSONField(binary=True) represents using binary strings, which JSONRenderer does not support. ([#4185][gh4185]) * More robust form rendering in the browsable API. ([#4181][gh4181]) * Empty cases of `.validated_data` and `.errors` as lists not dicts for ListSerializer. ([#4180][gh4180]) * Schemas & client libraries. ([#4179][gh4179]) * Removed `AUTH_USER_MODEL` compat property. ([#4176][gh4176]) * Clean up existing deprecation warnings. ([#4166][gh4166]) * Django 1.10 support. ([#4158][gh4158]) * Updated jQuery version to 1.12.4. ([#4157][gh4157]) * More robust default behavior on OrderingFilter. ([#4156][gh4156]) * description.py codes and tests removal. ([#4153][gh4153]) * Wrap guardian.VERSION in tuple. ([#4149][gh4149]) * Refine validator for fields with <source=> kwargs. ([#4146][gh4146]) * Fix None values representation in childs of ListField, DictField. ([#4118][gh4118]) * Resolve TimeField representation for midnight value. ([#4107][gh4107]) * Set proper status code in AdminRenderer for the redirection after POST/DELETE requests. ([#4106][gh4106]) * TimeField render returns None instead of 00:00:00. ([#4105][gh4105]) * Fix incorrectly named zh-hans and zh-hant locale path. ([#4103][gh4103]) * Prevent raising exception when limit is 0. ([#4098][gh4098]) * TokenAuthentication: Allow custom keyword in the header. ([#4097][gh4097]) * Handle incorrectly padded HTTP basic auth header. ([#4090][gh4090]) * LimitOffset pagination crashes Browseable API when limit=0. ([#4079][gh4079]) * Fixed DecimalField arbitrary precision support. ([#4075][gh4075]) * Added support for custom CSRF cookie names. ([#4049][gh4049]) * Fix regression introduced by #4035. ([#4041][gh4041]) * No auth view failing permission should raise 403. ([#4040][gh4040]) * Fix string_types / text_types confusion. ([#4025][gh4025]) * Do not list related field choices in OPTIONS requests. ([#4021][gh4021]) * Fix typo. ([#4008][gh4008]) * Reorder initializing the view. ([#4006][gh4006]) * Type error in DjangoObjectPermissionsFilter on Python 3.4. ([#4005][gh4005]) * Fixed use of deprecated Query.aggregates. ([#4003][gh4003]) * Fix blank lines around docstrings. ([#4002][gh4002]) * Fixed admin pagination when limit is 0. ([#3990][gh3990]) * OrderingFilter adjustments. ([#3983][gh3983]) * Non-required serializer related fields. ([#3976][gh3976]) * Using safer calling way of "@api_view" in tutorial. ([#3971][gh3971]) * ListSerializer doesn't handle unique_together constraints. ([#3970][gh3970]) * Add missing migration file. ([#3968][gh3968]) * `OrderingFilter` should call `get_serializer_class()` to determine default fields. ([#3964][gh3964]) * Remove old django checks from tests and compat. ([#3953][gh3953]) * Support callable as the value of `initial` for any `serializer.Field`. ([#3943][gh3943]) * Prevented unnecessary distinct() call in SearchFilter. ([#3938][gh3938]) * Fix None UUID ForeignKey serialization. ([#3936][gh3936]) * Drop EOL Django 1.7. ([#3933][gh3933]) * Add missing space in serializer error message. ([#3926][gh3926]) * Fixed _force_text_recursive typo. ([#3908][gh3908]) * Attempt to address Django 2.0 deprecate warnings related to `field.rel`. ([#3906][gh3906]) * Fix parsing multipart data using a nested serializer with list. ([#3820][gh3820]) * Resolving APIs URL to different namespaces. ([#3816][gh3816]) * Do not HTML-escape `help_text` in Browsable API forms. ([#3812][gh3812]) * OPTIONS fetches and shows all possible foreign keys in choices field. ([#3751][gh3751]) * Django 1.9 deprecation warnings ([#3729][gh3729]) * Test case for #3598 ([#3710][gh3710]) * Adding support for multiple values for search filter. ([#3541][gh3541]) * Use get_serializer_class in ordering filter. ([#3487][gh3487]) * Serializers with many=True should return empty list rather than empty dict. ([#3476][gh3476]) * LimitOffsetPagination limit=0 fix. ([#3444][gh3444]) * Enable Validators to defer string evaluation and handle new string format. ([#3438][gh3438]) * Unique validator is executed and breaks if field is invalid. ([#3381][gh3381]) * Do not ignore overridden View.get_view_name() in breadcrumbs. ([#3273][gh3273]) * Retry form rendering when rendering with serializer fails. ([#3164][gh3164]) * Unique constraint prevents nested serializers from updating. ([#2996][gh2996]) * Uniqueness validators should not be run for excluded (read_only) fields. ([#2848][gh2848]) * UniqueValidator raises exception for nested objects. ([#2403][gh2403]) * `lookup_type` is deprecated in favor of `lookup_expr`. ([#4259][gh4259]) --- ## 3.3.x series ### 3.3.3 **Date**: [14th March 2016][3.3.3-milestone]. * Remove version string from templates. Thanks to @blag for the report and fixes. ([#3878][gh3878], [#3913][gh3913], [#3912][gh3912]) * Fixes vertical html layout for `BooleanField`. Thanks to Mikalai Radchuk for the fix. ([#3910][gh3910]) * Silenced deprecation warnings on Django 1.8. Thanks to Simon Charette for the fix. ([#3903][gh3903]) * Internationalization for authtoken. Thanks to Michael Nacharov for the fix. ([#3887][gh3887], [#3968][gh3968]) * Fix `Token` model as `abstract` when the authtoken application isn't declared. Thanks to Adam Thomas for the report. ([#3860][gh3860], [#3858][gh3858]) * Improve Markdown version compatibility. Thanks to Michael J. Schultz for the fix. ([#3604][gh3604], [#3842][gh3842]) * `QueryParameterVersioning` does not use `DEFAULT_VERSION` setting. Thanks to Brad Montgomery for the fix. ([#3833][gh3833]) * Add an explicit `on_delete` on the models. Thanks to Mads Jensen for the fix. ([#3832][gh3832]) * Fix `DateField.to_representation` to work with Python 2 unicode. Thanks to Mikalai Radchuk for the fix. ([#3819][gh3819]) * Fixed `TimeField` not handling string times. Thanks to Areski Belaid for the fix. ([#3809][gh3809]) * Avoid updates of `Meta.extra_kwargs`. Thanks to Kevin Massey for the report and fix. ([#3805][gh3805], [#3804][gh3804]) * Fix nested validation error being rendered incorrectly. Thanks to Craig de Stigter for the fix. ([#3801][gh3801]) * Document how to avoid CSRF and missing button issues with `django-crispy-forms`. Thanks to Emmanuelle Delescolle, José Padilla and Luis San Pablo for the report, analysis and fix. ([#3787][gh3787], [#3636][gh3636], [#3637][gh3637]) * Improve Rest Framework Settings file setup time. Thanks to Miles Hutson for the report and Mads Jensen for the fix. ([#3786][gh3786], [#3815][gh3815]) * Improve authtoken compatibility with Django 1.9. Thanks to S. Andrew Sheppard for the fix. ([#3785][gh3785]) * Fix `Min/MaxValueValidator` transfer from a model's `DecimalField`. Thanks to Kevin Brown for the fix. ([#3774][gh3774]) * Improve HTML title in the Browsable API. Thanks to Mike Lissner for the report and fix. ([#3769][gh3769]) * Fix `AutoFilterSet` to inherit from `default_filter_set`. Thanks to Tom Linford for the fix. ([#3753][gh3753]) * Fix transifex config to handle the new Chinese language codes. Thanks to @nypisces for the report and fix. ([#3739][gh3739]) * `DateTimeField` does not handle empty values correctly. Thanks to Mick Parker for the report and fix. ([#3731][gh3731], [#3726][gh3728]) * Raise error when setting a removed rest_framework setting. Thanks to Luis San Pablo for the fix. ([#3715][gh3715]) * Add missing csrf_token in AdminRenderer post form. Thanks to Piotr Śniegowski for the fix. ([#3703][gh3703]) * Refactored `_get_reverse_relationships()` to use correct `to_field`. Thanks to Benjamin Phillips for the fix. ([#3696][gh3696]) * Document the use of `get_queryset` for `RelatedField`. Thanks to Ryan Hiebert for the fix. ([#3605][gh3605]) * Fix empty pk detection in HyperlinkRelatedField.get_url. Thanks to @jslang for the fix ([#3962][gh3962]) ### 3.3.2 **Date**: [14th December 2015][3.3.2-milestone]. * `ListField` enforces input is a list. ([#3513][gh3513]) * Fix regression hiding raw data form. ([#3600][gh3600], [#3578][gh3578]) * Fix Python 3.5 compatibility. ([#3534][gh3534], [#3626][gh3626]) * Allow setting a custom Django Paginator in `pagination.PageNumberPagination`. ([#3631][gh3631], [#3684][gh3684]) * Fix relational fields without `to_fields` attribute. ([#3635][gh3635], [#3634][gh3634]) * Fix `template.render` deprecation warnings for Django 1.9. ([#3654][gh3654]) * Sort response headers in browsable API renderer. ([#3655][gh3655]) * Use related_objects api for Django 1.9+. ([#3656][gh3656], [#3252][gh3252]) * Add confirm modal when deleting. ([#3228][gh3228], [#3662][gh3662]) * Reveal previously hidden AttributeErrors and TypeErrors while calling has_[object_]permissions. ([#3668][gh3668]) * Make DRF compatible with multi template engine in Django 1.8. ([#3672][gh3672]) * Update `NestedBoundField` to also handle empty string when rendering its form. ([#3677][gh3677]) * Fix UUID validation to properly catch invalid input types. ([#3687][gh3687], [#3679][gh3679]) * Fix caching issues. ([#3628][gh3628], [#3701][gh3701]) * Fix Admin and API browser for views without a filter_class. ([#3705][gh3705], [#3596][gh3596], [#3597][gh3597]) * Add app_name to rest_framework.urls. ([#3714][gh3714]) * Improve authtoken's views to support url versioning. ([#3718][gh3718], [#3723][gh3723]) ### 3.3.1 **Date**: [4th November 2015][3.3.1-milestone]. * Resolve parsing bug when accessing `request.POST` ([#3592][gh3592]) * Correctly deal with `to_field` referring to primary key. ([#3593][gh3593]) * Allow filter HTML to render when no `filter_class` is defined. ([#3560][gh3560]) * Fix admin rendering issues. ([#3564][gh3564], [#3556][gh3556]) * Fix issue with DecimalValidator. ([#3568][gh3568]) ### 3.3.0 **Date**: [28th October 2015][3.3.0-milestone]. * HTML controls for filters. ([#3315][gh3315]) * Forms API. ([#3475][gh3475]) * AJAX browsable API. ([#3410][gh3410]) * Added JSONField. ([#3454][gh3454]) * Correctly map `to_field` when creating `ModelSerializer` relational fields. ([#3526][gh3526]) * Include keyword arguments when mapping `FilePathField` to a serializer field. ([#3536][gh3536]) * Map appropriate model `error_messages` on `ModelSerializer` uniqueness constraints. ([#3435][gh3435]) * Include `max_length` constraint for `ModelSerializer` fields mapped from TextField. ([#3509][gh3509]) * Added support for Django 1.9. ([#3450][gh3450], [#3525][gh3525]) * Removed support for Django 1.5 & 1.6. ([#3421][gh3421], [#3429][gh3429]) * Removed 'south' migrations. ([#3495][gh3495]) --- ## 3.2.x series ### 3.2.5 **Date**: [27th October 2015][3.2.5-milestone]. * Escape `username` in optional logout tag. ([#3550][gh3550]) ### 3.2.4 **Date**: [21th September 2015][3.2.4-milestone]. * Don't error on missing `ViewSet.search_fields` attribute. ([#3324][gh3324], [#3323][gh3323]) * Fix `allow_empty` not working on serializers with `many=True`. ([#3361][gh3361], [#3364][gh3364]) * Let `DurationField` accepts integers. ([#3359][gh3359]) * Multi-level dictionaries not supported in multipart requests. ([#3314][gh3314]) * Fix `ListField` truncation on HTTP PATCH ([#3415][gh3415], [#2761][gh2761]) ### 3.2.3 **Date**: [24th August 2015][3.2.3-milestone]. * Added `html_cutoff` and `html_cutoff_text` for limiting select dropdowns. ([#3313][gh3313]) * Added regex style to `SearchFilter`. ([#3316][gh3316]) * Resolve issues with setting blank HTML fields. ([#3318][gh3318]) ([#3321][gh3321]) * Correctly display existing 'select multiple' values in browsable API forms. ([#3290][gh3290]) * Resolve duplicated validation message for `IPAddressField`. ([#3249[gh3249]) ([#3250][gh3250]) * Fix to ensure admin renderer continues to work when pagination is disabled. ([#3275][gh3275]) * Resolve error with `LimitOffsetPagination` when count=0, offset=0. ([#3303][gh3303]) ### 3.2.2 **Date**: [13th August 2015][3.2.2-milestone]. * Add `display_value()` method for use when displaying relational field select inputs. ([#3254][gh3254]) * Fix issue with `BooleanField` checkboxes incorrectly displaying as checked. ([#3258][gh3258]) * Ensure empty checkboxes properly set `BooleanField` to `False` in all cases. ([#2776][gh2776]) * Allow `WSGIRequest.FILES` property without raising incorrect deprecated error. ([#3261][gh3261]) * Resolve issue with rendering nested serializers in forms. ([#3260][gh3260]) * Raise an error if user accidentally pass a serializer instance to a response, rather than data. ([#3241][gh3241]) ### 3.2.1 **Date**: [7th August 2015][3.2.1-milestone]. * Fix for relational select widgets rendering without any choices. ([#3237][gh3237]) * Fix for `1`, `0` rendering as `true`, `false` in the admin interface. [#3227][gh3227]) * Fix for ListFields with single value in HTML form input. ([#3238][gh3238]) * Allow `request.FILES` for compat with Django's `HTTPRequest` class. ([#3239][gh3239]) ### 3.2.0 **Date**: [6th August 2015][3.2.0-milestone]. * Add `AdminRenderer`. ([#2926][gh2926]) * Add `FilePathField`. ([#1854][gh1854]) * Add `allow_empty` to `ListField`. ([#2250][gh2250]) * Support django-guardian 1.3. ([#3165][gh3165]) * Support grouped choices. ([#3225][gh3225]) * Support error forms in browsable API. ([#3024][gh3024]) * Allow permission classes to customize the error message. ([#2539][gh2539]) * Support `source=<method>` on hyperlinked fields. ([#2690][gh2690]) * `ListField(allow_null=True)` now allows null as the list value, not null items in the list. ([#2766][gh2766]) * `ManyToMany()` maps to `allow_empty=False`, `ManyToMany(blank=True)` maps to `allow_empty=True`. ([#2804][gh2804]) * Support custom serialization styles for primary key fields. ([#2789][gh2789]) * `OPTIONS` requests support nested representations. ([#2915][gh2915]) * Set `view.action == "metadata"` for viewsets with `OPTIONS` requests. ([#3115][gh3115]) * Support `allow_blank` on `UUIDField`. ([#3130][gh#3130]) * Do not display view docstrings with 401 or 403 response codes. ([#3216][gh3216]) * Resolve Django 1.8 deprecation warnings. ([#2886][gh2886]) * Fix for `DecimalField` validation. ([#3139][gh3139]) * Fix behavior of `allow_blank=False` when used with `trim_whitespace=True`. ([#2712][gh2712]) * Fix issue with some field combinations incorrectly mapping to an invalid `allow_blank` argument. ([#3011][gh3011]) * Fix for output representations with prefetches and modified querysets. ([#2704][gh2704], [#2727][gh2727]) * Fix assertion error when CursorPagination is provided with certains invalid query parameters. (#2920)[gh2920]. * Fix `UnicodeDecodeError` when invalid characters included in header with `TokenAuthentication`. ([#2928][gh2928]) * Fix transaction rollbacks with `@non_atomic_requests` decorator. ([#3016][gh3016]) * Fix duplicate results issue with Oracle databases using `SearchFilter`. ([#2935][gh2935]) * Fix checkbox alignment and rendering in browsable API forms. ([#2783][gh2783]) * Fix for unsaved file objects which should use `"url": null` in the representation. ([#2759][gh2759]) * Fix field value rendering in browsable API. ([#2416][gh2416]) * Fix `HStoreField` to include `allow_blank=True` in `DictField` mapping. ([#2659][gh2659]) * Numerous other cleanups, improvements to error messaging, private API & minor fixes. --- ## 3.1.x series ### 3.1.3 **Date**: [4th June 2015][3.1.3-milestone]. * Add `DurationField`. ([#2481][gh2481], [#2989][gh2989]) * Add `format` argument to `UUIDField`. ([#2788][gh2788], [#3000][gh3000]) * `MultipleChoiceField` empties incorrectly on a partial update using multipart/form-data ([#2993][gh2993], [#2894][gh2894]) * Fix a bug in options related to read-only `RelatedField`. ([#2981][gh2981], [#2811][gh2811]) * Fix nested serializers with `unique_together` relations. ([#2975][gh2975]) * Allow unexpected values for `ChoiceField`/`MultipleChoiceField` representations. ([#2839][gh2839], [#2940][gh2940]) * Rollback the transaction on error if `ATOMIC_REQUESTS` is set. ([#2887][gh2887], [#2034][gh2034]) * Set the action on a view when override_method regardless of its None-ness. ([#2933][gh2933]) * `DecimalField` accepts `2E+2` as 200 and validates decimal place correctly. ([#2948][gh2948], [#2947][gh2947]) * Support basic authentication with custom `UserModel` that change `username`. ([#2952][gh2952]) * `IPAddressField` improvements. ([#2747][gh2747], [#2618][gh2618], [#3008][gh3008]) * Improve `DecimalField` for easier subclassing. ([#2695][gh2695]) ### 3.1.2 **Date**: [13rd May 2015][3.1.2-milestone]. * `DateField.to_representation` can handle str and empty values. ([#2656][gh2656], [#2687][gh2687], [#2869][gh2869]) * Use default reason phrases from HTTP standard. ([#2764][gh2764], [#2763][gh2763]) * Raise error when `ModelSerializer` used with abstract model. ([#2757][gh2757], [#2630][gh2630]) * Handle reversal of non-API view_name in `HyperLinkedRelatedField` ([#2724][gh2724], [#2711][gh2711]) * Dont require pk strictly for related fields. ([#2745][gh2745], [#2754][gh2754]) * Metadata detects null boolean field type. ([#2762][gh2762]) * Proper handling of depth in nested serializers. ([#2798][gh2798]) * Display viewset without paginator. ([#2807][gh2807]) * Don't check for deprecated `.model` attribute in permissions ([#2818][gh2818]) * Restrict integer field to integers and strings. ([#2835][gh2835], [#2836][gh2836]) * Improve `IntegerField` to use compiled decimal regex. ([#2853][gh2853]) * Prevent empty `queryset` to raise AssertionError. ([#2862][gh2862]) * `DjangoModelPermissions` rely on `get_queryset`. ([#2863][gh2863]) * Check `AcceptHeaderVersioning` with content negotiation in place. ([#2868][gh2868]) * Allow `DjangoObjectPermissions` to use views that define `get_queryset`. ([#2905][gh2905]) ### 3.1.1 **Date**: [23rd March 2015][3.1.1-milestone]. * **Security fix**: Escape tab switching cookie name in browsable API. * Display input forms in browsable API if `serializer_class` is used, even when `get_serializer` method does not exist on the view. ([#2743][gh2743]) * Use a password input for the AuthTokenSerializer. ([#2741][gh2741]) * Fix missing anchor closing tag after next button. ([#2691][gh2691]) * Fix `lookup_url_kwarg` handling in viewsets. ([#2685][gh2685], [#2591][gh2591]) * Fix problem with importing `rest_framework.views` in `apps.py` ([#2678][gh2678]) * LimitOffsetPagination raises `TypeError` if PAGE_SIZE not set ([#2667][gh2667], [#2700][gh2700]) * German translation for `min_value` field error message references `max_value`. ([#2645][gh2645]) * Remove `MergeDict`. ([#2640][gh2640]) * Support serializing unsaved models with related fields. ([#2637][gh2637], [#2641][gh2641]) * Allow blank/null on radio.html choices. ([#2631][gh2631]) ### 3.1.0 **Date**: [5th March 2015][3.1.0-milestone]. For full details see the [3.1 release announcement](3.1-announcement.md). --- ## 3.0.x series ### 3.0.5 **Date**: [10th February 2015][3.0.5-milestone]. * Fix a bug where `_closable_objects` breaks pickling. ([#1850][gh1850], [#2492][gh2492]) * Allow non-standard `User` models with `Throttling`. ([#2524][gh2524]) * Support custom `User.db_table` in TokenAuthentication migration. ([#2479][gh2479]) * Fix misleading `AttributeError` tracebacks on `Request` objects. ([#2530][gh2530], [#2108][gh2108]) * `ManyRelatedField.get_value` clearing field on partial update. ([#2475][gh2475]) * Removed '.model' shortcut from code. ([#2486][gh2486]) * Fix `detail_route` and `list_route` mutable argument. ([#2518][gh2518]) * Prefetching the user object when getting the token in `TokenAuthentication`. ([#2519][gh2519]) ### 3.0.4 **Date**: [28th January 2015][3.0.4-milestone]. * Django 1.8a1 support. ([#2425][gh2425], [#2446][gh2446], [#2441][gh2441]) * Add `DictField` and support Django 1.8 `HStoreField`. ([#2451][gh2451], [#2106][gh2106]) * Add `UUIDField` and support Django 1.8 `UUIDField`. ([#2448][gh2448], [#2433][gh2433], [#2432][gh2432]) * `BaseRenderer.render` now raises `NotImplementedError`. ([#2434][gh2434]) * Fix timedelta JSON serialization on Python 2.6. ([#2430][gh2430]) * `ResultDict` and `ResultList` now appear as standard dict/list. ([#2421][gh2421]) * Fix visible `HiddenField` in the HTML form of the web browsable API page. ([#2410][gh2410]) * Use `OrderedDict` for `RelatedField.choices`. ([#2408][gh2408]) * Fix ident format when using `HTTP_X_FORWARDED_FOR`. ([#2401][gh2401]) * Fix invalid key with memcached while using throttling. ([#2400][gh2400]) * Fix `FileUploadParser` with version 3.x. ([#2399][gh2399]) * Fix the serializer inheritance. ([#2388][gh2388]) * Fix caching issues with `ReturnDict`. ([#2360][gh2360]) ### 3.0.3 **Date**: [8th January 2015][3.0.3-milestone]. * Fix `MinValueValidator` on `models.DateField`. ([#2369][gh2369]) * Fix serializer missing context when pagination is used. ([#2355][gh2355]) * Namespaced router URLs are now supported by the `DefaultRouter`. ([#2351][gh2351]) * `required=False` allows omission of value for output. ([#2342][gh2342]) * Use textarea input for `models.TextField`. ([#2340][gh2340]) * Use custom `ListSerializer` for pagination if required. ([#2331][gh2331], [#2327][gh2327]) * Better behavior with null and '' for blank HTML fields. ([#2330][gh2330]) * Ensure fields in `exclude` are model fields. ([#2319][gh2319]) * Fix `IntegerField` and `max_length` argument incompatibility. ([#2317][gh2317]) * Fix the YAML encoder for 3.0 serializers. ([#2315][gh2315], [#2283][gh2283]) * Fix the behavior of empty HTML fields. ([#2311][gh2311], [#1101][gh1101]) * Fix Metaclass attribute depth ignoring fields attribute. ([#2287][gh2287]) * Fix `format_suffix_patterns` to work with Django's `i18n_patterns`. ([#2278][gh2278]) * Ability to customize router URLs for custom actions, using `url_path`. ([#2010][gh2010]) * Don't install Django REST Framework as egg. ([#2386][gh2386]) ### 3.0.2 **Date**: [17th December 2014][3.0.2-milestone]. * Ensure `request.user` is made available to response middleware. ([#2155][gh2155]) * `Client.logout()` also cancels any existing `force_authenticate`. ([#2218][gh2218], [#2259][gh2259]) * Extra assertions and better checks to preventing incorrect serializer API use. ([#2228][gh2228], [#2234][gh2234], [#2262][gh2262], [#2263][gh2263], [#2266][gh2266], [#2267][gh2267], [#2289][gh2289], [#2291][gh2291]) * Fixed `min_length` message for `CharField`. ([#2255][gh2255]) * Fix `UnicodeDecodeError`, which can occur on serializer `repr`. ([#2270][gh2270], [#2279][gh2279]) * Fix empty HTML values when a default is provided. ([#2280][gh2280], [#2294][gh2294]) * Fix `SlugRelatedField` raising `UnicodeEncodeError` when used as a multiple choice input. ([#2290][gh2290]) ### 3.0.1 **Date**: [11th December 2014][3.0.1-milestone]. * More helpful error message when the default Serializer `create()` fails. ([#2013][gh2013]) * Raise error when attempting to save serializer if data is not valid. ([#2098][gh2098]) * Fix `FileUploadParser` breaks with empty file names and multiple upload handlers. ([#2109][gh2109]) * Improve `BindingDict` to support standard dict-functions. ([#2135][gh2135], [#2163][gh2163]) * Add `validate()` to `ListSerializer`. ([#2168][gh2168], [#2225][gh2225], [#2232][gh2232]) * Fix JSONP renderer failing to escape some characters. ([#2169][gh2169], [#2195][gh2195]) * Add missing default style for `FileField`. ([#2172][gh2172]) * Actions are required when calling `ViewSet.as_view()`. ([#2175][gh2175]) * Add `allow_blank` to `ChoiceField`. ([#2184][gh2184], [#2239][gh2239]) * Cosmetic fixes in the HTML renderer. ([#2187][gh2187]) * Raise error if `fields` on serializer is not a list of strings. ([#2193][gh2193], [#2213][gh2213]) * Improve checks for nested creates and updates. ([#2194][gh2194], [#2196][gh2196]) * `validated_attrs` argument renamed to `validated_data` in `Serializer` `create()`/`update()`. ([#2197][gh2197]) * Remove deprecated code to reflect the dropped Django versions. ([#2200][gh2200]) * Better serializer errors for nested writes. ([#2202][gh2202], [#2215][gh2215]) * Fix pagination and custom permissions incompatibility. ([#2205][gh2205]) * Raise error if `fields` on serializer is not a list of strings. ([#2213][gh2213]) * Add missing translation markers for relational fields. ([#2231][gh2231]) * Improve field lookup behavior for dicts/mappings. ([#2244][gh2244], [#2243][gh2243]) * Optimized hyperlinked PK. ([#2242][gh2242]) ### 3.0.0 **Date**: 1st December 2014 For full details see the [3.0 release announcement](3.0-announcement.md). --- For older release notes, [please see the version 2.x documentation][old-release-notes]. [cite]: http://www.catb.org/~esr/writings/cathedral-bazaar/cathedral-bazaar/ar01s04.html [deprecation-policy]: #deprecation-policy [django-deprecation-policy]: https://docs.djangoproject.com/en/stable/internals/release-process/#internal-release-deprecation-policy [defusedxml-announce]: http://blog.python.org/2013/02/announcing-defusedxml-fixes-for-xml.html [743]: https://github.com/tomchristie/django-rest-framework/pull/743 [staticfiles14]: https://docs.djangoproject.com/en/1.4/howto/static-files/#with-a-template-tag [staticfiles13]: https://docs.djangoproject.com/en/1.3/howto/static-files/#with-a-template-tag [2.1.0-notes]: https://groups.google.com/d/topic/django-rest-framework/Vv2M0CMY9bg/discussion [ticket-582]: https://github.com/tomchristie/django-rest-framework/issues/582 [rfc-6266]: http://tools.ietf.org/html/rfc6266#section-4.3 [old-release-notes]: https://github.com/tomchristie/django-rest-framework/blob/version-2.4.x/docs/topics/release-notes.md [3.0.1-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.0.1+Release%22 [3.0.2-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.0.2+Release%22 [3.0.3-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.0.3+Release%22 [3.0.4-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.0.4+Release%22 [3.0.5-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.0.5+Release%22 [3.1.0-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.1.0+Release%22 [3.1.1-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.1.1+Release%22 [3.1.2-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.1.2+Release%22 [3.1.3-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.1.3+Release%22 [3.2.0-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.2.0+Release%22 [3.2.1-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.2.1+Release%22 [3.2.2-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.2.2+Release%22 [3.2.3-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.2.3+Release%22 [3.2.4-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.2.4+Release%22 [3.2.5-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.2.5+Release%22 [3.3.0-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.3.0+Release%22 [3.3.1-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.3.1+Release%22 [3.3.2-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.3.2+Release%22 [3.3.3-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.3.3+Release%22 [3.4.0-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.4.0+Release%22 [3.4.1-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.4.1+Release%22 [3.4.2-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.4.2+Release%22 [3.4.3-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.4.3+Release%22 [3.4.4-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.4.4+Release%22 [3.4.5-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.4.5+Release%22 [3.4.6-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.4.6+Release%22 [3.4.7-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.4.7+Release%22 [3.5.0-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.5.0+Release%22 [3.5.1-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.5.1+Release%22 [3.5.2-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.5.2+Release%22 [3.5.3-milestone]: https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%223.5.3+Release%22 <!-- 3.0.1 --> [gh2013]: https://github.com/tomchristie/django-rest-framework/issues/2013 [gh2098]: https://github.com/tomchristie/django-rest-framework/issues/2098 [gh2109]: https://github.com/tomchristie/django-rest-framework/issues/2109 [gh2135]: https://github.com/tomchristie/django-rest-framework/issues/2135 [gh2163]: https://github.com/tomchristie/django-rest-framework/issues/2163 [gh2168]: https://github.com/tomchristie/django-rest-framework/issues/2168 [gh2169]: https://github.com/tomchristie/django-rest-framework/issues/2169 [gh2172]: https://github.com/tomchristie/django-rest-framework/issues/2172 [gh2175]: https://github.com/tomchristie/django-rest-framework/issues/2175 [gh2184]: https://github.com/tomchristie/django-rest-framework/issues/2184 [gh2187]: https://github.com/tomchristie/django-rest-framework/issues/2187 [gh2193]: https://github.com/tomchristie/django-rest-framework/issues/2193 [gh2194]: https://github.com/tomchristie/django-rest-framework/issues/2194 [gh2195]: https://github.com/tomchristie/django-rest-framework/issues/2195 [gh2196]: https://github.com/tomchristie/django-rest-framework/issues/2196 [gh2197]: https://github.com/tomchristie/django-rest-framework/issues/2197 [gh2200]: https://github.com/tomchristie/django-rest-framework/issues/2200 [gh2202]: https://github.com/tomchristie/django-rest-framework/issues/2202 [gh2205]: https://github.com/tomchristie/django-rest-framework/issues/2205 [gh2213]: https://github.com/tomchristie/django-rest-framework/issues/2213 [gh2213]: https://github.com/tomchristie/django-rest-framework/issues/2213 [gh2215]: https://github.com/tomchristie/django-rest-framework/issues/2215 [gh2225]: https://github.com/tomchristie/django-rest-framework/issues/2225 [gh2231]: https://github.com/tomchristie/django-rest-framework/issues/2231 [gh2232]: https://github.com/tomchristie/django-rest-framework/issues/2232 [gh2239]: https://github.com/tomchristie/django-rest-framework/issues/2239 [gh2242]: https://github.com/tomchristie/django-rest-framework/issues/2242 [gh2243]: https://github.com/tomchristie/django-rest-framework/issues/2243 [gh2244]: https://github.com/tomchristie/django-rest-framework/issues/2244 <!-- 3.0.2 --> [gh2155]: https://github.com/tomchristie/django-rest-framework/issues/2155 [gh2218]: https://github.com/tomchristie/django-rest-framework/issues/2218 [gh2228]: https://github.com/tomchristie/django-rest-framework/issues/2228 [gh2234]: https://github.com/tomchristie/django-rest-framework/issues/2234 [gh2255]: https://github.com/tomchristie/django-rest-framework/issues/2255 [gh2259]: https://github.com/tomchristie/django-rest-framework/issues/2259 [gh2262]: https://github.com/tomchristie/django-rest-framework/issues/2262 [gh2263]: https://github.com/tomchristie/django-rest-framework/issues/2263 [gh2266]: https://github.com/tomchristie/django-rest-framework/issues/2266 [gh2267]: https://github.com/tomchristie/django-rest-framework/issues/2267 [gh2270]: https://github.com/tomchristie/django-rest-framework/issues/2270 [gh2279]: https://github.com/tomchristie/django-rest-framework/issues/2279 [gh2280]: https://github.com/tomchristie/django-rest-framework/issues/2280 [gh2289]: https://github.com/tomchristie/django-rest-framework/issues/2289 [gh2290]: https://github.com/tomchristie/django-rest-framework/issues/2290 [gh2291]: https://github.com/tomchristie/django-rest-framework/issues/2291 [gh2294]: https://github.com/tomchristie/django-rest-framework/issues/2294 <!-- 3.0.3 --> [gh1101]: https://github.com/tomchristie/django-rest-framework/issues/1101 [gh2010]: https://github.com/tomchristie/django-rest-framework/issues/2010 [gh2278]: https://github.com/tomchristie/django-rest-framework/issues/2278 [gh2283]: https://github.com/tomchristie/django-rest-framework/issues/2283 [gh2287]: https://github.com/tomchristie/django-rest-framework/issues/2287 [gh2311]: https://github.com/tomchristie/django-rest-framework/issues/2311 [gh2315]: https://github.com/tomchristie/django-rest-framework/issues/2315 [gh2317]: https://github.com/tomchristie/django-rest-framework/issues/2317 [gh2319]: https://github.com/tomchristie/django-rest-framework/issues/2319 [gh2327]: https://github.com/tomchristie/django-rest-framework/issues/2327 [gh2330]: https://github.com/tomchristie/django-rest-framework/issues/2330 [gh2331]: https://github.com/tomchristie/django-rest-framework/issues/2331 [gh2340]: https://github.com/tomchristie/django-rest-framework/issues/2340 [gh2342]: https://github.com/tomchristie/django-rest-framework/issues/2342 [gh2351]: https://github.com/tomchristie/django-rest-framework/issues/2351 [gh2355]: https://github.com/tomchristie/django-rest-framework/issues/2355 [gh2369]: https://github.com/tomchristie/django-rest-framework/issues/2369 [gh2386]: https://github.com/tomchristie/django-rest-framework/issues/2386 <!-- 3.0.4 --> [gh2425]: https://github.com/tomchristie/django-rest-framework/issues/2425 [gh2446]: https://github.com/tomchristie/django-rest-framework/issues/2446 [gh2441]: https://github.com/tomchristie/django-rest-framework/issues/2441 [gh2451]: https://github.com/tomchristie/django-rest-framework/issues/2451 [gh2106]: https://github.com/tomchristie/django-rest-framework/issues/2106 [gh2448]: https://github.com/tomchristie/django-rest-framework/issues/2448 [gh2433]: https://github.com/tomchristie/django-rest-framework/issues/2433 [gh2432]: https://github.com/tomchristie/django-rest-framework/issues/2432 [gh2434]: https://github.com/tomchristie/django-rest-framework/issues/2434 [gh2430]: https://github.com/tomchristie/django-rest-framework/issues/2430 [gh2421]: https://github.com/tomchristie/django-rest-framework/issues/2421 [gh2410]: https://github.com/tomchristie/django-rest-framework/issues/2410 [gh2408]: https://github.com/tomchristie/django-rest-framework/issues/2408 [gh2401]: https://github.com/tomchristie/django-rest-framework/issues/2401 [gh2400]: https://github.com/tomchristie/django-rest-framework/issues/2400 [gh2399]: https://github.com/tomchristie/django-rest-framework/issues/2399 [gh2388]: https://github.com/tomchristie/django-rest-framework/issues/2388 [gh2360]: https://github.com/tomchristie/django-rest-framework/issues/2360 <!-- 3.0.5 --> [gh1850]: https://github.com/tomchristie/django-rest-framework/issues/1850 [gh2108]: https://github.com/tomchristie/django-rest-framework/issues/2108 [gh2475]: https://github.com/tomchristie/django-rest-framework/issues/2475 [gh2479]: https://github.com/tomchristie/django-rest-framework/issues/2479 [gh2486]: https://github.com/tomchristie/django-rest-framework/issues/2486 [gh2492]: https://github.com/tomchristie/django-rest-framework/issues/2492 [gh2518]: https://github.com/tomchristie/django-rest-framework/issues/2518 [gh2519]: https://github.com/tomchristie/django-rest-framework/issues/2519 [gh2524]: https://github.com/tomchristie/django-rest-framework/issues/2524 [gh2530]: https://github.com/tomchristie/django-rest-framework/issues/2530 <!-- 3.1.1 --> [gh2691]: https://github.com/tomchristie/django-rest-framework/issues/2691 [gh2685]: https://github.com/tomchristie/django-rest-framework/issues/2685 [gh2591]: https://github.com/tomchristie/django-rest-framework/issues/2591 [gh2678]: https://github.com/tomchristie/django-rest-framework/issues/2678 [gh2667]: https://github.com/tomchristie/django-rest-framework/issues/2667 [gh2700]: https://github.com/tomchristie/django-rest-framework/issues/2700 [gh2645]: https://github.com/tomchristie/django-rest-framework/issues/2645 [gh2640]: https://github.com/tomchristie/django-rest-framework/issues/2640 [gh2637]: https://github.com/tomchristie/django-rest-framework/issues/2637 [gh2641]: https://github.com/tomchristie/django-rest-framework/issues/2641 [gh2631]: https://github.com/tomchristie/django-rest-framework/issues/2631 [gh2741]: https://github.com/tomchristie/django-rest-framework/issues/2641 [gh2743]: https://github.com/tomchristie/django-rest-framework/issues/2643 <!-- 3.1.2 --> [gh2656]: https://github.com/tomchristie/django-rest-framework/issues/2656 [gh2687]: https://github.com/tomchristie/django-rest-framework/issues/2687 [gh2869]: https://github.com/tomchristie/django-rest-framework/issues/2869 [gh2764]: https://github.com/tomchristie/django-rest-framework/issues/2764 [gh2763]: https://github.com/tomchristie/django-rest-framework/issues/2763 [gh2757]: https://github.com/tomchristie/django-rest-framework/issues/2757 [gh2630]: https://github.com/tomchristie/django-rest-framework/issues/2630 [gh2724]: https://github.com/tomchristie/django-rest-framework/issues/2724 [gh2711]: https://github.com/tomchristie/django-rest-framework/issues/2711 [gh2745]: https://github.com/tomchristie/django-rest-framework/issues/2745 [gh2754]: https://github.com/tomchristie/django-rest-framework/issues/2754 [gh2762]: https://github.com/tomchristie/django-rest-framework/issues/2762 [gh2798]: https://github.com/tomchristie/django-rest-framework/issues/2798 [gh2807]: https://github.com/tomchristie/django-rest-framework/issues/2807 [gh2818]: https://github.com/tomchristie/django-rest-framework/issues/2818 [gh2835]: https://github.com/tomchristie/django-rest-framework/issues/2835 [gh2836]: https://github.com/tomchristie/django-rest-framework/issues/2836 [gh2853]: https://github.com/tomchristie/django-rest-framework/issues/2853 [gh2862]: https://github.com/tomchristie/django-rest-framework/issues/2862 [gh2863]: https://github.com/tomchristie/django-rest-framework/issues/2863 [gh2868]: https://github.com/tomchristie/django-rest-framework/issues/2868 [gh2905]: https://github.com/tomchristie/django-rest-framework/issues/2905 <!-- 3.1.3 --> [gh2481]: https://github.com/tomchristie/django-rest-framework/issues/2481 [gh2989]: https://github.com/tomchristie/django-rest-framework/issues/2989 [gh2788]: https://github.com/tomchristie/django-rest-framework/issues/2788 [gh3000]: https://github.com/tomchristie/django-rest-framework/issues/3000 [gh2993]: https://github.com/tomchristie/django-rest-framework/issues/2993 [gh2894]: https://github.com/tomchristie/django-rest-framework/issues/2894 [gh2981]: https://github.com/tomchristie/django-rest-framework/issues/2981 [gh2811]: https://github.com/tomchristie/django-rest-framework/issues/2811 [gh2975]: https://github.com/tomchristie/django-rest-framework/issues/2975 [gh2839]: https://github.com/tomchristie/django-rest-framework/issues/2839 [gh2940]: https://github.com/tomchristie/django-rest-framework/issues/2940 [gh2887]: https://github.com/tomchristie/django-rest-framework/issues/2887 [gh2034]: https://github.com/tomchristie/django-rest-framework/issues/2034 [gh2933]: https://github.com/tomchristie/django-rest-framework/issues/2933 [gh2948]: https://github.com/tomchristie/django-rest-framework/issues/2948 [gh2947]: https://github.com/tomchristie/django-rest-framework/issues/2947 [gh2952]: https://github.com/tomchristie/django-rest-framework/issues/2952 [gh2747]: https://github.com/tomchristie/django-rest-framework/issues/2747 [gh2618]: https://github.com/tomchristie/django-rest-framework/issues/2618 [gh3008]: https://github.com/tomchristie/django-rest-framework/issues/3008 [gh2695]: https://github.com/tomchristie/django-rest-framework/issues/2695 <!-- 3.2.0 --> [gh1854]: https://github.com/tomchristie/django-rest-framework/issues/1854 [gh2250]: https://github.com/tomchristie/django-rest-framework/issues/2250 [gh2416]: https://github.com/tomchristie/django-rest-framework/issues/2416 [gh2539]: https://github.com/tomchristie/django-rest-framework/issues/2539 [gh2659]: https://github.com/tomchristie/django-rest-framework/issues/2659 [gh2690]: https://github.com/tomchristie/django-rest-framework/issues/2690 [gh2704]: https://github.com/tomchristie/django-rest-framework/issues/2704 [gh2712]: https://github.com/tomchristie/django-rest-framework/issues/2712 [gh2727]: https://github.com/tomchristie/django-rest-framework/issues/2727 [gh2759]: https://github.com/tomchristie/django-rest-framework/issues/2759 [gh2766]: https://github.com/tomchristie/django-rest-framework/issues/2766 [gh2783]: https://github.com/tomchristie/django-rest-framework/issues/2783 [gh2789]: https://github.com/tomchristie/django-rest-framework/issues/2789 [gh2804]: https://github.com/tomchristie/django-rest-framework/issues/2804 [gh2886]: https://github.com/tomchristie/django-rest-framework/issues/2886 [gh2915]: https://github.com/tomchristie/django-rest-framework/issues/2915 [gh2920]: https://github.com/tomchristie/django-rest-framework/issues/2920 [gh2926]: https://github.com/tomchristie/django-rest-framework/issues/2926 [gh2928]: https://github.com/tomchristie/django-rest-framework/issues/2928 [gh2935]: https://github.com/tomchristie/django-rest-framework/issues/2935 [gh3011]: https://github.com/tomchristie/django-rest-framework/issues/3011 [gh3016]: https://github.com/tomchristie/django-rest-framework/issues/3016 [gh3024]: https://github.com/tomchristie/django-rest-framework/issues/3024 [gh3115]: https://github.com/tomchristie/django-rest-framework/issues/3115 [gh3139]: https://github.com/tomchristie/django-rest-framework/issues/3139 [gh3165]: https://github.com/tomchristie/django-rest-framework/issues/3165 [gh3216]: https://github.com/tomchristie/django-rest-framework/issues/3216 [gh3225]: https://github.com/tomchristie/django-rest-framework/issues/3225 <!-- 3.2.1 --> [gh3237]: https://github.com/tomchristie/django-rest-framework/issues/3237 [gh3227]: https://github.com/tomchristie/django-rest-framework/issues/3227 [gh3238]: https://github.com/tomchristie/django-rest-framework/issues/3238 [gh3239]: https://github.com/tomchristie/django-rest-framework/issues/3239 <!-- 3.2.2 --> [gh3254]: https://github.com/tomchristie/django-rest-framework/issues/3254 [gh3258]: https://github.com/tomchristie/django-rest-framework/issues/3258 [gh2776]: https://github.com/tomchristie/django-rest-framework/issues/2776 [gh3261]: https://github.com/tomchristie/django-rest-framework/issues/3261 [gh3260]: https://github.com/tomchristie/django-rest-framework/issues/3260 [gh3241]: https://github.com/tomchristie/django-rest-framework/issues/3241 <!-- 3.2.3 --> [gh3249]: https://github.com/tomchristie/django-rest-framework/issues/3249 [gh3250]: https://github.com/tomchristie/django-rest-framework/issues/3250 [gh3275]: https://github.com/tomchristie/django-rest-framework/issues/3275 [gh3288]: https://github.com/tomchristie/django-rest-framework/issues/3288 [gh3290]: https://github.com/tomchristie/django-rest-framework/issues/3290 [gh3303]: https://github.com/tomchristie/django-rest-framework/issues/3303 [gh3313]: https://github.com/tomchristie/django-rest-framework/issues/3313 [gh3316]: https://github.com/tomchristie/django-rest-framework/issues/3316 [gh3318]: https://github.com/tomchristie/django-rest-framework/issues/3318 [gh3321]: https://github.com/tomchristie/django-rest-framework/issues/3321 <!-- 3.2.4 --> [gh2761]: https://github.com/tomchristie/django-rest-framework/issues/2761 [gh3314]: https://github.com/tomchristie/django-rest-framework/issues/3314 [gh3323]: https://github.com/tomchristie/django-rest-framework/issues/3323 [gh3324]: https://github.com/tomchristie/django-rest-framework/issues/3324 [gh3359]: https://github.com/tomchristie/django-rest-framework/issues/3359 [gh3361]: https://github.com/tomchristie/django-rest-framework/issues/3361 [gh3364]: https://github.com/tomchristie/django-rest-framework/issues/3364 [gh3415]: https://github.com/tomchristie/django-rest-framework/issues/3415 <!-- 3.2.5 --> [gh3550]:https://github.com/tomchristie/django-rest-framework/issues/3550 <!-- 3.3.0 --> [gh3315]: https://github.com/tomchristie/django-rest-framework/issues/3315 [gh3410]: https://github.com/tomchristie/django-rest-framework/issues/3410 [gh3435]: https://github.com/tomchristie/django-rest-framework/issues/3435 [gh3450]: https://github.com/tomchristie/django-rest-framework/issues/3450 [gh3454]: https://github.com/tomchristie/django-rest-framework/issues/3454 [gh3475]: https://github.com/tomchristie/django-rest-framework/issues/3475 [gh3495]: https://github.com/tomchristie/django-rest-framework/issues/3495 [gh3509]: https://github.com/tomchristie/django-rest-framework/issues/3509 [gh3421]: https://github.com/tomchristie/django-rest-framework/issues/3421 [gh3525]: https://github.com/tomchristie/django-rest-framework/issues/3525 [gh3526]: https://github.com/tomchristie/django-rest-framework/issues/3526 [gh3429]: https://github.com/tomchristie/django-rest-framework/issues/3429 [gh3536]: https://github.com/tomchristie/django-rest-framework/issues/3536 <!-- 3.3.1 --> [gh3556]: https://github.com/tomchristie/django-rest-framework/issues/3556 [gh3560]: https://github.com/tomchristie/django-rest-framework/issues/3560 [gh3564]: https://github.com/tomchristie/django-rest-framework/issues/3564 [gh3568]: https://github.com/tomchristie/django-rest-framework/issues/3568 [gh3592]: https://github.com/tomchristie/django-rest-framework/issues/3592 [gh3593]: https://github.com/tomchristie/django-rest-framework/issues/3593 <!-- 3.3.2 --> [gh3228]: https://github.com/tomchristie/django-rest-framework/issues/3228 [gh3252]: https://github.com/tomchristie/django-rest-framework/issues/3252 [gh3513]: https://github.com/tomchristie/django-rest-framework/issues/3513 [gh3534]: https://github.com/tomchristie/django-rest-framework/issues/3534 [gh3578]: https://github.com/tomchristie/django-rest-framework/issues/3578 [gh3596]: https://github.com/tomchristie/django-rest-framework/issues/3596 [gh3597]: https://github.com/tomchristie/django-rest-framework/issues/3597 [gh3600]: https://github.com/tomchristie/django-rest-framework/issues/3600 [gh3626]: https://github.com/tomchristie/django-rest-framework/issues/3626 [gh3628]: https://github.com/tomchristie/django-rest-framework/issues/3628 [gh3631]: https://github.com/tomchristie/django-rest-framework/issues/3631 [gh3634]: https://github.com/tomchristie/django-rest-framework/issues/3634 [gh3635]: https://github.com/tomchristie/django-rest-framework/issues/3635 [gh3654]: https://github.com/tomchristie/django-rest-framework/issues/3654 [gh3655]: https://github.com/tomchristie/django-rest-framework/issues/3655 [gh3656]: https://github.com/tomchristie/django-rest-framework/issues/3656 [gh3662]: https://github.com/tomchristie/django-rest-framework/issues/3662 [gh3668]: https://github.com/tomchristie/django-rest-framework/issues/3668 [gh3672]: https://github.com/tomchristie/django-rest-framework/issues/3672 [gh3677]: https://github.com/tomchristie/django-rest-framework/issues/3677 [gh3679]: https://github.com/tomchristie/django-rest-framework/issues/3679 [gh3684]: https://github.com/tomchristie/django-rest-framework/issues/3684 [gh3687]: https://github.com/tomchristie/django-rest-framework/issues/3687 [gh3701]: https://github.com/tomchristie/django-rest-framework/issues/3701 [gh3705]: https://github.com/tomchristie/django-rest-framework/issues/3705 [gh3714]: https://github.com/tomchristie/django-rest-framework/issues/3714 [gh3718]: https://github.com/tomchristie/django-rest-framework/issues/3718 [gh3723]: https://github.com/tomchristie/django-rest-framework/issues/3723 <!-- 3.3.3 --> [gh3968]: https://github.com/tomchristie/django-rest-framework/issues/3968 [gh3962]: https://github.com/tomchristie/django-rest-framework/issues/3962 [gh3913]: https://github.com/tomchristie/django-rest-framework/issues/3913 [gh3912]: https://github.com/tomchristie/django-rest-framework/issues/3912 [gh3910]: https://github.com/tomchristie/django-rest-framework/issues/3910 [gh3903]: https://github.com/tomchristie/django-rest-framework/issues/3903 [gh3887]: https://github.com/tomchristie/django-rest-framework/issues/3887 [gh3878]: https://github.com/tomchristie/django-rest-framework/issues/3878 [gh3860]: https://github.com/tomchristie/django-rest-framework/issues/3860 [gh3858]: https://github.com/tomchristie/django-rest-framework/issues/3858 [gh3842]: https://github.com/tomchristie/django-rest-framework/issues/3842 [gh3833]: https://github.com/tomchristie/django-rest-framework/issues/3833 [gh3832]: https://github.com/tomchristie/django-rest-framework/issues/3832 [gh3819]: https://github.com/tomchristie/django-rest-framework/issues/3819 [gh3815]: https://github.com/tomchristie/django-rest-framework/issues/3815 [gh3809]: https://github.com/tomchristie/django-rest-framework/issues/3809 [gh3805]: https://github.com/tomchristie/django-rest-framework/issues/3805 [gh3804]: https://github.com/tomchristie/django-rest-framework/issues/3804 [gh3801]: https://github.com/tomchristie/django-rest-framework/issues/3801 [gh3787]: https://github.com/tomchristie/django-rest-framework/issues/3787 [gh3786]: https://github.com/tomchristie/django-rest-framework/issues/3786 [gh3785]: https://github.com/tomchristie/django-rest-framework/issues/3785 [gh3774]: https://github.com/tomchristie/django-rest-framework/issues/3774 [gh3769]: https://github.com/tomchristie/django-rest-framework/issues/3769 [gh3753]: https://github.com/tomchristie/django-rest-framework/issues/3753 [gh3739]: https://github.com/tomchristie/django-rest-framework/issues/3739 [gh3731]: https://github.com/tomchristie/django-rest-framework/issues/3731 [gh3728]: https://github.com/tomchristie/django-rest-framework/issues/3726 [gh3715]: https://github.com/tomchristie/django-rest-framework/issues/3715 [gh3703]: https://github.com/tomchristie/django-rest-framework/issues/3703 [gh3696]: https://github.com/tomchristie/django-rest-framework/issues/3696 [gh3637]: https://github.com/tomchristie/django-rest-framework/issues/3637 [gh3636]: https://github.com/tomchristie/django-rest-framework/issues/3636 [gh3605]: https://github.com/tomchristie/django-rest-framework/issues/3605 [gh3604]: https://github.com/tomchristie/django-rest-framework/issues/3604 <!-- 3.4.0 --> [gh2403]: https://github.com/tomchristie/django-rest-framework/issues/2403 [gh2848]: https://github.com/tomchristie/django-rest-framework/issues/2848 [gh2996]: https://github.com/tomchristie/django-rest-framework/issues/2996 [gh3164]: https://github.com/tomchristie/django-rest-framework/issues/3164 [gh3273]: https://github.com/tomchristie/django-rest-framework/issues/3273 [gh3381]: https://github.com/tomchristie/django-rest-framework/issues/3381 [gh3438]: https://github.com/tomchristie/django-rest-framework/issues/3438 [gh3444]: https://github.com/tomchristie/django-rest-framework/issues/3444 [gh3476]: https://github.com/tomchristie/django-rest-framework/issues/3476 [gh3487]: https://github.com/tomchristie/django-rest-framework/issues/3487 [gh3541]: https://github.com/tomchristie/django-rest-framework/issues/3541 [gh3710]: https://github.com/tomchristie/django-rest-framework/issues/3710 [gh3729]: https://github.com/tomchristie/django-rest-framework/issues/3729 [gh3751]: https://github.com/tomchristie/django-rest-framework/issues/3751 [gh3812]: https://github.com/tomchristie/django-rest-framework/issues/3812 [gh3816]: https://github.com/tomchristie/django-rest-framework/issues/3816 [gh3820]: https://github.com/tomchristie/django-rest-framework/issues/3820 [gh3906]: https://github.com/tomchristie/django-rest-framework/issues/3906 [gh3908]: https://github.com/tomchristie/django-rest-framework/issues/3908 [gh3926]: https://github.com/tomchristie/django-rest-framework/issues/3926 [gh3933]: https://github.com/tomchristie/django-rest-framework/issues/3933 [gh3936]: https://github.com/tomchristie/django-rest-framework/issues/3936 [gh3938]: https://github.com/tomchristie/django-rest-framework/issues/3938 [gh3943]: https://github.com/tomchristie/django-rest-framework/issues/3943 [gh3953]: https://github.com/tomchristie/django-rest-framework/issues/3953 [gh3964]: https://github.com/tomchristie/django-rest-framework/issues/3964 [gh3968]: https://github.com/tomchristie/django-rest-framework/issues/3968 [gh3970]: https://github.com/tomchristie/django-rest-framework/issues/3970 [gh3971]: https://github.com/tomchristie/django-rest-framework/issues/3971 [gh3976]: https://github.com/tomchristie/django-rest-framework/issues/3976 [gh3983]: https://github.com/tomchristie/django-rest-framework/issues/3983 [gh3990]: https://github.com/tomchristie/django-rest-framework/issues/3990 [gh4002]: https://github.com/tomchristie/django-rest-framework/issues/4002 [gh4003]: https://github.com/tomchristie/django-rest-framework/issues/4003 [gh4005]: https://github.com/tomchristie/django-rest-framework/issues/4005 [gh4006]: https://github.com/tomchristie/django-rest-framework/issues/4006 [gh4008]: https://github.com/tomchristie/django-rest-framework/issues/4008 [gh4021]: https://github.com/tomchristie/django-rest-framework/issues/4021 [gh4025]: https://github.com/tomchristie/django-rest-framework/issues/4025 [gh4040]: https://github.com/tomchristie/django-rest-framework/issues/4040 [gh4041]: https://github.com/tomchristie/django-rest-framework/issues/4041 [gh4049]: https://github.com/tomchristie/django-rest-framework/issues/4049 [gh4075]: https://github.com/tomchristie/django-rest-framework/issues/4075 [gh4079]: https://github.com/tomchristie/django-rest-framework/issues/4079 [gh4090]: https://github.com/tomchristie/django-rest-framework/issues/4090 [gh4097]: https://github.com/tomchristie/django-rest-framework/issues/4097 [gh4098]: https://github.com/tomchristie/django-rest-framework/issues/4098 [gh4103]: https://github.com/tomchristie/django-rest-framework/issues/4103 [gh4105]: https://github.com/tomchristie/django-rest-framework/issues/4105 [gh4106]: https://github.com/tomchristie/django-rest-framework/issues/4106 [gh4107]: https://github.com/tomchristie/django-rest-framework/issues/4107 [gh4118]: https://github.com/tomchristie/django-rest-framework/issues/4118 [gh4146]: https://github.com/tomchristie/django-rest-framework/issues/4146 [gh4149]: https://github.com/tomchristie/django-rest-framework/issues/4149 [gh4153]: https://github.com/tomchristie/django-rest-framework/issues/4153 [gh4156]: https://github.com/tomchristie/django-rest-framework/issues/4156 [gh4157]: https://github.com/tomchristie/django-rest-framework/issues/4157 [gh4158]: https://github.com/tomchristie/django-rest-framework/issues/4158 [gh4166]: https://github.com/tomchristie/django-rest-framework/issues/4166 [gh4176]: https://github.com/tomchristie/django-rest-framework/issues/4176 [gh4179]: https://github.com/tomchristie/django-rest-framework/issues/4179 [gh4180]: https://github.com/tomchristie/django-rest-framework/issues/4180 [gh4181]: https://github.com/tomchristie/django-rest-framework/issues/4181 [gh4185]: https://github.com/tomchristie/django-rest-framework/issues/4185 [gh4187]: https://github.com/tomchristie/django-rest-framework/issues/4187 [gh4191]: https://github.com/tomchristie/django-rest-framework/issues/4191 [gh4192]: https://github.com/tomchristie/django-rest-framework/issues/4192 [gh4194]: https://github.com/tomchristie/django-rest-framework/issues/4194 [gh4195]: https://github.com/tomchristie/django-rest-framework/issues/4195 [gh4196]: https://github.com/tomchristie/django-rest-framework/issues/4196 [gh4212]: https://github.com/tomchristie/django-rest-framework/issues/4212 [gh4215]: https://github.com/tomchristie/django-rest-framework/issues/4215 [gh4217]: https://github.com/tomchristie/django-rest-framework/issues/4217 [gh4219]: https://github.com/tomchristie/django-rest-framework/issues/4219 [gh4229]: https://github.com/tomchristie/django-rest-framework/issues/4229 [gh4233]: https://github.com/tomchristie/django-rest-framework/issues/4233 [gh4244]: https://github.com/tomchristie/django-rest-framework/issues/4244 [gh4246]: https://github.com/tomchristie/django-rest-framework/issues/4246 [gh4253]: https://github.com/tomchristie/django-rest-framework/issues/4253 [gh4254]: https://github.com/tomchristie/django-rest-framework/issues/4254 [gh4255]: https://github.com/tomchristie/django-rest-framework/issues/4255 [gh4256]: https://github.com/tomchristie/django-rest-framework/issues/4256 [gh4259]: https://github.com/tomchristie/django-rest-framework/issues/4259 <!-- 3.4.1 --> [gh4323]: https://github.com/tomchristie/django-rest-framework/issues/4323 [gh4268]: https://github.com/tomchristie/django-rest-framework/issues/4268 [gh4321]: https://github.com/tomchristie/django-rest-framework/issues/4321 [gh4308]: https://github.com/tomchristie/django-rest-framework/issues/4308 [gh4305]: https://github.com/tomchristie/django-rest-framework/issues/4305 [gh4316]: https://github.com/tomchristie/django-rest-framework/issues/4316 [gh4294]: https://github.com/tomchristie/django-rest-framework/issues/4294 [gh4293]: https://github.com/tomchristie/django-rest-framework/issues/4293 [gh4315]: https://github.com/tomchristie/django-rest-framework/issues/4315 [gh4314]: https://github.com/tomchristie/django-rest-framework/issues/4314 [gh4289]: https://github.com/tomchristie/django-rest-framework/issues/4289 [gh4265]: https://github.com/tomchristie/django-rest-framework/issues/4265 [gh4285]: https://github.com/tomchristie/django-rest-framework/issues/4285 [gh4287]: https://github.com/tomchristie/django-rest-framework/issues/4287 [gh4313]: https://github.com/tomchristie/django-rest-framework/issues/4313 [gh4281]: https://github.com/tomchristie/django-rest-framework/issues/4281 [gh4299]: https://github.com/tomchristie/django-rest-framework/issues/4299 [gh4307]: https://github.com/tomchristie/django-rest-framework/issues/4307 [gh4302]: https://github.com/tomchristie/django-rest-framework/issues/4302 [gh4303]: https://github.com/tomchristie/django-rest-framework/issues/4303 [gh4298]: https://github.com/tomchristie/django-rest-framework/issues/4298 [gh4291]: https://github.com/tomchristie/django-rest-framework/issues/4291 [gh4270]: https://github.com/tomchristie/django-rest-framework/issues/4270 [gh4272]: https://github.com/tomchristie/django-rest-framework/issues/4272 [gh4273]: https://github.com/tomchristie/django-rest-framework/issues/4273 [gh4288]: https://github.com/tomchristie/django-rest-framework/issues/4288 <!-- 3.4.2 --> [gh3565]: https://github.com/tomchristie/django-rest-framework/issues/3565 [gh3610]: https://github.com/tomchristie/django-rest-framework/issues/3610 [gh4198]: https://github.com/tomchristie/django-rest-framework/issues/4198 [gh4199]: https://github.com/tomchristie/django-rest-framework/issues/4199 [gh4236]: https://github.com/tomchristie/django-rest-framework/issues/4236 [gh4292]: https://github.com/tomchristie/django-rest-framework/issues/4292 [gh4296]: https://github.com/tomchristie/django-rest-framework/issues/4296 [gh4318]: https://github.com/tomchristie/django-rest-framework/issues/4318 [gh4330]: https://github.com/tomchristie/django-rest-framework/issues/4330 [gh4331]: https://github.com/tomchristie/django-rest-framework/issues/4331 [gh4332]: https://github.com/tomchristie/django-rest-framework/issues/4332 [gh4335]: https://github.com/tomchristie/django-rest-framework/issues/4335 [gh4336]: https://github.com/tomchristie/django-rest-framework/issues/4336 [gh4338]: https://github.com/tomchristie/django-rest-framework/issues/4338 [gh4339]: https://github.com/tomchristie/django-rest-framework/issues/4339 [gh4340]: https://github.com/tomchristie/django-rest-framework/issues/4340 [gh4344]: https://github.com/tomchristie/django-rest-framework/issues/4344 [gh4345]: https://github.com/tomchristie/django-rest-framework/issues/4345 [gh4346]: https://github.com/tomchristie/django-rest-framework/issues/4346 [gh4347]: https://github.com/tomchristie/django-rest-framework/issues/4347 [gh4348]: https://github.com/tomchristie/django-rest-framework/issues/4348 [gh4349]: https://github.com/tomchristie/django-rest-framework/issues/4349 [gh4354]: https://github.com/tomchristie/django-rest-framework/issues/4354 [gh4357]: https://github.com/tomchristie/django-rest-framework/issues/4357 [gh4358]: https://github.com/tomchristie/django-rest-framework/issues/4358 [gh4359]: https://github.com/tomchristie/django-rest-framework/issues/4359 <!-- 3.4.3 --> [gh4361]: https://github.com/tomchristie/django-rest-framework/issues/4361 <!-- 3.4.4 --> [gh2829]: https://github.com/tomchristie/django-rest-framework/issues/2829 [gh3329]: https://github.com/tomchristie/django-rest-framework/issues/3329 [gh3330]: https://github.com/tomchristie/django-rest-framework/issues/3330 [gh3365]: https://github.com/tomchristie/django-rest-framework/issues/3365 [gh3394]: https://github.com/tomchristie/django-rest-framework/issues/3394 [gh3868]: https://github.com/tomchristie/django-rest-framework/issues/3868 [gh3868]: https://github.com/tomchristie/django-rest-framework/issues/3868 [gh3877]: https://github.com/tomchristie/django-rest-framework/issues/3877 [gh4042]: https://github.com/tomchristie/django-rest-framework/issues/4042 [gh4111]: https://github.com/tomchristie/django-rest-framework/issues/4111 [gh4119]: https://github.com/tomchristie/django-rest-framework/issues/4119 [gh4120]: https://github.com/tomchristie/django-rest-framework/issues/4120 [gh4121]: https://github.com/tomchristie/django-rest-framework/issues/4121 [gh4122]: https://github.com/tomchristie/django-rest-framework/issues/4122 [gh4137]: https://github.com/tomchristie/django-rest-framework/issues/4137 [gh4172]: https://github.com/tomchristie/django-rest-framework/issues/4172 [gh4201]: https://github.com/tomchristie/django-rest-framework/issues/4201 [gh4260]: https://github.com/tomchristie/django-rest-framework/issues/4260 [gh4278]: https://github.com/tomchristie/django-rest-framework/issues/4278 [gh4279]: https://github.com/tomchristie/django-rest-framework/issues/4279 [gh4329]: https://github.com/tomchristie/django-rest-framework/issues/4329 [gh4370]: https://github.com/tomchristie/django-rest-framework/issues/4370 [gh4371]: https://github.com/tomchristie/django-rest-framework/issues/4371 [gh4372]: https://github.com/tomchristie/django-rest-framework/issues/4372 [gh4373]: https://github.com/tomchristie/django-rest-framework/issues/4373 [gh4374]: https://github.com/tomchristie/django-rest-framework/issues/4374 [gh4375]: https://github.com/tomchristie/django-rest-framework/issues/4375 [gh4376]: https://github.com/tomchristie/django-rest-framework/issues/4376 [gh4377]: https://github.com/tomchristie/django-rest-framework/issues/4377 [gh4378]: https://github.com/tomchristie/django-rest-framework/issues/4378 [gh4379]: https://github.com/tomchristie/django-rest-framework/issues/4379 [gh4380]: https://github.com/tomchristie/django-rest-framework/issues/4380 [gh4382]: https://github.com/tomchristie/django-rest-framework/issues/4382 [gh4383]: https://github.com/tomchristie/django-rest-framework/issues/4383 [gh4386]: https://github.com/tomchristie/django-rest-framework/issues/4386 [gh4387]: https://github.com/tomchristie/django-rest-framework/issues/4387 [gh4388]: https://github.com/tomchristie/django-rest-framework/issues/4388 [gh4390]: https://github.com/tomchristie/django-rest-framework/issues/4390 [gh4391]: https://github.com/tomchristie/django-rest-framework/issues/4391 [gh4392]: https://github.com/tomchristie/django-rest-framework/issues/4392 [gh4393]: https://github.com/tomchristie/django-rest-framework/issues/4393 [gh4394]: https://github.com/tomchristie/django-rest-framework/issues/4394 <!-- 3.4.5 --> [gh4416]: https://github.com/tomchristie/django-rest-framework/issues/4416 [gh4409]: https://github.com/tomchristie/django-rest-framework/issues/4409 [gh4415]: https://github.com/tomchristie/django-rest-framework/issues/4415 [gh4410]: https://github.com/tomchristie/django-rest-framework/issues/4410 [gh4408]: https://github.com/tomchristie/django-rest-framework/issues/4408 [gh4398]: https://github.com/tomchristie/django-rest-framework/issues/4398 [gh4407]: https://github.com/tomchristie/django-rest-framework/issues/4407 [gh4403]: https://github.com/tomchristie/django-rest-framework/issues/4403 [gh4404]: https://github.com/tomchristie/django-rest-framework/issues/4404 [gh4412]: https://github.com/tomchristie/django-rest-framework/issues/4412 <!-- 3.4.6 --> [gh4435]: https://github.com/tomchristie/django-rest-framework/issues/4435 [gh4425]: https://github.com/tomchristie/django-rest-framework/issues/4425 [gh4429]: https://github.com/tomchristie/django-rest-framework/issues/4429 [gh3508]: https://github.com/tomchristie/django-rest-framework/issues/3508 [gh4419]: https://github.com/tomchristie/django-rest-framework/issues/4419 [gh4423]: https://github.com/tomchristie/django-rest-framework/issues/4423 <!-- 3.4.7 --> [gh3951]: https://github.com/tomchristie/django-rest-framework/issues/3951 [gh4500]: https://github.com/tomchristie/django-rest-framework/issues/4500 [gh4489]: https://github.com/tomchristie/django-rest-framework/issues/4489 [gh4490]: https://github.com/tomchristie/django-rest-framework/issues/4490 [gh2617]: https://github.com/tomchristie/django-rest-framework/issues/2617 [gh4472]: https://github.com/tomchristie/django-rest-framework/issues/4472 [gh4473]: https://github.com/tomchristie/django-rest-framework/issues/4473 [gh4495]: https://github.com/tomchristie/django-rest-framework/issues/4495 [gh4493]: https://github.com/tomchristie/django-rest-framework/issues/4493 [gh4465]: https://github.com/tomchristie/django-rest-framework/issues/4465 [gh4462]: https://github.com/tomchristie/django-rest-framework/issues/4462 [gh4458]: https://github.com/tomchristie/django-rest-framework/issues/4458 <!-- 3.5.1 --> [gh4612]: https://github.com/tomchristie/django-rest-framework/issues/4612 [gh4608]: https://github.com/tomchristie/django-rest-framework/issues/4608 [gh4601]: https://github.com/tomchristie/django-rest-framework/issues/4601 [gh4611]: https://github.com/tomchristie/django-rest-framework/issues/4611 [gh4605]: https://github.com/tomchristie/django-rest-framework/issues/4605 [gh4609]: https://github.com/tomchristie/django-rest-framework/issues/4609 [gh4606]: https://github.com/tomchristie/django-rest-framework/issues/4606 [gh4600]: https://github.com/tomchristie/django-rest-framework/issues/4600 <!-- 3.5.2 --> [gh4631]: https://github.com/tomchristie/django-rest-framework/issues/4631 [gh4638]: https://github.com/tomchristie/django-rest-framework/issues/4638 [gh4532]: https://github.com/tomchristie/django-rest-framework/issues/4532 [gh4636]: https://github.com/tomchristie/django-rest-framework/issues/4636 [gh4622]: https://github.com/tomchristie/django-rest-framework/issues/4622 [gh4602]: https://github.com/tomchristie/django-rest-framework/issues/4602 [gh4640]: https://github.com/tomchristie/django-rest-framework/issues/4640 [gh4624]: https://github.com/tomchristie/django-rest-framework/issues/4624 [gh4569]: https://github.com/tomchristie/django-rest-framework/issues/4569 [gh4627]: https://github.com/tomchristie/django-rest-framework/issues/4627 [gh4620]: https://github.com/tomchristie/django-rest-framework/issues/4620 [gh4628]: https://github.com/tomchristie/django-rest-framework/issues/4628 [gh4639]: https://github.com/tomchristie/django-rest-framework/issues/4639 <!-- 3.5.3 --> [gh4660]: https://github.com/tomchristie/django-rest-framework/issues/4660 [gh4643]: https://github.com/tomchristie/django-rest-framework/issues/4643 [gh4644]: https://github.com/tomchristie/django-rest-framework/issues/4644 [gh4645]: https://github.com/tomchristie/django-rest-framework/issues/4645 [gh4646]: https://github.com/tomchristie/django-rest-framework/issues/4646 [gh4650]: https://github.com/tomchristie/django-rest-framework/issues/4650
{ "pile_set_name": "Github" }
<?php /* * This file is part of PharIo\Version. * * (c) Arne Blankerts <[email protected]>, Sebastian Heuer <[email protected]>, Sebastian Bergmann <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PharIo\Version; interface Exception { }
{ "pile_set_name": "Github" }
--- layout: "functions" page_title: "dirname - Functions - Configuration Language" sidebar_current: "docs-funcs-file-dirname" description: |- The dirname function removes the last portion from a filesystem path. --- # `dirname` Function -> **Note:** This page is about Terraform 0.12 and later. For Terraform 0.11 and earlier, see [0.11 Configuration Language: Interpolation Syntax](../../configuration-0-11/interpolation.html). `dirname` takes a string containing a filesystem path and removes the last portion from it. This function works only with the path string and does not access the filesystem itself. It is therefore unable to take into account filesystem features such as symlinks. If the path is empty then the result is `"."`, representing the current working directory. The behavior of this function depends on the host platform. On Windows systems, it uses backslash `\` as the path segment separator. On Unix systems, the slash `/` is used. The result of this function is normalized, so on a Windows system any slashes in the given path will be replaced by backslashes before returning. Referring directly to filesystem paths in resource arguments may cause spurious diffs if the same configuration is applied from multiple systems or on different host operating systems. We recommend using filesystem paths only for transient values, such as the argument to [`file`](./file.html) (where only the contents are then stored) or in `connection` and `provisioner` blocks. ## Examples ``` > dirname("foo/bar/baz.txt") foo/bar ``` ## Related Functions * [`basename`](./basename.html) returns _only_ the last portion of a filesystem path, discarding the portion that would be returned by `dirname`.
{ "pile_set_name": "Github" }
using System.Runtime.Serialization; using TumblThree.Domain.Models.Blogs; namespace TumblThree.Domain.Models { [DataContract] public class DetailsBlog : Blog { private bool? _checkDirectoryForFiles; private bool? _createAudioMeta; private bool? _createPhotoMeta; private bool? _createVideoMeta; private bool? _downloadAudio; private bool? _downloadConversation; private bool? _downloadLink; private bool? _downloadPhoto; private bool? _downloadQuote; private bool? _downloadText; private bool? _downloadAnswer; private bool? _downloadUrlList; private bool? _downloadVideo; private bool? _forceRescan; private bool? _forceSize; private bool? _skipGif; private bool? _downloadRebloggedPosts; private bool? _online; [DataMember] public new bool? DownloadText { get => _downloadText; set { SetProperty(ref _downloadText, value); Dirty = true; } } [DataMember] public new bool? DownloadQuote { get => _downloadQuote; set { SetProperty(ref _downloadQuote, value); Dirty = true; } } [DataMember] public new bool? DownloadPhoto { get => _downloadPhoto; set { SetProperty(ref _downloadPhoto, value); Dirty = true; } } [DataMember] public new bool? DownloadLink { get => _downloadLink; set { SetProperty(ref _downloadLink, value); Dirty = true; } } [DataMember] public new bool? DownloadAnswer { get => _downloadAnswer; set { SetProperty(ref _downloadAnswer, value); Dirty = true; } } [DataMember] public new bool? DownloadConversation { get => _downloadConversation; set { SetProperty(ref _downloadConversation, value); Dirty = true; } } [DataMember] public new bool? DownloadVideo { get => _downloadVideo; set { SetProperty(ref _downloadVideo, value); Dirty = true; } } [DataMember] public new bool? DownloadAudio { get => _downloadAudio; set { SetProperty(ref _downloadAudio, value); Dirty = true; } } [DataMember] public new bool? CreatePhotoMeta { get => _createPhotoMeta; set { SetProperty(ref _createPhotoMeta, value); Dirty = true; } } [DataMember] public new bool? CreateVideoMeta { get => _createVideoMeta; set { SetProperty(ref _createVideoMeta, value); Dirty = true; } } [DataMember] public new bool? CreateAudioMeta { get => _createAudioMeta; set { SetProperty(ref _createAudioMeta, value); Dirty = true; } } [DataMember] public new bool? DownloadRebloggedPosts { get => _downloadRebloggedPosts; set { SetProperty(ref _downloadRebloggedPosts, value); Dirty = true; } } [DataMember] public new bool? Online { get => _online; set => SetProperty(ref _online, value); } [DataMember] public new bool? CheckDirectoryForFiles { get => _checkDirectoryForFiles; set { SetProperty(ref _checkDirectoryForFiles, value); Dirty = true; } } [DataMember] public new bool? DownloadUrlList { get => _downloadUrlList; set { SetProperty(ref _downloadUrlList, value); Dirty = true; } } [DataMember] public new bool? Dirty { get; set; } [DataMember] public new bool? SkipGif { get => _skipGif; set { SetProperty(ref _skipGif, value); Dirty = true; } } [DataMember] public new bool? ForceSize { get => _forceSize; set { SetProperty(ref _forceSize, value); Dirty = true; } } [DataMember] public new bool? ForceRescan { get => _forceRescan; set { SetProperty(ref _forceRescan, value); Dirty = true; } } } }
{ "pile_set_name": "Github" }
// 7.13.3381 #pragma once const uint32_t standard_renderer_distortion_PS[] = { 0x07230203,0x00010000,0x00080007,0x00000218,0x00000000,0x00020011,0x00000001,0x0006000b, 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001, 0x0010000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x000001f2,0x000001f5,0x000001f9, 0x000001fc,0x000001ff,0x00000202,0x00000205,0x00000208,0x0000020b,0x0000020e,0x00000216, 0x00030010,0x00000004,0x00000007,0x00030003,0x00000002,0x000001a4,0x00040005,0x00000004, 0x6e69616d,0x00000000,0x00050005,0x00000009,0x495f5350,0x7475706e,0x00000000,0x00060006, 0x00000009,0x00000000,0x69736f50,0x6e6f6974,0x00000000,0x00050006,0x00000009,0x00000001, 0x6f6c6f43,0x00000072,0x00040006,0x00000009,0x00000002,0x00005655,0x00040006,0x00000009, 0x00000003,0x00736f50,0x00050006,0x00000009,0x00000004,0x55736f50,0x00000000,0x00050006, 0x00000009,0x00000005,0x52736f50,0x00000000,0x00070006,0x00000009,0x00000006,0x68706c41, 0x69445f61,0x555f7473,0x00000056,0x00080006,0x00000009,0x00000007,0x6e656c42,0x6c415f64, 0x5f616870,0x74736944,0x0056555f,0x00090006,0x00000009,0x00000008,0x6e656c42,0x42465f64, 0x7478654e,0x65646e49,0x56555f78,0x00000000,0x00050006,0x00000009,0x00000009,0x6568744f, 0x00007372,0x00070005,0x0000000b,0x61766441,0x6465636e,0x61726150,0x6574656d,0x00000072, 0x00050006,0x0000000b,0x00000000,0x68706c41,0x00565561,0x00070006,0x0000000b,0x00000001, 0x69445655,0x726f7473,0x6e6f6974,0x00005655,0x00050006,0x0000000b,0x00000002,0x6e656c42, 0x00565564,0x00070006,0x0000000b,0x00000003,0x6e656c42,0x706c4164,0x56556168,0x00000000, 0x00080006,0x0000000b,0x00000004,0x6e656c42,0x44565564,0x6f747369,0x6f697472,0x0056556e, 0x00080006,0x0000000b,0x00000005,0x70696c46,0x6b6f6f62,0x7478654e,0x65646e49,0x00565578, 0x00070006,0x0000000b,0x00000006,0x70696c46,0x6b6f6f62,0x65746152,0x00000000,0x00070006, 0x0000000b,0x00000007,0x68706c41,0x72685461,0x6f687365,0x0000646c,0x00170005,0x0000000e, 0x6f736944,0x4165766c,0x6e617664,0x50646563,0x6d617261,0x72657465,0x72747328,0x2d746375, 0x495f5350,0x7475706e,0x3466762d,0x3466762d,0x3266762d,0x3466762d,0x3466762d,0x3466762d, 0x3466762d,0x3466762d,0x3466762d,0x3266762d,0x00003b31,0x00040005,0x0000000d,0x6e697370, 0x00747570,0x000a0005,0x00000018,0x69445655,0x726f7473,0x6e6f6974,0x7366664f,0x76287465, 0x763b3266,0x733b3266,0x003b3132,0x00030005,0x00000015,0x00007675,0x00050005,0x00000016, 0x6e497675,0x73726576,0x00006465,0x00080005,0x00000017,0x52495053,0x72435f56,0x5f73736f, 0x626d6f43,0x64656e69,0x00007374,0x000c0005,0x00000023,0x6c707041,0x696c4679,0x6f6f6270, 0x6676286b,0x66763b34,0x66763b34,0x66763b34,0x31663b32,0x3132733b,0x0000003b,0x00030005, 0x0000001d,0x00747364,0x00070005,0x0000001e,0x70696c66,0x6b6f6f62,0x61726150,0x6574656d, 0x00000072,0x00040005,0x0000001f,0x6c6f6376,0x0000726f,0x00040005,0x00000020,0x7478656e, 0x00005655,0x00060005,0x00000021,0x70696c66,0x6b6f6f62,0x65746152,0x00000000,0x00080005, 0x00000022,0x52495053,0x72435f56,0x5f73736f,0x626d6f43,0x64656e69,0x00007374,0x000b0005, 0x00000029,0x6c707041,0x78655479,0x65727574,0x6e656c42,0x676e6964,0x34667628,0x3466763b, 0x3b31663b,0x00000000,0x00050005,0x00000026,0x43747364,0x726f6c6f,0x00000000,0x00050005, 0x00000027,0x6e656c62,0x6c6f4364,0x0000726f,0x00050005,0x00000028,0x6e656c62,0x70795464, 0x00000065,0x00120005,0x0000002d,0x69616d5f,0x7473286e,0x74637572,0x5f53502d,0x75706e49, 0x66762d74,0x66762d34,0x66762d34,0x66762d32,0x66762d34,0x66762d34,0x66762d34,0x66762d34, 0x66762d34,0x66762d34,0x003b3132,0x00040005,0x0000002c,0x75706e49,0x00000074,0x00030005, 0x00000030,0x00746572,0x00050005,0x00000060,0x664f5655,0x74657366,0x00000000,0x00060005, 0x00000082,0x7478654e,0x65786950,0x6c6f436c,0x0000726f,0x00030005,0x00000098,0x0035385f, 0x00030005,0x000000b5,0x0037395f,0x00040005,0x000000cc,0x3031315f,0x00000000,0x00040005, 0x000000e4,0x3332315f,0x00000000,0x00040005,0x000000f6,0x61726170,0x0000006d,0x00060005, 0x000000f8,0x61766461,0x6465636e,0x61726150,0x0000006d,0x00040005,0x000000f9,0x61726170, 0x0000006d,0x00040005,0x000000fc,0x61726170,0x00315f6d,0x00040005,0x000000ff,0x61726170, 0x00325f6d,0x00070005,0x00000100,0x435f5350,0x74736e6f,0x75426e61,0x72656666,0x00000000, 0x00050006,0x00000100,0x00000000,0x63735f67,0x00656c61,0x00070006,0x00000100,0x00000001, 0x4956556d,0x7265766e,0x42646573,0x006b6361,0x00080006,0x00000100,0x00000002,0x70696c66, 0x6b6f6f62,0x61726150,0x6574656d,0x00000072,0x00090006,0x00000100,0x00000003,0x69447675, 0x726f7473,0x6e6f6974,0x61726150,0x6574656d,0x00000072,0x00090006,0x00000100,0x00000004, 0x6e656c62,0x78655464,0x65727574,0x61726150,0x6574656d,0x00000072,0x00040005,0x00000102, 0x3930325f,0x00000000,0x00050005,0x00000107,0x664f5655,0x74657366,0x00000000,0x000a0005, 0x00000108,0x706d6153,0x5f72656c,0x76755f67,0x74736944,0x6974726f,0x61536e6f,0x656c706d, 0x00000072,0x00040005,0x00000109,0x61726170,0x0000006d,0x00040005,0x0000010b,0x61726170, 0x0000006d,0x00040005,0x00000113,0x7074754f,0x00007475,0x00070005,0x00000114,0x706d6153, 0x5f72656c,0x61735f67,0x656c706d,0x00000072,0x00040005,0x00000121,0x61726170,0x00335f6d, 0x00040005,0x00000123,0x61726170,0x00345f6d,0x00040005,0x0000012a,0x61726170,0x0000006d, 0x00040005,0x0000012c,0x61726170,0x0000006d,0x00040005,0x0000012f,0x61726170,0x0000006d, 0x00040005,0x00000132,0x61726170,0x0000006d,0x00040005,0x00000133,0x61726170,0x0000006d, 0x00060005,0x00000138,0x68706c41,0x78655461,0x6f6c6f43,0x00000072,0x00080005,0x00000139, 0x706d6153,0x5f72656c,0x6c615f67,0x53616870,0x6c706d61,0x00007265,0x00040005,0x00000149, 0x61726170,0x00355f6d,0x00040005,0x0000014c,0x61726170,0x00365f6d,0x00060005,0x00000150, 0x6e656c42,0x4f565564,0x65736666,0x00000074,0x000b0005,0x00000151,0x706d6153,0x5f72656c, 0x6c625f67,0x55646e65,0x73694456,0x74726f74,0x536e6f69,0x6c706d61,0x00007265,0x00040005, 0x00000152,0x61726170,0x0000006d,0x00040005,0x00000154,0x61726170,0x0000006d,0x00070005, 0x0000015b,0x6e656c42,0x78655464,0x65727574,0x6f6c6f43,0x00000072,0x00080005,0x0000015c, 0x706d6153,0x5f72656c,0x6c625f67,0x53646e65,0x6c706d61,0x00007265,0x00080005,0x00000163, 0x6e656c42,0x706c4164,0x65546168,0x72757478,0x6c6f4365,0x0000726f,0x00090005,0x00000164, 0x706d6153,0x5f72656c,0x6c625f67,0x41646e65,0x6168706c,0x706d6153,0x0072656c,0x00040005, 0x00000174,0x61726170,0x00375f6d,0x00040005,0x00000176,0x61726170,0x0000006d,0x00040005, 0x00000178,0x61726170,0x0000006d,0x00040005,0x0000017a,0x61726170,0x0000006d,0x00030005, 0x00000189,0x00736f70,0x00040005,0x00000191,0x55736f70,0x00000000,0x00040005,0x00000199, 0x52736f70,0x00000000,0x00040005,0x000001a1,0x61637378,0x0000656c,0x00040005,0x000001ac, 0x61637379,0x0000656c,0x00030005,0x000001b7,0x00007675,0x00040005,0x000001da,0x6f6c6f63, 0x00000072,0x00080005,0x000001db,0x706d6153,0x5f72656c,0x61625f67,0x61536b63,0x656c706d, 0x00000072,0x00040005,0x000001f0,0x75706e49,0x00000074,0x00060005,0x000001f2,0x465f6c67, 0x43676172,0x64726f6f,0x00000000,0x00050005,0x000001f5,0x75706e49,0x6f435f74,0x00726f6c, 0x00050005,0x000001f9,0x75706e49,0x56555f74,0x00000000,0x00050005,0x000001fc,0x75706e49, 0x6f505f74,0x00000073,0x00050005,0x000001ff,0x75706e49,0x6f505f74,0x00005573,0x00050005, 0x00000202,0x75706e49,0x6f505f74,0x00005273,0x00070005,0x00000205,0x75706e49,0x6c415f74, 0x5f616870,0x74736944,0x0056555f,0x00090005,0x00000208,0x75706e49,0x6c425f74,0x5f646e65, 0x68706c41,0x69445f61,0x555f7473,0x00000056,0x00090005,0x0000020b,0x75706e49,0x6c425f74, 0x5f646e65,0x654e4246,0x6e497478,0x5f786564,0x00005655,0x00060005,0x0000020e,0x75706e49, 0x744f5f74,0x73726568,0x00000000,0x00040005,0x00000211,0x3736345f,0x00000000,0x00040005, 0x00000212,0x61726170,0x0000006d,0x00070005,0x00000216,0x746e655f,0x6f507972,0x4f746e69, 0x75707475,0x00000074,0x00050048,0x00000100,0x00000000,0x00000023,0x00000000,0x00050048, 0x00000100,0x00000001,0x00000023,0x00000010,0x00050048,0x00000100,0x00000002,0x00000023, 0x00000020,0x00050048,0x00000100,0x00000003,0x00000023,0x00000030,0x00050048,0x00000100, 0x00000004,0x00000023,0x00000040,0x00030047,0x00000100,0x00000002,0x00040047,0x00000102, 0x00000022,0x00000001,0x00040047,0x00000102,0x00000021,0x00000000,0x00040047,0x00000108, 0x00000022,0x00000001,0x00040047,0x00000108,0x00000021,0x00000004,0x00040047,0x00000114, 0x00000022,0x00000001,0x00040047,0x00000114,0x00000021,0x00000001,0x00040047,0x00000139, 0x00000022,0x00000001,0x00040047,0x00000139,0x00000021,0x00000003,0x00040047,0x00000151, 0x00000022,0x00000001,0x00040047,0x00000151,0x00000021,0x00000007,0x00040047,0x0000015c, 0x00000022,0x00000001,0x00040047,0x0000015c,0x00000021,0x00000005,0x00040047,0x00000164, 0x00000022,0x00000001,0x00040047,0x00000164,0x00000021,0x00000006,0x00040047,0x000001db, 0x00000022,0x00000001,0x00040047,0x000001db,0x00000021,0x00000002,0x00040047,0x000001f2, 0x0000000b,0x0000000f,0x00040047,0x000001f5,0x0000001e,0x00000000,0x00040047,0x000001f9, 0x0000001e,0x00000001,0x00040047,0x000001fc,0x0000001e,0x00000002,0x00040047,0x000001ff, 0x0000001e,0x00000003,0x00040047,0x00000202,0x0000001e,0x00000004,0x00040047,0x00000205, 0x0000001e,0x00000005,0x00040047,0x00000208,0x0000001e,0x00000006,0x00040047,0x0000020b, 0x0000001e,0x00000007,0x00040047,0x0000020e,0x0000001e,0x00000008,0x00040047,0x00000216, 0x0000001e,0x00000000,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00030016, 0x00000006,0x00000020,0x00040017,0x00000007,0x00000006,0x00000004,0x00040017,0x00000008, 0x00000006,0x00000002,0x000c001e,0x00000009,0x00000007,0x00000007,0x00000008,0x00000007, 0x00000007,0x00000007,0x00000007,0x00000007,0x00000007,0x00000008,0x00040020,0x0000000a, 0x00000007,0x00000009,0x000a001e,0x0000000b,0x00000008,0x00000008,0x00000008,0x00000008, 0x00000008,0x00000008,0x00000006,0x00000006,0x00040021,0x0000000c,0x0000000b,0x0000000a, 0x00040020,0x00000010,0x00000007,0x00000008,0x00090019,0x00000011,0x00000006,0x00000001, 0x00000000,0x00000000,0x00000000,0x00000001,0x00000000,0x0003001b,0x00000012,0x00000011, 0x00040020,0x00000013,0x00000000,0x00000012,0x00060021,0x00000014,0x00000008,0x00000010, 0x00000010,0x00000013,0x00040020,0x0000001a,0x00000007,0x00000007,0x00040020,0x0000001b, 0x00000007,0x00000006,0x00090021,0x0000001c,0x00000002,0x0000001a,0x0000001a,0x0000001a, 0x00000010,0x0000001b,0x00000013,0x00060021,0x00000025,0x00000002,0x0000001a,0x0000001a, 0x0000001b,0x00040021,0x0000002b,0x00000007,0x0000000a,0x00040020,0x0000002f,0x00000007, 0x0000000b,0x00040015,0x00000031,0x00000020,0x00000001,0x0004002b,0x00000031,0x00000032, 0x00000000,0x0004002b,0x00000031,0x00000033,0x00000006,0x0004002b,0x00000031,0x00000038, 0x00000001,0x0004002b,0x00000031,0x0000003d,0x00000002,0x0004002b,0x00000031,0x0000003e, 0x00000008,0x0004002b,0x00000031,0x00000043,0x00000003,0x0004002b,0x00000031,0x00000044, 0x00000007,0x0004002b,0x00000031,0x00000049,0x00000004,0x0004002b,0x00000031,0x0000004e, 0x00000005,0x0004002b,0x00000031,0x00000053,0x00000009,0x00040015,0x00000054,0x00000020, 0x00000000,0x0004002b,0x00000054,0x00000055,0x00000000,0x0004002b,0x00000054,0x00000059, 0x00000001,0x0004002b,0x00000006,0x00000065,0x40000000,0x0004002b,0x00000006,0x00000067, 0x3f800000,0x0005002c,0x00000008,0x00000068,0x00000067,0x00000067,0x0004002b,0x00000006, 0x0000006a,0xbf800000,0x0004002b,0x00000006,0x0000007d,0x00000000,0x00020014,0x0000007e, 0x00040017,0x00000096,0x00000006,0x00000003,0x00040020,0x00000097,0x00000007,0x00000096, 0x0004002b,0x00000054,0x0000009b,0x00000003,0x0004002b,0x00000054,0x000000aa,0x00000002, 0x0004002b,0x00000006,0x000000e0,0x40400000,0x0007001e,0x00000100,0x00000007,0x00000007, 0x00000007,0x00000007,0x00000007,0x00040020,0x00000101,0x00000002,0x00000100,0x0004003b, 0x00000101,0x00000102,0x00000002,0x00040020,0x00000103,0x00000002,0x00000007,0x0004003b, 0x00000013,0x00000108,0x00000000,0x00040020,0x0000010e,0x00000002,0x00000006,0x0004003b, 0x00000013,0x00000114,0x00000000,0x0004003b,0x00000013,0x00000139,0x00000000,0x0004003b, 0x00000013,0x00000151,0x00000000,0x0004003b,0x00000013,0x0000015c,0x00000000,0x0004003b, 0x00000013,0x00000164,0x00000000,0x0004002b,0x00000006,0x000001c8,0x3f000000,0x0004003b, 0x00000013,0x000001db,0x00000000,0x00040020,0x000001f1,0x00000001,0x00000007,0x0004003b, 0x000001f1,0x000001f2,0x00000001,0x0004003b,0x000001f1,0x000001f5,0x00000001,0x00040020, 0x000001f8,0x00000001,0x00000008,0x0004003b,0x000001f8,0x000001f9,0x00000001,0x0004003b, 0x000001f1,0x000001fc,0x00000001,0x0004003b,0x000001f1,0x000001ff,0x00000001,0x0004003b, 0x000001f1,0x00000202,0x00000001,0x0004003b,0x000001f1,0x00000205,0x00000001,0x0004003b, 0x000001f1,0x00000208,0x00000001,0x0004003b,0x000001f1,0x0000020b,0x00000001,0x0004003b, 0x000001f8,0x0000020e,0x00000001,0x00040020,0x00000215,0x00000003,0x00000007,0x0004003b, 0x00000215,0x00000216,0x00000003,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003, 0x000200f8,0x00000005,0x0004003b,0x0000000a,0x000001f0,0x00000007,0x0004003b,0x0000001a, 0x00000211,0x00000007,0x0004003b,0x0000000a,0x00000212,0x00000007,0x0004003d,0x00000007, 0x000001f3,0x000001f2,0x00050041,0x0000001a,0x000001f4,0x000001f0,0x00000032,0x0003003e, 0x000001f4,0x000001f3,0x0004003d,0x00000007,0x000001f6,0x000001f5,0x00050041,0x0000001a, 0x000001f7,0x000001f0,0x00000038,0x0003003e,0x000001f7,0x000001f6,0x0004003d,0x00000008, 0x000001fa,0x000001f9,0x00050041,0x00000010,0x000001fb,0x000001f0,0x0000003d,0x0003003e, 0x000001fb,0x000001fa,0x0004003d,0x00000007,0x000001fd,0x000001fc,0x00050041,0x0000001a, 0x000001fe,0x000001f0,0x00000043,0x0003003e,0x000001fe,0x000001fd,0x0004003d,0x00000007, 0x00000200,0x000001ff,0x00050041,0x0000001a,0x00000201,0x000001f0,0x00000049,0x0003003e, 0x00000201,0x00000200,0x0004003d,0x00000007,0x00000203,0x00000202,0x00050041,0x0000001a, 0x00000204,0x000001f0,0x0000004e,0x0003003e,0x00000204,0x00000203,0x0004003d,0x00000007, 0x00000206,0x00000205,0x00050041,0x0000001a,0x00000207,0x000001f0,0x00000033,0x0003003e, 0x00000207,0x00000206,0x0004003d,0x00000007,0x00000209,0x00000208,0x00050041,0x0000001a, 0x0000020a,0x000001f0,0x00000044,0x0003003e,0x0000020a,0x00000209,0x0004003d,0x00000007, 0x0000020c,0x0000020b,0x00050041,0x0000001a,0x0000020d,0x000001f0,0x0000003e,0x0003003e, 0x0000020d,0x0000020c,0x0004003d,0x00000008,0x0000020f,0x0000020e,0x00050041,0x00000010, 0x00000210,0x000001f0,0x00000053,0x0003003e,0x00000210,0x0000020f,0x0004003d,0x00000009, 0x00000213,0x000001f0,0x0003003e,0x00000212,0x00000213,0x00050039,0x00000007,0x00000214, 0x0000002d,0x00000212,0x0003003e,0x00000211,0x00000214,0x0004003d,0x00000007,0x00000217, 0x00000211,0x0003003e,0x00000216,0x00000217,0x000100fd,0x00010038,0x00050036,0x0000000b, 0x0000000e,0x00000000,0x0000000c,0x00030037,0x0000000a,0x0000000d,0x000200f8,0x0000000f, 0x0004003b,0x0000002f,0x00000030,0x00000007,0x00050041,0x0000001a,0x00000034,0x0000000d, 0x00000033,0x0004003d,0x00000007,0x00000035,0x00000034,0x0007004f,0x00000008,0x00000036, 0x00000035,0x00000035,0x00000000,0x00000001,0x00050041,0x00000010,0x00000037,0x00000030, 0x00000032,0x0003003e,0x00000037,0x00000036,0x00050041,0x0000001a,0x00000039,0x0000000d, 0x00000033,0x0004003d,0x00000007,0x0000003a,0x00000039,0x0007004f,0x00000008,0x0000003b, 0x0000003a,0x0000003a,0x00000002,0x00000003,0x00050041,0x00000010,0x0000003c,0x00000030, 0x00000038,0x0003003e,0x0000003c,0x0000003b,0x00050041,0x0000001a,0x0000003f,0x0000000d, 0x0000003e,0x0004003d,0x00000007,0x00000040,0x0000003f,0x0007004f,0x00000008,0x00000041, 0x00000040,0x00000040,0x00000000,0x00000001,0x00050041,0x00000010,0x00000042,0x00000030, 0x0000003d,0x0003003e,0x00000042,0x00000041,0x00050041,0x0000001a,0x00000045,0x0000000d, 0x00000044,0x0004003d,0x00000007,0x00000046,0x00000045,0x0007004f,0x00000008,0x00000047, 0x00000046,0x00000046,0x00000000,0x00000001,0x00050041,0x00000010,0x00000048,0x00000030, 0x00000043,0x0003003e,0x00000048,0x00000047,0x00050041,0x0000001a,0x0000004a,0x0000000d, 0x00000044,0x0004003d,0x00000007,0x0000004b,0x0000004a,0x0007004f,0x00000008,0x0000004c, 0x0000004b,0x0000004b,0x00000002,0x00000003,0x00050041,0x00000010,0x0000004d,0x00000030, 0x00000049,0x0003003e,0x0000004d,0x0000004c,0x00050041,0x0000001a,0x0000004f,0x0000000d, 0x0000003e,0x0004003d,0x00000007,0x00000050,0x0000004f,0x0007004f,0x00000008,0x00000051, 0x00000050,0x00000050,0x00000002,0x00000003,0x00050041,0x00000010,0x00000052,0x00000030, 0x0000004e,0x0003003e,0x00000052,0x00000051,0x00060041,0x0000001b,0x00000056,0x0000000d, 0x00000053,0x00000055,0x0004003d,0x00000006,0x00000057,0x00000056,0x00050041,0x0000001b, 0x00000058,0x00000030,0x00000033,0x0003003e,0x00000058,0x00000057,0x00060041,0x0000001b, 0x0000005a,0x0000000d,0x00000053,0x00000059,0x0004003d,0x00000006,0x0000005b,0x0000005a, 0x00050041,0x0000001b,0x0000005c,0x00000030,0x00000044,0x0003003e,0x0000005c,0x0000005b, 0x0004003d,0x0000000b,0x0000005d,0x00000030,0x000200fe,0x0000005d,0x00010038,0x00050036, 0x00000008,0x00000018,0x00000000,0x00000014,0x00030037,0x00000010,0x00000015,0x00030037, 0x00000010,0x00000016,0x00030037,0x00000013,0x00000017,0x000200f8,0x00000019,0x0004003b, 0x00000010,0x00000060,0x00000007,0x0004003d,0x00000012,0x00000061,0x00000017,0x0004003d, 0x00000008,0x00000062,0x00000015,0x00050057,0x00000007,0x00000063,0x00000061,0x00000062, 0x0007004f,0x00000008,0x00000064,0x00000063,0x00000063,0x00000000,0x00000001,0x0005008e, 0x00000008,0x00000066,0x00000064,0x00000065,0x00050083,0x00000008,0x00000069,0x00000066, 0x00000068,0x0003003e,0x00000060,0x00000069,0x00050041,0x0000001b,0x0000006b,0x00000060, 0x00000059,0x0004003d,0x00000006,0x0000006c,0x0000006b,0x00050085,0x00000006,0x0000006d, 0x0000006c,0x0000006a,0x00050041,0x0000001b,0x0000006e,0x00000060,0x00000059,0x0003003e, 0x0000006e,0x0000006d,0x00050041,0x0000001b,0x0000006f,0x00000016,0x00000055,0x0004003d, 0x00000006,0x00000070,0x0000006f,0x00050041,0x0000001b,0x00000071,0x00000016,0x00000059, 0x0004003d,0x00000006,0x00000072,0x00000071,0x00050041,0x0000001b,0x00000073,0x00000060, 0x00000059,0x0004003d,0x00000006,0x00000074,0x00000073,0x00050085,0x00000006,0x00000075, 0x00000072,0x00000074,0x00050081,0x00000006,0x00000076,0x00000070,0x00000075,0x00050041, 0x0000001b,0x00000077,0x00000060,0x00000059,0x0003003e,0x00000077,0x00000076,0x0004003d, 0x00000008,0x00000078,0x00000060,0x000200fe,0x00000078,0x00010038,0x00050036,0x00000002, 0x00000023,0x00000000,0x0000001c,0x00030037,0x0000001a,0x0000001d,0x00030037,0x0000001a, 0x0000001e,0x00030037,0x0000001a,0x0000001f,0x00030037,0x00000010,0x00000020,0x00030037, 0x0000001b,0x00000021,0x00030037,0x00000013,0x00000022,0x000200f8,0x00000024,0x0004003b, 0x0000001a,0x00000082,0x00000007,0x00050041,0x0000001b,0x0000007b,0x0000001e,0x00000055, 0x0004003d,0x00000006,0x0000007c,0x0000007b,0x000500ba,0x0000007e,0x0000007f,0x0000007c, 0x0000007d,0x000300f7,0x00000081,0x00000000,0x000400fa,0x0000007f,0x00000080,0x00000081, 0x000200f8,0x00000080,0x0004003d,0x00000012,0x00000083,0x00000022,0x0004003d,0x00000008, 0x00000084,0x00000020,0x00050057,0x00000007,0x00000085,0x00000083,0x00000084,0x0004003d, 0x00000007,0x00000086,0x0000001f,0x00050085,0x00000007,0x00000087,0x00000085,0x00000086, 0x0003003e,0x00000082,0x00000087,0x00050041,0x0000001b,0x00000088,0x0000001e,0x00000059, 0x0004003d,0x00000006,0x00000089,0x00000088,0x000500b4,0x0000007e,0x0000008a,0x00000089, 0x00000067,0x000300f7,0x0000008c,0x00000000,0x000400fa,0x0000008a,0x0000008b,0x0000008c, 0x000200f8,0x0000008b,0x0004003d,0x00000007,0x0000008d,0x0000001d,0x0004003d,0x00000007, 0x0000008e,0x00000082,0x0004003d,0x00000006,0x0000008f,0x00000021,0x00070050,0x00000007, 0x00000090,0x0000008f,0x0000008f,0x0000008f,0x0000008f,0x0008000c,0x00000007,0x00000091, 0x00000001,0x0000002e,0x0000008d,0x0000008e,0x00000090,0x0003003e,0x0000001d,0x00000091, 0x000200f9,0x0000008c,0x000200f8,0x0000008c,0x000200f9,0x00000081,0x000200f8,0x00000081, 0x000100fd,0x00010038,0x00050036,0x00000002,0x00000029,0x00000000,0x00000025,0x00030037, 0x0000001a,0x00000026,0x00030037,0x0000001a,0x00000027,0x00030037,0x0000001b,0x00000028, 0x000200f8,0x0000002a,0x0004003b,0x00000097,0x00000098,0x00000007,0x0004003b,0x00000097, 0x000000b5,0x00000007,0x0004003b,0x00000097,0x000000cc,0x00000007,0x0004003b,0x00000097, 0x000000e4,0x00000007,0x0004003d,0x00000006,0x00000092,0x00000028,0x000500b4,0x0000007e, 0x00000093,0x00000092,0x0000007d,0x000300f7,0x00000095,0x00000000,0x000400fa,0x00000093, 0x00000094,0x000000b0,0x000200f8,0x00000094,0x0004003d,0x00000007,0x00000099,0x00000027, 0x0008004f,0x00000096,0x0000009a,0x00000099,0x00000099,0x00000000,0x00000001,0x00000002, 0x00050041,0x0000001b,0x0000009c,0x00000027,0x0000009b,0x0004003d,0x00000006,0x0000009d, 0x0000009c,0x0005008e,0x00000096,0x0000009e,0x0000009a,0x0000009d,0x0004003d,0x00000007, 0x0000009f,0x00000026,0x0008004f,0x00000096,0x000000a0,0x0000009f,0x0000009f,0x00000000, 0x00000001,0x00000002,0x00050041,0x0000001b,0x000000a1,0x00000027,0x0000009b,0x0004003d, 0x00000006,0x000000a2,0x000000a1,0x00050083,0x00000006,0x000000a3,0x00000067,0x000000a2, 0x0005008e,0x00000096,0x000000a4,0x000000a0,0x000000a3,0x00050081,0x00000096,0x000000a5, 0x0000009e,0x000000a4,0x0003003e,0x00000098,0x000000a5,0x00050041,0x0000001b,0x000000a6, 0x00000098,0x00000055,0x0004003d,0x00000006,0x000000a7,0x000000a6,0x00050041,0x0000001b, 0x000000a8,0x00000098,0x00000059,0x0004003d,0x00000006,0x000000a9,0x000000a8,0x00050041, 0x0000001b,0x000000ab,0x00000098,0x000000aa,0x0004003d,0x00000006,0x000000ac,0x000000ab, 0x00050041,0x0000001b,0x000000ad,0x00000026,0x0000009b,0x0004003d,0x00000006,0x000000ae, 0x000000ad,0x00070050,0x00000007,0x000000af,0x000000a7,0x000000a9,0x000000ac,0x000000ae, 0x0003003e,0x00000026,0x000000af,0x000200f9,0x00000095,0x000200f8,0x000000b0,0x0004003d, 0x00000006,0x000000b1,0x00000028,0x000500b4,0x0000007e,0x000000b2,0x000000b1,0x00000067, 0x000300f7,0x000000b4,0x00000000,0x000400fa,0x000000b2,0x000000b3,0x000000c7,0x000200f8, 0x000000b3,0x0004003d,0x00000007,0x000000b6,0x00000026,0x0008004f,0x00000096,0x000000b7, 0x000000b6,0x000000b6,0x00000000,0x00000001,0x00000002,0x0004003d,0x00000007,0x000000b8, 0x00000027,0x0008004f,0x00000096,0x000000b9,0x000000b8,0x000000b8,0x00000000,0x00000001, 0x00000002,0x00050041,0x0000001b,0x000000ba,0x00000027,0x0000009b,0x0004003d,0x00000006, 0x000000bb,0x000000ba,0x0005008e,0x00000096,0x000000bc,0x000000b9,0x000000bb,0x00050081, 0x00000096,0x000000bd,0x000000b7,0x000000bc,0x0003003e,0x000000b5,0x000000bd,0x00050041, 0x0000001b,0x000000be,0x000000b5,0x00000055,0x0004003d,0x00000006,0x000000bf,0x000000be, 0x00050041,0x0000001b,0x000000c0,0x000000b5,0x00000059,0x0004003d,0x00000006,0x000000c1, 0x000000c0,0x00050041,0x0000001b,0x000000c2,0x000000b5,0x000000aa,0x0004003d,0x00000006, 0x000000c3,0x000000c2,0x00050041,0x0000001b,0x000000c4,0x00000026,0x0000009b,0x0004003d, 0x00000006,0x000000c5,0x000000c4,0x00070050,0x00000007,0x000000c6,0x000000bf,0x000000c1, 0x000000c3,0x000000c5,0x0003003e,0x00000026,0x000000c6,0x000200f9,0x000000b4,0x000200f8, 0x000000c7,0x0004003d,0x00000006,0x000000c8,0x00000028,0x000500b4,0x0000007e,0x000000c9, 0x000000c8,0x00000065,0x000300f7,0x000000cb,0x00000000,0x000400fa,0x000000c9,0x000000ca, 0x000000de,0x000200f8,0x000000ca,0x0004003d,0x00000007,0x000000cd,0x00000026,0x0008004f, 0x00000096,0x000000ce,0x000000cd,0x000000cd,0x00000000,0x00000001,0x00000002,0x0004003d, 0x00000007,0x000000cf,0x00000027,0x0008004f,0x00000096,0x000000d0,0x000000cf,0x000000cf, 0x00000000,0x00000001,0x00000002,0x00050041,0x0000001b,0x000000d1,0x00000027,0x0000009b, 0x0004003d,0x00000006,0x000000d2,0x000000d1,0x0005008e,0x00000096,0x000000d3,0x000000d0, 0x000000d2,0x00050083,0x00000096,0x000000d4,0x000000ce,0x000000d3,0x0003003e,0x000000cc, 0x000000d4,0x00050041,0x0000001b,0x000000d5,0x000000cc,0x00000055,0x0004003d,0x00000006, 0x000000d6,0x000000d5,0x00050041,0x0000001b,0x000000d7,0x000000cc,0x00000059,0x0004003d, 0x00000006,0x000000d8,0x000000d7,0x00050041,0x0000001b,0x000000d9,0x000000cc,0x000000aa, 0x0004003d,0x00000006,0x000000da,0x000000d9,0x00050041,0x0000001b,0x000000db,0x00000026, 0x0000009b,0x0004003d,0x00000006,0x000000dc,0x000000db,0x00070050,0x00000007,0x000000dd, 0x000000d6,0x000000d8,0x000000da,0x000000dc,0x0003003e,0x00000026,0x000000dd,0x000200f9, 0x000000cb,0x000200f8,0x000000de,0x0004003d,0x00000006,0x000000df,0x00000028,0x000500b4, 0x0000007e,0x000000e1,0x000000df,0x000000e0,0x000300f7,0x000000e3,0x00000000,0x000400fa, 0x000000e1,0x000000e2,0x000000e3,0x000200f8,0x000000e2,0x0004003d,0x00000007,0x000000e5, 0x00000026,0x0008004f,0x00000096,0x000000e6,0x000000e5,0x000000e5,0x00000000,0x00000001, 0x00000002,0x0004003d,0x00000007,0x000000e7,0x00000027,0x0008004f,0x00000096,0x000000e8, 0x000000e7,0x000000e7,0x00000000,0x00000001,0x00000002,0x00050041,0x0000001b,0x000000e9, 0x00000027,0x0000009b,0x0004003d,0x00000006,0x000000ea,0x000000e9,0x0005008e,0x00000096, 0x000000eb,0x000000e8,0x000000ea,0x00050085,0x00000096,0x000000ec,0x000000e6,0x000000eb, 0x0003003e,0x000000e4,0x000000ec,0x00050041,0x0000001b,0x000000ed,0x000000e4,0x00000055, 0x0004003d,0x00000006,0x000000ee,0x000000ed,0x00050041,0x0000001b,0x000000ef,0x000000e4, 0x00000059,0x0004003d,0x00000006,0x000000f0,0x000000ef,0x00050041,0x0000001b,0x000000f1, 0x000000e4,0x000000aa,0x0004003d,0x00000006,0x000000f2,0x000000f1,0x00050041,0x0000001b, 0x000000f3,0x00000026,0x0000009b,0x0004003d,0x00000006,0x000000f4,0x000000f3,0x00070050, 0x00000007,0x000000f5,0x000000ee,0x000000f0,0x000000f2,0x000000f4,0x0003003e,0x00000026, 0x000000f5,0x000200f9,0x000000e3,0x000200f8,0x000000e3,0x000200f9,0x000000cb,0x000200f8, 0x000000cb,0x000200f9,0x000000b4,0x000200f8,0x000000b4,0x000200f9,0x00000095,0x000200f8, 0x00000095,0x000100fd,0x00010038,0x00050036,0x00000007,0x0000002d,0x00000000,0x0000002b, 0x00030037,0x0000000a,0x0000002c,0x000200f8,0x0000002e,0x0004003b,0x0000000a,0x000000f6, 0x00000007,0x0004003b,0x0000002f,0x000000f8,0x00000007,0x0004003b,0x0000000a,0x000000f9, 0x00000007,0x0004003b,0x00000010,0x000000fc,0x00000007,0x0004003b,0x00000010,0x000000ff, 0x00000007,0x0004003b,0x00000010,0x00000107,0x00000007,0x0004003b,0x00000010,0x00000109, 0x00000007,0x0004003b,0x00000010,0x0000010b,0x00000007,0x0004003b,0x0000001a,0x00000113, 0x00000007,0x0004003b,0x0000001a,0x00000121,0x00000007,0x0004003b,0x0000001b,0x00000123, 0x00000007,0x0004003b,0x0000001a,0x0000012a,0x00000007,0x0004003b,0x0000001a,0x0000012c, 0x00000007,0x0004003b,0x0000001a,0x0000012f,0x00000007,0x0004003b,0x00000010,0x00000132, 0x00000007,0x0004003b,0x0000001b,0x00000133,0x00000007,0x0004003b,0x0000001a,0x00000138, 0x00000007,0x0004003b,0x00000010,0x00000149,0x00000007,0x0004003b,0x00000010,0x0000014c, 0x00000007,0x0004003b,0x00000010,0x00000150,0x00000007,0x0004003b,0x00000010,0x00000152, 0x00000007,0x0004003b,0x00000010,0x00000154,0x00000007,0x0004003b,0x0000001a,0x0000015b, 0x00000007,0x0004003b,0x0000001a,0x00000163,0x00000007,0x0004003b,0x0000001a,0x00000174, 0x00000007,0x0004003b,0x0000001a,0x00000176,0x00000007,0x0004003b,0x0000001a,0x00000178, 0x00000007,0x0004003b,0x0000001b,0x0000017a,0x00000007,0x0004003b,0x00000010,0x00000189, 0x00000007,0x0004003b,0x00000010,0x00000191,0x00000007,0x0004003b,0x00000010,0x00000199, 0x00000007,0x0004003b,0x0000001b,0x000001a1,0x00000007,0x0004003b,0x0000001b,0x000001ac, 0x00000007,0x0004003b,0x00000010,0x000001b7,0x00000007,0x0004003b,0x00000097,0x000001da, 0x00000007,0x0004003d,0x00000009,0x000000f7,0x0000002c,0x0003003e,0x000000f6,0x000000f7, 0x0004003d,0x00000009,0x000000fa,0x000000f6,0x0003003e,0x000000f9,0x000000fa,0x00050039, 0x0000000b,0x000000fb,0x0000000e,0x000000f9,0x0003003e,0x000000f8,0x000000fb,0x00050041, 0x00000010,0x000000fd,0x000000f8,0x00000038,0x0004003d,0x00000008,0x000000fe,0x000000fd, 0x0003003e,0x000000fc,0x000000fe,0x00050041,0x00000103,0x00000104,0x00000102,0x00000043, 0x0004003d,0x00000007,0x00000105,0x00000104,0x0007004f,0x00000008,0x00000106,0x00000105, 0x00000105,0x00000002,0x00000003,0x0003003e,0x000000ff,0x00000106,0x0004003d,0x00000008, 0x0000010a,0x000000fc,0x0003003e,0x00000109,0x0000010a,0x0004003d,0x00000008,0x0000010c, 0x000000ff,0x0003003e,0x0000010b,0x0000010c,0x00070039,0x00000008,0x0000010d,0x00000018, 0x00000109,0x0000010b,0x00000108,0x0003003e,0x00000107,0x0000010d,0x00060041,0x0000010e, 0x0000010f,0x00000102,0x00000043,0x00000055,0x0004003d,0x00000006,0x00000110,0x0000010f, 0x0004003d,0x00000008,0x00000111,0x00000107,0x0005008e,0x00000008,0x00000112,0x00000111, 0x00000110,0x0003003e,0x00000107,0x00000112,0x0004003d,0x00000012,0x00000115,0x00000114, 0x00050041,0x00000010,0x00000116,0x0000002c,0x0000003d,0x0004003d,0x00000008,0x00000117, 0x00000116,0x0004003d,0x00000008,0x00000118,0x00000107,0x00050081,0x00000008,0x00000119, 0x00000117,0x00000118,0x00050057,0x00000007,0x0000011a,0x00000115,0x00000119,0x0003003e, 0x00000113,0x0000011a,0x00060041,0x0000001b,0x0000011b,0x0000002c,0x00000038,0x0000009b, 0x0004003d,0x00000006,0x0000011c,0x0000011b,0x00050041,0x0000001b,0x0000011d,0x00000113, 0x0000009b,0x0004003d,0x00000006,0x0000011e,0x0000011d,0x00050085,0x00000006,0x0000011f, 0x0000011e,0x0000011c,0x00050041,0x0000001b,0x00000120,0x00000113,0x0000009b,0x0003003e, 0x00000120,0x0000011f,0x0004003d,0x00000007,0x00000122,0x00000113,0x0003003e,0x00000121, 0x00000122,0x00050041,0x0000001b,0x00000124,0x000000f8,0x00000033,0x0004003d,0x00000006, 0x00000125,0x00000124,0x0003003e,0x00000123,0x00000125,0x00050041,0x00000010,0x00000126, 0x000000f8,0x0000004e,0x0004003d,0x00000008,0x00000127,0x00000126,0x0004003d,0x00000008, 0x00000128,0x00000107,0x00050081,0x00000008,0x00000129,0x00000127,0x00000128,0x0004003d, 0x00000007,0x0000012b,0x00000121,0x0003003e,0x0000012a,0x0000012b,0x00050041,0x00000103, 0x0000012d,0x00000102,0x0000003d,0x0004003d,0x00000007,0x0000012e,0x0000012d,0x0003003e, 0x0000012c,0x0000012e,0x00050041,0x0000001a,0x00000130,0x0000002c,0x00000038,0x0004003d, 0x00000007,0x00000131,0x00000130,0x0003003e,0x0000012f,0x00000131,0x0003003e,0x00000132, 0x00000129,0x0004003d,0x00000006,0x00000134,0x00000123,0x0003003e,0x00000133,0x00000134, 0x000a0039,0x00000002,0x00000135,0x00000023,0x0000012a,0x0000012c,0x0000012f,0x00000132, 0x00000133,0x00000114,0x0004003d,0x00000007,0x00000136,0x0000012a,0x0003003e,0x00000121, 0x00000136,0x0004003d,0x00000007,0x00000137,0x00000121,0x0003003e,0x00000113,0x00000137, 0x0004003d,0x00000012,0x0000013a,0x00000139,0x00050041,0x00000010,0x0000013b,0x000000f8, 0x00000032,0x0004003d,0x00000008,0x0000013c,0x0000013b,0x0004003d,0x00000008,0x0000013d, 0x00000107,0x00050081,0x00000008,0x0000013e,0x0000013c,0x0000013d,0x00050057,0x00000007, 0x0000013f,0x0000013a,0x0000013e,0x0003003e,0x00000138,0x0000013f,0x00050041,0x0000001b, 0x00000140,0x00000138,0x00000055,0x0004003d,0x00000006,0x00000141,0x00000140,0x00050041, 0x0000001b,0x00000142,0x00000138,0x0000009b,0x0004003d,0x00000006,0x00000143,0x00000142, 0x00050085,0x00000006,0x00000144,0x00000141,0x00000143,0x00050041,0x0000001b,0x00000145, 0x00000113,0x0000009b,0x0004003d,0x00000006,0x00000146,0x00000145,0x00050085,0x00000006, 0x00000147,0x00000146,0x00000144,0x00050041,0x0000001b,0x00000148,0x00000113,0x0000009b, 0x0003003e,0x00000148,0x00000147,0x00050041,0x00000010,0x0000014a,0x000000f8,0x00000049, 0x0004003d,0x00000008,0x0000014b,0x0000014a,0x0003003e,0x00000149,0x0000014b,0x00050041, 0x00000103,0x0000014d,0x00000102,0x00000043,0x0004003d,0x00000007,0x0000014e,0x0000014d, 0x0007004f,0x00000008,0x0000014f,0x0000014e,0x0000014e,0x00000002,0x00000003,0x0003003e, 0x0000014c,0x0000014f,0x0004003d,0x00000008,0x00000153,0x00000149,0x0003003e,0x00000152, 0x00000153,0x0004003d,0x00000008,0x00000155,0x0000014c,0x0003003e,0x00000154,0x00000155, 0x00070039,0x00000008,0x00000156,0x00000018,0x00000152,0x00000154,0x00000151,0x0003003e, 0x00000150,0x00000156,0x00060041,0x0000010e,0x00000157,0x00000102,0x00000043,0x00000059, 0x0004003d,0x00000006,0x00000158,0x00000157,0x0004003d,0x00000008,0x00000159,0x00000150, 0x0005008e,0x00000008,0x0000015a,0x00000159,0x00000158,0x0003003e,0x00000150,0x0000015a, 0x0004003d,0x00000012,0x0000015d,0x0000015c,0x00050041,0x00000010,0x0000015e,0x000000f8, 0x0000003d,0x0004003d,0x00000008,0x0000015f,0x0000015e,0x0004003d,0x00000008,0x00000160, 0x00000150,0x00050081,0x00000008,0x00000161,0x0000015f,0x00000160,0x00050057,0x00000007, 0x00000162,0x0000015d,0x00000161,0x0003003e,0x0000015b,0x00000162,0x0004003d,0x00000012, 0x00000165,0x00000164,0x00050041,0x00000010,0x00000166,0x000000f8,0x00000043,0x0004003d, 0x00000008,0x00000167,0x00000166,0x0004003d,0x00000008,0x00000168,0x00000150,0x00050081, 0x00000008,0x00000169,0x00000167,0x00000168,0x00050057,0x00000007,0x0000016a,0x00000165, 0x00000169,0x0003003e,0x00000163,0x0000016a,0x00050041,0x0000001b,0x0000016b,0x00000163, 0x00000055,0x0004003d,0x00000006,0x0000016c,0x0000016b,0x00050041,0x0000001b,0x0000016d, 0x00000163,0x0000009b,0x0004003d,0x00000006,0x0000016e,0x0000016d,0x00050085,0x00000006, 0x0000016f,0x0000016c,0x0000016e,0x00050041,0x0000001b,0x00000170,0x0000015b,0x0000009b, 0x0004003d,0x00000006,0x00000171,0x00000170,0x00050085,0x00000006,0x00000172,0x00000171, 0x0000016f,0x00050041,0x0000001b,0x00000173,0x0000015b,0x0000009b,0x0003003e,0x00000173, 0x00000172,0x0004003d,0x00000007,0x00000175,0x00000113,0x0003003e,0x00000174,0x00000175, 0x0004003d,0x00000007,0x00000177,0x00000174,0x0003003e,0x00000176,0x00000177,0x0004003d, 0x00000007,0x00000179,0x0000015b,0x0003003e,0x00000178,0x00000179,0x00060041,0x0000010e, 0x0000017b,0x00000102,0x00000049,0x00000055,0x0004003d,0x00000006,0x0000017c,0x0000017b, 0x0003003e,0x0000017a,0x0000017c,0x00070039,0x00000002,0x0000017d,0x00000029,0x00000176, 0x00000178,0x0000017a,0x0004003d,0x00000007,0x0000017e,0x00000176,0x0003003e,0x00000174, 0x0000017e,0x0004003d,0x00000007,0x0000017f,0x00000174,0x0003003e,0x00000113,0x0000017f, 0x00050041,0x0000001b,0x00000180,0x00000113,0x0000009b,0x0004003d,0x00000006,0x00000181, 0x00000180,0x00050041,0x0000001b,0x00000182,0x000000f8,0x00000044,0x0004003d,0x00000006, 0x00000183,0x00000182,0x0007000c,0x00000006,0x00000184,0x00000001,0x00000028,0x0000007d, 0x00000183,0x000500bc,0x0000007e,0x00000185,0x00000181,0x00000184,0x000300f7,0x00000187, 0x00000000,0x000400fa,0x00000185,0x00000186,0x00000187,0x000200f8,0x00000186,0x000100fc, 0x000200f8,0x00000187,0x00050041,0x0000001a,0x0000018a,0x0000002c,0x00000043,0x0004003d, 0x00000007,0x0000018b,0x0000018a,0x0007004f,0x00000008,0x0000018c,0x0000018b,0x0000018b, 0x00000000,0x00000001,0x00060041,0x0000001b,0x0000018d,0x0000002c,0x00000043,0x0000009b, 0x0004003d,0x00000006,0x0000018e,0x0000018d,0x00050050,0x00000008,0x0000018f,0x0000018e, 0x0000018e,0x00050088,0x00000008,0x00000190,0x0000018c,0x0000018f,0x0003003e,0x00000189, 0x00000190,0x00050041,0x0000001a,0x00000192,0x0000002c,0x00000049,0x0004003d,0x00000007, 0x00000193,0x00000192,0x0007004f,0x00000008,0x00000194,0x00000193,0x00000193,0x00000000, 0x00000001,0x00060041,0x0000001b,0x00000195,0x0000002c,0x00000049,0x0000009b,0x0004003d, 0x00000006,0x00000196,0x00000195,0x00050050,0x00000008,0x00000197,0x00000196,0x00000196, 0x00050088,0x00000008,0x00000198,0x00000194,0x00000197,0x0003003e,0x00000191,0x00000198, 0x00050041,0x0000001a,0x0000019a,0x0000002c,0x0000004e,0x0004003d,0x00000007,0x0000019b, 0x0000019a,0x0007004f,0x00000008,0x0000019c,0x0000019b,0x0000019b,0x00000000,0x00000001, 0x00060041,0x0000001b,0x0000019d,0x0000002c,0x0000004e,0x0000009b,0x0004003d,0x00000006, 0x0000019e,0x0000019d,0x00050050,0x00000008,0x0000019f,0x0000019e,0x0000019e,0x00050088, 0x00000008,0x000001a0,0x0000019c,0x0000019f,0x0003003e,0x00000199,0x000001a0,0x00050041, 0x0000001b,0x000001a2,0x00000113,0x00000055,0x0004003d,0x00000006,0x000001a3,0x000001a2, 0x00050085,0x00000006,0x000001a4,0x000001a3,0x00000065,0x00050083,0x00000006,0x000001a5, 0x000001a4,0x00000067,0x00060041,0x0000001b,0x000001a6,0x0000002c,0x00000038,0x00000055, 0x0004003d,0x00000006,0x000001a7,0x000001a6,0x00050085,0x00000006,0x000001a8,0x000001a5, 0x000001a7,0x00060041,0x0000010e,0x000001a9,0x00000102,0x00000032,0x00000055,0x0004003d, 0x00000006,0x000001aa,0x000001a9,0x00050085,0x00000006,0x000001ab,0x000001a8,0x000001aa, 0x0003003e,0x000001a1,0x000001ab,0x00050041,0x0000001b,0x000001ad,0x00000113,0x00000059, 0x0004003d,0x00000006,0x000001ae,0x000001ad,0x00050085,0x00000006,0x000001af,0x000001ae, 0x00000065,0x00050083,0x00000006,0x000001b0,0x000001af,0x00000067,0x00060041,0x0000001b, 0x000001b1,0x0000002c,0x00000038,0x00000059,0x0004003d,0x00000006,0x000001b2,0x000001b1, 0x00050085,0x00000006,0x000001b3,0x000001b0,0x000001b2,0x00060041,0x0000010e,0x000001b4, 0x00000102,0x00000032,0x00000055,0x0004003d,0x00000006,0x000001b5,0x000001b4,0x00050085, 0x00000006,0x000001b6,0x000001b3,0x000001b5,0x0003003e,0x000001ac,0x000001b6,0x0004003d, 0x00000008,0x000001b8,0x00000189,0x0004003d,0x00000008,0x000001b9,0x00000199,0x0004003d, 0x00000008,0x000001ba,0x00000189,0x00050083,0x00000008,0x000001bb,0x000001b9,0x000001ba, 0x0004003d,0x00000006,0x000001bc,0x000001a1,0x0005008e,0x00000008,0x000001bd,0x000001bb, 0x000001bc,0x00050081,0x00000008,0x000001be,0x000001b8,0x000001bd,0x0004003d,0x00000008, 0x000001bf,0x00000191,0x0004003d,0x00000008,0x000001c0,0x00000189,0x00050083,0x00000008, 0x000001c1,0x000001bf,0x000001c0,0x0004003d,0x00000006,0x000001c2,0x000001ac,0x0005008e, 0x00000008,0x000001c3,0x000001c1,0x000001c2,0x00050081,0x00000008,0x000001c4,0x000001be, 0x000001c3,0x0003003e,0x000001b7,0x000001c4,0x00050041,0x0000001b,0x000001c5,0x000001b7, 0x00000055,0x0004003d,0x00000006,0x000001c6,0x000001c5,0x00050081,0x00000006,0x000001c7, 0x000001c6,0x00000067,0x00050085,0x00000006,0x000001c9,0x000001c7,0x000001c8,0x00050041, 0x0000001b,0x000001ca,0x000001b7,0x00000055,0x0003003e,0x000001ca,0x000001c9,0x00050041, 0x0000001b,0x000001cb,0x000001b7,0x00000059,0x0004003d,0x00000006,0x000001cc,0x000001cb, 0x00050081,0x00000006,0x000001cd,0x000001cc,0x00000067,0x00050085,0x00000006,0x000001ce, 0x000001cd,0x000001c8,0x00050083,0x00000006,0x000001cf,0x00000067,0x000001ce,0x00050041, 0x0000001b,0x000001d0,0x000001b7,0x00000059,0x0003003e,0x000001d0,0x000001cf,0x00060041, 0x0000010e,0x000001d1,0x00000102,0x00000038,0x00000055,0x0004003d,0x00000006,0x000001d2, 0x000001d1,0x00060041,0x0000010e,0x000001d3,0x00000102,0x00000038,0x00000059,0x0004003d, 0x00000006,0x000001d4,0x000001d3,0x00050041,0x0000001b,0x000001d5,0x000001b7,0x00000059, 0x0004003d,0x00000006,0x000001d6,0x000001d5,0x00050085,0x00000006,0x000001d7,0x000001d4, 0x000001d6,0x00050081,0x00000006,0x000001d8,0x000001d2,0x000001d7,0x00050041,0x0000001b, 0x000001d9,0x000001b7,0x00000059,0x0003003e,0x000001d9,0x000001d8,0x0004003d,0x00000012, 0x000001dc,0x000001db,0x0004003d,0x00000008,0x000001dd,0x000001b7,0x00050057,0x00000007, 0x000001de,0x000001dc,0x000001dd,0x0008004f,0x00000096,0x000001df,0x000001de,0x000001de, 0x00000000,0x00000001,0x00000002,0x00050051,0x00000006,0x000001e0,0x000001df,0x00000000, 0x00050051,0x00000006,0x000001e1,0x000001df,0x00000001,0x00050051,0x00000006,0x000001e2, 0x000001df,0x00000002,0x00060050,0x00000096,0x000001e3,0x000001e0,0x000001e1,0x000001e2, 0x0003003e,0x000001da,0x000001e3,0x00050041,0x0000001b,0x000001e4,0x000001da,0x00000055, 0x0004003d,0x00000006,0x000001e5,0x000001e4,0x00050041,0x0000001b,0x000001e6,0x000001da, 0x00000059,0x0004003d,0x00000006,0x000001e7,0x000001e6,0x00050041,0x0000001b,0x000001e8, 0x000001da,0x000000aa,0x0004003d,0x00000006,0x000001e9,0x000001e8,0x00050041,0x0000001b, 0x000001ea,0x00000113,0x0000009b,0x0004003d,0x00000006,0x000001eb,0x000001ea,0x00070050, 0x00000007,0x000001ec,0x000001e5,0x000001e7,0x000001e9,0x000001eb,0x0003003e,0x00000113, 0x000001ec,0x0004003d,0x00000007,0x000001ed,0x00000113,0x000200fe,0x000001ed,0x00010038 };
{ "pile_set_name": "Github" }
/*===================== begin_copyright_notice ================================== Copyright (c) 2017 Intel Corporation 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. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 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. ======================= end_copyright_notice ==================================*/ #pragma once #ifdef __cplusplus /*****************************************************************************\ MACRO: ASSERT \*****************************************************************************/ #ifndef ASSERT #define ASSERT( expr ) #endif /*****************************************************************************\ MACRO: DPF PURPOSE: Debug Print function \*****************************************************************************/ #ifndef DPF #define DPF( debugLevel, message, ...) #endif /*****************************************************************************\ MACRO: GFXDBG_STDLIB PURPOSE: Special Debug Print flag for iSTD classes \*****************************************************************************/ #define GFXDBG_STDLIB (0x00001000) /*****************************************************************************\ MACRO: NODEFAULT PURPOSE: The use of __assume(0) tells the optimizer that the default case cannot be reached. As a result, the compiler does not generate code to test whether p has a value not represented in a case statement. Note that __assume(0) must be the first statement in the body of the default case for this to work. \*****************************************************************************/ #ifndef NODEFAULT #ifdef _MSC_VER #define NODEFAULT __assume(0) #else #define NODEFAULT #endif // _MSC_VER #endif // NODEFAULT #endif // __cplusplus
{ "pile_set_name": "Github" }
import 'jest'; import {RegExps} from '../../configeditor/codemirror-yaml/mode'; it('recognizes a double quoted string with escaped double quotes', () => { expect(RegExps.QUOTED_STRING.exec('"\\""')).toEqual(expect.arrayContaining(['"\\""'])); });
{ "pile_set_name": "Github" }
/** * Copyright 2018 LinkedIn Corporation. All rights reserved. * Licensed under the BSD-2 Clause license. * See LICENSE in the project root for license information. */ package com.linkedin.transport.hive.typesystem; import com.linkedin.transport.api.StdFactory; import com.linkedin.transport.hive.HiveFactory; import com.linkedin.transport.typesystem.AbstractBoundVariables; import com.linkedin.transport.typesystem.AbstractTypeFactory; import com.linkedin.transport.typesystem.AbstractTypeInference; import com.linkedin.transport.typesystem.AbstractTypeSystem; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; public class HiveTypeInference extends AbstractTypeInference<ObjectInspector> { @Override protected AbstractTypeSystem<ObjectInspector> getTypeSystem() { return new HiveTypeSystem(); } @Override protected AbstractBoundVariables<ObjectInspector> createBoundVariables() { return new HiveBoundVariables(); } @Override protected StdFactory createStdFactory(AbstractBoundVariables<ObjectInspector> boundVariables) { return new HiveFactory(boundVariables); } @Override protected AbstractTypeFactory<ObjectInspector> getTypeFactory() { return new HiveTypeFactory(); } }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2019, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "mbed.h" #include "TLSSocket.h" #include "greentea-client/test_env.h" #include "unity/unity.h" #include "utest.h" #include "tls_tests.h" using namespace utest::v1; #if defined(MBEDTLS_SSL_CLI_C) void TLSSOCKET_NO_CERT() { SKIP_IF_TCP_UNSUPPORTED(); TLSSocket sock; TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.open(NetworkInterface::get_default_instance())); SocketAddress a; TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, NetworkInterface::get_default_instance()->gethostbyname(ECHO_SERVER_ADDR, &a)); a.set_port(ECHO_SERVER_PORT_TLS); TEST_ASSERT_EQUAL(NSAPI_ERROR_AUTH_FAILURE, sock.connect(a)); TEST_ASSERT_EQUAL(NSAPI_ERROR_OK, sock.close()); } #endif // defined(MBEDTLS_SSL_CLI_C)
{ "pile_set_name": "Github" }
<a href='http://github.com/angular/angular.js/edit/master/docs/content/error/$sce/iequirks.ngdoc' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit">&nbsp;</i>Improve this doc</a> <h1>Error: $sce:iequirks <div><span class='hint'>IE8 in quirks mode is unsupported</span></div> </h1> <div> <pre class="minerr-errmsg" error-display="Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.">Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.</pre> </div> <h2>Description</h2> <div class="description"> <p>This error occurs when you are using AngularJS with <a href="api/ng/service/$sce">Strict Contextual Escaping (SCE)</a> mode enabled (the default) on IE8 or lower in quirks mode.</p> <p>In this mode, IE8 allows one to execute arbitrary javascript by the use of the <code>expression()</code> syntax and is not supported. Refer <a href="http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx">MSDN Blogs &gt; IEBlog &gt; Ending Expressions</a> to learn more about them.</p> <p>To resolve this error please specify the proper doctype at the top of your main html document:</p> <pre><code>&lt;!doctype html&gt;</code></pre> </div>
{ "pile_set_name": "Github" }
"use strict"; ////////////////////////////////////////// // Prey JS FileRetrieval // (C) 2019 Prey, Inc. // by Mauricio Schneider and Javier Acuña - http://preyproject.com // GPLv3 Licensed ////////////////////////////////////////// var fs = require('fs'), path = require('path'), needle = require('needle'), common = require('./../../common'), files = require('./storage'), Emitter = require('events').EventEmitter; var system = common.system, run_as_user = common.system.run_as_user, node_bin = path.join(system.paths.current, 'bin', 'node'), os_name = process.platform.replace('darwin', 'mac').replace('win32', 'windows'), logger = common.logger; var config = common.config, protocol = config.get('control-panel.protocol'), host = config.get('control-panel.host'), url = protocol + '://' + host; var UPLOAD_SERVER = url + '/upload/upload'; var em, cp; var path_arg, name_arg; // check_pending_files is used to resume any files that might been pending. It's called from // filesagent/providers/network. var retrieve_file_as_user = function(options, cb) { if (os_name == 'windows') { path_arg = path.resolve(options.path); name_arg = path.resolve(options.name); } else { path_arg = '"' + options.path + '"'; name_arg = '"' + options.name + '"'; } var opts = { user: options.user, bin: node_bin, type: 'exec', args: [path.join(__dirname, 'upload.js'), path_arg, options.user, name_arg, options.size, options.file_id, options.total, options.port], opts: { env: process.env } }; run_as_user(opts, function(err, out) { if (err) { logger.error("Upload error: " + err.message); return; } logger.info("Ran as user: " + out); if (out.indexOf("File succesfuly uploaded") != -1) { files.del(options.file_id); return; } if (out.includes("EPIPE") || out.includes("EACCES")) { files.update(options.file_id, options.path, options.size, options.user, options.name, options.resumable, function(err) { if (err) logger.error("Database update error"); logger.info("Resume file option activated for ID: " + options.file_id); }); } }); } exports.check_pending_files = function() { files.run_stored(host); } exports.start = function(options, cb) { var url = UPLOAD_SERVER + '?uploadID=' + options.file_id; // Make a call to get the last byte processed by the upload server // in order to resume the upload from that position. needle.request('get', url, null, function(err, res) { if (err) { console.log(err); return; } if (res.statusCode == 404) { files.del(options.file_id); return; } var data = JSON.parse(res.body); var file_status = JSON.parse(res.body).Status options.total = data.Total; if (file_status == 0 || file_status == 4) { // File in progress(0) or Pending(4) files.exist(options.file_id, function(err, exist) { if (!exist) { options.resumable = false; options.total = 0; files.store(options.file_id, options.path, options.size, options.user, options.name, options.resumable); retrieve_file_as_user(options); } else { setTimeout(function() { if (options.resumable) { files.update(options.file_id, options.path, options.size, options.user, options.name, options.resumable, function(err) { if (err) logger.error("Database update error"); logger.info("Resume file option deactivated for ID: " + options.file_id); retrieve_file_as_user(options); }); } }, 2000); } }) } else { if (file_status == 1) logger.debug("File already uploaded, deleting from db..."); else logger.debug("File cancelled or with an error, deleting from db..."); files.del(options.file_id); return; } }) em = em || new Emitter(); if (cb) cb(null, em); em.emit('end'); } exports.stop = function() { if (cp && !cp.exitCode) { cp.kill(); } }
{ "pile_set_name": "Github" }
[Scheme] Name=Base16-Horizon Light ColorForeground=#403C3D ColorBackground=#FDF0ED ColorCursor=x ColorBoldIsBright=FALSE ColorPalette=#FDF0ED;#E95678;#29D398;#FADAD1;#26BBD9;#EE64AC;#59E1E3;#403C3D;#BDB3B1;#E95678;#29D398;#FADAD1;#26BBD9;#EE64AC;#59E1E3;#201C1D
{ "pile_set_name": "Github" }
/*! \ingroup PkgTriangulation3Concepts \cgalConcept \cgalRefines SpatialSortingTraits_3 The concept `TriangulationTraits_3` is the first template parameter of the class `Triangulation_3`. It defines the geometric objects (points, segments, triangles and tetrahedra) forming the triangulation together with a few geometric predicates and constructions on these objects: lexicographical comparison, orientation in case of coplanar points and orientation in space. \cgalHasModel All models of `Kernel`. \sa `CGAL::Triangulation_3` */ class TriangulationTraits_3 { public: /// \name Types /// @{ /*! The point type. It must be `DefaultConstructible`, `CopyConstructible` and `Assignable`. */ typedef unspecified_type Point_3; /*! The segment type. */ typedef unspecified_type Segment_3; /*! The triangle type. */ typedef unspecified_type Triangle_3; /*! The tetrahedron type. */ typedef unspecified_type Tetrahedron_3; /*! A constructor object that must provide the function operator `Point_3 operator()(Point_3 p)`, which simply returns p. \note It is advised to return a const reference to `p` to avoid useless copies. \note This peculiar requirement is necessary because `CGAL::Triangulation_3` internally manipulates points with a `Point` type that is not always `Point_3`. */ /* For example, `CGAL::Regular_triangulation_3` inherits `CGAL::Triangulation_3` with `Point` being a three-dimensional weighted point. Since some predicates and constructors (such as `Orientation_3`) can only use `Point_3` objects in arguments, it is necessary to convert objects of type `Point` to objects of type `Point_3` before calling these functions, using the kernel functor `Construct_point_3`. In the setting of a basic triangulation, `Point` and `Point_3` are identical and so `Construct_point_3` is simply the identity. Refinements of this concept will require more significant overloads to the `Construct_point_3` functor. */ typedef unspecified_type Construct_point_3; /*! A constructor object that must provide the function operator `Segment_3 operator()(Point_3 p, Point_3 q)`, which constructs a segment from two points. */ typedef unspecified_type Construct_segment_3; /*! A constructor object that must provide the function operator `Triangle_3 operator()(Point_3 p, Point_3 q, Point_3 r )`, which constructs a triangle from three points. */ typedef unspecified_type Construct_triangle_3; /*! A constructor object that must provide the function operator `Tetrahedron_3 operator()(Point_3 p, Point_3 q, Point_3 r, Point_3 s)`, which constructs a tetrahedron from four points. */ typedef unspecified_type Construct_tetrahedron_3; /*! A predicate object that must provide the function operator `Comparison_result operator()(Point_3 p, Point_3 q)`, which returns `EQUAL` if the two points are equal. Otherwise it must return a consistent order for any two points chosen in a same line. */ typedef unspecified_type Compare_xyz_3; /*! A predicate object that must provide the function operator `Orientation operator()(Point_3 p, Point_3 q, Point_3 r)`, which returns `COLLINEAR` if the points are collinear. Otherwise it must return a consistent orientation for any three points chosen in a same plane. */ typedef unspecified_type Coplanar_orientation_3; /*! A predicate object that must provide the function operator `Orientation operator()(Point_3 p, Point_3 q, Point_3 r, Point_3 s)`, which returns POSITIVE, if `s` lies on the positive side of the oriented plane `h` defined by `p`, `q`, and `r`, returns NEGATIVE if `s` lies on the negative side of `h`, and returns COPLANAR if `s` lies on `h`. */ typedef unspecified_type Orientation_3; /// @} /// \name Creation /// @{ /*! Default constructor. */ Triangulation_traits_3(); /*! Copy constructor. */ Triangulation_traits_3(const Triangulation_traits_3 & tr); /// @} /// \name Operations /// The following functions give access to the predicate and construction objects: /// @{ /*! */ Construct_point_3 construct_point_3_object(); /*! */ Construct_segment_3 construct_segment_3_object(); /*! */ Construct_triangle_3 construct_triangle_3_object(); /*! */ Construct_tetrahedron_3 construct_tetrahedron_3_object(); /*! */ Compare_xyz_3 compare_xyz_3_object(); /*! */ Coplanar_orientation_3 coplanar_orientation_3_object(); /*! */ Orientation_3 orientation_3_object(); /// @} }; /* end TriangulationTraits_3 */
{ "pile_set_name": "Github" }
$(document).ready(function() { $(document).on('click', '#task_difficulty_dropdown>li>a', function() { var difficulty = $(this).attr('data-difficulty'); var options = { url: base_url + "project/" + project_id + "/task/" + task_id + "/difficulty", success: function(data){ osmtm.project.loadTask(task_id); if (data.msg) { $('#task_msg').html(data.msg).show() .delay(3000) .fadeOut(); } } }; if (difficulty == "0") { options.type = "DELETE"; } else { options.url += '/' + difficulty; } $.ajax(options); return false; }); });
{ "pile_set_name": "Github" }
locktorture.torture_type=rw_lock
{ "pile_set_name": "Github" }
mkv mpv avi mp4 mpeg mov m4v svi ogv webm vob flv wmv qt
{ "pile_set_name": "Github" }
<div class="highlight"> <pre><span></span><span class="linenos"> 8</span><span class="c1"># a</span> <span class="linenos"> 9</span><span class="c1"># b</span> <span class="linenos">10</span><span class="c1"># c</span> </pre> </div>
{ "pile_set_name": "Github" }
#include "gwion_util.h" #include "gwion_ast.h" #include "gwion_env.h" #include "vm.h" #include "instr.h" #include "object.h" #include "traverse.h" #include "template.h" #include "gwion.h" #include "operator.h" #include "import.h" #include "parse.h" #include "match.h" #include "emit.h" #include "specialid.h" ANN static m_bool check_stmt_list(const Env env, Stmt_List list); ANN m_bool check_class_def(const Env env, const Class_Def class_def); ANN static m_bool check_internal(const Env env, const Symbol sym, const Exp e, const Type t) { struct Implicit imp = { .e=e, .t=t, .pos=e->pos }; struct Op_Import opi = { .op=sym, .lhs=e->info->type, .rhs=t, .data=(uintptr_t)&imp, .pos=e->pos, .op_type=op_implicit }; CHECK_OB(op_check(env, &opi)) assert(e->info->nspc); return GW_OK; } ANN m_bool check_implicit(const Env env, const Exp e, const Type t) { if(e->info->type == t) return GW_OK; const Symbol sym = insert_symbol("@implicit"); return check_internal(env, sym, e, t); } ANN m_bool check_subscripts(Env env, const Array_Sub array, const m_bool is_decl) { CHECK_OB(check_exp(env, array->exp)) m_uint depth = 0; Exp e = array->exp; do if(is_decl) CHECK_BB(check_implicit(env, e, env->gwion->type[et_int])) while(++depth && (e = e->next)); if(depth != array->depth) ERR_B(array->exp->pos, _("invalid array acces expression.")) return GW_OK; } ANN static inline m_bool check_exp_decl_parent(const Env env, const Var_Decl var) { const Value value = find_value(env->class_def->e->parent, var->xid); if(value) ERR_B(var->pos, _("in class '%s': '%s' has already been defined in parent class '%s' ..."), env->class_def->name, s_name(var->xid), value->from->owner_class ? value->from->owner_class->name : "?") return GW_OK; } #define describe_check_decl(a, b) \ ANN static inline void decl_##a(const Env env, const Value v) { \ const Nspc nspc = env->curr;\ SET_FLAG(v, a); \ v->from->offset = nspc->info->b; \ nspc->info->b += v->type->size; \ } describe_check_decl(member, offset) describe_check_decl(static, class_data_size) ANN static m_bool check_fptr_decl(const Env env, const Var_Decl var) { const Value v = var->value; Type t = v->type; while(GET_FLAG(t, typedef)) t = t->e->parent; if(!t->e->d.func) return GW_ERROR; if(!env->class_def) return GW_OK; const Func func = t->e->d.func; const Type type = func->value_ref->from->owner_class; if(type && isa(type, env->class_def) < 0 && !GET_FLAG(func, global)) ERR_B(var->pos, _("can't use non global fptr of other class.")) if(GET_FLAG(func, member) && GET_FLAG(v, static)) ERR_B(var->pos, _("can't use static variables for member function.")) return GW_OK; } ANN static inline m_bool check_td_exp(const Env env, Type_Decl *td) { RET_NSPC(traverse_exp(env, td->exp)) } ANN Type check_td(const Env env, Type_Decl *td) { CHECK_BO(check_td_exp(env, td)) const Type t = actual_type(env->gwion, td->exp->info->type); assert(t); if(GET_FLAG(t, template) && !GET_FLAG(t, ref)) ERR_O(td_pos(td), _("type '%s' needs template types"), t->name) td->xid = insert_symbol("auto"); return t; } ANN static Type no_xid(const Env env, const Exp_Decl *decl) { CHECK_OO((((Exp_Decl*)decl)->type = check_td(env, decl->td))) CHECK_BO(traverse_exp(env, exp_self(decl))) return decl->type; } ANN static m_bool check_var(const Env env, const Var_Decl var) { if(env->class_def && !env->scope->depth && env->class_def->e->parent) CHECK_BB(check_exp_decl_parent(env, var)) if(var->array && var->array->exp) return check_subscripts(env, var->array, 1); return GW_OK; } ANN static m_bool check_var_td(const Env env, const Var_Decl var, Type_Decl *const td) { const Value v = var->value; if(env->class_def) { if(GET_FLAG(td, member)) { decl_member(env, v); if(env->class_def->e->tuple) tuple_info(env, v); } else if(GET_FLAG(td, static)) decl_static(env, v); } return GW_OK; } ANN static m_bool check_decl(const Env env, const Exp_Decl *decl) { Var_Decl_List list = decl->list; do { const Var_Decl var = list->self; CHECK_BB(check_var(env, var)) CHECK_BB(check_var_td(env, var, decl->td)) if(is_fptr(env->gwion, decl->type)) CHECK_BB(check_fptr_decl(env, var)) SET_FLAG(var->value, valid | ae_flag_used); nspc_add_value(env->curr, var->xid, var->value); } while((list = list->next)); return GW_OK; } ANN static inline m_bool ensure_check(const Env env, const Type t) { struct EnvSet es = { .env=env, .data=env, .func=(_exp_func)check_cdef, .scope=env->scope->depth, .flag=ae_flag_check }; return envset_run(&es, t); } ANN m_bool ensure_traverse(const Env env, const Type t) { struct EnvSet es = { .env=env, .data=env, .func=(_exp_func)traverse_cdef, .scope=env->scope->depth, .flag=ae_flag_check }; return envset_run(&es, t); } ANN static inline m_bool inferable(const Env env, const Type t, const loc_t pos) { if(!GET_FLAG(t, infer)) return GW_OK; ERR_B(pos, _("can't infer type.")) } ANN static Type_Decl* type2td(const Env env, const Type t, const loc_t loc); ANN Type check_exp_decl(const Env env, const Exp_Decl* decl) { if(!decl->td->xid) return no_xid(env, decl); if(decl->td->xid == insert_symbol("auto")) { // should be better SET_FLAG(decl->td, ref); CHECK_BO(scan1_exp(env, exp_self(decl))) CHECK_BO(scan2_exp(env, exp_self(decl))) } if(!decl->type) ERR_O(td_pos(decl->td), _("can't find type")); { const Type t = get_type(decl->type); CHECK_BO(inferable(env, t, td_pos(decl->td))) if(!GET_FLAG(t, check) && t->e->def) CHECK_BO(ensure_check(env, t)) } const m_bool global = GET_FLAG(decl->td, global); const m_uint scope = !global ? env->scope->depth : env_push_global(env); const m_bool ret = check_decl(env, decl); if(global) env_pop(env, scope); return ret > 0 ? decl->list->self->value->type : NULL; } ANN static inline void set_cast(const Env env, Type type, const Exp e) { e->info->cast_to = type; e->info->nspc = env->curr; } ANN static m_bool prim_array_inner(const Env env, Type type, const Exp e) { const Type common = find_common_anc(e->info->type, type); if(common) return GW_OK; if(check_implicit(env, e, type) < 0) ERR_B(e->pos, _("array init [...] contains incompatible types ...")) set_cast(env, type, e); // ??? return GW_OK; } ANN static inline Type prim_array_match(const Env env, Exp e) { const Type type = e->info->type; do CHECK_BO(prim_array_inner(env, type, e)) while((e = e->next)); return array_type(env, array_base(type), type->array_depth + 1); } ANN static Type check_prim_array(const Env env, const Array_Sub *data) { const Array_Sub array = *data; const Exp e = array->exp; if(!e) ERR_O(prim_pos(data), _("must provide values/expressions for array [...]")) CHECK_OO(check_exp(env, e)) return (array->type = prim_array_match(env, e)); } ANN static m_bool check_range(const Env env, Range *range) { if(range->start) CHECK_OB(check_exp(env, range->start)) if(range->end) CHECK_OB(check_exp(env, range->end)) if(range->start && range->end) { if(isa(range->end->info->type, range->start->info->type) < 0) ERR_B(range->start->pos, _("range types do not match")) } return GW_OK; } ANN static Type check_prim_range(const Env env, Range **data) { Range *range = *data; CHECK_BO(check_range(env, range)) const Exp e = range->start ?: range->end; const Symbol sym = insert_symbol("@range"); struct Op_Import opi = { .op=sym, .rhs=e->info->type, .pos=e->pos, .data=(uintptr_t)prim_exp(data), .op_type=op_exp }; return op_check(env, &opi); } ANN m_bool not_from_owner_class(const Env env, const Type t, const Value v, const loc_t pos) { if(!v->from->owner_class || isa(t, v->from->owner_class) < 0) { ERR_B(pos, _("'%s' from owner namespace '%s' used in '%s'."), v->name, v->from->owner ? v->from->owner->name : "?", t->name) } return GW_OK; } ANN static Value check_non_res_value(const Env env, const Symbol *data) { const Symbol var = *data; const Value value = nspc_lookup_value1(env->curr, var); if(env->class_def) { if(value && value->from->owner_class) CHECK_BO(not_from_owner_class(env, env->class_def, value, prim_pos(data))) const Value v = value ?: find_value(env->class_def, var); if(v) { if(env->func && GET_FLAG(env->func->def->base, static) && GET_FLAG(v, member)) ERR_O(prim_pos(data), _("non-static member '%s' used from static function."), s_name(var)) } return v; } else if(SAFE_FLAG(env->class_def, global) || (env->func && GET_FLAG(env->func->def->base, global))) { if(!SAFE_FLAG(value, abstract)) ERR_O(prim_pos(data), _("non-global variable '%s' used from global function/class."), s_name(var)) } return value; } ANN Exp symbol_owned_exp(const Gwion gwion, const Symbol *data); ANN static Type check_dot(const Env env, const Exp_Dot *member) { struct Op_Import opi = { .op=insert_symbol("@dot"), .lhs=member->t_base, .data=(uintptr_t)member, .pos=exp_self(member)->pos, .op_type=op_dot }; return op_check(env, &opi); } static inline Nspc value_owner(const Value v) { return v ? v->from->owner : NULL; } ANN static m_bool lambda_valid(const Env env, const Exp_Primary* exp) { const Value val = exp->value; const Symbol sym = insert_symbol(val->name); const Vector vec = (Vector)&env->curr->info->value->ptr; const m_uint scope = map_get(&env->curr->info->func->map, (m_uint)env->func->def->base); if(GET_FLAG(val, abstract)) return GW_OK; if(val->from->owner_class && isa(val->from->owner_class, env->class_def) > 0) return GW_OK; const m_uint sz = vector_size(vec); for(m_uint i = scope; i < sz; ++i) { const Map map = (Map)vector_at(vec, i); if(map_get(map, (m_uint)sym)) return GW_OK; } ERR_B(exp_self(exp)->pos, _("variable '%s' is not in lambda scope"), val->name) } ANN static Type prim_id_non_res(const Env env, const Symbol *data) { const Symbol sym = *data; const Value v = check_non_res_value(env, data); if(!v || !GET_FLAG(v, valid) || (v->from->ctx && v->from->ctx->error)) { env_err(env, prim_pos(data), _("variable %s not legit at this point."), s_name(sym)); if(v) did_you_mean_nspc(value_owner(v) ?: env->curr, s_name(sym)); return NULL; } prim_self(data)->value = v; if(env->func) { if(GET_FLAG(env->func->def->base, abstract)) CHECK_BO(lambda_valid(env, prim_self(data))) if(env->func && !GET_FLAG(v, const) && v->from->owner) UNSET_FLAG(env->func, pure); } SET_FLAG(v, used); if(GET_FLAG(v, const)) exp_setmeta(prim_exp(data), 1); if(v->from->owner_class) { const Exp exp = symbol_owned_exp(env->gwion, data); const Type ret = check_dot(env, &exp->d.exp_dot); prim_exp(data)->info->nspc = exp->info->nspc; free_exp(env->gwion->mp, exp); CHECK_OO(ret); } return v->type; } ANN Type check_prim_str(const Env env, const m_str *data) { if(!prim_self(data)->value) prim_self(data)->value = global_string(env, *data); return env->gwion->type[et_string];// prim->value } ANN static Type check_prim_id(const Env env, const Symbol *data) { struct SpecialId_ * spid = specialid_get(env->gwion, *data); if(spid) return specialid_type(env, spid, prim_self(data)); return prim_id_non_res(env, data); } ANN static Type check_prim_typeof(const Env env, const Exp *exp) { const Exp e = *exp; DECL_OO(const Type, t, = check_exp(env, e)) CHECK_BO(inferable(env, t, (*exp)->pos)) const Type force = force_type(env, t); return type_class(env->gwion, force); } ANN static Type check_prim_interp(const Env env, const Exp* exp) { CHECK_OO(check_exp(env, *exp)) return env->gwion->type[et_string]; } ANN static Type check_prim_hack(const Env env, const Exp *data) { if(env->func) UNSET_FLAG(env->func, pure); CHECK_OO(check_prim_interp(env, data)) return env->gwion->type[et_gack]; } #define describe_prim_xxx(name, type) \ ANN static Type check##_prim_##name(const Env env NUSED, const union prim_data* data NUSED) {\ return type; \ } describe_prim_xxx(num, env->gwion->type[et_int]) describe_prim_xxx(char, env->gwion->type[et_char]) describe_prim_xxx(float, env->gwion->type[et_float]) describe_prim_xxx(nil, env->gwion->type[et_void]) #define check_prim_complex check_prim_vec #define check_prim_polar check_prim_vec #define check_prim_char check_prim_char DECL_PRIM_FUNC(check, Type, Env); ANN static Type check_prim(const Env env, Exp_Primary *prim) { return exp_self(prim)->info->type = check_prim_func[prim->prim_type](env, &prim->d); } ANN Type check_array_access(const Env env, const Array_Sub array) { const Symbol sym = insert_symbol("@array"); struct Op_Import opi = { .op=sym, .lhs=array->exp->info->type, .rhs=array->type, .pos=array->exp->pos, .data=(uintptr_t)array, .op_type=op_array }; return op_check(env, &opi); } static ANN Type check_exp_array(const Env env, const Exp_Array* array) { CHECK_OO((array->array->type = check_exp(env, array->base))) CHECK_BO(check_subscripts(env, array->array, 0)) return check_array_access(env, array->array); } static ANN Type check_exp_slice(const Env env, const Exp_Slice* range) { CHECK_OO(check_exp(env, range->base)) CHECK_BO(check_range(env, range->range)) const Symbol sym = insert_symbol("@slice"); const Exp e = range->range->start ?: range->range->end; struct Op_Import opi = { .op=sym, .lhs=e->info->type, .rhs=range->base->info->type, .pos=e->pos, .data=(uintptr_t)exp_self(range), .op_type=op_exp }; return op_check(env, &opi); } ANN2(1,2,4) static Type_Decl* prepend_type_decl(MemPool mp, const Symbol xid, Type_Decl* td, const loc_t pos) { Type_Decl *a = new_type_decl(mp, xid, loc_cpy(mp, pos)); a->next = td; return a; } ANN static Type_List mk_type_list(const Env env, const Type type, const loc_t pos) { struct Vector_ v; vector_init(&v); vector_add(&v, (vtype)insert_symbol(type->name)); Type owner = type->e->owner_class; while(owner) { vector_add(&v, (vtype)insert_symbol(owner->name)); owner = owner->e->owner_class; } Type_Decl *td = NULL; for(m_uint i = 0 ; i < vector_size(&v); ++i) td = prepend_type_decl(env->gwion->mp, (Symbol)vector_at(&v, i), td, pos); vector_release(&v); return new_type_list(env->gwion->mp, td, NULL); } ANN static m_bool func_match_inner(const Env env, const Exp e, const Type t, const m_bool implicit, const m_bool specific) { const m_bool match = (specific ? e->info->type == t : isa(e->info->type, t) > 0); if(!match) { if(e->info->type == env->gwion->type[et_lambda] && is_fptr(env->gwion, t)) { exp_setvar(e, 1); return check_lambda(env, t, &e->d.exp_lambda); } if(implicit) return check_implicit(env, e, t); } return match ? 1 : -1; } ANN2(1,2) static Func find_func_match_actual(const Env env, Func func, const Exp args, const m_bool implicit, const m_bool specific) { do { Exp e = args; Arg_List e1 = func->def->base->args; while(e) { if(!e1) { if(GET_FLAG(func->def->base, variadic)) return func; CHECK_OO(func->next); return find_func_match_actual(env, func->next, args, implicit, specific); } if(e1->type == env->gwion->type[et_undefined] || (func->def->base->tmpl && is_fptr(env->gwion, func->value_ref->type) > 0)) { const Type owner = func->value_ref->from->owner_class; if(owner) CHECK_BO(template_push(env, owner)) e1->type = known_type(env, e1->td); if(owner) nspc_pop_type(env->gwion->mp, env->curr); CHECK_OO(e1->type) } if(func_match_inner(env, e, e1->type, implicit, specific) < 0) break; e = e->next; e1 = e1->next; } if(!e1) return func; } while((func = func->next)); return NULL; } ANN2(1, 2) static Func find_func_match(const Env env, const Func up, const Exp exp) { Func func; const Exp args = (exp && isa(exp->info->type, env->gwion->type[et_void]) < 0) ? exp : NULL; if((func = find_func_match_actual(env, up, args, 0, 1)) || (func = find_func_match_actual(env, up, args, 1, 1)) || (func = find_func_match_actual(env, up, args, 0, 0)) || (func = find_func_match_actual(env, up, args, 1, 0))) return func; return NULL; } ANN static m_bool check_call(const Env env, const Exp_Call* exp) { ae_exp_t et = exp->func->exp_type; if(et != ae_exp_primary && et != ae_exp_dot && et != ae_exp_cast) ERR_B(exp->func->pos, _("invalid expression for function call.")) CHECK_OB(check_exp(env, exp->func)) if(exp->args) CHECK_OB(check_exp(env, exp->args)) return GW_OK; } ANN static inline Value template_get_ready(const Env env, const Value v, const m_str tmpl, const m_uint i) { const Symbol sym = func_symbol(env, v->from->owner->name, v->name, tmpl, i); return v->from->owner_class ? find_value(v->from->owner_class, sym) : nspc_lookup_value1(v->from->owner, sym); } ANN m_bool check_traverse_fdef(const Env env, const Func_Def fdef) { struct Vector_ v = {}; const m_uint scope = env->scope->depth; env->scope->depth = 1; vector_init(&v); while(vector_size((Vector)&env->curr->info->value->ptr) > 1) vector_add(&v, vector_pop((Vector)&env->curr->info->value->ptr)); const m_bool ret = traverse_func_def(env, fdef); for(m_uint i = vector_size(&v) + 1; --i;) vector_add((Vector)&env->curr->info->value->ptr, vector_at(&v, i-1)); vector_release(&v); env->scope->depth = scope; return ret; } ANN static Func ensure_tmpl(const Env env, const Func_Def fdef, const Exp_Call *exp) { const m_bool ret = GET_FLAG(fdef->base, valid) || check_traverse_fdef(env, fdef) > 0; if(ret) { const Func f = fdef->base->func; const Func next = f->next; f->next = NULL; const Func func = find_func_match(env, f, exp->args); f->next = next; if(func) { SET_FLAG(func, valid | ae_flag_template); return func; } } return NULL; } ANN static m_bool check_func_args(const Env env, Arg_List arg_list) { do { const Var_Decl decl = arg_list->var_decl; const Value v = decl->value; if(arg_list->td && !arg_list->td->xid) CHECK_OB((arg_list->type = v->type = check_td(env, arg_list->td))) // TODO: use coumpound instead of object? if(isa(v->type, env->gwion->type[et_object]) > 0 || isa(v->type, env->gwion->type[et_function]) > 0) UNSET_FLAG(env->func, pure); CHECK_BB(already_defined(env, decl->xid, decl->pos)) SET_FLAG(v, valid); nspc_add_value(env->curr, decl->xid, v); } while((arg_list = arg_list->next)); return GW_OK; } ANN static Func _find_template_match(const Env env, const Value v, const Exp_Call* exp) { CHECK_BO(check_call(env, exp)) const Type_List types = exp->tmpl->call; Func m_func = NULL, former = env->func; DECL_OO(const m_str, tmpl_name, = tl2str(env, types)) const m_uint scope = env->scope->depth; struct EnvSet es = { .env=env, .data=env, .func=(_exp_func)check_cdef, .scope=scope, .flag=ae_flag_check }; CHECK_BO(envset_push(&es, v->from->owner_class, v->from->owner)) (void)env_push(env, v->from->owner_class, v->from->owner); if(is_fptr(env->gwion, v->type)) { const Symbol sym = func_symbol(env, v->from->owner->name, v->name, tmpl_name, 0); const Type exists = nspc_lookup_type0(v->from->owner, sym); if(exists) m_func = exists->e->d.func; else { Func_Def base = v->d.func_ref ? v->d.func_ref->def : exp->func->info->type->e->d.func->def; Func_Base *fbase = cpy_func_base(env->gwion->mp, base->base); fbase->xid = sym; fbase->tmpl->base = 0; fbase->tmpl->call = cpy_type_list(env->gwion->mp, types); if(template_push_types(env, fbase->tmpl) > 0) { const Fptr_Def fptr = new_fptr_def(env->gwion->mp, fbase); if(traverse_fptr_def(env, fptr) > 0 && (base->base->ret_type = known_type(env, base->base->td)) && (!exp->args || !!check_exp(env, exp->args))) { m_func = find_func_match(env, fbase->func, exp->args); nspc_pop_type(env->gwion->mp, env->curr); if(m_func) nspc_add_type_front(v->from->owner, sym, actual_type(env->gwion, m_func->value_ref->type)); } free_fptr_def(env->gwion->mp, fptr); if(fptr->type) REM_REF(fptr->type, env->gwion) } } } else { for(m_uint i = 0; i < v->from->offset + 1; ++i) { const Value exists = template_get_ready(env, v, tmpl_name, i); if(exists) { if(env->func == exists->d.func_ref) { if(check_call(env, exp) < 0 || !find_func_match(env, env->func, exp->args)) continue; m_func = env->func; break; } if((m_func = ensure_tmpl(env, exists->d.func_ref->def, exp))) break; } else { const Value value = template_get_ready(env, v, "template", i); if(!value) continue; if(GET_FLAG(v, builtin)) { SET_FLAG(value, builtin); SET_FLAG(value->d.func_ref, builtin); } const Func_Def fdef = (Func_Def)cpy_func_def(env->gwion->mp, value->d.func_ref->def); SET_FLAG(fdef->base, template); fdef->base->tmpl->call = cpy_type_list(env->gwion->mp, types); fdef->base->tmpl->base = i; if((m_func = ensure_tmpl(env, fdef, exp))) break; } } } free_mstr(env->gwion->mp, tmpl_name); if(es.run) envset_pop(&es, v->from->owner_class); env_pop(env, scope); env->func = former; return m_func; } ANN Func find_template_match(const Env env, const Value value, const Exp_Call* exp) { const Func f = _find_template_match(env, value, exp); if(f) return f; Type t = value->from->owner_class; while(t && t->nspc) { Func_Def fdef = value->d.func_ref ? value->d.func_ref->def : value->type->e->d.func->def; const Value v = nspc_lookup_value0(t->nspc, fdef->base->xid); if(!v) goto next; const Func f = _find_template_match(env, v, exp); if(f) return f; next: t = t->e->parent; } ERR_O(exp_self(exp)->pos, _("arguments do not match for template call")) } #define next_arg(type) \ ANN static inline type next_arg_##type(const type e) { \ const type next = e->next; \ if(next) \ gw_err(","); \ return next; \ } next_arg(Exp) next_arg(Arg_List) ANN static void print_current_args(Exp e) { gw_err(_("and not\n ")); do gw_err(" \033[32m%s\033[0m", e->info->type->name); while((e = next_arg_Exp(e))); gw_err("\n"); } ANN static void print_arg(Arg_List e) { do gw_err(" \033[32m%s\033[0m \033[1m%s\033[0m", e->type ? e->type->name : NULL, e->var_decl->xid ? s_name(e->var_decl->xid) : ""); while((e = next_arg_Arg_List(e))); } ANN2(1) static void function_alternative(const Env env, const Type f, const Exp args, const loc_t pos){ env_err(env, pos, _("argument type(s) do not match for function. should be :")); Func up = f->e->d.func; do { gw_err("(%s) ", up->name); const Arg_List e = up->def->base->args; if(e) print_arg(e); else gw_err("\033[32mvoid\033[0m"); gw_err("\n"); } while((up = up->next)); if(args) print_current_args(args); else gw_err(_("and not:\n \033[32mvoid\033[0m\n")); } ANN static m_uint get_type_number(ID_List list) { m_uint type_number = 0; do ++type_number; while((list = list->next)); return type_number; } ANN static Func get_template_func(const Env env, const Exp_Call* func, const Value v) { const Func f = find_template_match(env, v, func); if(f) { // copy that tmpl->call? Tmpl* tmpl = new_tmpl_call(env->gwion->mp, func->tmpl->call); tmpl->list = v->d.func_ref ? v->d.func_ref->def->base->tmpl->list : func->func->info->type->e->d.func->def->base->tmpl->list; ((Exp_Call*)func)->tmpl = tmpl; return ((Exp_Call*)func)->m_func = f; } ((Exp_Call*)func)->tmpl = NULL; assert(exp_self(func)); ERR_O(exp_self(func)->pos, _("function is template. automatic type guess not fully implemented yet.\n" " please provide template types. eg: ':[type1, type2, ...]'")) } ANN static Func predefined_func(const Env env, const Value v, Exp_Call *exp, const Tmpl *tm) { Tmpl tmpl = { .call=tm->call }; exp->tmpl = &tmpl; DECL_OO(const Func, func, = get_template_func(env, exp, v)) return v->d.func_ref = func; } ANN static Type check_predefined(const Env env, Exp_Call *exp, const Value v, const Tmpl *tm, const Func_Def fdef) { DECL_OO(const Func, func, = v->d.func_ref ?: predefined_func(env, v, exp, tm)) if(!fdef->base->ret_type) { // template fptr struct EnvSet es = { .env=env, .data=env, .func=(_exp_func)check_cdef, .scope=env->scope->depth, .flag=ae_flag_check }; CHECK_BO(envset_push(&es, v->from->owner_class, v->from->owner)) SET_FLAG(func->def->base, typedef); const m_bool ret = check_traverse_fdef(env, func->def); if(es.run) envset_pop(&es, v->from->owner_class); CHECK_BO(ret) } exp->m_func = func; return func->def->base->ret_type; } ANN static Type_List check_template_args(const Env env, Exp_Call *exp, const Tmpl *tm, const Func_Def fdef) { m_uint args_number = 0; const m_uint type_number = get_type_number(tm->list); Type_List tl[type_number]; tl[0] = NULL; ID_List list = tm->list; while(list) { Arg_List arg = fdef->base->args; Exp template_arg = exp->args; while(arg && template_arg) { if(list->xid == arg->td->xid) { tl[args_number] = mk_type_list(env, template_arg->info->type, fdef->pos); if(args_number) tl[args_number - 1]->next = tl[args_number]; ++args_number; break; } arg = arg->next; template_arg = template_arg->next; } list = list->next; } if(args_number < type_number) ERR_O(exp->func->pos, _("not able to guess types for template call.")) return tl[0]; } ANN static Type check_exp_call_template(const Env env, Exp_Call *exp) { const Type t = exp->func->info->type; DECL_OO(const Value, value, = type_value(env->gwion, t)) const Func_Def fdef = value->d.func_ref ? value->d.func_ref->def : t->e->d.func->def; Tmpl *tm = fdef->base->tmpl; if(tm->call) return check_predefined(env, exp, value, tm, fdef); DECL_OO(const Type_List, tl, = check_template_args(env, exp, tm, fdef)); Tmpl tmpl = { .call=tl }; ((Exp_Call*)exp)->tmpl = &tmpl; DECL_OO(const Func,func, = get_template_func(env, exp, value)) return func->def->base->ret_type; } ANN static Type check_lambda_call(const Env env, const Exp_Call *exp) { if(exp->args) CHECK_OO(check_exp(env, exp->args)) Exp_Lambda *l = &exp->func->d.exp_lambda; Arg_List arg = l->def->base->args; Exp e = exp->args; while(arg && e) { arg->type = e->info->type; arg = arg->next; e = e->next; } if(arg || e) ERR_O(exp_self(exp)->pos, _("argument number does not match for lambda")) CHECK_BO(check_traverse_fdef(env, l->def)) if(env->class_def) SET_FLAG(l->def->base, member); ((Exp_Call*)exp)->m_func = l->def->base->func; return l->def->base->ret_type ?: (l->def->base->ret_type = env->gwion->type[et_void]); } ANN Type check_exp_call1(const Env env, const Exp_Call *exp) { CHECK_OO(check_exp(env, exp->func)) if(isa(exp->func->info->type, env->gwion->type[et_function]) < 0) { // use func flag? if(isa(exp->func->info->type, env->gwion->type[et_class]) < 0) ERR_O(exp->func->pos, _("function call using a non-function value")) struct Op_Import opi = { .op=insert_symbol("@ctor"), .rhs=exp->func->info->type->e->d.base_type, .data=(uintptr_t)exp, .pos=exp_self(exp)->pos, .op_type=op_exp }; const Type t = op_check(env, &opi); exp_self(exp)->info->nspc = t ? t->e->owner : NULL; return t; } if(exp->func->info->type == env->gwion->type[et_lambda]) return check_lambda_call(env, exp); if(GET_FLAG(exp->func->info->type->e->d.func, ref)) { const Value value = exp->func->info->type->e->d.func->value_ref; if(value->from->owner_class && !GET_FLAG(value->from->owner_class, check)) CHECK_BO(ensure_traverse(env, value->from->owner_class)) } if(exp->args) CHECK_OO(check_exp(env, exp->args)) if(GET_FLAG(exp->func->info->type, func)) return check_exp_call_template(env, (Exp_Call*)exp); const Func func = find_func_match(env, exp->func->info->type->e->d.func, exp->args); if((exp_self(exp)->d.exp_call.m_func = func)) { exp->func->info->type = func->value_ref->type; return func->def->base->ret_type; } function_alternative(env, exp->func->info->type, exp->args, exp_self(exp)->pos); return NULL; } ANN static Type check_exp_binary(const Env env, const Exp_Binary* bin) { CHECK_OO(check_exp(env, bin->lhs)) const m_bool is_auto = bin->rhs->exp_type == ae_exp_decl && bin->rhs->d.exp_decl.type == env->gwion->type[et_auto]; if(is_auto) bin->rhs->d.exp_decl.type = bin->lhs->info->type; CHECK_OO(check_exp(env, bin->rhs)) if(is_auto) bin->rhs->info->type = bin->lhs->info->type; struct Op_Import opi = { .op=bin->op, .lhs=bin->lhs->info->type, .rhs=bin->rhs->info->type, .data=(uintptr_t)bin, .pos=exp_self(bin)->pos, .op_type=op_binary }; const Type ret = op_check(env, &opi); if(!ret && is_auto && exp_self(bin)->exp_type == ae_exp_binary) bin->rhs->d.exp_decl.list->self->value->type = env->gwion->type[et_auto]; return ret; } ANN static Type check_exp_cast(const Env env, const Exp_Cast* cast) { DECL_OO(const Type, t, = check_exp(env, cast->exp)) CHECK_OO((exp_self(cast)->info->type = cast->td->xid ? known_type(env, cast->td) : check_td(env, cast->td))) struct Op_Import opi = { .op=insert_symbol("$"), .lhs=t, .rhs=exp_self(cast)->info->type, .data=(uintptr_t)cast, .pos=exp_self(cast)->pos, .op_type=op_cast }; return op_check(env, &opi); } ANN static Type check_exp_post(const Env env, const Exp_Postfix* post) { struct Op_Import opi = { .op=post->op, .lhs=check_exp(env, post->exp), .data=(uintptr_t)post, .pos=exp_self(post)->pos, .op_type=op_postfix }; CHECK_OO(opi.lhs) const Type t = op_check(env, &opi); if(t && isa(t, env->gwion->type[et_object]) < 0) exp_setmeta(exp_self(post), 1); return t; } ANN static m_bool predefined_call(const Env env, const Type t, const loc_t pos) { const m_str str = tl2str(env, t->e->d.func->def->base->tmpl->call); env_err(env, pos, _("Type '%s' has '%s' as pre-defined types."), t->name, str); free_mstr(env->gwion->mp, str); if(GET_FLAG(t, typedef)) { loc_header(t->e->d.func->def->pos, env->name); gw_err(_("from definition:\n")); loc_err(t->e->d.func->def->pos, env->name); } return GW_ERROR; } ANN static Type check_exp_call(const Env env, Exp_Call* exp) { if(exp->tmpl) { CHECK_OO(check_exp(env, exp->func)) const Type t = actual_type(env->gwion, unflag_type(exp->func->info->type)); if(isa(t, env->gwion->type[et_function]) < 0) ERR_O(exp_self(exp)->pos, _("template call of non-function value.")) if(!t->e->d.func->def->base->tmpl) ERR_O(exp_self(exp)->pos, _("template call of non-template function.")) if(t->e->d.func->def->base->tmpl->call) { if(env->func == t->e->d.func) { if(exp->args) CHECK_OO(check_exp(env, exp->args)) exp->m_func = env->func; return env->func->def->base->ret_type; } else CHECK_BO(predefined_call(env, t, exp_self(exp)->pos)) } const Value v = type_value(env->gwion, t); CHECK_OO((exp->m_func = find_template_match(env, v, exp))) return exp->m_func->def->base->ret_type; } return check_exp_call1(env, exp); } ANN static Type check_exp_unary(const Env env, const Exp_Unary* unary) { struct Op_Import opi = { .op=unary->op, .rhs=unary->exp ? check_exp(env, unary->exp) : NULL, .data=(uintptr_t)unary, .pos=exp_self(unary)->pos, .op_type=op_unary }; if(unary->exp && !opi.rhs) return NULL; DECL_OO(const Type, ret, = op_check(env, &opi)) const Type t = get_type(actual_type(env->gwion, ret)); if(t->e->def && !GET_FLAG(t, check)) CHECK_BO(ensure_traverse(env, t)) return ret; } ANN static Type _flow(const Env env, const Exp e, const m_bool b) { DECL_OO(const Type, type, = check_exp(env, e)) struct Op_Import opi = { .op=insert_symbol(b ? "@conditionnal" : "@unconditionnal"), .rhs=type, .pos=e->pos, .data=(uintptr_t)e, .op_type=op_exp }; return op_check(env, &opi); } #define check_flow(emit,b) _flow(emit, b, 1) ANN static Type check_exp_if(const Env env, const Exp_If* exp_if) { DECL_OO(const Type, cond, = check_flow(env, exp_if->cond)) DECL_OO(const Type, if_exp, = (exp_if->if_exp ? check_exp(env, exp_if->if_exp) : cond)) DECL_OO(const Type, else_exp, = check_exp(env, exp_if->else_exp)) const Type ret = find_common_anc(if_exp, else_exp); if(!ret) ERR_O(exp_self(exp_if)->pos, _("incompatible types '%s' and '%s' in if expression..."), if_exp->name, else_exp->name) if(!exp_if->if_exp && isa(exp_if->cond->info->type, else_exp) < 0) ERR_O(exp_self(exp_if)->pos, _("condition type '%s' does not match '%s'"), cond->name, ret->name) if(exp_getmeta(exp_if->if_exp ?: exp_if->cond) || exp_getmeta(exp_if->else_exp)) exp_setmeta(exp_self(exp_if), 1); return ret; } ANN static Type check_exp_dot(const Env env, Exp_Dot* member) { CHECK_OO((member->t_base = check_exp(env, member->base))) return check_dot(env, member); } ANN m_bool check_type_def(const Env env, const Type_Def tdef) { return tdef->type->e->def ? check_class_def(env, tdef->type->e->def) : GW_OK; } ANN static Type check_exp_lambda(const Env env, const Exp_If* exp_if NUSED) { return env->gwion->type[et_lambda]; } DECL_EXP_FUNC(check, Type, Env) ANN Type check_exp(const Env env, const Exp exp) { Exp curr = exp; do { CHECK_OO((curr->info->type = check_exp_func[curr->exp_type](env, &curr->d))) if(env->func && isa(curr->info->type, env->gwion->type[et_lambda]) < 0 && isa(curr->info->type, env->gwion->type[et_function]) > 0 && !GET_FLAG(curr->info->type->e->d.func, pure)) UNSET_FLAG(env->func, pure); } while((curr = curr->next)); return exp->info->type; } ANN m_bool check_enum_def(const Env env, const Enum_Def edef) { if(env->class_def) { ID_List list = edef->list; do decl_static(env, nspc_lookup_value0(env->curr, list->xid)); while((list = list->next)); } return GW_OK; } ANN static m_bool check_stmt_code(const Env env, const Stmt_Code stmt) { if(stmt->stmt_list) { RET_NSPC(check_stmt_list(env, stmt->stmt_list)) } return GW_OK; } ANN static m_bool check_stmt_varloop(const Env env, const Stmt_VarLoop stmt) { CHECK_OB(check_exp(env, stmt->exp)) if(isa(stmt->exp->info->type, env->gwion->type[et_vararg]) < 0) ERR_B(stmt->exp->pos, "varloop expression type must be '%s', not '%s'", env->gwion->type[et_vararg]->name, stmt->exp->info->type->name) return check_stmt(env, stmt->body); } ANN static inline m_bool _check_breaks(const Env env, const Stmt b) { RET_NSPC(check_stmt(env, b)) } ANN static m_bool check_breaks(const Env env, const Stmt a, const Stmt b) { vector_add(&env->scope->breaks, (vtype)a); const m_bool ret = _check_breaks(env, b); vector_pop(&env->scope->breaks); return ret; } ANN static m_bool check_conts(const Env env, const Stmt a, const Stmt b) { vector_add(&env->scope->conts, (vtype)a); CHECK_BB(check_breaks(env, a, b)) vector_pop(&env->scope->conts); return GW_OK; } ANN static inline m_bool for_empty(const Env env, const Stmt_For stmt) { if(!stmt->c2 || !stmt->c2->d.stmt_exp.val) ERR_B(stmt_self(stmt)->pos, _("empty for loop condition..." "...(note: explicitly use 'true' if it's the intent)" "...(e.g., 'for(; true;){ /*...*/ }')")) return GW_OK; } // the two next function do not account for arrays. (they are only stmt_each() helpers ANN static Type_Decl* _type2td(const Env env, const Type t, Type_Decl *next) { Type_Decl *td = new_type_decl(env->gwion->mp, insert_symbol(t->name), loc_cpy(env->gwion->mp, td_pos(next))); td->next = next; return !t->e->owner_class ? td : _type2td(env, t->e->owner_class, td); } ANN static Type_Decl* type2td(const Env env, const Type t, const loc_t loc) { Type_Decl *td = new_type_decl(env->gwion->mp, insert_symbol(t->name), loc_cpy(env->gwion->mp, loc)); return !t->e->owner_class ? td : _type2td(env, t->e->owner_class, td); } ANN static m_bool do_stmt_each(const Env env, const Stmt_Each stmt) { DECL_OB(Type, t, = check_exp(env, stmt->exp)) while(GET_FLAG(t, typedef)) t = t->e->parent; Type ptr = array_base(t); const m_uint depth = t->array_depth - 1; if(!ptr || isa(t, env->gwion->type[et_array]) < 0) ERR_B(stmt_self(stmt)->pos, _("type '%s' is not array.\n" " This is not allowed in auto loop"), stmt->exp->info->type->name) if(stmt->is_ptr) { struct Type_List_ tl = {}; if(depth) ptr = array_type(env, ptr, depth); Type_Decl *td0 = type2td(env, ptr, stmt->exp->pos), td = { .xid=insert_symbol("Ptr"), .types=&tl, .pos=stmt->exp->pos }; tl.td = td0; ptr = known_type(env, &td); td0->array = NULL; free_type_decl(env->gwion->mp, td0); const Type base = get_type(ptr); if(!GET_FLAG(base, check)) CHECK_BB(ensure_traverse(env, base)) } t = (!stmt->is_ptr && depth) ? array_type(env, ptr, depth) : ptr; stmt->v = new_value(env->gwion->mp, t, s_name(stmt->sym)); SET_FLAG(stmt->v, valid); nspc_add_value(env->curr, stmt->sym, stmt->v); return check_conts(env, stmt_self(stmt), stmt->body); } ANN static inline m_bool cond_type(const Env env, const Exp e) { const Type t_int = env->gwion->type[et_int]; if(check_implicit(env, e, t_int) < 0) ERR_B(e->pos, _("invalid condition type")) return GW_OK; } #define stmt_func_xxx(name, type, prolog, exp) describe_stmt_func(check, name, type, prolog, exp) stmt_func_xxx(if, Stmt_If,, !(!check_flow(env, stmt->cond) || check_stmt(env, stmt->if_body) < 0 || (stmt->else_body && check_stmt(env, stmt->else_body) < 0)) ? 1 : -1) stmt_func_xxx(flow, Stmt_Flow,, !(!check_exp(env, stmt->cond) || !_flow(env, stmt->cond, !stmt->is_do ? stmt_self(stmt)->stmt_type == ae_stmt_while : stmt_self(stmt)->stmt_type != ae_stmt_while) || check_conts(env, stmt_self(stmt), stmt->body) < 0) ? 1 : -1) stmt_func_xxx(for, Stmt_For,, !( for_empty(env, stmt) < 0 || check_stmt(env, stmt->c1) < 0 || !check_flow(env, stmt->c2->d.stmt_exp.val) || (stmt->c3 && !check_exp(env, stmt->c3)) || check_conts(env, stmt_self(stmt), stmt->body) < 0) ? 1 : -1) stmt_func_xxx(loop, Stmt_Loop,, !(!check_exp(env, stmt->cond) || cond_type(env, stmt->cond) < 0 || check_conts(env, stmt_self(stmt), stmt->body) < 0) ? 1 : -1) stmt_func_xxx(each, Stmt_Each,, do_stmt_each(env, stmt)) ANN static m_bool check_stmt_return(const Env env, const Stmt_Exp stmt) { if(!env->func) ERR_B(stmt_self(stmt)->pos, _("'return' statement found outside function definition")) DECL_OB(const Type, ret_type, = stmt->val ? check_exp(env, stmt->val) : env->gwion->type[et_void]) if(!env->func->def->base->ret_type) { assert(isa(env->func->value_ref->type, env->gwion->type[et_lambda]) > 0); env->func->def->base->ret_type = ret_type; return GW_OK; } if(isa(ret_type, env->func->def->base->ret_type) > 0) return GW_OK; if(stmt->val) { if(env->func->def->base->xid == insert_symbol("@implicit") && ret_type == env->func->def->base->args->type) ERR_B(stmt_self(stmt)->pos, _("can't use implicit casting while defining it")) if(check_implicit(env, stmt->val, env->func->def->base->ret_type) > 0) return GW_OK; ERR_B(stmt_self(stmt)->pos, _("invalid return type: got '%s', expected '%s'"), ret_type->name, env->func->def->base->ret_type->name) } if(isa(env->func->def->base->ret_type, env->gwion->type[et_void]) > 0) return GW_OK; ERR_B(stmt_self(stmt)->pos, _("missing value for return statement")) } #define describe_check_stmt_stack(stack, name) \ ANN static m_bool check_stmt_##name(const Env env, const Stmt stmt) {\ if(!vector_size(&env->scope->stack)) \ ERR_B(stmt->pos, _("'"#name"' found outside of for/while/until...")) \ return GW_OK; \ } describe_check_stmt_stack(conts, continue) describe_check_stmt_stack(breaks, break) ANN static m_bool check_stmt_jump(const Env env, const Stmt_Jump stmt) { if(stmt->is_label) return GW_OK; const Map label = env_label(env); const m_uint* key = env->class_def && !env->func ? (m_uint*)env->class_def : (m_uint*)env->func; const Map m = label->ptr ? (Map)map_get(label, (vtype)key) : NULL; if(!m) ERR_B(stmt_self(stmt)->pos, _("label '%s' used but not defined"), s_name(stmt->name)) const Stmt_Jump ref = (Stmt_Jump)map_get(m, (vtype)stmt->name); if(!ref) ERR_B(stmt_self(stmt)->pos, _("label '%s' used but not defined"), s_name(stmt->name)) vector_add(&ref->data.v, (vtype)stmt); return GW_OK; } ANN m_bool check_union_decl(const Env env, const Union_Def udef) { Decl_List l = udef->l; do { CHECK_OB(check_exp(env, l->self)) Var_Decl_List list = l->self->d.exp_decl.list; do SET_FLAG(list->self->value, pure); while((list = list->next)); if(l->self->info->type->size > udef->s) udef->s = l->self->info->type->size; } while((l = l->next)); return GW_OK; } ANN void check_udef(const Env env, const Union_Def udef) { if(udef->xid) { if(env->class_def) (!GET_FLAG(udef, static) ? decl_member : decl_static)(env, udef->value); else if(env->class_def) { if(!GET_FLAG(udef, static)) udef->o = env->class_def->nspc->info->offset; else { udef->o = env->class_def->nspc->info->class_data_size; env->class_def->nspc->info->class_data_size += SZ_INT; } } } } ANN m_bool check_union_def(const Env env, const Union_Def udef) { if(tmpl_base(udef->tmpl)) // there's a func for this return GW_OK; check_udef(env, udef); const m_uint scope = union_push(env, udef); const m_bool ret = check_union_decl(env, udef); if(!udef->xid && !udef->type_xid && env->class_def && !GET_FLAG(udef, static)) env->class_def->nspc->info->offset = udef->o + udef->s; union_pop(env, udef, scope); union_flag(udef, ae_flag_check); union_flag(udef, ae_flag_valid); return ret; } ANN static m_bool check_stmt_exp(const Env env, const Stmt_Exp stmt) { return stmt->val ? check_exp(env, stmt->val) ? 1 : -1 : 1; } ANN static Value match_value(const Env env, const Exp_Primary* prim, const m_uint i) { const Symbol sym = prim->d.var; const Value v = new_value(env->gwion->mp, ((Exp)VKEY(&env->scope->match->map, i))->info->type, s_name(sym)); SET_FLAG(v, valid); nspc_add_value(env->curr, sym, v); VVAL(&env->scope->match->map, i) = (vtype)v; return v; } ANN static Symbol case_op(const Env env, const Exp e, const m_uint i) { if(e->exp_type == ae_exp_primary) { if(e->d.prim.prim_type == ae_prim_id) { if(e->d.prim.d.var == insert_symbol("_")) return NULL; if(!nspc_lookup_value1(env->curr, e->d.prim.d.var)) { e->d.prim.value = match_value(env, &e->d.prim, i); return NULL; } } } return insert_symbol("=="); } ANN static m_bool match_case_exp(const Env env, Exp e) { Exp last = e; for(m_uint i = 0; i < map_size(&env->scope->match->map); e = e->next, ++i) { if(!e) ERR_B(last->pos, _("no enough to match")) last = e; const Symbol op = case_op(env, e, i); if(op) { const Exp base = (Exp)VKEY(&env->scope->match->map, i); CHECK_OB(check_exp(env, e)) Exp_Binary bin = { .lhs=base, .rhs=e, .op=op }; struct ExpInfo_ info = { .nspc=env->curr }; struct Exp_ ebin = { .d={.exp_binary=bin}, .info=&info }; struct Op_Import opi = { .op=op, .lhs=base->info->type, .rhs=e->info->type, .data=(uintptr_t)&ebin.d.exp_binary, .pos=e->pos, .op_type=op_binary }; CHECK_OB(op_check(env, &opi)) e->info->nspc= info.nspc; return GW_OK; } } if(e) ERR_B(e->pos, _("too many expression to match")) return GW_OK; } ANN static m_bool _check_stmt_case(const Env env, const Stmt_Match stmt) { CHECK_BB(match_case_exp(env, stmt->cond)) if(stmt->when) CHECK_OB(check_flow(env, stmt->when)) return check_stmt_list(env, stmt->list); } ANN static m_bool check_stmt_case(const Env env, const Stmt_Match stmt) { RET_NSPC(_check_stmt_case(env, stmt)) } ANN static m_bool case_loop(const Env env, const Stmt_Match stmt) { Stmt_List list = stmt->list; do CHECK_BB(check_stmt_case(env, &list->stmt->d.stmt_match)) while((list = list->next)); return GW_OK; } ANN static m_bool _check_stmt_match(const Env env, const Stmt_Match stmt) { CHECK_OB(check_exp(env, stmt->cond)) MATCH_INI(env->scope) const m_bool ret = case_loop(env, stmt); MATCH_END(env->scope) return ret; } ANN static inline m_bool handle_where(const Env env, const Stmt_Match stmt) { if(stmt->where) CHECK_BB(check_stmt(env, stmt->where)) RET_NSPC(_check_stmt_match(env, stmt)) } ANN static m_bool check_stmt_match(const Env env, const Stmt_Match stmt) { RET_NSPC(handle_where(env, stmt)) } #define check_stmt_while check_stmt_flow #define check_stmt_until check_stmt_flow ANN static m_bool check_stmt_pp(const Env env, const Stmt_PP stmt) { if(stmt->pp_type == ae_pp_include) env->name = stmt->data; return GW_OK; } DECL_STMT_FUNC(check, m_bool , Env) ANN m_bool check_stmt(const Env env, const Stmt stmt) { return check_stmt_func[stmt->stmt_type](env, &stmt->d); } ANN static m_bool check_stmt_list(const Env env, Stmt_List l) { do CHECK_BB(check_stmt(env, l->stmt)) while((l = l->next)); return GW_OK; } ANN static m_bool check_signature_match(const Env env, const Func_Def fdef, const Func parent) { if(GET_FLAG(parent->def->base, static) != GET_FLAG(fdef->base, static)) { const m_str c_name = fdef->base->func->value_ref->from->owner_class->name; const m_str p_name = parent->value_ref->from->owner_class->name; const m_str f_name = s_name(fdef->base->xid); ERR_B(td_pos(fdef->base->td), _("function '%s.%s' ressembles '%s.%s' but cannot override...\n" " ...(reason: '%s.%s' is declared as 'static')"), c_name, f_name, p_name, c_name, GET_FLAG(fdef->base, static) ? c_name : p_name, f_name) } return !fdef->base->tmpl ? isa(fdef->base->ret_type, parent->def->base->ret_type) : GW_OK; } ANN static m_bool parent_match_actual(const Env env, const restrict Func_Def fdef, const restrict Func func) { Func parent_func = func; do { if(parent_func->def->base && compat_func(fdef, parent_func->def) > 0) { CHECK_BB(check_signature_match(env, fdef, parent_func)) if(!fdef->base->tmpl) { fdef->base->func->vt_index = parent_func->vt_index; vector_set(&env->curr->info->vtable, fdef->base->func->vt_index, (vtype)fdef->base->func); } return GW_OK; } } while((parent_func = parent_func->next)); return 0; } ANN static m_bool check_parent_match(const Env env, const Func_Def fdef) { const Func func = fdef->base->func; const Type parent = env->class_def->e->parent; if(!env->curr->info->vtable.ptr) vector_init(&env->curr->info->vtable); if(parent) { const Value v = find_value(parent, fdef->base->xid); if(v && isa(v->type, env->gwion->type[et_function]) > 0) { const m_bool match = parent_match_actual(env, fdef, v->d.func_ref); if(match) return match; } } func->vt_index = vector_size(&env->curr->info->vtable); vector_add(&env->curr->info->vtable, (vtype)func); return GW_OK; } ANN static inline Func get_overload(const Env env, const Func_Def fdef, const m_uint i) { const Symbol sym = func_symbol(env, env->curr->name, s_name(fdef->base->xid), NULL, i); return nspc_lookup_func1(env->curr, sym); } ANN static m_bool check_func_overload(const Env env, const Func_Def fdef) { const Value v = fdef->base->func->value_ref; for(m_uint i = 0; i <= v->from->offset; ++i) { const Func f1 = get_overload(env, fdef, i); for(m_uint j = i + 1; f1 && j <= v->from->offset; ++j) { const Func f2 = get_overload(env, fdef, j); if(f2 && compat_func(f1->def, f2->def) > 0) ERR_B(td_pos(f2->def->base->td), _("global function '%s' already defined" " for those arguments"), s_name(fdef->base->xid)) } } return GW_OK; } ANN static m_bool check_func_def_override(const Env env, const Func_Def fdef) { const Func func = fdef->base->func; if(env->class_def && env->class_def->e->parent) { const Value override = find_value(env->class_def->e->parent, fdef->base->xid); if(override && override->from->owner_class && isa(override->type, env->gwion->type[et_function]) < 0) ERR_B(fdef->pos, _("function name '%s' conflicts with previously defined value...\n" " from super class '%s'..."), s_name(fdef->base->xid), override->from->owner_class->name) } if(func->value_ref->from->offset && (!fdef->base->tmpl || !fdef->base->tmpl->base)) CHECK_BB(check_func_overload(env, fdef)) return GW_OK; } ANN m_bool check_fdef(const Env env, const Func_Def fdef) { if(fdef->base->args) CHECK_BB(check_func_args(env, fdef->base->args)) if(!GET_FLAG(fdef->base, builtin)) { if(fdef->d.code) CHECK_BB(check_stmt_code(env, &fdef->d.code->d.stmt_code)) } else fdef->base->func->code->stack_depth = fdef->stack_depth; return GW_OK; } ANN m_bool check_func_def(const Env env, const Func_Def f) { const Func func = f->base->func; const Func_Def fdef = func->def; assert(func == fdef->base->func); if(env->class_def) // tmpl ? CHECK_BB(check_parent_match(env, fdef)) if(tmpl_base(fdef->base->tmpl)) return GW_OK; if(fdef->base->td && !fdef->base->td->xid) { // tmpl ? CHECK_OB((fdef->base->ret_type = check_td(env, fdef->base->td))) return check_traverse_fdef(env, fdef); } CHECK_BB(check_func_def_override(env, fdef)) DECL_BB(const m_int, scope, = GET_FLAG(fdef->base, global) ? env_push_global(env) : env->scope->depth) const Func former = env->func; env->func = func; ++env->scope->depth; nspc_push_value(env->gwion->mp, env->curr); struct Op_Import opi = { }; if(GET_FLAG(fdef->base, op)) { func_operator(f, &opi); operator_suspend(env->curr, &opi); } const m_bool ret = scanx_fdef(env, env, fdef, (_exp_func)check_fdef); if(GET_FLAG(fdef->base, op)) operator_resume(&opi); nspc_pop_value(env->gwion->mp, env->curr); --env->scope->depth; env->func = former; if(ret > 0) SET_FLAG(fdef->base, valid); if(GET_FLAG(fdef->base, global)) env_pop(env,scope); return ret; } #define check_fptr_def dummy_func HANDLE_SECTION_FUNC(check, m_bool, Env) ANN static m_bool check_parent(const Env env, const Class_Def cdef) { const Type parent = cdef->base.type->e->parent; const Type_Decl *td = cdef->base.ext; if(td->array) CHECK_BB(check_subscripts(env, td->array, 1)) if(parent->e->def && !GET_FLAG(parent, check)) CHECK_BB(ensure_check(env, parent)) if(GET_FLAG(parent, typedef)) SET_FLAG(cdef->base.type, typedef); return GW_OK; } ANN static m_bool cdef_parent(const Env env, const Class_Def cdef) { if(cdef->base.tmpl && cdef->base.tmpl->list) CHECK_BB(template_push_types(env, cdef->base.tmpl)) const m_bool ret = check_parent(env, cdef); if(cdef->base.tmpl && cdef->base.tmpl->list) nspc_pop_type(env->gwion->mp, env->curr); return ret; } ANN m_bool check_class_def(const Env env, const Class_Def cdef) { if(tmpl_base(cdef->base.tmpl)) return GW_OK; const Type t = cdef->base.type; if(t->e->owner_class && !GET_FLAG(t->e->owner_class, check)) CHECK_BB(ensure_check(env, t->e->owner_class)) if(GET_FLAG(t, check))return GW_OK; SET_FLAG(t, check); if(cdef->base.ext) CHECK_BB(cdef_parent(env, cdef)) if(!GET_FLAG(cdef, struct)) inherit(t); if(cdef->body) { CHECK_BB(env_body(env, cdef, check_section)) SET_FLAG(t, ctor); } SET_FLAG(t, valid); return GW_OK; } ANN m_bool check_ast(const Env env, Ast ast) { do CHECK_BB(check_section(env, ast->section)) while((ast = ast->next)); return GW_OK; }
{ "pile_set_name": "Github" }
define(["require"], function (_require) { function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } new Promise(function (_resolve, _reject) { return _require(["foo"], function (imported) { return _resolve(_interopRequireWildcard(imported)); }, _reject); }); });
{ "pile_set_name": "Github" }
UNAME := $(shell uname) ifeq ($(UNAME), Darwin) LIBRARY_FILE=libpyvex.dylib STATIC_LIBRARY_FILE=libpyvex.a LDFLAGS=-Wl,-install_name,@rpath/$(LIBRARY_FILE) endif ifeq ($(UNAME), Linux) LIBRARY_FILE=libpyvex.so STATIC_LIBRARY_FILE=libpyvex.a LDFLAGS=-Wl,-soname,$(LIBRARY_FILE) endif ifeq ($(UNAME), NetBSD) LIBRARY_FILE=libpyvex.so STATIC_LIBRARY_FILE=libpyvex.a LDFLAGS=-Wl,-soname,$(LIBRARY_FILE) endif ifeq ($(findstring MINGW,$(UNAME)), MINGW) LIBRARY_FILE=pyvex.dll STATIC_LIBRARY_FILE=libpyvex.a LDFLAGS= endif # deeply evil # https://www.cmcrossroads.com/article/gnu-make-meets-file-names-spaces-them sp =$(null) $(null) qs = $(subst ?,$(sp),$1) sq = $(subst $(sp),?,$1) CC=gcc AR=ar INCFLAGS=-I "$(VEX_INCLUDE_PATH)" CFLAGS=-g -O2 -Wall -shared -fPIC -std=c99 $(INCFLAGS) OBJECTS=pyvex.o logging.o analysis.o postprocess.o HEADERS=pyvex.h all: $(LIBRARY_FILE) $(STATIC_LIBRARY_FILE) %.o: %.c $(CC) -c $(CFLAGS) $< $(LIBRARY_FILE): $(OBJECTS) $(HEADERS) $(call sq,$(VEX_LIB_PATH)/libvex.a) $(CC) $(CFLAGS) -o $(LIBRARY_FILE) $(OBJECTS) "$(VEX_LIB_PATH)/libvex.a" $(LDFLAGS) $(STATIC_LIBRARY_FILE): $(OBJECTS) $(HEADERS) $(call sq,$(VEX_LIB_PATH)/libvex.a) $(AR) rcs $(STATIC_LIBRARY_FILE) $(OBJECTS) clean: rm -f $(LIBRARY_FILE) $(STATIC_LIBRARY_FILE) *.o
{ "pile_set_name": "Github" }
**This airport has been automatically generated** We have no information about SPIT[*] airport other than its name, ICAO and location (PE). This airport will have to be done from scratch, which includes adding runways, taxiways, parking locations, boundaries... Good luck if you decide to do this airport!
{ "pile_set_name": "Github" }
/* * Copyright 2016 [email protected]. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.iveely.computing.ui; import com.iveely.computing.config.Paths; import com.iveely.computing.coordinate.Coordinator; import com.iveely.framework.text.JSONUtil; import java.util.List; /** * Topology summary. */ public class TopologySummary { /** * Response type. */ private String resType; /** * All topology simple information. */ private String zBuffer; /** * @return Get response type,actually is "topology summary". */ public String getResType() { return this.resType; } /** * Get buffer. */ public String getZBuffer() { return this.zBuffer; } /** * Initialize. */ public void init() { // 1. Response type. this.resType = "topology summary"; // 2. Build topologys. List<String> names = Coordinator.getInstance().getChildren(Paths.getAppRoot()); this.zBuffer = "["; if (names.size() > 0) { names.stream().map((name) -> new TopologySimple(name)).map((simple) -> { simple.get(); return simple; }).forEach((simple) -> { this.zBuffer += simple.toJson() + ","; }); } this.zBuffer = this.zBuffer.substring(0, this.zBuffer.length() - 1); this.zBuffer += "]"; } /** * Query to json. */ public String queryToJson(String tpName) { // 1. Response type. this.resType = "query topology"; // 2. Build topologys. List<String> names = Coordinator.getInstance().getChildren(Paths.getAppRoot()); this.zBuffer = "["; if (names.size() > 0) { names.stream().filter((name) -> (name.equals(tpName))).map((name) -> new TopologySimple(name)) .map((simple) -> { simple.get(); return simple; }).forEach((simple) -> { this.zBuffer += simple.toJson() + ","; }); } this.zBuffer = this.zBuffer.substring(0, this.zBuffer.length() - 1); this.zBuffer += "]"; return toJson(); } /** * Topology summary to json. */ public String toJson() { return JSONUtil.toString(this); } /** * Toplogy simple information. */ public static class TopologySimple { /** * Name of the topology. */ private final String name; /** * Id of the topology. */ private final int id; /** * setupTime of the topology. */ private String setupTime; /** * Status of topology. */ private String status; /** * How many slaves run this topology. */ private int inSlaveCount; /** * How many thread run this topology. */ private int threadCount; /** * Build topology simple instance. * * @param name Name of the topology. */ public TopologySimple(String name) { this.name = name; this.id = name.hashCode(); } /** * @return Name of the topology. */ public String getName() { return this.name; } /** * @return Get topology id. */ public int getId() { return this.id; } /** * @return Get topology setup time. */ public String getSetupTime() { return this.setupTime; } /** * @return Get status of toplogy. */ public String getStatus() { return this.status; } /** * @return Get number occupies the slaves. */ public int getInSlaveCount() { return this.inSlaveCount; } /** * @return Get all thread count. */ public int getThreadCount() { return this.threadCount; } /** * Get toplogy summary. */ public void get() { // 1. Status. int count = Integer.parseInt(Coordinator.getInstance().getNodeValue(Paths.getTopologyFinished(this.name))); int finishCount = Coordinator.getInstance().getChildren(Paths.getTopologyFinished(this.name)).size(); if (count == finishCount && count != -1) { this.status = "Completed"; } else if (count == -1) { this.status = "Exception"; } else { this.status = "Running"; } // 2. Setuptime. String time = Coordinator.getInstance().getNodeValue(Paths.getTopologyRoot(this.name)); this.setupTime = time; // 3. InSlave this.inSlaveCount = Integer .parseInt(Coordinator.getInstance().getNodeValue(Paths.getTopologySlaveCount(this.name))); // 4. Thread count. this.threadCount = Coordinator.getInstance().getChildren(Paths.getTopologyRoot(this.name)).size(); } /** * @return JSON serialize this. */ public String toJson() { return JSONUtil.toString(this); } } }
{ "pile_set_name": "Github" }
#!/bin/bash # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. classpathmunge () { escaped=`echo $1 | sed -e 's:\*:\\\\*:g'` if ! echo ${CLASSPATH} | /bin/egrep -q "(^|:)${escaped}($|:)" ; then if [ "$2" = "before" ] ; then CLASSPATH=$1:${CLASSPATH} else CLASSPATH=${CLASSPATH}:$1 fi fi } classpathmunge /etc/ozone/conf classpathmunge '/usr/hdp/current/hadoop-hdfs-client/*' classpathmunge '/usr/hdp/current/hadoop-hdfs-client/lib/*' classpathmunge '/etc/hadoop/conf' export CLASSPATH unset classpathmunge
{ "pile_set_name": "Github" }
hey there
{ "pile_set_name": "Github" }
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permission. # # # __all__ = ['UploadServerWdg'] import os, string, sys from pyasm.common import Environment, TacticException, Common from pyasm.biz import File from pyasm.search import SearchType from pyasm.web import * from pyasm.command import FileUpload import shutil, re import six basestring = six.string_types class UploadServerWdg(Widget): def get_display(self): web = WebContainer.get_web() num_files = web.get_form_value("num_files") files = [] # HTML5 upload if num_files: num_files = int(num_files) files = [] for i in range(0, num_files): field_storage = web.get_form_value("file%s" % i) if not field_storage or isinstance(field_storage, basestring): continue file_name = web.get_form_value("file_name%s"% i) if not file_name: file_name = self.get_file_name(field_storage) items = self.dump(field_storage, file_name) files.extend(items) else: field_storage = web.get_form_value("file") if field_storage: file_name = web.get_form_value("file_name0") if not file_name: file_name = web.get_form_value("filename") if not file_name: file_name = self.get_file_name(field_storage) files = self.dump(field_storage, file_name) if files: print("files: ", files) return "file_name=%s\n" % ','.join(files) else: return "NO FILES" def get_file_name(self, field_storage): # handle some spoofed upload case if isinstance(field_storage, basestring): return field_storage file_name = field_storage.filename # depending how the file is uploaded. If it's uploaded thru Python, # it has been JSON dumped as unicode code points, so this decode # step would be necessary try: if not Common.IS_Pv3: file_name = file_name.decode('unicode-escape') except UnicodeEncodeError as e: pass except UnicodeError as e: pass file_name = file_name.replace("\\", "/") file_name = os.path.basename(file_name) # Not sure if this is really needed anymore #file_name = File.get_filesystem_name(file_name) return file_name def dump(self, field_storage, file_name): web = WebContainer.get_web() ticket = web.get_form_value("transaction_ticket") if not ticket: security = Environment.get_security() ticket = security.get_ticket_key() tmpdir = Environment.get_tmp_dir() subdir = web.get_form_value("subdir") custom_upload_dir = web.get_form_value("upload_dir") if subdir: file_dir = "%s/%s/%s/%s" % (tmpdir, "upload", ticket, subdir) else: file_dir = "%s/%s/%s" % (tmpdir, "upload", ticket) if custom_upload_dir: if subdir: file_dir = "%s/%s" % (file_dir, subdir) else: file_dir = custom_upload_dir ''' If upload method is html5, the action is an empty string. Otherwise, action is either 'create' or 'append'. ''' action = web.get_form_value("action") html5_mode = False if not action: html5_mode = True action = "create" ''' With some recent change done in cherrypy._cpreqbody line 517, we can use the field storage directly on Linux when the file is uploaded in html5 mode. TODO: This shortcut cannot be used with upload_multipart.py ''' if isinstance(field_storage, basestring): return path = field_storage.get_path() # Base 64 encoded files are uploaded and decoded in FileUpload base_decode = None print("action: ", action) if action in ["create", "append"]: if os.name == 'nt': f = field_storage.file else: f = open(path, 'rb') header = f.read(100) f.seek(0) #if header.startswith("data:image/png;base64") or header.startswith("data:image/jpeg;base64"): if re.search(b"^data:([\w\-\_]+)\/([\w\-\_]+);base64", header): base_decode = True else: base_decode = False if os.name != 'nt': f.close() if html5_mode and file_name and path and not base_decode: ''' example of path: /home/tactic/tactic_temp/temp/tmpTxXIjM example of to_path: /home/tactic/tactic_temp/upload/ XX-dev-2924f964921857bf239acef4f9bcf3bf/miso_ramen.jpg ''' if not os.path.exists(file_dir): os.makedirs(file_dir) basename = os.path.basename(path) to_path = "%s/%s" % (file_dir, file_name) shutil.move(path, to_path) ''' # Close the mkstemp file descriptor fd = field_storage.get_fd() if fd: os.close( fd ) ''' # Because _cpreqbody makes use of mkstemp, the file permissions # are set to 600. This switches to the permissions as defined # by the TACTIC users umask try: current_umask = os.umask(0) os.umask(current_umask) os.chmod(to_path, 0o666 - current_umask) except Exception as e: print("WARNING: ", e) return [to_path] if field_storage == "": # for swfupload field_storage = web.get_form_value("Filedata") if not field_storage: file_name = web.get_form_value("Filename") # Process and get the uploaded files upload = FileUpload() if action == "append": upload.set_append_mode(True) upload.set_create_icon(False) elif action == "create": upload.set_create_icon(False) elif not action: # this means that we are accessing from browser. return "Upload server" else: print("WARNING: Upload action '%s' not supported" % action) raise TacticException("Upload action '%s' not supported" % action) # set the field storage if field_storage: upload.set_field_storage(field_storage, file_name) upload.set_file_dir(file_dir) # set base64 decode upload.set_decode(base_decode) upload.execute() files = upload.get_files() return files
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: GPL-2.0 */ /* * dsp_hwec.h */ extern struct mISDN_dsp_element *dsp_hwec; extern void dsp_hwec_enable(struct dsp *dsp, const char *arg); extern void dsp_hwec_disable(struct dsp *dsp); extern int dsp_hwec_init(void); extern void dsp_hwec_exit(void);
{ "pile_set_name": "Github" }
<?php /** * paypal_curl.php communications class for PayPal Express Checkout / Website Payments Pro / Payflow Pro payment methods * * @copyright Copyright 2003-2020 Zen Cart Development Team * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: DrByte 2020 June 23 Modified in v1.5.7 $ */ /** * PayPal NVP (v124.0) and Payflow Pro (v4 HTTP API) implementation via cURL. */ if (!defined('PAYPAL_DEV_MODE')) define('PAYPAL_DEV_MODE', 'false'); class paypal_curl extends base { /** * What level should we log at? Valid levels are: * 1 - Log only severe errors. * 2 - Date/time of operation, operation name, elapsed time, success or failure indication. * 3 - Full text of requests and responses and other debugging messages. * * @access protected * * @var integer $_logLevel */ var $_logLevel = 3; /** * If we're logging, what directory should we create log files in? * Note that a log name coincides with a symlink, logging will * *not* be done to avoid security problems. File names are * <DateStamp>.PayflowPro.log. * * @access protected * * @var string $_logFile */ var $_logDir = DIR_FS_LOGS; /** * Debug or production? */ var $_server = 'sandbox'; /** * URL endpoints -- defaults here are for three-token NVP implementation */ var $_endpoints = array('live' => 'https://api-3t.paypal.com/nvp', 'sandbox' => 'https://api-3t.sandbox.paypal.com/nvp'); /** * Options for cURL. Defaults to preferred (constant) options. */ var $_curlOptions = array(CURLOPT_HEADER => 0, CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_TIMEOUT => 45, CURLOPT_CONNECTTIMEOUT => 10, CURLOPT_FOLLOWLOCATION => FALSE, //CURLOPT_SSL_VERIFYPEER => FALSE, // Leave this line commented out! This should never be set to FALSE on a live site! //CURLOPT_CAINFO => '/local/path/to/cacert.pem', // for offline testing, this file can be obtained from http://curl.haxx.se/docs/caextract.html ... should never be used in production! CURLOPT_FORBID_REUSE => TRUE, CURLOPT_FRESH_CONNECT => TRUE, CURLOPT_POST => TRUE, ); /** * Parameters that are always required and that don't change * request to request. */ var $_partner; var $_vendor; var $_user; var $_pwd; var $_version; var $_signature; /** * nvp or payflow? */ var $_mode = 'nvp'; /** * Sales or authorizations? For the U.K. this will always be 'S' * (Sale) because of Switch and Solo cards which don't support * authorizations. The other option is 'A' for Authorization. * NOTE: 'A' is not supported for pre-signup-EC-boarding. */ var $_trxtype = 'S'; /** * Store the last-generated name/value list for debugging. */ var $lastParamList = null; /** * Store the last-generated headers for debugging. */ var $lastHeaders = null; /** * submission values */ var $values = array(); /** * Constructor. Sets up communication infrastructure. */ function __construct($params = array()) { foreach ($params as $name => $value) { $this->setParam($name, $value); } $this->notify('NOTIFY_PAYPAL_CURL_CONSTRUCT', $params); if (!@is_writable($this->_logDir)) $this->_logDir = DIR_FS_CATALOG . $this->_logDir; if (!@is_writable($this->_logDir)) $this->_logDir = DIR_FS_LOGS; if (!@is_writable($this->_logDir)) $this->_logDir = DIR_FS_SQL_CACHE; } /** * SetExpressCheckout * * Prepares to send customer to PayPal site so they can * log in and choose their funding source and shipping address. * * The token returned to this function is passed to PayPal in * order to link their PayPal selections to their cart actions. */ function SetExpressCheckout($returnUrl, $cancelUrl, $options = array()) { $values = $options; if ($this->_mode == 'payflow') { $values = array_merge($values, array('ACTION' => 'S', /* ACTION=S denotes SetExpressCheckout */ 'TENDER' => 'P', 'TRXTYPE' => $this->_trxtype, 'RETURNURL' => $returnUrl, 'CANCELURL' => $cancelUrl)); } elseif ($this->_mode == 'nvp') { if (!isset($values['PAYMENTREQUEST_0_PAYMENTACTION']) || ($this->checkHasApiCredentials() === FALSE)) $values['PAYMENTREQUEST_0_PAYMENTACTION'] = ($this->_trxtype == 'S' || ($this->checkHasApiCredentials() === FALSE) ? 'Sale' : 'Authorization'); $values['RETURNURL'] = urlencode($returnUrl); $values['CANCELURL'] = urlencode($cancelUrl); } // convert country code key to proper key name for paypal 2.0 (needed when sending express checkout via payflow gateway, due to PayPal field naming inconsistency) if ($this->_mode == 'payflow') { if (!isset($values['SHIPTOCOUNTRY']) && isset($values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE'])) { $values['SHIPTOCOUNTRY'] = $values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE']; unset($values['PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE']); } //if (isset($values['AMT'])) unset($values['AMT']); } // allow page-styling support -- see language file for definitions if (defined('MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE')) $values['PAGESTYLE'] = MODULE_PAYMENT_PAYPALWPP_PAGE_STYLE; if (defined('MODULE_PAYMENT_PAYPAL_LOGO_IMAGE')) $values['LOGOIMG'] = urlencode(MODULE_PAYMENT_LOGO_IMAGE); if (defined('MODULE_PAYMENT_PAYPAL_CART_BORDER_COLOR')) $values['CARTBORDERCOLOR'] = MODULE_PAYMENT_PAYPAL_CART_BORDER_COLOR; if (defined('MODULE_PAYMENT_PAYPALWPP_HEADER_IMAGE')) $values['HDRIMG'] = urlencode(MODULE_PAYMENT_PAYPALWPP_HEADER_IMAGE); if (defined('MODULE_PAYMENT_PAYPALWPP_PAGECOLOR')) $values['PAYFLOWCOLOR'] = MODULE_PAYMENT_PAYPALWPP_PAGECOLOR; if (PAYPAL_DEV_MODE == 'true') $this->log('SetExpressCheckout - breakpoint 1 - [' . print_r($values, true) .']'); $this->values = $values; $this->notify('NOTIFY_PAYPAL_SETEXPRESSCHECKOUT'); return $this->_request($this->values, 'SetExpressCheckout'); } /** * GetExpressCheckoutDetails * * When customer returns from PayPal site, this retrieves their payment/shipping data for use in Zen Cart */ function GetExpressCheckoutDetails($token, $optional = array()) { $values = array_merge($optional, array('TOKEN' => $token)); if ($this->_mode == 'payflow') { $values = array_merge($values, array('ACTION' => 'G', /* ACTION=G denotes GetExpressCheckoutDetails */ 'TENDER' => 'P', 'TRXTYPE' => $this->_trxtype)); } $this->notify('NOTIFY_PAYPAL_GETEXPRESSCHECKOUTDETAILS'); return $this->_request($values, 'GetExpressCheckoutDetails'); } /** * DoExpressCheckoutPayment * * Completes the sale using PayPal as payment choice */ function DoExpressCheckoutPayment($token, $payerId, $options = array()) { $values = array_merge($options, array('TOKEN' => $token, 'PAYERID' => $payerId)); if (PAYPAL_DEV_MODE == 'true') $this->log('DoExpressCheckout - breakpoint 1 - ['.$token . ' ' . $payerId . ' ' . "]\n\n[" . print_r($values, true) .']', $token); if ($this->_mode == 'payflow') { $values['ACTION'] = 'D'; /* ACTION=D denotes DoExpressCheckoutPayment via Payflow */ $values['TENDER'] = 'P'; $values['TRXTYPE'] = $this->_trxtype; $values['NOTIFYURL'] = zen_href_link('ipn_main_handler.php', '', 'SSL',false,false,true); } elseif ($this->_mode == 'nvp') { if (!isset($values['PAYMENTREQUEST_0_PAYMENTACTION']) || $this->checkHasApiCredentials() === FALSE) $values['PAYMENTREQUEST_0_PAYMENTACTION'] = ($this->_trxtype == 'S' || ($this->checkHasApiCredentials() === FALSE) ? 'Sale' : 'Authorization'); $values['NOTIFYURL'] = urlencode(zen_href_link('ipn_main_handler.php', '', 'SSL',false,false,true)); } $this->values = $values; $this->notify('NOTIFY_PAYPAL_DOEXPRESSCHECKOUTPAYMENT'); if (PAYPAL_DEV_MODE == 'true') $this->log('DoExpressCheckout - breakpoint 2 '.print_r($this->values, true), $token); return $this->_request($this->values, 'DoExpressCheckoutPayment'); } /** * DoDirectPayment * Sends CC information to gateway for processing. * * Requires Website Payments Pro or Payflow Pro as merchant gateway. * * PAYMENTREQUEST_0_PAYMENTACTION = Authorization (auth/capt) or Sale (final) */ function DoDirectPayment($cc, $cvv2 = '', $exp, $fname = null, $lname = null, $cc_type, $options = array(), $nvp = array() ) { $values = $options; $values['ACCT'] = $cc; if ($cvv2 != '') $values['CVV2'] = $cvv2; $values['FIRSTNAME'] = $fname; $values['LASTNAME'] = $lname; if (isset($values['NAME'])) unset ($values['NAME']); if ($this->_mode == 'payflow') { $values['EXPDATE'] = $exp; $values['TENDER'] = 'C'; $values['TRXTYPE'] = $this->_trxtype; $values['VERBOSITY'] = 'MEDIUM'; $values['NOTIFYURL'] = zen_href_link('ipn_main_handler.php', '', 'SSL',false,false,true); } elseif ($this->_mode == 'nvp') { $values = array_merge($values, $nvp); if (isset($values['ECI'])) { $values['ECI3DS'] = $values['ECI']; unset($values['ECI']); } $values['CREDITCARDTYPE'] = ($cc_type == 'American Express') ? 'Amex' : $cc_type; $values['NOTIFYURL'] = urlencode(zen_href_link('ipn_main_handler.php', '', 'SSL',false,false,true)); if (!isset($values['PAYMENTREQUEST_0_PAYMENTACTION'])) $values['PAYMENTREQUEST_0_PAYMENTACTION'] = ($this->_trxtype == 'S' ? 'Sale' : 'Authorization'); if (isset($values['COUNTRY'])) unset ($values['COUNTRY']); if (isset($values['COMMENT1'])) unset ($values['COMMENT1']); if (isset($values['COMMENT2'])) unset ($values['COMMENT2']); if (isset($values['CUSTREF'])) unset ($values['CUSTREF']); } $this->values = $values; $this->notify('NOTIFY_PAYPAL_DODIRECTPAYMENT'); ksort($this->values); return $this->_request($this->values, 'DoDirectPayment'); } /** * RefundTransaction * * Used to refund all or part of a given transaction */ function RefundTransaction($oID, $txnID, $amount = 'Full', $note = '', $curCode = 'USD') { if ($this->_mode == 'payflow') { $values['ORIGID'] = $txnID; $values['TENDER'] = 'C'; $values['TRXTYPE'] = 'C'; $values['AMT'] = round((float)$amount, 2); if ($note != '') $values['COMMENT2'] = $note; } elseif ($this->_mode == 'nvp') { $values['TRANSACTIONID'] = $txnID; if ($amount != 'Full' && (float)$amount > 0) { $values['REFUNDTYPE'] = 'Partial'; $values['CURRENCYCODE'] = $curCode; $values['AMT'] = round((float)$amount, 2); } else { $values['REFUNDTYPE'] = 'Full'; } if ($note != '') $values['NOTE'] = $note; } return $this->_request($values, 'RefundTransaction'); } /** * DoVoid * * Used to void a previously authorized transaction */ function DoVoid($txnID, $note = '') { if ($this->_mode == 'payflow') { $values['ORIGID'] = $txnID; $values['TENDER'] = 'C'; $values['TRXTYPE'] = 'V'; if ($note != '') $values['COMMENT2'] = $note; } elseif ($this->_mode == 'nvp') { $values['AUTHORIZATIONID'] = $txnID; if ($note != '') $values['NOTE'] = $note; } return $this->_request($values, 'DoVoid'); } /** * DoAuthorization * * Used to authorize part of a previously placed order which was initiated as authType of Order */ function DoAuthorization($txnID, $amount = 0, $currency = 'USD', $entity = 'Order') { $values['TRANSACTIONID'] = $txnID; $values['AMT'] = round((float)$amount, 2); $values['TRANSACTIONENTITY'] = $entity; $values['CURRENCYCODE'] = $currency; return $this->_request($values, 'DoAuthorization'); } /** * DoReauthorization * * Used to reauthorize a previously-authorized order which has expired */ function DoReauthorization($txnID, $amount = 0, $currency = 'USD') { $values['AUTHORIZATIONID'] = $txnID; $values['AMT'] = round((float)$amount, 2); $values['CURRENCYCODE'] = $currency; return $this->_request($values, 'DoReauthorization'); } /** * DoCapture * * Used to capture part or all of a previously placed order which was only authorized */ function DoCapture($txnID, $amount = 0, $currency = 'USD', $captureType = 'Complete', $invNum = '', $note = '') { if ($this->_mode == 'payflow') { $values['ORIGID'] = $txnID; $values['TENDER'] = 'C'; $values['TRXTYPE'] = 'D'; $values['VERBOSITY'] = 'MEDIUM'; if ($invNum != '') $values['INVNUM'] = $invNum; if ($note != '') $values['COMMENT2'] = $note; } elseif ($this->_mode == 'nvp') { $values['AUTHORIZATIONID'] = $txnID; $values['COMPLETETYPE'] = $captureType; $values['AMT'] = round((float)$amount, 2); $values['CURRENCYCODE'] = $currency; if ($invNum != '') $values['INVNUM'] = $invNum; if ($note != '') $values['NOTE'] = $note; } return $this->_request($values, 'DoCapture'); } /** * ManagePendingTransactionStatus * * Accept/Deny pending FMF transactions */ function ManagePendingTransactionStatus($txnID, $action) { if (!in_array($action, array('Accept', 'Deny'))) return FALSE; $values['TRANSACTIONID'] = $txnID; $values['ACTION'] = $action; return $this->_request($values, 'ManagePendingTransactionStatus'); } /** * GetTransactionDetails * * Used to read data from PayPal for a given transaction */ function GetTransactionDetails($txnID) { if ($this->_mode == 'payflow') { $values['ORIGID'] = $txnID; $values['TENDER'] = 'C'; $values['TRXTYPE'] = 'I'; $values['VERBOSITY'] = 'MEDIUM'; } elseif ($this->_mode == 'nvp') { $values['TRANSACTIONID'] = $txnID; } return $this->_request($values, 'GetTransactionDetails'); } /** * TransactionSearch * * Used to read data from PayPal for specified transaction criteria */ function TransactionSearch($startdate, $txnID = '', $email = '', $options = null) { if ($this->_mode == 'payflow') { $values['CUSTREF'] = $txnID; $values['TENDER'] = 'C'; $values['TRXTYPE'] = 'I'; $values['VERBOSITY'] = 'MEDIUM'; } elseif ($this->_mode == 'nvp') { $values['STARTDATE'] = $startdate; $values['TRANSACTIONID'] = $txnID; $values['EMAIL'] = $email; if (is_array($options)) $values = array_merge($values, $options); } return $this->_request($values, 'TransactionSearch'); } /** * Set a parameter as passed. */ function setParam($name, $value) { $name = '_' . $name; $this->$name = $value; } /** * Set CURL options. */ function setCurlOption($name, $value) { $this->_curlOptions[$name] = $value; } /** * Send a request to endpoint. */ function _request($values, $operation, $requestId = null) { if ($this->_mode == 'NOTCONFIGURED') { return array('RESULT' => 'PayPal credentials not set. Cannot proceed.'); die('NOTCONFIGURED'); } if ($this->checkHasApiCredentials() === FALSE && (!in_array($operation, array('SetExpressCheckout','GetExpressCheckoutDetails', 'DoExpressCheckoutPayment')))) { return array('RESULT' => 'Unauthorized: Unilateral'); } if (PAYPAL_DEV_MODE == 'true') $this->log('_request - breakpoint 1 - ' . $operation . "\n" . print_r($values, true)); $start = $this->_getMicroseconds(); if ($this->_mode == 'nvp') { $values['METHOD'] = $operation; } if ($this->_mode == 'payflow') { $values['REQUEST_ID'] = time(); } // convert currency code to proper key name for nvp if ($this->_mode == 'nvp') { $variableName = ($operation == 'setExpressCheckout' || $operation == 'doExpressCheckoutPayment') ? 'PAYMENTREQUEST_0_CURRENCYCODE' : 'CURRENCYCODE'; if (!isset($values[$variableName]) && isset($values['CURRENCY'])) { $values[$variableName] = $values['CURRENCY']; unset($values['CURRENCY']); } } // request-id must be unique within 30 days if ($requestId === null) { $requestId = md5(uniqid(mt_rand())); } $headers[] = 'Content-Type: text/namevalue'; $headers[] = 'X-VPS-Timeout: 90'; $headers[] = "X-VPS-VIT-Client-Type: PHP/cURL"; if ($this->_mode == 'payflow') { $headers[] = 'X-VPS-VIT-Integration-Product: PHP::Zen Cart(R) - PayPal/Payflow Pro'; } elseif ($this->_mode == 'nvp') { $headers[] = 'X-VPS-VIT-Integration-Product: PHP::Zen Cart(R) - PayPal/NVP'; } $headers[] = 'X-VPS-VIT-Integration-Version: 1.5.8'; $this->lastHeaders = $headers; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this->_endpoints[$this->_server]); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_buildNameValueList($values)); foreach ($this->_curlOptions as $name => $value) { curl_setopt($ch, $name, $value); } $response = curl_exec($ch); $commError = curl_error($ch); $commErrNo = curl_errno($ch); if ($commErrNo == 35) { trigger_error('ALERT: Could not process PayPal transaction via normal CURL communications. Your server is encountering connection problems using TLS 1.2 ... because your hosting company cannot autonegotiate a secure protocol with modern security protocols. We will try the transaction again, but this is resulting in a very long delay for your customers, and could result in them attempting duplicate purchases. Get your hosting company to update their TLS capabilities ASAP.', E_USER_NOTICE); curl_setopt($ch, CURLOPT_SSLVERSION, 6); // Using the defined value of 6 instead of CURL_SSLVERSION_TLSv1_2 since these outdated hosts also don't properly implement this constant either. $response = curl_exec($ch); $commError = curl_error($ch); $commErrNo = curl_errno($ch); } $commInfo = @curl_getinfo($ch); curl_close($ch); $rawdata = "CURL raw data:\n" . $response . "CURL RESULTS: (" . $commErrNo . ') ' . $commError . "\n" . print_r($commInfo, true) . "\nEOF"; $errors = ($commErrNo != 0 ? "\n(" . $commErrNo . ') ' . $commError : ''); $response .= '&CURL_ERRORS=' . ($commErrNo != 0 ? urlencode('(' . $commErrNo . ') ' . $commError) : '') ; // do debug/logging if ((!in_array($operation, array('GetTransactionDetails','TransactionSearch'))) || (in_array($operation, array('GetTransactionDetails','TransactionSearch')) && !strstr($response, '&ACK=Success')) ) $this->_logTransaction($operation, $this->_getElapsed($start), $response, $errors . ($commErrNo != 0 ? "\n" . print_r($commInfo, true) : '')); if ($response) { return $this->_parseNameValueList($response); } else { return false; } } /** * Take an array of name-value pairs and return a properly * formatted list. Enforces the following rules: * * - Names must be uppercase, all characters must match [A-Z]. * - Values cannot contain quotes. * - If values contain & or =, the name has the length appended to * it in brackets (NAME[4] for a 4-character value. * * If any of the "cannot" conditions are violated the function * returns false, and the caller must abort and not proceed with * the transaction. */ function _buildNameValueList($pairs) { // Add the parameters that are always sent. $commpairs = array(); // generic: if ($this->_user != '') $commpairs['USER'] = str_replace('+', '%2B', trim($this->_user)); if ($this->_pwd != '') $commpairs['PWD'] = trim($this->_pwd); // PRO2.0 options: if ($this->_partner != '') $commpairs['PARTNER'] = trim($this->_partner); if ($this->_vendor != '') $commpairs['VENDOR'] = trim($this->_vendor); // NVP-specific options: if ($this->_version != '') $commpairs['VERSION'] = trim($this->_version); if ($this->_signature != '') $commpairs['SIGNATURE'] = trim($this->_signature); // Use sandbox credentials if defined and sandbox selected if ($this->_server == 'sandbox' && defined('MODULE_PAYMENT_PAYPALWPP_SANDBOX_APIUSERNAME') && MODULE_PAYMENT_PAYPALWPP_SANDBOX_APIUSERNAME != '' && defined('MODULE_PAYMENT_PAYPALWPP_SANDBOX_APIPASSWORD') && MODULE_PAYMENT_PAYPALWPP_SANDBOX_APIPASSWORD != '' && defined('MODULE_PAYMENT_PAYPALWPP_SANDBOX_APISIGNATURE') && MODULE_PAYMENT_PAYPALWPP_SANDBOX_APISIGNATURE != '') { $commpairs['USER'] = str_replace('+', '%2B', trim(MODULE_PAYMENT_PAYPALWPP_SANDBOX_APIPASSWORD)); $commpairs['PWD'] = trim(MODULE_PAYMENT_PAYPALWPP_SANDBOX_APIPASSWORD); $commpairs['SIGNATURE'] = trim(MODULE_PAYMENT_PAYPALWPP_SANDBOX_APISIGNATURE); } // Adjustments if Micropayments account profile details have been set if (defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD != '' && ((($pairs['AMT'] > 0 && $pairs['AMT'] < strval(MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD) ) || ($pairs['PAYMENTREQUEST_0_AMT'] > 0 && $pairs['PAYMENTREQUEST_0_AMT'] < strval(MODULE_PAYMENT_PAYPALWPP_MICROPAY_THRESHOLD))) || ($pairs['METHOD'] == 'GetExpressCheckoutDetails' && isset($_SESSION['using_micropayments']) && $_SESSION['using_micropayments'] == TRUE)) && defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIUSERNAME') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIUSERNAME != '' && defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIPASSWORD') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIPASSWORD != '' && defined('MODULE_PAYMENT_PAYPALWPP_MICROPAY_APISIGNATURE') && MODULE_PAYMENT_PAYPALWPP_MICROPAY_APISIGNATURE != '') { $commpairs['USER'] = str_replace('+', '%2B', trim(MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIUSERNAME)); $commpairs['PWD'] = trim(MODULE_PAYMENT_PAYPALWPP_MICROPAY_APIPASSWORD); $commpairs['SIGNATURE'] = trim(MODULE_PAYMENT_PAYPALWPP_MICROPAY_APISIGNATURE); $_SESSION['using_micropayments'] = ($pairs['METHOD'] == 'DoExpressCheckoutPayment') ? FALSE : TRUE; } // Accelerated/Unilateral Boarding support: if ($this->checkHasApiCredentials() == FALSE) { $commpairs['SUBJECT'] = STORE_OWNER_EMAIL_ADDRESS; $commpairs['USER'] = ''; $commpairs['PWD'] = ''; $commpairs['SIGNATURE'] = ''; } $pairs = array_merge($pairs, $commpairs); $string = array(); foreach ($pairs as $name => $value) { if (preg_match('/[^A-Z_0-9]/', $name)) { if (PAYPAL_DEV_MODE == 'true') $this->log('_buildNameValueList - datacheck - ABORTING - preg_match found invalid submission key: ' . $name . ' (' . $value . ')'); return false; } // remove quotation marks $value = str_replace('"', '', $value); // if the value contains a & or = symbol, handle it differently if (($this->_mode == 'payflow') && (strpos($value, '&') !== false || strpos($value, '=') !== false)) { $name = str_replace('PAYMENTREQUEST_0_', '', $name); // For Payflow, remove NVP v63.0+ extras from name $string[] = $name . '[' . strlen($value) . ']=' . $value; if (PAYPAL_DEV_MODE == 'true') $this->log('_buildNameValueList - datacheck - adding braces and string count to: ' . $value . ' (' . $name . ')'); } else { if ($this->_mode == 'nvp' && ((strstr($name, 'SHIPTO') || strstr($name, 'L_NAME') || strstr($name, 'L_PAYMENTREQUEST_0_NAME') || strstr($name, '_DESC')) && (strpos($value, '&') !== false || strpos($value, '=') !== false))) $value = urlencode($value); $string[] = $name . '=' . $value; } } $this->lastParamList = implode('&', $string); $this->notify('NOTIFY_PAYPAL_CURL_BUILDNAMEVALUELIST', $string); return $this->lastParamList; } /** * Take a name/value response string and parse it into an * associative array. Doesn't handle length tags in the response * as they should not be present. */ function _parseNameValueList($string) { $string = str_replace('&amp;', '|', $string); $pairs = explode('&', str_replace(array("\r\n","\n"), '', $string)); //$this->log('['.$string . "]\n\n[" . print_r($pairs, true) .']'); $values = array(); foreach ($pairs as $pair) { list($name, $value) = explode('=', $pair, 2); $values[$name] = str_replace('|', '&amp;', $value); } return $values; } /** * Log the current transaction depending on the current log level. * * @access protected * * @param string $operation The operation called. * @param integer $elapsed Microseconds taken. * @param object $response The response. */ function _logTransaction($operation, $elapsed, $response, $errors) { $values = $this->_parseNameValueList($response); $token = isset($values['TOKEN']) ? $values['TOKEN'] : ''; $token = preg_replace('/[^0-9.A-Z\-]/', '', urldecode($token)); $success = false; if ($response) { if ((isset($values['RESULT']) && $values['RESULT'] == 0) || (isset($values['ACK']) && (strstr($values['ACK'],'Success') || strstr($values['ACK'],'SuccessWithWarning')) && !strstr($values['ACK'],'Failure'))) { $success = true; } } $message = date('Y-m-d h:i:s') . "\n-------------------\n"; $message .= '(' . $this->_server . ' transaction) --> ' . $this->_endpoints[$this->_server] . "\n"; $message .= 'Request Headers: ' . "\n" . $this->_sanitizeLog($this->lastHeaders) . "\n\n"; $message .= 'Request Parameters: {' . $operation . '} ' . "\n" . urldecode($this->_sanitizeLog($this->_parseNameValueList($this->lastParamList))) . "\n\n"; $message .= 'Response: ' . "\n" . urldecode($this->_sanitizeLog($values)) . $errors; if ($this->_logLevel > 0 || $success == FALSE) { $this->log($message, $token); // extra debug email: // if (MODULE_PAYMENT_PAYPALWPP_DEBUGGING == 'Log and Email') { zen_mail(STORE_NAME, STORE_OWNER_EMAIL_ADDRESS, 'PayPal Debug log - ' . $operation, $message, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, array('EMAIL_MESSAGE_HTML'=>nl2br($message)), 'debug'); } $this->log($operation . ', Elapsed: ' . $elapsed . 'ms -- ' . (isset($values['ACK']) ? $values['ACK'] : ($success ? 'Succeeded' : 'Failed')) . $errors, $token); if (!$response) { $this->log('No response from server' . $errors, $token); } else { if ((isset($values['RESULT']) && $values['RESULT'] != 0) || strstr($values['ACK'],'Failure')) { $this->log($response . $errors, $token); } } } } /** * Strip sensitive information (passwords, credit card numbers, cvv2 codes) from requests/responses. * * @access protected * * @param mixed $log The log to sanitize. * @return string The sanitized (and string-ified, if necessary) log. */ function _sanitizeLog($log, $allsensitive = false) { if (is_array($log)) { foreach (array_keys($log) as $key) { switch (strtolower($key)) { case 'pwd': case 'cvv2': $log[$key] = str_repeat('*', strlen($log[$key])); break; case 'signature': case 'acct': $log[$key] = str_repeat('*', strlen(substr($log[$key], 0, -4))) . substr($log[$key], -4); break; case 'solutiontype': unset($log[$key]); break; } if ($allsensitive && in_array($key, array('BUTTONSOURCE', 'VERSION', 'SIGNATURE', 'USER', 'VENDOR', 'PARTNER', 'PWD', 'VERBOSITY'))) unset($log[$key]); } return print_r($log, true); } else { return $log; } } function log($message, $token = '') { static $tokenHash; if ($tokenHash == '') $tokenHash = '_' . zen_create_random_value(4); $this->outputDestination = 'File'; $this->notify('PAYPAL_CURL_LOG', $token, $tokenHash); if ($token == '' && !empty($_SESSION['paypal_ec_token'])) $token = $_SESSION['paypal_ec_token']; if ($token == '') $token = time(); $token .= $tokenHash; if ($this->outputDestination == 'File') { $file = $this->_logDir . '/' . 'Paypal_CURL_' . $token . '.log'; if ($fp = @fopen($file, 'a')) { fwrite($fp, $message . "\n\n"); fclose($fp); } } } /** * Check whether API credentials are supplied, or if is blank * * @return boolean */ function checkHasApiCredentials() { return ($this->_mode == 'nvp' && ($this->_user == '' || $this->_pwd == '')) ? FALSE : TRUE; } /** * Return the current time including microseconds. * * @access protected * * @return integer Current time with microseconds. */ function _getMicroseconds() { list($ms, $s) = explode(' ', microtime()); return floor($ms * 1000) + 1000 * $s; } /** * Return the difference between now and $start in microseconds. * * @access protected * * @param integer $start Start time including microseconds. * * @return integer Number of microseconds elapsed since $start */ function _getElapsed($start) { return $this->_getMicroseconds() - $start; } } /** * Convert HTML comments to readable text * @param string $string * @return string */ function zen_uncomment($string) { return str_replace(array('<!-- ', ' -->'), array('[', ']'), $string); }
{ "pile_set_name": "Github" }
/* * ************************************************************************ * PlayerProgress.kt * ************************************************************************* * Copyright © 2020 VLC authors and VideoLAN * Author: Nicolas POMEPUY * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * ************************************************************************** * * */ package org.videolan.vlc.gui.view import android.content.Context import android.graphics.* import android.util.AttributeSet import android.view.View import androidx.core.content.ContextCompat import androidx.core.graphics.withClip import org.videolan.tools.dp import org.videolan.vlc.R class PlayerProgress : View { var isDouble: Boolean = false private var value: Int = 50 private val progressPercent: Float get() = if (isDouble) value.toFloat() / 200 else value.toFloat() / 100 private val progressColor = ContextCompat.getColor(context, R.color.white) private val boostColor = ContextCompat.getColor(context, R.color.orange700) private val paintProgress = Paint() private val paintBackground = Paint() private val rectProgress = RectF(0F, 0F, 0F, 0F) var path = Path() private val progressWidth = 8.dp private val yOffset = 4.dp private val clip = Region() private val firstClippingRegion = Region() private val secondClippingRegion = Region() private val clippingPath = Path() constructor(context: Context) : super(context) { initialize() } constructor(context: Context, attrs: AttributeSet) : super(context, attrs) { initialize() } constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(context, attrs, defStyle) { initialize() } private fun initialize() { paintBackground.color = ContextCompat.getColor(context, R.color.white_transparent_50) paintBackground.isAntiAlias = true paintProgress.isAntiAlias = true } override fun onDraw(canvas: Canvas?) { val left = (width.toFloat() - progressWidth.toFloat()) / 2 val right = width - left val top = yOffset.toFloat() val bottom = height - yOffset.toFloat() val radius = (right - left) / 2 //draw background roundedRectanglePath(left, top, right, bottom, radius, radius) canvas?.drawPath(path, paintBackground) //draw progress val clipTop = yOffset + (bottom - top) * (1 - progressPercent) rectProgress.set(left, clipTop, right, bottom) canvas?.withClip(rectProgress) { clipRect(rectProgress) } clip.set(left.toInt(), clipTop.toInt(), right.toInt(), bottom.toInt()) firstClippingRegion.setPath(path, clip) clippingPath.moveTo(rectProgress.left, rectProgress.top) clippingPath.lineTo(rectProgress.right, rectProgress.top) clippingPath.lineTo(rectProgress.right, rectProgress.bottom) clippingPath.lineTo(rectProgress.left, rectProgress.bottom) clippingPath.close() secondClippingRegion.setPath(clippingPath, clip) firstClippingRegion.op(secondClippingRegion, Region.Op.INTERSECT) paintProgress.color = progressColor canvas?.drawPath(firstClippingRegion.boundaryPath, paintProgress) //draw boost if (isDouble && progressPercent > 0.5) { val clipBottom = yOffset + (bottom - top) * (0.5F) rectProgress.set(left, clipTop, right, clipBottom) clip.set(left.toInt(), clipTop.toInt(), right.toInt(), clipBottom.toInt()) firstClippingRegion.setPath(path, clip) clippingPath.moveTo(rectProgress.left, rectProgress.top) clippingPath.lineTo(rectProgress.right, rectProgress.top) clippingPath.lineTo(rectProgress.right, rectProgress.bottom) clippingPath.lineTo(rectProgress.left, rectProgress.bottom) clippingPath.close() secondClippingRegion.setPath(clippingPath, clip) firstClippingRegion.op(secondClippingRegion, Region.Op.INTERSECT) paintProgress.color = boostColor canvas?.drawPath(firstClippingRegion.boundaryPath, paintProgress) } super.onDraw(canvas) } fun setValue(value: Int) { this.value = value invalidate() } private fun roundedRectanglePath(left: Float, top: Float, right: Float, bottom: Float, rx: Float, ry: Float) { val width = right - left val height = bottom - top val widthWithoutCorners = width - 2 * rx val heightWithoutCorners = height - 2 * ry path.moveTo(right, top + ry) path.rQuadTo(0f, -ry, -rx, -ry) path.rLineTo(-widthWithoutCorners, 0f) path.rQuadTo(-rx, 0f, -rx, ry) path.rLineTo(0f, heightWithoutCorners) path.rQuadTo(0f, ry, rx, ry) path.rLineTo(widthWithoutCorners, 0f) path.rQuadTo(rx, 0f, rx, -ry) path.rLineTo(0f, -heightWithoutCorners) path.close() } }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="refresh" content="0;URL=type.BindingListIterator.html"> </head> <body> <p>Redirecting to <a href="type.BindingListIterator.html">type.BindingListIterator.html</a>...</p> <script>location.replace("type.BindingListIterator.html" + location.search + location.hash);</script> </body> </html>
{ "pile_set_name": "Github" }
{ "parent": "item/generated", "textures": { "layer0": "thebetweenlands:items/nettle_soup" } }
{ "pile_set_name": "Github" }
{{- if not .Values.statefulset.enabled }} {{- if and .Values.nexusBackup.enabled (and .Values.nexusBackup.persistence.enabled (not .Values.nexusBackup.persistence.existingClaim)) }} kind: PersistentVolumeClaim apiVersion: v1 metadata: name: {{ template "nexus.fullname" . }}-backup labels: {{ include "nexus.labels" . | indent 4 }} {{- if .Values.nexusBackup.persistence.annotations }} annotations: {{ toYaml .Values.nexusBackup.persistence.annotations | indent 4 }} {{- end }} spec: accessModes: - {{ .Values.nexusBackup.persistence.accessMode }} resources: requests: storage: {{ .Values.nexusBackup.persistence.storageSize | quote }} {{- if .Values.nexusBackup.persistence.storageClass }} {{- if (eq "-" .Values.nexusBackup.persistence.storageClass) }} storageClassName: "" {{- else }} storageClassName: "{{ .Values.nexusBackup.persistence.storageClass }}" {{- end }} {{- end }} {{- end }} {{- end }}
{ "pile_set_name": "Github" }
import { GenerateObservable } from './GenerateObservable'; export const generate = GenerateObservable.create; //# sourceMappingURL=generate.js.map
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <code_scheme name="ORCID Codestyle"> <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="25" /> <option name="RIGHT_MARGIN" value="170" /> <option name="JD_PARAM_DESCRIPTION_ON_NEW_LINE" value="true" /> <XML> <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" /> </XML> <codeStyleSettings language="JAVA"> <option name="SPACE_WITHIN_BRACES" value="true" /> <option name="SPACE_WITHIN_ARRAY_INITIALIZER_BRACES" value="true" /> <option name="IF_BRACE_FORCE" value="3" /> <option name="WRAP_LONG_LINES" value="true" /> </codeStyleSettings> </code_scheme>
{ "pile_set_name": "Github" }
/* GTK - The GIMP Toolkit * gtkrecentmanager.c: a manager for the recently used resources * * Copyright (C) 2006 Emmanuele Bassi * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library. If not, see <http://www.gnu.org/licenses/>. */ #include <glib/gstdio.h> #include <gtk/gtk.h> const char *uri = "file:///tmp/testrecentchooser.txt"; const char *uri2 = "file:///tmp/testrecentchooser2.txt"; static void recent_manager_get_default (void) { GtkRecentManager *manager; GtkRecentManager *manager2; manager = gtk_recent_manager_get_default (); g_assert (manager != NULL); manager2 = gtk_recent_manager_get_default (); g_assert (manager == manager2); } static void recent_manager_add (void) { GtkRecentManager *manager; GtkRecentData *recent_data; gboolean res; manager = gtk_recent_manager_get_default (); recent_data = g_slice_new0 (GtkRecentData); G_GNUC_BEGIN_IGNORE_DEPRECATIONS; /* mime type is mandatory */ recent_data->mime_type = NULL; recent_data->app_name = (char *)"testrecentchooser"; recent_data->app_exec = (char *)"testrecentchooser %u"; if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR)) { res = gtk_recent_manager_add_full (manager, uri, recent_data); } g_test_trap_assert_failed (); /* app name is mandatory */ recent_data->mime_type = (char *)"text/plain"; recent_data->app_name = NULL; recent_data->app_exec = (char *)"testrecentchooser %u"; if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR)) { res = gtk_recent_manager_add_full (manager, uri, recent_data); } g_test_trap_assert_failed (); /* app exec is mandatory */ recent_data->mime_type = (char *)"text/plain"; recent_data->app_name = (char *)"testrecentchooser"; recent_data->app_exec = NULL; if (g_test_trap_fork (0, G_TEST_TRAP_SILENCE_STDERR)) { res = gtk_recent_manager_add_full (manager, uri, recent_data); } g_test_trap_assert_failed (); G_GNUC_END_IGNORE_DEPRECATIONS; recent_data->mime_type = (char *)"text/plain"; recent_data->app_name = (char *)"testrecentchooser"; recent_data->app_exec = (char *)"testrecentchooser %u"; res = gtk_recent_manager_add_full (manager, uri, recent_data); g_assert (res == TRUE); g_slice_free (GtkRecentData, recent_data); } typedef struct { GtkRecentManager *manager; GMainLoop *main_loop; int counter; } AddManyClosure; static void check_bulk (GtkRecentManager *manager, gpointer data) { AddManyClosure *closure = data; if (g_test_verbose ()) g_print (G_STRLOC ": counter = %d\n", closure->counter); g_assert_cmpint (closure->counter, ==, 100); if (g_main_loop_is_running (closure->main_loop)) g_main_loop_quit (closure->main_loop); } static gboolean add_bulk (gpointer data_) { AddManyClosure *closure = data_; GtkRecentData *data = g_slice_new0 (GtkRecentData); int i; for (i = 0; i < 100; i++) { char *new_uri; data->mime_type = (char *)"text/plain"; data->app_name = (char *)"testrecentchooser"; data->app_exec = (char *)"testrecentchooser %u"; if (g_test_verbose ()) g_print (G_STRLOC ": adding item %d\n", i); new_uri = g_strdup_printf ("file:///doesnotexist-%d.txt", i); gtk_recent_manager_add_full (closure->manager, new_uri, data); g_free (new_uri); closure->counter += 1; } g_slice_free (GtkRecentData, data); return G_SOURCE_REMOVE; } static void recent_manager_add_many (void) { GtkRecentManager *manager = g_object_new (GTK_TYPE_RECENT_MANAGER, "filename", "recently-used.xbel", NULL); AddManyClosure *closure = g_new (AddManyClosure, 1); closure->main_loop = g_main_loop_new (NULL, FALSE); closure->counter = 0; closure->manager = manager; g_signal_connect (manager, "changed", G_CALLBACK (check_bulk), closure); g_idle_add (add_bulk, closure); g_main_loop_run (closure->main_loop); g_main_loop_unref (closure->main_loop); g_object_unref (closure->manager); g_free (closure); g_assert_cmpint (g_unlink ("recently-used.xbel"), ==, 0); } static void recent_manager_has_item (void) { GtkRecentManager *manager; gboolean res; manager = gtk_recent_manager_get_default (); res = gtk_recent_manager_has_item (manager, "file:///tmp/testrecentdoesnotexist.txt"); g_assert (res == FALSE); res = gtk_recent_manager_has_item (manager, uri); g_assert (res == TRUE); } static void recent_manager_move_item (void) { GtkRecentManager *manager; gboolean res; GError *error; manager = gtk_recent_manager_get_default (); error = NULL; res = gtk_recent_manager_move_item (manager, "file:///tmp/testrecentdoesnotexist.txt", uri2, &error); g_assert (res == FALSE); g_assert (error != NULL); g_assert (error->domain == GTK_RECENT_MANAGER_ERROR); g_assert (error->code == GTK_RECENT_MANAGER_ERROR_NOT_FOUND); g_error_free (error); error = NULL; res = gtk_recent_manager_move_item (manager, uri, uri2, &error); g_assert (res == TRUE); g_assert (error == NULL); res = gtk_recent_manager_has_item (manager, uri); g_assert (res == FALSE); res = gtk_recent_manager_has_item (manager, uri2); g_assert (res == TRUE); } static void recent_manager_lookup_item (void) { GtkRecentManager *manager; GtkRecentInfo *info; GError *error; manager = gtk_recent_manager_get_default (); error = NULL; info = gtk_recent_manager_lookup_item (manager, "file:///tmp/testrecentdoesnotexist.txt", &error); g_assert (info == NULL); g_assert (error != NULL); g_assert (error->domain == GTK_RECENT_MANAGER_ERROR); g_assert (error->code == GTK_RECENT_MANAGER_ERROR_NOT_FOUND); g_error_free (error); error = NULL; info = gtk_recent_manager_lookup_item (manager, uri2, &error); g_assert (info != NULL); g_assert (error == NULL); g_assert (gtk_recent_info_has_application (info, "testrecentchooser")); gtk_recent_info_unref (info); } static void recent_manager_remove_item (void) { GtkRecentManager *manager; gboolean res; GError *error; manager = gtk_recent_manager_get_default (); error = NULL; res = gtk_recent_manager_remove_item (manager, "file:///tmp/testrecentdoesnotexist.txt", &error); g_assert (res == FALSE); g_assert (error != NULL); g_assert (error->domain == GTK_RECENT_MANAGER_ERROR); g_assert (error->code == GTK_RECENT_MANAGER_ERROR_NOT_FOUND); g_error_free (error); /* remove an item that's actually there */ error = NULL; res = gtk_recent_manager_remove_item (manager, uri2, &error); g_assert (res == TRUE); g_assert (error == NULL); res = gtk_recent_manager_has_item (manager, uri2); g_assert (res == FALSE); } static void recent_manager_purge (void) { GtkRecentManager *manager; GtkRecentData *recent_data; int n; GError *error; manager = gtk_recent_manager_get_default (); /* purge, add 1, purge again and check that 1 item has been purged */ error = NULL; n = gtk_recent_manager_purge_items (manager, &error); g_assert (error == NULL); recent_data = g_slice_new0 (GtkRecentData); recent_data->mime_type = (char *)"text/plain"; recent_data->app_name = (char *)"testrecentchooser"; recent_data->app_exec = (char *)"testrecentchooser %u"; gtk_recent_manager_add_full (manager, uri, recent_data); g_slice_free (GtkRecentData, recent_data); error = NULL; n = gtk_recent_manager_purge_items (manager, &error); g_assert (error == NULL); g_assert (n == 1); } int main (int argc, char **argv) { gtk_test_init (&argc, &argv, NULL); g_test_add_func ("/recent-manager/get-default", recent_manager_get_default); g_test_add_func ("/recent-manager/add", recent_manager_add); g_test_add_func ("/recent-manager/add-many", recent_manager_add_many); g_test_add_func ("/recent-manager/has-item", recent_manager_has_item); g_test_add_func ("/recent-manager/move-item", recent_manager_move_item); g_test_add_func ("/recent-manager/lookup-item", recent_manager_lookup_item); g_test_add_func ("/recent-manager/remove-item", recent_manager_remove_item); g_test_add_func ("/recent-manager/purge", recent_manager_purge); return g_test_run (); }
{ "pile_set_name": "Github" }
#!/usr/bin/env python # Copyright Contributors to the Open Shading Language project. # SPDX-License-Identifier: BSD-3-Clause # https://github.com/imageworks/OpenShadingLanguage # Example that failed with a prior bug. # The test case is that layer a modifies Ci so is unconditional, but also # its output CCout is connected to layer b's CCin. There was a bug where # the earlier layer was run and its values copied before (duh, not after) # b's params would be initialized, thus overwriting the copied values. command += testshade("-layer alayer a -layer blayer b --connect alayer CCout blayer CCin")
{ "pile_set_name": "Github" }
/* ***** BEGIN LICENSE BLOCK ***** * Distributed under the BSD license: * * Copyright (c) 2010, Ajax.org B.V. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of Ajax.org B.V. nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * ***** END LICENSE BLOCK ***** */ define(function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = PerlHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.foldingRules = new CStyleFoldMode({start: "^=(begin|item)\\b", end: "^=(cut)\\b"}); this.$behaviour = this.$defaultBehaviour; }; oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "#"; this.blockComment = [ {start: "=begin", end: "=cut", lineStartOnly: true}, {start: "=item", end: "=cut", lineStartOnly: true} ]; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; if (tokens.length && tokens[tokens.length-1].type == "comment") { return indent; } if (state == "start") { var match = line.match(/^.*[\{\(\[:]\s*$/); if (match) { indent += tab; } } return indent; }; this.checkOutdent = function(state, line, input) { return this.$outdent.checkOutdent(line, input); }; this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; this.$id = "ace/mode/perl"; }).call(Mode.prototype); exports.Mode = Mode; });
{ "pile_set_name": "Github" }
.\" .\" Copyright 2012-2013 Samy Al Bahra. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" .Dd September 17, 2012 .Dt CK_RHS_RESET 3 .Sh NAME .Nm ck_rhs_reset .Nd remove all keys from a hash set .Sh LIBRARY Concurrency Kit (libck, \-lck) .Sh SYNOPSIS .In ck_rhs.h .Ft bool .Fn ck_rhs_reset "ck_rhs_t *hs" .Sh DESCRIPTION The .Fn ck_rhs_reset 3 function will remove all keys stored in the hash set pointed to by the .Fa hs argument. .Sh RETURN VALUES If successful, .Fn ck_rhs_reset 3 will return true and will otherwise return false on failure. This function will only fail if a replacement hash set could not be allocated internally. .Sh ERRORS Behavior is undefined if .Fa hs is uninitialized. Behavior is undefined if this function is called by a non-writer thread. .Sh SEE ALSO .Xr ck_rhs_init 3 , .Xr ck_rhs_move 3 , .Xr ck_rhs_destroy 3 , .Xr CK_RHS_HASH 3 , .Xr ck_rhs_iterator_init 3 , .Xr ck_rhs_next 3 , .Xr ck_rhs_get 3 , .Xr ck_rhs_put 3 , .Xr ck_rhs_put_unique 3 , .Xr ck_rhs_set 3 , .Xr ck_rhs_fas 3 , .Xr ck_rhs_remove 3 , .Xr ck_rhs_reset_size 3 , .Xr ck_rhs_grow 3 , .Xr ck_rhs_gc 3 , .Xr ck_rhs_rebuild 3 , .Xr ck_rhs_count 3 , .Xr ck_rhs_stat 3 .Pp Additional information available at http://concurrencykit.org/
{ "pile_set_name": "Github" }
/* * Copyright 2018 Red Hat Inc. * * 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. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) 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. */ #include "priv.h" #include <core/memory.h> #include <subdev/mmu.h> #include <engine/fifo.h> #include <nvif/class.h> static void gv100_fault_buffer_process(struct nvkm_fault_buffer *buffer) { struct nvkm_device *device = buffer->fault->subdev.device; struct nvkm_memory *mem = buffer->mem; u32 get = nvkm_rd32(device, buffer->get); u32 put = nvkm_rd32(device, buffer->put); if (put == get) return; nvkm_kmap(mem); while (get != put) { const u32 base = get * buffer->fault->func->buffer.entry_size; const u32 instlo = nvkm_ro32(mem, base + 0x00); const u32 insthi = nvkm_ro32(mem, base + 0x04); const u32 addrlo = nvkm_ro32(mem, base + 0x08); const u32 addrhi = nvkm_ro32(mem, base + 0x0c); const u32 timelo = nvkm_ro32(mem, base + 0x10); const u32 timehi = nvkm_ro32(mem, base + 0x14); const u32 info0 = nvkm_ro32(mem, base + 0x18); const u32 info1 = nvkm_ro32(mem, base + 0x1c); struct nvkm_fault_data info; if (++get == buffer->entries) get = 0; nvkm_wr32(device, buffer->get, get); info.addr = ((u64)addrhi << 32) | addrlo; info.inst = ((u64)insthi << 32) | instlo; info.time = ((u64)timehi << 32) | timelo; info.engine = (info0 & 0x000000ff); info.valid = (info1 & 0x80000000) >> 31; info.gpc = (info1 & 0x1f000000) >> 24; info.hub = (info1 & 0x00100000) >> 20; info.access = (info1 & 0x000f0000) >> 16; info.client = (info1 & 0x00007f00) >> 8; info.reason = (info1 & 0x0000001f); nvkm_fifo_fault(device->fifo, &info); } nvkm_done(mem); } static void gv100_fault_buffer_intr(struct nvkm_fault_buffer *buffer, bool enable) { struct nvkm_device *device = buffer->fault->subdev.device; const u32 intr = buffer->id ? 0x08000000 : 0x20000000; if (enable) nvkm_mask(device, 0x100a2c, intr, intr); else nvkm_mask(device, 0x100a34, intr, intr); } static void gv100_fault_buffer_fini(struct nvkm_fault_buffer *buffer) { struct nvkm_device *device = buffer->fault->subdev.device; const u32 foff = buffer->id * 0x14; nvkm_mask(device, 0x100e34 + foff, 0x80000000, 0x00000000); } static void gv100_fault_buffer_init(struct nvkm_fault_buffer *buffer) { struct nvkm_device *device = buffer->fault->subdev.device; const u32 foff = buffer->id * 0x14; nvkm_mask(device, 0x100e34 + foff, 0xc0000000, 0x40000000); nvkm_wr32(device, 0x100e28 + foff, upper_32_bits(buffer->addr)); nvkm_wr32(device, 0x100e24 + foff, lower_32_bits(buffer->addr)); nvkm_mask(device, 0x100e34 + foff, 0x80000000, 0x80000000); } static void gv100_fault_buffer_info(struct nvkm_fault_buffer *buffer) { struct nvkm_device *device = buffer->fault->subdev.device; const u32 foff = buffer->id * 0x14; nvkm_mask(device, 0x100e34 + foff, 0x40000000, 0x40000000); buffer->entries = nvkm_rd32(device, 0x100e34 + foff) & 0x000fffff; buffer->get = 0x100e2c + foff; buffer->put = 0x100e30 + foff; } static int gv100_fault_ntfy_nrpfb(struct nvkm_notify *notify) { struct nvkm_fault *fault = container_of(notify, typeof(*fault), nrpfb); gv100_fault_buffer_process(fault->buffer[0]); return NVKM_NOTIFY_KEEP; } static void gv100_fault_intr_fault(struct nvkm_fault *fault) { struct nvkm_subdev *subdev = &fault->subdev; struct nvkm_device *device = subdev->device; struct nvkm_fault_data info; const u32 addrlo = nvkm_rd32(device, 0x100e4c); const u32 addrhi = nvkm_rd32(device, 0x100e50); const u32 info0 = nvkm_rd32(device, 0x100e54); const u32 insthi = nvkm_rd32(device, 0x100e58); const u32 info1 = nvkm_rd32(device, 0x100e5c); info.addr = ((u64)addrhi << 32) | addrlo; info.inst = ((u64)insthi << 32) | (info0 & 0xfffff000); info.time = 0; info.engine = (info0 & 0x000000ff); info.valid = (info1 & 0x80000000) >> 31; info.gpc = (info1 & 0x1f000000) >> 24; info.hub = (info1 & 0x00100000) >> 20; info.access = (info1 & 0x000f0000) >> 16; info.client = (info1 & 0x00007f00) >> 8; info.reason = (info1 & 0x0000001f); nvkm_fifo_fault(device->fifo, &info); } static void gv100_fault_intr(struct nvkm_fault *fault) { struct nvkm_subdev *subdev = &fault->subdev; struct nvkm_device *device = subdev->device; u32 stat = nvkm_rd32(device, 0x100a20); if (stat & 0x80000000) { gv100_fault_intr_fault(fault); nvkm_wr32(device, 0x100e60, 0x80000000); stat &= ~0x80000000; } if (stat & 0x20000000) { if (fault->buffer[0]) { nvkm_event_send(&fault->event, 1, 0, NULL, 0); stat &= ~0x20000000; } } if (stat & 0x08000000) { if (fault->buffer[1]) { nvkm_event_send(&fault->event, 1, 1, NULL, 0); stat &= ~0x08000000; } } if (stat) { nvkm_debug(subdev, "intr %08x\n", stat); } } static void gv100_fault_fini(struct nvkm_fault *fault) { nvkm_notify_put(&fault->nrpfb); if (fault->buffer[0]) fault->func->buffer.fini(fault->buffer[0]); nvkm_mask(fault->subdev.device, 0x100a34, 0x80000000, 0x80000000); } static void gv100_fault_init(struct nvkm_fault *fault) { nvkm_mask(fault->subdev.device, 0x100a2c, 0x80000000, 0x80000000); fault->func->buffer.init(fault->buffer[0]); nvkm_notify_get(&fault->nrpfb); } int gv100_fault_oneinit(struct nvkm_fault *fault) { return nvkm_notify_init(&fault->buffer[0]->object, &fault->event, gv100_fault_ntfy_nrpfb, true, NULL, 0, 0, &fault->nrpfb); } static const struct nvkm_fault_func gv100_fault = { .oneinit = gv100_fault_oneinit, .init = gv100_fault_init, .fini = gv100_fault_fini, .intr = gv100_fault_intr, .buffer.nr = 2, .buffer.entry_size = 32, .buffer.info = gv100_fault_buffer_info, .buffer.pin = gp100_fault_buffer_pin, .buffer.init = gv100_fault_buffer_init, .buffer.fini = gv100_fault_buffer_fini, .buffer.intr = gv100_fault_buffer_intr, /*TODO: Figure out how to expose non-replayable fault buffer, which, * for some reason, is where recoverable CE faults appear... * * It's a bit tricky, as both NVKM and SVM will need access to * the non-replayable fault buffer. */ .user = { { 0, 0, VOLTA_FAULT_BUFFER_A }, 1 }, }; int gv100_fault_new(struct nvkm_device *device, int index, struct nvkm_fault **pfault) { return nvkm_fault_new_(&gv100_fault, device, index, pfault); }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2012-2013, NVIDIA Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ /* * Function naming determines intended use: * * <x>_r(void) : Returns the offset for register <x>. * * <x>_w(void) : Returns the word offset for word (4 byte) element <x>. * * <x>_<y>_s(void) : Returns size of field <y> of register <x> in bits. * * <x>_<y>_f(u32 v) : Returns a value based on 'v' which has been shifted * and masked to place it at field <y> of register <x>. This value * can be |'d with others to produce a full register value for * register <x>. * * <x>_<y>_m(void) : Returns a mask for field <y> of register <x>. This * value can be ~'d and then &'d to clear the value of field <y> for * register <x>. * * <x>_<y>_<z>_f(void) : Returns the constant value <z> after being shifted * to place it at field <y> of register <x>. This value can be |'d * with others to produce a full register value for <x>. * * <x>_<y>_v(u32 r) : Returns the value of field <y> from a full register * <x> value 'r' after being shifted to place its LSB at bit 0. * This value is suitable for direct comparison with other unshifted * values appropriate for use in field <y> of register <x>. * * <x>_<y>_<z>_v(void) : Returns the constant value for <z> defined for * field <y> of register <x>. This value is suitable for direct * comparison with unshifted values appropriate for use in field <y> * of register <x>. */ #ifndef __hw_host1x_uclass_host1x_h__ #define __hw_host1x_uclass_host1x_h__ static inline u32 host1x_uclass_incr_syncpt_r(void) { return 0x0; } #define HOST1X_UCLASS_INCR_SYNCPT \ host1x_uclass_incr_syncpt_r() static inline u32 host1x_uclass_incr_syncpt_cond_f(u32 v) { return (v & 0xff) << 8; } #define HOST1X_UCLASS_INCR_SYNCPT_COND_F(v) \ host1x_uclass_incr_syncpt_cond_f(v) static inline u32 host1x_uclass_incr_syncpt_indx_f(u32 v) { return (v & 0xff) << 0; } #define HOST1X_UCLASS_INCR_SYNCPT_INDX_F(v) \ host1x_uclass_incr_syncpt_indx_f(v) static inline u32 host1x_uclass_wait_syncpt_r(void) { return 0x8; } #define HOST1X_UCLASS_WAIT_SYNCPT \ host1x_uclass_wait_syncpt_r() static inline u32 host1x_uclass_wait_syncpt_indx_f(u32 v) { return (v & 0xff) << 24; } #define HOST1X_UCLASS_WAIT_SYNCPT_INDX_F(v) \ host1x_uclass_wait_syncpt_indx_f(v) static inline u32 host1x_uclass_wait_syncpt_thresh_f(u32 v) { return (v & 0xffffff) << 0; } #define HOST1X_UCLASS_WAIT_SYNCPT_THRESH_F(v) \ host1x_uclass_wait_syncpt_thresh_f(v) static inline u32 host1x_uclass_wait_syncpt_base_r(void) { return 0x9; } #define HOST1X_UCLASS_WAIT_SYNCPT_BASE \ host1x_uclass_wait_syncpt_base_r() static inline u32 host1x_uclass_wait_syncpt_base_indx_f(u32 v) { return (v & 0xff) << 24; } #define HOST1X_UCLASS_WAIT_SYNCPT_BASE_INDX_F(v) \ host1x_uclass_wait_syncpt_base_indx_f(v) static inline u32 host1x_uclass_wait_syncpt_base_base_indx_f(u32 v) { return (v & 0xff) << 16; } #define HOST1X_UCLASS_WAIT_SYNCPT_BASE_BASE_INDX_F(v) \ host1x_uclass_wait_syncpt_base_base_indx_f(v) static inline u32 host1x_uclass_wait_syncpt_base_offset_f(u32 v) { return (v & 0xffff) << 0; } #define HOST1X_UCLASS_WAIT_SYNCPT_BASE_OFFSET_F(v) \ host1x_uclass_wait_syncpt_base_offset_f(v) static inline u32 host1x_uclass_load_syncpt_base_r(void) { return 0xb; } #define HOST1X_UCLASS_LOAD_SYNCPT_BASE \ host1x_uclass_load_syncpt_base_r() static inline u32 host1x_uclass_load_syncpt_base_base_indx_f(u32 v) { return (v & 0xff) << 24; } #define HOST1X_UCLASS_LOAD_SYNCPT_BASE_BASE_INDX_F(v) \ host1x_uclass_load_syncpt_base_base_indx_f(v) static inline u32 host1x_uclass_load_syncpt_base_value_f(u32 v) { return (v & 0xffffff) << 0; } #define HOST1X_UCLASS_LOAD_SYNCPT_BASE_VALUE_F(v) \ host1x_uclass_load_syncpt_base_value_f(v) static inline u32 host1x_uclass_incr_syncpt_base_base_indx_f(u32 v) { return (v & 0xff) << 24; } #define HOST1X_UCLASS_INCR_SYNCPT_BASE_BASE_INDX_F(v) \ host1x_uclass_incr_syncpt_base_base_indx_f(v) static inline u32 host1x_uclass_incr_syncpt_base_offset_f(u32 v) { return (v & 0xffffff) << 0; } #define HOST1X_UCLASS_INCR_SYNCPT_BASE_OFFSET_F(v) \ host1x_uclass_incr_syncpt_base_offset_f(v) static inline u32 host1x_uclass_indoff_r(void) { return 0x2d; } #define HOST1X_UCLASS_INDOFF \ host1x_uclass_indoff_r() static inline u32 host1x_uclass_indoff_indbe_f(u32 v) { return (v & 0xf) << 28; } #define HOST1X_UCLASS_INDOFF_INDBE_F(v) \ host1x_uclass_indoff_indbe_f(v) static inline u32 host1x_uclass_indoff_autoinc_f(u32 v) { return (v & 0x1) << 27; } #define HOST1X_UCLASS_INDOFF_AUTOINC_F(v) \ host1x_uclass_indoff_autoinc_f(v) static inline u32 host1x_uclass_indoff_indmodid_f(u32 v) { return (v & 0xff) << 18; } #define HOST1X_UCLASS_INDOFF_INDMODID_F(v) \ host1x_uclass_indoff_indmodid_f(v) static inline u32 host1x_uclass_indoff_indroffset_f(u32 v) { return (v & 0xffff) << 2; } #define HOST1X_UCLASS_INDOFF_INDROFFSET_F(v) \ host1x_uclass_indoff_indroffset_f(v) static inline u32 host1x_uclass_indoff_rwn_read_v(void) { return 1; } #define HOST1X_UCLASS_INDOFF_INDROFFSET_F(v) \ host1x_uclass_indoff_indroffset_f(v) #endif
{ "pile_set_name": "Github" }
// https://github.com/tc39/proposal-object-values-entries var $export = require('./_export') , $values = require('./_object-to-array')(false); $export($export.S, 'Object', { values: function values(it){ return $values(it); } });
{ "pile_set_name": "Github" }
/* * helper functions for physically contiguous capture buffers * * The functions support hardware lacking scatter gather support * (i.e. the buffers must be linear in physical memory) * * Copyright (c) 2008 Magnus Damm * * Based on videobuf-vmalloc.c, * (c) 2007 Mauro Carvalho Chehab, <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 */ #include <linux/init.h> #include <linux/module.h> #include <linux/mm.h> #include <linux/pagemap.h> #include <linux/dma-mapping.h> #include <linux/sched.h> #include <linux/slab.h> #include <media/videobuf-dma-contig.h> struct videobuf_dma_contig_memory { u32 magic; void *vaddr; dma_addr_t dma_handle; unsigned long size; }; #define MAGIC_DC_MEM 0x0733ac61 #define MAGIC_CHECK(is, should) \ if (unlikely((is) != (should))) { \ pr_err("magic mismatch: %x expected %x\n", (is), (should)); \ BUG(); \ } static int __videobuf_dc_alloc(struct device *dev, struct videobuf_dma_contig_memory *mem, unsigned long size, gfp_t flags) { mem->size = size; mem->vaddr = dma_alloc_coherent(dev, mem->size, &mem->dma_handle, flags); if (!mem->vaddr) { dev_err(dev, "memory alloc size %ld failed\n", mem->size); return -ENOMEM; } dev_dbg(dev, "dma mapped data is at %p (%ld)\n", mem->vaddr, mem->size); return 0; } static void __videobuf_dc_free(struct device *dev, struct videobuf_dma_contig_memory *mem) { dma_free_coherent(dev, mem->size, mem->vaddr, mem->dma_handle); mem->vaddr = NULL; } static void videobuf_vm_open(struct vm_area_struct *vma) { struct videobuf_mapping *map = vma->vm_private_data; dev_dbg(map->q->dev, "vm_open %p [count=%u,vma=%08lx-%08lx]\n", map, map->count, vma->vm_start, vma->vm_end); map->count++; } static void videobuf_vm_close(struct vm_area_struct *vma) { struct videobuf_mapping *map = vma->vm_private_data; struct videobuf_queue *q = map->q; int i; dev_dbg(q->dev, "vm_close %p [count=%u,vma=%08lx-%08lx]\n", map, map->count, vma->vm_start, vma->vm_end); map->count--; if (0 == map->count) { struct videobuf_dma_contig_memory *mem; dev_dbg(q->dev, "munmap %p q=%p\n", map, q); videobuf_queue_lock(q); /* We need first to cancel streams, before unmapping */ if (q->streaming) videobuf_queue_cancel(q); for (i = 0; i < VIDEO_MAX_FRAME; i++) { if (NULL == q->bufs[i]) continue; if (q->bufs[i]->map != map) continue; mem = q->bufs[i]->priv; if (mem) { /* This callback is called only if kernel has allocated memory and this memory is mmapped. In this case, memory should be freed, in order to do memory unmap. */ MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); /* vfree is not atomic - can't be called with IRQ's disabled */ dev_dbg(q->dev, "buf[%d] freeing %p\n", i, mem->vaddr); __videobuf_dc_free(q->dev, mem); mem->vaddr = NULL; } q->bufs[i]->map = NULL; q->bufs[i]->baddr = 0; } kfree(map); videobuf_queue_unlock(q); } } static const struct vm_operations_struct videobuf_vm_ops = { .open = videobuf_vm_open, .close = videobuf_vm_close, }; /** * videobuf_dma_contig_user_put() - reset pointer to user space buffer * @mem: per-buffer private videobuf-dma-contig data * * This function resets the user space pointer */ static void videobuf_dma_contig_user_put(struct videobuf_dma_contig_memory *mem) { mem->dma_handle = 0; mem->size = 0; } /** * videobuf_dma_contig_user_get() - setup user space memory pointer * @mem: per-buffer private videobuf-dma-contig data * @vb: video buffer to map * * This function validates and sets up a pointer to user space memory. * Only physically contiguous pfn-mapped memory is accepted. * * Returns 0 if successful. */ static int videobuf_dma_contig_user_get(struct videobuf_dma_contig_memory *mem, struct videobuf_buffer *vb) { struct mm_struct *mm = current->mm; struct vm_area_struct *vma; unsigned long prev_pfn, this_pfn; unsigned long pages_done, user_address; unsigned int offset; int ret; offset = vb->baddr & ~PAGE_MASK; mem->size = PAGE_ALIGN(vb->size + offset); ret = -EINVAL; down_read(&mm->mmap_sem); vma = find_vma(mm, vb->baddr); if (!vma) goto out_up; if ((vb->baddr + mem->size) > vma->vm_end) goto out_up; pages_done = 0; prev_pfn = 0; /* kill warning */ user_address = vb->baddr; while (pages_done < (mem->size >> PAGE_SHIFT)) { ret = follow_pfn(vma, user_address, &this_pfn); if (ret) break; if (pages_done == 0) mem->dma_handle = (this_pfn << PAGE_SHIFT) + offset; else if (this_pfn != (prev_pfn + 1)) ret = -EFAULT; if (ret) break; prev_pfn = this_pfn; user_address += PAGE_SIZE; pages_done++; } out_up: up_read(&current->mm->mmap_sem); return ret; } static struct videobuf_buffer *__videobuf_alloc(size_t size) { struct videobuf_dma_contig_memory *mem; struct videobuf_buffer *vb; vb = kzalloc(size + sizeof(*mem), GFP_KERNEL); if (vb) { vb->priv = ((char *)vb) + size; mem = vb->priv; mem->magic = MAGIC_DC_MEM; } return vb; } static void *__videobuf_to_vaddr(struct videobuf_buffer *buf) { struct videobuf_dma_contig_memory *mem = buf->priv; BUG_ON(!mem); MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); return mem->vaddr; } static int __videobuf_iolock(struct videobuf_queue *q, struct videobuf_buffer *vb, struct v4l2_framebuffer *fbuf) { struct videobuf_dma_contig_memory *mem = vb->priv; BUG_ON(!mem); MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); switch (vb->memory) { case V4L2_MEMORY_MMAP: dev_dbg(q->dev, "%s memory method MMAP\n", __func__); /* All handling should be done by __videobuf_mmap_mapper() */ if (!mem->vaddr) { dev_err(q->dev, "memory is not alloced/mmapped.\n"); return -EINVAL; } break; case V4L2_MEMORY_USERPTR: dev_dbg(q->dev, "%s memory method USERPTR\n", __func__); /* handle pointer from user space */ if (vb->baddr) return videobuf_dma_contig_user_get(mem, vb); /* allocate memory for the read() method */ if (__videobuf_dc_alloc(q->dev, mem, PAGE_ALIGN(vb->size), GFP_KERNEL)) return -ENOMEM; break; case V4L2_MEMORY_OVERLAY: default: dev_dbg(q->dev, "%s memory method OVERLAY/unknown\n", __func__); return -EINVAL; } return 0; } static int __videobuf_mmap_mapper(struct videobuf_queue *q, struct videobuf_buffer *buf, struct vm_area_struct *vma) { struct videobuf_dma_contig_memory *mem; struct videobuf_mapping *map; int retval; unsigned long size; dev_dbg(q->dev, "%s\n", __func__); /* create mapping + update buffer list */ map = kzalloc(sizeof(struct videobuf_mapping), GFP_KERNEL); if (!map) return -ENOMEM; buf->map = map; map->q = q; buf->baddr = vma->vm_start; mem = buf->priv; BUG_ON(!mem); MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); if (__videobuf_dc_alloc(q->dev, mem, PAGE_ALIGN(buf->bsize), GFP_KERNEL | __GFP_COMP)) goto error; /* Try to remap memory */ size = vma->vm_end - vma->vm_start; vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); /* the "vm_pgoff" is just used in v4l2 to find the * corresponding buffer data structure which is allocated * earlier and it does not mean the offset from the physical * buffer start address as usual. So set it to 0 to pass * the sanity check in vm_iomap_memory(). */ vma->vm_pgoff = 0; retval = vm_iomap_memory(vma, mem->dma_handle, size); if (retval) { dev_err(q->dev, "mmap: remap failed with error %d. ", retval); dma_free_coherent(q->dev, mem->size, mem->vaddr, mem->dma_handle); goto error; } vma->vm_ops = &videobuf_vm_ops; vma->vm_flags |= VM_DONTEXPAND; vma->vm_private_data = map; dev_dbg(q->dev, "mmap %p: q=%p %08lx-%08lx (%lx) pgoff %08lx buf %d\n", map, q, vma->vm_start, vma->vm_end, (long int)buf->bsize, vma->vm_pgoff, buf->i); videobuf_vm_open(vma); return 0; error: kfree(map); return -ENOMEM; } static struct videobuf_qtype_ops qops = { .magic = MAGIC_QTYPE_OPS, .alloc_vb = __videobuf_alloc, .iolock = __videobuf_iolock, .mmap_mapper = __videobuf_mmap_mapper, .vaddr = __videobuf_to_vaddr, }; void videobuf_queue_dma_contig_init(struct videobuf_queue *q, const struct videobuf_queue_ops *ops, struct device *dev, spinlock_t *irqlock, enum v4l2_buf_type type, enum v4l2_field field, unsigned int msize, void *priv, struct mutex *ext_lock) { videobuf_queue_core_init(q, ops, dev, irqlock, type, field, msize, priv, &qops, ext_lock); } EXPORT_SYMBOL_GPL(videobuf_queue_dma_contig_init); dma_addr_t videobuf_to_dma_contig(struct videobuf_buffer *buf) { struct videobuf_dma_contig_memory *mem = buf->priv; BUG_ON(!mem); MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); return mem->dma_handle; } EXPORT_SYMBOL_GPL(videobuf_to_dma_contig); void videobuf_dma_contig_free(struct videobuf_queue *q, struct videobuf_buffer *buf) { struct videobuf_dma_contig_memory *mem = buf->priv; /* mmapped memory can't be freed here, otherwise mmapped region would be released, while still needed. In this case, the memory release should happen inside videobuf_vm_close(). So, it should free memory only if the memory were allocated for read() operation. */ if (buf->memory != V4L2_MEMORY_USERPTR) return; if (!mem) return; MAGIC_CHECK(mem->magic, MAGIC_DC_MEM); /* handle user space pointer case */ if (buf->baddr) { videobuf_dma_contig_user_put(mem); return; } /* read() method */ if (mem->vaddr) { __videobuf_dc_free(q->dev, mem); mem->vaddr = NULL; } } EXPORT_SYMBOL_GPL(videobuf_dma_contig_free); MODULE_DESCRIPTION("helper module to manage video4linux dma contig buffers"); MODULE_AUTHOR("Magnus Damm"); MODULE_LICENSE("GPL");
{ "pile_set_name": "Github" }
{ "name": "民用航空法", "status": "實施", "content": [ { "num": 1, "zh": "第一條", "article": "為保障飛航安全,健全民航制度,符合國際民用航空標準法則,促進民用航空之發展,特制定本法。" }, { "num": 2, "zh": "第二條", "article": "本法用詞,定義如左:一、航空器:指飛機、飛艇、氣球及其他任何藉空氣之反作用力,得以飛航於大氣中之器物。二、航空站:指全部載卸客貨之設施與裝備,及用於航空器起降活動之區域。三、飛航:指航空器之起飛、航行、降落及起飛前降落後所需在飛行場之滑行。四、航空人員:指航空器駕駛員、領航員、飛航通信員、飛航機械員與其他為飛航服務之航空機械、飛航管制及航空器簽派人員。五、飛行場:指用於航空器起降活動之水陸區域。六、助航設備:指輔助飛航通信、氣象、無線電導航、目視助航及其他用以引導航空器安全飛航之設備。七、航路:指經民用航空局指定適於航空器空間航行之通路。八、特種飛航:指航空器試飛、特技飛航、逾限或故障維護及運渡等經核准之單次飛航活動。九、飛航管制:指為求增進飛航安全,加速飛航流量與促使飛航有序,所提供之服務。十、機長:指負責航空器飛航時之作業及安全之駕駛員。十一、民用航空運輸業:指以航空器直接載運客、貨、郵件,取得報酬之事業。十二、普通航空業:指除經營航空客、貨、郵件運輸以外之航空事業。十三、航空貨運承攬業:指以自已之名義,為他人之計算,使民用航空運輸業運送航空貨物而受報酬之事業。十四、航空站地勤業:指於機坪內從事航空器施曳、導引,行李、貨物及餐點裝卸,機艙清潔及其他有關勞務之事業。十五、航空器失事:指自任何人員為飛航目的登上航空器時起,至所有人員離開該航空器時止,於航空器運作中所發生之事故,直接對他人或航空器上之人,造成死亡或傷害,或使航空器遭受實質上之損壞或失蹤。", "reason": "一、參照公路法、航業法,發展觀光條例等交通法律立法例,將本條各款之用語,予以文字修正。二、第六款「電子」一詞修正為「無線電導航」,以符實際。三、參考獎勵投資條例第三條第八款後段及航業法第二條第二款之規定,將第十一款末句中之「業務」二字修正為「事業」。四、第十二款末句中之「業務」二字修正為「事業」。五、參照航業法第二條第四款之規定,將第十三款末句中之「業務」二字修正為「事業」。六、配合第十一款至第十三款之規定,將第十四款末句中之「業務」二字修正為「事業」。七、參照芝加哥民航公約第十三號附約規定航空器失事之定義,於第十五款增訂航空器失事,包括航空器失蹤在案。" }, { "num": 3, "zh": "第三條", "article": "交通部為辦理民用航空事業,設交通部民用航空局(以下簡稱民航局);其組織另以法律定之。" }, { "num": 4, "zh": "第四條", "article": "空域之運用及管制區域、管制地帶、限航區與禁航區之劃定,由交通部會同國防部定之。" }, { "num": 5, "zh": "第五條", "article": "航空器自外國一地進入中華民國境內第一次降落,及自國境前往外國一地之起飛,應在指定之國際航空站起降。但緊急情況時不在此限。" }, { "num": 6, "zh": "第六條", "article": "航空器如須在軍用飛行場降落,或利用軍用航空站設備時,應由航空器所有人申請民航局轉請軍事航空管理機構核准。但因故緊急降落者,不在此限。航空器在軍用飛行場起降,應遵照該場之規則,並聽從其指揮。" }, { "num": 7, "zh": "第七條", "article": "中華民國國民、法人及政府各級機關,均得依本法及其他有關法令享有自備航空器之權利。外國人,除依第七章有關規定外,不得在中華民國境內自備航空器。" }, { "num": 8, "zh": "第八條", "article": "航空器應由所有人向民航局申請登記,經審查合格後發給登記證書,已登記之航空器,非經核准註銷其登記,不得另在他國登記。曾在他國登記之航空器,非經撤銷其登記,不得在中華民國申請登記。" }, { "num": 9, "zh": "第九條", "article": "領有登記證書之航空器,應由所有人向民航局申請檢定;檢定合格者,發給適航證書。" }, { "num": 10, "zh": "第十條", "article": "航空器合於左列規定之一者,為中華民國航空器:一、中華民國國民所有者。二、中華民國政府各級機關所有者。三、依中華民國法律設立,在中華民國有主事務所之左列法人所有者:(一)無限公司之股東全體為中華民國國民者。(二)有限公司之資本三分之二以上為中華民國國民所有,其代表公司之董事為中華民國國民者。(三)兩合公司之無限責任股東全體為中華民國國民者。(四)股份有限公司之董事長及董事三分之二以上為中華民國國民,其資本三分之二以上為中華民國國民所有者。(五)其他法人之代表人全體為中華民國國民者。非中華民國航空器,不得在中華民國申請登記。", "reason": "一、依現行民用航空法第十條第一項第三款第二目規定,有限公司祗須資本三分之二以上為中華民國國民所有,或設有董事,其董事長及董事三分之二以上為中華民國國民者,其所有之航空器即屬中華民國航空器。惟按有限公司依公司法第一百零八條規定,應至少置董事一人並代表公司,最多置董事三人。因之,有限公司得僅置董事一人,由中國人擔任,其資本大部分為外國人所有,致代表公司之董事形同雇用,公司業務仍受外資控制,爰修正第三款第二目,明定有限公司之資本須三分之二以上為中華民國國民所有,其代表公司之董事應為中華民國國民,方得為中華民國航空器,以資限制。二、六十九年五月九日修正公布之公司法已刪除股份兩合公司(參閱公司法第二條),爰將本條第三款第四目中之股份兩合公司之規定刪除,並配合公司法第二條規定公司稱類之順序,改列為修正後之第十條第一項第三款第三目。三、本條第一項第三款第三目,依公司法第二條規定公司種類之順序,改列為第三款第四目,以資配合。" }, { "num": 11, "zh": "第十一條", "article": "航空器登記後,應將中華民國國籍標誌及登記號碼,標明於航空器上顯著之處。" }, { "num": 12, "zh": "第十二條", "article": "登記證書遇有左列情事之一者,失其效力:一、航空器所有權移轉時。二、航空器滅失或毀壞致不能修復時。三、航空器拆卸或棄置時。四、航空器喪失國籍時。" }, { "num": 13, "zh": "第十三條", "article": "適航證書遇有左列情事之一者,失其效力:一、有效期間屆滿時。二、登記證書失效時。三、航空器不合於適航安全條件時。" }, { "num": 14, "zh": "第十四條", "article": "登記證書或適航證書失效時,由民航局公告作廢。持有人並應自失效之日起二十日內,向民航局繳還原證書。" }, { "num": 15, "zh": "第十五條", "article": "已登記之航空器,如發現與第八條第二項或第十條第一項所定各款之規定不合者,民航局應撤銷其登記,並令繳還登記證書。" }, { "num": 16, "zh": "第十六條", "article": "登記證書失效時,除依前二條之規定辦理外,民航局應即註銷其登記。" }, { "num": 17, "zh": "第十七條", "article": "航空器,除本法有特別規定外,適用民法及其他法律有關動產之規定。" }, { "num": 18, "zh": "第十八條", "article": "航空器得為扺押權之標的。航空器之扺押,準用動產擔保交易法有關動產扺押之規定。" }, { "num": 19, "zh": "第十九條", "article": "航空器所有權移轉、扺押權設定及其租賃,非經登記不得對抗第三人。" }, { "num": 20, "zh": "第二十條", "article": "共有航空器準用海商法第十一條至第十四條及第十六條至第十九條之規定。" }, { "num": 21, "zh": "第二十一條", "article": "航空器,除本法或其他法律別有規定外,自開始飛航時起,至完成該次飛航時止,不得施行扣留、扣押或假扣押。" }, { "num": 22, "zh": "第二十二條", "article": "航空器、航空發動機、螺旋漿、航空器各項裝備及其備用重要零件之製造、修理廠、所,除依法申請設立外,應向民航局申請檢定;經檢定合格給證後,始可營業。", "reason": "有關本法應予訂定之各種規則,本法第九十二條已予概括授權,本條第二項無規定必要,爰予刪除。" }, { "num": 23, "zh": "第二十三條", "article": "航空人員應為中華民國國民。但經交通部特許者,不在此限。" }, { "num": 24, "zh": "第二十四條", "article": "航空人員經檢定合格,由民航局發給執業證書、檢定證及體格檢查及格證後,方得執行業務,並應於執業時隨身攜帶。" }, { "num": 25, "zh": "第二十五條", "article": "民航局對於航空人員之技能、體格或性行,應為定期檢查,並得為臨時檢查;經檢查不合標準時,應限制、暫停或終止其執業。前項檢查標準,由民航局定之。" }, { "num": 26, "zh": "第二十六條", "article": "交通部為造就民用航空人才,得商同教育部設立民用航空學校。私立航空人員訓練機構,於立案前,應先經交通部核准。" }, { "num": 27, "zh": "第二十七條", "article": "國營航空站由民航局報經交通部核准後設立經營之。省(市)、縣(市)營航空站由省(市)政府向民航局申請,經交通部核准後設立經營之;廢止時亦同。航空站,除依前項規定外,不得設立。" }, { "num": 28, "zh": "第二十八條", "article": "飛行場得由中華民國各級政府、中華民國國民或具有第十條第一項第三款規定資格之法人向民航局申請,經交通部會同有關機關核准設立經營;其出租、轉讓或廢止時亦同。前項飛行場之經營人及管理人應以中華民國國民為限。" }, { "num": 29, "zh": "第二十九條", "article": "航空站及飛行場,非經民航局許可,不得兼供他用。" }, { "num": 30, "zh": "第三十條", "article": "國境內助航設備,由民航局統籌辦理之。" }, { "num": 31, "zh": "第三十一條", "article": "航空站、飛行場及助航設備四週之建築物、燈光及其他障礙物,交通部得依照飛航安全標準,會同有關機關加以限制。前項飛航安全標準,由民航局報請交通部核定公告之。" }, { "num": 32, "zh": "第三十二條", "article": "航空站、飛行場及助航設備四週有礙飛航之物體,得由民航局依照前條飛航安全標準通知物主限期拆遷或負責裝置障礙燈及標誌。前項有礙飛航之物體,如於前條飛航安全標準訂定公告時已存在者,其拆遷由民航局給予合理補償。" }, { "num": "32.1", "zh": "第三十二條之一", "article": "航空站或飛行場四週之一定距離範圍內,禁止飼養飛鴿。其已設之鴿舍,由航空站及航空警察局會同有關警察機關通知其所有人限期遷移;逾期不遷移或仍有擅自設舍飼養者,強制拆除並沒入其飛鴿。航空站或飛行場四週之一定距離範圍內,民航局應採取適當措施,防止飛鴿及鳥類侵入。前二項之距離範圍,由交通部會同內政部劃定公告。", "reason": "民用航空機場飛鴿飛入機場接近航空器,常為飛機引擎吸入,使引擎發生故障,如在起飛升入空中時發生,將造成嚴重之空難事件,國際民航公約第十四號附約第九章規定締約國有關當局應在飛行場及其週圍採取適當措施阻止或減少飛禽出現以免妨害飛行安全。" }, { "num": 33, "zh": "第三十三條", "article": "航空站、飛行場及助航設備所需之土地,得依土地法之規定徵收之。" }, { "num": 34, "zh": "第三十四條", "article": "航空器使用航空站、飛行場及助航設備,應依規定繳費;其收費標準,由交通部訂定公告之。" }, { "num": 35, "zh": "第三十五條", "article": "航空器飛航時,應具備左列文書:一、航空器登記證書。二、航空器適航證書。三、飛航日記簿。四、載客時乘客名單。五、貨物及郵件清單。六、航空器無線電臺執照。航空器飛航前,經民航局檢查發覺未具備前項文書或其文書失效者,應制止其飛航。", "reason": "增訂第二項,就第三十七條後段移列修正。" }, { "num": 36, "zh": "第三十六條", "article": "航空器之特種飛航,應先申請民航局核准。" }, { "num": 37, "zh": "第三十七條", "article": "領有航空器適航證書之航空器,其所有人或使用人,應對航空器為妥善之維護,並應於飛航前依規定施行檢查,保持其適航安全條件。如不適航,應停止飛航;檢查員或機長認為不適航時亦同。前項航空器,民航局應派員或委託有關機關,團體指派合格之技術人員依規定施行定期及臨時檢查,並應受民航局之監督,如其維護狀況不合於適航安全條件者,應制止其飛航,並撤銷其適航證書。航空器檢查委託辦法,由交通部定之。", "reason": "一、本條增訂第一項,規定航空器所有人或使用人於領取適航證書後,應對航空器為妥善之維護,保持適航安全條件。二、現行條文改列為第二項並予修正。三、民航局對於領有適航證書之航空器應派員或委託有關機關、團體指派合格之技術人員依規定施行定期及臨時檢查,如其維護狀" }, { "num": 38, "zh": "第三十八條", "article": "航空器飛航時,應遵照飛航及管制規則,並須接受飛航管制機構之指示。" }, { "num": 39, "zh": "第三十九條", "article": "航空器不得飛越禁航區域。" }, { "num": 40, "zh": "第四十條", "article": "航空器,除經民航局核准外,不得裝載武器、彈藥、爆炸物品、毒氣、放射性物料或其他危害飛航安全之物品。航空人員及乘客亦不得私帶前項物品。" }, { "num": 41, "zh": "第四十一條", "article": "航空器飛航中,不得投擲任何物件。但法令另有規定,或為飛航安全,或為救助任務,而須投擲時,不在此限。" }, { "num": 42, "zh": "第四十二條", "article": "航空器在飛航中,機長為負責人,並得為一切緊急處置。" }, { "num": 43, "zh": "第四十三條", "article": "航空器及其裝載之客貨,均應於起飛前降落後,依法接受有關機關之檢查。" }, { "num": 44, "zh": "第四十四條", "article": "經營民用航空運輸者,應向民航局申請,經交通部核准,由民航局發給民用航空運輸業許可證後,依法向有關機關登記,方得營業。民用航空運輸業自核准登記之日起,逾六個月而未備有航空器開業,或開業後停業逾六個月者,除因特殊情形申請延期經核准者外,前項許可證即失其效力,並由民航局通知有關機關撤銷其登記。前二項規定,於經營普通航空業務、航空貨運承攬業務及航空站地勤業務者準用之。" }, { "num": 45, "zh": "第四十五條", "article": "民用航空運輸業如係法人組織,應合於第十條第一項第三款任一目之規定。股份有限公司發行股票者,其股票均應記名。前二項規定,於經營普通航空業務者準用之。" }, { "num": 46, "zh": "第四十六條", "article": "民用航空運輸業須持有航線證書,方得在指定航線上經營定期航空運輸業務;航線起迄經停地點、業務性質及期限,均於航線證書上規定之。" }, { "num": 47, "zh": "第四十七條", "article": "民用航空運輸業許可證或航線證書,不得轉移,其持有人不得認為已取得各該許可證或證書所載各項之專營權。" }, { "num": 48, "zh": "第四十八條", "article": "已領有航線證書之民用航空運輸業,或經停中華民國境內之航空器,應依郵政法之規定,負責載運郵件。" }, { "num": 49, "zh": "第四十九條", "article": "航空函件運費應低於普通航空貨物運價;航空郵政包裹運費不得高於普通航空貨物運價。" }, { "num": 50, "zh": "第五十條", "article": "民用航空運輸業對航空函件,應在客貨之前優先運送。" }, { "num": 51, "zh": "第五十一條", "article": "民用航空運輸業客貨之運價,由交通部核定,非經申請核准不得增減之。交通部為增進飛航安全,擴建設備,得徵收航空保安建設費。但不得超過客貨運價百分之十;其徵收標準,由交通部報請行政院核定之。" }, { "num": 52, "zh": "第五十二條", "article": "民用航空運輸業應將左列表報按期送請民航局核轉交通部備查:一、有關營運者。二、有關財務者。三、有關航務者。四、有關機務者。五、股本百分之五以上股票持有者。民航局於必要時,並得檢查其營運財務狀況及其他有關文件。" }, { "num": 53, "zh": "第五十三條", "article": "民用航空運輸業具有左列情事之一時,除應依法辦理外,並應申報民航局核轉交通部備查:一、增減資本。二、發行公司債。三、與其他民用航空運輸業相互間或與其他企業組織間,有關租借、聯運及代理等契約。四、主要航務及機務設備之變更或遷移。五、兼營航空運輸以外業務。" }, { "num": 54, "zh": "第五十四條", "article": "民航局為應公共利益之需要,得報請交通部核准後,通知民用航空運輸業修改或增闢指定航線。" }, { "num": 55, "zh": "第五十五條", "article": "政府遇有緊急需要時,民用航空運輸業應接受交通部之指揮,辦理交辦之運輸事項。" }, { "num": 56, "zh": "第五十六條", "article": "民用航空運輸業依法解散時,其許可證及航線證書同時失效,並應於三十日內向民航局繳銷之。" }, { "num": 57, "zh": "第五十七條", "article": "民用航空運輸業許可證及航線證書定有期限者,期滿後非依法再行申請核准,不得繼續營業。" }, { "num": 58, "zh": "第五十八條", "article": "外籍航空器,非經交通部許可,不得在中華民國領域飛越或降落。" }, { "num": 59, "zh": "第五十九條", "article": "外籍航空器或外籍民用航空運輸業,須經交通部許可,始得飛航於中華民國境內之一地與境外一地之間,按有償或無償方式非定期載運客貨郵件。" }, { "num": 60, "zh": "第六十條", "article": "外籍航空器或外籍民用航空運輸業,依條約或協定,定期飛航於中華民國境內之一地與境外一地之間,按有償或無償方式載運客貨、郵件,應先向民航局申請核發航線證書。外籍航空器或外籍民用航空運輸業,如違反本法或有關法規之規定或航線證書所列之條件,或違反前項條約或協定之規定,民航局得暫停或撤銷其所發給之航線證書。" }, { "num": 61, "zh": "第六十一條", "article": "外籍航空器或外籍民用航空運輸業,不得在中華民國境內兩地之間按有償或無償方式載運客貨、郵件或在中華民國境內經營普通航空業務。" }, { "num": 62, "zh": "第六十二條", "article": "航空器失事時,該航空器所有人、承租人或借用人,應即報告民航局,提供一切資料並採取行動,救護並協助失事調查。" }, { "num": 63, "zh": "第六十三條", "article": "航空器失事,在其附近空域飛航之航空器,有參加搜尋救護之義務。失事現場之地方有關機關,應協助民航局人員進行失事調查。" }, { "num": 64, "zh": "第六十四條", "article": "航空器失事如涉及空運公共安全情節重大時,民航局得會同有關機關組成臨時機構進行調查。" }, { "num": 65, "zh": "第六十五條", "article": "失事調查如涉及軍用航空器者,民航局應與軍事機關協同進行之。" }, { "num": 66, "zh": "第六十六條", "article": "失事調查如涉及或純為外籍航空器時,民航局得許可該航空器登記國指派人員協同進行。" }, { "num": 67, "zh": "第六十七條", "article": "航空器失事致人死傷,或毀損動產、不動產時,不論故意或過失,航空器所有人應負損害賠償責任。其因不可抗力所生之損害,亦應負責。自航空器上落下或投下物品,致生損害時亦同。" }, { "num": 68, "zh": "第六十八條", "article": "航空器依租賃或借貸而使用者,關於前條所生之損害,由所有人與承租人或借用人負連帶賠償責任。但租賃已登記,除所有人有過失外,由承租人單獨負責。" }, { "num": 69, "zh": "第六十九條", "article": "乘客於航空器中或於上下航空器時,因意外事故致死亡或傷害者,航空器使用人或運送人應負賠償之責。但因可歸責於乘客之事由,或因乘客有過失而發生者,得免除或減輕賠償。" }, { "num": 70, "zh": "第七十條", "article": "損害之發生,由於航空人員或第三人故意或過失所致者,航空器所有人、承租人或借用人,對於航空人員或第三人有求償權。" }, { "num": 71, "zh": "第七十一條", "article": "乘客及載運貨物,或航空器上工作人員之損害賠償額,有特別契約者,依其契約;無特別契約者,由交通部依照本法有關規定並參照國際間賠償額之標準訂定辦法,報請行政院核定公告之。前項特別契約,應以書面為之。" }, { "num": 72, "zh": "第七十二條", "article": "航空器所有人應於依第八條申請登記前,民用航空運輸業應於依第四十四條申請許可前,投保責任保險。前項責任保險,經交通部訂定金額者,應依訂定之金額投保之。" }, { "num": 73, "zh": "第七十三條", "article": "外籍航空器經特許在中華民國領域飛航時,交通部得命先提出適當之責任擔保金額。" }, { "num": 74, "zh": "第七十四條", "article": "未經提供責任擔保之外籍航空器,或未經特許緊急降落或傾跌於中華民國領域之外籍航空器,地方機關得扣留其航空器及駕駛員;其因而致人或物發生損害時,並應依法賠償。遇前項情形,除有其他違反法令情事外,航空器所有人、承租人、借用人或駕駛員能提出擔保經地方機關認可時,應予放行。" }, { "num": 75, "zh": "第七十五條", "article": "因第六十七條所生損害賠償之訴訟,得由損害發生地之法院管轄之。因第六十九條所生損害賠償之訴訟,得由運送契約訂定地或運送目的地之法院管轄之。" }, { "num": 76, "zh": "第七十六條", "article": "因航空器失事,失蹤人於失蹤滿一年後,法院得因利害關係人之聲請為死亡之宣告。航空器失事之賠償責任及其訴訟之管轄,除依本法規定外,適用民法及民事訴訟法之規定。" }, { "num": 77, "zh": "第七十七條", "article": "以強暴、脅迫或其他方法劫持航空器者,處死刑、無期徒刑。前項之未遂犯罰之。預備犯第一項之罪者,處三年以下有期徒刑。" }, { "num": 78, "zh": "第七十八條", "article": "以強暴脅迫或其他方法危害飛航安全或其設施者,處七年以下有期徒刑、拘役或二千元以上七千元以下罰金。因而致航空器或其設施毀損者,處三年以上十年以下有期徒刑。因而致人於死者,處死刑、無期徒刑或十年以上有期徒刑。致重傷者,處五年以上十二年以下有期徒刑。第一項之未遂犯罰之。" }, { "num": 79, "zh": "第七十九條", "article": "違反第四十條之規定者,處五年以下有期徒刑、拘役或一千元以上五千元以下罰金。因而致人於死者,處無期徒刑或七年以上有期徒刑。致重傷者,處三年以上十年以下有期徒刑。" }, { "num": 80, "zh": "第八十條", "article": "使用未領適航證書之航空器飛航者,處五年以下有期徒刑、拘役或一千元以上五千元以下罰金;以無效之適航證書飛航者亦同。" }, { "num": 81, "zh": "第八十一條", "article": "未領執業證書或檢定證而從事飛航者,處五年以下有期徒刑、拘役或一千元以上五千元以下罰金;任用者亦同。" }, { "num": 82, "zh": "第八十二條", "article": "以詐術申請檢定或登記因而取得航空人員執業證書、檢定證、體格檢查及格證或航空器登記證書或適航證書者,處五年以下有期徒刑、拘役或一千元以上五千元以下罰金。前項書證由民航局撤銷之。" }, { "num": 83, "zh": "第八十三條", "article": "違反第五十八條之規定者,其機長處三年以下有期徒刑、拘役或一千元以上五千元以下罰金。" }, { "num": 84, "zh": "第八十四條", "article": "航空人員或乘客違反第四十一條之規定,而無正當理由者,處三年以下有期徒刑、拘役或一千元以上三千元以下罰金。" }, { "num": 85, "zh": "第八十五條", "article": "違反第三十九條之規定者,處二年以下有期徒刑、拘役或一千元以上三千元以下罰金。" }, { "num": 86, "zh": "第八十六條", "article": "航空人員有左列各款行為之一者,處六月以下有期得刑、拘役或一千元以上五千元以下罰金:一、飛航逾各項規定標準限制者。二、飛航時航空器應具備之文書不全者。三、無故在飛行場以外降落或起飛者。四、不遵照指定之航路及高度飛航者。五、航空器起飛前降落後拒絕檢查者。" }, { "num": 87, "zh": "第八十七條", "article": "航空器所有人或民用航空運輸業有左列各款行為之一者,處拘役或一千元以上五千元以下罰金:一、航空器國籍標誌及登記號碼不明,或不依規定地位標明者。二、未經許可,而經營航空運輸業務者。" }, { "num": 88, "zh": "第八十八條", "article": "未經核准而設立民營飛行場者,處拘役或一千元以上三千元以下罰金。" }, { "num": 89, "zh": "第八十九條", "article": "民營飛行場之經營人、管理人有左列各款行為之一者,處拘役或五百元以上二千元以下罰金:一、未經許可將飛行場兼充他用者。二、未經許可將飛行場廢止、讓與或出租者。三、飛行場收取費用,不依規定者。" }, { "num": 90, "zh": "第九十條", "article": "航空器所有人、民用航空運輸業者或民營飛行場之設立人,如係法人組織,其犯第八十七條或第八十八條之罪者,除依各該條之規定處罰其負責人外,對該法人亦科以各該條之罰金。" }, { "num": 91, "zh": "第九十一條", "article": "有左列情事之一者,處二千元以上一萬元以下罰鍰:一、違反第五十一條第一項、第五十二條第一項或第五十三條之規定者。二、妨礙第五十二條第二項之檢查者。三、登記證書或適航證書及依據本法所發其他證書應繳銷而不繳銷者。四、執業證書或檢定證應繳銷而不繳銷者。前項罰鍰拒不繳納者,移送法院強制執行。" }, { "num": 92, "zh": "第九十二條", "article": "本法施行細則及各種規則,由交通部定之。本法未規定事項,民航局得參照有關國際民用航空公約之各項附約所頒標準、建議、辦法或程序,報請交通部核准採用。" }, { "num": 93, "zh": "第九十三條", "article": "本法自公布日施行。" }, { "num": 94, "zh": "第九十四條", "article": "航空人員有左列各款行為之一者,處六個月以下有期徒刑,拘役,或一千元以下罰金:一、飛航逾限制者。二、執業證書及檢定證,應繳銷而不繳銷者。三、飛航時航空器應具備之文書不全者。四、違反本法第五十一條之規定者。五、違反本法第五十四條之規定者。六、航空器降落不受規定檢查者。" }, { "num": 95, "zh": "第九十五條", "article": "違反本法第十六條之規定時,航空器駕駛員,領航員,各處三年以下有期徒刑,拘役或三千元以下罰金。" }, { "num": 96, "zh": "第九十六條", "article": "未經核准而設置民營飛行場,或違反本法第三十八條之規定者,或拘役或三百元以下罰金。" }, { "num": 97, "zh": "第九十七條", "article": "違反本法第五十六條之規定者,處二年以下有期徒刑。" }, { "num": 98, "zh": "第九十八條", "article": "違反本法第五十七條之規定者,處五年以下有期徒刑,拘役或二千元以下罰金。" }, { "num": 99, "zh": "第九十九條", "article": "航空人員旅客或其他乘坐航空器之人,違反本法第五十八條之規定而無正當理由者,處二年以下有期徒刑,拘役或五百元以下罰金。" }, { "num": 100, "zh": "第一百條", "article": "有關民用航空事業規則,由交通部定之。" }, { "num": 101, "zh": "第一百零一條", "article": "本法自公布日施行。" } ] }
{ "pile_set_name": "Github" }
limitAfter=LIMIT #{maxResults} OFFSET #{firstResult} blobType=BINARY
{ "pile_set_name": "Github" }
// New Matcher API // import Foundation /// A Predicate is part of the new matcher API that provides assertions to expectations. /// /// Given a code snippet: /// /// expect(1).to(equal(2)) /// ^^^^^^^^ /// Called a "matcher" /// /// A matcher consists of two parts a constructor function and the Predicate. The term Predicate /// is used as a separate name from Matcher to help transition custom matchers to the new Nimble /// matcher API. /// /// The Predicate provide the heavy lifting on how to assert against a given value. Internally, /// predicates are simple wrappers around closures to provide static type information and /// allow composition and wrapping of existing behaviors. public struct Predicate<T> { fileprivate var matcher: (Expression<T>) throws -> PredicateResult /// Constructs a predicate that knows how take a given value public init(_ matcher: @escaping (Expression<T>) throws -> PredicateResult) { self.matcher = matcher } /// Uses a predicate on a given value to see if it passes the predicate. /// /// @param expression The value to run the predicate's logic against /// @returns A predicate result indicate passing or failing and an associated error message. public func satisfies(_ expression: Expression<T>) throws -> PredicateResult { return try matcher(expression) } } /// Provides convenience helpers to defining predicates extension Predicate { /// Like Predicate() constructor, but automatically guard against nil (actual) values public static func define(matcher: @escaping (Expression<T>) throws -> PredicateResult) -> Predicate<T> { return Predicate<T> { actual in return try matcher(actual) }.requireNonNil } /// Defines a predicate with a default message that can be returned in the closure /// Also ensures the predicate's actual value cannot pass with `nil` given. public static func define(_ msg: String, matcher: @escaping (Expression<T>, ExpectationMessage) throws -> PredicateResult) -> Predicate<T> { return Predicate<T> { actual in return try matcher(actual, .expectedActualValueTo(msg)) }.requireNonNil } /// Defines a predicate with a default message that can be returned in the closure /// Unlike `define`, this allows nil values to succeed if the given closure chooses to. public static func defineNilable(_ msg: String, matcher: @escaping (Expression<T>, ExpectationMessage) throws -> PredicateResult) -> Predicate<T> { return Predicate<T> { actual in return try matcher(actual, .expectedActualValueTo(msg)) } } } extension Predicate { /// Provides a simple predicate definition that provides no control over the predefined /// error message. /// /// Also ensures the predicate's actual value cannot pass with `nil` given. public static func simple(_ msg: String, matcher: @escaping (Expression<T>) throws -> PredicateStatus) -> Predicate<T> { return Predicate<T> { actual in return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(msg)) }.requireNonNil } /// Provides a simple predicate definition that provides no control over the predefined /// error message. /// /// Unlike `simple`, this allows nil values to succeed if the given closure chooses to. public static func simpleNilable(_ msg: String, matcher: @escaping (Expression<T>) throws -> PredicateStatus) -> Predicate<T> { return Predicate<T> { actual in return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(msg)) } } } // The Expectation style intended for comparison to a PredicateStatus. public enum ExpectationStyle { case toMatch, toNotMatch } /// The value that a Predicates return to describe if the given (actual) value matches the /// predicate. public struct PredicateResult { /// Status indicates if the predicate matches, does not match, or fails. public var status: PredicateStatus /// The error message that can be displayed if it does not match public var message: ExpectationMessage /// Constructs a new PredicateResult with a given status and error message public init(status: PredicateStatus, message: ExpectationMessage) { self.status = status self.message = message } /// Shorthand to PredicateResult(status: PredicateStatus(bool: bool), message: message) public init(bool: Bool, message: ExpectationMessage) { self.status = PredicateStatus(bool: bool) self.message = message } /// Converts the result to a boolean based on what the expectation intended public func toBoolean(expectation style: ExpectationStyle) -> Bool { return status.toBoolean(expectation: style) } } /// PredicateStatus is a trinary that indicates if a Predicate matches a given value or not public enum PredicateStatus { /// Matches indicates if the predicate / matcher passes with the given value /// /// For example, `equals(1)` returns `.matches` for `expect(1).to(equal(1))`. case matches /// DoesNotMatch indicates if the predicate / matcher fails with the given value, but *would* /// succeed if the expectation was inverted. /// /// For example, `equals(2)` returns `.doesNotMatch` for `expect(1).toNot(equal(2))`. case doesNotMatch /// Fail indicates the predicate will never satisfy with the given value in any case. /// A perfect example is that most matchers fail whenever given `nil`. /// /// Using `equal(1)` fails both `expect(nil).to(equal(1))` and `expect(nil).toNot(equal(1))`. /// Note: Predicate's `requireNonNil` property will also provide this feature mostly for free. /// Your predicate will still need to guard against nils, but error messaging will be /// handled for you. case fail /// Converts a boolean to either .matches (if true) or .doesNotMatch (if false). public init(bool matches: Bool) { if matches { self = .matches } else { self = .doesNotMatch } } private func shouldMatch() -> Bool { switch self { case .matches: return true case .doesNotMatch, .fail: return false } } private func shouldNotMatch() -> Bool { switch self { case .doesNotMatch: return true case .matches, .fail: return false } } /// Converts the PredicateStatus result to a boolean based on what the expectation intended internal func toBoolean(expectation style: ExpectationStyle) -> Bool { if style == .toMatch { return shouldMatch() } else { return shouldNotMatch() } } } // Backwards compatibility until Old Matcher API removal extension Predicate: Matcher { /// Compatibility layer for old Matcher API, deprecated public static func fromDeprecatedFullClosure(_ matcher: @escaping (Expression<T>, FailureMessage, Bool) throws -> Bool) -> Predicate { return Predicate { actual in let failureMessage = FailureMessage() let result = try matcher(actual, failureMessage, true) return PredicateResult( status: PredicateStatus(bool: result), message: failureMessage.toExpectationMessage() ) } } /// Compatibility layer for old Matcher API, deprecated. /// Emulates the MatcherFunc API public static func fromDeprecatedClosure(_ matcher: @escaping (Expression<T>, FailureMessage) throws -> Bool) -> Predicate { return Predicate { actual in let failureMessage = FailureMessage() let result = try matcher(actual, failureMessage) return PredicateResult( status: PredicateStatus(bool: result), message: failureMessage.toExpectationMessage() ) } } /// Compatibility layer for old Matcher API, deprecated. /// Same as calling .predicate on a MatcherFunc or NonNilMatcherFunc type. public static func fromDeprecatedMatcher<M>(_ matcher: M) -> Predicate where M: Matcher, M.ValueType == T { return self.fromDeprecatedFullClosure(matcher.toClosure) } /// Deprecated Matcher API, use satisfies(_:_) instead public func matches(_ actualExpression: Expression<T>, failureMessage: FailureMessage) throws -> Bool { let result = try satisfies(actualExpression) result.message.update(failureMessage: failureMessage) return result.toBoolean(expectation: .toMatch) } /// Deprecated Matcher API, use satisfies(_:_) instead public func doesNotMatch(_ actualExpression: Expression<T>, failureMessage: FailureMessage) throws -> Bool { let result = try satisfies(actualExpression) result.message.update(failureMessage: failureMessage) return result.toBoolean(expectation: .toNotMatch) } } extension Predicate { // Someday, make this public? Needs documentation internal func after(f: @escaping (Expression<T>, PredicateResult) throws -> PredicateResult) -> Predicate<T> { return Predicate { actual -> PredicateResult in let result = try self.satisfies(actual) return try f(actual, result) } } /// Returns a new Predicate based on the current one that always fails if nil is given as /// the actual value. /// /// This replaces `NonNilMatcherFunc`. public var requireNonNil: Predicate<T> { return after { actual, result in if try actual.evaluate() == nil { return PredicateResult( status: .fail, message: result.message.appendedBeNilHint() ) } return result } } } #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) public typealias PredicateBlock = (_ actualExpression: Expression<NSObject>) throws -> NMBPredicateResult public class NMBPredicate: NSObject { private let predicate: PredicateBlock public init(predicate: @escaping PredicateBlock) { self.predicate = predicate } func satisfies(_ expression: @escaping () throws -> NSObject?, location: SourceLocation) -> NMBPredicateResult { let expr = Expression(expression: expression, location: location) do { return try self.predicate(expr) } catch let error { return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")).toObjectiveC() } } } extension NMBPredicate: NMBMatcher { public func matches(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let result = satisfies(actualBlock, location: location).toSwift() result.message.update(failureMessage: failureMessage) return result.status.toBoolean(expectation: .toMatch) } public func doesNotMatch(_ actualBlock: @escaping () -> NSObject?, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let result = satisfies(actualBlock, location: location).toSwift() result.message.update(failureMessage: failureMessage) return result.status.toBoolean(expectation: .toNotMatch) } } final public class NMBPredicateResult: NSObject { public var status: NMBPredicateStatus public var message: NMBExpectationMessage public init(status: NMBPredicateStatus, message: NMBExpectationMessage) { self.status = status self.message = message } public init(bool success: Bool, message: NMBExpectationMessage) { self.status = NMBPredicateStatus.from(bool: success) self.message = message } public func toSwift() -> PredicateResult { return PredicateResult(status: status.toSwift(), message: message.toSwift()) } } extension PredicateResult { public func toObjectiveC() -> NMBPredicateResult { return NMBPredicateResult(status: status.toObjectiveC(), message: message.toObjectiveC()) } } final public class NMBPredicateStatus: NSObject { private let status: Int private init(status: Int) { self.status = status } public static let matches: NMBPredicateStatus = NMBPredicateStatus(status: 0) public static let doesNotMatch: NMBPredicateStatus = NMBPredicateStatus(status: 1) public static let fail: NMBPredicateStatus = NMBPredicateStatus(status: 2) public override var hash: Int { return self.status.hashValue } public override func isEqual(_ object: Any?) -> Bool { guard let otherPredicate = object as? NMBPredicateStatus else { return false } return self.status == otherPredicate.status } public static func from(status: PredicateStatus) -> NMBPredicateStatus { switch status { case .matches: return self.matches case .doesNotMatch: return self.doesNotMatch case .fail: return self.fail } } public static func from(bool success: Bool) -> NMBPredicateStatus { return self.from(status: PredicateStatus(bool: success)) } public func toSwift() -> PredicateStatus { switch status { case NMBPredicateStatus.matches.status: return .matches case NMBPredicateStatus.doesNotMatch.status: return .doesNotMatch case NMBPredicateStatus.fail.status: return .fail default: internalError("Unhandle status for NMBPredicateStatus") } } } extension PredicateStatus { public func toObjectiveC() -> NMBPredicateStatus { return NMBPredicateStatus.from(status: self) } } #endif
{ "pile_set_name": "Github" }
// Copyright 2014 Unknwon // // Licensed under the Apache License, Version 2.0 (the "License"): you may // not use this file except in compliance with the License. You may obtain // a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the // License for the specific language governing permissions and limitations // under the License. package ini import ( "errors" "fmt" "strings" ) // Section represents a config section. type Section struct { f *File Comment string name string keys map[string]*Key keyList []string keysHash map[string]string isRawSection bool rawBody string } func newSection(f *File, name string) *Section { return &Section{ f: f, name: name, keys: make(map[string]*Key), keyList: make([]string, 0, 10), keysHash: make(map[string]string), } } // Name returns name of Section. func (s *Section) Name() string { return s.name } // Body returns rawBody of Section if the section was marked as unparseable. // It still follows the other rules of the INI format surrounding leading/trailing whitespace. func (s *Section) Body() string { return strings.TrimSpace(s.rawBody) } // SetBody updates body content only if section is raw. func (s *Section) SetBody(body string) { if !s.isRawSection { return } s.rawBody = body } // NewKey creates a new key to given section. func (s *Section) NewKey(name, val string) (*Key, error) { if len(name) == 0 { return nil, errors.New("error creating new key: empty key name") } else if s.f.options.Insensitive { name = strings.ToLower(name) } if s.f.BlockMode { s.f.lock.Lock() defer s.f.lock.Unlock() } if inSlice(name, s.keyList) { if s.f.options.AllowShadows { if err := s.keys[name].addShadow(val); err != nil { return nil, err } } else { s.keys[name].value = val s.keysHash[name] = val } return s.keys[name], nil } s.keyList = append(s.keyList, name) s.keys[name] = newKey(s, name, val) s.keysHash[name] = val return s.keys[name], nil } // NewBooleanKey creates a new boolean type key to given section. func (s *Section) NewBooleanKey(name string) (*Key, error) { key, err := s.NewKey(name, "true") if err != nil { return nil, err } key.isBooleanType = true return key, nil } // GetKey returns key in section by given name. func (s *Section) GetKey(name string) (*Key, error) { // FIXME: change to section level lock? if s.f.BlockMode { s.f.lock.RLock() } if s.f.options.Insensitive { name = strings.ToLower(name) } key := s.keys[name] if s.f.BlockMode { s.f.lock.RUnlock() } if key == nil { // Check if it is a child-section. sname := s.name for { if i := strings.LastIndex(sname, "."); i > -1 { sname = sname[:i] sec, err := s.f.GetSection(sname) if err != nil { continue } return sec.GetKey(name) } else { break } } return nil, fmt.Errorf("error when getting key of section '%s': key '%s' not exists", s.name, name) } return key, nil } // HasKey returns true if section contains a key with given name. func (s *Section) HasKey(name string) bool { key, _ := s.GetKey(name) return key != nil } // Haskey is a backwards-compatible name for HasKey. // TODO: delete me in v2 func (s *Section) Haskey(name string) bool { return s.HasKey(name) } // HasValue returns true if section contains given raw value. func (s *Section) HasValue(value string) bool { if s.f.BlockMode { s.f.lock.RLock() defer s.f.lock.RUnlock() } for _, k := range s.keys { if value == k.value { return true } } return false } // Key assumes named Key exists in section and returns a zero-value when not. func (s *Section) Key(name string) *Key { key, err := s.GetKey(name) if err != nil { // It's OK here because the only possible error is empty key name, // but if it's empty, this piece of code won't be executed. key, _ = s.NewKey(name, "") return key } return key } // Keys returns list of keys of section. func (s *Section) Keys() []*Key { keys := make([]*Key, len(s.keyList)) for i := range s.keyList { keys[i] = s.Key(s.keyList[i]) } return keys } // ParentKeys returns list of keys of parent section. func (s *Section) ParentKeys() []*Key { var parentKeys []*Key sname := s.name for { if i := strings.LastIndex(sname, "."); i > -1 { sname = sname[:i] sec, err := s.f.GetSection(sname) if err != nil { continue } parentKeys = append(parentKeys, sec.Keys()...) } else { break } } return parentKeys } // KeyStrings returns list of key names of section. func (s *Section) KeyStrings() []string { list := make([]string, len(s.keyList)) copy(list, s.keyList) return list } // KeysHash returns keys hash consisting of names and values. func (s *Section) KeysHash() map[string]string { if s.f.BlockMode { s.f.lock.RLock() defer s.f.lock.RUnlock() } hash := map[string]string{} for key, value := range s.keysHash { hash[key] = value } return hash } // DeleteKey deletes a key from section. func (s *Section) DeleteKey(name string) { if s.f.BlockMode { s.f.lock.Lock() defer s.f.lock.Unlock() } for i, k := range s.keyList { if k == name { s.keyList = append(s.keyList[:i], s.keyList[i+1:]...) delete(s.keys, name) delete(s.keysHash, name) return } } } // ChildSections returns a list of child sections of current section. // For example, "[parent.child1]" and "[parent.child12]" are child sections // of section "[parent]". func (s *Section) ChildSections() []*Section { prefix := s.name + "." children := make([]*Section, 0, 3) for _, name := range s.f.sectionList { if strings.HasPrefix(name, prefix) { children = append(children, s.f.sections[name]) } } return children }
{ "pile_set_name": "Github" }
[Desktop Entry] Version=1.0 Name=VLC media player GenericName=Media player Comment=Read, capture, broadcast your multimedia streams Exec=/usr/bin/vlc %U TryExec=/usr/bin/vlc Icon=AWECFG/vlc.png Terminal=false Type=Application Categories=Player MimeType=video/dv;video/mpeg;video/x-mpeg;video/msvideo;video/quicktime;video/x-anim;video/x-avi;video/x-ms-asf;video/x-ms-wmv;video/x-msvideo;video/x-nsv;video/x-flc;video/x-fli;video/x-flv;video/vnd.rn-realvideo;video/mp4;video/mp4v-es;video/mp2t;application/ogg;application/x-ogg;video/x-ogm+ogg;audio/x-vorbis+ogg;application/x-matroska;audio/x-matroska;video/x-matroska;video/webm;audio/webm;audio/x-mp3;audio/x-mpeg;audio/mpeg;audio/x-wav;audio/x-mpegurl;audio/x-m4a;audio/x-ms-asf;audio/x-ms-asx;audio/x-ms-wax;application/x-flac;audio/x-flac;application/x-shockwave-flash;misc/ultravox;audio/vnd.rn-realaudio;audio/x-pn-aiff;audio/x-pn-au;audio/x-pn-wav;audio/x-pn-windows-acm;image/vnd.rn-realpix;audio/x-pn-realaudio-plugin;application/x-extension-mp4;audio/mp4;audio/amr;audio/amr-wb;x-content/video-vcd;x-content/video-svcd;x-content/video-dvd;x-content/audio-cdda;x-content/audio-player;x-scheme-handler/mms;x-scheme-handler/rtmp;x-scheme-handler/rtsp; X-KDE-Protocols=ftp,http,https,mms,rtmp,rtsp,sftp,smb Keywords=Player;Capture;DVD;Audio;Video;Server;Broadcast;
{ "pile_set_name": "Github" }
import express from 'express'; let app = require('./server').default; if (module.hot) { module.hot.accept('./server', function() { console.log('🔁 HMR Reloading `./server`...'); try { app = require('./server').default; } catch (error) { console.error(error); } }); console.info('✅ Server-side HMR Enabled!'); } const port = process.env.PORT || 3000; export default express() .use((req, res) => app.handle(req, res)) .listen(port, function(err) { if (err) { console.error(err); return; } console.log(`> Started on port ${port}`); });
{ "pile_set_name": "Github" }
/* ****************************************************************** ** ** OpenSees - Open System for Earthquake Engineering Simulation ** ** Pacific Earthquake Engineering Research Center ** ** ** ** ** ** (C) Copyright 1999, The Regents of the University of California ** ** All Rights Reserved. ** ** ** ** Commercial use of this program without express permission of the ** ** University of California, Berkeley, is strictly prohibited. See ** ** file 'COPYRIGHT' in main directory for information on usage and ** ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** ** ** ** Developed by: ** ** Frank McKenna ([email protected]) ** ** Gregory L. Fenves ([email protected]) ** ** Filip C. Filippou ([email protected]) ** ** ** ** ****************************************************************** */ // $Revision: 1.9 $ // $Date: 2010-06-01 23:46:10 $ // $Source: /usr/local/cvs/OpenSees/SRC/actor/actor/MovableObject.cpp,v $ // Written: fmk // Created: 11/96 // Revision: A // // Purpose: This file contains the implementation of MovableObject. // // What: "@(#) MovableObject.C, revA" #include <MovableObject.h> #include <OPS_Globals.h> MovableObject::MovableObject(int cTag, int dTag) :classTag(cTag), dbTag(dTag) { } MovableObject::MovableObject(int theTag) :classTag(theTag), dbTag(0) { } MovableObject::~MovableObject() { } int MovableObject::getClassTag(void) const { return classTag; } static char unknownClassType[] = {"UnknownMovableObject"}; const char * MovableObject::getClassType(void) const { return unknownClassType; } int MovableObject::getDbTag(void) const { return dbTag; } void MovableObject::setDbTag(int newTag) { dbTag = newTag; } int MovableObject::setParameter(const char **argv, int argc, Parameter &param) { return -1; } int MovableObject::updateParameter(int parameterID, Information &info) { return 0; } int MovableObject::activateParameter(int parameterID) { return 0; } int MovableObject::setVariable(const char *variable, Information &theInfo) { return -1; } int MovableObject::getVariable(const char *variable, Information &theInfo) { return -1; }
{ "pile_set_name": "Github" }
vg.svg.Renderer = (function() { var renderer = function() { this._ctx = null; this._el = null; }; var prototype = renderer.prototype; prototype.initialize = function(el, width, height, pad) { this._el = el; this._width = width; this._height = height; this._padding = pad; // remove any existing svg element d3.select(el).select("svg.marks").remove(); // create svg element and initialize attributes var svg = d3.select(el) .append("svg") .attr("class", "marks") .attr("width", width + pad.left + pad.right) .attr("height", height + pad.top + pad.bottom); // set the svg root group this._ctx = svg.append("g") .attr("transform", "translate("+pad.left+","+pad.top+")"); return this; }; prototype.context = function() { return this._ctx; }; prototype.element = function() { return this._el; }; prototype.render = function(scene, items) { if (items) this.renderItems(vg.array(items)); else this.draw(this._ctx, scene, 0); }; prototype.renderItems = function(items) { var item, node, type, nest, i, n, marks = vg.svg.marks; for (i=0, n=items.length; i<n; ++i) { item = items[i]; node = item._svg; type = item.mark.marktype; item = marks.nested[type] ? item.mark.items : item; marks.update[type].call(node, item); marks.style.call(node, item); } } prototype.draw = function(ctx, scene, index) { var marktype = scene.marktype, renderer = vg.svg.marks.draw[marktype]; renderer.call(this, ctx, scene, index); }; return renderer; })();
{ "pile_set_name": "Github" }
#pragma once #include "ios_kernel_enum.h" #include "ios/ios_error.h" #include <cstdint> #include <libcpu/be2_struct.h> namespace ios::kernel { Error IOS_ReadOTP(OtpFieldIndex fieldIndex, phys_ptr<uint32_t> buffer, uint32_t bufferSize); namespace internal { Error initialiseOtp(); } // namespace internal } // namespace ios::kernel
{ "pile_set_name": "Github" }
function MOEADPaS(Global) % <algorithm> <M> % MOEA/D with Pareto adaptive scalarizing approximation %------------------------------- Reference -------------------------------- % R. Wang, Q. Zhang, and T. Zhang, Decomposition-based algorithms using % Pareto adaptive scalarizing methods, IEEE Transactions on Evolutionary % Computation, 2016, 20(6): 821-837. %------------------------------- Copyright -------------------------------- % Copyright (c) 2018-2019 BIMK Group. You are free to use the PlatEMO for % research purposes. All publications which use this platform or any code % in the platform should acknowledge the use of "PlatEMO" and reference "Ye % Tian, Ran Cheng, Xingyi Zhang, and Yaochu Jin, PlatEMO: A MATLAB platform % for evolutionary multi-objective optimization [educational forum], IEEE % Computational Intelligence Magazine, 2017, 12(4): 73-87". %-------------------------------------------------------------------------- %% Generate the weight vectors [W,Global.N] = UniformPoint(Global.N,Global.M); %% Initialize the norm of each weight vector p = ones(Global.N,1); %% Detect the neighbours of each solution T = ceil(Global.N/10); B = pdist2(W,W); [~,B] = sort(B,2); B = B(:,1:T); %% Generate random population Population = Global.Initialization(); % Ideal and nadir points z = min(Population.objs,[],1); znad = max(Population(NDSort(Population.objs,1)==1).objs,[],1); %% Optimization while Global.NotTermination(Population) % For each solution for i = 1 : Global.N % Choose the parents if rand < 0.9 P = B(i,randperm(size(B,2))); else P = randperm(Global.N); end % Generate an offspring Offspring = DE(Population(i),Population(P(1)),Population(P(2))); % Update the solutions in P by the scalarizing method INF = p(P) == inf; g_old = zeros(1,length(P)); g_new = zeros(1,length(P)); if any(INF) g_old(INF) = max((Population(P(INF)).objs-repmat(z,sum(INF),1))./repmat(znad-z,sum(INF),1)./W(P(INF),:),[],2); g_new(INF) = max(repmat((Offspring.obj-z)./(znad-z),sum(INF),1)./W(P(INF),:),[],2); end if any(~INF) g_old(~INF) = sum(((Population(P(~INF)).objs-repmat(z,sum(~INF),1))./repmat(znad-z,sum(~INF),1)./W(P(~INF),:)).^repmat(p(P(~INF)),1,Global.M),2).^(1./p(P(~INF))); g_new(~INF) = sum((repmat((Offspring.obj-z)./(znad-z),sum(~INF),1)./W(P(~INF),:)).^repmat(p(P(~INF)),1,Global.M),2).^(1./p(P(~INF))); end Population(P(find(g_old>g_new,ceil(0.1*T)))) = Offspring; end % Update the ideal point and nadir point z = min([z;Population.objs],[],1); znad = max(Population(NDSort(Population.objs,1)==1).objs,[],1); % Update the norm of each weight vector P = [1,2,3,4,5,6,7,8,9,10,inf]; nObj = (Population.objs-repmat(z,Global.N,1))./repmat(znad-z,Global.N,1); for i = find(rand(1,Global.N)>=Global.gen/Global.maxgen) g = zeros(Global.N,length(P)); for j = 1 : length(P) if P(j) ~= inf g(:,j) = sum((nObj./repmat(W(i,:),Global.N,1)).^P(j),2).^(1./P(j)); else g(:,j) = max((nObj./repmat(W(i,:),Global.N,1)),[],2); end end [~,ZK] = min(g,[],1); [~,Z] = min(sqrt(1-(1-pdist2(nObj(ZK,:),W(i,:),'cosine')).^2).*sqrt(sum(nObj(ZK,:).^2,2))); p(i) = P(Z); end end end
{ "pile_set_name": "Github" }
import * as React from 'react'; import { presetPrimaryColors } from '@ant-design/colors'; import { ProgressGradient, ProgressProps, StringGradients } from './progress'; import { validProgress, getSuccessPercent } from './utils'; interface LineProps extends ProgressProps { prefixCls: string; children: React.ReactNode; } /** * { * '0%': '#afc163', * '75%': '#009900', * '50%': 'green', ====> '#afc163 0%, #66FF00 25%, #00CC00 50%, #009900 75%, #ffffff 100%' * '25%': '#66FF00', * '100%': '#ffffff' * } */ export const sortGradient = (gradients: StringGradients) => { let tempArr: any[] = []; Object.keys(gradients).forEach(key => { const formattedKey = parseFloat(key.replace(/%/g, '')); if (!isNaN(formattedKey)) { tempArr.push({ key: formattedKey, value: gradients[key], }); } }); tempArr = tempArr.sort((a, b) => a.key - b.key); return tempArr.map(({ key, value }) => `${value} ${key}%`).join(', '); }; /** * { * '0%': '#afc163', * '25%': '#66FF00', * '50%': '#00CC00', ====> linear-gradient(to right, #afc163 0%, #66FF00 25%, * '75%': '#009900', #00CC00 50%, #009900 75%, #ffffff 100%) * '100%': '#ffffff' * } * * Then this man came to realize the truth: * Besides six pence, there is the moon. * Besides bread and butter, there is the bug. * And... * Besides women, there is the code. */ export const handleGradient = (strokeColor: ProgressGradient) => { const { from = presetPrimaryColors.blue, to = presetPrimaryColors.blue, direction = 'to right', ...rest } = strokeColor; if (Object.keys(rest).length !== 0) { const sortedGradients = sortGradient(rest as StringGradients); return { backgroundImage: `linear-gradient(${direction}, ${sortedGradients})` }; } return { backgroundImage: `linear-gradient(${direction}, ${from}, ${to})` }; }; const Line: React.FC<LineProps> = props => { const { prefixCls, percent, strokeWidth, size, strokeColor, strokeLinecap, children, trailColor, success, } = props; const backgroundProps = strokeColor && typeof strokeColor !== 'string' ? handleGradient(strokeColor) : { background: strokeColor, }; const trailStyle = trailColor ? { backgroundColor: trailColor, } : undefined; const percentStyle = { width: `${validProgress(percent)}%`, height: strokeWidth || (size === 'small' ? 6 : 8), borderRadius: strokeLinecap === 'square' ? 0 : '', ...backgroundProps, } as React.CSSProperties; const successPercent = getSuccessPercent(props); const successPercentStyle = { width: `${validProgress(successPercent)}%`, height: strokeWidth || (size === 'small' ? 6 : 8), borderRadius: strokeLinecap === 'square' ? 0 : '', backgroundColor: success?.strokeColor, } as React.CSSProperties; const successSegment = successPercent !== undefined ? ( <div className={`${prefixCls}-success-bg`} style={successPercentStyle} /> ) : null; return ( <> <div className={`${prefixCls}-outer`}> <div className={`${prefixCls}-inner`} style={trailStyle}> <div className={`${prefixCls}-bg`} style={percentStyle} /> {successSegment} </div> </div> {children} </> ); }; export default Line;
{ "pile_set_name": "Github" }
@file:InternalFileAnnotation package b import a.InternalFileAnnotation import a.InternalClassAnnotation @InternalClassAnnotation class B fun b(param: a.InternalA) { a.internalA() }
{ "pile_set_name": "Github" }
******** SERVER ******** 1999-03-02 09:44:33 H=[127.0.0.1] temporarily rejected connection in "connect" ACL 1999-03-02 09:44:33 H=[ip4.ip4.ip4.ip4] temporarily rejected connection in "connect" ACL
{ "pile_set_name": "Github" }
#!/usr/bin/env ruby require_relative "../config/boot" require "rake" Rake.application.run
{ "pile_set_name": "Github" }
/* * ZSUMMER License * ----------- * * ZSUMMER is licensed under the terms of the MIT license reproduced below. * This means that ZSUMMER is free software and can be used for both academic * and commercial purposes at absolutely no cost. * * * =============================================================================== * * Copyright (C) 2010-2013 YaweiZhang <[email protected]>. * * 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. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 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. * * =============================================================================== * * (end of COPYRIGHT) */ #ifndef _ZSUMMER_IOCP_H_ #define _ZSUMMER_IOCP_H_ #include "public.h" using namespace zsummer::network; using namespace zsummer::thread4z; using namespace zsummer::utility; using namespace zsummer::network; namespace zsummer { //! 消息泵, message loop. class CIOServer: public IIOServer { public: CIOServer(); virtual ~CIOServer(); virtual bool Initialize(IIOServerCallback *cb); virtual void RunOnce(); virtual void Post(void *pUser); virtual unsigned long long CreateTimer(unsigned int delayms, ITimerCallback * cb); virtual bool CancelTimer(unsigned long long timerID); public: void PostMsg(POST_COM_KEY pck, ULONG_PTR ptr); void CheckTimer(); public: //! IOCP句柄 HANDLE m_io; //! IO处理器回调指针 IIOServerCallback * m_cb; //! 定时器 std::map<unsigned long long, ITimerCallback*> m_queTimer; unsigned int m_queSeq; //! 用于生成定时器ID volatile unsigned long long m_nextExpire; //! 最快触发时间 zsummer::thread4z::CLock m_lockTimer; //! 锁 }; } #endif
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <resources> <style name="NoActionBar" parent="@android:style/Theme.Holo.NoActionBar"> <!-- Inherits the Holo theme with no action bar; no other styles needed. --> </style> </resources>
{ "pile_set_name": "Github" }
// © 2016 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html // Generated using tools/cldr/cldr-to-icu/build-icu-data.xml lo{ zoneStrings{ "Africa:Abidjan"{ ec{"ອາບິດແຈນ"} } "Africa:Accra"{ ec{"ອັກຄຣາ"} } "Africa:Addis_Ababa"{ ec{"ແອດດິສ ອະບາບາ"} } "Africa:Algiers"{ ec{"ແອວເຈຍ"} } "Africa:Asmera"{ ec{"ອັສມາຣາ"} } "Africa:Bamako"{ ec{"ບາມາໂກ"} } "Africa:Bangui"{ ec{"ບັງກຸຍ"} } "Africa:Banjul"{ ec{"ບານຈູ"} } "Africa:Bissau"{ ec{"ບິສເຊົາ"} } "Africa:Blantyre"{ ec{"ແບລນໄທຣ໌"} } "Africa:Brazzaville"{ ec{"ບຣາຊາວິວ"} } "Africa:Bujumbura"{ ec{"ບູຈູມບູຣາ"} } "Africa:Cairo"{ ec{"ໄຄໂຣ"} } "Africa:Casablanca"{ ec{"ຄາຊາບລັງກາ"} } "Africa:Ceuta"{ ec{"ຊີວຕາ"} } "Africa:Conakry"{ ec{"ໂຄນາຄຣີ"} } "Africa:Dakar"{ ec{"ດາກາ"} } "Africa:Dar_es_Salaam"{ ec{"ດາເອສສະລາມ"} } "Africa:Djibouti"{ ec{"ຈີບູຕິ"} } "Africa:Douala"{ ec{"ດູອາລາ"} } "Africa:El_Aaiun"{ ec{"ເອວ ອາຢູນ"} } "Africa:Freetown"{ ec{"ຟຣີທາວ"} } "Africa:Gaborone"{ ec{"ກາບໍໂຣນ"} } "Africa:Harare"{ ec{"ຮາຣາເຣ"} } "Africa:Johannesburg"{ ec{"ໂຈຮັນເນດສເບີກ"} } "Africa:Juba"{ ec{"ຈູບາ"} } "Africa:Kampala"{ ec{"ຄຳປາລາ"} } "Africa:Khartoum"{ ec{"ຄາທູມ"} } "Africa:Kigali"{ ec{"ຄີກາລີ"} } "Africa:Kinshasa"{ ec{"ກິນຊາຊາ"} } "Africa:Lagos"{ ec{"ລາໂກສ"} } "Africa:Libreville"{ ec{"ລິເບຼີວິວ"} } "Africa:Lome"{ ec{"ໂລເມ"} } "Africa:Luanda"{ ec{"ລວນດາ"} } "Africa:Lubumbashi"{ ec{"ລູບຳບາຊິ"} } "Africa:Lusaka"{ ec{"ລູຊາກາ"} } "Africa:Malabo"{ ec{"ມາລາໂບ"} } "Africa:Maputo"{ ec{"ມາປູໂຕ"} } "Africa:Maseru"{ ec{"ມາເຊຣູ"} } "Africa:Mbabane"{ ec{"ອຳບາບາເນ"} } "Africa:Mogadishu"{ ec{"ໂມກາດີຊູ"} } "Africa:Monrovia"{ ec{"ມອນໂຣເວຍ"} } "Africa:Nairobi"{ ec{"ໄນໂຣບີ"} } "Africa:Ndjamena"{ ec{"ເອນຈາເມນ່າ"} } "Africa:Niamey"{ ec{"ນີອາເມ"} } "Africa:Nouakchott"{ ec{"ນູແອກຊອດ"} } "Africa:Ouagadougou"{ ec{"ອູກາດູກູ"} } "Africa:Porto-Novo"{ ec{"ປໍໂຕ-ໂນໂວ"} } "Africa:Sao_Tome"{ ec{"ຊາວໂຕເມ"} } "Africa:Tripoli"{ ec{"ທຣິໂພລິ"} } "Africa:Tunis"{ ec{"ຕູນິສ"} } "Africa:Windhoek"{ ec{"ວີນຮູດ"} } "America:Adak"{ ec{"ອາແດກ"} } "America:Anchorage"{ ec{"ແອນເຄີເຣກ"} } "America:Anguilla"{ ec{"ແອນກິນລາ"} } "America:Antigua"{ ec{"ແອນທິກົວ"} } "America:Araguaina"{ ec{"ອາຣາກົວນາ"} } "America:Argentina:La_Rioja"{ ec{"ລາ ຣິໂອຈາ"} } "America:Argentina:Rio_Gallegos"{ ec{"ຣິໂກ ແກວເລກອສ"} } "America:Argentina:Salta"{ ec{"ຊານຕາ"} } "America:Argentina:San_Juan"{ ec{"ແຊນຮວນ"} } "America:Argentina:San_Luis"{ ec{"ແຊນລຸຍສ໌"} } "America:Argentina:Tucuman"{ ec{"ຕູຄູແມນ"} } "America:Argentina:Ushuaia"{ ec{"ອູຊູເອຍ"} } "America:Aruba"{ ec{"ອາຣູບາ"} } "America:Asuncion"{ ec{"ອະຊຸນຊິອອງ"} } "America:Bahia"{ ec{"ບາເຢຍ"} } "America:Bahia_Banderas"{ ec{"ບາເຮຍ ແບນເດີຣາສ"} } "America:Barbados"{ ec{"ບາເບດອສ"} } "America:Belem"{ ec{"ບີເລມ"} } "America:Belize"{ ec{"ເບລີຊ"} } "America:Blanc-Sablon"{ ec{"ບລານ-ຊາບລອນ"} } "America:Boa_Vista"{ ec{"ບົວ ວິສຕາ"} } "America:Bogota"{ ec{"ໂບໂກຕາ"} } "America:Boise"{ ec{"ບອຍຊ໌"} } "America:Buenos_Aires"{ ec{"ບົວໂນສ ໄອເຣສ"} } "America:Cambridge_Bay"{ ec{"ແຄມບຣິດ ເບ"} } "America:Campo_Grande"{ ec{"ກັງປູຣັງຈີ"} } "America:Cancun"{ ec{"ແຄນກຸນ"} } "America:Caracas"{ ec{"ຄາຣາກັສ"} } "America:Catamarca"{ ec{"ຄາຕາມາກາ"} } "America:Cayenne"{ ec{"ຄາເຢນ"} } "America:Cayman"{ ec{"ເຄແມນ"} } "America:Chicago"{ ec{"ຊິຄາໂກ"} } "America:Chihuahua"{ ec{"ຊິວາວາ"} } "America:Coral_Harbour"{ ec{"ອາທິໂຄຄານ"} } "America:Cordoba"{ ec{"ຄໍໂດບາ"} } "America:Costa_Rica"{ ec{"ຄອສຕາຣິກາ"} } "America:Creston"{ ec{"ເຄຣສຕັນ"} } "America:Cuiaba"{ ec{"ກຸຢາບາ"} } "America:Curacao"{ ec{"ກືຣາເຊົາ"} } "America:Danmarkshavn"{ ec{"ເດນມາກແຊນ"} } "America:Dawson"{ ec{"ດໍສັນ"} } "America:Dawson_Creek"{ ec{"ດໍສັນ ຄຣີກ"} } "America:Denver"{ ec{"ເດັນເວີ"} } "America:Detroit"{ ec{"ດີທຣອຍ"} } "America:Dominica"{ ec{"ໂດມິນິກາ"} } "America:Edmonton"{ ec{"ເອດມອນຕອນ"} } "America:Eirunepe"{ ec{"ເອຣຸເນປີ"} } "America:El_Salvador"{ ec{"ເອວ ຊາວາດໍ"} } "America:Fort_Nelson"{ ec{"ຟອດ ເນວສັນ"} } "America:Fortaleza"{ ec{"ຟໍຕາເລຊາ"} } "America:Glace_Bay"{ ec{"ເກລດເບ"} } "America:Godthab"{ ec{"ນູກ"} } "America:Goose_Bay"{ ec{"ກູສເບ"} } "America:Grand_Turk"{ ec{"ແກຣນ ເທີກ"} } "America:Grenada"{ ec{"ເກຣນາດາ"} } "America:Guadeloupe"{ ec{"ກາວເດລູບ"} } "America:Guatemala"{ ec{"ກົວເຕມາລາ"} } "America:Guayaquil"{ ec{"ກົວຢາກິລ"} } "America:Guyana"{ ec{"ກູຢານາ"} } "America:Halifax"{ ec{"ຮາລິແຟັກ"} } "America:Havana"{ ec{"ຮາວານາ"} } "America:Hermosillo"{ ec{"ເອໂມຊິໂຢ"} } "America:Indiana:Knox"{ ec{"ນ໋ອກ, ອິນເດຍນາ"} } "America:Indiana:Marengo"{ ec{"ມາເຣນໂກ, ອິນເດຍນາ"} } "America:Indiana:Petersburg"{ ec{"ປີເຕີສເປີກ, ອິນເດຍນາ"} } "America:Indiana:Tell_City"{ ec{"ເທວ ຊິຕີ, ອິນເດຍນາ"} } "America:Indiana:Vevay"{ ec{"ວີເວ, ອິນເດຍນາ"} } "America:Indiana:Vincennes"{ ec{"ວິນເຊນເນສ, ອິນເດຍນາ"} } "America:Indiana:Winamac"{ ec{"ວິນາແມັກ, ອິນເດຍນາ"} } "America:Indianapolis"{ ec{"ອິນດີເອນາໂພລິສ"} } "America:Inuvik"{ ec{"ອີນູວິກ"} } "America:Iqaluit"{ ec{"ອີກົວລິດ"} } "America:Jamaica"{ ec{"ຈາໄມກາ"} } "America:Jujuy"{ ec{"ຈູຈຸຍ"} } "America:Juneau"{ ec{"ຈູໂນ"} } "America:Kentucky:Monticello"{ ec{"ມອນຕີເຊວໂລ, ເຄນທັກກີ"} } "America:Kralendijk"{ ec{"ຄຣາເລນດິກ"} } "America:La_Paz"{ ec{"ລາປາສ"} } "America:Lima"{ ec{"ລີມາ"} } "America:Los_Angeles"{ ec{"ລອສແອນເຈລີສ"} } "America:Louisville"{ ec{"ຫລຸຍວິວ"} } "America:Lower_Princes"{ ec{"ໂລເວີ ພຣິນຊ໌ ຄວດເຕີ"} } "America:Maceio"{ ec{"ມາເຊໂອ"} } "America:Managua"{ ec{"ມານາກົວ"} } "America:Manaus"{ ec{"ມາເນົາສ໌"} } "America:Marigot"{ ec{"ມາຣີໂກດ"} } "America:Martinique"{ ec{"ມາທີນິກ"} } "America:Matamoros"{ ec{"ມາຕາໂມຣອສ"} } "America:Mazatlan"{ ec{"ມາຊາດລານ"} } "America:Mendoza"{ ec{"ເມັນໂດຊ່າ"} } "America:Menominee"{ ec{"ເມໂນມິນີ"} } "America:Merida"{ ec{"ເມີຣິດາ"} } "America:Metlakatla"{ ec{"ເມັດລາກັດລາ"} } "America:Mexico_City"{ ec{"ເມັກຊິໂກ ຊິຕີ"} } "America:Miquelon"{ ec{"ມິກົວລອນ"} } "America:Moncton"{ ec{"ມອນຕັນ"} } "America:Monterrey"{ ec{"ມອນເຕີເຣຍ"} } "America:Montevideo"{ ec{"ມອນເຕວິເດໂອ"} } "America:Montserrat"{ ec{"ມອນເຊີຣັດ"} } "America:Nassau"{ ec{"ແນສຊໍ"} } "America:New_York"{ ec{"ນິວຢອກ"} } "America:Nipigon"{ ec{"ນີປີກອນ"} } "America:Nome"{ ec{"ນອມ"} } "America:Noronha"{ ec{"ນໍຣອນຮາ"} } "America:North_Dakota:Beulah"{ ec{"ເບີລາ, ນອດ ດາໂກຕາ"} } "America:North_Dakota:Center"{ ec{"ເຊັນເຈີ, ນອດ ດາໂກຕາ"} } "America:North_Dakota:New_Salem"{ ec{"ນິວ ຊາເລມ, ນອດ ດາໂກຕາ"} } "America:Ojinaga"{ ec{"ໂອຈິນາກາ"} } "America:Panama"{ ec{"ພານາມາ"} } "America:Pangnirtung"{ ec{"ແພງເນີດທັງ"} } "America:Paramaribo"{ ec{"ພາຣາມາຣິໂບ"} } "America:Phoenix"{ ec{"ຟິນິກ"} } "America:Port-au-Prince"{ ec{"ປໍໂຕແປຣງ"} } "America:Port_of_Spain"{ ec{"ພອດອອບສະເປນ"} } "America:Porto_Velho"{ ec{"ປໍຕູ ເວວຢູ"} } "America:Puerto_Rico"{ ec{"ເປີໂທຣິໂກ"} } "America:Punta_Arenas"{ ec{"ພຸນທາ ອະຣີນາສ໌"} } "America:Rainy_River"{ ec{"ເຣນນີ ຣິເວີ"} } "America:Rankin_Inlet"{ ec{"ແຣນກິນ ອິນເລັດ"} } "America:Recife"{ ec{"ເຣຊິເຟ"} } "America:Regina"{ ec{"ເຣຈິນາ"} } "America:Resolute"{ ec{"ເຣໂຊລຸດ"} } "America:Rio_Branco"{ ec{"ຣິໂອ ບຣັນໂກ"} } "America:Santa_Isabel"{ ec{"ຊານຕາ ອິດຊາເບວ"} } "America:Santarem"{ ec{"ຊັນຕາເຣມ"} } "America:Santiago"{ ec{"ຊັນຕີອາໂກ"} } "America:Santo_Domingo"{ ec{"ຊານໂຕໂດມິນໂກ"} } "America:Sao_Paulo"{ ec{"ເຊົາ ເປົາໂລ"} } "America:Scoresbysund"{ ec{"ອິໂຕຄໍທົວມິດ"} } "America:Sitka"{ ec{"ຊິດກາ"} } "America:St_Barthelemy"{ ec{"ເຊນບາເທເລມີ"} } "America:St_Johns"{ ec{"ເຊນ ຈອນ"} } "America:St_Kitts"{ ec{"ເຊນ ຄິດສ໌"} } "America:St_Lucia"{ ec{"ເຊນ ລູເຊຍ"} } "America:St_Thomas"{ ec{"ເຊນ ໂທມັສ"} } "America:St_Vincent"{ ec{"ເຊນ ວິນເຊນ"} } "America:Swift_Current"{ ec{"ສະວິຟ ເຄີເຣນ"} } "America:Tegucigalpa"{ ec{"ເຕກູຊີການປາ"} } "America:Thule"{ ec{"ທູເລ"} } "America:Thunder_Bay"{ ec{"ທັນເດີເບ"} } "America:Tijuana"{ ec{"ທີຈົວນາ"} } "America:Toronto"{ ec{"ໂທຣອນໂຕ"} } "America:Tortola"{ ec{"ທໍໂຕລາ"} } "America:Vancouver"{ ec{"ແວນຄູເວີ"} } "America:Whitehorse"{ ec{"ໄວທ໌ຮອສ"} } "America:Winnipeg"{ ec{"ວິນນີເພກ"} } "America:Yakutat"{ ec{"ຢາຄູຕັດ"} } "America:Yellowknife"{ ec{"ເຢໂລໄນຟ໌"} } "Antarctica:Casey"{ ec{"ເຄຊີ"} } "Antarctica:Davis"{ ec{"ດາວີສ"} } "Antarctica:DumontDUrville"{ ec{"ດູມອນດີຍູວີວສ໌"} } "Antarctica:Macquarie"{ ec{"ແມັກຄົວຣີ"} } "Antarctica:Mawson"{ ec{"ເມົາຊັນ"} } "Antarctica:McMurdo"{ ec{"ແມັກມົວໂດ"} } "Antarctica:Palmer"{ ec{"ພາມເມີ"} } "Antarctica:Rothera"{ ec{"ໂຣເທຣາ"} } "Antarctica:Syowa"{ ec{"ເຊຍວາ"} } "Antarctica:Troll"{ ec{"ໂທຣລ໌"} } "Antarctica:Vostok"{ ec{"ວໍສະຕອກ"} } "Arctic:Longyearbyen"{ ec{"ລອງເຢຍບຽນ"} } "Asia:Aden"{ ec{"ເອເດັນ"} } "Asia:Almaty"{ ec{"ອໍມາຕີ"} } "Asia:Amman"{ ec{"ອຳມານ"} } "Asia:Anadyr"{ ec{"ອານາດີ"} } "Asia:Aqtau"{ ec{"ອັດຕາອູ"} } "Asia:Aqtobe"{ ec{"ອັດໂທບີ"} } "Asia:Ashgabat"{ ec{"ອາດຊ໌ກາບັດ"} } "Asia:Atyrau"{ ec{"ອັດທີເຣົາ"} } "Asia:Baghdad"{ ec{"ແບກແດດ"} } "Asia:Bahrain"{ ec{"ບາເຣນ"} } "Asia:Baku"{ ec{"ບາກູ"} } "Asia:Bangkok"{ ec{"ບາງກອກ"} } "Asia:Barnaul"{ ec{"ບານົວ"} } "Asia:Beirut"{ ec{"ເບຣຸດ"} } "Asia:Bishkek"{ ec{"ບິດຊ໌ເຄກ"} } "Asia:Brunei"{ ec{"ບຣູໄນ"} } "Asia:Calcutta"{ ec{"ໂກລກາຕາ"} } "Asia:Chita"{ ec{"ຊີຕ່າ"} } "Asia:Choibalsan"{ ec{"ຊອຍບອລຊານ"} } "Asia:Colombo"{ ec{"ໂຄລຳໂບ"} } "Asia:Damascus"{ ec{"ດາມາສຄັສ"} } "Asia:Dhaka"{ ec{"ດາຫ໌ກາ"} } "Asia:Dili"{ ec{"ດີລີ"} } "Asia:Dubai"{ ec{"ດູໄບ"} } "Asia:Dushanbe"{ ec{"ດູຊານເບ"} } "Asia:Famagusta"{ ec{"ຟາມາກັສທາ"} } "Asia:Gaza"{ ec{"ກາຊາ"} } "Asia:Hebron"{ ec{"ເຮບຣອນ"} } "Asia:Hong_Kong"{ ec{"ຮ່ອງກົງ"} } "Asia:Hovd"{ ec{"ຮອບ"} } "Asia:Irkutsk"{ ec{"ອີຄຸສຄ໌"} } "Asia:Jakarta"{ ec{"ຈາກາຕາ"} } "Asia:Jayapura"{ ec{"ຈາຢາປູຣະ"} } "Asia:Jerusalem"{ ec{"ເຢຣູຊາເລມ"} } "Asia:Kabul"{ ec{"ຄາບູ"} } "Asia:Kamchatka"{ ec{"ຄາມຊາດກາ"} } "Asia:Karachi"{ ec{"ກາຣາຈີ"} } "Asia:Katmandu"{ ec{"ຄັດມັນດູ"} } "Asia:Khandyga"{ ec{"ແຄນດີກາ"} } "Asia:Krasnoyarsk"{ ec{"ຄຣັສໂນຢາສຄ໌"} } "Asia:Kuala_Lumpur"{ ec{"ກົວລາລຳເປີ"} } "Asia:Kuching"{ ec{"ກູຊີງ"} } "Asia:Kuwait"{ ec{"ຄູເວດ"} } "Asia:Macau"{ ec{"ມາເກົາ"} } "Asia:Magadan"{ ec{"ມາກາແດນ"} } "Asia:Makassar"{ ec{"ມາກາສຊາ"} } "Asia:Manila"{ ec{"ມານີລາ"} } "Asia:Muscat"{ ec{"ມາສຄັດ"} } "Asia:Nicosia"{ ec{"ນິໂຄເຊຍ"} } "Asia:Novokuznetsk"{ ec{"ໂນໂວຄຸສເນັດ"} } "Asia:Novosibirsk"{ ec{"ໂນໂວຊີບີສຄ໌"} } "Asia:Omsk"{ ec{"ອອມສຄ໌"} } "Asia:Oral"{ ec{"ອໍຣໍ"} } "Asia:Phnom_Penh"{ ec{"ພະນົມເປັນ"} } "Asia:Pontianak"{ ec{"ພອນເທຍນັກ"} } "Asia:Pyongyang"{ ec{"ປຽງຢາງ"} } "Asia:Qatar"{ ec{"ກາຕາຣ໌"} } "Asia:Qostanay"{ ec{"ຄອສຕາເນ"} } "Asia:Qyzylorda"{ ec{"ໄຄຊີລໍດາ"} } "Asia:Rangoon"{ ec{"ຢາງກອນ"} } "Asia:Riyadh"{ ec{"ຣີຢາດ"} } "Asia:Saigon"{ ec{"ໂຮຈິມິນ"} } "Asia:Sakhalin"{ ec{"ຊາຄາລິນ"} } "Asia:Samarkand"{ ec{"ຊາມາແຄນ"} } "Asia:Seoul"{ ec{"ໂຊລ໌"} } "Asia:Shanghai"{ ec{"ຊ່ຽງໄຮ້"} } "Asia:Singapore"{ ec{"ສິງກະໂປ"} } "Asia:Srednekolymsk"{ ec{"ສຣິລເນັກໂກລີດ"} } "Asia:Taipei"{ ec{"ໄທເປ"} } "Asia:Tashkent"{ ec{"ທາດສ໌ເຄນ"} } "Asia:Tbilisi"{ ec{"ທິບີລີຊີ"} } "Asia:Tehran"{ ec{"ເຕຣານ"} } "Asia:Thimphu"{ ec{"ທິມພູ"} } "Asia:Tokyo"{ ec{"ໂຕກຽວ"} } "Asia:Tomsk"{ ec{"ທອມສກ໌"} } "Asia:Ulaanbaatar"{ ec{"ອູລານບາຕາຣ໌"} } "Asia:Urumqi"{ ec{"ອູຣຸມຊີ"} } "Asia:Ust-Nera"{ ec{"ອຸສ ເນຣາ"} } "Asia:Vientiane"{ ec{"ວຽງຈັນ"} } "Asia:Vladivostok"{ ec{"ວີລາດິໂວສຕອກ"} } "Asia:Yakutsk"{ ec{"ຢາຄຸທຊ໌"} } "Asia:Yekaterinburg"{ ec{"ເຢຄາເຕີຣິນເບີກ"} } "Asia:Yerevan"{ ec{"ເຍເຣວານ"} } "Atlantic:Azores"{ ec{"ອາຊໍເຣສ"} } "Atlantic:Bermuda"{ ec{"ເບີມິວດາ"} } "Atlantic:Canary"{ ec{"ຄານາຣີ"} } "Atlantic:Cape_Verde"{ ec{"ເຄບເວີດ"} } "Atlantic:Faeroe"{ ec{"ແຟໂຣ"} } "Atlantic:Madeira"{ ec{"ມາເດຣາ"} } "Atlantic:Reykjavik"{ ec{"ເຣກຢາວິກ"} } "Atlantic:South_Georgia"{ ec{"ເຊົາຈໍເຈຍ"} } "Atlantic:St_Helena"{ ec{"ເຊນ ເຮເລນາ"} } "Atlantic:Stanley"{ ec{"ສະແຕນເລ"} } "Australia:Adelaide"{ ec{"ເອດີແລດ"} } "Australia:Brisbane"{ ec{"ບຣິສເບນ"} } "Australia:Broken_Hill"{ ec{"ໂບຣກເຄນ ຮິວ"} } "Australia:Currie"{ ec{"ກູຣີ"} } "Australia:Darwin"{ ec{"ດາວິນ"} } "Australia:Eucla"{ ec{"ຢູຄລາ"} } "Australia:Hobart"{ ec{"ໂຮບາດ"} } "Australia:Lindeman"{ ec{"ລິນດີແມນ"} } "Australia:Lord_Howe"{ ec{"ໂລດໂຮວີ"} } "Australia:Melbourne"{ ec{"ເມວເບິນ"} } "Australia:Perth"{ ec{"ເພີດ"} } "Australia:Sydney"{ ec{"ຊິດນີ"} } "Etc:UTC"{ ls{"ເວລາສາກົນເຊີງພິກັດ"} } "Etc:Unknown"{ ec{"ບໍ່ຮູ້ຊື່ເມືອງ"} } "Europe:Amsterdam"{ ec{"ອາມສເຕີດຳ"} } "Europe:Andorra"{ ec{"ອິນດໍຣາ"} } "Europe:Astrakhan"{ ec{"ອາສຕຣາຄານ"} } "Europe:Athens"{ ec{"ເອເທນສ໌"} } "Europe:Belgrade"{ ec{"ເບວເກຣດ"} } "Europe:Berlin"{ ec{"ເບີລິນ"} } "Europe:Bratislava"{ ec{"ບຣາທິສລາວາ"} } "Europe:Brussels"{ ec{"ບຣັສເຊວ"} } "Europe:Bucharest"{ ec{"ບູຄາເຣສຕ໌"} } "Europe:Budapest"{ ec{"ບູດາເປສຕ໌"} } "Europe:Busingen"{ ec{"ບັດຊິນເກນ"} } "Europe:Chisinau"{ ec{"ຄີຊີເນົາ"} } "Europe:Copenhagen"{ ec{"ໂຄເປນເຮເກນ"} } "Europe:Dublin"{ ec{"ດັບບລິນ"} ld{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ໄອ​ຣິ​ຊ"} } "Europe:Gibraltar"{ ec{"ກິບຣອລທາ"} } "Europe:Guernsey"{ ec{"ເກີນຊີ"} } "Europe:Helsinki"{ ec{"ເຮວຊິນກິ"} } "Europe:Isle_of_Man"{ ec{"ເກາະແມນ"} } "Europe:Istanbul"{ ec{"ອິສຕັນບູລ໌"} } "Europe:Jersey"{ ec{"ເຈີຊີ"} } "Europe:Kaliningrad"{ ec{"ຄາລິນິນກຣາດ"} } "Europe:Kiev"{ ec{"ຂຽບ"} } "Europe:Kirov"{ ec{"ກິໂຣບ"} } "Europe:Lisbon"{ ec{"ລິສບອນ"} } "Europe:Ljubljana"{ ec{"ລູບລີຍານາ"} } "Europe:London"{ ec{"ລອນດອນ"} ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ອັງ​ກິດ"} } "Europe:Luxembourg"{ ec{"ລັກເຊັມເບີກ"} } "Europe:Madrid"{ ec{"ມາດຣິດ"} } "Europe:Malta"{ ec{"ມອລຕາ"} } "Europe:Mariehamn"{ ec{"ມາຣີແຮມນ໌"} } "Europe:Minsk"{ ec{"ມິນສກ໌"} } "Europe:Monaco"{ ec{"ໂມນາໂຄ"} } "Europe:Moscow"{ ec{"ມອສໂຄ"} } "Europe:Oslo"{ ec{"ອອສໂລ"} } "Europe:Paris"{ ec{"ປາຣີສ"} } "Europe:Podgorica"{ ec{"ພອດກໍຣີກາ"} } "Europe:Prague"{ ec{"ປຣາກ"} } "Europe:Riga"{ ec{"ຣິກາ"} } "Europe:Rome"{ ec{"ໂຣມ"} } "Europe:Samara"{ ec{"ຊາມາຣາ"} } "Europe:San_Marino"{ ec{"ຊານມາຣີໂນ"} } "Europe:Sarajevo"{ ec{"ຊາຣາເຢໂວ"} } "Europe:Saratov"{ ec{"ຊາຣາທອບ"} } "Europe:Simferopol"{ ec{"ຊີມເຟໂລໂປ"} } "Europe:Skopje"{ ec{"ສະໂກເປຍ"} } "Europe:Sofia"{ ec{"ໂຊເຟຍ"} } "Europe:Stockholm"{ ec{"ສະຕອກໂຮມ"} } "Europe:Tallinn"{ ec{"ທາລລິນນ໌"} } "Europe:Tirane"{ ec{"ທິຣານ"} } "Europe:Ulyanovsk"{ ec{"ອູລີອານອບສຄ໌"} } "Europe:Uzhgorod"{ ec{"ອັສຊ໌ກໍໂຣດ"} } "Europe:Vaduz"{ ec{"ວາດາຊ"} } "Europe:Vatican"{ ec{"ວາຕິກັນ"} } "Europe:Vienna"{ ec{"ວຽນນາ"} } "Europe:Vilnius"{ ec{"ວິລນິອຸສ"} } "Europe:Volgograd"{ ec{"ວອລໂກກຣາດ"} } "Europe:Warsaw"{ ec{"ວໍຊໍ"} } "Europe:Zagreb"{ ec{"ຊາເກຣບ"} } "Europe:Zaporozhye"{ ec{"ຊາໂປໂຣຊີ"} } "Europe:Zurich"{ ec{"ຊູຣິກ"} } "Indian:Antananarivo"{ ec{"ອັນຕານານາຣິໂວ"} } "Indian:Chagos"{ ec{"ຊາໂກສ"} } "Indian:Christmas"{ ec{"ຄຣິດສະມາດ"} } "Indian:Cocos"{ ec{"ໂຄໂຄສ"} } "Indian:Comoro"{ ec{"ໂຄໂມໂຣ"} } "Indian:Kerguelen"{ ec{"ແກເກີເລນ"} } "Indian:Mahe"{ ec{"ມາເຮ"} } "Indian:Maldives"{ ec{"ມັລດີຟ"} } "Indian:Mauritius"{ ec{"ເມົາຣິທຽສ"} } "Indian:Mayotte"{ ec{"ມາຢັອດເຕ"} } "Indian:Reunion"{ ec{"ເຣອູນິຢົງ"} } "Pacific:Apia"{ ec{"ເອປີອາ"} } "Pacific:Auckland"{ ec{"ອັກແລນ"} } "Pacific:Bougainville"{ ec{"ເວລາຕາມເຂດບູນກຽນວິວ"} } "Pacific:Chatham"{ ec{"ແຊແທມ"} } "Pacific:Easter"{ ec{"ເອສເຕີ"} } "Pacific:Efate"{ ec{"ເອຟາເຕ"} } "Pacific:Enderbury"{ ec{"ເອັນເດີເບີລີ"} } "Pacific:Fakaofo"{ ec{"ຟາກາວໂຟ"} } "Pacific:Fiji"{ ec{"ຟູຈິ"} } "Pacific:Funafuti"{ ec{"ຟູນະຟູຕິ"} } "Pacific:Galapagos"{ ec{"ກາລາປາກອສ"} } "Pacific:Gambier"{ ec{"ແກມເບຍ"} } "Pacific:Guadalcanal"{ ec{"ກົວດັລຄະແນລ"} } "Pacific:Guam"{ ec{"ກວມ"} } "Pacific:Honolulu"{ ec{"ໂຮໂນລູລູ"} } "Pacific:Johnston"{ ec{"ຈອນສະໂຕນ"} } "Pacific:Kiritimati"{ ec{"ຄີຣິທີມາຕີ"} } "Pacific:Kosrae"{ ec{"ຄໍສແຣ"} } "Pacific:Kwajalein"{ ec{"ຄວາຈາເລນ"} } "Pacific:Majuro"{ ec{"ມາຈູໂຣ"} } "Pacific:Marquesas"{ ec{"ມາຄິວຊາສ"} } "Pacific:Midway"{ ec{"ມິດເວ"} } "Pacific:Nauru"{ ec{"ນາອູຣູ"} } "Pacific:Niue"{ ec{"ນີອູເອ"} } "Pacific:Norfolk"{ ec{"ນໍຟອລ໌ກ"} } "Pacific:Noumea"{ ec{"ນູເມອາ"} } "Pacific:Pago_Pago"{ ec{"ປາໂກປາໂກ"} } "Pacific:Palau"{ ec{"ປາເລົາ"} } "Pacific:Pitcairn"{ ec{"ພິດແຄນ"} } "Pacific:Ponape"{ ec{"ປົນເປີຍ"} } "Pacific:Port_Moresby"{ ec{"ພອດ ມໍເຣສບີ"} } "Pacific:Rarotonga"{ ec{"ຣາໂຣຕອງກາ"} } "Pacific:Saipan"{ ec{"ໄຊປານ"} } "Pacific:Tahiti"{ ec{"ທາຮີຕິ"} } "Pacific:Tarawa"{ ec{"ຕາຣາວາ"} } "Pacific:Tongatapu"{ ec{"ຕອງກາຕາປູ"} } "Pacific:Truk"{ ec{"ຈັກ"} } "Pacific:Wake"{ ec{"ເວກ"} } "Pacific:Wallis"{ ec{"ວາລິດ"} } "meta:Acre"{ ld{"ເວລາລະດູຮ້ອນຂອງອາເກຣ"} lg{"ເວລາຂອງອາເກຣ"} ls{"ເວລາມາດຕະຖານຂອງອາເກຣ"} } "meta:Afghanistan"{ ls{"ເວລາ ອັຟການິສຖານ"} } "meta:Africa_Central"{ ls{"ເວ​ລາ​ອາ​ຟຣິ​ກາ​ກາງ"} } "meta:Africa_Eastern"{ ls{"ເວ​ລາ​ອາ​ຟຣິ​ກາ​ຕາ​ເວັນ​ອອກ"} } "meta:Africa_Southern"{ ls{"ເວ​ລາ​ອາ​ຟຣິ​ກາ​ໃຕ້"} } "meta:Africa_Western"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ອາ​ຟຣິ​ກາ​ຕາ​ເວັນ​ຕົກ"} lg{"ເວ​ລາ​ອາ​ຟຣິ​ກາ​ຕາ​ເວັນ​ຕົກ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ອາ​ຟຣິ​ກາ​ຕາ​ເວັນ​ຕົກ"} } "meta:Alaska"{ ld{"ເວລາກາງເວັນອະລັສກາ"} lg{"ເວລາອະລັສກາ"} ls{"ເວລາມາດຕະຖານອະລັສກາ"} } "meta:Almaty"{ ld{"ເວລາລະດູຮ້ອນອໍມາຕີ"} lg{"ເວລາອໍມາຕີ"} ls{"ເວລາມາດຕະຖານອໍມາຕີ"} } "meta:Amazon"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນອາ​ເມ​ຊອນ"} lg{"ເວລາຕາມເຂດອາເມຊອນ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານອາ​ເມ​ຊອນ"} } "meta:America_Central"{ ld{"ເວລາກາງເວັນກາງ"} lg{"ເວລາກາງ"} ls{"ເວລາມາດຕະຖານກາງ"} } "meta:America_Eastern"{ ld{"ເວລາກາງເວັນຕາເວັນອອກ"} lg{"ເວລາຕາເວັນອອກ"} ls{"ເວລາມາດຕະຖານຕາເວັນອອກ"} } "meta:America_Mountain"{ ld{"ເວລາກາງເວັນແຖບພູເຂົາ"} lg{"ເວລາແຖບພູເຂົາ"} ls{"ເວລາມາດຕະຖານແຖບພູເຂົາ"} } "meta:America_Pacific"{ ld{"ເວລາກາງເວັນແປຊິຟິກ"} lg{"ເວລາແປຊິຟິກ"} ls{"ເວລາມາດຕະຖານແປຊິຟິກ"} } "meta:Apia"{ ld{"ເວລາກາງເວັນອາເພຍ"} lg{"ເວລາເອເພຍ"} ls{"ເວລາມາດຕະຖານເອເພຍ"} } "meta:Aqtau"{ ld{"ເວລາລະດູຮ້ອນອັດຕາອູ"} lg{"ເວລາອັດຕາອູ"} ls{"ເວລາມາດຕະຖານອັດຕາອູ"} } "meta:Aqtobe"{ ld{"ເວລາລະດູຮ້ອນອັດໂຕເບ"} lg{"ເວລາອັດໂຕເບ"} ls{"ເວລາມາດຕະຖານອັດໂຕເບ"} } "meta:Arabian"{ ld{"ເວລາກາງເວັນອາຣາບຽນ"} lg{"ເວ​ລາ​ອາ​ຣາ​ບຽນ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານອາ​ຣາ​ບຽນ"} } "meta:Argentina"{ ld{"​ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ອາ​ເຈນ​ທິ​ນາ"} lg{"ເວ​ລາ​ອາ​ເຈ​ທິ​ນາ"} ls{"​ເວ​ລາ​ມາດ​ຕະ​ຖານອາ​ເຈນ​ທິ​ນາ"} } "meta:Argentina_Western"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນເວ​ສ​ເທິນອາ​ເຈນ​ທິ​ນາ"} lg{"ເວ​ລາ​ເວ​ສ​ເທິນອາ​ເຈນ​ທິ​ນາ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານເວ​ສ​ເທິນອາ​ເຈນ​ທິ​ນາ"} } "meta:Armenia"{ ld{"ເວລາລະດູຮ້ອນອາເມເນຍ"} lg{"ເວລາອາເມເນຍ"} ls{"ເວລາມາດຕະຖານອາເມເນຍ"} } "meta:Atlantic"{ ld{"ເວລາກາງເວັນຂອງອາແລນຕິກ"} lg{"ເວລາຂອງອາແລນຕິກ"} ls{"ເວລາມາດຕະຖານຂອງອາແລນຕິກ"} } "meta:Australia_Central"{ ld{"ເວ​ລາ​ຕອນ​ທ່ຽງ​ອອສ​ເຕຣ​ເລຍ​ກາງ"} lg{"ເວ​ລາອອ​ສ​ເຕຣ​ເລຍ​ກາງ"} ls{"ເວ​ລາມາດ​ຕະ​ຖານອອ​ສ​ເຕຣ​ເລຍ​ກ​າງ"} } "meta:Australia_CentralWestern"{ ld{"ເວ​ລາ​ຕອນ​ທ່ຽງ​ອອສ​ເຕຣ​ລຽນ​ກາງ​ຕາ​ເວັນ​ຕົກ"} lg{"ເວ​ລາອອສ​ເຕຣ​ລຽນ​ກາງ​ຕາ​ເວັນ​ຕົກ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານອອສ​ເຕຣ​ລຽນ​ກາງ​ຕາ​ເວັນ​ຕົກ"} } "meta:Australia_Eastern"{ ld{"ເວ​ລາ​ຕອນ​ທ່ຽງ​ອອສ​ເຕຣ​ລຽນ​ຕາ​ເວັນ​ອອກ"} lg{"ເວ​ລາອອສ​ເຕຣ​ລຽນ​ຕາ​ເວັນ​ອອກ"} ls{"ເວ​ລາ​ມາດຕະຖານ​​​ອອສ​ເຕຣ​ລຽນ​ຕາ​ເວັນ​ອອກ"} } "meta:Australia_Western"{ ld{"ເວ​ລາ​ຕອນ​ທ່ຽງ​ອອສ​ເຕຣ​ລຽນ​ຕາ​ເວັນ​ຕົກ"} lg{"ເວ​ລາ​ອອສ​ເຕຣ​ເລຍ​ຕາ​ເວັນ​ຕົກ"} ls{"ເວ​ລາ​ມາ​ດ​ຕະ​ຖານອອສ​ເຕຣ​ລຽນ​ຕາ​ເວັນ​ຕົກ"} } "meta:Azerbaijan"{ ld{"ເວລາລະດູຮ້ອນອັສເຊີໄບຈັນ"} lg{"ເວລາອັສເຊີໄບຈັນ"} ls{"ເວລາມາດຕະຖານອັສເຊີໄບຈັນ"} } "meta:Azores"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນອາ​ໂຊ​ເຣ​ສ"} lg{"ເວ​ລາ​ອາ​ໂຊ​ເຣ​ສ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານອາ​ໂຊ​ເຣ​ສ"} } "meta:Bangladesh"{ ld{"ເວລາ ລະດູຮ້ອນ ບັງກະລາເທດ"} lg{"ເວລາ ບັງກະລາເທດ"} ls{"ເວລາມາດຕະຖານ ບັງກະລາເທດ"} } "meta:Bhutan"{ ls{"ເວ​ລາ​ພູ​ຖານ"} } "meta:Bolivia"{ ls{"ເວ​ລາ​ໂບ​ລິ​ເວຍ"} } "meta:Brasilia"{ ld{"ເວລາຕາມເຂດລະດູຮ້ອນຕາມເຂດບຣາຊີເລຍ"} lg{"ເວລາຕາມເຂດບຣາຊິເລຍ"} ls{"ເວລາມາດຕາຖານເບຣຊີເລຍ"} } "meta:Brunei"{ ls{"​ເວ​ລາບຣູ​ໄນດາ​ຣຸສ​ຊາ​ລາມ"} } "meta:Cape_Verde"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ເຄບ​ເວີດ"} lg{"ເວ​ລາ​ເຄບ​ເວີດ"} ls{"​ເວ​ລາ​ມາດ​ຕະ​ຖານ​ເຄບ​ເວີດ"} } "meta:Casey"{ ls{"ເວລາເຄຊີ"} } "meta:Chamorro"{ ls{"ເວ​ລາ​ຈາ​ໂມ​ໂຣ"} } "meta:Chatham"{ ld{"ເວ​ລາ​ຕອນ​ທ່ຽງ​ຊາ​ທາມ"} lg{"ເວ​ລາ​ຊາ​ທາມ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ຊາ​ທາມ"} } "meta:Chile"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນຊິ​ລີ"} lg{"ເວ​ລາ​ຊິ​ລີ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານຊິ​ລີ"} } "meta:China"{ ld{"​ເວ​ລາ​ຕອນ​ທ່ຽງ​ຈີນ"} lg{"ເວ​ລາ​ຈີນ"} ls{"ເວລາມາດຕະຖານຈີນ"} } "meta:Choibalsan"{ ld{"ເວລາລະ​ດູ​ຮ້ອນໂຊຍບາຊັນ"} lg{"ເວ​ລາ​ໂຊຍ​ບາ​ຊັນ"} ls{"ເວລາມາດຕະຖານໂຊຍບາຊັນ"} } "meta:Christmas"{ ls{"ເວ​ລາ​ເກາະ​ຄ​ຣິສ​ມາສ"} } "meta:Cocos"{ ls{"ເວລາຫມູ່ເກາະໂກໂກສ"} } "meta:Colombia"{ ld{"ເວລາລະດູຮ້ອນໂຄລໍາເບຍ"} lg{"ເວລາໂຄລໍາເບຍ"} ls{"ເວລາມາດຕະຖານໂຄລຳເບຍ"} } "meta:Cook"{ ld{"ເວ​ລາ​ເຄິ່ງ​ລະ​ດູ​ຮ້ອນ​ໝູ່​ເກາະ​ຄຸກ"} lg{"ເວລາຫມູ່ເກາະຄຸກ"} ls{"ເວລາມາດຕະຖານຫມູ່ເກາະຄຸກ"} } "meta:Cuba"{ ld{"ເວລາກາງເວັນຄິວບາ"} lg{"ເວລາຄິວບາ"} ls{"ເວລາມາດຕະຖານຂອງຄິວບາ"} } "meta:Davis"{ ls{"ເວລາເດວິດ"} } "meta:DumontDUrville"{ ls{"ເວລາດູມອງດູວິລ"} } "meta:East_Timor"{ ls{"ເວລາຕີມໍຕາເວັນອອກ"} } "meta:Easter"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນເກາະ​ອີ​ສ​ເຕີ"} lg{"ເວ​ລາ​ເກາະ​ອີ​ສ​ເຕີ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານເກາະ​ອີ​ສ​ເຕີ"} } "meta:Ecuador"{ ls{"ເວ​ລາ​ເອ​ກົວ​ດໍ"} } "meta:Europe_Central"{ ld{"​ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ຢູ​ໂຣບ​ກາງ"} lg{"ເວ​ລາ​ຢູ​ໂຣບ​ກາງ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ຢູ​ໂຣບກາງ"} } "meta:Europe_Eastern"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນຢູ​ໂຣບ​ຕາ​ເວັນ​ອອກ"} lg{"ເວ​ລາ​ຢູ​ໂຣບ​ຕາ​ເວັນ​ອອກ"} ls{"ເວ​ລາ​ມາ​ດ​ຕະ​ຖານ​ຢູ​ໂຣບ​ຕາ​ເວັນ​ອອກ"} } "meta:Europe_Further_Eastern"{ ls{"ເວ​ລາ​​ຢູ​ໂຣ​ປຽນ​ຕາ​ເວັນ​ອອກ​ໄກ"} } "meta:Europe_Western"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນຢູ​ໂຣບ​ຕາ​ເວັນ​ຕົກ"} lg{"ເວ​ລາ​ຢູ​ໂຣບ​ຕາ​ເວັນ​ຕົກ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານຢູ​ໂຣບ​ຕາ​ເວັນ​ຕົກ"} } "meta:Falkland"{ ld{"​ເວ​ລາ​ລະ​ດູ​ຮ້ອນໝູ່​ເກາະ​ຟອ​ລ໌ກ​ແລນ"} lg{"​ເວ​ລາ​ໝູ່​ເກາະ​ຟອ​ລ໌ກ​ແລນ"} ls{"​ເວ​ລາ​ມາດ​ຕະ​ຖານໝູ່​ເກາະ​ຟອ​ລ໌ກ​ແລນ"} } "meta:Fiji"{ ld{"ເວລາລະດູຮ້ອນຟິຈິ"} lg{"ເວລາຟິຈິ"} ls{"ເວລາມາດຕະຖານຟິຈິ"} } "meta:French_Guiana"{ ls{"ເວ​ລາ​ເຟ​ຣນ​ຊ໌​ເກຍ​ນາ"} } "meta:French_Southern"{ ls{"ເວລາຝຣັ່ງຕອນໃຕ້ ແລະ ແອນຕາກຕິກ"} } "meta:GMT"{ ls{"ເວ​ລາກຣີນ​ວິ​ຊ"} } "meta:Galapagos"{ ls{"ເວ​ລາ​ກາ​ລາ​ປາ​ກອ​ສ"} } "meta:Gambier"{ ls{"ເວລາແກມເບຍ"} } "meta:Georgia"{ ld{"ເວລາລະດູຮ້ອນຈໍເຈຍ"} lg{"ເວລາຈໍເຈຍ"} ls{"ເວລາມາດຕະຖານຈໍເຈຍ"} } "meta:Gilbert_Islands"{ ls{"ເວລາຫມູ່ເກາະກິລເບີດ"} } "meta:Greenland_Eastern"{ ld{"ເວລາລະດູຮ້ອນກຣີນແລນຕາເວັນອອກ"} lg{"ເວລາຕາເວັນອອກຂອງກຣີນແລນ"} ls{"ເວລາມາດຕະຖານຕາເວັນອອກກຣີນແລນ"} } "meta:Greenland_Western"{ ld{"ເວລາຕອນທ່ຽງກຣີນແລນຕາເວັນຕົກ"} lg{"ເວລາກຣີນແລນຕາເວັນຕົກ"} ls{"ເວລາມາດຕະຖານກຣີນແລນຕາເວັນຕົກ"} } "meta:Guam"{ ls{"ເວລາກວມ"} } "meta:Gulf"{ ls{"ເວ​ລາ​ກູ​ລ​໌ຟ"} } "meta:Guyana"{ ls{"ເວລາກາຍອານາ"} } "meta:Hawaii_Aleutian"{ ld{"ເວລາຕອນທ່ຽງຮາວາຍ-ເອລູທຽນ"} lg{"ເວລາຮາວາຍ-ເອລູທຽນ"} ls{"ເວລາມາດຕະຖານຮາວາຍ-ເອລູທຽນ"} } "meta:Hong_Kong"{ ld{"​ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ຮອງ​ກົງ"} lg{"ເວ​ລາ​ຮອງ​ກົງ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ຮອງ​ກົງ"} } "meta:Hovd"{ ld{"​ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ຮອບ​ດ໌"} lg{"ເວ​ລາ​ຮອບ​ດ໌"} ls{"​ເວ​ລາ​ມາດ​ຕະ​ຖານ​ຮອບ​ດ໌"} } "meta:India"{ ls{"ເວລາ ອິນເດຍ"} } "meta:Indian_Ocean"{ ls{"ເວລາຫມະຫາສະຫມຸດອິນເດຍ"} } "meta:Indochina"{ ls{"ເວລາອິນດູຈີນ"} } "meta:Indonesia_Central"{ ls{"ເວ​ລາ​ອິນ​ໂດ​ເນ​ເຊຍ​ກາງ"} } "meta:Indonesia_Eastern"{ ls{"ເວ​ລາ​ອິນ​ໂດ​ເນ​ເຊຍ​ຕາ​ເວັນ​ອອກ"} } "meta:Indonesia_Western"{ ls{"ເວ​ລາ​ອິນ​ໂດ​ເນ​ເຊຍ​ຕາ​ເວັນ​ຕົກ"} } "meta:Iran"{ ld{"ເວ​ລາ​ຕອນ​ທ່ຽງ​ອີ​ຣາ​ນ"} lg{"ເວ​ລາ​ອີ​ຣານ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານອີ​ຣານ"} } "meta:Irkutsk"{ ld{"ເວ​ລາລະ​ດູ​ຮ້ອນອີ​ຄຸດ​ສ​ຄ໌"} lg{"ເວ​ລ​າອີ​ຄຸດ​ສ​ຄ໌"} ls{"ເວ​ລາມາດ​ຕະ​ຖານອີ​ຄຸດ​ສ​ຄ໌"} } "meta:Israel"{ ld{"ເວລາກາງເວັນອິສຣາເອວ"} lg{"ເວ​ລາ​ອິ​ສ​ຣາ​ເອວ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານອິ​ສ​ຣາ​ເອວ"} } "meta:Japan"{ ld{"ເວ​ລາ​ຕອນ​ທ່ຽງ​ຍີ່​ປຸ່ນ"} lg{"ເວ​ລາ​ຍີ່​ປຸ່ນ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ຍີ່​ປຸ່ນ"} } "meta:Kazakhstan_Eastern"{ ls{"ເວ​ລາ​ຄາ​ຊັກ​ສ​ຖານ​ຕາ​ເວັນ​ອອກ"} } "meta:Kazakhstan_Western"{ ls{"ເວ​ລາ​ຄາ​ຊັກ​ສ​ຖານ​ຕາ​ເວັນ​ຕົກ"} } "meta:Korea"{ ld{"ເວ​ລາ​ຕອນ​ທ່ຽງ​ເກົາ​ຫລີ"} lg{"ເວລາເກົາຫຼີ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ເກົາ​ຫລີ"} } "meta:Kosrae"{ ls{"ເວລາຄອສແຣ"} } "meta:Krasnoyarsk"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນຄຣັສ​ໂນ​ຢາ​ສ​ຄ໌"} lg{"ເວ​ລາ​ຄຣັສ​ໂນ​ຢາ​ສ​ຄ໌"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານຄຣັສ​ໂນ​ຢາ​ສ​ຄ໌"} } "meta:Kyrgystan"{ ls{"ເວລາເຄຍກິສຖານ"} } "meta:Lanka"{ ls{"ເວລາລັງກາ"} } "meta:Line_Islands"{ ls{"ເວ​ລາ​ໝູ່​ເກາະ​ລາຍ"} } "meta:Lord_Howe"{ ld{"​ເວ​ລ​ສາ​ຕອນ​​ທ່ຽງ​ລອດ​ເຮົາ​"} lg{"ເວ​ລາ​ລອດ​ເຮົາ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ລອດ​ເຮົາ"} } "meta:Macau"{ ld{"ເວລາລະດູຮ້ອນມາເກົາ"} lg{"ເວລາມາເກົາ"} ls{"ເວລາມາດຕະຖານມາເກົາ"} } "meta:Macquarie"{ ls{"ເວ​ລາ​ເກາະ​ແມັກ​ຄົວ​ຣີ"} } "meta:Magadan"{ ld{"ເວລາລະດູຮ້ອນເມັກກາເດນ"} lg{"ເວລາເມັກກາເດນ"} ls{"ເວລາມາດຕະຖານເມັກກາເດນ"} } "meta:Malaysia"{ ls{"ເວ​ລາ​ມາ​ເລ​ເຊຍ"} } "meta:Maldives"{ ls{"ເວລາມັລດີຟ"} } "meta:Marquesas"{ ls{"ເວລາມາເຄີຊັສ"} } "meta:Marshall_Islands"{ ls{"ເວ​ລາ​ໝູ່​ເກາະ​ມາ​ແຊວ"} } "meta:Mauritius"{ ld{"​ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ເມົາ​ຣິ​ທຽ​ສ"} lg{"ເວ​ລາ​ເມົາ​ຣິ​ທຽ​ສ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານເມົາ​ຣິ​ທຽ​ສ"} } "meta:Mawson"{ ls{"ເວລາມໍສັນ"} } "meta:Mexico_Northwest"{ ld{"ເວລາກາງເວັນເມັກຊິກັນນອດເວສ"} lg{"​ເວ​ລາ​ນອດ​ເວ​ສ​ເມັກ​ຊິ​ໂກ"} ls{"​ເວ​ລາ​ມາດ​ຕະ​ຖານນອດ​ເວ​ສ​ເມັກ​ຊິ​ໂກ"} } "meta:Mexico_Pacific"{ ld{"ເວລາກາງເວັນແປຊິຟິກເມັກຊິກັນ"} lg{"ເວລາແປຊິຟິກເມັກຊິກັນ"} ls{"ເວລາມາດຕະຖານແປຊິຟິກເມັກຊິກັນ"} } "meta:Mongolia"{ ld{"ເວລາລະດູຮ້ອນອູລານບາເຕີ"} lg{"ເວລາ ອູລານບາເຕີ"} ls{"ເວລາມາດຕະຖານ ອູລານບາເຕີ"} } "meta:Moscow"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນມອ​ສ​ໂຄ"} lg{"ເວ​ລາ​ມອ​ສ​ໂຄ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານມອ​ສ​ໂຄ"} } "meta:Myanmar"{ ls{"ເວລາມຽນມາ"} } "meta:Nauru"{ ls{"ເວ​ລາ​ນາ​ອູ​ຣຸ"} } "meta:Nepal"{ ls{"​ເວ​ລາ​ເນ​ປານ"} } "meta:New_Caledonia"{ ld{"ເວລາລະດູຮ້ອນນິວແຄລິໂດເນຍ"} lg{"ເວລານິວແຄລິໂດເນຍ"} ls{"ເວລາມາດຕະຖານນິວແຄລິໂດເນຍ"} } "meta:New_Zealand"{ ld{"ເວ​ລາ​ຕອນ​ທ່ຽງ​ນິວ​ຊີ​ແລນ"} lg{"ເວ​ລາ​ນິວ​ຊີ​ແລນ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານນິວ​ຊີ​ແລນ"} } "meta:Newfoundland"{ ld{"ເວລາກາງເວັນນິວຟາວແລນ"} lg{"ເວ​ລາ​ນິວ​ຟາວ​ແລນ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ນິວ​ຟາວ​ແລນ"} } "meta:Niue"{ ls{"ເວລານິອູເອ"} } "meta:Norfolk"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນເກາະ​ນໍ​ຟອ​ລ໌ກ"} lg{"ເວ​ລາ​ເກາະ​ນໍ​ຟອ​ລ໌ກ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານເກາະ​ນໍ​ຟອ​ລ໌ກ"} } "meta:Noronha"{ ld{"ເວລາລະດູຮ້ອນເຟນັນໂດເດໂນຮອນຮາ"} lg{"ເວລາເຟນັນໂດເດໂນຮອນຮາ"} ls{"ເວລາມາດຕະຖານເຟນັນໂດເດໂນຮອນຮາ"} } "meta:North_Mariana"{ ls{"ເວລາຫມູ່ເກາະມາເຣຍນາເຫນືອ"} } "meta:Novosibirsk"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນໂນ​ໂບ​ຊິ​ບິ​ສ​ຄ໌"} lg{"ເວ​ລາ​ໂນ​ໂບ​ຊິ​ບິ​ສ​ຄ໌"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານໂນ​ໂບ​ຊິ​ບິ​ສ​ຄ໌"} } "meta:Omsk"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນອອມ​ສ​ຄ໌"} lg{"​ເວ​ລາອອມ​ສ​ຄ໌"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານອອມ​ສ​ຄ໌"} } "meta:Pakistan"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ປາ​ກີ​ສ​ຖານ"} lg{"ເວ​ລາ​ປາ​ກີສຖານ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ປາ​ກີສຖານ"} } "meta:Palau"{ ls{"ເວລາປາເລົາ"} } "meta:Papua_New_Guinea"{ ls{"ເວລາປາປົວກິນີ"} } "meta:Paraguay"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ປາ​ຣາ​ກວຍ"} lg{"ເວ​ລາ​ປາ​ຣາ​ກວຍ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ປາ​ຣາ​ກວຍ"} } "meta:Peru"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ເປ​ຣູ"} lg{"ເວ​ລາ​ເປ​ຣູ"} ls{"ເວ​ລາ​​ມາ​ດ​ຕະ​ຖານເປ​ຣູ"} } "meta:Philippines"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ຟິ​ລິບ​ປິນ"} lg{"​ເວ​ລາ​ຟິ​ລິບ​ປິນ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ຟິ​ລິບ​ປິນ"} } "meta:Phoenix_Islands"{ ls{"ເວລາຫມູ່ເກາະຟີນິກ"} } "meta:Pierre_Miquelon"{ ld{"​ເວ​ລາຕອນ​ທ່ຽງເຊນ​ປີ​ແອ ແລະ​ມິ​ກົວ​ລອນ"} lg{"​ເວ​ລາເຊນ​ປີ​ແອ ແລະ​ມິ​ກົວ​ລອນ"} ls{"​ເວ​ລາມາດ​ຕະ​ຖານເຊນ​ປີ​ແອ ແລະ​ມິ​ກົວ​ລອນ"} } "meta:Pitcairn"{ ls{"ເວລາພິດແຄຣ໌ນ"} } "meta:Ponape"{ ls{"ເວລາໂປເນບ"} } "meta:Pyongyang"{ ls{"ເວລາປຽງຢາງ"} } "meta:Qyzylorda"{ ld{"ເວລາລະດູຮ້ອນຄີວລໍດາ"} lg{"ເວລາຄີວລໍດາ"} ls{"ເວລາມາດຕະຖານຄີວລໍດາ"} } "meta:Reunion"{ ls{"ເວ​ລາ​ເຣ​ອູ​ນິ​ຢົງ"} } "meta:Rothera"{ ls{"ເວລາ ໂຣທີຕາ"} } "meta:Sakhalin"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນຊາ​ຮາ​ລິນ"} lg{"ເວ​ລາ​ຊາ​ຮາ​ລິນ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານຊາ​ຮາ​ລິນ"} } "meta:Samoa"{ ld{"ເວລາລະດູຮ້ອນຊາມົວ"} lg{"ເວລາຊາມົວ"} ls{"ເວລາມາດຕະຖານຊາມົວ"} } "meta:Seychelles"{ ls{"ເວ​ລາ​ເຊ​ເຊ​ລ​ສ໌"} } "meta:Singapore"{ ls{"ເວ​ລາ​ສິງ​ກະ​ໂປ"} } "meta:Solomon"{ ls{"ເວລາຫມູ່ເກາະໂຊໂລມອນ"} } "meta:South_Georgia"{ ls{"ເວລາຈໍເຈຍໃຕ້"} } "meta:Suriname"{ ls{"ເວ​ລາ​ຊຸ​ຣິ​ນາມ"} } "meta:Syowa"{ ls{"ເວລາ ໂຊວາ"} } "meta:Tahiti"{ ls{"ເວລາທາຮິຕິ"} } "meta:Taipei"{ ld{"ເວ​ລາ​ຕອນ​ທ່​ຽງ​ໄທ​ເປ"} lg{"ເວ​ລາ​ໄທ​ເປ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ໄທ​ເປ"} } "meta:Tajikistan"{ ls{"ເວລາທາຈິກິສຖານ"} } "meta:Tokelau"{ ls{"ເວລາໂຕເກເລົາ"} } "meta:Tonga"{ ld{"ເວລາລະດູຮ້ອນຕອງກາ"} lg{"ເວລາຕອງກາ"} ls{"ເວລາມາດຕະຖານຕອງກາ"} } "meta:Truk"{ ls{"ເວລາຊຸກ"} } "meta:Turkmenistan"{ ld{"ເວລາລະດູຮ້ອນຕວກເມນິສຖານ"} lg{"ເວລາຕວກເມນິສຖານ"} ls{"ເວລາມາດຕະຖານຕວກເມນິສຖານ"} } "meta:Tuvalu"{ ls{"ເວລາຕູວາລູ"} } "meta:Uruguay"{ ld{"ເວ​ລາ​ລະ​ດູ​ຮ້ອນ​ອູ​ຣູ​ກວຍ"} lg{"​ເວ​ລາ​ອູ​ຣູ​ກວຍ"} ls{"ເວ​ລາ​ມາດ​ຕະ​ຖານ​ອູ​ຣູ​ກວຍ"} } "meta:Uzbekistan"{ ld{"ເວລາລະດູຮ້ອນອຸສເບກິດສະຖານ"} lg{"ເວລາອຸສເບກິດສະຖານ"} ls{"ເວລາມາດຕະຖານອຸສເບກິດສະຖານ"} } "meta:Vanuatu"{ ld{"ເວລາລະດູຮ້ອນວານູອາຕູ"} lg{"ເວລາວານູອາຕູ"} ls{"ເວລາມາດຕະຖານວານູອາຕູ"} } "meta:Venezuela"{ ls{"ເວ​ລາ​ເວ​ເນ​ຊູ​ເອ​ລາ"} } "meta:Vladivostok"{ ld{"ເວລາລະດູຮ້ອນລາດີໂວສຕົກ"} lg{"ເວລາລາດີໂວສຕົກ"} ls{"ເວລາມາດຕະຖານລາດີໂວສຕົກ"} } "meta:Volgograd"{ ld{"ເວລາລະດູຮ້ອນໂວໂກກຣາດ"} lg{"ເວລາໂວໂກກຣາດ"} ls{"ເວລາມາດຕະຖານໂວໂກກຣາດ"} } "meta:Vostok"{ ls{"ເວລາ ວອສໂຕກ"} } "meta:Wake"{ ls{"ເວລາເກາະເວກ"} } "meta:Wallis"{ ls{"ເວລາວາລລິສ ແລະ ຟູຕູນາ"} } "meta:Yakutsk"{ ld{"ເວລາລະດູຮ້ອນຢາກູດສ"} lg{"ເວລາຢາກູດສ"} ls{"ເວລາມາດຕະຖານຢາກູດສ"} } "meta:Yekaterinburg"{ ld{"ເວລາລະດູຮ້ອນເຢກາເຕລິນເບີກ"} lg{"ເວລາເຢກາເຕລິນເບີກ"} ls{"ເວລາມາດຕະຖານເຢກາເຕລິນເບີກ"} } fallbackFormat{"{1} ({0})"} gmtFormat{"GMT{0}"} gmtZeroFormat{"GMT"} hourFormat{"+HH:mm;-HH:mm"} regionFormat{"ເວລາ {0}"} regionFormatDaylight{"ເວລາກາງເວັນ {0}"} regionFormatStandard{"ເວລາມາດຕະຖານ {0}"} } }
{ "pile_set_name": "Github" }
<cfscript> // comment a++; // comment </cfscript>
{ "pile_set_name": "Github" }
// Copyright 2016 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // +build ignore // mkpost processes the output of cgo -godefs to // modify the generated types. It is used to clean up // the sys API in an architecture specific manner. // // mkpost is run after cgo -godefs; see README.md. package main import ( "bytes" "fmt" "go/format" "io/ioutil" "log" "os" "regexp" ) func main() { // Get the OS and architecture (using GOARCH_TARGET if it exists) goos := os.Getenv("GOOS") goarch := os.Getenv("GOARCH_TARGET") if goarch == "" { goarch = os.Getenv("GOARCH") } // Check that we are using the new build system if we should be. if goos == "linux" && goarch != "sparc64" { if os.Getenv("GOLANG_SYS_BUILD") != "docker" { os.Stderr.WriteString("In the new build system, mkpost should not be called directly.\n") os.Stderr.WriteString("See README.md\n") os.Exit(1) } } b, err := ioutil.ReadAll(os.Stdin) if err != nil { log.Fatal(err) } // If we have empty Ptrace structs, we should delete them. Only s390x emits // nonempty Ptrace structs. ptraceRexexp := regexp.MustCompile(`type Ptrace((Psw|Fpregs|Per) struct {\s*})`) b = ptraceRexexp.ReplaceAll(b, nil) // Replace the control_regs union with a blank identifier for now. controlRegsRegex := regexp.MustCompile(`(Control_regs)\s+\[0\]uint64`) b = controlRegsRegex.ReplaceAll(b, []byte("_ [0]uint64")) // Remove fields that are added by glibc // Note that this is unstable as the identifers are private. removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`) b = removeFieldsRegex.ReplaceAll(b, []byte("_")) // Convert [65]int8 to [65]byte in Utsname members to simplify // conversion to string; see golang.org/issue/20753 convertUtsnameRegex := regexp.MustCompile(`((Sys|Node|Domain)name|Release|Version|Machine)(\s+)\[(\d+)\]u?int8`) b = convertUtsnameRegex.ReplaceAll(b, []byte("$1$3[$4]byte")) // Remove spare fields (e.g. in Statx_t) spareFieldsRegex := regexp.MustCompile(`X__spare\S*`) b = spareFieldsRegex.ReplaceAll(b, []byte("_")) // Remove cgo padding fields removePaddingFieldsRegex := regexp.MustCompile(`Pad_cgo_\d+`) b = removePaddingFieldsRegex.ReplaceAll(b, []byte("_")) // We refuse to export private fields on s390x if goarch == "s390x" && goos == "linux" { // Remove padding, hidden, or unused fields removeFieldsRegex = regexp.MustCompile(`\bX_\S+`) b = removeFieldsRegex.ReplaceAll(b, []byte("_")) } // Remove the first line of warning from cgo b = b[bytes.IndexByte(b, '\n')+1:] // Modify the command in the header to include: // mkpost, our own warning, and a build tag. replacement := fmt.Sprintf(`$1 | go run mkpost.go // Code generated by the command above; see README.md. DO NOT EDIT. // +build %s,%s`, goarch, goos) cgoCommandRegex := regexp.MustCompile(`(cgo -godefs .*)`) b = cgoCommandRegex.ReplaceAll(b, []byte(replacement)) // gofmt b, err = format.Source(b) if err != nil { log.Fatal(err) } os.Stdout.Write(b) }
{ "pile_set_name": "Github" }
# Generated by Django 2.2 on 2020-06-20 15:23 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="A", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ("col", models.CharField(max_length=10, null=True)), ], ), ]
{ "pile_set_name": "Github" }
/** * Module dependencies */ var rNode = /require\s*\(['\"]([^'"]+)['"]\)/g; /** * Expose `dependencies` */ module.exports = dependencies; /** * Initialize `dependencies` * * @param {String} code * @return {Array} dependencies * @api public */ function dependencies(code) { var out = []; var dep; while (dep = rNode.exec(code)) { out.push(dep[1]); } return out; }
{ "pile_set_name": "Github" }
Copyright (c) 2007 Gabriel Peyre This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Contact Gabriel Peyre ([email protected]) for details on commercial licensing.
{ "pile_set_name": "Github" }
/** * Copyright (c) 2010-2020 SAP and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v2.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v20.html * * Contributors: * SAP - initial API and implementation */ package org.eclipse.dirigible.repository.generic; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.util.Random; import javax.xml.bind.DatatypeConverter; import org.eclipse.dirigible.repository.api.ICollection; import org.eclipse.dirigible.repository.api.IRepository; import org.eclipse.dirigible.repository.api.IResource; import org.junit.Test; // TODO: Auto-generated Javadoc /** * The Class RepositoryGenericFileRenameTest. */ public class RepositoryGenericFileRenameTest { /** The repository. */ protected IRepository repository; /** * Test rename by collection. */ @Test public void testRenameByCollection() { if (repository == null) { return; } ICollection collection = null; IResource resource = null; try { collection = repository.createCollection("/a/b/c"); //$NON-NLS-1$ assertNotNull(collection); assertTrue(collection.exists()); byte[] bytes = new byte[400000]; for (int i = 0; i < bytes.length; i++) { int ch = 'A' + new Random().nextInt(20); bytes[i] = (byte) ch; } String base64 = DatatypeConverter.printBase64Binary(bytes); resource = repository.createResource("/a/b/c/toBeRemoved1.txt", bytes, false, //$NON-NLS-1$ "text/plain"); //$NON-NLS-1$ assertNotNull(resource); assertTrue(resource.exists()); assertFalse(resource.isBinary()); collection.renameTo("x"); collection = repository.getCollection("/a/b/x"); //$NON-NLS-1$ assertNotNull(collection); assertTrue(collection.exists()); resource = repository.getResource("/a/b/x/toBeRemoved1.txt"); //$NON-NLS-1$ assertNotNull(collection); assertTrue(collection.exists()); String base64back = DatatypeConverter.printBase64Binary(resource.getContent()); assertEquals(base64, base64back); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } finally { try { repository.removeCollection("/a"); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } } } /** * Test rename by file. */ @Test public void testRenameByFile() { if (repository == null) { return; } ICollection collection = null; IResource resource = null; try { collection = repository.createCollection("/a/b/c"); //$NON-NLS-1$ assertNotNull(collection); assertTrue(collection.exists()); byte[] bytes = new byte[400000]; for (int i = 0; i < bytes.length; i++) { int ch = 'A' + new Random().nextInt(20); bytes[i] = (byte) ch; } String base64 = DatatypeConverter.printBase64Binary(bytes); resource = repository.createResource("/a/b/c/toBeRemoved1.txt", bytes, false, //$NON-NLS-1$ "text/plain"); //$NON-NLS-1$ assertNotNull(resource); assertTrue(resource.exists()); assertFalse(resource.isBinary()); resource.renameTo("toBeRemoved2.txt"); resource = repository.getResource("/a/b/c/toBeRemoved2.txt"); //$NON-NLS-1$ assertNotNull(collection); assertTrue(collection.exists()); assertEquals("toBeRemoved2.txt", resource.getName()); String base64back = DatatypeConverter.printBase64Binary(resource.getContent()); assertEquals(base64, base64back); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } finally { try { repository.removeCollection("/a"); } catch (Exception e) { e.printStackTrace(); fail(e.getMessage()); } } } }
{ "pile_set_name": "Github" }
// This file is part of Core WF which is licensed under the MIT license. // See LICENSE file in the project root for full license information. namespace Test.Common.Configurers { /// <summary> /// Interface used internally in common code to refer to configurers without knowing what types those configurers extend from. /// Testers should most likely never need to use this interface. /// /// Cant be made internal, since it fails to build. /// /// The exception is in the case where you want to create a base class for configurers all of which should be treated exactly the same. /// </summary> public interface IConfigurer { } /// <summary> /// Interface which defines a configurer that can be applied to some type of object (T). This wrapper is used so that we can represent a single /// configuration task in a way that can be applied anywhere. Specifically, the issue is that we need a serializable way to represent these /// configuration steps, so that they can be shipped to a remote app domain and run there. /// /// Note that these configurers should ideally always be public, so that they can be reused as best as possible by repros, etc. /// Also, best practice is to log out the task which the configurer is doing, with the [Configuration] prefix so that its easy /// to see from test logs what was done to the target object. /// /// TestSettings should never be modified from inside of configure calls. /// /// All Configurers should be marked as // [Serializable], so that they can be serialized and sent to additional app domains, etc. /// </summary> /// <typeparam name="T"></typeparam> public interface IConfigurer<T> : IConfigurer { void Configure(T target, TestSettings settings); } /// <summary> /// The ConfigurationOption enum lets some Configurers specify multiple ways of configuring something, /// and then let the tester choose which to use, while exposing the same API. /// Programmatic means that it will be added programatically, while ConfigurationFile means that it will /// be configured through a *.config file /// /// Note that not all Configurers support these options, some only support one method of configuration and some dont use this at all. /// </summary> public enum ConfigurationOption { Programmatic, ConfigurationFile, } }
{ "pile_set_name": "Github" }
/* * Copyright (C) 2012-2018 Team Kodi * This file is part of Kodi - https://kodi.tv * * SPDX-License-Identifier: GPL-2.0-or-later * See LICENSES/README.md for more information. */ #pragma once #include <map> #include "ThumbLoader.h" class CFileItem; class CMusicDatabase; class EmbeddedArt; class CMusicThumbLoader : public CThumbLoader { public: CMusicThumbLoader(); ~CMusicThumbLoader() override; void OnLoaderStart() override; void OnLoaderFinish() override; bool LoadItem(CFileItem* pItem) override; bool LoadItemCached(CFileItem* pItem) override; bool LoadItemLookup(CFileItem* pItem) override; /*! \brief Helper function to fill all the art for a music library item This fetches the original url for each type of art, and sets fallback thumb and fanart. For songs the art for the related album and artist(s) is also set, and for albums that of the related artist(s). Art type is named according to media type of the item, for example: artists may have "thumb", "fanart", "logo", "poster" etc., albums may have "thumb", "spine" etc. and "artist.thumb", "artist.fanart" etc., songs may have "thumb", "album.thumb", "artist.thumb", "artist.fanart", "artist.logo",... "artist1.thumb", "artist1.fanart",... "albumartist.thumb", "albumartist1.thumb" etc. \param item a music CFileItem \return true if we fill art, false if there is no art found */ bool FillLibraryArt(CFileItem &item) override; /*! \brief Fill the thumb of a music file/folder item First uses a cached thumb from a previous run, then checks for a local thumb and caches it for the next run \param item the CFileItem object to fill \return true if we fill the thumb, false otherwise */ virtual bool FillThumb(CFileItem &item, bool folderThumbs = true); static bool GetEmbeddedThumb(const std::string &path, EmbeddedArt &art); protected: CMusicDatabase *m_musicDatabase; typedef std::map<int, std::map<std::string, std::string> > ArtCache; ArtCache m_albumArt; };
{ "pile_set_name": "Github" }
# SCCSID @(#)nad27 4.1 92/12/20 GIE # proj +init files for: # # State Plane Coordinate Systems, # North American Datum 1927 # 101: alabama east: nad27 <101> proj=tmerc datum=NAD27 lon_0=-85d50 lat_0=30d30 k=.99996 x_0=152400.3048006096 y_0=0 no_defs <> # 102: alabama west: nad27 <102> proj=tmerc datum=NAD27 lon_0=-87d30 lat_0=30 k=.9999333333333333 x_0=152400.3048006096 y_0=0 no_defs <> # 5010: alaska zone no. 10: nad27 <5010> proj=lcc datum=NAD27 lon_0=-176 lat_1=53d50 lat_2=51d50 lat_0=51 x_0=914401.8288036576 y_0=0 no_defs <> # 5300: american samoa: nad27 <5300> proj=lcc datum=NAD27 lon_0=-170 lat_1=-14d16 lat_2=-14d16 lat_0=-14d16 x_0=152400.3048006096 y_0=95169.31165862332 no_defs <> # 201: arizona east: nad27 <201> proj=tmerc datum=NAD27 lon_0=-110d10 lat_0=31 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 202: arizona central: nad27 <202> proj=tmerc datum=NAD27 lon_0=-111d55 lat_0=31 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 203: arizona west: nad27 <203> proj=tmerc datum=NAD27 lon_0=-113d45 lat_0=31 k=.9999333333333333 x_0=152400.3048006096 y_0=0 no_defs <> # 301: arkansas north: nad27 <301> proj=lcc datum=NAD27 lon_0=-92 lat_1=36d14 lat_2=34d56 lat_0=34d20 x_0=609601.2192024384 y_0=0 no_defs <> # 302: arkansas south: nad27 <302> proj=lcc datum=NAD27 lon_0=-92 lat_1=34d46 lat_2=33d18 lat_0=32d40 x_0=609601.2192024384 y_0=0 no_defs <> # 401: california i: nad27 <401> proj=lcc datum=NAD27 lon_0=-122 lat_1=41d40 lat_2=40 lat_0=39d20 x_0=609601.2192024384 y_0=0 no_defs <> # 402: california ii: nad27 <402> proj=lcc datum=NAD27 lon_0=-122 lat_1=39d50 lat_2=38d20 lat_0=37d40 x_0=609601.2192024384 y_0=0 no_defs <> # 403: california iii: nad27 <403> proj=lcc datum=NAD27 lon_0=-120d30 lat_1=38d26 lat_2=37d4 lat_0=36d30 x_0=609601.2192024384 y_0=0 no_defs <> # 404: california iv: nad27 <404> proj=lcc datum=NAD27 lon_0=-119 lat_1=37d15 lat_2=36 lat_0=35d20 x_0=609601.2192024384 y_0=0 no_defs <> # 405: california v: nad27 <405> proj=lcc datum=NAD27 lon_0=-118 lat_1=35d28 lat_2=34d2 lat_0=33d30 x_0=609601.2192024384 y_0=0 no_defs <> # 406: california vi: nad27 <406> proj=lcc datum=NAD27 lon_0=-116d15 lat_1=33d53 lat_2=32d47 lat_0=32d10 x_0=609601.2192024384 y_0=0 no_defs <> # 407: california vii: nad27 <407> proj=lcc datum=NAD27 lon_0=-118d20 lat_1=34d25 lat_2=33d52 lat_0=34d8 x_0=1276106.450596901 y_0=1268253.006858014 no_defs <> # 501: colorado north: nad27 <501> proj=lcc datum=NAD27 lon_0=-105d30 lat_1=40d47 lat_2=39d43 lat_0=39d20 x_0=609601.2192024384 y_0=0 no_defs <> # 502: colorado central: nad27 <502> proj=lcc datum=NAD27 lon_0=-105d30 lat_1=39d45 lat_2=38d27 lat_0=37d50 x_0=609601.2192024384 y_0=0 no_defs <> # 503: colorado south: nad27 <503> proj=lcc datum=NAD27 lon_0=-105d30 lat_1=38d26 lat_2=37d14 lat_0=36d40 x_0=609601.2192024384 y_0=0 no_defs <> # 600: connecticut ---: nad27 <600> proj=lcc datum=NAD27 lon_0=-72d45 lat_1=41d52 lat_2=41d12 lat_0=40d50 x_0=182880.3657607315 y_0=0 no_defs <> # 700: delaware ---: nad27 <700> proj=tmerc datum=NAD27 lon_0=-75d25 lat_0=38 k=.999995 x_0=152400.3048006096 y_0=0 no_defs <> # 901: florida east: nad27 <901> proj=tmerc datum=NAD27 lon_0=-81 lat_0=24d20 k=.9999411764705882 x_0=152400.3048006096 y_0=0 no_defs <> # 902: florida west: nad27 <902> proj=tmerc datum=NAD27 lon_0=-82 lat_0=24d20 k=.9999411764705882 x_0=152400.3048006096 y_0=0 no_defs <> # 903: florida north: nad27 <903> proj=lcc datum=NAD27 lon_0=-84d30 lat_1=30d45 lat_2=29d35 lat_0=29 x_0=609601.2192024384 y_0=0 no_defs <> # 1001: georgia east: nad27 <1001> proj=tmerc datum=NAD27 lon_0=-82d10 lat_0=30 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 1002: georgia west: nad27 <1002> proj=tmerc datum=NAD27 lon_0=-84d10 lat_0=30 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 5101: hawaii 1: nad27 <5101> proj=tmerc datum=NAD27 lon_0=-155d30 lat_0=18d50 k=.9999666666666667 x_0=152400.3048006096 y_0=0 no_defs <> # 5102: hawaii 2: nad27 <5102> proj=tmerc datum=NAD27 lon_0=-156d40 lat_0=20d20 k=.9999666666666667 x_0=152400.3048006096 y_0=0 no_defs <> # 5103: hawaii 3: nad27 <5103> proj=tmerc datum=NAD27 lon_0=-158 lat_0=21d10 k=.99999 x_0=152400.3048006096 y_0=0 no_defs <> # 5104: hawaii 4: nad27 <5104> proj=tmerc datum=NAD27 lon_0=-159d30 lat_0=21d50 k=.99999 x_0=152400.3048006096 y_0=0 no_defs <> # 5105: hawaii 5: nad27 <5105> proj=tmerc datum=NAD27 lon_0=-160d10 lat_0=21d40 k=1 x_0=152400.3048006096 y_0=0 no_defs <> # 1101: idaho east: nad27 <1101> proj=tmerc datum=NAD27 lon_0=-112d10 lat_0=41d40 k=.9999473684210526 x_0=152400.3048006096 y_0=0 no_defs <> # 1102: idaho central: nad27 <1102> proj=tmerc datum=NAD27 lon_0=-114 lat_0=41d40 k=.9999473684210526 x_0=152400.3048006096 y_0=0 no_defs <> # 1103: idaho west: nad27 <1103> proj=tmerc datum=NAD27 lon_0=-115d45 lat_0=41d40 k=.9999333333333333 x_0=152400.3048006096 y_0=0 no_defs <> # 1201: illinois east: nad27 <1201> proj=tmerc datum=NAD27 lon_0=-88d20 lat_0=36d40 k=.999975 x_0=152400.3048006096 y_0=0 no_defs <> # 1202: illinois west: nad27 <1202> proj=tmerc datum=NAD27 lon_0=-90d10 lat_0=36d40 k=.9999411764705882 x_0=152400.3048006096 y_0=0 no_defs <> # 1301: indiana east: nad27 <1301> proj=tmerc datum=NAD27 lon_0=-85d40 lat_0=37d30 k=.9999666666666667 x_0=152400.3048006096 y_0=0 no_defs <> # 1302: indiana west: nad27 <1302> proj=tmerc datum=NAD27 lon_0=-87d5 lat_0=37d30 k=.9999666666666667 x_0=152400.3048006096 y_0=0 no_defs <> # 1401: iowa north: nad27 <1401> proj=lcc datum=NAD27 lon_0=-93d30 lat_1=43d16 lat_2=42d4 lat_0=41d30 x_0=609601.2192024384 y_0=0 no_defs <> # 1402: iowa south: nad27 <1402> proj=lcc datum=NAD27 lon_0=-93d30 lat_1=41d47 lat_2=40d37 lat_0=40 x_0=609601.2192024384 y_0=0 no_defs <> # 1501: kansas north: nad27 <1501> proj=lcc datum=NAD27 lon_0=-98 lat_1=39d47 lat_2=38d43 lat_0=38d20 x_0=609601.2192024384 y_0=0 no_defs <> # 1502: kansas south: nad27 <1502> proj=lcc datum=NAD27 lon_0=-98d30 lat_1=38d34 lat_2=37d16 lat_0=36d40 x_0=609601.2192024384 y_0=0 no_defs <> # 1601: kentucky north: nad27 <1601> proj=lcc datum=NAD27 lon_0=-84d15 lat_1=38d58 lat_2=37d58 lat_0=37d30 x_0=609601.2192024384 y_0=0 no_defs <> # 1602: kentucky south: nad27 <1602> proj=lcc datum=NAD27 lon_0=-85d45 lat_1=37d56 lat_2=36d44 lat_0=36d20 x_0=609601.2192024384 y_0=0 no_defs <> # 1701: louisiana north: nad27 <1701> proj=lcc datum=NAD27 lon_0=-92d30 lat_1=32d40 lat_2=31d10 lat_0=30d40 x_0=609601.2192024384 y_0=0 no_defs <> # 1702: louisiana south: nad27 <1702> proj=lcc datum=NAD27 lon_0=-91d20 lat_1=30d42 lat_2=29d18 lat_0=28d40 x_0=609601.2192024384 y_0=0 no_defs <> # 1703: louisiana offshore: nad27 <1703> proj=lcc datum=NAD27 lon_0=-91d20 lat_1=27d50 lat_2=26d10 lat_0=25d40 x_0=609601.2192024384 y_0=0 no_defs <> # 1801: maine east: nad27 <1801> proj=tmerc datum=NAD27 lon_0=-68d30 lat_0=43d50 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 1802: maine west: nad27 <1802> proj=tmerc datum=NAD27 lon_0=-70d10 lat_0=42d50 k=.9999666666666667 x_0=152400.3048006096 y_0=0 no_defs <> # 1900: maryland ---: nad27 <1900> proj=lcc datum=NAD27 lon_0=-77 lat_1=39d27 lat_2=38d18 lat_0=37d50 x_0=243840.4876809754 y_0=0 no_defs <> # 2001: massachusetts mainland: nad27 <2001> proj=lcc datum=NAD27 lon_0=-71d30 lat_1=42d41 lat_2=41d43 lat_0=41 x_0=182880.3657607315 y_0=0 no_defs <> # 2002: massachusetts island: nad27 <2002> proj=lcc datum=NAD27 lon_0=-70d30 lat_1=41d29 lat_2=41d17 lat_0=41 x_0=60960.12192024384 y_0=0 no_defs <> # 2101: michigan east: nad27 <2101> proj=tmerc datum=NAD27 lon_0=-83d40 lat_0=41d30 k=.9999428571428571 x_0=152400.3048006096 y_0=0 no_defs <> # 2102: michigan central/m: nad27 <2102> proj=tmerc datum=NAD27 lon_0=-85d45 lat_0=41d30 k=.9999090909090909 x_0=152400.3048006096 y_0=0 no_defs <> # 2103: michigan west: nad27 <2103> proj=tmerc datum=NAD27 lon_0=-88d45 lat_0=41d30 k=.9999090909090909 x_0=152400.3048006096 y_0=0 no_defs <> # 2111: michigan north: nad27 <2111> proj=lcc a=6378450.047 es=.006768657997291094 lon_0=-87 lat_1=47d5 lat_2=45d29 lat_0=44d47 x_0=609601.2192024384 y_0=0 no_defs <> # 2112: michigan central/l: nad27 <2112> proj=lcc a=6378450.047 es=.006768657997291094 lon_0=-84d20 lat_1=45d42 lat_2=44d11 lat_0=43d19 x_0=609601.2192024384 y_0=0 no_defs <> # 2113: michigan south: nad27 <2113> proj=lcc a=6378450.047 es=.006768657997291094 lon_0=-84d20 lat_1=43d40 lat_2=42d6 lat_0=41d30 x_0=609601.2192024384 y_0=0 no_defs <> # 2201: minnesota north: nad27 <2201> proj=lcc datum=NAD27 lon_0=-93d6 lat_1=48d38 lat_2=47d2 lat_0=46d30 x_0=609601.2192024384 y_0=0 no_defs <> # 2202: minnesota central: nad27 <2202> proj=lcc datum=NAD27 lon_0=-94d15 lat_1=47d3 lat_2=45d37 lat_0=45 x_0=609601.2192024384 y_0=0 no_defs <> # 2203: minnesota south: nad27 <2203> proj=lcc datum=NAD27 lon_0=-94 lat_1=45d13 lat_2=43d47 lat_0=43 x_0=609601.2192024384 y_0=0 no_defs <> # 2301: mississippi east: nad27 <2301> proj=tmerc datum=NAD27 lon_0=-88d50 lat_0=29d40 k=.99996 x_0=152400.3048006096 y_0=0 no_defs <> # 2302: mississippi west: nad27 <2302> proj=tmerc datum=NAD27 lon_0=-90d20 lat_0=30d30 k=.9999411764705882 x_0=152400.3048006096 y_0=0 no_defs <> # 2401: missouri east: nad27 <2401> proj=tmerc datum=NAD27 lon_0=-90d30 lat_0=35d50 k=.9999333333333333 x_0=152400.3048006096 y_0=0 no_defs <> # 2402: missouri central: nad27 <2402> proj=tmerc datum=NAD27 lon_0=-92d30 lat_0=35d50 k=.9999333333333333 x_0=152400.3048006096 y_0=0 no_defs <> # 2403: missouri west: nad27 <2403> proj=tmerc datum=NAD27 lon_0=-94d30 lat_0=36d10 k=.9999411764705882 x_0=152400.3048006096 y_0=0 no_defs <> # 2501: montana north: nad27 <2501> proj=lcc datum=NAD27 lon_0=-109d30 lat_1=48d43 lat_2=47d51 lat_0=47 x_0=609601.2192024384 y_0=0 no_defs <> # 2502: montana central: nad27 <2502> proj=lcc datum=NAD27 lon_0=-109d30 lat_1=47d53 lat_2=46d27 lat_0=45d50 x_0=609601.2192024384 y_0=0 no_defs <> # 2503: montana south: nad27 <2503> proj=lcc datum=NAD27 lon_0=-109d30 lat_1=46d24 lat_2=44d52 lat_0=44 x_0=609601.2192024384 y_0=0 no_defs <> # 2601: nebraska north: nad27 <2601> proj=lcc datum=NAD27 lon_0=-100 lat_1=42d49 lat_2=41d51 lat_0=41d20 x_0=609601.2192024384 y_0=0 no_defs <> # 2602: nebraska south: nad27 <2602> proj=lcc datum=NAD27 lon_0=-99d30 lat_1=41d43 lat_2=40d17 lat_0=39d40 x_0=609601.2192024384 y_0=0 no_defs <> # 2701: nevada east: nad27 <2701> proj=tmerc datum=NAD27 lon_0=-115d35 lat_0=34d45 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 2702: nevada central: nad27 <2702> proj=tmerc datum=NAD27 lon_0=-116d40 lat_0=34d45 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 2703: nevada west: nad27 <2703> proj=tmerc datum=NAD27 lon_0=-118d35 lat_0=34d45 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 2800: new hampshire ---: nad27 <2800> proj=tmerc datum=NAD27 lon_0=-71d40 lat_0=42d30 k=.9999666666666667 x_0=152400.3048006096 y_0=0 no_defs <> # 2900: new jersey ---: nad27 <2900> proj=tmerc datum=NAD27 lon_0=-74d40 lat_0=38d50 k=.999975 x_0=609601.2192024384 y_0=0 no_defs <> # 3001: new mexico east: nad27 <3001> proj=tmerc datum=NAD27 lon_0=-104d20 lat_0=31 k=.9999090909090909 x_0=152400.3048006096 y_0=0 no_defs <> # 3002: new mexico central: nad27 <3002> proj=tmerc datum=NAD27 lon_0=-106d15 lat_0=31 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 3003: new mexico west: nad27 <3003> proj=tmerc datum=NAD27 lon_0=-107d50 lat_0=31 k=.9999166666666667 x_0=152400.3048006096 y_0=0 no_defs <> # 3101: new york east: nad27 <3101> proj=tmerc datum=NAD27 lon_0=-74d20 lat_0=40 k=.9999666666666667 x_0=152400.3048006096 y_0=0 no_defs <> # 3102: new york central: nad27 <3102> proj=tmerc datum=NAD27 lon_0=-76d35 lat_0=40 k=.9999375 x_0=152400.3048006096 y_0=0 no_defs <> # 3103: new york west: nad27 <3103> proj=tmerc datum=NAD27 lon_0=-78d35 lat_0=40 k=.9999375 x_0=152400.3048006096 y_0=0 no_defs <> # 3104: new york long island: nad27 <3104> proj=lcc datum=NAD27 lon_0=-74 lat_1=41d2 lat_2=40d40 lat_0=40d30 x_0=609601.2192024384 y_0=30480.06096012192 no_defs <> # 3200: north carolina ---: nad27 <3200> proj=lcc datum=NAD27 lon_0=-79 lat_1=36d10 lat_2=34d20 lat_0=33d45 x_0=609601.2192024384 y_0=0 no_defs <> # 3301: north dakota north: nad27 <3301> proj=lcc datum=NAD27 lon_0=-100d30 lat_1=48d44 lat_2=47d26 lat_0=47 x_0=609601.2192024384 y_0=0 no_defs <> # 3302: north dakota south: nad27 <3302> proj=lcc datum=NAD27 lon_0=-100d30 lat_1=47d29 lat_2=46d11 lat_0=45d40 x_0=609601.2192024384 y_0=0 no_defs <> # 3401: ohio north: nad27 <3401> proj=lcc datum=NAD27 lon_0=-82d30 lat_1=41d42 lat_2=40d26 lat_0=39d40 x_0=609601.2192024384 y_0=0 no_defs <> # 3402: ohio south: nad27 <3402> proj=lcc datum=NAD27 lon_0=-82d30 lat_1=40d2 lat_2=38d44 lat_0=38 x_0=609601.2192024384 y_0=0 no_defs <> # 3501: oklahoma north: nad27 <3501> proj=lcc datum=NAD27 lon_0=-98 lat_1=36d46 lat_2=35d34 lat_0=35 x_0=609601.2192024384 y_0=0 no_defs <> # 3502: oklahoma south: nad27 <3502> proj=lcc datum=NAD27 lon_0=-98 lat_1=35d14 lat_2=33d56 lat_0=33d20 x_0=609601.2192024384 y_0=0 no_defs <> # 3601: oregon north: nad27 <3601> proj=lcc datum=NAD27 lon_0=-120d30 lat_1=46 lat_2=44d20 lat_0=43d40 x_0=609601.2192024384 y_0=0 no_defs <> # 3602: oregon south: nad27 <3602> proj=lcc datum=NAD27 lon_0=-120d30 lat_1=44 lat_2=42d20 lat_0=41d40 x_0=609601.2192024384 y_0=0 no_defs <> # 3701: pennsylvania north: nad27 <3701> proj=lcc datum=NAD27 lon_0=-77d45 lat_1=41d57 lat_2=40d53 lat_0=40d10 x_0=609601.2192024384 y_0=0 no_defs <> # 3702: pennsylvania south: nad27 <3702> proj=lcc datum=NAD27 lon_0=-77d45 lat_1=40d58 lat_2=39d56 lat_0=39d20 x_0=609601.2192024384 y_0=0 no_defs <> # 3800: rhode island ---: nad27 <3800> proj=tmerc datum=NAD27 lon_0=-71d30 lat_0=41d5 k=.99999375 x_0=152400.3048006096 y_0=0 no_defs <> # 3901: south carolina north: nad27 <3901> proj=lcc datum=NAD27 lon_0=-81 lat_1=34d58 lat_2=33d46 lat_0=33 x_0=609601.2192024384 y_0=0 no_defs <> # 3902: south carolina south: nad27 <3902> proj=lcc datum=NAD27 lon_0=-81 lat_1=33d40 lat_2=32d20 lat_0=31d50 x_0=609601.2192024384 y_0=0 no_defs <> # 4001: south dakota north: nad27 <4001> proj=lcc datum=NAD27 lon_0=-100 lat_1=45d41 lat_2=44d25 lat_0=43d50 x_0=609601.2192024384 y_0=0 no_defs <> # 4002: south dakota south: nad27 <4002> proj=lcc datum=NAD27 lon_0=-100d20 lat_1=44d24 lat_2=42d50 lat_0=42d20 x_0=609601.2192024384 y_0=0 no_defs <> # 4100: tennessee ---: nad27 <4100> proj=lcc datum=NAD27 lon_0=-86 lat_1=36d25 lat_2=35d15 lat_0=34d40 x_0=609601.2192024384 y_0=30480.06096012192 no_defs <> # 4201: texas north: nad27 <4201> proj=lcc datum=NAD27 lon_0=-101d30 lat_1=36d11 lat_2=34d39 lat_0=34 x_0=609601.2192024384 y_0=0 no_defs <> # 4202: texas north central: nad27 <4202> proj=lcc datum=NAD27 lon_0=-97d30 lat_1=33d58 lat_2=32d8 lat_0=31d40 x_0=609601.2192024384 y_0=0 no_defs <> # 4203: texas central: nad27 <4203> proj=lcc datum=NAD27 lon_0=-100d20 lat_1=31d53 lat_2=30d7 lat_0=29d40 x_0=609601.2192024384 y_0=0 no_defs <> # 4204: texas south central: nad27 <4204> proj=lcc datum=NAD27 lon_0=-99 lat_1=30d17 lat_2=28d23 lat_0=27d50 x_0=609601.2192024384 y_0=0 no_defs <> # 4205: texas south: nad27 <4205> proj=lcc datum=NAD27 lon_0=-98d30 lat_1=27d50 lat_2=26d10 lat_0=25d40 x_0=609601.2192024384 y_0=0 no_defs <> # 4301: utah north: nad27 <4301> proj=lcc datum=NAD27 lon_0=-111d30 lat_1=41d47 lat_2=40d43 lat_0=40d20 x_0=609601.2192024384 y_0=0 no_defs <> # 4302: utah central: nad27 <4302> proj=lcc datum=NAD27 lon_0=-111d30 lat_1=40d39 lat_2=39d1 lat_0=38d20 x_0=609601.2192024384 y_0=0 no_defs <> # 4303: utah south: nad27 <4303> proj=lcc datum=NAD27 lon_0=-111d30 lat_1=38d21 lat_2=37d13 lat_0=36d40 x_0=609601.2192024384 y_0=0 no_defs <> # 4400: vermont ---: nad27 <4400> proj=tmerc datum=NAD27 lon_0=-72d30 lat_0=42d30 k=.9999642857142857 x_0=152400.3048006096 y_0=0 no_defs <> # 4501: virginia north: nad27 <4501> proj=lcc datum=NAD27 lon_0=-78d30 lat_1=39d12 lat_2=38d2 lat_0=37d40 x_0=609601.2192024384 y_0=0 no_defs <> # 4502: virginia south: nad27 <4502> proj=lcc datum=NAD27 lon_0=-78d30 lat_1=37d58 lat_2=36d46 lat_0=36d20 x_0=609601.2192024384 y_0=0 no_defs <> # 4601: washington north: nad27 <4601> proj=lcc datum=NAD27 lon_0=-120d50 lat_1=48d44 lat_2=47d30 lat_0=47 x_0=609601.2192024384 y_0=0 no_defs <> # 4602: washington south: nad27 <4602> proj=lcc datum=NAD27 lon_0=-120d30 lat_1=47d20 lat_2=45d50 lat_0=45d20 x_0=609601.2192024384 y_0=0 no_defs <> # 4701: west virginia north: nad27 <4701> proj=lcc datum=NAD27 lon_0=-79d30 lat_1=40d15 lat_2=39 lat_0=38d30 x_0=609601.2192024384 y_0=0 no_defs <> # 4702: west virginia south: nad27 <4702> proj=lcc datum=NAD27 lon_0=-81 lat_1=38d53 lat_2=37d29 lat_0=37 x_0=609601.2192024384 y_0=0 no_defs <> # 4801: wisconsin north: nad27 <4801> proj=lcc datum=NAD27 lon_0=-90 lat_1=46d46 lat_2=45d34 lat_0=45d10 x_0=609601.2192024384 y_0=0 no_defs <> # 4802: wisconsin central: nad27 <4802> proj=lcc datum=NAD27 lon_0=-90 lat_1=45d30 lat_2=44d15 lat_0=43d50 x_0=609601.2192024384 y_0=0 no_defs <> # 4803: wisconsin south: nad27 <4803> proj=lcc datum=NAD27 lon_0=-90 lat_1=44d4 lat_2=42d44 lat_0=42 x_0=609601.2192024384 y_0=0 no_defs <> # 4901: wyoming east: nad27 <4901> proj=tmerc datum=NAD27 lon_0=-105d10 lat_0=40d40 k=.9999411764705882 x_0=152400.3048006096 y_0=0 no_defs <> # 4902: wyoming east central: nad27 <4902> proj=tmerc datum=NAD27 lon_0=-107d20 lat_0=40d40 k=.9999411764705882 x_0=152400.3048006096 y_0=0 no_defs <> # 4903: wyoming west central: nad27 <4903> proj=tmerc datum=NAD27 lon_0=-108d45 lat_0=40d40 k=.9999411764705882 x_0=152400.3048006096 y_0=0 no_defs <> # 4904: wyoming west: nad27 <4904> proj=tmerc datum=NAD27 lon_0=-110d5 lat_0=40d40 k=.9999411764705882 x_0=152400.3048006096 y_0=0 no_defs <> # 5001: alaska zone no. 1: nad27 <5001> proj=omerc datum=NAD27 k=.9999 lonc=-133d40 lat_0=57 alpha=-36d52'11.6315 x_0=818585.5672270928 y_0=575219.2451072642 no_defs <> # 5002: alaska zone no. 2: nad27 <5002> proj=tmerc datum=NAD27 lon_0=-142 lat_0=54 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 5003: alaska zone no. 3: nad27 <5003> proj=tmerc datum=NAD27 lon_0=-146 lat_0=54 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 5004: alaska zone no. 4: nad27 <5004> proj=tmerc datum=NAD27 lon_0=-150 lat_0=54 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 5005: alaska zone no. 5: nad27 <5005> proj=tmerc datum=NAD27 lon_0=-154 lat_0=54 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 5006: alaska zone no. 6: nad27 <5006> proj=tmerc datum=NAD27 lon_0=-158 lat_0=54 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 5007: alaska zone no. 7: nad27 <5007> proj=tmerc datum=NAD27 lon_0=-162 lat_0=54 k=.9999 x_0=213360.4267208534 y_0=0 no_defs <> # 5008: alaska zone no. 8: nad27 <5008> proj=tmerc datum=NAD27 lon_0=-166 lat_0=54 k=.9999 x_0=152400.3048006096 y_0=0 no_defs <> # 5009: alaska zone no. 9: nad27 <5009> proj=tmerc datum=NAD27 lon_0=-170 lat_0=54 k=.9999 x_0=182880.3657607315 y_0=0 no_defs <> # 5201: puerto rico and virgin islands: nad27 <5201> proj=lcc datum=NAD27 lon_0=-66d26 lat_1=18d26 lat_2=18d2 lat_0=17d50 x_0=152400.3048006096 y_0=0 no_defs <> # 5202: virgin islands st. croix: nad27 <5202> proj=lcc datum=NAD27 lon_0=-66d26 lat_1=18d26 lat_2=18d2 lat_0=17d50 x_0=152400.3048006096 y_0=30480.06096012192 no_defs <> # 5400: guam island: nad27 <5400> proj=poly datum=NAD27 x_0=50000 y_0=50000 lon_0=144d44'55.50254 lat_0=13d28'20.87887 no_defs <>
{ "pile_set_name": "Github" }
package org.junit.experimental.runners; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.List; import org.junit.runners.Suite; import org.junit.runners.model.RunnerBuilder; /** * If you put tests in inner classes, Ant, for example, won't find them. By running the outer class * with Enclosed, the tests in the inner classes will be run. You might put tests in inner classes * to group them for convenience or to share constants. Abstract inner classes are ignored. * <p> * So, for example: * <pre> * &#064;RunWith(Enclosed.class) * public class ListTests { * ...useful shared stuff... * public static class OneKindOfListTest {...} * public static class AnotherKind {...} * abstract public static class Ignored {...} * } * </pre> */ public class Enclosed extends Suite { /** * Only called reflectively. Do not use programmatically. */ public Enclosed(Class<?> klass, RunnerBuilder builder) throws Throwable { super(builder, klass, filterAbstractClasses(klass.getClasses())); } private static Class<?>[] filterAbstractClasses(final Class<?>[] classes) { final List<Class<?>> filteredList= new ArrayList<Class<?>>(classes.length); for (final Class<?> clazz : classes) { if (!Modifier.isAbstract(clazz.getModifiers())) { filteredList.add(clazz); } } return filteredList.toArray(new Class<?>[filteredList.size()]); } }
{ "pile_set_name": "Github" }
/* * DMG cracker patch for JtR. Hacked together during August of 2012 * by Dhiru Kholia <dhiru.kholia at gmail.com> * * This software is * Copyright (c) 2012, Dhiru Kholia <dhiru.kholia at gmail.com> * Copyright (c) 2015, magnum * and is based on "dmg.c" from * * hashkill - a hash cracking tool * Copyright (C) 2010 Milen Rangelov <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * References: * * http://lingrok.org/xref/syslinux/utils/isohybrid.c#apple_part_header * http://www.dubeyko.com/development/FileSystems/HFSPLUS/hexdumps/hfsplus_volume_header.html */ /* * Debug levels: * 1 show what "test" hits * 2 dump printables from the decrypted blocks * 3 dump hex from the decrypted blocks * 4 dump decrypted blocks to files (will overwrite with no mercy): * dmg.debug.main main block * dmg.debug alternate block (if present, this is the start block) */ //#define DMG_DEBUG 2 #if FMT_EXTERNS_H extern struct fmt_main fmt_dmg; #elif FMT_REGISTERS_H john_register_one(&fmt_dmg); #else #if AC_BUILT #include "autoconfig.h" #endif #include <string.h> #include <errno.h> #include <fcntl.h> #include <stdlib.h> #include <stdint.h> #include <sys/types.h> #include <openssl/des.h> #ifdef DMG_DEBUG #include <sys/file.h> #if (!AC_BUILT || HAVE_UNISTD_H) && !_MSC_VER #include <unistd.h> #endif #endif #ifdef _OPENMP #include <omp.h> #endif #include "arch.h" #include "aes.h" #include "hmac_sha.h" #include "jumbo.h" #include "params.h" #include "johnswap.h" #include "common.h" #include "formats.h" #include "dmg_common.h" #include "pbkdf2_hmac_sha1.h" #include "loader.h" #include "logger.h" #define FORMAT_LABEL "dmg" #define FORMAT_NAME "Apple DMG" #define FORMAT_TAG "$dmg$" #define FORMAT_TAG_LEN (sizeof(FORMAT_TAG)-1) #ifdef SIMD_COEF_32 #define ALGORITHM_NAME "PBKDF2-SHA1 " SHA1_ALGORITHM_NAME " 3DES/AES" #else #define ALGORITHM_NAME "PBKDF2-SHA1 3DES/AES 32/" ARCH_BITS_STR #endif #define BENCHMARK_COMMENT "" #define BENCHMARK_LENGTH 0x107 #define BINARY_SIZE 0 #define PLAINTEXT_LENGTH 125 #define SALT_SIZE sizeof(struct custom_salt) #define BINARY_ALIGN 1 #define SALT_ALIGN sizeof(int) #ifdef SIMD_COEF_32 #define MIN_KEYS_PER_CRYPT SSE_GROUP_SZ_SHA1 #define MAX_KEYS_PER_CRYPT SSE_GROUP_SZ_SHA1 #else #define MIN_KEYS_PER_CRYPT 1 #define MAX_KEYS_PER_CRYPT 1 #endif #ifndef OMP_SCALE #define OMP_SCALE 1 // MKPC and scale tuned for i7 #endif #undef HTONL #define HTONL(n) (((((unsigned long)(n) & 0xFF)) << 24) | \ ((((unsigned long)(n) & 0xFF00)) << 8) | \ ((((unsigned long)(n) & 0xFF0000)) >> 8) | \ ((((unsigned long)(n) & 0xFF000000)) >> 24)) static char (*saved_key)[PLAINTEXT_LENGTH + 1]; static int *cracked, cracked_count; static struct custom_salt { unsigned int saltlen; unsigned char salt[20]; unsigned int ivlen; unsigned char iv[32]; int headerver; unsigned char chunk[8192]; uint32_t encrypted_keyblob_size; uint8_t encrypted_keyblob[128]; unsigned int len_wrapped_aes_key; unsigned char wrapped_aes_key[296]; unsigned int len_hmac_sha1_key; unsigned char wrapped_hmac_sha1_key[300]; char scp; /* start chunk present */ unsigned char zchunk[4096]; /* chunk #0 */ int cno; int data_size; unsigned int iterations; } *cur_salt; static void init(struct fmt_main *self) { omp_autotune(self, OMP_SCALE); saved_key = mem_calloc_align(sizeof(*saved_key), self->params.max_keys_per_crypt, MEM_ALIGN_WORD); cracked = mem_calloc_align(sizeof(*cracked), self->params.max_keys_per_crypt, MEM_ALIGN_WORD); cracked_count = self->params.max_keys_per_crypt; } static void done(void) { MEM_FREE(cracked); MEM_FREE(saved_key); } static int valid(char *ciphertext, struct fmt_main *self) { char *ctcopy, *keeptr; char *p; int headerver; int res, extra; if (strncmp(ciphertext, FORMAT_TAG, FORMAT_TAG_LEN) != 0) return 0; ctcopy = strdup(ciphertext); keeptr = ctcopy; ctcopy += FORMAT_TAG_LEN; /* skip over "$dmg$" marker */ if ((p = strtokm(ctcopy, "*")) == NULL) goto err; headerver = atoi(p); if (headerver == 2) { if ((p = strtokm(NULL, "*")) == NULL) /* salt len */ goto err; if (!isdec(p)) goto err; res = atoi(p); if (res > 20) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* salt */ goto err; if (hexlenl(p, &extra) / 2 != res || extra) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* ivlen */ goto err; if (!isdec(p)) goto err; res = atoi(p); if (atoi(p) > 32) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* iv */ goto err; if (hexlenl(p, &extra) / 2 != res || extra) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* encrypted_keyblob_size */ goto err; if (!isdec(p)) goto err; res = atoi(p); if (res > 128) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* encrypted keyblob */ goto err; if (hexlenl(p, &extra) / 2 != res || extra) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* chunk number */ goto err; if ((p = strtokm(NULL, "*")) == NULL) /* data_size */ goto err; if (!isdec(p)) goto err; res = atoi(p); if ((p = strtokm(NULL, "*")) == NULL) /* chunk */ goto err; if (hexlenl(p, &extra) / 2 != res || extra) goto err; if (res > 8192) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* scp */ goto err; if (!isdec(p)) goto err; res = atoi(p); /* FIXME: which values are allowed here? */ if (res == 1) { if ((p = strtokm(NULL, "*")) == NULL) /* zchunk */ goto err; if (strlen(p) != 4096 * 2) goto err; } } else if (headerver == 1) { if ((p = strtokm(NULL, "*")) == NULL) /* salt len */ goto err; if (!isdec(p)) goto err; res = atoi(p); if (res > 20) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* salt */ goto err; if (hexlenl(p, &extra) / 2 != res || extra) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* len_wrapped_aes_key */ goto err; if (!isdec(p)) goto err; res = atoi(p); if (res > 296) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* wrapped_aes_key */ goto err; if (hexlenl(p, &extra) / 2 != res || extra) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* len_hmac_sha1_key */ goto err; if (!isdec(p)) goto err; res = atoi(p); if (res > 300) goto err; if ((p = strtokm(NULL, "*")) == NULL) /* hmac_sha1_key */ goto err; if (strlen(p) / 2 != res) goto err; } else goto err; MEM_FREE(keeptr); return 1; err: MEM_FREE(keeptr); return 0; } static void *get_salt(char *ciphertext) { char *ctcopy = strdup(ciphertext); char *keeptr = ctcopy; int i; char *p; static struct custom_salt cs; memset(&cs, 0, sizeof(cs)); ctcopy += FORMAT_TAG_LEN; p = strtokm(ctcopy, "*"); cs.headerver = atoi(p); if (cs.headerver == 2) { p = strtokm(NULL, "*"); cs.saltlen = atoi(p); p = strtokm(NULL, "*"); for (i = 0; i < cs.saltlen; i++) cs.salt[i] = atoi16[ARCH_INDEX(p[i * 2])] * 16 + atoi16[ARCH_INDEX(p[i * 2 + 1])]; p = strtokm(NULL, "*"); cs.ivlen = atoi(p); p = strtokm(NULL, "*"); for (i = 0; i < cs.ivlen; i++) cs.iv[i] = atoi16[ARCH_INDEX(p[i * 2])] * 16 + atoi16[ARCH_INDEX(p[i * 2 + 1])]; p = strtokm(NULL, "*"); cs.encrypted_keyblob_size = atoi(p); p = strtokm(NULL, "*"); for (i = 0; i < cs.encrypted_keyblob_size; i++) cs.encrypted_keyblob[i] = atoi16[ARCH_INDEX(p[i * 2])] * 16 + atoi16[ARCH_INDEX(p[i * 2 + 1])]; p = strtokm(NULL, "*"); cs.cno = atoi(p); p = strtokm(NULL, "*"); cs.data_size = atoi(p); p = strtokm(NULL, "*"); for (i = 0; i < cs.data_size; i++) cs.chunk[i] = atoi16[ARCH_INDEX(p[i * 2])] * 16 + atoi16[ARCH_INDEX(p[i * 2 + 1])]; p = strtokm(NULL, "*"); cs.scp = atoi(p); if (cs.scp == 1) { p = strtokm(NULL, "*"); for (i = 0; i < 4096; i++) cs.zchunk[i] = atoi16[ARCH_INDEX(p[i * 2])] * 16 + atoi16[ARCH_INDEX(p[i * 2 + 1])]; } if ((p = strtokm(NULL, "*"))) cs.iterations = atoi(p); else cs.iterations = 1000; } else { p = strtokm(NULL, "*"); cs.saltlen = atoi(p); p = strtokm(NULL, "*"); for (i = 0; i < cs.saltlen; i++) cs.salt[i] = atoi16[ARCH_INDEX(p[i * 2])] * 16 + atoi16[ARCH_INDEX(p[i * 2 + 1])]; p = strtokm(NULL, "*"); cs.len_wrapped_aes_key = atoi(p); p = strtokm(NULL, "*"); for (i = 0; i < cs.len_wrapped_aes_key; i++) cs.wrapped_aes_key[i] = atoi16[ARCH_INDEX(p[i * 2])] * 16 + atoi16[ARCH_INDEX(p[i * 2 + 1])]; p = strtokm(NULL, "*"); cs.len_hmac_sha1_key = atoi(p); p = strtokm(NULL, "*"); for (i = 0; i < cs.len_hmac_sha1_key; i++) cs.wrapped_hmac_sha1_key[i] = atoi16[ARCH_INDEX(p[i * 2])] * 16 + atoi16[ARCH_INDEX(p[i * 2 + 1])]; if ((p = strtokm(NULL, "*"))) cs.iterations = atoi(p); else cs.iterations = 1000; } if (cs.iterations == 0) cs.iterations = 1000; MEM_FREE(keeptr); return (void *)&cs; } static int apple_des3_ede_unwrap_key1(const unsigned char *wrapped_key, const int wrapped_key_len, const unsigned char *decryptKey) { DES_key_schedule ks1, ks2, ks3; unsigned char TEMP1[sizeof(cur_salt->wrapped_hmac_sha1_key)]; unsigned char TEMP2[sizeof(cur_salt->wrapped_hmac_sha1_key)]; unsigned char IV[8] = { 0x4a, 0xdd, 0xa2, 0x2c, 0x79, 0xe8, 0x21, 0x05 }; int outlen, i; DES_set_key((DES_cblock*)(decryptKey + 0), &ks1); DES_set_key((DES_cblock*)(decryptKey + 8), &ks2); DES_set_key((DES_cblock*)(decryptKey + 16), &ks3); DES_ede3_cbc_encrypt(wrapped_key, TEMP1, wrapped_key_len, &ks1, &ks2, &ks3, (DES_cblock*)IV, DES_DECRYPT); outlen = check_pkcs_pad(TEMP1, wrapped_key_len, 8); if (outlen < 0) return 0; for (i = 0; i < outlen; i++) TEMP2[i] = TEMP1[outlen - i - 1]; outlen -= 8; DES_ede3_cbc_encrypt(TEMP2 + 8, TEMP1, outlen, &ks1, &ks2, &ks3, (DES_cblock*)TEMP2, DES_DECRYPT); outlen = check_pkcs_pad(TEMP1, outlen, 8); if (outlen < 0) return 0; return 1; } static void hash_plugin_check_hash(int index) { unsigned char hmacsha1_key_[20]; unsigned char aes_key_[32]; int j; if (cur_salt->headerver == 1) { #ifdef SIMD_COEF_32 unsigned char *derived_key, Derived_key[SSE_GROUP_SZ_SHA1][32]; int lens[SSE_GROUP_SZ_SHA1], i; unsigned char *pin[SSE_GROUP_SZ_SHA1]; union { uint32_t *pout[SSE_GROUP_SZ_SHA1]; unsigned char *poutc; } x; for (i = 0; i < SSE_GROUP_SZ_SHA1; ++i) { lens[i] = strlen(saved_key[index+i]); pin[i] = (unsigned char*)saved_key[index+i]; x.pout[i] = (uint32_t*)(Derived_key[i]); } pbkdf2_sha1_sse((const unsigned char **)pin, lens, cur_salt->salt, 20, cur_salt->iterations, &(x.poutc), 32, 0); #else unsigned char derived_key[32]; const char *password = saved_key[index]; pbkdf2_sha1((const unsigned char*)password, strlen(password), cur_salt->salt, 20, cur_salt->iterations, derived_key, 32, 0); #endif j = 0; #ifdef SIMD_COEF_32 for (j = 0; j < SSE_GROUP_SZ_SHA1; ++j) { derived_key = Derived_key[j]; #endif if (apple_des3_ede_unwrap_key1(cur_salt->wrapped_aes_key, cur_salt->len_wrapped_aes_key, derived_key) && apple_des3_ede_unwrap_key1(cur_salt->wrapped_hmac_sha1_key, cur_salt->len_hmac_sha1_key, derived_key)) { cracked[index+j] = 1; } #ifdef SIMD_COEF_32 } #endif } else { DES_key_schedule ks1, ks2, ks3; unsigned char TEMP1[sizeof(cur_salt->wrapped_hmac_sha1_key)]; AES_KEY aes_decrypt_key; unsigned char outbuf[8192 + 1]; unsigned char outbuf2[4096 + 1]; unsigned char iv[20]; #ifdef DMG_DEBUG unsigned char *r; #endif const char nulls[8] = { 0 }; #ifdef SIMD_COEF_32 unsigned char *derived_key, Derived_key[SSE_GROUP_SZ_SHA1][32]; int lens[SSE_GROUP_SZ_SHA1], i; unsigned char *pin[SSE_GROUP_SZ_SHA1]; union { uint32_t *pout[SSE_GROUP_SZ_SHA1]; unsigned char *poutc; } x; for (i = 0; i < SSE_GROUP_SZ_SHA1; ++i) { lens[i] = strlen(saved_key[index+i]); pin[i] = (unsigned char*)saved_key[index+i]; x.pout[i] = (uint32_t*)(Derived_key[i]); } pbkdf2_sha1_sse((const unsigned char **)pin, lens, cur_salt->salt, 20, cur_salt->iterations, &(x.poutc), 32, 0); #else unsigned char derived_key[32]; const char *password = saved_key[index]; pbkdf2_sha1((const unsigned char*)password, strlen(password), cur_salt->salt, 20, cur_salt->iterations, derived_key, 32, 0); #endif j = 0; #ifdef SIMD_COEF_32 for (j = 0; j < SSE_GROUP_SZ_SHA1; ++j) { derived_key = Derived_key[j]; #endif DES_set_key((DES_cblock*)(derived_key + 0), &ks1); DES_set_key((DES_cblock*)(derived_key + 8), &ks2); DES_set_key((DES_cblock*)(derived_key + 16), &ks3); memcpy(iv, cur_salt->iv, 8); DES_ede3_cbc_encrypt(cur_salt->encrypted_keyblob, TEMP1, cur_salt->encrypted_keyblob_size, &ks1, &ks2, &ks3, (DES_cblock*)iv, DES_DECRYPT); memcpy(aes_key_, TEMP1, 32); memcpy(hmacsha1_key_, TEMP1, 20); hmac_sha1(hmacsha1_key_, 20, (unsigned char*)&cur_salt->cno, 4, iv, 20); if (cur_salt->encrypted_keyblob_size == 48) AES_set_decrypt_key(aes_key_, 128, &aes_decrypt_key); else AES_set_decrypt_key(aes_key_, 128 * 2, &aes_decrypt_key); AES_cbc_encrypt(cur_salt->chunk, outbuf, cur_salt->data_size, &aes_decrypt_key, iv, AES_DECRYPT); /* 8 consecutive nulls */ if (memmem(outbuf, cur_salt->data_size, (void*)nulls, 8)) { #ifdef DMG_DEBUG if (!bench_or_test_running) fprintf(stderr, "NULLS found!\n\n"); #endif cracked[index+j] = 1; } /* These tests seem to be obsoleted by the 8xNULL test */ #ifdef DMG_DEBUG /* </plist> is a pretty generic signature for Apple */ if (!cracked[index+j] && memmem(outbuf, cur_salt->data_size, (void*)"</plist>", 8)) { if (!bench_or_test_running) fprintf(stderr, "</plist> found!\n\n"); cracked[index+j] = 1; } /* Journalled HFS+ */ if (!cracked[index+j] && memmem(outbuf, cur_salt->data_size, (void*)"jrnlhfs+", 8)) { if (!bench_or_test_running) fprintf(stderr, "jrnlhfs+ found!\n\n"); cracked[index+j] = 1; } /* Handle compressed DMG files, CMIYC 2012 and self-made samples. Is this test obsoleted by the </plist> one? */ if (!cracked[index+j] && (r = memmem(outbuf, cur_salt->data_size, (void*)"koly", 4))) { unsigned int *u32Version = (unsigned int *)(r + 4); if (HTONL(*u32Version) == 4) { if (!bench_or_test_running) fprintf(stderr, "koly found!\n\n"); cracked[index+j] = 1; } } /* Handle VileFault sample images */ if (!cracked[index+j] && memmem(outbuf, cur_salt->data_size, (void*)"EFI PART", 8)) { if (!bench_or_test_running) fprintf(stderr, "EFI PART found!\n\n"); cracked[index+j] = 1; } /* Apple is a good indication but it's short enough to produce false positives */ if (!cracked[index+j] && memmem(outbuf, cur_salt->data_size, (void*)"Apple", 5)) { if (!bench_or_test_running) fprintf(stderr, "Apple found!\n\n"); cracked[index+j] = 1; } #endif /* DMG_DEBUG */ /* Second buffer test. If present, *this* is the very first block of the DMG */ if (!cracked[index+j] && cur_salt->scp == 1) { int cno = 0; hmac_sha1(hmacsha1_key_, 20, (unsigned char*)&cno, 4, iv, 20); if (cur_salt->encrypted_keyblob_size == 48) AES_set_decrypt_key(aes_key_, 128, &aes_decrypt_key); else AES_set_decrypt_key(aes_key_, 128 * 2, &aes_decrypt_key); AES_cbc_encrypt(cur_salt->zchunk, outbuf2, 4096, &aes_decrypt_key, iv, AES_DECRYPT); /* 8 consecutive nulls */ if (memmem(outbuf2, 4096, (void*)nulls, 8)) { #ifdef DMG_DEBUG if (!bench_or_test_running) fprintf(stderr, "NULLS found in alternate block!\n\n"); #endif cracked[index+j] = 1; } #ifdef DMG_DEBUG /* This test seem to be obsoleted by the 8xNULL test */ if (!cracked[index+j] && memmem(outbuf2, 4096, (void*)"Press any key to reboot", 23)) { if (!bench_or_test_running) fprintf(stderr, "MS-DOS UDRW signature found in alternate block!\n\n"); cracked[index+j] = 1; } #endif /* DMG_DEBUG */ } #ifdef DMG_DEBUG /* Write block as hex, strings or raw to a file. */ if (cracked[index+j] && !bench_or_test_running) { #if DMG_DEBUG == 4 const char debug_file = "dmg.debug.main"; int fd; if ((fd = open(debug_file, O_RDWR | O_CREAT | O_TRUNC, 0660)) == -1) perror("open(%s)", debug_file); else jtr_lock(fd, F_SETLKW, F_WRLCK, debug_file); if ((write(fd, outbuf, cur_salt->data_size) == -1)) perror("write()"); if (cur_salt->scp == 1) if ((write(fd, outbuf2, 4096) == -1)) perror("write()"); if (close(fd)) perror("close"); #endif #if DMG_DEBUG == 3 dump_stuff(outbuf, cur_salt->data_size); if (cur_salt->scp == 1) { fprintf(stderr, "2nd block:\n"); dump_stuff(outbuf2, 4096); } #endif #if DMG_DEBUG == 2 dump_text(outbuf, cur_salt->data_size); if (cur_salt->scp == 1) { fprintf(stderr, "2nd block:\n"); dump_text(outbuf2, 4096); } #endif } #endif /* DMG_DEBUG */ #ifdef SIMD_COEF_32 } #endif } return; } static void set_salt(void *salt) { cur_salt = (struct custom_salt *)salt; #ifdef DMG_DEBUG //fprintf(stderr, "Blob size is %d bytes\n", cur_salt->data_size); #endif } static void dmg_set_key(char *key, int index) { strnzcpy(saved_key[index], key, sizeof(*saved_key)); } static char *get_key(int index) { return saved_key[index]; } static int crypt_all(int *pcount, struct db_salt *salt) { const int count = *pcount; int index; memset(cracked, 0, sizeof(cracked[0])*cracked_count); #ifdef _OPENMP #pragma omp parallel for #endif for (index = 0; index < count; index += MAX_KEYS_PER_CRYPT) { hash_plugin_check_hash(index); } return count; } static int cmp_all(void *binary, int count) { int index; for (index = 0; index < count; index++) if (cracked[index]) return 1; return 0; } static int cmp_one(void *binary, int index) { return cracked[index]; } static int cmp_exact(char *source, int index) { return 1; } static unsigned int iteration_count(void *salt) { struct custom_salt *my_salt; my_salt = salt; return (unsigned int) my_salt->iterations; } static unsigned int headerver(void *salt) { struct custom_salt *my_salt; my_salt = salt; return (unsigned int) my_salt->headerver; } struct fmt_main fmt_dmg = { { FORMAT_LABEL, FORMAT_NAME, ALGORITHM_NAME, BENCHMARK_COMMENT, BENCHMARK_LENGTH, 0, PLAINTEXT_LENGTH, BINARY_SIZE, BINARY_ALIGN, SALT_SIZE, SALT_ALIGN, MIN_KEYS_PER_CRYPT, MAX_KEYS_PER_CRYPT, #ifdef DMG_DEBUG FMT_NOT_EXACT | #endif FMT_CASE | FMT_8_BIT | FMT_OMP | FMT_HUGE_INPUT, { "iteration count", "version", }, { FORMAT_TAG }, dmg_tests }, { init, done, fmt_default_reset, fmt_default_prepare, valid, fmt_default_split, fmt_default_binary, get_salt, { iteration_count, headerver, }, fmt_default_source, { fmt_default_binary_hash }, fmt_default_salt_hash, NULL, set_salt, dmg_set_key, get_key, fmt_default_clear_keys, crypt_all, { fmt_default_get_hash }, cmp_all, cmp_one, cmp_exact } }; #endif /* plugin stanza */
{ "pile_set_name": "Github" }
#pragma once #include "resource.h" #include <bzscore/string.h> int RunSelfElevated(LPCTSTR lpCmdLine = GetCommandLine()); class CUACInvokerDialog : public CDialogImpl<CUACInvokerDialog> { private: BazisLib::String m_CmdLine; public: CUACInvokerDialog(BazisLib::String cmdLine) : m_CmdLine(cmdLine) { } public: enum { IDD = IDD_EMPTY }; BEGIN_MSG_MAP(CUACInvokerDialog) MESSAGE_HANDLER(WM_SHOWWINDOW, OnShowWindow) END_MSG_MAP() public: // Handler prototypes (uncomment arguments if needed): // LRESULT MessageHandler(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) // LRESULT CommandHandler(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) // LRESULT NotifyHandler(int /*idCtrl*/, LPNMHDR /*pnmh*/, BOOL& /*bHandled*/) LRESULT OnShowWindow(UINT /*uMsg*/, WPARAM wParam, LPARAM /*lParam*/, BOOL& bHandled) { BringWindowToTop(); SetForegroundWindow(m_hWnd); EndDialog(RunSelfElevated(m_CmdLine.c_str())); return 0; } };
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_35) on Tue Oct 16 22:49:40 ICT 2012 --> <TITLE> BlockViewport (Apache FOP 1.1 API) </TITLE> <META NAME="date" CONTENT="2012-10-16"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="BlockViewport (Apache FOP 1.1 API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BlockViewport.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> fop 1.1</EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../org/apache/fop/area/BlockParent.html" title="class in org.apache.fop.area"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../org/apache/fop/area/BodyRegion.html" title="class in org.apache.fop.area"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/apache/fop/area/BlockViewport.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="BlockViewport.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.fop.area.Block">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.apache.fop.area</FONT> <BR> Class BlockViewport</H2> <PRE> java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/apache/fop/area/AreaTreeObject.html" title="class in org.apache.fop.area">org.apache.fop.area.AreaTreeObject</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/apache/fop/area/Area.html" title="class in org.apache.fop.area">org.apache.fop.area.Area</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/apache/fop/area/BlockParent.html" title="class in org.apache.fop.area">org.apache.fop.area.BlockParent</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../org/apache/fop/area/Block.html" title="class in org.apache.fop.area">org.apache.fop.area.Block</A> <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.fop.area.BlockViewport</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Cloneable, <A HREF="../../../../org/apache/fop/area/Viewport.html" title="interface in org.apache.fop.area">Viewport</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>BlockViewport</B><DT>extends <A HREF="../../../../org/apache/fop/area/Block.html" title="class in org.apache.fop.area">Block</A><DT>implements <A HREF="../../../../org/apache/fop/area/Viewport.html" title="interface in org.apache.fop.area">Viewport</A></DL> </PRE> <P> A BlockViewport. This is used for block level Viewport/reference pairs. The block-container creates this area. <P> <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#org.apache.fop.area.BlockViewport">Serialized Form</A></DL> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> </TABLE> &nbsp;<A NAME="fields_inherited_from_class_org.apache.fop.area.Block"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class org.apache.fop.area.<A HREF="../../../../org/apache/fop/area/Block.html" title="class in org.apache.fop.area">Block</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../org/apache/fop/area/Block.html#ABSOLUTE">ABSOLUTE</A>, <A HREF="../../../../org/apache/fop/area/Block.html#allowBPDUpdate">allowBPDUpdate</A>, <A HREF="../../../../org/apache/fop/area/Block.html#FIXED">FIXED</A>, <A HREF="../../../../org/apache/fop/area/Block.html#RELATIVE">RELATIVE</A>, <A HREF="../../../../org/apache/fop/area/Block.html#STACK">STACK</A></CODE></TD> </TR> </TABLE> &nbsp;<A NAME="fields_inherited_from_class_org.apache.fop.area.BlockParent"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class org.apache.fop.area.<A HREF="../../../../org/apache/fop/area/BlockParent.html" title="class in org.apache.fop.area">BlockParent</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../org/apache/fop/area/BlockParent.html#children">children</A>, <A HREF="../../../../org/apache/fop/area/BlockParent.html#xOffset">xOffset</A>, <A HREF="../../../../org/apache/fop/area/BlockParent.html#yOffset">yOffset</A></CODE></TD> </TR> </TABLE> &nbsp;<A NAME="fields_inherited_from_class_org.apache.fop.area.Area"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class org.apache.fop.area.<A HREF="../../../../org/apache/fop/area/Area.html" title="class in org.apache.fop.area">Area</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../org/apache/fop/area/Area.html#bidiLevel">bidiLevel</A>, <A HREF="../../../../org/apache/fop/area/Area.html#bpd">bpd</A>, <A HREF="../../../../org/apache/fop/area/Area.html#CLASS_ABSOLUTE">CLASS_ABSOLUTE</A>, <A HREF="../../../../org/apache/fop/area/Area.html#CLASS_BEFORE_FLOAT">CLASS_BEFORE_FLOAT</A>, <A HREF="../../../../org/apache/fop/area/Area.html#CLASS_FIXED">CLASS_FIXED</A>, <A HREF="../../../../org/apache/fop/area/Area.html#CLASS_FOOTNOTE">CLASS_FOOTNOTE</A>, <A HREF="../../../../org/apache/fop/area/Area.html#CLASS_MAX">CLASS_MAX</A>, <A HREF="../../../../org/apache/fop/area/Area.html#CLASS_NORMAL">CLASS_NORMAL</A>, <A HREF="../../../../org/apache/fop/area/Area.html#CLASS_SIDE_FLOAT">CLASS_SIDE_FLOAT</A>, <A HREF="../../../../org/apache/fop/area/Area.html#ipd">ipd</A>, <A HREF="../../../../org/apache/fop/area/Area.html#log">log</A>, <A HREF="../../../../org/apache/fop/area/Area.html#ORIENT_0">ORIENT_0</A>, <A HREF="../../../../org/apache/fop/area/Area.html#ORIENT_180">ORIENT_180</A>, <A HREF="../../../../org/apache/fop/area/Area.html#ORIENT_270">ORIENT_270</A>, <A HREF="../../../../org/apache/fop/area/Area.html#ORIENT_90">ORIENT_90</A>, <A HREF="../../../../org/apache/fop/area/Area.html#traits">traits</A></CODE></TD> </TR> </TABLE> &nbsp;<A NAME="fields_inherited_from_class_org.apache.fop.area.AreaTreeObject"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from class org.apache.fop.area.<A HREF="../../../../org/apache/fop/area/AreaTreeObject.html" title="class in org.apache.fop.area">AreaTreeObject</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../org/apache/fop/area/AreaTreeObject.html#extensionAttachments">extensionAttachments</A>, <A HREF="../../../../org/apache/fop/area/AreaTreeObject.html#foreignAttributes">foreignAttributes</A></CODE></TD> </TR> </TABLE> &nbsp; <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../org/apache/fop/area/BlockViewport.html#BlockViewport()">BlockViewport</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new block viewport area.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../org/apache/fop/area/BlockViewport.html#BlockViewport(boolean)">BlockViewport</A></B>(boolean&nbsp;allowBPDUpdate)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a new block viewport area.</TD> </TR> </TABLE> &nbsp; <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.awt.Rectangle</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/fop/area/BlockViewport.html#getClipRectangle()">getClipRectangle</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the clipping rectangle of this viewport area.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;<A HREF="../../../../org/apache/fop/area/CTM.html" title="class in org.apache.fop.area">CTM</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/fop/area/BlockViewport.html#getCTM()">getCTM</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the transform of this block viewport.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/fop/area/BlockViewport.html#hasClip()">hasClip</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if this area will clip overflowing content.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/fop/area/BlockViewport.html#setClip(boolean)">setClip</A></B>(boolean&nbsp;cl)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the clipping for this viewport.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/fop/area/BlockViewport.html#setCTM(org.apache.fop.area.CTM)">setCTM</A></B>(<A HREF="../../../../org/apache/fop/area/CTM.html" title="class in org.apache.fop.area">CTM</A>&nbsp;ctm)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the transform of this viewport.</TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_org.apache.fop.area.Block"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.apache.fop.area.<A HREF="../../../../org/apache/fop/area/Block.html" title="class in org.apache.fop.area">Block</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../org/apache/fop/area/Block.html#addBlock(org.apache.fop.area.Block)">addBlock</A>, <A HREF="../../../../org/apache/fop/area/Block.html#addBlock(org.apache.fop.area.Block, boolean)">addBlock</A>, <A HREF="../../../../org/apache/fop/area/Block.html#addLineArea(org.apache.fop.area.LineArea)">addLineArea</A>, <A HREF="../../../../org/apache/fop/area/Block.html#getEndIndent()">getEndIndent</A>, <A HREF="../../../../org/apache/fop/area/Block.html#getPositioning()">getPositioning</A>, <A HREF="../../../../org/apache/fop/area/Block.html#getStartIndent()">getStartIndent</A>, <A HREF="../../../../org/apache/fop/area/Block.html#isStacked()">isStacked</A>, <A HREF="../../../../org/apache/fop/area/Block.html#setPositioning(int)">setPositioning</A></CODE></TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_org.apache.fop.area.BlockParent"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.apache.fop.area.<A HREF="../../../../org/apache/fop/area/BlockParent.html" title="class in org.apache.fop.area">BlockParent</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../org/apache/fop/area/BlockParent.html#addChildArea(org.apache.fop.area.Area)">addChildArea</A>, <A HREF="../../../../org/apache/fop/area/BlockParent.html#getChildAreas()">getChildAreas</A>, <A HREF="../../../../org/apache/fop/area/BlockParent.html#getXOffset()">getXOffset</A>, <A HREF="../../../../org/apache/fop/area/BlockParent.html#getYOffset()">getYOffset</A>, <A HREF="../../../../org/apache/fop/area/BlockParent.html#isEmpty()">isEmpty</A>, <A HREF="../../../../org/apache/fop/area/BlockParent.html#setXOffset(int)">setXOffset</A>, <A HREF="../../../../org/apache/fop/area/BlockParent.html#setYOffset(int)">setYOffset</A></CODE></TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_org.apache.fop.area.Area"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.apache.fop.area.<A HREF="../../../../org/apache/fop/area/Area.html" title="class in org.apache.fop.area">Area</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../org/apache/fop/area/Area.html#addTrait(java.lang.Integer, java.lang.Object)">addTrait</A>, <A HREF="../../../../org/apache/fop/area/Area.html#clone()">clone</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getAllocBPD()">getAllocBPD</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getAllocIPD()">getAllocIPD</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getAreaClass()">getAreaClass</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getBidiLevel()">getBidiLevel</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getBorderAndPaddingWidthAfter()">getBorderAndPaddingWidthAfter</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getBorderAndPaddingWidthBefore()">getBorderAndPaddingWidthBefore</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getBorderAndPaddingWidthEnd()">getBorderAndPaddingWidthEnd</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getBorderAndPaddingWidthStart()">getBorderAndPaddingWidthStart</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getBPD()">getBPD</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getIPD()">getIPD</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getSpaceAfter()">getSpaceAfter</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getSpaceBefore()">getSpaceBefore</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getSpaceEnd()">getSpaceEnd</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getSpaceStart()">getSpaceStart</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getTrait(java.lang.Integer)">getTrait</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getTraitAsBoolean(java.lang.Integer)">getTraitAsBoolean</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getTraitAsInteger(java.lang.Integer)">getTraitAsInteger</A>, <A HREF="../../../../org/apache/fop/area/Area.html#getTraits()">getTraits</A>, <A HREF="../../../../org/apache/fop/area/Area.html#hasTrait(java.lang.Integer)">hasTrait</A>, <A HREF="../../../../org/apache/fop/area/Area.html#hasTraits()">hasTraits</A>, <A HREF="../../../../org/apache/fop/area/Area.html#resetBidiLevel()">resetBidiLevel</A>, <A HREF="../../../../org/apache/fop/area/Area.html#setAreaClass(int)">setAreaClass</A>, <A HREF="../../../../org/apache/fop/area/Area.html#setBidiLevel(int)">setBidiLevel</A>, <A HREF="../../../../org/apache/fop/area/Area.html#setBPD(int)">setBPD</A>, <A HREF="../../../../org/apache/fop/area/Area.html#setIPD(int)">setIPD</A>, <A HREF="../../../../org/apache/fop/area/Area.html#setTraits(java.util.Map)">setTraits</A>, <A HREF="../../../../org/apache/fop/area/Area.html#setWritingModeTraits(org.apache.fop.traits.WritingModeTraitsGetter)">setWritingModeTraits</A>, <A HREF="../../../../org/apache/fop/area/Area.html#toString()">toString</A></CODE></TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_org.apache.fop.area.AreaTreeObject"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class org.apache.fop.area.<A HREF="../../../../org/apache/fop/area/AreaTreeObject.html" title="class in org.apache.fop.area">AreaTreeObject</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../org/apache/fop/area/AreaTreeObject.html#addExtensionAttachment(org.apache.fop.fo.extensions.ExtensionAttachment)">addExtensionAttachment</A>, <A HREF="../../../../org/apache/fop/area/AreaTreeObject.html#getExtensionAttachments()">getExtensionAttachments</A>, <A HREF="../../../../org/apache/fop/area/AreaTreeObject.html#getForeignAttributes()">getForeignAttributes</A>, <A HREF="../../../../org/apache/fop/area/AreaTreeObject.html#getForeignAttributeValue(org.apache.xmlgraphics.util.QName)">getForeignAttributeValue</A>, <A HREF="../../../../org/apache/fop/area/AreaTreeObject.html#hasExtensionAttachments()">hasExtensionAttachments</A>, <A HREF="../../../../org/apache/fop/area/AreaTreeObject.html#setExtensionAttachments(java.util.List)">setExtensionAttachments</A>, <A HREF="../../../../org/apache/fop/area/AreaTreeObject.html#setForeignAttribute(org.apache.xmlgraphics.util.QName, java.lang.String)">setForeignAttribute</A>, <A HREF="../../../../org/apache/fop/area/AreaTreeObject.html#setForeignAttributes(java.util.Map)">setForeignAttributes</A></CODE></TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="BlockViewport()"><!-- --></A><H3> BlockViewport</H3> <PRE> public <B>BlockViewport</B>()</PRE> <DL> <DD>Create a new block viewport area. <P> </DL> <HR> <A NAME="BlockViewport(boolean)"><!-- --></A><H3> BlockViewport</H3> <PRE> public <B>BlockViewport</B>(boolean&nbsp;allowBPDUpdate)</PRE> <DL> <DD>Create a new block viewport area. <P> <DL> <DT><B>Parameters:</B><DD><CODE>allowBPDUpdate</CODE> - true allows the BPD to be updated when children are added</DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="setCTM(org.apache.fop.area.CTM)"><!-- --></A><H3> setCTM</H3> <PRE> public void <B>setCTM</B>(<A HREF="../../../../org/apache/fop/area/CTM.html" title="class in org.apache.fop.area">CTM</A>&nbsp;ctm)</PRE> <DL> <DD>Set the transform of this viewport. If the viewport is rotated or has an absolute positioning this transform will do the work. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>ctm</CODE> - the transformation</DL> </DD> </DL> <HR> <A NAME="getCTM()"><!-- --></A><H3> getCTM</H3> <PRE> public <A HREF="../../../../org/apache/fop/area/CTM.html" title="class in org.apache.fop.area">CTM</A> <B>getCTM</B>()</PRE> <DL> <DD>Get the transform of this block viewport. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the transformation of this viewport or null if normally stacked without rotation</DL> </DD> </DL> <HR> <A NAME="setClip(boolean)"><!-- --></A><H3> setClip</H3> <PRE> public void <B>setClip</B>(boolean&nbsp;cl)</PRE> <DL> <DD>Set the clipping for this viewport. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>cl</CODE> - the clipping for the viewport</DL> </DD> </DL> <HR> <A NAME="hasClip()"><!-- --></A><H3> hasClip</H3> <PRE> public boolean <B>hasClip</B>()</PRE> <DL> <DD>Returns true if this area will clip overflowing content. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/fop/area/Viewport.html#hasClip()">hasClip</A></CODE> in interface <CODE><A HREF="../../../../org/apache/fop/area/Viewport.html" title="interface in org.apache.fop.area">Viewport</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD><code>true</code> if the overflow trait has the value "hidden", "scroll" or "error-if-overflow"</DL> </DD> </DL> <HR> <A NAME="getClipRectangle()"><!-- --></A><H3> getClipRectangle</H3> <PRE> public java.awt.Rectangle <B>getClipRectangle</B>()</PRE> <DL> <DD>Returns the clipping rectangle of this viewport area. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/fop/area/Viewport.html#getClipRectangle()">getClipRectangle</A></CODE> in interface <CODE><A HREF="../../../../org/apache/fop/area/Viewport.html" title="interface in org.apache.fop.area">Viewport</A></CODE></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the clipping rectangle expressed in the viewport's coordinate system, or null if clipping is disabled</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BlockViewport.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> fop 1.1</EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../org/apache/fop/area/BlockParent.html" title="class in org.apache.fop.area"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../org/apache/fop/area/BodyRegion.html" title="class in org.apache.fop.area"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/apache/fop/area/BlockViewport.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="BlockViewport.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_org.apache.fop.area.Block">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright 1999-2012 The Apache Software Foundation. All Rights Reserved. </BODY> </HTML>
{ "pile_set_name": "Github" }
/* ---------- General Layout ---------- */ body, input, textarea, select { color: #000; background: none; } body.two-sidebars, body.sidebar-first, body.sidebar-second, body { width: 640px; } #sidebar-first, #sidebar-second, .navigation, #toolbar, #footer-wrapper, .tabs, .add-or-remove-shortcuts { display: none; } .one-sidebar #content, .two-sidebars #content { width: 100%; } #triptych-wrapper { width: 960px; margin: 0; padding: 0; border: none; } #triptych-first, #triptych-middle, #triptych-last { width: 250px; } /* ---------- Node Pages ---------- */ #comments .title, #comments form, .comment_forbidden { display: none; }
{ "pile_set_name": "Github" }
require('../modules/core.log'); module.exports = require('../modules/$.core').log;
{ "pile_set_name": "Github" }
.selectMsg{ width:110px; margin-right: 15px; } .msg_info,.msg_time,.msg_reply,.msg_opr{min-height:50px; text-align:center;} .msg_info{text-align:left; position: relative; } .msg_info>img{ position: absolute; left:10px; top:10px; cursor:pointer; } .msg_info .user_info{ padding-left:55px; line-height:25px; } .msg_info .user_info h2{ color:#222; cursor:pointer; } .msg_info .user_info h2:hover{ color:#1AA094;} .msg_info .user_info p{ color:#8d8d8d; } .msg_reply{ color:#e15f63; } /*回复*/ .replay_edit{ overflow: hidden; margin-bottom:20px; } .replay_edit a{margin-top: 10px; width:100px; float:right;}
{ "pile_set_name": "Github" }