repo_name
stringlengths 4
116
| path
stringlengths 3
942
| size
stringlengths 1
7
| content
stringlengths 3
1.05M
| license
stringclasses 15
values |
|---|---|---|---|---|
forresty/xiami
|
lib/xiami/song.rb
|
1928
|
require_relative "http_client"
require_relative 'artist'
require_relative 'album'
module Xiami
class Song
include Virtus.model(finalize: false)
attribute :id, Integer
attribute :name, String
attribute :temporary_url, String
attribute :artist, Artist
attribute :album, 'Xiami::Album'
attribute :lyrics_url, String
class << self
def search(query)
Searcher.search(query: query)
end
def search_all(query)
FullSearcher.search(query: query)
end
def fetch(song_url)
song_id = song_url.match(/song\/([0-9]+)/)[1] rescue song_url
fetch!(song_id) rescue nil
end
def fetch!(id)
song = parse_xml_info!(id) rescue parse_html_page!(id)
song.id = id
song.fetch_all_album_arts!
song
end
def parse_html_page!(id)
html = HTTPClient.get_content("http://www.xiami.com/song/#{id}")
Parser::SongHTMLParser.parse(html)
end
def parse_xml_info!(id)
xml = HTTPClient.get_content("http://www.xiami.com/widget/xml-single/uid/0/sid/#{id}")
Parser::SongXMLParser.parse(xml)
end
def parse_lyrics_info!(id)
xml = HTTPClient.get_content("http://www.xiami.com/song/playlist/id/#{id}")
Parser::LyricsXMLParser.parse(xml)
end
def parse_lyrics!(id)
url = parse_lyrics_info!(id)
HTTPClient.get_content(url)
end
end
def fetch_all_album_arts!
results = CoverFetcher.fetch_all(album.cover_url, HTTPClient.proxy)
album.cover_urls = results[:cover_urls]
album.cover_url = results[:cover_url]
end
def ==(another)
return false if another.nil?
self.id == another.id
end
def title
name
end
def artist_name
artist.name
end
def album_name
album.name
end
end
end
|
mit
|
peppertech/OracleJET-Samples
|
MagicEightBall/hybrid/www/js/libs/oj/v2.0.0/resources/nls/th/ojtranslations.js
|
22262
|
define({"oj-message":{fatal:"ร้ายแรง",error:"ข้อผิดพลาด",warning:"คำเตือน",info:"ข้อมูล",confirmation:"การยืนยัน","compact-type-summary":"{0}: {1}"},"oj-converter":{summary:"ค่าไม่อยู่ในรูปแบบที่ต้องการ",detail:"ป้อนค่าในรูปแบบที่ต้องการ","plural-separator":", ",hint:{summary:"ตัวอย่าง: {exampleValue}",detail:"ป้อนค่าในรูปแบบเดียวกับตัวอย่างต่อไปนี้: '{exampleValue}'","detail-plural":"ป้อนค่าในรูปแบบเดียวกับตัวอย่างต่อไปนี้: '{exampleValue}'"},optionHint:{detail:"ค่าที่ยอมรับสำหรับตัวเลือก '{propertyName}' คือ '{propertyValueValid}'",
"detail-plural":"ค่าที่ยอมรับสำหรับตัวเลือก '{propertyName}' คือ '{propertyValueValid}'"},optionTypesMismatch:{summary:"ต้องระบุค่าสำหรับตัวเลือก '{requiredPropertyName}' เมื่อตั้งค่าตัวเลือก '{propertyName}' เป็น '{propertyValue}'"},optionTypeInvalid:{summary:"ไม่ได้ระบุค่าของประเภทที่ต้องการสำหรับตัวเลือก '{propertyName}'"},optionOutOfRange:{summary:"ค่า {propertyValue} อยู่นอกช่วงสำหรับตัวเลือก '{propertyName}'"},optionValueInvalid:{summary:"ค่า '{propertyValue}' ที่ระบุสำหรับตัวเลือก '{propertyName}' ไม่ถูกต้อง"},
number:{decimalFormatMismatch:{summary:"'{value}' ไม่อยู่ในรูปแบบตัวเลขที่ต้องการ"},decimalFormatUnsupportedParse:{summary:"decimalFormat: ไม่รองรับ 'short' และ 'long' สำหรับการพาร์ซตัวแปลง",detail:"เปลี่ยนองค์ประกอบเป็น readOnly ฟิลด์ readOnly ไม่ได้เรียกฟังก์ชันพาร์ซของตัวแปลง"},currencyFormatMismatch:{summary:"'{value}' ไม่อยู่ในรูปแบบสกุลเงินที่ต้องการ"},percentFormatMismatch:{summary:"'{value}' ไม่อยู่ในรูปแบบเปอร์เซ็นต์ที่ต้องการ"}},datetime:{datetimeOutOfRange:{summary:"ค่า '{value}' อยู่นอกช่วงสำหรับ '{propertyName}'",
detail:"ป้อนค่าตั้งแต่ '{minValue}' ถึง '{maxValue}'"},dateFormatMismatch:{summary:"'{value}' ไม่อยู่ในรูปแบบวันที่ที่ต้องการ"},timeFormatMismatch:{summary:"'{value}' ไม่อยู่ในรูปแบบเวลาที่ต้องการ"},datetimeFormatMismatch:{summary:"'{value}' ไม่อยู่ในรูปแบบวันที่และเวลาที่ต้องการ"},dateToWeekdayMismatch:{summary:"วันที่ '{date}' ไม่ตรงกับ '{weekday}'",detail:"ป้อนวันทำการที่ตรงกับวันที่"}}},"oj-validator":{length:{hint:{min:"ป้อนอักขระ {min} ตัวหรือมากกว่า",max:"ป้อนอักขระ {max} ตัวหรือน้อยกว่า",
inRange:"ป้อนอักขระ {min} ตัวหรือมากกว่า และไม่เกิน {max} ตัว",exact:"ป้อนอักขระ {length} ตัว"},messageDetail:{tooShort:"ป้อนอักขระไม่ต่ำกว่า {min} ตัว",tooLong:"ป้อนอักขระไม่เกิน {max} ตัว"},messageSummary:{tooShort:"มีอักขระจำนวนน้อยเกินไป",tooLong:"มีอักขระจำนวนมากเกินไป"}},range:{number:{hint:{min:"ป้อนตัวเลขที่มากกว่าหรือเท่ากับ {min}",max:"ป้อนตัวเลขที่น้อยกว่าหรือเท่ากับ {max}",inRange:"ป้อนตัวเลขตั้งแต่ {min} ถึง {max}"},messageDetail:{rangeUnderflow:"ตัวเลขต้องมากกว่าหรือเท่ากับ {min}",rangeOverflow:"ตัวเลขต้องน้อยกว่าหรือเท่ากับ {max}"},
messageSummary:{rangeUnderflow:"ตัวเลขน้อยเกินไป",rangeOverflow:"ตัวเลขสูงเกินไป"}},datetime:{hint:{min:"ป้อนวันที่และเวลาตรงกับหรือหลัง {min}",max:"ป้อนวันที่และเวลาตรงกับหรือก่อน {max}",inRange:"ป้อนวันที่และเวลาตั้งแต่ {min} ถึง {max}"},messageDetail:{rangeUnderflow:"วันที่และเวลาต้องตรงกับหรือหลัง {min}",rangeOverflow:"วันที่และเวลาต้องตรงกับหรือก่อน {max}"},messageSummary:{rangeUnderflow:"วันที่และเวลาอยู่ก่อนวันที่เริ่มต้น",rangeOverflow:"วันที่และเวลาอยู่หลังวันที่สิ้นสุด"}}},restriction:{date:{messageSummary:"วันที่ {value} มาจากรายการที่เลิกใช้",
messageDetail:"วันที่ {value} ไม่ควรมาจากรายการที่เลิกใช้"}},regExp:{summary:"รูปแบบไม่ถูกต้อง",detail:"ค่า '{value}' ต้องตรงกับรูปแบบต่อไปนี้: '{pattern}'"},required:{summary:"ต้องระบุค่า",detail:"คุณต้องป้อนค่า"}},"oj-editableValue":{required:{hint:"",messageSummary:"",messageDetail:""}},"oj-ojInputDate":{prevText:"ก่อนหน้า",nextText:"ถัดไป",currentText:"วันนี้",weekHeader:"สัปดาห์",tooltipCalendar:"เลือกวันที่",tooltipCalendarDisabled:"เลิกใช้การเลือกวันที่",weekText:"สัปดาห์",datePicker:"ตัวเลือกวันที่",
inputHelp:"กดลูกศรชี้ลงหรือลูกศรชี้ขึ้นเพื่อเข้าใช้ปฏิทิน",inputHelpBoth:"กดลูกศรชี้ลงหรือลูกศรชี้ขึ้นเพื่อเข้าใช้ปฏิทิน และ Shift + ลูกศรชี้ลงหรือ Shift + ลูกศรชี้ขึ้นเพื่อเข้าใช้ดรอปดาวน์เวลา",dateTimeRange:{hint:{min:"",max:"",inRange:""},messageDetail:{rangeUnderflow:"",rangeOverflow:""},messageSummary:{rangeUnderflow:"",rangeOverflow:""}},dateRestriction:{hint:"",messageSummary:"",messageDetail:""}},"oj-ojInputTime":{tooltipTime:"เลือกเวลา",tooltipTimeDisabled:"เลิกใช้การเลือกเวลา",inputHelp:"กดลูกศรชี้ลงหรือลูกศรชี้ขึ้นเพื่อเข้าใช้ดรอปดาวน์เวลา",
dateTimeRange:{hint:{min:"",max:"",inRange:""},messageDetail:{rangeUnderflow:"",rangeOverflow:""},messageSummary:{rangeUnderflow:"",rangeOverflow:""}}},"oj-inputBase":{regexp:{messageSummary:"",messageDetail:""}},"oj-ojInputPassword":{regexp:{messageDetail:"ค่าต้องตรงกับรูปแบบต่อไปนี้: '{pattern}'"}},"oj-ojFilmStrip":{labelAccArrowNextPage:"เพจถัดไป",labelAccArrowPreviousPage:"เพจก่อนหน้า",tipArrowNextPage:"ถัดไป",tipArrowPreviousPage:"ก่อนหน้า"},"oj-ojDataGrid":{accessibleSortAscending:"{id} เรียงจากน้อยไปมาก",
accessibleSortDescending:"{id} เรียกจากมากไปน้อย",accessibleActionableMode:"เข้าสู่โหมดที่สามารถดำเนินการได้",accessibleNavigationMode:"เข้าสู่โหมดการนาวิเกต",accessibleSummaryExact:"นี่คือกริดข้อมูลที่มี {rownum} แถวและ {colnum} คอลัมน์",accessibleSummaryEstimate:"นี่คือกริดข้อมูลที่ไม่ทราบจำนวนแถวและคอลัมน์",accessibleSummaryExpanded:"ขณะนี้มีการขยายแถวแล้ว {num} แถว",accessibleRowExpanded:"ขยายแถวแล้ว",accessibleRowCollapsed:"ยุบแถวแล้ว",accessibleRowSelected:"เลือกแถว {row}",accessibleColumnSelected:"เลือกคอลัมน์ {column}",
accessibleStateSelected:"รายการที่เลือก",accessibleMultiCellSelected:"เลือกไว้ {num} เซลล์",accessibleRowContext:"แถว {index}",accessibleColumnContext:"คอลัมน์ {index}",accessibleRowHeaderContext:"ส่วนหัวของแถว {index}",accessibleColumnHeaderContext:"ส่วนหัวของคอลัมน์ {index}",accessibleLevelContext:"ระดับ {level}",accessibleRangeSelectModeOn:"เปิดโหมดการเพิ่มช่วงของเซลล์ที่เลือก",accessibleRangeSelectModeOff:"ปิดโหมดการเพิ่มช่วงของเซลล์ที่เลือก",accessibleFirstRow:"คุณอยู่ที่แถวแรก",accessibleLastRow:"คุณอยู่ที่แถวสุดท้าย",
accessibleFirstColumn:"คุณอยู่ที่คอลัมน์แรก",accessibleLastColumn:"คุณอยู่ที่คอลัมน์สุดท้าย",accessibleSelectionAffordanceTop:"แฮนเดิลการเลือกด้านบน",accessibleSelectionAffordanceBottom:"แฮนเดิลการเลือกด้านล่าง",msgFetchingData:"กำลังดึงข้อมูล...",msgNoData:"ไม่มีรายการที่จะแสดงผล",labelResize:"ปรับขนาด",labelResizeWidth:"ปรับความกว้าง",labelResizeHeight:"ปรับความสูง",labelSortRow:"จัดเรียงแถว",labelSortRowAsc:"จัดเรียงแถวจากน้อยไปมาก",labelSortRowDsc:"จัดเรียงแถวจากมากไปน้อย",labelSortCol:"จัดเรียงคอลัมน์",
labelSortColAsc:"จัดเรียงคอลัมน์จากน้อยไปมาก",labelSortColDsc:"จัดเรียงคอลัมน์จากมากไปน้อย",labelCut:"ตัด",labelPaste:"วาง",labelEnableNonContiguous:"ใช้การเลือกแบบไม่ต่อเนื่อง",labelDisableNonContiguous:"เลิกใช้การเลือกแบบไม่ต่อเนื่อง",labelResizeDialogSubmit:"ตกลง"},"oj-ojRowExpander":{accessibleLevelDescription:"ระดับ {level}",accessibleRowDescription:"ระดับ {level}, แถว {num} จาก {total}",accessibleRowExpanded:"ขยายแถวแล้ว",accessibleRowCollapsed:"ยุบแถวแล้ว",accessibleStateExpanded:"ขยายแล้ว",
accessibleStateCollapsed:"ยุบแล้ว"},"oj-ojListView":{msgFetchingData:"กำลังดึงข้อมูล...",msgNoData:"ไม่มีรายการที่จะแสดงผล",indexerCharacters:"A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z"},"oj-_ojLabel":{tooltipHelp:"วิธีใช้",tooltipRequired:"ต้องระบุ"},"oj-ojInputNumber":{numberRange:{hint:{min:"",max:"",inRange:""},messageDetail:{rangeUnderflow:"",rangeOverflow:""},messageSummary:{rangeUnderflow:"",rangeOverflow:""}},tooltipDecrement:"ส่วนลด",tooltipIncrement:"ส่วนเพิ่ม"},"oj-ojTable":{labelAccSelectionAffordanceTop:"แฮนเดิลการเลือกด้านบน",
labelAccSelectionAffordanceBottom:"แฮนเดิลการเลือกด้านล่าง",labelEnableNonContiguousSelection:"ใช้การเลือกแบบไม่ต่อเนื่อง",labelDisableNonContiguousSelection:"เลิกใช้การเลือกแบบไม่ต่อเนื่อง",labelSelectRow:"เลือกแถว",labelSelectColumn:"เลือกคอลัมน์",labelSort:"จัดเรียง",labelSortAsc:"เรียงจากน้อยไปมาก",labelSortDsc:"เรียงจากมากไปน้อย",msgFetchingData:"กำลังดึงข้อมูล...",msgNoData:"ไม่มีข้อมูลที่จะแสดงผล"},"oj-ojTabs":{labelCut:"ตัด",labelPasteBefore:"วางก่อน",labelPasteAfter:"วางหลัง",labelRemove:"ย้ายออก",
labelReorder:"จัดลำดับใหม่",removeCueText:"ย้ายออกได้"},"oj-ojSelect":{seachField:"ฟิลด์ค้นหา",noMatchesFound:"ไม่พบรายการที่ค้นหา"},"oj-ojSwitch":{SwitchON:"เปิด",SwitchOFF:"ปิด"},"oj-ojCombobox":{noMatchesFound:"ไม่พบรายการที่ค้นหา"},"oj-ojInputSearch":{noMatchesFound:"ไม่พบรายการที่ค้นหา"},"oj-ojTree":{stateLoading:"กำลังโหลด...",labelNewNode:"โหนดใหม่",labelMultiSelection:"การเลือกหลายรายการ",labelEdit:"แก้ไข",labelCreate:"สร้าง",labelCut:"ตัด",labelCopy:"คัดลอก",labelPaste:"วาง",labelRemove:"ย้ายออก",
labelRename:"เปลี่ยนชื่อ",labelNoData:"ไม่มีข้อมูล"},"oj-ojPagingControl":{labelAccPaging:"แบ่งหน้า",labelAccNavFirstPage:"เพจแรก",labelAccNavLastPage:"เพจสุดท้าย",labelAccNavNextPage:"เพจถัดไป",labelAccNavPreviousPage:"เพจก่อนหน้า",labelAccNavPage:"เพจ",labelLoadMore:"แสดงเพิ่มเติม...",labelLoadMoreMaxRows:"ถึงขีดจำกัดสูงสุด {maxRows} แถวแล้ว",labelNavInputPage:"เพจ",labelNavInputPageMax:"จาก {pageMax}",msgItemRangeCurrent:"{pageFrom}-{pageTo}",msgItemRangeCurrentSingle:"{pageFrom}",msgItemRangeOf:"จาก",
msgItemRangeOfAtLeast:"จากอย่างน้อย",msgItemRangeOfApprox:"จากประมาณ",msgItemRangeItems:"รายการ",tipNavInputPage:"ไปที่เพจ",tipNavPageLink:"ไปที่เพจ {pageNum}",tipNavNextPage:"ถัดไป",tipNavPreviousPage:"ก่อนหน้า",tipNavFirstPage:"แรก",tipNavLastPage:"สุดท้าย",pageInvalid:{summary:"ค่าของเพจที่ป้อนไม่ถูกต้อง",detail:"โปรดป้อนค่ามากกว่า 0"},maxPageLinksInvalid:{summary:"ค่าสำหรับ maxPageLinks ไม่ถูกต้อง",detail:"โปรดป้อนค่ามากกว่า 4"}},"oj-ojMasonryLayout":{labelCut:"ตัด",labelPasteBefore:"วางก่อน",
labelPasteAfter:"วางหลัง"},"oj-panel":{labelAccButtonExpand:"ขยาย",labelAccButtonCollapse:"ยุบ",labelAccButtonRemove:"ย้ายออก"},"oj-ojChart":{labelDefaultGroupName:"กลุ่ม {0}",labelSeries:"ชุด",labelGroup:"กลุ่ม",labelDate:"วันที่",labelValue:"ค่า",labelTargetValue:"เป้าหมาย",labelX:"X",labelY:"Y",labelZ:"Z",labelPercentage:"เปอร์เซ็นต์",labelLow:"ต่ำ",labelHigh:"สูง",labelOpen:"เปิด",labelClose:"ปิด",labelVolume:"ปริมาณ",labelMin:"ต่ำสุด",labelMax:"สูงสุด",labelOther:"อื่นๆ",tooltipPan:"แพน",tooltipSelect:"เลือกเฉพาะในกรอบ",
tooltipZoom:"ซูมเฉพาะในกรอบ",componentName:"แผนภูมิ"},"oj-dvtBaseGauge":{componentName:"มาตรวัด"},"oj-ojDiagram":{componentName:"ไดอะแกรม"},"oj-ojLegend":{componentName:"คำอธิบาย"},"oj-ojNBox":{highlightedCount:"{0}/{1}",labelOther:"อื่นๆ",labelGroup:"กลุ่ม",labelSize:"ขนาด",labelAdditionalData:"ข้อมูลเพิ่มเติม",componentName:"NBox"},"oj-ojPictoChart":{componentName:"แผนภูมิรูปภาพ"},"oj-ojSparkChart":{componentName:"แผนภูมิ"},"oj-ojSunburst":{labelColor:"สี",labelSize:"ขนาด",componentName:"ซันเบิร์สท์"},
"oj-ojTagCloud":{componentName:"แท็กคลาวด์"},"oj-ojThematicMap":{componentName:"แผนที่เฉพาะทาง"},"oj-ojTimeline":{componentName:"ระยะเวลา",labelSeries:"ชุด",tooltipZoomIn:"ซูมเข้า",tooltipZoomOut:"ซูมออก"},"oj-ojTreemap":{labelColor:"สี",labelSize:"ขนาด",tooltipIsolate:"แยก",tooltipRestore:"เรียกคืน",componentName:"แผนที่โครงสร้าง"},"oj-dvtBaseComponent":{labelScalingSuffixThousand:"K",labelScalingSuffixMillion:"M",labelScalingSuffixBillion:"B",labelScalingSuffixTrillion:"T",labelScalingSuffixQuadrillion:"Q",
labelInvalidData:"ข้อมูลไม่ถูกต้อง",labelNoData:"ไม่มีข้อมูลที่จะแสดงผล",labelClearSelection:"ล้างข้อมูลที่เลือกไว้",labelDataVisualization:"การแสดงข้อมูล",stateSelected:"เลือกไว้",stateUnselected:"ไม่ได้เลือกไว้",stateMaximized:"ขนาดใหญ่สุด",stateMinimized:"ขนาดเล็กสุด",stateExpanded:"ขยายแล้ว",stateCollapsed:"ยุบแล้ว",stateIsolated:"แยก",stateHidden:"ซ่อน",stateVisible:"มองเห็นได้",stateDrillable:"ดริลล์ได้",labelAndValue:"{0}: {1}",labelCountWithTotal:"{0} จาก {1}"},"oj-ojNavigationList":{defaultRootLabel:"ลิสต์การนาวิเกต",
hierMenuBtnLabel:"ปุ่มเมนูย่อย",selectedLabel:"รายการที่เลือก",previousIcon:"ก่อนหน้า",msgFetchingData:"กำลังดึงข้อมูล...",msgNoData:"ไม่มีรายการที่จะแสดงผล"},"oj-ojSlider":{noValue:"ojSlider ไม่มีค่า",maxMin:"สูงสุดต้องไม่น้อยกว่าต่ำสุด",valueRange:"ค่าต้องอยู่ภายในช่วงต่ำสุดถึงสูงสุด",optionNum:"ตัวเลือก {option} ไม่ใช่ตัวเลข",invalidStep:"ขั้นตอนไม่ถูกต้อง ขั้นตอนต้อง > 0"},"oj-ojPopup":{ariaLiveRegionInitialFocusFirstFocusable:"กำลังเข้าสู่ป็อปอัป กด F6 เพื่อนาวิเกตระหว่างป็อปอัปและการควบคุมที่เกี่ยวข้อง",
ariaLiveRegionInitialFocusNone:"ป็อปอัปเปิดอยู่ กด F6 เพื่อนาวิเกตระหว่างป็อปอัปและการควบคุมที่เกี่ยวข้อง",ariaLiveRegionInitialFocusFirstFocusableTouch:"กำลังเข้าสู่ป็อปอัป สามารถปิดป็อปอัปได้โดยนาวิเกตไปยังลิงค์ล่าสุดภายในป็อปอัป",ariaLiveRegionInitialFocusNoneTouch:"ป็อปอัปเปิดอยู่ โปรดนาวิเกตไปยังลิงค์ถัดไปเพื่อกำหนดโฟกัสภายในป็อปอัป",ariaFocusSkipLink:"แตะสองครั้งเพื่อนาวิเกตไปยังป็อปอัปที่เปิดอยู่",ariaCloseSkipLink:"แตะสองครั้งเพื่อปิดป็อปอัปที่เปิดอยู่"},"oj-pullToRefresh":{ariaRefreshLink:"เปิดใช้งานลิงค์เพื่อรีเฟรชเนื้อหา",
ariaRefreshingLink:"กำลังรีเฟรชเนื้อหา",ariaRefreshCompleteLink:"รีเฟรชเสร็จสมบูรณ์"},"oj-ojIndexer":{indexerOthers:"#",ariaDisabledLabel:"ไม่พบส่วนหัวของกลุ่มที่ตรงกัน",ariaOthersLabel:"ตัวเลข",ariaInBetweenText:"ตั้งแต่ {first} ถึง {second}",ariaKeyboardInstructionText:"กด Enter เพื่อเลือกค่า",ariaTouchInstructionText:"แตะสองครั้งและกดค้างไว้เพื่อเข้าสู่โหมดการวาดนิ้ว จากนั้นลากขึ้นหรือลงเพื่อปรับค่า"}});
|
mit
|
clark-stevenson/phaser
|
v3/src/renderer/webgl/shaders/UntexturedAndTintedShader.js
|
509
|
module.exports = {
vert: [
'uniform mat4 u_view_matrix;',
'attribute vec2 a_position;',
'attribute vec4 a_color;',
'varying vec4 v_color;',
'void main () {',
' gl_Position = u_view_matrix * vec4(a_position, 1.0, 1.0);',
' v_color = a_color;',
'}'
].join('\n'),
frag:[
'precision lowp float;',
'varying vec4 v_color;',
'void main() {',
' gl_FragColor = v_color;',
'}'
].join('\n')
};
|
mit
|
imasaru/sabbath-school-lessons
|
src/nl/2021-03/12/01.md
|
1712
|
---
title: De rusteloze profeet
date: 11/09/2021
---
### Lezen
Jona 1-4; Jeremia 25:5; Ezechiël 14:6; Openbaring 2:5; Lucas 9:51-56; Judas 1-25
> <p>Kerntekst</p>
> ‘Zou Ik dan geen verdriet hebben om Ninevé, die grote stad, waar meer dan honderdtwintigduizend mensen wonen die het verschil tussen links en rechts niet eens kennen, en dan nog al die dieren?’ Jona 4:11
Een van de interessantste verhalen in de Bijbel moet wel dat van Jona zijn. Hij was een profeet van God en dus iemand die door God was geroepen. Toch roept hij heel wat vragen op. Hij loopt weg als God hem roept. Hij wordt op een dramatische manier overtuigd om van gedachten te veranderen en de Heer te gehoorzamen en wat is het enige dat hij dan doet? Hij begint te klagen dat de mensen waarvoor hij werd geroepen om te getuigen, zich dan ook echt bekeerden en dat hun de vernietiging bespaard blijft die anders over hen zou zijn gekomen!
Dit is echt een voorbeeld van iemand die geen rust heeft en die geen vrede heeft met zichzelf. Dat gaat zelfs zover dat hij uitroept: ‘Laat mij maar sterven, HEER: ik ben liever dood dan dat ik zo verder moet leven.’ (Jona 4:3)
Jezus zelf verwees naar het verhaal van Jona en zei: ‘Op de dag van het oordeel zullen de Ninevieten samen met deze generatie opstaan en haar veroordelen; want zij hadden zich bekeerd na de prediking van Jona, en hier ziet u iemand die meer is dan Jona!’ (Matteüs12:41) Hij was 12 inderdaad groter dan Jona! Als dat niet zo was, dan zou Hij niet onze Redder kunnen zijn. Laten we deze week eens kijken naar Jona en wat we kunnen leren van zijn rusteloosheid en gebrek aan innerlijke vrede.
_Op sabbat 18 september bespreken we met elkaar deze les._
|
mit
|
julianxhokaxhiu/blog.julianxhokaxhiu.com
|
themes/mediumish-gohugo-theme/exampleSite/content/blog/fifth.md
|
993
|
---
title: "Fifth"
date: 2018-10-07T11:39:22+02:00
publishdate: 2018-10-07T11:39:22+02:00
image: "/images/blog/5.jpg"
tags: ["interesting", "drink"]
comments: false
---
# This is another post
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean semper libero quis dictum dapibus. Nulla egestas vitae augue eu rutrum. Duis ullamcorper dictum ipsum. Interdum et malesuada fames ac ante ipsum primis in faucibus. Suspendisse tortor dui, fermentum non dapibus id, volutpat non odio. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Maecenas fringilla tempus urna ac laoreet. Curabitur sed bibendum lectus. Vivamus gravida venenatis porttitor. Phasellus aliquet nibh vel accumsan malesuada. Nulla nibh enim, auctor nec rhoncus a, pulvinar at tortor. Donec sodales consequat dolor et condimentum. Praesent convallis massa sit amet ultrices porta. Sed commodo, odio et porttitor fringilla, mi tortor sodales nulla, a fermentum dolor mi pulvinar mi.
|
mit
|
tddold/Telerik-Academy-2
|
Csharp-Part2/08.TextFiles/02.ConcatenateTextFiles/Properties/AssemblyInfo.cs
|
1422
|
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("02.ConcatenateTextFiles")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("02.ConcatenateTextFiles")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("af1279c8-1d89-4fe8-9bc7-b8edc5f9ca0c")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
|
mit
|
cmpayments/payments-sdk-net
|
Source/CM.Payments.Client.Test/Generated/AfterPayDetailsResponse_Tests.cs
|
10445
|
using System;
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using CM.Payments.Client.Model;
using System.Reflection;
using CM.Payments.Client.Enums;
//<auto-generated>
// IMPORTANT NOTE:
// This code is generated by MessageUnitTestGenerator in this project.
// Date and time: 06-04-2018 14:52:27
//
// Changes to this file may cause incorrect behavior and will be lost on the next code generation.
//</auto-generated>
namespace CM.Payments.Client.Test
{
[TestClass, ExcludeFromCodeCoverage]
public partial class AfterPayDetailsResponseTests : BaseJsonConvertTests
{
public TestContext TestContext { get; set; }
[TestMethod]
public void AfterPayDetailsResponse()
{
var obj = new AfterPayDetailsResponse
{
AuthenticationUrl = "Lorum_737",
BankAccountNumber = "Lorum_307",
BillToAddress = new AfterPayDetailsRequest.OrderAddress
{
City = "Lorum_91",
HouseNumber = 16,
HouseNumberAddition = "Lorum_983",
IsoCountryCode = "Lorum_910",
PostalCode = "Lorum_125",
Reference = new AfterPayDetailsRequest.OrderAddress.ReferencePerson
{
DateOfBirth = DateTime.Now,
EmailAddress = "Lorum_316",
Gender = "Lorum_811",
Initials = "Lorum_27",
IsoLanguage = "Lorum_772",
LastName = "Lorum_226",
PhoneNumber1 = "Lorum_384",
PhoneNumber2 = "Lorum_608"
},
Region = "Lorum_83",
StreetName = "Lorum_97"
},
CallbackUrl = "Lorum_991",
CancelledUrl = "Lorum_705",
ExpiredUrl = "Lorum_717",
FailedUrl = "Lorum_287",
InvoiceNumber = "Lorum_905",
IpAddress = "Lorum_958",
Orderline = new List<AfterPayDetailsRequest.OrderLine>
{
new AfterPayDetailsRequest.OrderLine
{
ArticleDescription = "Lorum_894",
ArticleId = "Lorum_161",
NetUnitPrice = 84,
Quantity = 1,
UnitPrice = 20,
VatCategory = AfterPayVatCategory.Low
},
new AfterPayDetailsRequest.OrderLine
{
ArticleDescription = "Lorum_969",
ArticleId = "Lorum_91",
NetUnitPrice = 45,
Quantity = 58,
UnitPrice = 8,
VatCategory = AfterPayVatCategory.Zero
}
},
OrderNumber = "Lorum_768",
Password = "Lorum_478",
PortfolioId = 99,
PurchaseId = "Lorum_408",
Result = new AfterPayDetailsResponse.ResultResponse
{
Checksum = "Lorum_551",
OrderReference = "Lorum_526",
ResultId = 18,
StatusCode = "Lorum_918",
TimestampIn = "Lorum_404",
TimestampOut = "Lorum_219",
TotalInvoicedAmount = 6,
TotalReservedAmount = 41,
TransactionId = "Lorum_95"
},
ShipToAddress = new AfterPayDetailsRequest.OrderAddress
{
City = "Lorum_945",
HouseNumber = 86,
HouseNumberAddition = "Lorum_338",
IsoCountryCode = "Lorum_352",
PostalCode = "Lorum_393",
Reference = new AfterPayDetailsRequest.OrderAddress.ReferencePerson
{
DateOfBirth = DateTime.Now,
EmailAddress = "Lorum_867",
Gender = "Lorum_944",
Initials = "Lorum_618",
IsoLanguage = "Lorum_778",
LastName = "Lorum_412",
PhoneNumber1 = "Lorum_930",
PhoneNumber2 = "Lorum_312"
},
Region = "Lorum_979",
StreetName = "Lorum_711"
},
SuccessUrl = "Lorum_680",
TotalOrderAmount = 35
};
var deserialized = ConversionTest(obj);
Assert.IsNotNull(deserialized);
Assert.AreEqual(obj.AuthenticationUrl, deserialized.AuthenticationUrl);
Assert.AreEqual(obj.BankAccountNumber, deserialized.BankAccountNumber);
Assert.AreEqual(obj.BillToAddress.City, deserialized.BillToAddress.City);
Assert.AreEqual(obj.BillToAddress.HouseNumber, deserialized.BillToAddress.HouseNumber);
Assert.AreEqual(obj.BillToAddress.HouseNumberAddition, deserialized.BillToAddress.HouseNumberAddition);
Assert.AreEqual(obj.BillToAddress.IsoCountryCode, deserialized.BillToAddress.IsoCountryCode);
Assert.AreEqual(obj.BillToAddress.PostalCode, deserialized.BillToAddress.PostalCode);
// Check only date and time up to seconds.. Json.NET does not save milliseconds.
Assert.AreEqual(
new DateTime(obj.BillToAddress.Reference.DateOfBirth.Year, obj.BillToAddress.Reference.DateOfBirth.Month, obj.BillToAddress.Reference.DateOfBirth.Day, obj.BillToAddress.Reference.DateOfBirth.Hour, obj.BillToAddress.Reference.DateOfBirth.Minute, obj.BillToAddress.Reference.DateOfBirth.Second),
new DateTime(deserialized.BillToAddress.Reference.DateOfBirth.Year, deserialized.BillToAddress.Reference.DateOfBirth.Month, deserialized.BillToAddress.Reference.DateOfBirth.Day, deserialized.BillToAddress.Reference.DateOfBirth.Hour, deserialized.BillToAddress.Reference.DateOfBirth.Minute, deserialized.BillToAddress.Reference.DateOfBirth.Second));
Assert.AreEqual(obj.BillToAddress.Reference.EmailAddress, deserialized.BillToAddress.Reference.EmailAddress);
Assert.AreEqual(obj.BillToAddress.Reference.Gender, deserialized.BillToAddress.Reference.Gender);
Assert.AreEqual(obj.BillToAddress.Reference.Initials, deserialized.BillToAddress.Reference.Initials);
Assert.AreEqual(obj.BillToAddress.Reference.IsoLanguage, deserialized.BillToAddress.Reference.IsoLanguage);
Assert.AreEqual(obj.BillToAddress.Reference.LastName, deserialized.BillToAddress.Reference.LastName);
Assert.AreEqual(obj.BillToAddress.Reference.PhoneNumber1, deserialized.BillToAddress.Reference.PhoneNumber1);
Assert.AreEqual(obj.BillToAddress.Reference.PhoneNumber2, deserialized.BillToAddress.Reference.PhoneNumber2);
Assert.AreEqual(obj.BillToAddress.Region, deserialized.BillToAddress.Region);
Assert.AreEqual(obj.BillToAddress.StreetName, deserialized.BillToAddress.StreetName);
Assert.AreEqual(obj.CallbackUrl, deserialized.CallbackUrl);
Assert.AreEqual(obj.CancelledUrl, deserialized.CancelledUrl);
Assert.AreEqual(obj.ExpiredUrl, deserialized.ExpiredUrl);
Assert.AreEqual(obj.FailedUrl, deserialized.FailedUrl);
Assert.AreEqual(obj.InvoiceNumber, deserialized.InvoiceNumber);
Assert.AreEqual(obj.IpAddress, deserialized.IpAddress);
Assert.AreEqual(obj.Orderline?.Count(), deserialized.Orderline?.Count());
for(var orderlineIndex = 0; orderlineIndex < obj.Orderline.Count(); orderlineIndex++)
{
var expectedOrderLineInOrderline = obj.Orderline.ElementAt(orderlineIndex) as AfterPayDetailsRequest.OrderLine;
var actualOrderLineInOrderline = deserialized.Orderline.ElementAt(orderlineIndex) as AfterPayDetailsRequest.OrderLine;
Assert.AreEqual(expectedOrderLineInOrderline.ArticleDescription, actualOrderLineInOrderline.ArticleDescription);
Assert.AreEqual(expectedOrderLineInOrderline.ArticleId, actualOrderLineInOrderline.ArticleId);
Assert.AreEqual(expectedOrderLineInOrderline.NetUnitPrice, actualOrderLineInOrderline.NetUnitPrice);
Assert.AreEqual(expectedOrderLineInOrderline.Quantity, actualOrderLineInOrderline.Quantity);
Assert.AreEqual(expectedOrderLineInOrderline.UnitPrice, actualOrderLineInOrderline.UnitPrice);
Assert.AreEqual(expectedOrderLineInOrderline.VatCategory, actualOrderLineInOrderline.VatCategory);
}
Assert.AreEqual(obj.OrderNumber, deserialized.OrderNumber);
Assert.AreEqual(obj.Password, deserialized.Password);
Assert.AreEqual(obj.PortfolioId, deserialized.PortfolioId);
Assert.AreEqual(obj.PurchaseId, deserialized.PurchaseId);
Assert.AreEqual(obj.Result.Checksum, deserialized.Result.Checksum);
Assert.AreEqual(obj.Result.OrderReference, deserialized.Result.OrderReference);
Assert.AreEqual(obj.Result.ResultId, deserialized.Result.ResultId);
Assert.AreEqual(obj.Result.StatusCode, deserialized.Result.StatusCode);
Assert.AreEqual(obj.Result.TimestampIn, deserialized.Result.TimestampIn);
Assert.AreEqual(obj.Result.TimestampOut, deserialized.Result.TimestampOut);
Assert.AreEqual(obj.Result.TotalInvoicedAmount, deserialized.Result.TotalInvoicedAmount);
Assert.AreEqual(obj.Result.TotalReservedAmount, deserialized.Result.TotalReservedAmount);
Assert.AreEqual(obj.Result.TransactionId, deserialized.Result.TransactionId);
Assert.AreEqual(obj.ShipToAddress.City, deserialized.ShipToAddress.City);
Assert.AreEqual(obj.ShipToAddress.HouseNumber, deserialized.ShipToAddress.HouseNumber);
Assert.AreEqual(obj.ShipToAddress.HouseNumberAddition, deserialized.ShipToAddress.HouseNumberAddition);
Assert.AreEqual(obj.ShipToAddress.IsoCountryCode, deserialized.ShipToAddress.IsoCountryCode);
Assert.AreEqual(obj.ShipToAddress.PostalCode, deserialized.ShipToAddress.PostalCode);
// Check only date and time up to seconds.. Json.NET does not save milliseconds.
Assert.AreEqual(
new DateTime(obj.ShipToAddress.Reference.DateOfBirth.Year, obj.ShipToAddress.Reference.DateOfBirth.Month, obj.ShipToAddress.Reference.DateOfBirth.Day, obj.ShipToAddress.Reference.DateOfBirth.Hour, obj.ShipToAddress.Reference.DateOfBirth.Minute, obj.ShipToAddress.Reference.DateOfBirth.Second),
new DateTime(deserialized.ShipToAddress.Reference.DateOfBirth.Year, deserialized.ShipToAddress.Reference.DateOfBirth.Month, deserialized.ShipToAddress.Reference.DateOfBirth.Day, deserialized.ShipToAddress.Reference.DateOfBirth.Hour, deserialized.ShipToAddress.Reference.DateOfBirth.Minute, deserialized.ShipToAddress.Reference.DateOfBirth.Second));
Assert.AreEqual(obj.ShipToAddress.Reference.EmailAddress, deserialized.ShipToAddress.Reference.EmailAddress);
Assert.AreEqual(obj.ShipToAddress.Reference.Gender, deserialized.ShipToAddress.Reference.Gender);
Assert.AreEqual(obj.ShipToAddress.Reference.Initials, deserialized.ShipToAddress.Reference.Initials);
Assert.AreEqual(obj.ShipToAddress.Reference.IsoLanguage, deserialized.ShipToAddress.Reference.IsoLanguage);
Assert.AreEqual(obj.ShipToAddress.Reference.LastName, deserialized.ShipToAddress.Reference.LastName);
Assert.AreEqual(obj.ShipToAddress.Reference.PhoneNumber1, deserialized.ShipToAddress.Reference.PhoneNumber1);
Assert.AreEqual(obj.ShipToAddress.Reference.PhoneNumber2, deserialized.ShipToAddress.Reference.PhoneNumber2);
Assert.AreEqual(obj.ShipToAddress.Region, deserialized.ShipToAddress.Region);
Assert.AreEqual(obj.ShipToAddress.StreetName, deserialized.ShipToAddress.StreetName);
Assert.AreEqual(obj.SuccessUrl, deserialized.SuccessUrl);
Assert.AreEqual(obj.TotalOrderAmount, deserialized.TotalOrderAmount);
}
}
}
|
mit
|
chefspec/chefspec
|
spec/unit/matchers/state_attrs_matcher_spec.rb
|
2289
|
require "spec_helper"
describe ChefSpec::Matchers::StateAttrsMatcher do
subject { described_class.new(%i{a b}) }
context "when the resource does not exist" do
let(:resource) { nil }
before { subject.matches?(resource) }
it "does not match" do
expect(subject).to_not be_matches(resource)
end
it "has the correct description" do
expect(subject.description).to eq("have state attributes [:a, :b]")
end
it "has the correct failure message for should" do
expect(subject.failure_message).to include <<-EOH.gsub(/^ {8}/, "")
expected _something_ to have state attributes, but the _something_ you gave me was nil!
Ensure the resource exists before making assertions:
expect(resource).to be
EOH
end
it "has the correct failure message for should not" do
expect(subject.failure_message_when_negated).to include <<-EOH.gsub(/^ {8}/, "")
expected _something_ to not have state attributes, but the _something_ you gave me was nil!
Ensure the resource exists before making assertions:
expect(resource).to be
EOH
end
end
context "when the resource exists" do
let(:klass) { double("class", state_attrs: %i{a b}) }
let(:resource) { double("resource", class: klass) }
before { subject.matches?(resource) }
it "has the correct description" do
expect(subject.description).to eq("have state attributes [:a, :b]")
end
it "has the correct failure message for should" do
expect(subject.failure_message).to eq("expected [:a, :b] to equal [:a, :b]")
end
it "has the correct failure message for should not" do
expect(subject.failure_message_when_negated).to eq("expected [:a, :b] to not equal [:a, :b]")
end
it "matches when the state attributes are correct" do
expect(subject).to be_matches(resource)
end
it "does not match when the state attributes are incorrect" do
allow(klass).to receive(:state_attrs).and_return(%i{c d})
expect(subject).to_not be_matches(resource)
end
it "does not match when partial state attribute are incorrect" do
allow(klass).to receive(:state_attrs).and_return(%i{b c})
expect(subject).to_not be_matches(resource)
end
end
end
|
mit
|
soniar4i/Alood
|
src/MakerLabs/PagerBundle/Pager.php
|
4498
|
<?php
/*
* This file is part of the PagerBundle package.
*
* (c) Marcin Butlak <contact@maker-labs.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MakerLabs\PagerBundle;
use MakerLabs\PagerBundle\Adapter\PagerAdapterInterface;
/**
* Pager
*
* @author Marcin Butlak <contact@maker-labs.com>
*/
class Pager
{
/**
*
* @var integer
*/
protected $page = 1;
/**
*
* @var integer
*/
protected $limit = 20;
/**
* Constructor
*
* @param PagerAdapterInterface $adapter The pager adapter
* @param array $options Additional options
*/
public function __construct(PagerAdapterInterface $adapter, array $options = array())
{
$this->adapter = $adapter;
if (isset($options['limit'])) {
$this->setLimit($options['limit']);
}
if (isset($options['page'])) {
$this->setPage($options['page']);
}
}
/**
* Sets the current page number
*
* @param integer $page The current page number
* @return Pager instance
*/
public function setPage($page)
{
$this->page = min($page > 0 ? $page : $this->getFirstPage(), $this->getLastPage());
return $this;
}
/**
* Returns the current page number
*
* @return integer
*/
public function getPage()
{
return $this->page;
}
/**
* Sets the results limit for one page
*
* @param integer $limit
* @return Pager instance
*/
public function setLimit($limit)
{
$this->limit = $limit > 0 ? $limit : 1;
$this->setPage($this->page);
return $this;
}
/**
* Returns the current results limit for one page
*
* @return integer
*/
public function getLimit()
{
return $this->limit;
}
/**
* Returns the next page number
*
* @return integer
*/
public function getNextPage()
{
return $this->page < $this->getLastPage() ? $this->page + 1 : $this->getLastPage();
}
/**
* Returns the previous page number
*
* @return integer
*/
public function getPreviousPage()
{
return $this->page > $this->getFirstPage() ? $this->page - 1 : $this->getFirstPage();
}
/**
* Returns true if the current page is first
*
* @return boolean
*/
public function isFirstPage()
{
return $this->page == 1;
}
/**
* Returns the first page number
*
* @return integer
*/
public function getFirstPage()
{
return 1;
}
/**
* Returns true if the current page is last
*
* @return boolean
*/
public function isLastPage()
{
return $this->page == $this->getLastPage();
}
/**
* Returns the last page number
*
* @return integer
*/
public function getLastPage()
{
return $this->hasResults() ? ceil($this->adapter->count() / $this->limit) : $this->getFirstPage();
}
/**
* Returns true if the current result set requires pagination
*
* @return boolean
*/
public function isPaginable()
{
return $this->adapter->count() > $this->limit;
}
/**
* Generates a page list
*
* @param integer $pages Number of pages to generate
* @return array The page list
*/
public function getPages($pages = 10)
{
$tmp = $this->page - floor($pages / 2);
$begin = $tmp > $this->getFirstPage() ? $tmp : $this->getFirstPage();
$end = min($begin + $pages - 1, $this->getLastPage());
return range($begin, $end, 1);
}
/**
* Returns true if the current result set is not empty
*
* @return boolean
*/
public function hasResults()
{
return $this->adapter->count() > 0;
}
/**
*
* Returns results list for the current page and limit
*
* @return array
*/
public function getResults()
{
return $this->hasResults() ? $this->adapter->getResults(($this->page - 1) * $this->limit, $this->limit) : array();
}
/**
* Returns the current adapter instance
*
* @return PagerAdapterInterface
*/
public function getAdapter()
{
return $this->adapter;
}
}
|
mit
|
boggad/jdk9-sample
|
sample-catalog/spring-jdk9/src/spring.aop/org/springframework/aop/config/AbstractInterceptorDrivenBeanDefinitionDecorator.java
|
5744
|
/*
* Copyright 2002-2016 the original author or authors.
*
* 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 org.springframework.aop.config;
import java.util.List;
import org.w3c.dom.Node;
import org.springframework.aop.framework.ProxyFactoryBean;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionReaderUtils;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.ManagedList;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.beans.factory.xml.BeanDefinitionDecorator;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
/**
* Base implementation for
* {@link org.springframework.beans.factory.xml.BeanDefinitionDecorator BeanDefinitionDecorators}
* wishing to add an {@link org.aopalliance.intercept.MethodInterceptor interceptor}
* to the resulting bean.
*
* <p>This base class controls the creation of the {@link ProxyFactoryBean} bean definition
* and wraps the original as an inner-bean definition for the {@code target} property
* of {@link ProxyFactoryBean}.
*
* <p>Chaining is correctly handled, ensuring that only one {@link ProxyFactoryBean} definition
* is created. If a previous {@link org.springframework.beans.factory.xml.BeanDefinitionDecorator}
* already created the {@link org.springframework.aop.framework.ProxyFactoryBean} then the
* interceptor is simply added to the existing definition.
*
* <p>Subclasses have only to create the {@code BeanDefinition} to the interceptor that
* they wish to add.
*
* @author Rob Harrop
* @author Juergen Hoeller
* @since 2.0
* @see org.aopalliance.intercept.MethodInterceptor
*/
public abstract class AbstractInterceptorDrivenBeanDefinitionDecorator implements BeanDefinitionDecorator {
@Override
public final BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder definitionHolder, ParserContext parserContext) {
BeanDefinitionRegistry registry = parserContext.getRegistry();
// get the root bean name - will be the name of the generated proxy factory bean
String existingBeanName = definitionHolder.getBeanName();
BeanDefinition targetDefinition = definitionHolder.getBeanDefinition();
BeanDefinitionHolder targetHolder = new BeanDefinitionHolder(targetDefinition, existingBeanName + ".TARGET");
// delegate to subclass for interceptor definition
BeanDefinition interceptorDefinition = createInterceptorDefinition(node);
// generate name and register the interceptor
String interceptorName = existingBeanName + '.' + getInterceptorNameSuffix(interceptorDefinition);
BeanDefinitionReaderUtils.registerBeanDefinition(
new BeanDefinitionHolder(interceptorDefinition, interceptorName), registry);
BeanDefinitionHolder result = definitionHolder;
if (!isProxyFactoryBeanDefinition(targetDefinition)) {
// create the proxy definition
RootBeanDefinition proxyDefinition = new RootBeanDefinition();
// create proxy factory bean definition
proxyDefinition.setBeanClass(ProxyFactoryBean.class);
proxyDefinition.setScope(targetDefinition.getScope());
proxyDefinition.setLazyInit(targetDefinition.isLazyInit());
// set the target
proxyDefinition.setDecoratedDefinition(targetHolder);
proxyDefinition.getPropertyValues().add("target", targetHolder);
// create the interceptor names list
proxyDefinition.getPropertyValues().add("interceptorNames", new ManagedList<String>());
// copy autowire settings from original bean definition.
proxyDefinition.setAutowireCandidate(targetDefinition.isAutowireCandidate());
proxyDefinition.setPrimary(targetDefinition.isPrimary());
if (targetDefinition instanceof AbstractBeanDefinition) {
proxyDefinition.copyQualifiersFrom((AbstractBeanDefinition) targetDefinition);
}
// wrap it in a BeanDefinitionHolder with bean name
result = new BeanDefinitionHolder(proxyDefinition, existingBeanName);
}
addInterceptorNameToList(interceptorName, result.getBeanDefinition());
return result;
}
@SuppressWarnings("unchecked")
private void addInterceptorNameToList(String interceptorName, BeanDefinition beanDefinition) {
List<String> list = (List<String>)
beanDefinition.getPropertyValues().getPropertyValue("interceptorNames").getValue();
list.add(interceptorName);
}
private boolean isProxyFactoryBeanDefinition(BeanDefinition existingDefinition) {
return ProxyFactoryBean.class.getName().equals(existingDefinition.getBeanClassName());
}
protected String getInterceptorNameSuffix(BeanDefinition interceptorDefinition) {
return StringUtils.uncapitalize(ClassUtils.getShortName(interceptorDefinition.getBeanClassName()));
}
/**
* Subclasses should implement this method to return the {@code BeanDefinition}
* for the interceptor they wish to apply to the bean being decorated.
*/
protected abstract BeanDefinition createInterceptorDefinition(Node node);
}
|
mit
|
ruleless/CEGUI
|
samples/Tree/Tree.h
|
2307
|
/************************************************************************
created: 10/17/2004
author: David Durant (based on code by Paul D Turner)
*************************************************************************/
/***************************************************************************
* Copyright (C) 2004 - 2009 Paul D Turner & The CEGUI Development Team
*
* 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 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.
***************************************************************************/
#ifndef _Sample_TreeSample_h_
#define _Sample_TreeSample_h_
#include "SampleBase.h"
#include "CEGUI/CEGUI.h"
class TreeSample : public Sample
{
public:
TreeSample();
// method to initialise the samples windows and events.
virtual bool initialise(CEGUI::GUIContext* guiContext);
// method to perform any required cleanup operations.
virtual void deinitialise();
protected:
CEGUI::Window* d_rootWindow;
static const unsigned int TreeID;
static const unsigned int EditBoxID;
bool handleEventSelectionChanged(const CEGUI::EventArgs& args);
bool handleEventSubtreeExpanded(const CEGUI::EventArgs& args);
bool handleEventSubtreeCollapsed(const CEGUI::EventArgs& args);
};
#endif // end of guard _Sample_TreeSample_h_
|
mit
|
bburnichon/PHPExiftool
|
lib/PHPExiftool/Driver/Tag/DICOM/UPSProgressInformationSequence.php
|
844
|
<?php
/*
* This file is part of the PHPExifTool package.
*
* (c) Alchemy <support@alchemy.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\DICOM;
use JMS\Serializer\Annotation\ExclusionPolicy;
use PHPExiftool\Driver\AbstractTag;
/**
* @ExclusionPolicy("all")
*/
class UPSProgressInformationSequence extends AbstractTag
{
protected $Id = '0074,1002';
protected $Name = 'UPSProgressInformationSequence';
protected $FullName = 'DICOM::Main';
protected $GroupName = 'DICOM';
protected $g0 = 'DICOM';
protected $g1 = 'DICOM';
protected $g2 = 'Image';
protected $Type = '?';
protected $Writable = false;
protected $Description = 'UPS Progress Information Sequence';
}
|
mit
|
exercism/xgo
|
exercises/luhn/example.go
|
461
|
package luhn
import "strings"
func Valid(id string) bool {
if len(strings.TrimSpace(id)) == 1 {
return false
}
d := make([]int, 0, len(id))
for _, r := range id {
if r == ' ' {
continue
}
if r < '0' || r > '9' {
return false
}
d = append(d, int(r-'0'))
}
return sum(d)%10 == 0
}
func sum(d []int) (s int) {
for i, x := range d {
j := len(d) - i
if j%2 == 0 {
x *= 2
if x > 9 {
x -= 9
}
}
s += x
}
return
}
|
mit
|
nanobox-io/nanobox-pkgsrc-base
|
php54/patches/patch-ext_standard_basic__functions.c
|
553
|
$NetBSD: patch-ext_standard_basic__functions.c,v 1.1 2012/06/16 05:21:55 taca Exp $
Work around VAX FP lack of INF
--- ext/standard/basic_functions.c.orig 2012-05-08 05:22:56.000000000 +0000
+++ ext/standard/basic_functions.c
@@ -3498,7 +3498,7 @@ PHPAPI double php_get_nan(void) /* {{{ *
PHPAPI double php_get_inf(void) /* {{{ */
{
-#if HAVE_HUGE_VAL_INF
+#if defined(HAVE_HUGE_VAL_INF) || defined(__vax__)
return HUGE_VAL;
#elif defined(__i386__) || defined(_X86_) || defined(ALPHA) || defined(_ALPHA) || defined(__alpha)
double val = 0.0;
|
mit
|
spadin/coverphoto
|
node_modules/grunt-contrib/node_modules/grunt-contrib-yuidoc/node_modules/yuidocjs/node_modules/yui/node-base/node-base-debug.js
|
33629
|
/*
YUI 3.7.2 (build 5639)
Copyright 2012 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('node-base', function (Y, NAME) {
/**
* @module node
* @submodule node-base
*/
var methods = [
/**
* Determines whether each node has the given className.
* @method hasClass
* @for Node
* @param {String} className the class name to search for
* @return {Boolean} Whether or not the element has the specified class
*/
'hasClass',
/**
* Adds a class name to each node.
* @method addClass
* @param {String} className the class name to add to the node's class attribute
* @chainable
*/
'addClass',
/**
* Removes a class name from each node.
* @method removeClass
* @param {String} className the class name to remove from the node's class attribute
* @chainable
*/
'removeClass',
/**
* Replace a class with another class for each node.
* If no oldClassName is present, the newClassName is simply added.
* @method replaceClass
* @param {String} oldClassName the class name to be replaced
* @param {String} newClassName the class name that will be replacing the old class name
* @chainable
*/
'replaceClass',
/**
* If the className exists on the node it is removed, if it doesn't exist it is added.
* @method toggleClass
* @param {String} className the class name to be toggled
* @param {Boolean} force Option to force adding or removing the class.
* @chainable
*/
'toggleClass'
];
Y.Node.importMethod(Y.DOM, methods);
/**
* Determines whether each node has the given className.
* @method hasClass
* @see Node.hasClass
* @for NodeList
* @param {String} className the class name to search for
* @return {Array} An array of booleans for each node bound to the NodeList.
*/
/**
* Adds a class name to each node.
* @method addClass
* @see Node.addClass
* @param {String} className the class name to add to the node's class attribute
* @chainable
*/
/**
* Removes a class name from each node.
* @method removeClass
* @see Node.removeClass
* @param {String} className the class name to remove from the node's class attribute
* @chainable
*/
/**
* Replace a class with another class for each node.
* If no oldClassName is present, the newClassName is simply added.
* @method replaceClass
* @see Node.replaceClass
* @param {String} oldClassName the class name to be replaced
* @param {String} newClassName the class name that will be replacing the old class name
* @chainable
*/
/**
* If the className exists on the node it is removed, if it doesn't exist it is added.
* @method toggleClass
* @see Node.toggleClass
* @param {String} className the class name to be toggled
* @chainable
*/
Y.NodeList.importMethod(Y.Node.prototype, methods);
/**
* @module node
* @submodule node-base
*/
var Y_Node = Y.Node,
Y_DOM = Y.DOM;
/**
* Returns a new dom node using the provided markup string.
* @method create
* @static
* @param {String} html The markup used to create the element
* Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a>
* to escape html content.
* @param {HTMLDocument} doc An optional document context
* @return {Node} A Node instance bound to a DOM node or fragment
* @for Node
*/
Y_Node.create = function(html, doc) {
if (doc && doc._node) {
doc = doc._node;
}
return Y.one(Y_DOM.create(html, doc));
};
Y.mix(Y_Node.prototype, {
/**
* Creates a new Node using the provided markup string.
* @method create
* @param {String} html The markup used to create the element.
* Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a>
* to escape html content.
* @param {HTMLDocument} doc An optional document context
* @return {Node} A Node instance bound to a DOM node or fragment
*/
create: Y_Node.create,
/**
* Inserts the content before the reference node.
* @method insert
* @param {String | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert
* Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a>
* to escape html content.
* @param {Int | Node | HTMLElement | String} where The position to insert at.
* Possible "where" arguments
* <dl>
* <dt>Y.Node</dt>
* <dd>The Node to insert before</dd>
* <dt>HTMLElement</dt>
* <dd>The element to insert before</dd>
* <dt>Int</dt>
* <dd>The index of the child element to insert before</dd>
* <dt>"replace"</dt>
* <dd>Replaces the existing HTML</dd>
* <dt>"before"</dt>
* <dd>Inserts before the existing HTML</dd>
* <dt>"before"</dt>
* <dd>Inserts content before the node</dd>
* <dt>"after"</dt>
* <dd>Inserts content after the node</dd>
* </dl>
* @chainable
*/
insert: function(content, where) {
this._insert(content, where);
return this;
},
_insert: function(content, where) {
var node = this._node,
ret = null;
if (typeof where == 'number') { // allow index
where = this._node.childNodes[where];
} else if (where && where._node) { // Node
where = where._node;
}
if (content && typeof content != 'string') { // allow Node or NodeList/Array instances
content = content._node || content._nodes || content;
}
ret = Y_DOM.addHTML(node, content, where);
return ret;
},
/**
* Inserts the content as the firstChild of the node.
* @method prepend
* @param {String | Node | HTMLElement} content The content to insert
* Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a>
* to escape html content.
* @chainable
*/
prepend: function(content) {
return this.insert(content, 0);
},
/**
* Inserts the content as the lastChild of the node.
* @method append
* @param {String | Node | HTMLElement} content The content to insert
* Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a>
* to escape html content.
* @chainable
*/
append: function(content) {
return this.insert(content, null);
},
/**
* @method appendChild
* @param {String | HTMLElement | Node} node Node to be appended
* Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a>
* to escape html content.
* @return {Node} The appended node
*/
appendChild: function(node) {
return Y_Node.scrubVal(this._insert(node));
},
/**
* @method insertBefore
* @param {String | HTMLElement | Node} newNode Node to be appended
* @param {HTMLElement | Node} refNode Node to be inserted before
* Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a>
* to escape html content.
* @return {Node} The inserted node
*/
insertBefore: function(newNode, refNode) {
return Y.Node.scrubVal(this._insert(newNode, refNode));
},
/**
* Appends the node to the given node.
* @method appendTo
* @param {Node | HTMLElement} node The node to append to
* @chainable
*/
appendTo: function(node) {
Y.one(node).append(this);
return this;
},
/**
* Replaces the node's current content with the content.
* Note that this passes to innerHTML and is not escaped.
* Use <a href="../classes/Escape.html#method_html">`Y.Escape.html()`</a>
* to escape html content or `set('text')` to add as text.
* @method setContent
* @deprecated Use setHTML
* @param {String | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert
* @chainable
*/
setContent: function(content) {
this._insert(content, 'replace');
return this;
},
/**
* Returns the node's current content (e.g. innerHTML)
* @method getContent
* @deprecated Use getHTML
* @return {String} The current content
*/
getContent: function(content) {
return this.get('innerHTML');
}
});
/**
* Replaces the node's current html content with the content provided.
* Note that this passes to innerHTML and is not escaped.
* Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
* @method setHTML
* @param {String | HTML | Node | HTMLElement | NodeList | HTMLCollection} content The content to insert
* @chainable
*/
Y.Node.prototype.setHTML = Y.Node.prototype.setContent;
/**
* Returns the node's current html content (e.g. innerHTML)
* @method getHTML
* @return {String} The html content
*/
Y.Node.prototype.getHTML = Y.Node.prototype.getContent;
Y.NodeList.importMethod(Y.Node.prototype, [
/**
* Called on each Node instance
* @for NodeList
* @method append
* @see Node.append
*/
'append',
/**
* Called on each Node instance
* @for NodeList
* @method insert
* @see Node.insert
*/
'insert',
/**
* Called on each Node instance
* @for NodeList
* @method appendChild
* @see Node.appendChild
*/
'appendChild',
/**
* Called on each Node instance
* @for NodeList
* @method insertBefore
* @see Node.insertBefore
*/
'insertBefore',
/**
* Called on each Node instance
* @for NodeList
* @method prepend
* @see Node.prepend
*/
'prepend',
/**
* Called on each Node instance
* Note that this passes to innerHTML and is not escaped.
* Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
* @for NodeList
* @method setContent
* @deprecated Use setHTML
*/
'setContent',
/**
* Called on each Node instance
* @for NodeList
* @method getContent
* @deprecated Use getHTML
*/
'getContent',
/**
* Called on each Node instance
* Note that this passes to innerHTML and is not escaped.
* Use `Y.Escape.html()` to escape HTML, or `set('text')` to add as text.
* @for NodeList
* @method setHTML
* @see Node.setHTML
*/
'setHTML',
/**
* Called on each Node instance
* @for NodeList
* @method getHTML
* @see Node.getHTML
*/
'getHTML'
]);
/**
* @module node
* @submodule node-base
*/
var Y_Node = Y.Node,
Y_DOM = Y.DOM;
/**
* Static collection of configuration attributes for special handling
* @property ATTRS
* @static
* @type object
*/
Y_Node.ATTRS = {
/**
* Allows for getting and setting the text of an element.
* Formatting is preserved and special characters are treated literally.
* @config text
* @type String
*/
text: {
getter: function() {
return Y_DOM.getText(this._node);
},
setter: function(content) {
Y_DOM.setText(this._node, content);
return content;
}
},
/**
* Allows for getting and setting the text of an element.
* Formatting is preserved and special characters are treated literally.
* @config for
* @type String
*/
'for': {
getter: function() {
return Y_DOM.getAttribute(this._node, 'for');
},
setter: function(val) {
Y_DOM.setAttribute(this._node, 'for', val);
return val;
}
},
'options': {
getter: function() {
return this._node.getElementsByTagName('option');
}
},
/**
* Returns a NodeList instance of all HTMLElement children.
* @readOnly
* @config children
* @type NodeList
*/
'children': {
getter: function() {
var node = this._node,
children = node.children,
childNodes, i, len;
if (!children) {
childNodes = node.childNodes;
children = [];
for (i = 0, len = childNodes.length; i < len; ++i) {
if (childNodes[i].tagName) {
children[children.length] = childNodes[i];
}
}
}
return Y.all(children);
}
},
value: {
getter: function() {
return Y_DOM.getValue(this._node);
},
setter: function(val) {
Y_DOM.setValue(this._node, val);
return val;
}
}
};
Y.Node.importMethod(Y.DOM, [
/**
* Allows setting attributes on DOM nodes, normalizing in some cases.
* This passes through to the DOM node, allowing for custom attributes.
* @method setAttribute
* @for Node
* @for NodeList
* @chainable
* @param {string} name The attribute name
* @param {string} value The value to set
*/
'setAttribute',
/**
* Allows getting attributes on DOM nodes, normalizing in some cases.
* This passes through to the DOM node, allowing for custom attributes.
* @method getAttribute
* @for Node
* @for NodeList
* @param {string} name The attribute name
* @return {string} The attribute value
*/
'getAttribute'
]);
/**
* @module node
* @submodule node-base
*/
var Y_Node = Y.Node;
var Y_NodeList = Y.NodeList;
/**
* List of events that route to DOM events
* @static
* @property DOM_EVENTS
* @for Node
*/
Y_Node.DOM_EVENTS = {
abort: 1,
beforeunload: 1,
blur: 1,
change: 1,
click: 1,
close: 1,
command: 1,
contextmenu: 1,
dblclick: 1,
DOMMouseScroll: 1,
drag: 1,
dragstart: 1,
dragenter: 1,
dragover: 1,
dragleave: 1,
dragend: 1,
drop: 1,
error: 1,
focus: 1,
key: 1,
keydown: 1,
keypress: 1,
keyup: 1,
load: 1,
message: 1,
mousedown: 1,
mouseenter: 1,
mouseleave: 1,
mousemove: 1,
mousemultiwheel: 1,
mouseout: 1,
mouseover: 1,
mouseup: 1,
mousewheel: 1,
orientationchange: 1,
reset: 1,
resize: 1,
select: 1,
selectstart: 1,
submit: 1,
scroll: 1,
textInput: 1,
unload: 1
};
// Add custom event adaptors to this list. This will make it so
// that delegate, key, available, contentready, etc all will
// be available through Node.on
Y.mix(Y_Node.DOM_EVENTS, Y.Env.evt.plugins);
Y.augment(Y_Node, Y.EventTarget);
Y.mix(Y_Node.prototype, {
/**
* Removes event listeners from the node and (optionally) its subtree
* @method purge
* @param {Boolean} recurse (optional) Whether or not to remove listeners from the
* node's subtree
* @param {String} type (optional) Only remove listeners of the specified type
* @chainable
*
*/
purge: function(recurse, type) {
Y.Event.purgeElement(this._node, recurse, type);
return this;
}
});
Y.mix(Y.NodeList.prototype, {
_prepEvtArgs: function(type, fn, context) {
// map to Y.on/after signature (type, fn, nodes, context, arg1, arg2, etc)
var args = Y.Array(arguments, 0, true);
if (args.length < 2) { // type only (event hash) just add nodes
args[2] = this._nodes;
} else {
args.splice(2, 0, this._nodes);
}
args[3] = context || this; // default to NodeList instance as context
return args;
},
/**
Subscribe a callback function for each `Node` in the collection to execute
in response to a DOM event.
NOTE: Generally, the `on()` method should be avoided on `NodeLists`, in
favor of using event delegation from a parent Node. See the Event user
guide for details.
Most DOM events are associated with a preventable default behavior, such as
link clicks navigating to a new page. Callbacks are passed a
`DOMEventFacade` object as their first argument (usually called `e`) that
can be used to prevent this default behavior with `e.preventDefault()`. See
the `DOMEventFacade` API for all available properties and methods on the
object.
By default, the `this` object will be the `NodeList` that the subscription
came from, <em>not the `Node` that received the event</em>. Use
`e.currentTarget` to refer to the `Node`.
Returning `false` from a callback is supported as an alternative to calling
`e.preventDefault(); e.stopPropagation();`. However, it is recommended to
use the event methods.
@example
Y.all(".sku").on("keydown", function (e) {
if (e.keyCode === 13) {
e.preventDefault();
// Use e.currentTarget to refer to the individual Node
var item = Y.MyApp.searchInventory( e.currentTarget.get('value') );
// etc ...
}
});
@method on
@param {String} type The name of the event
@param {Function} fn The callback to execute in response to the event
@param {Object} [context] Override `this` object in callback
@param {Any} [arg*] 0..n additional arguments to supply to the subscriber
@return {EventHandle} A subscription handle capable of detaching that
subscription
@for NodeList
**/
on: function(type, fn, context) {
return Y.on.apply(Y, this._prepEvtArgs.apply(this, arguments));
},
/**
* Applies an one-time event listener to each Node bound to the NodeList.
* @method once
* @param {String} type The event being listened for
* @param {Function} fn The handler to call when the event fires
* @param {Object} context The context to call the handler with.
* Default is the NodeList instance.
* @return {EventHandle} A subscription handle capable of detaching that
* subscription
* @for NodeList
*/
once: function(type, fn, context) {
return Y.once.apply(Y, this._prepEvtArgs.apply(this, arguments));
},
/**
* Applies an event listener to each Node bound to the NodeList.
* The handler is called only after all on() handlers are called
* and the event is not prevented.
* @method after
* @param {String} type The event being listened for
* @param {Function} fn The handler to call when the event fires
* @param {Object} context The context to call the handler with.
* Default is the NodeList instance.
* @return {EventHandle} A subscription handle capable of detaching that
* subscription
* @for NodeList
*/
after: function(type, fn, context) {
return Y.after.apply(Y, this._prepEvtArgs.apply(this, arguments));
},
/**
* Applies an one-time event listener to each Node bound to the NodeList
* that will be called only after all on() handlers are called and the
* event is not prevented.
*
* @method onceAfter
* @param {String} type The event being listened for
* @param {Function} fn The handler to call when the event fires
* @param {Object} context The context to call the handler with.
* Default is the NodeList instance.
* @return {EventHandle} A subscription handle capable of detaching that
* subscription
* @for NodeList
*/
onceAfter: function(type, fn, context) {
return Y.onceAfter.apply(Y, this._prepEvtArgs.apply(this, arguments));
}
});
Y_NodeList.importMethod(Y.Node.prototype, [
/**
* Called on each Node instance
* @method detach
* @see Node.detach
* @for NodeList
*/
'detach',
/** Called on each Node instance
* @method detachAll
* @see Node.detachAll
* @for NodeList
*/
'detachAll'
]);
/**
Subscribe a callback function to execute in response to a DOM event or custom
event.
Most DOM events are associated with a preventable default behavior such as
link clicks navigating to a new page. Callbacks are passed a `DOMEventFacade`
object as their first argument (usually called `e`) that can be used to
prevent this default behavior with `e.preventDefault()`. See the
`DOMEventFacade` API for all available properties and methods on the object.
If the event name passed as the first parameter is not a whitelisted DOM event,
it will be treated as a custom event subscriptions, allowing
`node.fire('customEventName')` later in the code. Refer to the Event user guide
for the full DOM event whitelist.
By default, the `this` object in the callback will refer to the subscribed
`Node`.
Returning `false` from a callback is supported as an alternative to calling
`e.preventDefault(); e.stopPropagation();`. However, it is recommended to use
the event methods.
@example
Y.one("#my-form").on("submit", function (e) {
e.preventDefault();
// proceed with ajax form submission instead...
});
@method on
@param {String} type The name of the event
@param {Function} fn The callback to execute in response to the event
@param {Object} [context] Override `this` object in callback
@param {Any} [arg*] 0..n additional arguments to supply to the subscriber
@return {EventHandle} A subscription handle capable of detaching that
subscription
@for Node
**/
Y.mix(Y.Node.ATTRS, {
offsetHeight: {
setter: function(h) {
Y.DOM.setHeight(this._node, h);
return h;
},
getter: function() {
return this._node.offsetHeight;
}
},
offsetWidth: {
setter: function(w) {
Y.DOM.setWidth(this._node, w);
return w;
},
getter: function() {
return this._node.offsetWidth;
}
}
});
Y.mix(Y.Node.prototype, {
sizeTo: function(w, h) {
var node;
if (arguments.length < 2) {
node = Y.one(w);
w = node.get('offsetWidth');
h = node.get('offsetHeight');
}
this.setAttrs({
offsetWidth: w,
offsetHeight: h
});
}
});
/**
* @module node
* @submodule node-base
*/
var Y_Node = Y.Node;
Y.mix(Y_Node.prototype, {
/**
* Makes the node visible.
* If the "transition" module is loaded, show optionally
* animates the showing of the node using either the default
* transition effect ('fadeIn'), or the given named effect.
* @method show
* @for Node
* @param {String} name A named Transition effect to use as the show effect.
* @param {Object} config Options to use with the transition.
* @param {Function} callback An optional function to run after the transition completes.
* @chainable
*/
show: function(callback) {
callback = arguments[arguments.length - 1];
this.toggleView(true, callback);
return this;
},
/**
* The implementation for showing nodes.
* Default is to toggle the style.display property.
* @method _show
* @protected
* @chainable
*/
_show: function() {
this.setStyle('display', '');
},
_isHidden: function() {
return Y.DOM.getStyle(this._node, 'display') === 'none';
},
/**
* Displays or hides the node.
* If the "transition" module is loaded, toggleView optionally
* animates the toggling of the node using either the default
* transition effect ('fadeIn'), or the given named effect.
* @method toggleView
* @for Node
* @param {Boolean} [on] An optional boolean value to force the node to be shown or hidden
* @param {Function} [callback] An optional function to run after the transition completes.
* @chainable
*/
toggleView: function(on, callback) {
this._toggleView.apply(this, arguments);
return this;
},
_toggleView: function(on, callback) {
callback = arguments[arguments.length - 1];
// base on current state if not forcing
if (typeof on != 'boolean') {
on = (this._isHidden()) ? 1 : 0;
}
if (on) {
this._show();
} else {
this._hide();
}
if (typeof callback == 'function') {
callback.call(this);
}
return this;
},
/**
* Hides the node.
* If the "transition" module is loaded, hide optionally
* animates the hiding of the node using either the default
* transition effect ('fadeOut'), or the given named effect.
* @method hide
* @param {String} name A named Transition effect to use as the show effect.
* @param {Object} config Options to use with the transition.
* @param {Function} callback An optional function to run after the transition completes.
* @chainable
*/
hide: function(callback) {
callback = arguments[arguments.length - 1];
this.toggleView(false, callback);
return this;
},
/**
* The implementation for hiding nodes.
* Default is to toggle the style.display property.
* @method _hide
* @protected
* @chainable
*/
_hide: function() {
this.setStyle('display', 'none');
}
});
Y.NodeList.importMethod(Y.Node.prototype, [
/**
* Makes each node visible.
* If the "transition" module is loaded, show optionally
* animates the showing of the node using either the default
* transition effect ('fadeIn'), or the given named effect.
* @method show
* @param {String} name A named Transition effect to use as the show effect.
* @param {Object} config Options to use with the transition.
* @param {Function} callback An optional function to run after the transition completes.
* @for NodeList
* @chainable
*/
'show',
/**
* Hides each node.
* If the "transition" module is loaded, hide optionally
* animates the hiding of the node using either the default
* transition effect ('fadeOut'), or the given named effect.
* @method hide
* @param {String} name A named Transition effect to use as the show effect.
* @param {Object} config Options to use with the transition.
* @param {Function} callback An optional function to run after the transition completes.
* @chainable
*/
'hide',
/**
* Displays or hides each node.
* If the "transition" module is loaded, toggleView optionally
* animates the toggling of the nodes using either the default
* transition effect ('fadeIn'), or the given named effect.
* @method toggleView
* @param {Boolean} [on] An optional boolean value to force the nodes to be shown or hidden
* @param {Function} [callback] An optional function to run after the transition completes.
* @chainable
*/
'toggleView'
]);
if (!Y.config.doc.documentElement.hasAttribute) { // IE < 8
Y.Node.prototype.hasAttribute = function(attr) {
if (attr === 'value') {
if (this.get('value') !== "") { // IE < 8 fails to populate specified when set in HTML
return true;
}
}
return !!(this._node.attributes[attr] &&
this._node.attributes[attr].specified);
};
}
// IE throws an error when calling focus() on an element that's invisible, not
// displayed, or disabled.
Y.Node.prototype.focus = function () {
try {
this._node.focus();
} catch (e) {
Y.log('error focusing node: ' + e.toString(), 'error', 'node');
}
return this;
};
// IE throws error when setting input.type = 'hidden',
// input.setAttribute('type', 'hidden') and input.attributes.type.value = 'hidden'
Y.Node.ATTRS.type = {
setter: function(val) {
if (val === 'hidden') {
try {
this._node.type = 'hidden';
} catch(e) {
this.setStyle('display', 'none');
this._inputType = 'hidden';
}
} else {
try { // IE errors when changing the type from "hidden'
this._node.type = val;
} catch (e) {
Y.log('error setting type: ' + val, 'info', 'node');
}
}
return val;
},
getter: function() {
return this._inputType || this._node.type;
},
_bypassProxy: true // don't update DOM when using with Attribute
};
if (Y.config.doc.createElement('form').elements.nodeType) {
// IE: elements collection is also FORM node which trips up scrubVal.
Y.Node.ATTRS.elements = {
getter: function() {
return this.all('input, textarea, button, select');
}
};
}
/**
* Provides methods for managing custom Node data.
*
* @module node
* @main node
* @submodule node-data
*/
Y.mix(Y.Node.prototype, {
_initData: function() {
if (! ('_data' in this)) {
this._data = {};
}
},
/**
* @method getData
* @for Node
* @description Retrieves arbitrary data stored on a Node instance.
* If no data is associated with the Node, it will attempt to retrieve
* a value from the corresponding HTML data attribute. (e.g. node.getData('foo')
* will check node.getAttribute('data-foo')).
* @param {string} name Optional name of the data field to retrieve.
* If no name is given, all data is returned.
* @return {any | Object} Whatever is stored at the given field,
* or an object hash of all fields.
*/
getData: function(name) {
this._initData();
var data = this._data,
ret = data;
if (arguments.length) { // single field
if (name in data) {
ret = data[name];
} else { // initialize from HTML attribute
ret = this._getDataAttribute(name);
}
} else if (typeof data == 'object' && data !== null) { // all fields
ret = {};
Y.Object.each(data, function(v, n) {
ret[n] = v;
});
ret = this._getDataAttributes(ret);
}
return ret;
},
_getDataAttributes: function(ret) {
ret = ret || {};
var i = 0,
attrs = this._node.attributes,
len = attrs.length,
prefix = this.DATA_PREFIX,
prefixLength = prefix.length,
name;
while (i < len) {
name = attrs[i].name;
if (name.indexOf(prefix) === 0) {
name = name.substr(prefixLength);
if (!(name in ret)) { // only merge if not already stored
ret[name] = this._getDataAttribute(name);
}
}
i += 1;
}
return ret;
},
_getDataAttribute: function(name) {
var name = this.DATA_PREFIX + name,
node = this._node,
attrs = node.attributes,
data = attrs && attrs[name] && attrs[name].value;
return data;
},
/**
* @method setData
* @for Node
* @description Stores arbitrary data on a Node instance.
* This is not stored with the DOM node.
* @param {string} name The name of the field to set. If no val
* is given, name is treated as the data and overrides any existing data.
* @param {any} val The value to be assigned to the field.
* @chainable
*/
setData: function(name, val) {
this._initData();
if (arguments.length > 1) {
this._data[name] = val;
} else {
this._data = name;
}
return this;
},
/**
* @method clearData
* @for Node
* @description Clears internally stored data.
* @param {string} name The name of the field to clear. If no name
* is given, all data is cleared.
* @chainable
*/
clearData: function(name) {
if ('_data' in this) {
if (typeof name != 'undefined') {
delete this._data[name];
} else {
delete this._data;
}
}
return this;
}
});
Y.mix(Y.NodeList.prototype, {
/**
* @method getData
* @for NodeList
* @description Retrieves arbitrary data stored on each Node instance
* bound to the NodeList.
* @see Node
* @param {string} name Optional name of the data field to retrieve.
* If no name is given, all data is returned.
* @return {Array} An array containing all of the data for each Node instance.
* or an object hash of all fields.
*/
getData: function(name) {
var args = (arguments.length) ? [name] : [];
return this._invoke('getData', args, true);
},
/**
* @method setData
* @for NodeList
* @description Stores arbitrary data on each Node instance bound to the
* NodeList. This is not stored with the DOM node.
* @param {string} name The name of the field to set. If no name
* is given, name is treated as the data and overrides any existing data.
* @param {any} val The value to be assigned to the field.
* @chainable
*/
setData: function(name, val) {
var args = (arguments.length > 1) ? [name, val] : [name];
return this._invoke('setData', args);
},
/**
* @method clearData
* @for NodeList
* @description Clears data on all Node instances bound to the NodeList.
* @param {string} name The name of the field to clear. If no name
* is given, all data is cleared.
* @chainable
*/
clearData: function(name) {
var args = (arguments.length) ? [name] : [];
return this._invoke('clearData', [name]);
}
});
}, '3.7.2', {"requires": ["event-base", "node-core", "dom-base"]});
|
mit
|
mdpiper/topoflow
|
topoflow/utils/cfg_files.py
|
12732
|
## Copyright (c) 2001-2010, Scott D. Peckham
## January 2009 (converted from IDL)
## November 2009 (collected into cfg_files.py
## May 2010 (added read_key_value_pair())
## July 2010 (added read_list()
import numpy
#---------------------------------------------------------------------
#
# unit_test()
#
# skip_header()
# get_yes_words()
# read_words()
# read_list() # (7/27/10)
#
# read_key_value_pair() # (5/7/10)
# read_line_after_key()
# read_words_after_key()
# read_list_after_key()
# read_value()
#
# var_type_code()
# read_input_option()
# read_output_option() # (boolean and string)
#
#---------------------------------------------------------------------
def unit_test():
import d8_base
comp = d8_base.d8_component()
#------------------------------
comp.CCA = False
comp.directory = '/Applications/Erode/Data/Test1/'
comp.data_prefix = 'Test1'
comp.case_prefix = 'Test1'
comp.read_config_file()
print 'comp.method =', comp.method
print 'comp.method_name =', comp.method_name
print 'comp.dt =', comp.dt
print 'comp.dt.dtype =', comp.dt.dtype
print 'comp.LINK_FLATS =', comp.LINK_FLATS
print 'comp.LR_PERIODIC =', comp.LR_PERIODIC
print 'comp.TB_PERIODIC =', comp.TB_PERIODIC
print 'comp.SAVE_DW_PIXELS =', comp.SAVE_DW_PIXELS
print 'Finished with cfg_files.unit_test().'
print ' '
# unit_test()
#---------------------------------------------------------------------
def skip_header(file_unit, n_lines=4):
#-------------------------
# Skip over header lines
#-------------------------
for k in xrange(n_lines):
line = file_unit.readline()
# skip_header()
#---------------------------------------------------------------------
def get_yes_words():
yes_words = ['1', 'true', 'on', 'yes', 'ok']
return yes_words
# get_yes_words()
#---------------------------------------------------------------------
def read_words(file_unit, word_delim=None):
#----------------------------------------------------
# Note: If (word_delim is None), then the "split()"
# method for strings will use any whitespace
# string as a separator.
#----------------------------------------------------
line = file_unit.readline()
words = line.split( word_delim )
return words
# read_words()
#---------------------------------------------------------------------
def read_list(file_unit, dtype_list=None, dtype='string',
word_delim=None):
#-------------------------------------------------------------
# Notes: Example (read boolean and string/filename):
# vlist = read_list_after_key(file_unit,
# ['boolean', 'string'])
#-------------------------------------------------------------
words = read_words(file_unit, word_delim=word_delim)
#----------------------------------------------
# If "dtype_list" is None, then assume that
# every element in the list has type "dtype".
#----------------------------------------------------
# NB! "dtype_list" cannot default to "[]", because
# then values set from a previous call to this
# function are remembered and used.
#----------------------------------------------------
## if (dtype_list == []):
## if (len(dtype_list) == 0):
if (dtype_list is None):
dtype_list = []
for k in xrange(len(words)):
dtype_list.append( dtype.lower() )
elif (len(dtype_list) > len(words)):
print 'ERROR in cfg_files.read_list_after_key().'
print ' Not enough values in the line.'
return
k = 0
yes_words = get_yes_words()
var_list = []
for type_str in dtype_list:
vtype = type_str.lower()
word = words[k].strip()
if (vtype == 'string'):
var = word
elif (vtype == 'boolean'):
var = (word in yes_words)
else:
value = eval( word )
exec('var = numpy.' + vtype + '( value )')
var_list.append( var )
k += 1
return var_list
# read_list()
#---------------------------------------------------------------------
def read_key_value_pair(file_unit, key_delim=':', SILENT=True):
line = file_unit.readline()
#--------------------------------------
# Extract the variable name or label,
# which may contain blank spaces
#--------------------------------------
p = line.find( key_delim )
if (p == -1):
if not(SILENT):
print 'ERROR in cfg_files.read_line_after_key():'
print ' Key-value delimiter not found.'
return ('', '')
key = line[:p]
value = line[p + 1:]
value = value.strip() # (strip leading & trailing whitespace)
return (key, value)
# read_key_value_pair()
#---------------------------------------------------------------------
def read_line_after_key(file_unit, key_delim=':'):
line = file_unit.readline()
#--------------------------------------
# Extract the variable name or label,
# which may contain blank spaces
#--------------------------------------
p = line.find( key_delim )
if (p == -1):
print 'ERROR in cfg_files.read_line_after_key():'
print ' Key-value delimiter not found.'
return ''
label = line[:p]
line = line[p + 1:]
return line.strip() # (strip leading and trailing whitespace)
# read_line_after_key()
#---------------------------------------------------------------------
def read_words_after_key(file_unit, key_delim=':',
word_delim=None, n_words=None):
#----------------------------------------------------
# Note: If (word_delim is None), then the "split()"
# method for strings will use any whitespace
# string as a separator.
#----------------------------------------------------
line = read_line_after_key( file_unit, key_delim=key_delim)
#-------------------------------
# Extract variables as strings
#-------------------------------
words = line.split( word_delim )
#-----------------------------------
# Option to check for enough words
#-----------------------------------
if (n_words is None):
return words
if (len(words) < n_words):
print 'ERROR in read_words_after_key():'
print ' Not enough words found.'
return words
# read_words_after_key()
#---------------------------------------------------------------------
def read_list_after_key(file_unit, dtype_list=None, dtype='string',
key_delim=':', word_delim=None):
## print 'before: dtype =', dtype
## print 'before: dtype_list =', dtype_list
#-------------------------------------------------------------
# Notes: Example (read boolean and string/filename):
# vlist = read_list_after_key(file_unit,
# ['boolean', 'string'])
#-------------------------------------------------------------
words = read_words_after_key(file_unit, key_delim=key_delim,
word_delim=word_delim)
#----------------------------------------------
# If "dtype_list" is None, then assume that
# every element in the list has type "dtype".
#----------------------------------------------------
# NB! "dtype_list" cannot default to "[]", because
# then values set from a previous call to this
# function are remembered and used.
#----------------------------------------------------
## if (dtype_list == []):
## if (len(dtype_list) == 0):
if (dtype_list is None):
dtype_list = []
for k in xrange(len(words)):
dtype_list.append( dtype.lower() )
elif (len(dtype_list) > len(words)):
print 'ERROR in cfg_files.read_list_after_key().'
print ' Not enough values in the line.'
return
## print 'after: dtype =', dtype
## print 'after: dtype_list =', dtype_list
## print '--------------------------------'
k = 0
yes_words = get_yes_words()
var_list = []
for type_str in dtype_list:
vtype = type_str.lower()
word = words[k].strip()
if (vtype == 'string'):
var = word
elif (vtype == 'boolean'):
var = (word in yes_words)
else:
value = eval( word )
exec('var = numpy.' + vtype + '( value )')
var_list.append( var )
k += 1
return var_list
# read_list_after_key()
#---------------------------------------------------------------------
def read_value(file_unit, dtype='string', key_delim=':'):
#--------------------------------------------------------------
# Notes: Valid "var_types" are:
# 'file', 'string', 'boolean' and any numpy dtype,
# such as:
# 'uint8', 'int16', 'int32', 'float32', 'float64'
# If (var_type eq 'file'), then we want to read everything
# after the ":", which may contain space characters in
# the interior (e.g a directory), but with leading and
# trailing spaces removed.
#--------------------------------------------------------------
vtype = dtype.lower()
if (vtype == 'file'):
return read_line_after_key(file_unit, key_delim=key_delim)
words = read_words_after_key( file_unit )
#--------------------
# Return a string ?
#--------------------
if (vtype == 'string'):
return words[0]
#-------------------------------------
# Return a boolean (True or False) ?
#-------------------------------------
if (vtype == 'boolean'):
yes_words = get_yes_words()
return (words[0].lower() in yes_words)
#------------------------------------
# Try to convert string to a number
#------------------------------------
try:
value = eval(words[0])
except:
print 'ERROR in cfg_files.read_value():'
print ' Unable to convert string to number.'
return words[0]
#----------------------------------
# Return number of requested type
#----------------------------------
exec('result = numpy.' + vtype + '( value )')
return result
# read_value()
#---------------------------------------------------------------------
def var_type_code(var_type):
cmap = {'scalar': 0, \
'time_series': 1, \
'time series': 1, \
'grid' : 2, \
'grid_stack' : 3, \
'grid stack' : 3, \
'grid_sequence': 3, \
'grid sequence': 3 }
code = cmap[ var_type.lower() ]
return numpy.int16( code )
# var_type_code()
#---------------------------------------------------------------------
def read_input_option(file_unit, key_delim=':', word_delim=None):
words= read_words_after_key( file_unit, key_delim=key_delim,
word_delim=word_delim )
#-----------------------------------------------
# TopoFlow "var types" are:
# Scalar, Time_Series, Grid, Grid_Sequence
#-----------------------------------------------
var_type = words[0].lower()
if (var_type == 'scalar'):
type_code = numpy.int16(0)
scalar = numpy.float64( eval( words[1] ) )
filename = '' # (or use None ??)
else:
type_code = var_type_code( var_type )
scalar = None
filename = words[1]
return (type_code, scalar, filename)
# read_input_option()
#---------------------------------------------------------------------
def read_output_option(file_unit, key_delim=':', word_delim=None):
#-------------------------------
# Extract variables as strings
#-------------------------------
words = read_words_after_key( file_unit, key_delim=key_delim,
word_delim=word_delim )
count = len(words)
if (count == 0):
print 'ERROR in cfg_files.read_output_option():'
print ' No value found after delimiter.'
return ''
if (count == 1):
print 'ERROR in cfg_files.read_output_option():'
print ' No filename provided after option.'
return ''
yes_words = ['1','true','yes','on']
option = (words[0].lower() in yes_words)
filename = words[1]
return option, filename
# read_output_option()
#---------------------------------------------------------------------
|
mit
|
lemmy/tlaplus
|
tlatools/org.lamport.tlatools/src/tlc2/tool/liveness/LNAll.java
|
2829
|
// Copyright (c) 2003 Compaq Corporation. All rights reserved.
// Portions Copyright (c) 2003 Microsoft Corporation. All rights reserved.
// Last modified on Mon 30 Apr 2007 at 13:33:37 PST by lamport
// modified on Fri Sep 22 13:54:35 PDT 2000 by yuanyu
package tlc2.tool.liveness;
import tla2sany.semantic.LevelConstants;
import tlc2.output.EC;
import tlc2.tool.ITool;
import tlc2.tool.TLCState;
import util.Assert;
/**
* Handles always ([])
*
* @author Leslie Lamport, Yuan Yu, Simon Zambrovski
* @version $Id$
*/
class LNAll extends LiveExprNode {
/**
*
*/
private static final String ALWAYS = "[]";
private final LiveExprNode body;
public LNAll(LiveExprNode body) {
this.body = body;
}
public final LiveExprNode getBody() {
return this.body;
}
public final int getLevel() {
return LevelConstants.TemporalLevel;
}
@Override
public final boolean containAction() {
return this.body.containAction();
}
@Override
public final boolean isPositiveForm() {
return this.body.isPositiveForm();
}
public final boolean eval(ITool tool, TLCState s1, TLCState s2) {
Assert.fail(EC.TLC_LIVE_CANNOT_EVAL_FORMULA, ALWAYS);
return false; // make compiler happy
}
public final void toString(StringBuffer sb, String padding) {
sb.append(ALWAYS);
this.getBody().toString(sb, padding + " ");
}
/* Return A if this expression is of form []<>A. */
public LiveExprNode getAEBody() {
LiveExprNode allBody = getBody();
if (allBody instanceof LNEven) {
return ((LNEven) allBody).getBody();
}
return super.getAEBody();
}
public void extractPromises(TBPar promises) {
getBody().extractPromises(promises);
}
public int tagExpr(int tag) {
return getBody().tagExpr(tag);
}
public final LiveExprNode makeBinary() {
return new LNAll(getBody().makeBinary());
}
public LiveExprNode flattenSingleJunctions() {
return new LNAll(getBody().flattenSingleJunctions());
}
public LiveExprNode simplify() {
LiveExprNode body1 = getBody().simplify();
if (body1 instanceof LNAll) {
body1 = ((LNAll) body1).getBody();
}
return new LNAll(body1);
}
public boolean isGeneralTF() {
LiveExprNode allBody = getBody();
if (allBody instanceof LNEven) {
return false;
}
return super.isGeneralTF();
}
public LiveExprNode pushNeg() {
return new LNEven(getBody().pushNeg());
}
public LiveExprNode pushNeg(boolean hasNeg) {
if (hasNeg) {
return new LNEven(getBody().pushNeg(true));
} else {
return new LNAll(getBody().pushNeg(false));
}
}
public boolean equals(LiveExprNode exp) {
if (exp instanceof LNAll) {
return getBody().equals(((LNAll) exp).getBody());
}
return false;
}
/* (non-Javadoc)
* @see tlc2.tool.liveness.LiveExprNode#toDotViz()
*/
public String toDotViz() {
return ALWAYS + getBody().toDotViz();
}
}
|
mit
|
OpenJSX/babel-plugin-jsx
|
README.md
|
3490
|
[](https://travis-ci.org/jsx-ir/babel-plugin-jsx)
## Babel Plugin for generating JSX-IR
### Overview
This plugin produces [JSX-IR](https://github.com/jsx-ir/spec) output of given JSX source. Main purpose of this plugin is to be used with [```jsx-runtime```](https://github.com/jsx-ir/jsx-runtime) and one or more its [renderers](https://github.com/jsx-ir?utf8=%E2%9C%93&query=jsx-to). But, of course, if could be used separately.
### Installation
```npm install babel-plugin-jsx```
### Usage
Basic usage look like this:
```js
babel.transform(code, {
plugins: ['babel-plugin-jsx'],
blacklist: ['react']
});
```
or any other way described [here](http://babeljs.io/docs/advanced/plugins/#usage).
### Advanced usage (options)
Because Babel does not supports direct providing options for plugins (yet), here are some tricks:
First of all, you need to require "plugin-generator" which will generate for you plugin instance with specified options:
```js
var jsx = require('babel-plugin-jsx/gen');
```
Next you can generate plugin on the fly if you are using ``babel-core`` directly:
```js
var jsx = require('babel-plugin-jsx/gen');
var babel = require('babel-core');
babel.transform(code, {
plugins: [jsx({
... // options goes here
})],
blacklist: ['react']
});
```
Or create special file in your package and use it as a module instead:
```js
// my-local-plugin.js
module.exports = require('babel-plugin-jsx/gen')({
... // options goes here
});
```
then use it in other place like ``index.js``:
```js
babel.transform(code, {
plugins: ['./my-local-plugin'],
blacklist: ['react']
});
```
#### Options and combinations
There is some number of options, first and main option is ```captureScope```:
* ```captureScope``` [boolean] - when enabled plugin looks for current scope to find same variables as JSX source tags. For example, this code ``<div></div>`` will produce ``{ tag: 'div', ... }`` when capture is disabled and ``{ tag: ['div', div], ...}`` when capture is enabled -- plugin captures variable for feature use by runtime.
* ```builtins``` [Array<string>] - only has effect when ``captureScope`` is ``true``. This options allows number of built-ins tags so plugin won't need to look for when in the scope. Usage of this options assumes that _renderer_ knows how to handle listed built-in tags. If this option is provided and used tag is not a _built-in_ and it's not in the current _scope_ when compilation error will be thrown.
* ```throwOnMissing``` [boolean] - only has effect when ``captureScope`` and ``builtins`` options are used simultaneously. By default this is ``true``, setting it to ``false`` means that plugin won't throw compilation error for missed tags, instead it will produce normal _scope output_ and if variable is missing you will get an runtime error.
### Examples
#### Example of input
```xml
<div className="box">
<List>
<div className="list-wrap">
<ListItem index={ index } {... val } />
</div>
</List>
</div>
```
### Example of output
```js
({
tag: "div",
props: {
className: "box"
},
children: [{
tag: "List",
props: null,
children: [{
tag: "div",
props: {
className: "list-wrap"
},
children: [{
tag: "ListItem",
props: _extends({
index: index
}, val),
children: null
}]
}]
}]
})
```
### License
[MIT](LICENSE.md)
|
mit
|
liangjg/openmc
|
tools/ci/travis-install.py
|
2019
|
import os
import shutil
import subprocess
def which(program):
def is_exe(fpath):
return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
fpath, fname = os.path.split(program)
if fpath:
if is_exe(program):
return program
else:
for path in os.environ["PATH"].split(os.pathsep):
path = path.strip('"')
exe_file = os.path.join(path, program)
if is_exe(exe_file):
return exe_file
return None
def install(omp=False, mpi=False, phdf5=False, dagmc=False):
# Create build directory and change to it
shutil.rmtree('build', ignore_errors=True)
os.mkdir('build')
os.chdir('build')
# Build in debug mode by default
cmake_cmd = ['cmake', '-Ddebug=on']
# Turn off OpenMP if specified
if not omp:
cmake_cmd.append('-Dopenmp=off')
# Use MPI wrappers when building in parallel
if mpi:
os.environ['CXX'] = 'mpicxx'
# Tell CMake to prefer parallel HDF5 if specified
if phdf5:
if not mpi:
raise ValueError('Parallel HDF5 must be used in '
'conjunction with MPI.')
cmake_cmd.append('-DHDF5_PREFER_PARALLEL=ON')
else:
cmake_cmd.append('-DHDF5_PREFER_PARALLEL=OFF')
if dagmc:
cmake_cmd.append('-Ddagmc=ON')
# Build in coverage mode for coverage testing
cmake_cmd.append('-Dcoverage=on')
# Build and install
cmake_cmd.append('..')
print(' '.join(cmake_cmd))
subprocess.check_call(cmake_cmd)
subprocess.check_call(['make', '-j4'])
subprocess.check_call(['sudo', 'make', 'install'])
def main():
# Convert Travis matrix environment variables into arguments for install()
omp = (os.environ.get('OMP') == 'y')
mpi = (os.environ.get('MPI') == 'y')
phdf5 = (os.environ.get('PHDF5') == 'y')
dagmc = (os.environ.get('DAGMC') == 'y')
# Build and install
install(omp, mpi, phdf5, dagmc)
if __name__ == '__main__':
main()
|
mit
|
hillerlab/GenomeAlignmentTools
|
kent/src/hg/lib/cnpRedon.sql
|
689
|
# cnpRedon.sql was originally generated by the autoSql program, which also
# generated cnpRedon.c and cnpRedon.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#CNP data from Redon lab
CREATE TABLE cnpRedon (
chrom varchar(255) not null, # Reference sequence chromosome or scaffold
chromStart int unsigned not null, # Start position in chrom
chromEnd int unsigned not null, # End position in chrom
name varchar(255) not null, # Reference SNP identifier or Affy SNP name
score float not null, # Score
strand char(1) not null, # Strand
#Indices
PRIMARY KEY(chrom)
);
|
mit
|
kokone/wp-phone-number
|
libphonenumber/data/PhoneNumberMetadata_MU.php
|
2103
|
<?php
return array (
'generalDesc' =>
array (
'NationalNumberPattern' => '[2-9]\\d{6}',
'PossibleNumberPattern' => '\\d{7}',
'ExampleNumber' => '',
),
'fixedLine' =>
array (
'NationalNumberPattern' => '
(?:
2(?:
[034789]\\d|
1[0-7]
)|
4(?:
[013-8]\\d|
2[4-7]
)|
[56]\\d{2}|
8(?:
14|
3[129]
)
)\\d{4}
',
'PossibleNumberPattern' => '\\d{7}',
'ExampleNumber' => '2012345',
),
'mobile' =>
array (
'NationalNumberPattern' => '
(?:
25\\d|
4(?:
2[12389]|
9\\d
)|
7\\d{2}|
87[15-8]|
9[1-8]\\d
)\\d{4}
',
'PossibleNumberPattern' => '\\d{7}',
'ExampleNumber' => '2512345',
),
'tollFree' =>
array (
'NationalNumberPattern' => '80[012]\\d{4}',
'PossibleNumberPattern' => '\\d{7}',
'ExampleNumber' => '8001234',
),
'premiumRate' =>
array (
'NationalNumberPattern' => '30\\d{5}',
'PossibleNumberPattern' => '\\d{7}',
'ExampleNumber' => '3012345',
),
'sharedCost' =>
array (
'NationalNumberPattern' => 'NA',
'PossibleNumberPattern' => 'NA',
'ExampleNumber' => '',
),
'noInternationalDialling' =>
array (
'NationalNumberPattern' => 'NA',
'PossibleNumberPattern' => 'NA',
'ExampleNumber' => '',
),
'id' => 'MU',
'countryCode' => 230,
'internationalPrefix' => '0(?:[2-7]0|33)',
'preferredInternationalPrefix' => '020',
'sameMobileAndFixedLinePattern' => false,
'numberFormat' =>
array (
0 =>
array (
'pattern' => '([2-9]\\d{2})(\\d{4})',
'format' => '$1 $2',
'leadingDigitsPatterns' =>
array (
),
'nationalPrefixFormattingRule' => '',
'domesticCarrierCodeFormattingRule' => '',
),
),
'intlNumberFormat' =>
array (
),
'mainCountryForCode' => NULL,
'leadingZeroPossible' => NULL,
);
|
mit
|
CDLUC3/dash-xtf
|
xtf/WEB-INF/src/org/cdlib/xtf/textIndexer/IdxTreeDictMaker.java
|
6314
|
package org.cdlib.xtf.textIndexer;
/**
* Copyright (c) 2006, Regents of the University of California
* 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 University of California 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 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.
*
* Acknowledgements:
*
* A significant amount of new and/or modified code in this module
* was made possible by a grant from the Andrew W. Mellon Foundation,
* as part of the Melvyl Recommender Project.
*/
import java.io.File;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.spelt.SpellWriter;
import org.apache.lucene.util.ProgressTracker;
import org.cdlib.xtf.util.Path;
import org.cdlib.xtf.util.Trace;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
/**
* This class provides a simple mechanism for generating a spelling correction
* dictionary after new documents have been added or updated. <br><br>
*
* To use this class, simply instantiate a copy, and call the
* {@link IdxTreeDictMaker#processDir(File) processDir()}
* method on a directory containing an index. Note that the directory passed
* may also be a root directory with many index sub-directories if desired.
*/
public class IdxTreeDictMaker
{
////////////////////////////////////////////////////////////////////////////
/**
* Create an <code>IdxTreeDictMaker</code> instance and call this method to
* create spelling dictionaries for one or more Lucene indices. <br><br>
*
* @param dir The index database directory to scan. May be a
* directory containing a single index, or the root
* directory of a tree containing multiple indices.
* <br><br>
*
* @.notes This method also calls itself recursively to process
* potential index sub-directories below the passed
* directory.
*/
public void processDir(File dir)
throws Exception
{
// If the file we were passed was in fact a directory...
if (dir.getAbsoluteFile().isDirectory())
{
// And it contains an index, optimize it.
if (IndexReader.indexExists(dir.getAbsoluteFile()))
makeDict(dir);
else
{
// Get the list of files it contains.
String[] files = dir.getAbsoluteFile().list();
// And process each of them.
for (int i = 0; i < files.length; i++)
processDir(new File(dir, files[i]));
}
return;
} // if( dir.isDirectory() )
// The current file is not a directory, so skip it.
} // processDir()
////////////////////////////////////////////////////////////////////////////
/**
* Performs the actual work of creating a spelling dictionary.
* <br><br>
*
* @param mainIdxDir The index database directory to scan. This
* directory must contain a single Lucene index.
* <br><br>
*
* @throws Exception Passes back any exceptions generated by Lucene
* during the dictionary generation process.
* <br><br>
*/
public void makeDict(File mainIdxDir)
throws Exception
{
// Detect if spelling data is present.
String indexPath = Path.normalizePath(mainIdxDir.toString());
String spellIdxPath = indexPath + "spellDict/";
String wordQueuePath = spellIdxPath + "newWords.txt";
String pairQueuePath = spellIdxPath + "newPairs.txt";
if (new File(wordQueuePath).length() < 1 &&
new File(pairQueuePath).length() < 1)
{
return;
}
// Tell what index we're working on...
String mainIdxPath = Path.normalizePath(mainIdxDir.toString());
Trace.info("Index: [" + mainIdxPath + "] ... ");
Trace.tab();
Trace.tab(); // for phase
SpellWriter spellWriter = null;
try
{
// Open the SpellWriter. We don't have to specify a stopword set for
// this phase (it's only used during queuing.)
//
spellWriter = SpellWriter.open(new File(spellIdxPath));
spellWriter.setMinWordFreq(3);
// Perform the update.
spellWriter.flushQueuedWords(new ProgressTracker()
{
public void report(int pctDone, String descrip) {
String pctTxt = Integer.toString(pctDone);
while (pctTxt.length() < 3)
pctTxt = " " + pctTxt;
Trace.info("[" + pctTxt + "%] " + descrip);
}
});
} // try( to open the specified index )
catch (Exception e) {
Trace.error("*** Dictionary Creation Halted Due to Error:" + e);
throw e;
}
finally {
spellWriter.close();
}
Trace.untab(); // for phase
Trace.untab();
Trace.info("Done.");
} // makeDict()
} // class IdxTreeDictMaker
|
mit
|
tangcg/nanomsg
|
src/protocol.h
|
7921
|
/*
Copyright (c) 2012-2013 250bpm s.r.o. All rights reserved.
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.
*/
#ifndef NN_PROTOCOL_INCLUDED
#define NN_PROTOCOL_INCLUDED
#include "utils/msg.h"
#include "utils/list.h"
#include "utils/int.h"
#include <stddef.h>
struct nn_ctx;
/******************************************************************************/
/* Pipe class. */
/******************************************************************************/
/* Any combination of following flags can be returned from successful call
to nn_pipe_send or nn_pipe_recv. */
/* This flag means that the pipe can't be used for receiving (when returned
from nn_pipe_recv()) or sending (when returned from nn_pipe_send()).
Protocol implementation should not send/recv messages from the pipe until
the pipe is revived by in()/out() function. */
#define NN_PIPE_RELEASE 1
/* Specifies that received message is already split into header and body.
This flag is used only by inproc transport to avoid merging and re-splitting
the messages passed with a single process. */
#define NN_PIPE_PARSED 2
/* Events generated by the pipe. */
#define NN_PIPE_IN 33987
#define NN_PIPE_OUT 33988
struct nn_pipe;
/* Associates opaque pointer to protocol-specific data with the pipe. */
void nn_pipe_setdata (struct nn_pipe *self, void *data);
/* Retrieves the opaque pointer associated with the pipe. */
void *nn_pipe_getdata (struct nn_pipe *self);
/* Send the message to the pipe. If successful, pipe takes ownership of the
messages. */
int nn_pipe_send (struct nn_pipe *self, struct nn_msg *msg);
/* Receive a message from a pipe. 'msg' should not be initialised prior to
the call. It will be initialised when the call succeeds. */
int nn_pipe_recv (struct nn_pipe *self, struct nn_msg *msg);
/* Get option for pipe. Mostly useful for endpoint-specific options */
void nn_pipe_getopt (struct nn_pipe *self, int level, int option,
void *optval, size_t *optvallen);
/******************************************************************************/
/* Base class for all socket types. */
/******************************************************************************/
struct nn_sockbase;
/* Any combination of these events can be returned from 'events' virtual
function. */
#define NN_SOCKBASE_EVENT_IN 1
#define NN_SOCKBASE_EVENT_OUT 2
/* To be implemented by individual socket types. */
struct nn_sockbase_vfptr {
/* Ask socket to stop. */
void (*stop) (struct nn_sockbase *self);
/* Deallocate the socket. */
void (*destroy) (struct nn_sockbase *self);
/* Management of pipes. 'add' registers a new pipe. The pipe cannot be used
to send to or to be received from at the moment. 'rm' unregisters the
pipe. The pipe should not be used after this call as it may already be
deallocated. 'in' informs the socket that pipe is readable. 'out'
informs it that it is writable. */
int (*add) (struct nn_sockbase *self, struct nn_pipe *pipe);
void (*rm) (struct nn_sockbase *self, struct nn_pipe *pipe);
void (*in) (struct nn_sockbase *self, struct nn_pipe *pipe);
void (*out) (struct nn_sockbase *self, struct nn_pipe *pipe);
/* Return any combination of event flags defined above, thus specifying
whether the socket should be readable, writable, both or none. */
int (*events) (struct nn_sockbase *self);
/* Send a message to the socket. Returns -EAGAIN if it cannot be done at
the moment or zero in case of success. */
int (*send) (struct nn_sockbase *self, struct nn_msg *msg);
/* Receive a message from the socket. Returns -EAGAIN if it cannot be done
at the moment or zero in case of success. */
int (*recv) (struct nn_sockbase *self, struct nn_msg *msg);
/* Set a protocol specific option. */
int (*setopt) (struct nn_sockbase *self, int level, int option,
const void *optval, size_t optvallen);
/* Retrieve a protocol specific option. */
int (*getopt) (struct nn_sockbase *self, int level, int option,
void *optval, size_t *optvallen);
};
struct nn_sockbase {
const struct nn_sockbase_vfptr *vfptr;
struct nn_sock *sock;
};
/* Initialise the socket base class. 'hint' is the opaque value passed to the
nn_transport's 'create' function. */
void nn_sockbase_init (struct nn_sockbase *self,
const struct nn_sockbase_vfptr *vfptr, void *hint);
/* Terminate the socket base class. */
void nn_sockbase_term (struct nn_sockbase *self);
/* Call this function when stopping is done. */
void nn_sockbase_stopped (struct nn_sockbase *self);
/* Returns the AIO context associated with the socket. This function is
useful when socket type implementation needs to create async objects,
such as timers. */
struct nn_ctx *nn_sockbase_getctx (struct nn_sockbase *self);
/* Retrieve a NN_SOL_SOCKET-level option. */
int nn_sockbase_getopt (struct nn_sockbase *self, int option,
void *optval, size_t *optvallen);
/* Add some statistics for socket */
void nn_sockbase_stat_increment (struct nn_sockbase *self, int name,
int increment);
#define NN_STAT_CURRENT_SND_PRIORITY 401
/******************************************************************************/
/* The socktype class. */
/******************************************************************************/
/* This structure defines a class factory for individual socket types. */
/* Specifies that the socket type can be never used to receive messages. */
#define NN_SOCKTYPE_FLAG_NORECV 1
/* Specifies that the socket type can be never used to send messages. */
#define NN_SOCKTYPE_FLAG_NOSEND 2
struct nn_socktype {
/* Domain and protocol IDs as specified in nn_socket() function. */
int domain;
int protocol;
/* Any combination of the flags defined above. */
int flags;
/* Function to create specific socket type. 'sockbase' is the output
parameter to return reference to newly created socket. This function
is called under global lock, so it is not possible that two sockets are
being created in parallel. */
int (*create) (void *hint, struct nn_sockbase **sockbase);
/* Returns 1 if the supplied socket type is a valid peer for this socket,
0 otherwise. Note that the validation is done only within a single
SP protocol. Peers speaking other SP protocols are discarded by the
core and socket is not even asked to validate them. */
int (*ispeer) (int socktype);
/* This member is owned by the core. Never touch it directly from inside
the protocol implementation. */
struct nn_list_item item;
};
#endif
|
mit
|
stricte/jammit
|
test/fixtures/tags/js_individual_includes.html
|
152
|
<script src="/fixtures/src/test1.js"></script>
<script src="/fixtures/src/test2.js"></script>
<script src="/assets/js_test_with_templates.jst"></script>
|
mit
|
AndrePessoa/Topo
|
topo/app/core/email.class.php
|
3191
|
<?php
require_once(lib_path.'PHPMailer_5.2.1/class.phpmailer.php');
class Email{
/**
* sendMsg
*
* Envia um e-mail utilizando a bibliteca PHPMailer.
*
* @version 1.0
* @param string $to E-mail do destinatário.
* @param string $subject Assunto do e-mail.
* @param string $msg Mensagem do e-mail (html).
* @param string $configs Array com as configurações do envio.
* Índice 'SMTPAuth' - Informa se a conexão com o SMTP será autenticada.
* Índice 'SMTPSecure' - Define o padrão de segurança (SSL, TLS, STARTTLS).
* Índice 'Host' - Host smtp para envio do e-mail.
* Índice 'SMTPAuth' - Informa se a conexão com o SMTP será autenticada.
* Índice 'Port' - Porta do SMTP para envio do e-mail.
* Índice 'Username' - Usuário para autenticação do SMTP.
* Índice 'Password' - Senha para autenticação do SMTP.
* Índice 'AddReplyTo' - E-mail e nome para resposta do e-mail.
* array( 0 => e-mail, 1 => nome)
* Índice 'SetFrom' - E-mail e nome do remetente do e-mail.
* array( 0 => e-mail, 1 => nome)
* @param string $msg Mensagem do e-mail (html).
* @param string $msg Mensagem do e-mail (html).
* @param string $msg Mensagem do e-mail (html).
* @return boolean / mensagens de erros Retorna true caso o e-mail tenha sido enviado ou as mensagens de erro caso não tenha sido enviado.
*/
public static function sendMsg($to,$subject,$msg,$configs = '',$debug = 1){
$configs = ($configs == '' || $configs == null)?Config::$email['default']: $configs;
$configs = (is_string($configs))?Config::$email[$configs]: $configs;
$mail = new PHPMailer(true); // True para a função enviar exceções de erros
$mail->IsSMTP(); // Definindo a classe para utilizar SMTP.
try {
$mail->SMTPDebug = $debug; // Ativar informações de debug
$mail->SMTPAuth = $configs['SMTPAuth']; // Informa se a conexão com o SMTP será autenticada.
$mail->SMTPSecure = $configs['SMTPSecure'];// Define o padrão de segurança (SSL, TLS, STARTTLS).
$mail->Host = $configs['Host']; // Host smtp para envio do e-mail.
$mail->Port = $configs['Port'];; // Porta do SMTP para envio do e-mail.
$mail->Username = $configs['Username']; // Usuário para autenticação do SMTP.
$mail->Password = $configs['Password']; // Senha para autenticação do SMTP.
$mail->AddAddress($to, "");
$mail->AddReplyTo($configs['AddReplyTo'][0], $configs['AddReplyTo'][1]);
$mail->SetFrom($configs['SetFrom'][0], $configs['SetFrom'][1]);
$mail->Subject = $subject;
$mail->AltBody = 'Para ver essa mensagem utilize um programa compatível com e-mails em formato HTML!'; // optional - MsgHTML will create an alternate automatically
$mail->MsgHTML($msg);
$mail->Send();
return true;
} catch (phpmailerException $e) {
return $e->errorMessage(); // Mensagens de erro das exceções geradas pelo phpmailer.
} catch (Exception $e) {
return $e->getMessage(); // Mensagens de exceções geradas durante a execução da função.
}
}
}
?>
|
mit
|
scriptit/github-basic
|
test/async.js
|
5038
|
'use strict';
var assert = require('assert')
var Promise = require('promise')
var connect = require('../')
var client = connect({
version: 3,
cache: 'file',
auth: '90993e4e47b0fdd1f51f4c67b17368c62a3d6097' // github-basic-js-test
});
describe('async', function () {
it('can make simple api requests', function (done) {
this.timeout(5000)
client.get('/users/:user/gists', {user: 'ForbesLindesay'}, function (err, res) {
if (err) return done(err)
assert(Array.isArray(res))
res.forEach(function (gist) {
assert(typeof gist.url === 'string')
assert(typeof gist.public === 'boolean')
})
done()
})
})
it('can have a `host` option passed in', function (done) {
this.timeout(5000)
client.headBuffer('https://github.com/ForbesLindesay/github-basic', done)
})
it('can make streaming requests', function (done) {
this.timeout(20000)
client.getStream('/repos/:owner/:repo/subscribers', {
owner: 'visionmedia',
repo: 'jade',
per_page: 100
}).buffer(function (err, res) {
if (err) return done(err)
assert(Array.isArray(res))
assert(res.length > 150)
done()
})
})
it('can make streaming requests for commits', function (done) {
this.timeout(20000)
client.getStream('/repos/:owner/:repo/commits', {
owner: 'ForbesLindesay',
repo: 'browserify-middleware',
per_page: 100
}).buffer(function (err, res) {
if (err) return done(err)
assert(Array.isArray(res))
assert(res.length > 140)
done()
})
})
it('can make streaming requests with just one page', function (done) {
this.timeout(20000)
client.getStream('/repos/:owner/:repo/subscribers', {
owner: 'ForbesLindesay',
repo: 'github-basic',
per_page: 100
}).buffer(function (err, res) {
if (err) return done(err)
assert(Array.isArray(res))
done()
})
})
describe('helpers', function () {
describe('exists(user, repo)', function () {
it('returns `true` if a repo exists', function (done) {
client.exists('ForbesLindesay', 'pull-request', function (err, res) {
if (err) return done(err);
assert(res === true);
done();
});
});
it('returns `false` if a repo does not exist', function (done) {
client.exists('ForbesLindesay', 'i-wont-ever-create-this', function (err, res) {
if (err) return done(err);
assert(res === false);
done();
});
});
});
var branch = (new Date()).toISOString().replace(/[^0-9a-zA-Z]+/g, '') + 'async';
describe('fork(user, repo, options)', function () {
it('forks `user/repo` to the current user', function (done) {
this.timeout(60000);
client.fork('ForbesLindesay', 'pull-request-test', function (err, res) {
if (err) return done(err);
client.exists('github-basic-js-test', 'pull-request-test', function (err, res) {
if (err) return done(err);
assert(res === true);
done();
});
});
});
});
describe('branch(user, repo, form, to, options)', function () {
it('creates a new branch `to` in `user/repo` based on `from`', function (done) {
this.timeout(10000);
client.branch('github-basic-js-test', 'pull-request-test', 'master', branch, function (err, res) {
if (err) return done(err);
client.head('/repos/github-basic-js-test/pull-request-test/git/refs/heads/:branch', {branch: branch}, done);
});
});
});
describe('commit(commit, options)', function () {
it('commits an update to a branch', function (done) {
this.timeout(15000)
var commit = {
branch: branch,
message: 'test commit',
updates: [{path: 'test-file.txt', content: 'lets-add-a-file wahooo'}]
};
client.commit('github-basic-js-test', 'pull-request-test', commit, function (err, res) {
if (err) return done(err);
client.head('https://github.com/github-basic-js-test/pull-request-test/blob/' + branch + '/test-file.txt', done);
});
});
});
describe('pull(from, to, message, options)', function () {
it('creates a pull request', function (done) {
this.timeout(15000)
var from = {
user: 'github-basic-js-test',
repo: 'pull-request-test',
branch: branch
};
var to = {
user: 'github-basic-js-test',
repo: 'pull-request-test',
branch: 'master'
};
var message = {
title: branch,
body: 'A test pull request'
};
client.pull(from, to, message, function (err, res) {
if (err) return done(err);
///repos/github-basic-js-test/pull-request-test/pulls/1
client.head('/repos/github-basic-js-test/pull-request-test/pulls/' + res.number, done);
});
});
});
});
});
|
mit
|
firsara/noop
|
examples/model/index.html
|
444
|
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>touch</title>
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<script data-main="app" src="../../bower_components/requirejs/require.js"></script>
</head>
<body>
</body>
</html>
|
mit
|
hauledev/has_account_engine
|
spec/dummy/app/controllers/people_controller.rb
|
624
|
class PeopleController < HasAccountsController
def index
set_collection_ivar resource_class.search(
params[:by_text],
:star => true,
:page => params[:page]
)
end
def show
# Invoice scoping by state
@invoices = resource.invoices.where("type != 'Salary'").invoice_state(params[:invoice_state])
show!
end
# has_many :phone_numbers
def new_phone_number
if resource_id = params[:id]
@person = Person.find(resource_id)
else
@person = resource_class.new
end
@vcard = @person.vcard
@item = @vcard.contacts.build
respond_with @item
end
end
|
mit
|
mrhyh/ZYChat
|
ZYChat-EaseMob/ZYChat/ChatDetail/UITableViewCell/ChatCell/GJGCChatFriendPostMessageCell.h
|
292
|
//
// GJGCChatFriendPostMessageCell.h
// ZYChat
//
// Created by ZYVincent QQ:1003081775 on 14-12-11.
// Copyright (c) 2014年 ZYProSoft. All rights reserved.
//
#import "GJGCChatFriendImageMessageCell.h"
@interface GJGCChatFriendPostMessageCell : GJGCChatFriendImageMessageCell
@end
|
mit
|
CatsPoo/ShiftOnline
|
angular.src/node_modules/ngx-bootstrap/bs-moment/i18n/ru.js
|
6071
|
// moment.js locale configuration
// locale : Russian [ru]
// author : Viktorminator : https://github.com/Viktorminator
// Author : Menelion Elensúle : https://github.com/Oire
// author : Коренберг Марк : https://github.com/socketpair
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
}
function relativeTimeWithPlural(num, withoutSuffix, key) {
var format = {
mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут',
hh: 'час_часа_часов',
dd: 'день_дня_дней',
MM: 'месяц_месяца_месяцев',
yy: 'год_года_лет'
};
if (key === 'm') {
return withoutSuffix ? 'минута' : 'минуту';
}
else {
return num + " " + plural(format[key], +num);
}
}
var monthsParse = [/^янв/i, /^фев/i, /^мар/i, /^апр/i, /^ма[йя]/i, /^июн/i, /^июл/i, /^авг/i, /^сен/i, /^окт/i, /^ноя/i, /^дек/i];
// http://new.gramota.ru/spravka/rules/139-prop : § 103
// Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637
// CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753
export var ru = {
abbr: 'ru',
months: {
format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_'),
standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_')
},
monthsShort: {
// по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку ?
format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split('_'),
standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split('_')
},
weekdays: {
standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_'),
isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/
},
weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'),
monthsParse: monthsParse,
longMonthsParse: monthsParse,
shortMonthsParse: monthsParse,
// полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки
monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
// копия предыдущего
monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,
// полные названия с падежами
monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,
// Выражение, которое соотвествует только сокращённым формам
monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'D MMMM YYYY г.',
LLL: 'D MMMM YYYY г., HH:mm',
LLLL: 'dddd, D MMMM YYYY г., HH:mm'
},
relativeTime: {
future: 'через %s',
past: '%s назад',
s: 'несколько секунд',
m: relativeTimeWithPlural,
mm: relativeTimeWithPlural,
h: 'час',
hh: relativeTimeWithPlural,
d: 'день',
dd: relativeTimeWithPlural,
M: 'месяц',
MM: relativeTimeWithPlural,
y: 'год',
yy: relativeTimeWithPlural
},
meridiemParse: /ночи|утра|дня|вечера/i,
isPM: function (input) {
return /^(дня|вечера)$/.test(input);
},
meridiem: function (hour) {
if (hour < 4) {
return 'ночи';
}
else if (hour < 12) {
return 'утра';
}
else if (hour < 17) {
return 'дня';
}
else {
return 'вечера';
}
},
dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/,
ordinal: function (num, period) {
switch (period) {
case 'M':
case 'd':
case 'DDD':
return num + "-\u0439";
case 'D':
return num + "-\u0433\u043E";
case 'w':
case 'W':
return num + "-\u044F";
default:
return num.toString(10);
}
},
week: {
dow: 1,
doy: 4 // The week that contains Jan 4th is the first week of the year.
}
};
//# sourceMappingURL=ru.js.map
|
mit
|
AzureCAT-GSI/DevCamp
|
HOL/node/03-azuread-office365/start/routes/dashboard.js
|
2173
|
var express = require('express');
var router = express.Router();
var request = require('request');
// Setup Redis Client
var redis = require("redis");
var client = redis.createClient(process.env.REDISCACHE_SSLPORT, process.env.REDISCACHE_HOSTNAME, { auth_pass: process.env.REDISCACHE_PRIMARY_KEY, tls: { servername: process.env.REDISCACHE_HOSTNAME } });
/* GET dashboard. */
router.get('/', function (req, res) {
// Query the API for incident data
getIncidents().then(function (incidents) {
// Render view
res.render('dashboard', {
title: 'Outage Dashboard',
incidents: incidents
});
});
});
module.exports = router;
function getIncidents() {
return new Promise(function (resolve, reject) {
// Check cache for incidentData key
client.get('incidentData', function (error, reply) {
if (reply) {
// Cached key exists
console.log('Cached key found');
// Parse results
var incidents;
if (reply === 'undefined') {
// No results, return null
incidents = null;
}
else {
incidents = JSON.parse(reply);
}
// Resolve Promise with incident data
resolve(incidents);
}
else {
// Cached key does not exist
console.log('Cached key not found');
// Define URL to use for the API
var apiUrl = `${process.env.INCIDENT_API_URL}/incidents`;
// Make a GET request with the Request libary
request(apiUrl, { json: true }, function (error, results, body) {
// Store results in cache
client.set("incidentData", JSON.stringify(body), 'EX', 60, function (error, reply) {
console.log('Stored results in cache');
});
// Resolve Promise with incident data
resolve(body);
});
}
});
});
}
|
mit
|
nnluukhtn/coffee_run
|
spec/controllers/pusher_controller_spec.rb
|
218
|
require 'rails_helper'
RSpec.describe PusherController, :type => :controller do
describe "GET webhook" do
it "returns http success" do
get :webhook
expect(response).to be_success
end
end
end
|
mit
|
smiley22/S22.Xmpp
|
Extensions/XEP-0107/Mood.cs
|
9671
|
namespace S22.Xmpp.Extensions {
/// <summary>
/// Defines possible values for the mood of an XMPP user.
/// </summary>
/// <remarks>Refer to XEP-0107 for a detailed listing and description of the
/// various mood values.</remarks>
public enum Mood {
/// <summary>
/// Impressed with fear or apprehension; in fear; apprehensive.
/// </summary>
Afraid,
/// <summary>
/// Astonished; confounded with fear, surprise or wonder.
/// </summary>
Amazed,
/// <summary>
/// Inclined to love; having a propensity to love, or to sexual enjoyment;
/// loving, fond, affectionate, passionate, lustful, sexual, etc.
/// </summary>
Amarous,
/// <summary>
/// Displaying or feeling anger, i.e., a strong feeling of displeasure, hostility
/// or antagonism towards someone or something, usually combined with an urge
/// to harm.
/// </summary>
Angry,
/// <summary>
/// To be disturbed or irritated, especially by continued or repeated acts.
/// </summary>
Annoyed,
/// <summary>
/// Full of anxiety or disquietude; greatly concerned or solicitous, esp.
/// respecting something future or unknown; being in painful suspense.
/// </summary>
Anxious,
/// <summary>
/// To be stimulated in one's feelings, especially to be sexually stimulated.
/// </summary>
Aroused,
/// <summary>
/// Feeling shame or guilt.
/// </summary>
Ashamed,
/// <summary>
/// Suffering from boredom; uninterested, without attention.
/// </summary>
Bored,
/// <summary>
/// Strong in the face of fear; courageous.
/// </summary>
Brave,
/// <summary>
/// Peaceful, quiet.
/// </summary>
Calm,
/// <summary>
/// Taking care or caution; tentative.
/// </summary>
Cautious,
/// <summary>
/// Feeling the sensation of coldness, especially to the point of discomfort.
/// </summary>
Cold,
/// <summary>
/// Feeling very sure of or positive about something, especially about one's
/// own capabilities.
/// </summary>
Confident,
/// <summary>
/// Chaotic, jumbled or muddled.
/// </summary>
Confused,
/// <summary>
/// Feeling introspective or thoughtful.
/// </summary>
Contemplative,
/// <summary>
/// Pleased at the satisfaction of a want or desire; satisfied.
/// </summary>
Contented,
/// <summary>
/// Grouchy, irritable; easily upset.
/// </summary>
Cranky,
/// <summary>
/// Feeling out of control; feeling overly excited or enthusiastic.
/// </summary>
Crazy,
/// <summary>
/// Feeling original, expressive, or imaginative.
/// </summary>
Creative,
/// <summary>
/// Inquisitive; tending to ask questions, investigate, or explore.
/// </summary>
Curious,
/// <summary>
/// Feeling sad and dispirited.
/// </summary>
Dejected,
/// <summary>
/// Severely despondent and unhappy.
/// </summary>
Depressed,
/// <summary>
/// Defeated of expectation or hope; let down.
/// </summary>
Disappointed,
/// <summary>
/// Filled with disgust; irritated and out of patience.
/// </summary>
Disgusted,
/// <summary>
/// Feeling a sudden or complete loss of courage in the face of trouble or danger.
/// </summary>
Dismayed,
/// <summary>
/// Having one's attention diverted; preoccupied.
/// </summary>
Distracted,
/// <summary>
/// Having a feeling of shameful discomfort.
/// </summary>
Embarrassed,
/// <summary>
/// Feeling pain by the excellence or good fortune of another.
/// </summary>
Envious,
/// <summary>
/// Having great enthusiasm.
/// </summary>
Excited,
/// <summary>
/// In the mood for flirting.
/// </summary>
Flirtatious,
/// <summary>
/// Suffering from frustration; dissatisfied, agitated, or discontented because
/// one is unable to perform an action or fulfill a desire.
/// </summary>
Frustrated,
/// <summary>
/// Feeling appreciation or thanks.
/// </summary>
Grateful,
/// <summary>
/// Feeling very sad about something, especially something lost; mournful;
/// sorrowful.
/// </summary>
Grieving,
/// <summary>
/// Unhappy and irritable.
/// </summary>
Grumpy,
/// <summary>
/// Feeling responsible for wrongdoing; feeling blameworthy.
/// </summary>
Guilty,
/// <summary>
/// Experiencing the effect of favourable fortune; having the feeling arising
/// from the consciousness of well-being or of enjoyment; enjoying good of
/// any kind, as peace, tranquillity, comfort; contented; joyous.
/// </summary>
Happy,
/// <summary>
/// Having a positive feeling, belief, or expectation that something wished
/// for can or will happen.
/// </summary>
Hopeful,
/// <summary>
/// Feeling the sensation of heat, especially to the point of discomfort.
/// </summary>
Hot,
/// <summary>
/// Having or showing a modest or low estimate of one's own importance;
/// feeling lowered in dignity or importance.
/// </summary>
Humbled,
/// <summary>
/// Feeling deprived of dignity or self-respect.
/// </summary>
Humiliated,
/// <summary>
/// Having a physical need for food.
/// </summary>
Hungry,
/// <summary>
/// Wounded, injured, or pained, whether physically or emotionally.
/// </summary>
Hurt,
/// <summary>
/// Favourably affected by something or someone.
/// </summary>
Impressed,
/// <summary>
/// Feeling amazement at something or someone; or feeling a combination
/// of fear and reverence.
/// </summary>
InAwe,
/// <summary>
/// Feeling strong affection, care, liking, or attraction.
/// </summary>
InLove,
/// <summary>
/// Showing anger or indignation, especially at something unjust or wrong.
/// </summary>
Indignant,
/// <summary>
/// Showing great attention to something or someone; having or showing
/// interest.
/// </summary>
Interested,
/// <summary>
/// Under the influence of alcohol; drunk.
/// </summary>
Intoxicated,
/// <summary>
/// Feeling as if one cannot be defeated, overcome or denied.
/// </summary>
Invincible,
/// <summary>
/// Fearful of being replaced in position or affection.
/// </summary>
Jealous,
/// <summary>
/// Feeling isolated, empty, or abandoned.
/// </summary>
Lonely,
/// <summary>
/// Unable to find one's way, either physically or emotionally.
/// </summary>
Lost,
/// <summary>
/// Feeling as if one will be favored by luck.
/// </summary>
Lucky,
/// <summary>
/// Causing or intending to cause intentional harm; bearing ill will
/// towards another; cruel; malicious.
/// </summary>
Mean,
/// <summary>
/// Given to sudden or frequent changes of mind or feeling; temperamental.
/// </summary>
Moody,
/// <summary>
/// Easily agitated or alarmed; apprehensive or anxious.
/// </summary>
Nervous,
/// <summary>
/// Not having a strong mood or emotional state.
/// </summary>
Neutral,
/// <summary>
/// Feeling emotionally hurt, displeased, or insulted.
/// </summary>
Offended,
/// <summary>
/// Feeling resentful anger caused by an extremely violent or vicious attack,
/// or by an offensive, immoral, or indecent act.
/// </summary>
Outraged,
/// <summary>
/// Interested in play; fun, recreational, unserious, lighthearted; joking,
/// silly.
/// </summary>
Playful,
/// <summary>
/// Feeling a sense of one's own worth or accomplishment.
/// </summary>
Proud,
/// <summary>
/// Having an easy-going mood; not stressed; calm.
/// </summary>
Relaxed,
/// <summary>
/// Feeling uplifted because of the removal of stress or discomfort.
/// </summary>
Relieved,
/// <summary>
/// Feeling regret or sadness for doing something wrong.
/// </summary>
Remorseful,
/// <summary>
/// Without rest; unable to be still or quiet; uneasy; continually moving.
/// </summary>
Restless,
/// <summary>
/// Feeling sorrow; sorrowful, mournful.
/// </summary>
Sad,
/// <summary>
/// Mocking and ironical.
/// </summary>
Sarcastic,
/// <summary>
/// Pleased at the fulfillment of a need or desire.
/// </summary>
Satisfied,
/// <summary>
/// Without humor or expression of happiness; grave in manner or disposition;
/// earnest; thoughtful; solemn.
/// </summary>
Serious,
/// <summary>
/// Surprised, startled, confused, or taken aback.
/// </summary>
Shocked,
/// <summary>
/// Feeling easily frightened or scared; timid; reserved or coy.
/// </summary>
Shy,
/// <summary>
/// Feeling in poor health; ill.
/// </summary>
Sick,
/// <summary>
/// Feeling the need for sleep.
/// </summary>
Sleepy,
/// <summary>
/// Acting without planning; natural; impulsive.
/// </summary>
Spontaneous,
/// <summary>
/// Suffering emotional pressure.
/// </summary>
Stressed,
/// <summary>
/// Capable of producing great physical force; or, emotionally forceful,
/// able, determined, unyielding.
/// </summary>
Strong,
/// <summary>
/// Experiencing a feeling caused by something unexpected.
/// </summary>
Surprised,
/// <summary>
/// Showing appreciation or gratitude.
/// </summary>
Thankful,
/// <summary>
/// Feeling the need to drink.
/// </summary>
Thirsty,
/// <summary>
/// In need of rest or sleep.
/// </summary>
Tired,
/// <summary>
/// [Feeling any emotion not defined here.]
/// </summary>
Undefined,
/// <summary>
/// Lacking in force or ability, either physical or emotional.
/// </summary>
Weak,
/// <summary>
/// Thinking about unpleasant things that have happened or that might
/// happen; feeling afraid and unhappy.
/// </summary>
Worried
}
}
|
mit
|
LeaderQiu/MeiTuanHD
|
04-美团HD/Classes/Other/Lib/DP/DPRequest.h
|
1502
|
//
// DPRequest.h
// apidemo
//
// Created by ZhouHui on 13-1-28.
// Copyright (c) 2013年 Dianping. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef void (^DPBlock)(id result, NSError *error);
typedef void (^DPSuccess)(id json);
typedef void (^DPFailure)(NSError *error);
@class DPAPI;
@protocol DPRequestDelegate;
@interface DPRequest : NSObject
/** 请求后的回调 */
//@property (nonatomic, copy) DPBlock block;
/** 请求成功后的回调 */
@property (nonatomic, copy) DPSuccess success;
/** 请求失败后的回调 */
@property (nonatomic, copy) DPFailure failure;
@property (nonatomic, weak) DPAPI *dpapi;
@property (nonatomic, strong) NSString *url;
@property (nonatomic, strong) NSDictionary *params;
@property (nonatomic, weak) id<DPRequestDelegate> delegate;
+ (DPRequest *)requestWithURL:(NSString *)url
params:(NSDictionary *)params
delegate:(id<DPRequestDelegate>)delegate;
+ (NSString *)getParamValueFromUrl:(NSString*)url paramName:(NSString *)paramName;
+ (NSString *)serializeURL:(NSString *)baseURL params:(NSDictionary *)params;
- (void)connect;
- (void)disconnect;
@end
@protocol DPRequestDelegate <NSObject>
@optional
- (void)request:(DPRequest *)request didReceiveResponse:(NSURLResponse *)response;
- (void)request:(DPRequest *)request didReceiveRawData:(NSData *)data;
- (void)request:(DPRequest *)request didFailWithError:(NSError *)error;
- (void)request:(DPRequest *)request didFinishLoadingWithResult:(id)result;
@end
|
mit
|
koliva8245/HeroesParserData
|
HeroesMatchTracker/Views/RawData/RawMatchReplaysControl.xaml.cs
|
346
|
using System.Windows.Controls;
namespace HeroesMatchTracker.Views.RawData
{
/// <summary>
/// Interaction logic for RawMatchReplaysControl.xaml
/// </summary>
public partial class RawMatchReplaysControl : UserControl
{
public RawMatchReplaysControl()
{
InitializeComponent();
}
}
}
|
mit
|
crocodic-studio/simple-stock-manager
|
vendor/unisharp/laravel-filemanager/src/lang/zh-TW/lfm.php
|
2606
|
<?php
return [
'nav-back' => '回上一頁',
'nav-new' => '新增資料夾',
'nav-upload' => '上傳檔案',
'nav-thumbnails' => '縮圖顯示',
'nav-list' => '列表顯示',
'menu-rename' => '重新命名',
'menu-delete' => '刪除',
'menu-view' => '預覽',
'menu-download' => '下載',
'menu-resize' => '縮放',
'menu-crop' => '裁剪',
'title-page' => '檔案管理',
'title-panel' => '檔案管理',
'title-upload' => '上傳檔案',
'title-view' => '預覽檔案',
'title-root' => '我的檔案',
'title-shares' => '共享的檔案',
'title-item' => '項目名稱',
'title-size' => '檔案大小',
'title-type' => '檔案類型',
'title-modified' => '上次修改',
'title-action' => '操作',
'type-folder' => '資料夾',
'message-empty' => '空的資料夾',
'message-choose' => '選擇檔案',
'message-delete' => '確定要刪除此項目嗎?',
'message-name' => '資料夾名稱:',
'message-rename' => '重新命名為:',
'message-extension_not_found' => '請安裝 gd 或 imagick 以使用縮放、裁剪、及縮圖功能',
'error-rename' => '名稱重複,請重新輸入!',
'error-file-empty' => '請選擇檔案!',
'error-file-exist' => '相同檔名的檔案已存在!',
'error-file-size' => '檔案過大,無法上傳! (檔案大小上限: :max)',
'error-delete' => '資料夾未清空,無法刪除!',
'error-folder-name' => '請輸入資料夾名稱!',
'error-folder-exist'=> '相同名稱的資料夾已存在!',
'error-folder-alnum'=> '資料夾名稱只能包含英數字!',
'error-mime' => 'Mime 格式錯誤 : ',
'error-instance' => '上傳檔案的 instance 應為 UploadedFile',
'error-invalid' => '驗證失敗,上傳未成功',
'btn-upload' => '上傳',
'btn-uploading' => '上傳中...',
'btn-close' => '關閉',
'btn-crop' => '裁剪',
'btn-cancel' => '取消',
'btn-resize' => '縮放',
'resize-ratio' => '比例:',
'resize-scaled' => '是否已縮放:',
'resize-true' => '是',
'resize-old-height' => '原始高度:',
'resize-old-width' => '原始寬度:',
'resize-new-height' => '目前高度:',
'resize-new-width' => '目前寬度:',
'locale-bootbox' => 'zh_TW',
];
|
mit
|
tomaaron/raiden
|
.travis/make_dag.sh
|
193
|
#!/usr/bin/env bash
set -e
mkdir -p $HOME/.ethash
# this will generate the DAG once, travis is configured to cache it and
# subsequent calls will not regenerate
geth makedag 0 $HOME/.ethash
|
mit
|
elgubenis/backbone.intercept
|
gruntfile.js
|
2239
|
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
meta: {
version: '<%= pkg.version %>',
banner: '// Backbone.Intercept v<%= meta.version %>\n'
},
preprocess: {
intercept: {
src: 'src/wrapper.js',
dest: 'dist/backbone.intercept.js'
}
},
template: {
options: {
data: {
version: '<%= meta.version %>'
}
},
intercept: {
src: '<%= preprocess.intercept.dest %>',
dest: '<%= preprocess.intercept.dest %>'
}
},
concat: {
options: {
banner: '<%= meta.banner %>'
},
intercept: {
src: '<%= preprocess.intercept.dest %>',
dest: '<%= preprocess.intercept.dest %>'
}
},
uglify: {
options: {
banner: '<%= meta.banner %>'
},
intercept: {
src: '<%= preprocess.intercept.dest %>',
dest: 'dist/backbone.intercept.min.js',
options: {
sourceMap: true
}
}
},
jshint: {
intercept: {
options: {
jshintrc: '.jshintrc'
},
src: ['src/backbone.intercept.js']
},
tests: {
options: {
jshintrc: 'test/.jshintrc'
},
src: ['test/unit/*.js']
}
},
mochaTest: {
spec: {
options: {
require: 'test/setup/node.js',
reporter: 'dot',
clearRequireCache: true,
mocha: require('mocha')
},
src: [
'test/setup/helpers.js',
'test/unit/*.js'
]
}
},
connect: {
options: {
port: 8000,
keepalive: true
},
browser: {}
}
});
grunt.registerTask('test:browser', 'Test the library in the browser', [
'jshint',
'connect'
]);
grunt.registerTask('test', 'Test the library', [
'jshint',
'mochaTest'
]);
grunt.registerTask('build', 'Build the library', [
'test',
'preprocess:intercept',
'template',
'concat',
'uglify'
]);
grunt.registerTask('default', 'An alias of test', [
'test'
]);
};
|
mit
|
Etiene/sailor_website
|
docs/0.5/contributing.md
|
10892
|
# Contributing to Sailor
<3
* [Code of conduct](#code-of-conduct)
* [Questions](#questions)
* [Issue found](#issue-found)
* [Verifying issues](#verifying-issues)
* [New feature](#new-feature)
* [Setup developer environment](#setup-developer-environment)
* [Code and naming conventions](#code-and-naming-conventions)
* [Tests](#tests)
* [Documentation](#documentation)
* [Commit message](#commit-message)
* [Making a pull request](#making-a-pull-request)
* [Get even more involved](#get-even-more-involved)
## Code of conduct
We are committed to making participation in this project a harassment-free
experience for everyone. Please read and follow our [Code of conduct](https://github.com/Etiene/sailor/blob/master/CODE_OF_CONDUCT.md).
## Questions
If you have questions about how to use Sailor, please direct them to our [Google group](https://groups.google.com/forum/#!forum/sailor-l).
## Issue found
If you found a problem or a bug at Sailor that does not pose a security risk, please report on the [Github issue tracker of Sailor's repository](https://github.com/Etiene/sailor/issues). Before creating a new issue, search if someone hasn't reported it already. If it's not listed, then you can create a new issue. Please be very descriptive and offer means for us to reproduce the error. If the problem you found can cause a security risk to current users of Sailor, please email it to dalcol@etiene.net
## Verifying issues
One important way you can help is by verifying and confirming bug reports. You can make comments to make the description more extensive, clearer or more reproducible and add test cases that are failing.
## New feature
If you want to request a new feature on Sailor or develop a new feature yourself, post about it on the issue tracker of the Github repository as well. Also remember to see if nobody has posted it yet.
## Setup developer environment
Example code given for Ubuntu users, if you are not under Ubuntu, follow these steps adapting to your current operational system.
* Install Lua, LuaRocks and a database of choice. E.g. sqlite3
```
sudo apt-get install lua5.1 luarocks sqlite3
```
* Fork [Sailor's repository](http://github.com/Etiene/sailor) by clicking on Fork then clone it:
```
git clone http://github.com/your_username/sailor
```
* Setup the current rockspec, it will install almost all the necessary dependancies
```
luarocks install rockspecs/sailor-current-1.rockspec
```
* Install the Lua module for the database of choice,. E.g. sqlite3
```
luarocks install luasql-sqlite3
```
* Create a database and import the corresponding sql found on `test/dev-app/sql`
```
mkdir test/db
sqlite3 test/db/sailor_test < test/dev-app/sql/sqlite3.sql
```
* Go to the directory test/dev-app, open index.lua and add this on the beginning so it reads from the Sailor dir you are currently working on. This line of code will add Sailor's src to the Lua package path, so when using require Lua will also look on this dir. Don't forget to replace /path/to/your/sailor/repo to the path where you've cloned your fork of Sailor's git repository.
```
package.path = '/path/to/your/sailor/repo/src/?.lua;'..package.path
```
* Configure the dev-app to use your sql information by editing the file `test/dev-app/conf/conf.lua`
```lua
db = {
test = {
driver = sqlite3',
host = 'localhost',
user = nil,
pass = nil,
dbname = '/path/to/your/sailor/repo/test/db/sailor_test'
}
}
```
* To start the app using the Xavante webserver, run this command from the `test/dev-app` dir:
```
lua start-server.lua
```
* This dev-app contains example codes and some unit & functional tests. You can add things to it.
* If you decide to create a new app using `sailor create <app name>` while making your developments, don't forget to add the package.path modification to it as well.
* If you wish to develop on Sailor while using a different web server or a different database, please refer to [installation tutorials](http://sailorproject.org/?r=docs/install).
## Code and naming conventions
These are general conventions to try to follow for consistency and not strict rules that will make your pull request be rejected or shamed. Code not following some of these conventions might be asked to be revised.
* Do not create global variables for anything ever
* It's okay to cache global standard functions into local functions for performance but pay attention to naming
* File names and variable names, including functions, use snake_case
* A variable for a model class can use PascalCase
* Avoid 1 letter variable names when deemed apropriate
* Add spaces between operators, after commands and inside curly braces
* Identation normally uses 4 spaces
* Use the constructor syntax for tables when possible.
* When tables have functions use `self` to refer to itself
* Use the dot operator to access known fields of tables when possible
* Assign variables on the top of the scope whenever possible
* Return from functions as early as possible
* Try to take advantage of tail calls when deemed apropriate
* Do not use semicolons
* Remember Lua table index starts at 1 and do not use the table length operator (#) if your table has 'holes' in it
## Tests
Sailor is integrated with [Busted](olivinelabs.com/busted/) for unit and functional testing. If you want to run the current tests the dev-app, go to the app directory and run the tests using `sailor test` You can use normal Busted flags such as `--verbose` on regular mode. There is a special mode for simulating an OpenResty environment. To run this special resty mode run `sailor test --resty` from the app directory.
If you made any modifications to Sailor, it is ideal that you add a test a case for your modifications.
Even if you did not make a new modification you can also contribute with additional test cases for parts of Sailor that you feel could be better tested.
Please read the [testing tutorial](https://github.com/Etiene/sailor/blob/master/docs/tutorial_testing.md) for designing new tests. Ideally each Sailor module should have its own file inside `test/dev-app/tests/unit`, named in the same way as the module being tested. If your test case tests a combination of uses of modules please refer to `test/dev-app/tests/functional`. You might have to create a new file or add test cases to current files.
## Documentation
Don't forget to document your code and to update the [CHANGELOG](https://github.com/Etiene/sailor/blob/master/CODE_OF_CONDUCT.md) adding a new entry on the top if applicable. Modifications that require updating the changelog:
* Bug fix
* Adding or removing feature
* Deprecating a feature
Modifications that do not require updating the changelog:
* Refactors
* Docs modification
Do not forget to highlight anything that is a breaking change to apps developed on previous versions of Sailor.
If you added any new features or modified something that changes how to use Sailor, update the Reference manual and corresponding tutorials found on [docs](https://github.com/Etiene/sailor/tree/master/docs).
You may also contribute with additional documentation or modifying the current docs to be easier to understand, correcting errors, typos, or updating them in case they are out of sync with the current Sailor.
### Translating
Offers to translate the guides to your language are also welcome. In this case, add a new folder for it inside `docs`, for example, `docs/pt_br`.
## Commit message
Some of these [conventions](http://blog.thoughtram.io/announcements/tools/2014/09/18/announcing-clog-a-conventional-changelog-generator-for-the-rest-of-us.html) were invented by Google folks for Angular JS and using clog. We are not
* The first line should ideally have less than 50 character
* It must indicate at the beginning what type of modification your commit poses and the scope
* Then write a short summary beginning with a verb usually on imperative or 3rd person present e.g. Update or Updates file X
* A dot is not necessary at the end
* Skip a line
* Write a more detailed description and a motivation for this change if applicable
* The description can have more than one paragraph
* If you are making a breaking change skip another line and add BREAKING CHANGE
### Types:
* **feat**: A new feature
* **fix**: A bug fix
* **docs**: Documentation changes
* **style**: Changes that do not affect the meaning of the code e.g. whitespace
* **refactor**: A code change that is not a new feature or bug fix
* **perf**: A code change that improves performance
* **test**: Adds missing tests
* **chore**: Changes to the build process or auxiliary tools and libraries
Example of a commit message:
```
docs(guide): Add tutorial for lua at client
<OBLIGATORY BLANK LINE>
A more detailed description goes here if necessary. Try to
explain the problem that was fixed or the motivation for the change.
It is interesting to explain why this commmit is being done, not how.
<optional blank lines between paragraphs are ok>
You can add code examples indented with 4 spaces or bullet points
using hyphens or asterisks.
```
## Making a pull request
After pushing your commits, open the page of your fork of Sailor and click on New pull request. That's it! :D
It might happen that you are asked to revise something before we merge it :)
## Get even more involved
If you want to be more participative on the future of Sailor, it is very recommended that you join the [Google group](https://groups.google.com/forum/#!forum/sailor-l) and start a discussion. Other options are to join our [Gitter chat](https://gitter.im/Etiene/sailor). Sometimes we also make physical meetings. When a maintainer goes to a conference it is often announced on the [website's News](sailorproject.org/?r=main/news). Whenever there are Lua reunions it is also possible to take a moment to talk about Sailor.
If you want to help spreading the word, get more developers using Sailor or contributing, there's also plenty of things you can do. You can tweet about it, you can print some stickers with Sailor logo and give to developer friends or distribute in conferences or hackathons. If you are an active contributor who understands details of Sailor, you are also encouraged to submit talks or give workshops about it on your country. You can ask on the [Google group](https://groups.google.com/forum/#!forum/sailor-l) for resources about that.
If you are a company or a person who wishes to support Sailor financially, there are also plenty of options. Donations get more time invested into Sailor for coding, documenting or spreading the word. You can also pay to have specific issues or new features coded using Bounty Source. You can find more information about this on the [Donation page](http://sailorproject.org/?r=main/donate).
### Thank you for contributing to Sailor!
### You are awesome <3
|
mit
|
boztek/guides
|
source/localizable/getting-started/core-concepts.es-ES.md
|
3653
|
Antes de empezar a escribir código, es buena idea obtener una visión general de cómo funciona una aplicación de Ember.

## Enrutador y gestores de ruta
Supongamos que vamos a escribir una aplicación web que permite a los usuarios anunciar una o varias propiedades para ser alquiladas. At any given time, we should be able to answer questions about the current state like *What rental are they looking at?* and *Are they editing it?* In Ember, the answer to these questions is determined by the URL. La URL se puede establecer de varias formas:
* El usuario carga la aplicación por primera vez.
* El usuario cambia la URL manualmente, como por ejemplo haciendo clic en el botón de retroceder o editando la barra de direcciones.
* El usuario hace clic en un enlace dentro de la aplicación.
* Y otros eventos dentro de la aplicación que provocan también un cambio de URL.
Al margen de cómo se establezca la URL, lo primero que ocurre es que el enrutador de Ember asocia la URL a un gestor de ruta.
Por lo tanto, el gestor de ruta hace básicamente dos cosas:
* Renderiza una plantilla.
* Carga un modelo que estará disponible para la plantilla.
## Plantillas
Ember uses templates to organize the layout of HTML in an application.
La mayoría de plantillas en Ember nos resultan familiares, ya que no son más que fragmentos de HTML. Por ejemplo:
```handlebars
< div > ¡Hola! Esta es una plantilla de Ember perfectamente válida. < / div >
```
En Ember, las plantillas utilizan adicionalmente la sintaxis de [Handlebars](http://handlebarsjs.com). Todo lo que sea válido en Handlebars es asimismo válido en Ember.
Las plantillas también pueden mostrar propiedades establecidas en su contexto, que puede ser un componente o una ruta (técnicamente podría ser también un controlador, pero últimamente ya casi no se utiliza de este modo, y de hecho pronto quedará obsoleto). Por ejemplo:
```handlebars
< div > ¡Hola {{nombre}}! Esta es una plantilla de Ember totalmente válida. < / div >
```
Donde `{{nombre}}` es una propiedad proporcionada por el contexto de la plantilla.
Además de propiedades, las llaves dobles (`{{}}`) pueden contener también helpers y componentes, que analizaremos más adelante.
## Modelos
Los modelos representan un estado persistente.
Por ejemplo, una aplicación que gestione el alquiler de propiedades debería guardar los detalles de un alquiler cuando un usuario lo publica, con lo que un alquiler tendría un modelo que define sus detalles, que podría llamarse *alquiler*.
Un modelo típicamente persiste información a un servidor web, aunque los modelos se pueden configurar para ser guardados en cualquier otro lugar, como el almacenamiento local del navegador.
## Componentes
Mientras que las plantillas describen cómo se ve una interfaz de usuario, los componentes controlan su *comportamiento*.
Los componentes constan de dos partes: una plantilla de Handlebars y un archivo de código fuente escrito en JavaScript que define el comportamiento del componente. Por ejemplo, nuestra aplicación de gestión de alquileres podría tener un componente para mostrar todos los alquileres llamada `lista-alquileres` y otra para la visualización de un alquiler individual llamada `alquiler`. El componente de `alquiler` podría definir un comportamiento que permita al usuario ocultar y mostrar una imagen de la propiedad a alquilar.
Vamos a ver estos conceptos básicos en acción mediante la construcción de una aplicación de gestión de alquileres de propiedades en la siguiente sección.
|
mit
|
ModuleLoader/es-module-loader
|
test/fixtures/register-modules/rebinding.js
|
197
|
System.register([], function (_export, _context) {
"use strict";
var p;
return {
setters: [],
execute: function () {
_export("p", p = 4);
_export("p", p);
}
};
});
|
mit
|
gregvonkuster/icqsol
|
examples/addSurfaceFieldFromExpression.py
|
3166
|
#!/usr/bin/env python
"""
Apply a surface field to a shape
"""
from __future__ import print_function
import argparse
import time
import sys
import re
from numpy import linspace
from icqsol.shapes.icqShapeManager import ShapeManager
from icqsol import util
# time stamp
tid = re.sub(r'\.', '', str(time.time()))
description = 'Apply a surface field to a shape'
parser = argparse.ArgumentParser(description=description)
parser.add_argument('--input', dest='input', default='',
help='Input file (PLY or VTK)')
parser.add_argument('--expression', dest='expression', default='sin(pi*x)*cos(pi*y)*z',
help='Expression of x, y, z, and t')
parser.add_argument('--refine', dest='refine', default=0.0, type=float,
help='Maximum edge length (use 0 if no refinement)')
parser.add_argument('--name', dest='name', default='myField',
help='Set the name of the field')
parser.add_argument('--times', dest='times', default='',
help='Comma separated list of time values')
parser.add_argument('--location', dest='location', default='point',
help='"point" or "cell"')
parser.add_argument('--ascii', dest='ascii', action='store_true',
help='Save data in ASCII format (default is binary)')
parser.add_argument('--output', dest='output',
default='addSurfaceFieldFromExpressionToShape-{0}.vtk'.format(tid),
help='VTK Output file.')
args = parser.parse_args()
if not args.expression:
print('ERROR: must specify --expression <expression>')
sys.exit(2)
if not args.input:
print('ERROR: must specify input file: --input <file>')
sys.exit(3)
# make sure the field name contains no spaces
args.name = re.sub('\s', '_', args.name)
# Get the format of the input - either vtk or ply.
file_format = util.getFileFormat(args.input)
if file_format == util.PLY_FORMAT:
shape_mgr = ShapeManager(file_format=util.PLY_FORMAT)
else:
# We have a VTK file, so Get the dataset type.
vtk_dataset_type = util.getVtkDatasetType(args.input)
shape_mgr = ShapeManager(file_format=util.VTK_FORMAT,
vtk_dataset_type=vtk_dataset_type)
pdata = shape_mgr.loadAsVtkPolyData(args.input)
times = [0.0]
if args.times:
times = eval(args.times)
maxEdgeLength = float('inf')
if args.refine > 0:
maxEdgeLength = args.refine
pdataOut = shape_mgr.addSurfaceFieldFromExpressionToVtkPolyData(pdata, args.name,
args.expression, times,
max_edge_length=maxEdgeLength,
location=args.location)
if args.output:
# Always produce VTK POLYDATA.
shape_mgr.setWriter(file_format=util.VTK_FORMAT,
vtk_dataset_type=util.POLYDATA)
if args.ascii:
file_type = util.ASCII
else:
file_type = util.BINARY
shape_mgr.saveVtkPolyData(vtk_poly_data=pdataOut,
file_name=args.output,
file_type=file_type)
|
mit
|
Kittyfisto/Tailviewer
|
src/Tailviewer.Core/Filters/ExpressionEngine/IsExpression.cs
|
2319
|
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using Tailviewer.Api;
namespace Tailviewer.Core.Filters.ExpressionEngine
{
internal sealed class IsExpression<T>
: IExpression<bool>
{
private static readonly IEqualityComparer<T> Comparer;
private readonly IExpression<T> _lhs;
private readonly IExpression<T> _rhs;
static IsExpression()
{
// The default comparer sucks for custom value types as it will cause boxing on every invocation
// (https://www.jacksondunstan.com/articles/5148), so we will use our own comparers for types known
// to us.
if (typeof(T) == typeof(LevelFlags))
{
Comparer = (IEqualityComparer<T>)(object)new LevelFlagsComparer();
}
else
{
Comparer = EqualityComparer<T>.Default;
}
}
public IsExpression(IExpression<T> lhs, IExpression<T> rhs)
{
_lhs = lhs;
_rhs = rhs;
}
#region Implementation of IExpression
public Type ResultType => typeof(bool);
public bool Evaluate(IReadOnlyList<IReadOnlyLogEntry> logEntry)
{
var lhs = _lhs.Evaluate(logEntry);
var rhs = _rhs.Evaluate(logEntry);
return Comparer.Equals(lhs, rhs);
}
object IExpression.Evaluate(IReadOnlyList<IReadOnlyLogEntry> logEntry)
{
return Evaluate(logEntry);
}
#endregion
#region Equality members
private bool Equals(IsExpression<T> other)
{
return Equals(_lhs, other._lhs) && Equals(_rhs, other._rhs);
}
public override bool Equals(object obj)
{
return ReferenceEquals(this, obj) || obj is IsExpression<T> other && Equals(other);
}
public override int GetHashCode()
{
unchecked
{
return ((_lhs != null ? _lhs.GetHashCode() : 0) * 397) ^ (_rhs != null ? _rhs.GetHashCode() : 0);
}
}
public static bool operator ==(IsExpression<T> left, IsExpression<T> right)
{
return Equals(left, right);
}
public static bool operator !=(IsExpression<T> left, IsExpression<T> right)
{
return !Equals(left, right);
}
#endregion
#region Overrides of Object
public override string ToString()
{
return string.Format("{0} {1} {2}", _lhs, Tokenizer.ToString(TokenType.Is), _rhs);
}
#endregion
[Pure]
public static IsExpression<T> Create(IExpression<T> lhs, IExpression<T> rhs)
{
return new IsExpression<T>(lhs, rhs);
}
}
}
|
mit
|
tesler/cspt-moodle
|
moodle/lang/ru/enrol_imsenterprise.php
|
11218
|
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle 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
// (at your option) any later version.
//
// Moodle 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 Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Strings for component 'enrol_imsenterprise', language 'ru', branch 'MOODLE_20_STABLE'
*
* @package enrol_imsenterprise
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['aftersaving...'] = 'После сохранения своих настроек Вы, возможно, пожелаете';
$string['allowunenrol'] = 'Разрешить данным IMS <strong>отчислять</strong> студентов/преподавателей';
$string['allowunenrol_desc'] = 'При включенном параметре, участник будет отчислен из курса, если это указано в данных организации.';
$string['basicsettings'] = 'Основные настройки';
$string['coursesettings'] = 'Настройки данных курса';
$string['createnewcategories'] = 'Создавать новые (скрытые) категории курсов, если они не найдены в Moodle';
$string['createnewcategories_desc'] = 'Если элемент <org><orgunit> присутствует в данных создаваемого курса, то эта информация будет использоваться для определения категории, если курс должен быть создан с нуля. Плагин НЕ будет изменять категории существующих курсов. Если нет категории с нужным названием, то будет создана скрытая категория.';
$string['createnewcourses'] = 'Создавать новые (скрытые) курсы, если они не найдены в Moodle';
$string['createnewcourses_desc'] = 'При включенном параметре плагин IMS может создать новые курсы для любого из найденных в данных IMS, но не в базе данных в Moodle. Любой вновь созданный курс изначально скрыт.';
$string['createnewusers'] = 'Создать учетные записи для пользователей, еще не зарегистрированных в Moodle';
$string['createnewusers_desc'] = 'IMS Enterprise - типичные данные для регистрации, характеризующие группу пользователей. При включенном параметре учетная запись может быть создана для любого пользователя, отсутствующего в базе данных Moodle. Пользователей сначала ищут по их «ID-номеру», потом - по их логину в Moodle. Пароли не импортируются с помощью плагина IMS Enterprise.
Для аутентификации пользователей рекомендуется использовать плагин аутентификации';
$string['cronfrequency'] = 'Частота обработки';
$string['deleteusers'] = 'Удалять учетные записи пользователей, если это указано в данных IMS';
$string['deleteusers_desc'] = 'При включенном параметре в данных IMS можно указать удаление учетных записей пользователей (если в параметре «recstatus» выбран п.3, который означает удаление аккаунта). Как это принято в Moodle, запись пользователя не удаляется из базы данных Moodle, но устанавливается флаг, который помечает аккаунт как удаленный.';
$string['doitnow'] = 'Выполнить импорт IMS прямо сейчас';
$string['filelockedmail'] = 'Процесс cron не может удалить IMS-файл ({$a}), используемый вами для записи на курсы. Обычно это означает, что неправильно установлены права доступа к этому файлу. Пожалуйста, исправьте права доступа так, чтобы система Moodle могла удалять этот файл. В противном случае один и тот же файл будет обрабатываться повторно.';
$string['filelockedmailsubject'] = 'Серьезная ошибка: Файл регистрации';
$string['fixcasepersonalnames'] = 'Изменить личные имена пользователей в Верхний Регистр';
$string['fixcaseusernames'] = 'Изменить логины в нижний регистр';
$string['ignore'] = 'Игнорировать';
$string['importimsfile'] = 'Импорт файла IMS Enterprise';
$string['imsrolesdescription'] = 'Спецификация IMS Enterprise включает в себя 8 различных типов роль. Пожалуйста, выберите, как Вы хотите назначить их в Moodle, при этом любая из них может быть проигнорирована.';
$string['location'] = 'Расположение файла';
$string['logtolocation'] = 'Расположение файла журнала (пусто, если протоколирование не ведется)';
$string['mailadmins'] = 'Уведомить администратора по электронной почте';
$string['mailusers'] = 'Уведомить пользователей по электронной почте';
$string['miscsettings'] = 'Разное';
$string['pluginname'] = 'Файл IMS Enterprise';
$string['pluginname_desc'] = 'Этот способ записи будет неоднократно проверять и обрабатывать специально-форматированный текстовый файл в указанном Вами месте. Файл должен следовать спецификации IMS Enterprise и содержать XML-элементы person, group и membership.';
$string['processphoto'] = 'Добавить данные о фотографии пользователя в профиль';
$string['processphotowarning'] = 'Внимание: обработка изображений может добавить значительную нагрузку на сервер. Рекомендуется не активировать эту опцию, если ожидается обработка большого количества студентов.';
$string['restricttarget'] = 'Обрабатывать данные только если указана следующая цель';
$string['restricttarget_desc'] = 'Файл данных IMS Enterprise может быть предназначен для нескольких «целей» - разных систем обучения или различных систем внутри школы/университета. В файле можно указать, что данные предназначены для одной или нескольких целевых именованных систем, именуя их в тегах <target>, содержащихся в теге <properties>.
Обычно Вам не нужно беспокоиться об этом. Оставьте поле пустым и Moodle всегда будет обрабатывать данные файла, независимо от того, задана ли цель или нет. В противном случае введите в поле точное название, которое будет присутствовать внутри тега <target>.';
$string['roles'] = 'Роли';
$string['sourcedidfallback'] = 'Использовать идентификатор «sourcedid» для персонального идентификатора, если поле «userid» не найдено';
$string['sourcedidfallback_desc'] = 'В данных IMS поле <sourcedid> является постоянным ID-кодом человека, используемый в исходной системе. Поле <userid> - это отдельное поле, которое содержит ID-код, используемый пользователем при входе. Во многих случаях эти два кода могут быть одинаковы - но не всегда.
Некоторые системы не могут выводить информацию из поля <userid>. В этом случае Вы должны включить этот параметр - разрешить использовать поле <sourcedid> в качестве ID-номера пользователя Moodle. В противном случае оставьте этот параметр отключенным.';
$string['truncatecoursecodes'] = 'Обрезать коды курсов до этой длины';
$string['truncatecoursecodes_desc'] = 'В некоторых случаях перед обработкой Вы можете обрезать коды курсов до указанной длины. Для этого введите нужное количество символов в этом поле. В противном случае оставьте это поле пустым и никаких сокращений не будет.';
$string['usecapitafix'] = 'Отметьте это поле, если используется «Capita» (его формат XML немного неверный)';
$string['usecapitafix_desc'] = 'При получении «Capita» была найдена одна небольшая ошибка в XML-выводе из системы студенческих данных. При использовании «Capita» Вы должны включить этот параметр; в противном случае оставьте его не отмеченным.';
$string['usersettings'] = 'Настройки данных пользователя';
$string['zeroisnotruncation'] = '0 указывает на отсутствие усечения';
|
mit
|
charshu/birls_real
|
src/resources/lib/angular2-image-popup/index.html
|
2259
|
<html>
<head>
<base href="/">
<title>Angular 2 QuickStart</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- 1. Load libraries -->
<!-- IE required polyfills, in this exact order -->
<script src="node_modules/core-js/client/shim.min.js"></script>
<script src="node_modules/zone.js/dist/zone.js"></script>
<script src="node_modules/reflect-metadata/Reflect.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="https://www.gstatic.com/charts/loader.js"></script>
<link rel="stylesheet" type="text/css" href="directives/angular2-image-popup/css/style.css">
<link rel="stylesheet" type="text/css" href="app/assets/css/main.css">
<link rel="stylesheet" type="text/css" href="node_modules/font-awesome/css/font-awesome.css">
<!-- <script src="node_modules/es6-shim/es6-shim.min.js"></script>
<script src="node_modules/systemjs/dist/system-polyfills.js"></script>
<script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"></script>
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script>
<script src="node_modules/systemjs/dist/system.src.js"></script>
<script src="node_modules/rxjs/bundles/Rx.js"></script>
<script src="node_modules/angular2/bundles/angular2.dev.js"></script>
<script src="node_modules/angular2/bundles/router.dev.js"></script>
<script src="https://www.gstatic.com/charts/loader.js"></script>-->
<!-- 2. Configure SystemJS -->
<!--<script>
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
},
directives: {
format: 'register',
defaultExtension: 'js'
}
}
});
var googleLoaded = false;
System.import('app/main')
.then(null, console.error.bind(console));
</script>-->
<!-- 2. Configure SystemJS -->
<script src="systemjs.config.js"></script>
<script>
System.import('app').catch(function(err){ console.error(err); });
</script>
</head>
<!-- 3. Display the application -->
<body>
<my-app>Loading...</my-app>
</body>
</html>
|
mit
|
badfuture/huoshui-backend-api
|
api/routes/statRoute.js
|
126
|
module.exports = {
//get global stats
'GET /stat': {
controller: "StatController",
action: "getGlobalStat"
}
}
|
mit
|
paixaop/node-sodium
|
src/crypto_shorthash.cc
|
1709
|
/**
* Node Native Module for Lib Sodium
*
* @Author Pedro Paixao
* @email paixaop at gmail dot com
* @License MIT
*/
#include "node_sodium.h"
/**
* int crypto_shorthash(
* unsigned char *out,
* const unsigned char *in,
* unsigned long long inlen,
* const unsigned char *key)
*
* Parameters:
* [out] out result of hash
* [in] in input buffer
* [in] inlen size of input buffer
* [in] key key buffer
*
* A lot of applications and programming language implementations have been
* recently found to be vulnerable to denial-of-service attacks when a hash
* function with weak security guarantees, like Murmurhash 3, was used to
* construct a hash table.
* In order to address this, Sodium provides the �shorthash� function,
* currently implemented using SipHash-2-4. This very fast hash function
* outputs short, but unpredictable (without knowing the secret key) values
* suitable for picking a list in a hash table for a given key.
*/
NAPI_METHOD(crypto_shorthash) {
Napi::Env env = info.Env();
ARGS(1, "argument message must be a buffer");
ARG_TO_UCHAR_BUFFER(message);
ARG_TO_UCHAR_BUFFER_LEN(key, crypto_shorthash_KEYBYTES);
NEW_BUFFER_AND_PTR(hash, crypto_shorthash_BYTES);
if( crypto_shorthash(hash_ptr, message, message_size, key) == 0 ) {
return hash;
} else {
return NAPI_NULL;
}
}
/**
* Register function calls in node binding
*/
void register_crypto_shorthash(Napi::Env env, Napi::Object exports) {
// Short Hash
EXPORT(crypto_shorthash);
EXPORT_INT(crypto_shorthash_BYTES);
EXPORT_INT(crypto_shorthash_KEYBYTES);
EXPORT_STRING(crypto_shorthash_PRIMITIVE);
}
|
mit
|
jnicklas/capybara
|
lib/capybara/spec/session/scroll_spec.rb
|
5689
|
# frozen_string_literal: true
Capybara::SpecHelper.spec '#scroll_to', requires: [:scroll] do
before do
@session.visit('/scroll')
end
it 'can scroll an element to the top of the viewport' do
el = @session.find(:css, '#scroll')
@session.scroll_to(el, align: :top)
expect(el.evaluate_script('this.getBoundingClientRect().top')).to be_within(1).of(0)
end
it 'can scroll an element to the bottom of the viewport' do
el = @session.find(:css, '#scroll')
@session.scroll_to(el, align: :bottom)
el_bottom = el.evaluate_script('this.getBoundingClientRect().bottom')
viewport_bottom = el.evaluate_script('document.documentElement.clientHeight')
expect(el_bottom).to be_within(1).of(viewport_bottom)
end
it 'can scroll an element to the center of the viewport' do
el = @session.find(:css, '#scroll')
@session.scroll_to(el, align: :center)
el_center = el.evaluate_script('(function(rect){return (rect.top + rect.bottom)/2})(this.getBoundingClientRect())')
viewport_bottom = el.evaluate_script('document.documentElement.clientHeight')
expect(el_center).to be_within(2).of(viewport_bottom / 2)
end
it 'can scroll the window to the vertical top' do
@session.scroll_to :bottom
@session.scroll_to :top
expect(@session.evaluate_script('[window.scrollX || window.pageXOffset, window.scrollY || window.pageYOffset]')).to eq [0, 0]
end
it 'can scroll the window to the vertical bottom' do
@session.scroll_to :bottom
max_scroll = @session.evaluate_script('document.documentElement.scrollHeight - document.documentElement.clientHeight')
expect(@session.evaluate_script('[window.scrollX || window.pageXOffset, window.scrollY || window.pageYOffset]')).to eq [0, max_scroll]
end
it 'can scroll the window to the vertical center' do
@session.scroll_to :center
max_scroll = @session.evaluate_script('document.documentElement.scrollHeight - document.documentElement.clientHeight')
expect(@session.evaluate_script('[window.scrollX || window.pageXOffset, window.scrollY || window.pageYOffset]')).to eq [0, max_scroll / 2]
end
it 'can scroll the window to specific location' do
@session.scroll_to 100, 100
expect(@session.evaluate_script('[window.scrollX || window.pageXOffset, window.scrollY || window.pageYOffset]')).to eq [100, 100]
end
it 'can scroll an element to the top of the scrolling element' do
scrolling_element = @session.find(:css, '#scrollable')
el = scrolling_element.find(:css, '#inner')
scrolling_element.scroll_to(el, align: :top)
scrolling_element_top = scrolling_element.evaluate_script('this.getBoundingClientRect().top')
expect(el.evaluate_script('this.getBoundingClientRect().top')).to be_within(3).of(scrolling_element_top)
end
it 'can scroll an element to the bottom of the scrolling element' do
scrolling_element = @session.find(:css, '#scrollable')
el = scrolling_element.find(:css, '#inner')
scrolling_element.scroll_to(el, align: :bottom)
el_bottom = el.evaluate_script('this.getBoundingClientRect().bottom')
scroller_bottom = scrolling_element.evaluate_script('this.getBoundingClientRect().top + this.clientHeight')
expect(el_bottom).to be_within(1).of(scroller_bottom)
end
it 'can scroll an element to the center of the scrolling element' do
scrolling_element = @session.find(:css, '#scrollable')
el = scrolling_element.find(:css, '#inner')
scrolling_element.scroll_to(el, align: :center)
el_center = el.evaluate_script('(function(rect){return (rect.top + rect.bottom)/2})(this.getBoundingClientRect())')
scrollable_center = scrolling_element.evaluate_script('(this.clientHeight / 2) + this.getBoundingClientRect().top')
expect(el_center).to be_within(1).of(scrollable_center)
end
it 'can scroll the scrolling element to the top' do
scrolling_element = @session.find(:css, '#scrollable')
scrolling_element.scroll_to :bottom
scrolling_element.scroll_to :top
expect(scrolling_element.evaluate_script('[this.scrollLeft, this.scrollTop]')).to eq [0, 0]
end
it 'can scroll the scrolling element to the bottom' do
scrolling_element = @session.find(:css, '#scrollable')
scrolling_element.scroll_to :bottom
max_scroll = scrolling_element.evaluate_script('this.scrollHeight - this.clientHeight')
expect(scrolling_element.evaluate_script('[this.scrollLeft, this.scrollTop]')).to eq [0, max_scroll]
end
it 'can scroll the scrolling element to the vertical center' do
scrolling_element = @session.find(:css, '#scrollable')
scrolling_element.scroll_to :center
max_scroll = scrolling_element.evaluate_script('this.scrollHeight - this.clientHeight')
expect(scrolling_element.evaluate_script('[this.scrollLeft, this.scrollTop]')).to eq [0, max_scroll / 2]
end
it 'can scroll the scrolling element to specific location' do
scrolling_element = @session.find(:css, '#scrollable')
scrolling_element.scroll_to 100, 100
expect(scrolling_element.evaluate_script('[this.scrollLeft, this.scrollTop]')).to eq [100, 100]
end
it 'can scroll the window by a specific amount' do
@session.scroll_to(:current, offset: [50, 75])
expect(@session.evaluate_script('[window.scrollX || window.pageXOffset, window.scrollY || window.pageYOffset]')).to eq [50, 75]
end
it 'can scroll the scroll the scrolling element by a specific amount' do
scrolling_element = @session.find(:css, '#scrollable')
scrolling_element.scroll_to 100, 100
scrolling_element.scroll_to(:current, offset: [-50, 50])
expect(scrolling_element.evaluate_script('[this.scrollLeft, this.scrollTop]')).to eq [50, 150]
end
end
|
mit
|
mafredri/cdp
|
protocol/runtime/testdata/log_input_gen.go
|
2730
|
package main
import (
"context"
"encoding/json"
"log"
"os"
"path/filepath"
"time"
"github.com/mafredri/cdp"
"github.com/mafredri/cdp/devtool"
"github.com/mafredri/cdp/protocol/page"
"github.com/mafredri/cdp/rpcc"
)
func main() {
dir, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
if err := run(context.TODO(), dir); err != nil {
log.Fatal(err)
}
}
func run(ctx context.Context, dir string) error {
var cancel context.CancelFunc
ctx, cancel = context.WithTimeout(ctx, 10*time.Second)
defer cancel()
devt := devtool.New("http://localhost:9222")
pt, err := devt.Get(ctx, devtool.Page)
if err != nil {
return err
}
conn, err := rpcc.Dial(pt.WebSocketDebuggerURL)
if err != nil {
return err
}
defer conn.Close()
c := cdp.NewClient(conn)
input, err := os.Create(filepath.Join(dir, "log.input"))
if err != nil {
return err
}
consoleAPICalled, err := c.Runtime.ConsoleAPICalled(ctx)
if err != nil {
return err
}
go func() {
defer consoleAPICalled.Close()
for {
ev, err := consoleAPICalled.Recv()
if err != nil {
return
}
// Reset fields that would cause noise in diffs.
ev.ExecutionContextID = 0
ev.Timestamp = 0
ev.StackTrace = nil
for i, arg := range ev.Args {
arg.ObjectID = nil
ev.Args[i] = arg
}
if err = json.NewEncoder(input).Encode(ev); err != nil {
log.Println(err)
return
}
}
}()
domLoadTimeout := 5 * time.Second
// First page load is to trigger console log behavior without object
// previews.
if err := navigate(c.Page, "file:///"+dir+"/log.html", domLoadTimeout); err != nil {
return err
}
// Enable console log events.
if err := c.Runtime.Enable(ctx); err != nil {
return err
}
// Re-load the page to receive console logs with previews.
if err := navigate(c.Page, "file:///"+dir+"/log.html", domLoadTimeout); err != nil {
return err
}
time.Sleep(250 * time.Millisecond)
if err := input.Close(); err != nil {
return err
}
return nil
}
// navigate to the URL and wait for DOMContentEventFired. An error is
// returned if timeout happens before DOMContentEventFired.
func navigate(pc cdp.Page, url string, timeout time.Duration) error {
ctx, cancel := context.WithTimeout(context.Background(), timeout)
defer cancel()
// Enable the Page domain events.
if err := pc.Enable(ctx); err != nil {
return err
}
// Open client for DOMContentEventFired to pause execution until
// DOM has fully loaded.
domContentEventFired, err := pc.DOMContentEventFired(ctx)
if err != nil {
return err
}
defer domContentEventFired.Close()
_, err = pc.Navigate(ctx, page.NewNavigateArgs(url))
if err != nil {
return err
}
_, err = domContentEventFired.Recv()
return err
}
|
mit
|
MarkThink/OROCRM
|
vendor/bundles/besimple/soap/src/BeSimple/SoapClient/Tests/AxisInterop/TestCase.php
|
602
|
<?php
namespace BeSimple\SoapClient\Tests\AxisInterop;
class TestCase extends \PHPUnit_Framework_TestCase
{
protected function setUp()
{
$ch = curl_init('http://localhost:8080/');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt($ch, CURLOPT_NOBODY, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
if (curl_exec($ch) === false) {
$this->markTestSkipped(
'The Axis server is not started on port 8080.'
);
}
curl_close($ch);
}
}
|
mit
|
ocadni/citychrone
|
node_modules/mathjs/lib/function/algebra/simplify/simplifyConstant.js
|
7764
|
'use strict';
var digits = require('./../../../utils/number').digits;
// TODO this could be improved by simplifying seperated constants under associative and commutative operators
function factory(type, config, load, typed, math) {
var util = load(require('./util'));
var isCommutative = util.isCommutative;
var isAssociative = util.isAssociative;
var allChildren = util.allChildren;
var createMakeNodeFunction = util.createMakeNodeFunction;
var ConstantNode = math.expression.node.ConstantNode;
var OperatorNode = math.expression.node.OperatorNode;
var FunctionNode = math.expression.node.FunctionNode;
function simplifyConstant(expr) {
var res = foldFraction(expr);
return type.isNode(res) ? res : _toNode(res);
}
function _eval(fnname, args) {
try {
return _toNumber(math[fnname].apply(null, args));
}
catch (ignore) {
// sometimes the implicit type conversion causes the evaluation to fail, so we'll try again after removing Fractions
args = args.map(function(x){
if (type.isFraction(x)) {
return x.valueOf();
}
return x;
});
return _toNumber(math[fnname].apply(null, args));
}
}
var _toNode = typed({
'Fraction': _fractionToNode,
'number': function(n) {
if (n < 0) {
return unaryMinusNode(new ConstantNode(-n));
}
return new ConstantNode(n);
},
'BigNumber': function(n) {
if (n < 0) {
return unaryMinusNode(new ConstantNode(n.negated().toString(), 'number'));
}
return new ConstantNode(n.toString(), 'number');
},
'Complex': function(s) {
throw 'Cannot convert Complex number to Node';
}
});
// convert a number to a fraction only if it can be expressed exactly
function _exactFraction(n) {
if (isFinite(n)) {
var f = math.fraction(n);
if (f.valueOf() === n) {
return f;
}
}
return n;
}
// Convert numbers to a preferred number type in preference order: Fraction, number, Complex
// BigNumbers are left alone
var _toNumber = typed({
'string': function(s) {
if (config.number === 'BigNumber') {
return math.bignumber(s);
}
else if (config.number === 'Fraction') {
return math.fraction(s);
}
else {
return _exactFraction(parseFloat(s));
}
},
'Fraction': function(s) { return s; },
'BigNumber': function(s) { return s; },
'number': function(s) {
return _exactFraction(s);
},
'Complex': function(s) {
if (s.im !== 0) {
return s;
}
return _exactFraction(s.re);
},
});
function unaryMinusNode(n) {
return new OperatorNode('-', 'unaryMinus', [n]);
}
function _fractionToNode(f) {
var n;
var vn = f.s*f.n;
if (vn < 0) {
n = new OperatorNode('-', 'unaryMinus', [new ConstantNode(-vn)])
}
else {
n = new ConstantNode(vn);
}
if (f.d === 1) {
return n;
}
return new OperatorNode('/', 'divide', [n, new ConstantNode(f.d)]);
}
/*
* Create a binary tree from a list of Fractions and Nodes.
* Tries to fold Fractions by evaluating them until the first Node in the list is hit, so
* `args` should be sorted to have the Fractions at the start (if the operator is commutative).
* @param args - list of Fractions and Nodes
* @param fn - evaluator for the binary operation evaluator that accepts two Fractions
* @param makeNode - creates a binary OperatorNode/FunctionNode from a list of child Nodes
* if args.length is 1, returns args[0]
* @return - Either a Node representing a binary expression or Fraction
*/
function foldOp(fn, args, makeNode) {
return args.reduce(function(a, b) {
if (!type.isNode(a) && !type.isNode(b)) {
try {
return _eval(fn, [a,b]);
}
catch (ignoreandcontinue) {}
a = _toNode(a);
b = _toNode(b);
}
else if (!type.isNode(a)) {
a = _toNode(a);
}
else if (!type.isNode(b)) {
b = _toNode(b);
}
return makeNode([a, b]);
});
}
// destroys the original node and returns a folded one
function foldFraction(node) {
switch(node.type) {
case 'SymbolNode':
return node;
case 'ConstantNode':
if (node.valueType === 'number') {
return _toNumber(node.value);
}
return node;
case 'FunctionNode':
if (math[node.name] && math[node.name].rawArgs) {
return node;
}
// Process operators as OperatorNode
var operatorFunctions = [ 'add', 'multiply' ];
if (operatorFunctions.indexOf(node.name) === -1) {
var args = node.args.map(foldFraction);
// If all args are numbers
if (!args.some(type.isNode)) {
try {
return _eval(node.name, args);
}
catch (ignoreandcontine) {}
}
// Convert all args to nodes and construct a symbolic function call
args = args.map(function(arg) {
return type.isNode(arg) ? arg : _toNode(arg);
});
return new FunctionNode(node.name, args);
}
else {
// treat as operator
}
/* falls through */
case 'OperatorNode':
var fn = node.fn.toString();
var args;
var res;
var makeNode = createMakeNodeFunction(node);
if (node.args.length === 1) {
args = [foldFraction(node.args[0])];
if (!type.isNode(args[0])) {
res = _eval(fn, args);
}
else {
res = makeNode(args);
}
}
else if (isAssociative(node)) {
args = allChildren(node);
args = args.map(foldFraction);
if (isCommutative(fn)) {
// commutative binary operator
var consts = [], vars = [];
for (var i=0; i < args.length; i++) {
if (!type.isNode(args[i])) {
consts.push(args[i]);
}
else {
vars.push(args[i]);
}
}
if (consts.length > 1) {
res = foldOp(fn, consts, makeNode);
vars.unshift(res);
res = foldOp(fn, vars, makeNode);
}
else {
// we won't change the children order since it's not neccessary
res = foldOp(fn, args, makeNode);
}
}
else {
// non-commutative binary operator
res = foldOp(fn, args, makeNode);
}
}
else {
// non-associative binary operator
args = node.args.map(foldFraction);
res = foldOp(fn, args, makeNode);
}
return res;
case 'ParenthesisNode':
// remove the uneccessary parenthesis
return foldFraction(node.content);
case 'AccessorNode':
/* falls through */
case 'ArrayNode':
/* falls through */
case 'AssignmentNode':
/* falls through */
case 'BlockNode':
/* falls through */
case 'FunctionAssignmentNode':
/* falls through */
case 'IndexNode':
/* falls through */
case 'ObjectNode':
/* falls through */
case 'RangeNode':
/* falls through */
case 'UpdateNode':
/* falls through */
case 'ConditionalNode':
/* falls through */
default:
throw 'Unimplemented node type in simplifyConstant: '+node.type;
}
}
return simplifyConstant;
}
exports.math = true;
exports.name = 'simplifyConstant';
exports.path = 'algebra.simplify';
exports.factory = factory;
|
mit
|
valesbc/valesbc.github.io
|
scripts/form_throttle.php
|
2961
|
<?php
/*
If you see this text in your browser, PHP is not configured correctly on this hosting provider.
Contact your hosting provider regarding PHP configuration for your site.
PHP file generated by Adobe Muse CC 2017.1.0.379
*/
function formthrottle_check()
{
if (!is_writable('.'))
{
return '8';
}
try
{
if (in_array("sqlite",PDO::getAvailableDrivers(),TRUE))
{
$db = new PDO('sqlite:muse-throttle-db.sqlite3');
if ( file_exists('muse-throttle-db') )
{
unlink('muse-throttle-db');
}
}
else if (function_exists("sqlite_open"))
{
$db = new PDO('sqlite2:muse-throttle-db');
if ( file_exists('muse-throttle-db.sqlite3') )
{
unlink('muse-throttle-db.sqlite3');
}
} else {
return '4';
}
}
catch( PDOException $Exception ) {
return '9';
}
$retCode ='5';
if ($db)
{
$res = $db->query("SELECT 1 FROM sqlite_master WHERE type='table' AND name='Submission_History';");
if (!$res or $res->fetchColumn() == 0)
{
$created = $db->exec("CREATE TABLE Submission_History (IP VARCHAR(39), Submission_Date TIMESTAMP)");
if($created == 0)
{
$created = $db->exec("INSERT INTO Submission_History (IP,Submission_Date) VALUES ('256.256.256.256', DATETIME('now'))");
}
if ($created != 1)
{
$retCode = '2';
}
}
if($retCode == '5')
{
$res = $db->query("SELECT COUNT(1) FROM Submission_History;");
if ($res && $res->fetchColumn() > 0)
{
$retCode = '0';
}
else
$retCode = '3';
}
// Close file db connection
$db = null;
}
else
$retCode = '4';
return $retCode;
}
function formthrottle_too_many_submissions($ip)
{
$tooManySubmissions = false;
try
{
if (in_array("sqlite",PDO::getAvailableDrivers(),TRUE))
{
$db = new PDO('sqlite:muse-throttle-db.sqlite3');
}
else if (function_exists("sqlite_open"))
{
$db = new PDO('sqlite2:muse-throttle-db');
} else {
return false;
}
}
catch( PDOException $Exception ) {
return $tooManySubmissions;
}
if ($db)
{
$res = $db->query("SELECT 1 FROM sqlite_master WHERE type='table' AND name='Submission_History';");
if (!$res or $res->fetchColumn() == 0)
{
$db->exec("CREATE TABLE Submission_History (IP VARCHAR(39), Submission_Date TIMESTAMP)");
}
$db->exec("DELETE FROM Submission_History WHERE Submission_Date < DATETIME('now','-2 hours')");
$stmt = $db->prepare("INSERT INTO Submission_History (IP,Submission_Date) VALUES (:ip, DATETIME('now'))");
$stmt->bindParam(':ip', $ip);
$stmt->execute();
$stmt->closeCursor();
$stmt = $db->prepare("SELECT COUNT(1) FROM Submission_History WHERE IP = :ip;");
$stmt->bindParam(':ip', $ip);
$stmt->execute();
if ($stmt->fetchColumn() > 25)
$tooManySubmissions = true;
// Close file db connection
$db = null;
}
return $tooManySubmissions;
}
?>
|
mit
|
mahdikallel/IHM
|
web/template/index.php/component/search/index7921.html
|
572
|
<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"><ShortName>Shaper Soccer</ShortName><Description></Description><InputEncoding>UTF-8</InputEncoding><Url type="application/opensearchdescription+xml" rel="self" template="http://demo.joomshaper.com/2015/soccer/index.php/component/search/?Itemid=278&catid=85&id=78&format=opensearch"/><Url type="text/html" template="http://demo.joomshaper.com/2015/soccer/index.php?option=com_search&searchword={searchTerms}&Itemid=255"/></OpenSearchDescription>
|
mit
|
yorozuyah/TPC-H_like_for_MySQL
|
dbt5-0.1.0/egen/inc/FlatLastTradeLoad.h
|
2788
|
/*
* Legal Notice
*
* This document and associated source code (the "Work") is a part of a
* benchmark specification maintained by the TPC.
*
* The TPC reserves all right, title, and interest to the Work as provided
* under U.S. and international laws, including without limitation all patent
* and trademark rights therein.
*
* No Warranty
*
* 1.1 TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE INFORMATION
* CONTAINED HEREIN IS PROVIDED "AS IS" AND WITH ALL FAULTS, AND THE
* AUTHORS AND DEVELOPERS OF THE WORK HEREBY DISCLAIM ALL OTHER
* WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY,
* INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES,
* DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR
* PURPOSE, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF
* WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE.
* ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT,
* QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT
* WITH REGARD TO THE WORK.
* 1.2 IN NO EVENT WILL ANY AUTHOR OR DEVELOPER OF THE WORK BE LIABLE TO
* ANY OTHER PARTY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO THE
* COST OF PROCURING SUBSTITUTE GOODS OR SERVICES, LOST PROFITS, LOSS
* OF USE, LOSS OF DATA, OR ANY INCIDENTAL, CONSEQUENTIAL, DIRECT,
* INDIRECT, OR SPECIAL DAMAGES WHETHER UNDER CONTRACT, TORT, WARRANTY,
* OR OTHERWISE, ARISING IN ANY WAY OUT OF THIS OR ANY OTHER AGREEMENT
* RELATING TO THE WORK, WHETHER OR NOT SUCH AUTHOR OR DEVELOPER HAD
* ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.
*
* Contributors
* - Doug Johnson
*/
/*
* Flat file loader for LAST_TRADE.
*/
#ifndef FLAT_LAST_TRADE_LOAD_H
#define FLAT_LAST_TRADE_LOAD_H
#include "FlatFileLoad_common.h"
namespace TPCE
{
class CFlatLastTradeLoad : public CFlatFileLoader <LAST_TRADE_ROW>
{
private:
CDateTime Flat_LT_DTS;
public:
CFlatLastTradeLoad( char *szFileName, FlatFileOutputModes FlatFileOutputMode ) : CFlatFileLoader<LAST_TRADE_ROW>(szFileName, FlatFileOutputMode){};
/*
* Writes a record to the file.
*/
void WriteNextRecord(PT next_record)
{
Flat_LT_DTS = next_record->LT_DTS;
int rc = fprintf( hOutFile, LastTradeRowFmt,
next_record->LT_S_SYMB,
Flat_LT_DTS.ToStr(FlatFileDateTimeFormat),
next_record->LT_PRICE,
next_record->LT_OPEN_PRICE,
next_record->LT_VOL
);
if (rc < 0) {
throw CSystemErr(CSystemErr::eWriteFile, "CFlatLastTradeLoad::WriteNextRecord");
}
}
};
} // namespace TPCE
#endif //FLAT_LAST_TRADE_LOAD_H
|
mit
|
algorich/iugu-ruby
|
CHANGELOG.md
|
152
|
# Change log
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/).
|
mit
|
photonstorm/phaser
|
src/geom/mesh/RotateFace.js
|
1512
|
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2022 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* Rotates the vertices of a Face to the given angle.
*
* The actual vertex positions are adjusted, not their transformed positions.
*
* Therefore, this updates the vertex data directly.
*
* @function Phaser.Geom.Mesh.RotateFace
* @since 3.50.0
*
* @param {Phaser.Geom.Mesh.Face} face - The Face to rotate.
* @param {number} angle - The angle to rotate to, in radians.
* @param {number} [cx] - An optional center of rotation. If not given, the Face in-center is used.
* @param {number} [cy] - An optional center of rotation. If not given, the Face in-center is used.
*/
var RotateFace = function (face, angle, cx, cy)
{
var x;
var y;
// No point of rotation? Use the inCenter instead, then.
if (cx === undefined && cy === undefined)
{
var inCenter = face.getInCenter();
x = inCenter.x;
y = inCenter.y;
}
var c = Math.cos(angle);
var s = Math.sin(angle);
var v1 = face.vertex1;
var v2 = face.vertex2;
var v3 = face.vertex3;
var tx = v1.x - x;
var ty = v1.y - y;
v1.set(tx * c - ty * s + x, tx * s + ty * c + y);
tx = v2.x - x;
ty = v2.y - y;
v2.set(tx * c - ty * s + x, tx * s + ty * c + y);
tx = v3.x - x;
ty = v3.y - y;
v3.set(tx * c - ty * s + x, tx * s + ty * c + y);
};
module.exports = RotateFace;
|
mit
|
cloudcomputinghust/IoT
|
docker/oneM2M/CSE_IPE/org.eclipse.om2m/org.eclipse.om2m.core/src/main/java/org/eclipse/om2m/core/controller/PollingChannelUriController.java
|
1885
|
/*******************************************************************************
* Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr)
* 7 Colonel Roche 31077 Toulouse - France
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Initial Contributors:
* Thierry Monteil : Project manager, technical co-manager
* Mahdi Ben Alaya : Technical co-manager
* Samir Medjiah : Technical co-manager
* Khalil Drira : Strategy expert
* Guillaume Garzone : Developer
* François Aïssaoui : Developer
*
* New contributors :
*******************************************************************************/
package org.eclipse.om2m.core.controller;
import org.eclipse.om2m.commons.exceptions.NotImplementedException;
import org.eclipse.om2m.commons.exceptions.OperationNotAllowed;
import org.eclipse.om2m.commons.resource.RequestPrimitive;
import org.eclipse.om2m.commons.resource.ResponsePrimitive;
/**
* Controller for polling channel URI
*
*/
public class PollingChannelUriController extends Controller {
@Override
public ResponsePrimitive doCreate(RequestPrimitive request) {
throw new OperationNotAllowed("Create on PollingChannelUri is not allowed");
}
@Override
public ResponsePrimitive doRetrieve(RequestPrimitive request) {
throw new NotImplementedException("Retrieve operation on PollingChannelURI is not implemented");
}
@Override
public ResponsePrimitive doUpdate(RequestPrimitive request) {
throw new OperationNotAllowed("Update on PollingChannelUri is not allowed");
}
@Override
public ResponsePrimitive doDelete(RequestPrimitive request) {
throw new OperationNotAllowed("Delete on PollingChannelUri is not allowed");
}
}
|
mit
|
cdnjs/cdnjs
|
ajax/libs/iCheck/1.0.3/icheck.js
|
14225
|
/*!
* iCheck v1.0.3, http://git.io/arlzeA
* ===================================
* Powerful jQuery and Zepto plugin for checkboxes and radio buttons customization
*
* (c) 2013 Damir Sultanov, http://fronteed.com
* MIT Licensed
*/
(function($) {
// Cached vars
var _iCheck = 'iCheck',
_iCheckHelper = _iCheck + '-helper',
_checkbox = 'checkbox',
_radio = 'radio',
_checked = 'checked',
_unchecked = 'un' + _checked,
_disabled = 'disabled',
_determinate = 'determinate',
_indeterminate = 'in' + _determinate,
_update = 'update',
_type = 'type',
_click = 'click',
_touch = 'touchbegin.i touchend.i',
_add = 'addClass',
_remove = 'removeClass',
_callback = 'trigger',
_label = 'label',
_cursor = 'cursor',
_mobile = /ip(hone|od|ad)|android|blackberry|windows phone|opera mini|silk/i.test(navigator.userAgent) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
// Plugin init
$.fn[_iCheck] = function(options, fire) {
// Walker
var handle = 'input[type="' + _checkbox + '"], input[type="' + _radio + '"]',
stack = $(),
walker = function(object) {
object.each(function() {
var self = $(this);
if (self.is(handle)) {
stack = stack.add(self);
} else {
stack = stack.add(self.find(handle));
}
});
};
// Check if we should operate with some method
if (/^(check|uncheck|toggle|indeterminate|determinate|disable|enable|update|destroy)$/i.test(options)) {
// Normalize method's name
options = options.toLowerCase();
// Find checkboxes and radio buttons
walker(this);
return stack.each(function() {
var self = $(this);
if (options == 'destroy') {
tidy(self, 'ifDestroyed');
} else {
operate(self, true, options);
}
// Fire method's callback
if ($.isFunction(fire)) {
fire();
}
});
// Customization
} else if (typeof options == 'object' || !options) {
// Check if any options were passed
var settings = $.extend({
checkedClass: _checked,
disabledClass: _disabled,
indeterminateClass: _indeterminate,
labelHover: true
}, options),
selector = settings.handle,
hoverClass = settings.hoverClass || 'hover',
focusClass = settings.focusClass || 'focus',
activeClass = settings.activeClass || 'active',
labelHover = !!settings.labelHover,
labelHoverClass = settings.labelHoverClass || 'hover',
// Setup clickable area
area = ('' + settings.increaseArea).replace('%', '') | 0;
// Selector limit
if (selector == _checkbox || selector == _radio) {
handle = 'input[type="' + selector + '"]';
}
// Clickable area limit
if (area < -50) {
area = -50;
}
// Walk around the selector
walker(this);
return stack.each(function() {
var self = $(this);
// If already customized
tidy(self);
var node = this,
id = node.id,
// Layer styles
offset = -area + '%',
size = 100 + (area * 2) + '%',
layer = {
position: 'absolute',
top: offset,
left: offset,
display: 'block',
width: size,
height: size,
margin: 0,
padding: 0,
background: '#fff',
border: 0,
opacity: 0
},
// Choose how to hide input
hide = _mobile ? {
position: 'absolute',
visibility: 'hidden'
} : area ? layer : {
position: 'absolute',
opacity: 0
},
// Get proper class
className = node[_type] == _checkbox ? settings.checkboxClass || 'i' + _checkbox : settings.radioClass || 'i' + _radio,
// Find assigned labels
label = $(_label + '[for="' + id + '"]').add(self.closest(_label)),
// Check ARIA option
aria = !!settings.aria,
// Set ARIA placeholder
ariaID = _iCheck + '-' + Math.random().toString(36).substr(2,6),
// Parent & helper
parent = '<div class="' + className + '" ' + (aria ? 'role="' + node[_type] + '" ' : ''),
helper;
// Set ARIA "labelledby"
if (aria) {
label.each(function() {
parent += 'aria-labelledby="';
if (this.id) {
parent += this.id;
} else {
this.id = ariaID;
parent += ariaID;
}
parent += '"';
});
}
// Wrap input
parent = self.wrap(parent + '/>')[_callback]('ifCreated').parent().append(settings.insert);
// Layer addition
helper = $('<ins class="' + _iCheckHelper + '"/>').css(layer).appendTo(parent);
// Finalize customization
self.data(_iCheck, {o: settings, s: self.attr('style')}).css(hide);
!!settings.inheritClass && parent[_add](node.className || '');
!!settings.inheritID && id && parent.attr('id', _iCheck + '-' + id);
parent.css('position') == 'static' && parent.css('position', 'relative');
operate(self, true, _update);
// Label events
if (label.length) {
label.on(_click + '.i mouseover.i mouseout.i ' + _touch, function(event) {
var type = event[_type],
item = $(this);
// Do nothing if input is disabled
if (!node[_disabled]) {
// Click
if (type == _click) {
if ($(event.target).is('a')) {
return;
}
operate(self, false, true);
// Hover state
} else if (labelHover) {
// mouseout|touchend
if (/ut|nd/.test(type)) {
parent[_remove](hoverClass);
item[_remove](labelHoverClass);
} else {
parent[_add](hoverClass);
item[_add](labelHoverClass);
}
}
if (_mobile) {
event.stopPropagation();
} else {
return false;
}
}
});
}
// Input events
self.on(_click + '.i focus.i blur.i keyup.i keydown.i keypress.i', function(event) {
var type = event[_type],
key = event.keyCode;
// Click
if (type == _click) {
return false;
// Keydown
} else if (type == 'keydown' && key == 32) {
if (!(node[_type] == _radio && node[_checked])) {
if (node[_checked]) {
off(self, _checked);
} else {
on(self, _checked);
}
}
return false;
// Keyup
} else if (type == 'keyup' && node[_type] == _radio) {
!node[_checked] && on(self, _checked);
// Focus/blur
} else if (/us|ur/.test(type)) {
parent[type == 'blur' ? _remove : _add](focusClass);
}
});
// Helper events
helper.on(_click + ' mousedown mouseup mouseover mouseout ' + _touch, function(event) {
var type = event[_type],
// mousedown|mouseup
toggle = /wn|up/.test(type) ? activeClass : hoverClass;
// Do nothing if input is disabled
if (!node[_disabled]) {
// Click
if (type == _click) {
operate(self, false, true);
// Active and hover states
} else {
// State is on
if (/wn|er|in/.test(type)) {
// mousedown|mouseover|touchbegin
parent[_add](toggle);
// State is off
} else {
parent[_remove](toggle + ' ' + activeClass);
}
// Label hover
if (label.length && labelHover && toggle == hoverClass) {
// mouseout|touchend
label[/ut|nd/.test(type) ? _remove : _add](labelHoverClass);
}
}
if (_mobile) {
event.stopPropagation();
} else {
return false;
}
}
});
});
} else {
return this;
}
};
// Do something with inputs
function operate(input, direct, method) {
var node = input[0],
state = /er/.test(method) ? _indeterminate : /bl/.test(method) ? _disabled : _checked,
active = method == _update ? {
checked: node[_checked],
disabled: node[_disabled],
indeterminate: input.attr(_indeterminate) == 'true' || input.attr(_determinate) == 'false'
} : node[state];
// Check, disable or indeterminate
if (/^(ch|di|in)/.test(method) && !active) {
on(input, state);
// Uncheck, enable or determinate
} else if (/^(un|en|de)/.test(method) && active) {
off(input, state);
// Update
} else if (method == _update) {
// Handle states
for (var each in active) {
if (active[each]) {
on(input, each, true);
} else {
off(input, each, true);
}
}
} else if (!direct || method == 'toggle') {
// Helper or label was clicked
if (!direct) {
input[_callback]('ifClicked');
}
// Toggle checked state
if (active) {
if (node[_type] !== _radio) {
off(input, state);
}
} else {
on(input, state);
}
}
}
// Add checked, disabled or indeterminate state
function on(input, state, keep) {
var node = input[0],
parent = input.parent(),
checked = state == _checked,
indeterminate = state == _indeterminate,
disabled = state == _disabled,
callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
regular = option(input, callback + capitalize(node[_type])),
specific = option(input, state + capitalize(node[_type]));
// Prevent unnecessary actions
if (node[state] !== true) {
// Toggle assigned radio buttons
if (!keep && state == _checked && node[_type] == _radio && node.name) {
var form = input.closest('form'),
inputs = 'input[name="' + node.name + '"]';
inputs = form.length ? form.find(inputs) : $(inputs);
inputs.each(function() {
if (this !== node && $(this).data(_iCheck)) {
off($(this), state);
}
});
}
// Indeterminate state
if (indeterminate) {
// Add indeterminate state
node[state] = true;
// Remove checked state
if (node[_checked]) {
off(input, _checked, 'force');
}
// Checked or disabled state
} else {
// Add checked or disabled state
if (!keep) {
node[state] = true;
}
// Remove indeterminate state
if (checked && node[_indeterminate]) {
off(input, _indeterminate, false);
}
}
// Trigger callbacks
callbacks(input, checked, state, keep);
}
// Add proper cursor
if (node[_disabled] && !!option(input, _cursor, true)) {
parent.find('.' + _iCheckHelper).css(_cursor, 'default');
}
// Add state class
parent[_add](specific || option(input, state) || '');
// Set ARIA attribute
if (!!parent.attr('role') && !indeterminate) {
parent.attr('aria-' + (disabled ? _disabled : _checked), 'true');
}
// Remove regular state class
parent[_remove](regular || option(input, callback) || '');
}
// Remove checked, disabled or indeterminate state
function off(input, state, keep) {
var node = input[0],
parent = input.parent(),
checked = state == _checked,
indeterminate = state == _indeterminate,
disabled = state == _disabled,
callback = indeterminate ? _determinate : checked ? _unchecked : 'enabled',
regular = option(input, callback + capitalize(node[_type])),
specific = option(input, state + capitalize(node[_type]));
// Prevent unnecessary actions
if (node[state] !== false) {
// Toggle state
if (indeterminate || !keep || keep == 'force') {
node[state] = false;
}
// Trigger callbacks
callbacks(input, checked, callback, keep);
}
// Add proper cursor
if (!node[_disabled] && !!option(input, _cursor, true)) {
parent.find('.' + _iCheckHelper).css(_cursor, 'pointer');
}
// Remove state class
parent[_remove](specific || option(input, state) || '');
// Set ARIA attribute
if (!!parent.attr('role') && !indeterminate) {
parent.attr('aria-' + (disabled ? _disabled : _checked), 'false');
}
// Add regular state class
parent[_add](regular || option(input, callback) || '');
}
// Remove all traces
function tidy(input, callback) {
if (input.data(_iCheck)) {
// Remove everything except input
input.parent().html(input.attr('style', input.data(_iCheck).s || ''));
// Callback
if (callback) {
input[_callback](callback);
}
// Unbind events
input.off('.i').unwrap();
$(_label + '[for="' + input[0].id + '"]').add(input.closest(_label)).off('.i');
}
}
// Get some option
function option(input, state, regular) {
if (input.data(_iCheck)) {
return input.data(_iCheck).o[state + (regular ? '' : 'Class')];
}
}
// Capitalize some string
function capitalize(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
// Executable handlers
function callbacks(input, checked, callback, keep) {
if (!keep) {
if (checked) {
input[_callback]('ifToggled');
}
input[_callback]('change')[_callback]('ifChanged')[_callback]('if' + capitalize(callback));
}
}
})(window.jQuery || window.Zepto);
|
mit
|
dbisUnibas/ADAMpro
|
src/main/scala/org/vitrivr/adampro/communication/api/EntityOp.scala
|
7563
|
package org.vitrivr.adampro.communication.api
import org.apache.spark.sql.types.{StructField, StructType}
import org.apache.spark.sql.{DataFrame, Row}
import org.vitrivr.adampro.data.entity.Entity._
import org.vitrivr.adampro.data.entity.{AttributeDefinition, Entity, EntityPartitioner, SparsifyHelper}
import org.vitrivr.adampro.distribution.partitioning.{PartitionMode, PartitioningManager}
import org.vitrivr.adampro.process.SharedComponentContext
import org.vitrivr.adampro.query.query.Predicate
import scala.util.{Failure, Success, Try}
/**
* adamtwo
*
* Ivan Giangreco
* May 2016
*/
object EntityOp extends GenericOp {
/**
* Lists names of all entities.
*
* @return
*/
def list()(implicit ac: SharedComponentContext): Try[Seq[EntityName]] = {
execute("list entities operation") {
Success(Entity.list)
}
}
/**
* Creates an entity.
*
* @param entityname name of entity
* @param attributes fields of the entity to create
* @param ifnotexists if set to true and the entity exists, the entity is just returned; otherwise an error is thrown
* @return
*/
def create(entityname: EntityName, attributes: Seq[AttributeDefinition], ifnotexists: Boolean = false)(implicit ac: SharedComponentContext): Try[Entity] = {
execute("create entity " + entityname + " operation") {
Entity.create(entityname, attributes, ifnotexists)
}
}
/**
* Checks if entity exists
*
* @param entityname name of entity
* @return
*/
def exists(entityname: EntityName)(implicit ac: SharedComponentContext): Try[Boolean] = {
execute("check entity " + entityname + " exists operation") {
Success(Entity.exists(entityname))
}
}
/**
* Caches entity.
*
* @param entityname name of entity
* @return
*/
def cache(entityname: EntityName)(implicit ac: SharedComponentContext): Try[Void] = {
execute("cache entity " + entityname + " operation") {
val entity = Entity.load(entityname)
if (entity.isSuccess) {
entity.get.cache()
Success(null)
} else {
Failure(entity.failed.get)
}
}
}
/**
* Count operation. Returns number of elements in entity (only feature storage is considered).
*
* @param entityname name of entity
* @return
*/
def count(entityname: EntityName)(implicit ac: SharedComponentContext): Try[Long] = {
execute("count tuples in entity " + entityname + " operation") {
val entity = Entity.load(entityname)
if (entity.isSuccess) {
Success(entity.get.count)
} else {
Failure(entity.failed.get)
}
}
}
/**
* Compresses dense vectors to sparse vectors.
*
* @param entityname name of entity
* @return
*/
def sparsify(entityname: EntityName, attribute: String)(implicit ac: SharedComponentContext): Try[Entity] = {
execute("compress tuples in entity " + entityname + " operation") {
val entity = Entity.load(entityname)
if (entity.isSuccess) {
SparsifyHelper(entity.get, attribute)
} else {
Failure(entity.failed.get)
}
}
}
/**
* Inserts data into the entity.
*
* @param entityname name of entity
* @param inserts data frame containing all attributes to insert
*
*/
def insert(entityname: EntityName, inserts: DataFrame)(implicit ac: SharedComponentContext): Try[Void] = {
execute("insert data into entity " + entityname + " operation") {
val entity = Entity.load(entityname)
if (entity.isSuccess) {
entity.get.insert(inserts)
} else {
Failure(entity.failed.get)
}
}
}
/**
* Deletes data from the entity.
*
* @param entityname name of entity
* @param predicates list of predicates
*
*/
def delete(entityname: EntityName, predicates: Seq[Predicate])(implicit ac: SharedComponentContext): Try[Int] = {
execute("delete data from " + entityname + " operation") {
val entity = Entity.load(entityname)
if (entity.isSuccess) {
Success(entity.get.delete(predicates))
} else {
Failure(entity.failed.get)
}
}
}
/**
* Vacuum an entity.
*
* @param entityname name of entity
*
*/
def vacuum(entityname: EntityName)(implicit ac: SharedComponentContext): Try[Void] = {
execute("vacuum entity " + entityname + " operation") {
val entity = Entity.load(entityname)
if (entity.isSuccess) {
entity.get.vacuum()
Success(null)
} else {
Failure(entity.failed.get)
}
}
}
/**
* Gives preview of entity.
*
* @param entityname name of entity
* @param k number of elements to show in preview
* @return
*/
def preview(entityname: EntityName, k: Int = 100)(implicit ac: SharedComponentContext): Try[DataFrame] = {
execute("preview entity " + entityname + " operation") {
val entity = Entity.load(entityname)
if (entity.isSuccess) {
val previewDf = entity.get.show(k)
if(previewDf.isDefined){
Success(previewDf.get)
} else {
val schema = StructType(entity.get.schema(fullSchema = false).map(field => StructField(field.name, field.attributeType.datatype, nullable = true)))
val emptyDf = ac.sqlContext.createDataFrame(ac.spark.sparkContext.emptyRDD[Row], schema)
Success(emptyDf)
}
} else {
Failure(entity.failed.get)
}
}
}
/**
* Returns properties of an entity/attribute in an entity.
*
* @param entityname name of entity
* @param attribute name of attribute
* @param options possible options for operation
* @return
*/
def properties(entityname: EntityName, attribute: Option[String] = None, options: Map[String, String] = Map())(implicit ac: SharedComponentContext): Try[Map[String, String]] = {
execute("load properties of entity " + entityname + " operation") {
val entity = Entity.load(entityname)
if (entity.isSuccess) {
if(attribute.isDefined) {
Success(entity.get.attributePropertiesMap(attribute.get, options))
} else {
Success(entity.get.propertiesMap(options))
}
} else {
Failure(entity.failed.get)
}
}
}
/**
* Repartitions the entity.
*
* @param entityname name of entity
* @param npartitions number of partitions
* @param attribute name of attribute to use as partitioning key
* @param mode partition mode (e.g., create new index, replace current index, etc.)
* @return
*/
def partition(entityname: EntityName, npartitions: Int, joins: Option[DataFrame], attribute: Option[AttributeName], mode: PartitionMode.Value)(implicit ac: SharedComponentContext): Try[Entity] = {
execute("repartition entity " + entityname + " operation") {
val entity = Entity.load(entityname)
if (entity.isSuccess) {
PartitioningManager.fragment(entity.get, npartitions, joins, attribute, mode)
} else {
Failure(entity.failed.get)
}
}
}
/**
* Drops an entity.
*
* @param entityname name of entity
* @param ifexists returns no error if set to true and entity does not exist
* @return
*/
def drop(entityname: EntityName, ifexists: Boolean = false)(implicit ac: SharedComponentContext): Try[Void] = {
execute("drop entity " + entityname + " operation") {
Entity.drop(entityname, ifexists)
}
}
}
|
mit
|
benghaem/cavrr
|
src/IOREG.h
|
6760
|
/* ATtiny 25 / 45 / 85 IO Register Names
* generated from: http://www.atmel.com/Images/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet.pdf
*
* Named registers also have named values for their bits
* Named bits are shown below as REGISTERNAME_BITNAME
*/
#ifndef IOREG_H
#define IOREG_H
#define SREG 0x3F
#define SREG_I 7
#define SREG_T 6
#define SREG_H 5
#define SREG_S 4
#define SREG_V 3
#define SREG_N 2
#define SREG_Z 1
#define SREG_C 0
#define SPH 0x3E
#define SPH_SP9 1
#define SPH_SP8 0
#define SPL 0x3D
#define SPL_SP7 7
#define SPL_SP6 6
#define SPL_SP5 5
#define SPL_SP4 4
#define SPL_SP3 3
#define SPL_SP2 2
#define SPL_SP1 1
#define SPL_SP0 0
#define GIMSK 0x3B
#define GIMSK_INT0 6
#define GIMSK_PCIE 5
#define GIFR 0x3A
#define GIFR_INTF0 6
#define GIFR_PCIF 5
#define TIMSK 0x39
#define TIMSK_OCIE1A 6
#define TIMSK_OCIE1B 5
#define TIMSK_OCIE0A 4
#define TIMSK_OCIE0B 3
#define TIMSK_TOIE1 2
#define TIMSK_TOIE0 1
#define TIFR 0x38
#define TIFR_OCF1A 6
#define TIFR_OCF1B 5
#define TIFR_OCF0A 4
#define TIFR_OCF0B 3
#define TIFR_TOV1 2
#define TIFR_TOV0 1
#define SPMCSR 0x37
#define SPMCSR_RSIG 5
#define SPMCSR_CTPB 4
#define SPMCSR_RFLB 3
#define SPMCSR_PGWRT 2
#define SPMCSR_PGERS 1
#define SPMCSR_SPMEN 0
#define MCUCR 0x35
#define MCUCR_BODS 7
#define MCUCR_PUD 6
#define MCUCR_SE 5
#define MCUCR_SM1 4
#define MCUCR_SM0 3
#define MCUCR_BODSE 2
#define MCUCR_ISC01 1
#define MCUCR_ISC00 0
#define MCUSR 0x34
#define MCUSR_WDRF 3
#define MCUSR_BORF 2
#define MCUSR_EXTRF 1
#define MCUSR_PORF 0
#define TCCR0B 0x33
#define TCCR0B_FOC0A 7
#define TCCR0B_FOC0B 6
#define TCCR0B_WGM02 3
#define TCCR0B_CS02 2
#define TCCR0B_CS01 1
#define TCCR0B_CS00 0
#define TCNT0 0x32
#define OSCCAL 0x31
#define TCCR1 0x30
#define TCCR1_CTC1 7
#define TCCR1_PWM1A 6
#define TCCR1_COM1A1 5
#define TCCR1_COM1A0 4
#define TCCR1_CS13 3
#define TCCR1_CS12 2
#define TCCR1_CS11 1
#define TCCR1_CS10 0
#define TCNT1 0x2F
#define OCR1A 0x2E
#define OCR1C 0x2D
#define GTCCR 0x2C
#define GTCCR_TSM 7
#define GTCCR_PWM1B 6
#define GTCCR_COM1B1 5
#define GTCCR_COM1B0 4
#define GTCCR_FOC1B 3
#define GTCCR_FOC1A 2
#define GTCCR_PSR1 1
#define GTCCR_PSR0 0
#define OCR1B 0x2B
#define TCCR0A 0x2A
#define TCCR0A_COM0A1 7
#define TCCR0A_COM0A0 6
#define TCCR0A_COM0B1 5
#define TCCR0A_COM0B0 4
#define TCCR0A_WGM01 1
#define TCCR0A_WGM00 0
#define OCR0A 0x29
#define OCR0B 0x28
#define PLLCSR 0x27
#define PLLCSR_LSM 7
#define PLLCSR_PCKE 2
#define PLLCSR_PLLE 1
#define PLLCSR_PLOCK 0
#define CLKPR 0x26
#define CLKPR_CLKPCE 7
#define CLKPR_CLKPS3 3
#define CLKPR_CLKPS2 2
#define CLKPR_CLKPS1 1
#define CLKPR_CLKPS0 0
#define DT1A 0x25
#define DT1A_DT1AH3 7
#define DT1A_DT1AH2 6
#define DT1A_DT1AH1 5
#define DT1A_DT 4
#define DT1A_1AH0 3
#define DT1A_DT1AL3 2
#define DT1A_DT1AL2 1
#define DT1A_DT1AL1 0
#define DT1B 0x24
#define DT1B_DT1BH3 7
#define DT1B_DT1BH2 6
#define DT1B_DT1BH1 5
#define DT1B_DT 4
#define DT1B_1BH0 3
#define DT1B_DT1BL3 2
#define DT1B_DT1BL2 1
#define DT1B_DT1BL1 0
#define DTPS1 0x23
#define DTPS1_DTPS11 1
#define DTPS1_DTPS10 0
#define DWDR 0x22
#define WDTCR 0x21
#define WDTCR_WDIF 7
#define WDTCR_WDIE 6
#define WDTCR_WDP3 5
#define WDTCR_WDCE 4
#define WDTCR_WDE 3
#define WDTCR_WDP2 2
#define WDTCR_WDP1 1
#define WDTCR_WDP0 0
#define PRR 0x20
#define PRR_PRTIM1 3
#define PRR_PRTIM0 2
#define PRR_PRUSI 1
#define PRR_PRADC 0
#define EEARH 0x1F
#define EEARH_EEAR8 0
#define EEARL 0x1E
#define EEARL_EEAR7 7
#define EEARL_EEAR6 6
#define EEARL_EEAR5 5
#define EEARL_EEAR4 4
#define EEARL_EEAR3 3
#define EEARL_EEAR2 2
#define EEARL_EEAR1 1
#define EEARL_EEAR0 0
#define EEDR 0x1D
#define EECR 0x1C
#define EECR_EEPM1 5
#define EECR_EEPM0 4
#define EECR_EERIE 3
#define EECR_EEMPE 2
#define EECR_EEPE 1
#define EECR_EERE 0
#define PORTB 0x18
#define PORTB_PORTB5 5
#define PORTB_PORTB4 4
#define PORTB_PORTB3 3
#define PORTB_PORTB2 2
#define PORTB_PORTB1 1
#define PORTB_PORTB0 0
#define DDRB 0x17
#define DDRB_DDB5 5
#define DDRB_DDB4 4
#define DDRB_DDB3 3
#define DDRB_DDB2 2
#define DDRB_DDB1 1
#define DDRB_DDB0 0
#define PINB 0x16
#define PINB_PINB5 5
#define PINB_PINB4 4
#define PINB_PINB3 3
#define PINB_PINB2 2
#define PINB_PINB1 1
#define PINB_PINB0 0
#define PCMSK 0x15
#define PCMSK_PCINT5 5
#define PCMSK_PCINT4 4
#define PCMSK_PCINT3 3
#define PCMSK_PCINT2 2
#define PCMSK_PCINT1 1
#define PCMSK_PCINT0 0
#define DIDR0 0x14
#define DIDR0_ADC0D 5
#define DIDR0_ADC2D 4
#define DIDR0_ADC3D 3
#define DIDR0_ADC1D 2
#define DIDR0_AIN1D 1
#define DIDR0_AIN0D 0
#define GPIOR2 0x13
#define GPIOR1 0x12
#define GPIOR0 0x11
#define USIBR 0x10
#define USIDR 0x0F
#define USISR 0x0E
#define USISR_USISIF 7
#define USISR_USIOIF 6
#define USISR_USIPF 5
#define USISR_USIDC 4
#define USISR_USICNT3 3
#define USISR_USICNT2 2
#define USISR_USICNT1 1
#define USISR_USICNT0 0
#define USICR 0x0D
#define USICR_USISIE 7
#define USICR_USIOIE 6
#define USICR_USIWM1 5
#define USICR_USIWM0 4
#define USICR_USICS1 3
#define USICR_USICS0 2
#define USICR_USICLK 1
#define USICR_USITC 0
#define ACSR 0x08
#define ACSR_ACD 7
#define ACSR_ACBG 6
#define ACSR_ACO 5
#define ACSR_ACI 4
#define ACSR_ACIE 3
#define ACSR_ACIS1 1
#define ACSR_ACIS0 0
#define ADMUX 0x07
#define ADMUX_REFS1 7
#define ADMUX_REFS0 6
#define ADMUX_ADLAR 5
#define ADMUX_REFS2 4
#define ADMUX_MUX3 3
#define ADMUX_MUX2 2
#define ADMUX_MUX1 1
#define ADMUX_MUX0 0
#define ADCSRA 0x06
#define ADCSRA_ADEN 7
#define ADCSRA_ADSC 6
#define ADCSRA_ADATE 5
#define ADCSRA_ADIF 4
#define ADCSRA_ADIE 3
#define ADCSRA_ADPS2 2
#define ADCSRA_ADPS1 1
#define ADCSRA_ADPS0 0
#define ADCH 0x05
#define ADCL 0x04
#define ADCSRB 0x03
#define ADCSRB_BIN 7
#define ADCSRB_ACME 6
#define ADCSRB_IPR 5
#define ADCSRB_ADTS2 2
#define ADCSRB_ADTS1 1
#define ADCSRB_ADTS0 0
#endif /* IOREG.h */
|
mit
|
ohmygodvt95/wevivu
|
vendor/assets/components/angular-material/modules/js/sidenav/sidenav.css
|
4036
|
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.1-master-f6dedff
*/
md-sidenav {
box-sizing: border-box;
position: absolute;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
z-index: 60;
width: 320px;
max-width: 320px;
bottom: 0;
overflow: auto;
-webkit-overflow-scrolling: touch; }
md-sidenav ul {
list-style: none; }
md-sidenav.md-closed {
display: none; }
md-sidenav.md-closed-add, md-sidenav.md-closed-remove {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-transition: 0.2s ease-in all;
transition: 0.2s ease-in all; }
md-sidenav.md-closed-add.md-closed-add-active, md-sidenav.md-closed-remove.md-closed-remove-active {
-webkit-transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
md-sidenav.md-locked-open-add, md-sidenav.md-locked-open-remove {
position: static;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0); }
md-sidenav.md-locked-open, md-sidenav.md-locked-open.md-closed, md-sidenav.md-locked-open.md-closed.md-sidenav-left, md-sidenav.md-locked-open.md-closed, md-sidenav.md-locked-open.md-closed.md-sidenav-right {
position: static;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0); }
md-sidenav.md-locked-open-remove.md-closed {
position: static;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0); }
md-sidenav.md-closed.md-locked-open-add {
position: static;
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-transform: translate3d(0%, 0, 0);
transform: translate3d(0%, 0, 0); }
md-sidenav.md-closed.md-locked-open-add:not(.md-locked-open-add-active) {
-webkit-transition: width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2), min-width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
transition: width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2), min-width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
width: 0 !important;
min-width: 0 !important; }
md-sidenav.md-closed.md-locked-open-add-active {
-webkit-transition: width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2), min-width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
transition: width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2), min-width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2); }
md-sidenav.md-locked-open-remove-active {
-webkit-transition: width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2), min-width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
transition: width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2), min-width 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
width: 0 !important;
min-width: 0 !important; }
.md-sidenav-backdrop.md-locked-open {
display: none; }
.md-sidenav-left, md-sidenav {
left: 0;
top: 0;
-webkit-transform: translate3d(0%, 0, 0);
transform: translate3d(0%, 0, 0); }
.md-sidenav-left.md-closed, md-sidenav.md-closed {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0); }
.md-sidenav-right {
left: 100%;
top: 0;
-webkit-transform: translate(-100%, 0);
transform: translate(-100%, 0); }
.md-sidenav-right.md-closed {
-webkit-transform: translate(0%, 0);
transform: translate(0%, 0); }
@media (min-width: 600px) {
md-sidenav {
max-width: 400px; } }
@media (max-width: 456px) {
md-sidenav {
width: calc(100% - 56px);
min-width: calc(100% - 56px);
max-width: calc(100% - 56px); } }
@media screen and (-ms-high-contrast: active) {
.md-sidenav-left, md-sidenav {
border-right: 1px solid #fff; }
.md-sidenav-right {
border-left: 1px solid #fff; } }
|
mit
|
zapnap/voting
|
lib/voting/domain.rb
|
352
|
module Voting
class Domain
include DataMapper::Resource
property :id, Serial
property :name, String
property :created_at, DateTime
property :updated_at, DateTime
has n, :users, :class_name => "Voting::User", :child_key => [:domain_id]
validates_present :name
validates_is_unique :name
end
end
|
mit
|
ceolter/angular-grid
|
community-modules/core/dist/es6/rendering/cellComp.d.ts
|
6950
|
// Type definitions for @ag-grid-community/core v25.0.1
// Project: http://www.ag-grid.com/
// Definitions by: Niall Crosby <https://github.com/ag-grid/>
import { Column } from "../entities/column";
import { CellChangedEvent, RowNode } from "../entities/rowNode";
import { CellEvent, FlashCellsEvent } from "../events";
import { Beans } from "./beans";
import { Component } from "../widgets/component";
import { ICellEditorComp } from "../interfaces/iCellEditor";
import { ICellRendererComp } from "./cellRenderers/iCellRenderer";
import { ColDef } from "../entities/colDef";
import { CellPosition } from "../entities/cellPosition";
import { RowComp } from "./row/rowComp";
import { IFrameworkOverrides } from "../interfaces/iFrameworkOverrides";
import { TooltipParentComp } from '../widgets/tooltipFeature';
import { ITooltipParams } from "./tooltipComponent";
export declare class CellComp extends Component implements TooltipParentComp {
static DOM_DATA_KEY_CELL_COMP: string;
private static CELL_RENDERER_TYPE_NORMAL;
private static CELL_RENDERER_TYPE_PINNED;
private eCellWrapper;
private eCellValue;
private beans;
private column;
private rowNode;
private eParentRow;
private cellPosition;
private rangeCount;
private hasChartRange;
private usingWrapper;
private wrapText;
private includeSelectionComponent;
private includeRowDraggingComponent;
private includeDndSourceComponent;
private cellFocused;
private editingCell;
private cellEditorInPopup;
private hideEditorPopup;
private createCellRendererFunc;
private lastIPadMouseClickEvent;
private usingCellRenderer;
private cellRendererType;
private cellRenderer;
private cellRendererGui;
private cellEditor;
private selectionHandle;
private autoHeightCell;
private firstRightPinned;
private lastLeftPinned;
private rowComp;
private rangeSelectionEnabled;
private value;
private valueFormatted;
private colsSpanning;
private rowSpan;
private suppressRefreshCell;
private tooltipFeatureEnabled;
private tooltip;
private scope;
private readonly printLayout;
private cellEditorVersion;
private cellRendererVersion;
constructor(scope: any, beans: Beans, column: Column, rowNode: RowNode, rowComp: RowComp, autoHeightCell: boolean, printLayout: boolean);
getCreateTemplate(): string;
private getStylesForRowSpanning;
afterAttached(): void;
private createTooltipFeatureIfNeeded;
onColumnHover(): void;
onCellChanged(event: CellChangedEvent): void;
private getCellLeft;
private getCellWidth;
onFlashCells(event: FlashCellsEvent): void;
private setupColSpan;
getColSpanningList(): Column[];
private onDisplayColumnsChanged;
private refreshAriaIndex;
private getInitialCssClasses;
getInitialValueToRender(): string;
getRenderedRow(): RowComp;
isSuppressNavigable(): boolean;
getCellRenderer(): ICellRendererComp | null;
getCellEditor(): ICellEditorComp | null;
onNewColumnsLoaded(): void;
private postProcessWrapText;
refreshCell(params?: {
suppressFlash?: boolean;
newData?: boolean;
forceRefresh?: boolean;
}): void;
flashCell(delays?: {
flashDelay: number;
fadeDelay: number;
}): void;
private animateCell;
private replaceContentsAfterRefresh;
private updateAngular1ScopeAndCompile;
private angular1Compile;
private postProcessStylesFromColDef;
private preProcessStylesFromColDef;
private processStylesFromColDef;
private postProcessClassesFromColDef;
private preProcessClassesFromColDef;
private processClassesFromColDef;
private putDataIntoCellAfterRefresh;
attemptCellRendererRefresh(): boolean;
private refreshToolTip;
private valuesAreEqual;
private getToolTip;
getTooltipParams(): ITooltipParams;
private getTooltipText;
private processCellClassRules;
private postProcessCellClassRules;
private preProcessCellClassRules;
setUsingWrapper(): void;
private chooseCellRenderer;
private createCellRendererInstance;
private afterCellRendererCreated;
private createCellRendererParams;
private formatValue;
private getValueToUse;
private getValueAndFormat;
private getValue;
onMouseEvent(eventName: string, mouseEvent: MouseEvent): void;
dispatchCellContextMenuEvent(event: Event): void;
createEvent(domEvent: Event | null, eventType: string): CellEvent;
private onMouseOut;
private onMouseOver;
private onCellDoubleClicked;
startRowOrCellEdit(keyPress?: number | null, charPress?: string): void;
isCellEditable(): boolean;
startEditingIfEnabled(keyPress?: number | null, charPress?: string | null, cellStartedEdit?: boolean): void;
private createCellEditor;
private afterCellEditorCreated;
private addInCellEditor;
private addPopupCellEditor;
private onPopupEditorClosed;
private setInlineEditingClass;
private createCellEditorParams;
private stopEditingAndFocus;
private parseValue;
focusCell(forceBrowserFocus?: boolean): void;
setFocusInOnEditor(): void;
isEditing(): boolean;
onKeyDown(event: KeyboardEvent): void;
setFocusOutOnEditor(): void;
private onNavigationKeyPressed;
private onShiftRangeSelect;
private onTabKeyDown;
private onBackspaceOrDeleteKeyPressed;
private onEnterKeyDown;
private navigateAfterEdit;
private onF2KeyDown;
private onEscapeKeyDown;
onKeyPress(event: KeyboardEvent): void;
private onSpaceKeyPressed;
private onMouseDown;
private isRightClickInExistingRange;
private containsWidget;
private isDoubleClickOnIPad;
private onCellClicked;
private createGridCellVo;
getCellPosition(): CellPosition;
getParentRow(): HTMLElement;
setParentRow(eParentRow: HTMLElement): void;
getColumn(): Column;
getComponentHolder(): ColDef;
detach(): void;
destroy(): void;
onLeftChanged(): void;
private modifyLeftForPrintLayout;
onWidthChanged(): void;
private getRangeBorders;
private getInitialRangeClasses;
onRowIndexChanged(): void;
onRangeSelectionChanged(): void;
private getHasChartRange;
private shouldHaveSelectionHandle;
private addSelectionHandle;
updateRangeBordersIfRangeCount(): void;
private refreshHandle;
private updateRangeBorders;
onFirstRightPinnedChanged(): void;
onLastLeftPinnedChanged(): void;
private populateTemplate;
protected getFrameworkOverrides(): IFrameworkOverrides;
private addRowDragging;
private addDndSource;
private addSelectionCheckbox;
private addDomData;
private isSingleCell;
onCellFocused(event?: any): void;
stopRowOrCellEdit(cancel?: boolean): void;
stopEditing(cancel?: boolean): void;
private clearCellElement;
}
|
mit
|
dolymood/angular-packages
|
angular-1.3.17/docs/examples/example-example84/index-production.html
|
812
|
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-example84-production</title>
<link href="animations.css" rel="stylesheet" type="text/css">
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular-animate.js"></script>
<script src="script.js"></script>
</head>
<body ng-app="includeExample">
<div ng-controller="ExampleController">
<select ng-model="template" ng-options="t.name for t in templates">
<option value="">(blank)</option>
</select>
url of the template: <code>{{template.url}}</code>
<hr/>
<div class="slide-animate-container">
<div class="slide-animate" ng-include="template.url"></div>
</div>
</div>
</body>
</html>
|
mit
|
ccpgames/dbkit
|
sql-core/zsystem/zsystem.Settings_Value.sql
|
369
|
IF OBJECT_ID('zsystem.Settings_Value') IS NOT NULL
DROP FUNCTION zsystem.Settings_Value
GO
CREATE FUNCTION zsystem.Settings_Value(@group varchar(200), @key varchar(200))
RETURNS nvarchar(max)
BEGIN
DECLARE @value nvarchar(max)
SELECT @value = LTRIM(RTRIM([value])) FROM zsystem.settings WHERE [group] = @group AND [key] = @key
RETURN ISNULL(@value, '')
END
GO
|
mit
|
CslaGenFork/CslaGenFork
|
trunk/CoverageTest/Invoices-CS-DAL-DR/Invoices.DataAccess.Sql/ProductTypeCachedNVLDal.cs
|
135
|
using System;
using Csla;
namespace Invoices.DataAccess.Sql
{
public partial class ProductTypeCachedNVLDal
{
}
}
|
mit
|
WeebDev/lolisafe
|
src/api/routes/admin/usersGET.js
|
473
|
const Route = require('../../structures/Route');
class usersGET extends Route {
constructor() {
super('/admin/users', 'get', { adminOnly: true });
}
async run(req, res, db) {
try {
const users = await db.table('users')
.select('id', 'username', 'enabled', 'isAdmin', 'createdAt');
return res.json({
message: 'Successfully retrieved users',
users
});
} catch (error) {
return super.error(res, error);
}
}
}
module.exports = usersGET;
|
mit
|
ceolter/angular-grid
|
enterprise-modules/excel-export/src/excelExport/excelXlsxFactory.ts
|
3835
|
import { Autowired, Bean, BeanStub, XmlElement } from '@ag-grid-community/core';
import coreFactory from './files/ooxml/core';
import contentTypesFactory from './files/ooxml/contentTypes';
import officeThemeFactory from './files/ooxml/themes/office';
import sharedStringsFactory from './files/ooxml/sharedStrings';
import stylesheetFactory, { registerStyles } from './files/ooxml/styles/stylesheet';
import workbookFactory from './files/ooxml/workbook';
import worksheetFactory from './files/ooxml/worksheet';
import relationshipsFactory from './files/ooxml/relationships';
import { ExcelStyle, ExcelWorksheet } from '@ag-grid-community/core';
import { XmlFactory } from "@ag-grid-community/csv-export";
/**
* See https://www.ecma-international.org/news/TC45_current_work/OpenXML%20White%20Paper.pdf
*/
@Bean('excelXlsxFactory')
export class ExcelXlsxFactory extends BeanStub {
@Autowired('xmlFactory') private xmlFactory: XmlFactory;
private sharedStrings: string[] = [];
private sheetNames: string[];
public createSharedStrings(): string {
return this.createXmlPart(sharedStringsFactory.getTemplate(this.sharedStrings));
}
private createXmlPart(body: XmlElement): string {
const header = this.xmlFactory.createHeader({
encoding: 'UTF-8',
standalone: 'yes'
});
const xmlBody = this.xmlFactory.createXml(body);
return `${header}${xmlBody}`;
}
public createExcel(styles: ExcelStyle[], worksheets: ExcelWorksheet[], sharedStrings: string[] = []): string {
this.sharedStrings = sharedStrings;
this.sheetNames = worksheets.map(worksheet => worksheet.name);
registerStyles(styles);
return this.createWorksheet(worksheets);
}
public createCore(): string {
return this.createXmlPart(coreFactory.getTemplate());
}
public createContentTypes(): string {
return this.createXmlPart(contentTypesFactory.getTemplate());
}
public createRels(): string {
const rs = relationshipsFactory.getTemplate([{
Id: 'rId1',
Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument',
Target: 'xl/workbook.xml'
}, {
Id: 'rId2',
Type: 'http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties',
Target: 'docProps/core.xml'
}]);
return this.createXmlPart(rs);
}
public createStylesheet(): string {
return this.createXmlPart(stylesheetFactory.getTemplate());
}
public createTheme(): string {
return this.createXmlPart(officeThemeFactory.getTemplate());
}
public createWorkbook(): string {
return this.createXmlPart(workbookFactory.getTemplate(this.sheetNames));
}
public createWorkbookRels(): string {
const rs = relationshipsFactory.getTemplate([{
Id: 'rId1',
Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet',
Target: 'worksheets/sheet1.xml'
}, {
Id: 'rId2',
Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme',
Target: 'theme/theme1.xml'
}, {
Id: 'rId3',
Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles',
Target: 'styles.xml'
}, {
Id: 'rId4',
Type: 'http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings',
Target: 'sharedStrings.xml'
}]);
return this.createXmlPart(rs);
}
public createWorksheet(worksheets: ExcelWorksheet[]): string {
return this.createXmlPart(worksheetFactory.getTemplate(worksheets[0]));
}
}
|
mit
|
ceolter/angular-grid
|
grid-packages/ag-grid-docs/documentation/src/pages/master-detail-custom-detail/examples/simple-custom-detail/detailCellRenderer_vanilla.js
|
294
|
function DetailCellRenderer() {}
DetailCellRenderer.prototype.init = function(params) {
this.eGui = document.createElement('div');
this.eGui.innerHTML = '<h1 style="padding: 20px;">My Custom Detail</h1>';
};
DetailCellRenderer.prototype.getGui = function() {
return this.eGui;
};
|
mit
|
deki/jira-plugin
|
src/main/resources/hudson/plugins/jira/JiraSite/help-timeout.html
|
68
|
<div>
Connection timeout for JIRA REST API calls (in seconds)
</div>
|
mit
|
cdnjs/cdnjs
|
ajax/libs/highcharts/8.0.0/es-modules/annotations/annotations.src.js
|
42338
|
/* *
*
* (c) 2009-2017 Highsoft, Black Label
*
* License: www.highcharts.com/license
*
* */
'use strict';
import H from '../parts/Globals.js';
import U from '../parts/Utilities.js';
var defined = U.defined,
destroyObjectProperties = U.destroyObjectProperties,
erase = U.erase,
extend = U.extend,
pick = U.pick,
splat = U.splat,
wrap = U.wrap;
import '../parts/Chart.js';
import controllableMixin from './controllable/controllableMixin.js';
import ControllableRect from './controllable/ControllableRect.js';
import ControllableCircle from './controllable/ControllableCircle.js';
import ControllablePath from './controllable/ControllablePath.js';
import ControllableImage from './controllable/ControllableImage.js';
import ControllableLabel from './controllable/ControllableLabel.js';
import eventEmitterMixin from './eventEmitterMixin.js';
import MockPoint from './MockPoint.js';
import ControlPoint from './ControlPoint.js';
var merge = H.merge,
addEvent = H.addEvent,
fireEvent = H.fireEvent,
find = H.find,
reduce = H.reduce,
chartProto = H.Chart.prototype;
/* *********************************************************************
*
* ANNOTATION
*
******************************************************************** */
/**
* @typedef {
* Annotation.ControllableCircle|
* Annotation.ControllableImage|
* Annotation.ControllablePath|
* Annotation.ControllableRect
* }
* Annotation.Shape
*/
/**
* @typedef {Annotation.ControllableLabel} Annotation.Label
*/
/**
* An annotation class which serves as a container for items like labels or
* shapes. Created items are positioned on the chart either by linking them to
* existing points or created mock points
*
* @class
* @name Highcharts.Annotation
*
* @param {Highcharts.Chart} chart a chart instance
* @param {Highcharts.AnnotationsOptions} userOptions the options object
*/
var Annotation = H.Annotation = function (chart, userOptions) {
var labelsAndShapes;
/**
* The chart that the annotation belongs to.
*
* @type {Highcharts.Chart}
*/
this.chart = chart;
/**
* The array of points which defines the annotation.
*
* @type {Array<Highcharts.Point>}
*/
this.points = [];
/**
* The array of control points.
*
* @type {Array<Annotation.ControlPoint>}
*/
this.controlPoints = [];
this.coll = 'annotations';
/**
* The array of labels which belong to the annotation.
*
* @type {Array<Annotation.Label>}
*/
this.labels = [];
/**
* The array of shapes which belong to the annotation.
*
* @type {Array<Annotation.Shape>}
*/
this.shapes = [];
/**
* The options for the annotations.
*
* @type {Highcharts.AnnotationsOptions}
*/
this.options = merge(this.defaultOptions, userOptions);
/**
* The user options for the annotations.
*
* @type {Highcharts.AnnotationsOptions}
*/
this.userOptions = userOptions;
// Handle labels and shapes - those are arrays
// Merging does not work with arrays (stores reference)
labelsAndShapes = this.getLabelsAndShapesOptions(
this.options,
userOptions
);
this.options.labels = labelsAndShapes.labels;
this.options.shapes = labelsAndShapes.shapes;
/**
* The callback that reports to the overlapping-labels module which
* labels it should account for.
*
* @name labelCollector
* @memberOf Annotation#
* @type {Function}
*/
/**
* The group svg element.
*
* @name group
* @memberOf Annotation#
* @type {Highcharts.SVGElement}
*/
/**
* The group svg element of the annotation's shapes.
*
* @name shapesGroup
* @memberOf Annotation#
* @type {Highcharts.SVGElement}
*/
/**
* The group svg element of the annotation's labels.
*
* @name labelsGroup
* @memberOf Annotation#
* @type {Highcharts.SVGElement}
*/
this.init(chart, this.options);
};
merge(
true,
Annotation.prototype,
controllableMixin,
eventEmitterMixin,
/** @lends Annotation# */
{
/**
* List of events for `annotation.options.events` that should not be
* added to `annotation.graphic` but to the `annotation`.
*
* @type {Array<string>}
*/
nonDOMEvents: ['add', 'afterUpdate', 'drag', 'remove'],
/**
* A basic type of an annotation. It allows to add custom labels
* or shapes. The items can be tied to points, axis coordinates
* or chart pixel coordinates.
*
* @sample highcharts/annotations/basic/
* Basic annotations
* @sample highcharts/demo/annotations/
* Advanced annotations
* @sample highcharts/css/annotations
* Styled mode
* @sample highcharts/annotations-advanced/controllable
* Controllable items
* @sample {highstock} stock/annotations/fibonacci-retracements
* Custom annotation, Fibonacci retracement
*
* @type {Array<*>}
* @since 6.0.0
* @requires modules/annotations
* @optionparent annotations
*/
defaultOptions: {
/**
* Sets an ID for an annotation. Can be user later when removing an
* annotation in [Chart#removeAnnotation(id)](
* /class-reference/Highcharts.Chart#removeAnnotation) method.
*
* @type {string|number}
* @apioption annotations.id
*/
/**
* Whether the annotation is visible.
*
* @sample highcharts/annotations/visible/
* Set annotation visibility
*/
visible: true,
/**
* Allow an annotation to be draggable by a user. Possible
* values are `"x"`, `"xy"`, `"y"` and `""` (disabled).
*
* @sample highcharts/annotations/draggable/
* Annotations draggable: 'xy'
*
* @type {string}
* @validvalue ["x", "xy", "y", ""]
*/
draggable: 'xy',
/**
* Options for annotation's labels. Each label inherits options
* from the labelOptions object. An option from the labelOptions
* can be overwritten by config for a specific label.
*
* @requires modules/annotations
*/
labelOptions: {
/**
* The alignment of the annotation's label. If right,
* the right side of the label should be touching the point.
*
* @sample highcharts/annotations/label-position/
* Set labels position
*
* @type {Highcharts.AlignValue}
*/
align: 'center',
/**
* Whether to allow the annotation's labels to overlap.
* To make the labels less sensitive for overlapping,
* the can be set to 0.
*
* @sample highcharts/annotations/tooltip-like/
* Hide overlapping labels
*/
allowOverlap: false,
/**
* The background color or gradient for the annotation's label.
*
* @sample highcharts/annotations/label-presentation/
* Set labels graphic options
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
*/
backgroundColor: 'rgba(0, 0, 0, 0.75)',
/**
* The border color for the annotation's label.
*
* @sample highcharts/annotations/label-presentation/
* Set labels graphic options
*
* @type {Highcharts.ColorString}
*/
borderColor: 'black',
/**
* The border radius in pixels for the annotaiton's label.
*
* @sample highcharts/annotations/label-presentation/
* Set labels graphic options
*/
borderRadius: 3,
/**
* The border width in pixels for the annotation's label
*
* @sample highcharts/annotations/label-presentation/
* Set labels graphic options
*/
borderWidth: 1,
/**
* A class name for styling by CSS.
*
* @sample highcharts/css/annotations
* Styled mode annotations
*
* @since 6.0.5
*/
className: '',
/**
* Whether to hide the annotation's label
* that is outside the plot area.
*
* @sample highcharts/annotations/label-crop-overflow/
* Crop or justify labels
*/
crop: false,
/**
* The label's pixel distance from the point.
*
* @sample highcharts/annotations/label-position/
* Set labels position
*
* @type {number}
* @apioption annotations.labelOptions.distance
*/
/**
* A
* [format](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
* string for the data label.
*
* @see [plotOptions.series.dataLabels.format](plotOptions.series.dataLabels.format.html)
*
* @sample highcharts/annotations/label-text/
* Set labels text
*
* @type {string}
* @apioption annotations.labelOptions.format
*/
/**
* Alias for the format option.
*
* @see [format](annotations.labelOptions.format.html)
*
* @sample highcharts/annotations/label-text/
* Set labels text
*
* @type {string}
* @apioption annotations.labelOptions.text
*/
/**
* Callback JavaScript function to format the annotation's
* label. Note that if a `format` or `text` are defined, the
* format or text take precedence and the formatter is ignored.
* `This` refers to a point object.
*
* @sample highcharts/annotations/label-text/
* Set labels text
*
* @type {Highcharts.FormatterCallbackFunction<Highcharts.Point>}
* @default function () { return defined(this.y) ? this.y : 'Annotation label'; }
*/
formatter: function () {
return defined(this.y) ? this.y : 'Annotation label';
},
/**
* How to handle the annotation's label that flow outside the
* plot area. The justify option aligns the label inside the
* plot area.
*
* @sample highcharts/annotations/label-crop-overflow/
* Crop or justify labels
*
* @validvalue ["allow", "justify"]
*/
overflow: 'justify',
/**
* When either the borderWidth or the backgroundColor is set,
* this is the padding within the box.
*
* @sample highcharts/annotations/label-presentation/
* Set labels graphic options
*/
padding: 5,
/**
* The shadow of the box. The shadow can be an object
* configuration containing `color`, `offsetX`, `offsetY`,
* `opacity` and `width`.
*
* @sample highcharts/annotations/label-presentation/
* Set labels graphic options
*
* @type {boolean|Highcharts.ShadowOptionsObject}
*/
shadow: false,
/**
* The name of a symbol to use for the border around the label.
* Symbols are predefined functions on the Renderer object.
*
* @sample highcharts/annotations/shapes/
* Available shapes for labels
*/
shape: 'callout',
/**
* Styles for the annotation's label.
*
* @see [plotOptions.series.dataLabels.style](plotOptions.series.dataLabels.style.html)
*
* @sample highcharts/annotations/label-presentation/
* Set labels graphic options
*
* @type {Highcharts.CSSObject}
*/
style: {
/** @ignore */
fontSize: '11px',
/** @ignore */
fontWeight: 'normal',
/** @ignore */
color: 'contrast'
},
/**
* Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)
* to render the annotation's label.
*/
useHTML: false,
/**
* The vertical alignment of the annotation's label.
*
* @sample highcharts/annotations/label-position/
* Set labels position
*
* @type {Highcharts.VerticalAlignValue}
*/
verticalAlign: 'bottom',
/**
* The x position offset of the label relative to the point.
* Note that if a `distance` is defined, the distance takes
* precedence over `x` and `y` options.
*
* @sample highcharts/annotations/label-position/
* Set labels position
*/
x: 0,
/**
* The y position offset of the label relative to the point.
* Note that if a `distance` is defined, the distance takes
* precedence over `x` and `y` options.
*
* @sample highcharts/annotations/label-position/
* Set labels position
*/
y: -16
},
/**
* An array of labels for the annotation. For options that apply to
* multiple labels, they can be added to the
* [labelOptions](annotations.labelOptions.html).
*
* @type {Array<*>}
* @extends annotations.labelOptions
* @apioption annotations.labels
*/
/**
* This option defines the point to which the label will be
* connected. It can be either the point which exists in the
* series - it is referenced by the point's id - or a new point with
* defined x, y properties and optionally axes.
*
* @sample highcharts/annotations/mock-point/
* Attach annotation to a mock point
*
* @type {string|Highcharts.MockPointOptionsObject}
* @requires modules/annotations
* @apioption annotations.labels.point
*/
/**
* The x position of the point. Units can be either in axis
* or chart pixel coordinates.
*
* @type {number}
* @apioption annotations.labels.point.x
*/
/**
* The y position of the point. Units can be either in axis
* or chart pixel coordinates.
*
* @type {number}
* @apioption annotations.labels.point.y
*/
/**
* This number defines which xAxis the point is connected to. It
* refers to either the axis id or the index of the axis in the
* xAxis array. If the option is not configured or the axis is not
* found the point's x coordinate refers to the chart pixels.
*
* @type {number|string}
* @apioption annotations.labels.point.xAxis
*/
/**
* This number defines which yAxis the point is connected to. It
* refers to either the axis id or the index of the axis in the
* yAxis array. If the option is not configured or the axis is not
* found the point's y coordinate refers to the chart pixels.
*
* @type {number|string}
* @apioption annotations.labels.point.yAxis
*/
/**
* An array of shapes for the annotation. For options that apply to
* multiple shapes, then can be added to the
* [shapeOptions](annotations.shapeOptions.html).
*
* @type {Array<*>}
* @extends annotations.shapeOptions
* @apioption annotations.shapes
*/
/**
* This option defines the point to which the shape will be
* connected. It can be either the point which exists in the
* series - it is referenced by the point's id - or a new point with
* defined x, y properties and optionally axes.
*
* @type {string|Highcharts.MockPointOptionsObject}
* @extends annotations.labels.point
* @apioption annotations.shapes.point
*/
/**
* An array of points for the shape. This option is available for
* shapes which can use multiple points such as path. A point can be
* either a point object or a point's id.
*
* @see [annotations.shapes.point](annotations.shapes.point.html)
*
* @type {Array<string|Highcharts.MockPointOptionsObject>}
* @extends annotations.labels.point
* @apioption annotations.shapes.points
*/
/**
* Id of the marker which will be drawn at the final vertex of the
* path. Custom markers can be defined in defs property.
*
* @see [defs.markers](defs.markers.html)
*
* @sample highcharts/annotations/custom-markers/
* Define a custom marker for annotations
*
* @type {string}
* @apioption annotations.shapes.markerEnd
*/
/**
* Id of the marker which will be drawn at the first vertex of the
* path. Custom markers can be defined in defs property.
*
* @see [defs.markers](defs.markers.html)
*
* @sample {highcharts} highcharts/annotations/custom-markers/
* Define a custom marker for annotations
*
* @type {string}
* @apioption annotations.shapes.markerStart
*/
/**
* Options for annotation's shapes. Each shape inherits options from
* the shapeOptions object. An option from the shapeOptions can be
* overwritten by config for a specific shape.
*
* @requires modules/annotations
*/
shapeOptions: {
/**
* The width of the shape.
*
* @sample highcharts/annotations/shape/
* Basic shape annotation
*
* @type {number}
* @apioption annotations.shapeOptions.width
**/
/**
* The height of the shape.
*
* @sample highcharts/annotations/shape/
* Basic shape annotation
*
* @type {number}
* @apioption annotations.shapeOptions.height
*/
/**
* The type of the shape, e.g. circle or rectangle.
*
* @sample highcharts/annotations/shape/
* Basic shape annotation
*
* @type {string}
* @default 'rect'
* @apioption annotations.shapeOptions.type
*/
/**
* The color of the shape's stroke.
*
* @sample highcharts/annotations/shape/
* Basic shape annotation
*
* @type {Highcharts.ColorString}
*/
stroke: 'rgba(0, 0, 0, 0.75)',
/**
* The pixel stroke width of the shape.
*
* @sample highcharts/annotations/shape/
* Basic shape annotation
*/
strokeWidth: 1,
/**
* The color of the shape's fill.
*
* @sample highcharts/annotations/shape/
* Basic shape annotation
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
*/
fill: 'rgba(0, 0, 0, 0.75)',
/**
* The radius of the shape.
*
* @sample highcharts/annotations/shape/
* Basic shape annotation
*/
r: 0,
/**
* Defines additional snapping area around an annotation
* making this annotation to focus. Defined in pixels.
*/
snap: 2
},
/**
* Options for annotation's control points. Each control point
* inherits options from controlPointOptions object.
* Options from the controlPointOptions can be overwritten
* by options in a specific control point.
*
* @type {Annotation.ControlPoint.Options}
* @requires modules/annotations
* @apioption annotations.controlPointOptions
*/
controlPointOptions: {
/**
* @function {Annotation.ControlPoint.Positioner}
* @apioption annotations.controlPointOptions.positioner
*/
symbol: 'circle',
width: 10,
height: 10,
style: {
stroke: 'black',
'stroke-width': 2,
fill: 'white'
},
visible: false,
events: {}
},
/**
* Event callback when annotation is added to the chart.
*
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
* @since 7.1.0
* @apioption annotations.events.add
*/
/**
* Event callback when annotation is updated (e.g. drag and
* droppped or resized by control points).
*
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
* @since 7.1.0
* @apioption annotations.events.afterUpdate
*/
/**
* Event callback when annotation is removed from the chart.
*
* @type {Highcharts.EventCallbackFunction<Highcharts.Annotation>}
* @since 7.1.0
* @apioption annotations.events.remove
*/
/**
* Events available in annotations.
*
* @requires modules/annotations
*/
events: {},
/**
* The Z index of the annotation.
*/
zIndex: 6
},
/**
* Initialize the annotation.
*
* @param {Highcharts.Chart}
* The chart
* @param {Highcharts.AnnotationsOptions}
* The user options for the annotation
*/
init: function () {
this.linkPoints();
this.addControlPoints();
this.addShapes();
this.addLabels();
this.addClipPaths();
this.setLabelCollector();
},
getLabelsAndShapesOptions: function (baseOptions, newOptions) {
var mergedOptions = {};
['labels', 'shapes'].forEach(function (name) {
if (baseOptions[name]) {
mergedOptions[name] = splat(newOptions[name]).map(
function (basicOptions, i) {
return merge(baseOptions[name][i], basicOptions);
}
);
}
});
return mergedOptions;
},
addShapes: function () {
(this.options.shapes || []).forEach(function (shapeOptions, i) {
var shape = this.initShape(shapeOptions, i);
merge(true, this.options.shapes[i], shape.options);
}, this);
},
addLabels: function () {
(this.options.labels || []).forEach(function (labelsOptions, i) {
var labels = this.initLabel(labelsOptions, i);
merge(true, this.options.labels[i], labels.options);
}, this);
},
addClipPaths: function () {
this.setClipAxes();
if (this.clipXAxis && this.clipYAxis) {
this.clipRect = this.chart.renderer.clipRect(
this.getClipBox()
);
}
},
setClipAxes: function () {
var xAxes = this.chart.xAxis,
yAxes = this.chart.yAxis,
linkedAxes = reduce(
(this.options.labels || [])
.concat(this.options.shapes || []),
function (axes, labelOrShape) {
return [
xAxes[
labelOrShape &&
labelOrShape.point &&
labelOrShape.point.xAxis
] || axes[0],
yAxes[
labelOrShape &&
labelOrShape.point &&
labelOrShape.point.yAxis
] || axes[1]
];
},
[]
);
this.clipXAxis = linkedAxes[0];
this.clipYAxis = linkedAxes[1];
},
getClipBox: function () {
return {
x: this.clipXAxis.left,
y: this.clipYAxis.top,
width: this.clipXAxis.width,
height: this.clipYAxis.height
};
},
setLabelCollector: function () {
var annotation = this;
annotation.labelCollector = function () {
return annotation.labels.reduce(
function (labels, label) {
if (!label.options.allowOverlap) {
labels.push(label.graphic);
}
return labels;
},
[]
);
};
annotation.chart.labelCollectors.push(
annotation.labelCollector
);
},
/**
* Set an annotation options.
*
* @param {Highcharts.AnnotationsOptions} - user options for an annotation
*/
setOptions: function (userOptions) {
this.options = merge(this.defaultOptions, userOptions);
},
redraw: function (animation) {
this.linkPoints();
if (!this.graphic) {
this.render();
}
if (this.clipRect) {
this.clipRect.animate(this.getClipBox());
}
this.redrawItems(this.shapes, animation);
this.redrawItems(this.labels, animation);
controllableMixin.redraw.call(this, animation);
},
/**
* @param {Array<(Annotation.Label|Annotation.Shape)>} items
* @param {boolean} [animation]
*/
redrawItems: function (items, animation) {
var i = items.length;
// needs a backward loop
// labels/shapes array might be modified
// due to destruction of the item
while (i--) {
this.redrawItem(items[i], animation);
}
},
render: function () {
var renderer = this.chart.renderer;
this.graphic = renderer
.g('annotation')
.attr({
zIndex: this.options.zIndex,
visibility: this.options.visible ?
'visible' :
'hidden'
})
.add();
this.shapesGroup = renderer
.g('annotation-shapes')
.add(this.graphic)
.clip(this.chart.plotBoxClip);
this.labelsGroup = renderer
.g('annotation-labels')
.attr({
// hideOverlappingLabels requires translation
translateX: 0,
translateY: 0
})
.add(this.graphic);
if (this.clipRect) {
this.graphic.clip(this.clipRect);
}
this.addEvents();
controllableMixin.render.call(this);
},
/**
* Set the annotation's visibility.
*
* @param {Boolean} [visible] - Whether to show or hide an annotation.
* If the param is omitted, the annotation's visibility is toggled.
*/
setVisibility: function (visibility) {
var options = this.options,
visible = pick(visibility, !options.visible);
this.graphic.attr(
'visibility',
visible ? 'visible' : 'hidden'
);
if (!visible) {
this.setControlPointsVisibility(false);
}
options.visible = visible;
},
setControlPointsVisibility: function (visible) {
var setItemControlPointsVisibility = function (item) {
item.setControlPointsVisibility(visible);
};
controllableMixin.setControlPointsVisibility.call(
this,
visible
);
this.shapes.forEach(setItemControlPointsVisibility);
this.labels.forEach(setItemControlPointsVisibility);
},
/**
* Destroy the annotation. This function does not touch the chart
* that the annotation belongs to (all annotations are kept in
* the chart.annotations array) - it is recommended to use
* {@link Highcharts.Chart#removeAnnotation} instead.
*/
destroy: function () {
var chart = this.chart,
destroyItem = function (item) {
item.destroy();
};
this.labels.forEach(destroyItem);
this.shapes.forEach(destroyItem);
this.clipXAxis = null;
this.clipYAxis = null;
erase(chart.labelCollectors, this.labelCollector);
eventEmitterMixin.destroy.call(this);
controllableMixin.destroy.call(this);
destroyObjectProperties(this, chart);
},
/**
* See {@link Highcharts.Chart#removeAnnotation}.
*/
remove: function () {
// Let chart.update() remove annoations on demand
return this.chart.removeAnnotation(this);
},
update: function (userOptions) {
var chart = this.chart,
labelsAndShapes = this.getLabelsAndShapesOptions(
this.userOptions,
userOptions
),
userOptionsIndex = chart.annotations.indexOf(this),
options = H.merge(true, this.userOptions, userOptions);
options.labels = labelsAndShapes.labels;
options.shapes = labelsAndShapes.shapes;
this.destroy();
this.constructor(chart, options);
// Update options in chart options, used in exporting (#9767):
chart.options.annotations[userOptionsIndex] = options;
this.isUpdating = true;
this.redraw();
this.isUpdating = false;
fireEvent(this, 'afterUpdate');
},
/* *************************************************************
* ITEM SECTION
* Contains methods for handling a single item in an annotation
**************************************************************** */
/**
* Initialisation of a single shape
*
* @param {Object} shapeOptions - a confg object for a single shape
*/
initShape: function (shapeOptions, index) {
var options = merge(
this.options.shapeOptions,
{
controlPointOptions: this.options.controlPointOptions
},
shapeOptions
),
shape = new Annotation.shapesMap[options.type](
this,
options,
index
);
shape.itemType = 'shape';
this.shapes.push(shape);
return shape;
},
/**
* Initialisation of a single label
*
* @param {Object} labelOptions
**/
initLabel: function (labelOptions, index) {
var options = merge(
this.options.labelOptions,
{
controlPointOptions: this.options.controlPointOptions
},
labelOptions
),
label = new ControllableLabel(
this,
options,
index
);
label.itemType = 'label';
this.labels.push(label);
return label;
},
/**
* Redraw a single item.
*
* @param {Annotation.Label|Annotation.Shape} item
* @param {boolean} [animation]
*/
redrawItem: function (item, animation) {
item.linkPoints();
if (!item.shouldBeDrawn()) {
this.destroyItem(item);
} else {
if (!item.graphic) {
this.renderItem(item);
}
item.redraw(
pick(animation, true) && item.graphic.placed
);
if (item.points.length) {
this.adjustVisibility(item);
}
}
},
/**
* Hide or show annotaiton attached to points.
*
* @param {Annotation.Label|Annotation.Shape} item
*/
adjustVisibility: function (item) { // #9481
var hasVisiblePoints = false,
label = item.graphic;
item.points.forEach(function (point) {
if (
point.series.visible !== false &&
point.visible !== false
) {
hasVisiblePoints = true;
}
});
if (!hasVisiblePoints) {
label.hide();
} else if (label.visibility === 'hidden') {
label.show();
}
},
/**
* Destroy a single item.
*
* @param {Annotation.Label|Annotation.Shape} item
*/
destroyItem: function (item) {
// erase from shapes or labels array
erase(this[item.itemType + 's'], item);
item.destroy();
},
/**
* @private
*/
renderItem: function (item) {
item.render(
item.itemType === 'label' ?
this.labelsGroup :
this.shapesGroup
);
}
}
);
/**
* An object uses for mapping between a shape type and a constructor.
* To add a new shape type extend this object with type name as a key
* and a constructor as its value.
*/
Annotation.shapesMap = {
'rect': ControllableRect,
'circle': ControllableCircle,
'path': ControllablePath,
'image': ControllableImage
};
Annotation.types = {};
Annotation.MockPoint = MockPoint;
Annotation.ControlPoint = ControlPoint;
H.extendAnnotation = function (
Constructor,
BaseConstructor,
prototype,
defaultOptions
) {
BaseConstructor = BaseConstructor || Annotation;
merge(
true,
Constructor.prototype,
BaseConstructor.prototype,
prototype
);
Constructor.prototype.defaultOptions = merge(
Constructor.prototype.defaultOptions,
defaultOptions || {}
);
};
/* *********************************************************************
*
* EXTENDING CHART PROTOTYPE
*
******************************************************************** */
extend(chartProto, /** @lends Highcharts.Chart# */ {
initAnnotation: function (userOptions) {
var Constructor =
Annotation.types[userOptions.type] || Annotation,
annotation = new Constructor(this, userOptions);
this.annotations.push(annotation);
return annotation;
},
/**
* Add an annotation to the chart after render time.
*
* @param {Highcharts.AnnotationsOptions} options
* The annotation options for the new, detailed annotation.
* @param {boolean} [redraw]
*
* @return {Highcharts.Annotation} - The newly generated annotation.
*/
addAnnotation: function (userOptions, redraw) {
var annotation = this.initAnnotation(userOptions);
this.options.annotations.push(annotation.options);
if (pick(redraw, true)) {
annotation.redraw();
}
return annotation;
},
/**
* Remove an annotation from the chart.
*
* @param {String|Number|Annotation} idOrAnnotation - The annotation's id or
* direct annotation object.
*/
removeAnnotation: function (idOrAnnotation) {
var annotations = this.annotations,
annotation = idOrAnnotation.coll === 'annotations' ?
idOrAnnotation :
find(
annotations,
function (annotation) {
return annotation.options.id === idOrAnnotation;
}
);
if (annotation) {
fireEvent(annotation, 'remove');
erase(this.options.annotations, annotation.options);
erase(annotations, annotation);
annotation.destroy();
}
},
drawAnnotations: function () {
this.plotBoxClip.attr(this.plotBox);
this.annotations.forEach(function (annotation) {
annotation.redraw();
});
}
});
// Let chart.update() update annotations
chartProto.collectionsWithUpdate.push('annotations');
// Let chart.update() create annoations on demand
chartProto.collectionsWithInit.annotations = [chartProto.addAnnotation];
chartProto.callbacks.push(function (chart) {
chart.annotations = [];
if (!chart.options.annotations) {
chart.options.annotations = [];
}
chart.plotBoxClip = this.renderer.clipRect(this.plotBox);
chart.controlPointsGroup = chart.renderer
.g('control-points')
.attr({ zIndex: 99 })
.clip(chart.plotBoxClip)
.add();
chart.options.annotations.forEach(function (annotationOptions, i) {
var annotation = chart.initAnnotation(annotationOptions);
chart.options.annotations[i] = annotation.options;
});
chart.drawAnnotations();
addEvent(chart, 'redraw', chart.drawAnnotations);
addEvent(chart, 'destroy', function () {
chart.plotBoxClip.destroy();
chart.controlPointsGroup.destroy();
});
});
wrap(
H.Pointer.prototype,
'onContainerMouseDown',
function (proceed) {
if (!this.chart.hasDraggedAnnotation) {
proceed.apply(this, Array.prototype.slice.call(arguments, 1));
}
}
);
|
mit
|
Usagination/Decchi
|
Decchi-Plugins/foo_decchi/README.md
|
566
|
# 뎃찌EXT (Foobar 2000) : foo_decchi v1.1
***1.*** [여기](https://github.com/Usagination/Decchi/raw/master/Decchi-Plugins/foo_decchi/foo_decchi.fb2k-component) 를 클릭해서 파일을 다운로드해요.
***2.*** Foobar 2000 을 실행해요.

***3.*** `File` - `Preferences` 를 클릭, 혹은 `Ctrl + P` 를 눌러요

***4.*** `Install...` 을 클릭해서 ***1*** 에서 다운로드한 파일을 선택해요!
***5.*** Foobar 2000 을 재실행하면 끝!
- - -
Copyright (c) 2016 Sasarino MARi & RyuaNerin
|
mit
|
RedHat-Eng-PGM/schedules-tools
|
schedules_tools/diff.py
|
16312
|
#!/usr/bin/python3
"""
Simple wrapper to get diff of two schedules
It's able to show different attributes (by 'attrs' kwarg)
and indicate missing phases
Follows 'diff' exit codes:
0 - same
1 - different
2 - other trouble
Test as "python -m schedules_tools.batches.diff"
"""
import argparse
from datetime import datetime
import json
import logging
from schedules_tools import jsondate, discovery
from schedules_tools.converter import ScheduleConverter
from schedules_tools.models import Task, Schedule
import sys
log = logging.getLogger(__name__)
REPORT_NO_CHANGE = ''
REPORT_ADDED = '_added_'
REPORT_REMOVED = '_removed_'
REPORT_CHANGED = '_changed_'
REPORT_PREFIX_MAP = {
REPORT_ADDED: '[+]',
REPORT_REMOVED: '[-]',
REPORT_CHANGED: '[M]',
REPORT_NO_CHANGE: 3 * ' ',
}
NAME_SIM_THRESHOLD = 0.8
TASK_SCORE_THRESHOLD = 0.45
NAME_SIM_WEIGHT = 0.5
TASK_POS_WEIGHT = 0.5
def strings_similarity(str1, str2, winkler=True, scaling=0.1):
"""
Find the Jaro-Winkler distance of 2 strings.
https://en.wikipedia.org/wiki/Jaro-Winkler_distance
:param winkler: add winkler adjustment to the Jaro distance
:param scaling: constant scaling factor for how much the score is adjusted
upwards for having common prefixes. Should not exceed 0.25
"""
if str1 == str2:
return 1.0
def num_of_char_matches(s1, len1, s2, len2):
count = 0
transpositions = 0 # number of matching chars w/ different sequence order
limit = int(max(len1, len2) / 2 - 1)
for i in range(len1):
start = i - limit
if start < 0:
start = 0
end = i + limit + 1
if end > len2:
end = len2
index = s2.find(s1[i], start, end)
if index > -1: # found common char
count += 1
if index != i:
transpositions += 1
return count, transpositions
len1 = len(str1)
len2 = len(str2)
num_of_matches, transpositions = num_of_char_matches(str1, len1, str2, len2)
if num_of_matches == 0:
return 0.0
m = float(num_of_matches)
t = transpositions / 2.0
dj = (m / float(len1) + m / float(len2) + (m - t) / m) / 3.0
if winkler:
length = 0
# length of common prefix at the start of the string (max = 4)
max_length = min(
len1,
len2,
4
)
while length < max_length and str1[length] == str2[length]:
length += 1
return dj + (length * scaling * (1.0 - dj))
return dj
class ScheduleDiff(object):
result = []
hierarchy_attr = 'tasks'
subtree_hash_attr_name = 'subtree_hash'
""" Default list of attributes used to compare 2 tasks. """
default_tasks_match_attrs = ['name', 'dStart', 'dFinish']
def __init__(self, schedule_a, schedule_b, trim_time=False, extra_compare_attributes=None):
self.schedule_a = schedule_a
self.schedule_b = schedule_b
self.trim_time = trim_time
self.attributes_to_compare = self.default_tasks_match_attrs
if extra_compare_attributes:
# avoid using += to not modify class-level list
self.attributes_to_compare = self.attributes_to_compare + list(extra_compare_attributes)
self.result = self._diff()
def __str__(self):
return self.result_to_str()
def _get_subtree(self, item):
return getattr(item, self.hierarchy_attr)
def result_to_str(self, items=None, level=0):
""" Textual representation of the diff. """
res = ''
if items is None:
items = self.result
schedule = Schedule()
for item in items:
subtree = item['subtree']
state = item['item_state']
if state in [REPORT_CHANGED, REPORT_ADDED]:
task = item['right']
elif state is REPORT_REMOVED:
task = item['left']
else:
task = item['both']
task_obj = Task.load_from_dict(task, schedule)
res += '{} {}{}\n'.format(REPORT_PREFIX_MAP[state], level * ' ', str(task_obj))
if subtree:
res += self.result_to_str(subtree, level + 2)
return res
def _create_report(self,
item_state,
left=None,
right=None,
both=None,
subtree=[],
changed_attrs=[]):
"""
Returns a dictionary representing a possible change.
{
left: Task or None,
right: Task or None,
both: used instead of left and right, when the task are equal,
subtree: List of reports from the child Tasks,
changed_attr: List of changed attributes,
item_state: Type of change
}
"""
if both:
report = {
'both': both.dump_as_dict(recursive=False),
'subtree': subtree,
'changed_attrs': changed_attrs,
'item_state': item_state
}
else:
# No need to keep the whole structure,
# child tasks will be placed in report['tasks']
if left is not None:
left = left.dump_as_dict(recursive=False)
if right is not None:
right = right.dump_as_dict(recursive=False)
report = {
'left': left,
'right': right,
'subtree': subtree,
'changed_attrs': changed_attrs,
'item_state': item_state,
}
return report
def _set_subtree_items_state(self, items, state):
"""
Set the given state recursively on the subtree items
"""
def create_report(item):
kwargs = {
'subtree': self._set_subtree_items_state(self._get_subtree(item), state)
}
if state == REPORT_NO_CHANGE:
kwargs['both'] = item
elif state == REPORT_ADDED:
kwargs['right'] = item
elif state == REPORT_REMOVED:
kwargs['left'] = item
return self._create_report(state, **kwargs)
return [create_report(item) for item in items]
def get_changed_attrs(self, task_a, task_b):
"""
Compare 2 tasks
Uses attributes defined in `self.attributes_to_compare` and subtree hash and
returns a list of atts that don't match.
"""
changed_attributes = [attr for attr in self.attributes_to_compare
if not self._compare_tasks_attributes(task_a, task_b, attr)]
if task_a.get_subtree_hash(self.attributes_to_compare) \
!= task_b.get_subtree_hash(self.attributes_to_compare):
changed_attributes.append(self.subtree_hash_attr_name)
return changed_attributes
def _compare_tasks_attributes(self, task_a, task_b, attr_name):
"""
Compares tasks attributes.
Trims time from datetime objects if self.trim_time is set.
"""
attribute_a = getattr(task_a, attr_name)
attribute_b = getattr(task_b, attr_name)
if self.trim_time:
if isinstance(attribute_a, datetime):
attribute_a = attribute_a.date()
if isinstance(attribute_b, datetime):
attribute_b = attribute_b.date()
return attribute_a == attribute_b
def find_best_match(self, t1, possible_matches, start_at_index=0):
"""
Finds the best match for the given task in the list of possible matches.
Returns the index of the best match and a dict
with a state suggestion and list of changed attrs.
"""
match_index = None
best_match = {
'state': REPORT_REMOVED,
'changes': [],
'name_score': 0,
'score': TASK_SCORE_THRESHOLD
}
if start_at_index > 0:
possible_matches = possible_matches[start_at_index:]
for i, t2 in enumerate(possible_matches, start_at_index):
res = self.eval_tasks(t1, t2, i, name_threshold=best_match['name_score'])
if (res['state'] is REPORT_CHANGED
and res['score'] > best_match['score']):
match_index = i
best_match = res
if res['state'] is REPORT_NO_CHANGE:
match_index = i
best_match = res
break
return match_index, best_match
def _task_position_score(self, index):
return 1.0 / (2 * (index + 1))
def _task_score(self, name_score, position_score):
weight_sum = NAME_SIM_WEIGHT + TASK_POS_WEIGHT
name_score *= NAME_SIM_WEIGHT
position_score *= TASK_POS_WEIGHT
return (name_score + position_score) / weight_sum
def eval_tasks(self, t1, t2, t2_index, name_threshold=NAME_SIM_THRESHOLD):
name_score = 0.0
position_score = 0.0
changed_attrs = self.get_changed_attrs(t1, t2)
# different names
if 'name' in changed_attrs:
t1_subtree = t1.get_subtree_hash(self.attributes_to_compare)
t2_subtree = t2.get_subtree_hash(self.attributes_to_compare)
if t1_subtree and t2_subtree:
if t1_subtree == t2_subtree:
state = REPORT_CHANGED
position_score = 1.0
else:
name_score = strings_similarity(t1.name, t2.name)
if (name_score > name_threshold
and len(changed_attrs) < len(self.attributes_to_compare)):
state = REPORT_CHANGED
position_score = self._task_position_score(t2_index)
else:
state = REPORT_REMOVED
# no subtrees
else:
name_score = strings_similarity(t1.name, t2.name, winkler=False)
if name_score > name_threshold:
state = REPORT_CHANGED
position_score = self._task_position_score(t2_index)
else:
state = REPORT_REMOVED
# names are equal
else:
name_score = 1.0
if (not changed_attrs
or (len(changed_attrs) == 1
and self.subtree_hash_attr_name in changed_attrs)):
state = REPORT_NO_CHANGE
else:
state = REPORT_CHANGED
position_score = 1.0
return {
'state': state,
'changes': changed_attrs,
'name_score': name_score,
'position_score': position_score,
'score': self._task_score(name_score, position_score)
}
def _diff(self, tasks_a=None, tasks_b=None):
if tasks_a is None:
tasks_a = self.schedule_a.tasks
if tasks_b is None:
tasks_b = self.schedule_b.tasks
res = []
last_b_index = 0
# shortcut to create a report for an added task
def report_task_added(index, recursive=True):
task = tasks_b[index]
subtree = self._get_subtree(task)
if recursive:
subtree = self._set_subtree_items_state(subtree, REPORT_ADDED)
return self._create_report(REPORT_ADDED, right=task, subtree=subtree)
for task in tasks_a:
match_index, match = self.find_best_match(task, tasks_b, start_at_index=last_b_index)
report = {}
if match_index is None:
subtree = self._set_subtree_items_state(self._get_subtree(task), REPORT_REMOVED)
report = self._create_report(REPORT_REMOVED, left=task, subtree=subtree)
else:
# ALL elements between last_b_index and match_index => ADDED
res.extend([report_task_added(k) for k in range(last_b_index, match_index)])
# exact match => NO CHANGE
if not match['changes']:
subtree = self._set_subtree_items_state(self._get_subtree(task), match['state'])
report_kwargs = {'both': task, 'subtree': subtree}
# structural change => CHANGED / NO CHANGE
elif self.subtree_hash_attr_name in match['changes']:
# process child tasks
subtree = self._diff(
self._get_subtree(task),
self._get_subtree(tasks_b[match_index])
)
if len(match['changes']) > 1:
report_kwargs = {
'left': task,
'right': tasks_b[match_index],
'subtree': subtree
}
else:
report_kwargs = {
'both': task,
'subtree': subtree
}
# no structural changes => CHANGED
else:
subtree = self._set_subtree_items_state(
self._get_subtree(tasks_b[match_index]), REPORT_NO_CHANGE)
report_kwargs = {
'left': task,
'right': tasks_b[match_index],
'subtree': subtree
}
report = self._create_report(match['state'],
changed_attrs=match['changes'],
**report_kwargs)
last_b_index = match_index + 1
res.append(report)
# remaining tasks => ADDED
res.extend([report_task_added(k) for k in range(last_b_index, len(tasks_b))])
return res
def dump_json(self, **kwargs):
def _encoder(obj):
if isinstance(obj, Task):
return obj.dump_as_dict()
return jsondate._datetime_encoder(obj)
kwargs['default'] = _encoder
return json.dumps(self.result, **kwargs)
def setup_logging(level):
log_format = '%(name)-10s %(levelname)7s: %(message)s'
sh = logging.StreamHandler(sys.stdout)
sh.setLevel(level)
formatter = logging.Formatter(log_format)
sh.setFormatter(formatter)
# setup root logger
inst = logging.getLogger('')
inst.setLevel(level)
inst.addHandler(sh)
def main():
setup_logging(logging.INFO)
parser = argparse.ArgumentParser(
description='Tool to show differences between two schedules.')
parser.add_argument('--simple-diff',
help='Simple comparison between two schedules.',
action='store_true',
default=False)
parser.add_argument(
'--handlers-path',
help='Add python-dot-notation path to discover handlers (needs to '
'be python module), can be called several times '
'(conflicting names will be overriden - the last '
'implementation will be used)',
action='append',
default=[])
parser.add_argument('--whole-days',
help='Compare just date part of timestamp (will '
'ignore differences in time)',
action='store_true',
default=False)
parser.add_argument('left')
parser.add_argument('right')
args = parser.parse_args()
for path in args.handlers_path:
discovery.search_paths.append(path)
left = ScheduleConverter()
left.import_schedule(args.left)
right = ScheduleConverter()
right.import_schedule(args.right)
if args.simple_diff:
diff_res = left.schedule.diff(right.schedule, whole_days=args.whole_days)
else:
diff_res = ScheduleDiff(left.schedule, right.schedule)
if diff_res:
print(diff_res)
sys.exit(1)
if __name__ == '__main__':
main()
|
mit
|
cgvarela/passenger
|
src/cxx_supportlib/MemoryKit/palloc.h
|
4866
|
/*
* Copyright (C) Igor Sysoev
* Copyright (C) Nginx, Inc.
* Copyright (C) 2013-2014 Phusion
* 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 AUTHOR 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 AUTHOR 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.
*/
#ifndef _PASSENGER_MEMORY_KIT_PALLOC_H_INCLUDED_
#define _PASSENGER_MEMORY_KIT_PALLOC_H_INCLUDED_
#include <stddef.h>
#include <stdint.h>
#include <StaticString.h>
/** A pool allocator taken from Nginx. Modified to suit our needs.
* The concept is also known as region-based memory management:
* http://en.wikipedia.org/wiki/Region-based_memory_management
*
* The allocator allocates small objects in a pool (region) by bumping
* a pointer, so allocating many small objects is extremely fast.
* Objects that don't fit inside the pool are handled by the
* "large memory allocator" and allocated directly using malloc().
* Except for objects allocated by the large memory allocator,
* objects can only be freed by freeing the entire pool.
*/
#define PSG_ALIGNMENT sizeof(unsigned long) /* platform word */
#define psg_align(d, a) (((d) + (a - 1)) & ~(a - 1))
#define psg_align_ptr(p, a) \
(char *) (((uintptr_t) (p) + ((uintptr_t) a - 1)) & ~((uintptr_t) a - 1))
/*
* PSG_MAX_ALLOC_FROM_POOL should be (psg_pagesize - 1), i.e. 4095 on x86.
* On Windows NT it decreases a number of locked pages in a kernel.
*/
#define psg_pagesize 4096
#define PSG_MAX_ALLOC_FROM_POOL (psg_pagesize - 1)
#define PSG_DEFAULT_POOL_SIZE (16 * 1024)
#define PSG_POOL_ALIGNMENT 16
#define PSG_MIN_POOL_SIZE \
psg_align((sizeof(psg_pool_t) + 2 * sizeof(psg_pool_large_t)), \
PSG_POOL_ALIGNMENT)
typedef struct psg_pool_s psg_pool_t;
typedef struct psg_pool_large_s psg_pool_large_t;
typedef struct psg_pool_large_s {
psg_pool_large_s *next;
void *alloc;
} psg_pool_large_t;
typedef struct {
char *last; /** Last allocated byte inside this block. */
char *end; /** End of block memory. Read-only */
psg_pool_t *next;
unsigned int failed;
} psg_pool_data_t;
struct psg_pool_s {
psg_pool_data_t data;
/*
* The following fields are only used for the first psg_pool_s,
* not for any subsequent psg_pool_s objects linked through
* `data.next`.
*/
size_t max; /* Read-only */
psg_pool_t *current;
psg_pool_large_t *large;
};
psg_pool_t *psg_create_pool(size_t size);
void psg_destroy_pool(psg_pool_t *pool);
bool psg_reset_pool(psg_pool_t *pool, size_t size);
/** Allocate `size` bytes from the pool, aligned on platform word size. */
void *psg_palloc(psg_pool_t *pool, size_t size);
/** Allocate `size` bytes from the pool, unaligned. **/
void *psg_pnalloc(psg_pool_t *pool, size_t size);
/** Allocate `size` bytes from the pool, unaligned. The allocated memory is zeroed. **/
void *psg_pcalloc(psg_pool_t *pool, size_t size);
/** Allocate `size` bytes from the pool, aligned on the given alignment. */
void *psg_pmemalign(psg_pool_t *pool, size_t size, size_t alignment);
Passenger::StaticString psg_pstrdup(psg_pool_t *pool, const Passenger::StaticString &str);
/** Attempt to free the given memory, which was allocated from the given pool.
* If the memory was allocated using the pool's large memory allocator,
* then the memory is freed. If not, then this function does nothing, because
* there is no way to free the memory without freeing the entire pool.
* Returns whether the memory was actually freed.
*/
bool psg_pfree(psg_pool_t *pool, void *p);
#endif /* _PASSENGER_MEMORY_KIT_PALLOC_H_INCLUDED_ */
|
mit
|
khalid-bd/psa-recovery
|
recouvrement-multi/03_1compte.html
|
9274
|
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<!-- <meta http-equiv="X-UA-Compatible" content="chrome=1, IE=edge"> -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>03_1compte</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, user-scalable = yes">
<link rel="stylesheet" href="../css/dist/frontend.css">
<!-- <script src="js/vendor/modernizr-2.6.2.min.js"></script> -->
<!-- Importing jquery in case there are jq scripts in the middle of the page -->
<!-- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> -->
<script>window.jQuery || document.write('<script src="../js/dist/jq.min.js"><\/script>')</script>
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<header>
<div class="content">
<div class="logo">
<img src="../img/logo.png" alt="Banque PSA Finance">
</div>
<div id='responsive-nav-icon'></div>
<nav>
<ul>
<li class="active"><i><img src="../img/nav/accueil.png" alt="Accueil"></i>Accueil<a href="03_1compte.html"></a></li>
<li><i><img src="../img/nav/plan.png" alt="Plannifier"></i>planifier<a href="09_planifier.html"></a></li>
<li><i><img src="../img/nav/contact.png" alt="Contacter"></i>contacter<a href="07_contacter.html"></a></li>
<li><i><img src="../img/nav/call.png" alt="Etre Contacter"></i>être appelé<a href="08_etre_appeler.html"></a></li>
<li><i><img src="../img/nav/espace.png" alt="Espace Perso"></i>mon espace perso<a href="http://www.credipar.fr" target="_blank"></a></li>
<li><i><img src="../img/nav/disconnect.png" alt="Se deconnecter"></i>déconnexion<a href="01_connexion.html"></a></li>
</ul>
</nav>
<div id="header-sub-menu">
<ul>
<li>Le site de la jv<a href="http://www.credipar.fr/" target="_blank"></a></li>
<li>Le site de banque psa finance<a href="http://www.banquepsafinance.com/" target="_blank"></a></li>
<li class="name">m jean-baptiste martin dupont</li>
</ul>
</div>
</div>
</header>
<main>
<div class="container">
<div id="main-bg-cars">
<div><img src="../img/bg-cars/peugeot/car-1.png" alt=""></div>
<div><img src="../img/bg-cars/citroen/car-2.png" alt=""></div>
</div>
<div class="content">
<h1>bienvenue <b>Monsieur martin</b></h1>
<div class="transparent">
<div class="info">
<p><em>A ce jour vous êtes débiteur de la somme de</em></p>
<h2><em>588,34 €</em></h2>
</div>
</div><!-- end transparent -->
<div class="block-links">
<a href="01_connexion_popin_multi_compte.html">voir les détails de votre compte</a>
</div>
<div class="ico-links">
<ul>
<li><img src="../img/dynamic/plan.png" alt="Appeler le service client"><span><b>Planifier une promesse</b></span><a href="09_planifier.html"></a></li>
<li><img src="../img/dynamic/call-cs.png" alt="Appeler le service client"><span><b>appeler le service client</b></span><a href="07_contacter.html"></a></li>
<li><img src="../img/dynamic/call-back.png" alt="Se faire rappeler"><span><b>Me faire rappeler</b></span><a href="08_etre_appeler.html"></a></li>
<li><img src="../img/dynamic/my-space.png" alt="Mon espace perso"><span><b>Mon espace perso</b></span><a href="http://www.credipar.fr" target="_blank"></a></li>
</ul>
</div>
</div><!-- end .content -->
</div><!-- end container -->
</main>
<aside class="slider">
<div class="carousel">
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider1.png" alt="">
</span>
<a href="#"></a>
</div>
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider2.png" alt="">
</span>
<a href="http://google.com"></a>
</div>
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider3.png" alt="">
</span>
<a href="http://google.com"></a>
</div>
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider4.png" alt="">
</span>
<a href="http://google.com"></a>
</div>
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider3.png" alt="">
</span>
<a href="http://google.com"></a>
</div>
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider3.png" alt="">
</span>
<a href="http://google.com"></a>
</div>
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider3.png" alt="">
</span>
<a href="http://google.com"></a>
</div>
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider4.png" alt="">
</span>
<a href="http://google.com"></a>
</div>
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider3.png" alt="">
</span>
<a href="http://google.com"></a>
</div>
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider3.png" alt="">
</span>
<a href="http://google.com"></a>
</div>
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider3.png" alt="">
</span>
<a href="http://google.com"></a>
</div>
<div>
<span class="bg">
<img src="../img/dynamic/slider/slider4.png" alt="">
</span>
<a href="http://google.com"></a>
</div>
</div>
</aside>
<footer>
<div class="content">
<div class="opt">
<div class="lang">
<span class="choose">Langues<i></i></span>
<span class="option"><a href="#">Français</a></span>
<span class="option active"><a href="#">Anglais</a></span>
</div>
<div class="legales">
Mentions Légales<a href="04_mentions_legales.html"></a>
</div>
</div>
</div>
</footer>
<div class="content">
<div class="ico">
<div>
<img src="../img/dynamic/footer-peugeot.png" alt="Peugeot">
<a href="http://www.peugeot.fr/" target="_blank"></a>
</div>
<div>
<img src="../img/dynamic/footer-ds.png" alt="DS">
<a href="http://www.citroen.fr/vehicules/ds.html" target="_blank"></a>
</div>
<div>
<img src="../img/dynamic/footer-citroen.png" alt="Citroen">
<a href="http://www.citroen.fr/accueil.html" target="_blank"></a>
</div>
</div>
</div>
<!-- <script src="js/dist/all.js"></script> -->
<!-- The following js is just for dev and needs to be removed when in prod. -->
<script src="../js/vendor/contrib/libs/slick.js/slick/slick.min.js"></script>
<script src="../js/vendor/iknsa/libs/main.js"></script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
// (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
// function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
// e=o.createElement(i);r=o.getElementsByTagName(i)[0];
// e.src='//www.google-analytics.com/analytics.js';
// r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
// ga('create','UA-XXXXX-X');ga('send','pageview');
</script>
</body>
</html>
|
mit
|
kdelfour/humhub-superhero-theme
|
css/superhero.css
|
145438
|
@import url("//fonts.googleapis.com/css?family=Lato:300,400,700");
/*!
* bootswatch v3.3.2
* Homepage: http://bootswatch.com
* Copyright 2012-2015 Thomas Park
* Licensed under MIT
* Based on Bootstrap
*/
/*! normalize.css v3.0.2 | MIT License | git.io/normalize */
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
display: block;
}
audio,
canvas,
progress,
video {
display: inline-block;
vertical-align: baseline;
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden],
template {
display: none;
}
a {
background-color: transparent;
}
a:active,
a:hover {
outline: 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
mark {
background: #ff0;
color: #000;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 1em 40px;
}
hr {
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
pre {
overflow: auto;
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
color: inherit;
font: inherit;
margin: 0;
}
button {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],
html input[disabled] {
cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
input {
line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
padding: 0;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
input[type="search"] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
border: 0;
padding: 0;
}
textarea {
overflow: auto;
}
optgroup {
font-weight: bold;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
@media print {
*,
*:before,
*:after {
background: transparent !important;
color: #000 !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
text-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
a[href^="#"]:after,
a[href^="javascript:"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
select {
background: #fff !important;
}
.navbar {
display: none;
}
.btn > .caret,
.dropup > .btn > .caret {
border-top-color: #000 !important;
}
.label {
border: 1px solid #000;
}
.table {
border-collapse: collapse !important;
}
.table td,
.table th {
background-color: #fff !important;
}
.table-bordered th,
.table-bordered td {
border: 1px solid #ddd !important;
}
}
@font-face {
font-family: 'Glyphicons Halflings';
src: url('../fonts/glyphicons-halflings-regular.eot');
src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}
.glyphicon {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.glyphicon-asterisk:before {
content: "\2a";
}
.glyphicon-plus:before {
content: "\2b";
}
.glyphicon-euro:before,
.glyphicon-eur:before {
content: "\20ac";
}
.glyphicon-minus:before {
content: "\2212";
}
.glyphicon-cloud:before {
content: "\2601";
}
.glyphicon-envelope:before {
content: "\2709";
}
.glyphicon-pencil:before {
content: "\270f";
}
.glyphicon-glass:before {
content: "\e001";
}
.glyphicon-music:before {
content: "\e002";
}
.glyphicon-search:before {
content: "\e003";
}
.glyphicon-heart:before {
content: "\e005";
}
.glyphicon-star:before {
content: "\e006";
}
.glyphicon-star-empty:before {
content: "\e007";
}
.glyphicon-user:before {
content: "\e008";
}
.glyphicon-film:before {
content: "\e009";
}
.glyphicon-th-large:before {
content: "\e010";
}
.glyphicon-th:before {
content: "\e011";
}
.glyphicon-th-list:before {
content: "\e012";
}
.glyphicon-ok:before {
content: "\e013";
}
.glyphicon-remove:before {
content: "\e014";
}
.glyphicon-zoom-in:before {
content: "\e015";
}
.glyphicon-zoom-out:before {
content: "\e016";
}
.glyphicon-off:before {
content: "\e017";
}
.glyphicon-signal:before {
content: "\e018";
}
.glyphicon-cog:before {
content: "\e019";
}
.glyphicon-trash:before {
content: "\e020";
}
.glyphicon-home:before {
content: "\e021";
}
.glyphicon-file:before {
content: "\e022";
}
.glyphicon-time:before {
content: "\e023";
}
.glyphicon-road:before {
content: "\e024";
}
.glyphicon-download-alt:before {
content: "\e025";
}
.glyphicon-download:before {
content: "\e026";
}
.glyphicon-upload:before {
content: "\e027";
}
.glyphicon-inbox:before {
content: "\e028";
}
.glyphicon-play-circle:before {
content: "\e029";
}
.glyphicon-repeat:before {
content: "\e030";
}
.glyphicon-refresh:before {
content: "\e031";
}
.glyphicon-list-alt:before {
content: "\e032";
}
.glyphicon-lock:before {
content: "\e033";
}
.glyphicon-flag:before {
content: "\e034";
}
.glyphicon-headphones:before {
content: "\e035";
}
.glyphicon-volume-off:before {
content: "\e036";
}
.glyphicon-volume-down:before {
content: "\e037";
}
.glyphicon-volume-up:before {
content: "\e038";
}
.glyphicon-qrcode:before {
content: "\e039";
}
.glyphicon-barcode:before {
content: "\e040";
}
.glyphicon-tag:before {
content: "\e041";
}
.glyphicon-tags:before {
content: "\e042";
}
.glyphicon-book:before {
content: "\e043";
}
.glyphicon-bookmark:before {
content: "\e044";
}
.glyphicon-print:before {
content: "\e045";
}
.glyphicon-camera:before {
content: "\e046";
}
.glyphicon-font:before {
content: "\e047";
}
.glyphicon-bold:before {
content: "\e048";
}
.glyphicon-italic:before {
content: "\e049";
}
.glyphicon-text-height:before {
content: "\e050";
}
.glyphicon-text-width:before {
content: "\e051";
}
.glyphicon-align-left:before {
content: "\e052";
}
.glyphicon-align-center:before {
content: "\e053";
}
.glyphicon-align-right:before {
content: "\e054";
}
.glyphicon-align-justify:before {
content: "\e055";
}
.glyphicon-list:before {
content: "\e056";
}
.glyphicon-indent-left:before {
content: "\e057";
}
.glyphicon-indent-right:before {
content: "\e058";
}
.glyphicon-facetime-video:before {
content: "\e059";
}
.glyphicon-picture:before {
content: "\e060";
}
.glyphicon-map-marker:before {
content: "\e062";
}
.glyphicon-adjust:before {
content: "\e063";
}
.glyphicon-tint:before {
content: "\e064";
}
.glyphicon-edit:before {
content: "\e065";
}
.glyphicon-share:before {
content: "\e066";
}
.glyphicon-check:before {
content: "\e067";
}
.glyphicon-move:before {
content: "\e068";
}
.glyphicon-step-backward:before {
content: "\e069";
}
.glyphicon-fast-backward:before {
content: "\e070";
}
.glyphicon-backward:before {
content: "\e071";
}
.glyphicon-play:before {
content: "\e072";
}
.glyphicon-pause:before {
content: "\e073";
}
.glyphicon-stop:before {
content: "\e074";
}
.glyphicon-forward:before {
content: "\e075";
}
.glyphicon-fast-forward:before {
content: "\e076";
}
.glyphicon-step-forward:before {
content: "\e077";
}
.glyphicon-eject:before {
content: "\e078";
}
.glyphicon-chevron-left:before {
content: "\e079";
}
.glyphicon-chevron-right:before {
content: "\e080";
}
.glyphicon-plus-sign:before {
content: "\e081";
}
.glyphicon-minus-sign:before {
content: "\e082";
}
.glyphicon-remove-sign:before {
content: "\e083";
}
.glyphicon-ok-sign:before {
content: "\e084";
}
.glyphicon-question-sign:before {
content: "\e085";
}
.glyphicon-info-sign:before {
content: "\e086";
}
.glyphicon-screenshot:before {
content: "\e087";
}
.glyphicon-remove-circle:before {
content: "\e088";
}
.glyphicon-ok-circle:before {
content: "\e089";
}
.glyphicon-ban-circle:before {
content: "\e090";
}
.glyphicon-arrow-left:before {
content: "\e091";
}
.glyphicon-arrow-right:before {
content: "\e092";
}
.glyphicon-arrow-up:before {
content: "\e093";
}
.glyphicon-arrow-down:before {
content: "\e094";
}
.glyphicon-share-alt:before {
content: "\e095";
}
.glyphicon-resize-full:before {
content: "\e096";
}
.glyphicon-resize-small:before {
content: "\e097";
}
.glyphicon-exclamation-sign:before {
content: "\e101";
}
.glyphicon-gift:before {
content: "\e102";
}
.glyphicon-leaf:before {
content: "\e103";
}
.glyphicon-fire:before {
content: "\e104";
}
.glyphicon-eye-open:before {
content: "\e105";
}
.glyphicon-eye-close:before {
content: "\e106";
}
.glyphicon-warning-sign:before {
content: "\e107";
}
.glyphicon-plane:before {
content: "\e108";
}
.glyphicon-calendar:before {
content: "\e109";
}
.glyphicon-random:before {
content: "\e110";
}
.glyphicon-comment:before {
content: "\e111";
}
.glyphicon-magnet:before {
content: "\e112";
}
.glyphicon-chevron-up:before {
content: "\e113";
}
.glyphicon-chevron-down:before {
content: "\e114";
}
.glyphicon-retweet:before {
content: "\e115";
}
.glyphicon-shopping-cart:before {
content: "\e116";
}
.glyphicon-folder-close:before {
content: "\e117";
}
.glyphicon-folder-open:before {
content: "\e118";
}
.glyphicon-resize-vertical:before {
content: "\e119";
}
.glyphicon-resize-horizontal:before {
content: "\e120";
}
.glyphicon-hdd:before {
content: "\e121";
}
.glyphicon-bullhorn:before {
content: "\e122";
}
.glyphicon-bell:before {
content: "\e123";
}
.glyphicon-certificate:before {
content: "\e124";
}
.glyphicon-thumbs-up:before {
content: "\e125";
}
.glyphicon-thumbs-down:before {
content: "\e126";
}
.glyphicon-hand-right:before {
content: "\e127";
}
.glyphicon-hand-left:before {
content: "\e128";
}
.glyphicon-hand-up:before {
content: "\e129";
}
.glyphicon-hand-down:before {
content: "\e130";
}
.glyphicon-circle-arrow-right:before {
content: "\e131";
}
.glyphicon-circle-arrow-left:before {
content: "\e132";
}
.glyphicon-circle-arrow-up:before {
content: "\e133";
}
.glyphicon-circle-arrow-down:before {
content: "\e134";
}
.glyphicon-globe:before {
content: "\e135";
}
.glyphicon-wrench:before {
content: "\e136";
}
.glyphicon-tasks:before {
content: "\e137";
}
.glyphicon-filter:before {
content: "\e138";
}
.glyphicon-briefcase:before {
content: "\e139";
}
.glyphicon-fullscreen:before {
content: "\e140";
}
.glyphicon-dashboard:before {
content: "\e141";
}
.glyphicon-paperclip:before {
content: "\e142";
}
.glyphicon-heart-empty:before {
content: "\e143";
}
.glyphicon-link:before {
content: "\e144";
}
.glyphicon-phone:before {
content: "\e145";
}
.glyphicon-pushpin:before {
content: "\e146";
}
.glyphicon-usd:before {
content: "\e148";
}
.glyphicon-gbp:before {
content: "\e149";
}
.glyphicon-sort:before {
content: "\e150";
}
.glyphicon-sort-by-alphabet:before {
content: "\e151";
}
.glyphicon-sort-by-alphabet-alt:before {
content: "\e152";
}
.glyphicon-sort-by-order:before {
content: "\e153";
}
.glyphicon-sort-by-order-alt:before {
content: "\e154";
}
.glyphicon-sort-by-attributes:before {
content: "\e155";
}
.glyphicon-sort-by-attributes-alt:before {
content: "\e156";
}
.glyphicon-unchecked:before {
content: "\e157";
}
.glyphicon-expand:before {
content: "\e158";
}
.glyphicon-collapse-down:before {
content: "\e159";
}
.glyphicon-collapse-up:before {
content: "\e160";
}
.glyphicon-log-in:before {
content: "\e161";
}
.glyphicon-flash:before {
content: "\e162";
}
.glyphicon-log-out:before {
content: "\e163";
}
.glyphicon-new-window:before {
content: "\e164";
}
.glyphicon-record:before {
content: "\e165";
}
.glyphicon-save:before {
content: "\e166";
}
.glyphicon-open:before {
content: "\e167";
}
.glyphicon-saved:before {
content: "\e168";
}
.glyphicon-import:before {
content: "\e169";
}
.glyphicon-export:before {
content: "\e170";
}
.glyphicon-send:before {
content: "\e171";
}
.glyphicon-floppy-disk:before {
content: "\e172";
}
.glyphicon-floppy-saved:before {
content: "\e173";
}
.glyphicon-floppy-remove:before {
content: "\e174";
}
.glyphicon-floppy-save:before {
content: "\e175";
}
.glyphicon-floppy-open:before {
content: "\e176";
}
.glyphicon-credit-card:before {
content: "\e177";
}
.glyphicon-transfer:before {
content: "\e178";
}
.glyphicon-cutlery:before {
content: "\e179";
}
.glyphicon-header:before {
content: "\e180";
}
.glyphicon-compressed:before {
content: "\e181";
}
.glyphicon-earphone:before {
content: "\e182";
}
.glyphicon-phone-alt:before {
content: "\e183";
}
.glyphicon-tower:before {
content: "\e184";
}
.glyphicon-stats:before {
content: "\e185";
}
.glyphicon-sd-video:before {
content: "\e186";
}
.glyphicon-hd-video:before {
content: "\e187";
}
.glyphicon-subtitles:before {
content: "\e188";
}
.glyphicon-sound-stereo:before {
content: "\e189";
}
.glyphicon-sound-dolby:before {
content: "\e190";
}
.glyphicon-sound-5-1:before {
content: "\e191";
}
.glyphicon-sound-6-1:before {
content: "\e192";
}
.glyphicon-sound-7-1:before {
content: "\e193";
}
.glyphicon-copyright-mark:before {
content: "\e194";
}
.glyphicon-registration-mark:before {
content: "\e195";
}
.glyphicon-cloud-download:before {
content: "\e197";
}
.glyphicon-cloud-upload:before {
content: "\e198";
}
.glyphicon-tree-conifer:before {
content: "\e199";
}
.glyphicon-tree-deciduous:before {
content: "\e200";
}
.glyphicon-cd:before {
content: "\e201";
}
.glyphicon-save-file:before {
content: "\e202";
}
.glyphicon-open-file:before {
content: "\e203";
}
.glyphicon-level-up:before {
content: "\e204";
}
.glyphicon-copy:before {
content: "\e205";
}
.glyphicon-paste:before {
content: "\e206";
}
.glyphicon-alert:before {
content: "\e209";
}
.glyphicon-equalizer:before {
content: "\e210";
}
.glyphicon-king:before {
content: "\e211";
}
.glyphicon-queen:before {
content: "\e212";
}
.glyphicon-pawn:before {
content: "\e213";
}
.glyphicon-bishop:before {
content: "\e214";
}
.glyphicon-knight:before {
content: "\e215";
}
.glyphicon-baby-formula:before {
content: "\e216";
}
.glyphicon-tent:before {
content: "\26fa";
}
.glyphicon-blackboard:before {
content: "\e218";
}
.glyphicon-bed:before {
content: "\e219";
}
.glyphicon-apple:before {
content: "\f8ff";
}
.glyphicon-erase:before {
content: "\e221";
}
.glyphicon-hourglass:before {
content: "\231b";
}
.glyphicon-lamp:before {
content: "\e223";
}
.glyphicon-duplicate:before {
content: "\e224";
}
.glyphicon-piggy-bank:before {
content: "\e225";
}
.glyphicon-scissors:before {
content: "\e226";
}
.glyphicon-bitcoin:before {
content: "\e227";
}
.glyphicon-yen:before {
content: "\00a5";
}
.glyphicon-ruble:before {
content: "\20bd";
}
.glyphicon-scale:before {
content: "\e230";
}
.glyphicon-ice-lolly:before {
content: "\e231";
}
.glyphicon-ice-lolly-tasted:before {
content: "\e232";
}
.glyphicon-education:before {
content: "\e233";
}
.glyphicon-option-horizontal:before {
content: "\e234";
}
.glyphicon-option-vertical:before {
content: "\e235";
}
.glyphicon-menu-hamburger:before {
content: "\e236";
}
.glyphicon-modal-window:before {
content: "\e237";
}
.glyphicon-oil:before {
content: "\e238";
}
.glyphicon-grain:before {
content: "\e239";
}
.glyphicon-sunglasses:before {
content: "\e240";
}
.glyphicon-text-size:before {
content: "\e241";
}
.glyphicon-text-color:before {
content: "\e242";
}
.glyphicon-text-background:before {
content: "\e243";
}
.glyphicon-object-align-top:before {
content: "\e244";
}
.glyphicon-object-align-bottom:before {
content: "\e245";
}
.glyphicon-object-align-horizontal:before {
content: "\e246";
}
.glyphicon-object-align-left:before {
content: "\e247";
}
.glyphicon-object-align-vertical:before {
content: "\e248";
}
.glyphicon-object-align-right:before {
content: "\e249";
}
.glyphicon-triangle-right:before {
content: "\e250";
}
.glyphicon-triangle-left:before {
content: "\e251";
}
.glyphicon-triangle-bottom:before {
content: "\e252";
}
.glyphicon-triangle-top:before {
content: "\e253";
}
.glyphicon-console:before {
content: "\e254";
}
.glyphicon-superscript:before {
content: "\e255";
}
.glyphicon-subscript:before {
content: "\e256";
}
.glyphicon-menu-left:before {
content: "\e257";
}
.glyphicon-menu-right:before {
content: "\e258";
}
.glyphicon-menu-down:before {
content: "\e259";
}
.glyphicon-menu-up:before {
content: "\e260";
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
font-size: 10px;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 15px;
line-height: 1.42857143;
color: #ebebeb;
background-color: #2b3e50;
}
input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
a {
color: #F59C61;
text-decoration: none;
}
a:hover,
a:focus {
color: #F59C61;
text-decoration: underline;
}
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
figure {
margin: 0;
}
img {
vertical-align: middle;
}
.img-responsive,
.thumbnail > img,
.thumbnail a > img,
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
display: block;
max-width: 100%;
height: auto;
}
.img-rounded {
border-radius: 0;
}
.img-thumbnail {
padding: 4px;
line-height: 1.42857143;
background-color: #2b3e50;
border: 1px solid #dddddd;
border-radius: 0;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
display: inline-block;
max-width: 100%;
height: auto;
}
.img-circle {
border-radius: 50%;
}
hr {
margin-top: 21px;
margin-bottom: 21px;
border: 0;
border-top: 1px solid #596a7b;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
font-family: inherit;
font-weight: 300;
line-height: 1.1;
color: inherit;
}
h1 small,
h2 small,
h3 small,
h4 small,
h5 small,
h6 small,
.h1 small,
.h2 small,
.h3 small,
.h4 small,
.h5 small,
.h6 small,
h1 .small,
h2 .small,
h3 .small,
h4 .small,
h5 .small,
h6 .small,
.h1 .small,
.h2 .small,
.h3 .small,
.h4 .small,
.h5 .small,
.h6 .small {
font-weight: normal;
line-height: 1;
color: #ebebeb;
}
h1,
.h1,
h2,
.h2,
h3,
.h3 {
margin-top: 21px;
margin-bottom: 10.5px;
}
h1 small,
.h1 small,
h2 small,
.h2 small,
h3 small,
.h3 small,
h1 .small,
.h1 .small,
h2 .small,
.h2 .small,
h3 .small,
.h3 .small {
font-size: 65%;
}
h4,
.h4,
h5,
.h5,
h6,
.h6 {
margin-top: 10.5px;
margin-bottom: 10.5px;
}
h4 small,
.h4 small,
h5 small,
.h5 small,
h6 small,
.h6 small,
h4 .small,
.h4 .small,
h5 .small,
.h5 .small,
h6 .small,
.h6 .small {
font-size: 75%;
}
h1,
.h1 {
font-size: 39px;
}
h2,
.h2 {
font-size: 32px;
}
h3,
.h3 {
font-size: 26px;
}
h4,
.h4 {
font-size: 19px;
}
h5,
.h5 {
font-size: 15px;
}
h6,
.h6 {
font-size: 13px;
}
p {
margin: 0 0 10.5px;
}
.lead {
margin-bottom: 21px;
font-size: 17px;
font-weight: 300;
line-height: 1.4;
}
@media (min-width: 768px) {
.lead {
font-size: 22.5px;
}
}
small,
.small {
font-size: 86%;
}
mark,
.mark {
background-color: #f0ad4e;
padding: .2em;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
.text-justify {
text-align: justify;
}
.text-nowrap {
white-space: nowrap;
}
.text-lowercase {
text-transform: lowercase;
}
.text-uppercase {
text-transform: uppercase;
}
.text-capitalize {
text-transform: capitalize;
}
.text-muted {
color: #4e5d6c;
}
.text-primary {
color: #F59C61;
}
a.text-primary:hover {
color: #b15315;
}
.text-success {
color: #ebebeb;
}
a.text-success:hover {
color: #d2d2d2;
}
.text-info {
color: #ebebeb;
}
a.text-info:hover {
color: #d2d2d2;
}
.text-warning {
color: #ebebeb;
}
a.text-warning:hover {
color: #d2d2d2;
}
.text-danger {
color: #ebebeb;
}
a.text-danger:hover {
color: #d2d2d2;
}
.bg-primary {
color: #fff;
background-color: #F59C61;
}
a.bg-primary:hover {
background-color: #b15315;
}
.bg-success {
background-color: #5cb85c;
}
a.bg-success:hover {
background-color: #449d44;
}
.bg-info {
background-color: #5bc0de;
}
a.bg-info:hover {
background-color: #31b0d5;
}
.bg-warning {
background-color: #f0ad4e;
}
a.bg-warning:hover {
background-color: #ec971f;
}
.bg-danger {
background-color: #d9534f;
}
a.bg-danger:hover {
background-color: #c9302c;
}
.page-header {
padding-bottom: 9.5px;
margin: 42px 0 21px;
border-bottom: 1px solid #ebebeb;
}
ul,
ol {
margin-top: 0;
margin-bottom: 10.5px;
}
ul ul,
ol ul,
ul ol,
ol ol {
margin-bottom: 0;
}
.list-unstyled {
padding-left: 0;
list-style: none;
}
.list-inline {
padding-left: 0;
list-style: none;
margin-left: -5px;
}
.list-inline > li {
display: inline-block;
padding-left: 5px;
padding-right: 5px;
}
dl {
margin-top: 0;
margin-bottom: 21px;
}
dt,
dd {
line-height: 1.42857143;
}
dt {
font-weight: bold;
}
dd {
margin-left: 0;
}
@media (min-width: 768px) {
.dl-horizontal dt {
float: left;
width: 160px;
clear: left;
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dl-horizontal dd {
margin-left: 180px;
}
}
abbr[title],
abbr[data-original-title] {
cursor: help;
border-bottom: 1px dotted #4e5d6c;
}
.initialism {
font-size: 90%;
text-transform: uppercase;
}
blockquote {
padding: 10.5px 21px;
margin: 0 0 21px;
font-size: 18.75px;
border-left: 5px solid #4e5d6c;
}
blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child {
margin-bottom: 0;
}
blockquote footer,
blockquote small,
blockquote .small {
display: block;
font-size: 80%;
line-height: 1.42857143;
color: #ebebeb;
}
blockquote footer:before,
blockquote small:before,
blockquote .small:before {
content: '\2014 \00A0';
}
.blockquote-reverse,
blockquote.pull-right {
padding-right: 15px;
padding-left: 0;
border-right: 5px solid #4e5d6c;
border-left: 0;
text-align: right;
}
.blockquote-reverse footer:before,
blockquote.pull-right footer:before,
.blockquote-reverse small:before,
blockquote.pull-right small:before,
.blockquote-reverse .small:before,
blockquote.pull-right .small:before {
content: '';
}
.blockquote-reverse footer:after,
blockquote.pull-right footer:after,
.blockquote-reverse small:after,
blockquote.pull-right small:after,
.blockquote-reverse .small:after,
blockquote.pull-right .small:after {
content: '\00A0 \2014';
}
address {
margin-bottom: 21px;
font-style: normal;
line-height: 1.42857143;
}
code,
kbd,
pre,
samp {
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}
code {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 0;
}
kbd {
padding: 2px 4px;
font-size: 90%;
color: #ffffff;
background-color: #333333;
border-radius: 0;
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}
kbd kbd {
padding: 0;
font-size: 100%;
font-weight: bold;
-webkit-box-shadow: none;
box-shadow: none;
}
pre {
display: block;
padding: 10px;
margin: 0 0 10.5px;
font-size: 14px;
line-height: 1.42857143;
word-break: break-all;
word-wrap: break-word;
color: #333333;
background-color: #f5f5f5;
border: 1px solid #cccccc;
border-radius: 0;
}
pre code {
padding: 0;
font-size: inherit;
color: inherit;
white-space: pre-wrap;
background-color: transparent;
border-radius: 0;
}
.pre-scrollable {
max-height: 340px;
overflow-y: scroll;
}
.container {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container {
width: 1170px;
}
}
.container-fluid {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
.row {
margin-left: -15px;
margin-right: -15px;
}
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
float: left;
}
.col-xs-12 {
width: 100%;
}
.col-xs-11 {
width: 91.66666667%;
}
.col-xs-10 {
width: 83.33333333%;
}
.col-xs-9 {
width: 75%;
}
.col-xs-8 {
width: 66.66666667%;
}
.col-xs-7 {
width: 58.33333333%;
}
.col-xs-6 {
width: 50%;
}
.col-xs-5 {
width: 41.66666667%;
}
.col-xs-4 {
width: 33.33333333%;
}
.col-xs-3 {
width: 25%;
}
.col-xs-2 {
width: 16.66666667%;
}
.col-xs-1 {
width: 8.33333333%;
}
.col-xs-pull-12 {
right: 100%;
}
.col-xs-pull-11 {
right: 91.66666667%;
}
.col-xs-pull-10 {
right: 83.33333333%;
}
.col-xs-pull-9 {
right: 75%;
}
.col-xs-pull-8 {
right: 66.66666667%;
}
.col-xs-pull-7 {
right: 58.33333333%;
}
.col-xs-pull-6 {
right: 50%;
}
.col-xs-pull-5 {
right: 41.66666667%;
}
.col-xs-pull-4 {
right: 33.33333333%;
}
.col-xs-pull-3 {
right: 25%;
}
.col-xs-pull-2 {
right: 16.66666667%;
}
.col-xs-pull-1 {
right: 8.33333333%;
}
.col-xs-pull-0 {
right: auto;
}
.col-xs-push-12 {
left: 100%;
}
.col-xs-push-11 {
left: 91.66666667%;
}
.col-xs-push-10 {
left: 83.33333333%;
}
.col-xs-push-9 {
left: 75%;
}
.col-xs-push-8 {
left: 66.66666667%;
}
.col-xs-push-7 {
left: 58.33333333%;
}
.col-xs-push-6 {
left: 50%;
}
.col-xs-push-5 {
left: 41.66666667%;
}
.col-xs-push-4 {
left: 33.33333333%;
}
.col-xs-push-3 {
left: 25%;
}
.col-xs-push-2 {
left: 16.66666667%;
}
.col-xs-push-1 {
left: 8.33333333%;
}
.col-xs-push-0 {
left: auto;
}
.col-xs-offset-12 {
margin-left: 100%;
}
.col-xs-offset-11 {
margin-left: 91.66666667%;
}
.col-xs-offset-10 {
margin-left: 83.33333333%;
}
.col-xs-offset-9 {
margin-left: 75%;
}
.col-xs-offset-8 {
margin-left: 66.66666667%;
}
.col-xs-offset-7 {
margin-left: 58.33333333%;
}
.col-xs-offset-6 {
margin-left: 50%;
}
.col-xs-offset-5 {
margin-left: 41.66666667%;
}
.col-xs-offset-4 {
margin-left: 33.33333333%;
}
.col-xs-offset-3 {
margin-left: 25%;
}
.col-xs-offset-2 {
margin-left: 16.66666667%;
}
.col-xs-offset-1 {
margin-left: 8.33333333%;
}
.col-xs-offset-0 {
margin-left: 0%;
}
@media (min-width: 768px) {
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
float: left;
}
.col-sm-12 {
width: 100%;
}
.col-sm-11 {
width: 91.66666667%;
}
.col-sm-10 {
width: 83.33333333%;
}
.col-sm-9 {
width: 75%;
}
.col-sm-8 {
width: 66.66666667%;
}
.col-sm-7 {
width: 58.33333333%;
}
.col-sm-6 {
width: 50%;
}
.col-sm-5 {
width: 41.66666667%;
}
.col-sm-4 {
width: 33.33333333%;
}
.col-sm-3 {
width: 25%;
}
.col-sm-2 {
width: 16.66666667%;
}
.col-sm-1 {
width: 8.33333333%;
}
.col-sm-pull-12 {
right: 100%;
}
.col-sm-pull-11 {
right: 91.66666667%;
}
.col-sm-pull-10 {
right: 83.33333333%;
}
.col-sm-pull-9 {
right: 75%;
}
.col-sm-pull-8 {
right: 66.66666667%;
}
.col-sm-pull-7 {
right: 58.33333333%;
}
.col-sm-pull-6 {
right: 50%;
}
.col-sm-pull-5 {
right: 41.66666667%;
}
.col-sm-pull-4 {
right: 33.33333333%;
}
.col-sm-pull-3 {
right: 25%;
}
.col-sm-pull-2 {
right: 16.66666667%;
}
.col-sm-pull-1 {
right: 8.33333333%;
}
.col-sm-pull-0 {
right: auto;
}
.col-sm-push-12 {
left: 100%;
}
.col-sm-push-11 {
left: 91.66666667%;
}
.col-sm-push-10 {
left: 83.33333333%;
}
.col-sm-push-9 {
left: 75%;
}
.col-sm-push-8 {
left: 66.66666667%;
}
.col-sm-push-7 {
left: 58.33333333%;
}
.col-sm-push-6 {
left: 50%;
}
.col-sm-push-5 {
left: 41.66666667%;
}
.col-sm-push-4 {
left: 33.33333333%;
}
.col-sm-push-3 {
left: 25%;
}
.col-sm-push-2 {
left: 16.66666667%;
}
.col-sm-push-1 {
left: 8.33333333%;
}
.col-sm-push-0 {
left: auto;
}
.col-sm-offset-12 {
margin-left: 100%;
}
.col-sm-offset-11 {
margin-left: 91.66666667%;
}
.col-sm-offset-10 {
margin-left: 83.33333333%;
}
.col-sm-offset-9 {
margin-left: 75%;
}
.col-sm-offset-8 {
margin-left: 66.66666667%;
}
.col-sm-offset-7 {
margin-left: 58.33333333%;
}
.col-sm-offset-6 {
margin-left: 50%;
}
.col-sm-offset-5 {
margin-left: 41.66666667%;
}
.col-sm-offset-4 {
margin-left: 33.33333333%;
}
.col-sm-offset-3 {
margin-left: 25%;
}
.col-sm-offset-2 {
margin-left: 16.66666667%;
}
.col-sm-offset-1 {
margin-left: 8.33333333%;
}
.col-sm-offset-0 {
margin-left: 0%;
}
}
@media (min-width: 992px) {
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
float: left;
}
.col-md-12 {
width: 100%;
}
.col-md-11 {
width: 91.66666667%;
}
.col-md-10 {
width: 83.33333333%;
}
.col-md-9 {
width: 75%;
}
.col-md-8 {
width: 66.66666667%;
}
.col-md-7 {
width: 58.33333333%;
}
.col-md-6 {
width: 50%;
}
.col-md-5 {
width: 41.66666667%;
}
.col-md-4 {
width: 33.33333333%;
}
.col-md-3 {
width: 25%;
}
.col-md-2 {
width: 16.66666667%;
}
.col-md-1 {
width: 8.33333333%;
}
.col-md-pull-12 {
right: 100%;
}
.col-md-pull-11 {
right: 91.66666667%;
}
.col-md-pull-10 {
right: 83.33333333%;
}
.col-md-pull-9 {
right: 75%;
}
.col-md-pull-8 {
right: 66.66666667%;
}
.col-md-pull-7 {
right: 58.33333333%;
}
.col-md-pull-6 {
right: 50%;
}
.col-md-pull-5 {
right: 41.66666667%;
}
.col-md-pull-4 {
right: 33.33333333%;
}
.col-md-pull-3 {
right: 25%;
}
.col-md-pull-2 {
right: 16.66666667%;
}
.col-md-pull-1 {
right: 8.33333333%;
}
.col-md-pull-0 {
right: auto;
}
.col-md-push-12 {
left: 100%;
}
.col-md-push-11 {
left: 91.66666667%;
}
.col-md-push-10 {
left: 83.33333333%;
}
.col-md-push-9 {
left: 75%;
}
.col-md-push-8 {
left: 66.66666667%;
}
.col-md-push-7 {
left: 58.33333333%;
}
.col-md-push-6 {
left: 50%;
}
.col-md-push-5 {
left: 41.66666667%;
}
.col-md-push-4 {
left: 33.33333333%;
}
.col-md-push-3 {
left: 25%;
}
.col-md-push-2 {
left: 16.66666667%;
}
.col-md-push-1 {
left: 8.33333333%;
}
.col-md-push-0 {
left: auto;
}
.col-md-offset-12 {
margin-left: 100%;
}
.col-md-offset-11 {
margin-left: 91.66666667%;
}
.col-md-offset-10 {
margin-left: 83.33333333%;
}
.col-md-offset-9 {
margin-left: 75%;
}
.col-md-offset-8 {
margin-left: 66.66666667%;
}
.col-md-offset-7 {
margin-left: 58.33333333%;
}
.col-md-offset-6 {
margin-left: 50%;
}
.col-md-offset-5 {
margin-left: 41.66666667%;
}
.col-md-offset-4 {
margin-left: 33.33333333%;
}
.col-md-offset-3 {
margin-left: 25%;
}
.col-md-offset-2 {
margin-left: 16.66666667%;
}
.col-md-offset-1 {
margin-left: 8.33333333%;
}
.col-md-offset-0 {
margin-left: 0%;
}
}
@media (min-width: 1200px) {
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
float: left;
}
.col-lg-12 {
width: 100%;
}
.col-lg-11 {
width: 91.66666667%;
}
.col-lg-10 {
width: 83.33333333%;
}
.col-lg-9 {
width: 75%;
}
.col-lg-8 {
width: 66.66666667%;
}
.col-lg-7 {
width: 58.33333333%;
}
.col-lg-6 {
width: 50%;
}
.col-lg-5 {
width: 41.66666667%;
}
.col-lg-4 {
width: 33.33333333%;
}
.col-lg-3 {
width: 25%;
}
.col-lg-2 {
width: 16.66666667%;
}
.col-lg-1 {
width: 8.33333333%;
}
.col-lg-pull-12 {
right: 100%;
}
.col-lg-pull-11 {
right: 91.66666667%;
}
.col-lg-pull-10 {
right: 83.33333333%;
}
.col-lg-pull-9 {
right: 75%;
}
.col-lg-pull-8 {
right: 66.66666667%;
}
.col-lg-pull-7 {
right: 58.33333333%;
}
.col-lg-pull-6 {
right: 50%;
}
.col-lg-pull-5 {
right: 41.66666667%;
}
.col-lg-pull-4 {
right: 33.33333333%;
}
.col-lg-pull-3 {
right: 25%;
}
.col-lg-pull-2 {
right: 16.66666667%;
}
.col-lg-pull-1 {
right: 8.33333333%;
}
.col-lg-pull-0 {
right: auto;
}
.col-lg-push-12 {
left: 100%;
}
.col-lg-push-11 {
left: 91.66666667%;
}
.col-lg-push-10 {
left: 83.33333333%;
}
.col-lg-push-9 {
left: 75%;
}
.col-lg-push-8 {
left: 66.66666667%;
}
.col-lg-push-7 {
left: 58.33333333%;
}
.col-lg-push-6 {
left: 50%;
}
.col-lg-push-5 {
left: 41.66666667%;
}
.col-lg-push-4 {
left: 33.33333333%;
}
.col-lg-push-3 {
left: 25%;
}
.col-lg-push-2 {
left: 16.66666667%;
}
.col-lg-push-1 {
left: 8.33333333%;
}
.col-lg-push-0 {
left: auto;
}
.col-lg-offset-12 {
margin-left: 100%;
}
.col-lg-offset-11 {
margin-left: 91.66666667%;
}
.col-lg-offset-10 {
margin-left: 83.33333333%;
}
.col-lg-offset-9 {
margin-left: 75%;
}
.col-lg-offset-8 {
margin-left: 66.66666667%;
}
.col-lg-offset-7 {
margin-left: 58.33333333%;
}
.col-lg-offset-6 {
margin-left: 50%;
}
.col-lg-offset-5 {
margin-left: 41.66666667%;
}
.col-lg-offset-4 {
margin-left: 33.33333333%;
}
.col-lg-offset-3 {
margin-left: 25%;
}
.col-lg-offset-2 {
margin-left: 16.66666667%;
}
.col-lg-offset-1 {
margin-left: 8.33333333%;
}
.col-lg-offset-0 {
margin-left: 0%;
}
}
table {
background-color: transparent;
}
caption {
padding-top: 6px;
padding-bottom: 6px;
color: #4e5d6c;
text-align: left;
}
th {
text-align: left;
}
.table {
width: 100%;
max-width: 100%;
margin-bottom: 21px;
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
padding: 6px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #4e5d6c;
}
.table > thead > tr > th {
vertical-align: bottom;
border-bottom: 2px solid #4e5d6c;
}
.table > caption + thead > tr:first-child > th,
.table > colgroup + thead > tr:first-child > th,
.table > thead:first-child > tr:first-child > th,
.table > caption + thead > tr:first-child > td,
.table > colgroup + thead > tr:first-child > td,
.table > thead:first-child > tr:first-child > td {
border-top: 0;
}
.table > tbody + tbody {
border-top: 2px solid #4e5d6c;
}
.table .table {
background-color: #2b3e50;
}
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
padding: 3px;
}
.table-bordered {
border: 1px solid #4e5d6c;
}
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
border: 1px solid #4e5d6c;
}
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
border-bottom-width: 2px;
}
.table-striped > tbody > tr:nth-of-type(odd) {
background-color: #4e5d6c;
}
.table-hover > tbody > tr:hover {
background-color: #485563;
}
table col[class*="col-"] {
position: static;
float: none;
display: table-column;
}
table td[class*="col-"],
table th[class*="col-"] {
position: static;
float: none;
display: table-cell;
}
.table > thead > tr > td.active,
.table > tbody > tr > td.active,
.table > tfoot > tr > td.active,
.table > thead > tr > th.active,
.table > tbody > tr > th.active,
.table > tfoot > tr > th.active,
.table > thead > tr.active > td,
.table > tbody > tr.active > td,
.table > tfoot > tr.active > td,
.table > thead > tr.active > th,
.table > tbody > tr.active > th,
.table > tfoot > tr.active > th {
background-color: #485563;
}
.table-hover > tbody > tr > td.active:hover,
.table-hover > tbody > tr > th.active:hover,
.table-hover > tbody > tr.active:hover > td,
.table-hover > tbody > tr:hover > .active,
.table-hover > tbody > tr.active:hover > th {
background-color: #3d4954;
}
.table > thead > tr > td.success,
.table > tbody > tr > td.success,
.table > tfoot > tr > td.success,
.table > thead > tr > th.success,
.table > tbody > tr > th.success,
.table > tfoot > tr > th.success,
.table > thead > tr.success > td,
.table > tbody > tr.success > td,
.table > tfoot > tr.success > td,
.table > thead > tr.success > th,
.table > tbody > tr.success > th,
.table > tfoot > tr.success > th {
background-color: #5cb85c;
}
.table-hover > tbody > tr > td.success:hover,
.table-hover > tbody > tr > th.success:hover,
.table-hover > tbody > tr.success:hover > td,
.table-hover > tbody > tr:hover > .success,
.table-hover > tbody > tr.success:hover > th {
background-color: #4cae4c;
}
.table > thead > tr > td.info,
.table > tbody > tr > td.info,
.table > tfoot > tr > td.info,
.table > thead > tr > th.info,
.table > tbody > tr > th.info,
.table > tfoot > tr > th.info,
.table > thead > tr.info > td,
.table > tbody > tr.info > td,
.table > tfoot > tr.info > td,
.table > thead > tr.info > th,
.table > tbody > tr.info > th,
.table > tfoot > tr.info > th {
background-color: #5bc0de;
}
.table-hover > tbody > tr > td.info:hover,
.table-hover > tbody > tr > th.info:hover,
.table-hover > tbody > tr.info:hover > td,
.table-hover > tbody > tr:hover > .info,
.table-hover > tbody > tr.info:hover > th {
background-color: #46b8da;
}
.table > thead > tr > td.warning,
.table > tbody > tr > td.warning,
.table > tfoot > tr > td.warning,
.table > thead > tr > th.warning,
.table > tbody > tr > th.warning,
.table > tfoot > tr > th.warning,
.table > thead > tr.warning > td,
.table > tbody > tr.warning > td,
.table > tfoot > tr.warning > td,
.table > thead > tr.warning > th,
.table > tbody > tr.warning > th,
.table > tfoot > tr.warning > th {
background-color: #f0ad4e;
}
.table-hover > tbody > tr > td.warning:hover,
.table-hover > tbody > tr > th.warning:hover,
.table-hover > tbody > tr.warning:hover > td,
.table-hover > tbody > tr:hover > .warning,
.table-hover > tbody > tr.warning:hover > th {
background-color: #eea236;
}
.table > thead > tr > td.danger,
.table > tbody > tr > td.danger,
.table > tfoot > tr > td.danger,
.table > thead > tr > th.danger,
.table > tbody > tr > th.danger,
.table > tfoot > tr > th.danger,
.table > thead > tr.danger > td,
.table > tbody > tr.danger > td,
.table > tfoot > tr.danger > td,
.table > thead > tr.danger > th,
.table > tbody > tr.danger > th,
.table > tfoot > tr.danger > th {
background-color: #d9534f;
}
.table-hover > tbody > tr > td.danger:hover,
.table-hover > tbody > tr > th.danger:hover,
.table-hover > tbody > tr.danger:hover > td,
.table-hover > tbody > tr:hover > .danger,
.table-hover > tbody > tr.danger:hover > th {
background-color: #d43f3a;
}
.table-responsive {
overflow-x: auto;
min-height: 0.01%;
}
@media screen and (max-width: 767px) {
.table-responsive {
width: 100%;
margin-bottom: 15.75px;
overflow-y: hidden;
-ms-overflow-style: -ms-autohiding-scrollbar;
border: 1px solid #4e5d6c;
}
.table-responsive > .table {
margin-bottom: 0;
}
.table-responsive > .table > thead > tr > th,
.table-responsive > .table > tbody > tr > th,
.table-responsive > .table > tfoot > tr > th,
.table-responsive > .table > thead > tr > td,
.table-responsive > .table > tbody > tr > td,
.table-responsive > .table > tfoot > tr > td {
white-space: nowrap;
}
.table-responsive > .table-bordered {
border: 0;
}
.table-responsive > .table-bordered > thead > tr > th:first-child,
.table-responsive > .table-bordered > tbody > tr > th:first-child,
.table-responsive > .table-bordered > tfoot > tr > th:first-child,
.table-responsive > .table-bordered > thead > tr > td:first-child,
.table-responsive > .table-bordered > tbody > tr > td:first-child,
.table-responsive > .table-bordered > tfoot > tr > td:first-child {
border-left: 0;
}
.table-responsive > .table-bordered > thead > tr > th:last-child,
.table-responsive > .table-bordered > tbody > tr > th:last-child,
.table-responsive > .table-bordered > tfoot > tr > th:last-child,
.table-responsive > .table-bordered > thead > tr > td:last-child,
.table-responsive > .table-bordered > tbody > tr > td:last-child,
.table-responsive > .table-bordered > tfoot > tr > td:last-child {
border-right: 0;
}
.table-responsive > .table-bordered > tbody > tr:last-child > th,
.table-responsive > .table-bordered > tfoot > tr:last-child > th,
.table-responsive > .table-bordered > tbody > tr:last-child > td,
.table-responsive > .table-bordered > tfoot > tr:last-child > td {
border-bottom: 0;
}
}
fieldset {
padding: 0;
margin: 0;
border: 0;
min-width: 0;
}
legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: 21px;
font-size: 22.5px;
line-height: inherit;
color: #ebebeb;
border: 0;
border-bottom: 1px solid #4e5d6c;
}
label {
display: inline-block;
max-width: 100%;
margin-bottom: 5px;
font-weight: bold;
}
input[type="search"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
input[type="radio"],
input[type="checkbox"] {
margin: 4px 0 0;
margin-top: 1px \9;
line-height: normal;
}
input[type="file"] {
display: block;
}
input[type="range"] {
display: block;
width: 100%;
}
select[multiple],
select[size] {
height: auto;
}
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
output {
display: block;
padding-top: 9px;
font-size: 15px;
line-height: 1.42857143;
color: #2b3e50;
}
.form-control {
display: block;
width: 100%;
height: 39px;
padding: 8px 16px;
font-size: 15px;
line-height: 1.42857143;
color: #2b3e50;
background-color: #ffffff;
background-image: none;
border: 1px solid transparent;
border-radius: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.form-control:focus {
border-color: transparent;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 0, 0, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0, 0, 0, 0.6);
}
.form-control::-moz-placeholder {
color: #cccccc;
opacity: 1;
}
.form-control:-ms-input-placeholder {
color: #cccccc;
}
.form-control::-webkit-input-placeholder {
color: #cccccc;
}
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
cursor: not-allowed;
background-color: #ebebeb;
opacity: 1;
}
textarea.form-control {
height: auto;
}
input[type="search"] {
-webkit-appearance: none;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
line-height: 39px;
}
input[type="date"].input-sm,
input[type="time"].input-sm,
input[type="datetime-local"].input-sm,
input[type="month"].input-sm,
.input-group-sm input[type="date"],
.input-group-sm input[type="time"],
.input-group-sm input[type="datetime-local"],
.input-group-sm input[type="month"] {
line-height: 31px;
}
input[type="date"].input-lg,
input[type="time"].input-lg,
input[type="datetime-local"].input-lg,
input[type="month"].input-lg,
.input-group-lg input[type="date"],
.input-group-lg input[type="time"],
.input-group-lg input[type="datetime-local"],
.input-group-lg input[type="month"] {
line-height: 52px;
}
}
.form-group {
margin-bottom: 15px;
}
.radio,
.checkbox {
position: relative;
display: block;
margin-top: 10px;
margin-bottom: 10px;
}
.radio label,
.checkbox label {
min-height: 21px;
padding-left: 20px;
margin-bottom: 0;
font-weight: normal;
cursor: pointer;
}
.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
position: absolute;
margin-left: -20px;
margin-top: 4px \9;
}
.radio + .radio,
.checkbox + .checkbox {
margin-top: -5px;
}
.radio-inline,
.checkbox-inline {
display: inline-block;
padding-left: 20px;
margin-bottom: 0;
vertical-align: middle;
font-weight: normal;
cursor: pointer;
}
.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
margin-top: 0;
margin-left: 10px;
}
input[type="radio"][disabled],
input[type="checkbox"][disabled],
input[type="radio"].disabled,
input[type="checkbox"].disabled,
fieldset[disabled] input[type="radio"],
fieldset[disabled] input[type="checkbox"] {
cursor: not-allowed;
}
.radio-inline.disabled,
.checkbox-inline.disabled,
fieldset[disabled] .radio-inline,
fieldset[disabled] .checkbox-inline {
cursor: not-allowed;
}
.radio.disabled label,
.checkbox.disabled label,
fieldset[disabled] .radio label,
fieldset[disabled] .checkbox label {
cursor: not-allowed;
}
.form-control-static {
padding-top: 9px;
padding-bottom: 9px;
margin-bottom: 0;
}
.form-control-static.input-lg,
.form-control-static.input-sm {
padding-left: 0;
padding-right: 0;
}
.input-sm {
height: 31px;
padding: 5px 10px;
font-size: 13px;
line-height: 1.5;
border-radius: 0;
}
select.input-sm {
height: 31px;
line-height: 31px;
}
textarea.input-sm,
select[multiple].input-sm {
height: auto;
}
.form-group-sm .form-control {
height: 31px;
padding: 5px 10px;
font-size: 13px;
line-height: 1.5;
border-radius: 0;
}
select.form-group-sm .form-control {
height: 31px;
line-height: 31px;
}
textarea.form-group-sm .form-control,
select[multiple].form-group-sm .form-control {
height: auto;
}
.form-group-sm .form-control-static {
height: 31px;
padding: 5px 10px;
font-size: 13px;
line-height: 1.5;
}
.input-lg {
height: 52px;
padding: 12px 24px;
font-size: 19px;
line-height: 1.3333333;
border-radius: 0;
}
select.input-lg {
height: 52px;
line-height: 52px;
}
textarea.input-lg,
select[multiple].input-lg {
height: auto;
}
.form-group-lg .form-control {
height: 52px;
padding: 12px 24px;
font-size: 19px;
line-height: 1.3333333;
border-radius: 0;
}
select.form-group-lg .form-control {
height: 52px;
line-height: 52px;
}
textarea.form-group-lg .form-control,
select[multiple].form-group-lg .form-control {
height: auto;
}
.form-group-lg .form-control-static {
height: 52px;
padding: 12px 24px;
font-size: 19px;
line-height: 1.3333333;
}
.has-feedback {
position: relative;
}
.has-feedback .form-control {
padding-right: 48.75px;
}
.form-control-feedback {
position: absolute;
top: 0;
right: 0;
z-index: 2;
display: block;
width: 39px;
height: 39px;
line-height: 39px;
text-align: center;
pointer-events: none;
}
.input-lg + .form-control-feedback {
width: 52px;
height: 52px;
line-height: 52px;
}
.input-sm + .form-control-feedback {
width: 31px;
height: 31px;
line-height: 31px;
}
.has-success .help-block,
.has-success .control-label,
.has-success .radio,
.has-success .checkbox,
.has-success .radio-inline,
.has-success .checkbox-inline,
.has-success.radio label,
.has-success.checkbox label,
.has-success.radio-inline label,
.has-success.checkbox-inline label {
color: #ebebeb;
}
.has-success .form-control {
border-color: #ebebeb;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-success .form-control:focus {
border-color: #d2d2d2;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
}
.has-success .input-group-addon {
color: #ebebeb;
border-color: #ebebeb;
background-color: #5cb85c;
}
.has-success .form-control-feedback {
color: #ebebeb;
}
.has-warning .help-block,
.has-warning .control-label,
.has-warning .radio,
.has-warning .checkbox,
.has-warning .radio-inline,
.has-warning .checkbox-inline,
.has-warning.radio label,
.has-warning.checkbox label,
.has-warning.radio-inline label,
.has-warning.checkbox-inline label {
color: #ebebeb;
}
.has-warning .form-control {
border-color: #ebebeb;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-warning .form-control:focus {
border-color: #d2d2d2;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
}
.has-warning .input-group-addon {
color: #ebebeb;
border-color: #ebebeb;
background-color: #f0ad4e;
}
.has-warning .form-control-feedback {
color: #ebebeb;
}
.has-error .help-block,
.has-error .control-label,
.has-error .radio,
.has-error .checkbox,
.has-error .radio-inline,
.has-error .checkbox-inline,
.has-error.radio label,
.has-error.checkbox label,
.has-error.radio-inline label,
.has-error.checkbox-inline label {
color: #ebebeb;
}
.has-error .form-control {
border-color: #ebebeb;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-error .form-control:focus {
border-color: #d2d2d2;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ffffff;
}
.has-error .input-group-addon {
color: #ebebeb;
border-color: #ebebeb;
background-color: #d9534f;
}
.has-error .form-control-feedback {
color: #ebebeb;
}
.has-feedback label ~ .form-control-feedback {
top: 26px;
}
.has-feedback label.sr-only ~ .form-control-feedback {
top: 0;
}
.help-block {
display: block;
margin-top: 5px;
margin-bottom: 10px;
color: #ffffff;
}
@media (min-width: 768px) {
.form-inline .form-group {
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .form-control {
display: inline-block;
width: auto;
vertical-align: middle;
}
.form-inline .form-control-static {
display: inline-block;
}
.form-inline .input-group {
display: inline-table;
vertical-align: middle;
}
.form-inline .input-group .input-group-addon,
.form-inline .input-group .input-group-btn,
.form-inline .input-group .form-control {
width: auto;
}
.form-inline .input-group > .form-control {
width: 100%;
}
.form-inline .control-label {
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .radio,
.form-inline .checkbox {
display: inline-block;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .radio label,
.form-inline .checkbox label {
padding-left: 0;
}
.form-inline .radio input[type="radio"],
.form-inline .checkbox input[type="checkbox"] {
position: relative;
margin-left: 0;
}
.form-inline .has-feedback .form-control-feedback {
top: 0;
}
}
.form-horizontal .radio,
.form-horizontal .checkbox,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
margin-top: 0;
margin-bottom: 0;
padding-top: 9px;
}
.form-horizontal .radio,
.form-horizontal .checkbox {
min-height: 30px;
}
.form-horizontal .form-group {
margin-left: -15px;
margin-right: -15px;
}
@media (min-width: 768px) {
.form-horizontal .control-label {
text-align: right;
margin-bottom: 0;
padding-top: 9px;
}
}
.form-horizontal .has-feedback .form-control-feedback {
right: 15px;
}
@media (min-width: 768px) {
.form-horizontal .form-group-lg .control-label {
padding-top: 16.9999996px;
}
}
@media (min-width: 768px) {
.form-horizontal .form-group-sm .control-label {
padding-top: 6px;
}
}
.btn {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
-ms-touch-action: manipulation;
touch-action: manipulation;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap;
padding: 8px 16px;
font-size: 15px;
line-height: 1.42857143;
border-radius: 0;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.btn:focus,
.btn:active:focus,
.btn.active:focus,
.btn.focus,
.btn:active.focus,
.btn.active.focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.btn:hover,
.btn:focus,
.btn.focus {
color: #ffffff;
text-decoration: none;
}
.btn:active,
.btn.active {
outline: 0;
background-image: none;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
cursor: not-allowed;
pointer-events: none;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-default {
color: #ffffff;
background-color: #4e5d6c;
border-color: transparent;
}
.btn-default:hover,
.btn-default:focus,
.btn-default.focus,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
color: #ffffff;
background-color: #39444e;
border-color: rgba(0, 0, 0, 0);
}
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
background-image: none;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #4e5d6c;
border-color: transparent;
}
.btn-default .badge {
color: #4e5d6c;
background-color: #ffffff;
}
.btn-primary {
color: #ffffff;
background-color: #F59C61;
border-color: transparent;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
color: #ffffff;
background-color: #b15315;
border-color: rgba(0, 0, 0, 0);
}
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
background-image: none;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #F59C61;
border-color: transparent;
}
.btn-primary .badge {
color: #F59C61;
background-color: #ffffff;
}
.btn-success {
color: #ffffff;
background-color: #5cb85c;
border-color: transparent;
}
.btn-success:hover,
.btn-success:focus,
.btn-success.focus,
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
color: #ffffff;
background-color: #449d44;
border-color: rgba(0, 0, 0, 0);
}
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
background-image: none;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
background-color: #5cb85c;
border-color: transparent;
}
.btn-success .badge {
color: #5cb85c;
background-color: #ffffff;
}
.btn-info {
color: #ffffff;
background-color: #5bc0de;
border-color: transparent;
}
.btn-info:hover,
.btn-info:focus,
.btn-info.focus,
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
color: #ffffff;
background-color: #31b0d5;
border-color: rgba(0, 0, 0, 0);
}
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
background-image: none;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
background-color: #5bc0de;
border-color: transparent;
}
.btn-info .badge {
color: #5bc0de;
background-color: #ffffff;
}
.btn-warning {
color: #ffffff;
background-color: #f0ad4e;
border-color: transparent;
}
.btn-warning:hover,
.btn-warning:focus,
.btn-warning.focus,
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
color: #ffffff;
background-color: #ec971f;
border-color: rgba(0, 0, 0, 0);
}
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
background-image: none;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
background-color: #f0ad4e;
border-color: transparent;
}
.btn-warning .badge {
color: #f0ad4e;
background-color: #ffffff;
}
.btn-danger {
color: #ffffff;
background-color: #d9534f;
border-color: transparent;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger.focus,
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
color: #ffffff;
background-color: #c9302c;
border-color: rgba(0, 0, 0, 0);
}
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
background-image: none;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
background-color: #d9534f;
border-color: transparent;
}
.btn-danger .badge {
color: #d9534f;
background-color: #ffffff;
}
.btn-link {
color: #F59C61;
font-weight: normal;
border-radius: 0;
}
.btn-link,
.btn-link:active,
.btn-link.active,
.btn-link[disabled],
fieldset[disabled] .btn-link {
background-color: transparent;
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-link,
.btn-link:hover,
.btn-link:focus,
.btn-link:active {
border-color: transparent;
}
.btn-link:hover,
.btn-link:focus {
color: #F59C61;
text-decoration: underline;
background-color: transparent;
}
.btn-link[disabled]:hover,
fieldset[disabled] .btn-link:hover,
.btn-link[disabled]:focus,
fieldset[disabled] .btn-link:focus {
color: #4e5d6c;
text-decoration: none;
}
.btn-lg,
.btn-group-lg > .btn {
padding: 12px 24px;
font-size: 19px;
line-height: 1.3333333;
border-radius: 0;
}
.btn-sm,
.btn-group-sm > .btn {
padding: 5px 10px;
font-size: 13px;
line-height: 1.5;
border-radius: 0;
}
.btn-xs,
.btn-group-xs > .btn {
padding: 1px 5px;
font-size: 13px;
line-height: 1.5;
border-radius: 0;
}
.btn-block {
display: block;
width: 100%;
}
.btn-block + .btn-block {
margin-top: 5px;
}
input[type="submit"].btn-block,
input[type="reset"].btn-block,
input[type="button"].btn-block {
width: 100%;
}
.fade {
opacity: 0;
-webkit-transition: opacity 0.15s linear;
-o-transition: opacity 0.15s linear;
transition: opacity 0.15s linear;
}
.fade.in {
opacity: 1;
}
.collapse {
display: none;
visibility: hidden;
}
.collapse.in {
display: block;
visibility: visible;
}
tr.collapse.in {
display: table-row;
}
tbody.collapse.in {
display: table-row-group;
}
.collapsing {
position: relative;
height: 0;
overflow: hidden;
-webkit-transition-property: height, visibility;
-o-transition-property: height, visibility;
transition-property: height, visibility;
-webkit-transition-duration: 0.35s;
-o-transition-duration: 0.35s;
transition-duration: 0.35s;
-webkit-transition-timing-function: ease;
-o-transition-timing-function: ease;
transition-timing-function: ease;
}
.caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: 4px solid;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
}
.dropup,
.dropdown {
position: relative;
}
.dropdown-toggle:focus {
outline: 0;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
list-style: none;
font-size: 15px;
text-align: left;
background-color: #4e5d6c;
border: 1px solid transparent;
border-radius: 0;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
-webkit-background-clip: padding-box;
background-clip: padding-box;
}
.dropdown-menu.pull-right {
right: 0;
left: auto;
}
.dropdown-menu .divider {
height: 1px;
margin: 9.5px 0;
overflow: hidden;
background-color: #2b3e50;
}
.dropdown-menu > li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.42857143;
color: #ebebeb;
white-space: nowrap;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
text-decoration: none;
color: #ebebeb;
background-color: #485563;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
color: #ffffff;
text-decoration: none;
outline: 0;
background-color: #F59C61;
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
color: #2b3e50;
}
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
text-decoration: none;
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
cursor: not-allowed;
}
.open > .dropdown-menu {
display: block;
}
.open > a {
outline: 0;
}
.dropdown-menu-right {
left: auto;
right: 0;
}
.dropdown-menu-left {
left: 0;
right: auto;
}
.dropdown-header {
display: block;
padding: 3px 20px;
font-size: 13px;
line-height: 1.42857143;
color: #2b3e50;
white-space: nowrap;
}
.dropdown-backdrop {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: 990;
}
.pull-right > .dropdown-menu {
right: 0;
left: auto;
}
.dropup .caret,
.navbar-fixed-bottom .dropdown .caret {
border-top: 0;
border-bottom: 4px solid;
content: "";
}
.dropup .dropdown-menu,
.navbar-fixed-bottom .dropdown .dropdown-menu {
top: auto;
bottom: 100%;
margin-bottom: 2px;
}
@media (min-width: 768px) {
.navbar-right .dropdown-menu {
left: auto;
right: 0;
}
.navbar-right .dropdown-menu-left {
left: 0;
right: auto;
}
}
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-block;
vertical-align: middle;
}
.btn-group > .btn,
.btn-group-vertical > .btn {
position: relative;
float: left;
}
.btn-group > .btn:hover,
.btn-group-vertical > .btn:hover,
.btn-group > .btn:focus,
.btn-group-vertical > .btn:focus,
.btn-group > .btn:active,
.btn-group-vertical > .btn:active,
.btn-group > .btn.active,
.btn-group-vertical > .btn.active {
z-index: 2;
}
.btn-group .btn + .btn,
.btn-group .btn + .btn-group,
.btn-group .btn-group + .btn,
.btn-group .btn-group + .btn-group {
margin-left: -1px;
}
.btn-toolbar {
margin-left: -5px;
}
.btn-toolbar .btn-group,
.btn-toolbar .input-group {
float: left;
}
.btn-toolbar > .btn,
.btn-toolbar > .btn-group,
.btn-toolbar > .input-group {
margin-left: 5px;
}
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
border-radius: 0;
}
.btn-group > .btn:first-child {
margin-left: 0;
}
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.btn-group > .btn-group {
float: left;
}
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,
.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
outline: 0;
}
.btn-group > .btn + .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
}
.btn-group > .btn-lg + .dropdown-toggle {
padding-left: 12px;
padding-right: 12px;
}
.btn-group.open .dropdown-toggle {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn-group.open .dropdown-toggle.btn-link {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn .caret {
margin-left: 0;
}
.btn-lg .caret {
border-width: 5px 5px 0;
border-bottom-width: 0;
}
.dropup .btn-lg .caret {
border-width: 0 5px 5px;
}
.btn-group-vertical > .btn,
.btn-group-vertical > .btn-group,
.btn-group-vertical > .btn-group > .btn {
display: block;
float: none;
width: 100%;
max-width: 100%;
}
.btn-group-vertical > .btn-group > .btn {
float: none;
}
.btn-group-vertical > .btn + .btn,
.btn-group-vertical > .btn + .btn-group,
.btn-group-vertical > .btn-group + .btn,
.btn-group-vertical > .btn-group + .btn-group {
margin-top: -1px;
margin-left: 0;
}
.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
border-radius: 0;
}
.btn-group-vertical > .btn:first-child:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.btn-group-vertical > .btn:last-child:not(:first-child) {
border-bottom-left-radius: 0;
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.btn-group-justified {
display: table;
width: 100%;
table-layout: fixed;
border-collapse: separate;
}
.btn-group-justified > .btn,
.btn-group-justified > .btn-group {
float: none;
display: table-cell;
width: 1%;
}
.btn-group-justified > .btn-group .btn {
width: 100%;
}
.btn-group-justified > .btn-group .dropdown-menu {
left: auto;
}
[data-toggle="buttons"] > .btn input[type="radio"],
[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
[data-toggle="buttons"] > .btn input[type="checkbox"],
[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
position: absolute;
clip: rect(0, 0, 0, 0);
pointer-events: none;
}
.input-group {
position: relative;
display: table;
border-collapse: separate;
}
.input-group[class*="col-"] {
float: none;
padding-left: 0;
padding-right: 0;
}
.input-group .form-control {
position: relative;
z-index: 2;
float: left;
width: 100%;
margin-bottom: 0;
}
.input-group-lg > .form-control,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .btn {
height: 52px;
padding: 12px 24px;
font-size: 19px;
line-height: 1.3333333;
border-radius: 0;
}
select.input-group-lg > .form-control,
select.input-group-lg > .input-group-addon,
select.input-group-lg > .input-group-btn > .btn {
height: 52px;
line-height: 52px;
}
textarea.input-group-lg > .form-control,
textarea.input-group-lg > .input-group-addon,
textarea.input-group-lg > .input-group-btn > .btn,
select[multiple].input-group-lg > .form-control,
select[multiple].input-group-lg > .input-group-addon,
select[multiple].input-group-lg > .input-group-btn > .btn {
height: auto;
}
.input-group-sm > .form-control,
.input-group-sm > .input-group-addon,
.input-group-sm > .input-group-btn > .btn {
height: 31px;
padding: 5px 10px;
font-size: 13px;
line-height: 1.5;
border-radius: 0;
}
select.input-group-sm > .form-control,
select.input-group-sm > .input-group-addon,
select.input-group-sm > .input-group-btn > .btn {
height: 31px;
line-height: 31px;
}
textarea.input-group-sm > .form-control,
textarea.input-group-sm > .input-group-addon,
textarea.input-group-sm > .input-group-btn > .btn,
select[multiple].input-group-sm > .form-control,
select[multiple].input-group-sm > .input-group-addon,
select[multiple].input-group-sm > .input-group-btn > .btn {
height: auto;
}
.input-group-addon,
.input-group-btn,
.input-group .form-control {
display: table-cell;
}
.input-group-addon:not(:first-child):not(:last-child),
.input-group-btn:not(:first-child):not(:last-child),
.input-group .form-control:not(:first-child):not(:last-child) {
border-radius: 0;
}
.input-group-addon,
.input-group-btn {
width: 1%;
white-space: nowrap;
vertical-align: middle;
}
.input-group-addon {
padding: 8px 16px;
font-size: 15px;
font-weight: normal;
line-height: 1;
color: #2b3e50;
text-align: center;
background-color: #4e5d6c;
border: 1px solid transparent;
border-radius: 0;
}
.input-group-addon.input-sm {
padding: 5px 10px;
font-size: 13px;
border-radius: 0;
}
.input-group-addon.input-lg {
padding: 12px 24px;
font-size: 19px;
border-radius: 0;
}
.input-group-addon input[type="radio"],
.input-group-addon input[type="checkbox"] {
margin-top: 0;
}
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group > .btn,
.input-group-btn:first-child > .dropdown-toggle,
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
.input-group-addon:first-child {
border-right: 0;
}
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group > .btn,
.input-group-btn:last-child > .dropdown-toggle,
.input-group-btn:first-child > .btn:not(:first-child),
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.input-group-addon:last-child {
border-left: 0;
}
.input-group-btn {
position: relative;
font-size: 0;
white-space: nowrap;
}
.input-group-btn > .btn {
position: relative;
}
.input-group-btn > .btn + .btn {
margin-left: -1px;
}
.input-group-btn > .btn:hover,
.input-group-btn > .btn:focus,
.input-group-btn > .btn:active {
z-index: 2;
}
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group {
margin-right: -1px;
}
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group {
margin-left: -1px;
}
.nav {
margin-bottom: 0;
padding-left: 0;
list-style: none;
}
.nav > li {
position: relative;
display: block;
}
.nav > li > a {
position: relative;
display: block;
padding: 10px 15px;
}
.nav > li > a:hover,
.nav > li > a:focus {
text-decoration: none;
background-color: #4e5d6c;
}
.nav > li.disabled > a {
color: #4e5d6c;
}
.nav > li.disabled > a:hover,
.nav > li.disabled > a:focus {
color: #4e5d6c;
text-decoration: none;
background-color: transparent;
cursor: not-allowed;
}
.nav .open > a,
.nav .open > a:hover,
.nav .open > a:focus {
background-color: #4e5d6c;
border-color: #F59C61;
}
.nav .nav-divider {
height: 1px;
margin: 9.5px 0;
overflow: hidden;
background-color: #e5e5e5;
}
.nav > li > a > img {
max-width: none;
}
.nav-tabs {
border-bottom: 1px solid transparent;
}
.nav-tabs > li {
float: left;
margin-bottom: -1px;
}
.nav-tabs > li > a {
margin-right: 2px;
line-height: 1.42857143;
border: 1px solid transparent;
border-radius: 0 0 0 0;
}
.nav-tabs > li > a:hover {
border-color: #4e5d6c #4e5d6c transparent;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
color: #ebebeb;
background-color: #2b3e50;
border: 1px solid #4e5d6c;
border-bottom-color: transparent;
cursor: default;
}
.nav-tabs.nav-justified {
width: 100%;
border-bottom: 0;
}
.nav-tabs.nav-justified > li {
float: none;
}
.nav-tabs.nav-justified > li > a {
text-align: center;
margin-bottom: 5px;
}
.nav-tabs.nav-justified > .dropdown .dropdown-menu {
top: auto;
left: auto;
}
@media (min-width: 768px) {
.nav-tabs.nav-justified > li {
display: table-cell;
width: 1%;
}
.nav-tabs.nav-justified > li > a {
margin-bottom: 0;
}
}
.nav-tabs.nav-justified > li > a {
margin-right: 0;
border-radius: 0;
}
.nav-tabs.nav-justified > .active > a,
.nav-tabs.nav-justified > .active > a:hover,
.nav-tabs.nav-justified > .active > a:focus {
border: 1px solid #4e5d6c;
}
@media (min-width: 768px) {
.nav-tabs.nav-justified > li > a {
border-bottom: 1px solid #4e5d6c;
border-radius: 0 0 0 0;
}
.nav-tabs.nav-justified > .active > a,
.nav-tabs.nav-justified > .active > a:hover,
.nav-tabs.nav-justified > .active > a:focus {
border-bottom-color: #4e5d6c;
}
}
.nav-pills > li {
float: left;
}
.nav-pills > li > a {
border-radius: 0;
}
.nav-pills > li + li {
margin-left: 2px;
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
color: #ffffff;
background-color: #F59C61;
}
.nav-stacked > li {
float: none;
}
.nav-stacked > li + li {
margin-top: 2px;
margin-left: 0;
}
.nav-justified {
width: 100%;
}
.nav-justified > li {
float: none;
}
.nav-justified > li > a {
text-align: center;
margin-bottom: 5px;
}
.nav-justified > .dropdown .dropdown-menu {
top: auto;
left: auto;
}
@media (min-width: 768px) {
.nav-justified > li {
display: table-cell;
width: 1%;
}
.nav-justified > li > a {
margin-bottom: 0;
}
}
.nav-tabs-justified {
border-bottom: 0;
}
.nav-tabs-justified > li > a {
margin-right: 0;
border-radius: 0;
}
.nav-tabs-justified > .active > a,
.nav-tabs-justified > .active > a:hover,
.nav-tabs-justified > .active > a:focus {
border: 1px solid #4e5d6c;
}
@media (min-width: 768px) {
.nav-tabs-justified > li > a {
border-bottom: 1px solid #4e5d6c;
border-radius: 0 0 0 0;
}
.nav-tabs-justified > .active > a,
.nav-tabs-justified > .active > a:hover,
.nav-tabs-justified > .active > a:focus {
border-bottom-color: #4e5d6c;
}
}
.tab-content > .tab-pane {
display: none;
visibility: hidden;
}
.tab-content > .active {
display: block;
visibility: visible;
}
.nav-tabs .dropdown-menu {
margin-top: -1px;
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.navbar {
position: relative;
min-height: 40px;
margin-bottom: 21px;
border: 1px solid transparent;
}
@media (min-width: 768px) {
.navbar {
border-radius: 0;
}
}
@media (min-width: 768px) {
.navbar-header {
float: left;
}
}
.navbar-collapse {
overflow-x: visible;
padding-right: 15px;
padding-left: 15px;
border-top: 1px solid transparent;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
-webkit-overflow-scrolling: touch;
}
.navbar-collapse.in {
overflow-y: auto;
}
@media (min-width: 768px) {
.navbar-collapse {
width: auto;
border-top: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.navbar-collapse.collapse {
display: block !important;
visibility: visible !important;
height: auto !important;
padding-bottom: 0;
overflow: visible !important;
}
.navbar-collapse.in {
overflow-y: visible;
}
.navbar-fixed-top .navbar-collapse,
.navbar-static-top .navbar-collapse,
.navbar-fixed-bottom .navbar-collapse {
padding-left: 0;
padding-right: 0;
}
}
.navbar-fixed-top .navbar-collapse,
.navbar-fixed-bottom .navbar-collapse {
max-height: 340px;
}
@media (max-device-width: 480px) and (orientation: landscape) {
.navbar-fixed-top .navbar-collapse,
.navbar-fixed-bottom .navbar-collapse {
max-height: 200px;
}
}
.container > .navbar-header,
.container-fluid > .navbar-header,
.container > .navbar-collapse,
.container-fluid > .navbar-collapse {
margin-right: -15px;
margin-left: -15px;
}
@media (min-width: 768px) {
.container > .navbar-header,
.container-fluid > .navbar-header,
.container > .navbar-collapse,
.container-fluid > .navbar-collapse {
margin-right: 0;
margin-left: 0;
}
}
.navbar-static-top {
z-index: 1000;
border-width: 0 0 1px;
}
@media (min-width: 768px) {
.navbar-static-top {
border-radius: 0;
}
}
.navbar-fixed-top,
.navbar-fixed-bottom {
position: fixed;
right: 0;
left: 0;
z-index: 1030;
}
@media (min-width: 768px) {
.navbar-fixed-top,
.navbar-fixed-bottom {
border-radius: 0;
}
}
.navbar-fixed-top {
top: 0;
border-width: 0 0 1px;
}
.navbar-fixed-bottom {
bottom: 0;
margin-bottom: 0;
border-width: 1px 0 0;
}
.navbar-brand {
float: left;
padding: 9.5px 15px;
font-size: 19px;
line-height: 21px;
height: 40px;
}
.navbar-brand:hover,
.navbar-brand:focus {
text-decoration: none;
}
.navbar-brand > img {
display: block;
}
@media (min-width: 768px) {
.navbar > .container .navbar-brand,
.navbar > .container-fluid .navbar-brand {
margin-left: -15px;
}
}
.navbar-toggle {
position: relative;
float: right;
margin-right: 15px;
padding: 9px 10px;
margin-top: 3px;
margin-bottom: 3px;
background-color: transparent;
background-image: none;
border: 1px solid transparent;
border-radius: 0;
}
.navbar-toggle:focus {
outline: 0;
}
.navbar-toggle .icon-bar {
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
}
.navbar-toggle .icon-bar + .icon-bar {
margin-top: 4px;
}
@media (min-width: 768px) {
.navbar-toggle {
display: none;
}
}
.navbar-nav {
margin: 4.75px -15px;
}
.navbar-nav > li > a {
padding-top: 10px;
padding-bottom: 10px;
line-height: 21px;
}
@media (max-width: 767px) {
.navbar-nav .open .dropdown-menu {
position: static;
float: none;
width: auto;
margin-top: 0;
background-color: transparent;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.navbar-nav .open .dropdown-menu > li > a,
.navbar-nav .open .dropdown-menu .dropdown-header {
padding: 5px 15px 5px 25px;
}
.navbar-nav .open .dropdown-menu > li > a {
line-height: 21px;
}
.navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-nav .open .dropdown-menu > li > a:focus {
background-image: none;
}
}
@media (min-width: 768px) {
.navbar-nav {
float: left;
margin: 0;
}
.navbar-nav > li {
float: left;
}
.navbar-nav > li > a {
padding-top: 9.5px;
padding-bottom: 9.5px;
}
}
.navbar-form {
margin-left: -15px;
margin-right: -15px;
padding: 10px 15px;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
margin-top: 0.5px;
margin-bottom: 0.5px;
}
@media (min-width: 768px) {
.navbar-form .form-group {
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
.navbar-form .form-control {
display: inline-block;
width: auto;
vertical-align: middle;
}
.navbar-form .form-control-static {
display: inline-block;
}
.navbar-form .input-group {
display: inline-table;
vertical-align: middle;
}
.navbar-form .input-group .input-group-addon,
.navbar-form .input-group .input-group-btn,
.navbar-form .input-group .form-control {
width: auto;
}
.navbar-form .input-group > .form-control {
width: 100%;
}
.navbar-form .control-label {
margin-bottom: 0;
vertical-align: middle;
}
.navbar-form .radio,
.navbar-form .checkbox {
display: inline-block;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
}
.navbar-form .radio label,
.navbar-form .checkbox label {
padding-left: 0;
}
.navbar-form .radio input[type="radio"],
.navbar-form .checkbox input[type="checkbox"] {
position: relative;
margin-left: 0;
}
.navbar-form .has-feedback .form-control-feedback {
top: 0;
}
}
@media (max-width: 767px) {
.navbar-form .form-group {
margin-bottom: 5px;
}
.navbar-form .form-group:last-child {
margin-bottom: 0;
}
}
@media (min-width: 768px) {
.navbar-form {
width: auto;
border: 0;
margin-left: 0;
margin-right: 0;
padding-top: 0;
padding-bottom: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
}
.navbar-nav > li > .dropdown-menu {
margin-top: 0;
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
margin-bottom: 0;
border-top-right-radius: 0;
border-top-left-radius: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.navbar-btn {
margin-top: 0.5px;
margin-bottom: 0.5px;
}
.navbar-btn.btn-sm {
margin-top: 4.5px;
margin-bottom: 4.5px;
}
.navbar-btn.btn-xs {
margin-top: 9px;
margin-bottom: 9px;
}
.navbar-text {
margin-top: 9.5px;
margin-bottom: 9.5px;
}
@media (min-width: 768px) {
.navbar-text {
float: left;
margin-left: 15px;
margin-right: 15px;
}
}
@media (min-width: 768px) {
.navbar-left {
float: left !important;
}
.navbar-right {
float: right !important;
margin-right: -15px;
}
.navbar-right ~ .navbar-right {
margin-right: 0;
}
}
.navbar-default {
background-color: #4e5d6c;
border-color: transparent;
}
.navbar-default .navbar-brand {
color: #ebebeb;
}
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
color: #ebebeb;
background-color: transparent;
}
.navbar-default .navbar-text {
color: #ebebeb;
}
.navbar-default .navbar-nav > li > a {
color: #ebebeb;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
color: #ebebeb;
background-color: #485563;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #ebebeb;
background-color: #485563;
}
.navbar-default .navbar-nav > .disabled > a,
.navbar-default .navbar-nav > .disabled > a:hover,
.navbar-default .navbar-nav > .disabled > a:focus {
color: #cccccc;
background-color: transparent;
}
.navbar-default .navbar-toggle {
border-color: transparent;
}
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
background-color: #485563;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #ebebeb;
}
.navbar-default .navbar-collapse,
.navbar-default .navbar-form {
border-color: transparent;
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
background-color: #485563;
color: #ebebeb;
}
@media (max-width: 767px) {
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: #ebebeb;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
color: #ebebeb;
background-color: #485563;
}
.navbar-default .navbar-nav .open .dropdown-menu > .active > a,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #ebebeb;
background-color: #485563;
}
.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
color: #cccccc;
background-color: transparent;
}
}
.navbar-default .navbar-link {
color: #ebebeb;
}
.navbar-default .navbar-link:hover {
color: #ebebeb;
}
.navbar-default .btn-link {
color: #ebebeb;
}
.navbar-default .btn-link:hover,
.navbar-default .btn-link:focus {
color: #ebebeb;
}
.navbar-default .btn-link[disabled]:hover,
fieldset[disabled] .navbar-default .btn-link:hover,
.navbar-default .btn-link[disabled]:focus,
fieldset[disabled] .navbar-default .btn-link:focus {
color: #cccccc;
}
.navbar-inverse {
background-color: #F59C61;
border-color: transparent;
}
.navbar-inverse .navbar-brand {
color: #ebebeb;
}
.navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-brand:focus {
color: #ebebeb;
background-color: transparent;
}
.navbar-inverse .navbar-text {
color: #ebebeb;
}
.navbar-inverse .navbar-nav > li > a {
color: #ebebeb;
}
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
color: #ebebeb;
background-color: #c85e17;
}
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
color: #ebebeb;
background-color: #c85e17;
}
.navbar-inverse .navbar-nav > .disabled > a,
.navbar-inverse .navbar-nav > .disabled > a:hover,
.navbar-inverse .navbar-nav > .disabled > a:focus {
color: #444444;
background-color: transparent;
}
.navbar-inverse .navbar-toggle {
border-color: transparent;
}
.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
background-color: #c85e17;
}
.navbar-inverse .navbar-toggle .icon-bar {
background-color: #ebebeb;
}
.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
border-color: #bf5a16;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus {
background-color: #c85e17;
color: #ebebeb;
}
@media (max-width: 767px) {
.navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
border-color: transparent;
}
.navbar-inverse .navbar-nav .open .dropdown-menu .divider {
background-color: transparent;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
color: #ebebeb;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
color: #ebebeb;
background-color: #c85e17;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #ebebeb;
background-color: #c85e17;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
color: #444444;
background-color: transparent;
}
}
.navbar-inverse .navbar-link {
color: #ebebeb;
}
.navbar-inverse .navbar-link:hover {
color: #ebebeb;
}
.navbar-inverse .btn-link {
color: #ebebeb;
}
.navbar-inverse .btn-link:hover,
.navbar-inverse .btn-link:focus {
color: #ebebeb;
}
.navbar-inverse .btn-link[disabled]:hover,
fieldset[disabled] .navbar-inverse .btn-link:hover,
.navbar-inverse .btn-link[disabled]:focus,
fieldset[disabled] .navbar-inverse .btn-link:focus {
color: #444444;
}
.breadcrumb {
padding: 8px 15px;
margin-bottom: 21px;
list-style: none;
background-color: #4e5d6c;
border-radius: 0;
}
.breadcrumb > li {
display: inline-block;
}
.breadcrumb > li + li:before {
content: "/\00a0";
padding: 0 5px;
color: #ebebeb;
}
.breadcrumb > .active {
color: #ebebeb;
}
.pagination {
display: inline-block;
padding-left: 0;
margin: 21px 0;
border-radius: 0;
}
.pagination > li {
display: inline;
}
.pagination > li > a,
.pagination > li > span {
position: relative;
float: left;
padding: 8px 16px;
line-height: 1.42857143;
text-decoration: none;
color: #ebebeb;
background-color: #4e5d6c;
border: 1px solid transparent;
margin-left: -1px;
}
.pagination > li:first-child > a,
.pagination > li:first-child > span {
margin-left: 0;
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.pagination > li:last-child > a,
.pagination > li:last-child > span {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
.pagination > li > a:hover,
.pagination > li > span:hover,
.pagination > li > a:focus,
.pagination > li > span:focus {
color: #ebebeb;
background-color: #485563;
border-color: transparent;
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
z-index: 2;
color: #ebebeb;
background-color: #F59C61;
border-color: transparent;
cursor: default;
}
.pagination > .disabled > span,
.pagination > .disabled > span:hover,
.pagination > .disabled > span:focus,
.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus {
color: #323c46;
background-color: #4e5d6c;
border-color: transparent;
cursor: not-allowed;
}
.pagination-lg > li > a,
.pagination-lg > li > span {
padding: 12px 24px;
font-size: 19px;
}
.pagination-lg > li:first-child > a,
.pagination-lg > li:first-child > span {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.pagination-lg > li:last-child > a,
.pagination-lg > li:last-child > span {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
.pagination-sm > li > a,
.pagination-sm > li > span {
padding: 5px 10px;
font-size: 13px;
}
.pagination-sm > li:first-child > a,
.pagination-sm > li:first-child > span {
border-bottom-left-radius: 0;
border-top-left-radius: 0;
}
.pagination-sm > li:last-child > a,
.pagination-sm > li:last-child > span {
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}
.pager {
padding-left: 0;
margin: 21px 0;
list-style: none;
text-align: center;
}
.pager li {
display: inline;
}
.pager li > a,
.pager li > span {
display: inline-block;
padding: 5px 14px;
background-color: #4e5d6c;
border: 1px solid transparent;
border-radius: 15px;
}
.pager li > a:hover,
.pager li > a:focus {
text-decoration: none;
background-color: #485563;
}
.pager .next > a,
.pager .next > span {
float: right;
}
.pager .previous > a,
.pager .previous > span {
float: left;
}
.pager .disabled > a,
.pager .disabled > a:hover,
.pager .disabled > a:focus,
.pager .disabled > span {
color: #323c46;
background-color: #4e5d6c;
cursor: not-allowed;
}
.label {
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: bold;
line-height: 1;
color: #ffffff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
}
a.label:hover,
a.label:focus {
color: #ffffff;
text-decoration: none;
cursor: pointer;
}
.label:empty {
display: none;
}
.btn .label {
position: relative;
top: -1px;
}
.label-default {
background-color: #4e5d6c;
}
.label-default[href]:hover,
.label-default[href]:focus {
background-color: #39444e;
}
.label-primary {
background-color: #F59C61;
}
.label-primary[href]:hover,
.label-primary[href]:focus {
background-color: #b15315;
}
.label-success {
background-color: #5cb85c;
}
.label-success[href]:hover,
.label-success[href]:focus {
background-color: #449d44;
}
.label-info {
background-color: #5bc0de;
}
.label-info[href]:hover,
.label-info[href]:focus {
background-color: #31b0d5;
}
.label-warning {
background-color: #f0ad4e;
}
.label-warning[href]:hover,
.label-warning[href]:focus {
background-color: #ec971f;
}
.label-danger {
background-color: #d9534f;
}
.label-danger[href]:hover,
.label-danger[href]:focus {
background-color: #c9302c;
}
.badge {
display: inline-block;
min-width: 10px;
padding: 3px 7px;
font-size: 13px;
font-weight: 300;
color: #ebebeb;
line-height: 1;
vertical-align: baseline;
white-space: nowrap;
text-align: center;
background-color: #4e5d6c;
border-radius: 10px;
}
.badge:empty {
display: none;
}
.btn .badge {
position: relative;
top: -1px;
}
.btn-xs .badge {
top: 0;
padding: 1px 5px;
}
a.badge:hover,
a.badge:focus {
color: #ffffff;
text-decoration: none;
cursor: pointer;
}
.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
color: #F59C61;
background-color: #ffffff;
}
.list-group-item > .badge {
float: right;
}
.list-group-item > .badge + .badge {
margin-right: 5px;
}
.nav-pills > li > a > .badge {
margin-left: 3px;
}
.jumbotron {
padding: 30px 15px;
margin-bottom: 30px;
color: inherit;
background-color: #4e5d6c;
}
.jumbotron h1,
.jumbotron .h1 {
color: inherit;
}
.jumbotron p {
margin-bottom: 15px;
font-size: 23px;
font-weight: 200;
}
.jumbotron > hr {
border-top-color: #39444e;
}
.container .jumbotron,
.container-fluid .jumbotron {
border-radius: 0;
}
.jumbotron .container {
max-width: 100%;
}
@media screen and (min-width: 768px) {
.jumbotron {
padding: 48px 0;
}
.container .jumbotron,
.container-fluid .jumbotron {
padding-left: 60px;
padding-right: 60px;
}
.jumbotron h1,
.jumbotron .h1 {
font-size: 67.5px;
}
}
.thumbnail {
display: block;
padding: 4px;
margin-bottom: 21px;
line-height: 1.42857143;
background-color: #2b3e50;
border: 1px solid #dddddd;
border-radius: 0;
-webkit-transition: border 0.2s ease-in-out;
-o-transition: border 0.2s ease-in-out;
transition: border 0.2s ease-in-out;
}
.thumbnail > img,
.thumbnail a > img {
margin-left: auto;
margin-right: auto;
}
a.thumbnail:hover,
a.thumbnail:focus,
a.thumbnail.active {
border-color: #F59C61;
}
.thumbnail .caption {
padding: 9px;
color: #ebebeb;
}
.alert {
padding: 15px;
margin-bottom: 21px;
border: 1px solid transparent;
border-radius: 0;
}
.alert h4 {
margin-top: 0;
color: inherit;
}
.alert .alert-link {
font-weight: bold;
}
.alert > p,
.alert > ul {
margin-bottom: 0;
}
.alert > p + p {
margin-top: 5px;
}
.alert-dismissable,
.alert-dismissible {
padding-right: 35px;
}
.alert-dismissable .close,
.alert-dismissible .close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}
.alert-success {
background-color: #5cb85c;
border-color: transparent;
color: #ebebeb;
}
.alert-success hr {
border-top-color: rgba(0, 0, 0, 0);
}
.alert-success .alert-link {
color: #d2d2d2;
}
.alert-info {
background-color: #5bc0de;
border-color: transparent;
color: #ebebeb;
}
.alert-info hr {
border-top-color: rgba(0, 0, 0, 0);
}
.alert-info .alert-link {
color: #d2d2d2;
}
.alert-warning {
background-color: #f0ad4e;
border-color: transparent;
color: #ebebeb;
}
.alert-warning hr {
border-top-color: rgba(0, 0, 0, 0);
}
.alert-warning .alert-link {
color: #d2d2d2;
}
.alert-danger {
background-color: #d9534f;
border-color: transparent;
color: #ebebeb;
}
.alert-danger hr {
border-top-color: rgba(0, 0, 0, 0);
}
.alert-danger .alert-link {
color: #d2d2d2;
}
@-webkit-keyframes progress-bar-stripes {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
@-o-keyframes progress-bar-stripes {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
@keyframes progress-bar-stripes {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
.progress {
overflow: hidden;
height: 21px;
margin-bottom: 21px;
background-color: #4e5d6c;
border-radius: 0;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
.progress-bar {
float: left;
width: 0%;
height: 100%;
font-size: 13px;
line-height: 21px;
color: #ffffff;
text-align: center;
background-color: #F59C61;
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-webkit-transition: width 0.6s ease;
-o-transition: width 0.6s ease;
transition: width 0.6s ease;
}
.progress-striped .progress-bar,
.progress-bar-striped {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-webkit-background-size: 40px 40px;
background-size: 40px 40px;
}
.progress.active .progress-bar,
.progress-bar.active {
-webkit-animation: progress-bar-stripes 2s linear infinite;
-o-animation: progress-bar-stripes 2s linear infinite;
animation: progress-bar-stripes 2s linear infinite;
}
.progress-bar-success {
background-color: #5cb85c;
}
.progress-striped .progress-bar-success {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.progress-bar-info {
background-color: #5bc0de;
}
.progress-striped .progress-bar-info {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.progress-bar-warning {
background-color: #f0ad4e;
}
.progress-striped .progress-bar-warning {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.progress-bar-danger {
background-color: #d9534f;
}
.progress-striped .progress-bar-danger {
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.media {
margin-top: 15px;
}
.media:first-child {
margin-top: 0;
}
.media,
.media-body {
zoom: 1;
overflow: hidden;
}
.media-body {
width: 10000px;
}
.media-object {
display: block;
}
.media-right,
.media > .pull-right {
padding-left: 10px;
}
.media-left,
.media > .pull-left {
/* padding-right: 10px; */
}
.media-left,
.media-right,
.media-body {
display: table-cell;
vertical-align: top;
}
.media-middle {
vertical-align: middle;
}
.media-bottom {
vertical-align: bottom;
}
.media-heading {
margin-top: 0;
margin-bottom: 5px;
}
.media-list {
padding-left: 0;
list-style: none;
}
.list-group {
margin-bottom: 20px;
padding-left: 0;
}
.list-group-item {
position: relative;
display: block;
padding: 10px 15px;
margin-bottom: -1px;
background-color: #4e5d6c;
border: 1px solid transparent;
}
.list-group-item:first-child {
border-top-right-radius: 0;
border-top-left-radius: 0;
}
.list-group-item:last-child {
margin-bottom: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
a.list-group-item {
color: #ebebeb;
}
a.list-group-item .list-group-item-heading {
color: #ebebeb;
}
a.list-group-item:hover,
a.list-group-item:focus {
text-decoration: none;
color: #ebebeb;
background-color: #485563;
}
.list-group-item.disabled,
.list-group-item.disabled:hover,
.list-group-item.disabled:focus {
background-color: #ebebeb;
color: #4e5d6c;
cursor: not-allowed;
}
.list-group-item.disabled .list-group-item-heading,
.list-group-item.disabled:hover .list-group-item-heading,
.list-group-item.disabled:focus .list-group-item-heading {
color: inherit;
}
.list-group-item.disabled .list-group-item-text,
.list-group-item.disabled:hover .list-group-item-text,
.list-group-item.disabled:focus .list-group-item-text {
color: #4e5d6c;
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
z-index: 2;
color: #ffffff;
background-color: #F59C61;
border-color: #F59C61;
}
.list-group-item.active .list-group-item-heading,
.list-group-item.active:hover .list-group-item-heading,
.list-group-item.active:focus .list-group-item-heading,
.list-group-item.active .list-group-item-heading > small,
.list-group-item.active:hover .list-group-item-heading > small,
.list-group-item.active:focus .list-group-item-heading > small,
.list-group-item.active .list-group-item-heading > .small,
.list-group-item.active:hover .list-group-item-heading > .small,
.list-group-item.active:focus .list-group-item-heading > .small {
color: inherit;
}
.list-group-item.active .list-group-item-text,
.list-group-item.active:hover .list-group-item-text,
.list-group-item.active:focus .list-group-item-text {
color: #f9decc;
}
.list-group-item-success {
color: #ebebeb;
background-color: #5cb85c;
}
a.list-group-item-success {
color: #ebebeb;
}
a.list-group-item-success .list-group-item-heading {
color: inherit;
}
a.list-group-item-success:hover,
a.list-group-item-success:focus {
color: #ebebeb;
background-color: #4cae4c;
}
a.list-group-item-success.active,
a.list-group-item-success.active:hover,
a.list-group-item-success.active:focus {
color: #fff;
background-color: #ebebeb;
border-color: #ebebeb;
}
.list-group-item-info {
color: #ebebeb;
background-color: #5bc0de;
}
a.list-group-item-info {
color: #ebebeb;
}
a.list-group-item-info .list-group-item-heading {
color: inherit;
}
a.list-group-item-info:hover,
a.list-group-item-info:focus {
color: #ebebeb;
background-color: #46b8da;
}
a.list-group-item-info.active,
a.list-group-item-info.active:hover,
a.list-group-item-info.active:focus {
color: #fff;
background-color: #ebebeb;
border-color: #ebebeb;
}
.list-group-item-warning {
color: #ebebeb;
background-color: #f0ad4e;
}
a.list-group-item-warning {
color: #ebebeb;
}
a.list-group-item-warning .list-group-item-heading {
color: inherit;
}
a.list-group-item-warning:hover,
a.list-group-item-warning:focus {
color: #ebebeb;
background-color: #eea236;
}
a.list-group-item-warning.active,
a.list-group-item-warning.active:hover,
a.list-group-item-warning.active:focus {
color: #fff;
background-color: #ebebeb;
border-color: #ebebeb;
}
.list-group-item-danger {
color: #ebebeb;
background-color: #d9534f;
}
a.list-group-item-danger {
color: #ebebeb;
}
a.list-group-item-danger .list-group-item-heading {
color: inherit;
}
a.list-group-item-danger:hover,
a.list-group-item-danger:focus {
color: #ebebeb;
background-color: #d43f3a;
}
a.list-group-item-danger.active,
a.list-group-item-danger.active:hover,
a.list-group-item-danger.active:focus {
color: #fff;
background-color: #ebebeb;
border-color: #ebebeb;
}
.list-group-item-heading {
margin-top: 0;
margin-bottom: 5px;
}
.list-group-item-text {
margin-bottom: 0;
line-height: 1.3;
}
.panel {
margin-bottom: 21px;
background-color: #4e5d6c;
border: 1px solid transparent;
border-radius: 0;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}
.panel-body {
padding: 15px;
}
.panel-heading {
padding: 10px 15px;
border-bottom: 1px solid transparent;
border-top-right-radius: -1;
border-top-left-radius: -1;
}
.panel-heading > .dropdown .dropdown-toggle {
color: inherit;
}
.panel-title {
margin-top: 0;
margin-bottom: 0;
font-size: 17px;
color: inherit;
}
.panel-title > a,
.panel-title > small,
.panel-title > .small,
.panel-title > small > a,
.panel-title > .small > a {
color: inherit;
}
.panel-footer {
padding: 10px 15px;
background-color: #485563;
border-top: 1px solid transparent;
border-bottom-right-radius: -1;
border-bottom-left-radius: -1;
}
.panel > .list-group,
.panel > .panel-collapse > .list-group {
margin-bottom: 0;
}
.panel > .list-group .list-group-item,
.panel > .panel-collapse > .list-group .list-group-item {
border-width: 1px 0;
border-radius: 0;
}
.panel > .list-group:first-child .list-group-item:first-child,
.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {
border-top: 0;
border-top-right-radius: -1;
border-top-left-radius: -1;
}
.panel > .list-group:last-child .list-group-item:last-child,
.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {
border-bottom: 0;
border-bottom-right-radius: -1;
border-bottom-left-radius: -1;
}
.panel-heading + .list-group .list-group-item:first-child {
border-top-width: 0;
}
.list-group + .panel-footer {
border-top-width: 0;
}
.panel > .table,
.panel > .table-responsive > .table,
.panel > .panel-collapse > .table {
margin-bottom: 0;
}
.panel > .table caption,
.panel > .table-responsive > .table caption,
.panel > .panel-collapse > .table caption {
padding-left: 15px;
padding-right: 15px;
}
.panel > .table:first-child,
.panel > .table-responsive:first-child > .table:first-child {
border-top-right-radius: -1;
border-top-left-radius: -1;
}
.panel > .table:first-child > thead:first-child > tr:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {
border-top-left-radius: -1;
border-top-right-radius: -1;
}
.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
border-top-left-radius: -1;
}
.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
border-top-right-radius: -1;
}
.panel > .table:last-child,
.panel > .table-responsive:last-child > .table:last-child {
border-bottom-right-radius: -1;
border-bottom-left-radius: -1;
}
.panel > .table:last-child > tbody:last-child > tr:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {
border-bottom-left-radius: -1;
border-bottom-right-radius: -1;
}
.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
border-bottom-left-radius: -1;
}
.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
border-bottom-right-radius: -1;
}
.panel > .panel-body + .table,
.panel > .panel-body + .table-responsive,
.panel > .table + .panel-body,
.panel > .table-responsive + .panel-body {
border-top: 1px solid #4e5d6c;
}
.panel > .table > tbody:first-child > tr:first-child th,
.panel > .table > tbody:first-child > tr:first-child td {
border-top: 0;
}
.panel > .table-bordered,
.panel > .table-responsive > .table-bordered {
border: 0;
}
.panel > .table-bordered > thead > tr > th:first-child,
.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
.panel > .table-bordered > tbody > tr > th:first-child,
.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
.panel > .table-bordered > tfoot > tr > th:first-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
.panel > .table-bordered > thead > tr > td:first-child,
.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
.panel > .table-bordered > tbody > tr > td:first-child,
.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
.panel > .table-bordered > tfoot > tr > td:first-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
border-left: 0;
}
.panel > .table-bordered > thead > tr > th:last-child,
.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
.panel > .table-bordered > tbody > tr > th:last-child,
.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
.panel > .table-bordered > tfoot > tr > th:last-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
.panel > .table-bordered > thead > tr > td:last-child,
.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
.panel > .table-bordered > tbody > tr > td:last-child,
.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
.panel > .table-bordered > tfoot > tr > td:last-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
border-right: 0;
}
.panel > .table-bordered > thead > tr:first-child > td,
.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
.panel > .table-bordered > tbody > tr:first-child > td,
.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
.panel > .table-bordered > thead > tr:first-child > th,
.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
.panel > .table-bordered > tbody > tr:first-child > th,
.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
border-bottom: 0;
}
.panel > .table-bordered > tbody > tr:last-child > td,
.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
.panel > .table-bordered > tfoot > tr:last-child > td,
.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
.panel > .table-bordered > tbody > tr:last-child > th,
.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
.panel > .table-bordered > tfoot > tr:last-child > th,
.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
border-bottom: 0;
}
.panel > .table-responsive {
border: 0;
margin-bottom: 0;
}
.panel-group {
margin-bottom: 21px;
}
.panel-group .panel {
margin-bottom: 0;
border-radius: 0;
}
.panel-group .panel + .panel {
margin-top: 5px;
}
.panel-group .panel-heading {
border-bottom: 0;
}
.panel-group .panel-heading + .panel-collapse > .panel-body,
.panel-group .panel-heading + .panel-collapse > .list-group {
border-top: 1px solid transparent;
}
.panel-group .panel-footer {
border-top: 0;
}
.panel-group .panel-footer + .panel-collapse .panel-body {
border-bottom: 1px solid transparent;
}
.panel-default {
border-color: transparent;
}
.panel-default > .panel-heading {
color: #333333;
background-color: #f5f5f5;
border-color: transparent;
}
.panel-default > .panel-heading + .panel-collapse > .panel-body {
border-top-color: transparent;
}
.panel-default > .panel-heading .badge {
color: #f5f5f5;
background-color: #333333;
}
.panel-default > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: transparent;
}
.panel-primary {
border-color: transparent;
}
.panel-primary > .panel-heading {
color: #ffffff;
background-color: #F59C61;
border-color: transparent;
}
.panel-primary > .panel-heading + .panel-collapse > .panel-body {
border-top-color: transparent;
}
.panel-primary > .panel-heading .badge {
color: #F59C61;
background-color: #ffffff;
}
.panel-primary > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: transparent;
}
.panel-success {
border-color: transparent;
}
.panel-success > .panel-heading {
color: #ebebeb;
background-color: #5cb85c;
border-color: transparent;
}
.panel-success > .panel-heading + .panel-collapse > .panel-body {
border-top-color: transparent;
}
.panel-success > .panel-heading .badge {
color: #5cb85c;
background-color: #ebebeb;
}
.panel-success > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: transparent;
}
.panel-info {
border-color: transparent;
}
.panel-info > .panel-heading {
color: #ebebeb;
background-color: #5bc0de;
border-color: transparent;
}
.panel-info > .panel-heading + .panel-collapse > .panel-body {
border-top-color: transparent;
}
.panel-info > .panel-heading .badge {
color: #5bc0de;
background-color: #ebebeb;
}
.panel-info > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: transparent;
}
.panel-warning {
border-color: transparent;
}
.panel-warning > .panel-heading {
color: #ebebeb;
background-color: #f0ad4e;
border-color: transparent;
}
.panel-warning > .panel-heading + .panel-collapse > .panel-body {
border-top-color: transparent;
}
.panel-warning > .panel-heading .badge {
color: #f0ad4e;
background-color: #ebebeb;
}
.panel-warning > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: transparent;
}
.panel-danger {
border-color: transparent;
}
.panel-danger > .panel-heading {
color: #ebebeb;
background-color: #d9534f;
border-color: transparent;
}
.panel-danger > .panel-heading + .panel-collapse > .panel-body {
border-top-color: transparent;
}
.panel-danger > .panel-heading .badge {
color: #d9534f;
background-color: #ebebeb;
}
.panel-danger > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: transparent;
}
.embed-responsive {
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;
}
.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
position: absolute;
top: 0;
left: 0;
bottom: 0;
height: 100%;
width: 100%;
border: 0;
}
.embed-responsive.embed-responsive-16by9 {
padding-bottom: 56.25%;
}
.embed-responsive.embed-responsive-4by3 {
padding-bottom: 75%;
}
.well {
min-height: 20px;
padding: 19px;
margin-bottom: 20px;
background-color: #4e5d6c;
border: 1px solid transparent;
border-radius: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}
.well blockquote {
border-color: #ddd;
border-color: rgba(0, 0, 0, 0.15);
}
.well-lg {
padding: 24px;
border-radius: 0;
}
.well-sm {
padding: 9px;
border-radius: 0;
}
.close {
float: right;
font-size: 22.5px;
font-weight: bold;
line-height: 1;
color: #ebebeb;
text-shadow: none;
opacity: 0.2;
filter: alpha(opacity=20);
}
.close:hover,
.close:focus {
color: #ebebeb;
text-decoration: none;
cursor: pointer;
opacity: 0.5;
filter: alpha(opacity=50);
}
button.close {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}
.modal-open {
overflow: hidden;
}
.modal {
display: none;
overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
-webkit-overflow-scrolling: touch;
outline: 0;
}
.modal.fade .modal-dialog {
-webkit-transform: translate(0, -25%);
-ms-transform: translate(0, -25%);
-o-transform: translate(0, -25%);
transform: translate(0, -25%);
-webkit-transition: -webkit-transform 0.3s ease-out;
-o-transition: -o-transform 0.3s ease-out;
transition: transform 0.3s ease-out;
}
.modal.in .modal-dialog {
-webkit-transform: translate(0, 0);
-ms-transform: translate(0, 0);
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
.modal-dialog {
position: relative;
width: auto;
margin: 10px;
}
.modal-content {
position: relative;
background-color: #4e5d6c;
border: 1px solid transparent;
border-radius: 0;
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
-webkit-background-clip: padding-box;
background-clip: padding-box;
outline: 0;
}
.modal-backdrop {
position: absolute;
top: 0;
right: 0;
left: 0;
background-color: #000000;
}
.modal-backdrop.fade {
opacity: 0;
filter: alpha(opacity=0);
}
.modal-backdrop.in {
opacity: 0.5;
filter: alpha(opacity=50);
}
.modal-header {
padding: 15px;
border-bottom: 1px solid #2b3e50;
min-height: 16.42857143px;
}
.modal-header .close {
margin-top: -2px;
}
.modal-title {
margin: 0;
line-height: 1.42857143;
}
.modal-body {
position: relative;
padding: 20px;
}
.modal-footer {
padding: 20px;
text-align: right;
border-top: 1px solid #2b3e50;
}
.modal-footer .btn + .btn {
margin-left: 5px;
margin-bottom: 0;
}
.modal-footer .btn-group .btn + .btn {
margin-left: -1px;
}
.modal-footer .btn-block + .btn-block {
margin-left: 0;
}
.modal-scrollbar-measure {
position: absolute;
top: -9999px;
width: 50px;
height: 50px;
overflow: scroll;
}
@media (min-width: 768px) {
.modal-dialog {
width: 600px;
margin: 30px auto;
}
.modal-content {
-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
.modal-sm {
width: 300px;
}
}
@media (min-width: 992px) {
.modal-lg {
width: 900px;
}
}
.tooltip {
position: absolute;
z-index: 1070;
display: block;
visibility: visible;
font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
font-weight: normal;
line-height: 1.4;
opacity: 0;
filter: alpha(opacity=0);
}
.tooltip.in {
opacity: 0.9;
filter: alpha(opacity=90);
}
.tooltip.top {
margin-top: -3px;
padding: 5px 0;
}
.tooltip.right {
margin-left: 3px;
padding: 0 5px;
}
.tooltip.bottom {
margin-top: 3px;
padding: 5px 0;
}
.tooltip.left {
margin-left: -3px;
padding: 0 5px;
}
.tooltip-inner {
max-width: 200px;
padding: 3px 8px;
color: #ffffff;
text-align: center;
text-decoration: none;
background-color: #000000;
border-radius: 0;
}
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.tooltip.top .tooltip-arrow {
bottom: 0;
left: 50%;
margin-left: -5px;
border-width: 5px 5px 0;
border-top-color: #000000;
}
.tooltip.top-left .tooltip-arrow {
bottom: 0;
right: 5px;
margin-bottom: -5px;
border-width: 5px 5px 0;
border-top-color: #000000;
}
.tooltip.top-right .tooltip-arrow {
bottom: 0;
left: 5px;
margin-bottom: -5px;
border-width: 5px 5px 0;
border-top-color: #000000;
}
.tooltip.right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -5px;
border-width: 5px 5px 5px 0;
border-right-color: #000000;
}
.tooltip.left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -5px;
border-width: 5px 0 5px 5px;
border-left-color: #000000;
}
.tooltip.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000000;
}
.tooltip.bottom-left .tooltip-arrow {
top: 0;
right: 5px;
margin-top: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000000;
}
.tooltip.bottom-right .tooltip-arrow {
top: 0;
left: 5px;
margin-top: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000000;
}
.popover {
position: absolute;
top: 0;
left: 0;
z-index: 1060;
display: none;
max-width: 276px;
padding: 1px;
font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 15px;
font-weight: normal;
line-height: 1.42857143;
text-align: left;
background-color: #4e5d6c;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 1px solid transparent;
border-radius: 0;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
white-space: normal;
}
.popover.top {
margin-top: -10px;
}
.popover.right {
margin-left: 10px;
}
.popover.bottom {
margin-top: 10px;
}
.popover.left {
margin-left: -10px;
}
.popover-title {
margin: 0;
padding: 8px 14px;
font-size: 15px;
background-color: #485563;
border-bottom: 1px solid #3d4954;
border-radius: -1 -1 0 0;
}
.popover-content {
padding: 9px 14px;
}
.popover > .arrow,
.popover > .arrow:after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.popover > .arrow {
border-width: 11px;
}
.popover > .arrow:after {
border-width: 10px;
content: "";
}
.popover.top > .arrow {
left: 50%;
margin-left: -11px;
border-bottom-width: 0;
border-top-color: transparent;
bottom: -11px;
}
.popover.top > .arrow:after {
content: " ";
bottom: 1px;
margin-left: -10px;
border-bottom-width: 0;
border-top-color: #4e5d6c;
}
.popover.right > .arrow {
top: 50%;
left: -11px;
margin-top: -11px;
border-left-width: 0;
border-right-color: transparent;
}
.popover.right > .arrow:after {
content: " ";
left: 1px;
bottom: -10px;
border-left-width: 0;
border-right-color: #4e5d6c;
}
.popover.bottom > .arrow {
left: 50%;
margin-left: -11px;
border-top-width: 0;
border-bottom-color: transparent;
top: -11px;
}
.popover.bottom > .arrow:after {
content: " ";
top: 1px;
margin-left: -10px;
border-top-width: 0;
border-bottom-color: #4e5d6c;
}
.popover.left > .arrow {
top: 50%;
right: -11px;
margin-top: -11px;
border-right-width: 0;
border-left-color: transparent;
}
.popover.left > .arrow:after {
content: " ";
right: 1px;
border-right-width: 0;
border-left-color: #4e5d6c;
bottom: -10px;
}
.carousel {
position: relative;
}
.carousel-inner {
position: relative;
overflow: hidden;
width: 100%;
}
.carousel-inner > .item {
display: none;
position: relative;
-webkit-transition: 0.6s ease-in-out left;
-o-transition: 0.6s ease-in-out left;
transition: 0.6s ease-in-out left;
}
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
line-height: 1;
}
@media all and (transform-3d), (-webkit-transform-3d) {
.carousel-inner > .item {
-webkit-transition: -webkit-transform 0.6s ease-in-out;
-o-transition: -o-transform 0.6s ease-in-out;
transition: transform 0.6s ease-in-out;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-perspective: 1000;
perspective: 1000;
}
.carousel-inner > .item.next,
.carousel-inner > .item.active.right {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
left: 0;
}
.carousel-inner > .item.prev,
.carousel-inner > .item.active.left {
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
left: 0;
}
.carousel-inner > .item.next.left,
.carousel-inner > .item.prev.right,
.carousel-inner > .item.active {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
left: 0;
}
}
.carousel-inner > .active,
.carousel-inner > .next,
.carousel-inner > .prev {
display: block;
}
.carousel-inner > .active {
left: 0;
}
.carousel-inner > .next,
.carousel-inner > .prev {
position: absolute;
top: 0;
width: 100%;
}
.carousel-inner > .next {
left: 100%;
}
.carousel-inner > .prev {
left: -100%;
}
.carousel-inner > .next.left,
.carousel-inner > .prev.right {
left: 0;
}
.carousel-inner > .active.left {
left: -100%;
}
.carousel-inner > .active.right {
left: 100%;
}
.carousel-control {
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 15%;
opacity: 0.5;
filter: alpha(opacity=50);
font-size: 20px;
color: #ffffff;
text-align: center;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.carousel-control.left {
background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.0001)));
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
}
.carousel-control.right {
left: auto;
right: 0;
background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, 0.0001)), to(rgba(0, 0, 0, 0.5)));
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
}
.carousel-control:hover,
.carousel-control:focus {
outline: 0;
color: #ffffff;
text-decoration: none;
opacity: 0.9;
filter: alpha(opacity=90);
}
.carousel-control .icon-prev,
.carousel-control .icon-next,
.carousel-control .glyphicon-chevron-left,
.carousel-control .glyphicon-chevron-right {
position: absolute;
top: 50%;
z-index: 5;
display: inline-block;
}
.carousel-control .icon-prev,
.carousel-control .glyphicon-chevron-left {
left: 50%;
margin-left: -10px;
}
.carousel-control .icon-next,
.carousel-control .glyphicon-chevron-right {
right: 50%;
margin-right: -10px;
}
.carousel-control .icon-prev,
.carousel-control .icon-next {
width: 20px;
height: 20px;
margin-top: -10px;
line-height: 1;
font-family: serif;
}
.carousel-control .icon-prev:before {
content: '\2039';
}
.carousel-control .icon-next:before {
content: '\203a';
}
.carousel-indicators {
position: absolute;
bottom: 10px;
left: 50%;
z-index: 15;
width: 60%;
margin-left: -30%;
padding-left: 0;
list-style: none;
text-align: center;
}
.carousel-indicators li {
display: inline-block;
width: 10px;
height: 10px;
margin: 1px;
text-indent: -999px;
border: 1px solid #ffffff;
border-radius: 10px;
cursor: pointer;
background-color: #000 \9;
background-color: rgba(0, 0, 0, 0);
}
.carousel-indicators .active {
margin: 0;
width: 12px;
height: 12px;
background-color: #ffffff;
}
.carousel-caption {
position: absolute;
left: 15%;
right: 15%;
bottom: 20px;
z-index: 10;
padding-top: 20px;
padding-bottom: 20px;
color: #ffffff;
text-align: center;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.carousel-caption .btn {
text-shadow: none;
}
@media screen and (min-width: 768px) {
.carousel-control .glyphicon-chevron-left,
.carousel-control .glyphicon-chevron-right,
.carousel-control .icon-prev,
.carousel-control .icon-next {
width: 30px;
height: 30px;
margin-top: -15px;
font-size: 30px;
}
.carousel-control .glyphicon-chevron-left,
.carousel-control .icon-prev {
margin-left: -15px;
}
.carousel-control .glyphicon-chevron-right,
.carousel-control .icon-next {
margin-right: -15px;
}
.carousel-caption {
left: 20%;
right: 20%;
padding-bottom: 30px;
}
.carousel-indicators {
bottom: 20px;
}
}
.clearfix:before,
.clearfix:after,
.dl-horizontal dd:before,
.dl-horizontal dd:after,
.container:before,
.container:after,
.container-fluid:before,
.container-fluid:after,
.row:before,
.row:after,
.form-horizontal .form-group:before,
.form-horizontal .form-group:after,
.btn-toolbar:before,
.btn-toolbar:after,
.btn-group-vertical > .btn-group:before,
.btn-group-vertical > .btn-group:after,
.nav:before,
.nav:after,
.navbar:before,
.navbar:after,
.navbar-header:before,
.navbar-header:after,
.navbar-collapse:before,
.navbar-collapse:after,
.pager:before,
.pager:after,
.panel-body:before,
.panel-body:after,
.modal-footer:before,
.modal-footer:after {
content: " ";
display: table;
}
.clearfix:after,
.dl-horizontal dd:after,
.container:after,
.container-fluid:after,
.row:after,
.form-horizontal .form-group:after,
.btn-toolbar:after,
.btn-group-vertical > .btn-group:after,
.nav:after,
.navbar:after,
.navbar-header:after,
.navbar-collapse:after,
.pager:after,
.panel-body:after,
.modal-footer:after {
clear: both;
}
.center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
.pull-right {
float: right !important;
}
.pull-left {
float: left !important;
}
.hide {
display: none !important;
}
.show {
display: block !important;
}
.invisible {
visibility: hidden;
}
.text-hide {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
.hidden {
display: none !important;
visibility: hidden !important;
}
.affix {
position: fixed;
}
@-ms-viewport {
width: device-width;
}
.visible-xs,
.visible-sm,
.visible-md,
.visible-lg {
display: none !important;
}
.visible-xs-block,
.visible-xs-inline,
.visible-xs-inline-block,
.visible-sm-block,
.visible-sm-inline,
.visible-sm-inline-block,
.visible-md-block,
.visible-md-inline,
.visible-md-inline-block,
.visible-lg-block,
.visible-lg-inline,
.visible-lg-inline-block {
display: none !important;
}
@media (max-width: 767px) {
.visible-xs {
display: block !important;
}
table.visible-xs {
display: table;
}
tr.visible-xs {
display: table-row !important;
}
th.visible-xs,
td.visible-xs {
display: table-cell !important;
}
}
@media (max-width: 767px) {
.visible-xs-block {
display: block !important;
}
}
@media (max-width: 767px) {
.visible-xs-inline {
display: inline !important;
}
}
@media (max-width: 767px) {
.visible-xs-inline-block {
display: inline-block !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm {
display: block !important;
}
table.visible-sm {
display: table;
}
tr.visible-sm {
display: table-row !important;
}
th.visible-sm,
td.visible-sm {
display: table-cell !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-block {
display: block !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-inline {
display: inline !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-inline-block {
display: inline-block !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md {
display: block !important;
}
table.visible-md {
display: table;
}
tr.visible-md {
display: table-row !important;
}
th.visible-md,
td.visible-md {
display: table-cell !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-block {
display: block !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-inline {
display: inline !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-inline-block {
display: inline-block !important;
}
}
@media (min-width: 1200px) {
.visible-lg {
display: block !important;
}
table.visible-lg {
display: table;
}
tr.visible-lg {
display: table-row !important;
}
th.visible-lg,
td.visible-lg {
display: table-cell !important;
}
}
@media (min-width: 1200px) {
.visible-lg-block {
display: block !important;
}
}
@media (min-width: 1200px) {
.visible-lg-inline {
display: inline !important;
}
}
@media (min-width: 1200px) {
.visible-lg-inline-block {
display: inline-block !important;
}
}
@media (max-width: 767px) {
.hidden-xs {
display: none !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.hidden-sm {
display: none !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.hidden-md {
display: none !important;
}
}
@media (min-width: 1200px) {
.hidden-lg {
display: none !important;
}
}
.visible-print {
display: none !important;
}
@media print {
.visible-print {
display: block !important;
}
table.visible-print {
display: table;
}
tr.visible-print {
display: table-row !important;
}
th.visible-print,
td.visible-print {
display: table-cell !important;
}
}
.visible-print-block {
display: none !important;
}
@media print {
.visible-print-block {
display: block !important;
}
}
.visible-print-inline {
display: none !important;
}
@media print {
.visible-print-inline {
display: inline !important;
}
}
.visible-print-inline-block {
display: none !important;
}
@media print {
.visible-print-inline-block {
display: inline-block !important;
}
}
@media print {
.hidden-print {
display: none !important;
}
}
.navbar {
-webkit-box-shadow: none;
box-shadow: none;
border: none;
font-size: 12px;
}
.navbar-default .badge {
background-color: #fff;
color: #4e5d6c;
}
.navbar-inverse .badge {
background-color: #fff;
color: #F59C61;
}
.btn {
font-weight: 300;
}
.btn-default:hover {
background-color: #485563;
}
.btn-sm,
.btn-xs {
font-size: 12px;
}
body {
font-weight: 300;
}
.text-primary,
.text-primary:hover {
color: #F59C61;
}
.text-success,
.text-success:hover {
color: #5cb85c;
}
.text-danger,
.text-danger:hover {
color: #d9534f;
}
.text-warning,
.text-warning:hover {
color: #f0ad4e;
}
.text-info,
.text-info:hover {
color: #5bc0de;
}
.page-header {
border-bottom-color: #4e5d6c;
}
.dropdown-menu {
border: none;
margin: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.dropdown-menu > li > a {
font-size: 12px;
font-weight: 300;
}
.btn-group.open .dropdown-toggle {
-webkit-box-shadow: none;
box-shadow: none;
}
.dropdown-header {
font-size: 12px;
}
table,
.table {
font-size: 12px;
}
table a:not(.btn),
.table a:not(.btn) {
color: #fff;
text-decoration: underline;
}
table .dropdown-menu a,
.table .dropdown-menu a {
text-decoration: none;
}
table .text-muted,
.table .text-muted {
color: #4e5d6c;
}
table > thead > tr > th,
.table > thead > tr > th,
table > tbody > tr > th,
.table > tbody > tr > th,
table > tfoot > tr > th,
.table > tfoot > tr > th,
table > thead > tr > td,
.table > thead > tr > td,
table > tbody > tr > td,
.table > tbody > tr > td,
table > tfoot > tr > td,
.table > tfoot > tr > td {
border-color: transparent;
}
input,
textarea {
color: #2b3e50;
}
label,
.radio label,
.checkbox label,
.help-block {
font-size: 12px;
font-weight: 300;
}
.input-addon,
.input-group-addon {
color: #ebebeb;
}
.has-warning .help-block,
.has-warning .control-label,
.has-warning .form-control-feedback {
color: #f0ad4e;
}
.has-warning .input-group-addon {
border: none;
}
.has-error .help-block,
.has-error .control-label,
.has-error .form-control-feedback {
color: #d9534f;
}
.has-error .input-group-addon {
border: none;
}
.has-success .help-block,
.has-success .control-label,
.has-success .form-control-feedback {
color: #5cb85c;
}
.has-success .input-group-addon {
border: none;
}
.form-control:focus {
-webkit-box-shadow: none;
box-shadow: none;
}
.has-warning .form-control:focus,
.has-error .form-control:focus,
.has-success .form-control:focus {
-webkit-box-shadow: none;
box-shadow: none;
}
.nav .open > a,
.nav .open > a:hover,
.nav .open > a:focus {
border-color: transparent;
}
.nav-tabs > li > a {
color: #ebebeb;
}
.nav-pills > li > a {
color: #ebebeb;
}
.pager a {
color: #ebebeb;
}
.label {
font-weight: 300;
}
.alert {
color: #fff;
}
.alert a,
.alert .alert-link {
color: #fff;
}
.close {
opacity: 0.4;
}
.close:hover,
.close:focus {
opacity: 1;
}
.well {
-webkit-box-shadow: none;
box-shadow: none;
}
a.list-group-item.active,
a.list-group-item.active:hover,
a.list-group-item.active:focus {
border: none;
}
a.list-group-item-success.active {
background-color: #5cb85c;
}
a.list-group-item-success.active:hover,
a.list-group-item-success.active:focus {
background-color: #4cae4c;
}
a.list-group-item-warning.active {
background-color: #f0ad4e;
}
a.list-group-item-warning.active:hover,
a.list-group-item-warning.active:focus {
background-color: #eea236;
}
a.list-group-item-danger.active {
background-color: #d9534f;
}
a.list-group-item-danger.active:hover,
a.list-group-item-danger.active:focus {
background-color: #d43f3a;
}
.panel {
border: none;
}
.panel-default > .panel-heading {
background-color: #485563;
color: #ebebeb;
}
.thumbnail {
background-color: #4e5d6c;
border: none;
}
.modal {
padding: 0;
}
.modal-header,
.modal-footer {
background-color: #485563;
border: none;
border-radius: 0;
}
.popover-title {
border: none;
}
|
mit
|
cljsinfo/cljs-api-docs
|
docfiles/cljs.repl.browser/repl-env.md
|
88
|
---
name: cljs.repl.browser/repl-env
see also:
---
## Summary
## Details
## Examples
|
mit
|
jerowe/bioconda-recipes
|
recipes/bioconductor-simpintlists/post-link.sh
|
1430
|
#!/bin/bash
FN="simpIntLists_1.20.0.tar.gz"
URLS=(
"https://bioconductor.org/packages/3.9/data/experiment/src/contrib/simpIntLists_1.20.0.tar.gz"
"https://bioarchive.galaxyproject.org/simpIntLists_1.20.0.tar.gz"
"https://depot.galaxyproject.org/software/bioconductor-simpintlists/bioconductor-simpintlists_1.20.0_src_all.tar.gz"
"https://depot.galaxyproject.org/software/bioconductor-simpintlists/bioconductor-simpintlists_1.20.0_src_all.tar.gz"
)
MD5="27879fea1d9ddd0404829b7de8eaae77"
# Use a staging area in the conda dir rather than temp dirs, both to avoid
# permission issues as well as to have things downloaded in a predictable
# manner.
STAGING=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM
mkdir -p $STAGING
TARBALL=$STAGING/$FN
SUCCESS=0
for URL in ${URLS[@]}; do
curl $URL > $TARBALL
[[ $? == 0 ]] || continue
# Platform-specific md5sum checks.
if [[ $(uname -s) == "Linux" ]]; then
if md5sum -c <<<"$MD5 $TARBALL"; then
SUCCESS=1
break
fi
else if [[ $(uname -s) == "Darwin" ]]; then
if [[ $(md5 $TARBALL | cut -f4 -d " ") == "$MD5" ]]; then
SUCCESS=1
break
fi
fi
fi
done
if [[ $SUCCESS != 1 ]]; then
echo "ERROR: post-link.sh was unable to download any of the following URLs with the md5sum $MD5:"
printf '%s\n' "${URLS[@]}"
exit 1
fi
# Install and clean up
R CMD INSTALL --library=$PREFIX/lib/R/library $TARBALL
rm $TARBALL
rmdir $STAGING
|
mit
|
cdnjs/cdnjs
|
ajax/libs/primereact/6.5.1/multiselect/multiselect.js
|
72104
|
this.primereact = this.primereact || {};
this.primereact.multiselect = (function (exports, React, core, inputtext, virtualscroller, PrimeReact) {
'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
var PrimeReact__default = /*#__PURE__*/_interopDefaultLegacy(PrimeReact);
function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function _arrayLikeToArray$1(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) {
arr2[i] = arr[i];
}
return arr2;
}
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
}
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _unsupportedIterableToArray$1(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
if (superClass) _setPrototypeOf(subClass, superClass);
}
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 _possibleConstructorReturn(self, call) {
if (call && (_typeof(call) === "object" || typeof call === "function")) {
return call;
}
return _assertThisInitialized(self);
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys$2(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
function _objectSpread$2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$2(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$2(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _createSuper$4(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$4(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct$4() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
var Checkbox = /*#__PURE__*/function (_Component) {
_inherits(Checkbox, _Component);
var _super = _createSuper$4(Checkbox);
function Checkbox(props) {
var _this;
_classCallCheck(this, Checkbox);
_this = _super.call(this, props);
_this.state = {
focused: false
};
_this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
_this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this));
_this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));
_this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));
_this.inputRef = /*#__PURE__*/React.createRef(_this.props.inputRef);
return _this;
}
_createClass(Checkbox, [{
key: "onClick",
value: function onClick(e) {
if (!this.props.disabled && !this.props.readOnly && this.props.onChange) {
this.props.onChange({
originalEvent: e,
value: this.props.value,
checked: !this.props.checked,
stopPropagation: function stopPropagation() {},
preventDefault: function preventDefault() {},
target: {
type: 'checkbox',
name: this.props.name,
id: this.props.id,
value: this.props.value,
checked: !this.props.checked
}
});
this.inputRef.current.checked = !this.props.checked;
this.inputRef.current.focus();
e.preventDefault();
}
}
}, {
key: "updateInputRef",
value: function updateInputRef() {
var ref = this.props.inputRef;
if (ref) {
if (typeof ref === 'function') {
ref(this.inputRef.current);
} else {
ref.current = this.inputRef.current;
}
}
}
}, {
key: "componentDidMount",
value: function componentDidMount() {
this.updateInputRef();
if (this.props.tooltip) {
this.renderTooltip();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.tooltip) {
this.tooltip.destroy();
this.tooltip = null;
}
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
this.inputRef.current.checked = this.props.checked;
if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) {
if (this.tooltip) this.tooltip.update(_objectSpread$2({
content: this.props.tooltip
}, this.props.tooltipOptions || {}));else this.renderTooltip();
}
}
}, {
key: "onFocus",
value: function onFocus() {
this.setState({
focused: true
});
}
}, {
key: "onBlur",
value: function onBlur() {
this.setState({
focused: false
});
}
}, {
key: "onKeyDown",
value: function onKeyDown(event) {
if (event.key === 'Enter') {
this.onClick(event);
event.preventDefault();
}
}
}, {
key: "renderTooltip",
value: function renderTooltip() {
this.tooltip = core.tip({
target: this.element,
content: this.props.tooltip,
options: this.props.tooltipOptions
});
}
}, {
key: "render",
value: function render() {
var _this2 = this;
var containerClass = core.classNames('p-checkbox p-component', {
'p-checkbox-checked': this.props.checked,
'p-checkbox-disabled': this.props.disabled,
'p-checkbox-focused': this.state.focused
}, this.props.className);
var boxClass = core.classNames('p-checkbox-box', {
'p-highlight': this.props.checked,
'p-disabled': this.props.disabled,
'p-focus': this.state.focused
});
var iconClass = core.classNames('p-checkbox-icon p-c', _defineProperty({}, this.props.icon, this.props.checked));
return /*#__PURE__*/React__default['default'].createElement("div", {
ref: function ref(el) {
return _this2.element = el;
},
id: this.props.id,
className: containerClass,
style: this.props.style,
onClick: this.onClick,
onContextMenu: this.props.onContextMenu,
onMouseDown: this.props.onMouseDown
}, /*#__PURE__*/React__default['default'].createElement("div", {
className: "p-hidden-accessible"
}, /*#__PURE__*/React__default['default'].createElement("input", {
ref: this.inputRef,
type: "checkbox",
"aria-labelledby": this.props.ariaLabelledBy,
id: this.props.inputId,
name: this.props.name,
tabIndex: this.props.tabIndex,
defaultChecked: this.props.checked,
onKeyDown: this.onKeyDown,
onFocus: this.onFocus,
onBlur: this.onBlur,
disabled: this.props.disabled,
readOnly: this.props.readOnly,
required: this.props.required
})), /*#__PURE__*/React__default['default'].createElement("div", {
className: boxClass,
ref: function ref(el) {
return _this2.box = el;
},
role: "checkbox",
"aria-checked": this.props.checked
}, /*#__PURE__*/React__default['default'].createElement("span", {
className: iconClass
})));
}
}]);
return Checkbox;
}(React.Component);
_defineProperty(Checkbox, "defaultProps", {
id: null,
inputRef: null,
inputId: null,
value: null,
name: null,
checked: false,
style: null,
className: null,
disabled: false,
required: false,
readOnly: false,
tabIndex: null,
icon: 'pi pi-check',
tooltip: null,
tooltipOptions: null,
ariaLabelledBy: null,
onChange: null,
onMouseDown: null,
onContextMenu: null
});
function _createSuper$3(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$3(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct$3() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
var MultiSelectHeader = /*#__PURE__*/function (_Component) {
_inherits(MultiSelectHeader, _Component);
var _super = _createSuper$3(MultiSelectHeader);
function MultiSelectHeader(props) {
var _this;
_classCallCheck(this, MultiSelectHeader);
_this = _super.call(this, props);
_this.onFilter = _this.onFilter.bind(_assertThisInitialized(_this));
_this.onSelectAll = _this.onSelectAll.bind(_assertThisInitialized(_this));
return _this;
}
_createClass(MultiSelectHeader, [{
key: "onFilter",
value: function onFilter(event) {
if (this.props.onFilter) {
this.props.onFilter({
originalEvent: event,
query: event.target.value
});
}
}
}, {
key: "onSelectAll",
value: function onSelectAll(event) {
if (this.props.onSelectAll) {
this.props.onSelectAll({
originalEvent: event,
checked: this.props.selectAll
});
}
}
}, {
key: "renderFilterElement",
value: function renderFilterElement() {
if (this.props.filter) {
return /*#__PURE__*/React__default['default'].createElement("div", {
className: "p-multiselect-filter-container"
}, /*#__PURE__*/React__default['default'].createElement(inputtext.InputText, {
type: "text",
role: "textbox",
value: this.props.filterValue,
onChange: this.onFilter,
className: "p-multiselect-filter",
placeholder: this.props.filterPlaceholder
}), /*#__PURE__*/React__default['default'].createElement("span", {
className: "p-multiselect-filter-icon pi pi-search"
}));
}
return null;
}
}, {
key: "render",
value: function render() {
var filterElement = this.renderFilterElement();
var checkboxElement = this.props.showSelectAll && /*#__PURE__*/React__default['default'].createElement(Checkbox, {
checked: this.props.selectAll,
onChange: this.onSelectAll,
role: "checkbox",
"aria-checked": this.props.selectAll
});
var closeElement = /*#__PURE__*/React__default['default'].createElement("button", {
type: "button",
className: "p-multiselect-close p-link",
onClick: this.props.onClose
}, /*#__PURE__*/React__default['default'].createElement("span", {
className: "p-multiselect-close-icon pi pi-times"
}), /*#__PURE__*/React__default['default'].createElement(core.Ripple, null));
var element = /*#__PURE__*/React__default['default'].createElement("div", {
className: "p-multiselect-header"
}, checkboxElement, filterElement, closeElement);
if (this.props.template) {
var defaultOptions = {
className: 'p-multiselect-header',
checkboxElement: checkboxElement,
checked: this.props.selectAll,
onChange: this.onSelectAll,
filterElement: filterElement,
closeElement: closeElement,
closeElementClassName: 'p-multiselect-close p-link',
closeIconClassName: 'p-multiselect-close-icon pi pi-times',
onCloseClick: this.props.onClose,
element: element,
props: this.props
};
return core.ObjectUtils.getJSXElement(this.props.template, defaultOptions);
}
return element;
}
}]);
return MultiSelectHeader;
}(React.Component);
function _createSuper$2(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$2(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct$2() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
var MultiSelectItem = /*#__PURE__*/function (_Component) {
_inherits(MultiSelectItem, _Component);
var _super = _createSuper$2(MultiSelectItem);
function MultiSelectItem(props) {
var _this;
_classCallCheck(this, MultiSelectItem);
_this = _super.call(this, props);
_this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
_this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));
return _this;
}
_createClass(MultiSelectItem, [{
key: "onClick",
value: function onClick(event) {
if (this.props.onClick) {
this.props.onClick({
originalEvent: event,
option: this.props.option
});
}
event.preventDefault();
}
}, {
key: "onKeyDown",
value: function onKeyDown(event) {
if (this.props.onKeyDown) {
this.props.onKeyDown({
originalEvent: event,
option: this.props.option
});
}
}
}, {
key: "render",
value: function render() {
var className = core.classNames('p-multiselect-item', {
'p-highlight': this.props.selected,
'p-disabled': this.props.disabled
}, this.props.option.className);
var checkboxClassName = core.classNames('p-checkbox-box', {
'p-highlight': this.props.selected
});
var checkboxIcon = core.classNames('p-checkbox-icon p-c', {
'pi pi-check': this.props.selected
});
var content = this.props.template ? core.ObjectUtils.getJSXElement(this.props.template, this.props.option) : this.props.label;
var tabIndex = this.props.disabled ? null : this.props.tabIndex || 0;
return /*#__PURE__*/React__default['default'].createElement("li", {
className: className,
onClick: this.onClick,
tabIndex: tabIndex,
onKeyDown: this.onKeyDown,
role: "option",
"aria-selected": this.props.selected
}, /*#__PURE__*/React__default['default'].createElement("div", {
className: "p-checkbox p-component"
}, /*#__PURE__*/React__default['default'].createElement("div", {
className: checkboxClassName
}, /*#__PURE__*/React__default['default'].createElement("span", {
className: checkboxIcon
}))), /*#__PURE__*/React__default['default'].createElement("span", null, content), /*#__PURE__*/React__default['default'].createElement(core.Ripple, null));
}
}]);
return MultiSelectItem;
}(React.Component);
_defineProperty(MultiSelectItem, "defaultProps", {
option: null,
label: null,
selected: false,
disabled: false,
tabIndex: null,
template: null,
onClick: null,
onKeyDown: null
});
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$1(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _createSuper$1(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct$1(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
var MultiSelectPanelComponent = /*#__PURE__*/function (_Component) {
_inherits(MultiSelectPanelComponent, _Component);
var _super = _createSuper$1(MultiSelectPanelComponent);
function MultiSelectPanelComponent(props) {
var _this;
_classCallCheck(this, MultiSelectPanelComponent);
_this = _super.call(this, props);
_this.onEnter = _this.onEnter.bind(_assertThisInitialized(_this));
_this.onFilterInputChange = _this.onFilterInputChange.bind(_assertThisInitialized(_this));
return _this;
}
_createClass(MultiSelectPanelComponent, [{
key: "onEnter",
value: function onEnter() {
var _this2 = this;
this.props.onEnter(function () {
if (_this2.virtualScrollerRef) {
var selectedIndex = _this2.props.getSelectedOptionIndex();
if (selectedIndex !== -1) {
_this2.virtualScrollerRef.scrollToIndex(selectedIndex);
}
}
});
}
}, {
key: "onFilterInputChange",
value: function onFilterInputChange(event) {
if (this.virtualScrollerRef) {
this.virtualScrollerRef.scrollToIndex(0);
}
this.props.onFilterInputChange && this.props.onFilterInputChange(event);
}
}, {
key: "isEmptyFilter",
value: function isEmptyFilter() {
return !(this.props.visibleOptions && this.props.visibleOptions.length) && this.props.hasFilter();
}
}, {
key: "renderHeader",
value: function renderHeader() {
return /*#__PURE__*/React__default['default'].createElement(MultiSelectHeader, {
filter: this.props.filter,
filterValue: this.props.filterValue,
onFilter: this.onFilterInputChange,
filterPlaceholder: this.props.filterPlaceholder,
onClose: this.props.onCloseClick,
showSelectAll: this.props.showSelectAll,
selectAll: this.props.isAllSelected(),
onSelectAll: this.props.onSelectAll,
template: this.props.panelHeaderTemplate
});
}
}, {
key: "renderFooter",
value: function renderFooter() {
if (this.props.panelFooterTemplate) {
var content = core.ObjectUtils.getJSXElement(this.props.panelFooterTemplate, this.props, this.props.onOverlayHide);
return /*#__PURE__*/React__default['default'].createElement("div", {
className: "p-multiselect-footer"
}, content);
}
return null;
}
}, {
key: "renderGroupChildren",
value: function renderGroupChildren(optionGroup) {
var _this3 = this;
var groupChildren = this.props.getOptionGroupChildren(optionGroup);
return groupChildren.map(function (option, j) {
var optionLabel = _this3.props.getOptionLabel(option);
var optionKey = j + '_' + _this3.props.getOptionRenderKey(option);
var disabled = _this3.props.isOptionDisabled(option);
var tabIndex = disabled ? null : _this3.props.tabIndex || 0;
return /*#__PURE__*/React__default['default'].createElement(MultiSelectItem, {
key: optionKey,
label: optionLabel,
option: option,
template: _this3.props.itemTemplate,
selected: _this3.props.isSelected(option),
onClick: _this3.props.onOptionSelect,
onKeyDown: _this3.props.onOptionKeyDown,
tabIndex: tabIndex,
disabled: disabled
});
});
}
}, {
key: "renderEmptyFilter",
value: function renderEmptyFilter() {
var emptyFilterMessage = core.ObjectUtils.getJSXElement(this.props.emptyFilterMessage, this.props);
return /*#__PURE__*/React__default['default'].createElement("li", {
className: "p-multiselect-empty-message"
}, emptyFilterMessage);
}
}, {
key: "renderItem",
value: function renderItem(option, index) {
if (this.props.optionGroupLabel) {
var groupContent = this.props.optionGroupTemplate ? core.ObjectUtils.getJSXElement(this.props.optionGroupTemplate, option, index) : this.props.getOptionGroupLabel(option);
var groupChildrenContent = this.renderGroupChildren(option);
var key = index + '_' + this.props.getOptionGroupRenderKey(option);
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, {
key: key
}, /*#__PURE__*/React__default['default'].createElement("li", {
className: "p-multiselect-item-group"
}, groupContent), groupChildrenContent);
} else {
var optionLabel = this.props.getOptionLabel(option);
var optionKey = index + '_' + this.props.getOptionRenderKey(option);
var disabled = this.props.isOptionDisabled(option);
var tabIndex = disabled ? null : this.props.tabIndex || 0;
return /*#__PURE__*/React__default['default'].createElement(MultiSelectItem, {
key: optionKey,
label: optionLabel,
option: option,
template: this.props.itemTemplate,
selected: this.props.isSelected(option),
onClick: this.props.onOptionSelect,
onKeyDown: this.props.onOptionKeyDown,
tabIndex: tabIndex,
disabled: disabled
});
}
}
}, {
key: "renderItems",
value: function renderItems() {
var _this4 = this;
if (this.props.visibleOptions && this.props.visibleOptions.length) {
return this.props.visibleOptions.map(function (option, index) {
return _this4.renderItem(option, index);
});
} else if (this.props.hasFilter()) {
return this.renderEmptyFilter();
}
return null;
}
}, {
key: "renderContent",
value: function renderContent() {
var _this5 = this;
if (this.props.virtualScrollerOptions) {
var virtualScrollerProps = _objectSpread$1(_objectSpread$1({}, this.props.virtualScrollerOptions), {
style: _objectSpread$1(_objectSpread$1({}, this.props.virtualScrollerOptions.style), {
height: this.props.scrollHeight
}),
className: core.classNames('p-multiselect-items-wrapper', this.props.virtualScrollerOptions.className),
items: this.props.visibleOptions,
onLazyLoad: function onLazyLoad(event) {
return _this5.props.virtualScrollerOptions.onLazyLoad(_objectSpread$1(_objectSpread$1({}, event), {
filter: _this5.props.filterValue
}));
},
itemTemplate: function itemTemplate(item, options) {
return item && _this5.renderItem(item, options.index);
},
contentTemplate: function contentTemplate(options) {
var className = core.classNames('p-multiselect-items p-component', options.className);
var content = _this5.isEmptyFilter() ? _this5.renderEmptyFilter() : options.children;
return /*#__PURE__*/React__default['default'].createElement("ul", {
ref: options.ref,
className: className,
role: "listbox",
"aria-multiselectable": true
}, content);
}
});
return /*#__PURE__*/React__default['default'].createElement(virtualscroller.VirtualScroller, _extends({
ref: function ref(el) {
return _this5.virtualScrollerRef = el;
}
}, virtualScrollerProps));
} else {
var items = this.renderItems();
return /*#__PURE__*/React__default['default'].createElement("div", {
className: "p-multiselect-items-wrapper",
style: {
maxHeight: this.props.scrollHeight
}
}, /*#__PURE__*/React__default['default'].createElement("ul", {
className: "p-multiselect-items p-component",
role: "listbox",
"aria-multiselectable": true
}, items));
}
}
}, {
key: "renderElement",
value: function renderElement() {
var panelClassName = core.classNames('p-multiselect-panel p-component', {
'p-multiselect-limited': !this.props.allowOptionSelect()
}, this.props.panelClassName);
var header = this.renderHeader();
var content = this.renderContent();
var footer = this.renderFooter();
return /*#__PURE__*/React__default['default'].createElement(core.CSSTransition, {
nodeRef: this.props.forwardRef,
classNames: "p-connected-overlay",
in: this.props.in,
timeout: {
enter: 120,
exit: 100
},
options: this.props.transitionOptions,
unmountOnExit: true,
onEnter: this.onEnter,
onEntered: this.props.onEntered,
onExit: this.props.onExit,
onExited: this.props.onExited
}, /*#__PURE__*/React__default['default'].createElement("div", {
ref: this.props.forwardRef,
className: panelClassName,
style: this.props.panelStyle,
onClick: this.props.onClick
}, header, content, footer));
}
}, {
key: "render",
value: function render() {
var element = this.renderElement();
return /*#__PURE__*/React__default['default'].createElement(core.Portal, {
element: element,
appendTo: this.props.appendTo
});
}
}]);
return MultiSelectPanelComponent;
}(React.Component);
var MultiSelectPanel = /*#__PURE__*/React__default['default'].forwardRef(function (props, ref) {
return /*#__PURE__*/React__default['default'].createElement(MultiSelectPanelComponent, _extends({
forwardRef: ref
}, props));
});
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
var MultiSelect = /*#__PURE__*/function (_Component) {
_inherits(MultiSelect, _Component);
var _super = _createSuper(MultiSelect);
function MultiSelect(props) {
var _this;
_classCallCheck(this, MultiSelect);
_this = _super.call(this, props);
_this.state = {
filter: '',
focused: false,
overlayVisible: false
};
_this.onClick = _this.onClick.bind(_assertThisInitialized(_this));
_this.onKeyDown = _this.onKeyDown.bind(_assertThisInitialized(_this));
_this.onOptionSelect = _this.onOptionSelect.bind(_assertThisInitialized(_this));
_this.onOptionKeyDown = _this.onOptionKeyDown.bind(_assertThisInitialized(_this));
_this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this));
_this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));
_this.onFilterInputChange = _this.onFilterInputChange.bind(_assertThisInitialized(_this));
_this.onCloseClick = _this.onCloseClick.bind(_assertThisInitialized(_this));
_this.onSelectAll = _this.onSelectAll.bind(_assertThisInitialized(_this));
_this.onOverlayEnter = _this.onOverlayEnter.bind(_assertThisInitialized(_this));
_this.onOverlayEntered = _this.onOverlayEntered.bind(_assertThisInitialized(_this));
_this.onOverlayExit = _this.onOverlayExit.bind(_assertThisInitialized(_this));
_this.onOverlayExited = _this.onOverlayExited.bind(_assertThisInitialized(_this));
_this.onPanelClick = _this.onPanelClick.bind(_assertThisInitialized(_this));
_this.getOptionLabel = _this.getOptionLabel.bind(_assertThisInitialized(_this));
_this.getOptionRenderKey = _this.getOptionRenderKey.bind(_assertThisInitialized(_this));
_this.isOptionDisabled = _this.isOptionDisabled.bind(_assertThisInitialized(_this));
_this.getOptionGroupChildren = _this.getOptionGroupChildren.bind(_assertThisInitialized(_this));
_this.getOptionGroupLabel = _this.getOptionGroupLabel.bind(_assertThisInitialized(_this));
_this.getOptionGroupRenderKey = _this.getOptionGroupRenderKey.bind(_assertThisInitialized(_this));
_this.allowOptionSelect = _this.allowOptionSelect.bind(_assertThisInitialized(_this));
_this.isSelected = _this.isSelected.bind(_assertThisInitialized(_this));
_this.isAllSelected = _this.isAllSelected.bind(_assertThisInitialized(_this));
_this.hasFilter = _this.hasFilter.bind(_assertThisInitialized(_this));
_this.getSelectedOptionIndex = _this.getSelectedOptionIndex.bind(_assertThisInitialized(_this));
_this.hide = _this.hide.bind(_assertThisInitialized(_this));
_this.onOptionKeyDown = _this.onOptionKeyDown.bind(_assertThisInitialized(_this));
_this.overlayRef = /*#__PURE__*/React.createRef();
_this.inputRef = /*#__PURE__*/React.createRef(_this.props.inputRef);
return _this;
}
_createClass(MultiSelect, [{
key: "onPanelClick",
value: function onPanelClick(event) {
core.OverlayService.emit('overlay-click', {
originalEvent: event,
target: this.container
});
}
}, {
key: "allowOptionSelect",
value: function allowOptionSelect() {
return !this.props.selectionLimit || !this.props.value || this.props.value && this.props.value.length < this.props.selectionLimit;
}
}, {
key: "onOptionSelect",
value: function onOptionSelect(event) {
var _this2 = this;
var originalEvent = event.originalEvent,
option = event.option;
if (this.props.disabled || this.isOptionDisabled(option)) {
return;
}
var optionValue = this.getOptionValue(option);
var isOptionValueUsed = this.isOptionValueUsed(option);
var selected = this.isSelected(option);
var allowOptionSelect = this.allowOptionSelect();
if (selected) this.updateModel(originalEvent, this.props.value.filter(function (val) {
return !core.ObjectUtils.equals(isOptionValueUsed ? val : _this2.getOptionValue(val), optionValue, _this2.equalityKey());
}));else if (allowOptionSelect) this.updateModel(originalEvent, [].concat(_toConsumableArray(this.props.value || []), [optionValue]));
}
}, {
key: "onOptionKeyDown",
value: function onOptionKeyDown(event) {
var originalEvent = event.originalEvent;
var listItem = originalEvent.currentTarget;
switch (originalEvent.which) {
//down
case 40:
var nextItem = this.findNextItem(listItem);
if (nextItem) {
nextItem.focus();
}
originalEvent.preventDefault();
break;
//up
case 38:
var prevItem = this.findPrevItem(listItem);
if (prevItem) {
prevItem.focus();
}
originalEvent.preventDefault();
break;
//enter and space
case 13:
case 32:
this.onOptionSelect(event);
originalEvent.preventDefault();
break;
//escape
case 27:
this.hide();
this.inputRef.current.focus();
break;
}
}
}, {
key: "findNextItem",
value: function findNextItem(item) {
var nextItem = item.nextElementSibling;
if (nextItem) return core.DomHandler.hasClass(nextItem, 'p-disabled') || core.DomHandler.hasClass(nextItem, 'p-multiselect-item-group') ? this.findNextItem(nextItem) : nextItem;else return null;
}
}, {
key: "findPrevItem",
value: function findPrevItem(item) {
var prevItem = item.previousElementSibling;
if (prevItem) return core.DomHandler.hasClass(prevItem, 'p-disabled') || core.DomHandler.hasClass(prevItem, 'p-multiselect-item-group') ? this.findPrevItem(prevItem) : prevItem;else return null;
}
}, {
key: "onClick",
value: function onClick(event) {
if (!this.props.disabled && !this.isPanelClicked(event) && !core.DomHandler.hasClass(event.target, 'p-multiselect-token-icon') && !this.isClearClicked(event)) {
if (this.state.overlayVisible) {
this.hide();
} else {
this.show();
}
this.inputRef.current.focus();
}
}
}, {
key: "onKeyDown",
value: function onKeyDown(event) {
switch (event.which) {
//down
case 40:
if (!this.state.overlayVisible && event.altKey) {
this.show();
event.preventDefault();
}
break;
//space
case 32:
if (this.state.overlayVisible) this.hide();else this.show();
event.preventDefault();
break;
//escape
case 27:
this.hide();
break;
//tab
case 9:
if (this.state.overlayVisible) {
var firstFocusableElement = core.DomHandler.getFirstFocusableElement(this.overlayRef.current);
if (firstFocusableElement) {
firstFocusableElement.focus();
event.preventDefault();
}
}
break;
}
}
}, {
key: "onSelectAll",
value: function onSelectAll(event) {
var _this3 = this;
if (this.props.onSelectAll) {
this.props.onSelectAll(event);
} else {
var value = null;
var visibleOptions = this.getVisibleOptions();
if (event.checked) {
value = [];
if (visibleOptions) {
var selectedOptions = visibleOptions.filter(function (option) {
return _this3.isOptionDisabled(option) && _this3.isSelected(option);
});
value = selectedOptions.map(function (option) {
return _this3.getOptionValue(option);
});
}
} else if (visibleOptions) {
visibleOptions = visibleOptions.filter(function (option) {
return !_this3.isOptionDisabled(option);
});
if (this.props.optionGroupLabel) {
value = [];
visibleOptions.forEach(function (optionGroup) {
return value = [].concat(_toConsumableArray(value), _toConsumableArray(_this3.getOptionGroupChildren(optionGroup).filter(function (option) {
return !_this3.isOptionDisabled(option);
}).map(function (option) {
return _this3.getOptionValue(option);
})));
});
} else {
value = visibleOptions.map(function (option) {
return _this3.getOptionValue(option);
});
}
value = _toConsumableArray(new Set([].concat(_toConsumableArray(value), _toConsumableArray(this.props.value || []))));
}
this.updateModel(event.originalEvent, value);
}
}
}, {
key: "updateModel",
value: function updateModel(event, value) {
if (this.props.onChange) {
this.props.onChange({
originalEvent: event,
value: value,
stopPropagation: function stopPropagation() {},
preventDefault: function preventDefault() {},
target: {
name: this.props.name,
id: this.props.id,
value: value
}
});
}
}
}, {
key: "onFilterInputChange",
value: function onFilterInputChange(event) {
var _this4 = this;
var filter = event.query;
this.setState({
filter: filter
}, function () {
if (_this4.props.onFilter) {
_this4.props.onFilter({
originalEvent: event,
filter: filter
});
}
});
}
}, {
key: "resetFilter",
value: function resetFilter() {
var _this5 = this;
var filter = '';
this.setState({
filter: filter
}, function () {
_this5.props.onFilter && _this5.props.onFilter({
filter: filter
});
});
}
}, {
key: "show",
value: function show() {
this.setState({
overlayVisible: true
});
}
}, {
key: "hide",
value: function hide() {
this.setState({
overlayVisible: false
});
}
}, {
key: "onOverlayEnter",
value: function onOverlayEnter(callback) {
core.ZIndexUtils.set('overlay', this.overlayRef.current);
this.alignOverlay();
this.scrollInView();
callback && callback();
}
}, {
key: "onOverlayEntered",
value: function onOverlayEntered(callback) {
this.bindDocumentClickListener();
this.bindScrollListener();
this.bindResizeListener();
callback && callback();
this.props.onShow && this.props.onShow();
}
}, {
key: "onOverlayExit",
value: function onOverlayExit() {
this.unbindDocumentClickListener();
this.unbindScrollListener();
this.unbindResizeListener();
}
}, {
key: "onOverlayExited",
value: function onOverlayExited() {
if (this.props.filter && this.props.resetFilterOnHide) {
this.resetFilter();
}
core.ZIndexUtils.clear(this.overlayRef.current);
this.props.onHide && this.props.onHide();
}
}, {
key: "alignOverlay",
value: function alignOverlay() {
core.DomHandler.alignOverlay(this.overlayRef.current, this.label.parentElement, this.props.appendTo || PrimeReact__default['default'].appendTo);
}
}, {
key: "scrollInView",
value: function scrollInView() {
var highlightItem = core.DomHandler.findSingle(this.overlayRef.current, 'li.p-highlight');
if (highlightItem) {
highlightItem.scrollIntoView({
block: 'nearest',
inline: 'start'
});
}
}
}, {
key: "onCloseClick",
value: function onCloseClick(event) {
this.hide();
this.inputRef.current.focus();
event.preventDefault();
event.stopPropagation();
}
}, {
key: "getSelectedOptionIndex",
value: function getSelectedOptionIndex() {
if (this.props.value != null && this.props.options) {
if (this.props.optionGroupLabel) {
for (var i = 0; i < this.props.options.length; i++) {
var selectedOptionIndex = this.findOptionIndexInList(this.props.value, this.getOptionGroupChildren(this.props.options[i]));
if (selectedOptionIndex !== -1) {
return {
group: i,
option: selectedOptionIndex
};
}
}
} else {
return this.findOptionIndexInList(this.props.value, this.props.options);
}
}
return -1;
}
}, {
key: "findOptionIndexInList",
value: function findOptionIndexInList(value, list) {
var _this6 = this;
var key = this.equalityKey();
return list.findIndex(function (item) {
return value.some(function (val) {
return core.ObjectUtils.equals(val, _this6.getOptionValue(item), key);
});
});
}
}, {
key: "isSelected",
value: function isSelected(option) {
var _this7 = this;
var selected = false;
if (this.props.value) {
var optionValue = this.getOptionValue(option);
var isOptionValueUsed = this.isOptionValueUsed(option);
var key = this.equalityKey();
selected = this.props.value.some(function (val) {
return core.ObjectUtils.equals(isOptionValueUsed ? val : _this7.getOptionValue(val), optionValue, key);
});
}
return selected;
}
}, {
key: "getLabelByValue",
value: function getLabelByValue(val) {
var option;
if (this.props.options) {
if (this.props.optionGroupLabel) {
var _iterator = _createForOfIteratorHelper(this.props.options),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var optionGroup = _step.value;
option = this.findOptionByValue(val, this.getOptionGroupChildren(optionGroup));
if (option) {
break;
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
} else {
option = this.findOptionByValue(val, this.props.options);
}
}
return option ? this.getOptionLabel(option) : null;
}
}, {
key: "findOptionByValue",
value: function findOptionByValue(val, list) {
var key = this.equalityKey();
var _iterator2 = _createForOfIteratorHelper(list),
_step2;
try {
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
var option = _step2.value;
var optionValue = this.getOptionValue(option);
if (core.ObjectUtils.equals(optionValue, val, key)) {
return option;
}
}
} catch (err) {
_iterator2.e(err);
} finally {
_iterator2.f();
}
return null;
}
}, {
key: "onFocus",
value: function onFocus(event) {
var _this8 = this;
event.persist();
this.setState({
focused: true
}, function () {
if (_this8.props.onFocus) {
_this8.props.onFocus(event);
}
});
}
}, {
key: "onBlur",
value: function onBlur(event) {
var _this9 = this;
event.persist();
this.setState({
focused: false
}, function () {
if (_this9.props.onBlur) {
_this9.props.onBlur(event);
}
});
}
}, {
key: "bindDocumentClickListener",
value: function bindDocumentClickListener() {
var _this10 = this;
if (!this.documentClickListener) {
this.documentClickListener = function (event) {
if (_this10.state.overlayVisible && _this10.isOutsideClicked(event)) {
_this10.hide();
}
};
document.addEventListener('click', this.documentClickListener);
}
}
}, {
key: "bindScrollListener",
value: function bindScrollListener() {
var _this11 = this;
if (!this.scrollHandler) {
this.scrollHandler = new core.ConnectedOverlayScrollHandler(this.container, function () {
if (_this11.state.overlayVisible) {
_this11.hide();
}
});
}
this.scrollHandler.bindScrollListener();
}
}, {
key: "unbindScrollListener",
value: function unbindScrollListener() {
if (this.scrollHandler) {
this.scrollHandler.unbindScrollListener();
}
}
}, {
key: "bindResizeListener",
value: function bindResizeListener() {
var _this12 = this;
if (!this.resizeListener) {
this.resizeListener = function () {
if (_this12.state.overlayVisible && !core.DomHandler.isAndroid()) {
_this12.hide();
}
};
window.addEventListener('resize', this.resizeListener);
}
}
}, {
key: "unbindResizeListener",
value: function unbindResizeListener() {
if (this.resizeListener) {
window.removeEventListener('resize', this.resizeListener);
this.resizeListener = null;
}
}
}, {
key: "isOutsideClicked",
value: function isOutsideClicked(event) {
return this.container && !(this.container.isSameNode(event.target) || this.isClearClicked(event) || this.container.contains(event.target) || this.isPanelClicked(event));
}
}, {
key: "isClearClicked",
value: function isClearClicked(event) {
return core.DomHandler.hasClass(event.target, 'p-multiselect-clear-icon');
}
}, {
key: "isPanelClicked",
value: function isPanelClicked(event) {
return this.overlayRef && this.overlayRef.current && this.overlayRef.current.contains(event.target);
}
}, {
key: "unbindDocumentClickListener",
value: function unbindDocumentClickListener() {
if (this.documentClickListener) {
document.removeEventListener('click', this.documentClickListener);
this.documentClickListener = null;
}
}
}, {
key: "updateInputRef",
value: function updateInputRef() {
var ref = this.props.inputRef;
if (ref) {
if (typeof ref === 'function') {
ref(this.inputRef.current);
} else {
ref.current = this.inputRef.current;
}
}
}
}, {
key: "componentDidMount",
value: function componentDidMount() {
this.updateInputRef();
if (this.props.tooltip) {
this.renderTooltip();
}
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
if (prevProps.tooltip !== this.props.tooltip || prevProps.tooltipOptions !== this.props.tooltipOptions) {
if (this.tooltip) this.tooltip.update(_objectSpread({
content: this.props.tooltip
}, this.props.tooltipOptions || {}));else this.renderTooltip();
}
if (this.state.overlayVisible && this.hasFilter()) {
this.alignOverlay();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.unbindDocumentClickListener();
this.unbindResizeListener();
if (this.scrollHandler) {
this.scrollHandler.destroy();
this.scrollHandler = null;
}
if (this.tooltip) {
this.tooltip.destroy();
this.tooltip = null;
}
core.ZIndexUtils.clear(this.overlayRef.current);
}
}, {
key: "hasFilter",
value: function hasFilter() {
return this.state.filter && this.state.filter.trim().length > 0;
}
}, {
key: "isAllSelected",
value: function isAllSelected() {
var _this13 = this;
if (this.props.onSelectAll) {
return this.props.selectAll;
} else {
var visibleOptions = this.getVisibleOptions();
if (visibleOptions.length === 0) {
return false;
}
visibleOptions = visibleOptions.filter(function (option) {
return !_this13.isOptionDisabled(option);
});
if (this.props.optionGroupLabel) {
var _iterator3 = _createForOfIteratorHelper(visibleOptions),
_step3;
try {
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
var optionGroup = _step3.value;
var visibleOptionsGroupChildren = this.getOptionGroupChildren(optionGroup).filter(function (option) {
return !_this13.isOptionDisabled(option);
});
var _iterator4 = _createForOfIteratorHelper(visibleOptionsGroupChildren),
_step4;
try {
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
var option = _step4.value;
if (!this.isSelected(option)) {
return false;
}
}
} catch (err) {
_iterator4.e(err);
} finally {
_iterator4.f();
}
}
} catch (err) {
_iterator3.e(err);
} finally {
_iterator3.f();
}
} else {
var _iterator5 = _createForOfIteratorHelper(visibleOptions),
_step5;
try {
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
var _option = _step5.value;
if (!this.isSelected(_option)) {
return false;
}
}
} catch (err) {
_iterator5.e(err);
} finally {
_iterator5.f();
}
}
}
return true;
}
}, {
key: "getOptionLabel",
value: function getOptionLabel(option) {
return this.props.optionLabel ? core.ObjectUtils.resolveFieldData(option, this.props.optionLabel) : option && option['label'] !== undefined ? option['label'] : option;
}
}, {
key: "getOptionValue",
value: function getOptionValue(option) {
if (this.props.optionValue) {
var data = core.ObjectUtils.resolveFieldData(option, this.props.optionValue);
return data !== null ? data : option;
}
return option && option['value'] !== undefined ? option['value'] : option;
}
}, {
key: "getOptionRenderKey",
value: function getOptionRenderKey(option) {
return this.props.dataKey ? core.ObjectUtils.resolveFieldData(option, this.props.dataKey) : this.getOptionLabel(option);
}
}, {
key: "getOptionGroupRenderKey",
value: function getOptionGroupRenderKey(optionGroup) {
return core.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel);
}
}, {
key: "getOptionGroupLabel",
value: function getOptionGroupLabel(optionGroup) {
return core.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupLabel);
}
}, {
key: "getOptionGroupChildren",
value: function getOptionGroupChildren(optionGroup) {
return core.ObjectUtils.resolveFieldData(optionGroup, this.props.optionGroupChildren);
}
}, {
key: "isOptionDisabled",
value: function isOptionDisabled(option) {
if (this.props.optionDisabled) {
return core.ObjectUtils.isFunction(this.props.optionDisabled) ? this.props.optionDisabled(option) : core.ObjectUtils.resolveFieldData(option, this.props.optionDisabled);
}
return option && option['disabled'] !== undefined ? option['disabled'] : false;
}
}, {
key: "isOptionValueUsed",
value: function isOptionValueUsed(option) {
return this.props.optionValue || option && option['value'] !== undefined;
}
}, {
key: "getVisibleOptions",
value: function getVisibleOptions() {
if (this.hasFilter()) {
var filterValue = this.state.filter.trim().toLocaleLowerCase(this.props.filterLocale);
var searchFields = this.props.filterBy ? this.props.filterBy.split(',') : [this.props.optionLabel || 'label'];
if (this.props.optionGroupLabel) {
var filteredGroups = [];
var _iterator6 = _createForOfIteratorHelper(this.props.options),
_step6;
try {
for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
var optgroup = _step6.value;
var filteredSubOptions = core.FilterUtils.filter(this.getOptionGroupChildren(optgroup), searchFields, filterValue, this.props.filterMatchMode, this.props.filterLocale);
if (filteredSubOptions && filteredSubOptions.length) {
filteredGroups.push(_objectSpread(_objectSpread({}, optgroup), {
items: filteredSubOptions
}));
}
}
} catch (err) {
_iterator6.e(err);
} finally {
_iterator6.f();
}
return filteredGroups;
} else {
return core.FilterUtils.filter(this.props.options, searchFields, filterValue, this.props.filterMatchMode, this.props.filterLocale);
}
} else {
return this.props.options;
}
}
}, {
key: "isEmpty",
value: function isEmpty() {
return !this.props.value || this.props.value.length === 0;
}
}, {
key: "equalityKey",
value: function equalityKey() {
return this.props.optionValue ? null : this.props.dataKey;
}
}, {
key: "checkValidity",
value: function checkValidity() {
return this.inputRef.current.checkValidity();
}
}, {
key: "removeChip",
value: function removeChip(event, item) {
var key = this.equalityKey();
var value = this.props.value.filter(function (val) {
return !core.ObjectUtils.equals(val, item, key);
});
this.updateModel(event, value);
}
}, {
key: "getSelectedItemsLabel",
value: function getSelectedItemsLabel() {
var pattern = /{(.*?)}/;
if (pattern.test(this.props.selectedItemsLabel)) {
return this.props.selectedItemsLabel.replace(this.props.selectedItemsLabel.match(pattern)[0], this.props.value.length + '');
}
return this.props.selectedItemsLabel;
}
}, {
key: "getLabel",
value: function getLabel() {
var label;
if (!this.isEmpty() && !this.props.fixedPlaceholder) {
if (this.props.value.length <= this.props.maxSelectedLabels) {
label = '';
for (var i = 0; i < this.props.value.length; i++) {
if (i !== 0) {
label += ',';
}
label += this.getLabelByValue(this.props.value[i]);
}
return label;
} else {
return this.getSelectedItemsLabel();
}
}
return label;
}
}, {
key: "getLabelContent",
value: function getLabelContent() {
var _this14 = this;
if (this.props.selectedItemTemplate) {
if (!this.isEmpty()) {
if (this.props.value.length <= this.props.maxSelectedLabels) {
return this.props.value.map(function (val, index) {
var item = core.ObjectUtils.getJSXElement(_this14.props.selectedItemTemplate, val);
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, {
key: index
}, item);
});
} else {
return this.getSelectedItemsLabel();
}
} else {
return core.ObjectUtils.getJSXElement(this.props.selectedItemTemplate);
}
} else {
if (this.props.display === 'chip' && !this.isEmpty()) {
return this.props.value.map(function (val) {
var label = _this14.getLabelByValue(val);
return /*#__PURE__*/React__default['default'].createElement("div", {
className: "p-multiselect-token",
key: label
}, /*#__PURE__*/React__default['default'].createElement("span", {
className: "p-multiselect-token-label"
}, label), !_this14.props.disabled && /*#__PURE__*/React__default['default'].createElement("span", {
className: "p-multiselect-token-icon pi pi-times-circle",
onClick: function onClick(e) {
return _this14.removeChip(e, val);
}
}));
});
}
return this.getLabel();
}
}
}, {
key: "renderTooltip",
value: function renderTooltip() {
this.tooltip = core.tip({
target: this.container,
content: this.props.tooltip,
options: this.props.tooltipOptions
});
}
}, {
key: "renderClearIcon",
value: function renderClearIcon() {
var _this15 = this;
var empty = this.isEmpty();
if (!empty && this.props.showClear && !this.props.disabled) {
return /*#__PURE__*/React__default['default'].createElement("i", {
className: "p-multiselect-clear-icon pi pi-times",
onClick: function onClick(e) {
return _this15.updateModel(e, null);
}
});
}
return null;
}
}, {
key: "renderLabel",
value: function renderLabel() {
var _this16 = this;
var empty = this.isEmpty();
var content = this.getLabelContent();
var labelClassName = core.classNames('p-multiselect-label', {
'p-placeholder': empty && this.props.placeholder,
'p-multiselect-label-empty': empty && !this.props.placeholder && !this.props.selectedItemTemplate,
'p-multiselect-items-label': !empty && this.props.value.length > this.props.maxSelectedLabels
});
return /*#__PURE__*/React__default['default'].createElement("div", {
ref: function ref(el) {
return _this16.label = el;
},
className: "p-multiselect-label-container"
}, /*#__PURE__*/React__default['default'].createElement("div", {
className: labelClassName
}, content || this.props.placeholder || 'empty'));
}
}, {
key: "render",
value: function render() {
var _this17 = this;
var className = core.classNames('p-multiselect p-component p-inputwrapper', {
'p-multiselect-chip': this.props.display === 'chip',
'p-disabled': this.props.disabled,
'p-multiselect-clearable': this.props.showClear && !this.props.disabled,
'p-focus': this.state.focused,
'p-inputwrapper-filled': this.props.value && this.props.value.length > 0,
'p-inputwrapper-focus': this.state.focused || this.state.overlayVisible
}, this.props.className);
var iconClassName = core.classNames('p-multiselect-trigger-icon p-c', this.props.dropdownIcon);
var visibleOptions = this.getVisibleOptions();
var label = this.renderLabel();
var clearIcon = this.renderClearIcon();
return /*#__PURE__*/React__default['default'].createElement("div", {
id: this.props.id,
className: className,
onClick: this.onClick,
ref: function ref(el) {
return _this17.container = el;
},
style: this.props.style
}, /*#__PURE__*/React__default['default'].createElement("div", {
className: "p-hidden-accessible"
}, /*#__PURE__*/React__default['default'].createElement("input", {
ref: this.inputRef,
id: this.props.inputId,
name: this.props.name,
readOnly: true,
type: "text",
onFocus: this.onFocus,
onBlur: this.onBlur,
onKeyDown: this.onKeyDown,
role: "listbox",
"aria-haspopup": "listbox",
"aria-labelledby": this.props.ariaLabelledBy,
"aria-expanded": this.state.overlayVisible,
disabled: this.props.disabled,
tabIndex: this.props.tabIndex
})), label, clearIcon, /*#__PURE__*/React__default['default'].createElement("div", {
className: "p-multiselect-trigger"
}, /*#__PURE__*/React__default['default'].createElement("span", {
className: iconClassName
})), /*#__PURE__*/React__default['default'].createElement(MultiSelectPanel, _extends({
ref: this.overlayRef,
visibleOptions: visibleOptions
}, this.props, {
onClick: this.onPanelClick,
onOverlayHide: this.hide,
filterValue: this.state.filter,
hasFilter: this.hasFilter,
onFilterInputChange: this.onFilterInputChange,
onCloseClick: this.onCloseClick,
onSelectAll: this.onSelectAll,
getOptionLabel: this.getOptionLabel,
getOptionRenderKey: this.getOptionRenderKey,
isOptionDisabled: this.isOptionDisabled,
getOptionGroupChildren: this.getOptionGroupChildren,
getOptionGroupLabel: this.getOptionGroupLabel,
getOptionGroupRenderKey: this.getOptionGroupRenderKey,
isSelected: this.isSelected,
getSelectedOptionIndex: this.getSelectedOptionIndex,
isAllSelected: this.isAllSelected,
onOptionSelect: this.onOptionSelect,
allowOptionSelect: this.allowOptionSelect,
onOptionKeyDown: this.onOptionKeyDown,
in: this.state.overlayVisible,
onEnter: this.onOverlayEnter,
onEntered: this.onOverlayEntered,
onExit: this.onOverlayExit,
onExited: this.onOverlayExited
})));
}
}]);
return MultiSelect;
}(React.Component);
_defineProperty(MultiSelect, "defaultProps", {
id: null,
inputRef: null,
name: null,
value: null,
options: null,
optionLabel: null,
optionValue: null,
optionDisabled: null,
optionGroupLabel: null,
optionGroupChildren: null,
optionGroupTemplate: null,
display: 'comma',
style: null,
className: null,
panelClassName: null,
panelStyle: null,
virtualScrollerOptions: null,
scrollHeight: '200px',
placeholder: null,
fixedPlaceholder: false,
disabled: false,
showClear: false,
filter: false,
filterBy: null,
filterMatchMode: 'contains',
filterPlaceholder: null,
filterLocale: undefined,
emptyFilterMessage: 'No results found',
resetFilterOnHide: false,
tabIndex: 0,
dataKey: null,
inputId: null,
appendTo: null,
tooltip: null,
tooltipOptions: null,
maxSelectedLabels: 3,
selectionLimit: null,
selectedItemsLabel: '{0} items selected',
ariaLabelledBy: null,
itemTemplate: null,
selectedItemTemplate: null,
panelHeaderTemplate: null,
panelFooterTemplate: null,
transitionOptions: null,
dropdownIcon: 'pi pi-chevron-down',
showSelectAll: true,
selectAll: false,
onChange: null,
onFocus: null,
onBlur: null,
onShow: null,
onHide: null,
onFilter: null,
onSelectAll: null
});
exports.MultiSelect = MultiSelect;
Object.defineProperty(exports, '__esModule', { value: true });
return exports;
}({}, React, primereact.core, primereact.inputtext, primereact.virtualscroller, primereact.api));
|
mit
|
cdnjs/cdnjs
|
ajax/libs/highcharts/9.3.2/indicators/keltner-channels.js
|
5499
|
/*
Highstock JS v9.3.2 (2021-11-29)
Indicator series type for Highcharts Stock
(c) 2010-2021 Daniel Studencki
License: www.highcharts.com/license
*/
'use strict';(function(b){"object"===typeof module&&module.exports?(b["default"]=b,module.exports=b):"function"===typeof define&&define.amd?define("highcharts/indicators/keltner-channels",["highcharts","highcharts/modules/stock"],function(k){b(k);b.Highcharts=k;return b}):b("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(b){function k(b,f,e,k){b.hasOwnProperty(f)||(b[f]=k.apply(null,e))}b=b?b._modules:{};k(b,"Stock/Indicators/MultipleLinesComposition.js",[b["Core/Series/SeriesRegistry.js"],
b["Core/Utilities.js"]],function(b,f){var e=b.seriesTypes.sma,k=f.defined,n=f.error,r=f.merge,h;(function(f){function m(a){var c,g=[];a=a||this.points;if(this.fillGraph&&this.nextPoints){if((c=e.prototype.getGraphPath.call(this,this.nextPoints))&&c.length){c[0][0]="L";g=e.prototype.getGraphPath.call(this,a);c=c.slice(0,g.length);for(var b=c.length-1;0<=b;b--)g.push(c[b])}}else g=e.prototype.getGraphPath.apply(this,arguments);return g}function q(){var a=this,c=a.linesApiNames,g=a.areaLinesNames,d=
a.points,f=a.options,q=a.graph,w={options:{gapSize:f.gapSize}},m=[],h=a.getTranslatedLinesNames(a.pointValKey),u=d.length,l;h.forEach(function(a,c){for(m[c]=[];u--;)l=d[u],m[c].push({x:l.x,plotX:l.plotX,plotY:l[a],isNull:!k(l[a])});u=d.length});if(this.userOptions.fillColor&&g.length){var v=h.indexOf(x(g[0]));v=m[v];g=1===g.length?d:m[h.indexOf(x(g[1]))];h=a.color;a.points=g;a.nextPoints=v;a.color=this.userOptions.fillColor;a.options=r(d,w);a.graph=a.area;a.fillGraph=!0;b.seriesTypes.sma.prototype.drawGraph.call(a);
a.area=a.graph;delete a.nextPoints;delete a.fillGraph;a.color=h}c.forEach(function(c,b){m[b]?(a.points=m[b],f[c]?a.options=r(f[c].styles,w):n('Error: "There is no '+c+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names." at mixin/multiple-line.js:34'),a.graph=a["graph"+c],e.prototype.drawGraph.call(a),a["graph"+c]=a.graph):n('Error: "'+c+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")});a.points=d;
a.options=f;a.graph=q;e.prototype.drawGraph.call(a)}function d(a){var c=[];(this.pointArrayMap||[]).forEach(function(b){b!==a&&c.push(x(b))});return c}function x(a){return"plot"+a.charAt(0).toUpperCase()+a.slice(1)}function w(a){var c=[];(this.pointArrayMap||[]).forEach(function(b){c.push(a[b])});return c}function u(){var a=this,c=a.pointArrayMap,b=[],d;b=a.getTranslatedLinesNames();e.prototype.translate.apply(a,arguments);a.points.forEach(function(f){c.forEach(function(c,g){d=f[c];a.dataModify&&
(d=a.dataModify.modifyValue(d));null!==d&&(f[b[g]]=a.yAxis.toPixels(d,!0))})})}var h=[],l=["bottomLine"],v=["top","bottom"],z=["top"];f.compose=function(a){if(-1===h.indexOf(a)){h.push(a);var c=a.prototype;c.linesApiNames=c.linesApiNames||l.slice();c.pointArrayMap=c.pointArrayMap||v.slice();c.pointValKey=c.pointValKey||"top";c.areaLinesNames=c.areaLinesNames||z.slice();c.drawGraph=q;c.getGraphPath=m;c.toYData=w;c.translate=u;c.getTranslatedLinesNames=d}return a}})(h||(h={}));return h});k(b,"Stock/Indicators/KeltnerChannels/KeltnerChannelsIndicator.js",
[b["Stock/Indicators/MultipleLinesComposition.js"],b["Core/Series/SeriesRegistry.js"],b["Core/Utilities.js"]],function(b,f,e){var k=this&&this.__extends||function(){var b=function(f,d){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,d){b.__proto__=d}||function(b,d){for(var f in d)d.hasOwnProperty(f)&&(b[f]=d[f])};return b(f,d)};return function(f,d){function e(){this.constructor=f}b(f,d);f.prototype=null===d?Object.create(d):(e.prototype=d.prototype,new e)}}(),n=f.seriesTypes.sma,
r=e.correctFloat,h=e.extend,y=e.merge;e=function(b){function e(){var d=null!==b&&b.apply(this,arguments)||this;d.data=void 0;d.options=void 0;d.points=void 0;return d}k(e,b);e.prototype.init=function(){f.seriesTypes.sma.prototype.init.apply(this,arguments);this.options=y({topLine:{styles:{lineColor:this.color}},bottomLine:{styles:{lineColor:this.color}}},this.options)};e.prototype.getValues=function(b,e){var d=e.period,h=e.periodATR,k=e.multiplierATR,l=b.yData;l=l?l.length:0;var m=[];e=f.seriesTypes.ema.prototype.getValues(b,
{period:d,index:e.index});var n=f.seriesTypes.atr.prototype.getValues(b,{period:h}),a=[],c=[],g;if(!(l<d)){for(g=d;g<=l;g++){var p=e.values[g-d];var t=n.values[g-h];var q=p[0];b=r(p[1]+k*t[1]);t=r(p[1]-k*t[1]);p=p[1];m.push([q,b,p,t]);a.push(q);c.push([b,p,t])}return{values:m,xData:a,yData:c}}};e.defaultOptions=y(n.defaultOptions,{params:{index:0,period:20,periodATR:10,multiplierATR:2},bottomLine:{styles:{lineWidth:1,lineColor:void 0}},topLine:{styles:{lineWidth:1,lineColor:void 0}},tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span><b> {series.name}</b><br/>Upper Channel: {point.top}<br/>EMA({series.options.params.period}): {point.middle}<br/>Lower Channel: {point.bottom}<br/>'},
marker:{enabled:!1},dataGrouping:{approximation:"averages"},lineWidth:1});return e}(n);h(e.prototype,{nameBase:"Keltner Channels",areaLinesNames:["top","bottom"],nameComponents:["period","periodATR","multiplierATR"],linesApiNames:["topLine","bottomLine"],pointArrayMap:["top","middle","bottom"],pointValKey:"middle"});b.compose(e);f.registerSeriesType("keltnerchannels",e);"";return e});k(b,"masters/indicators/keltner-channels.src.js",[],function(){})});
//# sourceMappingURL=keltner-channels.js.map
|
mit
|
cdnjs/cdnjs
|
ajax/libs/highcharts/7.2.2/es-modules/indicators/stochastic.src.js
|
5303
|
/* *
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
'use strict';
import H from '../parts/Globals.js';
import U from '../parts/Utilities.js';
var isArray = U.isArray;
import reduceArrayMixin from '../mixins/reduce-array.js';
import multipleLinesMixin from '../mixins/multipe-lines.js';
var merge = H.merge, SMA = H.seriesTypes.sma, getArrayExtremes = reduceArrayMixin.getArrayExtremes;
/**
* The Stochastic series type.
*
* @private
* @class
* @name Highcharts.seriesTypes.stochastic
*
* @augments Highcharts.Series
*/
H.seriesType('stochastic', 'sma',
/**
* Stochastic oscillator. This series requires the `linkedTo` option to be
* set and should be loaded after the `stock/indicators/indicators.js` file.
*
* @sample stock/indicators/stochastic
* Stochastic oscillator
*
* @extends plotOptions.sma
* @since 6.0.0
* @product highstock
* @excluding allAreas, colorAxis, joinBy, keys, navigatorOptions,
* pointInterval, pointIntervalUnit, pointPlacement,
* pointRange, pointStart, showInNavigator, stacking
* @requires stock/indicators/indicators
* @requires stock/indicators/stochastic
* @optionparent plotOptions.stochastic
*/
{
/**
* @excluding index, period
*/
params: {
/**
* Periods for Stochastic oscillator: [%K, %D].
*
* @type {Array<number,number>}
* @default [14, 3]
*/
periods: [14, 3]
},
marker: {
enabled: false
},
tooltip: {
pointFormat: '<span style="color:{point.color}">\u25CF</span><b> {series.name}</b><br/>%K: {point.y}<br/>%D: {point.smoothed}<br/>'
},
/**
* Smoothed line options.
*/
smoothedLine: {
/**
* Styles for a smoothed line.
*/
styles: {
/**
* Pixel width of the line.
*/
lineWidth: 1,
/**
* Color of the line. If not set, it's inherited from
* [plotOptions.stochastic.color
* ](#plotOptions.stochastic.color).
*
* @type {Highcharts.ColorString}
*/
lineColor: undefined
}
},
dataGrouping: {
approximation: 'averages'
}
},
/**
* @lends Highcharts.Series#
*/
H.merge(multipleLinesMixin, {
nameComponents: ['periods'],
nameBase: 'Stochastic',
pointArrayMap: ['y', 'smoothed'],
parallelArrays: ['x', 'y', 'smoothed'],
pointValKey: 'y',
linesApiNames: ['smoothedLine'],
init: function () {
SMA.prototype.init.apply(this, arguments);
// Set default color for lines:
this.options = merge({
smoothedLine: {
styles: {
lineColor: this.color
}
}
}, this.options);
},
getValues: function (series, params) {
var periodK = params.periods[0], periodD = params.periods[1], xVal = series.xData, yVal = series.yData, yValLen = yVal ? yVal.length : 0,
// 0- date, 1-%K, 2-%D
SO = [], xData = [], yData = [], slicedY, close = 3, low = 2, high = 1, CL, HL, LL, K, D = null, points, extremes, i;
// Stochastic requires close value
if (yValLen < periodK ||
!isArray(yVal[0]) ||
yVal[0].length !== 4) {
return false;
}
// For a N-period, we start from N-1 point, to calculate Nth point
// That is why we later need to comprehend slice() elements list
// with (+1)
for (i = periodK - 1; i < yValLen; i++) {
slicedY = yVal.slice(i - periodK + 1, i + 1);
// Calculate %K
extremes = getArrayExtremes(slicedY, low, high);
LL = extremes[0]; // Lowest low in %K periods
CL = yVal[i][close] - LL;
HL = extremes[1] - LL;
K = CL / HL * 100;
xData.push(xVal[i]);
yData.push([K, null]);
// Calculate smoothed %D, which is SMA of %K
if (i >= (periodK - 1) + (periodD - 1)) {
points = SMA.prototype.getValues.call(this, {
xData: xData.slice(-periodD),
yData: yData.slice(-periodD)
}, {
period: periodD
});
D = points.yData[0];
}
SO.push([xVal[i], K, D]);
yData[yData.length - 1][1] = D;
}
return {
values: SO,
xData: xData,
yData: yData
};
}
}));
/**
* A Stochastic indicator. If the [type](#series.stochastic.type) option is not
* specified, it is inherited from [chart.type](#chart.type).
*
* @extends series,plotOptions.stochastic
* @since 6.0.0
* @product highstock
* @excluding allAreas, colorAxis, dataParser, dataURL, joinBy, keys,
* navigatorOptions, pointInterval, pointIntervalUnit,
* pointPlacement, pointRange, pointStart, showInNavigator, stacking
* @requires stock/indicators/indicators
* @requires stock/indicators/stochastic
* @apioption series.stochastic
*/
''; // to include the above in the js output
|
mit
|
C3BI-pasteur-fr/python-course-1
|
source/_static/code/inheritance_sequence.py
|
1463
|
from __future__ import print_function
class Sequence(object):
def __init__(self, name, seq):
"""
:param seq: the sequence
:type seq: string
"""
self.name = name
self.sequence = seq
def __len__(self):
return len(self.sequence)
def to_fasta(self):
id_ = self.name.replace(' ', '_')
fasta = '>{}\n'.format(id_)
start = 0
while start < len(self.sequence):
end = start + 80
fasta += self.sequence[start: end + 1] + '\n'
start = end
return fasta
class DNASequence(Sequence):
alphabet = 'ATGC'
def gc_percent(self):
return float(self.sequence.count('G') + self.sequence.count('C')) / len(self.sequence)
class AASequence(Sequence):
_water = 18.0153
_weight_table = {'A': 89.0932, 'C': 121.1582, 'E': 147.1293,
'D': 133.1027, 'G': 75.0666, 'F': 165.1891,
'I': 131.1729, 'H': 155.1546, 'K': 146.1876,
'M': 149.2113, 'L': 131.1729, 'O': 255.3134,
'N': 132.1179, 'Q': 146.1445, 'P': 115.1305,
'S': 105.0926, 'R': 174.201, 'U': 168.0532,
'T': 119.1192, 'W': 204.2252, 'V': 117.1463,
'Y': 181.1885}
def molecular_weight(self):
return sum([self._weight_table[aa] for aa in self.sequence]) - (len(self.sequence) - 1) * self._water
|
cc0-1.0
|
Anterotesis/historical-texts
|
evans-tcp/README.md
|
114
|
Evans-TCP
=========
Evans Early American Imprints-Text Creation Partnership (Evans-TCP) public file distribution
|
cc0-1.0
|
MaxLeap/API-Reference-Android
|
v1.1.0/serialized-form.html
|
6203
|
<!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 (1.8.0_102) on Thu Jan 05 12:31:51 CST 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Serialized Form (mod-core API)</title>
<meta name="date" content="2017-01-05">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<script type="text/javascript" src="script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Serialized Form (mod-core API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li><a href="overview-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>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li>
<li><a href="serialized-form.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>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Serialized Form" class="title">Serialized Form</h1>
</div>
<div class="serializedFormContainer">
<ul class="blockList">
<li class="blockList">
<h2 title="Package">Package com.maxleap.exception</h2>
<ul class="blockList">
<li class="blockList"><a name="com.maxleap.exception.MLCancelException">
<!-- -->
</a>
<h3>Class <a href="com/maxleap/exception/MLCancelException.html" title="class in com.maxleap.exception">com.maxleap.exception.MLCancelException</a> extends <a href="com/maxleap/exception/MLException.html" title="class in com.maxleap.exception">MLException</a> implements Serializable</h3>
</li>
<li class="blockList"><a name="com.maxleap.exception.MLException">
<!-- -->
</a>
<h3>Class <a href="com/maxleap/exception/MLException.html" title="class in com.maxleap.exception">com.maxleap.exception.MLException</a> extends <a href="http://d.android.com/reference/java/lang/Exception.html?is-external=true" title="class or interface in java.lang">Exception</a> implements Serializable</h3>
<dl class="nameValue">
<dt>serialVersionUID:</dt>
<dd>8121179414573649864L</dd>
</dl>
<ul class="blockList">
<li class="blockList">
<h3>Serialized Fields</h3>
<ul class="blockList">
<li class="blockListLast">
<h4>code</h4>
<pre>int code</pre>
</li>
</ul>
</li>
</ul>
</li>
<li class="blockList"><a name="com.maxleap.exception.MLServerException">
<!-- -->
</a>
<h3>Class <a href="com/maxleap/exception/MLServerException.html" title="class in com.maxleap.exception">com.maxleap.exception.MLServerException</a> extends <a href="com/maxleap/exception/MLException.html" title="class in com.maxleap.exception">MLException</a> implements Serializable</h3>
<ul class="blockList">
<li class="blockList">
<h3>Serialized Fields</h3>
<ul class="blockList">
<li class="blockListLast">
<h4>httpStatusCode</h4>
<pre>int httpStatusCode</pre>
</li>
</ul>
</li>
</ul>
</li>
<li class="blockList"><a name="com.maxleap.exception.MLTimeoutException">
<!-- -->
</a>
<h3>Class <a href="com/maxleap/exception/MLTimeoutException.html" title="class in com.maxleap.exception">com.maxleap.exception.MLTimeoutException</a> extends <a href="com/maxleap/exception/MLServerException.html" title="class in com.maxleap.exception">MLServerException</a> implements Serializable</h3>
</li>
<li class="blockList"><a name="com.maxleap.exception.MLUndefinedException">
<!-- -->
</a>
<h3>Class <a href="com/maxleap/exception/MLUndefinedException.html" title="class in com.maxleap.exception">com.maxleap.exception.MLUndefinedException</a> extends <a href="com/maxleap/exception/MLException.html" title="class in com.maxleap.exception">MLException</a> implements Serializable</h3>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li><a href="overview-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>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?serialized-form.html" target="_top">Frames</a></li>
<li><a href="serialized-form.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>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|
cc0-1.0
|
waiting4bassel/waiting-latex
|
gitbook/ar/frontmatter/note_to_readers.md
|
1404
|
# رسالة إلى القراء
أنتظر باسل منذ 15 آذار 2012 … لم أختبر يوماً ألماً أفظع من ألم الانتظار …<br/>
م أعش قط أسوأ من حالة الانتظار .
وأنا في انتظاره ، كونت معظم أفكاري ، حققت أكبر أحلامي ، وصلت لأقصى درجات الحب والجنون<br/>
وأنا في انتظاره ، بكيت كما لم أبكِ ، ضحكت كما لم أضحك ، عشقته كما لم أعشق في حياتي ،<br/>
ونحن في البعد ، كنا قريبين من بعضنا كما لم نكن يوماً قبل البعد .
رسالتي إلى كل من غرق في بحر الانتظار … إلى كل من يكتوي بنار الانتظار :
وأنتم في الانتظار ، عيشوا كل التفاصيل لأقصاها ، بالحزن والفرح ، بالأمل واليأس ، بالضحك والبكاء ،<br/>
بالخوف والاطمئنان .
وأنتم في الانتظار ، غيروا واقعكم ، ارسموا مستقبلكم ، اكسروا قيودكم
امضوا في طريق الحب دون أن تلتفتوا ، دون أن تفكروا
احلموا ، اغضبوا ، استسلموا لجنونكم الجميل
وأنتم في حالة الانتظار ، لا تنتظروا ، بل قاوموا لعنة الانتظار .
|
cc0-1.0
|
innoq/smarthome
|
bundles/core/org.eclipse.smarthome.core.transform.test/src/test/java/org/eclipse/smarthome/core/transform/internal/AbstractTransformationServiceTest.java
|
2058
|
/**
* Copyright (c) 2014 openHAB UG (haftungsbeschraenkt) and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.smarthome.core.transform.internal;
/**
* @author Thomas.Eichstaedt-Engelen
*/
public abstract class AbstractTransformationServiceTest {
protected String source = "<?xml version=\"1.0\"?><xml_api_reply version=\"1\"><weather module_id=\"0\"" +
" tab_id=\"0\" mobile_row=\"0\" mobile_zipped=\"1\" row=\"0\" section=\"0\" ><forecast_information>" +
"<city data=\"Krefeld, North Rhine-Westphalia\"/><postal_code data=\"Krefeld Germany\"/>" +
"<latitude_e6 data=\"\"/><longitude_e6 data=\"\"/><forecast_date data=\"2011-03-01\"/>" +
"<current_date_time data=\"2011-03-01 15:20:00 +0000\"/><unit_system data=\"SI\"/></forecast_information>" +
"<current_conditions><condition data=\"Meistens bew�lkt\"/><temp_f data=\"46\"/><temp_c data=\"8\"/>" +
"<humidity data=\"Feuchtigkeit: 66 %\"/><icon data=\"/ig/images/weather/mostly_cloudy.gif\"/>" +
"<wind_condition data=\"Wind: N mit 26 km/h\"/></current_conditions><forecast_conditions><day_of_week data=\"Di.\"/>" +
"<low data=\"-1\"/><high data=\"6\"/><icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/>" +
"</forecast_conditions><forecast_conditions><day_of_week data=\"Mi.\"/><low data=\"-1\"/><high data=\"8\"/>" +
"<icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/></forecast_conditions><forecast_conditions>" +
"<day_of_week data=\"Do.\"/><low data=\"-1\"/><high data=\"8\"/><icon data=\"/ig/images/weather/sunny.gif\"/>" +
"<condition data=\"Klar\"/></forecast_conditions><forecast_conditions><day_of_week data=\"Fr.\"/><low data=\"0\"/>" +
"<high data=\"8\"/><icon data=\"/ig/images/weather/sunny.gif\"/><condition data=\"Klar\"/></forecast_conditions>" +
"</weather></xml_api_reply>";
}
|
epl-1.0
|
McGill-DP-Group/seg.jUCMNav
|
src/seg/jUCMNav/importexport/z151/generated/Description.java
|
1823
|
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1.9-03/31/2009 04:14 PM(snajper)-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2009.07.19 at 07:21:12 PM EDT
//
package seg.jUCMNav.importexport.z151.generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for Description complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="Description">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="description" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Description", propOrder = {
"description"
})
public class Description {
@XmlElement(required = true)
protected String description;
/**
* Gets the value of the description property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDescription() {
return description;
}
/**
* Sets the value of the description property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDescription(String value) {
this.description = value;
}
}
|
epl-1.0
|
acshea/edgware
|
gaian/GAIANDB_V2.1.7_20160201/doc/javadoc-errors/allclasses-frame.html
|
748
|
<!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_04-ea) on Mon Feb 01 19:29:33 GMT 2016 -->
<title>All Classes</title>
<meta name="date" content="2016-02-01">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
<h1 class="bar">All Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="com/ibm/gaiandb/diags/GDBMessages.html" title="class in com.ibm.gaiandb.diags" target="classFrame">GDBMessages</a></li>
<li><a href="com/ibm/gaiandb/diags/GDBMessages.html" title="class in com.ibm.gaiandb.diags" target="classFrame">GDBMessages</a></li>
</ul>
</div>
</body>
</html>
|
epl-1.0
|
BOTlibre/BOTlibre
|
swingdroid/source/android/app/ProgressDialog.java
|
1233
|
/******************************************************************************
*
* Copyright 2014 Paphus Solutions Inc.
*
* Licensed under the Eclipse Public License, Version 1.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.eclipse.org/legal/epl-v10.html
*
* 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 android.app;
import java.awt.Cursor;
/**
* Stub class.
*/
public class ProgressDialog extends AlertDialog {
public ProgressDialog(Activity activty) {
super(activty);
}
public void show() {
this.activity.frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
}
public void dismiss() {
this.activity.frame.setCursor(Cursor.getDefaultCursor());
}
public void setCancelable(boolean cancelable){
}
}
|
epl-1.0
|
OpenLiberty/open-liberty
|
dev/com.ibm.ws.wsoc/src/com/ibm/ws/wsoc/HandshakeProcessor.java
|
20135
|
/*******************************************************************************
* Copyright (c) 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.ibm.ws.wsoc;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.websocket.Endpoint;
import javax.websocket.EndpointConfig;
import javax.websocket.Extension;
import javax.websocket.Extension.Parameter;
import javax.websocket.server.ServerEndpointConfig;
import com.ibm.websphere.ras.Tr;
import com.ibm.websphere.ras.TraceComponent;
import com.ibm.websphere.ras.annotation.Sensitive;
import com.ibm.ws.common.internal.encoder.Base64Coder;
import com.ibm.ws.wsoc.external.ExtensionExt;
import com.ibm.ws.wsoc.external.HandshakeRequestExt;
import com.ibm.ws.wsoc.external.HandshakeResponseExt;
import com.ibm.ws.wsoc.external.ParameterExt;
import com.ibm.ws.wsoc.util.Utils;
/* example of request and response
GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Origin: http://example.com
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13
Server responds like this:
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
*/
public class HandshakeProcessor {
private static final TraceComponent tc = Tr.register(HandshakeProcessor.class);
private String headerHost = null;
private String headerUpgrade = null;
private String headerConnection = null;
private String headerSecWebSocketKey = null;
private String headerOrigin = null;
private String headerSecWebSocketProtocol = null;
private String headerSecWebSocketVersion = null;
private String[] clientSubProtocols = null;
private List<Extension> clientExtensions = null;
private List<Extension> configuredExtensions = null;
private final static String subProtocolDelimiter = ",";
// stuff used for populating the HandshakeRequest object for (user) configurator modification
private final Map<String, List<String>> requestHeaders = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
private final Map<String, List<String>> parameterMap = new HashMap<String, List<String>>();
private URI requestURI = null;
private HttpServletResponse httpResponse = null;
private HttpServletRequest httpRequest = null;
private Map<String, String> extraParamMap = null;
private ServerEndpointConfig endpointConfig = null;
private ServerEndpointConfig.Configurator endpointConfigurator = null;
private final ParametersOfInterest things = new ParametersOfInterest();
public HandshakeProcessor() {}
public void initialize(HttpServletRequest _hsr, HttpServletResponse resp, Map<String, String> extraParams) {
httpRequest = _hsr;
httpResponse = resp;
extraParamMap = extraParams;
}
public void addWsocConfigurationData(ServerEndpointConfig _config, ServerEndpointConfig.Configurator _configurator) {
endpointConfig = _config;
endpointConfigurator = _configurator;
}
public ParametersOfInterest getParametersOfInterest() {
return things;
}
public void readRequestInfo() throws Exception {
Enumeration<String> names = httpRequest.getHeaderNames();
Map<String, String[]> paramMap = httpRequest.getParameterMap();
for (Map.Entry<String, String[]> entry : paramMap.entrySet()) {
String key = entry.getKey();
String[] value = entry.getValue();
List<String> list = Arrays.asList(value);
parameterMap.put(key, list);
}
if (extraParamMap != null) {
for (String key : extraParamMap.keySet()) {
parameterMap.put(key, Arrays.asList(extraParamMap.get(key)));
}
}
requestURI = new URI(httpRequest.getRequestURI());
things.setParameterMap(parameterMap);
things.setQueryString(httpRequest.getQueryString());
things.setURI(requestURI);
things.setUserPrincipal(httpRequest.getUserPrincipal());
boolean secure = httpRequest.isSecure();
if (!secure) {
String s = httpRequest.getAuthType();
if ((s != null) && (s.equalsIgnoreCase(HttpServletRequest.BASIC_AUTH))) {
secure = true;
}
}
things.setSecure(secure);
things.setHttpSession(httpRequest.getSession());
while (names.hasMoreElements()) {
String name = names.nextElement();
Enumeration<String> headerValues = httpRequest.getHeaders(name);
List<String> list = Collections.list(headerValues);
requestHeaders.put(name, list);
String headerValue = httpRequest.getHeader(name);
String compName = name.trim();
if (compName.compareToIgnoreCase(Constants.HEADER_NAME_HOST) == 0) {
headerHost = headerValue;
if (tc.isDebugEnabled()) {
Tr.debug(tc, "host header has a value of: " + headerHost);
}
} else if (compName.compareToIgnoreCase(Constants.HEADER_NAME_UPGRADE) == 0) {
headerUpgrade = headerValue;
if (tc.isDebugEnabled()) {
Tr.debug(tc, "upgrade header has a value of: " + headerUpgrade);
}
} else if (compName.compareToIgnoreCase(Constants.HEADER_NAME_CONNECTION) == 0) {
headerConnection = headerValue;
if (tc.isDebugEnabled()) {
Tr.debug(tc, "connection header has a value of: " + headerConnection);
}
} else if (compName.compareToIgnoreCase(Constants.HEADER_NAME_SEC_WEBSOCKET_KEY) == 0) {
headerSecWebSocketKey = headerValue;
if (headerSecWebSocketKey != null) {
headerSecWebSocketKey = headerSecWebSocketKey.trim();
}
} else if (compName.compareToIgnoreCase(Constants.HEADER_NAME_ORIGIN) == 0) {
headerOrigin = headerValue;
if (tc.isDebugEnabled()) {
Tr.debug(tc, "Origin header has a value of: " + headerOrigin);
}
} else if (compName.compareToIgnoreCase(Constants.HEADER_NAME_SEC_WEBSOCKET_PROTOCOL) == 0) {
for (String val : list) {
if (headerSecWebSocketProtocol == null) {
headerSecWebSocketProtocol = val;
} else {
headerSecWebSocketProtocol = headerSecWebSocketProtocol + subProtocolDelimiter + val;
}
}
// parse into array for later comparisons
if ((headerSecWebSocketProtocol != null) && (headerSecWebSocketProtocol.length() > 0)) {
clientSubProtocols = headerSecWebSocketProtocol.split(subProtocolDelimiter);
// trim out the white spaces
int len = clientSubProtocols.length;
for (int i = 0; i < len; i++) {
clientSubProtocols[i] = clientSubProtocols[i].trim();
}
}
} else if (compName.compareToIgnoreCase(Constants.HEADER_NAME_SEC_WEBSOCKET_EXTENSIONS) == 0) {
clientExtensions = parseClientExtensions(list);
} else if (compName.compareToIgnoreCase(Constants.HEADER_NAME_SEC_WEBSOCKET_VERSION) == 0) {
headerSecWebSocketVersion = headerValue;
if (tc.isDebugEnabled()) {
Tr.debug(tc, "WebSocketVersion header has a value of: " + headerSecWebSocketVersion);
}
things.setWsocProtocolVersion(headerSecWebSocketVersion);
}
}
}
public void addResponseHeaders() {
// set the following headers in the HTTP Response object
// upgrade, connection, Sec-WebSocket-Accept
String accept;
httpResponse.setHeader(Constants.HEADER_NAME_UPGRADE, Constants.HEADER_VALUE_WEBSOCKET);
httpResponse.setHeader(Constants.HEADER_NAME_CONNECTION, Constants.HEADER_VALUE_UPGRADE);
accept = this.makeAcceptResponseHeaderValue();
httpResponse.setHeader(Constants.MC_HEADER_NAME_SEC_WEBSOCKET_ACCEPT, accept);
}
public boolean checkOrigin() {
return endpointConfigurator.checkOrigin(headerOrigin);
}
public void modifyHandshake(Endpoint _ep, EndpointConfig _epc) {
Map<String, List<String>> responseHeaders = new TreeMap<String, List<String>>(String.CASE_INSENSITIVE_ORDER);
Collection<String> names = httpResponse.getHeaderNames();
Iterator<String> it = names.iterator();
while (it.hasNext()) {
String name = it.next();
Collection<String> headerValues = httpResponse.getHeaders(name);
List<String> list = new ArrayList<String>(headerValues);
responseHeaders.put(name, list);
}
// create handshake request object to give to modifier
HandshakeRequestExt handshakeRequest = new HandshakeRequestExt(httpRequest, requestHeaders, parameterMap, requestURI, _ep, _epc);
// create handshake response object to give to modifier
HandshakeResponseExt handshakeResponse = new HandshakeResponseExt(responseHeaders);
endpointConfigurator.modifyHandshake(endpointConfig, handshakeRequest, handshakeResponse);
Map<String, List<String>> hdrs = handshakeResponse.getHeaders();
// We can add new headers, or overwrite existing, but we cannot remove....
// Iterator<String> i = hdrs.keySet().iterator();
Iterator<Entry<String, List<String>>> i = hdrs.entrySet().iterator();
while (i.hasNext()) {
Entry<String, List<String>> entry = i.next();
List<String> list = entry.getValue();
if (list == null) {
httpResponse.setHeader(entry.getKey(), "");
continue;
}
if (list.size() == 0) {
httpResponse.setHeader(entry.getKey(), "");
}
for (int x = 0; x < list.size(); x++) {
if (x == 0) {
httpResponse.setHeader(entry.getKey(), list.get(x));
} else {
httpResponse.addHeader(entry.getKey(), list.get(x));
}
}
}
}
public void determineAndSetSubProtocol() {
// the agree sub protocol is the first one in the local list the matches any of the ones in the client list.
List<String> localSubProtocolList = endpointConfig.getSubprotocols();
if (localSubProtocolList == null) {
localSubProtocolList = Collections.emptyList();
}
List<String> clientProtocols = null;
if (clientSubProtocols == null) {
clientProtocols = Collections.emptyList();
} else {
clientProtocols = Arrays.asList(clientSubProtocols);
}
String agreedSubProtocol = endpointConfigurator.getNegotiatedSubprotocol(localSubProtocolList, clientProtocols);
things.setAgreedSubProtocol(agreedSubProtocol);
things.setLocalSubProtocols(localSubProtocolList);
if ((!"".equals(agreedSubProtocol)) && (agreedSubProtocol != null)) {
httpResponse.setHeader(Constants.HEADER_NAME_SEC_WEBSOCKET_PROTOCOL, agreedSubProtocol);
}
}
public void determineAndSetExtensions() {
// Even though we have no built in extensions, we will read the ServerEndpoingConfig to see what they configure
// COudl be an extension that looks at headers...
configuredExtensions = endpointConfig.getExtensions();
if (configuredExtensions == null) {
configuredExtensions = Collections.emptyList();
}
if (clientExtensions == null) {
clientExtensions = Collections.emptyList();
}
List<Extension> agreedExtensions = endpointConfigurator.getNegotiatedExtensions(configuredExtensions, clientExtensions);
if (agreedExtensions != null) {
if (agreedExtensions.size() > 0) {
StringBuffer buf = new StringBuffer();
boolean first = true;
for (Extension ext : agreedExtensions) {
if (first) {
first = false;
} else {
buf.append(", ");
}
buf.append(ext.getName());
List<Parameter> li = ext.getParameters();
if (li != null) {
if (li.size() > 0) {
for (Parameter p : li) {
buf.append("; " + p.getName() + "=" + p.getValue());
}
}
}
}
things.setNegotiatedExtensions(agreedExtensions);
httpResponse.setHeader(Constants.HEADER_NAME_SEC_WEBSOCKET_EXTENSIONS, buf.toString());
}
}
}
public void verifyHeaders() throws Exception {
// Require HTTP/1.1 or above...
String protocol = httpRequest.getProtocol();
String[] args = protocol.split("/");
if (args.length < 2) {
throw new Exception("Websocket request processed, but no HTTP Protocol version was provided..");
} else {
float version = Float.valueOf(args[1]);
if (version < 1.1) {
throw new Exception("Websocket request processed, provided HTTP Protocol level \"" + protocol + "\"provided but WebSocket support requires HTTP/1.1 or above.");
}
}
// Must have host header..
if (headerHost == null) {
throw new Exception("Websocket request processing found no Host header.");
}
// Must have Upgrade header equal to websocket
if ((headerUpgrade == null) || (!Constants.HEADER_VALUE_WEBSOCKET.equalsIgnoreCase(headerUpgrade))) {
throw new Exception("Websocket request processed but provided upgrade header \"" + headerUpgrade + "\" does not match " + Constants.HEADER_VALUE_WEBSOCKET
+ ".");
}
//Must have Connection:Upgrade header
if (headerConnection != null) {
boolean found = false;
String[] connection = headerConnection.split(",");
for (String conn : connection) {
if (conn.trim().equalsIgnoreCase(Constants.HEADER_VALUE_UPGRADE)) {
found = true;
}
}
if (!found) {
throw new Exception("Websocket request processed but provided connection header \"" + headerConnection + "\" does not match " + Constants.HEADER_VALUE_UPGRADE
+ ".");
}
} else {
throw new Exception("Websocket request processed but provided connection header \"" + headerConnection + "\" does not match " + Constants.HEADER_VALUE_UPGRADE
+ ".");
}
// Version must equal 13... better logic will be provided once we support more than one version
int supportedVersion = Integer.valueOf(Constants.HEADER_VALUE_FOR_SEC_WEBSOCKET_VERSION);
if (headerSecWebSocketVersion == null) {
httpResponse.setIntHeader(Constants.HEADER_NAME_SEC_WEBSOCKET_VERSION, supportedVersion);
throw new Exception("Websocket request processed, but no websocket version provided.");
} else {
try {
int version = Integer.parseInt(headerSecWebSocketVersion);
if (version != supportedVersion) {
httpResponse.setIntHeader(Constants.HEADER_NAME_SEC_WEBSOCKET_VERSION, supportedVersion);
throw new Exception("Websocket request processed, but Version header of \"" + headerSecWebSocketVersion + "\" is not a match for supported version "
+ supportedVersion + ".");
}
} catch (NumberFormatException nfe) {
httpResponse.setIntHeader(Constants.HEADER_NAME_SEC_WEBSOCKET_VERSION, supportedVersion);
throw new Exception("Websocket request processed, but version header of \"" + headerSecWebSocketVersion + "\" is not valid number.", nfe);
}
}
// Check for blank or null accept key
if (("".equals(headerSecWebSocketKey)) || (headerSecWebSocketKey == null)) {
throw new Exception("Websocket request processed, but Sec-WebSocket-Key is blank or null");
}
byte[] decodedBytes = Base64Coder.base64DecodeString(headerSecWebSocketKey);
if (decodedBytes == null) {
throw new Exception("Websocket request processed, but client sent Sec-WebSocket-Key that has not been base64 encoded.");
}
if (decodedBytes.length != 16) {
throw new Exception("Websocket request processed, but client sent Sec-WebSocket-Key that is not 16 bytes");
}
}
@Sensitive
private String makeAcceptResponseHeaderValue() {
String acceptKey = "";
try {
acceptKey = Utils.makeAcceptResponseHeaderValue(headerSecWebSocketKey);
} catch (NoSuchAlgorithmException e) {
// allow instrumented FFDC to be used here
} catch (UnsupportedEncodingException e) {
// allow instrumented FFDC to be used here
}
return acceptKey;
}
public static List<Extension> parseClientExtensions(List<String> list) {
List<Extension> extensions = new ArrayList<Extension>(10);
String headerSecWebSocketExtensions = null;
for (String val : list) {
if (headerSecWebSocketExtensions == null) {
headerSecWebSocketExtensions = val;
} else {
headerSecWebSocketExtensions = headerSecWebSocketExtensions + subProtocolDelimiter + val;
}
}
if ((headerSecWebSocketExtensions != null) && (headerSecWebSocketExtensions.length() > 0)) {
String[] extArr = headerSecWebSocketExtensions.split(subProtocolDelimiter);
for (int i = 0; i < extArr.length; i++) {
String[] parameters = extArr[i].trim().split(";");
String extName = parameters[0];
List<Extension.Parameter> paramList = new ArrayList<Extension.Parameter>(parameters.length - 1);
if (parameters.length > 1) {
for (int z = 1; z < parameters.length; z++) {
String[] namevals = parameters[z].trim().split("=");
String val = "";
if (namevals.length > 1) {
val = namevals[1];
}
paramList.add(new ParameterExt(namevals[0], val));
}
}
extensions.add(new ExtensionExt(extName, paramList));
}
}
return extensions;
}
}
|
epl-1.0
|
OpenLiberty/open-liberty
|
dev/com.ibm.ws.jaxws.clientcontainer_fat/fat/src/com/ibm/ws/jaxws/test/wsr/client/TestUtils.java
|
7976
|
/*******************************************************************************
* Copyright (c) 2019 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.ibm.ws.jaxws.test.wsr.client;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Iterator;
import java.util.Map;
import javax.xml.namespace.QName;
import javax.xml.stream.FactoryConfigurationError;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamConstants;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
import javax.xml.ws.BindingProvider;
import com.ibm.websphere.simplicity.RemoteFile;
import componenttest.topology.impl.LibertyServer;
import componenttest.topology.utils.HttpUtils;
public class TestUtils {
/*
* This method is to work around the issue of the hard-coded address and port value which specified in the wsdl file.
* A servlet could use this util to reset the EndpointAddress with the correct addr and value of a test server.
* In future, if the we support vendor plan, we could specify the values there.
*/
public static void setEndpointAddressProperty(BindingProvider bp, String serverAddr, int serverPort) throws IOException {
String endpointAddr = bp.getRequestContext().get(BindingProvider.ENDPOINT_ADDRESS_PROPERTY).toString();
URL endpointUrl = new URL(endpointAddr);
String newEndpointAddr = endpointUrl.getProtocol() + "://" + serverAddr + ":" + serverPort + endpointUrl.getPath();
bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, newEndpointAddr);
}
/**
* Validate the XML attributes
*
* @param is
* @param attributeParams The Map.Entry key likes "targetNamespace=http://com.ibm/jaxws/testmerge/replace/", value likes "{http://schemas.xmlsoap.org/wsdl/}definitions"
* @return
* @throws XMLStreamException
* @throws FactoryConfigurationError
*/
public static Map<String, QName> validateXMLAttributes(InputStream is, Map<String, QName> attributeParams) throws XMLStreamException, FactoryConfigurationError {
XMLStreamReader reader = null;
try {
reader = XMLInputFactory.newInstance().createXMLStreamReader(is);
while (reader.hasNext()) {
int event = reader.next();
if (XMLStreamConstants.START_ELEMENT == event) {
Iterator<Map.Entry<String, QName>> iter = attributeParams.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry<String, QName> entry = iter.next();
String[] keyValuePair = entry.getKey().split("=");
QName elementQName = entry.getValue();
if (reader.getLocalName().equals(elementQName.getLocalPart())
&& reader.getNamespaceURI().equals(elementQName.getNamespaceURI())
&& compareAttribute(reader, keyValuePair[0], keyValuePair[1])) {
iter.remove();
}
}
if (attributeParams.isEmpty()) {
break;
}
}
}
} finally {
if (reader != null) {
reader.close();
}
}
return attributeParams;
}
private static boolean compareAttribute(XMLStreamReader reader, String attrName, String attrValue) {
int count = reader.getAttributeCount();
for (int i = 0; i < count; i++) {
String name = reader.getAttributeLocalName(i);
String value = reader.getAttributeValue(i);
if (name.equals(attrName) && value.equals(attrValue)) {
return true;
}
}
return false;
}
/**
* Copy the file to server, rename if the targetFileName is not equal to srcFileName.
*
* @param server, the LibertyServer
* @param srcPathFromPubishFolder, the folder path relative to publish folder
* @param srcFileName, the source file name to copy
* @param targetPathFromServerRoot, the target path relative to server root
* @param targetFileName, the target file name
* @throws Exception
*/
public static void publishFileToServer(LibertyServer server, String srcPathFromPubishFolder, String srcFileName, String targetPathFromServerRoot,
String targetFileName) throws Exception {
server.copyFileToLibertyServerRoot(targetPathFromServerRoot, srcPathFromPubishFolder + "/" + srcFileName);
if (targetFileName != null && !targetFileName.isEmpty() && !targetFileName.equals(srcFileName)) {
server.renameLibertyServerRootFile(targetPathFromServerRoot + "/" + srcFileName, targetPathFromServerRoot + "/" + targetFileName);
}
}
/**
* Replace the string in a server file.
*
* @param server, the LibertyServer
* @param filePathFromServerRoot, the file path relative to server root
* @param fromStr, the string that need replace in the file.
* @param toStr, the string to replace the original one.
* @throws Exception
*/
public static void replaceServerFileString(LibertyServer server, String filePathFromServerRoot, String fromStr, String toStr) throws Exception {
InputStream is = null;
OutputStream os = null;
try {
RemoteFile serverFile = server.getFileFromLibertyServerRoot(filePathFromServerRoot);
is = serverFile.openForReading();
StringBuilder builder = new StringBuilder();
//read
InputStreamReader isr = new InputStreamReader(is);
BufferedReader bfin = new BufferedReader(isr);
String rLine = "";
while ((rLine = bfin.readLine()) != null) {
builder.append(rLine);
}
is.close();
//replace
String xmiText = builder.toString();
String updatedText = xmiText.replaceAll(fromStr, toStr);
//write
os = serverFile.openForWriting(false);
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(os));
writer.write(updatedText);
writer.close();
} catch (Exception e) {
throw e;
} finally {
if (is != null) {
try {
is.close();
} catch (IOException e) {
//ignore;
}
}
if (os != null) {
try {
os.close();
} catch (IOException e) {
//ignore;
}
}
}
}
public static String getServletResponse(String servletUrl) throws Exception {
URL url = new URL(servletUrl);
HttpURLConnection con = HttpUtils.getHttpConnection(url, HttpURLConnection.HTTP_OK, 10);
BufferedReader br = HttpUtils.getConnectionStream(con);
String result = br.readLine();
String line;
while ((line = br.readLine()) != null) {
result += line;
}
return result;
}
}
|
epl-1.0
|
OpenLiberty/open-liberty
|
dev/com.ibm.ws.jpa.tests.spec10.query_fat.common/test-applications/svlquery/src/com/ibm/ws/query/web/loopqueryano/JULoopQueryAnoTest_001_Servlet.java
|
11753
|
/*******************************************************************************
* Copyright (c) 2021 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.ibm.ws.query.web.loopqueryano;
import javax.annotation.PostConstruct;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnit;
import javax.servlet.annotation.WebServlet;
import org.junit.Test;
import com.ibm.ws.query.testlogic.JULoopQueryAnoTest;
import com.ibm.ws.query.utils.SetupQueryTestCase;
import com.ibm.ws.testtooling.testinfo.JPAPersistenceContext;
import com.ibm.ws.testtooling.testinfo.JPAPersistenceContext.PersistenceContextType;
import com.ibm.ws.testtooling.testinfo.JPAPersistenceContext.PersistenceInjectionType;
import com.ibm.ws.testtooling.vehicle.web.JPATestServlet;
@SuppressWarnings("serial")
@WebServlet(urlPatterns = "/JULoopQueryAnoTest_001_Servlet")
public class JULoopQueryAnoTest_001_Servlet extends JPATestServlet {
// Application Managed JTA
@PersistenceUnit(unitName = "QUERY_JTA")
private EntityManagerFactory amjtaEmf;
private SetupQueryTestCase setup = null;
@PostConstruct
private void initFAT() {
testClassName = JULoopQueryAnoTest.class.getName();
jpaPctxMap.put("test-jpa-resource-amjta",
new JPAPersistenceContext("test-jpa-resource-amjta", PersistenceContextType.APPLICATION_MANAGED_JTA, PersistenceInjectionType.FIELD, "amjtaEmf"));
jpaPctxMap.put("test-jpa-resource-amrl",
new JPAPersistenceContext("test-jpa-resource-amrl", PersistenceContextType.APPLICATION_MANAGED_RL, PersistenceInjectionType.FIELD, "amrlEmf"));
jpaPctxMap.put("test-jpa-resource-cmts",
new JPAPersistenceContext("test-jpa-resource-cmts", PersistenceContextType.CONTAINER_MANAGED_TS, PersistenceInjectionType.FIELD, "cmtsEm"));
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test001_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test001_AMJTA_Web";
final String testMethod = "testLoop001";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test002_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test002_AMJTA_Web";
final String testMethod = "testLoop002";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test003_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test003_AMJTA_Web";
final String testMethod = "testLoop003";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test004_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test004_AMJTA_Web";
final String testMethod = "testLoop004";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test005_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test005_AMJTA_Web";
final String testMethod = "testLoop005";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test006_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test006_AMJTA_Web";
final String testMethod = "testLoop006";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test007_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test007_AMJTA_Web";
final String testMethod = "testLoop007";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test008_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test008_AMJTA_Web";
final String testMethod = "testLoop008";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test009_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test009_AMJTA_Web";
final String testMethod = "testLoop009";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test010_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test010_AMJTA_Web";
final String testMethod = "testLoop010";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test011_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test011_AMJTA_Web";
final String testMethod = "testLoop011";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test012_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test012_AMJTA_Web";
final String testMethod = "testLoop012";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test013_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test013_AMJTA_Web";
final String testMethod = "testLoop013";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test014_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test014_AMJTA_Web";
final String testMethod = "testLoop014";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test015_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test015_AMJTA_Web";
final String testMethod = "testLoop015";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test016_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test016_AMJTA_Web";
final String testMethod = "testLoop016";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test017_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test017_AMJTA_Web";
final String testMethod = "testLoop017";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test018_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test018_AMJTA_Web";
final String testMethod = "testLoop018";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
// TODO: Fails, review failure
// @Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test019_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test019_AMJTA_Web";
final String testMethod = "testLoop019";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test020_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test020_AMJTA_Web";
final String testMethod = "testLoop020";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test021_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test021_AMJTA_Web";
final String testMethod = "testLoop021";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test022_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test022_AMJTA_Web";
final String testMethod = "testLoop022";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test023_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test023_AMJTA_Web";
final String testMethod = "testLoop023";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test024_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test024_AMJTA_Web";
final String testMethod = "testLoop024";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
@Test
public void jpa_spec10_query_svlquery_juloopquery_ano_test025_AMJTA_Web() throws Exception {
final String testName = "jpa_spec10_query_svlquery_juloopquery_ano_test025_AMJTA_Web";
final String testMethod = "testLoop025";
final String testResource = "test-jpa-resource-amjta";
executeTest(testName, testMethod, testResource);
}
}
|
epl-1.0
|
stour/che
|
plugins/plugin-java/che-plugin-java-ext-lang-client/src/test/java/org/eclipse/che/ide/ext/java/client/action/MarkDirAsSourceActionTest.java
|
8195
|
/*******************************************************************************
* Copyright (c) 2012-2016 Codenvy, S.A.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Codenvy, S.A. - initial API and implementation
*******************************************************************************/
package org.eclipse.che.ide.ext.java.client.action;
import com.google.gwtmockito.GwtMockitoTestRunner;
import org.eclipse.che.api.promises.client.Operation;
import org.eclipse.che.api.promises.client.Promise;
import org.eclipse.che.api.promises.client.PromiseError;
import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto;
import org.eclipse.che.ide.api.action.ActionEvent;
import org.eclipse.che.ide.api.action.Presentation;
import org.eclipse.che.ide.api.app.AppContext;
import org.eclipse.che.ide.api.app.CurrentProject;
import org.eclipse.che.ide.api.notification.NotificationManager;
import org.eclipse.che.ide.api.selection.Selection;
import org.eclipse.che.ide.ext.java.client.JavaLocalizationConstant;
import org.eclipse.che.ide.ext.java.client.JavaResources;
import org.eclipse.che.ide.ext.java.client.project.classpath.ClasspathResolver;
import org.eclipse.che.ide.ext.java.client.project.classpath.service.ClasspathServiceClient;
import org.eclipse.che.ide.ext.java.client.project.node.PackageNode;
import org.eclipse.che.ide.ext.java.client.project.node.SourceFolderNode;
import org.eclipse.che.ide.ext.java.shared.dto.classpath.ClasspathEntryDto;
import org.eclipse.che.ide.part.explorer.project.ProjectExplorerPresenter;
import org.eclipse.che.ide.project.node.FolderReferenceNode;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.InjectMocks;
import org.mockito.Matchers;
import org.mockito.Mock;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import static org.eclipse.che.ide.api.notification.StatusNotification.DisplayMode.EMERGE_MODE;
import static org.eclipse.che.ide.api.notification.StatusNotification.Status.FAIL;
import static org.mockito.Matchers.anyBoolean;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
/**
* Test for {@link MarkDirAsSourceAction}
*
* @author Valeriy Svydenko
*/
@RunWith(GwtMockitoTestRunner.class)
public class MarkDirAsSourceActionTest {
final private static String PROJECT_PATH = "/projects/path";
final private static String TEXT = "to be or not to be";
@Mock
private JavaResources javaResources;
@Mock
private AppContext appContext;
@Mock
private ClasspathServiceClient classpathService;
@Mock
private ClasspathResolver classpathResolver;
@Mock
private NotificationManager notificationManager;
@Mock
private ProjectExplorerPresenter projectExplorerPresenter;
@Mock
private JavaLocalizationConstant locale;
@Mock
private CurrentProject currentProject;
@Mock
private ProjectConfigDto projectConfigDto;
@Mock
private ActionEvent actionEvent;
@Mock
private Presentation presentation;
@Mock
private Selection selection;
@Mock
private FolderReferenceNode folderReferenceNode;
@Mock
private Promise<List<ClasspathEntryDto>> classpathPromise;
@Mock
private PromiseError promiseError;
@Captor
private ArgumentCaptor<Operation<List<ClasspathEntryDto>>> classpathCapture;
@Captor
private ArgumentCaptor<Operation<PromiseError>> classpathErrorCapture;
@InjectMocks
private MarkDirAsSourceAction action;
@Before
public void setUp() throws Exception {
when(appContext.getCurrentProject()).thenReturn(currentProject);
when(currentProject.getProjectConfig()).thenReturn(projectConfigDto);
when(projectConfigDto.getPath()).thenReturn(PROJECT_PATH);
when(projectExplorerPresenter.getSelection()).thenReturn(selection);
when(selection.getHeadElement()).thenReturn(folderReferenceNode);
when(actionEvent.getPresentation()).thenReturn(presentation);
FolderReferenceNode folder = mock(FolderReferenceNode.class);
when(selection.getHeadElement()).thenReturn(folder);
when(classpathService.getClasspath(anyString())).thenReturn(classpathPromise);
when(classpathPromise.then(Matchers.<Operation<List<ClasspathEntryDto>>>anyObject())).thenReturn(classpathPromise);
}
@Test
public void titleAndDescriptionShouldBeSet() throws Exception {
verify(locale).markDirectoryAsSourceAction();
verify(locale).markDirectoryAsSourceDescription();
}
@Test
public void actionShouldBePerformed() throws Exception {
List<ClasspathEntryDto> classpathEntries = new ArrayList<>();
Set<String> sources = new HashSet<>();
when(folderReferenceNode.getStorablePath()).thenReturn(TEXT);
when(classpathResolver.getSources()).thenReturn(sources);
action.actionPerformed(actionEvent);
verify(classpathService.getClasspath(PROJECT_PATH)).then(classpathCapture.capture());
classpathCapture.getValue().apply(classpathEntries);
verify(classpathResolver).resolveClasspathEntries(classpathEntries);
verify(classpathResolver).getSources();
Assert.assertEquals(1, sources.size());
verify(classpathResolver).updateClasspath();
}
@Test
public void readingClasspathFailed() throws Exception {
action.actionPerformed(actionEvent);
when(promiseError.getMessage()).thenReturn(TEXT);
verify(classpathService.getClasspath(PROJECT_PATH)).catchError(classpathErrorCapture.capture());
classpathErrorCapture.getValue().apply(promiseError);
verify(notificationManager).notify("Can't get classpath", TEXT, FAIL, EMERGE_MODE);
}
@Test
public void actionShouldBeHideIfSelectedNodeIsSource() throws Exception {
SourceFolderNode sourceFolder = mock(SourceFolderNode.class);
when(selection.getHeadElement()).thenReturn(sourceFolder);
action.updateInPerspective(actionEvent);
verify(presentation).setVisible(false);
verify(presentation).setEnabled(anyBoolean());
}
@Test
public void actionShouldBeVisibleIfSelectedNodeIsNotSource() throws Exception {
action.updateInPerspective(actionEvent);
verify(presentation).setVisible(true);
verify(presentation).setEnabled(anyBoolean());
}
@Test
public void actionShouldBeDisableIfSelectionIsMultiple() throws Exception {
when(selection.isSingleSelection()).thenReturn(false);
action.updateInPerspective(actionEvent);
verify(presentation).setVisible(anyBoolean());
verify(presentation).setEnabled(false);
}
@Test
public void actionShouldBeDisableIfSelectedNodeIsPackage() throws Exception {
PackageNode packageNode = mock(PackageNode.class);
when(selection.getHeadElement()).thenReturn(packageNode);
when(selection.isSingleSelection()).thenReturn(true);
action.updateInPerspective(actionEvent);
verify(presentation).setVisible(anyBoolean());
verify(presentation).setEnabled(false);
}
@Test
public void actionShouldBeDisableIfSelectedNodeIsNotFolder() throws Exception {
Object someNode = mock(Object.class);
when(selection.getHeadElement()).thenReturn(someNode);
when(selection.isSingleSelection()).thenReturn(true);
action.updateInPerspective(actionEvent);
verify(presentation).setVisible(anyBoolean());
verify(presentation).setEnabled(false);
}
}
|
epl-1.0
|
ESSICS/cs-studio
|
applications/alarm/alarm-plugins/org.csstudio.alarm.beast/src/org/csstudio/alarm/beast/ui/clientmodel/AlarmClientModel.java
|
40140
|
/*******************************************************************************
* Copyright (c) 2010 Oak Ridge National Laboratory.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
******************************************************************************/
package org.csstudio.alarm.beast.ui.clientmodel;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.WeakHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;
import org.csstudio.alarm.beast.Activator;
import org.csstudio.alarm.beast.AlarmTreePath;
import org.csstudio.alarm.beast.Messages;
import org.csstudio.alarm.beast.Preferences;
import org.csstudio.alarm.beast.SeverityLevel;
import org.csstudio.alarm.beast.client.AADataStructure;
import org.csstudio.alarm.beast.client.AlarmConfiguration;
import org.csstudio.alarm.beast.client.AlarmTreeItem;
import org.csstudio.alarm.beast.client.AlarmTreePV;
import org.csstudio.alarm.beast.client.AlarmTreeRoot;
import org.csstudio.alarm.beast.client.GDCDataStructure;
import org.csstudio.apputil.time.BenchmarkTimer;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.osgi.util.NLS;
/** Model of alarm information for client applications.
*
* <p>Obtains alarm configuration (PVs, their hierarchy, guidance, status, ...)
* from RDB, then monitors JMS for changes,
* sends out acknowledgments or changes to JMS,
* signals listeners about updates, ...
*
* <p>NOTE ON SYNCHRONIZATION:
* <p>The model can be accessed from the GUI but also from JMS threads
* that received updates from the alarm server.
* One could lock the 'root' element or the 'model' on all access.
* That might be easiest to implement and check, but potentially
* slower because concurrent access to different parts of the model
* are not possible.
*
* <p>When synchronizing individual pieces of the model (area, pv, ...)
* deadlocks are possible if elements are locked in reverse order.
* The following order should prevent this:
* <ol>
* <li>For overall changes, lock the model.
* <li>For changes to the alarm tree, lock affected items from the root down.
* </ol>
*
* <p>Note that acknowledging an alarm tree entry will
* <ol>
* <li>Acknowledge all 'child' entries, recursing to individual PVs
* <li>Access to 'root' element to send ack' request to JMS
* </ol>
* To prevent deadlocks, an acknowledge must therefore first lock the root element,
* then the affected sub-elements of the alarm tree.
*
* @author Kay Kasemir, Xihui Chen
*/
@SuppressWarnings("nls")
public class AlarmClientModel
{
private static AlarmClientModel default_instance;
// shared instances
private static final Set<AlarmClientModel> INSTANCES = Collections.newSetFromMap(new WeakHashMap<>());
/** Reference count for instance */
private AtomicInteger references = new AtomicInteger();
/** Name of this configuration, i.e. root element of the configuration tree */
private String config_name;
/** Names of all available configuration, i.e. all root elements */
private String config_names[] = new String[0];
/** Have we recently heard from the server? */
private volatile boolean server_alive = false;
/** Do we think the server is in maintenance mode? */
private volatile boolean maintenance_mode = false;
/** Connection to configuration/state snapshot.
* <br><b>SYNC:</b> Access needs to synchronize on <code>this</code>
*/
private AlarmConfiguration config;
/** JMS Connection to server: alarm updates, send acknowledgment.
* May be <code>null</code> when we (re-)read the configuration.
*
* SYNC: on communicator_lock for access.
*/
private AlarmClientCommunicator communicator = null;
/** Lock for <code>communicator</code> */
final private Object communicator_lock = new Object();
/** Root of the alarm tree.
* <br><b>SYNC:</b> Access needs to synchronize on <code>this</code>
* Usually this would be the same as config.getConfigTree(),
* but initially and after errors it will be a pseudo-alarm-tree
* that shows error messages
*/
private AlarmTreeRoot config_tree;
/** Array of items which are currently in alarm
* <br><b>SYNC:</b> Access needs to synchronize on <code>this</code>
*/
private Set<AlarmTreePV> active_alarms = new HashSet<AlarmTreePV>();
/** Array of items which are in alarm but acknowledged
* <br><b>SYNC:</b> Access needs to synchronize on <code>this</code>
*/
private Set<AlarmTreePV> acknowledged_alarms = new HashSet<AlarmTreePV>();
/** Listeners who registered for notifications */
final private CopyOnWriteArrayList<AlarmClientModelListener> listeners =
new CopyOnWriteArrayList<AlarmClientModelListener>();
/** Send events? */
private boolean notify_listeners = true;
/** @return <code>true</code> for read-only model */
final private boolean allow_write = ! Preferences.isReadOnly();
/** Indicates if the model accepts or denies a change of the configuration name */
final private boolean allow_config_changes;
/** Initialize client model */
private AlarmClientModel(final String config_name, boolean allow_config_changes) throws Exception
{
this.config_name = config_name;
this.allow_config_changes = allow_config_changes;
// Initial dummy alarm info
createPseudoAlarmTree(Messages.AlarmClientModel_NotInitialized);
new ReadConfigJob(this).schedule();
}
/** Obtain the shared instance.
* <p>
* Increments the reference count.
* @see #release()
* @param config_name Name of alarm tree root, raise an Exception if null
* @return Alarm client model instance
* @throws Exception on error
*/
public static AlarmClientModel getInstance(final String config_name) throws Exception
{
if(config_name == null)
throw new Exception("Configuration name can't be null");
AlarmClientModel instance = null;
synchronized (INSTANCES)
{
for (AlarmClientModel model : INSTANCES) {
if (config_name.equals(model.getConfigurationName())) {
instance = model;
}
}
if (instance == null) {
instance = new AlarmClientModel(config_name,false);
INSTANCES.add(instance);
}
}
instance.references.incrementAndGet();
return instance;
}
/**
* Obtain the shared instance for the default alarm tree root. This instance allows
* changing the configuration name after the model was created.
* <p>
* Increments the reference count.
* @see #release()
* @return Alarm client model instance
* @throws Exception on error
*/
public static AlarmClientModel getInstance() throws Exception
{
synchronized(INSTANCES) {
if (default_instance == null) {
default_instance = new AlarmClientModel(Preferences.getAlarmTreeRoot(),true);
}
}
default_instance.references.incrementAndGet();
return default_instance;
}
/** Must be called to release model when no longer used.
* <p>
* Based on reference count, model is closed when last
* user releases it.
*/
public void release()
{
if (references.decrementAndGet() > 0)
return;
internalRelease();
synchronized(INSTANCES) {
if (this == default_instance) {
default_instance = null;
}
}
}
private void internalRelease()
{
try
{
Activator.getLogger().fine("AlarmClientModel closed.");
synchronized(INSTANCES)
{
INSTANCES.remove(this);
}
// Don't lock the model while closing the communicator
// because communicator could right now be in a model
// update which in turn already locks the model -> deadlock
synchronized (communicator_lock)
{
if (communicator != null)
{
communicator.stop();
communicator = null;
}
}
synchronized (this)
{
if (config != null)
{
config.close();
config = null;
}
}
}
catch (Exception ex)
{
Activator.getLogger().log(Level.WARNING, "Model release failed", ex);
}
}
@Override
protected void finalize() throws Throwable
{
internalRelease();
super.finalize();
}
/** List all configuration 'root' element names, i.e. names
* of all possible configurations, including the current one.
* @return Array of 'root' elements.
* May be empty but non-<code>null</code> while model is still reading from RDB.
*/
public synchronized String[] getConfigurationNames()
{
return config_names;
}
/** @return Name of this configuration, i.e. name of its root element */
public synchronized String getConfigurationName()
{
return config_name;
}
/** Load a new alarm configuration.
* Ignored if the 'new' configuration name matches the current name.
*
* @param new_root_name Name of configuration to load
* @param listener Listener that's notified when done
* @return <code>true</code> if configuration will be changed, <code>false</code>
* if requested configuration is already the current one
*/
public boolean setConfigurationName(final String new_root_name,
final AlarmClientModelConfigListener listener)
{
if (!allow_config_changes) {
throw new UnsupportedOperationException("Configuration name of this model cannot be changed.");
}
// TODO If loading, ignore change
synchronized (this)
{
if (new_root_name.equals(config_name))
return false;
// Update config. name
config_name = new_root_name;
}
// Update GUI with 'empty' model
createPseudoAlarmTree(Messages.AlarmClientModel_NotInitialized);
fireNewConfig();
// Clear JMS communicator because it uses topics of the old config. name
synchronized (communicator_lock)
{
if (communicator != null)
{
// Close old communicator
communicator.stop();
communicator = null;
}
}
server_alive = false;
// Load new configuration:
// Create new JMS communicator, read from RDB, fire events, ...
new ReadConfigJob(this, listener).schedule();
return true;
}
/** @return <code>true</code> if model allows write access
* (acknowledge, update config)
*/
public boolean isWriteAllowed()
{
return allow_write;
}
/** @param listener Listener to add */
public void addListener(final AlarmClientModelListener listener)
{
listeners.add(listener);
}
/** @param listener Listener to remove */
public void removeListener(final AlarmClientModelListener listener)
{
listeners.remove(listener);
}
/** Read alarm configuration.
* May be invoked from ReadConfigJob.
* @param monitor Progress monitor (has not been called)
*/
void readConfiguration(final IProgressMonitor monitor)
{
final BenchmarkTimer timer = new BenchmarkTimer();
monitor.beginTask(Messages.AlarmClientModel_ReadingConfiguration, IProgressMonitor.UNKNOWN);
// Check if we need to create a NEW communicator,
// or configure existing communicator to queue updates.
final AlarmClientCommunicator comm;
synchronized (communicator_lock)
{
if (communicator == null)
{
try
{
communicator = new AlarmClientCommunicator(this);
communicator.start();
}
catch (Exception ex)
{
Activator.getLogger().log(Level.SEVERE, "Cannot start AlarmClientCommunicator", ex);
return;
}
}
// Queue received events until we read the whole configuration
communicator.setQueueMode(true);
comm = communicator;
}
// Clear old data.
// If updates arrived now from JMS, we'd get 'unknown PV ...' warnings,
// but since the JMS communicator is in 'queue' mode, that should not happen.
synchronized (this)
{
// Prevent a flurry of events while items with alarms are added
notify_listeners = false;
if (config != null)
config.close();
active_alarms.clear();
acknowledged_alarms.clear();
config = null;
// Note config_tree stays as it was...
}
// Connect to RDB
final AlarmConfiguration new_config;
try
{
// TODO Rearrange AlarmClientModel, AlarmConfiguration
// This is currently odd:
// Reading a new configuration (tree), but while doing that
// we already update the active_alarms & acknowledged_alarms
// of this model.
// Better have a separate
// 1) AlarmConfiguration with config tree AND active_alarms, acknowledged_alarms
// 2) RDB reader/writer
// 3) AlarmClientModel that uses 1 & 2
// That way, the 'notify_listeners' can go away:
// Reading a new config does not affect an existing config.
new_config = new AlarmConfiguration(Preferences.getRDB_Url(),Preferences.getRDB_User(),
Preferences.getRDB_Password(), Preferences.getRDB_Schema())
{
// When reading config, create the root element
// that links to the model instead of the default AlarmTreeRoot
@Override
protected AlarmTreeRoot createAlarmTreeRoot(int id,
String root_name)
{
return new AlarmClientModelRoot(id, root_name,
AlarmClientModel.this);
}
};
// Read names of available configurations
final String new_root_names[] = new_config.listConfigurations();
synchronized (this)
{
config_names = new_root_names;
}
}
catch (Exception ex)
{
Activator.getLogger().log(Level.SEVERE, "Cannot connect to RDB", ex);
createPseudoAlarmTree("Alarm RDB Error: " + ex.getMessage());
synchronized (this)
{
notify_listeners = true;
}
fireNewConfig();
monitor.done();
return;
}
// Presumably connected to JMS and RDB,
// but assert that we are really connected to JMS:
// While we read the RDB, new alarms could arrive.
// To avoid missing them, assert that we are connected to JMS.
// Used to block for JMS connection before connecting to RDB,
// but this way both types of errors are more obvious:
// RDB error -> exception right away
// JMS problem -> will usually still check RDB, so we know that's OK, then hang in here
int wait = 0;
while (!comm.isConnected())
{
monitor.subTask(NLS.bind(Messages.AlarmClientModel_WaitingForJMSFmt, ++wait));
try
{
Thread.sleep(1000);
}
catch (InterruptedException e)
{
e.printStackTrace();
}
if (monitor.isCanceled())
{
synchronized (this)
{
notify_listeners = true;
}
fireNewConfig();
monitor.done();
return;
}
}
// Read RDB
monitor.subTask(Messages.AlarmClientModel_ReadingRDB);
try
{
new_config.readConfiguration(getConfigurationName(), false, monitor);
// Update model with newly received data
synchronized (this)
{
config = new_config;
config_tree = config.getAlarmTree();
// active_alarms & acknowledged_alarms already populated
// because fireNewAlarmState() was called while building
// the alarm tree
}
}
catch (Exception ex)
{
Activator.getLogger().log(Level.SEVERE, "Cannot read alarm configuration", ex);
createPseudoAlarmTree("Alarm RDB Error: " + ex.getMessage());
}
// Info about performance
timer.stop();
if (Activator.getLogger().isLoggable(Level.INFO))
{
final int count;
final int pv_count;
synchronized (this)
{
count = config_tree.getElementCount();
pv_count = config_tree.getLeafCount();
}
Activator.getLogger().info(String.format(
"Read %d alarm tree items, %d PVs in %.2f seconds: %.1f items/sec, %.1f PVs/sec",
count, pv_count, timer.getSeconds(),
count / timer.getSeconds(),
pv_count/timer.getSeconds()));
}
// After we received configuration, handle updates that might
// have accumulated.
comm.setQueueMode(false);
// Re-enable events, send a single notification.
synchronized (this)
{
notify_listeners = true;
}
if (monitor.isCanceled())
{
createPseudoAlarmTree("Cancelled");
synchronized (this)
{
if (config != null)
config.close();
config = null;
active_alarms.clear();
acknowledged_alarms.clear();
}
}
fireNewConfig();
monitor.done();
}
/** @return Name of JMS server or some text that indicates
* disconnected state. For information, not to determine
* exact connection state.
*/
public String getJMSServerInfo()
{
synchronized (communicator_lock)
{
if (communicator != null)
return communicator.toString();
}
return "No Communicator";
}
/** Invoked by AlarmClientCommunicator whenever an 'IDLE'
* message was received from the server
* @param maintenance_mode
*/
public void updateServerState(boolean maintenance_mode)
{
// Tell GUI that there is a server.
if (! server_alive)
{
server_alive = true;
fireNewAlarmState(null, true);
}
// Change in maintenance mode?
if (this.maintenance_mode != maintenance_mode)
{
this.maintenance_mode = maintenance_mode;
fireModeUpdate();
}
}
/** @return <code>true</code> if we received updates from server,
* <code>false</code> after server communication timeout
*/
public boolean isServerAlive()
{
return server_alive;
}
/** @return <code>true</code> if we assume server is in maintenance mode,
* <code>false</code> for 'normal' mode.
*/
public boolean inMaintenanceMode()
{
return maintenance_mode;
}
/** Send request to enable/disable maintenance mode to alarm server
* @param maintenance <code>true</code> to enable
*/
public void requestMaintenanceMode(final boolean maintenance)
{
synchronized (communicator_lock)
{
if (allow_write && communicator != null)
communicator.requestMaintenanceMode(maintenance);
}
}
/** @return root of the alarm tree configuration */
synchronized public AlarmTreeRoot getConfigTree()
{
return config_tree;
}
/** Get the currently active alarms.
* <p>
* @return Array of active alarms. May be empty, but not <code>null</code>.
*/
synchronized public AlarmTreePV[] getActiveAlarms()
{
final AlarmTreePV array[] = new AlarmTreePV[active_alarms.size()];
return active_alarms.toArray(array);
}
/** Get the acknowledged alarms: Still in alarm, but ack'ed.
* <p>
* @return Array of active alarms. May be empty, but not <code>null</code>.
*/
synchronized public AlarmTreePV[] getAcknowledgedAlarms()
{
final AlarmTreePV array[] = new AlarmTreePV[acknowledged_alarms.size()];
return acknowledged_alarms.toArray(array);
}
/** Add a component to the model and RDB
* @param root_or_component Root or Component under which to add the component
* @param name Name of the new component
* @throws Exception on error
*/
public void addComponent(final AlarmTreeItem root_or_component,
final String name) throws Exception
{
if (! allow_write)
return;
synchronized (this)
{
if (config == null)
return;
config.addComponent(root_or_component, name);
}
synchronized (communicator_lock)
{
if (communicator != null)
communicator.sendConfigUpdate(AlarmTreePath.makePath(root_or_component.getPathName(), name));
}
}
/** Add a PV to the model and config storage (RDB)
* @param component Component under which to add the PV
* @param name Name of the new PV
* @throws Exception on error
*/
public void addPV(final AlarmTreeItem component,
final String name) throws Exception
{
if (! allow_write)
return;
synchronized (this)
{
if (config == null)
return;
config.addPV(component, name);
}
// Notify via JMS, then add to local model in response to notification.
synchronized (communicator_lock)
{
if (communicator != null)
communicator.sendConfigUpdate(null);
}
}
/** Change an items configuration in RDB.
* @param item Item to configure (which already exists, won't be created)
* @param guidance Guidance strings
* @param displays Related displays
* @param commands Commands
* @param auto_actions Automated Actions
* @throws Exception on error
*/
public void configureItem(final AlarmTreeItem item,
final GDCDataStructure guidance[], final GDCDataStructure displays[],
final GDCDataStructure commands[], final AADataStructure auto_actions[]) throws Exception
{
if (! allow_write)
return;
synchronized (this)
{
if (config == null)
return;
try
{
config.configureItem(item, guidance, displays, commands, auto_actions);
}
finally
{
config.closeStatements();
}
}
synchronized (communicator_lock)
{
if (communicator != null)
communicator.sendConfigUpdate(item.getPathName());
}
}
/** Change a PV's configuration in RDB.
* @param pv PV
* @param description Description
* @param enabled Are alarms enabled?
* @param annunciate Annunciate or not?
* @param latch Latch highest alarms?
* @param delay Alarm delay [seconds]
* @param count Count of severity != OK within delay to detect as alarm
* @param filter Filter expression for enablement
* @param guidance Guidance strings
* @param displays Related displays
* @param commands Commands
* @param auto_actions Automated actions
* @throws Exception on error
*/
public void configurePV(final AlarmTreePV pv, final String description,
final boolean enabled, final boolean annunciate, final boolean latch,
final int delay, final int count, final String filter,
final GDCDataStructure guidance[], final GDCDataStructure displays[],
final GDCDataStructure commands[], final AADataStructure auto_actions[]) throws Exception
{
if (! allow_write)
return;
synchronized (this)
{
if (config == null)
return;
try
{
config.configurePV(pv, description, enabled, annunciate,
latch, delay, count, filter,
guidance, displays, commands, auto_actions);
}
finally
{
config.closeStatements();
}
}
synchronized (communicator_lock)
{
if (communicator != null)
communicator.sendConfigUpdate(pv.getPathName());
}
}
/** Change a PV's enable/disable state in RDB
* and send JMS config update.
* Receiving that update will then adjust PV in this model.
* @param pv PV
* @param enabled Are alarms enabled?
* @throws Exception on error
*/
public void enable(final AlarmTreePV pv, final boolean enabled) throws Exception
{
if (! allow_write)
return;
synchronized (this)
{
if (config == null)
return;
try
{
config.updatePVEnablement(pv, enabled);
}
finally
{
config.closeStatements();
}
}
synchronized (communicator_lock)
{
if (communicator != null)
communicator.sendConfigUpdate(pv.getPathName());
}
}
/** Change item's name
* @param item Item to change
* @param new_name New name for the item
* @throws Exception on error
*/
public void rename(final AlarmTreeItem item, final String new_name) throws Exception
{
if (! allow_write)
return;
synchronized (this)
{
if (config == null)
return;
config.rename(item, new_name);
}
synchronized (communicator_lock)
{
if (communicator != null)
communicator.sendConfigUpdate(null);
}
}
/** Change item's location in alarm configuration hierarchy.
* This does not actually change the item's position in the in-memory
* model. It does change the RDB configuration and trigger an update,
* which the client should then receive and consequently re-load the
* whole model.
* @param item Item to move
* @param new_path New path for the item
* @throws Exception on error
*/
public void move(final AlarmTreeItem item, final String new_path) throws Exception
{
if (! allow_write)
return;
synchronized (this)
{
if (config == null)
return;
config.move(item, new_path);
}
synchronized (communicator_lock)
{
if (communicator != null)
communicator.sendConfigUpdate(null);
}
}
/** Create new PV by copying existing PV
* @param pv Existing PV
* @param new_path_and_pv Complete path, including PV name, of PV-to-create
* @throws Exception on error in new path, duplicate PV name, error while
* adding new PV
*/
public void duplicatePV(final AlarmTreePV pv, final String new_path_and_pv) throws Exception
{
if (! allow_write)
return;
synchronized (this)
{
if (config == null)
return;
// Determine path and name of new PV
final String new_pieces[] = AlarmTreePath.splitPath(new_path_and_pv);
final int new_pieces_len = new_pieces.length;
// Need at least "area/pv"
if (new_pieces_len < 2)
throw new Exception("New path too short");
final String new_path =
AlarmTreePath.makePath(new_pieces, new_pieces_len - 1);
final String new_name = new_pieces[new_pieces_len - 1];
if (new_name.equals(pv.getName()))
throw new Exception("New PV name must differ from existing PV name");
// Locate parent item
final AlarmTreeItem new_parent =
config.getAlarmTree().getItemByPath(new_path);
if (new_parent == null)
throw new Exception("Cannot locate parent entry: " + new_path);
if (new_parent instanceof AlarmTreePV)
throw new Exception("Parent entry has wrong type: " + new_path);
// Add new PV
final AlarmTreePV new_pv =
config.addPV(new_parent, new_name);
// Update configuration of new PV to match duplicated PV
config.configurePV(new_pv, pv.getDescription(), pv.isEnabled(),
pv.isAnnunciating(), pv.isLatching(), pv.getDelay(),
pv.getCount(), pv.getFilter(), pv.getGuidance(),
pv.getDisplays(), pv.getCommands(), pv.getAutomatedActions());
}
// This will trigger an update the configuration of new_pv
// in this model as well as other alarm system listeners
synchronized (communicator_lock)
{
if (communicator != null)
communicator.sendConfigUpdate(null);
}
}
/** Remove item and all sub-items from alarm tree.
* @param item Item to remove
* @throws Exception on error
*/
public void remove(final AlarmTreeItem item) throws Exception
{
if (! allow_write)
return;
synchronized (this)
{
if (config == null)
return;
config.remove(item);
}
synchronized (communicator_lock)
{
if (communicator != null)
communicator.sendConfigUpdate(null);
}
}
/** Update the configuration of a model item
* @param path Path name of the added/removed/changed item or null
*/
public void readConfig(final String path) throws Exception
{
final AlarmTreeItem item = getConfigTree().getItemByPath(path);
if (item == null || !(item instanceof AlarmTreePV))
{ // Not a known PV? Update the whole config.
new ReadConfigJob(this).schedule();
return;
}
// Update a known PV
final AlarmTreePV pv = (AlarmTreePV) item;
synchronized (this)
{
if (config == null)
return;
try
{
config.readPVConfig(pv);
}
finally
{
config.closeStatements();
}
// This could change the alarm tree after a PV was disabled or enabled.
final AlarmTreeItem parent = pv.getParent();
if (parent != null)
parent.maximizeSeverity();
}
// Note that this may actually be a new PV that this instance
// of the client GUI has just added.
// We know the PV in the config tree, but it's not visible
// in the GUI, yet, because we just added it.
// Previously, there was code here that tried to optimize display
// updates by suppressing the display update if the PV
// has not changed alarm state
// -> Always update PVs with changed configuration
// Update alarm display
fireNewAlarmState(pv, true);
}
/** Update the enablement of a PV in model.
* <p>
* Called by AlarmUpdateCommunicator, i.e. from JMS thread.
*
* @param name PV name
* @param enabled Enabled?
*/
public void updateEnablement(final String name, final boolean enabled)
{
final AlarmTreePV pv;
// Lock model because complete tree is searched for PV,
// then severity maximized up to root.
synchronized (this)
{
pv = findPV(name);
if (pv == null)
{
Activator.getLogger().log(Level.WARNING,
"Received enablement ({0}) for unknown PV {1}",
new Object[] { Boolean.toString(enabled), name });
return;
}
pv.setEnabled(enabled);
// This could change the alarm tree after a PV was disabled or enabled.
final AlarmTreeItem parent = pv.getParent();
if (parent != null)
parent.maximizeSeverity();
}
// Update alarm display
fireNewAlarmState(pv, true);
}
/** Update the state of a PV in model.
* <p>
* Called by AlarmUpdateCommunicator, i.e. from JMS thread.
*
* @param into Alarm update info
*/
void updatePV(final AlarmUpdateInfo info)
{
// Update should contain PV name
String name = info.getNameOrPath();
if (AlarmTreePath.isPath(name))
name = AlarmTreePath.getName(name);
server_alive = true;
final AlarmTreePV pv = findPV(name);
if (pv != null)
{
pv.setAlarmState(info.getCurrentSeverity(), info.getCurrentMessage(),
info.getSeverity(), info.getMessage(),
info.getValue(), info.getTimestamp());
return;
}
// Can this result in out-of-memory?!
// First glance: No, since we just log & return.
// Is there a memory leak in the logger?
// The update comes from JMS, and the logger may also
// send info to JMS. Is that a problem?
Activator.getLogger().log(Level.WARNING,
"Received update for unknown PV {0}", name);
}
/** Locate PV by name
* @param name Name of PV to locate. May be <code>null</code>.
* @return PV or <code>null</code> when not found
*/
public synchronized AlarmTreePV findPV(final String name)
{
if (config == null)
return null;
return config.findPV(name);
}
/** Ask alarm server to acknowledge alarm.
* @param pv PV to acknowledge
* @param acknowledge Acknowledge, or un-acknowledge?
*/
public void acknowledge(final AlarmTreePV pv, final boolean acknowledge)
{
synchronized (communicator_lock)
{
if (allow_write && communicator != null)
communicator.requestAcknowledgement(pv, acknowledge);
}
}
/** Create a pseudo alarm tree for the purpose of displaying a message
* @param info Info that will show as dummy alarm tree item
* @return Pseudo alarm tree
*/
private synchronized void createPseudoAlarmTree(final String info)
{
config_tree = new AlarmTreeRoot("Pseudo", -1);
new AlarmTreeItem(config_tree, info, 0);
active_alarms.clear();
acknowledged_alarms.clear();
}
/** Send debug trigger to alarm server */
public void triggerDebug()
{
synchronized (communicator_lock)
{
if (communicator != null)
communicator.triggerDebugAction();
}
}
/** Inform listeners about server timeout */
void fireServerTimeout()
{
server_alive = false;
for (AlarmClientModelListener listener : listeners)
{
try
{
listener.serverTimeout(this);
}
catch (Throwable ex)
{
Activator.getLogger().log(Level.WARNING,
"Server timeout notification error", ex);
}
}
}
/** Inform listeners that server is OK and in which mode */
private void fireModeUpdate()
{
for (AlarmClientModelListener listener : listeners)
{
try
{
listener.serverModeUpdate(this, maintenance_mode);
}
catch (Throwable ex)
{
Activator.getLogger().log(Level.WARNING,
"Model update notification error", ex);
}
}
}
/** Inform listeners about overall change to alarm tree configuration:
* Items added, removed.
*/
void fireNewConfig()
{
for (AlarmClientModelListener listener : listeners)
{
try
{
listener.newAlarmConfiguration(this);
}
catch (Throwable ex)
{
Activator.getLogger().log(Level.WARNING,
"Model config notification error", ex);
}
}
}
/** Inform listeners about change in alarm state.
* <p>
* Typically, this is invoked with the PV that changed state.
* May be called with a <code>null</code> PV
* to indicate that messages were received after a server timeout.
* @param pv PV that might have changed the alarm state or <code>null</code>
* @param parent_changed true if a parent item was updated as well
*/
void fireNewAlarmState(final AlarmTreePV pv, final boolean parent_changed)
{
if (pv != null)
{
synchronized (this)
{
final SeverityLevel severity = pv.getSeverity();
if (severity.ordinal() > 0)
{
if (severity.isActive())
{
active_alarms.add(pv);
acknowledged_alarms.remove(pv);
}
else
{
acknowledged_alarms.add(pv);
active_alarms.remove(pv);
}
}
else
{
active_alarms.remove(pv);
acknowledged_alarms.remove(pv);
}
if (!notify_listeners )
return;
}
}
for (AlarmClientModelListener listener : listeners)
{
try
{
listener.newAlarmState(this, pv, parent_changed);
}
catch (Throwable ex)
{
Activator.getLogger().log(Level.WARNING,
"Alarm update notification error", ex);
}
}
}
/** @return Debug string */
@Override
public String toString()
{
return "AlarmClientModel: " + config_tree;
}
/** Dump debug information */
public synchronized void dump()
{
System.out.println("== AlarmClientModel ==");
config_tree.dump(System.out);
System.out.println("= Active alarms =");
for (AlarmTreePV pv : active_alarms)
System.out.println(pv.toString());
System.out.println("= Acknowledged alarms =");
for (AlarmTreePV pv : acknowledged_alarms)
System.out.println(pv.toString());
}
}
|
epl-1.0
|
dlindhol/LaTiS
|
src/main/scala/latis/ops/Operation2.scala
|
3390
|
package latis.ops
import scala.Option.option2Iterable
import scala.reflect.runtime.currentMirror
import latis.dm.Dataset
import latis.dm.Function
import latis.dm.Sample
import latis.dm.Scalar
import latis.dm.Tuple
import latis.dm.Variable
import latis.util.LatisProperties
import latis.util.iterator.MappingIterator
import latis.dm.Naught
/**
* Experimental alternative to Operation.
* - maps over iterator instead of using MappingIterator
* - applies to both domain and codomain of Functions
* - uses Naught for domain and codomain types to see if they are really needed
* TODO: CoDomainOperation, e.g. math, like Spark mapValues
* can benefit knowing that domain won't change
*/
abstract class Operation2 {
/*
* UnaryOperation, BinaryOperation
* DomainOperation, CoDomainOperation
* enforce by making some methods final?
* Filter: can only drop samples, trait?
*
* or focus on Operations as functions of V -> V with a map method on dataset
* but how to override parts without subclass polymorphisp
* use partial functions?
*/
/**
* Apply this Operation to the given Dataset.
*/
def apply(dataset: Dataset): Dataset = dataset match {
case Dataset(variable) => {
val md = dataset.getMetadata
//TODO: delegate to subclass to munge metadata
//TODO: add provenance metadata, getProvMsg, append to "history"
applyToVariable(variable) match {
case Some(v) => Dataset(v, md)
case None => Dataset.empty //TODO: preserve type metadata?
}
}
case _ => dataset //dataset is empty
}
/**
* Apply Operation to a Variable.
*/
def applyToVariable(variable: Variable): Option[Variable] = variable match {
case scalar: Scalar => applyToScalar(scalar)
case sample: Sample => applyToSample(sample)
case tuple: Tuple => applyToTuple(tuple)
case function: Function => applyToFunction(function)
}
/**
* Default no-op operation for Scalars.
*/
def applyToScalar(scalar: Scalar): Option[Variable] = Some(scalar)
/**
* Default operation for Samples. Apply operation domain and codomain.
*/
def applyToSample(sample: Sample): Option[Sample] = sample match {
case Sample(domain, codomain) => {
for (d <- applyToVariable(domain); c <- applyToVariable(codomain))
yield Sample(d,c)
}
}
/**
* Default operation for Tuples. Apply operation to each element.
* If all elements are invalid, then the Tuple is invalid.
*/
def applyToTuple(tuple: Tuple): Option[Variable] = {
//TODO: should we allow an empty Tuple? probably not
// should we reduce a Tuple of one to the thing? consider that it is a Product type
val vars = tuple.getVariables.flatMap(applyToVariable(_))
if (vars.length == 0) None
else Some(Tuple(vars, tuple.getMetadata))
}
/**
* Default operation for a Function. Map operation over each sample.
*/
def applyToFunction(function: Function): Option[Variable] = {
//TODO: preserve memoization
/*
* TODO: avoid having to read data to get Function type
* construct Function with function that provides domain and range?
* Do we really need the types? see how far we get with Naught
*/
val samples = function.iterator.flatMap(applyToSample(_))
Some(Function(Naught(), Naught(), samples, function.getMetadata))
}
}
|
epl-1.0
|
OpenLiberty/open-liberty
|
dev/com.ibm.ws.ejbcontainer.injection_fat/test-applications/EJB3INJSABean.jar/src/com/ibm/ws/ejbcontainer/injection/ann/ejb/CatEJBLocalHome.java
|
995
|
/*******************************************************************************
* Copyright (c) 2006, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.ibm.ws.ejbcontainer.injection.ann.ejb;
import javax.ejb.CreateException;
import javax.ejb.EJBLocalHome;
/**
* Compatibility EJBLocalHome interface for CompCatBean.
**/
public interface CatEJBLocalHome extends EJBLocalHome {
/**
* @return CatEJBLocal The SessionBean EJB object.
* @exception javax.ejb.CreateException SessionBean EJB object was not created.
*/
public CatEJBLocal create() throws CreateException;
}
|
epl-1.0
|
openhab/openhab
|
bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/protocol/commandclass/ZWaveSecureInclusionStateTracker.java
|
7375
|
/**
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.zwave.internal.protocol.commandclass;
import java.util.Arrays;
import java.util.List;
import org.openhab.binding.zwave.internal.protocol.SerialMessage;
import org.openhab.binding.zwave.internal.protocol.ZWaveNode;
import org.openhab.binding.zwave.internal.protocol.initialization.ZWaveNodeStageAdvancer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Used only by {@link ZWaveSecurityCommandClassWithInitialization} during device inclusion.
*
* During device inclusion, the security registration process between us and the node
* has multiple stages in order to share our network key with the device. This class
* is used to track our current state in that process and determine next steps.
*
* The specific commands to be exchanged are:
* {@value #INIT_COMMAND_ORDER_LIST}
*
* @author Dave Badia
* @since TODO
*/
class ZWaveSecureInclusionStateTracker {
private static final Logger logger = LoggerFactory.getLogger(ZWaveSecureInclusionStateTracker.class);
/**
* During node inclusion <b>only</b>, this is the order in which commands should be sent and received.
* Commands absent from this list (for example {@link #SECURITY_MESSAGE_ENCAP}) can be sent/received at any time
*/
private final List<Byte> INIT_COMMAND_ORDER_LIST =
Arrays.asList(new Byte[]{
ZWaveSecurityCommandClass.SECURITY_SCHEME_GET,
ZWaveSecurityCommandClass.SECURITY_SCHEME_REPORT,
ZWaveSecurityCommandClass.SECURITY_NETWORK_KEY_SET,
ZWaveSecurityCommandClass.SECURITY_NETWORK_KEY_VERIFY,
ZWaveSecurityCommandClass.SECURITY_COMMANDS_SUPPORTED_GET,
ZWaveSecurityCommandClass.SECURITY_COMMANDS_SUPPORTED_REPORT,
});
private static final boolean HALT_ON_IMPROPER_ORDER = true;
private byte currentStep = INIT_COMMAND_ORDER_LIST.get(0);
/**
* After we send a non-nonce security message, we can wait up to 10 seconds
* for a reply. Then we must exit the inclusion process
*/
private static final int WAIT_TIME_MILLIS = 10000;
/**
* The next {@link SerialMessage} that will be given to {@link ZWaveNodeStageAdvancer}
* when it calls {@link ZWaveSecurityCommandClass#initialize(boolean)}
*/
private SerialMessage nextRequestMessage = null;
/**
* Lock object that will be used for synchronization
*/
private final Object nextMessageLock = new Object();
private String errorState = null;
private long waitForReplyTimeout = 0;
private final ZWaveNode node;
ZWaveSecureInclusionStateTracker(ZWaveNode node) {
this.node = node;
}
/**
* Since these operations are security sensitive we must ensure they are
* executing in the proper sequence
* @param newStep the state we are about to enter
* @return true if the new command was in an acceptable order, false
* if it was not. if false is returned, the response should <b>not</b>
* be sent.
*/
synchronized boolean verifyAndAdvanceState(Byte newStep) {
logger.debug("NODE {}: ZWaveSecurityCommandClass in verifyAndAdvanceState with newstep={}, currentstep={}",
node.getNodeId(), ZWaveSecurityCommandClass.commandToString(newStep), ZWaveSecurityCommandClass.commandToString(currentStep));
if(!INIT_COMMAND_ORDER_LIST.contains(newStep)) {
// Commands absent from EXPECTED_COMMAND_ORDER_LIST are always ok
return true;
}
// Going back to the first step (zero index) is always OK // TODO: DB is it really?
if(INIT_COMMAND_ORDER_LIST.indexOf(newStep) > 0) {
// We have to verify where we are at
int currentIndex = INIT_COMMAND_ORDER_LIST.indexOf(currentStep);
int newIndex = INIT_COMMAND_ORDER_LIST.indexOf(newStep);
// Accept one message back or the same message(device resending last reply) in addition to the normal one message ahead
if(newIndex != currentIndex && newIndex - currentIndex > 1) {
if(HALT_ON_IMPROPER_ORDER) {
setErrorState(String.format("NODE %s: Commands received out of order, aborting current=%s, new=%s",
node.getNodeId(), ZWaveSecurityCommandClass.commandToString(currentStep), ZWaveSecurityCommandClass.commandToString(newStep)));
return false;
} else {
logger.warn("NODE {}: Commands received out of order (warning only, continuing) current={}, new={}",
node.getNodeId(), ZWaveSecurityCommandClass.commandToString(currentStep), ZWaveSecurityCommandClass.commandToString(newStep));
// fall through below
}
}
}
currentStep = newStep;
return true;
}
public void setErrorState(String errorState) {
this.errorState = errorState;
}
public void resetWaitForReplyTimeout() {
waitForReplyTimeout = System.currentTimeMillis() + WAIT_TIME_MILLIS;
}
void setNextRequest(SerialMessage message) {
logger.debug("NODE {}: in InclusionStateTracker.setNextRequest() (current={}) with {}", node.getNodeId(), (nextRequestMessage != null), message);
if(nextRequestMessage != null) {
logger.warn("NODE {}: in InclusionStateTracker.setNextRequest() overriding old message which was never sent of {}", node.getNodeId(), message);
}
verifyAndAdvanceState((byte) (message.getMessagePayloadByte(3) & 0xff));
synchronized(nextMessageLock) {
nextRequestMessage = message;
nextMessageLock.notify();
}
}
/**
* Gets the next message to be sent during the inclusion flow.
* Each message can only get retrieved once
* @return the next message or null if there was none
*/
SerialMessage getNextRequest() {
synchronized(nextMessageLock) {
logger.debug("NODE {}: in InclusionStateTracker.getNextRequest() time left for reply: {}ms, returning {}", node.getNodeId(),
(System.currentTimeMillis() - waitForReplyTimeout), nextRequestMessage);
if(System.currentTimeMillis() > waitForReplyTimeout) {
// waited too long for a reply, secure inclusion failed
setErrorState(WAIT_TIME_MILLIS+"ms passed since last request was sent, secure inclusion failed.");
return null;
}
if(nextRequestMessage != null) {
SerialMessage message = nextRequestMessage;
resetWaitForReplyTimeout();
nextRequestMessage = null;
return message;
}
return null;
}
}
public byte getCurrentStep() {
return currentStep;
}
public String getErrorState() {
return errorState;
}
}
|
epl-1.0
|
davidhmhernandez/ServiciosyProcesos
|
Concurrencia1Act7/src/Main.java
|
384
|
import java.util.logging.Level;
import java.util.logging.Logger;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
Thread t1 = new Hilo(0);
t1.start();
try {
t1.join();
} catch (InterruptedException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
}
}
}
|
epl-1.0
|
ModelWriter/Tarski
|
Source/eu.modelwriter.specification.editor/src/eu/modelwriter/specification/editor/scanner/LoadScanner.java
|
619
|
package eu.modelwriter.specification.editor.scanner;
import org.eclipse.jface.text.TextAttribute;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.RuleBasedScanner;
import org.eclipse.jface.text.rules.Token;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Display;
import eu.modelwriter.specification.editor.RGBStorage;
public class LoadScanner extends RuleBasedScanner {
public LoadScanner() {
final IToken loadToken =
new Token(new TextAttribute(new Color(Display.getCurrent(), RGBStorage.LOAD_RGB)));
setDefaultReturnToken(loadToken);
}
}
|
epl-1.0
|
openhab/openhab
|
bundles/binding/org.openhab.binding.tinkerforge/src/main/java/org/openhab/binding/tinkerforge/internal/model/impl/ElectrodeImpl.java
|
3535
|
/**
* Copyright (c) 2010-2020 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.tinkerforge.internal.model.impl;
import org.eclipse.emf.ecore.EClass;
import org.openhab.binding.tinkerforge.internal.model.Electrode;
import org.openhab.binding.tinkerforge.internal.model.ModelPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Electrode</b></em>'.
*
* @author Theo Weiss
* @since 1.5.0
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link org.openhab.binding.tinkerforge.internal.model.impl.ElectrodeImpl#getDeviceType <em>Device
* Type</em>}</li>
* </ul>
*
* @generated
*/
public class ElectrodeImpl extends MultiTouchDeviceImpl implements Electrode {
/**
* The default value of the '{@link #getDeviceType() <em>Device Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @see #getDeviceType()
* @generated
* @ordered
*/
protected static final String DEVICE_TYPE_EDEFAULT = "electrode";
/**
* The cached value of the '{@link #getDeviceType() <em>Device Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @see #getDeviceType()
* @generated
* @ordered
*/
protected String deviceType = DEVICE_TYPE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
protected ElectrodeImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return ModelPackage.Literals.ELECTRODE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public String getDeviceType() {
return deviceType;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case ModelPackage.ELECTRODE__DEVICE_TYPE:
return getDeviceType();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case ModelPackage.ELECTRODE__DEVICE_TYPE:
return DEVICE_TYPE_EDEFAULT == null ? deviceType != null : !DEVICE_TYPE_EDEFAULT.equals(deviceType);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy())
return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (deviceType: ");
result.append(deviceType);
result.append(')');
return result.toString();
}
} // ElectrodeImpl
|
epl-1.0
|