hexsha stringlengths 40 40 | size int64 5 1.05M | ext stringclasses 98
values | lang stringclasses 21
values | max_stars_repo_path stringlengths 3 945 | max_stars_repo_name stringlengths 4 118 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 945 | max_issues_repo_name stringlengths 4 118 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 134k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 945 | max_forks_repo_name stringlengths 4 135 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 1.05M | avg_line_length float64 1 1.03M | max_line_length int64 2 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e9b68297ced34811bed3d99db27370f377e0bf84 | 1,518 | rs | Rust | mayastor/src/delay.rs | daniel-shuy/Mayastor | 39fb08815fcad9c02f12f0c14232ff1c6bd09b3a | [
"Apache-2.0"
] | 236 | 2020-01-14T17:16:00.000Z | 2021-06-25T03:29:41.000Z | mayastor/src/delay.rs | daniel-shuy/Mayastor | 39fb08815fcad9c02f12f0c14232ff1c6bd09b3a | [
"Apache-2.0"
] | 599 | 2020-01-09T10:10:59.000Z | 2021-06-23T10:55:42.000Z | mayastor/src/delay.rs | daniel-shuy/Mayastor | 39fb08815fcad9c02f12f0c14232ff1c6bd09b3a | [
"Apache-2.0"
] | 52 | 2020-01-09T10:16:36.000Z | 2021-06-08T13:40:01.000Z | use std::{cell::RefCell, os::raw::c_void, time::Duration};
use spdk_sys::{spdk_poller, spdk_poller_register, spdk_poller_unregister};
thread_local! {
/// Delay poller pointer for unregistering the poller at the end
static DELAY_POLLER: RefCell<Option<*mut spdk_poller>> = RefCell::new(None);
}
/// Delay function called from the spdk poller to prevent draining of cpu
/// in cases when performance is not a priority (i.e. unit tests).
extern "C" fn sleep(_ctx: *mut c_void) -> i32 {
std::thread::sleep(Duration::from_millis(1));
0
}
/// Start delaying reactor every 1ms by 1ms. It blocks the thread for a
/// short moment so it is not able to perform any useful work when sleeping.
pub fn register() {
warn!("*** Delaying reactor every 1ms by 1ms ***");
let delay_poller = unsafe {
spdk_poller_register(Some(sleep), std::ptr::null_mut(), 1000)
};
DELAY_POLLER.with(move |poller_cell| {
let mut poller_maybe = poller_cell.try_borrow_mut().unwrap();
if poller_maybe.is_some() {
panic!("Delay poller registered twice");
}
*poller_maybe = Some(delay_poller);
});
}
// By unregistering the delay poller we avoid a warning about unregistered
// poller at the end.
pub fn unregister() {
DELAY_POLLER.with(move |poller_cell| {
let poller_maybe = poller_cell.try_borrow_mut().unwrap().take();
if let Some(mut poller) = poller_maybe {
unsafe { spdk_poller_unregister(&mut poller) };
}
});
}
| 35.302326 | 80 | 0.671278 |
2e07992820c424369a94030414edb08675c335bf | 7,039 | dart | Dart | example/lib/main.dart | fluttercandies/fconsole | 8f275c57cdc0764c46dc0f78a2de78a8249931c4 | [
"MIT"
] | 21 | 2020-11-13T06:09:13.000Z | 2021-12-29T09:49:30.000Z | example/lib/main.dart | nonameJ-admin-Captains-Quarter/fconsole | 8f275c57cdc0764c46dc0f78a2de78a8249931c4 | [
"MIT"
] | 1 | 2020-11-23T06:19:35.000Z | 2020-11-23T06:19:35.000Z | example/lib/main.dart | nonameJ-admin-Captains-Quarter/fconsole | 8f275c57cdc0764c46dc0f78a2de78a8249931c4 | [
"MIT"
] | 2 | 2020-11-14T07:16:30.000Z | 2022-01-08T04:29:03.000Z | import 'package:flutter/material.dart';
import 'package:fconsole/fconsole.dart';
import './style/color.dart';
import './style/text.dart';
import 'package:tapped/tapped.dart';
import 'style/color.dart';
void main() => runAppWithFConsole(MyApp());
class MyApp extends StatefulWidget {
@override
_MyAppState createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
FConsole.instance.isShow.addListener(() {
setState(() {});
});
}
bool get consoleHasShow => FConsole.instance.isShow.value;
double slideValue = 0;
@override
Widget build(BuildContext context) {
return ConsoleWidget(
options: ConsoleOptions(),
child: MaterialApp(
home: Scaffold(
backgroundColor: ColorPlate.lightGray,
appBar: AppBar(
title: const Text(
'FConsole example app',
),
),
body: ListView(
children: [
AspectRatio(
aspectRatio: 24 / 9,
child: Center(
child: StText.big(
'FConsole Example',
style: TextStyle(color: ColorPlate.blue),
),
),
),
SettingRow(
icon: consoleHasShow ? Icons.tab : Icons.tab_unselected,
text: consoleHasShow ? 'Console打开' : 'Console关闭',
right: Container(
height: 36,
padding: EdgeInsets.only(right: 12),
child: Switch(
value: consoleHasShow,
onChanged: (v) {
if (v) {
showConsole();
} else {
hideConsole();
}
setState(() {});
},
),
),
),
Container(height: 12),
SettingRow(
icon: Icons.info_outline,
text: '打印log',
right: Container(),
onTap: () {
fconsole.log('打印信息:', DateTime.now());
},
),
SettingRow(
icon: Icons.warning,
text: '打印error',
right: Container(),
onTap: () {
fconsole.error('打印Error:', DateTime.now());
},
),
Container(height: 12),
SettingRow(
icon: Icons.edit,
text: '原生Print',
right: Container(),
onTap: () {
print('${DateTime.now().toIso8601String()}');
},
),
SettingRow(
icon: Icons.edit,
text: '原生Throw',
right: Container(),
onTap: () {
var a = [][123];
throw '${DateTime.now().toIso8601String()}';
},
),
Container(height: 12),
SettingRow(
icon: Icons.info_outline,
text: '滑动事件Flow',
right: Slider(
value: slideValue,
onChanged: (v) {
FlowLog.of(
'滑动Slider',
Duration(seconds: 2),
).log('Value: $v');
setState(() {
slideValue = v;
});
},
// onChangeEnd: (value) => FlowLog.of('滑动Slider').end(),
),
),
],
),
// body: Builder(
// builder: (ctx) {
// return FlatButton(
// onPressed: () {
// FConsole.log("asdadasd");
// },
// child: Center(
// child: Text('Running on: $_platformVersion\n'),
// ),
// );
// },
// ),
// floatingActionButton: Builder(
// builder: (ctx) {
// return FlatButton(
// onPressed: () {
// showConsole();
// },
// child: Container(
// height: 50,
// child: Text("show console"),
// ),
// );
// },
// ),
),
),
);
}
}
class SettingRow extends StatelessWidget {
final double padding;
final IconData icon;
final Widget right;
final Widget beforeRight;
final String text;
final Color textColor;
final Function onTap;
const SettingRow({
Key key,
this.padding: 14,
this.icon,
this.text,
this.textColor,
this.right,
this.onTap,
this.beforeRight,
}) : super(key: key);
@override
Widget build(BuildContext context) {
var child = Container(
color: ColorPlate.white,
padding: EdgeInsets.only(left: 8),
child: Row(
children: <Widget>[
icon == null
? Container()
: Container(
margin: EdgeInsets.symmetric(horizontal: 16),
child: Icon(
icon,
size: 20,
color: textColor,
),
),
Expanded(
child: Container(
padding: EdgeInsets.symmetric(vertical: padding),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: ColorPlate.lightGray),
),
),
child: Row(
children: <Widget>[
Expanded(
child: Container(
child: StText.normal(
text ?? '--',
style: TextStyle(
color: textColor,
),
),
),
),
Row(
children: <Widget>[
beforeRight ?? Container(),
Container(
margin: EdgeInsets.only(left: 8),
child: right ??
Container(
margin: EdgeInsets.only(right: 12),
child: Icon(
Icons.arrow_forward_ios,
color: ColorPlate.gray,
size: 12,
),
),
),
],
),
],
),
),
),
],
),
);
if (onTap == null) {
return child;
}
return Tapped(
onTap: onTap,
child: child,
);
}
}
| 28.613821 | 74 | 0.383009 |
0c54cdfc7b4ec9963069f8941d63333c561e2dd1 | 10,051 | htm | HTML | SN/SN1407.htm | dhamma/ccc_translation | abcad5d93400499e9719382de28b2e37bb4830ea | [
"Unlicense"
] | null | null | null | SN/SN1407.htm | dhamma/ccc_translation | abcad5d93400499e9719382de28b2e37bb4830ea | [
"Unlicense"
] | null | null | null | SN/SN1407.htm | dhamma/ccc_translation | abcad5d93400499e9719382de28b2e37bb4830ea | [
"Unlicense"
] | null | null | null | <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>SN.47.10</title>
<link rel="stylesheet" type="text/css" href="../js/ext/resources/css/ext-all.css">
<script type="text/javascript" src="../js/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../js/ext/ext-all.js"></script>
<script type="text/javascript" src="../js/jquery.js"></script>
<script type="text/javascript" src="sn.js"></script>
<link rel="stylesheet" type="text/css" href="sa.css">
<script type="text/javascript">draw_layout();do_some_thing();</script>
</head>
<body>
<div id="notediv"></div>
<div id="north">
<table border="0" cellpadding="0" cellspacing="0" width="900" bgcolor="#EDFFE1">
<tr>
<td><div align="right">
<form name="search_form" action="sn.php"><span style="font-size: 18pt; color: #525000">
經號:
<input type="text" name="keyword" style="font-size: 14pt; color: #525000" size="1">
<input type="submit" name="button1" value="進入" style="font-size: 12pt; background-color: #EDFFE1; color: #003AE8">
</form></div></td>
<td><div align="left">
<form name="search_form" action="SNsearch.php">
<input type="text" name="keyword" style="font-size: 18pt; color: #54547E" size="10">
<input type="submit" name="button1" value="檢索" style="font-size: 14pt; background-color: #EDFFE1; color: #003AE8"><span style="font-size: 18pt">
<span class="update_time">(SN.47.10 <script language="javascript">document.writeln(document.lastModified);</script>更新)</span>
</form></div></td>
</tr>
</table>
</div>
<div style="display: none">
<div id="center">
<div class="nikaya">
<span class="sutra_name">相應部47相應10經/<a onMouseover="note(this,31);">比丘尼</a>住所經</span>(念住相應/大篇/修多羅)(莊春江譯)
<br> 那時,<a onMouseover="note(this,200);">尊者</a>阿難在午前時穿好衣服後,取鉢與僧衣,去某個比丘尼的住所。抵達後,在設置好的座位坐下。
<br> 那時,眾多比丘尼去見尊者阿難。抵達後,向尊者阿難<a onMouseover="note(this,46);">問訊</a>,接著在一旁坐下。在一旁坐好後,那些比丘尼對尊者阿難這麼說:
<br> 「阿難<a onMouseover="note(this,45);">大德</a>!這裡,眾多比丘尼住於在<a onMouseover="note(this,286);">四念住</a>上心善建立後,次第覺知更卓越的特質。」
<br> 「正是這樣,比丘尼們!正是這樣,比丘尼們!
<br> 比丘尼們!凡任何比丘或比丘尼住於在四念住上心善建立者,這應該可以被預期:『他必將次第覺知更卓越的特質。』」
<br> 那時,尊者阿難以法說開示、勸導、鼓勵那些比丘尼,<a onMouseover="note(this,86);">使之歡喜</a>,然後起座離開。
<br> 那時,尊者阿難在舍衛城<a onMouseover="note(this,87);">為了托鉢</a>而行後,食畢,從施食處返回,去見世尊。抵達後,向世尊問訊,接著在一旁坐下。在一旁坐好後,尊者阿難對世尊這麼說:
<br> 「大德!這裡,我在午前時穿好衣服後,取鉢與僧衣,去某個比丘尼的住所。抵達後,在設置好的座位坐下。
<br> 那時,眾多比丘尼去見我。抵達後,向我問訊,接著在一旁坐下。在一旁坐好後,大德!那些比丘尼對我這麼說:『阿難大德!這裡,眾多比丘尼住於在四念住上心善建立後,次第覺知更卓越的特質。』
<br> 『正是這樣,比丘尼們!正是這樣,比丘尼們!
<br> 比丘尼們!凡任何比丘或比丘尼住於在四念住上心善建立者,這應該可以被預期:「他必將次第覺知更卓越的特質。」』」
<br> 「正是這樣,阿難!正是這樣,阿難!
<br> 阿難!凡任何比丘或比丘尼住於在四念住上心善建立者,這應該可以被預期:『他必將次第覺知更卓越的特質。』哪四個呢?
<br> 阿難!這裡,比丘住於在身上<a onMouseover="note(this,176);">隨觀身</a>,熱心、正知、有念,能調伏對於世間的貪與憂,當他住於在身上隨觀身時,生起身所緣的或身上的熱惱,或心的退縮,或向外地擾亂心,阿難!那樣,比丘的心應該被另安置於某些能激起信心的相。當他的心被另安置於某些能激起信心的相時,則欣悅被生;當已歡悅後,則喜被生;當<a onMouseover="note(this,320);">意喜</a>時,則身<a onMouseover="note(this,223);">寧靜</a>;<a onMouseover="note(this,318);">身已寧靜</a>者,則感受樂;心樂者,則入定,他像這樣深慮:『我為了利益另安置心,我的利益已完成,好了,現在我要撤回。』他就撤回,不尋思、不伺察,他了知:『以無尋、<a onMouseover="local(this,1);">無伺</a>,自身內有念,我是樂的。』
<br> 再者,阿難!比丘[住於]在受上……(中略)在心上……(中略)住於在法上隨觀法,熱心、正知、有念,能調伏對於世間的貪與憂,當他住於在法上隨觀法時,生起法所緣的或身上的熱惱,或心的退縮,或向外地擾亂心,阿難!那樣,比丘的心應該被另安置於某些能激起信心的相。當他的心被另安置於某些能激起信心的相時,則欣悅被生;當已歡悅後,則喜被生;當意喜時,則<a onMouseover="note(this,318);">身寧靜</a>;身已寧靜者,則感受樂;心樂者,則入定,他像這樣深慮:『我為了利益另安置心,我的利益已完成,好了,現在我要撤回。』他就撤回,不尋思、不伺察,他了知:『以無尋、無伺,自身內有念,我是樂的。』
<br> 阿難!這樣有另安置後的修習。
<br> 而,阿難!如何有不另安置後的修習?
<br> 阿難!比丘不向外另安置心後,他了知:『我的心不向外另安置。』那時,他了知:『<a onMouseover="local(this,2);">前後無簡略</a>,不另安置而解脫。』更進一步,他了知:『我住於在身上隨觀身,熱心、正知、有念,我是樂的。』
<br> 阿難!比丘不向外另安置心後,他了知:『我的心不向外另安置。』那時,他了知:『前後無簡略,不另安置而解脫。』更進一步,他了知:『我住於在受上隨觀受,熱心、正知、有念,我是樂的。』
<br> 阿難!比丘不向外另安置心後,他了知:『我的心不向外另安置。』那時,他了知:『前後無簡略,不另安置而解脫。』更進一步,他了知:『我住於在心上隨觀心,熱心、正知、有念,我是樂的。』
<br> 阿難!比丘不向外另安置心後,他了知:『我的心不向外另安置。』那時,他了知:『前後無簡略,不另安置而解脫。』更進一步,他了知:『我住於在法上隨觀法,熱心、正知、有念,我是樂的。』
<br> 阿難!這樣有不另安置後的修習。
<br> 像這樣,阿難!另安置後的修習已被我教導,不另安置後的修習已被我教導。
<br> 阿難!凡依憐愍對弟子有益的<a onMouseover="note(this,145);">大師</a>,<a onMouseover="note(this,121);">出自憐愍</a>所應作的,我已為你們做了。阿難!有這些樹下、這些空屋,阿難!你們要禪修!不要放逸,不要以後變得後悔,這是我們對你們的教誡。」
<br> 這就是世尊所說,悅意的尊者阿難歡喜世尊所說。
<br> 蓭婆巴利品第一,其<a onMouseover="note(this,35);">攝頌</a>:
<br> 「蓭婆巴利、念、比丘,薩羅、[不]善聚,
<br> 鷹、猴子、廚師,病、比丘尼住所。」
<br>
</div>
</div>
<div id="east">
<div class="pali">
SN.47.10/(10). Bhikkhunupassayasuttaṃ
<br> 376. Atha kho āyasmā ānando pubbaṇhasamayaṃ nivāsetvā pattacīvaramādāya yena aññataro bhikkhunupassayo tenupasaṅkami; upasaṅkamitvā paññatte āsane nisīdi. Atha kho sambahulā bhikkhuniyo yenāyasmā ānando tenupasaṅkamiṃsu; upasaṅkamitvā āyasmantaṃ ānandaṃ abhivādetvā ekamantaṃ nisīdiṃsu. Ekamantaṃ nisinnā kho tā bhikkhuniyo āyasmantaṃ ānandaṃ etadavocuṃ –
<br> “Idha, bhante ānanda, sambahulā bhikkhuniyo catūsu satipaṭṭhānesu suppatiṭṭhitacittā viharantiyo uḷāraṃ pubbenāparaṃ visesaṃ sañjānantī”ti. “Evametaṃ bhaginiyo, evametaṃ, bhaginiyo! Yo hi koci, bhaginiyo, bhikkhu vā bhikkhunī vā catūsu satipaṭṭhānesu suppatiṭṭhitacitto viharati, tassetaṃ pāṭikaṅkhaṃ– ‘uḷāraṃ pubbenāparaṃ visesaṃ sañjānissatī’”ti.
<br> Atha kho āyasmā ānando tā bhikkhuniyo dhammiyā kathāya sandassetvā samādapetvā samuttejetvā sampahaṃsetvā uṭṭhāyāsanā pakkāmi. Atha kho āyasmā ānando sāvatthiyaṃ piṇḍāya caritvā pacchābhattaṃ piṇḍapātapaṭikkanto yena bhagavā tenupasaṅkamiṃ; upasaṅkamitvā bhagavantaṃ abhivādetvā ekamantaṃ nisīdiṃ. Ekamantaṃ nisinno kho āyasmā ānando bhagavantaṃ etadavoca–
<br> “Idhāhaṃ, bhante, pubbaṇhasamayaṃ nivāsetvā pattacīvaramādāya yena aññataro bhikkhunupassayo tenupasaṅkamiṃ; upasaṅkamitvā paññatte āsane nisīdiṃ. Atha kho, bhante, sambahulā bhikkhuniyo yenāhaṃ tenupasaṅkamiṃsu; upasaṅkamitvā maṃ abhivādetvā ekamantaṃ nisīdiṃsu. Ekamantaṃ nisinnā kho, bhante, tā bhikkhuniyo maṃ etadavocuṃ– ‘idha, bhante ānanda, sambahulā bhikkhuniyo catūsu satipaṭṭhānesu suppatiṭṭhitacittā viharantiyo uḷāraṃ pubbenāparaṃ visesaṃ sañjānantī’ti. Evaṃ vuttāhaṃ, bhante, tā bhikkhuniyo etadavocaṃ– ‘evametaṃ, bhaginiyo, evametaṃ, bhaginiyo! Yo hi koci, bhaginiyo, bhikkhu vā bhikkhunī vā catūsu satipaṭṭhānesu suppatiṭṭhitacitto viharati, tassetaṃ pāṭikaṅkhaṃ– uḷāraṃ pubbenāparaṃ visesaṃ sañjānissatī’”ti.
<br> “Evametaṃ, ānanda, evametaṃ, ānanda! Yo hi koci, ānanda, bhikkhu vā bhikkhunī vā catūsu satipaṭṭhānesu suppatiṭṭhitacitto viharati, tassetaṃ pāṭikaṅkhaṃ– ‘uḷāraṃ pubbenāparaṃ visesaṃ sañjānissati’” .
<br> “Katamesu catūsu? Idhānanda, bhikkhu kāye kāyānupassī viharati ātāpī sampajāno satimā, vineyya loke abhijjhādomanassaṃ. Tassa kāye kāyānupassino viharato kāyārammaṇo vā uppajjati kāyasmiṃ pariḷāho, cetaso vā līnattaṃ, bahiddhā vā cittaṃ vikkhipati. Tenānanda, bhikkhunā kismiñcideva pasādanīye nimitte cittaṃ paṇidahitabbaṃ. Tassa kismiñcideva pasādanīye nimitte cittaṃ paṇidahato pāmojjaṃ jāyati. Pamuditassa pīti jāyati. Pītimanassa kāyo passambhati. Passaddhakāyo sukhaṃ vedayati. Sukhino cittaṃ samādhiyati. So iti paṭisañcikkhati– ‘yassa khvāhaṃ atthāya cittaṃ paṇidahiṃ, so me attho abhinipphanno. Handa, dāni paṭisaṃharāmī’ti. So paṭisaṃharati ceva na ca vitakketi na ca vicāreti. ‘Avitakkomhi avicāro, ajjhattaṃ satimā sukhamasmī’ti pajānāti”.
<br> “Puna caparaṃ, ānanda, bhikkhu vedanāsu …pe… citte …pe… dhammesu dhammānupassī viharati ātāpī sampajāno satimā, vineyya loke abhijjhādomanassaṃ. Tassa dhammesu dhammānupassino viharato dhammārammaṇo vā uppajjati kāyasmiṃ pariḷāho, cetaso vā līnattaṃ, bahiddhā vā cittaṃ vikkhipati. Tenānanda, bhikkhunā kismiñcideva pasādanīye nimitte cittaṃ paṇidahitabbaṃ. Tassa kismiñcideva pasādanīye nimitte cittaṃ paṇidahato pāmojjaṃ jāyati Pamuditassa pīti jāyati. Pītimanassa kāyo passambhati. Passaddhakāyo sukhaṃ vedayati. Sukhino cittaṃ samādhiyati. So iti paṭisañcikkhati– ‘yassa khvāhaṃ atthāya cittaṃ paṇidahiṃ, so me attho abhinipphanno. Handa, dāni paṭisaṃharāmī’ti. So paṭisaṃharati ceva na ca vitakketi na ca vicāreti. ‘Avitakkomhi avicāro, ajjhattaṃ satimā sukhamasmī’ti pajānāti. Evaṃ kho, ānanda, paṇidhāya bhāvanā hoti.
<br> “Kathañcānanda appaṇidhāya bhāvanā hoti? Bahiddhā ānanda, bhikkhu cittaṃ appaṇidhāya ‘appaṇihitaṃ me bahiddhā cittan’ti pajānāti. Atha pacchāpure ‘asaṃkhittaṃ vimuttaṃ appaṇihitan’ti pajānāti. Atha ca pana ‘kāye kāyānupassī viharāmi ātāpī sampajāno satimā sukhamasmī’ti pajānāti. Bahiddhā, ānanda, bhikkhu cittaṃ appaṇidhāya ‘appaṇihitaṃ me bahiddhā cittan’ti pajānāti. Atha pacchāpure ‘asaṃkhittaṃ vimuttaṃ appaṇihitan’ti pajānāti. Atha ca pana ‘vedanāsu vedanānupassī viharāmi ātāpī sampajāno satimā sukhamasmī’ti pajānāti. Bahiddhā, ānanda, bhikkhu cittaṃ appaṇidhāya ‘appaṇihitaṃ me bahiddhā cittan’ti pajānāti. Atha pacchāpure ‘asaṃkhittaṃ vimuttaṃ appaṇihitan’ti pajānāti. Atha ca pana ‘citte cittānupassī viharāmi ātāpī sampajāno satimā sukhamasmī’ti pajānāti. Bahiddhā, ānanda, bhikkhu cittaṃ appaṇidhāya ‘appaṇihitaṃ me bahiddhā cittan’ti pajānāti. Atha pacchāpure ‘asaṃkhittaṃ vimuttaṃ appaṇihitan’ti pajānāti. Atha ca pana ‘dhammesu dhammānupassī viharāmi ātāpī sampajāno satimā sukhamasmī’ti pajānāti. Evaṃ kho, ānanda, appaṇidhāya bhāvanā hoti.
<br> “Iti kho, ānanda, desitā mayā paṇidhāya bhāvanā, desitā appaṇidhāya bhāvanā. Yaṃ, ānanda, satthārā karaṇīyaṃ sāvakānaṃ hitesinā anukampakena anukampaṃ upādāya, kataṃ vo taṃ mayā. Etāni, ānanda, rukkhamūlāni, etāni suññāgārāni! Jhāyathānanda, mā pamādattha; mā pacchā vippaṭisārino ahuvattha! Ayaṃ vo amhākaṃ anusāsanī”ti.
<br> Idamavoca bhagavā. Attamano āyasmā ānando bhagavato bhāsitaṃ abhinandīti. Dasamaṃ.
<br> Ambapālivaggo paṭhamo.
<br> Tassuddānaṃ–
<br> Ambapāli sato bhikkhu, sālā kusalarāsi ca.
<br> Sakuṇagdhi makkaṭo sūdo, gilāno bhikkhunupassayoti.
<br>
</div>
</div>
<div id="south">
<div class="comp">
<span class="sutra_name">漢巴經文比對</span>(莊春江作):
<br> <span id="note1">「無覺、無觀(SA.615)」,南傳作「以無尋、無伺」(Avitakkomhi avicāro),菩提比丘長老英譯為「無想法與檢查」(Without thought and examination),並說,註釋書解說為「不被雜染的尋,不被雜染的伺」,這似乎意味著他到達第二禪,另參看《中部125經》。</span>
<br> <span id="note2">「前後無簡略」(pacchāpure ‘asaṃkhittaṃ),菩提比丘長老英譯為「它前後不被壓縮」(It is unconstricted after and before),並引註釋書的解說,「前後」指的是「自始至終」,一貫地。</span>
<br>
</div>
</div>
</div>
</body>
</html>
| 100.51 | 1,064 | 0.774848 |
0aa44c9bb987f87fe36fdd810a3a30584ffa5636 | 5,800 | ps1 | PowerShell | ax2012.tools/functions/import-axmodelv2.ps1 | d365collaborative/ax2012.tools | 0dc5e18e47a2c1a357f4004a59cc9f0cbb4ba0ce | [
"MIT"
] | 11 | 2018-10-30T08:55:09.000Z | 2020-01-28T14:42:10.000Z | ax2012.tools/functions/import-axmodelv2.ps1 | d365collaborative/ax2012.tools | 0dc5e18e47a2c1a357f4004a59cc9f0cbb4ba0ce | [
"MIT"
] | 6 | 2018-10-20T19:05:33.000Z | 2019-10-20T17:25:07.000Z | ax2012.tools/functions/import-axmodelv2.ps1 | d365collaborative/ax2012.tools | 0dc5e18e47a2c1a357f4004a59cc9f0cbb4ba0ce | [
"MIT"
] | 6 | 2018-10-15T13:46:18.000Z | 2021-02-24T11:49:02.000Z |
<#
.SYNOPSIS
Import AX 2012 model
.DESCRIPTION
Import AX 2012 model into the AX 2012 Model store
.PARAMETER DatabaseServer
Server name of the database server
Default value is: "localhost"
.PARAMETER ModelstoreDatabase
Name of the modelstore database
Default value is: "MicrosoftDynamicsAx_model"
Note: From AX 2012 R2 and upwards you need to provide the full name for the modelstore database. E.g. "AX2012R3_PROD_model"
.PARAMETER Path
Path to the folder containing the AX model file(s) that you want to import
The cmdlet will traverse all sub folders for files and import them based on their names
.PARAMETER ConflictMode
Instructs the cmdlet to handle conflicts
The list of options is:
"Reject"
"Push"
"Overwrite"
.PARAMETER Detailed
Instruct the cmdlet to output detailed element names and AOT path while importing the model
.PARAMETER CreateParents
Instruct the cmdlet to create missing parents on import
.PARAMETER NoOptimize
Instruct the cmdlet to skip the optimization on import
This makes sense if you are import more than 1-2 AX 2012 models at the same time
.PARAMETER NoPrompt
Instruct the cmdlet not to prompt you with anything
.PARAMETER ShowOriginalProgress
Instruct the cmdlet to show the standard output in the console
Default is $false which will silence the standard output
.PARAMETER OutputCommandOnly
Instruct the cmdlet to output a script that you can execute manually later
Using this will not import any AX 2012 models into the model store
.EXAMPLE
PS C:\> Import-AxModelV2 -Path "c:\temp\ax2012.tools\dev-models"
The cmdlet will look for all the AX 2012 models located in "c:\temp\ax2012.tools\dev-models" or any of its sub folders.
The ConflictMode is set to the default value of "OverWrite".
The Database Server is set to the default value of "localhost".
The Modelstore Database is set to the default value of "MicrosoftDynamicsAx_model".
.EXAMPLE
PS C:\> Import-AxModelV2 -Path "c:\temp\ax2012.tools\dev-models" -ShowOriginalProgress
The cmdlet will look for all the AX 2012 models located in "c:\temp\ax2012.tools\dev-models" or any of its sub folders.
The ConflictMode is set to the default value of "OverWrite".
The Database Server is set to the default value of "localhost".
The Modelstore Database is set to the default value of "MicrosoftDynamicsAx_model".
It will show the original progress output for the import of the model file in real time.
.NOTES
Author: Mötz Jensen (@Splaxi)
#>
Function Import-AxModelV2 {
[CmdletBinding()]
[OutputType([System.String], ParameterSetName="Generate")]
Param(
[Parameter(ValueFromPipelineByPropertyName = $true)]
[string] $DatabaseServer = $Script:ActiveAosDatabaseserver,
[Parameter(ValueFromPipelineByPropertyName = $true)]
[string] $ModelstoreDatabase = $Script:ActiveAosModelstoredatabase,
[Parameter(Mandatory = $false)]
[string] $Path = $Script:DefaultTempPath,
[Parameter(Mandatory = $false)]
[ValidateSet("Reject", "Push", "Overwrite")]
[string] $ConflictMode = "Overwrite",
[switch] $Detailed,
[switch] $CreateParents,
[switch] $NoOptimize,
[switch] $NoPrompt,
[switch] $ShowOriginalProgress,
[Parameter(ParameterSetName = "Generate")]
[switch] $OutputCommandOnly
)
BEGIN {
$null = Import-Module $Script:AxPowerShellModule
if (-not (Test-PathExists -Path $Path -Type Container)) { return }
}
PROCESS {
if (Test-PSFFunctionInterrupt) { return }
Invoke-TimeSignal -Start
$AxModelsPath = (Get-ChildItem -Path $Path | Where-Object { $_.PSIsContainer } | Sort-Object CreationTime -Descending | Select-Object -First 1 | Select-Object Fullname).FullName
Write-PSFMessage -Level Verbose -Message "The newest / latest folder is: $AxModelsPath" -Target $AxModelsPath
$AxModelFiles = Get-ChildItem -Path $AxModelsPath -Recurse -File
$params = @{ Server = $DatabaseServer; Conflict = $ConflictMode;
Database = $ModelstoreDatabase
}
$paramsSwitch = Get-HashtableKey -InputObject $PSBoundParameters -Keys @("CreateParents", "NoOptimize", "NoPrompt")
if($Detailed){
$paramsSwitch.Add("Details", $Detailed)
}
foreach ($item in $AxModelFiles) {
Write-PSFMessage -Level Verbose -Message "Working on file: $($item.FullName)" -Target $item.FullName
$clonedParams = Get-DeepClone $params
$clonedParams.File = $item.FullName
if ($OutputCommandOnly) {
$arguments = Convert-HashToArgString -InputObject $clonedParams
$argumentsSwitch = Convert-HashToArgStringSwitch -InputObject $paramsSwitch
"Install-AxModel $($arguments -join ' ') $($argumentsSwitch -join ' ')"
}
else {
$outputRes = Install-AXModel @clonedParams @paramsSwitch
if($ShowOriginalProgress) {
$outputRes
}
}
}
Invoke-TimeSignal -End
}
END {
Clear-Ax2012StandardPowershellModule
}
} | 35.365854 | 185 | 0.623448 |
dfac4d471f48ae9e53e630e2affa6b96a4716961 | 423 | ts | TypeScript | src/classes/Dino.ts | amirh19/phaser3-typescript-project-template | 8c3c462df5a2087b4e02df78cea0682ef3e3f968 | [
"MIT"
] | null | null | null | src/classes/Dino.ts | amirh19/phaser3-typescript-project-template | 8c3c462df5a2087b4e02df78cea0682ef3e3f968 | [
"MIT"
] | null | null | null | src/classes/Dino.ts | amirh19/phaser3-typescript-project-template | 8c3c462df5a2087b4e02df78cea0682ef3e3f968 | [
"MIT"
] | null | null | null | import "phaser";
import MoveAnimations from "./MoveAnimations";
import Player from "./Player";
export default class Dino extends Player {
loadMoveAnimations() {
this.loadAnimation(MoveAnimations.LEFT, {
start: 3,
end: 9,
});
this.loadAnimation(MoveAnimations.TURN, {
start: 0,
end: 3,
});
this.loadAnimation(MoveAnimations.RIGHT, {
start: 3,
end: 9,
});
}
}
| 20.142857 | 46 | 0.617021 |
5b5a4e902b8bdc69b6053d4ea32a13c9f55b7f12 | 1,990 | cpp | C++ | src/dynamicLibrary.cpp | Piglit/SeriousProton | 6be74d1aca54d6c7f99fa403b0c3d2891a5ca8dc | [
"MIT"
] | null | null | null | src/dynamicLibrary.cpp | Piglit/SeriousProton | 6be74d1aca54d6c7f99fa403b0c3d2891a5ca8dc | [
"MIT"
] | null | null | null | src/dynamicLibrary.cpp | Piglit/SeriousProton | 6be74d1aca54d6c7f99fa403b0c3d2891a5ca8dc | [
"MIT"
] | null | null | null | #include "dynamicLibrary.h"
#include "logging.h"
#include <string_view>
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
using handle_t = HMODULE;
static constexpr std::string_view native_extension{ ".dll" };
#else // assume posix
#include <dlfcn.h>
using handle_t = void*;
#ifdef __APPLE__
static constexpr std::string_view native_extension{ ".dylib" };
#else
static constexpr std::string_view native_extension{ ".so" };
#endif
#endif
struct DynamicLibrary::Impl final
{
explicit Impl(handle_t handle)
:handle{ handle }
{}
Impl(const Impl&) = delete;
Impl(Impl&&) = delete;
Impl& operator=(const Impl&) = delete;
Impl& operator=(Impl&&) = delete;
~Impl();
handle_t handle{};
};
DynamicLibrary::Impl::~Impl()
{
if (!handle)
return;
#if defined(_WIN32)
FreeLibrary(handle);
#else
dlclose(handle);
#endif
}
[[nodiscard]]
std::unique_ptr<DynamicLibrary> DynamicLibrary::open(const std::filesystem::path& filepath)
{
std::unique_ptr<DynamicLibrary> library;
#if defined(_WIN32)
auto handle = LoadLibraryW(filepath.c_str());
#else
auto handle = dlopen(filepath.c_str(), RTLD_LAZY);
#endif
if (handle)
library.reset(new DynamicLibrary(std::make_unique<Impl>(handle)));
return library;
}
std::filesystem::path DynamicLibrary::add_native_suffix(const std::filesystem::path& basepath)
{
auto result = basepath;
result += native_extension;
return result;
}
template<>
void* DynamicLibrary::getFunction<void*>(std::string_view name)
{
if (!impl->handle)
return nullptr;
#if defined(_WIN32)
return reinterpret_cast<void*>(GetProcAddress(impl->handle, name.data()));
#else
return dlsym(impl->handle, name.data());
#endif
}
DynamicLibrary::~DynamicLibrary() = default;
void* DynamicLibrary::nativeHandle() const
{
return impl->handle;
}
DynamicLibrary::DynamicLibrary(std::unique_ptr<Impl>&& impl)
:impl{ std::move(impl) }
{
}
| 20.729167 | 94 | 0.68794 |
963edd704910437060a85bc19e626ec12d6b09d2 | 14,775 | php | PHP | resources/views/financial_support.blade.php | MathiMathu/ComsocProject | 50fc112a747ddb34376f57961997240e7555d9af | [
"MIT"
] | 2 | 2020-12-30T02:28:20.000Z | 2021-01-12T08:01:35.000Z | resources/views/financial_support.blade.php | MathiMathu/ComsocProject | 50fc112a747ddb34376f57961997240e7555d9af | [
"MIT"
] | 2 | 2021-05-14T03:58:50.000Z | 2021-06-11T11:56:56.000Z | resources/views/financial_support.blade.php | MathiMathu/ComsocProject | 50fc112a747ddb34376f57961997240e7555d9af | [
"MIT"
] | 3 | 2020-11-30T10:46:09.000Z | 2020-12-30T07:33:18.000Z | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Finnacial Support</title>
<link rel = "stylesheet" type = "text/css" href = "css/bootstrap.min.css">
<link rel = "stylesheet" type = "text/css" href = "css/footer.css">
<!--link style navibar and slider-->
<link rel = "stylesheet" type = "text/css" href = "css/style.css">
<!--link the font awesome/icons 4.7-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!----------------------link google font for body------------------------->
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,600,600i,700,700i" rel="stylesheet">
<!----------------------link google font for website name------------------------->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=East+Sea+Dokdo&family=Texturina:ital,wght@1,100&display=swap" rel="stylesheet">
{{-- <script type="text/javascript" src="https://gc.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=v6HePCTnT6Z0HoRqAnrN84RI9LNaEztjACmbi70896NcVWOwpUEAV75w22zaJwFoGrU8UT_8Mu83kcORnkhBTK3YIIza3IvA4wicuw85IsMDzi7g_eBCL2M8sLlyv3B_puWdyO8Q6IjIxudA0qVwp6TPiAslUFASojXN3XnpgcDUIEjqJR759_IoCTZIMvSMvFUBHSbvj7ZRfvOEQhLiH0PTnvBd3w5hZsOu7EuaCjosZohatxu9mpHL96Dq6tbctI7hnUKs864AfPb08onoqdK7SvJTKdOd8YqttHzAQn-ksn5-VatlBQAnDtO-LPXmyiWNge7Xub1Vrj6swdAOsGbP3wtecStM0erT0py1lka_p9XdX4pumayu05MATm3MevONzOOLxRVQQLngZBStCxmDKww08DWuYxugAWOpSKR5T5qh6Od-nGbmhu08V08Aj-XObNTOo9JvsFJjMiZpRA" charset="UTF-8"></script></head> --}}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<style>
html,body{
height:100%;
width:100%;
font-family: "Open Sans", sans-serif;
color:#222;
}
h1, h2, h3, h4, h5, h6, a, i, p {
font-family: "Raleway", sans-serif;
}
.dropdown-menu a:hover {
color: #1608d4 !important;
}
a:hover {
color:#1608d4 !important;
}
.nav-item{
margin-left:10px;
}
.navbar-toggler{
color:#03fce3;
}
.university-logo{
width:100%;
height:100%;
}
.btn-apply{
background-color:#050661;
color:white;
margin-left:200px;
}
.btn-apply:hover{
background-color:#11acb8;
}
li{
font-family: 'Raleway', sans-serif;
}
</style>
</head>
<body>
<!--navigation bar-->
<nav class="navbar navbar-expand-md navbar-light sticky-top" style="background-color:#080624; color:#ffffff;">
<div class="container-fluid">
<h2 class="society-name " style="color:white; font-family: 'Texturina', serif;">CompSoc</h2>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item active" >
<a class="nav-link" href="/" style="color:#ffffff;">Home</a>
</li>
<li class="nav-item" >
<a class="nav-link" href="aboutus" style="color:#ffffff;">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/members" style="color:#ffffff;">Team</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/kananiyam" style="color:#ffffff;">Newsletter</a>
</li>
<li class="nav-item nav-item1">
<a class="nav-link" href="/gallery" style="color:#ffffff;">Gallery</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="color:#ffffff; ">Events</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown" style="background-color:#080624;">
<a class="dropdown-item" href="{{ route('events.index') }}" style="color:#ffffff;">Upcoming Events</a>
<a class="dropdown-item" href="/previousevents" style="color:#ffffff;">Previous Events</a>
<a class="dropdown-item" href="/Seminar" style="color:#ffffff;">Seminars</a>
<a class="dropdown-item" href="/festival" style="color:#ffffff;">Festivals</a>
<a class="dropdown-item" href="/cspark" style="color:#ffffff;">Park</a>
<a class="dropdown-item" href="/financial_support" style="color:#ffffff;">Financial Support</a>
<a class="dropdown-item" href="aboutus" style="color:#ffffff;">About Us</a>
</div>
</li>
<li class="nav-item">
@guest
@if (Route::has('login'))
<li class="nav-item">
<a href="{{ route('login') }}" class="btn" aria-pressed="true" style="color:#ffffff;">{{ __('Login') }}</a>
</li>
@endif
@else
<li class="nav-item dropdown">
<a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" aria-pressed="true" style="color:#ffffff;" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
@if(empty(Auth::user()->profile))
<i class="fa fa-user-circle-o fa-lg" aria-hidden="true"></i>
@else
<img src="{{asset('/storage/images/'.Auth::user()->profile)}}" width="20" height="20" class="rounded-circle">
@endif
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" aria-pressed="true" href="/profile/{id}">
<b>
Profile
</b>
</a>
<a class="dropdown-item" aria-pressed="true" href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
<b>
{{ __('Logout') }}
</b>
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
@csrf
</form>
</div>
</li>
@endguest
</li>
</ul>
</div><!--collapse navibar-collapse-->
</div><!--end container-fluid-->
</nav><!--end navibar-->
<br>
<br>
<!---------------Inside navbar and footer----------------->
<!----------------Term and university image---------------------------->
<div class="container">
<img src="img/p2.jpg" alt=""class="img-fluid">
</div>
<!----------------End Term and university image---------------------------->
<br>
<br>
<!----------------condition and apply form---------------------------->
<div class="container-fluid padding">
<div class="row ">
<div class="col-md-6">
<h4><b>Eligibility Criteria for Award of Bursary</b></h4>
<ul>
<li> Student should be registered for a programme of study of a minimum duration of two years. However, those registered in programmes leading to one from to another in a different level (e.g. Certificate, Advanced
Certificate to Diploma/Degree) may also be considered for selection</li>
<li>Student should have sat and attained a minimum Grade Point Average (GPA) of 2.0 in the final examinations of courses adding up to a total of at least 18 credits at the particular Level in the previous year.
No disciplinary action should have been taken against the student.
</li>
<li>Some courses considered for the final award of the programme will be taken for the calculation of GPA for the Bursary.
</li>
<li> The gross family income of the student shall be less than Rs 500,000/= [Student shall submit a sworn statement that his/her family income is less than Rs. 500,000/=]</li>
<li>The university from time to time may make necessary amendments to the criteria while abiding by the guidelines proposed in the document.</li>
</ul>
</div>
<div class="col-md-6">
<h4><b>How To Apply for Scholarship</b></h4>
<ul>
<li> How to Apply: For being considered for the award, applicants have to take admission in the undergraduate degree coursework at the university. After being enrolled, you can complete the application form and hand over to Grama Niladari of the division.</li>
<li>Supporting Documents: Students have to submit the acceptance letter along with a form and savings account details at any Bank of a student.
</li>
<li>Admission Requirements: For taking admission at the university, candidates must hold a previous degree certificate with excellent academic achievement.
</li>
<li> Language Requirement: Applicants will often need to meet the English language requirements of the university.</li>
</ul>
<h4><b>Benefits</b></h4>
<ul>
<li>Students selected for merit bursary will receive Rs.4000 per instalment.</li>
<li>Students chosen for the ordinary support will receive Rs.3900 per instalment.</li>
</ul>
<a href="finnancial_apply_now" class="btn btn-apply" >Apply For Financial support</a>
</div>
</div>
</div>
<!---------------- End condition and apply form---------------------------->
<!---------------Inside navbar and footer----------------->
<br>
<br>
<!--footer-->
<footer class="site-footer">
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-6">
<h6>About</h6>
<img src="img/home/logo.jpg" alt="" class="img-fluid">
</div>
<div class="col-xs-6 col-md-4">
<h6 class = "text-center">Contact</h6>
<div class="row">
<div class="column left">
<p style = "font-size : 10px"> President,<br>Computer Society (CompSoc),<br>Department of Computer Science,<br>University of Jaffna.<br>Email : comsoc@univ.jfn.ac.lk<br>Phone : 077 104 4491</p>
</div>
<div class="column right">
<p style = "font-size : 10px">Head,<br>Department of Computer Science,<br>Faculty of Science,<br>University of Jaffna.<br>Email : dcs@univ.jfn.ac.lk<br>Phone : 021 221 8194</p>
</div>
</div>
</div>
<div class="col-xs-6 col-md-2">
<h6>Quick Links</h6>
<ul class="footer-links" >
<li><a href="/">Home</a></li>
<li><a href="aboutus">About</a></li>
<li><a href="/members">Team</a></li>
<li><a href="kananiyam">Newsletter</a></li>
<li><a href="/gallery">Gallery</a></li>
<li><a href="events">Events</a></li>
</ul>
</div>
</div>
<hr>
</div>
<div class="container">
<div class="row">
<div class="col-md-8 col-sm-6 col-xs-12">
<p class="copyright-text">Copyright © 2017 All Rights Reserved by
<a href="#">Computer Society University of Jaffna </a>.
</p>
</div>
<div class="col-md-4 col-sm-6 col-xs-12">
<ul class="social-icons">
<li><a class="facebook" href="https://m.facebook.com/uojcompsoc"><i class="fa fa-facebook"></i></a></li>
<li><a class="twitter" href="#"><i class="fa fa-twitter"></i></a></li>
<li><a class="instagram" href="#"><i class="fa fa-instagram"></i></a></li>
<li><a class="linkedin" href="#"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
</div>
</div>
</footer>
<!-- end footer class-->
<script type = "text/javascript" src = "js/bootstrap.min.js "></script>
<script type = "text/javascript" src = "js/Jque.js "></script>
</body>
</html>
| 54.925651 | 642 | 0.51736 |
9e09a729f437c97150342235b455cdef91b0d500 | 153 | rs | Rust | src/bin/31asm.rs | dragon-zhang/rust-study | a7ae2e00ea01f8752fffd60276f9ee567a5ac9dd | [
"Apache-2.0"
] | null | null | null | src/bin/31asm.rs | dragon-zhang/rust-study | a7ae2e00ea01f8752fffd60276f9ee567a5ac9dd | [
"Apache-2.0"
] | null | null | null | src/bin/31asm.rs | dragon-zhang/rust-study | a7ae2e00ea01f8752fffd60276f9ee567a5ac9dd | [
"Apache-2.0"
] | null | null | null | use std::arch::asm;
fn main() {
let x: u64;
unsafe {
asm!("mov {}, 5", out(reg) x);
}
assert_eq!(x, 5);
println!("{}", x);
} | 15.3 | 38 | 0.424837 |
f1b6df252691d705826512cb93d05345ca0fe489 | 4,046 | sql | SQL | Banco de Dados I/Lista02/faculdade.sql | felipolis/UTFPR | 39bc087b536c2496d7a4b64ecfcd97b979f0e243 | [
"MIT"
] | null | null | null | Banco de Dados I/Lista02/faculdade.sql | felipolis/UTFPR | 39bc087b536c2496d7a4b64ecfcd97b979f0e243 | [
"MIT"
] | null | null | null | Banco de Dados I/Lista02/faculdade.sql | felipolis/UTFPR | 39bc087b536c2496d7a4b64ecfcd97b979f0e243 | [
"MIT"
] | null | null | null | DROP TABLE IF EXISTS PROFESSOR_LECIONA_TURMA;
DROP TABLE IF EXISTS INSCRICAO_TURMA;
DROP TABLE IF EXISTS PRE_REQUISITO;
DROP TABLE IF EXISTS CURSO_TEM_DICIPLINA;
DROP TABLE IF EXISTS INSCRICAO_CURSO;
DROP TABLE IF EXISTS PESSOA_FAZ_INSCRICAO;
DROP TABLE IF EXISTS FUNCIONARIO_AUXILIA_PROFESSOR;
DROP TABLE IF EXISTS TURMA;
DROP TABLE IF EXISTS DICIPLINA;
DROP TABLE IF EXISTS CURSO;
DROP TABLE IF EXISTS INSCRICAO;
DROP TABLE IF EXISTS PROFESSOR;
DROP TABLE IF EXISTS FUNCIONARIO;
DROP TABLE IF EXISTS ALUNO;
DROP TABLE IF EXISTS PESSOA;
CREATE TABLE PESSOA (
ID INTEGER NOT NULL PRIMARY KEY
);
CREATE TABLE ALUNO (
ID_PESSOA INTEGER NOT NULL,
FOREIGN KEY (ID_PESSOA) REFERENCES PESSOA (ID),
PRIMARY KEY (ID_PESSOA)
);
CREATE TABLE FUNCIONARIO (
ID_PESSOA INTEGER NOT NULL,
FOREIGN KEY (ID_PESSOA) REFERENCES PESSOA (ID),
PRIMARY KEY (ID_PESSOA)
);
CREATE TABLE PROFESSOR (
ID_PESSOA INTEGER NOT NULL,
FOREIGN KEY (ID_PESSOA) REFERENCES PESSOA (ID),
PRIMARY KEY (ID_PESSOA)
);
CREATE TABLE INSCRICAO(
ID INTEGER NOT NULL PRIMARY KEY,
INICIO DATE NOT NULL,
FIM DATE NOT NULL,
STATUS VARCHAR(20) NOT NULL
);
CREATE TABLE CURSO (
NOME VARCHAR(50) NOT NULL PRIMARY KEY
);
CREATE TABLE DICIPLINA (
NOME VARCHAR(50) NOT NULL PRIMARY KEY
);
CREATE TABLE TURMA (
SEMESTRE_ANO INTEGER NOT NULL,
NOME_CURSO VARCHAR(50) NOT NULL,
NOME_DICIPLINA VARCHAR(50) NOT NULL,
PRIMARY KEY (SEMESTRE_ANO, NOME_CURSO, NOME_DICIPLINA),
FOREIGN KEY (NOME_CURSO) REFERENCES CURSO (NOME),
FOREIGN KEY (NOME_DICIPLINA) REFERENCES DICIPLINA (NOME)
);
/*----------------relações---------------*/
CREATE TABLE FUNCIONARIO_AUXILIA_PROFESSOR (
ID_FUNCIONARIO INTEGER NOT NULL,
ID_PROFESSOR INTEGER NOT NULL,
FOREIGN KEY (ID_FUNCIONARIO) REFERENCES FUNCIONARIO (ID_PESSOA),
FOREIGN KEY (ID_PROFESSOR) REFERENCES PROFESSOR (ID_PESSOA),
PRIMARY KEY (ID_FUNCIONARIO, ID_PROFESSOR)
);
CREATE TABLE PESSOA_FAZ_INSCRICAO (
ID_PESSOA INTEGER NOT NULL,
ID_INSCRICAO INTEGER NOT NULL,
FOREIGN KEY (ID_PESSOA) REFERENCES PESSOA (ID),
FOREIGN KEY (ID_INSCRICAO) REFERENCES INSCRICAO (ID),
PRIMARY KEY (ID_INSCRICAO)
);
CREATE TABLE INSCRICAO_CURSO (
ID_INSCRICAO INTEGER NOT NULL,
NOME_CURSO VARCHAR(50) NOT NULL,
FOREIGN KEY (ID_INSCRICAO) REFERENCES INSCRICAO (ID),
FOREIGN KEY (NOME_CURSO) REFERENCES CURSO (NOME),
PRIMARY KEY (ID_INSCRICAO)
);
CREATE TABLE CURSO_TEM_DICIPLINA (
NOME_CURSO VARCHAR(50) NOT NULL,
NOME_DICIPLINA VARCHAR(50) NOT NULL,
FOREIGN KEY (NOME_CURSO) REFERENCES CURSO (NOME),
FOREIGN KEY (NOME_DICIPLINA) REFERENCES DICIPLINA (NOME),
PRIMARY KEY (NOME_CURSO, NOME_DICIPLINA)
);
CREATE TABLE PRE_REQUISITO (
NOME_DICIPLINA VARCHAR(50) NOT NULL,
NOME_PRE_REQUISITO VARCHAR(50) NOT NULL,
SERIAL_SEQ INTEGER NOT NULL,
FOREIGN KEY (NOME_DICIPLINA) REFERENCES DICIPLINA (NOME),
FOREIGN KEY (NOME_PRE_REQUISITO) REFERENCES DICIPLINA (NOME),
PRIMARY KEY (NOME_DICIPLINA)
);
CREATE TABLE INSCRICAO_TURMA (
ID_INSCRICAO INTEGER NOT NULL,
NOME_CURSO VARCHAR(50) NOT NULL,
NOME_DICIPLINA VARCHAR(50) NOT NULL,
SEMESTRE_ANO INTEGER NOT NULL,
NOTA FLOAT NOT NULL,
FOREIGN KEY (ID_INSCRICAO) REFERENCES INSCRICAO (ID),
FOREIGN KEY (NOME_CURSO) REFERENCES CURSO (NOME),
FOREIGN KEY (NOME_DICIPLINA) REFERENCES DICIPLINA (NOME),
FOREIGN KEY (SEMESTRE_ANO) REFERENCES TURMA (SEMESTRE_ANO),
PRIMARY KEY (ID_INSCRICAO, SEMESTRE_ANO)
);
CREATE TABLE PROFESSOR_LECIONA_TURMA (
ID_PROFESSOR INTEGER NOT NULL,
NOME_CURSO VARCHAR(50) NOT NULL,
NOME_DICIPLINA VARCHAR(50) NOT NULL,
SEMESTRE_ANO INTEGER NOT NULL,
FOREIGN KEY (ID_PROFESSOR) REFERENCES PROFESSOR (ID_PESSOA),
FOREIGN KEY (NOME_CURSO) REFERENCES CURSO (NOME),
FOREIGN KEY (NOME_DICIPLINA) REFERENCES DICIPLINA (NOME),
FOREIGN KEY (SEMESTRE_ANO) REFERENCES TURMA (SEMESTRE_ANO),
PRIMARY KEY (ID_PROFESSOR, SEMESTRE_ANO)
);
| 26.973333 | 68 | 0.73653 |
4af1caf717c25433bbcd0872e2e404ba308f00b7 | 451,730 | cs | C# | clients/csharp/generated/src/Org.OpenAPITools/Api/BlueOceanApi.cs | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 23 | 2017-08-01T12:25:26.000Z | 2022-01-25T03:44:11.000Z | clients/csharp/generated/src/Org.OpenAPITools/Api/BlueOceanApi.cs | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 35 | 2017-06-14T03:28:15.000Z | 2022-02-14T10:25:54.000Z | clients/csharp/generated/src/Org.OpenAPITools/Api/BlueOceanApi.cs | PankTrue/swaggy-jenkins | aca35a7cca6e1fcc08bd399e05148942ac2f514b | [
"MIT"
] | 11 | 2017-08-31T19:00:20.000Z | 2021-12-19T12:04:12.000Z | /*
* Swaggy Jenkins
*
* Jenkins API clients generated from Swagger / Open API specification
*
* OpenAPI spec version: 1.1.1
* Contact: blah@cliffano.com
* Generated by: https://github.com/openapitools/openapi-generator.git
*/
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using RestSharp;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Org.OpenAPITools.Api
{
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public interface IBlueOceanApi : IApiAccessor
{
#region Synchronous Operations
/// <summary>
///
/// </summary>
/// <remarks>
/// Delete queue item from an organization pipeline queue
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="queue">Name of the queue item</param>
/// <returns></returns>
void DeletePipelineQueueItem (string organization, string pipeline, string queue);
/// <summary>
///
/// </summary>
/// <remarks>
/// Delete queue item from an organization pipeline queue
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="queue">Name of the queue item</param>
/// <returns>ApiResponse of Object(void)</returns>
ApiResponse<Object> DeletePipelineQueueItemWithHttpInfo (string organization, string pipeline, string queue);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve authenticated user details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>User</returns>
User GetAuthenticatedUser (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve authenticated user details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>ApiResponse of User</returns>
ApiResponse<User> GetAuthenticatedUserWithHttpInfo (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get a list of class names supported by a given class
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="_class">Name of the class</param>
/// <returns>string</returns>
string GetClasses (string _class);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get a list of class names supported by a given class
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="_class">Name of the class</param>
/// <returns>ApiResponse of string</returns>
ApiResponse<string> GetClassesWithHttpInfo (string _class);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve JSON Web Key
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="key">Key ID received as part of JWT header field kid</param>
/// <returns>string</returns>
string GetJsonWebKey (int? key);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve JSON Web Key
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="key">Key ID received as part of JWT header field kid</param>
/// <returns>ApiResponse of string</returns>
ApiResponse<string> GetJsonWebKeyWithHttpInfo (int? key);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve JSON Web Token
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="expiryTimeInMins">Token expiry time in minutes, default: 30 minutes (optional)</param>
/// <param name="maxExpiryTimeInMins">Maximum token expiry time in minutes, default: 480 minutes (optional)</param>
/// <returns>string</returns>
string GetJsonWebToken (int? expiryTimeInMins = null, int? maxExpiryTimeInMins = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve JSON Web Token
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="expiryTimeInMins">Token expiry time in minutes, default: 30 minutes (optional)</param>
/// <param name="maxExpiryTimeInMins">Maximum token expiry time in minutes, default: 480 minutes (optional)</param>
/// <returns>ApiResponse of string</returns>
ApiResponse<string> GetJsonWebTokenWithHttpInfo (int? expiryTimeInMins = null, int? maxExpiryTimeInMins = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve organization details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Organisation</returns>
Organisation GetOrganisation (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve organization details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>ApiResponse of Organisation</returns>
ApiResponse<Organisation> GetOrganisationWithHttpInfo (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all organizations details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Organisations</returns>
Organisations GetOrganisations ();
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all organizations details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of Organisations</returns>
ApiResponse<Organisations> GetOrganisationsWithHttpInfo ();
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Pipeline</returns>
Pipeline GetPipeline (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of Pipeline</returns>
ApiResponse<Pipeline> GetPipelineWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all activities details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>PipelineActivities</returns>
PipelineActivities GetPipelineActivities (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all activities details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of PipelineActivities</returns>
ApiResponse<PipelineActivities> GetPipelineActivitiesWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve branch details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <returns>BranchImpl</returns>
BranchImpl GetPipelineBranch (string organization, string pipeline, string branch);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve branch details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <returns>ApiResponse of BranchImpl</returns>
ApiResponse<BranchImpl> GetPipelineBranchWithHttpInfo (string organization, string pipeline, string branch);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve branch run details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <param name="run">Name of the run</param>
/// <returns>PipelineRun</returns>
PipelineRun GetPipelineBranchRun (string organization, string pipeline, string branch, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve branch run details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <param name="run">Name of the run</param>
/// <returns>ApiResponse of PipelineRun</returns>
ApiResponse<PipelineRun> GetPipelineBranchRunWithHttpInfo (string organization, string pipeline, string branch, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all branches details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>MultibranchPipeline</returns>
MultibranchPipeline GetPipelineBranches (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all branches details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of MultibranchPipeline</returns>
ApiResponse<MultibranchPipeline> GetPipelineBranchesWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline folder for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="folder">Name of the folder</param>
/// <returns>PipelineFolderImpl</returns>
PipelineFolderImpl GetPipelineFolder (string organization, string folder);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline folder for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="folder">Name of the folder</param>
/// <returns>ApiResponse of PipelineFolderImpl</returns>
ApiResponse<PipelineFolderImpl> GetPipelineFolderWithHttpInfo (string organization, string folder);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline details for an organization folder
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="folder">Name of the folder</param>
/// <returns>PipelineImpl</returns>
PipelineImpl GetPipelineFolderPipeline (string organization, string pipeline, string folder);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline details for an organization folder
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="folder">Name of the folder</param>
/// <returns>ApiResponse of PipelineImpl</returns>
ApiResponse<PipelineImpl> GetPipelineFolderPipelineWithHttpInfo (string organization, string pipeline, string folder);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve queue details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>PipelineQueue</returns>
PipelineQueue GetPipelineQueue (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve queue details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of PipelineQueue</returns>
ApiResponse<PipelineQueue> GetPipelineQueueWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>PipelineRun</returns>
PipelineRun GetPipelineRun (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>ApiResponse of PipelineRun</returns>
ApiResponse<PipelineRun> GetPipelineRunWithHttpInfo (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get log for a pipeline run
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="start">Start position of the log (optional)</param>
/// <param name="download">Set to true in order to download the file, otherwise it's passed as a response body (optional)</param>
/// <returns>string</returns>
string GetPipelineRunLog (string organization, string pipeline, string run, int? start = null, bool? download = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get log for a pipeline run
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="start">Start position of the log (optional)</param>
/// <param name="download">Set to true in order to download the file, otherwise it's passed as a response body (optional)</param>
/// <returns>ApiResponse of string</returns>
ApiResponse<string> GetPipelineRunLogWithHttpInfo (string organization, string pipeline, string run, int? start = null, bool? download = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>PipelineRunNode</returns>
PipelineRunNode GetPipelineRunNode (string organization, string pipeline, string run, string node);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>ApiResponse of PipelineRunNode</returns>
ApiResponse<PipelineRunNode> GetPipelineRunNodeWithHttpInfo (string organization, string pipeline, string run, string node);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>PipelineStepImpl</returns>
PipelineStepImpl GetPipelineRunNodeStep (string organization, string pipeline, string run, string node, string step);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>ApiResponse of PipelineStepImpl</returns>
ApiResponse<PipelineStepImpl> GetPipelineRunNodeStepWithHttpInfo (string organization, string pipeline, string run, string node, string step);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get log for a pipeline run node step
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>string</returns>
string GetPipelineRunNodeStepLog (string organization, string pipeline, string run, string node, string step);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get log for a pipeline run node step
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>ApiResponse of string</returns>
ApiResponse<string> GetPipelineRunNodeStepLogWithHttpInfo (string organization, string pipeline, string run, string node, string step);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node steps details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>PipelineRunNodeSteps</returns>
PipelineRunNodeSteps GetPipelineRunNodeSteps (string organization, string pipeline, string run, string node);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node steps details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>ApiResponse of PipelineRunNodeSteps</returns>
ApiResponse<PipelineRunNodeSteps> GetPipelineRunNodeStepsWithHttpInfo (string organization, string pipeline, string run, string node);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run nodes details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>PipelineRunNodes</returns>
PipelineRunNodes GetPipelineRunNodes (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run nodes details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>ApiResponse of PipelineRunNodes</returns>
ApiResponse<PipelineRunNodes> GetPipelineRunNodesWithHttpInfo (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all runs details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>PipelineRuns</returns>
PipelineRuns GetPipelineRuns (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all runs details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of PipelineRuns</returns>
ApiResponse<PipelineRuns> GetPipelineRunsWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all pipelines details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Pipelines</returns>
Pipelines GetPipelines (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all pipelines details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>ApiResponse of Pipelines</returns>
ApiResponse<Pipelines> GetPipelinesWithHttpInfo (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <returns>GithubScm</returns>
GithubScm GetSCM (string organization, string scm);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <returns>ApiResponse of GithubScm</returns>
ApiResponse<GithubScm> GetSCMWithHttpInfo (string organization, string scm);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organization repositories details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <param name="pageSize">Number of items in a page (optional)</param>
/// <param name="pageNumber">Page number (optional)</param>
/// <returns>ScmOrganisations</returns>
ScmOrganisations GetSCMOrganisationRepositories (string organization, string scm, string scmOrganisation, string credentialId = null, int? pageSize = null, int? pageNumber = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organization repositories details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <param name="pageSize">Number of items in a page (optional)</param>
/// <param name="pageNumber">Page number (optional)</param>
/// <returns>ApiResponse of ScmOrganisations</returns>
ApiResponse<ScmOrganisations> GetSCMOrganisationRepositoriesWithHttpInfo (string organization, string scm, string scmOrganisation, string credentialId = null, int? pageSize = null, int? pageNumber = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organization repository details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="repository">Name of the SCM repository</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>ScmOrganisations</returns>
ScmOrganisations GetSCMOrganisationRepository (string organization, string scm, string scmOrganisation, string repository, string credentialId = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organization repository details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="repository">Name of the SCM repository</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>ApiResponse of ScmOrganisations</returns>
ApiResponse<ScmOrganisations> GetSCMOrganisationRepositoryWithHttpInfo (string organization, string scm, string scmOrganisation, string repository, string credentialId = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organizations details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>ScmOrganisations</returns>
ScmOrganisations GetSCMOrganisations (string organization, string scm, string credentialId = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organizations details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>ApiResponse of ScmOrganisations</returns>
ApiResponse<ScmOrganisations> GetSCMOrganisationsWithHttpInfo (string organization, string scm, string credentialId = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve user details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="user">Name of the user</param>
/// <returns>User</returns>
User GetUser (string organization, string user);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve user details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="user">Name of the user</param>
/// <returns>ApiResponse of User</returns>
ApiResponse<User> GetUserWithHttpInfo (string organization, string user);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve user favorites details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="user">Name of the user</param>
/// <returns>UserFavorites</returns>
UserFavorites GetUserFavorites (string user);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve user favorites details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="user">Name of the user</param>
/// <returns>ApiResponse of UserFavorites</returns>
ApiResponse<UserFavorites> GetUserFavoritesWithHttpInfo (string user);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve users details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>User</returns>
User GetUsers (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve users details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>ApiResponse of User</returns>
ApiResponse<User> GetUsersWithHttpInfo (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Replay an organization pipeline run
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>QueueItemImpl</returns>
QueueItemImpl PostPipelineRun (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Replay an organization pipeline run
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>ApiResponse of QueueItemImpl</returns>
ApiResponse<QueueItemImpl> PostPipelineRunWithHttpInfo (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Start a build for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>QueueItemImpl</returns>
QueueItemImpl PostPipelineRuns (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Start a build for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of QueueItemImpl</returns>
ApiResponse<QueueItemImpl> PostPipelineRunsWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Favorite/unfavorite a pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="body">Set JSON string body to {"favorite": true} to favorite, set value to false to unfavorite</param>
/// <returns>FavoriteImpl</returns>
FavoriteImpl PutPipelineFavorite (string organization, string pipeline, Body body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Favorite/unfavorite a pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="body">Set JSON string body to {"favorite": true} to favorite, set value to false to unfavorite</param>
/// <returns>ApiResponse of FavoriteImpl</returns>
ApiResponse<FavoriteImpl> PutPipelineFavoriteWithHttpInfo (string organization, string pipeline, Body body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Stop a build of an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="blocking">Set to true to make blocking stop, default: false (optional)</param>
/// <param name="timeOutInSecs">Timeout in seconds, default: 10 seconds (optional)</param>
/// <returns>PipelineRun</returns>
PipelineRun PutPipelineRun (string organization, string pipeline, string run, string blocking = null, int? timeOutInSecs = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Stop a build of an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="blocking">Set to true to make blocking stop, default: false (optional)</param>
/// <param name="timeOutInSecs">Timeout in seconds, default: 10 seconds (optional)</param>
/// <returns>ApiResponse of PipelineRun</returns>
ApiResponse<PipelineRun> PutPipelineRunWithHttpInfo (string organization, string pipeline, string run, string blocking = null, int? timeOutInSecs = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Search for any resource details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string</param>
/// <returns>string</returns>
string Search (string q);
/// <summary>
///
/// </summary>
/// <remarks>
/// Search for any resource details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string</param>
/// <returns>ApiResponse of string</returns>
ApiResponse<string> SearchWithHttpInfo (string q);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get classes details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string containing an array of class names</param>
/// <returns>string</returns>
string SearchClasses (string q);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get classes details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string containing an array of class names</param>
/// <returns>ApiResponse of string</returns>
ApiResponse<string> SearchClassesWithHttpInfo (string q);
#endregion Synchronous Operations
#region Asynchronous Operations
/// <summary>
///
/// </summary>
/// <remarks>
/// Delete queue item from an organization pipeline queue
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="queue">Name of the queue item</param>
/// <returns>Task of void</returns>
System.Threading.Tasks.Task DeletePipelineQueueItemAsync (string organization, string pipeline, string queue);
/// <summary>
///
/// </summary>
/// <remarks>
/// Delete queue item from an organization pipeline queue
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="queue">Name of the queue item</param>
/// <returns>Task of ApiResponse</returns>
System.Threading.Tasks.Task<ApiResponse<Object>> DeletePipelineQueueItemAsyncWithHttpInfo (string organization, string pipeline, string queue);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve authenticated user details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of User</returns>
System.Threading.Tasks.Task<User> GetAuthenticatedUserAsync (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve authenticated user details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of ApiResponse (User)</returns>
System.Threading.Tasks.Task<ApiResponse<User>> GetAuthenticatedUserAsyncWithHttpInfo (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get a list of class names supported by a given class
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="_class">Name of the class</param>
/// <returns>Task of string</returns>
System.Threading.Tasks.Task<string> GetClassesAsync (string _class);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get a list of class names supported by a given class
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="_class">Name of the class</param>
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> GetClassesAsyncWithHttpInfo (string _class);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve JSON Web Key
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="key">Key ID received as part of JWT header field kid</param>
/// <returns>Task of string</returns>
System.Threading.Tasks.Task<string> GetJsonWebKeyAsync (int? key);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve JSON Web Key
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="key">Key ID received as part of JWT header field kid</param>
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> GetJsonWebKeyAsyncWithHttpInfo (int? key);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve JSON Web Token
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="expiryTimeInMins">Token expiry time in minutes, default: 30 minutes (optional)</param>
/// <param name="maxExpiryTimeInMins">Maximum token expiry time in minutes, default: 480 minutes (optional)</param>
/// <returns>Task of string</returns>
System.Threading.Tasks.Task<string> GetJsonWebTokenAsync (int? expiryTimeInMins = null, int? maxExpiryTimeInMins = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve JSON Web Token
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="expiryTimeInMins">Token expiry time in minutes, default: 30 minutes (optional)</param>
/// <param name="maxExpiryTimeInMins">Maximum token expiry time in minutes, default: 480 minutes (optional)</param>
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> GetJsonWebTokenAsyncWithHttpInfo (int? expiryTimeInMins = null, int? maxExpiryTimeInMins = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve organization details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of Organisation</returns>
System.Threading.Tasks.Task<Organisation> GetOrganisationAsync (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve organization details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of ApiResponse (Organisation)</returns>
System.Threading.Tasks.Task<ApiResponse<Organisation>> GetOrganisationAsyncWithHttpInfo (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all organizations details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of Organisations</returns>
System.Threading.Tasks.Task<Organisations> GetOrganisationsAsync ();
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all organizations details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (Organisations)</returns>
System.Threading.Tasks.Task<ApiResponse<Organisations>> GetOrganisationsAsyncWithHttpInfo ();
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of Pipeline</returns>
System.Threading.Tasks.Task<Pipeline> GetPipelineAsync (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (Pipeline)</returns>
System.Threading.Tasks.Task<ApiResponse<Pipeline>> GetPipelineAsyncWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all activities details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of PipelineActivities</returns>
System.Threading.Tasks.Task<PipelineActivities> GetPipelineActivitiesAsync (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all activities details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (PipelineActivities)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineActivities>> GetPipelineActivitiesAsyncWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve branch details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <returns>Task of BranchImpl</returns>
System.Threading.Tasks.Task<BranchImpl> GetPipelineBranchAsync (string organization, string pipeline, string branch);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve branch details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <returns>Task of ApiResponse (BranchImpl)</returns>
System.Threading.Tasks.Task<ApiResponse<BranchImpl>> GetPipelineBranchAsyncWithHttpInfo (string organization, string pipeline, string branch);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve branch run details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of PipelineRun</returns>
System.Threading.Tasks.Task<PipelineRun> GetPipelineBranchRunAsync (string organization, string pipeline, string branch, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve branch run details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of ApiResponse (PipelineRun)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineRun>> GetPipelineBranchRunAsyncWithHttpInfo (string organization, string pipeline, string branch, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all branches details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of MultibranchPipeline</returns>
System.Threading.Tasks.Task<MultibranchPipeline> GetPipelineBranchesAsync (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all branches details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (MultibranchPipeline)</returns>
System.Threading.Tasks.Task<ApiResponse<MultibranchPipeline>> GetPipelineBranchesAsyncWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline folder for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="folder">Name of the folder</param>
/// <returns>Task of PipelineFolderImpl</returns>
System.Threading.Tasks.Task<PipelineFolderImpl> GetPipelineFolderAsync (string organization, string folder);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline folder for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="folder">Name of the folder</param>
/// <returns>Task of ApiResponse (PipelineFolderImpl)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineFolderImpl>> GetPipelineFolderAsyncWithHttpInfo (string organization, string folder);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline details for an organization folder
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="folder">Name of the folder</param>
/// <returns>Task of PipelineImpl</returns>
System.Threading.Tasks.Task<PipelineImpl> GetPipelineFolderPipelineAsync (string organization, string pipeline, string folder);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve pipeline details for an organization folder
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="folder">Name of the folder</param>
/// <returns>Task of ApiResponse (PipelineImpl)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineImpl>> GetPipelineFolderPipelineAsyncWithHttpInfo (string organization, string pipeline, string folder);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve queue details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of PipelineQueue</returns>
System.Threading.Tasks.Task<PipelineQueue> GetPipelineQueueAsync (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve queue details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (PipelineQueue)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineQueue>> GetPipelineQueueAsyncWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of PipelineRun</returns>
System.Threading.Tasks.Task<PipelineRun> GetPipelineRunAsync (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of ApiResponse (PipelineRun)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineRun>> GetPipelineRunAsyncWithHttpInfo (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get log for a pipeline run
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="start">Start position of the log (optional)</param>
/// <param name="download">Set to true in order to download the file, otherwise it's passed as a response body (optional)</param>
/// <returns>Task of string</returns>
System.Threading.Tasks.Task<string> GetPipelineRunLogAsync (string organization, string pipeline, string run, int? start = null, bool? download = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get log for a pipeline run
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="start">Start position of the log (optional)</param>
/// <param name="download">Set to true in order to download the file, otherwise it's passed as a response body (optional)</param>
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> GetPipelineRunLogAsyncWithHttpInfo (string organization, string pipeline, string run, int? start = null, bool? download = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>Task of PipelineRunNode</returns>
System.Threading.Tasks.Task<PipelineRunNode> GetPipelineRunNodeAsync (string organization, string pipeline, string run, string node);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>Task of ApiResponse (PipelineRunNode)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineRunNode>> GetPipelineRunNodeAsyncWithHttpInfo (string organization, string pipeline, string run, string node);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>Task of PipelineStepImpl</returns>
System.Threading.Tasks.Task<PipelineStepImpl> GetPipelineRunNodeStepAsync (string organization, string pipeline, string run, string node, string step);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>Task of ApiResponse (PipelineStepImpl)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineStepImpl>> GetPipelineRunNodeStepAsyncWithHttpInfo (string organization, string pipeline, string run, string node, string step);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get log for a pipeline run node step
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>Task of string</returns>
System.Threading.Tasks.Task<string> GetPipelineRunNodeStepLogAsync (string organization, string pipeline, string run, string node, string step);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get log for a pipeline run node step
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> GetPipelineRunNodeStepLogAsyncWithHttpInfo (string organization, string pipeline, string run, string node, string step);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node steps details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>Task of PipelineRunNodeSteps</returns>
System.Threading.Tasks.Task<PipelineRunNodeSteps> GetPipelineRunNodeStepsAsync (string organization, string pipeline, string run, string node);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run node steps details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>Task of ApiResponse (PipelineRunNodeSteps)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineRunNodeSteps>> GetPipelineRunNodeStepsAsyncWithHttpInfo (string organization, string pipeline, string run, string node);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run nodes details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of PipelineRunNodes</returns>
System.Threading.Tasks.Task<PipelineRunNodes> GetPipelineRunNodesAsync (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve run nodes details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of ApiResponse (PipelineRunNodes)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineRunNodes>> GetPipelineRunNodesAsyncWithHttpInfo (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all runs details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of PipelineRuns</returns>
System.Threading.Tasks.Task<PipelineRuns> GetPipelineRunsAsync (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all runs details for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (PipelineRuns)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineRuns>> GetPipelineRunsAsyncWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all pipelines details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of Pipelines</returns>
System.Threading.Tasks.Task<Pipelines> GetPipelinesAsync (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve all pipelines details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of ApiResponse (Pipelines)</returns>
System.Threading.Tasks.Task<ApiResponse<Pipelines>> GetPipelinesAsyncWithHttpInfo (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <returns>Task of GithubScm</returns>
System.Threading.Tasks.Task<GithubScm> GetSCMAsync (string organization, string scm);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <returns>Task of ApiResponse (GithubScm)</returns>
System.Threading.Tasks.Task<ApiResponse<GithubScm>> GetSCMAsyncWithHttpInfo (string organization, string scm);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organization repositories details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <param name="pageSize">Number of items in a page (optional)</param>
/// <param name="pageNumber">Page number (optional)</param>
/// <returns>Task of ScmOrganisations</returns>
System.Threading.Tasks.Task<ScmOrganisations> GetSCMOrganisationRepositoriesAsync (string organization, string scm, string scmOrganisation, string credentialId = null, int? pageSize = null, int? pageNumber = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organization repositories details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <param name="pageSize">Number of items in a page (optional)</param>
/// <param name="pageNumber">Page number (optional)</param>
/// <returns>Task of ApiResponse (ScmOrganisations)</returns>
System.Threading.Tasks.Task<ApiResponse<ScmOrganisations>> GetSCMOrganisationRepositoriesAsyncWithHttpInfo (string organization, string scm, string scmOrganisation, string credentialId = null, int? pageSize = null, int? pageNumber = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organization repository details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="repository">Name of the SCM repository</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>Task of ScmOrganisations</returns>
System.Threading.Tasks.Task<ScmOrganisations> GetSCMOrganisationRepositoryAsync (string organization, string scm, string scmOrganisation, string repository, string credentialId = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organization repository details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="repository">Name of the SCM repository</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>Task of ApiResponse (ScmOrganisations)</returns>
System.Threading.Tasks.Task<ApiResponse<ScmOrganisations>> GetSCMOrganisationRepositoryAsyncWithHttpInfo (string organization, string scm, string scmOrganisation, string repository, string credentialId = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organizations details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>Task of ScmOrganisations</returns>
System.Threading.Tasks.Task<ScmOrganisations> GetSCMOrganisationsAsync (string organization, string scm, string credentialId = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve SCM organizations details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>Task of ApiResponse (ScmOrganisations)</returns>
System.Threading.Tasks.Task<ApiResponse<ScmOrganisations>> GetSCMOrganisationsAsyncWithHttpInfo (string organization, string scm, string credentialId = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve user details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="user">Name of the user</param>
/// <returns>Task of User</returns>
System.Threading.Tasks.Task<User> GetUserAsync (string organization, string user);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve user details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="user">Name of the user</param>
/// <returns>Task of ApiResponse (User)</returns>
System.Threading.Tasks.Task<ApiResponse<User>> GetUserAsyncWithHttpInfo (string organization, string user);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve user favorites details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="user">Name of the user</param>
/// <returns>Task of UserFavorites</returns>
System.Threading.Tasks.Task<UserFavorites> GetUserFavoritesAsync (string user);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve user favorites details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="user">Name of the user</param>
/// <returns>Task of ApiResponse (UserFavorites)</returns>
System.Threading.Tasks.Task<ApiResponse<UserFavorites>> GetUserFavoritesAsyncWithHttpInfo (string user);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve users details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of User</returns>
System.Threading.Tasks.Task<User> GetUsersAsync (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Retrieve users details for an organization
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of ApiResponse (User)</returns>
System.Threading.Tasks.Task<ApiResponse<User>> GetUsersAsyncWithHttpInfo (string organization);
/// <summary>
///
/// </summary>
/// <remarks>
/// Replay an organization pipeline run
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of QueueItemImpl</returns>
System.Threading.Tasks.Task<QueueItemImpl> PostPipelineRunAsync (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Replay an organization pipeline run
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of ApiResponse (QueueItemImpl)</returns>
System.Threading.Tasks.Task<ApiResponse<QueueItemImpl>> PostPipelineRunAsyncWithHttpInfo (string organization, string pipeline, string run);
/// <summary>
///
/// </summary>
/// <remarks>
/// Start a build for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of QueueItemImpl</returns>
System.Threading.Tasks.Task<QueueItemImpl> PostPipelineRunsAsync (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Start a build for an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (QueueItemImpl)</returns>
System.Threading.Tasks.Task<ApiResponse<QueueItemImpl>> PostPipelineRunsAsyncWithHttpInfo (string organization, string pipeline);
/// <summary>
///
/// </summary>
/// <remarks>
/// Favorite/unfavorite a pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="body">Set JSON string body to {"favorite": true} to favorite, set value to false to unfavorite</param>
/// <returns>Task of FavoriteImpl</returns>
System.Threading.Tasks.Task<FavoriteImpl> PutPipelineFavoriteAsync (string organization, string pipeline, Body body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Favorite/unfavorite a pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="body">Set JSON string body to {"favorite": true} to favorite, set value to false to unfavorite</param>
/// <returns>Task of ApiResponse (FavoriteImpl)</returns>
System.Threading.Tasks.Task<ApiResponse<FavoriteImpl>> PutPipelineFavoriteAsyncWithHttpInfo (string organization, string pipeline, Body body);
/// <summary>
///
/// </summary>
/// <remarks>
/// Stop a build of an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="blocking">Set to true to make blocking stop, default: false (optional)</param>
/// <param name="timeOutInSecs">Timeout in seconds, default: 10 seconds (optional)</param>
/// <returns>Task of PipelineRun</returns>
System.Threading.Tasks.Task<PipelineRun> PutPipelineRunAsync (string organization, string pipeline, string run, string blocking = null, int? timeOutInSecs = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Stop a build of an organization pipeline
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="blocking">Set to true to make blocking stop, default: false (optional)</param>
/// <param name="timeOutInSecs">Timeout in seconds, default: 10 seconds (optional)</param>
/// <returns>Task of ApiResponse (PipelineRun)</returns>
System.Threading.Tasks.Task<ApiResponse<PipelineRun>> PutPipelineRunAsyncWithHttpInfo (string organization, string pipeline, string run, string blocking = null, int? timeOutInSecs = null);
/// <summary>
///
/// </summary>
/// <remarks>
/// Search for any resource details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string</param>
/// <returns>Task of string</returns>
System.Threading.Tasks.Task<string> SearchAsync (string q);
/// <summary>
///
/// </summary>
/// <remarks>
/// Search for any resource details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string</param>
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> SearchAsyncWithHttpInfo (string q);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get classes details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string containing an array of class names</param>
/// <returns>Task of string</returns>
System.Threading.Tasks.Task<string> SearchClassesAsync (string q);
/// <summary>
///
/// </summary>
/// <remarks>
/// Get classes details
/// </remarks>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string containing an array of class names</param>
/// <returns>Task of ApiResponse (string)</returns>
System.Threading.Tasks.Task<ApiResponse<string>> SearchClassesAsyncWithHttpInfo (string q);
#endregion Asynchronous Operations
}
/// <summary>
/// Represents a collection of functions to interact with the API endpoints
/// </summary>
public partial class BlueOceanApi : IBlueOceanApi
{
private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
/// <summary>
/// Initializes a new instance of the <see cref="BlueOceanApi"/> class.
/// </summary>
/// <returns></returns>
public BlueOceanApi(String basePath)
{
this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath };
ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
}
/// <summary>
/// Initializes a new instance of the <see cref="BlueOceanApi"/> class
/// using Configuration object
/// </summary>
/// <param name="configuration">An instance of Configuration</param>
/// <returns></returns>
public BlueOceanApi(Org.OpenAPITools.Client.Configuration configuration = null)
{
if (configuration == null) // use the default one in Configuration
this.Configuration = Org.OpenAPITools.Client.Configuration.Default;
else
this.Configuration = configuration;
ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
}
/// <summary>
/// Gets the base path of the API client.
/// </summary>
/// <value>The base path</value>
public String GetBasePath()
{
return this.Configuration.ApiClient.RestClient.BaseUrl.ToString();
}
/// <summary>
/// Sets the base path of the API client.
/// </summary>
/// <value>The base path</value>
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
public void SetBasePath(String basePath)
{
// do nothing
}
/// <summary>
/// Gets or sets the configuration object
/// </summary>
/// <value>An instance of the Configuration</value>
public Org.OpenAPITools.Client.Configuration Configuration {get; set;}
/// <summary>
/// Provides a factory method hook for the creation of exceptions.
/// </summary>
public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory
{
get
{
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
{
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
}
return _exceptionFactory;
}
set { _exceptionFactory = value; }
}
/// <summary>
/// Gets the default header.
/// </summary>
/// <returns>Dictionary of HTTP header</returns>
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
public IDictionary<String, String> DefaultHeader()
{
return new ReadOnlyDictionary<string, string>(this.Configuration.DefaultHeader);
}
/// <summary>
/// Add default header.
/// </summary>
/// <param name="key">Header field name.</param>
/// <param name="value">Header field value.</param>
/// <returns></returns>
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
public void AddDefaultHeader(string key, string value)
{
this.Configuration.AddDefaultHeader(key, value);
}
/// <summary>
/// Delete queue item from an organization pipeline queue
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="queue">Name of the queue item</param>
/// <returns></returns>
public void DeletePipelineQueueItem (string organization, string pipeline, string queue)
{
DeletePipelineQueueItemWithHttpInfo(organization, pipeline, queue);
}
/// <summary>
/// Delete queue item from an organization pipeline queue
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="queue">Name of the queue item</param>
/// <returns>ApiResponse of Object(void)</returns>
public ApiResponse<Object> DeletePipelineQueueItemWithHttpInfo (string organization, string pipeline, string queue)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->DeletePipelineQueueItem");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->DeletePipelineQueueItem");
// verify the required parameter 'queue' is set
if (queue == null)
throw new ApiException(400, "Missing required parameter 'queue' when calling BlueOceanApi->DeletePipelineQueueItem");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/queue/{queue}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (queue != null) localVarPathParams.Add("queue", this.Configuration.ApiClient.ParameterToString(queue)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("DeletePipelineQueueItem", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);
}
/// <summary>
/// Delete queue item from an organization pipeline queue
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="queue">Name of the queue item</param>
/// <returns>Task of void</returns>
public async System.Threading.Tasks.Task DeletePipelineQueueItemAsync (string organization, string pipeline, string queue)
{
await DeletePipelineQueueItemAsyncWithHttpInfo(organization, pipeline, queue);
}
/// <summary>
/// Delete queue item from an organization pipeline queue
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="queue">Name of the queue item</param>
/// <returns>Task of ApiResponse</returns>
public async System.Threading.Tasks.Task<ApiResponse<Object>> DeletePipelineQueueItemAsyncWithHttpInfo (string organization, string pipeline, string queue)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->DeletePipelineQueueItem");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->DeletePipelineQueueItem");
// verify the required parameter 'queue' is set
if (queue == null)
throw new ApiException(400, "Missing required parameter 'queue' when calling BlueOceanApi->DeletePipelineQueueItem");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/queue/{queue}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (queue != null) localVarPathParams.Add("queue", this.Configuration.ApiClient.ParameterToString(queue)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("DeletePipelineQueueItem", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
null);
}
/// <summary>
/// Retrieve authenticated user details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>User</returns>
public User GetAuthenticatedUser (string organization)
{
ApiResponse<User> localVarResponse = GetAuthenticatedUserWithHttpInfo(organization);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve authenticated user details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>ApiResponse of User</returns>
public ApiResponse< User > GetAuthenticatedUserWithHttpInfo (string organization)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetAuthenticatedUser");
var localVarPath = "/blue/rest/organizations/{organization}/user/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetAuthenticatedUser", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<User>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
}
/// <summary>
/// Retrieve authenticated user details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of User</returns>
public async System.Threading.Tasks.Task<User> GetAuthenticatedUserAsync (string organization)
{
ApiResponse<User> localVarResponse = await GetAuthenticatedUserAsyncWithHttpInfo(organization);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve authenticated user details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of ApiResponse (User)</returns>
public async System.Threading.Tasks.Task<ApiResponse<User>> GetAuthenticatedUserAsyncWithHttpInfo (string organization)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetAuthenticatedUser");
var localVarPath = "/blue/rest/organizations/{organization}/user/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetAuthenticatedUser", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<User>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
}
/// <summary>
/// Get a list of class names supported by a given class
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="_class">Name of the class</param>
/// <returns>string</returns>
public string GetClasses (string _class)
{
ApiResponse<string> localVarResponse = GetClassesWithHttpInfo(_class);
return localVarResponse.Data;
}
/// <summary>
/// Get a list of class names supported by a given class
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="_class">Name of the class</param>
/// <returns>ApiResponse of string</returns>
public ApiResponse< string > GetClassesWithHttpInfo (string _class)
{
// verify the required parameter '_class' is set
if (_class == null)
throw new ApiException(400, "Missing required parameter '_class' when calling BlueOceanApi->GetClasses");
var localVarPath = "/blue/rest/classes/{class}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (_class != null) localVarPathParams.Add("class", this.Configuration.ApiClient.ParameterToString(_class)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetClasses", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Get a list of class names supported by a given class
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="_class">Name of the class</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> GetClassesAsync (string _class)
{
ApiResponse<string> localVarResponse = await GetClassesAsyncWithHttpInfo(_class);
return localVarResponse.Data;
}
/// <summary>
/// Get a list of class names supported by a given class
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="_class">Name of the class</param>
/// <returns>Task of ApiResponse (string)</returns>
public async System.Threading.Tasks.Task<ApiResponse<string>> GetClassesAsyncWithHttpInfo (string _class)
{
// verify the required parameter '_class' is set
if (_class == null)
throw new ApiException(400, "Missing required parameter '_class' when calling BlueOceanApi->GetClasses");
var localVarPath = "/blue/rest/classes/{class}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (_class != null) localVarPathParams.Add("class", this.Configuration.ApiClient.ParameterToString(_class)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetClasses", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Retrieve JSON Web Key
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="key">Key ID received as part of JWT header field kid</param>
/// <returns>string</returns>
public string GetJsonWebKey (int? key)
{
ApiResponse<string> localVarResponse = GetJsonWebKeyWithHttpInfo(key);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve JSON Web Key
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="key">Key ID received as part of JWT header field kid</param>
/// <returns>ApiResponse of string</returns>
public ApiResponse< string > GetJsonWebKeyWithHttpInfo (int? key)
{
// verify the required parameter 'key' is set
if (key == null)
throw new ApiException(400, "Missing required parameter 'key' when calling BlueOceanApi->GetJsonWebKey");
var localVarPath = "/jwt-auth/jwks/{key}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (key != null) localVarPathParams.Add("key", this.Configuration.ApiClient.ParameterToString(key)); // path parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetJsonWebKey", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Retrieve JSON Web Key
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="key">Key ID received as part of JWT header field kid</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> GetJsonWebKeyAsync (int? key)
{
ApiResponse<string> localVarResponse = await GetJsonWebKeyAsyncWithHttpInfo(key);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve JSON Web Key
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="key">Key ID received as part of JWT header field kid</param>
/// <returns>Task of ApiResponse (string)</returns>
public async System.Threading.Tasks.Task<ApiResponse<string>> GetJsonWebKeyAsyncWithHttpInfo (int? key)
{
// verify the required parameter 'key' is set
if (key == null)
throw new ApiException(400, "Missing required parameter 'key' when calling BlueOceanApi->GetJsonWebKey");
var localVarPath = "/jwt-auth/jwks/{key}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (key != null) localVarPathParams.Add("key", this.Configuration.ApiClient.ParameterToString(key)); // path parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetJsonWebKey", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Retrieve JSON Web Token
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="expiryTimeInMins">Token expiry time in minutes, default: 30 minutes (optional)</param>
/// <param name="maxExpiryTimeInMins">Maximum token expiry time in minutes, default: 480 minutes (optional)</param>
/// <returns>string</returns>
public string GetJsonWebToken (int? expiryTimeInMins = null, int? maxExpiryTimeInMins = null)
{
ApiResponse<string> localVarResponse = GetJsonWebTokenWithHttpInfo(expiryTimeInMins, maxExpiryTimeInMins);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve JSON Web Token
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="expiryTimeInMins">Token expiry time in minutes, default: 30 minutes (optional)</param>
/// <param name="maxExpiryTimeInMins">Maximum token expiry time in minutes, default: 480 minutes (optional)</param>
/// <returns>ApiResponse of string</returns>
public ApiResponse< string > GetJsonWebTokenWithHttpInfo (int? expiryTimeInMins = null, int? maxExpiryTimeInMins = null)
{
var localVarPath = "/jwt-auth/token";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (expiryTimeInMins != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "expiryTimeInMins", expiryTimeInMins)); // query parameter
if (maxExpiryTimeInMins != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "maxExpiryTimeInMins", maxExpiryTimeInMins)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetJsonWebToken", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Retrieve JSON Web Token
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="expiryTimeInMins">Token expiry time in minutes, default: 30 minutes (optional)</param>
/// <param name="maxExpiryTimeInMins">Maximum token expiry time in minutes, default: 480 minutes (optional)</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> GetJsonWebTokenAsync (int? expiryTimeInMins = null, int? maxExpiryTimeInMins = null)
{
ApiResponse<string> localVarResponse = await GetJsonWebTokenAsyncWithHttpInfo(expiryTimeInMins, maxExpiryTimeInMins);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve JSON Web Token
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="expiryTimeInMins">Token expiry time in minutes, default: 30 minutes (optional)</param>
/// <param name="maxExpiryTimeInMins">Maximum token expiry time in minutes, default: 480 minutes (optional)</param>
/// <returns>Task of ApiResponse (string)</returns>
public async System.Threading.Tasks.Task<ApiResponse<string>> GetJsonWebTokenAsyncWithHttpInfo (int? expiryTimeInMins = null, int? maxExpiryTimeInMins = null)
{
var localVarPath = "/jwt-auth/token";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (expiryTimeInMins != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "expiryTimeInMins", expiryTimeInMins)); // query parameter
if (maxExpiryTimeInMins != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "maxExpiryTimeInMins", maxExpiryTimeInMins)); // query parameter
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetJsonWebToken", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Retrieve organization details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Organisation</returns>
public Organisation GetOrganisation (string organization)
{
ApiResponse<Organisation> localVarResponse = GetOrganisationWithHttpInfo(organization);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve organization details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>ApiResponse of Organisation</returns>
public ApiResponse< Organisation > GetOrganisationWithHttpInfo (string organization)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetOrganisation");
var localVarPath = "/blue/rest/organizations/{organization}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetOrganisation", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Organisation>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Organisation) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organisation)));
}
/// <summary>
/// Retrieve organization details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of Organisation</returns>
public async System.Threading.Tasks.Task<Organisation> GetOrganisationAsync (string organization)
{
ApiResponse<Organisation> localVarResponse = await GetOrganisationAsyncWithHttpInfo(organization);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve organization details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of ApiResponse (Organisation)</returns>
public async System.Threading.Tasks.Task<ApiResponse<Organisation>> GetOrganisationAsyncWithHttpInfo (string organization)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetOrganisation");
var localVarPath = "/blue/rest/organizations/{organization}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetOrganisation", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Organisation>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Organisation) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organisation)));
}
/// <summary>
/// Retrieve all organizations details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Organisations</returns>
public Organisations GetOrganisations ()
{
ApiResponse<Organisations> localVarResponse = GetOrganisationsWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
/// Retrieve all organizations details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>ApiResponse of Organisations</returns>
public ApiResponse< Organisations > GetOrganisationsWithHttpInfo ()
{
var localVarPath = "/blue/rest/organizations/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetOrganisations", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Organisations>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Organisations) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organisations)));
}
/// <summary>
/// Retrieve all organizations details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of Organisations</returns>
public async System.Threading.Tasks.Task<Organisations> GetOrganisationsAsync ()
{
ApiResponse<Organisations> localVarResponse = await GetOrganisationsAsyncWithHttpInfo();
return localVarResponse.Data;
}
/// <summary>
/// Retrieve all organizations details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of ApiResponse (Organisations)</returns>
public async System.Threading.Tasks.Task<ApiResponse<Organisations>> GetOrganisationsAsyncWithHttpInfo ()
{
var localVarPath = "/blue/rest/organizations/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetOrganisations", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Organisations>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Organisations) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Organisations)));
}
/// <summary>
/// Retrieve pipeline details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Pipeline</returns>
public Pipeline GetPipeline (string organization, string pipeline)
{
ApiResponse<Pipeline> localVarResponse = GetPipelineWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve pipeline details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of Pipeline</returns>
public ApiResponse< Pipeline > GetPipelineWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipeline");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipeline");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipeline", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Pipeline>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Pipeline) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pipeline)));
}
/// <summary>
/// Retrieve pipeline details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of Pipeline</returns>
public async System.Threading.Tasks.Task<Pipeline> GetPipelineAsync (string organization, string pipeline)
{
ApiResponse<Pipeline> localVarResponse = await GetPipelineAsyncWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve pipeline details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (Pipeline)</returns>
public async System.Threading.Tasks.Task<ApiResponse<Pipeline>> GetPipelineAsyncWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipeline");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipeline");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipeline", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Pipeline>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Pipeline) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pipeline)));
}
/// <summary>
/// Retrieve all activities details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>PipelineActivities</returns>
public PipelineActivities GetPipelineActivities (string organization, string pipeline)
{
ApiResponse<PipelineActivities> localVarResponse = GetPipelineActivitiesWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve all activities details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of PipelineActivities</returns>
public ApiResponse< PipelineActivities > GetPipelineActivitiesWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineActivities");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineActivities");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/activities";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineActivities", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineActivities>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineActivities) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineActivities)));
}
/// <summary>
/// Retrieve all activities details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of PipelineActivities</returns>
public async System.Threading.Tasks.Task<PipelineActivities> GetPipelineActivitiesAsync (string organization, string pipeline)
{
ApiResponse<PipelineActivities> localVarResponse = await GetPipelineActivitiesAsyncWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve all activities details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (PipelineActivities)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineActivities>> GetPipelineActivitiesAsyncWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineActivities");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineActivities");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/activities";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineActivities", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineActivities>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineActivities) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineActivities)));
}
/// <summary>
/// Retrieve branch details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <returns>BranchImpl</returns>
public BranchImpl GetPipelineBranch (string organization, string pipeline, string branch)
{
ApiResponse<BranchImpl> localVarResponse = GetPipelineBranchWithHttpInfo(organization, pipeline, branch);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve branch details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <returns>ApiResponse of BranchImpl</returns>
public ApiResponse< BranchImpl > GetPipelineBranchWithHttpInfo (string organization, string pipeline, string branch)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineBranch");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineBranch");
// verify the required parameter 'branch' is set
if (branch == null)
throw new ApiException(400, "Missing required parameter 'branch' when calling BlueOceanApi->GetPipelineBranch");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/branches/{branch}/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (branch != null) localVarPathParams.Add("branch", this.Configuration.ApiClient.ParameterToString(branch)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineBranch", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<BranchImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(BranchImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BranchImpl)));
}
/// <summary>
/// Retrieve branch details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <returns>Task of BranchImpl</returns>
public async System.Threading.Tasks.Task<BranchImpl> GetPipelineBranchAsync (string organization, string pipeline, string branch)
{
ApiResponse<BranchImpl> localVarResponse = await GetPipelineBranchAsyncWithHttpInfo(organization, pipeline, branch);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve branch details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <returns>Task of ApiResponse (BranchImpl)</returns>
public async System.Threading.Tasks.Task<ApiResponse<BranchImpl>> GetPipelineBranchAsyncWithHttpInfo (string organization, string pipeline, string branch)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineBranch");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineBranch");
// verify the required parameter 'branch' is set
if (branch == null)
throw new ApiException(400, "Missing required parameter 'branch' when calling BlueOceanApi->GetPipelineBranch");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/branches/{branch}/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (branch != null) localVarPathParams.Add("branch", this.Configuration.ApiClient.ParameterToString(branch)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineBranch", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<BranchImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(BranchImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(BranchImpl)));
}
/// <summary>
/// Retrieve branch run details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <param name="run">Name of the run</param>
/// <returns>PipelineRun</returns>
public PipelineRun GetPipelineBranchRun (string organization, string pipeline, string branch, string run)
{
ApiResponse<PipelineRun> localVarResponse = GetPipelineBranchRunWithHttpInfo(organization, pipeline, branch, run);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve branch run details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <param name="run">Name of the run</param>
/// <returns>ApiResponse of PipelineRun</returns>
public ApiResponse< PipelineRun > GetPipelineBranchRunWithHttpInfo (string organization, string pipeline, string branch, string run)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineBranchRun");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineBranchRun");
// verify the required parameter 'branch' is set
if (branch == null)
throw new ApiException(400, "Missing required parameter 'branch' when calling BlueOceanApi->GetPipelineBranchRun");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineBranchRun");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/branches/{branch}/runs/{run}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (branch != null) localVarPathParams.Add("branch", this.Configuration.ApiClient.ParameterToString(branch)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineBranchRun", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRun>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRun) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRun)));
}
/// <summary>
/// Retrieve branch run details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of PipelineRun</returns>
public async System.Threading.Tasks.Task<PipelineRun> GetPipelineBranchRunAsync (string organization, string pipeline, string branch, string run)
{
ApiResponse<PipelineRun> localVarResponse = await GetPipelineBranchRunAsyncWithHttpInfo(organization, pipeline, branch, run);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve branch run details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="branch">Name of the branch</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of ApiResponse (PipelineRun)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineRun>> GetPipelineBranchRunAsyncWithHttpInfo (string organization, string pipeline, string branch, string run)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineBranchRun");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineBranchRun");
// verify the required parameter 'branch' is set
if (branch == null)
throw new ApiException(400, "Missing required parameter 'branch' when calling BlueOceanApi->GetPipelineBranchRun");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineBranchRun");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/branches/{branch}/runs/{run}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (branch != null) localVarPathParams.Add("branch", this.Configuration.ApiClient.ParameterToString(branch)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineBranchRun", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRun>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRun) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRun)));
}
/// <summary>
/// Retrieve all branches details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>MultibranchPipeline</returns>
public MultibranchPipeline GetPipelineBranches (string organization, string pipeline)
{
ApiResponse<MultibranchPipeline> localVarResponse = GetPipelineBranchesWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve all branches details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of MultibranchPipeline</returns>
public ApiResponse< MultibranchPipeline > GetPipelineBranchesWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineBranches");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineBranches");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/branches";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineBranches", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<MultibranchPipeline>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(MultibranchPipeline) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(MultibranchPipeline)));
}
/// <summary>
/// Retrieve all branches details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of MultibranchPipeline</returns>
public async System.Threading.Tasks.Task<MultibranchPipeline> GetPipelineBranchesAsync (string organization, string pipeline)
{
ApiResponse<MultibranchPipeline> localVarResponse = await GetPipelineBranchesAsyncWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve all branches details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (MultibranchPipeline)</returns>
public async System.Threading.Tasks.Task<ApiResponse<MultibranchPipeline>> GetPipelineBranchesAsyncWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineBranches");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineBranches");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/branches";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineBranches", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<MultibranchPipeline>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(MultibranchPipeline) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(MultibranchPipeline)));
}
/// <summary>
/// Retrieve pipeline folder for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="folder">Name of the folder</param>
/// <returns>PipelineFolderImpl</returns>
public PipelineFolderImpl GetPipelineFolder (string organization, string folder)
{
ApiResponse<PipelineFolderImpl> localVarResponse = GetPipelineFolderWithHttpInfo(organization, folder);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve pipeline folder for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="folder">Name of the folder</param>
/// <returns>ApiResponse of PipelineFolderImpl</returns>
public ApiResponse< PipelineFolderImpl > GetPipelineFolderWithHttpInfo (string organization, string folder)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineFolder");
// verify the required parameter 'folder' is set
if (folder == null)
throw new ApiException(400, "Missing required parameter 'folder' when calling BlueOceanApi->GetPipelineFolder");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{folder}/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (folder != null) localVarPathParams.Add("folder", this.Configuration.ApiClient.ParameterToString(folder)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineFolder", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineFolderImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineFolderImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineFolderImpl)));
}
/// <summary>
/// Retrieve pipeline folder for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="folder">Name of the folder</param>
/// <returns>Task of PipelineFolderImpl</returns>
public async System.Threading.Tasks.Task<PipelineFolderImpl> GetPipelineFolderAsync (string organization, string folder)
{
ApiResponse<PipelineFolderImpl> localVarResponse = await GetPipelineFolderAsyncWithHttpInfo(organization, folder);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve pipeline folder for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="folder">Name of the folder</param>
/// <returns>Task of ApiResponse (PipelineFolderImpl)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineFolderImpl>> GetPipelineFolderAsyncWithHttpInfo (string organization, string folder)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineFolder");
// verify the required parameter 'folder' is set
if (folder == null)
throw new ApiException(400, "Missing required parameter 'folder' when calling BlueOceanApi->GetPipelineFolder");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{folder}/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (folder != null) localVarPathParams.Add("folder", this.Configuration.ApiClient.ParameterToString(folder)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineFolder", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineFolderImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineFolderImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineFolderImpl)));
}
/// <summary>
/// Retrieve pipeline details for an organization folder
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="folder">Name of the folder</param>
/// <returns>PipelineImpl</returns>
public PipelineImpl GetPipelineFolderPipeline (string organization, string pipeline, string folder)
{
ApiResponse<PipelineImpl> localVarResponse = GetPipelineFolderPipelineWithHttpInfo(organization, pipeline, folder);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve pipeline details for an organization folder
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="folder">Name of the folder</param>
/// <returns>ApiResponse of PipelineImpl</returns>
public ApiResponse< PipelineImpl > GetPipelineFolderPipelineWithHttpInfo (string organization, string pipeline, string folder)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineFolderPipeline");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineFolderPipeline");
// verify the required parameter 'folder' is set
if (folder == null)
throw new ApiException(400, "Missing required parameter 'folder' when calling BlueOceanApi->GetPipelineFolderPipeline");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{folder}/pipelines/{pipeline}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (folder != null) localVarPathParams.Add("folder", this.Configuration.ApiClient.ParameterToString(folder)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineFolderPipeline", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineImpl)));
}
/// <summary>
/// Retrieve pipeline details for an organization folder
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="folder">Name of the folder</param>
/// <returns>Task of PipelineImpl</returns>
public async System.Threading.Tasks.Task<PipelineImpl> GetPipelineFolderPipelineAsync (string organization, string pipeline, string folder)
{
ApiResponse<PipelineImpl> localVarResponse = await GetPipelineFolderPipelineAsyncWithHttpInfo(organization, pipeline, folder);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve pipeline details for an organization folder
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="folder">Name of the folder</param>
/// <returns>Task of ApiResponse (PipelineImpl)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineImpl>> GetPipelineFolderPipelineAsyncWithHttpInfo (string organization, string pipeline, string folder)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineFolderPipeline");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineFolderPipeline");
// verify the required parameter 'folder' is set
if (folder == null)
throw new ApiException(400, "Missing required parameter 'folder' when calling BlueOceanApi->GetPipelineFolderPipeline");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{folder}/pipelines/{pipeline}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (folder != null) localVarPathParams.Add("folder", this.Configuration.ApiClient.ParameterToString(folder)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineFolderPipeline", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineImpl)));
}
/// <summary>
/// Retrieve queue details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>PipelineQueue</returns>
public PipelineQueue GetPipelineQueue (string organization, string pipeline)
{
ApiResponse<PipelineQueue> localVarResponse = GetPipelineQueueWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve queue details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of PipelineQueue</returns>
public ApiResponse< PipelineQueue > GetPipelineQueueWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineQueue");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineQueue");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/queue";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineQueue", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineQueue>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineQueue) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineQueue)));
}
/// <summary>
/// Retrieve queue details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of PipelineQueue</returns>
public async System.Threading.Tasks.Task<PipelineQueue> GetPipelineQueueAsync (string organization, string pipeline)
{
ApiResponse<PipelineQueue> localVarResponse = await GetPipelineQueueAsyncWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve queue details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (PipelineQueue)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineQueue>> GetPipelineQueueAsyncWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineQueue");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineQueue");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/queue";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineQueue", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineQueue>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineQueue) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineQueue)));
}
/// <summary>
/// Retrieve run details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>PipelineRun</returns>
public PipelineRun GetPipelineRun (string organization, string pipeline, string run)
{
ApiResponse<PipelineRun> localVarResponse = GetPipelineRunWithHttpInfo(organization, pipeline, run);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve run details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>ApiResponse of PipelineRun</returns>
public ApiResponse< PipelineRun > GetPipelineRunWithHttpInfo (string organization, string pipeline, string run)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRun");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRun");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRun");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRun", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRun>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRun) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRun)));
}
/// <summary>
/// Retrieve run details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of PipelineRun</returns>
public async System.Threading.Tasks.Task<PipelineRun> GetPipelineRunAsync (string organization, string pipeline, string run)
{
ApiResponse<PipelineRun> localVarResponse = await GetPipelineRunAsyncWithHttpInfo(organization, pipeline, run);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve run details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of ApiResponse (PipelineRun)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineRun>> GetPipelineRunAsyncWithHttpInfo (string organization, string pipeline, string run)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRun");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRun");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRun");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRun", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRun>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRun) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRun)));
}
/// <summary>
/// Get log for a pipeline run
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="start">Start position of the log (optional)</param>
/// <param name="download">Set to true in order to download the file, otherwise it's passed as a response body (optional)</param>
/// <returns>string</returns>
public string GetPipelineRunLog (string organization, string pipeline, string run, int? start = null, bool? download = null)
{
ApiResponse<string> localVarResponse = GetPipelineRunLogWithHttpInfo(organization, pipeline, run, start, download);
return localVarResponse.Data;
}
/// <summary>
/// Get log for a pipeline run
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="start">Start position of the log (optional)</param>
/// <param name="download">Set to true in order to download the file, otherwise it's passed as a response body (optional)</param>
/// <returns>ApiResponse of string</returns>
public ApiResponse< string > GetPipelineRunLogWithHttpInfo (string organization, string pipeline, string run, int? start = null, bool? download = null)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunLog");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunLog");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunLog");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/log";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter
if (download != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "download", download)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunLog", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Get log for a pipeline run
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="start">Start position of the log (optional)</param>
/// <param name="download">Set to true in order to download the file, otherwise it's passed as a response body (optional)</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> GetPipelineRunLogAsync (string organization, string pipeline, string run, int? start = null, bool? download = null)
{
ApiResponse<string> localVarResponse = await GetPipelineRunLogAsyncWithHttpInfo(organization, pipeline, run, start, download);
return localVarResponse.Data;
}
/// <summary>
/// Get log for a pipeline run
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="start">Start position of the log (optional)</param>
/// <param name="download">Set to true in order to download the file, otherwise it's passed as a response body (optional)</param>
/// <returns>Task of ApiResponse (string)</returns>
public async System.Threading.Tasks.Task<ApiResponse<string>> GetPipelineRunLogAsyncWithHttpInfo (string organization, string pipeline, string run, int? start = null, bool? download = null)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunLog");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunLog");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunLog");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/log";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (start != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "start", start)); // query parameter
if (download != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "download", download)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunLog", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Retrieve run node details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>PipelineRunNode</returns>
public PipelineRunNode GetPipelineRunNode (string organization, string pipeline, string run, string node)
{
ApiResponse<PipelineRunNode> localVarResponse = GetPipelineRunNodeWithHttpInfo(organization, pipeline, run, node);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve run node details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>ApiResponse of PipelineRunNode</returns>
public ApiResponse< PipelineRunNode > GetPipelineRunNodeWithHttpInfo (string organization, string pipeline, string run, string node)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunNode");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunNode");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunNode");
// verify the required parameter 'node' is set
if (node == null)
throw new ApiException(400, "Missing required parameter 'node' when calling BlueOceanApi->GetPipelineRunNode");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (node != null) localVarPathParams.Add("node", this.Configuration.ApiClient.ParameterToString(node)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunNode", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRunNode>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRunNode) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRunNode)));
}
/// <summary>
/// Retrieve run node details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>Task of PipelineRunNode</returns>
public async System.Threading.Tasks.Task<PipelineRunNode> GetPipelineRunNodeAsync (string organization, string pipeline, string run, string node)
{
ApiResponse<PipelineRunNode> localVarResponse = await GetPipelineRunNodeAsyncWithHttpInfo(organization, pipeline, run, node);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve run node details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>Task of ApiResponse (PipelineRunNode)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineRunNode>> GetPipelineRunNodeAsyncWithHttpInfo (string organization, string pipeline, string run, string node)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunNode");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunNode");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunNode");
// verify the required parameter 'node' is set
if (node == null)
throw new ApiException(400, "Missing required parameter 'node' when calling BlueOceanApi->GetPipelineRunNode");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (node != null) localVarPathParams.Add("node", this.Configuration.ApiClient.ParameterToString(node)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunNode", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRunNode>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRunNode) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRunNode)));
}
/// <summary>
/// Retrieve run node details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>PipelineStepImpl</returns>
public PipelineStepImpl GetPipelineRunNodeStep (string organization, string pipeline, string run, string node, string step)
{
ApiResponse<PipelineStepImpl> localVarResponse = GetPipelineRunNodeStepWithHttpInfo(organization, pipeline, run, node, step);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve run node details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>ApiResponse of PipelineStepImpl</returns>
public ApiResponse< PipelineStepImpl > GetPipelineRunNodeStepWithHttpInfo (string organization, string pipeline, string run, string node, string step)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunNodeStep");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunNodeStep");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunNodeStep");
// verify the required parameter 'node' is set
if (node == null)
throw new ApiException(400, "Missing required parameter 'node' when calling BlueOceanApi->GetPipelineRunNodeStep");
// verify the required parameter 'step' is set
if (step == null)
throw new ApiException(400, "Missing required parameter 'step' when calling BlueOceanApi->GetPipelineRunNodeStep");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (node != null) localVarPathParams.Add("node", this.Configuration.ApiClient.ParameterToString(node)); // path parameter
if (step != null) localVarPathParams.Add("step", this.Configuration.ApiClient.ParameterToString(step)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunNodeStep", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineStepImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineStepImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineStepImpl)));
}
/// <summary>
/// Retrieve run node details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>Task of PipelineStepImpl</returns>
public async System.Threading.Tasks.Task<PipelineStepImpl> GetPipelineRunNodeStepAsync (string organization, string pipeline, string run, string node, string step)
{
ApiResponse<PipelineStepImpl> localVarResponse = await GetPipelineRunNodeStepAsyncWithHttpInfo(organization, pipeline, run, node, step);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve run node details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>Task of ApiResponse (PipelineStepImpl)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineStepImpl>> GetPipelineRunNodeStepAsyncWithHttpInfo (string organization, string pipeline, string run, string node, string step)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunNodeStep");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunNodeStep");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunNodeStep");
// verify the required parameter 'node' is set
if (node == null)
throw new ApiException(400, "Missing required parameter 'node' when calling BlueOceanApi->GetPipelineRunNodeStep");
// verify the required parameter 'step' is set
if (step == null)
throw new ApiException(400, "Missing required parameter 'step' when calling BlueOceanApi->GetPipelineRunNodeStep");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (node != null) localVarPathParams.Add("node", this.Configuration.ApiClient.ParameterToString(node)); // path parameter
if (step != null) localVarPathParams.Add("step", this.Configuration.ApiClient.ParameterToString(step)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunNodeStep", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineStepImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineStepImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineStepImpl)));
}
/// <summary>
/// Get log for a pipeline run node step
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>string</returns>
public string GetPipelineRunNodeStepLog (string organization, string pipeline, string run, string node, string step)
{
ApiResponse<string> localVarResponse = GetPipelineRunNodeStepLogWithHttpInfo(organization, pipeline, run, node, step);
return localVarResponse.Data;
}
/// <summary>
/// Get log for a pipeline run node step
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>ApiResponse of string</returns>
public ApiResponse< string > GetPipelineRunNodeStepLogWithHttpInfo (string organization, string pipeline, string run, string node, string step)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunNodeStepLog");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunNodeStepLog");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunNodeStepLog");
// verify the required parameter 'node' is set
if (node == null)
throw new ApiException(400, "Missing required parameter 'node' when calling BlueOceanApi->GetPipelineRunNodeStepLog");
// verify the required parameter 'step' is set
if (step == null)
throw new ApiException(400, "Missing required parameter 'step' when calling BlueOceanApi->GetPipelineRunNodeStepLog");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}/log";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (node != null) localVarPathParams.Add("node", this.Configuration.ApiClient.ParameterToString(node)); // path parameter
if (step != null) localVarPathParams.Add("step", this.Configuration.ApiClient.ParameterToString(step)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunNodeStepLog", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Get log for a pipeline run node step
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> GetPipelineRunNodeStepLogAsync (string organization, string pipeline, string run, string node, string step)
{
ApiResponse<string> localVarResponse = await GetPipelineRunNodeStepLogAsyncWithHttpInfo(organization, pipeline, run, node, step);
return localVarResponse.Data;
}
/// <summary>
/// Get log for a pipeline run node step
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <param name="step">Name of the step</param>
/// <returns>Task of ApiResponse (string)</returns>
public async System.Threading.Tasks.Task<ApiResponse<string>> GetPipelineRunNodeStepLogAsyncWithHttpInfo (string organization, string pipeline, string run, string node, string step)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunNodeStepLog");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunNodeStepLog");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunNodeStepLog");
// verify the required parameter 'node' is set
if (node == null)
throw new ApiException(400, "Missing required parameter 'node' when calling BlueOceanApi->GetPipelineRunNodeStepLog");
// verify the required parameter 'step' is set
if (step == null)
throw new ApiException(400, "Missing required parameter 'step' when calling BlueOceanApi->GetPipelineRunNodeStepLog");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps/{step}/log";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (node != null) localVarPathParams.Add("node", this.Configuration.ApiClient.ParameterToString(node)); // path parameter
if (step != null) localVarPathParams.Add("step", this.Configuration.ApiClient.ParameterToString(step)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunNodeStepLog", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Retrieve run node steps details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>PipelineRunNodeSteps</returns>
public PipelineRunNodeSteps GetPipelineRunNodeSteps (string organization, string pipeline, string run, string node)
{
ApiResponse<PipelineRunNodeSteps> localVarResponse = GetPipelineRunNodeStepsWithHttpInfo(organization, pipeline, run, node);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve run node steps details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>ApiResponse of PipelineRunNodeSteps</returns>
public ApiResponse< PipelineRunNodeSteps > GetPipelineRunNodeStepsWithHttpInfo (string organization, string pipeline, string run, string node)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunNodeSteps");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunNodeSteps");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunNodeSteps");
// verify the required parameter 'node' is set
if (node == null)
throw new ApiException(400, "Missing required parameter 'node' when calling BlueOceanApi->GetPipelineRunNodeSteps");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (node != null) localVarPathParams.Add("node", this.Configuration.ApiClient.ParameterToString(node)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunNodeSteps", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRunNodeSteps>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRunNodeSteps) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRunNodeSteps)));
}
/// <summary>
/// Retrieve run node steps details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>Task of PipelineRunNodeSteps</returns>
public async System.Threading.Tasks.Task<PipelineRunNodeSteps> GetPipelineRunNodeStepsAsync (string organization, string pipeline, string run, string node)
{
ApiResponse<PipelineRunNodeSteps> localVarResponse = await GetPipelineRunNodeStepsAsyncWithHttpInfo(organization, pipeline, run, node);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve run node steps details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="node">Name of the node</param>
/// <returns>Task of ApiResponse (PipelineRunNodeSteps)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineRunNodeSteps>> GetPipelineRunNodeStepsAsyncWithHttpInfo (string organization, string pipeline, string run, string node)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunNodeSteps");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunNodeSteps");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunNodeSteps");
// verify the required parameter 'node' is set
if (node == null)
throw new ApiException(400, "Missing required parameter 'node' when calling BlueOceanApi->GetPipelineRunNodeSteps");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes/{node}/steps";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (node != null) localVarPathParams.Add("node", this.Configuration.ApiClient.ParameterToString(node)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunNodeSteps", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRunNodeSteps>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRunNodeSteps) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRunNodeSteps)));
}
/// <summary>
/// Retrieve run nodes details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>PipelineRunNodes</returns>
public PipelineRunNodes GetPipelineRunNodes (string organization, string pipeline, string run)
{
ApiResponse<PipelineRunNodes> localVarResponse = GetPipelineRunNodesWithHttpInfo(organization, pipeline, run);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve run nodes details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>ApiResponse of PipelineRunNodes</returns>
public ApiResponse< PipelineRunNodes > GetPipelineRunNodesWithHttpInfo (string organization, string pipeline, string run)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunNodes");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunNodes");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunNodes");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunNodes", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRunNodes>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRunNodes) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRunNodes)));
}
/// <summary>
/// Retrieve run nodes details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of PipelineRunNodes</returns>
public async System.Threading.Tasks.Task<PipelineRunNodes> GetPipelineRunNodesAsync (string organization, string pipeline, string run)
{
ApiResponse<PipelineRunNodes> localVarResponse = await GetPipelineRunNodesAsyncWithHttpInfo(organization, pipeline, run);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve run nodes details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of ApiResponse (PipelineRunNodes)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineRunNodes>> GetPipelineRunNodesAsyncWithHttpInfo (string organization, string pipeline, string run)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRunNodes");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRunNodes");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->GetPipelineRunNodes");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/nodes";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRunNodes", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRunNodes>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRunNodes) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRunNodes)));
}
/// <summary>
/// Retrieve all runs details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>PipelineRuns</returns>
public PipelineRuns GetPipelineRuns (string organization, string pipeline)
{
ApiResponse<PipelineRuns> localVarResponse = GetPipelineRunsWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve all runs details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of PipelineRuns</returns>
public ApiResponse< PipelineRuns > GetPipelineRunsWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRuns");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRuns");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRuns", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRuns>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRuns) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRuns)));
}
/// <summary>
/// Retrieve all runs details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of PipelineRuns</returns>
public async System.Threading.Tasks.Task<PipelineRuns> GetPipelineRunsAsync (string organization, string pipeline)
{
ApiResponse<PipelineRuns> localVarResponse = await GetPipelineRunsAsyncWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve all runs details for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (PipelineRuns)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineRuns>> GetPipelineRunsAsyncWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelineRuns");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->GetPipelineRuns");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelineRuns", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRuns>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRuns) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRuns)));
}
/// <summary>
/// Retrieve all pipelines details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Pipelines</returns>
public Pipelines GetPipelines (string organization)
{
ApiResponse<Pipelines> localVarResponse = GetPipelinesWithHttpInfo(organization);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve all pipelines details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>ApiResponse of Pipelines</returns>
public ApiResponse< Pipelines > GetPipelinesWithHttpInfo (string organization)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelines");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelines", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Pipelines>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Pipelines) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pipelines)));
}
/// <summary>
/// Retrieve all pipelines details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of Pipelines</returns>
public async System.Threading.Tasks.Task<Pipelines> GetPipelinesAsync (string organization)
{
ApiResponse<Pipelines> localVarResponse = await GetPipelinesAsyncWithHttpInfo(organization);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve all pipelines details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of ApiResponse (Pipelines)</returns>
public async System.Threading.Tasks.Task<ApiResponse<Pipelines>> GetPipelinesAsyncWithHttpInfo (string organization)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetPipelines");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetPipelines", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<Pipelines>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(Pipelines) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pipelines)));
}
/// <summary>
/// Retrieve SCM details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <returns>GithubScm</returns>
public GithubScm GetSCM (string organization, string scm)
{
ApiResponse<GithubScm> localVarResponse = GetSCMWithHttpInfo(organization, scm);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve SCM details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <returns>ApiResponse of GithubScm</returns>
public ApiResponse< GithubScm > GetSCMWithHttpInfo (string organization, string scm)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetSCM");
// verify the required parameter 'scm' is set
if (scm == null)
throw new ApiException(400, "Missing required parameter 'scm' when calling BlueOceanApi->GetSCM");
var localVarPath = "/blue/rest/organizations/{organization}/scm/{scm}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (scm != null) localVarPathParams.Add("scm", this.Configuration.ApiClient.ParameterToString(scm)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSCM", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<GithubScm>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GithubScm) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GithubScm)));
}
/// <summary>
/// Retrieve SCM details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <returns>Task of GithubScm</returns>
public async System.Threading.Tasks.Task<GithubScm> GetSCMAsync (string organization, string scm)
{
ApiResponse<GithubScm> localVarResponse = await GetSCMAsyncWithHttpInfo(organization, scm);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve SCM details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <returns>Task of ApiResponse (GithubScm)</returns>
public async System.Threading.Tasks.Task<ApiResponse<GithubScm>> GetSCMAsyncWithHttpInfo (string organization, string scm)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetSCM");
// verify the required parameter 'scm' is set
if (scm == null)
throw new ApiException(400, "Missing required parameter 'scm' when calling BlueOceanApi->GetSCM");
var localVarPath = "/blue/rest/organizations/{organization}/scm/{scm}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (scm != null) localVarPathParams.Add("scm", this.Configuration.ApiClient.ParameterToString(scm)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSCM", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<GithubScm>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(GithubScm) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GithubScm)));
}
/// <summary>
/// Retrieve SCM organization repositories details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <param name="pageSize">Number of items in a page (optional)</param>
/// <param name="pageNumber">Page number (optional)</param>
/// <returns>ScmOrganisations</returns>
public ScmOrganisations GetSCMOrganisationRepositories (string organization, string scm, string scmOrganisation, string credentialId = null, int? pageSize = null, int? pageNumber = null)
{
ApiResponse<ScmOrganisations> localVarResponse = GetSCMOrganisationRepositoriesWithHttpInfo(organization, scm, scmOrganisation, credentialId, pageSize, pageNumber);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve SCM organization repositories details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <param name="pageSize">Number of items in a page (optional)</param>
/// <param name="pageNumber">Page number (optional)</param>
/// <returns>ApiResponse of ScmOrganisations</returns>
public ApiResponse< ScmOrganisations > GetSCMOrganisationRepositoriesWithHttpInfo (string organization, string scm, string scmOrganisation, string credentialId = null, int? pageSize = null, int? pageNumber = null)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetSCMOrganisationRepositories");
// verify the required parameter 'scm' is set
if (scm == null)
throw new ApiException(400, "Missing required parameter 'scm' when calling BlueOceanApi->GetSCMOrganisationRepositories");
// verify the required parameter 'scmOrganisation' is set
if (scmOrganisation == null)
throw new ApiException(400, "Missing required parameter 'scmOrganisation' when calling BlueOceanApi->GetSCMOrganisationRepositories");
var localVarPath = "/blue/rest/organizations/{organization}/scm/{scm}/organizations/{scmOrganisation}/repositories";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (scm != null) localVarPathParams.Add("scm", this.Configuration.ApiClient.ParameterToString(scm)); // path parameter
if (scmOrganisation != null) localVarPathParams.Add("scmOrganisation", this.Configuration.ApiClient.ParameterToString(scmOrganisation)); // path parameter
if (credentialId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "credentialId", credentialId)); // query parameter
if (pageSize != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter
if (pageNumber != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "pageNumber", pageNumber)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSCMOrganisationRepositories", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<ScmOrganisations>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ScmOrganisations) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScmOrganisations)));
}
/// <summary>
/// Retrieve SCM organization repositories details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <param name="pageSize">Number of items in a page (optional)</param>
/// <param name="pageNumber">Page number (optional)</param>
/// <returns>Task of ScmOrganisations</returns>
public async System.Threading.Tasks.Task<ScmOrganisations> GetSCMOrganisationRepositoriesAsync (string organization, string scm, string scmOrganisation, string credentialId = null, int? pageSize = null, int? pageNumber = null)
{
ApiResponse<ScmOrganisations> localVarResponse = await GetSCMOrganisationRepositoriesAsyncWithHttpInfo(organization, scm, scmOrganisation, credentialId, pageSize, pageNumber);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve SCM organization repositories details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <param name="pageSize">Number of items in a page (optional)</param>
/// <param name="pageNumber">Page number (optional)</param>
/// <returns>Task of ApiResponse (ScmOrganisations)</returns>
public async System.Threading.Tasks.Task<ApiResponse<ScmOrganisations>> GetSCMOrganisationRepositoriesAsyncWithHttpInfo (string organization, string scm, string scmOrganisation, string credentialId = null, int? pageSize = null, int? pageNumber = null)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetSCMOrganisationRepositories");
// verify the required parameter 'scm' is set
if (scm == null)
throw new ApiException(400, "Missing required parameter 'scm' when calling BlueOceanApi->GetSCMOrganisationRepositories");
// verify the required parameter 'scmOrganisation' is set
if (scmOrganisation == null)
throw new ApiException(400, "Missing required parameter 'scmOrganisation' when calling BlueOceanApi->GetSCMOrganisationRepositories");
var localVarPath = "/blue/rest/organizations/{organization}/scm/{scm}/organizations/{scmOrganisation}/repositories";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (scm != null) localVarPathParams.Add("scm", this.Configuration.ApiClient.ParameterToString(scm)); // path parameter
if (scmOrganisation != null) localVarPathParams.Add("scmOrganisation", this.Configuration.ApiClient.ParameterToString(scmOrganisation)); // path parameter
if (credentialId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "credentialId", credentialId)); // query parameter
if (pageSize != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "pageSize", pageSize)); // query parameter
if (pageNumber != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "pageNumber", pageNumber)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSCMOrganisationRepositories", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<ScmOrganisations>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ScmOrganisations) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScmOrganisations)));
}
/// <summary>
/// Retrieve SCM organization repository details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="repository">Name of the SCM repository</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>ScmOrganisations</returns>
public ScmOrganisations GetSCMOrganisationRepository (string organization, string scm, string scmOrganisation, string repository, string credentialId = null)
{
ApiResponse<ScmOrganisations> localVarResponse = GetSCMOrganisationRepositoryWithHttpInfo(organization, scm, scmOrganisation, repository, credentialId);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve SCM organization repository details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="repository">Name of the SCM repository</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>ApiResponse of ScmOrganisations</returns>
public ApiResponse< ScmOrganisations > GetSCMOrganisationRepositoryWithHttpInfo (string organization, string scm, string scmOrganisation, string repository, string credentialId = null)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetSCMOrganisationRepository");
// verify the required parameter 'scm' is set
if (scm == null)
throw new ApiException(400, "Missing required parameter 'scm' when calling BlueOceanApi->GetSCMOrganisationRepository");
// verify the required parameter 'scmOrganisation' is set
if (scmOrganisation == null)
throw new ApiException(400, "Missing required parameter 'scmOrganisation' when calling BlueOceanApi->GetSCMOrganisationRepository");
// verify the required parameter 'repository' is set
if (repository == null)
throw new ApiException(400, "Missing required parameter 'repository' when calling BlueOceanApi->GetSCMOrganisationRepository");
var localVarPath = "/blue/rest/organizations/{organization}/scm/{scm}/organizations/{scmOrganisation}/repositories/{repository}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (scm != null) localVarPathParams.Add("scm", this.Configuration.ApiClient.ParameterToString(scm)); // path parameter
if (scmOrganisation != null) localVarPathParams.Add("scmOrganisation", this.Configuration.ApiClient.ParameterToString(scmOrganisation)); // path parameter
if (repository != null) localVarPathParams.Add("repository", this.Configuration.ApiClient.ParameterToString(repository)); // path parameter
if (credentialId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "credentialId", credentialId)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSCMOrganisationRepository", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<ScmOrganisations>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ScmOrganisations) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScmOrganisations)));
}
/// <summary>
/// Retrieve SCM organization repository details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="repository">Name of the SCM repository</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>Task of ScmOrganisations</returns>
public async System.Threading.Tasks.Task<ScmOrganisations> GetSCMOrganisationRepositoryAsync (string organization, string scm, string scmOrganisation, string repository, string credentialId = null)
{
ApiResponse<ScmOrganisations> localVarResponse = await GetSCMOrganisationRepositoryAsyncWithHttpInfo(organization, scm, scmOrganisation, repository, credentialId);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve SCM organization repository details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="scmOrganisation">Name of the SCM organization</param>
/// <param name="repository">Name of the SCM repository</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>Task of ApiResponse (ScmOrganisations)</returns>
public async System.Threading.Tasks.Task<ApiResponse<ScmOrganisations>> GetSCMOrganisationRepositoryAsyncWithHttpInfo (string organization, string scm, string scmOrganisation, string repository, string credentialId = null)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetSCMOrganisationRepository");
// verify the required parameter 'scm' is set
if (scm == null)
throw new ApiException(400, "Missing required parameter 'scm' when calling BlueOceanApi->GetSCMOrganisationRepository");
// verify the required parameter 'scmOrganisation' is set
if (scmOrganisation == null)
throw new ApiException(400, "Missing required parameter 'scmOrganisation' when calling BlueOceanApi->GetSCMOrganisationRepository");
// verify the required parameter 'repository' is set
if (repository == null)
throw new ApiException(400, "Missing required parameter 'repository' when calling BlueOceanApi->GetSCMOrganisationRepository");
var localVarPath = "/blue/rest/organizations/{organization}/scm/{scm}/organizations/{scmOrganisation}/repositories/{repository}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (scm != null) localVarPathParams.Add("scm", this.Configuration.ApiClient.ParameterToString(scm)); // path parameter
if (scmOrganisation != null) localVarPathParams.Add("scmOrganisation", this.Configuration.ApiClient.ParameterToString(scmOrganisation)); // path parameter
if (repository != null) localVarPathParams.Add("repository", this.Configuration.ApiClient.ParameterToString(repository)); // path parameter
if (credentialId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "credentialId", credentialId)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSCMOrganisationRepository", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<ScmOrganisations>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ScmOrganisations) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScmOrganisations)));
}
/// <summary>
/// Retrieve SCM organizations details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>ScmOrganisations</returns>
public ScmOrganisations GetSCMOrganisations (string organization, string scm, string credentialId = null)
{
ApiResponse<ScmOrganisations> localVarResponse = GetSCMOrganisationsWithHttpInfo(organization, scm, credentialId);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve SCM organizations details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>ApiResponse of ScmOrganisations</returns>
public ApiResponse< ScmOrganisations > GetSCMOrganisationsWithHttpInfo (string organization, string scm, string credentialId = null)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetSCMOrganisations");
// verify the required parameter 'scm' is set
if (scm == null)
throw new ApiException(400, "Missing required parameter 'scm' when calling BlueOceanApi->GetSCMOrganisations");
var localVarPath = "/blue/rest/organizations/{organization}/scm/{scm}/organizations";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (scm != null) localVarPathParams.Add("scm", this.Configuration.ApiClient.ParameterToString(scm)); // path parameter
if (credentialId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "credentialId", credentialId)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSCMOrganisations", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<ScmOrganisations>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ScmOrganisations) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScmOrganisations)));
}
/// <summary>
/// Retrieve SCM organizations details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>Task of ScmOrganisations</returns>
public async System.Threading.Tasks.Task<ScmOrganisations> GetSCMOrganisationsAsync (string organization, string scm, string credentialId = null)
{
ApiResponse<ScmOrganisations> localVarResponse = await GetSCMOrganisationsAsyncWithHttpInfo(organization, scm, credentialId);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve SCM organizations details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="scm">Name of SCM</param>
/// <param name="credentialId">Credential ID (optional)</param>
/// <returns>Task of ApiResponse (ScmOrganisations)</returns>
public async System.Threading.Tasks.Task<ApiResponse<ScmOrganisations>> GetSCMOrganisationsAsyncWithHttpInfo (string organization, string scm, string credentialId = null)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetSCMOrganisations");
// verify the required parameter 'scm' is set
if (scm == null)
throw new ApiException(400, "Missing required parameter 'scm' when calling BlueOceanApi->GetSCMOrganisations");
var localVarPath = "/blue/rest/organizations/{organization}/scm/{scm}/organizations";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (scm != null) localVarPathParams.Add("scm", this.Configuration.ApiClient.ParameterToString(scm)); // path parameter
if (credentialId != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "credentialId", credentialId)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetSCMOrganisations", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<ScmOrganisations>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(ScmOrganisations) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ScmOrganisations)));
}
/// <summary>
/// Retrieve user details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="user">Name of the user</param>
/// <returns>User</returns>
public User GetUser (string organization, string user)
{
ApiResponse<User> localVarResponse = GetUserWithHttpInfo(organization, user);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve user details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="user">Name of the user</param>
/// <returns>ApiResponse of User</returns>
public ApiResponse< User > GetUserWithHttpInfo (string organization, string user)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetUser");
// verify the required parameter 'user' is set
if (user == null)
throw new ApiException(400, "Missing required parameter 'user' when calling BlueOceanApi->GetUser");
var localVarPath = "/blue/rest/organizations/{organization}/users/{user}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (user != null) localVarPathParams.Add("user", this.Configuration.ApiClient.ParameterToString(user)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetUser", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<User>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
}
/// <summary>
/// Retrieve user details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="user">Name of the user</param>
/// <returns>Task of User</returns>
public async System.Threading.Tasks.Task<User> GetUserAsync (string organization, string user)
{
ApiResponse<User> localVarResponse = await GetUserAsyncWithHttpInfo(organization, user);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve user details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="user">Name of the user</param>
/// <returns>Task of ApiResponse (User)</returns>
public async System.Threading.Tasks.Task<ApiResponse<User>> GetUserAsyncWithHttpInfo (string organization, string user)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetUser");
// verify the required parameter 'user' is set
if (user == null)
throw new ApiException(400, "Missing required parameter 'user' when calling BlueOceanApi->GetUser");
var localVarPath = "/blue/rest/organizations/{organization}/users/{user}";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (user != null) localVarPathParams.Add("user", this.Configuration.ApiClient.ParameterToString(user)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetUser", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<User>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
}
/// <summary>
/// Retrieve user favorites details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="user">Name of the user</param>
/// <returns>UserFavorites</returns>
public UserFavorites GetUserFavorites (string user)
{
ApiResponse<UserFavorites> localVarResponse = GetUserFavoritesWithHttpInfo(user);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve user favorites details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="user">Name of the user</param>
/// <returns>ApiResponse of UserFavorites</returns>
public ApiResponse< UserFavorites > GetUserFavoritesWithHttpInfo (string user)
{
// verify the required parameter 'user' is set
if (user == null)
throw new ApiException(400, "Missing required parameter 'user' when calling BlueOceanApi->GetUserFavorites");
var localVarPath = "/blue/rest/users/{user}/favorites";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (user != null) localVarPathParams.Add("user", this.Configuration.ApiClient.ParameterToString(user)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetUserFavorites", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<UserFavorites>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(UserFavorites) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserFavorites)));
}
/// <summary>
/// Retrieve user favorites details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="user">Name of the user</param>
/// <returns>Task of UserFavorites</returns>
public async System.Threading.Tasks.Task<UserFavorites> GetUserFavoritesAsync (string user)
{
ApiResponse<UserFavorites> localVarResponse = await GetUserFavoritesAsyncWithHttpInfo(user);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve user favorites details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="user">Name of the user</param>
/// <returns>Task of ApiResponse (UserFavorites)</returns>
public async System.Threading.Tasks.Task<ApiResponse<UserFavorites>> GetUserFavoritesAsyncWithHttpInfo (string user)
{
// verify the required parameter 'user' is set
if (user == null)
throw new ApiException(400, "Missing required parameter 'user' when calling BlueOceanApi->GetUserFavorites");
var localVarPath = "/blue/rest/users/{user}/favorites";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (user != null) localVarPathParams.Add("user", this.Configuration.ApiClient.ParameterToString(user)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetUserFavorites", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<UserFavorites>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(UserFavorites) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(UserFavorites)));
}
/// <summary>
/// Retrieve users details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>User</returns>
public User GetUsers (string organization)
{
ApiResponse<User> localVarResponse = GetUsersWithHttpInfo(organization);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve users details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>ApiResponse of User</returns>
public ApiResponse< User > GetUsersWithHttpInfo (string organization)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetUsers");
var localVarPath = "/blue/rest/organizations/{organization}/users/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetUsers", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<User>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
}
/// <summary>
/// Retrieve users details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of User</returns>
public async System.Threading.Tasks.Task<User> GetUsersAsync (string organization)
{
ApiResponse<User> localVarResponse = await GetUsersAsyncWithHttpInfo(organization);
return localVarResponse.Data;
}
/// <summary>
/// Retrieve users details for an organization
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <returns>Task of ApiResponse (User)</returns>
public async System.Threading.Tasks.Task<ApiResponse<User>> GetUsersAsyncWithHttpInfo (string organization)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->GetUsers");
var localVarPath = "/blue/rest/organizations/{organization}/users/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("GetUsers", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<User>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User)));
}
/// <summary>
/// Replay an organization pipeline run
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>QueueItemImpl</returns>
public QueueItemImpl PostPipelineRun (string organization, string pipeline, string run)
{
ApiResponse<QueueItemImpl> localVarResponse = PostPipelineRunWithHttpInfo(organization, pipeline, run);
return localVarResponse.Data;
}
/// <summary>
/// Replay an organization pipeline run
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>ApiResponse of QueueItemImpl</returns>
public ApiResponse< QueueItemImpl > PostPipelineRunWithHttpInfo (string organization, string pipeline, string run)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->PostPipelineRun");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->PostPipelineRun");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->PostPipelineRun");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/replay";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("PostPipelineRun", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<QueueItemImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(QueueItemImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(QueueItemImpl)));
}
/// <summary>
/// Replay an organization pipeline run
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of QueueItemImpl</returns>
public async System.Threading.Tasks.Task<QueueItemImpl> PostPipelineRunAsync (string organization, string pipeline, string run)
{
ApiResponse<QueueItemImpl> localVarResponse = await PostPipelineRunAsyncWithHttpInfo(organization, pipeline, run);
return localVarResponse.Data;
}
/// <summary>
/// Replay an organization pipeline run
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <returns>Task of ApiResponse (QueueItemImpl)</returns>
public async System.Threading.Tasks.Task<ApiResponse<QueueItemImpl>> PostPipelineRunAsyncWithHttpInfo (string organization, string pipeline, string run)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->PostPipelineRun");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->PostPipelineRun");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->PostPipelineRun");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/replay";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("PostPipelineRun", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<QueueItemImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(QueueItemImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(QueueItemImpl)));
}
/// <summary>
/// Start a build for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>QueueItemImpl</returns>
public QueueItemImpl PostPipelineRuns (string organization, string pipeline)
{
ApiResponse<QueueItemImpl> localVarResponse = PostPipelineRunsWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Start a build for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>ApiResponse of QueueItemImpl</returns>
public ApiResponse< QueueItemImpl > PostPipelineRunsWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->PostPipelineRuns");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->PostPipelineRuns");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("PostPipelineRuns", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<QueueItemImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(QueueItemImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(QueueItemImpl)));
}
/// <summary>
/// Start a build for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of QueueItemImpl</returns>
public async System.Threading.Tasks.Task<QueueItemImpl> PostPipelineRunsAsync (string organization, string pipeline)
{
ApiResponse<QueueItemImpl> localVarResponse = await PostPipelineRunsAsyncWithHttpInfo(organization, pipeline);
return localVarResponse.Data;
}
/// <summary>
/// Start a build for an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <returns>Task of ApiResponse (QueueItemImpl)</returns>
public async System.Threading.Tasks.Task<ApiResponse<QueueItemImpl>> PostPipelineRunsAsyncWithHttpInfo (string organization, string pipeline)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->PostPipelineRuns");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->PostPipelineRuns");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("PostPipelineRuns", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<QueueItemImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(QueueItemImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(QueueItemImpl)));
}
/// <summary>
/// Favorite/unfavorite a pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="body">Set JSON string body to {"favorite": true} to favorite, set value to false to unfavorite</param>
/// <returns>FavoriteImpl</returns>
public FavoriteImpl PutPipelineFavorite (string organization, string pipeline, Body body)
{
ApiResponse<FavoriteImpl> localVarResponse = PutPipelineFavoriteWithHttpInfo(organization, pipeline, body);
return localVarResponse.Data;
}
/// <summary>
/// Favorite/unfavorite a pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="body">Set JSON string body to {"favorite": true} to favorite, set value to false to unfavorite</param>
/// <returns>ApiResponse of FavoriteImpl</returns>
public ApiResponse< FavoriteImpl > PutPipelineFavoriteWithHttpInfo (string organization, string pipeline, Body body)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->PutPipelineFavorite");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->PutPipelineFavorite");
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling BlueOceanApi->PutPipelineFavorite");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/favorite";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("PutPipelineFavorite", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<FavoriteImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(FavoriteImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FavoriteImpl)));
}
/// <summary>
/// Favorite/unfavorite a pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="body">Set JSON string body to {"favorite": true} to favorite, set value to false to unfavorite</param>
/// <returns>Task of FavoriteImpl</returns>
public async System.Threading.Tasks.Task<FavoriteImpl> PutPipelineFavoriteAsync (string organization, string pipeline, Body body)
{
ApiResponse<FavoriteImpl> localVarResponse = await PutPipelineFavoriteAsyncWithHttpInfo(organization, pipeline, body);
return localVarResponse.Data;
}
/// <summary>
/// Favorite/unfavorite a pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="body">Set JSON string body to {"favorite": true} to favorite, set value to false to unfavorite</param>
/// <returns>Task of ApiResponse (FavoriteImpl)</returns>
public async System.Threading.Tasks.Task<ApiResponse<FavoriteImpl>> PutPipelineFavoriteAsyncWithHttpInfo (string organization, string pipeline, Body body)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->PutPipelineFavorite");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->PutPipelineFavorite");
// verify the required parameter 'body' is set
if (body == null)
throw new ApiException(400, "Missing required parameter 'body' when calling BlueOceanApi->PutPipelineFavorite");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/favorite";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
"application/json"
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (body != null && body.GetType() != typeof(byte[]))
{
localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
}
else
{
localVarPostBody = body; // byte array
}
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("PutPipelineFavorite", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<FavoriteImpl>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(FavoriteImpl) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FavoriteImpl)));
}
/// <summary>
/// Stop a build of an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="blocking">Set to true to make blocking stop, default: false (optional)</param>
/// <param name="timeOutInSecs">Timeout in seconds, default: 10 seconds (optional)</param>
/// <returns>PipelineRun</returns>
public PipelineRun PutPipelineRun (string organization, string pipeline, string run, string blocking = null, int? timeOutInSecs = null)
{
ApiResponse<PipelineRun> localVarResponse = PutPipelineRunWithHttpInfo(organization, pipeline, run, blocking, timeOutInSecs);
return localVarResponse.Data;
}
/// <summary>
/// Stop a build of an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="blocking">Set to true to make blocking stop, default: false (optional)</param>
/// <param name="timeOutInSecs">Timeout in seconds, default: 10 seconds (optional)</param>
/// <returns>ApiResponse of PipelineRun</returns>
public ApiResponse< PipelineRun > PutPipelineRunWithHttpInfo (string organization, string pipeline, string run, string blocking = null, int? timeOutInSecs = null)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->PutPipelineRun");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->PutPipelineRun");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->PutPipelineRun");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/stop";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (blocking != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "blocking", blocking)); // query parameter
if (timeOutInSecs != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "timeOutInSecs", timeOutInSecs)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("PutPipelineRun", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRun>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRun) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRun)));
}
/// <summary>
/// Stop a build of an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="blocking">Set to true to make blocking stop, default: false (optional)</param>
/// <param name="timeOutInSecs">Timeout in seconds, default: 10 seconds (optional)</param>
/// <returns>Task of PipelineRun</returns>
public async System.Threading.Tasks.Task<PipelineRun> PutPipelineRunAsync (string organization, string pipeline, string run, string blocking = null, int? timeOutInSecs = null)
{
ApiResponse<PipelineRun> localVarResponse = await PutPipelineRunAsyncWithHttpInfo(organization, pipeline, run, blocking, timeOutInSecs);
return localVarResponse.Data;
}
/// <summary>
/// Stop a build of an organization pipeline
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="organization">Name of the organization</param>
/// <param name="pipeline">Name of the pipeline</param>
/// <param name="run">Name of the run</param>
/// <param name="blocking">Set to true to make blocking stop, default: false (optional)</param>
/// <param name="timeOutInSecs">Timeout in seconds, default: 10 seconds (optional)</param>
/// <returns>Task of ApiResponse (PipelineRun)</returns>
public async System.Threading.Tasks.Task<ApiResponse<PipelineRun>> PutPipelineRunAsyncWithHttpInfo (string organization, string pipeline, string run, string blocking = null, int? timeOutInSecs = null)
{
// verify the required parameter 'organization' is set
if (organization == null)
throw new ApiException(400, "Missing required parameter 'organization' when calling BlueOceanApi->PutPipelineRun");
// verify the required parameter 'pipeline' is set
if (pipeline == null)
throw new ApiException(400, "Missing required parameter 'pipeline' when calling BlueOceanApi->PutPipelineRun");
// verify the required parameter 'run' is set
if (run == null)
throw new ApiException(400, "Missing required parameter 'run' when calling BlueOceanApi->PutPipelineRun");
var localVarPath = "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/stop";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (organization != null) localVarPathParams.Add("organization", this.Configuration.ApiClient.ParameterToString(organization)); // path parameter
if (pipeline != null) localVarPathParams.Add("pipeline", this.Configuration.ApiClient.ParameterToString(pipeline)); // path parameter
if (run != null) localVarPathParams.Add("run", this.Configuration.ApiClient.ParameterToString(run)); // path parameter
if (blocking != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "blocking", blocking)); // query parameter
if (timeOutInSecs != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "timeOutInSecs", timeOutInSecs)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("PutPipelineRun", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<PipelineRun>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(PipelineRun) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(PipelineRun)));
}
/// <summary>
/// Search for any resource details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string</param>
/// <returns>string</returns>
public string Search (string q)
{
ApiResponse<string> localVarResponse = SearchWithHttpInfo(q);
return localVarResponse.Data;
}
/// <summary>
/// Search for any resource details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string</param>
/// <returns>ApiResponse of string</returns>
public ApiResponse< string > SearchWithHttpInfo (string q)
{
// verify the required parameter 'q' is set
if (q == null)
throw new ApiException(400, "Missing required parameter 'q' when calling BlueOceanApi->Search");
var localVarPath = "/blue/rest/search/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (q != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "q", q)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("Search", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Search for any resource details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> SearchAsync (string q)
{
ApiResponse<string> localVarResponse = await SearchAsyncWithHttpInfo(q);
return localVarResponse.Data;
}
/// <summary>
/// Search for any resource details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string</param>
/// <returns>Task of ApiResponse (string)</returns>
public async System.Threading.Tasks.Task<ApiResponse<string>> SearchAsyncWithHttpInfo (string q)
{
// verify the required parameter 'q' is set
if (q == null)
throw new ApiException(400, "Missing required parameter 'q' when calling BlueOceanApi->Search");
var localVarPath = "/blue/rest/search/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (q != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "q", q)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("Search", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Get classes details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string containing an array of class names</param>
/// <returns>string</returns>
public string SearchClasses (string q)
{
ApiResponse<string> localVarResponse = SearchClassesWithHttpInfo(q);
return localVarResponse.Data;
}
/// <summary>
/// Get classes details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string containing an array of class names</param>
/// <returns>ApiResponse of string</returns>
public ApiResponse< string > SearchClassesWithHttpInfo (string q)
{
// verify the required parameter 'q' is set
if (q == null)
throw new ApiException(400, "Missing required parameter 'q' when calling BlueOceanApi->SearchClasses");
var localVarPath = "/blue/rest/classes/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (q != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "q", q)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("SearchClasses", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
/// <summary>
/// Get classes details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string containing an array of class names</param>
/// <returns>Task of string</returns>
public async System.Threading.Tasks.Task<string> SearchClassesAsync (string q)
{
ApiResponse<string> localVarResponse = await SearchClassesAsyncWithHttpInfo(q);
return localVarResponse.Data;
}
/// <summary>
/// Get classes details
/// </summary>
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
/// <param name="q">Query string containing an array of class names</param>
/// <returns>Task of ApiResponse (string)</returns>
public async System.Threading.Tasks.Task<ApiResponse<string>> SearchClassesAsyncWithHttpInfo (string q)
{
// verify the required parameter 'q' is set
if (q == null)
throw new ApiException(400, "Missing required parameter 'q' when calling BlueOceanApi->SearchClasses");
var localVarPath = "/blue/rest/classes/";
var localVarPathParams = new Dictionary<String, String>();
var localVarQueryParams = new List<KeyValuePair<String, String>>();
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
var localVarFormParams = new Dictionary<String, String>();
var localVarFileParams = new Dictionary<String, FileParameter>();
Object localVarPostBody = null;
// to determine the Content-Type header
String[] localVarHttpContentTypes = new String[] {
};
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
// to determine the Accept header
String[] localVarHttpHeaderAccepts = new String[] {
"application/json"
};
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
if (localVarHttpHeaderAccept != null)
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
if (q != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "q", q)); // query parameter
// authentication (jenkins_auth) required
// http basic authentication required
if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password))
{
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
// make the HTTP request
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
localVarPathParams, localVarHttpContentType);
int localVarStatusCode = (int) localVarResponse.StatusCode;
if (ExceptionFactory != null)
{
Exception exception = ExceptionFactory("SearchClasses", localVarResponse);
if (exception != null) throw exception;
}
return new ApiResponse<string>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string)));
}
}
}
| 57.065437 | 259 | 0.651883 |
def2cf14feba13736eb2ff5bcacb16dd6cda2a34 | 1,036 | ps1 | PowerShell | aspnet-mvc1/plan.ps1 | johnjelinek/core-plans | 1a13667d32550ac5b4d697e67026b3a2b618a8b7 | [
"Apache-2.0"
] | null | null | null | aspnet-mvc1/plan.ps1 | johnjelinek/core-plans | 1a13667d32550ac5b4d697e67026b3a2b618a8b7 | [
"Apache-2.0"
] | null | null | null | aspnet-mvc1/plan.ps1 | johnjelinek/core-plans | 1a13667d32550ac5b4d697e67026b3a2b618a8b7 | [
"Apache-2.0"
] | null | null | null | $pkg_name="aspnet-mvc1"
$pkg_origin="core"
$base_version="1.0"
$pkg_version="$base_version.0"
$pkg_description="The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating MVC-based Web applications."
$pkg_upstream_url="https://www.asp.net/mvc/overview/older-versions-1"
$pkg_license=@("MS-PL")
$pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
$pkg_source="https://download.microsoft.com/download/A/6/8/A68968AE-DE1D-4FA4-A98A-B74042C6090D/AspNetMVC1.msi"
$pkg_shasum="bbf8970a08a0bc825cf8521ce617dd6ad5eec04b5c9bf7d5e0fd1c06acf90a57"
$pkg_build_deps=@("core/lessmsi")
function Invoke-Unpack {
lessmsi x (Resolve-Path "$HAB_CACHE_SRC_PATH/$pkg_filename").Path
mkdir "$HAB_CACHE_SRC_PATH/$pkg_dirname"
Move-Item "AspNetMVC1/SourceDir/PFiles/Microsoft ASP.NET/ASP.NET MVC 1.0" "$HAB_CACHE_SRC_PATH/$pkg_dirname"
Remove-Item -Recurse -Force .\AspNetMVC1
}
function Invoke-Install {
Copy-Item "$HAB_CACHE_SRC_PATH/$pkg_dirname/ASP.NET MVC 1.0/*" "$pkg_prefix" -Recurse -Force
}
| 43.166667 | 142 | 0.78668 |
ab1cc92495c94f24952b7974e4612de0306f89a8 | 305 | cs | C# | Example/Core/Example_Sound/Example_Sound.cs | waneta/uutils_public | 39b74092b087817fc38c3d45ddc92678fd55ef93 | [
"MIT"
] | null | null | null | Example/Core/Example_Sound/Example_Sound.cs | waneta/uutils_public | 39b74092b087817fc38c3d45ddc92678fd55ef93 | [
"MIT"
] | null | null | null | Example/Core/Example_Sound/Example_Sound.cs | waneta/uutils_public | 39b74092b087817fc38c3d45ddc92678fd55ef93 | [
"MIT"
] | null | null | null | using UnityEngine;
namespace Client.UUtils.Example
{
public class Example_Sound : MonoBehaviour
{
void OnGUI() {
if (GUILayout.Button("播放")) {
SoundManager.Instance.playSound("UUtils/Sound/cheer",Camera.main.gameObject);
}
}
}
}
| 19.0625 | 81 | 0.570492 |
3e2d6217244741e1ecc111ed31bbffa20b332194 | 160 | h | C | adt/boolean.h | didithilmy/engis-kitchen | a1994e01d2f3bac8025ca2be74f1b7e2314fc6b6 | [
"Apache-2.0"
] | null | null | null | adt/boolean.h | didithilmy/engis-kitchen | a1994e01d2f3bac8025ca2be74f1b7e2314fc6b6 | [
"Apache-2.0"
] | null | null | null | adt/boolean.h | didithilmy/engis-kitchen | a1994e01d2f3bac8025ca2be74f1b7e2314fc6b6 | [
"Apache-2.0"
] | 2 | 2019-11-28T04:31:03.000Z | 2020-01-23T07:20:40.000Z | /**
* Boolean type definitions
* Header file template provided by ITB
*/
#ifndef BOOL
#define BOOL
#define boolean int
#define true 1
#define false 0
#endif | 14.545455 | 39 | 0.73125 |
f02ceba7181acc45bf9bae1d138dd71123a318a6 | 422 | py | Python | my_wallet/apiv1/permissions.py | ibolorino/wallet_backend | 20c80e419eaef6b0577ca45ff35bf4eb9501e3a3 | [
"MIT"
] | null | null | null | my_wallet/apiv1/permissions.py | ibolorino/wallet_backend | 20c80e419eaef6b0577ca45ff35bf4eb9501e3a3 | [
"MIT"
] | null | null | null | my_wallet/apiv1/permissions.py | ibolorino/wallet_backend | 20c80e419eaef6b0577ca45ff35bf4eb9501e3a3 | [
"MIT"
] | null | null | null | from rest_framework import permissions
class IsAadminOrReadOnly(permissions.BasePermission):
"""
The request is authenticated as a admin, or is a read-only request.
"""
def has_permission(self, request, view):
return bool(
(request.user and request.user.is_authenticated and request.method in permissions.SAFE_METHODS) or
(request.user and request.user.is_staff)
) | 35.166667 | 110 | 0.699052 |
01d324373a6803a6a334e3ff0d94b3dba9b55d42 | 10,977 | dart | Dart | lib/pages/login_page.dart | Boumour/ObsTest | d2f40b946646dc4c00c7a712050eff3f3a198451 | [
"Apache-2.0"
] | null | null | null | lib/pages/login_page.dart | Boumour/ObsTest | d2f40b946646dc4c00c7a712050eff3f3a198451 | [
"Apache-2.0"
] | null | null | null | lib/pages/login_page.dart | Boumour/ObsTest | d2f40b946646dc4c00c7a712050eff3f3a198451 | [
"Apache-2.0"
] | null | null | null |
import 'package:flutter/material.dart';
import 'package:observanceapp/customviews/progress_dialog.dart';
import 'package:observanceapp/futures/app_futures.dart';
import 'package:observanceapp/models/base/EventObject.dart';
import 'package:observanceapp/pages/home_page.dart';
import 'package:observanceapp/pages/register_page.dart';
import 'package:observanceapp/utils/app_shared_preferences.dart';
import 'package:observanceapp/utils/constants.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:wave/config.dart';
import 'package:wave/wave.dart';
import '../localization/localizations.dart';
class LoginPage extends StatefulWidget {
@override
createState() => new LoginPageState();
}
class LoginPageState extends State<LoginPage> {
final globalKey = new GlobalKey<ScaffoldState>();
ProgressDialog progressDialog =
ProgressDialog.getProgressDialog("");
TextEditingController emailController = new TextEditingController(text: "");
TextEditingController passwordController =
new TextEditingController(text: "");
//------------------------------------------------------------------------------
@override
Widget build(BuildContext context) {
return new Scaffold(
key: globalKey,
backgroundColor: Colors.white,
body: new Stack(
children: <Widget>[
Container(
height: 650,
child: RotatedBox(
quarterTurns: 2,
child: WaveWidget(
config: CustomConfig(
gradients: [
[Colors.lightGreen, Colors.lightGreen.shade200],
[Colors.green.shade200, Colors.green.shade400],
],
durations: [19440, 10800],
heightPercentages: [0.20, 0.25],
blur: MaskFilter.blur(BlurStyle.solid, 10),
gradientBegin: Alignment.bottomLeft,
gradientEnd: Alignment.topRight,
),
waveAmplitude: 0,
size: Size(
double.infinity,
double.infinity,
),
),
),
),
ListView(
children: <Widget>[
Container(
//height: 400,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
_appIcon(),
Text(AppLocalizations.of(context).login, textAlign: TextAlign.center, style: TextStyle(
color: Colors.white70,
fontWeight: FontWeight.bold,
fontSize: 28.0
)),
Card(
margin: EdgeInsets.only(left: 30, right:30, top:30),
elevation: 11,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(40))),
child: TextField(
keyboardType: TextInputType.emailAddress,
controller: emailController,
decoration: InputDecoration(
prefixIcon: Icon(EvaIcons.personOutline, color: Colors.black26,),
suffixIcon: Icon(EvaIcons.checkmarkCircleOutline, color: Colors.black26,),
hintText: AppLocalizations.of(context).lblemail,
hintStyle: TextStyle(color: Colors.black26),
filled: true,
fillColor: Colors.white,
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(Radius.circular(40.0)),
),
contentPadding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 16.0)
),
),
),
Card(
margin: EdgeInsets.only(left: 30, right:30, top:20),
elevation: 11,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(40))),
child: TextField(
keyboardType: TextInputType.text,
obscureText: true,
controller: passwordController,
decoration: InputDecoration(
prefixIcon: Icon(EvaIcons.lockOutline, color: Colors.black26,),
suffixIcon: Icon(EvaIcons.checkmarkCircleOutline, color: Colors.black26,),
hintText: AppLocalizations.of(context).password,
hintStyle: TextStyle(
color: Colors.black26,
),
filled: true,
fillColor: Colors.white,
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(Radius.circular(40.0)),
),
contentPadding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 16.0)
),
),
),
Container(
width: double.infinity,
padding: EdgeInsets.all(30.0),
child: RaisedButton(
padding: EdgeInsets.symmetric(vertical: 16.0),
color: Colors.white,
onPressed: _loginButtonAction,
elevation: 11,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(40.0))),
child: Text(AppLocalizations.of(context).login, style: TextStyle(
color: Colors.green
)),
),
),
/*Text('forget', style: TextStyle(
color: Colors.white
))*/
],
),
),
SizedBox(height: 30,),
Align(
alignment: Alignment.bottomCenter,
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: <Widget>[
GestureDetector(
onTap: _goToRegisterScreen,
child: new Container(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(AppLocalizations.of(context).notregistred),
Text(' ' + AppLocalizations.of(context).register, style: TextStyle( color: Colors.lightGreen),)
],
),
margin: EdgeInsets.only(bottom: 30.0)),
),
/*Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(AppLocalizations.of(context).notregistred),
FlatButton(child: Text(AppLocalizations.of(context).register), textColor: Colors.green, )
],
)*/
],
),
)
],
)
, progressDialog],
));
}
//------------------------------------------------------------------------------
Widget _appIcon() {
return new Container(
//decoration: new BoxDecoration(color: Colors.blue[400]),
child: new Image(
image: new AssetImage("assets/ic_launcher.png"),
height: 170.0,
width: 170.0,
),
margin: EdgeInsets.only(top: 20.0),
);
}
//------------------------------------------------------------------------------
void _loginButtonAction() {
String p = r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$';
RegExp regExp = new RegExp(p);
if (emailController.text == "") {
globalKey.currentState.showSnackBar(new SnackBar(
content: new Text(AppLocalizations.of(context).enteremail),
));
return;
}
if (regExp.hasMatch(emailController.text) == false) {
globalKey.currentState.showSnackBar(new SnackBar(
content: new Text(AppLocalizations.of(context).entervalidemail),
));
return;
}
if (passwordController.text == "") {
globalKey.currentState.showSnackBar(new SnackBar(
content: new Text(AppLocalizations.of(context).enterpassword),
));
return;
}
FocusScope.of(context).requestFocus(new FocusNode());
progressDialog.showProgress();
_loginUser(emailController.text, passwordController.text);
}
//------------------------------------------------------------------------------
void _loginUser(String id, String password) async {
EventObject eventObject = await loginUser(id, password);
switch (eventObject.id) {
case EventConstants.LOGIN_USER_SUCCESSFUL:
{
setState(() {
AppSharedPreferences.setUserLoggedIn(true);
AppSharedPreferences.setUserProfile(eventObject.object);
globalKey.currentState.showSnackBar(new SnackBar(
content: new Text(AppLocalizations.of(context).loginsuccessful),
));
progressDialog.hideProgress();
_goToHomeScreen();
});
}
break;
case EventConstants.LOGIN_USER_UN_SUCCESSFUL:
{
setState(() {
globalKey.currentState.showSnackBar(new SnackBar(
content: new Text(AppLocalizations.of(context).loginunsuccessful),
));
progressDialog.hideProgress();
});
}
break;
case EventConstants.NO_INTERNET_CONNECTION:
{
setState(() {
globalKey.currentState.showSnackBar(new SnackBar(
content: new Text(AppLocalizations.of(context).nointernet),
));
progressDialog.hideProgress();
});
}
break;
}
}
//------------------------------------------------------------------------------
void _goToHomeScreen() {
Navigator.pushReplacement(
context,
new MaterialPageRoute(builder: (context) => new HomePage()),
);
}
//------------------------------------------------------------------------------
void _goToRegisterScreen() {
Navigator.pushReplacement(
context,
new MaterialPageRoute(builder: (context) => new RegisterPage()),
);
}
//------------------------------------------------------------------------------
}
| 39.064057 | 170 | 0.488476 |
9885f3fee69ef3ec0821d35afafbf53d4f1488a6 | 5,405 | html | HTML | app/main/templates/scores.html | dbilenkin/superset | 06352b082ca736f815c7f97a20c533aee8da52f8 | [
"BSD-Source-Code"
] | null | null | null | app/main/templates/scores.html | dbilenkin/superset | 06352b082ca736f815c7f97a20c533aee8da52f8 | [
"BSD-Source-Code"
] | null | null | null | app/main/templates/scores.html | dbilenkin/superset | 06352b082ca736f815c7f97a20c533aee8da52f8 | [
"BSD-Source-Code"
] | null | null | null | <ion-view view-title="Scores">
<!-- do you want padding -->
<div class="bar bar-header bar-light">
<button class="button button-clear icon-left ion-arrow-left-b pull-left" ui-sref="start"></button>
<h1 ng-if="$ctrl.setType != ''" class="title">{{$ctrl.setType | uppercase}} {{$ctrl.cardsPerSet}} Scores</h1>
<h1 ng-if="$ctrl.setType == ''" class="title">RACE Scores</h1>
</div>
<ion-pane>
<ion-content class="has-header" has-bouncing="false">
<div class="button-bar">
<a grouped-radio="'race'" ng-model="$ctrl.gameMode">Race</a>
<a grouped-radio="'time trial'" ng-model="$ctrl.gameMode">Time Trial</a>
</div>
<div class="button-bar" ng-if="$ctrl.gameMode == 'time trial'">
<a grouped-radio="'3'" ng-model="$ctrl.cardsPerSet">3</a>
<a grouped-radio="'4'" ng-model="$ctrl.cardsPerSet">4</a>
<a grouped-radio="'5'" ng-model="$ctrl.cardsPerSet">5</a>
</div>
<div class="button-bar" ng-if="$ctrl.gameMode == 'time trial'">
<a grouped-radio="'Subset'" ng-model="$ctrl.setType">Subset</a>
<a grouped-radio="'Set'" ng-model="$ctrl.setType">Set</a>
<a grouped-radio="'Superset'" ng-model="$ctrl.setType">Superset</a>
</div>
<!-- <div class="row">
<div class="col-25">
<div class="item item-divider">
cards
</div>
<ion-radio ng-disabled="$ctrl.gameMode == 'levels'" name="cardsPerSet" ng-model="$ctrl.cardsPerSet" ng-value="'3'">3</ion-radio>
<ion-radio ng-disabled="$ctrl.gameMode == 'levels'" name="cardsPerSet" ng-model="$ctrl.cardsPerSet" ng-value="'4'">4</ion-radio>
<ion-radio ng-disabled="$ctrl.gameMode == 'levels'" name="cardsPerSet" ng-model="$ctrl.cardsPerSet" ng-value="'5'">5</ion-radio>
</div>
<div class="col">
<div class="item item-divider">
attributes
</div>
<ion-radio ng-disabled="$ctrl.gameMode == 'levels'" name="setType" ng-model="$ctrl.setType" ng-value="'Subset'">Subset</ion-radio>
<ion-radio ng-disabled="$ctrl.gameMode == 'levels'" name="setType" ng-model="$ctrl.setType" ng-value="'Set'">Set</ion-radio>
<ion-radio ng-disabled="$ctrl.gameMode == 'levels'" name="setType" ng-model="$ctrl.setType" ng-value="'Superset'">Superset</ion-radio>
</div>
<div class="col">
<div class="item item-divider">
game type
</div>
<ion-radio name="gameMode" ng-model="$ctrl.gameMode" ng-value="'levels'">Levels</ion-radio>
<ion-radio name="gameMode" ng-model="$ctrl.gameMode" ng-value="'timed'">Time Trial</ion-radio>
<ion-radio name="gameMode" ng-model="$ctrl.gameMode" ng-value="'marathon'">Marathon</ion-radio>
</div>
</div> -->
<ion-scroll has-bouncing="false" style="height: {{$ctrl.scoreHeight}}px;">
<div class="row scoreItem" ng-if="$ctrl.scores.length == 0">
<div class="col">
You haven't played this game type yet.
</div>
</div>
<div class="row scoreHeader" ng-if="$ctrl.scores.length > 0">
<div class="col-10">
</div>
<div class="col" style="text-align: right;">
points
</div>
<div class="col" style="text-align: right;" ng-show="$ctrl.gameMode == 'race'">
level
</div>
<div class="col" style="text-align: right;">
sets
</div>
</div>
<div ng-class="{'selectedScore': gameScoreId == score.id}" class="row scoreItem" ng-repeat="score in $ctrl.scores track by $index">
<div class="col-10">
{{$index + 1}}
</div>
<div class="col" style="text-align: right;">
{{score.points}}
</div>
<div class="col" style="text-align: right;" ng-show="$ctrl.gameMode == 'race'">
{{score.level}}
</div>
<div class="col" style="text-align: right;">
{{score.sets}}
</div>
</div>
</ion-scroll>
</ion-content>
</ion-pane>
<div class="bar bar-footer bar-light">
<div style="text-align: left" class="col">
<a style="font-size: 20px;" class="button button-clear button-energized" ng-click="$ctrl.resetScores()">
Reset Scores
</a>
</div>
<div style="text-align: right" class="col">
<a style="font-size: 20px;" class="button button-clear button-assertive" ng-click="$ctrl.resetAll()">
Reset All
</a>
</div>
</div>
</ion-view> | 44.303279 | 154 | 0.474191 |
a0003a3dc5a3d5bf0179c67da80ff762f5b21bd4 | 1,286 | ps1 | PowerShell | src/CommandLineTool/Log4ShellDetection/Publish.ps1 | Ryan2065/Log4ShellDetection | a8f7ce65fe70f0dfbc49936c8bfaaf485d5dc003 | [
"MIT"
] | 6 | 2022-01-02T10:55:42.000Z | 2022-02-07T08:43:14.000Z | src/CommandLineTool/Log4ShellDetection/Publish.ps1 | Ryan2065/Log4ShellDetection | a8f7ce65fe70f0dfbc49936c8bfaaf485d5dc003 | [
"MIT"
] | 3 | 2022-01-14T21:32:25.000Z | 2022-02-01T12:52:49.000Z | src/CommandLineTool/Log4ShellDetection/Publish.ps1 | Ryan2065/Log4ShellDetection | a8f7ce65fe70f0dfbc49936c8bfaaf485d5dc003 | [
"MIT"
] | 1 | 2022-01-05T18:31:15.000Z | 2022-01-05T18:31:15.000Z | Push-Location "$PSScriptRoot\Log4ShellDetection"
$RIDs = @(
'',
'win-x86',
'linux-x64',
'osx-x64'
)
#Windows x64
#cmd /c dotnet publish -r win-x64 -c Release --self-contained true -o "$PSScriptRoot\Log4ShellDetection\bin\Publish\win-x64"
#cmd /c "$PSScriptRoot\Log4ShellDetection\bin\Publish\win-x64\Log4ShellDetection.exe"
#Linux x64
#c/users/ryan2/onedrive/code/log4shelldetection/src/commandlinetool/log4shelldetection/log4shelldetection
$LinuxPath = "/mnt/" + $PSScriptRoot.ToLower().Replace(":","").Replace("\","/") + "/Log4ShellDetection"
$shScript = @()
$shScript += "cd $LinuxPath"
$shScript += "dotnet publish -r linux-x64 -c Release --self-contained true -o $LinuxPath/bin/publish/linux-x64"
$shScript += "cd $LinuxPath/bin/publish/linux-x64"
$shScript += "strip $linuxpath/bin/publish/linux-x64/log4shelldetection"
$shScript += ""
$FilePath = "$PSScriptRoot\Log4ShellDetection\bin\buildlinux.sh"
if(Test-Path $FilePath ){
Remove-Item $FilePath -Force
}
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
[System.IO.File]::WriteAllLines($FilePath, ( $shScript -join "`n" ), $Utf8NoBomEncoding)
cmd /c wsl sh "$LinuxPath/bin/buildlinux.sh"
cmd /c wsl "$linuxpath/bin/publish/linux-x64/log4shelldetection" -ep /mnt/c
Pop-Location | 32.15 | 124 | 0.726283 |
b14d3dac6cc1790cbb71f88635b986748144d5fd | 3,942 | h | C | src/lib/autofill/passwordbackends/databaseencryptedpasswordbackend.h | pejakm/qupzilla | c1901cd81d9d3488a7dc1f25b777fb56f67cb39e | [
"BSD-3-Clause"
] | 1 | 2016-07-11T14:38:45.000Z | 2016-07-11T14:38:45.000Z | src/lib/autofill/passwordbackends/databaseencryptedpasswordbackend.h | pejakm/qupzilla | c1901cd81d9d3488a7dc1f25b777fb56f67cb39e | [
"BSD-3-Clause"
] | null | null | null | src/lib/autofill/passwordbackends/databaseencryptedpasswordbackend.h | pejakm/qupzilla | c1901cd81d9d3488a7dc1f25b777fb56f67cb39e | [
"BSD-3-Clause"
] | null | null | null | /* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2013-2014 S. Razi Alavizadeh <s.r.alavizadeh@gmail.com>
* Copyright (C) 2013-2014 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* ============================================================ */
#ifndef DATABASEENCRYPTEDPASSWORDBACKEND_H
#define DATABASEENCRYPTEDPASSWORDBACKEND_H
#include "passwordbackend.h"
#include "qzcommon.h"
#include <QDialog>
class AesInterface;
class MasterPasswordDialog;
class QUPZILLA_EXPORT DatabaseEncryptedPasswordBackend : public PasswordBackend
{
public:
enum MasterPasswordState {
PasswordIsSetted,
PasswordIsNotSetted,
UnKnownState = -1
};
explicit DatabaseEncryptedPasswordBackend();
~DatabaseEncryptedPasswordBackend();
QVector<PasswordEntry> getEntries(const QUrl &url);
QVector<PasswordEntry> getAllEntries();
void setActive(bool active);
void addEntry(const PasswordEntry &entry);
bool updateEntry(const PasswordEntry &entry);
void updateLastUsed(PasswordEntry &entry);
void removeEntry(const PasswordEntry &entry);
void removeAll();
QString name() const;
bool hasSettings() const;
void showSettings(QWidget* parent);
bool isMasterPasswordSetted();
QByteArray masterPassword() const;
bool hasPermission();
bool isPasswordVerified(const QByteArray &password);
bool decryptPasswordEntry(PasswordEntry &entry, AesInterface* aesInterface);
bool encryptPasswordEntry(PasswordEntry &entry, AesInterface* aesInterface);
void tryToChangeMasterPassword(const QByteArray &newPassword);
void removeMasterPassword();
void setAskMasterPasswordState(bool ask);
void encryptDataBaseTableOnFly(const QByteArray &decryptorPassword,
const QByteArray &encryptorPassword);
void updateSampleData(const QByteArray &password);
void showMasterPasswordDialog();
private:
QByteArray someDataFromDatabase();
MasterPasswordState m_stateOfMasterPassword;
QByteArray m_someDataStoredOnDataBase;
bool m_askPasswordDialogVisible;
bool m_askMasterPassword;
QByteArray m_masterPassword;
};
namespace Ui
{
class MasterPasswordDialog;
}
class MasterPasswordDialog : public QDialog
{
Q_OBJECT
public:
explicit MasterPasswordDialog(DatabaseEncryptedPasswordBackend* backend, QWidget* parent = 0);
~MasterPasswordDialog();
void delayedExec();
public slots:
void accept();
void reject();
void showSettingPage();
void showSetMasterPasswordPage();
void clearMasterPasswordAndConvert(bool forcedAskPass = true);
bool samePasswordEntry(const PasswordEntry &entry1, const PasswordEntry &entry2);
private:
Ui::MasterPasswordDialog* ui;
DatabaseEncryptedPasswordBackend* m_backend;
};
class QDialogButtonBox;
class QLineEdit;
class QLabel;
class AskMasterPassword : public QDialog
{
Q_OBJECT
public:
explicit AskMasterPassword(DatabaseEncryptedPasswordBackend* backend, QWidget* parent = 0);
private slots:
void verifyPassword();
private:
DatabaseEncryptedPasswordBackend* m_backend;
QDialogButtonBox* m_buttonBox;
QLineEdit* m_lineEdit;
QLabel* m_labelWarning;
};
#endif // DATABASEENCRYPTEDPASSWORDBACKEND_H
| 27.760563 | 98 | 0.731355 |
27af40f0dbed92d45797ec0087598cde9ed7efc2 | 898 | sql | SQL | public/examples/assets/databases/users.mysql.sql | nicksagona/popphp-v1-legacy | 6628010de88452514be135404d5ab3aa8725c15b | [
"PHP-3.0",
"PHP-3.01"
] | 3 | 2017-03-07T18:59:41.000Z | 2019-12-18T03:38:31.000Z | public/examples/assets/databases/users.mysql.sql | nicksagona/popphp-v1-legacy | 6628010de88452514be135404d5ab3aa8725c15b | [
"PHP-3.0",
"PHP-3.01"
] | null | null | null | public/examples/assets/databases/users.mysql.sql | nicksagona/popphp-v1-legacy | 6628010de88452514be135404d5ab3aa8725c15b | [
"PHP-3.0",
"PHP-3.01"
] | null | null | null | --
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`id` int(16) NOT NULL AUTO_INCREMENT,
`username` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`access` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`username`, `password`, `email`, `access`) VALUES
('test1', 'password1', 'test1@test.com', 'reader'),
('test2', 'password2', 'test2@test.com', 'editor'),
('test3', 'password3', 'test3@test.com', 'publisher'),
('test4', 'password4', 'test4@test.com', 'admin'),
('test5', 'password5', 'test5@test.com', 'reader'),
('test6', 'password6', 'test6@test.com', 'editor'),
('test7', 'password7', 'test7@test.com', 'publisher'),
('test8', 'password8', 'test8@test.com', 'admin'); | 35.92 | 70 | 0.654788 |
c5666359e5382e2ffe09d3008ebd8b58810e323e | 23,353 | cpp | C++ | Source/UEImgui/Private/ImguiWrap/ImguiUEWrap.cpp | ZhuRong-HomoStation/UEImgui | a4cf1fb940d3898a3ed6c48648f8ab2e6739975a | [
"MIT"
] | 36 | 2020-12-25T05:57:39.000Z | 2022-03-15T16:09:16.000Z | Source/UEImgui/Private/ImguiWrap/ImguiUEWrap.cpp | zhurongjun/UEImgui | a4cf1fb940d3898a3ed6c48648f8ab2e6739975a | [
"MIT"
] | 11 | 2020-12-31T14:03:14.000Z | 2021-03-05T07:19:06.000Z | Source/UEImgui/Private/ImguiWrap/ImguiUEWrap.cpp | zhurongjun/UEImgui | a4cf1fb940d3898a3ed6c48648f8ab2e6739975a | [
"MIT"
] | 10 | 2020-12-24T07:14:38.000Z | 2022-03-15T06:45:08.000Z | #include "ImguiWrap/ImguiUEWrap.h"
#include "imgui.h"
#include "imgui_internal.h"
#include "Config/ImguiConfig.h"
#include "Engine/TextureRenderTarget2D.h"
#include "GenericPlatform/ITextInputMethodSystem.h"
#include "ImguiWrap/ImguiResourceManager.h"
#include "ImguiWrap/ImguiTextInputSystem.h"
#include "Extension/UEImguiDetail.h"
#include "Widgets/SImguiWidget.h"
static void _HelpMarker(const char* desc)
{
ImGui::TextDisabled("(?)");
if (ImGui::IsItemHovered())
{
ImGui::BeginTooltip();
ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f);
ImGui::TextUnformatted(desc);
ImGui::PopTextWrapPos();
ImGui::EndTooltip();
}
}
using ImPropertyDisplayFunction = bool(*)(FProperty*, void*);
// detail
FName CurrentDetail;
TWeakPtr<SImguiRenderProxy> CurrentDetailWidget;
void ImGui::StyleColorUE(ImGuiStyle* dst)
{
ImGuiStyle* CurStyle = dst ? dst : &ImGui::GetStyle();
ImVec4* colors = CurStyle->Colors;
// color settings
colors[ImGuiCol_Text] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
colors[ImGuiCol_WindowBg] = ImVec4(0.13f, 0.13f, 0.13f, 1.00f);
colors[ImGuiCol_ChildBg] = ImVec4(0.13f, 0.13f, 0.13f, 1.00f);
colors[ImGuiCol_PopupBg] = ImVec4(0.08f, 0.08f, 0.08f, 0.94f);
colors[ImGuiCol_Border] = ImVec4(0.43f, 0.43f, 0.50f, 0.50f);
colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_FrameBg] = ImVec4(0.33f, 0.33f, 0.33f, 1.00f);
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.19f, 0.19f, 0.19f, 1.00f);
colors[ImGuiCol_FrameBgActive] = ImVec4(0.56f, 0.56f, 0.56f, 1.00f);
colors[ImGuiCol_TitleBg] = ImVec4(0.13f, 0.13f, 0.13f, 1.00f);
colors[ImGuiCol_TitleBgActive] = ImVec4(0.33f, 0.33f, 0.33f, 1.00f);
colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.13f, 0.13f, 0.13f, 1.00f);
colors[ImGuiCol_MenuBarBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.00f);
colors[ImGuiCol_ScrollbarBg] = ImVec4(0.02f, 0.02f, 0.02f, 0.53f);
colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.41f, 0.41f, 0.41f, 1.00f);
colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.51f, 0.51f, 0.51f, 1.00f);
colors[ImGuiCol_CheckMark] = ImVec4(0.04f, 0.04f, 0.04f, 1.00f);
colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0.80f, 0.80f, 1.00f);
colors[ImGuiCol_SliderGrabActive] = ImVec4(0.02f, 0.02f, 0.02f, 1.00f);
colors[ImGuiCol_Button] = ImVec4(0.33f, 0.33f, 0.33f, 1.00f);
colors[ImGuiCol_ButtonHovered] = ImVec4(0.27f, 0.27f, 0.27f, 1.00f);
colors[ImGuiCol_ButtonActive] = ImVec4(0.15f, 0.15f, 0.15f, 1.00f);
colors[ImGuiCol_Header] = ImVec4(0.28f, 0.28f, 0.28f, 1.00f);
colors[ImGuiCol_HeaderHovered] = ImVec4(0.50f, 0.50f, 0.50f, 0.80f);
colors[ImGuiCol_HeaderActive] = ImVec4(0.67f, 0.67f, 0.67f, 1.00f);
colors[ImGuiCol_Separator] = ImVec4(0.43f, 0.43f, 0.50f, 0.50f);
colors[ImGuiCol_SeparatorHovered] = ImVec4(0.10f, 0.40f, 0.75f, 0.78f);
colors[ImGuiCol_SeparatorActive] = ImVec4(0.10f, 0.40f, 0.75f, 1.00f);
colors[ImGuiCol_ResizeGrip] = ImVec4(0.80f, 0.80f, 0.80f, 1.00f);
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.87f, 0.87f, 0.87f, 1.00f);
colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_Tab] = ImVec4(0.31f, 0.31f, 0.31f, 1.00f);
colors[ImGuiCol_TabHovered] = ImVec4(0.38f, 0.38f, 0.38f, 1.00f);
colors[ImGuiCol_TabActive] = ImVec4(0.47f, 0.47f, 0.47f, 1.00f);
colors[ImGuiCol_TabUnfocused] = ImVec4(0.07f, 0.10f, 0.15f, 0.97f);
colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.14f, 0.26f, 0.42f, 1.00f);
colors[ImGuiCol_PlotLines] = ImVec4(0.61f, 0.61f, 0.61f, 1.00f);
colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f);
colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f);
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
colors[ImGuiCol_NavHighlight] = ImVec4(0.26f, 0.59f, 0.98f, 1.00f);
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f);
colors[ImGuiCol_DockingPreview] = ImVec4(1.00f, 1.00f, 1.00f, 0.50f);
colors[ImGuiCol_TabUnfocused] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.15f, 0.15f, 0.15f, 1.00f);
// other settings
CurStyle->ChildRounding = 0;
CurStyle->FrameRounding = 0;
CurStyle->PopupRounding = 0;
CurStyle->ScrollbarRounding = 0;
CurStyle->WindowRounding = 0;
}
void ImGui::StyleColorConfig(ImGuiStyle* dst)
{
ImGuiStyle* CurStyle = dst ? dst : &ImGui::GetStyle();
ImVec4* colors = CurStyle->Colors;
FMemory::Memcpy(colors ,UImguiConfig::Get()->ImguiColors.GetData(), ImGuiCol_COUNT * sizeof(ImVec4));
FMemory::Memcpy(CurStyle, &UImguiConfig::Get()->ImguiStyle, sizeof(FImguiStyle));
}
void ImGui::SetCurrentDetail(FName InDetailName)
{
CurrentDetail = InDetailName;
}
void ImGui::SetCurrentDetailWidget(TWeakPtr<SImguiRenderProxy> InDetailWidget)
{
CurrentDetailWidget = InDetailWidget;
}
FName ImGui::GetCurrentDetail()
{
return CurrentDetail;
}
void ImGui::BeginDetail()
{
if (CurrentDetailWidget.IsValid())
{
FVector2D CurrentDetailSize = CurrentDetailWidget.Pin()->GetCachedGeometry().Size;
ImGui::SetNextWindowSizeConstraints({CurrentDetailSize.X, -1}, {CurrentDetailSize.X, -1});
}
ImGui::Begin(TCHAR_TO_UTF8(*CurrentDetail.ToString()), nullptr, ImGuiWindowFlags_UEDetail);
}
void ImGui::EndDetail()
{
ImGui::End();
}
void ImGui::Text(const FString& InString)
{
ImGui::Text(TCHAR_TO_UTF8(*InString));
}
struct InputTextCallback_UserData
{
std::string* Str;
ImGuiInputTextCallback ChainCallback;
void* ChainCallbackUserData;
};
static int InputTextCallback(ImGuiInputTextCallbackData* data)
{
InputTextCallback_UserData* user_data = (InputTextCallback_UserData*)data->UserData;
if (data->EventFlag == ImGuiInputTextFlags_CallbackResize)
{
// Resize string callback
// If for some reason we refuse the new length (BufTextLen) and/or capacity (BufSize) we need to set them back to what we want.
std::string* str = user_data->Str;
// assert(data->Buf == str->c_str());
str->resize(data->BufTextLen);
data->Buf = (char*)str->c_str();
}
else if (user_data->ChainCallback)
{
// Forward to user callback, if any
data->UserData = user_data->ChainCallbackUserData;
return user_data->ChainCallback(data);
}
return 0;
}
bool ImGui::InputText(const char* label, std::string* str, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback,
void* user_data)
{
IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0);
flags |= ImGuiInputTextFlags_CallbackResize;
InputTextCallback_UserData cb_user_data;
cb_user_data.Str = str;
cb_user_data.ChainCallback = callback;
cb_user_data.ChainCallbackUserData = user_data;
return InputText(label, (char*)str->c_str(), str->capacity() + 1, flags, InputTextCallback, &cb_user_data);
}
bool ImGui::InputTextMultiline(const char* label, std::string* str, const ImVec2& size, ImGuiInputTextFlags flags,
ImGuiInputTextCallback callback, void* user_data)
{
IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0);
flags |= ImGuiInputTextFlags_CallbackResize;
InputTextCallback_UserData cb_user_data;
cb_user_data.Str = str;
cb_user_data.ChainCallback = callback;
cb_user_data.ChainCallbackUserData = user_data;
return InputTextMultiline(label, (char*)str->c_str(), str->capacity() + 1, size, flags, InputTextCallback, &cb_user_data);
}
bool ImGui::InputTextWithHint(const char* label, const char* hint, std::string* str, ImGuiInputTextFlags flags,
ImGuiInputTextCallback callback, void* user_data)
{
IM_ASSERT((flags & ImGuiInputTextFlags_CallbackResize) == 0);
flags |= ImGuiInputTextFlags_CallbackResize;
InputTextCallback_UserData cb_user_data;
cb_user_data.Str = str;
cb_user_data.ChainCallback = callback;
cb_user_data.ChainCallbackUserData = user_data;
return InputTextWithHint(label, hint, (char*)str->c_str(), str->capacity() + 1, flags, InputTextCallback, &cb_user_data);
}
bool ImGui::UEColor(const char* InLabel, FColor* InColor, ImGuiColorEditFlags InFlags)
{
FLinearColor Color(InColor->R / 255.0f, InColor->G / 255.0f, InColor->B / 255.0f, InColor->A / 255.0f);
bool bHasChanged = ImGui::ColorEdit4(InLabel, (float*)&Color, InFlags);
InColor->R = (uint8)Color.R * 255.f;
InColor->G = (uint8)Color.G * 255.f;
InColor->B = (uint8)Color.B * 255.f;
InColor->A = (uint8)Color.A * 255.f;
return bHasChanged;
}
bool ImGui::UEColor(const char* InLabel, FLinearColor* InColor, ImGuiColorEditFlags InFlags)
{
return ImGui::ColorEdit4(InLabel, (float*)&InColor, InFlags);
}
bool ImGui::UEEnum(const char* InLabel, UEnum* InEnumClass, int64* EnumSource)
{
static std::string ComboString;
// build combo list
if (ComboString.size() == 0)
{
int32 EnumNum = InEnumClass->NumEnums() - 1;
for (int32 i = 0; i < EnumNum; ++i)
{
FString Name = InEnumClass->GetDisplayNameTextByIndex(i).ToString();
ComboString += TCHAR_TO_UTF8(*Name);
ComboString += '\0';
}
}
int ComboIndex = InEnumClass->GetIndexByValue(*EnumSource);
bool bHasChanged = Combo(InLabel, &ComboIndex, ComboString.c_str());
*EnumSource = InEnumClass->GetValueByIndex(ComboIndex);
return bHasChanged;
}
bool ImGui::UEStruct(UScriptStruct* InStruct, void* InValue)
{
FUEImguiDetail& Maker = GlobalDetailMaker();
return Maker.MakeDetail(InStruct, InValue);
}
bool ImGui::UEObject(UClass* InClass, void* InValue)
{
FUEImguiDetail& Maker = GlobalDetailMaker();
return Maker.MakeDetail(InClass, InValue);
}
bool ImGui::UEProperty(FProperty* InProperty, void* InContainer)
{
FUEImguiDetail& Maker = GlobalDetailMaker();
return Maker.MakeDetail(InProperty, InContainer);
}
FUEImguiDetail& ImGui::GlobalDetailMaker()
{
static FUEImguiDetail DetailMaker;
return DetailMaker;
}
bool ImGui::ShowUEStyleSelector(const char* Label)
{
static int StyleIdx = 4;
if (ImGui::Combo(Label, &StyleIdx, "Classic\0Dark\0Light\0Unreal\0Config\0"))
{
switch (StyleIdx)
{
case 0: ImGui::StyleColorsClassic(); break;
case 1: ImGui::StyleColorsDark(); break;
case 2: ImGui::StyleColorsLight(); break;
case 3: ImGui::StyleColorUE(); break;
case 4: ImGui::StyleColorConfig(); break;
}
return true;
}
return false;
}
void ImGui::ShowUEStyleEditor()
{
UImguiConfig* Config = UImguiConfig::Get();
ImGuiStyle& CurStyle = ImGui::GetStyle();
// Style selector
ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.50f);
static int StyleIdx = 4;
if (ImGui::Combo("Colors##Style", &StyleIdx, "Classic\0Dark\0Light\0Unreal\0Config\0"))
{
switch (StyleIdx)
{
case 0: ImGui::StyleColorsClassic(); break;
case 1: ImGui::StyleColorsDark(); break;
case 2: ImGui::StyleColorsLight(); break;
case 3: ImGui::StyleColorUE(); break;
case 4: ImGui::StyleColorConfig(); break;
}
}
// Save buttons
if (ImGui::Button("Save to config"))
{
Config->SetStyle(&ImGui::GetStyle());
Config->SaveConfig();
}
ImGui::SameLine();
if (ImGui::Button("Revert"))
{
switch (StyleIdx)
{
case 0: ImGui::StyleColorsClassic(); break;
case 1: ImGui::StyleColorsDark(); break;
case 2: ImGui::StyleColorsLight(); break;
case 3: ImGui::StyleColorUE(); break;
case 4: ImGui::StyleColorConfig(); break;
}
}
ImGui::SameLine();
_HelpMarker("please save every thing after modify!!!!");
ImGui::Separator();
// TabBar
if (ImGui::BeginTabBar("##tabs", ImGuiTabBarFlags_None))
{
if (ImGui::BeginTabItem("Sizes"))
{
ImGui::Text("Main");
ImGui::SliderFloat2("WindowPadding", (float*)&CurStyle.WindowPadding, 0.0f, 20.0f, "%.0f");
ImGui::SliderFloat2("FramePadding", (float*)&CurStyle.FramePadding, 0.0f, 20.0f, "%.0f");
ImGui::SliderFloat2("CellPadding", (float*)&CurStyle.CellPadding, 0.0f, 20.0f, "%.0f");
ImGui::SliderFloat2("ItemSpacing", (float*)&CurStyle.ItemSpacing, 0.0f, 20.0f, "%.0f");
ImGui::SliderFloat2("ItemInnerSpacing", (float*)&CurStyle.ItemInnerSpacing, 0.0f, 20.0f, "%.0f");
ImGui::SliderFloat2("TouchExtraPadding", (float*)&CurStyle.TouchExtraPadding, 0.0f, 10.0f, "%.0f");
ImGui::SliderFloat("IndentSpacing", &CurStyle.IndentSpacing, 0.0f, 30.0f, "%.0f");
ImGui::SliderFloat("ScrollbarSize", &CurStyle.ScrollbarSize, 1.0f, 20.0f, "%.0f");
ImGui::SliderFloat("GrabMinSize", &CurStyle.GrabMinSize, 1.0f, 20.0f, "%.0f");
ImGui::Text("Borders");
ImGui::SliderFloat("WindowBorderSize", &CurStyle.WindowBorderSize, 0.0f, 1.0f, "%.0f");
ImGui::SliderFloat("ChildBorderSize", &CurStyle.ChildBorderSize, 0.0f, 1.0f, "%.0f");
ImGui::SliderFloat("PopupBorderSize", &CurStyle.PopupBorderSize, 0.0f, 1.0f, "%.0f");
ImGui::SliderFloat("FrameBorderSize", &CurStyle.FrameBorderSize, 0.0f, 1.0f, "%.0f");
ImGui::SliderFloat("TabBorderSize", &CurStyle.TabBorderSize, 0.0f, 1.0f, "%.0f");
ImGui::Text("Rounding");
ImGui::SliderFloat("WindowRounding", &CurStyle.WindowRounding, 0.0f, 12.0f, "%.0f");
ImGui::SliderFloat("ChildRounding", &CurStyle.ChildRounding, 0.0f, 12.0f, "%.0f");
ImGui::SliderFloat("FrameRounding", &CurStyle.FrameRounding, 0.0f, 12.0f, "%.0f");
ImGui::SliderFloat("PopupRounding", &CurStyle.PopupRounding, 0.0f, 12.0f, "%.0f");
ImGui::SliderFloat("ScrollbarRounding", &CurStyle.ScrollbarRounding, 0.0f, 12.0f, "%.0f");
ImGui::SliderFloat("GrabRounding", &CurStyle.GrabRounding, 0.0f, 12.0f, "%.0f");
ImGui::SliderFloat("LogSliderDeadzone", &CurStyle.LogSliderDeadzone, 0.0f, 12.0f, "%.0f");
ImGui::SliderFloat("TabRounding", &CurStyle.TabRounding, 0.0f, 12.0f, "%.0f");
ImGui::Text("Alignment");
ImGui::SliderFloat2("WindowTitleAlign", (float*)&CurStyle.WindowTitleAlign, 0.0f, 1.0f, "%.2f");
int window_menu_button_position = CurStyle.WindowMenuButtonPosition + 1;
if (ImGui::Combo("WindowMenuButtonPosition", (int*)&window_menu_button_position, "None\0Left\0Right\0"))
CurStyle.WindowMenuButtonPosition = window_menu_button_position - 1;
ImGui::Combo("ColorButtonPosition", (int*)&CurStyle.ColorButtonPosition, "Left\0Right\0");
ImGui::SliderFloat2("ButtonTextAlign", (float*)&CurStyle.ButtonTextAlign, 0.0f, 1.0f, "%.2f");
ImGui::SameLine(); _HelpMarker("Alignment applies when a button is larger than its text content.");
ImGui::SliderFloat2("SelectableTextAlign", (float*)&CurStyle.SelectableTextAlign, 0.0f, 1.0f, "%.2f");
ImGui::SameLine(); _HelpMarker("Alignment applies when a selectable is larger than its text content.");
ImGui::Text("Safe Area Padding");
ImGui::SameLine(); _HelpMarker("Adjust if you cannot see the edges of your screen (e.g. on a TV where scaling has not been configured).");
ImGui::SliderFloat2("DisplaySafeAreaPadding", (float*)&CurStyle.DisplaySafeAreaPadding, 0.0f, 30.0f, "%.0f");
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Colors"))
{
static ImGuiTextFilter filter;
filter.Draw("Filter colors", ImGui::GetFontSize() * 16);
static ImGuiColorEditFlags alpha_flags = 0;
if (ImGui::RadioButton("Opaque", alpha_flags == ImGuiColorEditFlags_None)) { alpha_flags = ImGuiColorEditFlags_None; } ImGui::SameLine();
if (ImGui::RadioButton("Alpha", alpha_flags == ImGuiColorEditFlags_AlphaPreview)) { alpha_flags = ImGuiColorEditFlags_AlphaPreview; } ImGui::SameLine();
if (ImGui::RadioButton("Both", alpha_flags == ImGuiColorEditFlags_AlphaPreviewHalf)) { alpha_flags = ImGuiColorEditFlags_AlphaPreviewHalf; } ImGui::SameLine();
_HelpMarker(
"In the color list:\n"
"Left-click on color square to open color picker,\n"
"Right-click to open edit options menu.");
ImGui::BeginChild("##colors", ImVec2(0, 0), true, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_AlwaysHorizontalScrollbar | ImGuiWindowFlags_NavFlattened);
ImGui::PushItemWidth(-160);
for (int i = 0; i < ImGuiCol_COUNT; i++)
{
const char* name = ImGui::GetStyleColorName(i);
if (!filter.PassFilter(name))
continue;
ImGui::PushID(i);
ImGui::ColorEdit4("##color", (float*)&CurStyle.Colors[i], ImGuiColorEditFlags_AlphaBar | alpha_flags);
if (memcmp(&CurStyle.Colors[i], &Config->ImguiColors[i], sizeof(ImVec4)) != 0)
{
// Tips: in a real user application, you may want to merge and use an icon font into the main font,
// so instead of "Save"/"Revert" you'd use icons!
// Read the FAQ and docs/FONTS.md about using icon fonts. It's really easy and super convenient!
ImGui::SameLine(0.0f, CurStyle.ItemInnerSpacing.x); if (ImGui::Button("Save")) { Config->ImguiColors[i] = *(FLinearColor*)&CurStyle.Colors[i]; }
ImGui::SameLine(0.0f, CurStyle.ItemInnerSpacing.x); if (ImGui::Button("Revert")) { CurStyle.Colors[i] = *(ImVec4*)&Config->ImguiColors[i]; }
}
ImGui::SameLine(0.0f, CurStyle.ItemInnerSpacing.x);
ImGui::TextUnformatted(name);
ImGui::PopID();
}
ImGui::PopItemWidth();
ImGui::EndChild();
ImGui::EndTabItem();
}
// if (ImGui::BeginTabItem("Fonts"))
// {
// ImGuiIO& io = ImGui::GetIO();
// ImFontAtlas* atlas = io.Fonts;
// _HelpMarker("Read FAQ and docs/FONTS.md for details on font loading.");
// ImGui::PushItemWidth(120);
// for (int i = 0; i < atlas->Fonts.Size; i++)
// {
// ImFont* font = atlas->Fonts[i];
// ImGui::PushID(font);
// NodeFont(font);
// ImGui::PopID();
// }
// if (ImGui::TreeNode("Atlas texture", "Atlas texture (%dx%d pixels)", atlas->TexWidth, atlas->TexHeight))
// {
// ImVec4 tint_col = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
// ImVec4 border_col = ImVec4(1.0f, 1.0f, 1.0f, 0.5f);
// ImGui::Image(atlas->TexID, ImVec2((float)atlas->TexWidth, (float)atlas->TexHeight), ImVec2(0, 0), ImVec2(1, 1), tint_col, border_col);
// ImGui::TreePop();
// }
//
// // Post-baking font scaling. Note that this is NOT the nice way of scaling fonts, read below.
// // (we enforce hard clamping manually as by default DragFloat/SliderFloat allows CTRL+Click text to get out of bounds).
// const float MIN_SCALE = 0.3f;
// const float MAX_SCALE = 2.0f;
// _HelpMarker(
// "Those are old settings provided for convenience.\n"
// "However, the _correct_ way of scaling your UI is currently to reload your font at the designed size, "
// "rebuild the font atlas, and call CurStyle.ScaleAllSizes() on a reference ImGuiStyle structure.\n"
// "Using those settings here will give you poor quality results.");
// static float window_scale = 1.0f;
// if (ImGui::DragFloat("window scale", &window_scale, 0.005f, MIN_SCALE, MAX_SCALE, "%.2f", ImGuiSliderFlags_AlwaysClamp)) // Scale only this window
// ImGui::SetWindowFontScale(window_scale);
// ImGui::DragFloat("global scale", &io.FontGlobalScale, 0.005f, MIN_SCALE, MAX_SCALE, "%.2f", ImGuiSliderFlags_AlwaysClamp); // Scale everything
// ImGui::PopItemWidth();
//
// ImGui::EndTabItem();
// }
// if (ImGui::BeginTabItem("Rendering"))
// {
// ImGui::Checkbox("Anti-aliased lines", &CurStyle.AntiAliasedLines);
// ImGui::SameLine();
// HelpMarker("When disabling anti-aliasing lines, you'll probably want to disable borders in your CurStyle as well.");
//
// ImGui::Checkbox("Anti-aliased lines use texture", &CurStyle.AntiAliasedLinesUseTex);
// ImGui::SameLine();
// HelpMarker("Faster lines using texture data. Require backend to render with bilinear filtering (not point/nearest filtering).");
//
// ImGui::Checkbox("Anti-aliased fill", &CurStyle.AntiAliasedFill);
// ImGui::PushItemWidth(100);
// ImGui::DragFloat("Curve Tessellation Tolerance", &CurStyle.CurveTessellationTol, 0.02f, 0.10f, 10.0f, "%.2f");
// if (CurStyle.CurveTessellationTol < 0.10f) CurStyle.CurveTessellationTol = 0.10f;
//
// // When editing the "Circle Segment Max Error" value, draw a preview of its effect on auto-tessellated circles.
// ImGui::DragFloat("Circle Segment Max Error", &CurStyle.CircleSegmentMaxError, 0.01f, 0.10f, 10.0f, "%.2f");
// if (ImGui::IsItemActive())
// {
// ImGui::SetNextWindowPos(ImGui::GetCursorScreenPos());
// ImGui::BeginTooltip();
// ImVec2 p = ImGui::GetCursorScreenPos();
// ImDrawList* draw_list = ImGui::GetWindowDrawList();
// float RAD_MIN = 10.0f, RAD_MAX = 80.0f;
// float off_x = 10.0f;
// for (int n = 0; n < 7; n++)
// {
// const float rad = RAD_MIN + (RAD_MAX - RAD_MIN) * (float)n / (7.0f - 1.0f);
// draw_list->AddCircle(ImVec2(p.x + off_x + rad, p.y + RAD_MAX), rad, ImGui::GetColorU32(ImGuiCol_Text), 0);
// off_x += 10.0f + rad * 2.0f;
// }
// ImGui::Dummy(ImVec2(off_x, RAD_MAX * 2.0f));
// ImGui::EndTooltip();
// }
// ImGui::SameLine();
// HelpMarker("When drawing circle primitives with \"num_segments == 0\" tesselation will be calculated automatically.");
//
// ImGui::DragFloat("Global Alpha", &CurStyle.Alpha, 0.005f, 0.20f, 1.0f, "%.2f"); // Not exposing zero here so user doesn't "lose" the UI (zero alpha clips all widgets). But application code could have a toggle to switch between zero and non-zero.
// ImGui::PopItemWidth();
//
// ImGui::EndTabItem();
// }
ImGui::EndTabBar();
}
ImGui::PopItemWidth();
}
| 45.790196 | 260 | 0.643814 |
0a239c01dba193be71dcc22997ba371566c50df1 | 3,336 | h | C | src/CCA/Components/MPM/Core/HydroMPMLabel.h | abagusetty/Uintah | fa1bf819664fa6f09c5a7cd076870a40816d35c9 | [
"MIT"
] | null | null | null | src/CCA/Components/MPM/Core/HydroMPMLabel.h | abagusetty/Uintah | fa1bf819664fa6f09c5a7cd076870a40816d35c9 | [
"MIT"
] | null | null | null | src/CCA/Components/MPM/Core/HydroMPMLabel.h | abagusetty/Uintah | fa1bf819664fa6f09c5a7cd076870a40816d35c9 | [
"MIT"
] | null | null | null | /*
* The MIT License
*
* Copyright (c) 1997-2021 The University of Utah
*
* 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 UINTAH_HOMEBREW_HydroMPMLABEL_H
#define UINTAH_HOMEBREW_HydroMPMLABEL_H
#include <vector>
namespace Uintah {
class VarLabel;
class HydroMPMLabel {
public:
HydroMPMLabel();
~HydroMPMLabel();
// Hydro-mechanical coupling
const VarLabel* ccPorosity;
const VarLabel* ccPorePressure;
const VarLabel* ccPorePressureOld;
const VarLabel* ccRHS_FlowEquation;
const VarLabel* ccTransmissivityMatrix;
const VarLabel* pFluidMassLabel;
const VarLabel* pFluidVelocityLabel;
const VarLabel* pFluidAccelerationLabel;
const VarLabel* pSolidMassLabel;
const VarLabel* pPorosityLabel;
const VarLabel* pPorosityLabel_preReloc;
const VarLabel* pPrescribedPorePressureLabel;
const VarLabel* pPorePressureLabel;
const VarLabel* pPorePressureFilterLabel;
const VarLabel* pStressRateLabel;
const VarLabel* pStressRateLabel_preReloc;
const VarLabel* gFluidMassBarLabel;
const VarLabel* gFluidMassLabel;
const VarLabel* gFluidVelocityLabel;
const VarLabel* FluidVelInc;
const VarLabel* gFluidVelocityStarLabel;
const VarLabel* gFluidAccelerationLabel;
const VarLabel* gInternalFluidForceLabel;
const VarLabel* gExternalFluidForceLabel;
const VarLabel* gInternalDragForceLabel;
const VarLabel* gFlowInertiaForceLabel;
const VarLabel* gPorePressureLabel;
const VarLabel* gPorePressureFilterLabel;
const VarLabel* pFluidMassLabel_preReloc;
const VarLabel* pFluidVelocityLabel_preReloc;
const VarLabel* pFluidAccelerationLabel_preReloc;
const VarLabel* pSolidMassLabel_preReloc;
const VarLabel* pPorePressureLabel_preReloc;
const VarLabel* pPorePressureFilterLabel_preReloc;
const VarLabel* gFluidMassBarLabel_preReloc;
const VarLabel* gFluidMassLabel_preReloc;
const VarLabel* gFluidVelocityLabel_preReloc;
const VarLabel* gFluidVelocityStarLabel_preReloc;
const VarLabel* gFluidAccelerationLabel_preReloc;
// MPM Hydrostatic BC label
const VarLabel* boundaryPointsPerCellLabel;
};
} // End namespace Uintah
#endif
| 37.066667 | 79 | 0.752398 |
ab18f78958e41c13d92b1530317bc271729503ec | 395 | cs | C# | b2xtranslator/Xls/XlsFileFormat/Structures/XmlTkToken.cs | kafkaesqu3/Macrome | d3fd5fa4fa49087df0fa7ce7f960331befc24fea | [
"MIT"
] | 484 | 2020-05-11T14:55:06.000Z | 2022-03-29T12:17:30.000Z | b2xtranslator/Xls/XlsFileFormat/Structures/XmlTkToken.cs | kafkaesqu3/Macrome | d3fd5fa4fa49087df0fa7ce7f960331befc24fea | [
"MIT"
] | 17 | 2020-05-16T05:13:24.000Z | 2022-03-14T07:45:47.000Z | b2xtranslator/Xls/XlsFileFormat/Structures/XmlTkToken.cs | kafkaesqu3/Macrome | d3fd5fa4fa49087df0fa7ce7f960331befc24fea | [
"MIT"
] | 75 | 2020-05-12T21:22:31.000Z | 2022-03-22T22:31:02.000Z |
using b2xtranslator.StructuredStorage.Reader;
namespace b2xtranslator.Spreadsheet.XlsFileFormat.Structures
{
public class XmlTkToken
{
public XmlTkHeader xtHeader;
public ushort dValue;
public XmlTkToken(IStreamReader reader)
{
this.xtHeader = new XmlTkHeader(reader);
this.dValue = reader.ReadUInt16();
}
}
}
| 18.809524 | 60 | 0.643038 |
80618100a71bba4739afde8032c4f4309a6e3a08 | 5,685 | java | Java | java/debugger/impl/src/com/intellij/debugger/settings/CaptureSettingsProvider.java | Sajaki/intellij-community | 6748af2c40567839d11fd652ec77ba263c074aad | [
"Apache-2.0"
] | 1 | 2020-01-28T17:32:44.000Z | 2020-01-28T17:32:44.000Z | java/debugger/impl/src/com/intellij/debugger/settings/CaptureSettingsProvider.java | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2022-02-19T09:45:05.000Z | 2022-02-27T20:32:55.000Z | java/debugger/impl/src/com/intellij/debugger/settings/CaptureSettingsProvider.java | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | // Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.debugger.settings;
import com.intellij.debugger.engine.JVMNameUtil;
import com.intellij.debugger.engine.evaluation.EvaluateException;
import com.intellij.openapi.application.ReadAction;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.PsiAnnotationMemberValue;
import com.intellij.psi.PsiMethod;
import com.intellij.psi.PsiParameter;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
public class CaptureSettingsProvider {
private static final Logger LOG = Logger.getInstance(CaptureSettingsProvider.class);
private static final KeyProvider THIS_KEY = new StringKeyProvider("this");
private static final String ANY = "*";
@NotNull
public static Properties getPointsProperties() {
Properties res = new Properties();
if (Registry.is("debugger.capture.points.agent.annotations")) {
int idx = 0;
for (CaptureSettingsProvider.AgentPoint point : getAnnotationPoints()) {
res.setProperty((point.isCapture() ? "capture" : "insert") + idx++,
point.myClassName + AgentPoint.SEPARATOR +
point.myMethodName + AgentPoint.SEPARATOR +
point.myMethodDesc + AgentPoint.SEPARATOR +
point.myKey.asString());
}
}
return res;
}
private static List<AgentPoint> getAnnotationPoints() {
return ReadAction.compute(() -> {
List<AgentPoint> annotationPoints = new ArrayList<>();
CaptureConfigurable.processCaptureAnnotations((capture, e, annotation) -> {
PsiMethod method;
KeyProvider keyProvider;
if (e instanceof PsiMethod) {
method = (PsiMethod)e;
keyProvider = THIS_KEY;
}
else if (e instanceof PsiParameter) {
PsiParameter psiParameter = (PsiParameter)e;
method = (PsiMethod)psiParameter.getDeclarationScope();
keyProvider = param(method.getParameterList().getParameterIndex(psiParameter));
}
else {
return;
}
String classVMName = JVMNameUtil.getClassVMName(method.getContainingClass());
if (classVMName == null) {
LOG.warn("Unable to find VM class name for annotated method: " + method.getName());
return;
}
String className = classVMName.replaceAll("\\.", "/");
String methodName = JVMNameUtil.getJVMMethodName(method);
String methodDesc = ANY;
try {
methodDesc = JVMNameUtil.getJVMSignature(method).getName(null);
}
catch (EvaluateException ex) {
LOG.error(ex);
}
PsiAnnotationMemberValue keyExpressionValue = annotation.findAttributeValue("keyExpression");
if (keyExpressionValue != null && !"\"\"".equals(keyExpressionValue.getText())) {
keyProvider = new FieldKeyProvider(className, StringUtil.unquoteString(keyExpressionValue.getText())); //treat as a field
}
AgentPoint point = capture ?
new AgentCapturePoint(className, methodName, methodDesc, keyProvider) :
new AgentInsertPoint(className, methodName, methodDesc, keyProvider);
annotationPoints.add(point);
});
return annotationPoints;
});
}
private static abstract class AgentPoint {
public final String myClassName;
public final String myMethodName;
public final String myMethodDesc;
public final KeyProvider myKey;
private static final String SEPARATOR = " ";
AgentPoint(String className, String methodName, String methodDesc, KeyProvider key) {
assert !className.contains(".") : "Classname should not contain . here";
myClassName = className;
myMethodName = methodName;
myMethodDesc = methodDesc;
myKey = key;
}
public abstract boolean isCapture();
@Override
public String toString() {
return myClassName + "." + myMethodName + " " + myKey.asString();
}
}
private static class AgentCapturePoint extends AgentPoint {
AgentCapturePoint(String className, String methodName, String methodDesc, KeyProvider key) {
super(className, methodName, methodDesc, key);
}
@Override
public boolean isCapture() {
return true;
}
}
private static class AgentInsertPoint extends AgentPoint {
AgentInsertPoint(String className, String methodName, String methodDesc, KeyProvider key) {
super(className, methodName, methodDesc, key);
}
@Override
public boolean isCapture() {
return false;
}
}
private interface KeyProvider {
String asString();
}
private static KeyProvider param(int idx) {
return new StringKeyProvider(Integer.toString(idx));
}
private static class StringKeyProvider implements KeyProvider {
private final String myValue;
StringKeyProvider(String value) {
myValue = value;
}
@Override
public String asString() {
return myValue;
}
}
private static class FieldKeyProvider implements KeyProvider {
private final String myClassName;
private final String myFieldName;
FieldKeyProvider(String className, String fieldName) {
myClassName = className;
myFieldName = fieldName;
}
@Override
public String asString() {
return myClassName + AgentPoint.SEPARATOR + myFieldName;
}
}
}
| 33.639053 | 140 | 0.677573 |
ec4ecc47d976cafc6ca6e77499ba34697fd3f8d7 | 661 | kts | Kotlin | data/RF03010/rnartist.kts | fjossinet/Rfam-for-RNArtist | 3016050675602d506a0e308f07d071abf1524b67 | [
"MIT"
] | null | null | null | data/RF03010/rnartist.kts | fjossinet/Rfam-for-RNArtist | 3016050675602d506a0e308f07d071abf1524b67 | [
"MIT"
] | null | null | null | data/RF03010/rnartist.kts | fjossinet/Rfam-for-RNArtist | 3016050675602d506a0e308f07d071abf1524b67 | [
"MIT"
] | null | null | null | import io.github.fjossinet.rnartist.core.*
rnartist {
ss {
rfam {
id = "RF03010"
name = "consensus"
use alignment numbering
}
}
theme {
details {
value = 3
}
color {
location {
1 to 6
11 to 16
}
value = "#026cba"
}
color {
location {
7 to 10
}
value = "#db28b0"
}
color {
location {
17 to 52
}
value = "#7ba9e4"
}
}
} | 15.022727 | 48 | 0.30711 |
2941bc479abd653ce000bef6f0b081289c769a74 | 1,312 | kt | Kotlin | node/src/main/kotlin/net/corda/node/serialization/KryoServerSerializationScheme.kt | lijiachuan1982/corda | f6bc59115f4ec8c053a7cd5b94a8f2ef612d9160 | [
"Apache-2.0"
] | 1 | 2018-03-15T11:04:53.000Z | 2018-03-15T11:04:53.000Z | node/src/main/kotlin/net/corda/node/serialization/KryoServerSerializationScheme.kt | lijiachuan1982/corda | f6bc59115f4ec8c053a7cd5b94a8f2ef612d9160 | [
"Apache-2.0"
] | 1 | 2021-03-20T05:23:26.000Z | 2021-03-20T05:23:26.000Z | node/src/main/kotlin/net/corda/node/serialization/KryoServerSerializationScheme.kt | AlexRogalskiy/corda | 2792716157d79e1162ed20438d5d0db33e7b3a8a | [
"Apache-2.0"
] | 1 | 2022-01-18T09:36:13.000Z | 2022-01-18T09:36:13.000Z | package net.corda.node.serialization
import com.esotericsoftware.kryo.pool.KryoPool
import net.corda.core.serialization.SerializationContext
import net.corda.nodeapi.internal.serialization.CordaSerializationMagic
import net.corda.node.services.messaging.RpcServerObservableSerializer
import net.corda.nodeapi.internal.serialization.kryo.AbstractKryoSerializationScheme
import net.corda.nodeapi.internal.serialization.kryo.DefaultKryoCustomizer
import net.corda.nodeapi.internal.serialization.kryo.kryoMagic
import net.corda.nodeapi.internal.serialization.kryo.RPCKryo
class KryoServerSerializationScheme : AbstractKryoSerializationScheme() {
override fun canDeserializeVersion(magic: CordaSerializationMagic, target: SerializationContext.UseCase): Boolean {
return magic == kryoMagic && target != SerializationContext.UseCase.RPCClient
}
override fun rpcClientKryoPool(context: SerializationContext): KryoPool = throw UnsupportedOperationException()
override fun rpcServerKryoPool(context: SerializationContext): KryoPool {
return KryoPool.Builder {
DefaultKryoCustomizer.customize(RPCKryo(RpcServerObservableSerializer, context), publicKeySerializer).apply {
classLoader = context.deserializationClassLoader
}
}.build()
}
} | 50.461538 | 121 | 0.807165 |
59ba48f9e25e49f6bdf4515e1c0dd5ccad7aae24 | 578 | dart | Dart | lib/ui/widgets/show_detail/episode_app_bar.dart | BrunoJurkovic/tv_shows | 75485c5ebc38fdf10da88a1e2d4d1298e8574d91 | [
"MIT"
] | 1 | 2021-11-08T10:30:39.000Z | 2021-11-08T10:30:39.000Z | lib/ui/widgets/show_detail/episode_app_bar.dart | BrunoJurkovic/tv_shows | 75485c5ebc38fdf10da88a1e2d4d1298e8574d91 | [
"MIT"
] | null | null | null | lib/ui/widgets/show_detail/episode_app_bar.dart | BrunoJurkovic/tv_shows | 75485c5ebc38fdf10da88a1e2d4d1298e8574d91 | [
"MIT"
] | null | null | null | import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
class EpisodePageAppBar extends StatelessWidget with PreferredSizeWidget {
const EpisodePageAppBar({
Key? key,
}) : super(key: key);
@override
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
@override
Widget build(BuildContext context) {
return AppBar(
elevation: 0,
systemOverlayStyle: SystemUiOverlayStyle.dark,
backgroundColor: Colors.transparent,
iconTheme: const IconThemeData(
color: Colors.black,
),
);
}
}
| 24.083333 | 74 | 0.705882 |
0f22edcd4e1cc0e9f06d765d2cf1253b6a0927be | 1,196 | cpp | C++ | rev2_2018/WiFiSatellite_Firmware/libraries/SimpleMenu/src/menus/Menu.cpp | MasterScott/WiFiSatellite | 984774e5edefaa3c77d7656a2a26c605b185b725 | [
"MIT"
] | 72 | 2019-04-07T15:11:10.000Z | 2022-02-25T02:14:45.000Z | rev2_2018/WiFiSatellite_Firmware/libraries/SimpleMenu/src/menus/Menu.cpp | n3m351d4/WiFiSatellite | 6dd7daddffaf412eaceda4664ceee037d988104d | [
"MIT"
] | 1 | 2019-04-08T14:57:54.000Z | 2019-04-08T15:56:46.000Z | rev2_2018/WiFiSatellite_Firmware/libraries/SimpleMenu/src/menus/Menu.cpp | n3m351d4/WiFiSatellite | 6dd7daddffaf412eaceda4664ceee037d988104d | [
"MIT"
] | 20 | 2019-04-08T04:00:31.000Z | 2022-01-18T21:49:54.000Z | #include "Menu.h"
namespace simplemenu {
Config* Menu::get_config() const {
return this->config;
}
void Menu::set_config(Config* config) {
this->config = config;
set_fps(config->get_fps());
}
void Menu::set_name(std::string name) {
this->name = name;
}
std::string Menu::get_name() {
return this->name;
}
bool Menu::has_parent() {
return this->parent;
}
Menu* Menu::get_parent() const {
return this->parent;
}
void Menu::set_parent_menu(Menu* parent) {
this->parent = parent;
}
void Menu::set_fps(unsigned int fps) {
this->fps = fps;
}
unsigned int Menu::get_fps() const {
return fps;
}
bool Menu::ready() const {
return (millis() - update_time) >= (1000 / fps);
}
void Menu::update() {
update_time = millis();
}
Menu* Menu::up() {
return nullptr;
}
Menu* Menu::down() {
return nullptr;
}
Menu* Menu::click() {
return nullptr;
}
Menu* Menu::doubleclick() {
return nullptr;
}
Menu* Menu::hold() {
return nullptr;
}
} | 17.588235 | 56 | 0.519231 |
287b64cb85bfd8fdde7d7c8a790e6032f87f007a | 19,458 | cc | C++ | src/xenia/ui/d3d12/d3d12_provider.cc | epozzobon/xenia | 3775048cc9d281dbb57d021f9dd139663b96cfe4 | [
"BSD-3-Clause"
] | null | null | null | src/xenia/ui/d3d12/d3d12_provider.cc | epozzobon/xenia | 3775048cc9d281dbb57d021f9dd139663b96cfe4 | [
"BSD-3-Clause"
] | null | null | null | src/xenia/ui/d3d12/d3d12_provider.cc | epozzobon/xenia | 3775048cc9d281dbb57d021f9dd139663b96cfe4 | [
"BSD-3-Clause"
] | null | null | null | /**
******************************************************************************
* Xenia : Xbox 360 Emulator Research Project *
******************************************************************************
* Copyright 2020 Ben Vanik. All rights reserved. *
* Released under the BSD license - see LICENSE in the root for more details. *
******************************************************************************
*/
#include "xenia/ui/d3d12/d3d12_provider.h"
#include <malloc.h>
#include <cstdlib>
#include "xenia/base/cvar.h"
#include "xenia/base/logging.h"
#include "xenia/base/math.h"
#include "xenia/ui/d3d12/d3d12_immediate_drawer.h"
#include "xenia/ui/d3d12/d3d12_presenter.h"
DEFINE_bool(d3d12_debug, false, "Enable Direct3D 12 and DXGI debug layer.",
"D3D12");
DEFINE_bool(d3d12_break_on_error, false,
"Break on Direct3D 12 validation errors.", "D3D12");
DEFINE_bool(d3d12_break_on_warning, false,
"Break on Direct3D 12 validation warnings.", "D3D12");
DEFINE_int32(d3d12_adapter, -1,
"Index of the DXGI adapter to use. "
"-1 for any physical adapter, -2 for WARP software rendering.",
"D3D12");
DEFINE_int32(
d3d12_queue_priority, 1,
"Graphics (direct) command queue scheduling priority, 0 - normal, 1 - "
"high, 2 - global realtime (requires administrator privileges, may impact "
"system responsibility)",
"D3D12");
namespace xe {
namespace ui {
namespace d3d12 {
bool D3D12Provider::IsD3D12APIAvailable() {
HMODULE library_d3d12 = LoadLibraryW(L"D3D12.dll");
if (!library_d3d12) {
return false;
}
FreeLibrary(library_d3d12);
return true;
}
std::unique_ptr<D3D12Provider> D3D12Provider::Create() {
std::unique_ptr<D3D12Provider> provider(new D3D12Provider);
if (!provider->Initialize()) {
xe::FatalError(
"Unable to initialize Direct3D 12 graphics subsystem.\n"
"\n"
"Ensure that you have the latest drivers for your GPU and it supports "
"Direct3D 12 with the feature level of at least 11_0.\n"
"\n"
"See https://xenia.jp/faq/ for more information and a list of "
"supported GPUs.");
return nullptr;
}
return provider;
}
D3D12Provider::~D3D12Provider() {
if (graphics_analysis_ != nullptr) {
graphics_analysis_->Release();
}
if (direct_queue_ != nullptr) {
direct_queue_->Release();
}
if (device_ != nullptr) {
device_->Release();
}
if (dxgi_factory_ != nullptr) {
dxgi_factory_->Release();
}
if (cvars::d3d12_debug && pfn_dxgi_get_debug_interface1_) {
Microsoft::WRL::ComPtr<IDXGIDebug> dxgi_debug;
if (SUCCEEDED(
pfn_dxgi_get_debug_interface1_(0, IID_PPV_ARGS(&dxgi_debug)))) {
dxgi_debug->ReportLiveObjects(DXGI_DEBUG_ALL, DXGI_DEBUG_RLO_ALL);
}
}
if (library_dxcompiler_ != nullptr) {
FreeLibrary(library_dxcompiler_);
}
if (library_dxilconv_ != nullptr) {
FreeLibrary(library_dxilconv_);
}
if (library_d3dcompiler_ != nullptr) {
FreeLibrary(library_d3dcompiler_);
}
if (library_d3d12_ != nullptr) {
FreeLibrary(library_d3d12_);
}
if (library_dxgi_ != nullptr) {
FreeLibrary(library_dxgi_);
}
}
bool D3D12Provider::EnableIncreaseBasePriorityPrivilege() {
TOKEN_PRIVILEGES privileges;
privileges.PrivilegeCount = 1;
privileges.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
if (!LookupPrivilegeValue(nullptr, SE_INC_BASE_PRIORITY_NAME,
&privileges.Privileges[0].Luid)) {
return false;
}
HANDLE token;
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES, &token)) {
return false;
}
bool enabled = AdjustTokenPrivileges(token, FALSE, &privileges,
sizeof(privileges), nullptr, nullptr) &&
GetLastError() != ERROR_NOT_ALL_ASSIGNED;
CloseHandle(token);
return enabled;
}
bool D3D12Provider::Initialize() {
// Load the core libraries.
library_dxgi_ = LoadLibraryW(L"dxgi.dll");
library_d3d12_ = LoadLibraryW(L"D3D12.dll");
if (!library_dxgi_ || !library_d3d12_) {
XELOGE("Failed to load dxgi.dll or D3D12.dll");
return false;
}
bool libraries_loaded = true;
libraries_loaded &=
(pfn_create_dxgi_factory2_ = PFNCreateDXGIFactory2(
GetProcAddress(library_dxgi_, "CreateDXGIFactory2"))) != nullptr;
libraries_loaded &=
(pfn_dxgi_get_debug_interface1_ = PFNDXGIGetDebugInterface1(
GetProcAddress(library_dxgi_, "DXGIGetDebugInterface1"))) != nullptr;
libraries_loaded &=
(pfn_d3d12_get_debug_interface_ = PFN_D3D12_GET_DEBUG_INTERFACE(
GetProcAddress(library_d3d12_, "D3D12GetDebugInterface"))) !=
nullptr;
libraries_loaded &=
(pfn_d3d12_create_device_ = PFN_D3D12_CREATE_DEVICE(
GetProcAddress(library_d3d12_, "D3D12CreateDevice"))) != nullptr;
libraries_loaded &=
(pfn_d3d12_serialize_root_signature_ = PFN_D3D12_SERIALIZE_ROOT_SIGNATURE(
GetProcAddress(library_d3d12_, "D3D12SerializeRootSignature"))) !=
nullptr;
if (!libraries_loaded) {
XELOGE("Failed to get DXGI or Direct3D 12 functions");
return false;
}
// Load optional D3DCompiler_47.dll.
pfn_d3d_disassemble_ = nullptr;
library_d3dcompiler_ = LoadLibraryW(L"D3DCompiler_47.dll");
if (library_d3dcompiler_) {
pfn_d3d_disassemble_ =
pD3DDisassemble(GetProcAddress(library_d3dcompiler_, "D3DDisassemble"));
if (pfn_d3d_disassemble_ == nullptr) {
XELOGD(
"Failed to get D3DDisassemble from D3DCompiler_47.dll, DXBC "
"disassembly for debugging will be unavailable");
}
} else {
XELOGD(
"Failed to load D3DCompiler_47.dll, DXBC disassembly for debugging "
"will be unavailable");
}
// Load optional dxilconv.dll.
pfn_dxilconv_dxc_create_instance_ = nullptr;
library_dxilconv_ = LoadLibraryW(L"dxilconv.dll");
if (library_dxilconv_) {
pfn_dxilconv_dxc_create_instance_ = DxcCreateInstanceProc(
GetProcAddress(library_dxilconv_, "DxcCreateInstance"));
if (pfn_dxilconv_dxc_create_instance_ == nullptr) {
XELOGD(
"Failed to get DxcCreateInstance from dxilconv.dll, converted DXIL "
"disassembly for debugging will be unavailable");
}
} else {
XELOGD(
"Failed to load dxilconv.dll, converted DXIL disassembly for debugging "
"will be unavailable - DXIL may be unsupported by your OS version");
}
// Load optional dxcompiler.dll.
pfn_dxcompiler_dxc_create_instance_ = nullptr;
library_dxcompiler_ = LoadLibraryW(L"dxcompiler.dll");
if (library_dxcompiler_) {
pfn_dxcompiler_dxc_create_instance_ = DxcCreateInstanceProc(
GetProcAddress(library_dxcompiler_, "DxcCreateInstance"));
if (pfn_dxcompiler_dxc_create_instance_ == nullptr) {
XELOGD(
"Failed to get DxcCreateInstance from dxcompiler.dll, converted DXIL "
"disassembly for debugging will be unavailable");
}
} else {
XELOGD(
"Failed to load dxcompiler.dll, converted DXIL disassembly for "
"debugging will be unavailable - if needed, download the DirectX "
"Shader Compiler from "
"https://github.com/microsoft/DirectXShaderCompiler/releases and place "
"the DLL in the Xenia directory");
}
// Configure the DXGI debug info queue.
if (cvars::d3d12_break_on_error || cvars::d3d12_break_on_warning) {
IDXGIInfoQueue* dxgi_info_queue;
if (SUCCEEDED(pfn_dxgi_get_debug_interface1_(
0, IID_PPV_ARGS(&dxgi_info_queue)))) {
if (cvars::d3d12_break_on_error) {
dxgi_info_queue->SetBreakOnSeverity(
DXGI_DEBUG_ALL, DXGI_INFO_QUEUE_MESSAGE_SEVERITY_CORRUPTION, TRUE);
dxgi_info_queue->SetBreakOnSeverity(
DXGI_DEBUG_ALL, DXGI_INFO_QUEUE_MESSAGE_SEVERITY_ERROR, TRUE);
}
if (cvars::d3d12_break_on_warning) {
dxgi_info_queue->SetBreakOnSeverity(
DXGI_DEBUG_ALL, DXGI_INFO_QUEUE_MESSAGE_SEVERITY_WARNING, TRUE);
}
dxgi_info_queue->Release();
}
}
// Enable the debug layer.
bool debug = cvars::d3d12_debug;
if (debug) {
ID3D12Debug* debug_interface;
if (SUCCEEDED(
pfn_d3d12_get_debug_interface_(IID_PPV_ARGS(&debug_interface)))) {
debug_interface->EnableDebugLayer();
debug_interface->Release();
} else {
XELOGW("Failed to enable the Direct3D 12 debug layer");
debug = false;
}
}
// Create the DXGI factory.
IDXGIFactory2* dxgi_factory;
if (FAILED(pfn_create_dxgi_factory2_(debug ? DXGI_CREATE_FACTORY_DEBUG : 0,
IID_PPV_ARGS(&dxgi_factory)))) {
XELOGE("Failed to create a DXGI factory");
return false;
}
// Choose the adapter.
uint32_t adapter_index = 0;
IDXGIAdapter1* adapter = nullptr;
while (dxgi_factory->EnumAdapters1(adapter_index, &adapter) == S_OK) {
DXGI_ADAPTER_DESC1 adapter_desc;
if (SUCCEEDED(adapter->GetDesc1(&adapter_desc))) {
if (SUCCEEDED(pfn_d3d12_create_device_(adapter, D3D_FEATURE_LEVEL_11_0,
_uuidof(ID3D12Device), nullptr))) {
if (cvars::d3d12_adapter >= 0) {
if (adapter_index == cvars::d3d12_adapter) {
break;
}
} else if (cvars::d3d12_adapter == -2) {
if (adapter_desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE) {
break;
}
} else {
if (!(adapter_desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE)) {
break;
}
}
}
}
adapter->Release();
adapter = nullptr;
++adapter_index;
}
if (adapter == nullptr) {
XELOGE(
"Failed to get an adapter supporting Direct3D 12 with the feature "
"level of at least 11_0");
dxgi_factory->Release();
return false;
}
DXGI_ADAPTER_DESC adapter_desc;
if (FAILED(adapter->GetDesc(&adapter_desc))) {
XELOGE("Failed to get the DXGI adapter description");
adapter->Release();
dxgi_factory->Release();
return false;
}
adapter_vendor_id_ = GpuVendorID(adapter_desc.VendorId);
int adapter_name_mb_size = WideCharToMultiByte(
CP_UTF8, 0, adapter_desc.Description, -1, nullptr, 0, nullptr, nullptr);
if (adapter_name_mb_size != 0) {
char* adapter_name_mb =
reinterpret_cast<char*>(alloca(adapter_name_mb_size));
if (WideCharToMultiByte(CP_UTF8, 0, adapter_desc.Description, -1,
adapter_name_mb, adapter_name_mb_size, nullptr,
nullptr) != 0) {
XELOGD3D("DXGI adapter: {} (vendor 0x{:04X}, device 0x{:04X})",
adapter_name_mb, adapter_desc.VendorId, adapter_desc.DeviceId);
}
}
// Create the Direct3D 12 device.
ID3D12Device* device;
if (FAILED(pfn_d3d12_create_device_(adapter, D3D_FEATURE_LEVEL_11_0,
IID_PPV_ARGS(&device)))) {
XELOGE("Failed to create a Direct3D 12 feature level 11_0 device");
adapter->Release();
dxgi_factory->Release();
return false;
}
adapter->Release();
// Configure the Direct3D 12 debug info queue.
ID3D12InfoQueue* d3d12_info_queue;
if (SUCCEEDED(device->QueryInterface(IID_PPV_ARGS(&d3d12_info_queue)))) {
D3D12_MESSAGE_SEVERITY d3d12_info_queue_denied_severities[] = {
D3D12_MESSAGE_SEVERITY_INFO,
};
D3D12_MESSAGE_ID d3d12_info_queue_denied_messages[] = {
// Xbox 360 vertex fetch is explicit in shaders.
D3D12_MESSAGE_ID_CREATEINPUTLAYOUT_EMPTY_LAYOUT,
// Bug in the debug layer (fixed in some version of Windows) - gaps in
// render target bindings must be represented with a fully typed RTV
// descriptor and DXGI_FORMAT_UNKNOWN in the pipeline state, but older
// debug layer versions give a format mismatch error in this case.
D3D12_MESSAGE_ID_RENDER_TARGET_FORMAT_MISMATCH_PIPELINE_STATE,
// Render targets and shader exports don't have to match on the Xbox
// 360.
D3D12_MESSAGE_ID_CREATEGRAPHICSPIPELINESTATE_RENDERTARGETVIEW_NOT_SET,
// Arbitrary scissor can be specified by the guest, also it can be
// explicitly used to disable drawing.
D3D12_MESSAGE_ID_DRAW_EMPTY_SCISSOR_RECTANGLE,
// Arbitrary clear values can be specified by the guest.
D3D12_MESSAGE_ID_CLEARRENDERTARGETVIEW_MISMATCHINGCLEARVALUE,
D3D12_MESSAGE_ID_CLEARDEPTHSTENCILVIEW_MISMATCHINGCLEARVALUE,
};
D3D12_INFO_QUEUE_FILTER d3d12_info_queue_filter = {};
d3d12_info_queue_filter.DenyList.NumSeverities =
UINT(xe::countof(d3d12_info_queue_denied_severities));
d3d12_info_queue_filter.DenyList.pSeverityList =
d3d12_info_queue_denied_severities;
d3d12_info_queue_filter.DenyList.NumIDs =
UINT(xe::countof(d3d12_info_queue_denied_messages));
d3d12_info_queue_filter.DenyList.pIDList = d3d12_info_queue_denied_messages;
d3d12_info_queue->PushStorageFilter(&d3d12_info_queue_filter);
if (cvars::d3d12_break_on_error) {
d3d12_info_queue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_CORRUPTION,
TRUE);
d3d12_info_queue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_ERROR, TRUE);
}
if (cvars::d3d12_break_on_warning) {
d3d12_info_queue->SetBreakOnSeverity(D3D12_MESSAGE_SEVERITY_WARNING,
TRUE);
}
d3d12_info_queue->Release();
}
// Create the command queue for graphics.
D3D12_COMMAND_QUEUE_DESC queue_desc;
queue_desc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
if (cvars::d3d12_queue_priority >= 2) {
queue_desc.Priority = D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME;
if (!EnableIncreaseBasePriorityPrivilege()) {
XELOGW(
"Failed to enable SeIncreaseBasePriorityPrivilege for global "
"realtime Direct3D 12 command queue priority, falling back to high "
"priority, try launching Xenia as administrator");
queue_desc.Priority = D3D12_COMMAND_QUEUE_PRIORITY_HIGH;
}
} else if (cvars::d3d12_queue_priority >= 1) {
queue_desc.Priority = D3D12_COMMAND_QUEUE_PRIORITY_HIGH;
} else {
queue_desc.Priority = D3D12_COMMAND_QUEUE_PRIORITY_NORMAL;
}
queue_desc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
queue_desc.NodeMask = 0;
ID3D12CommandQueue* direct_queue;
if (FAILED(device->CreateCommandQueue(&queue_desc,
IID_PPV_ARGS(&direct_queue)))) {
bool queue_created = false;
if (queue_desc.Priority == D3D12_COMMAND_QUEUE_PRIORITY_GLOBAL_REALTIME) {
XELOGW(
"Failed to create a Direct3D 12 direct command queue with global "
"realtime priority, falling back to high priority, try launching "
"Xenia as administrator");
queue_desc.Priority = D3D12_COMMAND_QUEUE_PRIORITY_HIGH;
queue_created = SUCCEEDED(
device->CreateCommandQueue(&queue_desc, IID_PPV_ARGS(&direct_queue)));
}
if (!queue_created) {
XELOGE("Failed to create a Direct3D 12 direct command queue");
device->Release();
dxgi_factory->Release();
return false;
}
}
dxgi_factory_ = dxgi_factory;
device_ = device;
direct_queue_ = direct_queue;
// Get descriptor sizes for each type.
for (uint32_t i = 0; i < D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES; ++i) {
descriptor_sizes_[i] =
device->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE(i));
}
// Check if optional features are supported.
// D3D12_HEAP_FLAG_CREATE_NOT_ZEROED requires Windows 10 2004 (indicated by
// the availability of ID3D12Device8 or D3D12_FEATURE_D3D12_OPTIONS7).
heap_flag_create_not_zeroed_ = D3D12_HEAP_FLAG_NONE;
D3D12_FEATURE_DATA_D3D12_OPTIONS7 options7;
if (SUCCEEDED(device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS7,
&options7, sizeof(options7)))) {
heap_flag_create_not_zeroed_ = D3D12_HEAP_FLAG_CREATE_NOT_ZEROED;
}
ps_specified_stencil_reference_supported_ = false;
rasterizer_ordered_views_supported_ = false;
resource_binding_tier_ = D3D12_RESOURCE_BINDING_TIER_1;
tiled_resources_tier_ = D3D12_TILED_RESOURCES_TIER_NOT_SUPPORTED;
unaligned_block_textures_supported_ = false;
D3D12_FEATURE_DATA_D3D12_OPTIONS options;
if (SUCCEEDED(device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS,
&options, sizeof(options)))) {
ps_specified_stencil_reference_supported_ =
bool(options.PSSpecifiedStencilRefSupported);
rasterizer_ordered_views_supported_ = bool(options.ROVsSupported);
resource_binding_tier_ = options.ResourceBindingTier;
tiled_resources_tier_ = options.TiledResourcesTier;
}
programmable_sample_positions_tier_ =
D3D12_PROGRAMMABLE_SAMPLE_POSITIONS_TIER_NOT_SUPPORTED;
D3D12_FEATURE_DATA_D3D12_OPTIONS2 options2;
if (SUCCEEDED(device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS2,
&options2, sizeof(options2)))) {
programmable_sample_positions_tier_ =
options2.ProgrammableSamplePositionsTier;
}
D3D12_FEATURE_DATA_D3D12_OPTIONS8 options8;
if (SUCCEEDED(device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS8,
&options8, sizeof(options8)))) {
unaligned_block_textures_supported_ =
bool(options8.UnalignedBlockTexturesSupported);
}
virtual_address_bits_per_resource_ = 0;
D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT virtual_address_support;
if (SUCCEEDED(device->CheckFeatureSupport(
D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT, &virtual_address_support,
sizeof(virtual_address_support)))) {
virtual_address_bits_per_resource_ =
virtual_address_support.MaxGPUVirtualAddressBitsPerResource;
}
XELOGD3D(
"Direct3D 12 device and OS features:\n"
"* Max GPU virtual address bits per resource: {}\n"
"* Non-zeroed heap creation: {}\n"
"* Pixel-shader-specified stencil reference: {}\n"
"* Programmable sample positions: tier {}\n"
"* Rasterizer-ordered views: {}\n"
"* Resource binding: tier {}\n"
"* Tiled resources: tier {}\n"
"* Unaligned block-compressed textures: {}",
virtual_address_bits_per_resource_,
(heap_flag_create_not_zeroed_ & D3D12_HEAP_FLAG_CREATE_NOT_ZEROED) ? "yes"
: "no",
ps_specified_stencil_reference_supported_ ? "yes" : "no",
uint32_t(programmable_sample_positions_tier_),
rasterizer_ordered_views_supported_ ? "yes" : "no",
uint32_t(resource_binding_tier_), uint32_t(tiled_resources_tier_),
unaligned_block_textures_supported_ ? "yes" : "no");
// Get the graphics analysis interface, will silently fail if PIX is not
// attached.
pfn_dxgi_get_debug_interface1_(0, IID_PPV_ARGS(&graphics_analysis_));
return true;
}
std::unique_ptr<Presenter> D3D12Provider::CreatePresenter(
Presenter::HostGpuLossCallback host_gpu_loss_callback) {
return D3D12Presenter::Create(host_gpu_loss_callback, *this);
}
std::unique_ptr<ImmediateDrawer> D3D12Provider::CreateImmediateDrawer() {
return D3D12ImmediateDrawer::Create(*this);
}
} // namespace d3d12
} // namespace ui
} // namespace xe
| 39.309091 | 80 | 0.684911 |
884420452b321c6dabc0f37dbda38cf17385aeb5 | 19,026 | hpp | C++ | include/HMUI/AlphabetScrollbar.hpp | RedBrumbler/BeatSaber-Quest-Codegen | 73dda50b5a3e51f10d86b766dcaa24b0c6226e25 | [
"Unlicense"
] | null | null | null | include/HMUI/AlphabetScrollbar.hpp | RedBrumbler/BeatSaber-Quest-Codegen | 73dda50b5a3e51f10d86b766dcaa24b0c6226e25 | [
"Unlicense"
] | null | null | null | include/HMUI/AlphabetScrollbar.hpp | RedBrumbler/BeatSaber-Quest-Codegen | 73dda50b5a3e51f10d86b766dcaa24b0c6226e25 | [
"Unlicense"
] | null | null | null | // Autogenerated from CppHeaderCreator
// Created by Sc2ad
// =========================================================================
#pragma once
// Begin includes
#include "beatsaber-hook/shared/utils/typedefs.h"
#include "beatsaber-hook/shared/utils/byref.hpp"
// Including type: HMUI.Interactable
#include "HMUI/Interactable.hpp"
// Including type: UnityEngine.EventSystems.IPointerDownHandler
#include "UnityEngine/EventSystems/IPointerDownHandler.hpp"
// Including type: UnityEngine.EventSystems.IPointerUpHandler
#include "UnityEngine/EventSystems/IPointerUpHandler.hpp"
// Including type: UnityEngine.EventSystems.IPointerEnterHandler
#include "UnityEngine/EventSystems/IPointerEnterHandler.hpp"
// Including type: UnityEngine.EventSystems.IPointerExitHandler
#include "UnityEngine/EventSystems/IPointerExitHandler.hpp"
// Including type: UnityEngine.Color
#include "UnityEngine/Color.hpp"
// Including type: AlphabetScrollInfo
#include "GlobalNamespace/AlphabetScrollInfo.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-properties.hpp"
#include "beatsaber-hook/shared/utils/il2cpp-utils-fields.hpp"
#include "beatsaber-hook/shared/utils/utils.h"
#include "beatsaber-hook/shared/utils/typedefs-array.hpp"
// Completed includes
// Begin forward declares
// Forward declaring namespace: HMUI
namespace HMUI {
// Forward declaring type: TableView
class TableView;
}
// Forward declaring namespace: TMPro
namespace TMPro {
// Forward declaring type: TextMeshProUGUI
class TextMeshProUGUI;
}
// Forward declaring namespace: UnityEngine::UI
namespace UnityEngine::UI {
// Forward declaring type: Image
class Image;
}
// Forward declaring namespace: System::Collections::Generic
namespace System::Collections::Generic {
// Forward declaring type: IReadOnlyList`1<T>
template<typename T>
class IReadOnlyList_1;
// Forward declaring type: List`1<T>
template<typename T>
class List_1;
}
// Forward declaring namespace: UnityEngine::EventSystems
namespace UnityEngine::EventSystems {
// Forward declaring type: PointerEventData
class PointerEventData;
}
// Forward declaring namespace: System::Collections
namespace System::Collections {
// Forward declaring type: IEnumerator
class IEnumerator;
}
// Completed forward declares
// Type namespace: HMUI
namespace HMUI {
// Forward declaring type: AlphabetScrollbar
class AlphabetScrollbar;
}
#include "beatsaber-hook/shared/utils/il2cpp-type-check.hpp"
NEED_NO_BOX(::HMUI::AlphabetScrollbar);
DEFINE_IL2CPP_ARG_TYPE(::HMUI::AlphabetScrollbar*, "HMUI", "AlphabetScrollbar");
// Type namespace: HMUI
namespace HMUI {
// Size: 0x75
#pragma pack(push, 1)
// Autogenerated type: HMUI.AlphabetScrollbar
// [TokenAttribute] Offset: FFFFFFFF
// [RequireComponent] Offset: 1239BD8
class AlphabetScrollbar : public ::HMUI::Interactable/*, public ::UnityEngine::EventSystems::IPointerDownHandler, public ::UnityEngine::EventSystems::IPointerUpHandler, public ::UnityEngine::EventSystems::IPointerEnterHandler, public ::UnityEngine::EventSystems::IPointerExitHandler*/ {
public:
// Nested type: ::HMUI::AlphabetScrollbar::$PointerMoveInsideCoroutine$d__18
class $PointerMoveInsideCoroutine$d__18;
#ifdef USE_CODEGEN_FIELDS
public:
#else
#ifdef CODEGEN_FIELD_ACCESSIBILITY
CODEGEN_FIELD_ACCESSIBILITY:
#else
protected:
#endif
#endif
// private HMUI.TableView _tableView
// Size: 0x8
// Offset: 0x28
::HMUI::TableView* tableView;
// Field size check
static_assert(sizeof(::HMUI::TableView*) == 0x8);
// [SpaceAttribute] Offset: 0x123A76C
// private System.Single _characterHeight
// Size: 0x4
// Offset: 0x30
float characterHeight;
// Field size check
static_assert(sizeof(float) == 0x4);
// private UnityEngine.Color _normalColor
// Size: 0x10
// Offset: 0x34
::UnityEngine::Color normalColor;
// Field size check
static_assert(sizeof(::UnityEngine::Color) == 0x10);
// Padding between fields: normalColor and: textPrefab
char __padding2[0x4] = {};
// [SpaceAttribute] Offset: 0x123A7B4
// private TMPro.TextMeshProUGUI _textPrefab
// Size: 0x8
// Offset: 0x48
::TMPro::TextMeshProUGUI* textPrefab;
// Field size check
static_assert(sizeof(::TMPro::TextMeshProUGUI*) == 0x8);
// private TMPro.TextMeshProUGUI[] _prealocatedTexts
// Size: 0x8
// Offset: 0x50
::ArrayW<::TMPro::TextMeshProUGUI*> prealocatedTexts;
// Field size check
static_assert(sizeof(::ArrayW<::TMPro::TextMeshProUGUI*>) == 0x8);
// private UnityEngine.UI.Image _highlightImage
// Size: 0x8
// Offset: 0x58
::UnityEngine::UI::Image* highlightImage;
// Field size check
static_assert(sizeof(::UnityEngine::UI::Image*) == 0x8);
// private System.Collections.Generic.IReadOnlyList`1<AlphabetScrollInfo/Data> _characterScrollData
// Size: 0x8
// Offset: 0x60
::System::Collections::Generic::IReadOnlyList_1<::GlobalNamespace::AlphabetScrollInfo::Data*>* characterScrollData;
// Field size check
static_assert(sizeof(::System::Collections::Generic::IReadOnlyList_1<::GlobalNamespace::AlphabetScrollInfo::Data*>*) == 0x8);
// private System.Collections.Generic.List`1<TMPro.TextMeshProUGUI> _texts
// Size: 0x8
// Offset: 0x68
::System::Collections::Generic::List_1<::TMPro::TextMeshProUGUI*>* texts;
// Field size check
static_assert(sizeof(::System::Collections::Generic::List_1<::TMPro::TextMeshProUGUI*>*) == 0x8);
// private System.Int32 _highlightedCharacterIndex
// Size: 0x4
// Offset: 0x70
int highlightedCharacterIndex;
// Field size check
static_assert(sizeof(int) == 0x4);
// private System.Boolean _pointerIsDown
// Size: 0x1
// Offset: 0x74
bool pointerIsDown;
// Field size check
static_assert(sizeof(bool) == 0x1);
public:
// Creating interface conversion operator: operator ::UnityEngine::EventSystems::IPointerDownHandler
operator ::UnityEngine::EventSystems::IPointerDownHandler() noexcept {
return *reinterpret_cast<::UnityEngine::EventSystems::IPointerDownHandler*>(this);
}
// Creating interface conversion operator: operator ::UnityEngine::EventSystems::IPointerUpHandler
operator ::UnityEngine::EventSystems::IPointerUpHandler() noexcept {
return *reinterpret_cast<::UnityEngine::EventSystems::IPointerUpHandler*>(this);
}
// Creating interface conversion operator: operator ::UnityEngine::EventSystems::IPointerEnterHandler
operator ::UnityEngine::EventSystems::IPointerEnterHandler() noexcept {
return *reinterpret_cast<::UnityEngine::EventSystems::IPointerEnterHandler*>(this);
}
// Creating interface conversion operator: operator ::UnityEngine::EventSystems::IPointerExitHandler
operator ::UnityEngine::EventSystems::IPointerExitHandler() noexcept {
return *reinterpret_cast<::UnityEngine::EventSystems::IPointerExitHandler*>(this);
}
// Get instance field reference: private HMUI.TableView _tableView
::HMUI::TableView*& dyn__tableView();
// Get instance field reference: private System.Single _characterHeight
float& dyn__characterHeight();
// Get instance field reference: private UnityEngine.Color _normalColor
::UnityEngine::Color& dyn__normalColor();
// Get instance field reference: private TMPro.TextMeshProUGUI _textPrefab
::TMPro::TextMeshProUGUI*& dyn__textPrefab();
// Get instance field reference: private TMPro.TextMeshProUGUI[] _prealocatedTexts
::ArrayW<::TMPro::TextMeshProUGUI*>& dyn__prealocatedTexts();
// Get instance field reference: private UnityEngine.UI.Image _highlightImage
::UnityEngine::UI::Image*& dyn__highlightImage();
// Get instance field reference: private System.Collections.Generic.IReadOnlyList`1<AlphabetScrollInfo/Data> _characterScrollData
::System::Collections::Generic::IReadOnlyList_1<::GlobalNamespace::AlphabetScrollInfo::Data*>*& dyn__characterScrollData();
// Get instance field reference: private System.Collections.Generic.List`1<TMPro.TextMeshProUGUI> _texts
::System::Collections::Generic::List_1<::TMPro::TextMeshProUGUI*>*& dyn__texts();
// Get instance field reference: private System.Int32 _highlightedCharacterIndex
int& dyn__highlightedCharacterIndex();
// Get instance field reference: private System.Boolean _pointerIsDown
bool& dyn__pointerIsDown();
// protected System.Void Awake()
// Offset: 0x16DCBF0
void Awake();
// public System.Void SetData(System.Collections.Generic.IReadOnlyList`1<AlphabetScrollInfo/Data> characterScrollData)
// Offset: 0x16DCC10
void SetData(::System::Collections::Generic::IReadOnlyList_1<::GlobalNamespace::AlphabetScrollInfo::Data*>* characterScrollData);
// public System.Void OnPointerDown(UnityEngine.EventSystems.PointerEventData eventData)
// Offset: 0x16DD4E0
void OnPointerDown(::UnityEngine::EventSystems::PointerEventData* eventData);
// public System.Void OnPointerUp(UnityEngine.EventSystems.PointerEventData eventData)
// Offset: 0x16DD82C
void OnPointerUp(::UnityEngine::EventSystems::PointerEventData* eventData);
// public System.Void OnPointerEnter(UnityEngine.EventSystems.PointerEventData eventData)
// Offset: 0x16DD834
void OnPointerEnter(::UnityEngine::EventSystems::PointerEventData* eventData);
// public System.Void OnPointerExit(UnityEngine.EventSystems.PointerEventData eventData)
// Offset: 0x16DD8DC
void OnPointerExit(::UnityEngine::EventSystems::PointerEventData* eventData);
// private System.Void PrepareTransforms()
// Offset: 0x16DCF94
void PrepareTransforms();
// private System.Void RefreshHighlight()
// Offset: 0x16DD90C
void RefreshHighlight();
// private System.Collections.IEnumerator PointerMoveInsideCoroutine(UnityEngine.EventSystems.PointerEventData eventData)
// Offset: 0x16DD860
::System::Collections::IEnumerator* PointerMoveInsideCoroutine(::UnityEngine::EventSystems::PointerEventData* eventData);
// private System.Int32 GetPointerCharacterIndex(UnityEngine.EventSystems.PointerEventData eventData)
// Offset: 0x16DD5DC
int GetPointerCharacterIndex(::UnityEngine::EventSystems::PointerEventData* eventData);
// private System.Void InitText(TMPro.TextMeshProUGUI text, System.Char character)
// Offset: 0x16DCE94
void InitText(::TMPro::TextMeshProUGUI* text, ::Il2CppChar character);
// public System.Void .ctor()
// Offset: 0x16DDAD0
// Implemented from: HMUI.Interactable
// Base method: System.Void Interactable::.ctor()
// Base method: System.Void MonoBehaviour::.ctor()
// Base method: System.Void Behaviour::.ctor()
// Base method: System.Void Component::.ctor()
// Base method: System.Void Object::.ctor()
// Base method: System.Void Object::.ctor()
template<::il2cpp_utils::CreationType creationType = ::il2cpp_utils::CreationType::Temporary>
static AlphabetScrollbar* New_ctor() {
static auto ___internal__logger = ::Logger::get().WithContext("::HMUI::AlphabetScrollbar::.ctor");
return THROW_UNLESS((::il2cpp_utils::New<AlphabetScrollbar*, creationType>()));
}
}; // HMUI.AlphabetScrollbar
#pragma pack(pop)
static check_size<sizeof(AlphabetScrollbar), 116 + sizeof(bool)> __HMUI_AlphabetScrollbarSizeCheck;
static_assert(sizeof(AlphabetScrollbar) == 0x75);
}
#include "beatsaber-hook/shared/utils/il2cpp-utils-methods.hpp"
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::Awake
// Il2CppName: Awake
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::AlphabetScrollbar::*)()>(&HMUI::AlphabetScrollbar::Awake)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(HMUI::AlphabetScrollbar*), "Awake", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::SetData
// Il2CppName: SetData
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::AlphabetScrollbar::*)(::System::Collections::Generic::IReadOnlyList_1<::GlobalNamespace::AlphabetScrollInfo::Data*>*)>(&HMUI::AlphabetScrollbar::SetData)> {
static const MethodInfo* get() {
static auto* characterScrollData = &::il2cpp_utils::MakeGeneric(::il2cpp_utils::GetClassFromName("System.Collections.Generic", "IReadOnlyList`1"), ::std::vector<const Il2CppClass*>{::il2cpp_utils::GetClassFromName("", "AlphabetScrollInfo/Data")})->byval_arg;
return ::il2cpp_utils::FindMethod(classof(HMUI::AlphabetScrollbar*), "SetData", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{characterScrollData});
}
};
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::OnPointerDown
// Il2CppName: OnPointerDown
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::AlphabetScrollbar::*)(::UnityEngine::EventSystems::PointerEventData*)>(&HMUI::AlphabetScrollbar::OnPointerDown)> {
static const MethodInfo* get() {
static auto* eventData = &::il2cpp_utils::GetClassFromName("UnityEngine.EventSystems", "PointerEventData")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(HMUI::AlphabetScrollbar*), "OnPointerDown", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{eventData});
}
};
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::OnPointerUp
// Il2CppName: OnPointerUp
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::AlphabetScrollbar::*)(::UnityEngine::EventSystems::PointerEventData*)>(&HMUI::AlphabetScrollbar::OnPointerUp)> {
static const MethodInfo* get() {
static auto* eventData = &::il2cpp_utils::GetClassFromName("UnityEngine.EventSystems", "PointerEventData")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(HMUI::AlphabetScrollbar*), "OnPointerUp", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{eventData});
}
};
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::OnPointerEnter
// Il2CppName: OnPointerEnter
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::AlphabetScrollbar::*)(::UnityEngine::EventSystems::PointerEventData*)>(&HMUI::AlphabetScrollbar::OnPointerEnter)> {
static const MethodInfo* get() {
static auto* eventData = &::il2cpp_utils::GetClassFromName("UnityEngine.EventSystems", "PointerEventData")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(HMUI::AlphabetScrollbar*), "OnPointerEnter", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{eventData});
}
};
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::OnPointerExit
// Il2CppName: OnPointerExit
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::AlphabetScrollbar::*)(::UnityEngine::EventSystems::PointerEventData*)>(&HMUI::AlphabetScrollbar::OnPointerExit)> {
static const MethodInfo* get() {
static auto* eventData = &::il2cpp_utils::GetClassFromName("UnityEngine.EventSystems", "PointerEventData")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(HMUI::AlphabetScrollbar*), "OnPointerExit", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{eventData});
}
};
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::PrepareTransforms
// Il2CppName: PrepareTransforms
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::AlphabetScrollbar::*)()>(&HMUI::AlphabetScrollbar::PrepareTransforms)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(HMUI::AlphabetScrollbar*), "PrepareTransforms", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::RefreshHighlight
// Il2CppName: RefreshHighlight
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::AlphabetScrollbar::*)()>(&HMUI::AlphabetScrollbar::RefreshHighlight)> {
static const MethodInfo* get() {
return ::il2cpp_utils::FindMethod(classof(HMUI::AlphabetScrollbar*), "RefreshHighlight", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{});
}
};
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::PointerMoveInsideCoroutine
// Il2CppName: PointerMoveInsideCoroutine
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<::System::Collections::IEnumerator* (HMUI::AlphabetScrollbar::*)(::UnityEngine::EventSystems::PointerEventData*)>(&HMUI::AlphabetScrollbar::PointerMoveInsideCoroutine)> {
static const MethodInfo* get() {
static auto* eventData = &::il2cpp_utils::GetClassFromName("UnityEngine.EventSystems", "PointerEventData")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(HMUI::AlphabetScrollbar*), "PointerMoveInsideCoroutine", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{eventData});
}
};
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::GetPointerCharacterIndex
// Il2CppName: GetPointerCharacterIndex
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<int (HMUI::AlphabetScrollbar::*)(::UnityEngine::EventSystems::PointerEventData*)>(&HMUI::AlphabetScrollbar::GetPointerCharacterIndex)> {
static const MethodInfo* get() {
static auto* eventData = &::il2cpp_utils::GetClassFromName("UnityEngine.EventSystems", "PointerEventData")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(HMUI::AlphabetScrollbar*), "GetPointerCharacterIndex", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{eventData});
}
};
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::InitText
// Il2CppName: InitText
template<>
struct ::il2cpp_utils::il2cpp_type_check::MetadataGetter<static_cast<void (HMUI::AlphabetScrollbar::*)(::TMPro::TextMeshProUGUI*, ::Il2CppChar)>(&HMUI::AlphabetScrollbar::InitText)> {
static const MethodInfo* get() {
static auto* text = &::il2cpp_utils::GetClassFromName("TMPro", "TextMeshProUGUI")->byval_arg;
static auto* character = &::il2cpp_utils::GetClassFromName("System", "Char")->byval_arg;
return ::il2cpp_utils::FindMethod(classof(HMUI::AlphabetScrollbar*), "InitText", std::vector<Il2CppClass*>(), ::std::vector<const Il2CppType*>{text, character});
}
};
// Writing MetadataGetter for method: HMUI::AlphabetScrollbar::New_ctor
// Il2CppName: .ctor
// Cannot get method pointer of value based method overload from template for constructor!
// Try using FindMethod instead!
| 54.829971 | 289 | 0.737622 |
90a6945a83bbeb1687b3c5c1358185a9d5846da1 | 116 | py | Python | geometry/polar_point/base.py | markupCode/computational-geometry | 9a0a63a0b0c86e0618c18f82283b41baded21c50 | [
"MIT"
] | null | null | null | geometry/polar_point/base.py | markupCode/computational-geometry | 9a0a63a0b0c86e0618c18f82283b41baded21c50 | [
"MIT"
] | null | null | null | geometry/polar_point/base.py | markupCode/computational-geometry | 9a0a63a0b0c86e0618c18f82283b41baded21c50 | [
"MIT"
] | null | null | null | class PolarPoint():
def __init__(self, angle, radius):
self.angle = angle
self.radius = radius
| 19.333333 | 38 | 0.612069 |
119faa113edb7238c2407917c96b379106fc4ac2 | 1,858 | rs | Rust | examples/opensea_example.rs | frno/pending_eth_transactions | ae1e3d896df1a920965ee541fd2203cef9a5eb6a | [
"MIT"
] | null | null | null | examples/opensea_example.rs | frno/pending_eth_transactions | ae1e3d896df1a920965ee541fd2203cef9a5eb6a | [
"MIT"
] | null | null | null | examples/opensea_example.rs | frno/pending_eth_transactions | ae1e3d896df1a920965ee541fd2203cef9a5eb6a | [
"MIT"
] | null | null | null | #[macro_use]
extern crate log;
use anyhow::{Context, Result};
extern crate pending_eth_transactions;
use env_logger::{Builder, Target};
use pending_eth_transactions::AlchemyPendingTransactionsWebsocket;
use std::env;
use std::sync::Arc;
use std::sync::atomic::AtomicBool;
use tokio::time::{Duration, Instant};
#[tokio::main]
async fn main() -> Result<()> {
/*
WEB3_WS needs to be set to url from Alchemy.
RUST_LOG needs to be set (ex. info) so logging is shown.
*/
// Set std out as log output
let mut builder = Builder::from_default_env();
builder.target(Target::Stdout);
builder.init();
// Keep alive is used as a kill switch
let web3_ws_uri = env::var("WEB3_WS").context("Issue getting ENV Key [WEB3_WS]")?;
let keep_alive = Arc::new(AtomicBool::new(true));
let connection = AlchemyPendingTransactionsWebsocket::connect(web3_ws_uri,keep_alive.clone()).await?;
// Subscribe to OpenSea
connection.subscribe_to_pending_tx_for("0x7be8076f4ea4a4ad08075c2508e481d6c946d12b").await?;
info!("Subscribed to OpenSea");
info!("Waiting for OpenSea transactions for 10 seconds");
// For two seconds print transaction hash for any new pending transaction
let start = Instant::now();
while start.elapsed() < Duration::from_secs(10) {
match connection.poll_next()? {
None => {
tokio::time::sleep(Duration::from_millis(25)).await;
}
Some(transaction) => {
info!("New transaction - Hash: [{}]",transaction.hash);
}
}
}
info!("Unsubscribing and disconnecting");
// Unsubscribe for messages
connection.unsubscribe_to_pending_tx_for("0x7be8076f4ea4a4ad08075c2508e481d6c946d12b").await?;
// Disconnect from websocket
connection.disconnect().await?;
return Ok(());
} | 31.491525 | 105 | 0.67169 |
ed62ce1183873eb5c4a2f0a52b768e4f3718277e | 2,643 | asm | Assembly | ShitHead/resources/udg.asm | simonlaszcz/ShitHead | 53bf19ceaba458b9ce4cd3e9be75ab77f1778eee | [
"MIT"
] | null | null | null | ShitHead/resources/udg.asm | simonlaszcz/ShitHead | 53bf19ceaba458b9ce4cd3e9be75ab77f1778eee | [
"MIT"
] | null | null | null | ShitHead/resources/udg.asm | simonlaszcz/ShitHead | 53bf19ceaba458b9ce4cd3e9be75ab77f1778eee | [
"MIT"
] | null | null | null | ; Face-up UDGs run A, 2, 3 .. K. Codes 1 - 13
FACEUP_A
defb %01111111
defb %10000000
defb %10011100
defb %10100010
defb %10100010
defb %10111110
defb %10100010
defb %10100010
FACEUP_B
defb %01111111
defb %10000000
defb %10011100
defb %10100010
defb %10000010
defb %10011100
defb %10100000
defb %10111110
FACEUP_C
defb %01111111
defb %10000000
defb %10011100
defb %10100010
defb %10001100
defb %10000010
defb %10100010
defb %10011100
FACEUP_D
defb %01111111
defb %10000000
defb %10000100
defb %10001100
defb %10010100
defb %10100100
defb %10111110
defb %10000100
FACEUP_E
defb %01111111
defb %10000000
defb %10111110
defb %10100000
defb %10111100
defb %10000010
defb %10000010
defb %10111100
FACEUP_F
defb %01111111
defb %10000000
defb %10011100
defb %10100000
defb %10111100
defb %10100010
defb %10100010
defb %10011100
FACEUP_G
defb %01111111
defb %10000000
defb %10111100
defb %10000010
defb %10000010
defb %10000100
defb %10001000
defb %10010000
FACEUP_H
defb %01111111
defb %10000000
defb %10011100
defb %10100010
defb %10011100
defb %10100010
defb %10100010
defb %10011100
FACEUP_I
defb %01111111
defb %10000000
defb %10011100
defb %10100010
defb %10011110
defb %10000010
defb %10000100
defb %10011000
FACEUP_J
defb %01111111
defb %10000000
defb %10101110
defb %10101010
defb %10101010
defb %10101010
defb %10101010
defb %10101110
FACEUP_K
defb %01111111
defb %10000000
defb %10000010
defb %10000010
defb %10000010
defb %10000010
defb %10100010
defb %10011100
FACEUP_L
defb %01111111
defb %10000000
defb %10011100
defb %10100010
defb %10100010
defb %10101010
defb %10100100
defb %10011010
FACEUP_M
defb %01111111
defb %10000000
defb %10100100
defb %10101000
defb %10110000
defb %10101000
defb %10100100
defb %10100010
; Normal characters from the sinclair rom are copied into the gaps
; A,2-9
HAND_SPACE defb 0, 0, 0, 0, 0, 0, 0, 0
HAND_A defs 8
HAND_2_9 defs 64
HAND_10
defb %00000000
defb %01001100
defb %01010010
defb %01010010
defb %01010010
defb %01010010
defb %01001100
defb %00000000
HAND_J defs 8
HAND_Q defs 8
HAND_K defs 8
SUITS_SPACE
defb 0, 0, 0, 0, 0, 0, 0, 0
SUITS_A
defb %00000000
defb %00100100
defb %01100110
defb %01111110
defb %01111110
defb %00111100
defb %00011000
defb %00000000
SUITS_B
defb %00000000
defb %00011000
defb %00111100
defb %01111110
defb %01111110
defb %00111100
defb %00011000
defb %00000000
defs 8
SUITS_C
defb %00000000
defb %00011000
defb %00111100
defb %01111110
defb %01111110
defb %00011000
defb %00111100
defb %00000000
defs 8
defs 8
defs 8
SUITS_D
defb %00000000
defb %00011000
defb %00000000
defb %01011010
defb %01011010
defb %00011000
defb %00111100
defb %00000000 | 13.281407 | 66 | 0.783958 |
6ef41d5f58c71a86f1601a9a221db82a478381bb | 457 | dart | Dart | app06_listview/lib/main.dart | WesGtoX/New-Information-Communication-Technologies | 8482e8d0337c97fbcd241af9e0e354b2bae5d8b2 | [
"MIT"
] | null | null | null | app06_listview/lib/main.dart | WesGtoX/New-Information-Communication-Technologies | 8482e8d0337c97fbcd241af9e0e354b2bae5d8b2 | [
"MIT"
] | null | null | null | app06_listview/lib/main.dart | WesGtoX/New-Information-Communication-Technologies | 8482e8d0337c97fbcd241af9e0e354b2bae5d8b2 | [
"MIT"
] | null | null | null | import 'package:flutter/material.dart';
import 'ListViewBuilder.dart';
import 'ListViewSepareted.dart';
import 'MenuPrincipal.dart';
void main(){
runApp(
MaterialApp(
debugShowCheckedModeBanner: false,
title: 'ListView',
initialRoute: '/menu',
routes: {
'/menu': (context) => MenuPrincipal(),
'/list1': (context) => ListViewBuilder(),
'/list2': (context) => ListViewSepareted(),
},
)
);
}
| 21.761905 | 51 | 0.608315 |
28386323263e26b23f497c9083ec2a8a6fcbdf75 | 2,377 | cpp | C++ | c++/TC/SRM/152/Div2/1000.cpp | taku-xhift/labo | 89dc28fdb602c7992c6f31920714225f83a11218 | [
"MIT"
] | null | null | null | c++/TC/SRM/152/Div2/1000.cpp | taku-xhift/labo | 89dc28fdb602c7992c6f31920714225f83a11218 | [
"MIT"
] | null | null | null | c++/TC/SRM/152/Div2/1000.cpp | taku-xhift/labo | 89dc28fdb602c7992c6f31920714225f83a11218 | [
"MIT"
] | null | null | null |
#include <iostream>
#include <vector>
#include <string>
#include <sstream>
using namespace std;
class ProblemWriting {
public:
static string removeDot(string source) {
size_t pos;
const string rightPlus = ".+";
while ((pos = source.find(rightPlus)) != string::npos) {
source.replace(pos, 2, "+");
}
const string leftPlus = "+.";
while ((pos = source.find(leftPlus)) != string::npos) {
source.replace(pos, 2, "+");
}
const string rightMinus = ".-";
while ((pos = source.find(rightMinus)) != string::npos) {
source.replace(pos, 2, "-");
}
const string leftMinus = "-.";
while ((pos = source.find(leftMinus)) != string::npos) {
source.replace(pos, 2, "-");
}
const string rightAsta = ".*";
while ((pos = source.find(rightAsta)) != string::npos) {
source.replace(pos, 2, "*");
}
const string leftAsta = "*.";
while ((pos = source.find(leftAsta)) != string::npos) {
source.replace(pos, 2, "*");
}
const string rightSlash = "./";
while ((pos = source.find(rightSlash)) != string::npos) {
source.replace(pos, 2, "/");
}
const string leftSlash = "/.";
while ((pos = source.find(leftSlash)) != string::npos) {
source.replace(pos, 2, "/");
}
return source;
}
static string myCheckData(string dotForm) {
if (dotForm.size() > 25) {
return "dotForm must contain between 1 and 25 characters, inclusive.";
}
dotForm = removeDot(dotForm);
size_t pos = string::npos;
if ((pos = dotForm.find('.')) != string::npos) {
stringstream ss;
ss << "dotForm is not in dot notation, check character " << pos+1 << ".";
return ss.str();
}
return "";
}
static void test() {
if (ProblemWriting::myCheckData("3+5") == "") {
cerr << "0.ok\n";
}
if (ProblemWriting::myCheckData("9..+.5...*....3") == "") {
cerr << "1.ok\n";
}
if (ProblemWriting::myCheckData("5.3+4") == "dotForm is not in dot notation, check character 2.") {
cerr << "2.ok\n";
}
if (ProblemWriting::myCheckData("9*9*9*9*9*9*9*9*9*9*9*9*9*9") == "dotForm must contain between 1 and 25 characters, inclusive.") {
cerr << "3.ok\n";
}
if (ProblemWriting::myCheckData("3.........../...........4") == "") {
cerr << "4.ok\n";
}
}
};
int main() {
ProblemWriting::test();
}
| 22.214953 | 134 | 0.556163 |
168158fc5c08304a99a9ca94dc93ee17f01467ca | 9,905 | c | C | libMXF/test/test_datamodel.c | brimestoned/bmx | 129eb75d87ae713cbf9b8b07f74d223b392f0868 | [
"BSD-3-Clause"
] | 5 | 2015-06-09T22:03:56.000Z | 2021-11-02T11:24:37.000Z | libMXF/test/test_datamodel.c | brimestoned/bmx | 129eb75d87ae713cbf9b8b07f74d223b392f0868 | [
"BSD-3-Clause"
] | null | null | null | libMXF/test/test_datamodel.c | brimestoned/bmx | 129eb75d87ae713cbf9b8b07f74d223b392f0868 | [
"BSD-3-Clause"
] | 1 | 2015-11-04T13:34:27.000Z | 2015-11-04T13:34:27.000Z | /*
* Copyright (C) 2006, British Broadcasting Corporation
* All Rights Reserved.
*
* Author: Philip de Nier
*
* 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 British Broadcasting Corporation 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.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <mxf/mxf.h>
#include <mxf/mxf_macros.h>
#define EXT_DATA_MODEL \
MXF_SET_DEFINITION(InterchangeObject, TestSet1, \
MXF_LABEL(0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) \
); \
\
MXF_ITEM_DEFINITION(TestSet1, TestItem1, \
MXF_LABEL(0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), \
0x7f00, \
MXF_UINT8_TYPE, \
0 \
); \
\
MXF_ITEM_DEFINITION(TestSet1, TestItem2, \
MXF_LABEL(0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), \
0x0000, \
MXF_UINT8_TYPE, \
0 \
); \
\
MXF_SET_DEFINITION(MaterialPackage, TestSet2, \
MXF_LABEL(0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) \
); \
\
MXF_SET_DEFINITION(TestSet1, TestSet3, \
MXF_LABEL(0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) \
);
#define EXT_DATA_MODEL_2 \
MXF_SET_DEFINITION(TestSet1, TestSet4, \
MXF_LABEL(0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00) \
); \
\
MXF_ITEM_DEFINITION(TestSet4, TestItem3, \
MXF_LABEL(0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00), \
0x0000, \
MXF_UINT8_TYPE, \
0 \
);
#define EXT_TYPES \
MXF_ARRAY_TYPE_DEF(0, "TimestampArray", MXF_TIMESTAMP_TYPE, 0); \
\
MXF_COMPOUND_TYPE_DEF(0, "Dimensions"); \
MXF_COMPOUND_TYPE_MEMBER("Width", MXF_UINT32_TYPE); \
MXF_COMPOUND_TYPE_MEMBER("Height", MXF_UINT32_TYPE); \
\
MXF_INTERPRETED_TYPE_DEF(0, "NewInt", MXF_UINT8_TYPE, 0);
#define MXF_LABEL(d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15) \
{d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15}
#define MXF_SET_DEFINITION(parentName, name, label) \
static const mxfUL MXF_SET_K(name) = label;
#define MXF_ITEM_DEFINITION(setName, name, label, localTag, typeId, isRequired) \
static const mxfUL MXF_ITEM_K(setName, name) = label;
EXT_DATA_MODEL
EXT_DATA_MODEL_2
#undef MXF_LABEL
#undef MXF_SET_DEFINITION
#undef MXF_ITEM_DEFINITION
static int test_model(MXFDataModel *dataModel)
{
MXFSetDef *setDef;
MXFItemDef *itemDef;
CHK_ORET(mxf_find_set_def(dataModel, &MXF_SET_K(SourcePackage), &setDef));
CHK_ORET(mxf_find_set_def(dataModel, &MXF_SET_K(TestSet1), &setDef));
CHK_ORET(mxf_find_set_def(dataModel, &MXF_SET_K(TestSet2), &setDef));
CHK_ORET(mxf_find_set_def(dataModel, &MXF_SET_K(TestSet3), &setDef));
CHK_ORET(mxf_find_set_def(dataModel, &MXF_SET_K(TestSet4), &setDef));
CHK_ORET(mxf_find_item_def(dataModel, &MXF_ITEM_K(GenericPackage, PackageUID), &itemDef));
CHK_ORET(mxf_find_item_def(dataModel, &MXF_ITEM_K(TestSet1, TestItem1), &itemDef));
CHK_ORET(mxf_find_item_def(dataModel, &MXF_ITEM_K(TestSet1, TestItem2), &itemDef));
CHK_ORET(mxf_find_item_def(dataModel, &MXF_ITEM_K(TestSet4, TestItem3), &itemDef));
CHK_ORET(mxf_find_set_def(dataModel, &MXF_SET_K(TestSet4), &setDef));
CHK_ORET(mxf_find_item_def_in_set_def(&MXF_ITEM_K(TestSet1, TestItem1), setDef, &itemDef));
CHK_ORET(mxf_is_subclass_of(dataModel, &MXF_SET_K(TestSet4), &MXF_SET_K(TestSet1)));
return 1;
}
int test()
{
MXFDataModel *dataModel = NULL;
MXFDataModel *clonedDataModel = NULL;
MXFSetDef *setDef;
MXFSetDef *clonedSetDef;
unsigned int extTypeIds[16];
MXFItemType *type;
int typeIndex = 0;
int memberIndex = 0;
CHK_ORET(mxf_load_data_model(&dataModel));
#define MXF_ARRAY_TYPE_DEF(id, name, elementTypeId, fixedSize) \
CHK_OFAIL(type = mxf_register_array_type(dataModel, name, id, elementTypeId, fixedSize)); \
extTypeIds[typeIndex++] = type->typeId;
#define MXF_COMPOUND_TYPE_DEF(id, name) \
CHK_OFAIL(type = mxf_register_compound_type(dataModel, name, id)); \
extTypeIds[typeIndex++] = type->typeId;
#define MXF_COMPOUND_TYPE_MEMBER(name, typeId) \
CHK_OFAIL(mxf_register_compound_type_member(type, name, typeId));
#define MXF_INTERPRETED_TYPE_DEF(id, name, ptypeId, fixedSize) \
CHK_OFAIL(type = mxf_register_interpret_type(dataModel, name, id, ptypeId, fixedSize)); \
extTypeIds[typeIndex++] = type->typeId;
#define MXF_LABEL(d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15) \
{d0, d1, d2, d3, d4, d5, d6, d7, d8, d9, d10, d11, d12, d13, d14, d15}
#define MXF_SET_DEFINITION(parentName, name, label) \
CHK_OFAIL(mxf_register_set_def(dataModel, #name, &MXF_SET_K(parentName), &MXF_SET_K(name)));
#define MXF_ITEM_DEFINITION(setName, name, label, tag, typeId, isRequired) \
CHK_OFAIL(mxf_register_item_def(dataModel, #name, &MXF_SET_K(setName), &MXF_ITEM_K(setName, name), tag, typeId, isRequired));
EXT_TYPES
EXT_DATA_MODEL
EXT_DATA_MODEL_2
#undef MXF_BASIC_TYPE_DEF
#undef MXF_ARRAY_TYPE_DEF
#undef MXF_COMPOUND_TYPE_DEF
#undef MXF_COMPOUND_TYPE_MEMBER
#undef MXF_INTERPRETED_TYPE_DEF
#undef MXF_LABEL
#undef MXF_SET_DEFINITION
#undef MXF_ITEM_DEFINITION
CHK_OFAIL(mxf_finalise_data_model(dataModel));
CHK_OFAIL(mxf_check_data_model(dataModel));
CHK_OFAIL(test_model(dataModel));
#define MXF_ARRAY_TYPE_DEF(pid, pname, pelementTypeId, pfixedSize) \
type = mxf_get_item_def_type(dataModel, extTypeIds[typeIndex]); \
CHK_ORET(type != NULL); \
CHK_ORET(strcmp(type->name, pname) == 0); \
CHK_ORET(type->info.array.elementTypeId == pelementTypeId); \
CHK_ORET(type->info.array.fixedSize == pfixedSize); \
typeIndex++;
#define MXF_COMPOUND_TYPE_DEF(pid, pname) \
type = mxf_get_item_def_type(dataModel, extTypeIds[typeIndex]); \
CHK_ORET(type != NULL); \
CHK_ORET(strcmp(type->name, pname) == 0); \
memberIndex = 0; \
typeIndex++;
#define MXF_COMPOUND_TYPE_MEMBER(pname, ptypeId) \
CHK_ORET(type->info.compound.members[memberIndex].typeId == ptypeId); \
CHK_ORET(strcmp(type->info.compound.members[memberIndex].name, pname) == 0); \
memberIndex++;
#define MXF_INTERPRETED_TYPE_DEF(pid, pname, ptypeId, pfixedSize) \
type = mxf_get_item_def_type(dataModel, extTypeIds[typeIndex]); \
CHK_ORET(type != NULL); \
CHK_ORET(strcmp(type->name, pname) == 0); \
CHK_ORET(type->info.interpret.typeId == ptypeId); \
CHK_ORET(type->info.interpret.fixedArraySize == pfixedSize); \
typeIndex++;
typeIndex = 0;
EXT_TYPES
#undef MXF_ARRAY_TYPE_DEF
#undef MXF_COMPOUND_TYPE_DEF
#undef MXF_COMPOUND_TYPE_MEMBER
#undef MXF_INTERPRETED_TYPE_DEF
CHK_OFAIL(mxf_load_data_model(&clonedDataModel));
CHK_OFAIL(mxf_finalise_data_model(clonedDataModel));
CHK_OFAIL(mxf_check_data_model(clonedDataModel));
CHK_OFAIL(mxf_find_set_def(dataModel, &MXF_SET_K(SourcePackage), &setDef));
CHK_OFAIL(mxf_clone_set_def(dataModel, setDef, clonedDataModel, &clonedSetDef));
CHK_OFAIL(mxf_find_set_def(dataModel, &MXF_SET_K(TestSet1), &setDef));
CHK_OFAIL(mxf_clone_set_def(dataModel, setDef, clonedDataModel, &clonedSetDef));
CHK_OFAIL(mxf_find_set_def(dataModel, &MXF_SET_K(TestSet2), &setDef));
CHK_OFAIL(mxf_clone_set_def(dataModel, setDef, clonedDataModel, &clonedSetDef));
CHK_OFAIL(mxf_find_set_def(dataModel, &MXF_SET_K(TestSet3), &setDef));
CHK_OFAIL(mxf_clone_set_def(dataModel, setDef, clonedDataModel, &clonedSetDef));
CHK_OFAIL(mxf_find_set_def(dataModel, &MXF_SET_K(TestSet4), &setDef));
CHK_OFAIL(mxf_clone_set_def(dataModel, setDef, clonedDataModel, &clonedSetDef));
CHK_OFAIL(test_model(clonedDataModel));
mxf_free_data_model(&dataModel);
mxf_free_data_model(&clonedDataModel);
return 1;
fail:
mxf_free_data_model(&dataModel);
mxf_free_data_model(&clonedDataModel);
return 0;
}
void usage(const char *cmd)
{
fprintf(stderr, "Usage: %s\n", cmd);
}
int main(int argc, const char *argv[])
{
if (argc != 1)
{
usage(argv[0]);
return 1;
}
if (!test())
{
return 1;
}
return 0;
}
| 34.754386 | 129 | 0.719637 |
4b1a116acb90c1730f1df493a38ed1db1d4ec12a | 18,204 | html | HTML | docs/html/PathPlanning_8h_source.html | liamHowatt/frontier_exploration_turtlebot | 9753516a158a43d5490def54e5b3533cfb8abb09 | [
"MIT"
] | 17 | 2018-12-10T02:08:42.000Z | 2022-01-13T20:16:08.000Z | docs/html/PathPlanning_8h_source.html | liamHowatt/frontier_exploration_turtlebot | 9753516a158a43d5490def54e5b3533cfb8abb09 | [
"MIT"
] | 1 | 2021-06-15T08:18:00.000Z | 2021-06-15T08:18:00.000Z | docs/html/PathPlanning_8h_source.html | liamHowatt/frontier_exploration_turtlebot | 9753516a158a43d5490def54e5b3533cfb8abb09 | [
"MIT"
] | 16 | 2018-12-10T23:04:59.000Z | 2022-02-26T05:49:21.000Z | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>frontier_exploration_turtlebot: /home/saurav/ros_workspace/src/frontier_exploration_turtlebot/include/frontier_exploration_turtlebot/PathPlanning.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">frontier_exploration_turtlebot
 <span id="projectnumber">0.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>File Members</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('PathPlanning_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">PathPlanning.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="PathPlanning_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> <span class="preprocessor">#ifndef INCLUDE_FRONTIER_EXPLORATION_TURTLEBOT_PATHPLANNING_H_</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#define INCLUDE_FRONTIER_EXPLORATION_TURTLEBOT_PATHPLANNING_H_</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include <ros/ros.h></span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#include <geometry_msgs/Twist.h></span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> <span class="preprocessor">#include <<a class="code" href="CollisionDetector_8h.html">frontier_exploration_turtlebot/CollisionDetector.h</a>></span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> </div><div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="classPathPlanning.html"> 47</a></span> <span class="keyword">class </span><a class="code" href="classPathPlanning.html">PathPlanning</a> {</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="comment">// Create CollisionDetector Object</span></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classPathPlanning.html#a698ed28a6ed1408f311af37170a180a2"> 50</a></span>  <a class="code" href="classCollisionDetector.html">CollisionDetector</a> <a class="code" href="classPathPlanning.html#a698ed28a6ed1408f311af37170a180a2">collisiondetector</a>;</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="comment">// variable to generate discrete spiral steps</span></div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classPathPlanning.html#a8ffa246d97c8d79cb18a1fd61e805467"> 52</a></span>  <span class="keywordtype">int</span> <a class="code" href="classPathPlanning.html#a8ffa246d97c8d79cb18a1fd61e805467">count</a>;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="comment">// variable to declare maximum spiral step count</span></div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classPathPlanning.html#a1346e45eb6566236a55b666e350cb62b"> 54</a></span>  <span class="keywordtype">int</span> <a class="code" href="classPathPlanning.html#a1346e45eb6566236a55b666e350cb62b">MaxCount</a>;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="comment">// variable to set the linear speed</span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classPathPlanning.html#a88e654d2dffefce6b3253dca0d05af2c"> 56</a></span>  <span class="keywordtype">float</span> <a class="code" href="classPathPlanning.html#a88e654d2dffefce6b3253dca0d05af2c">linearSpeed</a>;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="comment">// variable to set the angular speed</span></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classPathPlanning.html#aaa87b2917fd4cc8705601b037458dbec"> 58</a></span>  <span class="keywordtype">float</span> <a class="code" href="classPathPlanning.html#aaa87b2917fd4cc8705601b037458dbec">angularSpeed</a>;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  <span class="comment">// declare a variable for velocities</span></div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classPathPlanning.html#adc9393eeed2386dd694935a241d61dc2"> 60</a></span>  geometry_msgs::Twist <a class="code" href="classPathPlanning.html#adc9393eeed2386dd694935a241d61dc2">msg</a>;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="comment">// publishes velocity</span></div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classPathPlanning.html#a95ffa20c78692b3af113a52f37607f23"> 62</a></span>  ros::Publisher <a class="code" href="classPathPlanning.html#a95ffa20c78692b3af113a52f37607f23">pubVel</a>;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="comment">// node handler</span></div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classPathPlanning.html#a1835423557580f21ff1d569e892cc0d5"> 64</a></span>  ros::NodeHandle <a class="code" href="classPathPlanning.html#a1835423557580f21ff1d569e892cc0d5">nh</a>;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <span class="comment">// subscriber</span></div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classPathPlanning.html#ad30204ed2c193139c5d5b3f8ed07bc8d"> 66</a></span>  ros::Subscriber <a class="code" href="classPathPlanning.html#ad30204ed2c193139c5d5b3f8ed07bc8d">sub</a>;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keyword">public</span>:</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  <a class="code" href="classPathPlanning.html#a314735f239a01515a3450205dd144619">PathPlanning</a>();</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  <a class="code" href="classPathPlanning.html#ab1f231c8ce62aac1f2e9743aa85ba940">~PathPlanning</a>();</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> </div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  <span class="keywordtype">void</span> <a class="code" href="classPathPlanning.html#ab096aae6f4a9636d60f3acdc582a6e4a">spiralPathGenerator</a>();</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span> </div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="keywordtype">void</span> <a class="code" href="classPathPlanning.html#ac8bdfa5f35d5819bd7981e15b95c637b">linearPathGenerator</a>();</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> };</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> </div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span> <span class="preprocessor">#endif // INCLUDE_FRONTIER_EXPLORATION_TURTLEBOT_PATHPLANNING_H_</span></div><div class="ttc" id="classPathPlanning_html"><div class="ttname"><a href="classPathPlanning.html">PathPlanning</a></div><div class="ttdoc">PathPlanning Class class to publish spiral trajectories and linear trajectories and kicks in the coll...</div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8h_source.html#l00047">PathPlanning.h:47</a></div></div>
<div class="ttc" id="classPathPlanning_html_ab096aae6f4a9636d60f3acdc582a6e4a"><div class="ttname"><a href="classPathPlanning.html#ab096aae6f4a9636d60f3acdc582a6e4a">PathPlanning::spiralPathGenerator</a></div><div class="ttdeci">void spiralPathGenerator()</div><div class="ttdoc">spiral generator function </div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8cpp_source.html#l00097">PathPlanning.cpp:97</a></div></div>
<div class="ttc" id="classPathPlanning_html_a314735f239a01515a3450205dd144619"><div class="ttname"><a href="classPathPlanning.html#a314735f239a01515a3450205dd144619">PathPlanning::PathPlanning</a></div><div class="ttdeci">PathPlanning()</div><div class="ttdoc">constructor PathPlanning class </div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8cpp_source.html#l00039">PathPlanning.cpp:39</a></div></div>
<div class="ttc" id="classPathPlanning_html_ab1f231c8ce62aac1f2e9743aa85ba940"><div class="ttname"><a href="classPathPlanning.html#ab1f231c8ce62aac1f2e9743aa85ba940">PathPlanning::~PathPlanning</a></div><div class="ttdeci">~PathPlanning()</div><div class="ttdoc">destructor PathPlanning class </div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8cpp_source.html#l00063">PathPlanning.cpp:63</a></div></div>
<div class="ttc" id="classPathPlanning_html_a1346e45eb6566236a55b666e350cb62b"><div class="ttname"><a href="classPathPlanning.html#a1346e45eb6566236a55b666e350cb62b">PathPlanning::MaxCount</a></div><div class="ttdeci">int MaxCount</div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8h_source.html#l00054">PathPlanning.h:54</a></div></div>
<div class="ttc" id="classPathPlanning_html_a8ffa246d97c8d79cb18a1fd61e805467"><div class="ttname"><a href="classPathPlanning.html#a8ffa246d97c8d79cb18a1fd61e805467">PathPlanning::count</a></div><div class="ttdeci">int count</div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8h_source.html#l00052">PathPlanning.h:52</a></div></div>
<div class="ttc" id="classPathPlanning_html_aaa87b2917fd4cc8705601b037458dbec"><div class="ttname"><a href="classPathPlanning.html#aaa87b2917fd4cc8705601b037458dbec">PathPlanning::angularSpeed</a></div><div class="ttdeci">float angularSpeed</div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8h_source.html#l00058">PathPlanning.h:58</a></div></div>
<div class="ttc" id="classPathPlanning_html_a95ffa20c78692b3af113a52f37607f23"><div class="ttname"><a href="classPathPlanning.html#a95ffa20c78692b3af113a52f37607f23">PathPlanning::pubVel</a></div><div class="ttdeci">ros::Publisher pubVel</div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8h_source.html#l00062">PathPlanning.h:62</a></div></div>
<div class="ttc" id="classPathPlanning_html_a1835423557580f21ff1d569e892cc0d5"><div class="ttname"><a href="classPathPlanning.html#a1835423557580f21ff1d569e892cc0d5">PathPlanning::nh</a></div><div class="ttdeci">ros::NodeHandle nh</div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8h_source.html#l00064">PathPlanning.h:64</a></div></div>
<div class="ttc" id="classPathPlanning_html_ac8bdfa5f35d5819bd7981e15b95c637b"><div class="ttname"><a href="classPathPlanning.html#ac8bdfa5f35d5819bd7981e15b95c637b">PathPlanning::linearPathGenerator</a></div><div class="ttdeci">void linearPathGenerator()</div><div class="ttdoc">linear generator function </div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8cpp_source.html#l00074">PathPlanning.cpp:74</a></div></div>
<div class="ttc" id="classPathPlanning_html_adc9393eeed2386dd694935a241d61dc2"><div class="ttname"><a href="classPathPlanning.html#adc9393eeed2386dd694935a241d61dc2">PathPlanning::msg</a></div><div class="ttdeci">geometry_msgs::Twist msg</div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8h_source.html#l00060">PathPlanning.h:60</a></div></div>
<div class="ttc" id="classCollisionDetector_html"><div class="ttname"><a href="classCollisionDetector.html">CollisionDetector</a></div><div class="ttdoc">class to find the the presence of the obstacle and to distinguish the position of the obstance in the...</div><div class="ttdef"><b>Definition:</b> <a href="CollisionDetector_8h_source.html#l00046">CollisionDetector.h:46</a></div></div>
<div class="ttc" id="classPathPlanning_html_a88e654d2dffefce6b3253dca0d05af2c"><div class="ttname"><a href="classPathPlanning.html#a88e654d2dffefce6b3253dca0d05af2c">PathPlanning::linearSpeed</a></div><div class="ttdeci">float linearSpeed</div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8h_source.html#l00056">PathPlanning.h:56</a></div></div>
<div class="ttc" id="classPathPlanning_html_a698ed28a6ed1408f311af37170a180a2"><div class="ttname"><a href="classPathPlanning.html#a698ed28a6ed1408f311af37170a180a2">PathPlanning::collisiondetector</a></div><div class="ttdeci">CollisionDetector collisiondetector</div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8h_source.html#l00050">PathPlanning.h:50</a></div></div>
<div class="ttc" id="CollisionDetector_8h_html"><div class="ttname"><a href="CollisionDetector_8h.html">CollisionDetector.h</a></div><div class="ttdoc">CollisionDetector class declaration Declares functions to publish distance from the obstacle and coll...</div></div>
<div class="ttc" id="classPathPlanning_html_ad30204ed2c193139c5d5b3f8ed07bc8d"><div class="ttname"><a href="classPathPlanning.html#ad30204ed2c193139c5d5b3f8ed07bc8d">PathPlanning::sub</a></div><div class="ttdeci">ros::Subscriber sub</div><div class="ttdef"><b>Definition:</b> <a href="PathPlanning_8h_source.html#l00066">PathPlanning.h:66</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_4af1909fcb234603ea952fce24c95722.html">frontier_exploration_turtlebot</a></li><li class="navelem"><a class="el" href="PathPlanning_8h.html">PathPlanning.h</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
</ul>
</div>
</body>
</html>
| 130.964029 | 7,578 | 0.718523 |
8019a44b721bb2c6e68ff4662feffc27729f40c5 | 17,100 | java | Java | main/plugins/org.talend.commons.ui/src/main/java/org/talend/commons/ui/swt/linking/TableToTreeLinker.java | coheigea/tcommon-studio-se | 681d9a8240b120f5633d751590ac09d31ea8879b | [
"Apache-2.0"
] | 75 | 2015-01-29T03:23:32.000Z | 2022-02-26T07:05:40.000Z | main/plugins/org.talend.commons.ui/src/main/java/org/talend/commons/ui/swt/linking/TableToTreeLinker.java | coheigea/tcommon-studio-se | 681d9a8240b120f5633d751590ac09d31ea8879b | [
"Apache-2.0"
] | 813 | 2015-01-21T09:36:31.000Z | 2022-03-30T01:15:29.000Z | main/plugins/org.talend.commons.ui/src/main/java/org/talend/commons/ui/swt/linking/TableToTreeLinker.java | coheigea/tcommon-studio-se | 681d9a8240b120f5633d751590ac09d31ea8879b | [
"Apache-2.0"
] | 272 | 2015-01-08T06:47:46.000Z | 2022-02-09T23:22:27.000Z | // ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.ui.swt.linking;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import org.eclipse.core.runtime.Platform;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Item;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;
import org.talend.commons.ui.runtime.ws.WindowSystem;
import org.talend.commons.ui.swt.drawing.background.IBackgroundRefresher;
import org.talend.commons.ui.swt.drawing.background.IBgDrawableComposite;
import org.talend.commons.ui.swt.drawing.link.BezierHorizontalLink;
import org.talend.commons.ui.swt.drawing.link.ExtremityEastArrow;
import org.talend.commons.ui.swt.drawing.link.IDrawableLink;
import org.talend.commons.ui.swt.drawing.link.IExtremityLink;
import org.talend.commons.ui.swt.drawing.link.IStyleLink;
import org.talend.commons.ui.swt.drawing.link.LinkDescriptor;
import org.talend.commons.ui.swt.drawing.link.LinksManager;
import org.talend.commons.ui.swt.drawing.link.StyleLink;
import org.talend.commons.ui.utils.TreeUtils;
/**
* bqian class global comment. Detailled comment <br/>
*
* $Id: TableToTreeLinker.java,v 1.1 2007/06/12 07:20:38 gke Exp $
*
* @param <D1> the data item of extremety 1
* @param <D2> the data item of extremety 2
*/
public class TableToTreeLinker<D1, D2> extends BgDrawableComposite implements IBgDrawableComposite, IControlsLinker {
protected LinksManager<Item, D1, Tree, D2> linksManager = new LinksManager<Item, D1, Tree, D2>();
private IStyleLink defaultStyleLink;
private IStyleLink selectedStyleLink;
private IStyleLink unselectedStyleLink;
private Comparator<LinkDescriptor<Item, D1, Tree, D2>> drawingLinksComparator;
private IBackgroundRefresher backgroundRefresher;
private Display display;
private Table source;
private Tree target;
private DataToTableItemCache dataToTableItemCache;
private Integer xStartBezierLink;
/**
* DOC amaumont TreeToTableLinker constructor comment.
*
* @param source
* @param table
*/
public TableToTreeLinker(Composite commonParent) {
super(commonParent);
}
/**
* DOC amaumont Comment method "init".
*
* @param sourceTable
* @param targetTree
* @param backgroundRefresher
*/
public void init(Table sourceTable, Tree targetTree, IBackgroundRefresher backgroundRefresher) {
this.display = sourceTable.getDisplay();
this.backgroundRefresher = backgroundRefresher;
LinkableTree linkableTree = new LinkableTree(this, backgroundRefresher, targetTree, this, false);
targetTree.removeSelectionListener(linkableTree.getSelectionListener());
new LinkableTable(this, backgroundRefresher, sourceTable, this, true);
this.target = targetTree;
this.source = sourceTable;
dataToTableItemCache = new DataToTableItemCache(sourceTable);
}
protected IStyleLink getDefaultStyleLink() {
if (defaultStyleLink == null) {
this.defaultStyleLink = createStandardLink(display.getSystemColor(SWT.COLOR_BLACK));
}
return this.defaultStyleLink;
}
protected StyleLink createStandardLink(Color color) {
StyleLink styleLink = new StyleLink();
BezierHorizontalLink link = new BezierHorizontalLink(styleLink);
// LineLinkWithHorizontalConnectors link = new LineLinkWithHorizontalConnectors(styleLink);
// link.setConnectorWidth(40);
styleLink.setDrawableLink(link);
styleLink.setForegroundColor(color);
styleLink.setLineWidth(2);
styleLink.setExtremity2(new ExtremityEastArrow(styleLink, 0, 0));
return styleLink;
}
/**
* DOC amaumont Comment method "createLinkSorter".
*/
protected void createLinksComparators() {
this.drawingLinksComparator = getDrawingLinksComparator();
}
/**
* Define a comparator to draw links.
*/
protected Comparator<LinkDescriptor<Item, D1, Tree, D2>> getDrawingLinksComparator() {
if (this.drawingLinksComparator == null) {
this.drawingLinksComparator = new Comparator<LinkDescriptor<Item, D1, Tree, D2>>() {
public int compare(LinkDescriptor<Item, D1, Tree, D2> link1, LinkDescriptor<Item, D1, Tree, D2> link2) {
IStyleLink link1StyleLink = link1.getStyleLink();
IStyleLink link2StyleLink = link2.getStyleLink();
if (link1StyleLink == link2StyleLink) {
return 0;
}
if (link1StyleLink == getUnselectedStyleLink()) {
return -1;
}
return 1;
}
};
}
return this.drawingLinksComparator;
}
/*
* (non-Javadoc)
*
* @see org.talend.commons.ui.swt.drawing.link.BackgroundRefresher#drawBackground(org.eclipse.swt.graphics.GC)
*/
@Override
public void drawBackground(GC gc) {
if (gc == null) {
return;
}
// TimeMeasure.measureActive = true;
// TimeMeasure.display = true;
//
// TimeMeasure.begin("drawBackground");
List<LinkDescriptor<Item, D1, Tree, D2>> links = linksManager.getLinks();
int lstSize = links.size();
if (xStartBezierLink == null || xStartBezierLink < 10) {
xStartBezierLink = findXRightStartBezierLink(source.getItems(), 0);
}
Point sourceToCommonPoint = display.map(source, getBgDrawableComposite(), new Point(0, 0));
int treeItemHeight = source.getItemHeight();
Rectangle tableBounds = source.getBounds();
if (WindowSystem.isGTK()) {
gc.setAdvanced(false);
} else {
gc.fillRectangle(sourceToCommonPoint.x, sourceToCommonPoint.y, tableBounds.width - source.getBorderWidth(),
tableBounds.height - source.getBorderWidth());
if (backgroundRefresher.isAntialiasAllowed()) {
gc.setAntialias(SWT.ON);
} else {
gc.setAntialias(SWT.OFF);
}
}
// int countStraight = 0;
// int drawnLinks = 0;
// System.out.println("Drawing:" + gc.handle);
// TimeMeasure.step("drawBackground", "before loop");
Point pointStartStraight = new Point(0, 0);
Point pointEndStraight = new Point(0, 0);
for (int i = 0; i < lstSize; i++) {
// TimeMeasure.begin("loop");
LinkDescriptor<Item, D1, Tree, D2> link = links.get(i);
Tree tree = link.getExtremity2().getGraphicalObject();
Point tableToCommonPoint = display.map(tree, getBgDrawableComposite(), new Point(0, 0));
IDrawableLink drawableLink = link.getStyleLink().getDrawableLink();
if (drawableLink == null) {
drawableLink = getDefaultStyleLink().getDrawableLink();
}
drawableLink.getStyle().apply(gc);
IExtremityLink<Item, D1> extremity1 = link.getExtremity1();
IExtremityLink<Tree, D2> extremity2 = link.getExtremity2();
// see bug 7360
dataToTableItemCache.clear();
TableItem tableItem = dataToTableItemCache.getTableItem(extremity1.getDataItem());
Rectangle tableItemBounds = tableItem.getBounds();
int yStraight = sourceToCommonPoint.y + treeItemHeight / 2 + tableItemBounds.y;
pointEndStraight.x = sourceToCommonPoint.x + xStartBezierLink;
if (Platform.OS_MACOSX.equals(Platform.getOS()) || Platform.OS_LINUX.equals(Platform.getOS())) {
pointStartStraight.x = sourceToCommonPoint.x + tableItem.getParent().getBounds().width;
pointEndStraight.x = pointStartStraight.x;
} else {
pointStartStraight.x = sourceToCommonPoint.x + tableItemBounds.x + tableItemBounds.width;
}
pointStartStraight.y = yStraight;
pointEndStraight.y = yStraight;
TreeItem treeItem = getFirstVisibleTreeItemOfPath(extremity2.getDataItem());
Rectangle treeItemBounds;
if (treeItem != null) {
treeItemBounds = treeItem.getBounds();
} else {
treeItemBounds = new Rectangle(0, 0, 0, 0);
}
Rectangle treeBounds = tree.getBounds();
int pointY = treeItemBounds.y + tree.getItemHeight() / 2 + tree.getBorderWidth();
if (tree.getHeaderVisible()) {
pointY += tree.getHeaderHeight();
}
Point pointEndCentralCurve = null;
pointEndCentralCurve = backgroundRefresher.convertPointToCommonParentOrigin(new Point(treeBounds.x - 10, pointY),
tree);
Point point = display.map(source, getBgDrawableComposite(), new Point(0, 0));
Point offset = getOffset();
int yStartStraight = pointStartStraight.y + offset.y;
boolean isStartOutOfView = false;
boolean isEndOutOfView = false;
if (yStraight < point.y || yStraight > point.y + tableBounds.height) {
isStartOutOfView = true;
} else {
// countStraight++;
}
if (pointEndCentralCurve.y < tableToCommonPoint.y) {
pointEndCentralCurve.y = tableToCommonPoint.y;
isEndOutOfView = true;
}
if (pointEndCentralCurve.y > tableToCommonPoint.y + treeBounds.height) {
pointEndCentralCurve.y = tableToCommonPoint.y + treeBounds.height - 2 * tree.getBorderWidth();
isEndOutOfView = true;
}
// TimeMeasure.step("loop", "middle");
if (!(isStartOutOfView && isEndOutOfView)) {
boolean lineStyleDot = isStartOutOfView || isEndOutOfView;
if ((treeItem != null && treeItem.getData() == extremity2.getDataItem()) && !lineStyleDot) {
gc.setLineStyle(SWT.LINE_SOLID);
} else {
gc.setLineStyle(SWT.LINE_DOT);
}
gc.drawLine(pointStartStraight.x + offset.x, yStartStraight, pointEndStraight.x + offset.x, yStartStraight);
if (WindowSystem.isGTK()) {
pointStartStraight.x += -15;
}
pointEndStraight.x += offset.x;
pointEndStraight.y += offset.y;
pointEndCentralCurve.x += offset.x - 6;
pointEndCentralCurve.y += offset.y;
// Added by Marvin Wang on Nov. 28, 2012 for bug TDI-23378. This is not the best way to fix this issue,
// but till now I have not found the root cause.
if (Platform.OS_LINUX.equals(Platform.getOS())) {
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height - treeItemHeight / 2;
}
if (Platform.OS_MACOSX.equals(Platform.getOS())) {
pointEndCentralCurve.y = pointEndCentralCurve.y - tableItem.getBounds().height;
}
drawableLink.setPoint1(pointEndStraight);
drawableLink.setPoint2(pointEndCentralCurve);
drawableLink.draw(gc);
// drawnLinks++;
}
// TimeMeasure.end("loop");
}
// TimeMeasure.end("drawBackground");
// System.out.println("countStraight=" + countStraight);
// System.out.println("drawnLinks=" + drawnLinks);
}
/**
* DOC nrousseau Comment method "getFirstVisibleTreeItemOfPath".
*
* @param dataItem
* @return
*/
protected TreeItem getFirstVisibleTreeItemOfPath(D2 dataItem) {
return TreeUtils.getTreeItem(this.target, dataItem);
}
/**
* amaumont Comment method "findMaxWidth".
*
* @param items
* @param maxWidth
* @return
*/
private int findXRightStartBezierLink(TableItem[] items, int maxWidth) {
for (TableItem item2 : items) {
TableItem item = item2;
if (!item.isDisposed()) {
Rectangle bounds = item.getBounds();
maxWidth = Math.max(maxWidth, bounds.x + bounds.width);
}
}
return maxWidth;
}
public void updateLinksStyleAndControlsSelection(Control currentControl, Boolean flag) {
boolean isSource = false;
if (currentControl == this.getSource()) {
isSource = true;
} else if (currentControl == this.getTarget()) {
isSource = false;
} else {
throw new IllegalArgumentException("This type of currentControl is unsupported"); //$NON-NLS-1$
}
HashSet selectedItems = new HashSet();
if (isSource) {
getTarget().deselectAll();
TreeItem[] selection = getTarget().getSelection();
for (TreeItem tableItem : selection) {
selectedItems.add(tableItem.getData());
}
} else {
getSource().deselectAll();
TableItem[] selection = getSource().getSelection();
for (TableItem treeItem : selection) {
selectedItems.add(treeItem.getData());
}
}
List<LinkDescriptor<Item, D1, Tree, D2>> links = linksManager.getLinks();
for (LinkDescriptor<Item, D1, Tree, D2> link : links) {
IStyleLink styleLink = null;
IExtremityLink extremity = null;
if (isSource) {
extremity = link.getExtremity2();
} else {
extremity = link.getExtremity1();
}
boolean currentItemIsSelected = selectedItems.contains(extremity.getDataItem());
if (currentItemIsSelected) {
styleLink = selectedStyleLink;
} else {
styleLink = unselectedStyleLink;
}
if (styleLink == null) {
styleLink = getDefaultStyleLink();
}
link.setStyleLink(styleLink);
}
linksManager.sortLinks(getDrawingLinksComparator());
backgroundRefresher.refreshBackground();
}
/**
* Getter for selectedStyleLink.
*
* @return the selectedStyleLink
*/
public IStyleLink getSelectedStyleLink() {
return this.selectedStyleLink;
}
/**
* Sets the selectedStyleLink.
*
* @param selectedStyleLink the selectedStyleLink to set
*/
public void setSelectedStyleLink(IStyleLink selectedStyleLink) {
this.selectedStyleLink = selectedStyleLink;
}
/**
* Getter for unselectedStyleLink.
*
* @return the unselectedStyleLink
*/
public IStyleLink getUnselectedStyleLink() {
return this.unselectedStyleLink;
}
/**
* Sets the unselectedStyleLink.
*
* @param unselectedStyleLink the unselectedStyleLink to set
*/
public void setUnselectedStyleLink(IStyleLink unselectedStyleLink) {
this.unselectedStyleLink = unselectedStyleLink;
}
/**
* Getter for backgroundRefresher.
*
* @return the backgroundRefresher
*/
public IBackgroundRefresher getBackgroundRefresher() {
return this.backgroundRefresher;
}
/**
* Sets the backgroundRefresher.
*
* @param backgroundRefresher the backgroundRefresher to set
*/
public void setBackgroundRefresher(IBackgroundRefresher backgroundRefresher) {
this.backgroundRefresher = backgroundRefresher;
}
/**
* Getter for tables.
*
* @return the tables
*/
public Tree getTarget() {
return this.target;
}
/**
* Getter for tree.
*
* @return the tree
*/
public Table getSource() {
return this.source;
}
/**
* Getter for linksManager.
*
* @return the linksManager
*/
protected LinksManager<Item, D1, Tree, D2> getLinksManager() {
return this.linksManager;
}
} | 34.337349 | 125 | 0.613509 |
f238f32337fa3c2920df34bcdefa01a0645c9b40 | 3,796 | dart | Dart | lib/src/widgets/panel/inspector_panel.dart | kekland/inspector | 66be8e8ad96ab1236cc5f82ba8245fbacbaa33be | [
"MIT"
] | 4 | 2021-11-05T00:48:27.000Z | 2022-02-13T23:26:04.000Z | lib/src/widgets/panel/inspector_panel.dart | kekland/inspector | 66be8e8ad96ab1236cc5f82ba8245fbacbaa33be | [
"MIT"
] | null | null | null | lib/src/widgets/panel/inspector_panel.dart | kekland/inspector | 66be8e8ad96ab1236cc5f82ba8245fbacbaa33be | [
"MIT"
] | 1 | 2021-10-31T15:27:20.000Z | 2021-10-31T15:27:20.000Z | import 'package:flutter/material.dart';
class InspectorPanel extends StatefulWidget {
const InspectorPanel({
Key? key,
required this.isInspectorEnabled,
required this.isColorPickerEnabled,
this.onInspectorStateChanged,
this.onColorPickerStateChanged,
required this.isColorPickerLoading,
}) : super(key: key);
final bool isInspectorEnabled;
final ValueChanged<bool>? onInspectorStateChanged;
final bool isColorPickerEnabled;
final ValueChanged<bool>? onColorPickerStateChanged;
final bool isColorPickerLoading;
@override
_InspectorPanelState createState() => _InspectorPanelState();
}
class _InspectorPanelState extends State<InspectorPanel> {
bool _isVisible = true;
bool get _isInspectorEnabled => widget.onInspectorStateChanged != null;
bool get _isColorPickerEnabled => widget.onColorPickerStateChanged != null;
void _toggleVisibility() {
setState(() => _isVisible = !_isVisible);
}
void _toggleInspectorState() {
assert(_isInspectorEnabled);
widget.onInspectorStateChanged!(!widget.isInspectorEnabled);
}
void _toggleColorPickerState() {
assert(_isColorPickerEnabled);
widget.onColorPickerStateChanged!(!widget.isColorPickerEnabled);
}
IconData get _visibilityButtonIcon {
if (_isVisible) return Icons.chevron_right;
if (widget.isInspectorEnabled) {
return Icons.format_shapes;
} else if (widget.isColorPickerEnabled) {
return Icons.palette;
}
return Icons.chevron_left;
}
Color get _visibilityButtonBackgroundColor {
if (_isVisible) return Colors.white;
if (widget.isInspectorEnabled || widget.isColorPickerEnabled) {
return Colors.blue;
}
return Colors.white;
}
Color get _visibilityButtonForegroundColor {
if (_isVisible) return Colors.black54;
if (widget.isInspectorEnabled || widget.isColorPickerEnabled) {
return Colors.white;
}
return Colors.black54;
}
@override
Widget build(BuildContext context) {
final _height = 16.0 +
(_isInspectorEnabled ? 56.0 : 0.0) +
(_isColorPickerEnabled ? 64.0 : 0.0);
return Padding(
padding: const EdgeInsets.only(right: 8.0),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
FloatingActionButton(
mini: true,
onPressed: _toggleVisibility,
backgroundColor: _visibilityButtonBackgroundColor,
foregroundColor: _visibilityButtonForegroundColor,
child: Icon(_visibilityButtonIcon),
),
if (_isVisible) ...[
const SizedBox(height: 16.0),
if (_isInspectorEnabled)
FloatingActionButton(
onPressed: _toggleInspectorState,
backgroundColor:
widget.isInspectorEnabled ? Colors.blue : Colors.white,
foregroundColor:
widget.isInspectorEnabled ? Colors.white : Colors.black54,
child: const Icon(Icons.format_shapes),
),
if (_isColorPickerEnabled) ...[
const SizedBox(height: 8.0),
FloatingActionButton(
onPressed: _toggleColorPickerState,
backgroundColor:
widget.isColorPickerEnabled ? Colors.blue : Colors.white,
foregroundColor:
widget.isColorPickerEnabled ? Colors.white : Colors.black54,
child: widget.isColorPickerLoading
? const CircularProgressIndicator(color: Colors.white)
: const Icon(Icons.palette),
),
],
] else
SizedBox(height: _height),
],
),
);
}
}
| 29.889764 | 80 | 0.650158 |
83d22e8efacdd4e5d520c0be801d5317bc8371f2 | 918 | java | Java | library/src/main/java/com/pengrad/telegrambot/request/AbstractUploadRequest.java | Alexbols/java-telegram-bot-api | 674a46125bad438d2b8f7dcd234badd63c5b29fe | [
"Apache-2.0"
] | 2 | 2017-04-14T06:28:24.000Z | 2017-07-14T06:40:51.000Z | library/src/main/java/com/pengrad/telegrambot/request/AbstractUploadRequest.java | Alexbols/java-telegram-bot-api | 674a46125bad438d2b8f7dcd234badd63c5b29fe | [
"Apache-2.0"
] | null | null | null | library/src/main/java/com/pengrad/telegrambot/request/AbstractUploadRequest.java | Alexbols/java-telegram-bot-api | 674a46125bad438d2b8f7dcd234badd63c5b29fe | [
"Apache-2.0"
] | 2 | 2017-07-14T06:40:54.000Z | 2018-01-21T14:37:01.000Z | package com.pengrad.telegrambot.request;
import com.pengrad.telegrambot.response.BaseResponse;
import java.io.File;
/**
* Stas Parshin
* 23 July 2017
*/
abstract public class AbstractUploadRequest<T extends BaseRequest, R extends BaseResponse> extends BaseRequest<T, R> {
private final boolean isMultipart;
public AbstractUploadRequest(Class<? extends R> responseClass, String paramName, Object data) {
super(responseClass);
if (data instanceof String) {
isMultipart = false;
} else if (data instanceof File) {
isMultipart = true;
} else if (data instanceof byte[]) {
isMultipart = true;
} else {
throw new IllegalArgumentException("Sending data should be String, File or byte[]");
}
add(paramName, data);
}
@Override
public boolean isMultipart() {
return isMultipart;
}
}
| 27 | 118 | 0.649237 |
4b145afeb756b62b2d4ed231c63e8b284a8ee171 | 952 | swift | Swift | AferoSwiftSDK/Core/Errors.swift | reid0008/AferoSwiftSDK | 71af48b66894e984775512949ce023d25b36c72c | [
"MIT"
] | 1 | 2020-02-09T22:06:52.000Z | 2020-02-09T22:06:52.000Z | AferoSwiftSDK/Core/Errors.swift | reid0008/AferoSwiftSDK | 71af48b66894e984775512949ce023d25b36c72c | [
"MIT"
] | 1 | 2022-02-22T02:15:07.000Z | 2022-02-22T02:15:07.000Z | AferoSwiftSDK/Core/Errors.swift | reid0008/AferoSwiftSDK | 71af48b66894e984775512949ce023d25b36c72c | [
"MIT"
] | 1 | 2020-06-26T19:39:04.000Z | 2020-06-26T19:39:04.000Z | //
// Errors.swift
// iTokui
//
// Created by Justin Middleton on 10/27/16.
// Copyright © 2016 Kiban Labs, Inc. All rights reserved.
//
import Foundation
extension String: Error { }
public extension NSError {
convenience init(domain: String, code: Int, userInfo: [String: Any]? = nil, localizedDescription: String, underlyingError: NSError? = nil) {
var localUserInfo: [String: Any] = userInfo ?? [:]
localUserInfo[NSLocalizedDescriptionKey] = localizedDescription
if let underlyingError = underlyingError {
localUserInfo[NSUnderlyingErrorKey] = underlyingError
}
self.init(domain: domain, code: code, userInfo: userInfo)
}
var underlyingError: NSError? {
return self.userInfo[NSUnderlyingErrorKey] as? NSError
}
}
public extension Error {
var localizedFailureReason: String? {
return (self as NSError).localizedFailureReason
}
}
| 25.72973 | 144 | 0.668067 |
cf5be0e80aa9636181a0c902af43f61908218d2e | 1,209 | dart | Dart | lib/core/service/navigator/navigation_service.dart | afifahsalimi/flutter_boilerplate | 37eccde06a7241f9a7ff0dde4cae60df0e9e9564 | [
"MIT"
] | null | null | null | lib/core/service/navigator/navigation_service.dart | afifahsalimi/flutter_boilerplate | 37eccde06a7241f9a7ff0dde4cae60df0e9e9564 | [
"MIT"
] | null | null | null | lib/core/service/navigator/navigation_service.dart | afifahsalimi/flutter_boilerplate | 37eccde06a7241f9a7ff0dde4cae60df0e9e9564 | [
"MIT"
] | null | null | null | import 'package:flutter/material.dart';
class NavigationService {
final GlobalKey<NavigatorState> _navigationKey = GlobalKey<NavigatorState>();
GlobalKey<NavigatorState> get navigationKey => _navigationKey;
void pop({dynamic result}) {
return _navigationKey.currentState.pop(result);
}
void popToTop() {
return _navigationKey.currentState.popUntil((route) => route.isFirst);
}
void popUntilRouteName(String value) {
return _navigationKey.currentState
.popUntil((route) => route.settings.name == value);
}
Future<dynamic> navigateTo(String routeName, {dynamic arguments}) {
return _navigationKey.currentState
.pushNamed(routeName, arguments: arguments);
}
Future<dynamic> pushAndRemoveUntil(String pushNamed,
{String removeUntilNamed, Object arguments}) async {
if (removeUntilNamed != null) {
return _navigationKey.currentState.pushNamedAndRemoveUntil(
pushNamed,
ModalRoute.withName(removeUntilNamed),
arguments: arguments,
);
} else {
return _navigationKey.currentState.pushNamedAndRemoveUntil(
pushNamed,
(route) => false,
arguments: arguments,
);
}
}
}
| 28.785714 | 79 | 0.698925 |
e749d8a66f9a820921f2ca833ddd9985ac24f1f1 | 1,952 | js | JavaScript | src/api/signal-providers/signal-providers.schemas.js | AlgoTrdng/algo-trading-api | 36e032003a0227ed27e9abe18be5ff91ba795f51 | [
"MIT"
] | null | null | null | src/api/signal-providers/signal-providers.schemas.js | AlgoTrdng/algo-trading-api | 36e032003a0227ed27e9abe18be5ff91ba795f51 | [
"MIT"
] | null | null | null | src/api/signal-providers/signal-providers.schemas.js | AlgoTrdng/algo-trading-api | 36e032003a0227ed27e9abe18be5ff91ba795f51 | [
"MIT"
] | null | null | null | const Joi = require('joi')
const capitalize = require('lodash.capitalize')
const overallResultsSchema = Joi.object({
_id: Joi.string().required(),
totalPnl: Joi.number().default(0),
positionsAmt: Joi.number().min(0).default(0),
profitablePositionsAmt: Joi.number().min(0).max(Joi.ref('positionsAmt')).default(0),
averageDuration: Joi.number().min(0).default(0),
averageProfit: Joi.number().default(0),
maxDrawdown: Joi.number().allow(null).default(null),
hitRate: Joi.number().allow(null).default(null),
})
const adjust = (_price) => {
if (_price === null) {
return 'profit-sharing'
}
if (_price === 0) {
return 'free'
}
return 'monthly'
}
const providersSchema = Joi.object({
url: Joi.string().uri().trim().required(),
provider: Joi.string().valid(Joi.ref('url', {
adjust: (_url) => {
const urlObj = new URL(_url)
const name = urlObj.hostname.split('.')[0]
return name
},
})).default(Joi.ref('url', {
adjust: (_url) => {
const urlObj = new URL(_url)
const name = urlObj.hostname.split('.')[0]
return name
},
})),
price: Joi.number().min(0).allow(null).required(),
subscription: Joi.string().valid(Joi.ref('price', { adjust })).default(Joi.ref('price', { adjust })),
})
const signalProvidersSchema = Joi.object({
_id: Joi.string().trim().required(),
displayName: Joi.string().valid(Joi.ref('_id', {
adjust: (_nameId) => capitalize(_nameId.replace(new RegExp('-', 'g'), ' ')),
})).default(Joi.ref('_id', {
adjust: (_nameId) => capitalize((_nameId || '').replace(new RegExp('-', 'g'), ' ')),
})),
providers: Joi.array().items(providersSchema).default([]),
overallResults: Joi.array().items(overallResultsSchema).default([]),
})
const putBodySchema = Joi.object({
strategyId: Joi.string().required(),
providers: Joi.array().items(providersSchema).required(),
})
module.exports = {
signalProvidersSchema,
putBodySchema,
}
| 29.575758 | 103 | 0.63832 |
84b9f87c83b3480920a906e0d9e570c8fc2b35a0 | 3,017 | sql | SQL | database/db_usuario.sql | Gustavo-Victor/crud-mysql-php-oop | 86540f306e3efd7046d82a303ffe5132899aaabe | [
"MIT"
] | null | null | null | database/db_usuario.sql | Gustavo-Victor/crud-mysql-php-oop | 86540f306e3efd7046d82a303ffe5132899aaabe | [
"MIT"
] | null | null | null | database/db_usuario.sql | Gustavo-Victor/crud-mysql-php-oop | 86540f306e3efd7046d82a303ffe5132899aaabe | [
"MIT"
] | null | null | null | -- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 15-Jul-2021 às 20:35
-- Versão do servidor: 10.4.18-MariaDB
-- versão do PHP: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Banco de dados: `db_usuario`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `tbl_usuario`
--
CREATE TABLE `tbl_usuario` (
`id` smallint(6) NOT NULL,
`nome` char(70) NOT NULL,
`email` char(70) NOT NULL,
`created` datetime DEFAULT NULL,
`modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Extraindo dados da tabela `tbl_usuario`
--
INSERT INTO `tbl_usuario` (`id`, `nome`, `email`, `created`, `modified`) VALUES
(1, 'Gustavo Guanabara G', 'guanabarator3000@gmail.com', '2021-07-13 00:45:37', '2021-07-15 20:31:53'),
(2, 'Juliana Souza', 'julianasouza321@gmail.com', '2021-07-13 00:45:37', NULL),
(3, 'Gabriel Silva', 'gabrielsilva333@hotmail.com', '2021-07-13 00:46:40', NULL),
(11, 'Guilherme Barbosa', 'guilhermebarbosa321@gmail.com', '2021-07-13 15:03:52', NULL),
(12, 'Givanildo Souza Silva', 'gilsouza445@hotmail.com', '2021-07-13 15:04:05', '2021-07-13 15:08:10'),
(13, 'Ingrid Vitória', 'ingridvitoria@gmail.com', '2021-07-13 15:04:13', NULL),
(14, 'Gabriel Santos', 'gabrielzinhosantos987@outlook.com', '2021-07-13 15:04:34', NULL),
(15, 'Sabrina Campos da Silva', 'sabrina432@gmail.com', '2021-07-13 15:04:55', '2021-07-14 21:12:21'),
(16, 'Metusalém Abraão', 'metuabraam876@gmail.com', '2021-07-13 15:05:36', NULL),
(17, 'Oliver Queen', 'oliverarrow888@gmail.com', '2021-07-13 15:06:18', NULL),
(18, 'Bruce Wayne', 'brunebat1000@gmail.com', '2021-07-13 15:06:35', NULL),
(19, 'Adriana Aranha', 'drianaaranha86@outlook.com', '2021-07-13 15:07:01', NULL),
(20, 'Marcelo Souza', 'marcelinho@gmail.com', '2021-07-13 15:07:17', NULL),
(21, 'Luciano Silva', 'lucianosilva@gmail.com', '2021-07-13 15:07:36', NULL),
(25, 'Rasengan no jutsu', 'rasengannojutsu@gmail.com', '2021-07-14 20:57:27', NULL),
(28, 'Welbister Silva', 'welbister@gmail.com', '2021-07-14 21:16:10', '2021-07-14 21:16:18'),
(29, 'Adriana Souza', 'arianasouza321@hotmail.com', '2021-07-15 20:32:13', NULL);
--
-- Índices para tabelas despejadas
--
--
-- Índices para tabela `tbl_usuario`
--
ALTER TABLE `tbl_usuario`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT de tabelas despejadas
--
--
-- AUTO_INCREMENT de tabela `tbl_usuario`
--
ALTER TABLE `tbl_usuario`
MODIFY `id` smallint(6) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=30;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
| 35.494118 | 103 | 0.68114 |
2ede1ae22df286ff9bec6db0a4c9ee04bbdb36ca | 685 | asm | Assembly | oeis/102/A102001.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 11 | 2021-08-22T19:44:55.000Z | 2022-03-20T16:47:57.000Z | oeis/102/A102001.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 9 | 2021-08-29T13:15:54.000Z | 2022-03-09T19:52:31.000Z | oeis/102/A102001.asm | neoneye/loda-programs | 84790877f8e6c2e821b183d2e334d612045d29c0 | [
"Apache-2.0"
] | 3 | 2021-08-22T20:56:47.000Z | 2021-09-29T06:26:12.000Z | ; A102001: A weighted tribonacci, (1,2,4).
; Submitted by Jon Maiga
; 1,3,9,19,49,123,297,739,1825,4491,11097,27379,67537,166683,411273,1014787,2504065,6178731,15246009,37619731,92826673,229050171,565182441,1394589475,3441155041,8491063755,20951731737,51698479411,127566197905,314770083675,776696397129,1916501356099,4728974485057,11668762785771,28792717180281,71046140692051,175306626195697,432569776300923,1067367591460521,2633733648845155,6498747936969889,16035685600502283,39568116069822681,97634479018706803,240913453560361297,594454875877065627
add $0,3
mov $2,1
lpb $0
sub $0,1
mov $3,$4
mov $4,$2
add $2,$3
mul $5,4
add $2,$5
add $2,$3
mov $5,$3
lpe
mov $0,$3
| 38.055556 | 482 | 0.79562 |
15150a6e8af45c22f2e4b72802118e9d4c019e6c | 391 | kt | Kotlin | modules/core/arrow-typeclasses/src/main/kotlin/arrow/typeclasses/suspended/MonadErrorSyntax.kt | starkej2/arrow | f63db8e8a13c653f52823a844f7b6836a57f8fa2 | [
"Apache-2.0"
] | null | null | null | modules/core/arrow-typeclasses/src/main/kotlin/arrow/typeclasses/suspended/MonadErrorSyntax.kt | starkej2/arrow | f63db8e8a13c653f52823a844f7b6836a57f8fa2 | [
"Apache-2.0"
] | null | null | null | modules/core/arrow-typeclasses/src/main/kotlin/arrow/typeclasses/suspended/MonadErrorSyntax.kt | starkej2/arrow | f63db8e8a13c653f52823a844f7b6836a57f8fa2 | [
"Apache-2.0"
] | null | null | null | package arrow.typeclasses.suspended
import arrow.Kind
import arrow.typeclasses.Monad
import arrow.typeclasses.MonadError
interface MonadErrorSyntax<F, E> : MonadSyntax<F>, ApplicativeErrorSyntax<F, E>,MonadError<F, E> {
fun <A> ensure(fa: suspend () -> A, error: () -> E, predicate: (A) -> Boolean): Kind<F, A> =
run<Monad<F>, Kind<F, A>> { fa.effect().ensure(error, predicate) }
} | 32.583333 | 98 | 0.69821 |
03156da2565b2d4b2667e7d199bdfe623867261c | 996 | lua | Lua | profiles/voicemail/sequences/remove_mailbox_deleted_message_files.lua | seven1240/jester | 498c32470956c3bfbe79df44bc396238eb215bad | [
"BSD-Source-Code"
] | 37 | 2015-01-23T11:01:10.000Z | 2021-11-20T14:44:34.000Z | profiles/voicemail/sequences/remove_mailbox_deleted_message_files.lua | seven1240/jester | 498c32470956c3bfbe79df44bc396238eb215bad | [
"BSD-Source-Code"
] | 1 | 2021-04-08T10:47:31.000Z | 2021-04-08T15:02:07.000Z | profiles/voicemail/sequences/remove_mailbox_deleted_message_files.lua | thehunmonkgroup/jester | 3ef650956b0b4eed7746a07800401528b113a8e0 | [
"MIT"
] | 9 | 2015-04-01T07:59:28.000Z | 2021-08-21T17:50:15.000Z | --[[
Removes message files from a mailbox that have been deleted from the
database.
]]
mailbox = args(1)
domain = args(2)
-- Total number of files to remove.
total_files = storage("message_files_to_remove", "__count")
-- Which file we're currently on.
file_count = storage("counter", "file_row")
-- File info for the current file.
recording = storage("message_files_to_remove", "recording_" .. file_count)
file_to_remove = profile.voicemail_dir .. "/" .. domain .. "/" .. mailbox .. "/" .. recording
return
{
-- Increment the group counter by one. If we're past the total files,
-- then exit.
{
action = "counter",
increment = 1,
storage_key = "file_row",
compare_to = total_files,
if_greater = "none",
},
{
action = "delete_file",
file = file_to_remove,
},
-- Call the sequence again to trigger the next file deletion.
{
action = "call_sequence",
sequence = "remove_mailbox_deleted_message_files " .. mailbox .. "," .. domain,
},
}
| 25.538462 | 93 | 0.662651 |
87325c6b321ed76d06644ad1da73c4eadf35848c | 1,609 | rs | Rust | graph-http/src/iotools.rs | DevLazio/graph-rs | 5ef2d59018e6fc623fcea24c9efe98d4147d5d38 | [
"MIT"
] | 1 | 2019-04-14T21:43:36.000Z | 2019-04-14T21:43:36.000Z | graph-http/src/iotools.rs | DevLazio/graph-rs | 5ef2d59018e6fc623fcea24c9efe98d4147d5d38 | [
"MIT"
] | 92 | 2018-12-21T05:35:37.000Z | 2019-08-29T22:09:15.000Z | graph-http/src/iotools.rs | sreeise/rust-onedrive | 4f4b1a718f7ec26049486538838c74c9a91cd8f1 | [
"MIT"
] | null | null | null | use futures::StreamExt;
use graph_error::ioerror::{AsyncIoError, ThreadedIoError};
use std::{
fs,
path::{Path, PathBuf},
sync::mpsc,
thread,
};
use tokio::io::AsyncWriteExt;
pub fn create_dir<P: AsRef<Path>>(directory: P) -> Result<(), std::io::Error> {
if !directory.as_ref().exists() {
fs::create_dir_all(&directory)?;
}
Ok(())
}
pub async fn create_dir_async<P: AsRef<Path>>(directory: P) -> Result<(), std::io::Error> {
if !directory.as_ref().exists() {
tokio::fs::create_dir_all(directory).await?;
}
Ok(())
}
pub fn copy(
path: PathBuf,
mut response: reqwest::blocking::Response,
) -> Result<PathBuf, ThreadedIoError> {
let (sender, receiver) = mpsc::channel();
let handle = thread::spawn::<_, Result<(), ThreadedIoError>>(move || {
let mut file_writer = fs::OpenOptions::new()
.create(true)
.write(true)
.read(true)
.open(&path)?;
std::io::copy(&mut response, &mut file_writer)?;
sender.send(Some(path))?;
Ok(())
});
handle.join().map_err(ThreadedIoError::Join)??;
receiver.recv()?.ok_or(ThreadedIoError::NoPath)
}
pub async fn copy_async(
path: PathBuf,
response: reqwest::Response,
) -> Result<PathBuf, AsyncIoError> {
let mut file = tokio::fs::OpenOptions::new()
.create(true)
.write(true)
.read(true)
.open(&path)
.await?;
let mut stream = response.bytes_stream();
while let Some(item) = stream.next().await {
file.write_all(&item?).await?;
}
Ok(path)
}
| 26.377049 | 91 | 0.586078 |
203b5d77ae777c37ae42eaab56736ab89114b88b | 4,800 | asm | Assembly | ftoa.asm | magore/picfloat | 7e3e4d1aa5c5258032da6a3b16ff37772844dfb0 | [
"Unlicense"
] | 1 | 2021-07-06T10:41:31.000Z | 2021-07-06T10:41:31.000Z | ftoa.asm | magore/picfloat | 7e3e4d1aa5c5258032da6a3b16ff37772844dfb0 | [
"Unlicense"
] | null | null | null | ftoa.asm | magore/picfloat | 7e3e4d1aa5c5258032da6a3b16ff37772844dfb0 | [
"Unlicense"
] | null | null | null | ;File: ftoa.asm
; ========================================================================
; PIC Floating point library
; ========================================================================
; Copyright (C) 1991,1997,1998,1999,2000,2001,2002,2003 Mike Gore
; 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 <ORGANIZATION> 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
;
; Contact Information
; Mike Gore
; Infowrite Consulting
; 405 Midwood Cres.
; Waterloo Ont
; N2L 5N4
; Phone: 519-884-4943 home
; Fax: 519-885-0548 fax
; Email: magore@sympatico.ca - or - magore@uwaterloo.ca
; ========================================================================
; ========================================================================
; ***** Please Use TABS = 4 when viewing this file ****
; ========================================================================
;
#ifndef FTOA_ASM
#define FTOA_ASM
; INCLUDE "macro.h"
; INCLUDE "fp.h"
; ==========================================================================
; Fpac_fac10: Find Exponent Base 10 of Number
; Return: FTOA_exp = Exponent Base 10 , 1.0 <= FPac < 10.0
;
_FPac_FAC10: ; FTOA_exp = (INT8) LOG10(FPac)
CLR8 FTOA_exp
CLR8 ML_int
TST8 FPac_EXP
JMP_Z _FPac_FAC10_X
; Round IEEE digits (8)
; FPac_RND
; ==========================================================================
; Factor FPac by 10s to restrict the range to 1.0 <= FPac < 10.0
; Notes:
; We do a quick test with exponents only. Keep in mind that
; even when Exponents are equal the mantissas can differ by upto
; nearly 2.0 - so take care with the tests
;
; while(FPac > 1.0) FPac /= 10.0
_FPac_FAC10_DIV10
; IF FPac < 1.0
CMP8I FPac_EXP,0x7F ; FPac <= 1.0 ? (FPac_EXP <= 0x7F)
JMP_LE _FPac_FAC10_MUL10 ; Yes 0x7F > FPac_EXP
; FPac > 1.0
INC8 FTOA_exp
FPac_DIV10
JMP _FPac_FAC10_DIV10
; while(FPac < 1.0) FPac *= 10.0
_FPac_FAC10_MUL10
CMP8I FPac_EXP,0x7F ; FPac >= 1.0 ? (FPac_EXP >= 0x7F)
JMP_GE _FPac_FAC10_X
; FPac < 1.0
DEC8 FTOA_exp
FPac_MUL10
JMP _FPac_FAC10_MUL10
; 10.0 > FPac >= 1.0
_FPac_FAC10_X
ENDSUB
; ==========================================================================
;
_PUT_EXP: ; Display FTOA_exp as Floating Point exponent [+|-]NN
; DISPLAY -/+ SIGN
JMP_BCLR FTOA_exp,7,_PUT_EXP_P
PUTCI '-'
NEG8 FTOA_exp
JMP _PUT_EXP_MAIN
_PUT_EXP_P
PUTCI '+'
; Factor 10s
_PUT_EXP_MAIN
CLR8 FTOA_cnt
_PUT_EXP_10S
SUB8I FTOA_exp,10
JMP_B _PUT_EXP_1S
INC8 FTOA_cnt
JMP _PUT_EXP_10S
_PUT_EXP_1S
; Display 10s
ADD8I FTOA_cnt,'0'
PUTC FTOA_cnt
; Factor 1s
ADD8I FTOA_exp,'0'+10
PUTC FTOA_exp
ENDSUB
; ==========================================================================
; Convert FPac into ASCII
_FTOA: ; Convert FPac to ASCII
FPac_FAC10
; Display Sign
LOAD8I FTOA_cnt,' '
JMP_BCLR FPac_SIGN,7,_ftoa_main ; < 0 ?
LOAD8I FTOA_cnt,'-'
_ftoa_main
PUTC FTOA_cnt
; ==================================================
; Do not use BCD code for int part
LOAD8I FTOA_cnt,9 ; digits
_ftoa_loop
; Put a digit
FP_SPLIT ; FPac = int, FParg = frac
FP_U32 ; AC32 = int(FPac)
ADD8I AC32_LSB,'0'
PUTC AC32_LSB
FPac_SWAP ; FPac = frac
FPac_MUL10 ; frac *= 10
;
CMP8I FTOA_cnt,9 ; First Digit ?
JMP_NZ _ftoa_dec
PUTCI '.' ; Display Decimal
_ftoa_dec
DJNZ8 FTOA_cnt,_ftoa_loop
PUTCI 'E'
PUT_EXP
_ftoa_x
ENDSUB
; ============================================================
; ENDIF FTOA_ASM
#endif
| 28.915663 | 78 | 0.615625 |
fbc3d4b30a49075c86cee5a50067beaea7eb9fdc | 2,638 | java | Java | ngDesk-Workflow-Service/src/main/java/com/ngdesk/workflow/channels/chat/ChatPrompt.java | SubscribeIT/ngDesk | 07909d755fb2c0e459cbb816543a4898829397d1 | [
"Apache-2.0"
] | 2 | 2021-11-10T04:57:47.000Z | 2022-01-05T04:24:35.000Z | ngDesk-Workflow-Service/src/main/java/com/ngdesk/workflow/channels/chat/ChatPrompt.java | SubscribeIT/ngDesk | 07909d755fb2c0e459cbb816543a4898829397d1 | [
"Apache-2.0"
] | 206 | 2021-08-30T04:46:44.000Z | 2022-02-22T12:06:45.000Z | ngDesk-Workflow-Service/src/main/java/com/ngdesk/workflow/channels/chat/ChatPrompt.java | SubscribeIT/ngDesk | 07909d755fb2c0e459cbb816543a4898829397d1 | [
"Apache-2.0"
] | 1 | 2021-12-10T08:36:13.000Z | 2021-12-10T08:36:13.000Z | package com.ngdesk.workflow.channels.chat;
import java.util.Date;
import java.util.List;
import org.springframework.data.mongodb.core.mapping.Field;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ngdesk.workflow.dao.Workflow;
public class ChatPrompt {
@JsonProperty("NAME")
@Field("NAME")
private String promptName;
@JsonProperty("DESCRIPTION")
@Field("DESCRIPTION")
private String promptdescription;
@JsonProperty("PROMPT_ID")
@Field("PROMPT_ID")
private String promptId;
@JsonProperty("CONDITIONS")
@Field("CONDITIONS")
private List<Conditions> conditions;
@JsonProperty("WORKFLOW")
@Field("WORKFLOW")
private Workflow workflow;
@JsonProperty("DATE_UPDATED")
@Field("DATE_UPDATED")
private Date dateUpdated;
@JsonProperty("LAST_UPDATED_BY")
@Field("LAST_UPDATED_BY")
private String lastUpdatedBy;
@JsonProperty("RUN_TRIGGER")
@Field("RUN_TRIGGER")
private String runTrigger;
public ChatPrompt() {
}
public ChatPrompt(String promptName, String promptdescription, String promptId, List<Conditions> conditions,
Workflow workflow, Date dateUpdated, String lastUpdatedBy, String runTrigger) {
super();
this.promptName = promptName;
this.promptdescription = promptdescription;
this.promptId = promptId;
this.conditions = conditions;
this.workflow = workflow;
this.dateUpdated = dateUpdated;
this.lastUpdatedBy = lastUpdatedBy;
this.runTrigger = runTrigger;
}
public String getPromptName() {
return promptName;
}
public void setPromptName(String promptName) {
this.promptName = promptName;
}
public String getPromptdescription() {
return promptdescription;
}
public void setPromptdescription(String promptdescription) {
this.promptdescription = promptdescription;
}
public String getPromptId() {
return promptId;
}
public void setPromptId(String promptId) {
this.promptId = promptId;
}
public List<Conditions> getConditions() {
return conditions;
}
public void setConditions(List<Conditions> conditions) {
this.conditions = conditions;
}
public Workflow getWorkflow() {
return workflow;
}
public void setWorkflow(Workflow workflow) {
this.workflow = workflow;
}
public Date getDateUpdated() {
return dateUpdated;
}
public void setDateUpdated(Date dateUpdated) {
this.dateUpdated = dateUpdated;
}
public String getLastUpdatedBy() {
return lastUpdatedBy;
}
public void setLastUpdatedBy(String lastUpdatedBy) {
this.lastUpdatedBy = lastUpdatedBy;
}
public String getRunTrigger() {
return runTrigger;
}
public void setRunTrigger(String runTrigger) {
this.runTrigger = runTrigger;
}
}
| 20.771654 | 109 | 0.756634 |
b214184639ab13de6707b95b3563913bac0f5f6a | 2,274 | sql | SQL | db/netman_db.sql | amrs-tech/NetAdmin | 1e896ea30c4a6a92665d42e68d8ba33f9a3838a9 | [
"MIT"
] | null | null | null | db/netman_db.sql | amrs-tech/NetAdmin | 1e896ea30c4a6a92665d42e68d8ba33f9a3838a9 | [
"MIT"
] | null | null | null | db/netman_db.sql | amrs-tech/NetAdmin | 1e896ea30c4a6a92665d42e68d8ba33f9a3838a9 | [
"MIT"
] | 1 | 2019-02-27T21:06:49.000Z | 2019-02-27T21:06:49.000Z | -- MySQL dump 10.16 Distrib 10.1.25-MariaDB, for osx10.6 (i386)
--
-- Host: localhost Database: netman
-- ------------------------------------------------------
-- Server version 10.1.25-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Current Database: `netman`
--
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `netman` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `netman`;
--
-- Table structure for table `reg`
--
DROP TABLE IF EXISTS `reg`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `reg` (
`fname` varchar(100) DEFAULT NULL,
`lname` varchar(100) DEFAULT NULL,
`email` varchar(200) NOT NULL,
`pwd` varchar(50) DEFAULT NULL,
`role` varchar(50) DEFAULT NULL,
PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `reg`
--
LOCK TABLES `reg` WRITE;
/*!40000 ALTER TABLE `reg` DISABLE KEYS */;
INSERT INTO `reg` VALUES ('ahamed','mus','am@gmail.com','live','Administrator'),('Ahamed','Musthafa','amrs.tech@gmail.com','livemocha','User'),('sample','user','sample@g.co','password','Semi-Admin');
/*!40000 ALTER TABLE `reg` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2019-04-25 22:04:19
| 36.095238 | 199 | 0.69657 |
91550dacffddfaebcae34318a36e24f20ed424cf | 154,587 | html | HTML | output/singleCallsHTML/20190507_invitation.html | the-pudding/earnings-call | 9c7f20c5930af03a9aa5764714b4f674c4fe3020 | [
"MIT"
] | 1 | 2019-07-25T01:56:20.000Z | 2019-07-25T01:56:20.000Z | output/singleCallsHTML/20190507_invitation.html | the-pudding/earnings-call | 9c7f20c5930af03a9aa5764714b4f674c4fe3020 | [
"MIT"
] | 2 | 2020-09-06T05:17:23.000Z | 2021-05-07T23:07:00.000Z | output/singleCallsHTML/20190507_invitation.html | the-pudding/earnings-call | 9c7f20c5930af03a9aa5764714b4f674c4fe3020 | [
"MIT"
] | 1 | 2019-07-02T15:24:03.000Z | 2019-07-02T15:24:03.000Z |
<!DOCTYPE html>
<html lang="en" prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# article: http://ogp.me/ns/article#">
<head>
<script>
// usmf-django
window.top!=window&&(window.analytics=window.top.analytics,window.inIframe=!0);var segmentKey="16mdwrvy5p",segmentSnippetVersion="4.1.0",getSegmentUrl=function(t){var t=t||window.segmentKey;return("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.com/analytics.js/v1/"+t+"/analytics.min.js"},trackerMaker=function(t){var n=[];n.invoked=!1,n.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on"],t&&(n.methods=n.methods.concat(t));var e=function(t){var e=function(){var e=Array.prototype.slice.call(arguments,0),o=[t].concat(e);n.push(o)};return e.stub=!0,e},o=function(){for(var t=0;t<n.methods.length;t++){var o=n.methods[t];n[o]=e(o)}},a=function(t){if(n.invoked)return void(window.console&&console.error&&console.error("Tracking snippet included twice."));var e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=t;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(e,o),n.invoked=!0};return o(),n.load=a,n},analytics=window.analytics=window.analytics||trackerMaker(),Infotrack=window.Infotrack=window.Infotrack||trackerMaker(["initialize"]);
</script>
<meta name="infotrackSnippetVersion" content="3.1.0" data-tracker-key="infotrackSnippetVersion">
<meta name="description" content="INVH earnings call for the period ending March 31, 2019." />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
<meta name="twitter:site" content="@themotleyfool">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Invitation Homes Inc. (INVH) Q1 2019 Earnings Call Transcript @themotleyfool #stocks $INVH">
<meta name="twitter:description" content="INVH earnings call for the period ending March 31, 2019.">
<meta itemprop="name" content="Invitation Homes Inc. (INVH) Q1 2019 Earnings Call Transcript -- The Motley Fool">
<meta itemprop="description" content="INVH earnings call for the period ending March 31, 2019.">
<meta property="og:site_name" content="The Motley Fool" />
<meta property="og:title" content="Invitation Homes Inc. (INVH) Q1 2019 Earnings Call Transcript -- The Motley Fool"/>
<meta property="og:description" content="INVH earnings call for the period ending March 31, 2019."/>
<meta property="og:url" content="https://www.fool.com/earnings/call-transcripts/2019/05/07/invitation-homes-inc-invh-q1-2019-earnings-call-tr.aspx"/>
<meta name="twitter:image" content="https://g.foolcdn.com/editorial/images/1/featured-transcript-logo-template.png"/>
<meta itemprop="image" content="https://g.foolcdn.com/editorial/images/1/featured-transcript-logo-template.png">
<meta property="og:image" content="https://g.foolcdn.com/editorial/images/1/featured-transcript-logo-template.png"/>
<meta property="og:type" content="article"/>
<meta property="fb:pages" content="7240312795" />
<meta property="fb:app_id" content="50808187550" />
<meta name="msvalidate.01" content="8D40D58712924715BAA79D135A6C8DDA" />
<meta name="ResponsiveALP" content="1Ses_3col-pf-246_var2-recirc_33" data-tracker-key="ResponsiveALP" />
<meta name="headline" content="Invitation Homes Inc. (INVH) Q1 2019 Earnings Call Transcript" data-tracker-key="article_headline" />
<meta name="STORY_UID" content="7a9f9abd-4830-48fd-92fe-8e6aa73c9866" data-tracker-key="article_uuid"/>
<meta name="author" content="Motley Fool Transcribers" data-tracker-key="article_author" />
<meta name="date" content="2019-05-08T00:23:44Z"/>
<meta name="gsa_date" content="2019 05 07" data-tracker-key="article_publish_date"/>
<meta name="publish_time" content="20:23" data-tracker-key="article_publish_time" />
<meta name="promo" content="INVH earnings call for the period ending March 31, 2019." />
<meta name="bureau" content="usmf-financials" data-tracker-key="article_bureau" />
<meta name="tags" content="MSN,Yahoo,Default Partners" data-tracker-key="article_tags" />
<meta name="pitch" content="6115" />
<meta name="tickers" content="INVH" data-tracker-key="article_tickers" />
<meta name="article_type" content="transcript" data-tracker-key="article_type" />
<meta name="collection" content="earningscall-transcripts" data-tracker-key="collection" />
<meta property="article:published_time" content="2019-05-07T20:23:44-04:00" />
<meta property="article:author" content="https://www.facebook.com/themotleyfool/" />
<meta property="article:tag" content="usmf-financials" />
<meta property="article:section" content="earnings" />
<title>
Invitation Homes Inc. (INVH) Q1 2019 Earnings Call Transcript -- The Motley Fool
</title>
<link rel="shortcut icon" href="https://g.foolcdn.com/misc-assets/favicon.ico">
<link rel="apple-touch-icon" href="https://g.foolcdn.com/misc-assets/apple-touch-icon.png">
<link rel="canonical" href="https://www.fool.com/earnings/call-transcripts/2019/05/07/invitation-homes-inc-invh-q1-2019-earnings-call-tr.aspx" />
<link rel="amphtml" href="https://www.fool.com/amp/earnings/call-transcripts/2019/05/07/invitation-homes-inc-invh-q1-2019-earnings-call-tr.aspx">
<link rel="stylesheet" href="//g.foolcdn.com/static/dubs/CACHE/css/a6ebb8e736f9.css" type="text/css" />
<link rel="stylesheet" href="//g.foolcdn.com/static/dubs/CACHE/css/526fbe3e41d5.css" type="text/css" />
<script type="text/javascript" src="//g.foolcdn.com/static/dubs/www/js/vendor/jquery-3.3.1.min.a09e13ee94d5.js"></script>
<script async type="text/javascript" src="//g.foolcdn.com/static/dubs/common/js/vendor/prebid1.24.1.a7115cca20e9.js"></script>
<script>
var prebidFool = {
timeout: 1000
};
var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
pbjs.que.push(function() {
var price_bucket = {
'buckets': [
{
'precision': 2,
'min': 0,
'max': 20,
'increment': 0.01,
},
{
'precision': 2,
'min': 20,
'max': 30,
'increment': 0.05,
},
{
'precision': 2,
'min': 30,
'max': 40,
'increment': 0.10,
},
{
'precision': 2,
'min': 40,
'max': 50,
'increment': 0.50,
},
{
'precision': 2,
'min': 50,
'max': 99,
'increment': 1.00,
},
]
};
pbjs.setConfig({
debug: false,
bidderTimeout: 1000,
priceGranularity: price_bucket,
enableSendAllBids: true
});
});
</script>
<script async="async" src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script type="text/javascript">
window.googletag = window.googletag || {};
var googletag = window.googletag;
googletag.cmd = googletag.cmd || [];
window.slots = window.slots || {};
window.adCount = 0;
</script>
<script type="text/javascript" src="//g.foolcdn.com/static/dubs/common/js/fool/fool_ads.edeb6fe2dff5.js"></script>
<script type='text/javascript'>
googletag.cmd.push(function() {
if (typeof(Krux) !== "undefined") {
googletag.pubads().setTargeting("ksg", Krux.segments);
googletag.pubads().setTargeting("kuid", Krux.user);
}
googletag.pubads().setTargeting('ArticleNum', 'article-' + window.article_count_id);
googletag.pubads().setTargeting('bureau', 'usmf-financials');
googletag.pubads().setTargeting('collection', '/earnings/call-transcripts');
googletag.pubads().setTargeting('headline', 'invitation homes inc invh q1 2019 earnings call transcript');
googletag.pubads().setTargeting('adtags', ["msn", "yahoo-money", "default-partners"]);
googletag.pubads().setTargeting('test_bucket', '79');
googletag.pubads().setTargeting('tickers', [""]);
googletag.pubads().setTargeting('suppress_modal', 'False');
googletag.pubads().setTargeting('sessionCount', '0')
googletag.pubads().setTargeting('tenOrMoreSessions', 'False')
googletag.pubads().setTargeting('services', [])
googletag.pubads().setTargeting('uid', '');
googletag.pubads().setTargeting('page_type', 'Non-TSTR-PAGE');
});
</script>
<script type='text/javascript'>
var hbBiddersParams = {"header_desk_sticky": {"criteo": {"zoneId": "1088147"}, "openx": {"delDomain": "motleyfool-d.openx.net", "unit": "539313278"}, "appnexus": {"placementId": "12389966"}}};
//if there are bids -> push them
if(hbBiddersParams) {
var params = [];
hbBiddersParams = hbBiddersParams['header_desk_sticky'];
//push each bidder settings
for (var bidder in hbBiddersParams) {
if (!hbBiddersParams.hasOwnProperty(bidder)) continue;
params.push({
bidder: bidder,
params: hbBiddersParams[bidder]
})
}
adUnits = window.adUnits || [];
adUnits.push({
code: 'div-header_desk_sticky-52340',
mediaTypes: {
banner: {
sizes: [[728, 90], [970, 90]]
}
},
bids: params
});
}
googletag.cmd.push(function() {
slots['div-header_desk_sticky-52340'] = googletag.defineSlot('/3910/earnings/header_desk_sticky', [[728, 90], [970, 90]], 'div-header_desk_sticky-52340')
.addService(googletag.pubads())
.setTargeting('pos', adCount)
.setTargeting('placement', 'header_desk_sticky')
.setTargeting('ArticleNum', 'article-' + window.article_count_id)
.setCollapseEmptyDiv(true);
});
</script>
<script type='text/javascript'>
googletag.cmd.push(function() {
slots['div-l_sidebar_sticky-90691'] = googletag.defineSlot('/3910/earnings/l_sidebar_sticky', [[300, 250], [300, 600]], 'div-l_sidebar_sticky-90691')
.addService(googletag.pubads())
.setTargeting('pos', adCount)
.setTargeting('placement', 'l_sidebar_sticky')
.setTargeting('ArticleNum', 'article-' + window.article_count_id)
.setCollapseEmptyDiv(true);
});
</script>
<script type='text/javascript'>
var hbBiddersParams = {"sidebar1_desk": {"criteo": {"zoneId": "1088163"}, "openx": {"delDomain": "motleyfool-d.openx.net", "unit": "539313287"}, "appnexus": {"placementId": "12389989"}}};
//if there are bids -> push them
if(hbBiddersParams) {
var params = [];
hbBiddersParams = hbBiddersParams['sidebar1_desk'];
//push each bidder settings
for (var bidder in hbBiddersParams) {
if (!hbBiddersParams.hasOwnProperty(bidder)) continue;
params.push({
bidder: bidder,
params: hbBiddersParams[bidder]
})
}
adUnits = window.adUnits || [];
adUnits.push({
code: 'div-sidebar1_desk-2010',
mediaTypes: {
banner: {
sizes: [[300, 250], [300, 600]]
}
},
bids: params
});
}
googletag.cmd.push(function() {
slots['div-sidebar1_desk-2010'] = googletag.defineSlot('/3910/earnings/sidebar1_desk', [[300, 250], [300, 600]], 'div-sidebar1_desk-2010')
.addService(googletag.pubads())
.setTargeting('pos', adCount)
.setTargeting('placement', 'sidebar1_desk')
.setTargeting('ArticleNum', 'article-' + window.article_count_id)
.setCollapseEmptyDiv(true);
});
</script>
<script type='text/javascript'>
var hbBiddersParams = {"sidebar2_desk": {"criteo": {"zoneId": "1088164"}, "openx": {"delDomain": "motleyfool-d.openx.net", "unit": "539313288"}, "appnexus": {"placementId": "12389990"}}};
//if there are bids -> push them
if(hbBiddersParams) {
var params = [];
hbBiddersParams = hbBiddersParams['sidebar2_desk'];
//push each bidder settings
for (var bidder in hbBiddersParams) {
if (!hbBiddersParams.hasOwnProperty(bidder)) continue;
params.push({
bidder: bidder,
params: hbBiddersParams[bidder]
})
}
adUnits = window.adUnits || [];
adUnits.push({
code: 'div-sidebar2_desk-92169',
mediaTypes: {
banner: {
sizes: [[300, 250], [300, 600]]
}
},
bids: params
});
}
googletag.cmd.push(function() {
slots['div-sidebar2_desk-92169'] = googletag.defineSlot('/3910/earnings/sidebar2_desk', [[300, 250], [300, 600]], 'div-sidebar2_desk-92169')
.addService(googletag.pubads())
.setTargeting('pos', adCount)
.setTargeting('placement', 'sidebar2_desk')
.setTargeting('ArticleNum', 'article-' + window.article_count_id)
.setCollapseEmptyDiv(true);
});
</script>
<script type="text/javascript">
window.settings = window.settings || {};
window.settings.kruxOn = false;
window.settings.kruxOn = true;
</script>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "NewsArticle",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://www.fool.com"
},
"headline": "Invitation Homes Inc. (INVH) Q1 2019 Earnings Call Transcript",
"datePublished": "2019-05-08T00:23:44Z",
"dateModified": "2019-05-08T00:23:44Z",
"author": {
"@type": "Person",
"name": "Motley Fool Transcribers"
},
"about":[
{
"@type": "Corporation",
"tickerSymbol": "NYSE INVH"
}
],
"publisher": {
"@type": "Organization",
"name": "The Motley Fool",
"logo": {
"@type": "ImageObject",
"url": "https://g.foolcdn.com/assets/images/fool/tmf-logo.png",
"width": 311,
"height": 56
}
},
"description": "INVH earnings call for the period ending March 31, 2019.",
"image": {
"@type": "ImageObject",
"url": "https://g.foolcdn.com/image/?url=https%3A%2F%2Fg.foolcdn.com%2Feditorial%2Fimages%2F1%2Ffeatured-transcript-logo-template.png&h=630&w=1200&op=resize",
"height": 630,
"width": 1200
}
}
</script>
<script type="text/javascript" src="//g.foolcdn.com/static/dubs/common/js/fool/fool_perf.642cd74dcc3c.js"></script>
</head>
<body class="fool ">
<div class="main-container">
<div class="fool-tophat-container">
<div id="tmf-top-hat"></div>
</div>
<div class="page-grid-container">
<section class="usmf-article-nav">
<header class="navigation" role="banner">
<div class="navigation-wrapper">
<a href="https://www.fool.com" class="logo">
<img class="fool-logo" alt="The Motley Fool" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUYAAAA3AQMAAABKEHFjAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABhJREFUeNrtwQEBAAAAgiD/r25IQAEAPBoJBgABTFdNBwAAAABJRU5ErkJggg==">
</a>
<!--Desktop Nav Menu-->
<nav>
<ul class="nav-menu main-menu">
<li class="nav-item main-menu-item">
<a id="topnav-picks" href="https://www.fool.com/mms/mark/d-nav-btn" class="nav-link-stock-picks">
Latest Stock Picks
</a>
</li>
<!--Stocks and Services-->
<li class="nav-item main-menu-item dropdown">
<a id="topnav-stocks" href="javascript:void(0)">
Stocks
<svg class="fa-svg-icon"><use xlink:href="#caret-down"></use></svg>
</a>
<div class="sub-nav sub-menu">
<div class="mega-menu-wrapper">
<div class="mega-menu-wrapper-content sub-nav">
<div class="columns" id="stocks-subnav">
<div class="column promo-box-column">
<div class="sub-menu-header">Premium Services</div>
<div class="stocks-info-table sub-nav-group">
<div class="stocks-info-item head">
<div class="td name"></div>
<div class="td">Return</div>
<div class="td">S&P</div>
</div>
<div class="stocks-info-item">
<div class="td name">
<a id="stocks-sa" href="">Stock Advisor</a>
<small>Flagship service</small>
</div>
<div class="td return">372%</div>
<div class="td">88%</div>
</div>
<div class="stocks-info-item">
<div class="td name">
<a id="stocks-rb" href="">Rule Breakers</a>
<small>High-growth stocks</small>
</div>
<div class="td return">165%</div>
<div class="td">74%</div>
</div>
<p align="center"><small><em>Returns as of 7/1/2019</em></small></p>
<div class="stocks-info-item">
<div class="td name">
<center>
<a id="stocks-all-services" href="https://www.fool.com/services/">View all Motley Fool Services</a>
</center>
</div>
</div>
</div>
</div>
<div class="column">
<ul class="sub-nav-group">
<div class="sub-menu-header">Stock Market News</div>
<li class="sub-menu-link">
<a id="stocks-news" href="https://www.fool.com/investing-news/">Latest Investing News</a>
</li>
<li class="sub-menu-link">
<a id="stocks-movers" href="https://www.fool.com/market-movers/">Gainers & Losers in the Market Today</a>
</li>
<li class="sub-menu-link">
<a id="stocks-top-div" href="https://www.fool.com/investing/2019/04/10/3-top-dividend-stocks-with-yields-over-5.aspx">3 Top Dividend Stocks to Buy Now</a>
</li>
<li class="sub-menu-link">
<a id="stocks-begin-div" href="https://www.fool.com/how-to-invest/dividend-investing-for-beginners.aspx">Dividend Paying Stocks for Beginners</a>
</li>
<li class="sub-menu-link">
<a id="stocks-top-growth" href="https://www.fool.com/investing/2019/04/03/top-stocks-to-buy.aspx">Top Growth Stocks for 2019</a>
</li>
<li class="sub-menu-link">
<a id="stocks-high-growth" href="https://www.fool.com/investing/principles-of-growth-investing.aspx">How to Identify Growth Stocks</a>
</li>
<li class="sub-menu-link">
<a id="stocks-maryjane" href="https://www.fool.com/marijuana-stocks/">Marijuana Stocks</a>
</li>
<li class="sub-menu-link">
<a id="stocks-transcripts" href="https://www.fool.com/earnings-call-transcripts/">Earnings Call Transcripts</a>
</li>
<li class="sub-menu-link">
<a id="stocks-10best-free-report" href="https://www.fool.com/mms/mark/op-sa-bbn-eg/?source=isasittn0010001">
10 Best Stocks Right Now
<svg class="fa-svg-icon icon-dollar"><use xlink:href="#dollar-sign-light"></use></svg>
</a>
</li>
</ul>
</div>
<div class="column">
<ul class="sub-nav-group">
<div class="sub-menu-header">Popular Stocks</div>
<li class="sub-menu-link">
<a id="stocks-aapl" href="https://www.fool.com/quote/nasdaq/apple/aapl">Apple Stock (AAPL)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-fb" href="https://www.fool.com/quote/nasdaq/facebook/fb">Facebook Stock (FB)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-tsla" href="https://www.fool.com/quote/nasdaq/tesla-motors/tsla">Tesla Stock (TSLA)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-nflx" href="https://www.fool.com/quote/nasdaq/netflix/nflx">Netflix Stock (NFLX)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-goog" href="https://www.fool.com/quote/nasdaq/alphabet-c-shares/goog">Google Stock (GOOG)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-amzn" href="https://www.fool.com/quote/nasdaq/amazon/amzn">Amazon Stock (AMZN)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-ge" href="https://www.fool.com/quote/nyse/general-electric/ge">GE Stock (GE)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-dis" href="https://www.fool.com/quote/nyse/walt-disney/dis">Disney Stock (DIS)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-lyft" href="https://www.fool.com/quote/nasdaq/lyft/lyft/">Lyft Stock (LYFT)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-zoom" href="https://www.fool.com/quote/nasdaq/zoom-video-communications/zm/">Zoom Stock (ZM)</a>
</li>
</ul>
</div>
</div>
</div>
<!-- <div class="color-line">
<div class="color blue"></div>
<div class="color yellow"></div>
<div class="color red"></div>
<div class="color green"></div>
<div class="color blue"></div>
<div class="color yellow"></div>
</div> -->
</div>
</div>
</li>
<!--How To Invest-->
<li class="nav-item main-menu-item dropdown">
<a id="topnav-hti" href="javascript:void(0)">
How to Invest
<svg class="fa-svg-icon"><use xlink:href="#caret-down"></use></svg>
</a>
<div class="sub-nav sub-menu">
<div class="mega-menu-wrapper">
<div class="mega-menu-wrapper-content dub-nav">
<div class="columns" id="hti-subnav">
<!-- Ad loaded dynamically via postLoadHeaderLinks.js -->
<div class="column ">
<ul class="sub-nav-group">
<div class="sub-menu-header">Learn How to Invest</div>
<li class="sub-menu-link">
<a id="hti-stocks" href="https://www.fool.com/how-to-invest/">How to Invest in Stocks</a>
</li>
<li class="sub-menu-link">
<a id="hti-start-100" href="https://www.fool.com/how-to-invest/best-way-to-invest-100-a-month.aspx">Start Investing with $100 a Month</a>
</li>
<li class="sub-menu-link">
<a id="hti-knowledge-center" href="https://www.fool.com/knowledge-center/index.aspx">Investing Knowledge Center</a>
</li>
<li class="sub-menu-link">
<a id="hti-options" href="https://www.fool.com/investing/options/options-a-foolish-introduction.aspx">Learn Options Trading</a>
</li>
<li class="sub-menu-link">
<a id="hti-etf" href="https://www.fool.com/investing/etf/2018/01/15/etf-vs-mutual-funds-the-pros-and-cons.aspx">Guide to Index, Mutual & ETF Funds</a>
</li>
<li class="sub-menu-link">
<a id="hti-dividends" href="https://www.fool.com/investing/2018/07/26/how-to-build-a-dividend-portfolio.aspx">How to Build a Dividend Portfolio</a>
</li>
<li class="sub-menu-link">
<a id="hti-retirement" href="https://www.fool.com/retirement/">Investing for Retirement</a>
</li>
</ul>
</div>
<div class="column">
<ul class="sub-nav-group">
<div class="sub-menu-header">Track Your Performance</div>
<li class="sub-menu-link">
<a id="hti-scorecard" href="https://scorecard.fool.com">Portfolio Tracker</a>
</li>
<li class="sub-menu-link">
<a id="hti-caps" href="https://caps.fool.com/">Rate & Research Stocks - CAPS</a>
</li>
<div class="sub-menu-header">Investing Accounts</div>
<li class="sub-menu-link">
<a id="hti-brokerage-accounts" href="https://www.fool.com/the-ascent/buying-stocks/">Compare Brokerage Accounts</a>
</li>
<li class="sub-menu-link">
<a id="hti-ira-accounts" href="https://www.fool.com/the-ascent/buying-stocks/best-brokers-iras/">Compare IRA Accounts</a>
</li>
</ul>
</div>
</div>
</div>
<!-- <div class="color-line">
<div class="color blue"></div>
<div class="color yellow"></div>
<div class="color red"></div>
<div class="color green"></div>
<div class="color blue"></div>
<div class="color yellow"></div>
</div> -->
</div>
</div>
</li>
<!--Retirement-->
<li class="nav-item main-menu-item dropdown">
<a id="topnav-retire" href="javascript:void(0)">
Retirement
<svg class="fa-svg-icon"><use xlink:href="#caret-down"></use></svg>
</a>
<div class="sub-nav sub-menu">
<div class="mega-menu-wrapper">
<div class="mega-menu-wrapper-content sub-nav">
<div class="columns" id="retirement-subnav">
<!-- Ad loaded dynamically via postLoadHeaderLinks.js -->
<div class="column">
<ul class="sub-nav-group">
<div class="sub-menu-header">Retirement Planning</div>
<li class="sub-menu-link">
<a id="retire-401ks" href="https://www.fool.com/retirement/401k/401kintro-is-your-retirement-plan-foolish.aspx">401Ks</a> | <a href="https://www.fool.com/retirement/ira/index.aspx">IRAs</a> | <a href="https://www.fool.com/retirement/assetallocation/introduction-to-asset-allocation.aspx">Asset Allocation</a>
</li>
<li class="sub-menu-link">
<a id="retire-step-guide" href="https://www.fool.com/retirement/index.aspx">Step by step guide to retirement</a>
</li>
<li class="sub-menu-link">
<a id="retire-guide-plans" href="https://www.fool.com/retirement/2018/02/21/2018-guide-to-retirement-planning.aspx">2018 Guide to Retirement Planning</a>
</li>
<li class="sub-menu-link">
<a id="retire-socsec-exist" href="https://www.fool.com/retirement/general/2016/03/19/will-social-security-last-until-i-retire.aspx">Will Social Security be there for me?</a>
</li>
<li class="sub-menu-link">
Retirement Guide: <a id="retire-guide-20s" href="https://www.fool.com/retirement/2016/12/19/the-perfect-retirement-strategy-for-20-somethings.aspx">20s</a> | <a id="retire-guide-30s" href="https://www.fool.com/retirement/2016/07/16/the-perfect-retirement-strategy-for-people-in-thei.aspx">30s</a> | <a id="retire-guide-40s" href="https://www.fool.com/retirement/2016/12/19/the-perfect-retirement-strategy-for-40-somethings.aspx">40s</a> | <a id="retire-guide-50s" href="https://www.fool.com/retirement/2016/12/20/the-perfect-retirement-strategy-for-50-somethings.aspx">50s</a>
</li>
<li class="sub-menu-link">
<a id="retire-college-retirement" href="https://www.fool.com/retirement/2017/08/06/should-you-save-for-college-or-retirement.aspx">Save for College or Retirement?</a>
</li>
<li class="sub-menu-link"><a id="retire-socsec-free-report" href="http://www.fool.com/mms/mark/ecap-foolcom-social-security/?aid=8727&source=irrsittn0010002">
$16,122 Social Security Bonus
<svg class="fa-svg-icon icon-dollar"><use xlink:href="#dollar-sign-light"></use></svg>
</a></li>
</ul>
</div>
<div class="column">
<ul class="sub-nav-group">
<div class="sub-menu-header">Already Retired</div>
<li class="sub-menu-link">
<a id="retire-now-what" href="https://www.fool.com/retirement/general/2015/05/09/so-youre-about-to-retire-now-what.aspx">Time to Retire, Now What?</a>
</li>
<li class="sub-menu-link">
<a id="retire-60s" href="https://www.fool.com/retirement/2016/06/04/the-perfect-retirement-strategy-for-seniors-in-the.aspx">Living in Retirement in Your 60s</a>
</li>
<li class="sub-menu-link">
<a id="retire-reverse-mortgage" href="https://www.fool.com/retirement/2016/10/09/read-this-before-you-get-a-reverse-mortgage.aspx">Should I Reverse Mortgage My Home?</a>
</li>
<li class="sub-menu-link">
<a id="retire-longtermcare" href="https://www.fool.com/retirement/2018/02/02/your-2018-guide-to-long-term-care-insurance.aspx">Should I Get a Long Term Care Policy?</a>
</li>
<li class="sub-menu-link">
<a id="retire-socsec-guide" href="https://www.fool.com/retirement/2017/12/03/your-2018-guide-to-social-security-benefits.aspx">Your 2018 Guide to Social Security</a>
</li>
<li class="sub-menu-link">
<a id="retire-agg" href="https://www.fool.com/articles/retirement/">Latest Retirement Articles</a>
</li>
</ul>
</div>
</div>
</div>
<!-- <div class="color-line">
<div class="color blue"></div>
<div class="color yellow"></div>
<div class="color red"></div>
<div class="color green"></div>
<div class="color blue"></div>
<div class="color yellow"></div>
</div> -->
</div>
</div>
</li>
<!--Personal Finance -->
<li class="nav-item main-menu-item dropdown">
<a id="topnav-pf" href="javascript:void(0)">
Personal Finance
<svg class="fa-svg-icon"><use xlink:href="#caret-down"></use></svg>
</a>
<div class="sub-nav sub-menu">
<div class="mega-menu-wrapper">
<div class="mega-menu-wrapper-content dub-nav ascent">
<div class="columns">
<div class="column ascent-logo">
<a href="https://www.fool.com/the-ascent/">
<img class="theascent-logo-color-medium" alt="The Ascent Logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAC2AQMAAAAbaXvoAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAClJREFUeNrtwTEBAAAAwqD1T20IX6AAAAAAAAAAAAAAAAAAAAAAAIDPAEfOAAEh0JNjAAAAAElFTkSuQmCC">
</a>
</div>
<div class="column description">
The Ascent is The Motley Fool's new personal finance brand devoted to helping you live a richer life. Let's conquer your financial goals together...faster. See you at the top!
</div>
<div class="column">
<ul class="ascent-links sub-nav-group">
<li class="sub-menu-link"><a href="https://www.fool.com/the-ascent/credit-cards/" id="asc-credit-cards">Best Credit Cards</a></li>
<li class="sub-menu-link"><a href="https://www.fool.com/the-ascent/banks/best-savings-accounts/" id="asc-bank-accounts">Best Bank Accounts</a></li>
<li class="sub-menu-link"><a href="https://www.fool.com/the-ascent/buying-stocks/" id="asc-stock-brokers">Best Stock Brokers</a></li>
<li class="sub-menu-link"><a href="https://www.fool.com/the-ascent/personal-loans/" id="asc-personal-loans">Best Personal Loans</a></li>
<li class="sub-menu-link"><a href="https://www.fool.com/the-ascent/student-loans/" id="asc-student-loans">Best Student Loans</a></li>
</ul>
</div>
</div>
</div>
<!-- <div class="color-line">
<div class="color blue"></div>
<div class="color yellow"></div>
<div class="color red"></div>
<div class="color green"></div>
<div class="color blue"></div>
<div class="color yellow"></div>
</div> -->
</div>
</div>
</li>
<!--Community-->
<li class="nav-item main-menu-item dropdown">
<a id="topnav-community" href="javascript:void(0)">
Community
<svg class="fa-svg-icon"><use xlink:href="#caret-down"></use></svg>
</a>
<div class="sub-nav sub-menu">
<div class="mega-menu-wrapper">
<div class="mega-menu-wrapper-content sub-nav">
<div class="columns" id="community-subnav">
<div class="column">
<div class="sub-menu-header">
Our Mission:<br/ >Make the world smarter, happier, and richer.
</div>
<p>Founded in 1993 by brothers Tom and David Gardner, The Motley Fool helps millions of people attain financial freedom through our website, podcasts, books, newspaper column, radio show, and premium investing services.</p>
</div>
<!-- links loaded dynamically via postLoadHeaderLinks.js -->
</div>
</div>
<!-- <div class="color-line">
<div class="color blue"></div>
<div class="color yellow"></div>
<div class="color red"></div>
<div class="color green"></div>
<div class="color blue"></div>
<div class="color yellow"></div>
</div> -->
</div>
</div>
</li>
</ul>
</nav>
<button class="navigation-menu-button" id="mobile-menu-toggle" role="button">
<svg class="fa-svg-icon icon-bars"><use xlink:href="#bars"></use></svg>
<svg class="fa-svg-icon icon-close"><use xlink:href="#times"></use></svg>
</button>
<nav class="mobile-nav-container">
<ul class="mobile-nav">
<li class="main-menu-item">
<a id="m-topnav-picks" href="https://www.fool.com/#services-section">Latest Stock Picks</a>
</li>
<!--Stocks and Services-->
<li class="main-menu-item dropdown">
<div class="main-menu-item-link-wrapper" onclick="return true">
<span class="main-menu-item-link">
<span class="dropdown" id="topnav-stocks">
Stocks
<svg class="fa-svg-icon"><use xlink:href="#angle-right"></use></svg>
</span>
</span>
</div>
<ul class="sub-menu">
<div class="mega-menu-wrapper">
<header class="sub-menu-name">
Stocks
<button class="btn-level-up">
<svg class="fa-svg-icon"><use xlink:href="#chevron-left"></use></svg>
</button>
</header>
<div class="mega-menu-wrapper-content sub-nav">
<div class="columns" id="stocks-subnav">
<div class="column promo-box-column">
<div class="sub-menu-header">Premium Services</div>
<div class="stocks-info-table sub-nav-group">
<div class="stocks-info-item head">
<div class="td name"></div>
<div class="td">Return</div>
<div class="td">S&P</div>
</div>
<div class="stocks-info-item">
<div class="td name">
<a id="stocks-sa" href="">Stock Advisor</a>
<small>Flagship service</small>
</div>
<div class="td return">372%</div>
<div class="td">88%</div>
</div>
<div class="stocks-info-item">
<div class="td name">
<a id="stocks-rb" href="">Rule Breakers</a>
<small>High-growth stocks</small>
</div>
<div class="td return">165%</div>
<div class="td">74%</div>
</div>
<p align="center"><small><em>Returns as of 7/1/2019</em></small></p>
<div class="stocks-info-item">
<div class="td name">
<center>
<a id="stocks-all-services" href="https://www.fool.com/services/">View all Motley Fool Services</a>
</center>
</div>
</div>
</div>
</div>
<div class="column">
<ul class="sub-nav-group">
<div class="sub-menu-header">Stock Market News</div>
<li class="sub-menu-link">
<a id="stocks-news" href="https://www.fool.com/investing-news/">Latest Investing News</a>
</li>
<li class="sub-menu-link">
<a id="stocks-movers" href="https://www.fool.com/market-movers/">Gainers & Losers in the Market Today</a>
</li>
<li class="sub-menu-link">
<a id="stocks-top-div" href="https://www.fool.com/investing/2019/04/10/3-top-dividend-stocks-with-yields-over-5.aspx">3 Top Dividend Stocks to Buy Now</a>
</li>
<li class="sub-menu-link">
<a id="stocks-begin-div" href="https://www.fool.com/how-to-invest/dividend-investing-for-beginners.aspx">Dividend Paying Stocks for Beginners</a>
</li>
<li class="sub-menu-link">
<a id="stocks-top-growth" href="https://www.fool.com/investing/2019/04/03/top-stocks-to-buy.aspx">Top Growth Stocks for 2019</a>
</li>
<li class="sub-menu-link">
<a id="stocks-high-growth" href="https://www.fool.com/investing/principles-of-growth-investing.aspx">How to Identify Growth Stocks</a>
</li>
<li class="sub-menu-link">
<a id="stocks-maryjane" href="https://www.fool.com/marijuana-stocks/">Marijuana Stocks</a>
</li>
<li class="sub-menu-link">
<a id="stocks-transcripts" href="https://www.fool.com/earnings-call-transcripts/">Earnings Call Transcripts</a>
</li>
<li class="sub-menu-link">
<a id="stocks-10best-free-report" href="https://www.fool.com/mms/mark/op-sa-bbn-eg/?source=isasittn0010001">
10 Best Stocks Right Now
<svg class="fa-svg-icon icon-dollar"><use xlink:href="#dollar-sign-light"></use></svg>
</a>
</li>
</ul>
</div>
<div class="column">
<ul class="sub-nav-group">
<div class="sub-menu-header">Popular Stocks</div>
<li class="sub-menu-link">
<a id="stocks-aapl" href="https://www.fool.com/quote/nasdaq/apple/aapl">Apple Stock (AAPL)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-fb" href="https://www.fool.com/quote/nasdaq/facebook/fb">Facebook Stock (FB)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-tsla" href="https://www.fool.com/quote/nasdaq/tesla-motors/tsla">Tesla Stock (TSLA)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-nflx" href="https://www.fool.com/quote/nasdaq/netflix/nflx">Netflix Stock (NFLX)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-goog" href="https://www.fool.com/quote/nasdaq/alphabet-c-shares/goog">Google Stock (GOOG)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-amzn" href="https://www.fool.com/quote/nasdaq/amazon/amzn">Amazon Stock (AMZN)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-ge" href="https://www.fool.com/quote/nyse/general-electric/ge">GE Stock (GE)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-dis" href="https://www.fool.com/quote/nyse/walt-disney/dis">Disney Stock (DIS)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-lyft" href="https://www.fool.com/quote/nasdaq/lyft/lyft/">Lyft Stock (LYFT)</a>
</li>
<li class="sub-menu-link">
<a id="stocks-zoom" href="https://www.fool.com/quote/nasdaq/zoom-video-communications/zm/">Zoom Stock (ZM)</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</ul>
</li>
<!--How To Invest-->
<li class="main-menu-item dropdown">
<div class="main-menu-item-link-wrapper" onclick="return true">
<span class="main-menu-item-link">
<span class="dropdown" id="topnav-hti">
How to Invest
<svg class="fa-svg-icon"><use xlink:href="#angle-right"></use></svg>
</span>
</span>
</div>
<ul class="sub-menu">
<div class="mega-menu-wrapper">
<header class="sub-menu-name">
How to Invest
<button class="btn-level-up">
<svg class="fa-svg-icon"><use xlink:href="#chevron-left"></use></svg>
</button>
</header>
<div class="mega-menu-wrapper-content dub-nav">
<div class="columns" id="hti-subnav">
<!-- Ad loaded dynamically via postLoadHeaderLinks.js -->
<div class="column ">
<ul class="sub-nav-group">
<div class="sub-menu-header">Learn How to Invest</div>
<li class="sub-menu-link">
<a id="hti-stocks" href="https://www.fool.com/how-to-invest/">How to Invest in Stocks</a>
</li>
<li class="sub-menu-link">
<a id="hti-start-100" href="https://www.fool.com/how-to-invest/best-way-to-invest-100-a-month.aspx">Start Investing with $100 a Month</a>
</li>
<li class="sub-menu-link">
<a id="hti-knowledge-center" href="https://www.fool.com/knowledge-center/index.aspx">Investing Knowledge Center</a>
</li>
<li class="sub-menu-link">
<a id="hti-options" href="https://www.fool.com/investing/options/options-a-foolish-introduction.aspx">Learn Options Trading</a>
</li>
<li class="sub-menu-link">
<a id="hti-etf" href="https://www.fool.com/investing/etf/2018/01/15/etf-vs-mutual-funds-the-pros-and-cons.aspx">Guide to Index, Mutual & ETF Funds</a>
</li>
<li class="sub-menu-link">
<a id="hti-dividends" href="https://www.fool.com/investing/2018/07/26/how-to-build-a-dividend-portfolio.aspx">How to Build a Dividend Portfolio</a>
</li>
<li class="sub-menu-link">
<a id="hti-retirement" href="https://www.fool.com/retirement/">Investing for Retirement</a>
</li>
</ul>
</div>
<div class="column">
<ul class="sub-nav-group">
<div class="sub-menu-header">Track Your Performance</div>
<li class="sub-menu-link">
<a id="hti-scorecard" href="https://scorecard.fool.com">Portfolio Tracker</a>
</li>
<li class="sub-menu-link">
<a id="hti-caps" href="https://caps.fool.com/">Rate & Research Stocks - CAPS</a>
</li>
<div class="sub-menu-header">Investing Accounts</div>
<li class="sub-menu-link">
<a id="hti-brokerage-accounts" href="https://www.fool.com/the-ascent/buying-stocks/">Compare Brokerage Accounts</a>
</li>
<li class="sub-menu-link">
<a id="hti-ira-accounts" href="https://www.fool.com/the-ascent/buying-stocks/best-brokers-iras/">Compare IRA Accounts</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</ul>
</li>
<!--Retirement-->
<li class="main-menu-item dropdown">
<div class="main-menu-item-link-wrapper" onclick="return true">
<span class="main-menu-item-link">
<span class="dropdown" id="topnav-retire">
Retirement
<svg class="fa-svg-icon"><use xlink:href="#angle-right"></use></svg>
</span>
</span>
</div>
<ul class="sub-menu">
<div class="mega-menu-wrapper">
<header class="sub-menu-name">
Retirement
<button class="btn-level-up">
<svg class="fa-svg-icon"><use xlink:href="#chevron-left"></use></svg>
</button>
</header>
<div class="mega-menu-wrapper-content">
<div class="columns">
<div class="column">
<div class="sub-menu-header">Retirement Planning</div>
<li class="sub-menu-link">
<a id="retire-401ks" href="https://www.fool.com/retirement/401k/401kintro-is-your-retirement-plan-foolish.aspx">401Ks</a>
</li>
<li class="sub-menu-link">
<a id="retire-iras" href="https://www.fool.com/retirement/ira/index.aspx?source=ifltnvsnv0000001">IRAs</a>
</li>
<li class="sub-menu-link">
<a id="retire-allocation" href="https://www.fool.com/retirement/assetallocation/introduction-to-asset-allocation.aspx?source=ifltnvsnv0000001">Asset Allocation</a>
</li>
<li class="sub-menu-link">
<a id="retire-steps-guide" href="https://www.fool.com/retirement/general/how-to-retire-in-style.aspx">Step by step guide to retirement</a>
</li>
<li class="sub-menu-link">
<a id="retire-guide-plans" href="https://www.fool.com/retirement/2017/01/22/your-2017-guide-to-retirement-planning.aspx">Your 2017 Guide to Retirement Plans</a>
</li>
<li class="sub-menu-link">
<a id="retire-socsec-exist" href="https://www.fool.com/retirement/general/2016/03/19/will-social-security-last-until-i-retire.aspx">Will Social Security be there for me?</a>
</li>
<li class="sub-menu-link">
<a id="retire-guide-20s" href="https://www.fool.com/retirement/2016/12/19/the-perfect-retirement-strategy-for-20-somethings.aspx">Retirement Guide: 20s</a>
</li>
<li class="sub-menu-link">
<a id="retire-guide-30s" href="https://www.fool.com/retirement/2016/07/16/the-perfect-retirement-strategy-for-people-in-thei.aspx">Retirement Guide: 30s</a>
</li>
<li class="sub-menu-link">
<a id="retire-guide-40s" href="https://www.fool.com/retirement/2016/12/19/the-perfect-retirement-strategy-for-40-somethings.aspx">Retirement Guide: 40s</a>
</li>
<li class="sub-menu-link">
<a id="retire-guide-50s" href="https://www.fool.com/retirement/2016/12/20/the-perfect-retirement-strategy-for-50-somethings.aspx">Retirement Guide: 50s</a>
</li>
<li class="sub-menu-link">
<a id="retire-college-retire" href="https://www.fool.com/retirement/2017/08/06/should-you-save-for-college-or-retirement.aspx">Save for College or Retirement?</a>
</li>
<li class="sub-menu-link">
<a id="retire-socsec-free-report" href="http://www.fool.com/mms/mark/ecap-foolcom-social-security/?aid=8727&source=irrsittn0010002">$16,122 Social Security Bonus
<svg class="fa-svg-icon icon-dollar"><use xlink:href="#dollar-sign-light"></use></svg>
</a>
</li>
</div>
<div class="column">
<div class="sub-menu-header">Already Retired</div>
<li class="sub-menu-link">
<a id="retire-now-what" href="https://www.fool.com/retirement/general/2015/05/09/so-youre-about-to-retire-now-what.aspx">Time to Retire, Now What?</a>
</li>
<li class="sub-menu-link">
<a id="retire-60s" href="https://www.fool.com/retirement/2016/06/04/the-perfect-retirement-strategy-for-seniors-in-the.aspx">Living in Retirement in Your 60s</a>
</li>
<li class="sub-menu-link">
<a id="retire-reverse-mortgage" href="https://www.fool.com/retirement/2016/10/09/read-this-before-you-get-a-reverse-mortgage.aspx">Should I reverse Mortgage My Home?</a>
</li>
<li class="sub-menu-link">
<a id="retire-longtermcare" href="https://www.fool.com/retirement/2018/02/02/your-2018-guide-to-long-term-care-insurance.aspx">Should I Get a Long Term Care Policy?</a>
</li>
<li class="sub-menu-link">
<a id="retire-socsec-guide" href="https://www.fool.com/retirement/2017/12/03/your-2018-guide-to-social-security-benefits.aspx">Your 2018 Guide to Social Security</a>
</li>
</div>
</div>
</div>
</div>
</ul>
</li>
<!--Personal Finance -->
<li class="main-menu-item dropdown">
<div class="main-menu-item-link-wrapper" onclick="return true">
<span class="main-menu-item-link">
<span class="dropdown" id="topnav-pf">
Personal Finance
<svg class="fa-svg-icon"><use xlink:href="#angle-right"></use></svg>
</span>
</span>
</div>
<ul class="sub-menu">
<div class="mega-menu-wrapper">
<header class="sub-menu-name">
Personal Finance
<button class="btn-level-up">
<svg class="fa-svg-icon"><use xlink:href="#chevron-left"></use></svg>
</button>
</header>
<div class="mega-menu-wrapper-content dub-nav ascent">
<div class="columns">
<div class="column ascent-logo">
<a href="https://www.fool.com/the-ascent/">
<img class="theascent-logo-color-medium" alt="The Ascent Logo" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAC2AQMAAAAbaXvoAAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAAClJREFUeNrtwTEBAAAAwqD1T20IX6AAAAAAAAAAAAAAAAAAAAAAAIDPAEfOAAEh0JNjAAAAAElFTkSuQmCC">
</a>
</div>
<div class="column description">
The Ascent is The Motley Fool's new personal finance brand devoted to helping you live a richer life. Let's conquer your financial goals together...faster. See you at the top!
</div>
<div class="column">
<ul class="ascent-links sub-nav-group">
<li class="sub-menu-link"><a href="https://www.fool.com/the-ascent/credit-cards/" id="asc-credit-cards">Best Credit Cards</a></li>
<li class="sub-menu-link"><a href="https://www.fool.com/the-ascent/banks/best-savings-accounts/" id="asc-bank-accounts">Best Bank Accounts</a></li>
<li class="sub-menu-link"><a href="https://www.fool.com/the-ascent/buying-stocks/" id="asc-stock-brokers">Best Stock Brokers</a></li>
<li class="sub-menu-link"><a href="https://www.fool.com/the-ascent/personal-loans/" id="asc-personal-loans">Best Personal Loans</a></li>
<li class="sub-menu-link"><a href="https://www.fool.com/the-ascent/student-loans/" id="asc-student-loans">Best Student Loans</a></li>
</ul>
</div>
</div>
</div>
</div>
</ul>
</li>
<!--Community-->
<li class="main-menu-item dropdown">
<div class="main-menu-item-link-wrapper" onclick="return true">
<span class="main-menu-item-link">
<span id="topnav-community">
Community
<svg class="fa-svg-icon"><use xlink:href="#angle-right"></use></svg>
</span>
</span>
</div>
<ul class="sub-menu">
<div class="mega-menu-wrapper">
<header class="sub-menu-name">
Community
<button class="btn-level-up">
<svg class="fa-svg-icon"><use xlink:href="#chevron-left"></use></svg>
</button>
</header>
<div class="mega-menu-wrapper-content" id="community-mob-subnav">
<div class="columns">
<!-- links loaded dynamically via postLoadHeaderLinks.js -->
</div>
</div>
</div>
</ul>
</li>
<li class="main-menu-item" id="logIn">
<a id="m-topnav-login" href="https://www.fool.com/secure/login.aspx?source=ilgsittph0000001">Login</a>
</li>
</ul>
</nav>
<div class="mobile-nav-overlay"></div>
<div class="header-search-wrapper">
<button class="header-search-wrapper-toggle">
<svg class="fa-svg-icon icon-search"><use xlink:href="#search"></use></svg>
<svg class="fa-svg-icon icon-close"><use xlink:href="#times"></use></svg>
</button>
<div class="header-search-form-wrapper"><form name="lookup" action="/fooldotcom/searchredirect/" class="header-search-form">
<span class="sr-only">Search</span>
<label for="fool-search" class="fool-search-label" style="display:none;">
Search:
</label>
<input name="query" label="search" id="fool-search" class="ticker-input-input" placeholder="Ticker or Keyword" role="search" aria-hidden="false" aria-haspopup="true" autocomplete="off"/>
<input type="submit" class="sr-only" value="Go">
<div id="header-search-submit">
<svg class="fa-svg-icon"><use xlink:href="#search"></use></svg>
</div>
</form>
</div>
</div>
</div>
<div class="color-line">
<div class="color blue"></div>
<div class="color yellow"></div>
<div class="color red"></div>
<div class="color green"></div>
<div class="color blue"></div>
<div class="color yellow"></div>
</div>
</header>
</section>
<div class="content-container">
<div id="sticky-wrapper">
<header class="header-ads-container sticky-header-ads-container" >
<section class="header-ads ad">
<!-- Create container for ad -->
<div id='div-header_desk_sticky-52340' class='dfp-ads wide'>
<script type="text/javascript">
googletag.cmd.push(function() {
googletag.display('div-header_desk_sticky-52340');
});
</script>
</div>
</section>
</header>
</div>
<section id="article-page" class="main-content-section page-body template-3-column" >
<section id="main-content">
<div class="endless-body">
<div class="full_article" id="article-1">
<div class="content-container-columns">
<aside class="column sidebar left" id="sidebar-left">
<section class="sidebar-content" id="sidebar-left-content">
<div class="email_report">
<a href="https://www.fool.com/mms/mark/e-art-leftr-5stocks-free?aid=9185&source=isaedisz0000001" class="email_report_container">
<div class="text">
<span>
<b>Get The Motley Fool's 5 Free Stocks to Build Wealth Report</b>
<p>Motley Fool Co-Founders just released an exclusive report naming 5 of their favorite stocks to buy right now…</p>
</span>
</div>
<btn class="btn">
<span>Send me stocks</span>
<svg class="fa-svg-icon">
<use xlink:href="#envelope"></use>
</svg>
</btn>
</a>
</div>
<div class="banner ad">
<!-- Create container for ad -->
<div id='div-l_sidebar_sticky-90691' class='dfp-ads ad'>
<script type="text/javascript">
googletag.cmd.push(function() {
googletag.display('div-l_sidebar_sticky-90691');
});
</script>
</div>
</div>
</section>
</aside>
<div class="column main-column">
<!--placeholder-->
<section class="usmf-new article-body">
<section class="usmf-new article-header">
<header>
<div id="adv_text" class="adv-heading"></div>
<h1>Invitation Homes Inc. (INVH) Q1 2019 Earnings Call Transcript</h1>
<h2>INVH earnings call for the period ending March 31, 2019.</h2>
</header>
</section>
<div class="row author-tagline author-inline">
<div class="author-tagline-top">
<div class="author-avatar">
<img src="https://g.foolcdn.com/avatar/2041746867/large.ashx" alt="Motley Fool Transcribers"/>
</div>
<div class="author-and-date">
<div class="author-name">
<svg class="fa-svg-icon"> <use xlink:href="#user-tie"></use></svg>
Motley Fool Transcribers
</div>
<div class="author-username">
(<a href="https://my.fool.com/profile/MFTranscribers/activity.aspx">MFTranscribers</a>)
</div>
<div class="publication-date">
<svg class="fa-svg-icon"> <use xlink:href="#calendar-alt"></use></svg>
May 7, 2019 at 8:23PM
</div>
<div class="publication-subject">
<svg class="fa-svg-icon"><use xlink:href="#envelope"></use></svg>
Financials
</div>
</div>
</div>
</div>
<span class="article-content">
<div class="image imgR"><img alt="Logo of jester cap with thought bubble." src="https://g.foolcdn.com/misc-assets/fool-transcripts-logo.png"/>
<p class="caption">Image source: The Motley Fool.</p>
</div>
<p><strong>Invitation Homes Inc.</strong> <span class="ticker" data-id="338893">(<a href="https://www.fool.com/quote/nyse/invitation-homes-inc/invh">NYSE:INVH</a>)</span><br/>Q1 2019 Earnings Call<br/><span id="date">May. 7, 2019</span>, <em id="time">11:00 a.m. ET</em></p><h2>Contents:</h2>
<ul>
<li>Prepared Remarks</li>
<li>Questions and Answers</li>
<li>Call Participants</li>
</ul>
<section class="trending-articles-section">
<article class="ap-news-panel-article trending in-content">
<div class="label">Trending</div>
<ul class="ap-trending-articles-list">
<li><a href="/investing/2019/07/01/guess-who-just-became-amazons-biggest-shipper.aspx">Guess Who Just Became Amazon's Biggest Shipper</a></li>
<li><a href="/investing/2019/06/30/3-hot-growth-stocks-id-buy-right-now.aspx">3 Hot Growth Stocks I'd Buy Right Now</a></li>
<li><a href="/retirement/2019/07/01/3-reasons-people-dont-use-annuities-the-way-they-w.aspx">3 Reasons People Don't Use Annuities the Way They Were Meant to Be Used</a></li>
</ul>
</article>
</section><h2>Prepared Remarks:</h2>
<p><strong>Operator</strong></p><p>Greetings, and welcome to the Invitation Homes First Quarter 2019 Earnings Conference Call. All participants are in a listen-only mode at this time. (Operator Instructions) As a reminder, this conference is being recorded.</p><p>At this time, I would like to turn the conference over to Greg Van Winkle, Vice President of Investor Relations. Please go ahead.</p><p><strong>Greg Van Winkle</strong> -- <em>Vice President of Investor Relations</em></p><p>Thank you. Good morning, and thank you for joining us for our first quarter 2019 earnings conference call. On today's call from Invitation Homes are Dallas Tanner, President and Chief Executive Officer; Ernie Freedman, Chief Financial Officer; and Charles Young, Chief Operating Officer.</p><p>I'd like to point everyone to our first quarter 2019 earnings press release and supplemental information, which we may reference on today's call. This document can be found on the Investor Relations section of our website at www.invh.com.</p><p>I'd also like to inform you that certain statements made during this call may include forward-looking statements relating to the future performance of our business, financial results, liquidity and capital resources and other non-historical statements, which are subject to risks and uncertainties that could cause actual outcomes or results to differ materially from those indicated in any such statements.</p><p>We describe some of these risks and uncertainties in our 2018 Annual Report on Form 10-K and other filings we make with the SEC from time to time. Invitation Homes does not update forward-looking statements and expressly disclaims any obligation to do so.</p><p>During this call, we may also discuss certain non-GAAP financial measures. You can find additional information regarding these non-GAAP measures, including reconciliations of these measures with the most comparable GAAP measures, in our earnings release and supplemental information, which are available on the Investor Relations section of our website.</p><p>I'll now turn the call over to our President and Chief Executive Officer, Dallas Tanner.</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>Thank you, Greg. Let me start by saying this is a very exciting time for our business right now. With 18% AFFO growth in the first quarter, we're off to a great start to 2019 and are hitting our stride with merger integration in the rearview mirror. We are thrilled to go into peak season with everyone on a singular, unified platform that features better tools than we've ever had before. Cost efficiency initiatives have also been more impactful than expected so far in 2019, enabling us to increase our NOI, core FFO and AFFO guidance, which Ernie will discuss in more detail. We are continuing to get more efficient and we're not stopping.</p><p>In my comments, I'd like to touch on three things: First, our strong start to the year; second, the work our teams have done to wrap up merger integration; and third, an update on our capital recycling efforts. I hope everyone had a chance to review the results we reported last night, highlights of our first quarter performance included 7.3% same-store NOI growth. Our best ever first quarter average occupancy of 96.5%. New and renewal rent growth that outpaced prior year and a 9% decrease in net cost to maintain.</p><p>Let me add some color on what is driving these results. In short, comes down to three things: favorable market fundamentals, our unique competitive advantages and strong execution. Fundamentals are fantastic. New single family supply is not keeping pace with demand, especially in Invitation Homes markets where household formations in 2019 are expected to grow at almost 2% or 90% greater than the US average. With the millennial generation aging toward our average resident age of 40 years old, we are convinced more and more people will continue choosing the convenience of a professionally managed single family leasing lifestyle. The affordability of leasing a home versus buying a home also continues to work in our favor.</p><p>What makes Invitation Homes unique is our locations. Residents are able to enjoy the affordable and convenient single family leasing lifestyle I just described, while also living in attractive neighborhoods close to their jobs and great schools. Our scale also enables us to deliver a high-quality service to our residents at a more efficient cost and provides us with a large amount of unique data that are best in class revenue management system can digest to give us a clear picture of the market.</p><p>On that note, we continue to get better and better at execution. Our revenue management team and field teams have worked together to develop and refine the data and process for achieving the right balance between rental rate and occupancy. On the expense side, the simplification of our organization and systems are driving better results with the integration now behind us. Newly implemented repairs and maintenance initiatives are also making us more efficient and we see additional opportunity to improve as we roll out ProCare more fully across our portfolio. All of that came together to drive first quarter results that we were very pleased with. But we still have work to do. The most important part of the year lies ahead, as leasing activity and service requests pickup in the spring and summer months. We are optimistic given the momentum we are carrying into peak season, but recognize that it takes even more diligence to maintain operational excellence during this period. Our teams are well prepared and energized for this task ahead.</p><p>Next, I want to comment and thank our teams across the country for the superb job they have done with the final piece of merger integration. Our unified operating platform has now been implemented in each of our 17 markets. With one team operating on one platform, our teams are excited to be equipped with better systems and fewer distractions to do what they do best, focus on the resident and deliver world-class service every day. We also continue to innovate and take the opportunity to identify additional areas for platform and process improvements, as we start moving on from the integration.</p><p>Finally, we continue to refine our portfolio and have made significant strides already in 2019 toward our capital recycling goals for the year. In the first quarter, we sold 654 homes with lower long-term growth prospects for gross proceeds of $155 million. In addition to deleveraging, we used proceeds from these sales to acquire 208 homes with better quality and location for $62 million of investment. In April, we acquired 463 homes in in-fill submarkets of Atlanta and Las Vegas in a bulk acquisition for $115 million. 99% of these homes are occupied with average in-place rents of $1,554 per month, which we believe is well below current market rates. In addition, we expect to achieve higher operating margins by bringing these homes into our platform with greater economies of scale.</p><p>I'll wrap up by reiterating how enthusiastic I am about the future of Invitation Homes. It's exciting to see everything we have worked hard on for the last 18 months of integration fall into place. Our operating teams continue to get more efficient. Our asset management teams continue to enhance our portfolio. And our capital markets teams continue to reduce leverage on our balance sheet. I believe we are better equipped more than ever to drive growth and deliver an outstanding living experience for our residents.</p><p>With that, I'll turn it over to Charles Young, our Chief Operating Officer, to provide more detail on our first quarter operating results.</p><p><strong>Charles Young</strong> -- <em>Chief Operating Officer</em></p><p>Thank you, Dallas. Our teams carried the momentum from the end of 2018 into another strong quarter to kick off 2019. I'm proud of the results we put on the board and the progress we made on controllable expenses, at the same time, we navigated through platform integration in the field. And most of all, I'm proud that the quality of our resident service continues to achieve new heights, evidenced by further declines in resident turnover. The occupancy in our portfolio and the enthusiasm of our teams are showing toward resident service put us in a great position for the upcoming peak season. And we're excited to tackle it together on one platform.</p><p>I'll now walk you through the first quarter operating results in more detail. With outstanding fundamentals in our market -- markets and excellent execution from our teams, same-store NOI increased by 7.3% in the first quarter. Same-store core revenues in the first quarter grew 4.7% year-over-year. This increase was driven by average monthly rental rate growth of 4.1%, an 80 basis point increase in average occupancy to 96.5% for the quarter. Same-store core expenses in the first quarter were down 0.1% year-over-year, controllable costs were better than expected, down 10.2% year-over-year net of resident recoveries. A portion of this improvement is attributable to a favorable comparison to the first quarter of 2018, when repairs and maintenance work order volume was higher than normal.</p><p>However, the majority of our outperformance versus our expectation for the first quarter was due to great execution from our teams. In particular, I'll point to three things our teams accomplished that contributed to the results: First, we had success continuing to drive system and process improvements for repairs, maintenance and turns; second, we incurred lower resident turnover; and third, we realized property level merger synergies as a result of our integration efforts. Partially offsetting the significant reduction in our controllable costs was 4.8% increase in same-store property taxes.</p><p>Next, I'd like to expand on one of the main drivers of our strong quarter that I just mentioned. Our efficiency gains were the repair and maintenance or R&M. On last quarter's call, I talked about the fourth quarter rollout of an important update to our technology platform that enabled all of our internal technicians to perform work on any home in our portfolio, not just the homes associated with our legacy organization. This made a significant difference in the productivity of our maintenance technicians and resulted in an uptick in the percentage of service requests addressed in-house rather than by third-parties.</p><p>We are pleased with the impact that had on our first quarter results, but we are not celebrating yet. Maintenance volume increases significantly in the spring and summer months, demanding even stronger execution from our teams. In line with normal seasonal trends, we don't expect to see the same level in-house completion percentage and peak season that we saw in the first quarter. That said, I believe we are well positioned for the task ahead, now the integration is behind us and with all of the R&M systems and process improvements we've made over the last nine months.</p><p>I'll now provide an update on the integration of our field teams. As Dallas mentioned, we have implemented our unified operating platform in every market. This is an important milestone for our company. It will allow our field teams to operate in a much simpler environment with better tools at their disposal. It also allows our teams to get back to basics and about all of their attention to providing exceptional resident service and operational execution. Feedback from our field teams have been extremely positive and they're excited to enter peak season all together on one system.</p><p>I'm also happy to report, we accomplished this integration in the field ahead of schedule and with more synergies than the midpoint of our guidance. Integration efforts had unlike $54 million of synergies on an annualized run rate basis as of March 31, 2019. This compares to guidance in the $50 million to $55 million range of synergy achievement by the end of the second quarter 2019. In addition, we'll be better positioned to push for more procurement savings going forward and to take the next step and fully rolling out our ProCare service model across our portfolio.</p><p>Finally, I'll cover leasing trends in the first quarter in April 2019. Both renewal and new lease rent growth were higher in the first quarter 2019 than they were in the first quarter 2018. Renewals increased 30 basis points to 5.2% and new leases increased 110 basis points to 3.6%. This drove blended rent growth of 4.7% or 70 basis points higher year-over-year. At the same time, resident turnover continued to decrease, reaching an all-time low of 31% on a trailing 12-month basis.</p><p>As a result, average occupancy in the first quarter of 2019 increased 80 basis points year-over-year to 96.5%. Rent growth and occupancy trends remain very encouraging in April as well. Blended rent growth on April averaged 5.5%, up 100 basis points year-over-year and occupancy averaged 96.6%, up 40 basis points year-over-year. With fundamental tailwinds at our back and occupancy in a strong position, we are confident as we enter peak leasing and maintenance season. I'd like to send a huge thank you to our teams for putting us in this position by focusing on resident service and operational excellence, while also working diligently to complete the integration of our platform.</p><p>With that, I'll turn the call over to our Chief Financial Officer, Ernie Freedman.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Thank you, Charles. Today, I will cover the following topics: Balance sheet and capital markets activity; financial results for the first quarter; and updated 2018 guidance. First, I'll cover balance sheet and capital markets activity, where we continue to build on the progress we made in 2018 by deleveraging further. In the first quarter in April of 2019, we prepaid $250 million of secured debt using cash generated from operations and dispositions. The debt we prepaid carried a weighted average interest rate of LIBOR plus 255 basis points. Our first quarter activity brings net debt-to-EBITDA to 8.6 times down from 9 times at the end of 2018. Pro forma the conversion of our 2019 convertible notes, net debt-to-EBITDA was 8.4 times at the end of the first quarter.</p><p>Outside of $370 million of secured debt maturing in 2021, we have no other secured debt coming due until 2023. As such, we continue to anticipate less refinancing activity in 2019 and in 2018. However, we will remain opportunistic. It's attractive refinancing opportunities present themselves and we will continue to prioritize debt prepayments as part of our efforts to pursue an investment grade rating. Our liquidity at quarter end was over $1.1 billion through a combination of unrestricted cash and undrawn capacity on our credit facility.</p><p>I'll now cover our first quarter 2019 financial results. Core FFO per share increased 14.4% year-over-year to $0.33, primarily due to an increase in NOI and lower cash interest expense. AFFO increased 17.6% year-over-year to $0.28. Last thing I will cover is 2019 guidance. As Dallas and Charles discussed, we had a great first quarter and are positioned well going into peak season. While we are optimistic that we will continue to perform well through peak season, we are not taking it for granted. As such, we are raising our full-year 2019 same-store NOI growth guidance by 50 basis points to 4% to 5%. Driven by a 50 basis point reduction in same-store core expense growth guidance to 3% to 4%. We are maintaining our same-store core revenue growth guidance of 3.8% to 4.4% in 2019. We are also raising our full-year 2019 core FFO per share and AFFO per share expectations by $0.01 to $1.21 to $1.29 for core FFO, and $0.99 to $1.07 for AFFO.</p><p>From a timing perspective, I want to remind everyone that occupancy comps were easier at the start of 2019 than they will become as the year progresses. Regarding expenses, our efforts in the fourth quarter of 2018 and first quarter of 2019 provide a greater impact than was contemplated in our initial guidance. We are hopeful that we could perform better than the expectations that we laid out and are pleased that for the last two quarters we have. At the same time, I want to caution everyone that maintenance and turn volumes are typically lower in the first and fourth quarters, and we would expect a seasonal pickup in the spring and summer</p><p>From a big picture perspective, we believe there is a long runway for growth ahead of us. We are not surprised with our revenue performance to start the year, as fundamentals continue to favor single family rental in our portfolio locations and scale provide us a differentiated advantage. We also look forward to other opportunities to create value in our business. We are excited about the rollout of ProCare across all of our markets, which should drive better resident service and additional expense efficiency. We'll also continue to stay active in recycling capital, investing in value enhancing CapEx projects and beginning to pursue ancillary service offerings to enhance our residents' experience. As Dallas mentioned at the start of our call, it's a very exciting time for Invitation Homes.</p><p>With that operator, would you please open up the line for questions.</p><section class="read-more-section in-content">
<div class="wayfinder with-rule">
<hr class="wayfinder-rule"/>
<h2>Related Articles</h2>
</div>
<ul class="two-line-list">
<li>
<a class="read-more-link" href="/investing/2019/05/30/blackstone-looks-to-cash-in-this-massive-recession.aspx">Blackstone Looks to Cash In Its Massive Recession-Era Win</a>
</li>
<li>
<a class="read-more-link" href="/earnings/call-transcripts/2019/02/15/invitation-homes-inc-invh-q4-2018-earnings-confere.aspx">Invitation Homes Inc. (INVH) Q4 2018 Earnings Conference Call Transcript</a>
</li>
<li>
<a class="read-more-link" href="/investing/2019/02/07/why-these-single-family-home-reits-rallied-in-janu.aspx">Why These Single-Family-Home REITs Rallied in January</a>
</li>
</ul>
</section><h2>Questions and Answers:</h2><p><strong>Operator</strong></p><p>We will now begin the question-and-answer session. (Operator Instructions) Our first question comes from Drew Babin with Baird. Please go ahead.</p><p><strong>Alexander Kubicek</strong> -- <em>Robert W. Baird -- Analyst</em></p><p>Good Morning. This is Alex on for Drew. Looking at April leasing spreads, what markets are outperforming or on the other side underperforming your expectations. As you guys kind of get that first sneak peak at your leasing season? And generally at what rate are you guys sending out renewal notices today?</p><p><strong>Charles Young</strong> -- <em>Chief Operating Officer</em></p><p>Yeah, hi Alex, this is Charles. Yeah, so the West Coast has really been driving our results, if you look from Seattle into California and over to Phoenix, we've had increases in Q1 occupancy across the board and our year-over-year renewal and new lease rates blended rent growth is up. So all positive signs where we've been really excited in addition to the West Tampa and Texas have shown really good results in both occupancy and rate, and Denver has had some really good occupancy pushes as well. We are out in the low 6s in terms of our renewal ask and there's usually a spread from the asked to actually achieve.</p><p><strong>Alexander Kubicek</strong> -- <em>Robert W. Baird -- Analyst</em></p><p>Understood. And then follow-up for Charles. On the expense front, it looks like HOA fees trended upward pretty significantly after being stable last year. I'm sure bumps weren't up to 20% across the board. So can you speak a little color on what's going on in that line?</p><p><strong>Charles Young</strong> -- <em>Chief Operating Officer</em></p><p>Yeah. Good question. Look, as we finalize the integration, we realized that there were some improvement we could do in the HOA management process. And so as a result of that our accrual was off on HOA expense line. This is really attributable to the merger, it shouldn't be considered recurring. We expect this short-term true-up to be resolved by the end of Q2. And the great news is, today, after being done with the integration and having the right process in place, we have the right personnel and we're confident that we're well positioned to manage the HOA responsibility smoothly like we did pre-merger.</p><p><strong>Alexander Kubicek</strong> -- <em>Robert W. Baird -- Analyst</em></p><p>Perfect. And then one last quick one for Ernie, last quarter you talked about recurring CapEx being up about 3% this year, after really strong 1Q and obviously, I know the timing is different. Curious if we just get a little more color on what the cadence of CapEx spend looks like and if that 3% number still holding true?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah. We talked about the total net cost to maintain, which is both the OpEx and CapEx. We thought it would be up about 3% year-over-year. The great outperformance by the team in the first quarter actually has allowed us to revise those expectations that we would expect it to be more in the flat to 3% increase range. So definitely it should be a little bit better than we talked about a little bit earlier this year.</p><p><strong>Alexander Kubicek</strong> -- <em>Robert W. Baird -- Analyst</em></p><p>Great. Thanks for taking my questions.</p><p><strong>Operator</strong></p><p>Our next question comes from Nick Joseph with Citi. Please go ahead.</p><p><strong>Nick Joseph</strong> -- <em>Citi -- Analyst</em></p><p>Thanks. Ernie, just in terms of full-year core FFO guidance, particularly run rate from the first quarter if you get to around $1.30 or so above the high end, you've walked through the difficult comps in terms of occupancy on same-store revenue and some of the same-store expense side, but are there any other line items that make 1Q not a good run rate for the remainder of the year?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah, there's few things, Nick, and I appreciate you're asking the question. For one, we'll see interest expense tick-up for the remainder of the year, as we disclosed in our quarterly 10-Qs, a number of the swaps that we inherited in the merger were step up swaps, where it having one rate for the entire swap period. It started with a lower rate and progressed to a higher rate over the 3, 5, 7 year term of the swap. And so a number of the swaps reset in the first half of the year. And so we do expect on a full-year basis, if you were to annualize that -- that one-third you're able to reduce that by about $0.02 just for the step up swaps, Nick. In addition, and we've talked about this and there are some footnotes and our supplemental around it.</p><p>Currently, the convertible notes that we have that come due July 1st. Those will convert to shares at that point. We're treating those though at this point still as debt, because we're still paying interest expense on those, but that is slightly diluted when they convert the shares in the second half of the year. That's what it costs for roughly a $0.005 on the $1.30 that you mentioned. So those two items alone bring us down to more like $1.27 (ph) , $1.28 (ph) . Then the other two things I'd point out is that the business is a little seasonal. We do see expenses ramp up and margins decline in the third quarter. That's our peak. Certainly season for work orders, mainly around HVAC, so typically third quarter and you'll see that historically waffle a bit lower for margin. So to annualize the first quarter for NOI will be slightly off from that.</p><p>And then finally, teams are generally pretty conservative with our G&A spend in the first half of the year to save up some money for the second half of the year. So you'll see G&A ramp up a bit as we go into the second, third and fourth quarter. All those things combined would bring you down from the $1.30 number that you mentioned is something that's more -- that's more of the midpoint of our guidance range.</p><p><strong>Nick Joseph</strong> -- <em>Citi -- Analyst</em></p><p>That's very helpful. Thanks. And then just on the cap rate for the bulk acquisition. What was that? I think you mentioned it was 99% occupied, but there you saw some upside for putting their homes on the Invitation Homes platform, so kind of what the stabilized cap rate for that bulk acquisition as well?</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>Yeah, hi Nick, this is Dallas. On the in-place in terms of just pricing day one, it's kind of like a 5.7, 5.8 depending on kind of renewals and things that are going on near-term. And then I'd say that the way to think about that as we model that will turn about a third of that portfolio every year and we'd see that call it spot cap rate getting to low 6s over the next couple of years.</p><p><strong>Nick Joseph</strong> -- <em>Citi -- Analyst</em></p><p>Thanks.</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>Thanks, Nick.</p><p><strong>Operator</strong></p><p>Our next question comes from Shirley Wu with Bank of America Merrill Lynch. Please go ahead.</p><p><strong>Shirley Wu</strong> -- <em>Bank of America Merrill Lynch -- Analyst</em></p><p>Good morning, guys. So on the transaction side, a little bit more on the bulk acquisition in 2Q. Could you give us a little bit more color in terms of how you source that and what your expectations are for the rest of '19, whether you're going to do -- continue to do more bulk acquisition or maybe like the one-off?</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>We're certainly off to a really good start in terms of meeting our capital allocation goals for 2019. In terms of bulk, we maintain a pretty steady approach, you would seen that in the last quarter, fourth quarter of 2018, we're really active on the disposition side where we had sold a number of portfolios. And if and when those opportunities present themselves to us, we certainly will take a look, both from a buy or sell perspective. In this particular circumstance, it was a portfolio we've been familiar with for a number of years, it's a competitive of ours in the market. We definitely like the footprints of both Las Vegas and Atlanta in terms of the assets that we bought. And I would expect for us, surely, through the remainder of the year, kind of maintain our normal guidance, I think we talked about being somewhere between $300 million to $500 million of both buying and selling this year with a kind of a net neutral focus, but we'll definitely pay attention to what comes in front of us during the summer months. There are a few smaller opportunities out there, but nothing of real scale right now that would lead us to change our perspective.</p><p><strong>Shirley Wu</strong> -- <em>Bank of America Merrill Lynch -- Analyst</em></p><p>Got it. And as the 30-year mortgage rate has come down more recently, do you expect that to in fact your move-outs to home buying, especially in the spring season when people start to consider buying a home?</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>No, in fact, it's been pretty consistent. I mean, we've seen some small rate volatility over the past couple of years, but more or less homeownership rates been pretty constant between 64% and 65% for the better part of the last couple of years where we see some bigger shift isn't really affordability and that option to be able to lease is much more attractive than it is perhaps to own in many of our markets today. Roughly 15 of our 17 markets have pretty good dislocation in terms of the affordability factor pushing maybe customers preferably into a leasing decision versus ownership.</p><p><strong>Shirley Wu</strong> -- <em>Bank of America Merrill Lynch -- Analyst</em></p><p>Okay. Thanks for the color.</p><p><strong>Operator</strong></p><p>Our next question comes from Derek Johnston with Deutsche Bank. Please go ahead.</p><p><strong>Derek Johnston</strong> -- <em>Deutsche Bank -- Analyst</em></p><p>Hi, everyone. How are you doing? Are you planning to push rents even more aggressively in the busy spring and summer leasing season given your high level of occupancy? And as you guys were planning, did you consider raising revenue guidance with the other measures? And why did you decide to keep it unchanged?</p><p><strong>Charles Young</strong> -- <em>Chief Operating Officer</em></p><p>Yeah, hi. So this is Charles, I'll answer the first question. The way that we have set our lease expiration curve is the high demand season is Q2, Q3 as families are moving. So we really set our rents based on the market and demand that's out there. My expiration (ph) is kind of master that. So what you'll see is higher new lease growth in that high demand season and that renewals will kind of stay steady. And both have been really strong for us, really proud of what the teams have been doing. It's just great performance overall given the integration as well. So that's kind of how we see the demand come through the summer on the new lease side.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>And Derek, regarding guidance, first quarter on the revenue line given where we expect, I mean slightly ahead of expectations. We had signaled that the first quarter is going to be our easiest quarter from an occupancy comp perspective. We're not going to continue to maintain an 80 basis point increase year-over-year in occupancy like we did in the first quarter. So we had mentioned that we thought the rental rate would be up around 4% plus or minus and occupancy will be a little bit better and that's how you get to our guidance range of 3.8% to 4.4%. As I said, Charles and team executing as well as they are on rate as they did in the first quarter as they did in April in one of the April numbers. Yeah, that would certainly give us the opportunity to do at the midpoint or slightly better with revenue. But we started a little bit too early in the year and get to make an adjustment on that based on where we are at. Currently, we'll keep an eye on it, and we'll see how things play out during the second quarter.</p><p><strong>Derek Johnston</strong> -- <em>Deutsche Bank -- Analyst</em></p><p>That makes sense. And just secondly on turn and churn. So, can you discuss how the turn times trended in the first quarter and then how do you see churn shaking out for the rest of 2019?</p><p><strong>Charles Young</strong> -- <em>Chief Operating Officer</em></p><p>Yeah, this is Charles. So in terms of the actual turning of our homes in terms of construction and rehab, we are in 15 days in Q1. What you'll see though that's a little bit of a seasonal metric as demand gets a little higher in Q2, Q3, it's trending up a little bit in April, but that's typical. But 15 days is where we want to be and we're always looking for efficiency to bring that down. In terms of churn, I think you're referring to days of residents. So from move out to move in, we're about where we were last year in Q1, but we're seeing good trends down in April, that's very positive.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>And there, it's really hard for us to make a bold prediction on whether turnover will continue to be down year-over-year like it's been overall. As we mentioned in the prepared remarks, it's a 31% on a trailing 12-month basis. That's the lowest we've seen. So it's certainly hard to predict that it go lower still, certainly there's that opportunity, but we're not in a position to make a prediction on where that may go over the next few quarters. So we feel really good where it's at right now and the way that we're delivering service. We certainly see the opportunity to keep turnover on the low end of the scale.</p><p><strong>Derek Johnston</strong> -- <em>Deutsche Bank -- Analyst</em></p><p>Thanks, everyone. Great stuff.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Thanks.</p><p><strong>Operator</strong></p><p>Our next question comes from Jason Green with Evercore. Please go ahead.</p><p><strong>Jason Green</strong> -- <em>Evercore ISI -- Analyst</em></p><p>Good morning. Just wanted to touch on turnover a little bit more, turnover came in very low this quarter, I was wondering if there's anything unique about the homes that we're turning over this quarter or anything that you're seeing out there that would suggest that turnover will continue to reduce as we head into the peak leasing season?</p><p><strong>Charles Young</strong> -- <em>Chief Operating Officer</em></p><p>Hi. Thanks for the question. This is Charles. Nothing special about the homes that turned. I think, as we said, the tailwinds at our back is helpful for the industry in general. But we think turnover is low because of the quality of our resident service and the quality of our homes. Teams as I said, are really executing well. Now we're one platform. It's working in our favor and Dallas mentioned earlier, affordability is also a factor. So we really focus on what we can control and that's putting our great service and quality homes.</p><p><strong>Jason Green</strong> -- <em>Evercore ISI -- Analyst</em></p><p>And I guess in same-store expenses coming in flat. Can you quantify how much of that is really due to the fact that a 1,000 less homes turned this quarter versus the comparable quarter and how much of it is really due to increased efficiency in operations?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah, just off the top my head ,Jason, the 1,000 less turns, our turns typically run about $1,000 of operating expense, I assumed that $1,500 of operating expense. So I'd say that certainly about a point, point and a half may have come from that. Most of it's come from the fact that the teams are just performing better. And the things that Charles talked that came through for us in space with regards to what we're trying to do on R&M. So a little turnover certainly was a portion of it, but not the majority of it.</p><p><strong>Jason Green</strong> -- <em>Evercore ISI -- Analyst</em></p><p>Got it. Thank you.</p><p><strong>Operator</strong></p><p>Our next question comes from Rich Hill with Morgan Stanley. Please go ahead.</p><p><strong>Richard Hill</strong> -- <em>Morgan Stanley -- Analyst</em></p><p>Hey, good morning guys. Wanted to just follow-up with you on property taxes, late last year there was obviously a lot of discussion about property taxes and how those would be controllable going forward as the 2018 increases were one-time driven by M&A. So I wonder if you could put the 4.8% increase that we saw in 1Q in context and really what drove that?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Sure. So we had signaled rich that we expect the taxes to be up in the 5s for the year, because we've had good home price appreciation. And we also mentioned that we got the fourth quarter would be our best quarter, so we had the tough comp. So we actually came in a little better than expectations at the 4.8%. And what drove that was the State of Washington actually put out some legislation that limited military increases and we weren't anticipating that. So State of Washington, we have a -- we're unique, we have a portfolio of about 3,500 homes in Seattle, was a bigger good guy than we would have anticipated, and that will carry through for the rest of the year. That helped us. But I'll caution everyone that Washington is one of the few states that that comes out early. Texas does as well. The majority of what we'll find out about real estate taxes will start hitting in September and October, especially our bigger states, like Florida, Georgia, and so we've got a ways to go, but at least the first quarter put us on a path to be about where we expected with regards to real estate taxes.</p><p><strong>Richard Hill</strong> -- <em>Morgan Stanley -- Analyst</em></p><p>Got it. That's helpful. Thank you. And then maybe just going back to the expenses. Obviously, the guide implies I think 4.75% for the rest of the year. Is this -- are you just trying to take a little bit of conservative approach as you'd mentioned 2Q starts to be at the higher cost portion of the year, how should we be thinking about that?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah, I think that's probably the right way to think about it, Rich. We were happy with how things have happened, but it will be our first time going through peak work order season on the new systems. And we want to be cautious and appropriately so when setting our guidance. Your math -- the correct math, it certainly implies that the number is going to go up. And we must be perfectly fair with everyone, we do not expect flat growth for the rest of the year. If we did, we would revise guidance even further still. We still want to make sure we're being smart about how we are looking at it. And things happen. And so we'll make sure we're trying to leave some room for that as well. So we feel good about the numbers. We're certainly pleased with how the first quarter came in, and we're hopeful we can set ourselves up to have a successful remainder of the year with regards to expense control.</p><p><strong>Richard Hill</strong> -- <em>Morgan Stanley -- Analyst</em></p><p>Great. Thanks, Ernie. Congrats on a really well executed quarter.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Thank you.</p><p><strong>Operator</strong></p><p>Our next question comes from Hardik Goel with Zelman & Associates. Please go ahead.</p><p><strong>Hardik Goel</strong> -- <em>Zelman & Associates -- Analyst</em></p><p>Hey, guys, great quarter, congratulations. And maybe just one for Charles I guess, the turnover decline year-over-year was pretty significant. And I'm just wondering how much of that was intentional from you guys moving leases over the last year into the peak leasing season to give you better pricing? And how much was just organic decline?</p><p><strong>Charles Young</strong> -- <em>Chief Operating Officer</em></p><p>Yeah, I think a little bit of both. As we put the portfolios together, we're being thoughtful around that lease expiration curve. So that had some help. But, look, demand is healthy. We're executing well. We got to the single platform ahead of schedule, and it's paying dividends. We'll continue to provide high-quality service and we think over the long haul, it will help us. You put all that together and then the teams are really doing what the best they can do out there. I can't thank them enough, really best-in-class. So it's a lot of execution in the field.</p><p><strong>Hardik Goel</strong> -- <em>Zelman & Associates -- Analyst</em></p><p>And just one quick follow-up on personnel costs, there were some really good expense leverage there. What are the drivers of that? Is that as seasonal as other costs? How would you think about that, because it hasn't been in the past?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah, Hardik this is Ernie. That's almost entirely due to the merger and integration, where last year, staffing this time of the year was full with regards to the platform. We started seeing savings with regards to personnel and otherwise we rolled it further into 2018. As regarding to 2019, we just gotten with the integration being completed. We're just about at our final staffing levels. So it's really the staffing levels that drove that from the integration.</p><p><strong>Hardik Goel</strong> -- <em>Zelman & Associates -- Analyst</em></p><p>Got it, thanks. That's all from me.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yes, Hardik.</p><p><strong>Operator</strong></p><p>Our next question comes from Haendel St. Juste with Mizuho. Please go ahead.</p><p><strong>Haendel St. Juste</strong> -- <em>Mizuho Securities -- Analyst</em></p><p>Hey, good morning out there.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Hey, Haendel.</p><p><strong>Haendel St. Juste</strong> -- <em>Mizuho Securities -- Analyst</em></p><p>So, I guess first, kudos on the great expense result in the first quarter, Charles, I guess may be for you. I'm curious, just thinking more broadly longer term beyond some of the recent benefits from the improved systems and efficiencies and the merger synergies. What do you think now, the long-term expense run rate for your platform is after the merger synergies run out, after you get the systems kind of where you want them?</p><p><strong>Charles Young</strong> -- <em>Chief Operating Officer</em></p><p>Yeah, so thanks Haendel. We're really focused in on the execution that we did in Q4 and Q1, team has put up great cost controls with a lot of the systems that we discussed that we implemented in place last year. It's added real benefit. I think what's left for us to do is the implementation of ProCare, to roll that out as we finish the integration and train everybody on it and get that kind of internal system and partnership with the resident going. We also have in the future fleet management that's coming out, that's going to have some benefit. So it's hard to quantify exactly what that's going to be. We've put up good numbers. We're going to continue to execute. As Ernie said, peak season is the litmus test, and that's upcoming here. So hard to predict, but we're doing what we're supposed to and what we said we're going to do and we're executing well and we're going to continue to focus.</p><p><strong>Haendel St. Juste</strong> -- <em>Mizuho Securities -- Analyst</em></p><p>Got it, got it. And not to press too much on what's certainly a difficult question to answer. But I guess a few years back, we used to think about the expense growth business is more or less being inflationary, some operational hiccups last year forced to rethink of that. And so there was series of a higher expense projection coming into this year and certainly the guidance is reflecting some of the incremental cost. But is it still the view that this is inflationary and that there are factors between the clustering of your portfolio and the systems that can support that or should we be thinking about this as an inflation plus maybe 3%, 4% expense growth business over the long-term?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah. And I'll take a swing at it. This is Ernie. I think two components. We've talked about it before. I think we are not going to be much different broadly in general residential. So if people view that residentials will be inflationary plus, we probably saw that. Now they think it's going to be inflationary where probably there are things with inflationary minus. I think there's two very important differentiators for us where we are as an industry and as a company versus the broader residential community, which I talk about the multifamily. One is, real estate taxes are bigger component of our expenses than they are in residential because we are not a commercial product, we're residential product and close to 50% of our expenses come from real estate taxes. And we are in the best markets when it comes to home price appreciation. So that may lend you to think that we will be a little more inflationary plus because of that. Offsetting that I think at least for the near term is that we're still in early stages of running as an industry and as a business. So there's opportunities for efficiencies. And Charles mentioned a couple of those around fleet management. around ProCare and things like that. So at least for the near term, you'd hope to have some things there that will help offset that. But I think overall, this business has been around for hundreds and hundreds of years. It's only been institutionalized for the last few years. And it's worked for folks for the last hundreds and hundreds of years to be able to operate single-family homes and I'd like to think we can do a little bit better with the scale that we have and the expertise that we have and the technology capabilities we have and others don't. So hopefully, that all washes out to be a very similar profile that you would see in the broader residential world.</p><p><strong>Haendel St. Juste</strong> -- <em>Mizuho Securities -- Analyst</em></p><p>Thank you for that. And Ernie a quick one while I have you. Can you talk a bit about some of the ancillary service initiatives you're pursuing here, potential impact and potential timing on revenue?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>I'm going to pass that over to Dallas, because certainly it's one of his big focus as he's -- where he is sitting now.</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>Thanks, Ernie. Hi, Haendel. Couple of things we're working on, as you know, we've done a really good job with our Smart Home implementation and adoption rates, those adoption rates today are somewhere between 75% plus or minus. And we're looking to enhance some of those offerings. In fact, working on some of the stuff. I wouldn't expect a lot of it to be 2019, but more 2020 type of events as you start to think about the way that we could see other income growth in our business. And there's certainly a number of other areas that would fall into kind of two buckets. One would be things we're currently doing like Smart Home that we can do better. And we see an opportunity in our structure around pets and some of the things that we're doing there for our residents currently. We know that roughly 50% to 60% of our residents have pets. And we think there's other offerings and things that fit into those that we're now trying to work through and to see it what kind of experience we can provide that centers around some of that. We believe that that's also an emotional factor for the leasing lifestyle in terms of keeping our customers longer and providing an experience that feel stickier.</p><p>And so then there are other things that we're working on outside of that there maybe newer from an ancillary perspective. Are there other ways that we can perhaps make the experience as we onboard a new resident better by using things like deposit insurance versus deposits. And there's revenue streams that are associated with those types of things. Those are a few of the examples of things that we're working on, and they are near and dear to us kind of post merger integration, so that we can start to roll these out on a unified system and the delivery mechanisms for that, how we do that is really important. So we are focused on it.</p><p><strong>Haendel St. Juste</strong> -- <em>Mizuho Securities -- Analyst</em></p><p>Got it, got it. Thanks Dallas. Appreciate that and certainly we're looking intently on the rollout. Thank you.</p><p><strong>Operator</strong></p><p>Our next question comes from Buck Horne with Raymond James. Please go ahead.</p><p><strong>Buck Horne</strong> -- <em>Raymond James -- Analyst</em></p><p>Thanks, good morning. Just kind of bigger picture here with the share price starting to afford you a little bit more reasonable cost of capital here. So how do you think or has your thought process around deleveraging or accelerating deleveraging changed at all with better cost of capital here? Or are you also potentially thinking of accelerating your external growth activities? Is that a possibility as well? How do you think about kind of using your cost of capital more efficiently.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yes, thanks Buck. We've always talked about we'd be opportunistic when it comes to -- we have opportunities to delever or our opportunities to externally grow and certainly the share price behaving better that may give us some more opportunities. But where does the share price it states certainly on significantly under consensus NAV and where we think NAV is as well. And so to use the shares or equity to delever and when we're at that level is a difficult decision to make, and probably one we wouldn't want to make, we want to see some better performance there. But we'll always leave all options on the table. With regards to the external growth and we've been successful to able to fund that through capital recycling. But certainly, again, as share price behaves, it opens up some more avenues to us and then just a question, finding the right opportunities. So we're very cognizant with that. We talked to the Board often about that and we're pleased in where things have headed and we'll just have to see where things play out as we go forward.</p><p><strong>Buck Horne</strong> -- <em>Raymond James -- Analyst</em></p><p>Okay. That's great. And going back to the acquisition here in the second quarter. Just -- so as you're dropping in these new houses into the existing Atlanta and Vegas footprint, so this is kind of conceptually, but -- so obviously you're going to expect to improve the margin performance of that portfolio over time. But does it also leverage your costs for the existing homes in the portfolio? Can you improve the existing performance of the portfolio by adding these new homes and making the markets denser?</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>Yeah, great question. And fundamentally you nailed it in terms of the things that we think about in terms of growing our footprint and trying to find the right size. And scale, you hear us say this over and over when we see you guys at conferences and other things. But scale really matters in this business and so the Las Vegas example is one that we can talk about here briefly for a moment. As you think about our footprint there with that acquisition it took our Las Vegas footprint about 2,700 homes. And prior to the merger, Invitation Homes was plus or minus, I want to say 1,100, 1,200 homes in the Las Vegas market. And we think about the growth and the margin expansion with Las Vegas, similar to what we saw in other markets like Phoenix. We started these businesses, Phoenix was a market for us, it was in the kind of low to mid-60s. In our world today, Phoenix is a low 70s type market. And that comes through a couple of things, one is scale and footprint, because we get more efficient. Charles and his team do a fabulous job in terms of creating efficiencies around those pods, those groups that manage a portfolio for us. And about 2,700, 2,000 homes is about perfect size for us right now for a pod. So that makes us extremely efficient. There shouldn't be additional G&A additions with an acquisition like that. And then furthermore, your question around how that leverage the other parts of your portfolio. Well, as Charles and the team look at efficiencies around route optimization for our maintenance techs or the way that we stock our vans with the certain types of supplies and things like that. Certainly our work order and maintenance efficiencies get much more enhanced. And then to add to that on the revenue side, anytime we have another mark in the portfolio, in the book in the market, it makes us that much more competitive to understand what our rates are doing relative to our peers.</p><p><strong>Buck Horne</strong> -- <em>Raymond James -- Analyst</em></p><p>Thanks guys. Good job.</p><p><strong>Operator</strong></p><p>Our next question comes from Douglas Harter with Credit Suisse. Please go ahead.</p><p><strong>Sam Choe</strong> -- <em>Credit Suisse -- Analyst</em></p><p>Hi guys, this is actually Sam Choe filling in for Doug. So, I mean, we talked a lot about the turns, and I know that turns will pick up during peak season. But if the turnover rate stays at the current lows, could you see occupancy pushing past 97% for the portfolio on the whole?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>I think longer term, Sam, the math would tell you that would be the case that if you bring your days to reresident down further. And we've done that in April, it's about two or three days better this year than last year. And turnover stays low, you can do a quick math exercise and say that absolutely that on a stabilized basis, low 97% types occupancy over the course of the year is achievable. In April, it ended up 96.6% (ph) . So I would agree with that.</p><p><strong>Sam Choe</strong> -- <em>Credit Suisse -- Analyst</em></p><p>Got it. All right. Thank you so much.</p><p><strong>Operator</strong></p><p>Our next question is a follow-up from Nick Joseph with Citi. Please go ahead.</p><p><strong>Michael Bilerman</strong> -- <em>Citi -- Analyst</em></p><p>Hey, it's Michael Bilerman. Ernie, the $1.5 million of offering related expenses on page 10 in the supplemental that you're adding back for core FFO, what are those -- I guess why is Invitation paying that when Blackstone sold $1 billion? What does that -- what's that in regards to?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah. No, that's exactly what it is, we have to file three shelves, one for Blackstone selling its shares, one for Starwood Waypoint -- excuse me, Starwood Capital in case they want to do some shares and then the company has a shelf as well. And really, those cost spread across all three of those. Now, we aren't using our shelf today, but it is out there, if we do want to issue common equity. And that's just normal course with regards to how the shareholder agreements and things are written. And so, yes, it's about a third of a penny in terms of cost is a one-time costs associated with this as Blackstone does further transactions. The only cost that would be associated with those, Mike, would be comfort letters and things like that in a much more smaller amount of legal costs associated with future offerings. But it's standard course for the first time, when you get it set up for the company pick that up.</p><p><strong>Michael Bilerman</strong> -- <em>Citi -- Analyst</em></p><p>And you didn't want to put that the G&A, it's just normal course of business. There is always tough as a public company that you have and you might back it out of core FFO? I know it's a small number, but just from a methodology perspective, it just seems like, we go down this road of having alternative definitions of earnings.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah, I can understand that. You kind of said what it was, it was a small amount, we want to call it out so people could see it very specifically. It's onetime and a little more expensive than usual because three shelves that would be filed versus one that company would do in the future. And shelves you do every few years. But it's fair feedback, Michael. We wanted give more disclosure and let people do with it what they thought.</p><p><strong>Michael Bilerman</strong> -- <em>Citi -- Analyst</em></p><p>And then the perspective on page nine had $1.4 million. Is that just a different amount or is it relating to something else?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>No. They should be pretty consistent, Michael. So I'd have to check to see why we might ended up with an extra tens of thousands of dollars that might have rolled in separate from that, that were also in that line, but I don't have an accounting for that on top of my head.</p><p><strong>Michael Bilerman</strong> -- <em>Citi -- Analyst</em></p><p>And then you're comment on NAV. You made the comment that Street consensus and maybe these are -- I think you said significantly or much, but it was indicating that there was a lot higher than where the stock's trading. SNL got your NAV at $24.34 (ph) and FactSet has got it to $25.64 (ph) , stocks at $25.20 (ph) . So it's not -- I mean, I guess it's in the range of where the Street sort of thing it's worth. So I just wanted to sort of follow-up a little bit on that comment about using your equity to accelerate and deleveraging program or to fund external growth?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah. And so I'm pleased to hear that it's doing so well this morning. We've been preparing for the call, so I haven't been paying attention to the fact that it's gone up some this morning. So that's good to see. What I can say, Michael, is we actually pulled the analyst models and I don't think everyone reports into those numbers and we can get to a number that's closer to 26.5% for what the analysts set out there. So I'm calling that consensus, understanding other people to different consensus numbers.</p><p>Regardless, we have a different view on where NAV and we haven't disclosed NAV since our IPO. Yeah, it's just like any other public company. We'll use that as a source for capital for us. On the deleveraging side, we have a very set balance sheet today. We'd like to get to investment grade faster if we could. If we weren't going to do that by diluting current shareholders. We don't have that need, that requirement. We certainly, it's a like -- it's a preference to get to investment grade as fast as we can. And we'll keep that option open for us if the stock price continues to perform and do better.</p><p>And then regardless, Dallas and Charles come from very acquisitive backgrounds. They both worked in the private world and you've seen what they were able to build in the predecessor companies and we've done here. So we'll certainly look very carefully at what our best cost of capital for us, if we found the right external growth opportunities, Michael. So I'd like to thank management and everyone, Board is aligned with all of our shareholders and we want to get accomplished there.</p><p><strong>Michael Bilerman</strong> -- <em>Citi -- Analyst</em></p><p>And just remind me in terms of processes, Blackstone came and wanted to do another secondary offering of their shares. And you could tag along with that in terms of issuing primary. Do you have the ability to knock the amount down? Or more so just like a pure negotiation with them about what the right sizing of a total offering is? Right. So I'm saying -- let's say they came said, we want to do $1 billion. You don't think you can put $1 billion into the market. You want to do $500 million? What's the -- is it preset in terms of methodology or it has to be negotiated?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Well, I'd say it's different things. So anytime that the company is thinking about issuing equity, Michael, it's a decision of our Board. So management will go to the Board of Directors and say whatever reason, whether Blackstone is potentially selling at that point, Starwood selling at that point or anyone else. We think there's an opportunity for us to issue equities and/or at other times we'd have engaged in discussion with our Board before what we thought it was right for the company.</p><p>And Blackstone, you'd have to ask Blackstone with regards to how they're choosing to set how much they want to sell, when they want to sell and things like that. We're certainly are privy to that. And if there's opportunity for us to be efficient and do it all at the same time, then we would get together and do what makes the most sense for the shareholders to get that accomplished. Blackstone first and foremost, is focused on what makes sense for the shareholders. And they certainly made their intentions known and what they want to do, but they also have -- as you know, Michael, a lot of shares to sell and they want to make sure they're doing that in the smartest way as they've demonstrated with the other platform companies. And today they've demonstrated with Invitation Homes. So I'd expect nothing less than that going forward.</p><p><strong>Michael Bilerman</strong> -- <em>Citi -- Analyst</em></p><p>Okay. Thanks for all the color Ernie. Appreciate it.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah, Michael, thank you.</p><p><strong>Operator</strong></p><p>Our next question comes from John Pawlowski with Green Street Advisors. Please go ahead.</p><p><strong>John Pawlowski</strong> -- <em>Green Street Advisors -- Analyst</em></p><p>Thanks. Dallas, on the dispositions in this quarter and in recent quarters, could you share what NOI growth for these homes, these lower quality homes would look like over the next several years if you're still operating them?</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>Yeah. It's a little bit of a tricky question, John, in terms of what we've sold, I have to go back and look and where you're summing. The NOI growth probably more or less is kind of along the lines of what you'd see from the company. Maybe a little bit less. And that's one of the reasons why we might be selling some of these homes. Remember, we do sell for reasons outside of just -- I mean, obviously NOI growth is key and something that we focused on. We want to make sure that the homes in our portfolio long-term are ones that are going to provide some of the best risk adjusted returns to shareholders.</p><p>What we typically been doing so far through the first four months of the year and much of like what you saw in fourth quarter is we've been selling homes that are either A, an outlier geography or parts of the portfolio that just really inefficient for us to manage. B, homes that are either suboptimal in nature because of finish, potential CapEx risk down the road or C, we've been selling homes that had been bigger too. We have homes in our footprints that are too big from a square footage standpoint. And so if you look at the types of homes that we're typically buying, we want -- our sweet spot is kind of between 1,600 and 2,200 square feet, 2,300 square feet. And so for those variety of reasons, we might be a net seller and typically we see lower growth coming out of some of those homes.</p><p><strong>John Pawlowski</strong> -- <em>Green Street Advisors -- Analyst</em></p><p>Okay. Then if NOI growth is not maybe a bit lower, could you share how much higher their all-in cost to maintain is?</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>It vary. It would vary. Again, to my earlier points around square footages and geographies. We have different fit and finish standards. For example, in a home like Seattle where we might put down vinyl plank flooring every time. And so if a homework coming through our asset management review in that market, we would certainly take into consideration some of those longer-term CapEx needs that home might need. Whereas maybe a home in one of our warmer Southwest markets may have a little bit different CapEx approach and our margins may be better. So we may be inclined to keep that home a bit longer. It all goes into kind of the cycle of how we do our rebuy analysis on a home by home basis.</p><p><strong>John Pawlowski</strong> -- <em>Green Street Advisors -- Analyst</em></p><p>Okay. On the portfolio acquisition. I understand the margin benefits. Could you share how far below you think the market rents were -- the rents were versus market?</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>Yeah. I think, to just high single digits from a rent perspective, in terms of where we think there's immediate turn on these rents as they renew. And then also kind of going in price. As I mentioned earlier, being kind of 5.7, 5.8 on an in place cap raise is much higher than we typically are able to see in that marketplace. Vegas is a hard market to buy in. So we're actually thrilled with our ability to buy this type of portfolio.</p><p><strong>Charles Young</strong> -- <em>Chief Operating Officer</em></p><p>Yeah, John. I'd say, if you look at our supplementals you've seen Vegas has really ramped up in terms of new lease growth rates in the last year for us. And the vast proportion of the portfolio was in Vegas. So just the embedded loss of the lease in the portfolio is higher than we would typically see in our portfolio. So between that and then the fact they were running at a very high occupancy, so we don't think they were pushing as much as we might have chosen to do. And they were choosing to run the business a little bit differently. It gives us confidence that we've got potentially an opportunity for some rent bumps on that portfolio as leases turn.</p><p><strong>John Pawlowski</strong> -- <em>Green Street Advisors -- Analyst</em></p><p>Okay. Then one final one for me. Charles, could you share the bad debt trends year-over-year? And any notable outliers by markets either downward or upward inflection points in bad debt?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah, I'll answer that one, John it's Ernie. We've actually see bad debt trends are consistent year-over-year within a few basis points and we haven't seen any outliers in any markets positive or negative. It's all been relatively consistent on a year-over-year basis.</p><p><strong>John Pawlowski</strong> -- <em>Green Street Advisors -- Analyst</em></p><p>Okay. Thanks for taking all the questions.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Welcome. Thanks, John.</p><p><strong>Operator</strong></p><p>Our next question is from Jade Rahmani with KBW. Please go ahead.</p><p><strong>Jade Rahmani</strong> -- <em>KBW -- Analyst</em></p><p>Thanks very much. Just thinking about the cadence of turnover and new lease activity. Do you expect occupancy to dip in June sequentially?</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>Yeah. Typically we'll see occupancy go down in Q2, Q3 as we talked about the turnover of volume. So we do think that April, while we came in high, as we go deeper into the summer, we're going to see that occupancy number trend down.</p><p><strong>Jade Rahmani</strong> -- <em>KBW -- Analyst</em></p><p>Thank you. Secondly, have you sold any assets to iBuyer such as Zillow or Opendoor? And if so, could you quantify the percentage?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Yeah. Today, we really haven't sold much through the iBuyer platforms. It's something we certainly considered Jade, it's a good question. We've been more of an acquire of properties I should say, through the iBuyer platforms. But we certainly look at it as another form for us to be able to transact. And as they develop their systems get a bit more robust and a bit more user friendly, you could certainly anticipate they were especially on some of our vacant or end user sales that we might choose to sell through some of those platforms.</p><p><strong>Jade Rahmani</strong> -- <em>KBW -- Analyst</em></p><p>And just lastly, in terms of home purchase trends, are you seeing any change in the percentage of move outs to the buy? Has that declined notably on a year-over-year basis?</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>On a year-over-year basis just up, just a bit. Not much more than anything that's been normal. Typically been between 22% and 25% of our move outs. And it's still kind of right in that range depending on the month and the quarter.</p><p><strong>Jade Rahmani</strong> -- <em>KBW -- Analyst</em></p><p>Thanks very much.</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>Thanks, Jade.</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>Thanks, Jade.</p><p><strong>Operator</strong></p><p>Our next question comes from Wes Golladay with RBC Capital Markets. Please go ahead.</p><p><strong>Wes Golladay</strong> -- <em>RBC Capital Markets -- Analyst</em></p><p>Hi guys. A quick question on the renewals. So it's like supply and demand is quite favorable especially compared to last year. Is there anything holding you back from pushing more on the renewals? Do you have any internal governor?</p><p><strong>Charles Young</strong> -- <em>Chief Operating Officer</em></p><p>Really like we said before, really set by market and we look at a number of factors that determine what that price will be. We'll go out with healthy assets as we talked about in the low 6s. But we want to find that right balance between keeping occupancy and minimizing turnover. And our revenue management teams working with the field teams do a great job of finding that right balance. So market sets it. And also we -- it's our performance on the resident customer service that we're providing and do they want to stay with us and we've been doing better and better as our teams are really focused on making sure we create a great resident experience. And so demand is looking good for us.</p><p><strong>Wes Golladay</strong> -- <em>RBC Capital Markets -- Analyst</em></p><p>Okay. And then one quick one on the acquisition -- the bulk acquisition. You mentioned about the rental uplift, but you imagine there's quite a bit of a difference on the margin between your existing portfolio in the market and in which you bought. Do you know that off hand? And then would you expect to close most of that in the first year by just plugging it into your platform?</p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p>When we underwrote, we expected the revenues to be -- we didn't really dig into the expense history so much on their side. We just, when we model a bulk acquisition, we'll look to see what's happening from an R&M perspective on that portfolio. But we'll run it through our model Wes, with regards, we expect margins to be. That said, based on where the cap rate -- where it came out for us. We think it was a win-win, it was a win for the sellers for where they could run the portfolio, I think they got a fair price and they were clearly pleased with that otherwise we wouldn't have moved forward. On the flip side, we think it's a win for us because it was a little bit of a different model in terms of how we want to run the revenue side, what we would do on the expense side.</p><p>So whether we have an uplift or not from where they are. We're comfortable with that we'll get this to our margins. And as we talked about earlier, especially in a market like Vegas, we increased our footprint by almost 10%, allow us to run even more efficiently across the entire footprint of Las Vegas. Not so much with Atlanta, with only a couple of them -- only about 100 homes we buy in Atlanta with 12,000, it won't have much of a difference there, but certainly allows us in one of the best markets today and one of the fastest growing market today Vegas to increase our footprint and improve the margins across the whole portfolio in Vegas.</p><p><strong>Wes Golladay</strong> -- <em>RBC Capital Markets -- Analyst</em></p><p>Great. Thank you very much.</p><p><strong>Operator</strong></p><p>This concludes our question-and-answer session. I would now like to turn the conference back over to Dallas Tanner for any closing remarks.</p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p>Thanks for joining us today. We appreciate everyone's interest in Invitation Homes. We're excited about where we are today with our business and the opportunities in front of us. And we look forward to seeing everyone, hopefully at NAREIT in June. Thank you.</p><p><strong>Operator</strong></p><p>The conference is now concluded. Thank you for attending today's presentation. You may now disconnect.</p><p><strong>Duration: 60 minutes</strong></p><h2>Call participants:</h2><p><strong>Greg Van Winkle</strong> -- <em>Vice President of Investor Relations</em></p><p><strong>Dallas B. Tanner</strong> -- <em>President and Chief Executive Officer</em></p><p><strong>Charles Young</strong> -- <em>Chief Operating Officer</em></p><p><strong>Ernest M. Freedman</strong> -- <em>Chief Financial Officer</em></p><p><strong>Alexander Kubicek</strong> -- <em>Robert W. Baird -- Analyst</em></p><p><strong>Nick Joseph</strong> -- <em>Citi -- Analyst</em></p><p><strong>Shirley Wu</strong> -- <em>Bank of America Merrill Lynch -- Analyst</em></p><p><strong>Derek Johnston</strong> -- <em>Deutsche Bank -- Analyst</em></p><p><strong>Jason Green</strong> -- <em>Evercore ISI -- Analyst</em></p><p><strong>Richard Hill</strong> -- <em>Morgan Stanley -- Analyst</em></p><p><strong>Hardik Goel</strong> -- <em>Zelman & Associates -- Analyst</em></p><p><strong>Haendel St. Juste</strong> -- <em>Mizuho Securities -- Analyst</em></p><p><strong>Buck Horne</strong> -- <em>Raymond James -- Analyst</em></p><p><strong>Sam Choe</strong> -- <em>Credit Suisse -- Analyst</em></p><p><strong>Michael Bilerman</strong> -- <em>Citi -- Analyst</em></p><p><strong>John Pawlowski</strong> -- <em>Green Street Advisors -- Analyst</em></p><p><strong>Jade Rahmani</strong> -- <em>KBW -- Analyst</em></p><p><strong>Wes Golladay</strong> -- <em>RBC Capital Markets -- Analyst</em></p>
<p><a href="https://www.fool.com/quote/invh">More INVH analysis</a></p>
<p><a href="https://www.fool.com/earnings-call-transcripts/">All earnings call transcripts</a></p>
<p><img alt="AlphaStreet Logo" src="https://optimize.foolcdn.com/?url=https%3A%2F%2Fg.foolcdn.com%2Fmisc-assets/banner-2b-ff.jpg&w=200&op=resize"/> </p>
<div id="pitch"></div>
</span>
<span class="article-disclosure" data-content='<p><em>This article is a transcript of this conference call produced for The Motley Fool. While we strive for our Foolish Best, there may be errors, omissions, or inaccuracies in this transcript. As with all our articles, The Motley Fool does not assume any responsibility for your use of this content, and we strongly encourage you to do your own research, including listening to the call yourself and reading the company's SEC filings. Please see our </em><a href="https://www.fool.com/legal/terms-and-conditions/fool-rules"><em>Terms and Conditions</em></a><em> for additional details, including our Obligatory Capitalized Disclaimers of Liability.</em></p><p><i><a href="http://boards.fool.com/profile/MFTranscribers/info.aspx">Motley Fool Transcribers</a> has no position in any of the stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. The Motley Fool has a <a href="http://www.fool.com/Legal/fool-disclosure-policy.aspx">disclosure policy</a>.</i></p>'></span>
<div class="special-message">
<div class="promoboxAd">
<div id='div-promobox-74318' data-params='{"primary_tickers_companies": ["Invitation Homes Inc."], "uid": "", "divId": "div-promobox-74318", "pos": 0, "collection": "/earnings/call-transcripts", "height": 300, "seg": "default", "test_bucket": 35, "adtags": "[\"msn\", \"yahoo-money\", \"default-partners\"]", "services": [], "tstrId": "1Ses_3col-pf-246_var2-recirc_33", "segment": "default", "pitchId": null, "placement": "promobox", "primary_tickers": ["INVH"], "headline": "Invitation Homes Inc. (INVH) Q1 2019 Earnings Call Transcript", "session_count": 0, "width": 470, "ten_or_more_sessions": false, "bureau": "usmf-financials", "position": 0, "tickers": "[\"\"]"}' class='promobox-content'></div><script type='text/javascript'>PitcherAds.get({"primary_tickers_companies": ["Invitation Homes Inc."], "uid": "", "divId": "div-promobox-74318", "pos": 0, "collection": "/earnings/call-transcripts", "height": 300, "seg": "default", "test_bucket": 35, "adtags": "[\"msn\", \"yahoo-money\", \"default-partners\"]", "services": [], "tstrId": "1Ses_3col-pf-246_var2-recirc_33", "segment": "default", "pitchId": null, "placement": "promobox", "primary_tickers": ["INVH"], "headline": "Invitation Homes Inc. (INVH) Q1 2019 Earnings Call Transcript", "session_count": 0, "width": 470, "ten_or_more_sessions": false, "bureau": "usmf-financials", "position": 0, "tickers": "[\"\"]"});</script>
</div>
</div>
</section>
</div>
<aside class="column sidebar right article-page" id="sidebar-right">
<section class="related-content sidebar-content" id="sidebar-right-content">
<div class="info-card ad">
<!-- Create container for ad -->
<div id='div-sidebar1_desk-2010' class='dfp-ads ad'>
<script type="text/javascript">
googletag.cmd.push(function() {
googletag.display('div-sidebar1_desk-2010');
});
</script>
</div>
</div>
<section class="trending-articles-section">
<article class="ap-news-panel-article trending ">
<div class="label">Trending</div>
<ul class="ap-trending-articles-list">
<li><a href="/investing/2019/07/01/guess-who-just-became-amazons-biggest-shipper.aspx">Guess Who Just Became Amazon's Biggest Shipper</a></li>
<li><a href="/investing/2019/06/30/3-hot-growth-stocks-id-buy-right-now.aspx">3 Hot Growth Stocks I'd Buy Right Now</a></li>
<li><a href="/retirement/2019/07/01/3-reasons-people-dont-use-annuities-the-way-they-w.aspx">3 Reasons People Don't Use Annuities the Way They Were Meant to Be Used</a></li>
<li><a href="/retirement/2019/07/01/70-of-americans-arent-saving-for-retirement-for-th.aspx">70% of Americans Aren't Saving for Retirement for This Reason</a></li>
<li><a href="/investing/top-stocks-to-buy.aspx">20 of the Top Stocks to Buy in 2019 (Including the 2 Every Investor Should Own)</a></li>
</ul>
</article>
</section>
<!-- Related Tickers Section -->
<section class="related-tickers">
<div class="wayfinder with-rule">
<hr class="wayfinder-rule" />
<h2>Stocks</h2>
</div>
<div class="ticker-row" data-instrument-id="338893">
<div>
<span class="image-wrap">
<a href="https://www.fool.com/quote/nyse/invitation-homes-inc/invh" class="quote-image">
<h5>INVH</h5>
<img alt="Invitation Homes Inc. Stock Quote"
data-img-src="https://g.foolcdn.com/image/?url=https%3A%2F%2Fg.foolcdn.com%2Fart%2Fcompanylogos%2Fmark%2FINVH.png&h=64&w=64&op=resize"
src="" />
</a>
</span>
<h3>Invitation Homes Inc.</h3>
<h4 class="h-margin-b">
<span class="ticker">
<a title="Invitation Homes Inc. Stock Quote" href="https://www.fool.com/quote/nyse/invitation-homes-inc/invh">
NYSE:<span class="symbol">INVH</span>
</a>
</span>
</h4>
<aside class="price-quote-container smaller">
<h4 class="current-price">
$26.59
</h4>
<h4 class="price-change-arrow price-neg">
<span style="position:absolute;left:-999em;">down</span>
<i class="fool-icon-arrow-down"></i>
</h4>
<h4 class="price-change-amount price-neg">
$0.14
</h4>
<h4 class="price-change-percent price-neg">
(-0.54%)
</h4>
</aside>
</div>
</div>
</section>
<!-- Related Articles Section -->
<section class="read-more-section">
<section class="read-more-section ">
<div class="wayfinder with-rule">
<hr class="wayfinder-rule"/>
<h2>Related Articles</h2>
</div>
<ul class="two-line-list">
<li>
<a class="read-more-link" href="/investing/2019/07/01/stock-market-news-warren-buffett-makes-a-gift-maca.aspx">Stock Market News: Warren Buffett Makes a Gift; Macao Sends Las Vegas Sands Higher</a>
</li>
<li>
<a class="read-more-link" href="/investing/2019/07/01/is-public-storage-a-buy.aspx">Is Public Storage a Buy?</a>
</li>
<li>
<a class="read-more-link" href="/investing/2019/07/01/is-new-york-community-bancorp-a-buy.aspx">Is New York Community Bancorp a Buy?</a>
</li>
<li>
<a class="read-more-link" href="/investing/2019/06/30/jpmorgan-chase-unveils-its-2019-capital-program-wh.aspx">JPMorgan Chase Unveils Its 2019 Capital Program: What Investors Need to Know</a>
</li>
<li>
<a class="read-more-link" href="/investing/2019/06/30/10-highest-yielding-dividend-stocks-in-the-s-p-500.aspx">The 10 Highest-Yielding Dividend Stocks in the S&P 500</a>
</li>
</ul>
</section>
</section>
<hr class="wayfinder-rule ad-scroll-marker" />
<div class="info-card ad ad-scroll">
<!-- Create container for ad -->
<div id='div-sidebar2_desk-92169' class='dfp-ads ad'>
<script type="text/javascript">
googletag.cmd.push(function() {
googletag.display('div-sidebar2_desk-92169');
});
</script>
</div>
</div>
</section>
</aside>
</div>
</div>
</div>
<div class="article-page-end">
<div id="share-box">
<span id="twitter_title" style="display: none">Invitation Homes Inc. (INVH) Q1 2019 Earnings Call Transcript @themotleyfool #stocks $INVH</span>
<a class="item" id="share-facebook" name="facebookShareButton" href="https://facebook.com/sharer/sharer.php?u=https://www.fool.com/earnings/call-transcripts/2019/05/07/invitation-homes-inc-invh-q1-2019-earnings-call-tr.aspx" target="_blank" aria-label="Share on Facebook">
<svg class="fa-svg-icon"> <use xlink:href="#facebook-f"></use> </svg>
</a>
<a class="item" id="share-twitter" name="twitterShareButton" href="https://twitter.com/intent/tweet/?text=Invitation%20Homes%20Inc.%20%28INVH%29%20Q1%202019%20Earnings%20Call%20Transcript%20%40themotleyfool%20%23stocks%20%24INVH&url=https://www.fool.com/earnings/call-transcripts/2019/05/07/invitation-homes-inc-invh-q1-2019-earnings-call-tr.aspx" target="_blank" aria-label="Share on Twitter">
<svg class="fa-svg-icon"> <use xlink:href="#twitter"></use> </svg>
</a>
<a class="item" id="share-linkedin" name="linkedinShareButton" href="https://www.linkedin.com/shareArticle?mini=true&url=https://www.fool.com/earnings/call-transcripts/2019/05/07/invitation-homes-inc-invh-q1-2019-earnings-call-tr.aspx&title=Invitation%20Homes%20Inc.%20%28INVH%29%20Q1%202019%20Earnings%20Call%20Transcript&summary=Invitation%20Homes%20Inc.%20%28INVH%29%20Q1%202019%20Earnings%20Call%20Transcript&source=https://www.fool.com/earnings/call-transcripts/2019/05/07/invitation-homes-inc-invh-q1-2019-earnings-call-tr.aspx" target="_blank" aria-label="Share on LinkedIn">
<svg class="fa-svg-icon"> <use xlink:href="#linkedin-in"></use> </svg>
</a>
<a class="item" id="share-email" name="emailShareButton" href="mailto:?subject=Invitation%20Homes%20Inc.%20%28INVH%29%20Q1%202019%20Earnings%20Call%20Transcript&body=https://www.fool.com/earnings/call-transcripts/2019/05/07/invitation-homes-inc-invh-q1-2019-earnings-call-tr.aspx" target="_self" aria-label="Share by E-Mail">
<svg class="fa-svg-icon"> <use xlink:href="#envelope"></use> </svg>
</a>
<a class="item" id="next-article" name="nextArticleButton" href="" aria-label="Next Article">
<span>Next Article</span>
<svg class="fa-svg-icon"> <use xlink:href="#chevron-right"></use> </svg>
</a>
</div>
<!--googleoff: all-->
<div id="pagination" class="pagination" style="clear:both;display:none;" data-show-incontent-ads="True">
<ul>
<li id="prev" class="page-prev"><a href="javascript:void(0)">Prev</a></li>
<li>
<ul>
<li><a href="/earnings/call-transcripts/2019/05/07/invitation-homes-inc-invh-q1-2019-earnings-call-tr.aspx" id="1">1</a></li>
<li>
<a href="/earnings/call-transcripts/2019/06/28/nike-inc-nke-q4-2019-earnings-call-transcript.aspx" id="2">2</a>
</li>
<li>
<a href="/earnings/call-transcripts/2019/06/28/jinkosolar-holding-co-ltd-jks-q1-2019-earnings-cal.aspx" id="3">3</a>
</li>
<li>
<a href="/earnings/call-transcripts/2019/06/28/constellation-brands-inc-stz-q1-2020-earnings-call.aspx" id="4">4</a>
</li>
<li>
<a href="/earnings/call-transcripts/2019/06/28/barnes-noble-education-inc-bned-q4-2019-earnings-c.aspx" id="5">5</a>
</li>
<li>
<a href="/earnings/call-transcripts/2019/06/28/motorcar-parts-of-america-inc-mpaa-q4-2019-earning.aspx" id="6">6</a>
</li>
</ul>
</li>
<li id="next" class="page-next"><a href="javascript:void(0)">Next</a></li>
</ul>
</div>
<!--googleon: all-->
</div>
</section>
</section>
</div>
<footer class="footer" id="usmf-footer"></footer>
</div>
</div>
<div id="currently-active-desc" style="display:none;">Current</div>
<script type="text/javascript" src="//g.foolcdn.com/static/dubs/CACHE/js/db2d33607983.js" defer></script>
<script type="text/javascript" src="//g.foolcdn.com/misc-assets/tmf-top-hat-build.js?v=" defer></script>
<script type="text/javascript">
var dataLayer = dataLayer || [];
var md5HashedEmail = unescape(encodeURIComponent("d41d8cd98f00b204e9800998ecf8427e")).trim().toLowerCase();
var sha256HashedEmail = unescape(encodeURIComponent("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")).trim().toLowerCase();
dataLayer.push({'EmailReady.hashed_email': md5HashedEmail});
dataLayer.push({'EmailReady.hashed_email_256': sha256HashedEmail});
dataLayer.push({'event': 'EmailReady'});
!function(l,a){a.liosetup=a.liosetup||{},a.liosetup.callback=a.liosetup.callback||[],a.liosetup.addEntityLoadedCallback=function(l,o){if("function"==typeof a.liosetup.callback){var i=[];i.push(a.liosetup.callback),a.liosetup.callback=i}a.lio&&a.lio.loaded?l(a.lio.data):o?a.liosetup.callback.unshift(l):a.liosetup.callback.push(l)}}(document,window);
window.liosetup.addEntityLoadedCallback(function(data){
if(typeof(data) !== "undefined" && typeof(data.segments) !== "undefined") {
dataLayer.push({'event': 'LyticsSegmentsReady', 'segments': data.segments});
window.googletag = window.googletag || {};
window.googletag.cmd.push(function () {
var lytics_segments_string = "";
for (var i = 0; i < data.segments.length; i++) {
if (data.segments[i].indexOf("dfp_") !== -1) {
if (lytics_segments_string != "") {
lytics_segments_string = lytics_segments_string + ", " + data.segments[i];
} else {
lytics_segments_string = data.segments[i];
}
}
}
window.googletag.pubads().setTargeting("LyticsSegments", lytics_segments_string);
});
}
});
</script>
<script type="text/javascript" src="//g.foolcdn.com/static/dubs/CACHE/js/7584638be392.js" defer></script>
<script type="text/javascript" src="//g.foolcdn.com/static/dubs/common/js/fool/endless_scroll.15d7b45a509c.js" defer></script>
<div id="fb-root"></div>
<script type="text/javascript" src="//g.foolcdn.com/static/dubs/CACHE/js/6c5ad9c18695.js" defer></script>
<script>
fool.insertScript('facebook-jssdk', '//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.3', true);
fool.insertScript('twitter-wjs', '//platform.twitter.com/widgets.js', true);
</script>
<script>
if (typeof window.Infotrack !== "undefined") {
var infotrackUrl = '//g.foolcdn.com/mms/resources/js/infotrack_min.js';
Infotrack.load(infotrackUrl);
var infotrackInitializeWait = infotrackInitializeWait || 0;
setTimeout(function(){
window.Infotrack.initialize("usmf");
}, infotrackInitializeWait);
}
</script>
</body>
</html>
| 85.407182 | 55,676 | 0.648729 |
7f6ca6e464c8938e6842cea62f95bde2ee80b094 | 593 | go | Go | once.go | izumin5210/redisync | 3bf3cc2c6ca0dcb5c1504bc4cff07e1d4115cdd6 | [
"MIT"
] | 4 | 2019-09-19T14:40:11.000Z | 2019-09-21T08:38:42.000Z | once.go | izumin5210/redisync | 3bf3cc2c6ca0dcb5c1504bc4cff07e1d4115cdd6 | [
"MIT"
] | 2 | 2019-09-28T10:02:27.000Z | 2019-11-05T08:19:42.000Z | once.go | izumin5210/redisync | 3bf3cc2c6ca0dcb5c1504bc4cff07e1d4115cdd6 | [
"MIT"
] | null | null | null | package redisync
import (
"context"
)
type Once struct {
OnceConfig
pool Pool
}
func NewOnce(pool Pool, opts ...OnceOption) *Once {
return &Once{
OnceConfig: createOnceConfig(opts),
pool: pool,
}
}
func (o *Once) Do(ctx context.Context, key string, f func(context.Context) error) error {
conn, err := o.pool.GetContext(ctx)
if err != nil {
return err
}
defer conn.Close()
unlockValue, err := TryLock(conn, key, o.Expiration)
if err != nil {
return err
}
err = f(ctx)
if err != nil && o.UnlockAfterError {
_ = Unlock(conn, key, unlockValue)
}
return err
}
| 16.027027 | 89 | 0.655987 |
c38c4fb709a14bf1598c1f79d7ea553ea0120631 | 1,977 | go | Go | bench/report_test.go | logeable/gout | f67b080db30dcb89837798065c359576fa2d7c06 | [
"Apache-2.0"
] | null | null | null | bench/report_test.go | logeable/gout | f67b080db30dcb89837798065c359576fa2d7c06 | [
"Apache-2.0"
] | null | null | null | bench/report_test.go | logeable/gout | f67b080db30dcb89837798065c359576fa2d7c06 | [
"Apache-2.0"
] | null | null | null | package bench
import (
"bytes"
"context"
"github.com/gin-gonic/gin"
"github.com/stretchr/testify/assert"
"net/http"
"net/http/httptest"
"sync/atomic"
"testing"
"time"
)
func setup_report_server(total *int32) *gin.Engine {
router := gin.New()
router.GET("/", func(c *gin.Context) {
atomic.AddInt32(total, 1)
})
return router
}
func runReport(p *Report, number int) {
p.Init()
work := make(chan struct{})
go func() {
for i := 0; i < number; i++ {
work <- struct{}{}
}
close(work)
}()
quit := make(chan struct{})
go func() {
p.Process(work)
close(quit)
}()
<-quit
p.Cancel()
p.WaitAll()
}
func newRequest(url string) (*http.Request, error) {
b := bytes.NewBufferString("hello")
return http.NewRequest("GET", url, b)
}
// 测试正常情况, 次数
func Test_Bench_Report_number(t *testing.T) {
const number = 1000
total := int32(0)
router := setup_report_server(&total)
ts := httptest.NewServer(http.HandlerFunc(router.ServeHTTP))
ctx := context.Background()
req, err := newRequest(ts.URL)
assert.NoError(t, err)
p := NewReport(ctx, 1, number, time.Duration(0), req, http.DefaultClient)
runReport(p, number)
assert.Equal(t, int32(p.CompleteRequest), int32(number))
}
// 测试正常情况, 时间
func Test_Bench_Report_duration(t *testing.T) {
const number = 1000
total := int32(0)
router := setup_report_server(&total)
ts := httptest.NewServer(http.HandlerFunc(router.ServeHTTP))
ctx := context.Background()
req, err := newRequest(ts.URL)
assert.NoError(t, err)
p := NewReport(ctx, 1, 0, 300*time.Millisecond, req, http.DefaultClient)
runReport(p, number)
assert.Equal(t, int32(p.CompleteRequest), int32(number))
}
// 测试异常情况
func Test_Bench_Report_fail(t *testing.T) {
const number = 1000
ctx := context.Background()
req, err := newRequest("fail")
assert.NoError(t, err)
p := NewReport(ctx, 1, number, time.Duration(0), req, http.DefaultClient)
runReport(p, number)
assert.Equal(t, int32(p.Failed), int32(number))
}
| 18.828571 | 74 | 0.677795 |
6c0782845d778a36a1685fccfb313c4921ca90c4 | 1,348 | asm | Assembly | sys-linux-x64.asm | mras0/forth | 24b76c06969958d37582237e9372e809a207bd2b | [
"MIT"
] | 10 | 2019-09-25T18:16:17.000Z | 2021-12-06T11:48:48.000Z | sys-linux-x64.asm | mras0/forth | 24b76c06969958d37582237e9372e809a207bd2b | [
"MIT"
] | null | null | null | sys-linux-x64.asm | mras0/forth | 24b76c06969958d37582237e9372e809a207bd2b | [
"MIT"
] | 1 | 2021-05-14T17:18:53.000Z | 2021-05-14T17:18:53.000Z | global _start
%define sys_read 0
%define sys_write 1
%define sys_open 2
%define sys_close 3
%define sys_exit 60
%define STDIN_FILENO 0
%define STDOUT_FILENO 1
[section .bss]
OldRSP: resq 1
__SECT__
_start:
mov [rel OldRSP], rsp
mov rdi, [rsp]
lea rsi, [rsp+8]
mov [rel ArgC], rdi
mov [rel ArgV], rsi
mov qword [rel StdinFile], STDIN_FILENO
mov qword [rel StdoutFile], STDOUT_FILENO
jmp StartInterpreter
NativeExit:
mov rdi, rax
mov rax, sys_exit
syscall
int3
NativeOpen:
push rsi
push rdi
mov rdi, rax
mov rsi, rcx
xor rdx, rdx
mov rax, sys_open
syscall
pop rdi
pop rsi
ret
NativeClose:
push rsi
push rdi
mov rdi, rax
mov rax, sys_close
syscall
pop rdi
pop rsi
ret
NativeReadFile:
push rsi
push rdi
mov rsi, rdi
mov rdi, rax
mov rdx, rcx
mov rax, sys_read
syscall
pop rdi
pop rsi
ret
NativeWriteFile:
push rsi
push rdi
mov rsi, rdi
mov rdi, rax
mov rdx, rcx
mov rax, sys_write
syscall
pop rdi
pop rsi
ret
| 17.063291 | 49 | 0.515579 |
6a1449fe754fb065604d2758bcb29021d1079f08 | 66 | sql | SQL | src/test/resources/sql/select/aabc4880.sql | Shuttl-Tech/antlr_psql | fcf83192300abe723f3fd3709aff5b0c8118ad12 | [
"MIT"
] | 66 | 2018-06-15T11:34:03.000Z | 2022-03-16T09:24:49.000Z | src/test/resources/sql/select/aabc4880.sql | Shuttl-Tech/antlr_psql | fcf83192300abe723f3fd3709aff5b0c8118ad12 | [
"MIT"
] | 13 | 2019-03-19T11:56:28.000Z | 2020-08-05T04:20:50.000Z | src/test/resources/sql/select/aabc4880.sql | Shuttl-Tech/antlr_psql | fcf83192300abe723f3fd3709aff5b0c8118ad12 | [
"MIT"
] | 28 | 2019-01-05T19:59:02.000Z | 2022-03-24T11:55:50.000Z | -- file:rangetypes.sql ln:26 expect:true
select '(a,)'::textrange
| 22 | 40 | 0.712121 |
704c7f29131910ccc844cd7ce8cc3887778ffd52 | 1,426 | cs | C# | src/CodeGen/ConvenienceTemplate.cs | RendleLabs/RoutingWithServices | 37f7f6255ae4a0073c192b4dec9c6a6fea9f2164 | [
"MIT"
] | null | null | null | src/CodeGen/ConvenienceTemplate.cs | RendleLabs/RoutingWithServices | 37f7f6255ae4a0073c192b4dec9c6a6fea9f2164 | [
"MIT"
] | null | null | null | src/CodeGen/ConvenienceTemplate.cs | RendleLabs/RoutingWithServices | 37f7f6255ae4a0073c192b4dec9c6a6fea9f2164 | [
"MIT"
] | null | null | null | namespace CodeGen
{
static class ConvenienceTemplate
{
public const string Method =
@" {DocComments}
public static IRouteBuilder Map{Method}<{TypeParams}>(this IRouteBuilder builder, string template, Func<HttpRequest, HttpResponse, RouteData, {TypeParams}, Task> handler)
=> builder.MapVerb(""{Verb}"", template, handler);
";
public const string FileStart = @"using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
namespace RendleLabs.AspNetCore.RoutingWithServices
{
public static class RouteBuilderMap{Method}Extensions
{";
public const string FileEnd = @" }
}";
public const string DocComments =
@"/// <summary>
/// Adds a route to the <see cref=""IRouteBuilder""/> that only matches HTTP PATCH requests for the given <c>template</c> and <c>handler</c>.
/// </summary>
/// <param name=""builder"">The <see cref=""IRouteBuilder""/></param>.
/// <param name=""template"">The route template.</param>
/// <param name=""handler"">The route handler.</param>
{TypeParams}
/// <returns>The <see cref=""IRouteBuilder""/>.</returns>";
public const string DocCommentsTypeParam = @" /// <typeparam name=""T{n}"">A service object type to be resolved.</typeparam>";
}
} | 39.611111 | 179 | 0.624825 |
285095166849f8fb461e6882a06b4c22dcc6e8b4 | 16,093 | cpp | C++ | indra/newview/llfloatereditenvironmentbase.cpp | bloomsirenix/Firestorm-manikineko | 67e1bb03b2d05ab16ab98097870094a8cc9de2e7 | [
"Unlicense"
] | 1 | 2022-03-26T15:03:34.000Z | 2022-03-26T15:03:34.000Z | indra/newview/llfloatereditenvironmentbase.cpp | bloomsirenix/Firestorm-manikineko | 67e1bb03b2d05ab16ab98097870094a8cc9de2e7 | [
"Unlicense"
] | null | null | null | indra/newview/llfloatereditenvironmentbase.cpp | bloomsirenix/Firestorm-manikineko | 67e1bb03b2d05ab16ab98097870094a8cc9de2e7 | [
"Unlicense"
] | null | null | null | /**
* @file llfloatereditenvironmentbase.cpp
* @brief Floaters to create and edit fixed settings for sky and water.
*
* $LicenseInfo:firstyear=2011&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2011, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llviewerprecompiledheaders.h"
#include "llfloatereditenvironmentbase.h"
#include <boost/make_shared.hpp>
// libs
#include "llnotifications.h"
#include "llnotificationsutil.h"
#include "llfilepicker.h"
#include "llsettingspicker.h"
#include "llviewerparcelmgr.h"
// newview
#include "llsettingssky.h"
#include "llsettingswater.h"
#include "llenvironment.h"
#include "llagent.h"
#include "llparcel.h"
#include "llsettingsvo.h"
#include "llinventorymodel.h"
namespace
{
const std::string ACTION_APPLY_LOCAL("apply_local");
const std::string ACTION_APPLY_PARCEL("apply_parcel");
const std::string ACTION_APPLY_REGION("apply_region");
}
//=========================================================================
const std::string LLFloaterEditEnvironmentBase::KEY_INVENTORY_ID("inventory_id");
//=========================================================================
class LLFixedSettingCopiedCallback : public LLInventoryCallback
{
public:
LLFixedSettingCopiedCallback(LLHandle<LLFloater> handle) : mHandle(handle) {}
virtual void fire(const LLUUID& inv_item_id)
{
if (!mHandle.isDead())
{
LLViewerInventoryItem* item = gInventory.getItem(inv_item_id);
if (item)
{
LLFloaterEditEnvironmentBase* floater = (LLFloaterEditEnvironmentBase*)mHandle.get();
floater->onInventoryCreated(item->getAssetUUID(), inv_item_id);
}
}
}
private:
LLHandle<LLFloater> mHandle;
};
//=========================================================================
LLFloaterEditEnvironmentBase::LLFloaterEditEnvironmentBase(const LLSD &key) :
LLFloater(key),
mInventoryId(),
mInventoryItem(nullptr),
mIsDirty(false),
mCanCopy(false),
mCanMod(false),
mCanTrans(false),
mCanSave(false)
{
}
LLFloaterEditEnvironmentBase::~LLFloaterEditEnvironmentBase()
{
}
void LLFloaterEditEnvironmentBase::onFocusReceived()
{
if (isInVisibleChain())
{
updateEditEnvironment();
LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_EDIT, LLEnvironment::TRANSITION_FAST);
}
}
void LLFloaterEditEnvironmentBase::onFocusLost()
{
}
void LLFloaterEditEnvironmentBase::loadInventoryItem(const LLUUID &inventoryId, bool can_trans)
{
if (inventoryId.isNull())
{
mInventoryItem = nullptr;
mInventoryId.setNull();
mCanMod = true;
mCanCopy = true;
mCanTrans = true;
return;
}
mInventoryId = inventoryId;
LL_INFOS("SETTINGS") << "Setting edit inventory item to " << mInventoryId << "." << LL_ENDL;
mInventoryItem = gInventory.getItem(mInventoryId);
if (!mInventoryItem)
{
LL_WARNS("SETTINGS") << "Could not find inventory item with Id = " << mInventoryId << LL_ENDL;
LLNotificationsUtil::add("CantFindInvItem");
closeFloater();
mInventoryId.setNull();
mInventoryItem = nullptr;
return;
}
if (mInventoryItem->getAssetUUID().isNull())
{
LL_WARNS("ENVIRONMENT") << "Asset ID in inventory item is NULL (" << mInventoryId << ")" << LL_ENDL;
LLNotificationsUtil::add("UnableEditItem");
closeFloater();
mInventoryId.setNull();
mInventoryItem = nullptr;
return;
}
mCanSave = true;
mCanCopy = mInventoryItem->getPermissions().allowCopyBy(gAgent.getID());
mCanMod = mInventoryItem->getPermissions().allowModifyBy(gAgent.getID());
mCanTrans = can_trans && mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID());
mExpectingAssetId = mInventoryItem->getAssetUUID();
LLSettingsVOBase::getSettingsAsset(mInventoryItem->getAssetUUID(),
[this](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onAssetLoaded(asset_id, settings, status); });
}
void LLFloaterEditEnvironmentBase::checkAndConfirmSettingsLoss(LLFloaterEditEnvironmentBase::on_confirm_fn cb)
{
if (isDirty())
{
LLSD args(LLSDMap("TYPE", getEditSettings()->getSettingsType())
("NAME", getEditSettings()->getName()));
// create and show confirmation textbox
LLNotificationsUtil::add("SettingsConfirmLoss", args, LLSD(),
[cb](const LLSD¬if, const LLSD&resp)
{
S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
if (opt == 0)
cb();
});
}
else if (cb)
{
cb();
}
}
void LLFloaterEditEnvironmentBase::onAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status)
{
if (asset_id != mExpectingAssetId)
{
LL_WARNS("ENVDAYEDIT") << "Expecting {" << mExpectingAssetId << "} got {" << asset_id << "} - throwing away." << LL_ENDL;
return;
}
mExpectingAssetId.setNull();
clearDirtyFlag();
if (!settings || status)
{
LLSD args;
args["NAME"] = (mInventoryItem) ? mInventoryItem->getName() : asset_id.asString();
LLNotificationsUtil::add("FailedToFindSettings", args);
closeFloater();
return;
}
if (settings->getFlag(LLSettingsBase::FLAG_NOSAVE))
{
mCanSave = false;
mCanCopy = false;
mCanMod = false;
mCanTrans = false;
}
else
{
if (mInventoryItem)
settings->setName(mInventoryItem->getName());
if (mCanCopy)
settings->clearFlag(LLSettingsBase::FLAG_NOCOPY);
else
settings->setFlag(LLSettingsBase::FLAG_NOCOPY);
if (mCanMod)
settings->clearFlag(LLSettingsBase::FLAG_NOMOD);
else
settings->setFlag(LLSettingsBase::FLAG_NOMOD);
if (mCanTrans)
settings->clearFlag(LLSettingsBase::FLAG_NOTRANS);
else
settings->setFlag(LLSettingsBase::FLAG_NOTRANS);
}
setEditSettingsAndUpdate(settings);
}
void LLFloaterEditEnvironmentBase::onButtonImport()
{
checkAndConfirmSettingsLoss([this](){ doImportFromDisk(); });
}
void LLFloaterEditEnvironmentBase::onSaveAsCommit(const LLSD& notification, const LLSD& response, const LLSettingsBase::ptr_t &settings)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (0 == option)
{
std::string settings_name = response["message"].asString();
LLInventoryObject::correctInventoryName(settings_name);
if (settings_name.empty())
{
// Ideally notification should disable 'OK' button if name won't fit our requirements,
// for now either display notification, or use some default name
settings_name = "Unnamed";
}
if (mCanMod)
{
doApplyCreateNewInventory(settings_name, settings);
}
else if (mInventoryItem)
{
const LLUUID &marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
LLUUID parent_id = mInventoryItem->getParentUUID();
if (marketplacelistings_id == parent_id || gInventory.isObjectDescendentOf(mInventoryItem->getUUID(), gInventory.getLibraryRootFolderID()))
{
parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS);
}
LLPointer<LLInventoryCallback> cb = new LLFixedSettingCopiedCallback(getHandle());
copy_inventory_item(
gAgent.getID(),
mInventoryItem->getPermissions().getOwner(),
mInventoryItem->getUUID(),
parent_id,
settings_name,
cb);
}
else
{
LL_WARNS() << "Failed to copy fixed env setting" << LL_ENDL;
}
}
}
void LLFloaterEditEnvironmentBase::onClickCloseBtn(bool app_quitting)
{
if (!app_quitting)
checkAndConfirmSettingsLoss([this](){ closeFloater(); clearDirtyFlag(); });
else
closeFloater();
}
void LLFloaterEditEnvironmentBase::doApplyCreateNewInventory(std::string settings_name, const LLSettingsBase::ptr_t &settings)
{
if (mInventoryItem)
{
LLUUID parent_id = mInventoryItem->getParentUUID();
U32 next_owner_perm = mInventoryItem->getPermissions().getMaskNextOwner();
LLSettingsVOBase::createInventoryItem(settings, next_owner_perm, parent_id, settings_name,
[this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryCreated(asset_id, inventory_id, results); });
}
else
{
LLUUID parent_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS);
// This method knows what sort of settings object to create.
LLSettingsVOBase::createInventoryItem(settings, parent_id, settings_name,
[this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryCreated(asset_id, inventory_id, results); });
}
}
void LLFloaterEditEnvironmentBase::doApplyUpdateInventory(const LLSettingsBase::ptr_t &settings)
{
LL_DEBUGS("ENVEDIT") << "Update inventory for " << mInventoryId << LL_ENDL;
if (mInventoryId.isNull())
{
LLSettingsVOBase::createInventoryItem(settings, gInventory.findCategoryUUIDForType(LLFolderType::FT_SETTINGS), std::string(),
[this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryCreated(asset_id, inventory_id, results); });
}
else
{
LLSettingsVOBase::updateInventoryItem(settings, mInventoryId,
[this](LLUUID asset_id, LLUUID inventory_id, LLUUID, LLSD results) { onInventoryUpdated(asset_id, inventory_id, results); });
}
}
void LLFloaterEditEnvironmentBase::doApplyEnvironment(const std::string &where, const LLSettingsBase::ptr_t &settings)
{
U32 flags(0);
if (mInventoryItem)
{
if (!mInventoryItem->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
flags |= LLSettingsBase::FLAG_NOMOD;
if (!mInventoryItem->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
flags |= LLSettingsBase::FLAG_NOTRANS;
}
flags |= settings->getFlags();
settings->setFlag(flags);
if (where == ACTION_APPLY_LOCAL)
{
settings->setName("Local"); // To distinguish and make sure there is a name. Safe, because this is a copy.
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, settings);
}
else if (where == ACTION_APPLY_PARCEL)
{
LLParcel *parcel(LLViewerParcelMgr::instance().getAgentOrSelectedParcel());
if ((!parcel) || (parcel->getLocalID() == INVALID_PARCEL_ID))
{
LL_WARNS("ENVIRONMENT") << "Can not identify parcel. Not applying." << LL_ENDL;
LLNotificationsUtil::add("WLParcelApplyFail");
return;
}
if (mInventoryItem && !isDirty())
{
LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1, flags);
}
else if (settings->getSettingsType() == "sky")
{
LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast<LLSettingsSky>(settings), -1, -1);
}
else if (settings->getSettingsType() == "water")
{
LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast<LLSettingsWater>(settings), -1, -1);
}
else if (settings->getSettingsType() == "day")
{
LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast<LLSettingsDay>(settings), -1, -1);
}
}
else if (where == ACTION_APPLY_REGION)
{
if (mInventoryItem && !isDirty())
{
LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), mInventoryItem->getName(), LLEnvironment::NO_TRACK, -1, -1, flags);
}
else if (settings->getSettingsType() == "sky")
{
LLEnvironment::instance().updateRegion(std::static_pointer_cast<LLSettingsSky>(settings), -1, -1);
}
else if (settings->getSettingsType() == "water")
{
LLEnvironment::instance().updateRegion(std::static_pointer_cast<LLSettingsWater>(settings), -1, -1);
}
else if (settings->getSettingsType() == "day")
{
LLEnvironment::instance().updateRegion(std::static_pointer_cast<LLSettingsDay>(settings), -1, -1);
}
}
else
{
LL_WARNS("ENVIRONMENT") << "Unknown apply '" << where << "'" << LL_ENDL;
return;
}
}
void LLFloaterEditEnvironmentBase::doCloseInventoryFloater(bool quitting)
{
LLFloater* floaterp = mInventoryFloater.get();
if (floaterp)
{
floaterp->closeFloater(quitting);
}
}
void LLFloaterEditEnvironmentBase::onInventoryCreated(LLUUID asset_id, LLUUID inventory_id, LLSD results)
{
LL_WARNS("ENVIRONMENT") << "Inventory item " << inventory_id << " has been created with asset " << asset_id << " results are:" << results << LL_ENDL;
if (inventory_id.isNull() || !results["success"].asBoolean())
{
LLNotificationsUtil::add("CantCreateInventory");
return;
}
onInventoryCreated(asset_id, inventory_id);
}
void LLFloaterEditEnvironmentBase::onInventoryCreated(LLUUID asset_id, LLUUID inventory_id)
{
bool can_trans = true;
if (mInventoryItem)
{
LLPermissions perms = mInventoryItem->getPermissions();
LLInventoryItem *created_item = gInventory.getItem(mInventoryId);
if (created_item)
{
can_trans = perms.allowOperationBy(PERM_TRANSFER, gAgent.getID());
created_item->setPermissions(perms);
created_item->updateServer(false);
}
}
clearDirtyFlag();
setFocus(TRUE); // Call back the focus...
loadInventoryItem(inventory_id, can_trans);
}
void LLFloaterEditEnvironmentBase::onInventoryUpdated(LLUUID asset_id, LLUUID inventory_id, LLSD results)
{
LL_WARNS("ENVIRONMENT") << "Inventory item " << inventory_id << " has been updated with asset " << asset_id << " results are:" << results << LL_ENDL;
clearDirtyFlag();
if (inventory_id != mInventoryId)
{
loadInventoryItem(inventory_id);
}
}
void LLFloaterEditEnvironmentBase::onPanelDirtyFlagChanged(bool value)
{
if (value)
setDirtyFlag();
}
//-------------------------------------------------------------------------
bool LLFloaterEditEnvironmentBase::canUseInventory() const
{
return LLEnvironment::instance().isInventoryEnabled();
}
bool LLFloaterEditEnvironmentBase::canApplyRegion() const
{
return gAgent.canManageEstate();
}
bool LLFloaterEditEnvironmentBase::canApplyParcel() const
{
return LLEnvironment::instance().canAgentUpdateParcelEnvironment();
}
//=========================================================================
| 33.527083 | 172 | 0.647921 |
c906a01a8032c6a53f83e10debceee77db5bd7f2 | 433 | dart | Dart | payausers/lib/controller/reservePlatePrepare.dart | Asncodes-80/flutter_parcking | 77885269e167423ee9d39ad92c2f0e4a68e6cb30 | [
"MIT"
] | null | null | null | payausers/lib/controller/reservePlatePrepare.dart | Asncodes-80/flutter_parcking | 77885269e167423ee9d39ad92c2f0e4a68e6cb30 | [
"MIT"
] | null | null | null | payausers/lib/controller/reservePlatePrepare.dart | Asncodes-80/flutter_parcking | 77885269e167423ee9d39ad92c2f0e4a68e6cb30 | [
"MIT"
] | null | null | null | import 'package:payausers/Model/AlphabetClassList.dart';
class PreparedPlate {
AlphabetList alp = AlphabetList();
List preparePlateInReserve({rawPlate}) {
List perment = rawPlate.split("-");
var plate0 = "${perment[0]}";
var plate1 = "${alp.getAlp()[perment[1]]}";
var plate2 = "${perment[2].substring(0, 3)}";
var plate3 = "${perment[2].substring(3, 5)}";
return [plate0, plate1, plate2, plate3];
}
}
| 30.928571 | 56 | 0.644342 |
6748b0a75e3a302c811fb168d9f070c50c6c8fed | 2,550 | swift | Swift | DesignpatternsExample/Behavioral/Observer.swift | nguyenkhiem7789/DesignpatternsExample | 5a929f4838a147558e7c39741f473bf986a1d35f | [
"MIT"
] | null | null | null | DesignpatternsExample/Behavioral/Observer.swift | nguyenkhiem7789/DesignpatternsExample | 5a929f4838a147558e7c39741f473bf986a1d35f | [
"MIT"
] | null | null | null | DesignpatternsExample/Behavioral/Observer.swift | nguyenkhiem7789/DesignpatternsExample | 5a929f4838a147558e7c39741f473bf986a1d35f | [
"MIT"
] | null | null | null | //
// Observer.swift
// DesignpatternsExample
//
// Created by Nguyen on 4/28/20.
// Copyright © 2020 Apple. All rights reserved.
//
/// In this pattern, one object notifies other objects about its state change i.e. when the state of one object changes, other object which are subscribed to it gets notified about the state change.
///AppleSeller is the class that implements the Observable protocol. When the appleCount variable value changes, it calls the notify() method to notify the customers who are added to it.
///Customer is a class that listens to the changes in the appleCount variable. As soon as this variable’s value changes, the customer gets updated via the update() method.
Customer is a class that listens to the changes in the appleCount variable. As soon as this variable’s value changes, the customer gets updated via the update() method.
import Foundation
protocol Observable {
func add(customer: Observer)
func remove(customer: Observer)
func notify()
}
protocol Observer {
var id: Int { get set }
func update()
}
// MARK: Observable
class AppleSeller: Observable {
private var observers: [Observer] = []
private var count: Int = 0
var appleCount: Int {
set {
count = newValue
notify()
}
get {
return count
}
}
func add(customer: Observer) {
observers.append(customer)
}
func remove(customer: Observer) {
observers = observers.filter{ $0.id != customer.id }
}
func notify() {
for observer in observers {
observer.update()
}
}
}
class Customer: Observer {
var id: Int
var observable: AppleSeller
var name: String
init(name: String, o: AppleSeller, customerId: Int) {
self.name = name
self.observable = o
self.id = customerId
self.observable.add(customer: self)
}
func update() {
print("Hurry \(name)! \(observable.appleCount) apples arrived at shop.")
}
}
// MARK: Usage
class UsageObserver {
init() {
let appleSeller = AppleSeller()
let james = Customer(name: "James", o: appleSeller, customerId: 101)
let david = Customer(name: "David", o: appleSeller, customerId: 102)
appleSeller.appleCount = 10
appleSeller.remove(customer: james)
appleSeller.appleCount = 20
}
}
// MARK: Output
//Hurry James! 10 apples arrived at shop.
//Hurry David! 10 apples arrived at shop.
//Hurry David! 20 apples arrived at shop.
| 27.12766 | 198 | 0.65451 |
876e75ec35cd7c51430a6614c3b2daad180b0e03 | 2,378 | html | HTML | scripts/system/create/entityProperties/html/entityProperties.html | GeorgeDeac/project-athena | 0fb1f374506ac0ecf51b00d1bfba2b4f224823f0 | [
"Apache-2.0"
] | 14 | 2020-02-23T12:51:54.000Z | 2021-11-14T17:09:34.000Z | scripts/system/create/entityProperties/html/entityProperties.html | GeorgeDeac/project-athena | 0fb1f374506ac0ecf51b00d1bfba2b4f224823f0 | [
"Apache-2.0"
] | 2 | 2018-11-01T02:16:43.000Z | 2018-11-16T00:45:44.000Z | scripts/system/create/entityProperties/html/entityProperties.html | GeorgeDeac/project-athena | 0fb1f374506ac0ecf51b00d1bfba2b4f224823f0 | [
"Apache-2.0"
] | 5 | 2020-04-02T09:42:00.000Z | 2021-03-15T00:54:07.000Z | <!--
// entityProperties.html
//
// Created by Ryan Huffman on 13 Nov 2014
// Copyright 2014 High Fidelity, Inc.
//
// Distributed under the Apache License, Version 2.0.
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
-->
<html>
<head>
<title>Properties</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../../html/css/edit-style.css">
<link rel="stylesheet" type="text/css" href="../../../html/css/colpick.css">
<link rel="stylesheet" type="text/css" href="../../../html/css/jsoneditor.css">
<script type="text/javascript" src="qrc:///qtwebchannel/qwebchannel.js"></script>
<script src="../../../html/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="../../../html/js/colpick.js"></script>
<script type="text/javascript" src="../../../html/js/jsoneditor.min.js"></script>
<script type="text/javascript" src="../../../html/js/eventBridgeLoader.js"></script>
<script type="text/javascript" src="../../../html/js/spinButtons.js"></script>
<script type="text/javascript" src="../../../html/js/utils.js"></script>
<script type="text/javascript" src="../../../html/js/includes.js"></script>
<script type="text/javascript" src="js/underscore-min.js"></script>
<script type="text/javascript" src="js/createAppTooltip.js"></script>
<script type="text/javascript" src="js/draggableNumber.js"></script>
<script type="text/javascript" src="js/entityProperties.js"></script>
</head>
<body onload='loaded();'>
<div id="properties-list">
<div class='property container'>
<label id='placeholder-property-type'></label>
<div class='value'>
<div class='row flex-center' style='padding-bottom: 8px;'>
<div id="placeholder-property-name" class="stretch"></div>
<div id="placeholder-property-locked" class="shrink"></div>
<div id="placeholder-property-visible" class="shrink"></div>
</div>
<div class='row'>
<div id="placeholder-property-id" class="stretch"></div>
</div>
</div>
</div>
<!-- each property is added at runtime in entityProperties -->
</div>
</body>
</html>
| 44.867925 | 88 | 0.603869 |
9c4117da79b8b64f6d95c07ad3bb252a365ca493 | 2,116 | cpp | C++ | 3rdparty/mygui/src/MyGUI_ActionController.cpp | Osumi-Akari/energytycoon | 25d18a0ee4a9f8833e678af297734602918a92e9 | [
"Unlicense"
] | null | null | null | 3rdparty/mygui/src/MyGUI_ActionController.cpp | Osumi-Akari/energytycoon | 25d18a0ee4a9f8833e678af297734602918a92e9 | [
"Unlicense"
] | null | null | null | 3rdparty/mygui/src/MyGUI_ActionController.cpp | Osumi-Akari/energytycoon | 25d18a0ee4a9f8833e678af297734602918a92e9 | [
"Unlicense"
] | null | null | null | /*!
@file
@author Albert Semenov
@date 03/2008
@module
*//*
This file is part of MyGUI.
MyGUI is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
MyGUI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
*/
#include "MyGUI_Precompiled.h"
#include "MyGUI_ActionController.h"
#include "MyGUI_Widget.h"
#include "MyGUI_WidgetManager.h"
namespace MyGUI
{
namespace action
{
void actionWidgetHide(WidgetPtr _widget)
{
_widget->setVisible(false);
}
void actionWidgetShow(WidgetPtr _widget)
{
_widget->setVisible(true);
}
void actionWidgetDestroy(WidgetPtr _widget)
{
WidgetManager::getInstance().destroyWidget(_widget);
}
void linearMoveFunction(const IntCoord & _startRect, const IntCoord & _destRect, IntCoord & _result, float _k)
{
_result.set(_startRect.left - int( float(_startRect.left - _destRect.left) * _k ),
_startRect.top - int( float(_startRect.top - _destRect.top) * _k ),
_startRect.width - int( float(_startRect.width - _destRect.width) * _k ),
_startRect.height - int( float(_startRect.height - _destRect.height) * _k )
);
}
void inertionalMoveFunction(const IntCoord & _startRect, const IntCoord & _destRect, IntCoord & _result, float _current_time)
{
#ifndef M_PI
const float M_PI = 3.141593;
#endif
double k = sin(M_PI * _current_time - M_PI/2);
if (k<0) k = (-pow((-k), (double)0.7) + 1)/2;
else k = (pow((k), (double)0.7) + 1)/2;
linearMoveFunction(_startRect, _destRect, _result, (float)k);
}
} // namespace action
} // namespace MyGUI
| 29.388889 | 127 | 0.696125 |
accaac3a154c643988fe2a9803859ebc1ae8e677 | 1,692 | cpp | C++ | src/main.cpp | OneMoreGres/tasklog | da8e9ee9582b6d1a51237e4cfe41081d975e30b8 | [
"MIT"
] | null | null | null | src/main.cpp | OneMoreGres/tasklog | da8e9ee9582b6d1a51237e4cfe41081d975e30b8 | [
"MIT"
] | null | null | null | src/main.cpp | OneMoreGres/tasklog | da8e9ee9582b6d1a51237e4cfe41081d975e30b8 | [
"MIT"
] | null | null | null | #include "debug.h"
#include "manager.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QLibraryInfo>
#include <QLockFile>
#include <QStandardPaths>
#include <QTranslator>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setApplicationName("TaskLog");
a.setOrganizationName("Gres");
a.setApplicationVersion(VERSION);
a.setQuitOnLastWindowClosed(false);
{
const auto paths = QStringList{
QLibraryInfo::location(QLibraryInfo::TranslationsPath),
#ifdef Q_OS_LINUX
qgetenv("APPDIR") +
QLibraryInfo::location(QLibraryInfo::TranslationsPath), // appimage
#endif // ifdef Q_OS_LINUX
{},
QLatin1String("translations"),
};
QStringList names{QStringLiteral("qt"), QStringLiteral("tasklog")};
auto translator = new QTranslator;
for (const auto &name : names) {
for (const auto &path : paths) {
if (translator->load(QLocale(), name, QStringLiteral("_"), path)) {
a.installTranslator(translator);
translator = new QTranslator;
break;
}
}
}
delete translator;
}
{
QCommandLineParser parser;
parser.setApplicationDescription(QObject::tr("Task journal helper"));
parser.addHelpOption();
parser.addVersionOption();
parser.process(a);
}
const auto lockFileName =
QStandardPaths::writableLocation(QStandardPaths::TempLocation) +
QStringLiteral("/tasklog.lock");
QLockFile lockFile(lockFileName);
if (!lockFile.tryLock()) {
LWARNING() << "Another instance is running. Lock file is busy."
<< lockFileName;
return 0;
}
Manager manager;
return a.exec();
}
| 24.882353 | 80 | 0.660165 |
1c0de349b86484e1308e5b7d1c7f6e98de8e7273 | 7,445 | swift | Swift | TravelPlanner/DetailedItinerary/DailyActivityTVC.swift | lzcheung/TravelPlanner | ce48fb012663b74ee690966f3f6eb9a29eb65c2e | [
"MIT"
] | null | null | null | TravelPlanner/DetailedItinerary/DailyActivityTVC.swift | lzcheung/TravelPlanner | ce48fb012663b74ee690966f3f6eb9a29eb65c2e | [
"MIT"
] | null | null | null | TravelPlanner/DetailedItinerary/DailyActivityTVC.swift | lzcheung/TravelPlanner | ce48fb012663b74ee690966f3f6eb9a29eb65c2e | [
"MIT"
] | null | null | null | //
// DailyActivityTVC.swift
// TravelPlanner
//
// Created by Liang Cheung on 5/28/19.
// Copyright © 2019 LZCHEUNG. All rights reserved.
//
import UIKit
import MapKit
class DailyActivityTVC: UIViewController {
enum ActivityVCMode {
case table
case map
}
@IBOutlet weak var tableView: UITableView!
@IBOutlet weak var toggleButton: UIBarButtonItem!
@IBOutlet weak var addActivityButton: UIButton!
@IBOutlet weak var mapView: MKMapView!
var dateFormatter = DateFormatter()
var viewMode = ActivityVCMode.table {
didSet {
if viewMode != oldValue {
updateCurrentView()
}
}
}
var activities: Activities?
let dataStore = DataStorage.instance
override func viewDidLoad() {
super.viewDidLoad()
tableView.dataSource = self
tableView.delegate = self
// Do any additional setup after loading the view.
dateFormatter.dateFormat = "h:mm a"
roundButton(addActivityButton)
updateMapAnnotations()
showRouteOnMap()
}
func roundButton(_ component: UIView) {
component.layer.cornerRadius = 20
component.clipsToBounds = true
}
func updateCurrentView() {
if viewMode == .table {
mapView.isHidden = true
tableView.isHidden = false
addActivityButton.isHidden = false
toggleButton.title = "Map"
} else {
tableView.isHidden = true
mapView.isHidden = false
toggleButton.title = "List"
addActivityButton.isHidden = false
mapView.showAnnotations(mapView.annotations, animated: false)
}
}
func updateMapAnnotations() {
mapView.removeAnnotations(mapView.annotations)
if let annotations = activities?.activities {
for annotation in annotations {
mapView.addAnnotation(annotation)
}
}
}
@IBAction func toggleSwitchViews(_ sender: Any) {
viewMode = viewMode == .table ? .map : .table
}
@IBAction func saveNewActivity(_ sender: UIStoryboardSegue) {
if let editActivityVC = sender.source as? EditActivityVC, let activity = editActivityVC.newActivity {
if let selectedIndexPath = tableView.indexPathForSelectedRow {
tableView.reloadRows(at: [selectedIndexPath], with: .none)
} else {
// update the tableView
let indexPath = IndexPath(row: activities?.activities.count ?? 0, section: 0)
activities?.append(activity: activity)
tableView.insertRows(at: [indexPath], with: .automatic)
}
dataStore.updatePersistentStorage()
updateMapAnnotations()
showRouteOnMap()
}
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "toActivityDetail" {
let destVC = segue.destination as! ActivityDetailsVC
var activity: Activity? = nil
if let annotation = sender as? Activity {
activity = annotation
} else {
let index = tableView.indexPathForSelectedRow!
activity = activities?.get(index: index.row)
}
if let selectedActivity = activity {
destVC.activity = selectedActivity
destVC.placemark = MKPlacemark(coordinate: selectedActivity.coordinate)
}
} else if segue.identifier == "addActivitySegue" {
if let index = tableView.indexPathForSelectedRow {
tableView.deselectRow(at: index, animated: true)
}
}
}
}
extension DailyActivityTVC : UITableViewDataSource, UITableViewDelegate {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return activities?.activities.count ?? 0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "ActivityCell", for: indexPath) as! ActivityCell
if let activity = activities?.activities[indexPath.row] {
let startTime = dateFormatter.string(from: activity.startTime)
let endTime = dateFormatter.string(from: activity.endTime)
cell.nameLabel.text = activity.name
cell.timeLabel.text = "\(startTime) - \(endTime)"
}
return cell
}
func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
// Return false if you do not want the specified item to be editable.
return true
}
func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
if editingStyle == .delete {
activities?.remove(at: (indexPath as NSIndexPath).row)
tableView.deleteRows(at: [indexPath], with: .fade)
dataStore.updatePersistentStorage()
}
}
}
extension DailyActivityTVC: MKMapViewDelegate {
func showRouteOnMap() {
mapView.removeOverlays(self.mapView.overlays)
if let annotations = activities?.activities, annotations.count > 1 {
for index in 1..<annotations.count {
let request = MKDirections.Request()
request.source = MKMapItem(placemark: MKPlacemark(coordinate: annotations[index - 1].coordinate, addressDictionary: nil))
request.destination = MKMapItem(placemark: MKPlacemark(coordinate: annotations[index].coordinate, addressDictionary: nil))
request.requestsAlternateRoutes = true
request.transportType = .automobile
let directions = MKDirections(request: request)
directions.calculate { [unowned self] response, error in
guard let unwrappedResponse = response else { return }
if (unwrappedResponse.routes.count > 0) {
let route = unwrappedResponse.routes[0]
self.mapView.addOverlay(route.polyline, level: .aboveRoads)
}
}
}
}
}
func mapView(_ mapView: MKMapView, rendererFor overlay: MKOverlay) -> MKOverlayRenderer {
let pr = MKPolylineRenderer(overlay: overlay);
pr.strokeColor = .blue
pr.lineWidth = 5;
return pr;
}
func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? {
if annotation is Activity {
let annotationView = MKMarkerAnnotationView()
annotationView.annotation = annotation
annotationView.canShowCallout = true
let calloutButton = UIButton(type: .detailDisclosure)
annotationView.rightCalloutAccessoryView = calloutButton
return annotationView
}
return nil
}
func mapView(_ mapView: MKMapView, annotationView: MKAnnotationView, calloutAccessoryControlTapped control: UIControl) {
performSegue(withIdentifier: "toActivityDetail", sender: annotationView.annotation!)
}
}
| 36.674877 | 138 | 0.610208 |
fba746adf71f77e61d83a87f28c518f506ddfcbb | 491 | sql | SQL | Procedimientos almacenados.sql | crojastriana3/asp-net-ejercicio | 56e2e30042830c090971b78b686472acceaf460d | [
"Apache-2.0"
] | null | null | null | Procedimientos almacenados.sql | crojastriana3/asp-net-ejercicio | 56e2e30042830c090971b78b686472acceaf460d | [
"Apache-2.0"
] | null | null | null | Procedimientos almacenados.sql | crojastriana3/asp-net-ejercicio | 56e2e30042830c090971b78b686472acceaf460d | [
"Apache-2.0"
] | null | null | null | create proc MostrarEmpresas
as
select * from EMPRESA
go
create proc InsertarEmpresa
@nit int,
@direccion varchar(40),
@telefono varchar(10)
as
insert into EMPRESA values
(@nit,@direccion,@telefono)
go
create proc EditarEmpresa
@nit int,
@direccion varchar(40),
@telefono varchar(10)
as
update EMPRESA set direccion=@direccion, telefono=@telefono where nit=@nit
go
create proc EliminarEmpresa
@nit int
as
delete from EMPRESA where nit=@nit
go
SELECT * FROM EMPRESA | 9.442308 | 74 | 0.749491 |
80edffc9267562f86a8930cbc734d37c6b823236 | 695 | cc | C++ | examples/async_pi_estimate/sync.cc | yorkie/nan | f500c71a31da98de4278d8e1d009068b72a34344 | [
"MITNFA"
] | null | null | null | examples/async_pi_estimate/sync.cc | yorkie/nan | f500c71a31da98de4278d8e1d009068b72a34344 | [
"MITNFA"
] | null | null | null | examples/async_pi_estimate/sync.cc | yorkie/nan | f500c71a31da98de4278d8e1d009068b72a34344 | [
"MITNFA"
] | null | null | null | /**********************************************************************************
* NAN - Native Abstractions for Node.js
*
* Copyright (c) 2014 NAN contributors
*
* MIT +no-false-attribs License <https://github.com/rvagg/nan/blob/master/LICENSE>
**********************************************************************************/
#include <node.h>
#include <nan.h>
#include "./pi_est.h"
#include "./sync.h"
using v8::Number;
// Simple synchronous access to the `Estimate()` function
NAN_METHOD(CalculateSync) {
NanScope();
// expect a number as the first argument
int points = args[0]->Uint32Value();
double est = Estimate(points);
NanReturnValue(NanNew<Number>(est));
}
| 26.730769 | 84 | 0.528058 |
94fbcb728367ff0302e675af6bddd894ee35dde9 | 1,193 | swift | Swift | LucidTestKit/Doubles/DiskCacheSpy.swift | StephanEggermont/Lucid | 6fd491ef04acac77586f2c78b12e6afaedee9086 | [
"MIT"
] | 8 | 2021-03-16T18:52:15.000Z | 2021-11-08T10:27:38.000Z | LucidTestKit/Doubles/DiskCacheSpy.swift | StephanEggermont/Lucid | 6fd491ef04acac77586f2c78b12e6afaedee9086 | [
"MIT"
] | 2 | 2021-03-16T20:19:44.000Z | 2021-04-12T21:45:03.000Z | LucidTestKit/Doubles/DiskCacheSpy.swift | StephanEggermont/Lucid | 6fd491ef04acac77586f2c78b12e6afaedee9086 | [
"MIT"
] | 2 | 2021-03-16T20:09:58.000Z | 2021-07-19T19:29:31.000Z | //
// DiskCacheSpy.swift
// LucidTestKit
//
// Created by Théophane Rupin on 10/18/18.
// Copyright © 2018 Scribd. All rights reserved.
//
import Lucid
public final class DiskCacheSpy<DataType: Codable> {
// MARK: - Stubs
public var values = [String: DataType]()
// MARK: - Records
public private(set) var getInvocations = [(
String
)]()
public private(set) var setInvocations = [(
String,
DataType?
)]()
public private(set) var asyncSetInvocations = [(
String,
DataType?
)]()
// MARK: - Implementation
public init() {
// no-op
}
public var caching: DiskCaching<DataType> {
return DiskCaching(get: {
self.getInvocations.append(($0))
return self.values[$0]
}, set: {
self.values[$0] = $1
self.setInvocations.append(($0, $1))
return true
}, asyncSet: {
self.values[$0] = $1
self.asyncSetInvocations.append(($0, $1))
}, keys: {
Array(self.values.keys)
},
keysAtInitialization: {
Array(self.values.keys)
})
}
}
| 20.568966 | 53 | 0.52808 |
17cdee39b25236524f0d046dd408a19721d06402 | 1,513 | cs | C# | balta/aspnet_core_identity_introduction/TwoFactorAuthentication/TwoFactorAuthentication.Mvc/Controllers/EnableTwoFactorAuthenticatorController.cs | flaviogf/Cursos | 2b120dbcd24a907121f58482fdcdfa01b164872c | [
"MIT"
] | 2 | 2021-02-20T23:50:07.000Z | 2021-08-15T03:04:35.000Z | balta/aspnet_core_identity_introduction/TwoFactorAuthentication/TwoFactorAuthentication.Mvc/Controllers/EnableTwoFactorAuthenticatorController.cs | flaviogf/Cursos | 2b120dbcd24a907121f58482fdcdfa01b164872c | [
"MIT"
] | 18 | 2019-08-07T02:33:00.000Z | 2021-03-18T22:52:38.000Z | balta/aspnet_core_identity_introduction/TwoFactorAuthentication/TwoFactorAuthentication.Mvc/Controllers/EnableTwoFactorAuthenticatorController.cs | flaviogf/Cursos | 2b120dbcd24a907121f58482fdcdfa01b164872c | [
"MIT"
] | 2 | 2020-09-28T13:00:09.000Z | 2021-12-30T12:21:08.000Z | using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using TwoFactorAuthentication.Mvc.Models;
using TwoFactorAuthentication.Mvc.ViewModels.EnableTwoFactorAuthenticator;
namespace TwoFactorAuthentication.Mvc.Controllers
{
public class EnableTwoFactorAuthenticatorController : Controller
{
private readonly UserManager<ApplicationUser> _userManager;
public EnableTwoFactorAuthenticatorController(UserManager<ApplicationUser> userManager)
{
_userManager = userManager;
}
[HttpGet]
[Authorize]
public async Task<IActionResult> Store()
{
return View();
}
[HttpPost]
[Authorize]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Store(EnableTwoFactorAuthenticatorStoreViewModel viewModel)
{
var user = await _userManager.GetUserAsync(User);
var valid = await _userManager.VerifyTwoFactorTokenAsync(user, _userManager.Options.Tokens.AuthenticatorTokenProvider, viewModel.Code);
if (!valid)
{
ModelState.AddModelError(string.Empty, "This code isn't valid, please verify your code and try again.");
return View(viewModel);
}
await _userManager.SetTwoFactorEnabledAsync(user, enabled: true);
return RedirectToAction("Edit", "Profile");
}
}
}
| 31.520833 | 147 | 0.679445 |
fe34ebcd3ddc0220fda5c0ae82170541831fb031 | 119 | c | C | main.c | Kagurazaka-Chiaki/Homework | a28ae2a35079eb7dbf3ea31747a9c6516ea6f3eb | [
"MIT"
] | 2 | 2020-11-25T14:08:20.000Z | 2021-02-21T13:06:26.000Z | main.c | Kagurazaka-Chiaki/Homework | a28ae2a35079eb7dbf3ea31747a9c6516ea6f3eb | [
"MIT"
] | null | null | null | main.c | Kagurazaka-Chiaki/Homework | a28ae2a35079eb7dbf3ea31747a9c6516ea6f3eb | [
"MIT"
] | null | null | null | #include <stdio.h>
#include "main.h"
int main(int argc, char const *argv[]) {
/* code */
return 0;
} | 13.222222 | 41 | 0.529412 |
0cc371f590d58414f3d55a84eb2346850fb66bd9 | 552 | py | Python | tests/test_recipe.py | iruoma/DevCookbook | e13b955bc2dbfaacab1852d857af058aab0029e5 | [
"MIT"
] | 20 | 2020-10-28T03:06:41.000Z | 2021-11-15T02:52:43.000Z | tests/test_recipe.py | iruoma/DevCookbook | e13b955bc2dbfaacab1852d857af058aab0029e5 | [
"MIT"
] | 15 | 2020-12-04T00:47:59.000Z | 2021-03-23T11:42:48.000Z | tests/test_recipe.py | iruoma/DevCookbook | e13b955bc2dbfaacab1852d857af058aab0029e5 | [
"MIT"
] | 22 | 2020-11-24T14:02:07.000Z | 2022-02-01T18:52:26.000Z | from recipe_compiler.recipe import Recipe
from recipe_compiler.recipe_category import RecipeCategory
def test_recipe_slug():
# Given
name = "Thomas Eckert"
residence = "Seattle, WA"
category = RecipeCategory("dessert")
recipe_name = '"Pie" Shell Script'
quote = "Hello, World"
ingredients = [""]
instructions = [""]
expected = "pie-shell-script"
# When
recipe = Recipe(
name, residence, category, recipe_name, quote, ingredients, instructions
)
# Then
assert expected == recipe.slug
| 23 | 80 | 0.664855 |
66e3f35f5563352a67d5618fb8c0d02c12828cfd | 13,891 | cpp | C++ | solver/src/solver/optimizer/LinSolver.cpp | ferdinand-wood/kino_dynamic_opt | ba6bef170819c55d1d26e40af835a744d1ae663f | [
"BSD-3-Clause"
] | 26 | 2019-11-18T17:39:43.000Z | 2021-12-18T00:38:22.000Z | solver/src/solver/optimizer/LinSolver.cpp | ferdinand-wood/kino_dynamic_opt | ba6bef170819c55d1d26e40af835a744d1ae663f | [
"BSD-3-Clause"
] | 25 | 2019-11-11T19:54:51.000Z | 2021-04-07T13:41:47.000Z | solver/src/solver/optimizer/LinSolver.cpp | ferdinand-wood/kino_dynamic_opt | ba6bef170819c55d1d26e40af835a744d1ae663f | [
"BSD-3-Clause"
] | 10 | 2019-12-15T14:36:51.000Z | 2021-09-29T10:42:19.000Z | /**
* @file LinSolver.cpp
* @author A. Domahidi [domahidi@embotech.com]
* @license (new license) License BSD-3-Clause
* @copyright Copyright (c) [2012-2015] Automatic Control Lab, ETH Zurich & embotech GmbH, Zurich, Switzerland.
* @date 2012-2015
* @brief ECOS - Embedded Conic Solver
*
* Modified to c++ code by New York University and Max Planck Gesellschaft, 2017
*/
#include <solver/optimizer/LinSolver.hpp>
namespace solver {
void LinSolver::resizeProblemData()
{
int psize = this->getCone().extSizeProb();
Pe_.resize(psize);
perm_.resize(psize);
permX_.resize(psize);
permdX_.resize(psize);
invPerm_.resize(psize);
kkt_.resize(psize,psize);
permKkt_.resize(psize,psize);
Gdx_.initialize(this->getCone());
sign_.initialize(this->getCone());
permSign_.initialize(this->getCone());
}
void LinSolver::buildProblem()
{
int n = this->getCone().numVars();
int p = this->getCone().numLeq();
// Vector for regularization
sign_.x().setOnes();
sign_.y().setConstant(-1.0);
sign_.z().setConstant(-1.0);
for (int i=0; i<this->getCone().numSoc(); i++)
sign_.zSoc(i)[this->getCone().sizeSoc(i)+1] = 1.0;
// Building KKT matrix
std::vector<Eigen::Triplet<double>> coeffs;
static_regularization_ = this->getSetting().get(SolverDoubleParam_StaticRegularization);
for (int id=0; id<n; id++) // KKT matrix (1,1)
coeffs.push_back(Eigen::Triplet<double>(id,id,static_regularization_));
for (int id=0; id<this->getStorage().Atmatrix().outerSize(); id++) { // KKT matrix (1,2) A'
for (Eigen::SparseMatrix<double>::InnerIterator it(this->getStorage().Atmatrix(),id); it; ++it)
coeffs.push_back(Eigen::Triplet<double>(it.row(),n+it.col(),it.value()));
coeffs.push_back(Eigen::Triplet<double>(n+id,n+id,-static_regularization_));
}
for (int id=0; id<this->getCone().sizeLpc(); id++) { // KKT matrix (1,3)-(3,3) G' and -Weights
for (Eigen::SparseMatrix<double>::InnerIterator it(this->getStorage().Gtmatrix(),id); it; ++it)
coeffs.push_back(Eigen::Triplet<double>(it.row(),n+p+it.col(),it.value()));
coeffs.push_back(Eigen::Triplet<double>(n+p+id,n+p+id,-1.0));
this->getCone().indexLpc(id) = n+p+this->getStorage().Atmatrix().nonZeros()+this->getStorage().Gtmatrix().leftCols(id+1).nonZeros()+id;
}
int k = n+p+this->getStorage().Atmatrix().nonZeros()+this->getStorage().Gtmatrix().leftCols(this->getCone().sizeLpc()).nonZeros()+this->getCone().sizeLpc();
for (int l=0; l<this->getCone().numSoc(); l++) {
for (int id=0; id<this->getCone().sizeSoc(l); id++) {
for (Eigen::SparseMatrix<double>::InnerIterator it(this->getStorage().Gtmatrix(),this->getCone().startSoc(l)+id); it; ++it)
coeffs.push_back(Eigen::Triplet<double>(it.row(),n+p+2*l+it.col(),it.value()));
coeffs.push_back(Eigen::Triplet<double>(n+p+this->getCone().startSoc(l)+2*l+id,n+p+this->getCone().startSoc(l)+2*l+id,-1.0));
this->getCone().soc(l).indexSoc(id) = k+this->getStorage().Gtmatrix().col(this->getCone().startSoc(l)+id).nonZeros();
k += this->getStorage().Gtmatrix().col(this->getCone().startSoc(l)+id).nonZeros()+1;
}
k += 2*this->getCone().sizeSoc(l)+1;
for (int id=1; id<this->getCone().sizeSoc(l); id++)
coeffs.push_back(Eigen::Triplet<double>(n+p+this->getCone().startSoc(l) + 2*l + id,n+p+this->getCone().startSoc(l)+2*l+this->getCone().sizeSoc(l), 0.0));
coeffs.push_back(Eigen::Triplet<double>(n+p+this->getCone().startSoc(l)+2*l+this->getCone().sizeSoc(l),n+p+this->getCone().startSoc(l)+2*l+this->getCone().sizeSoc(l),-1.0));
for (int id=0; id<this->getCone().sizeSoc(l); id++)
coeffs.push_back(Eigen::Triplet<double>(n+p+this->getCone().startSoc(l)+2*l+id,n+p+this->getCone().startSoc(l)+2*l+this->getCone().sizeSoc(l)+1,0.0));
coeffs.push_back(Eigen::Triplet<double>(n+p+this->getCone().startSoc(l)+2*l+this->getCone().sizeSoc(l)+1,n+p+this->getCone().startSoc(l)+2*l+this->getCone().sizeSoc(l)+1,1.0));
}
kkt_.setFromTriplets(coeffs.begin(), coeffs.end());
if (!kkt_.isCompressed()) { kkt_.makeCompressed(); }
}
void LinSolver::findPermutation()
{
// find permutation and inverse permutation
Eigen::AMDOrdering<int> ordering;
ordering(kkt_, perm_);
invPerm_ = perm_.inverse();
// permute quantities
for (int i=0; i<this->getCone().extSizeProb(); i++) { permSign_[i] = sign_[perm_.indices()[i]]; }
permKkt_.selfadjointView<Eigen::Upper>() = kkt_.selfadjointView<Eigen::Upper>().twistedBy(invPerm_);
}
void LinSolver::symbolicFactorization()
{
this->getCholesky().analyzePattern(permKkt_, this->getSetting());
}
FactStatus LinSolver::numericFactorization()
{
int status = this->getCholesky().factorize(this->permKkt_, this->permSign_);
return (status == this->permKkt_.cols() ? FactStatus::Optimal : FactStatus::Failure);
}
int LinSolver::solve(const Eigen::Ref<const Eigen::VectorXd>& permB, OptimizationVector& searchDir, bool is_initialization)
{
int numRefs;
int nK = this->getCone().extSizeProb();
int mext = this->getCone().extSizeCone();
double* Gdx = Gdx_.data();
Eigen::VectorXd permdZ(mext);
int* Pinv = this->invPerm_.indices().data();
ExtendedVector err; err.initialize(this->getCone());
double errNorm_cur, errNorm_prev = SolverSetting::nan;
double errThresh = (1.0 + (nK>0 ? permB.lpNorm<Eigen::Infinity>() : 0.0 ))*this->getSetting().get(SolverDoubleParam_LinearSystemAccuracy);
double* ez = err.z().data();
double* dz = searchDir.z().data();
// solve perturbed linear system
this->getCholesky().solve(permB, permX_.data());
// iterative refinement due to regularization to KKT matrix factorization
for (numRefs=0; numRefs <= this->getSetting().get(SolverIntParam_NumIterRefinementsLinSolve); numRefs++)
{
this->getCone().unpermuteSolution(invPerm_, permX_, searchDir, permdZ);
for (int i=0; i<nK; i++) { err[i] = permB[Pinv[i]]; }
// error_x = b_x - (Is dx + A' dy + G' dz)
matrixTransposeTimesVector(this->getStorage().Amatrix(), searchDir.y(), err.x(), false, false);
matrixTransposeTimesVector(this->getStorage().Gmatrix(), searchDir.z(), err.x(), false, false);
err.x() -= static_regularization_*searchDir.x();
// error_y = b_y - (A dx - Is dy)
if (this->getStorage().Amatrix().nonZeros()>0) {
matrixTransposeTimesVector(this->getStorage().Atmatrix(), searchDir.x(), err.y(), false, false);
err.y() += static_regularization_*searchDir.y();
}
// error_z = b_z - (G dx +(Is+W2) dz)
matrixTransposeTimesVector(this->getStorage().Gtmatrix(), searchDir.x(), Gdx_, true, true);
err.zLpc() += -Gdx_.zLpc() + static_regularization_*searchDir.zLpc();
for (int i=0; i<this->getCone().numSoc(); i++) {
for (int j=0; j<this->getCone().sizeSoc(i)-1; j++)
ez[this->getCone().startSoc(i)+2*i+j] += -Gdx[this->getCone().startSoc(i)+j] + static_regularization_*dz[this->getCone().startSoc(i)+j];
ez[this->getCone().startSoc(i)+2*i+this->getCone().sizeSoc(i)-1] -= Gdx[this->getCone().startSoc(i)+this->getCone().sizeSoc(i)-1] + static_regularization_*dz[this->getCone().startSoc(i)+this->getCone().sizeSoc(i)-1];
}
if (is_initialization) { err.z() += permdZ; }
else { this->getCone().conicNTScaling2(permdZ, err.z()); }
// progress checks
errNorm_cur = err.size()>0 ? err.lpNorm<Eigen::Infinity>() : 0.0;
if (numRefs>0 && errNorm_cur>errNorm_prev ) { permX_ -= permdX_; numRefs--; break; }
if (numRefs==this->getSetting().get(SolverIntParam_NumIterRefinementsLinSolve) || (errNorm_cur<errThresh) || (numRefs>0 && errNorm_prev<this->getSetting().get(SolverDoubleParam_ErrorReductionFactor)*errNorm_cur)) { break; }
errNorm_prev = errNorm_cur;
// solve and add refinement to permX
for (int i=0; i<nK; i++) { Pe_[Pinv[i]] = err[i]; }
this->getCholesky().solve(Pe_, permdX_.data());
permX_ += permdX_;
}
// store solution within search direction
this->getCone().unpermuteSolution(invPerm_, permX_, searchDir);
return numRefs;
}
void LinSolver::initialize(Cone& cone, SolverSetting& setting, SolverStorage& storage)
{
cone_ = &cone;
storage_ = &storage;
setting_ = &setting;
resizeProblemData();
buildProblem();
findPermutation();
symbolicFactorization();
// update indices of NT scalings to access them directly in permuted matrix
Eigen::VectorXi index = Eigen::Map<Eigen::VectorXi>(permKkt_.outerIndexPtr(), this->getCone().extSizeProb()+1);
permK_.resize(kkt_.nonZeros());
int nnz = 0;
for (int j=0; j<kkt_.outerSize(); j++)
for (Eigen::SparseMatrix<double>::InnerIterator it(kkt_,j); it; ++it)
if (it.row()<=it.col()) {
permK_.indices()[nnz] = index[invPerm_.indices()[it.row()] > invPerm_.indices()[it.col()] ?
invPerm_.indices()[it.row()] : invPerm_.indices()[it.col()]]++;
nnz += 1;
}
for (int id=0; id<this->getCone().sizeLpc(); id++)
this->getCone().indexLpc(id) = permK_.indices()[this->getCone().indexLpc(id)];
for (int i=0; i<this->getCone().numSoc(); i++) {
int j=1;
for (int k=0; k<2*this->getCone().sizeSoc(i)+1; k++)
this->getCone().soc(i).indexSoc(this->getCone().sizeSoc(i)+k) = permK_.indices()[this->getCone().soc(i).indexSoc(this->getCone().sizeSoc(i)-1)+j++];
for (int k=0; k<this->getCone().sizeSoc(i); k++)
this->getCone().soc(i).indexSoc(k) = permK_.indices()[this->getCone().soc(i).indexSoc(k)];
}
}
void LinSolver::initializeMatrix()
{
double* value = permKkt_.valuePtr();
// Linear cone
for (int i=0; i<this->getCone().sizeLpc(); i++)
value[this->getCone().indexLpc(i)] = -1.0;
// Second order cone
for (int i=0; i<this->getCone().numSoc(); i++) {
value[this->getCone().soc(i).indexSoc(0)] = -1.0;
for (int k=1; k<this->getCone().sizeSoc(i); k++)
value[this->getCone().soc(i).indexSoc(k)] = -1.0;
for (int k=0; k<this->getCone().sizeSoc(i)-1; k++)
value[this->getCone().soc(i).indexSoc(this->getCone().sizeSoc(i)+k)] = 0.0;
value[this->getCone().soc(i).indexSoc(2*this->getCone().sizeSoc(i)-1)] = -1.0;
value[this->getCone().soc(i).indexSoc(2*this->getCone().sizeSoc(i))] = 0.0;
for (int k=0; k<this->getCone().sizeSoc(i)-1; k++)
value[this->getCone().soc(i).indexSoc(2*this->getCone().sizeSoc(i)+1+k)] = 0.0;
value[this->getCone().soc(i).indexSoc(3*this->getCone().sizeSoc(i))] = +1.0;
}
}
void LinSolver::updateMatrix()
{
static_regularization_ = this->getSetting().get(SolverDoubleParam_StaticRegularization);
int conesize;
double eta_square, *scaling_soc;
double* value = permKkt_.valuePtr();
// Linear cone
for (int i=0; i<this->getCone().sizeLpc(); i++)
value[this->getCone().indexLpc(i)] = -this->getCone().sqScalingLpc(i) - static_regularization_;
// Second order cone
for (int i=0; i<this->getCone().numSoc(); i++) {
conesize = this->getCone().sizeSoc(i);
eta_square = this->getCone().soc(i).etaSquare();
scaling_soc = this->getCone().soc(i).scalingSoc().data();
value[this->getCone().soc(i).indexSoc(0)] = -eta_square * this->getCone().soc(i).d1() - static_regularization_;
for (int k=1; k<conesize; k++)
value[this->getCone().soc(i).indexSoc(k)] = -eta_square - static_regularization_;
for (int k=0; k<conesize-1; k++)
value[this->getCone().soc(i).indexSoc(conesize+k)] = -eta_square * this->getCone().soc(i).v1() * scaling_soc[k+1];
value[this->getCone().soc(i).indexSoc(2*conesize-1)] = -eta_square;
value[this->getCone().soc(i).indexSoc(2*conesize)] = -eta_square * this->getCone().soc(i).u0();
for (int k=0; k<conesize-1; k++)
value[this->getCone().soc(i).indexSoc(2*conesize+1+k)] = -eta_square * this->getCone().soc(i).u1() * scaling_soc[k+1];
value[this->getCone().soc(i).indexSoc(3*conesize)] = +eta_square + static_regularization_;
}
}
void LinSolver::matrixTransposeTimesVector(const Eigen::SparseMatrix<double>& A,
const Eigen::Ref<const Eigen::VectorXd>& eig_x,
Eigen::Ref<Eigen::VectorXd> eig_y,
bool add, bool is_new)
{
double ylocal;
int row, inner_start, inner_end;
if (is_new) { eig_y.setZero(); }
double* y = eig_y.data();
const double* x = eig_x.data();
const double* valPtr = A.valuePtr();
const int* outPtr = A.outerIndexPtr();
const int* innPtr = A.innerIndexPtr();
if (add) {
for (int col=0; col<A.cols(); col++) {
ylocal = y[col];
inner_start = outPtr[col];
inner_end = outPtr[col+1];
if (inner_end>inner_start) {
for (row=inner_start; row<inner_end; row++)
ylocal += valPtr[row]*x[innPtr[row]];
}
y[col] = ylocal;
}
} else {
for (int col=0; col<A.cols(); col++) {
ylocal = y[col];
inner_start = outPtr[col];
inner_end = outPtr[col+1];
if (inner_end>inner_start) {
for (row=inner_start; row<inner_end; row++)
ylocal -= valPtr[row]*x[innPtr[row]];
}
y[col] = ylocal;
}
}
}
}
| 44.954693 | 230 | 0.605284 |
0c6819b6a164cf05a04e91e54ea2e20e929f1c89 | 851 | dart | Dart | lib/currentState.dart | merlijnvanlent/cube-timer | 5139bc14b20ec969de942e624f5e38bda38dcfe6 | [
"MIT"
] | null | null | null | lib/currentState.dart | merlijnvanlent/cube-timer | 5139bc14b20ec969de942e624f5e38bda38dcfe6 | [
"MIT"
] | null | null | null | lib/currentState.dart | merlijnvanlent/cube-timer | 5139bc14b20ec969de942e624f5e38bda38dcfe6 | [
"MIT"
] | null | null | null | import 'package:flutter/material.dart';
import 'package:timer/durationTimer.dart';
class CurrentState {
var _states = [
0, // before
1, // running
2, // after
];
int _stateIndex = 0;
int get state => _states[_stateIndex];
int next(timer) {
if (_stateIndex + 1 >= _states.length) {
_stateIndex = 0;
} else {
_stateIndex++;
}
_UpdateTimer(timer);
return _stateIndex;
}
void _UpdateTimer(timer) {
switch (_stateIndex) {
case 0:
timer.reset();
break;
case 1:
timer.start();
break;
case 2:
timer.stop();
break;
}
}
// state dependent properties
var _backgroundColors = [
Colors.green[800],
Colors.red[800],
Colors.orange[800],
];
Color get backgroundColor => _backgroundColors[_stateIndex];
}
| 17.02 | 62 | 0.578143 |
3ea9d13fcc9612814b71a3e5b47be1949aff960a | 273 | sql | SQL | CSharp-DB/Databases-Basics/Exams/Exam-10-Feb-2019/12SelectAllEducationalMission.sql | kalintsenkov/SoftUni-Software-Engineering | add12909bd0c82d721b8bae43144626173f6023a | [
"MIT"
] | 8 | 2020-12-30T08:58:37.000Z | 2022-01-15T12:52:14.000Z | CSharp-DB/Databases-Basics/Exams/Exam-10-Feb-2019/12SelectAllEducationalMission.sql | zanovasevi/SoftUni-Software-Engineering | add12909bd0c82d721b8bae43144626173f6023a | [
"MIT"
] | null | null | null | CSharp-DB/Databases-Basics/Exams/Exam-10-Feb-2019/12SelectAllEducationalMission.sql | zanovasevi/SoftUni-Software-Engineering | add12909bd0c82d721b8bae43144626173f6023a | [
"MIT"
] | 52 | 2019-06-08T08:50:21.000Z | 2022-03-21T21:20:21.000Z | SELECT p.[Name] AS [PlanetName],
sp.[Name] AS [SpaceportName]
FROM Spaceports AS sp
JOIN Planets AS p
ON p.Id = sp.PlanetId
JOIN Journeys AS j
ON j.DestinationSpaceportId = sp.Id
WHERE j.Purpose = 'Educational'
ORDER BY sp.[Name] DESC
| 27.3 | 41 | 0.644689 |
282874bd7900047cc4fdeaaea3b406f0951c23e2 | 5,652 | cpp | C++ | test/unit/DexClassTest.cpp | 272152441/redex | e9a320b48fa7dfa306c55ec1c53ff4a869c86155 | [
"MIT"
] | 6,059 | 2016-04-12T21:07:05.000Z | 2022-03-31T16:31:48.000Z | test/unit/DexClassTest.cpp | 272152441/redex | e9a320b48fa7dfa306c55ec1c53ff4a869c86155 | [
"MIT"
] | 638 | 2016-04-12T22:45:48.000Z | 2022-03-29T21:50:09.000Z | test/unit/DexClassTest.cpp | LaudateCorpus1/redex | 571e4b40aef8a602c9ff02f4be371b060d503cd9 | [
"MIT"
] | 704 | 2016-04-12T23:47:01.000Z | 2022-03-30T09:44:56.000Z | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "DexClass.h"
#include <boost/optional.hpp>
#include "IRAssembler.h"
#include "RedexTest.h"
#include "SimpleClassHierarchy.h"
class DexClassTest : public RedexTest {};
TEST_F(DexClassTest, testUniqueMethodName) {
auto method = assembler::class_with_method("LFoo;",
R"(
(method (private) "LFoo;.bar:(I)V"
(
(return-void)
)
)
)");
auto type = DexType::make_type("LFoo;");
DexString* newname = DexMethod::get_unique_name(
type, DexString::make_string("bar"), method->get_proto());
EXPECT_EQ(newname->str(), "barr$0");
DexMethod::make_method("LFoo;.barr$0:(I)V");
newname = DexMethod::get_unique_name(type, DexString::make_string("bar"),
method->get_proto());
EXPECT_EQ(newname->str(), "barr$1");
newname = DexMethod::get_unique_name(type, DexString::make_string("baz"),
method->get_proto());
EXPECT_EQ(newname->str(),
"baz"); // no conflict, expect baz not to be suffixed
}
TEST_F(DexClassTest, testUniqueFieldName) {
auto class_type = DexType::make_type(DexString::make_string("LFoo;"));
ClassCreator class_creator(class_type);
class_creator.set_super(type::java_lang_Object());
class_creator.create();
auto type = DexType::make_type("LFoo;");
DexString* newname = DexField::get_unique_name(
type, DexString::make_string("bar"), DexType::make_type("I"));
EXPECT_EQ(newname->str(), "bar"); // no conflict, should not be renamed
DexField::make_field("LFoo;.bar:I");
newname = DexField::get_unique_name(type, DexString::make_string("bar"),
DexType::make_type("I"));
EXPECT_EQ(newname->str(), "barr$0");
DexField::make_field("LFoo;.barr$0:I");
newname = DexField::get_unique_name(type, DexString::make_string("bar"),
DexType::make_type("I"));
EXPECT_EQ(newname->str(), "barr$1");
}
TEST_F(DexClassTest, testUniqueTypeName) {
DexType::make_type("LFoo;");
auto bar_type = DexType::make_unique_type("LBar;");
auto foor0_type = DexType::make_unique_type("LFoo;");
auto foor1_type = DexType::make_unique_type("LFoo;");
auto foor0r0_type = DexType::make_unique_type("LFoor$0;");
EXPECT_EQ(bar_type->str(), "LBar;"); // no conflict, should not be renamed
EXPECT_EQ(foor0_type->str(), "LFoor$0;");
EXPECT_EQ(foor1_type->str(), "LFoor$1;");
EXPECT_EQ(foor0r0_type->str(), "LFoor$0r$0;");
}
TEST_F(DexClassTest, gather_load_types) {
auto helper = redex::test::SimpleClassHierarchy{};
auto make_expected_type_set = [](std::initializer_list<DexClass*> l) {
std::unordered_set<DexType*> ret;
for (auto c : l) {
ret.emplace(c->get_type());
}
return ret;
};
// Test that (internal) superclasses and interfaces are in, but
// field and method types are not.
{
std::unordered_set<DexType*> types;
helper.foo->gather_load_types(types);
auto expected = make_expected_type_set({helper.foo});
EXPECT_EQ(expected, types);
}
{
std::unordered_set<DexType*> types;
helper.bar->gather_load_types(types);
auto expected = make_expected_type_set({helper.foo, helper.bar});
EXPECT_EQ(expected, types);
}
{
std::unordered_set<DexType*> types;
helper.baz->gather_load_types(types);
auto expected =
make_expected_type_set({helper.foo, helper.bar, helper.baz});
EXPECT_EQ(expected, types);
}
{
std::unordered_set<DexType*> types;
helper.qux->gather_load_types(types);
auto expected = make_expected_type_set(
{helper.foo, helper.bar, helper.baz, helper.qux});
EXPECT_EQ(expected, types);
}
{
std::unordered_set<DexType*> types;
helper.iquux->gather_load_types(types);
auto expected = make_expected_type_set({helper.iquux});
EXPECT_EQ(expected, types);
}
{
std::unordered_set<DexType*> types;
helper.quuz->gather_load_types(types);
auto expected =
make_expected_type_set({helper.iquux, helper.foo, helper.quuz});
EXPECT_EQ(expected, types);
}
{
std::unordered_set<DexType*> types;
helper.xyzzy->gather_load_types(types);
auto expected = make_expected_type_set({helper.xyzzy});
EXPECT_EQ(expected, types);
}
}
TEST_F(DexClassTest, testObfuscatedNames) {
auto method = assembler::class_with_method("LX/001;",
R"(
(method (private) "LX/001;.A01:(I)V"
(
(return-void)
)
)
)");
auto type = DexType::get_type("LX/001;");
auto clazz = type_class(type);
auto field = DexField::make_field("LX/001;.A00:I")->make_concrete(ACC_PUBLIC);
EXPECT_EQ(clazz->get_deobfuscated_name(), "LX/001;");
EXPECT_EQ(method->get_deobfuscated_name(), "");
EXPECT_EQ(field->get_deobfuscated_name(), "");
clazz->set_deobfuscated_name("Lbaz;");
method->set_deobfuscated_name("Lbaz;.foo:(I)V");
field->set_deobfuscated_name("Lbaz;.bar:I");
EXPECT_EQ(clazz->get_deobfuscated_name(), "Lbaz;");
EXPECT_EQ(clazz->str(), "LX/001;");
EXPECT_EQ(type->str(), "LX/001;");
EXPECT_EQ(method->str(), "A01");
EXPECT_EQ(method->get_deobfuscated_name(), "Lbaz;.foo:(I)V");
EXPECT_EQ(method->get_simple_deobfuscated_name(), "foo");
EXPECT_EQ(field->str(), "A00");
EXPECT_EQ(field->get_deobfuscated_name(), "Lbaz;.bar:I");
EXPECT_EQ(field->get_simple_deobfuscated_name(), "bar");
}
| 32.297143 | 80 | 0.651628 |
3bca40114cdd11e5b09b0474d538f9c1bb509813 | 1,114 | html | HTML | cursoudemy/index.html | RafaelDamasco/html-css | b3232393ea7e89adf4993780889c2781c49a7437 | [
"MIT"
] | null | null | null | cursoudemy/index.html | RafaelDamasco/html-css | b3232393ea7e89adf4993780889c2781c49a7437 | [
"MIT"
] | null | null | null | cursoudemy/index.html | RafaelDamasco/html-css | b3232393ea7e89adf4993780889c2781c49a7437 | [
"MIT"
] | null | null | null | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<style>
.marcador {
background-color: aqua;
border: 1px solid black;
}
.marcador2 {
background-color: brown;
border: 1px solid #fe9d9d;
}
</style>
</head>
<body>
<header>
<div class="container marcador2">
<div class="row">
<div class="col-sm-7 col-md-9 col-lg-11 marcador">
<h1>CONTEUDO 1</h1>
</div>
<div class="col-sm-5 col-md-3 col-lg-1 marcador">
<h1>CONTEUDO 2</h1>
</div>
</div>
</div>
</header>
</body>
</html> | 27.170732 | 214 | 0.543088 |
56f8b9c65701836607e2cd5b72ff805c3364636b | 672 | swift | Swift | DogeFinder/Models/Breed.swift | campierce88/DogeFinder | d13718cbf6f21f91191b8d158d96af533f18f86c | [
"Apache-2.0"
] | null | null | null | DogeFinder/Models/Breed.swift | campierce88/DogeFinder | d13718cbf6f21f91191b8d158d96af533f18f86c | [
"Apache-2.0"
] | null | null | null | DogeFinder/Models/Breed.swift | campierce88/DogeFinder | d13718cbf6f21f91191b8d158d96af533f18f86c | [
"Apache-2.0"
] | null | null | null | //
// Breed.swift
// DogeFinder
//
// Created by Cameron Pierce on 2/4/18.
// Copyright © 2018 Cameron Pierce. All rights reserved.
//
import Foundation
class Breed: NSObject {
var id: String?
var name: String?
var subname: String?
var fullName: String?
var imageUrls: [String]? = nil
init(with breed: String, and subBreed: String) {
self.id = breed + subBreed
self.name = breed
self.subname = subBreed
var fullName = ""
if !subBreed.isEmpty {
fullName = "\(subBreed) \(breed)"
} else {
fullName = breed
}
self.fullName = fullName.capitalized
}
}
| 20.363636 | 57 | 0.575893 |
22a199453ee899f217e1266c7a58088184ac57ab | 91,813 | html | HTML | dist/caixa-de-som-edifier-2.0-bivolt-42w-r1280t-madeira.html | oscargross/storefront-template | c6960b5ddcb39f520dd5d8ba5602f3f3251952b1 | [
"MIT"
] | null | null | null | dist/caixa-de-som-edifier-2.0-bivolt-42w-r1280t-madeira.html | oscargross/storefront-template | c6960b5ddcb39f520dd5d8ba5602f3f3251952b1 | [
"MIT"
] | null | null | null | dist/caixa-de-som-edifier-2.0-bivolt-42w-r1280t-madeira.html | oscargross/storefront-template | c6960b5ddcb39f520dd5d8ba5602f3f3251952b1 | [
"MIT"
] | 1 | 2022-02-23T15:59:38.000Z | 2022-02-23T15:59:38.000Z | <!doctype html><html lang="pt-br" dir="ltr"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no,minimum-scale=1"><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><meta name="theme-color" content="#e83e8c"><link rel="icon" href="/img/uploads/favicon.png"><title>Caixa de Som Edifier 2.0 Bivolt (42W) R1280T Madeira</title><meta name="description" content="My PWA Shop"><meta name="author" content="My Shop"><meta name="generator" content="E-Com Plus Storefront"><link rel="canonical" href="https://storefront-demo.e-com.plus/caixa-de-som-edifier-2.0-bivolt-42w-r1280t-madeira"><link rel="preload" href="/storefront.0f17723d3ace4435cf37.css" as="style"><link rel="preload" href="/storefront.5aebe1ac1cf1d6b7e261.js" as="script"><link rel="preconnect" href="https://cdn.jsdelivr.net/" crossorigin><link rel="dns-prefetch" href="https://cdn.jsdelivr.net/"><link rel="preconnect" href="https://ioapi.ecvol.com/" crossorigin><link rel="dns-prefetch" href="https://ioapi.ecvol.com/"><link rel="preconnect" href="https://apx-search.e-com.plus/" crossorigin><link rel="dns-prefetch" href="https://apx-search.e-com.plus/"><link rel="apple-touch-icon" href="/img/icon.png"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta property="og:site_name" content="My Shop"><meta property="og:url" content="https://storefront-demo.e-com.plus/caixa-de-som-edifier-2.0-bivolt-42w-r1280t-madeira"><meta property="og:title" content="Caixa de Som Edifier 2.0 Bivolt (42W) R1280T Madeira"><meta property="og:description" content="My PWA Shop"><meta property="og:type" content="website"><meta property="og:locale" content="pt_BR"><meta property="og:image" content="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/@1550850144930-caixa-de-som-edifier-42w-r1280t.jpg"><meta name="twitter:card" content="summary"><meta name="ecom-store-id" content="1011"><script>if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js').then(registration => {
console.log('SW registered: ', registration)
}).catch(registrationError => {
console.log('SW registration failed: ', registrationError)
})
}</script><link rel="stylesheet" type="text/css" href="/storefront.0f17723d3ace4435cf37.css"></head><body id="page-products" class="__caixa-de-som-edifier-2.0-bivolt-42w-r1280t-madeira" data-resource="products" data-resource-id="5c701976c626be23430d4fdf"><aside id="menu" class="menu shadow"><nav class="accordion" id="accordion-menu"><button class="menu__btn menu__btn--close btn" type="button" onclick="toggleSidenav()" aria-label="Toggle Side Navigation"><i class="fas fa-times"></i></button><div id="categories-nav" class="collapse show" aria-expanded="true" data-parent="#accordion-menu"><div class="menu__list"><a href="#a-monitores" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="a-monitores" id="c-5c6ffa18c626be23430d4f4e" class="menu__item"><span class="menu__item-icon"><img data-src="https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007322374-rect836.png" alt="Monitores" class="lozad" data-preload="0"> </span><span>Monitores </span></a><a href="#a-notebooks" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="a-notebooks" id="c-5c6ffa6ec626be23430d4f56" class="menu__item"><span class="menu__item-icon"><img data-src="https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007351112-comp.png" alt="Notebooks" class="lozad" data-preload="200"> </span><span>Notebooks </span></a><a href="/smartphones" id="c-5c700a9cc626be23430d4f8c" class="menu__item"><span class="menu__item-icon"><img data-src="https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007321218-smartphone.png" alt="Smartphones" class="lozad" data-preload="400"> </span><span>Smartphones </span></a><a href="#a-jogos_" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="a-jogos_" id="c-5c701c9ec626be23430d4fe7" class="menu__item"><span class="menu__item-icon"><img data-src="https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007332353-game.png" alt="Jogo" class="lozad" data-preload="600"> </span><span>Jogo </span></a><a href="/promocoes" id="c-5ceecb3f887ef430f1f70c88" class="menu__item"><span class="menu__item-icon"><img data-src="https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007326827-mony.png" alt="Promoções" class="lozad" data-preload="800"> </span><span>Promoções </span></a><a href="/" id="c-5f70f1417430f92180f5ba66" class="menu__item"><span>Brasileiro </span></a><a href="/" id="c-5fb2b13b69274c73fcd6a051" class="menu__item"><span>smartwatch </span></a><a href="/sao-paulo" id="c-60199592d6981740b4a030f4" class="menu__item"><span>São Páulò</span></a></div></div><div id="a-monitores" class="collapse" aria-expanded="false" data-parent="#accordion-menu"><button class="menu__btn btn" type="button" data-toggle="collapse" aria-expanded="true" data-target="#categories-nav" aria-controls="categories-nav"><i class="fas fa-arrow-left"></i></button><div class="menu__list"><a href="/monitores-gamer" id="c-5c6ffa2ac626be23430d4f50" class="menu__item"><span>Monitores Gamer </span></a><a href="/monitores-convencionais" id="c-5c6ffa45c626be23430d4f52" class="menu__item"><span>Monitores convencionais </span></a><a href="/monitores-tv" id="c-5c6ffa5bc626be23430d4f54" class="menu__item"><span>Monitores TV</span></a></div><a href="/monitores" class="menu__link">Ver toda a categoria Monitores</a></div><div id="a-notebooks" class="collapse" aria-expanded="false" data-parent="#accordion-menu"><button class="menu__btn btn" type="button" data-toggle="collapse" aria-expanded="true" data-target="#categories-nav" aria-controls="categories-nav"><i class="fas fa-arrow-left"></i></button><div class="menu__list"><a href="/notebooks-gamers" id="c-5c6ffa8cc626be23430d4f58" class="menu__item"><span>Notebooks gamers </span></a><a href="#a-ultrabook" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="a-ultrabook" id="c-5d5714045753286eadbbdc77" class="menu__item"><span>Ultrabook</span></a></div><a href="/notebooks" class="menu__link">Ver toda a categoria Notebooks</a></div><div id="a-ultrabook" class="collapse" aria-expanded="false" data-parent="#accordion-menu"><button class="menu__btn btn" type="button" data-toggle="collapse" aria-expanded="false" data-target="#a-notebooks" aria-controls="a-notebooks"><i class="fas fa-arrow-left"></i></button><div class="menu__list"><a href="/macbook" id="c-5c6ffab6c626be23430d4f5c" class="menu__item"><span class="menu__item-icon"><img data-src="https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1566932713325-macbook.jfif" alt="macbook" class="lozad" data-preload="0"> </span><span>MacBook</span></a></div><a href="/ultrabook" class="menu__link">Ver toda a categoria Ultrabook</a></div><div id="a-fisicos" class="collapse" aria-expanded="false" data-parent="#accordion-menu"><button class="menu__btn btn" type="button" data-toggle="collapse" aria-expanded="false" data-target="#a-jogos_" aria-controls="a-jogos_"><i class="fas fa-arrow-left"></i></button><div class="menu__list"><a href="#a-perifericos" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="a-perifericos" id="c-5c7009bec626be23430d4f80" class="menu__item"><span class="menu__item-icon"><img data-src="https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007328003-keyb.png" alt="Periféricos" class="lozad" data-preload="0"> </span><span>Periféricos</span></a></div><a href="/fisicos" class="menu__link">Ver toda a categoria Físicos</a></div><div id="a-perifericos" class="collapse" aria-expanded="false" data-parent="#accordion-menu"><button class="menu__btn btn" type="button" data-toggle="collapse" aria-expanded="false" data-target="#a-fisicos" aria-controls="a-fisicos"><i class="fas fa-arrow-left"></i></button><div class="menu__list"><a href="/teclados" id="c-5c7009fdc626be23430d4f82" class="menu__item"><span>Teclados </span></a><a href="/mouses" id="c-5c700a11c626be23430d4f84" class="menu__item"><span>Mouses </span></a><a href="/caixas-de-som" id="c-5c700a37c626be23430d4f86" class="menu__item"><span>Caixas de Som </span></a><a href="/headset" id="c-5c700a53c626be23430d4f88" class="menu__item"><span>Headset </span></a><a href="/cadeira-gamer" id="c-5c700a6bc626be23430d4f8a" class="menu__item"><span>Cadeira Gamer</span></a></div><a href="/perifericos" class="menu__link">Ver toda a categoria Periféricos</a></div><div id="a-jogos_" class="collapse" aria-expanded="false" data-parent="#accordion-menu"><button class="menu__btn btn" type="button" data-toggle="collapse" aria-expanded="true" data-target="#categories-nav" aria-controls="categories-nav"><i class="fas fa-arrow-left"></i></button><div class="menu__list"><a href="#a-fisicos" data-toggle="collapse" role="button" aria-expanded="false" aria-controls="a-fisicos" id="c-5c701cb1c626be23430d4fe9" class="menu__item"><span>Físicos </span></a><a href="/digitais" id="c-5c701cc6c626be23430d4feb" class="menu__item"><span>Digitais </span></a><a href="/usados" id="c-5c701ce2c626be23430d4fed" class="menu__item"><span>Usados</span></a></div><a href="/jogos/" class="menu__link">Ver toda a categoria Jogo</a></div></nav><footer class="menu__footer"><div class="menu__phone"><a href="javascript:;" target="_blank" rel="noopener" class="whatsapp-link" data-tel="31982721558"><i class="fab fa-whatsapp mr-1"></i> (31) 9 8272-1558</a></div><div class="menu__social"><a href="https://www.facebook.com/ecom.clubpage/" target="_blank" rel="noopener" aria-label="facebook" style="color: #3b5998"><i class="fab fa-facebook"></i> </a><a href="https://www.youtube.com/channel/UCBlIxK5JAub0E1EX_qHdzmA" target="_blank" rel="noopener" aria-label="youtube" style="color: #ff0000"><i class="fab fa-youtube"></i> </a><a href="https://www.instagram.com/ecomclub/" target="_blank" rel="noopener" aria-label="instagram" style="color: #e1306c"><i class="fab fa-instagram"></i></a></div></footer></aside><main role="main" id="main"><div id="overlay" class="fade"></div><div class="top-bar"><a class="top-bar__countdown" style="" href="/promotion">Aproveite nossos descontos de até 40%!</a><div class="top-bar__nav d-none d-md-block"><div class="container-fluid"><div class="row"><div class="col"><nav class="top-bar__page-links"><a href="/pages/sobre-nos">Sobre nós</a> <a href="/posts/esta-loja-e-um-pwa">Esta loja é um PWA</a></nav><a href="javascript:;" target="_blank" rel="noopener" class="whatsapp-link" data-tel="31982721558"><i class="fab fa-whatsapp"></i> (31) 9 8272-1558 </a><a href="tel:+31982721558" target="_blank" rel="noopener"><i class="fas fa-phone"></i> (31) 9 8272-1558</a></div><div class="col-auto"><a href="https://www.facebook.com/ecom.clubpage/" target="_blank" rel="noopener"><i class="fab fa-facebook"></i> </a><a href="https://www.youtube.com/channel/UCBlIxK5JAub0E1EX_qHdzmA" target="_blank" rel="noopener"><i class="fab fa-youtube"></i> </a><a href="https://www.instagram.com/ecomclub/" target="_blank" rel="noopener"><i class="fab fa-instagram"></i></a></div></div></div></div></div><header class="header" id="header"><div class="header__container container-fluid"><div class="header__row row"><div class="col-auto p-0"><button class="btn header__toggler" type="button" onclick="toggleSidenav()" aria-label="Toggle side navigation"><i class="header__toggler-icon fas fa-bars"></i></button></div><div class="col col-lg-auto pl-1 pl-md-2 pl-lg-3"><a href="/"><img id="logo" class="header__logo" src="/img/uploads/logo.webp" alt="My Shop"></a></div><div class="order-lg-last col-auto p-0"><div class="header__buttons" role="group" aria-label="Minha conta"><button class="d-lg-none btn btn-lg" id="mobile-search-btn" type="button" data-toggle="collapse" data-target="#search-bar" aria-expanded="true" aria-controls="search-bar" aria-controls="search-bar" title="Buscar produtos"><i class="fas fa-search"></i></button> <a id="user-button" class="btn btn-lg" role="button" href="/app/#/account/" title="Minha conta"><i class="fas fa-user"></i> </a><a id="cart-button" class="btn btn-lg" role="button" href="/app/#/cart" title="Abrir carrinho"><i class="fas fa-shopping-bag"></i> <span id="cart-count" class="badge badge-primary"></span></a></div><div id="login-modal"></div><div id="cart-quickview"></div></div><div class="d-none d-lg-block col-12 col-lg-3 collapse show" id="search-bar"><form class="header__search mt-2 mt-md-3 mt-lg-0" id="search-form" action="/search" method="get"><input type="search" name="term" placeholder="Buscar produtos" aria-label="Buscar produtos" class="header__search-input form-control" id="search-input"> <button type="submit" class="header__search-btn" aria-label="Buscar produtos"><i class="fas fa-search"></i></button><div id="instant-search"></div></form><script type="application/ld+json">{"@context":"http://schema.org","@type":"WebSite","url":"https://storefront-demo.e-com.plus/","potentialAction":{"@type":"SearchAction","target":"https://storefront-demo.e-com.plus/search?term={search_term_string}","query-input":"required name=search_term_string"}}</script></div><div class="d-none d-lg-block col"><nav class="header__nav"><a href="javascript:;" onclick="toggleSidenav('monitores')">Monitores </a><a href="javascript:;" onclick="toggleSidenav('notebooks')">Notebooks </a><a href="javascript:;" onclick="toggleSidenav('smartphones')">Smartphones </a><a href="javascript:;" onclick="toggleSidenav('jogos/')">Jogo </a><a href="javascript:;" onclick="toggleSidenav('promocoes')">Promoções </a><a href="javascript:;" onclick="toggleSidenav('')">Brasileiro</a></nav></div></div></div></header><article id="content" class="page page--products"><div class="sections pb-1 pb-sm-2 pb-lg-4"><div class="container"><nav aria-label="breadcrumb"><ol class="breadcrumb my-2 my-sm-3"><li class="breadcrumb-item d-none d-md-block"><a href="/"><i class="fas fa-home"></i></a></li><li class="breadcrumb-item"><a href="/caixas-de-som">Caixas de Som</a></li><li class="breadcrumb-item d-none d-md-block active" aria-current="page">Caixa de Som Edifier 2.0 Bivolt (42W) R1280T Madeira</li></ol></nav></div><script type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"item":{"@id":"https://storefront-demo.e-com.plus/","name":"Homepage"}},{"@type":"ListItem","position":2,"item":{"@id":"https://storefront-demo.e-com.plus/caixas-de-som","name":"Caixas de Som"}},{"@type":"ListItem","position":3,"item":{"@id":"https://storefront-demo.e-com.plus/caixa-de-som-edifier-2.0-bivolt-42w-r1280t-madeira","name":"Caixa de Som Edifier 2.0 Bivolt (42W) R1280T Madeira"}}]}</script><div id="product-block" class="product-block my-4 mb-lg-5"><div class="container"><section id="product" class="product" data-to-render="true" data-product-id="5c701976c626be23430d4fdf" data-sku="cx-ed-23456"><div id="product-dock"></div><div class="row"><div class="col-12 col-md-6 mb-4"><div id="product-gallery"><picture class="product__picture"><source srcset="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550850144930-caixa-de-som-edifier-42w-r1280t.jpg" type="image/webp" media="(max-width: 399.98px)"><source srcset="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/700px/@1550850144930-caixa-de-som-edifier-42w-r1280t.jpg" type="image/webp" media="(min-width: 400px)"><img src="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/700px/@1550850144930-caixa-de-som-edifier-42w-r1280t.jpg" alt=""></picture></div></div><div class="col"><h1 class="product__name">Caixa de Som Edifier 2.0 Bivolt (42W) R1280T Madeira</h1><p class="product__sku">COD: cx-ed-23456</p><div id="product-actions"><div id="product-loading"><div class="spinner-border m-4" role="status"><span class="sr-only">Loading...</span></div><div class="product__buy"><button type="button" class="btn btn-lg btn-primary" onclick="ecomCart.addProduct(storefront.context.body)"><div data-slot="buy-button-content"><i class="fas fa-shopping-bag mr-1"></i> Comprar</div></button></div></div></div></div></div><script>window._offersNtHideSpinner = function () {
setTimeout(function () {
document.getElementById('_offers-nt__spinner').style.display = 'none';
}, 500);
}</script><div class="d-none"><div data-slot="out-of-stock"><button type="button" class="btn btn-lg btn-primary mt-3 offers-notification" data-toggle="collapse" href="#_offers-nt__collapse"><i class="fas fa-bell mr-1"></i> Avise-me quando chegar</button><div class="collapse mt-4" id="_offers-nt__collapse"><div class="card card-body"><div class="spinner-border spinner-border-sm position-absolute" role="status" id="_offers-nt__spinner"><span class="sr-only">Loading...</span></div><iframe style="min-height: 165px; border:none; width: 100%;" id="_offers-nt__iframe" name="_offers-nt__iframe" src="https://us-central1-ecom-offers-notification.cloudfunctions.net/app/offers/notification?storeId=1011&productId=5c701976c626be23430d4fdf&stylesheet=https%3A%2F%2Fstorefront-demo.e-com.plus%2Fstorefront.0f17723d3ace4435cf37.css&criterias=out_of_stock" onload="_offersNtHideSpinner();"></iframe></div></div></div></div><div class="d-none"><div data-slot="track-price"><button type="button" class="btn btn-sm btn-light mt-3 offers-notification" data-toggle="collapse" href="#_offers-nt__collapse"><i class="fas fa-bell mr-1"></i> Avise-me se o preço baixar</button><div class="collapse mt-4" id="_offers-nt__collapse"><div class="card card-body"><div class="spinner-border spinner-border-sm position-absolute" role="status" id="_offers-nt__spinner"><span class="sr-only">Loading...</span></div><iframe style="min-height: 165px; border:none; width: 100%;" id="_offers-nt__iframe" name="_offers-nt__iframe" src="https://us-central1-ecom-offers-notification.cloudfunctions.net/app/offers/notification?storeId=1011&productId=5c701976c626be23430d4fdf&stylesheet=https%3A%2F%2Fstorefront-demo.e-com.plus%2Fstorefront.0f17723d3ace4435cf37.css&criterias=price_change" onload="_offersNtHideSpinner();"></iframe></div></div></div></div></section></div></div><script type="application/ld+json">{"@context":"http://schema.org","@type":"Product","sku":"cx-ed-23456","description":"Caixa de Som Edifier 2.0 Bivolt (42W) R1280T Madeira","name":"Caixa de Som Edifier 2.0 Bivolt (42W) R1280T Madeira","offers":{"@type":"Offer","url":"https://storefront-demo.e-com.plus/caixa-de-som-edifier-2.0-bivolt-42w-r1280t-madeira","availability":"OutOfStock","priceCurrency":"BRL","price":599,"itemCondition":"http://schema.org/NewCondition","seller":{"@type":"Organization","name":"My Shop"}},"brand":{"@type":"Brand","name":"Edifier"},"image":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/@1550850144930-caixa-de-som-edifier-42w-r1280t.jpg"}</script><div class="recommended-products"><section class="products-carousel" data-size="5" data-title="Produtos relacionados"><h4 class="products-carousel__title"><span>Produtos relacionados</span></h4><div class="glide" data-wait-mutation="true" data-autoplay="" data-per-view="4" data-per-view-md="3" data-per-view-sm="2"><div class="glide__track" data-glide-el="track"><ul class="glide__slides products-carousel__list"><li class="glide__slide products-carousel__item"><article class="product-item" data-product="{"_id":"5c701f1ec626be23430d4ff2","sku":"hd-lgt-6652","slug":"headset-stereo-logitech-h110-cinza","quantity":112,"name":"Headset Stereo Logitech H110 Cinza","price":53.2,"pictures":[{"_id":"763462162379369936100000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550851599586-headset-stereo-logitech-h110.gif"}}]}"><div class="product-card" data-product-id="5c701f1ec626be23430d4ff2" data-sku="hd-lgt-6652" data-to-render="true"><a href="/headset-stereo-logitech-h110-cinza" class="product-card__link" title="Headset Stereo Logitech H110 Cinza"><div class="product-card__pictures"><picture class="product-card__picture"><img data-src="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550851599586-headset-stereo-logitech-h110.gif" alt="" class="lozad-delay fade"></picture></div><div data-slot="title"><h3 class="product-card__name">Headset Stereo Logitech H110 Cinza</h3></div></a><div class="product-card__prices prices"><strong class="prices__value">R$ 53,20</strong></div><div class="spinner-border spinner-border-sm fade" role="status"><span class="sr-only">Loading...</span></div></div></article></li><li class="glide__slide products-carousel__item"><article class="product-item" data-product="{"_id":"5d701cf6f11b5b64ea01ccd1","sku":"WIG2566","slug":"notebook-lenovo-ideapad-330-15.6-celeron-n4000-ram-4gb-hd-500gb","quantity":268,"name":"Notebook Lenovo IdeaPad 330 15.6\" Celeron N4000 RAM 4GB HD 500GB","price":2200,"pictures":[{"_id":"425953162379369936400000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550856815592-tela-notebook-lenovo-ideapad-330.jpg"}}]}"><div class="product-card" data-product-id="5d701cf6f11b5b64ea01ccd1" data-sku="WIG2566" data-to-render="true"><a href="/notebook-lenovo-ideapad-330-15.6-celeron-n4000-ram-4gb-hd-500gb" class="product-card__link" title="Notebook Lenovo IdeaPad 330 15.6" Celeron N4000 RAM 4GB HD 500GB"><div class="product-card__pictures"><picture class="product-card__picture"><img data-src="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550856815592-tela-notebook-lenovo-ideapad-330.jpg" alt="" class="lozad-delay fade"></picture></div><div data-slot="title"><h3 class="product-card__name">Notebook Lenovo IdeaPad 330 15.6" Celeron N4000 RAM 4GB HD 500GB</h3></div></a><div class="product-card__prices prices"><strong class="prices__value">R$ 2.200,00</strong></div><div class="spinner-border spinner-border-sm fade" role="status"><span class="sr-only">Loading...</span></div></div></article></li><li class="glide__slide products-carousel__item"><article class="product-item" data-product="{"_id":"5c703c40c626be23430d5033","sku":"nb-apl-1203","slug":"macbook-pro-apple-13.3-intel-core-i5-ram-8gb-ssd-128gb-mpxq2bz/a-cinza-espacial","quantity":9944,"name":"MacBook Pro Apple 13.3\" Intel Core i5 RAM 8GB SSD 128GB MPXQ2BZ/A Cinza Espacial","price":8000,"pictures":[{"_id":"171022162379369936500000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550858949523-frontal-macbook-pro-apple-13-intel-core-i5-128gb-mpxq2bz-a.jpg"}}]}"><div class="product-card" data-product-id="5c703c40c626be23430d5033" data-sku="nb-apl-1203" data-to-render="true"><a href="/macbook-pro-apple-13.3-intel-core-i5-ram-8gb-ssd-128gb-mpxq2bz/a-cinza-espacial" class="product-card__link" title="MacBook Pro Apple 13.3" Intel Core i5 RAM 8GB SSD 128GB MPXQ2BZ/A Cinza Espacial"><div class="product-card__pictures"><picture class="product-card__picture"><img data-src="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550858949523-frontal-macbook-pro-apple-13-intel-core-i5-128gb-mpxq2bz-a.jpg" alt="" class="lozad-delay fade"></picture></div><div data-slot="title"><h3 class="product-card__name">MacBook Pro Apple 13.3" Intel Core i5 RAM 8GB SSD 128GB MPXQ2BZ/A Cinza Espacial</h3></div></a><div class="product-card__prices prices"><strong class="prices__value">R$ 8.000,00</strong></div><div class="spinner-border spinner-border-sm fade" role="status"><span class="sr-only">Loading...</span></div></div></article></li><li class="glide__slide products-carousel__item"><article class="product-item" data-product="{"_id":"5c768d1cc626be23430d5080","sku":"smtp-xomi-2345","slug":"smartphone-xiaomi-mi-8-lite-64gb-versao-global-desbloqueado-azul","quantity":20,"name":"Smartphone Xiaomi MI 8 Lite 64GB Versão Global Desbloqueado Azul","price":1253.9,"pictures":[{"_id":"625394162379369936600000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1551273059156-smartphone-xiaomi-mi-8-lite-64gb-azul.jpg"}}]}"><div class="product-card" data-product-id="5c768d1cc626be23430d5080" data-sku="smtp-xomi-2345" data-to-render="true"><a href="/smartphone-xiaomi-mi-8-lite-64gb-versao-global-desbloqueado-azul" class="product-card__link" title="Smartphone Xiaomi MI 8 Lite 64GB Versão Global Desbloqueado Azul"><div class="product-card__pictures"><picture class="product-card__picture"><img data-src="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1551273059156-smartphone-xiaomi-mi-8-lite-64gb-azul.jpg" alt="" class="lozad-delay fade"></picture></div><div data-slot="title"><h3 class="product-card__name">Smartphone Xiaomi MI 8 Lite 64GB Versão Global Desbloqueado Azul</h3></div></a><div class="product-card__prices prices"><strong class="prices__value">R$ 1.253,90</strong></div><div class="spinner-border spinner-border-sm fade" role="status"><span class="sr-only">Loading...</span></div></div></article></li><li class="glide__slide products-carousel__item"><article class="product-item" data-product="{"_id":"603574709332dd6865dc6d37","sku":"nb-apl-1203-C773","slug":"macbook-pro-apple-13.3-intel-core-i5-ram-8gb-ssd-128gb-mpxq2bz/a-cinza-espacial-c520","quantity":9931,"name":"MacBook Pro Apple 13.3\" Intel Core i5 RAM 8GB SSD 128GB MPXQ2BZ/A Cinza Espacial","price":7000,"pictures":[{"_id":"881830162379369936800000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550858949523-frontal-macbook-pro-apple-13-intel-core-i5-128gb-mpxq2bz-a.jpg"}}]}"><div class="product-card" data-product-id="603574709332dd6865dc6d37" data-sku="nb-apl-1203-C773" data-to-render="true"><a href="/macbook-pro-apple-13.3-intel-core-i5-ram-8gb-ssd-128gb-mpxq2bz/a-cinza-espacial-c520" class="product-card__link" title="MacBook Pro Apple 13.3" Intel Core i5 RAM 8GB SSD 128GB MPXQ2BZ/A Cinza Espacial"><div class="product-card__pictures"><picture class="product-card__picture"><img data-src="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550858949523-frontal-macbook-pro-apple-13-intel-core-i5-128gb-mpxq2bz-a.jpg" alt="" class="lozad-delay fade"></picture></div><div data-slot="title"><h3 class="product-card__name">MacBook Pro Apple 13.3" Intel Core i5 RAM 8GB SSD 128GB MPXQ2BZ/A Cinza Espacial</h3></div></a><div class="product-card__prices prices"><strong class="prices__value">R$ 7.000,00</strong></div><div class="spinner-border spinner-border-sm fade" role="status"><span class="sr-only">Loading...</span></div></div></article></li></ul><div class="glide__arrows glide__arrows--outer" data-glide-el="controls"><button class="btn glide__arrow glide__arrow--left" data-glide-dir="<" aria-label="Anterior"><i class="fas fa-chevron-left"></i></button> <button class="btn glide__arrow glide__arrow--right" data-glide-dir=">" aria-label="Próximo"><i class="fas fa-chevron-right"></i></button></div></div></div></section></div><div class="recommended-products"><section class="products-carousel" data-size="5" data-title="Quem comprou este produto, também comprou:"><h4 class="products-carousel__title"><span>Quem comprou este produto, também comprou:</span></h4><div class="glide" data-wait-mutation="true" data-autoplay="" data-per-view="4" data-per-view-md="3" data-per-view-sm="2"><div class="glide__track" data-glide-el="track"><ul class="glide__slides products-carousel__list"><li class="glide__slide products-carousel__item"><article class="product-item" data-product="{"_id":"5c70168cc626be23430d4fd9","sku":"cx-ed-1052","slug":"caixa-de-som--2.0-bivolt-24w-r1000t4","quantity":70,"name":"Caixa de Som 2.0 Bivolt (24W) R1000T4","price":368,"pictures":[{"_id":"684651623793709618000000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550849536126-caixa-de-som-edifier-20-r1000t4-preta.jpg"}}]}"><div class="product-card" data-product-id="5c70168cc626be23430d4fd9" data-sku="cx-ed-1052" data-to-render="true"><a href="/caixa-de-som--2.0-bivolt-24w-r1000t4" class="product-card__link" title="Caixa de Som 2.0 Bivolt (24W) R1000T4"><div class="product-card__pictures"><picture class="product-card__picture"><img data-src="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550849536126-caixa-de-som-edifier-20-r1000t4-preta.jpg" alt="" class="lozad-delay fade"></picture></div><div data-slot="title"><h3 class="product-card__name">Caixa de Som 2.0 Bivolt (24W) R1000T4</h3></div></a><div class="product-card__prices prices"><strong class="prices__value">R$ 368,00</strong></div><div class="spinner-border spinner-border-sm fade" role="status"><span class="sr-only">Loading...</span></div></div></article></li><li class="glide__slide products-carousel__item"><article class="product-item" data-product="{"_id":"5c70290cc626be23430d5001","sku":"cd-pcy-1256","slug":"cadeira-gamer-pcyes-mad-racer-v8-madv8-azul","quantity":495,"name":"Cadeira Gamer PcYes Mad Racer V8 MADV8","price":1012.77,"pictures":[{"_id":"323121162379370961900000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550854259186-borda-cadeira-gamer-pcyes-mad-racer-v8-azul.jpg"}}]}"><div class="product-card" data-product-id="5c70290cc626be23430d5001" data-sku="cd-pcy-1256" data-to-render="true"><a href="/cadeira-gamer-pcyes-mad-racer-v8-madv8-azul" class="product-card__link" title="Cadeira Gamer PcYes Mad Racer V8 MADV8"><div class="product-card__pictures"><picture class="product-card__picture"><img data-src="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550854259186-borda-cadeira-gamer-pcyes-mad-racer-v8-azul.jpg" alt="" class="lozad-delay fade"></picture></div><div data-slot="title"><h3 class="product-card__name">Cadeira Gamer PcYes Mad Racer V8 MADV8</h3></div></a><div class="product-card__prices prices"><strong class="prices__value">R$ 1.012,77</strong></div><div class="spinner-border spinner-border-sm fade" role="status"><span class="sr-only">Loading...</span></div></div></article></li><li class="glide__slide products-carousel__item"><article class="product-item" data-product="{"_id":"5cdf0e8f887ef430f1f6d0a7","sku":"ZFA2236","slug":"lot-of-pictures-product","quantity":28,"name":"TV LG UHD 55” Q6FN - Tizen Conversor Digital Modo Ambiente Linha 2018","price":1000,"pictures":[{"_id":"505734162379370962000000","normal":{"url":"https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/imgs/400px/@1558199359597-133718358_2sz.jpg"}}]}"><div class="product-card" data-product-id="5cdf0e8f887ef430f1f6d0a7" data-sku="ZFA2236" data-to-render="true"><a href="/lot-of-pictures-product" class="product-card__link" title="TV LG UHD 55” Q6FN - Tizen Conversor Digital Modo Ambiente Linha 2018"><div class="product-card__pictures"><picture class="product-card__picture"><img data-src="https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/imgs/400px/@1558199359597-133718358_2sz.jpg" alt="" class="lozad-delay fade"></picture></div><div data-slot="title"><h3 class="product-card__name">TV LG UHD 55” Q6FN - Tizen Conversor Digital Modo Ambiente Linha 2018</h3></div></a><div class="product-card__prices prices"><strong class="prices__value">R$ 1.000,00</strong></div><div class="spinner-border spinner-border-sm fade" role="status"><span class="sr-only">Loading...</span></div></div></article></li><li class="glide__slide products-carousel__item"><article class="product-item" data-product="{"_id":"5c7010a3c626be23430d4fb4","sku":"ms-csr-303","slug":"mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na","quantity":2986,"name":"Mouse Gamer Corsair Óptico Harpoon RGB CH-9301011-NA","price":100,"pictures":[{"_id":"755292162379370962100000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550847740655-principal-mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na-preto.jpg"}}]}"><div class="product-card" data-product-id="5c7010a3c626be23430d4fb4" data-sku="ms-csr-303" data-to-render="true"><a href="/mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na" class="product-card__link" title="Mouse Gamer Corsair Óptico Harpoon RGB CH-9301011-NA"><div class="product-card__pictures"><picture class="product-card__picture"><img data-src="https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550847740655-principal-mouse-gamer-corsair-optico-harpoon-rgb-ch-9301011-na-preto.jpg" alt="" class="lozad-delay fade"></picture></div><div data-slot="title"><h3 class="product-card__name">Mouse Gamer Corsair Óptico Harpoon RGB CH-9301011-NA</h3></div></a><div class="product-card__prices prices"><strong class="prices__value">R$ 100,00</strong></div><div class="spinner-border spinner-border-sm fade" role="status"><span class="sr-only">Loading...</span></div></div></article></li><li class="glide__slide products-carousel__item"><article class="product-item" data-product="{"_id":"5c700beac626be23430d4f93","sku":"tcl-trm-6215","slug":"combo-teclado-e-mouse-thermaltake-kb-cmc-plblpb-01-preto","quantity":0,"name":"Combo Teclado e Mouse Thermaltake KB-CMC-PLBLPB-01 Preto","price":155.71,"pictures":[{"_id":"708567162379370962200000","normal":{"url":"https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/imgs/normal/@v2-1594851344426-kb-cmc-plblpb-012123.jpg.webp","size":"350x350","alt":"kb-cmc-plblpb-012123"}}]}"><div class="product-card" data-product-id="5c700beac626be23430d4f93" data-sku="tcl-trm-6215" data-to-render="true"><a href="/combo-teclado-e-mouse-thermaltake-kb-cmc-plblpb-01-preto" class="product-card__link" title="Combo Teclado e Mouse Thermaltake KB-CMC-PLBLPB-01 Preto"><div class="product-card__pictures"><picture class="product-card__picture"><img data-src="https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/imgs/normal/@v2-1594851344426-kb-cmc-plblpb-012123.jpg.webp" alt="kb-cmc-plblpb-012123" class="lozad-delay fade"></picture></div><div data-slot="title"><h3 class="product-card__name">Combo Teclado e Mouse Thermaltake KB-CMC-PLBLPB-01 Preto</h3></div></a><div class="product-card__prices prices"><strong class="prices__value">--</strong></div><div class="spinner-border spinner-border-sm fade" role="status"><span class="sr-only">Loading...</span></div></div></article></li></ul><div class="glide__arrows glide__arrows--outer" data-glide-el="controls"><button class="btn glide__arrow glide__arrow--left" data-glide-dir="<" aria-label="Anterior"><i class="fas fa-chevron-left"></i></button> <button class="btn glide__arrow glide__arrow--right" data-glide-dir=">" aria-label="Próximo"><i class="fas fa-chevron-right"></i></button></div></div></div></section></div><section id="product-description" class="product-description my-4 my-lg-5"><div class="container"><p class="lead"><a href="#description" name="description">#</a> Descrição do produto</p><div class="html-clearfix"><div><div class="container caracteristicas-do-produto" id="caracteristicas" style="margin-top: 0px; margin-bottom: 0px; padding: 15px 20px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: "Open Sans", sans-serif; font-size: 16px; vertical-align: baseline; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; max-width: 1280px; color: rgb(112, 112, 112);"><div class="title-ctn" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; position: relative;"><h2 class="bg-title" style="margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding: 0px; border-width: 0px 0px 0px 3px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgb(239, 117, 152); border-image: initial; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 1em; vertical-align: baseline; color: rgb(37, 37, 37); position: relative; z-index: 99;"><span style="margin: 0px; padding: 0px 13px 0px 8px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Características do produto</span></h2></div><div class="content-caracteristicas content" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; width: 1240px; float: left;"><div class="caracteristicas-lista-corrida" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"><h3 style="margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; color: rgb(37, 37, 37);">Câmera</h3><dl class="grupo-carac grupo-carac-83 clearfix" style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(114, 123, 135);"><span class="table" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; display: table; width: 1240px; min-height: 10px; color: rgb(102, 102, 102); border-collapse: collapse;"><dt class="odd" style="margin: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 434px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">Potência</dt><dd class="odd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 806px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">42W RMS</dd></span></dl><h3 style="margin: 20px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; color: rgb(37, 37, 37);">Características</h3><dl class="grupo-carac grupo-carac-20 clearfix" style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(114, 123, 135);"><span class="table" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; display: table; width: 1240px; min-height: 10px; color: rgb(102, 102, 102); border-collapse: collapse;"><dt class="odd" style="margin: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 434px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">Características</dt><dd class="odd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 806px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">Dupla Conexão RCA; <br>Impedância: 10K Ohms; <br>Sensibilidade: 750 mV ± 50 mV (PC); <br>550 mV ± 50 mV (AUX); <br></dd></span></dl><h3 style="margin: 20px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; color: rgb(37, 37, 37);">Dimensões</h3><dl class="grupo-carac grupo-carac-8 clearfix" style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(114, 123, 135);"><span class="table" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; display: table; width: 1240px; min-height: 10px; color: rgb(102, 102, 102); border-collapse: collapse;"><dt class="odd" style="margin: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 434px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">Altura (cm)</dt><dd class="odd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 806px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">23.40</dd></span><span class="table" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; display: table; width: 1240px; min-height: 10px; color: rgb(102, 102, 102); border-collapse: collapse;"><dt class="even" style="margin: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 434px; height: 20px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; float: none; word-break: break-word;">Espessura (cm)</dt><dd class="even" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 806px; height: 20px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; float: none; word-break: break-word;">19.60</dd></span><span class="table" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; display: table; width: 1240px; min-height: 10px; color: rgb(102, 102, 102); border-collapse: collapse;"><dt class="odd" style="margin: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 434px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">Largura (cm)</dt><dd class="odd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 806px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">14.60</dd></span><span class="table" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; display: table; width: 1240px; min-height: 10px; color: rgb(102, 102, 102); border-collapse: collapse;"><dt class="even" style="margin: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 434px; height: 20px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; float: none; word-break: break-word;">Peso (g)</dt><dd class="even" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 806px; height: 20px; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; float: none; word-break: break-word;">4900.00</dd></span></dl><h3 style="margin: 20px 0px 10px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; color: rgb(37, 37, 37);">Fabricante</h3><dl class="grupo-carac clearfix" style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; color: rgb(114, 123, 135);"><span class="table" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; display: table; width: 1240px; min-height: 10px; color: rgb(102, 102, 102); border-collapse: collapse;"><dt class="odd" style="margin: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 434px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">Marca</dt><dd class="odd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 806px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">Edifier</dd></span><span class="table" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.8125em; vertical-align: baseline; display: table; width: 1240px; min-height: 10px; color: rgb(102, 102, 102); border-collapse: collapse;"><dt class="odd" style="margin: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 434px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">Modelo</dt><dd class="odd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 10px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; position: relative; display: table-cell; width: 806px; height: 20px; background: rgb(247, 247, 247); float: none; word-break: break-word;">R1280T</dd></span></dl></div></div></div><div class="band-descricao" style="margin: 0px; padding: 0px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: "Open Sans", sans-serif; font-size: 16px; vertical-align: baseline; color: rgb(112, 112, 112);"><div class="container container-produto descricao-produto" id="descricao" style="margin-top: 0px; margin-bottom: 0px; padding: 15px 20px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; max-width: 1280px;"><div class="title-ctn" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; position: relative;"><h2 class="bg-title" style="margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding: 0px; border-width: 0px 0px 0px 3px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgb(239, 117, 152); border-image: initial; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 1em; vertical-align: baseline; color: rgb(37, 37, 37); position: relative; z-index: 99;"><span style="margin: 0px; padding: 0px 13px 0px 8px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">Detalhes do produto</span></h2></div><div class="description content" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline;"><div class="row spaced left" style="margin: 0px; padding: 0px 2em 50px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-shadow: rgb(160, 160, 160) 0px 10px 15px -15px;"><div class="col1 img-container" style="margin: 0px 76.4375px 0px 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 399.828px; text-align: center;"><img class="lozad" data-src="https://29028l.ha.azioncdn.net/img/2016/10/templateproduto/35827/edifier-r1280t.jpg" alt="Edifier R1280T" data-midia-id="35827" style="border: 0px; margin: 0px; padding: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; max-width: 400px; width: 399.828px; max-height: 400px; height: auto !important;"></div><div class="col2" style="margin: 50px 0px 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 699.719px;"><h3 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 1.4375em; vertical-align: baseline; color: rgb(228, 105, 148);">Conheça a Caixa de Som Edifier 2.0 R1280T</h3><h4 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline;">(Áudio que dá gosto de ouvir)</h4><p style="margin: 0.9375em 0px 1em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 22.4px; font-family: inherit; font-size: 0.875em; vertical-align: baseline;">Se você é daqueles que adora escutar música com qualidade, não deixará de conhecer a nova caixa de som Edifier R1280T. Ela é o produto perfeito para entusiastas da música e, principalmente, para aqueles que trabalham com ela, como em estúdios de mixagem e criação, por exemplo. Tais locais exigem que o som seja ‘de primeira’ e que reproduza suas frequências da forma que realmente são, sem distorções ou equalizações (presente em dispositivos normais), podendo desfrutar daquilo que se diz mais próximo ao originalmente gravado. Entre as características desse poderoso monitor de áudio, estão: entrada RCA dupla, woofer de 4 polegadas, controle remoto, caixa de madeira MDF e 42W RMS de potência.</p></div></div><div class="row spaced right" style="margin: 0px; padding: 0px 2em 50px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; text-align: right; box-shadow: rgb(160, 160, 160) 0px 10px 15px -15px;"><div class="col1" style="margin: 50px 76.4375px 0px 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 699.719px;"><h3 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 1.4375em; vertical-align: baseline; color: rgb(228, 105, 148);">Design moderno</h3><h4 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline;">(Acabamento em MDF)</h4><p style="margin: 0.9375em 0px 1em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 22.4px; font-family: inherit; font-size: 0.875em; vertical-align: baseline;">Conte não apenas com caixas de alta performance mas, também, objetos que são uma verdadeira obra de arte moderna. O destaque do design vai para a caixa de madeira feita 100% em MDF que, além de ajudar na performance do som, garante um belo visual ao ambiente. É impossível tê-las e passarem despercebidas.</p></div><div class="col2 img-container" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 399.828px; text-align: center;"><img class="lozad" data-src="https://29028l.ha.azioncdn.net/img/2016/09/produto/35289/caixa-de-som-edifier-r1280t.jpg" alt="Caixa de Som Edifier R1280T" data-midia-id="35289" style="border: 0px; margin: 0px; padding: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; max-width: 400px; width: 399.828px; max-height: 400px; height: auto !important;"></div></div><div class="row spaced left" style="margin: 0px; padding: 0px 2em 50px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-shadow: rgb(160, 160, 160) 0px 10px 15px -15px;"><div class="col1 img-container" style="margin: 0px 76.4375px 0px 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 399.828px; text-align: center;"><img class="lozad" data-src="https://29028l.ha.azioncdn.net/img/2016/10/templateproduto/35828/controle-edifier-r1280t.jpg" alt="Controle Edifier R1280T" data-midia-id="35828" style="border: 0px; margin: 0px; padding: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; max-width: 400px; width: 399.828px; max-height: 400px; height: auto !important;"></div><div class="col2" style="margin: 50px 0px 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 699.719px;"><h3 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 1.4375em; vertical-align: baseline; color: rgb(228, 105, 148);">Controle em mão</h3><h4 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline;">(Facilitando ainda mais)</h4><p style="margin: 0.9375em 0px 1em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 22.4px; font-family: inherit; font-size: 0.875em; vertical-align: baseline;">A R1280T conta com controle remoto para facilitar a interação com o dispositivo, permitindo que, mesmo à distância, seja possível regular seu volume e até mesmo dar “mute” naquilo que está sendo reproduzido. Agora sim ficou ainda mais fácil gerenciá-la.</p></div></div><div class="row spaced right" style="margin: 0px; padding: 0px 2em 50px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; text-align: right; box-shadow: rgb(160, 160, 160) 0px 10px 15px -15px;"><div class="col1" style="margin: 50px 76.4375px 0px 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 699.719px;"><h3 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 1.4375em; vertical-align: baseline; color: rgb(228, 105, 148);">Equilíbrio Flat</h3><h4 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline;">(Limpos, distintos e potentes)</h4><p style="margin: 0.9375em 0px 1em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 22.4px; font-family: inherit; font-size: 0.875em; vertical-align: baseline;">Sabe aquele som limpo e detalhado que você sonha tanto ouvir, sem presença de ruídos, interferências ou qualquer outro tipo de incômodo? Pois é, ele está bem aqui e apenas a um clique de distância. Com a Edifier R1280T você tem um sistema flat, ou seja, não possui equalizador, preservando as frequências genuínas e o mais próximo de sua gravação. Somente assim você consegue perceber todos os detalhes de uma música e corrigi-la, se necessário. Viva uma nova experiência auditiva ao lado desse dispositivo e surpreenda-se com a verdade por trás das “modificações” que caixas convencionais possuem.</p></div><div class="col2 img-container" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 399.828px; text-align: center;"><img class="lozad" data-src="https://29028l.ha.azioncdn.net/img/2016/10/templateproduto/35829/equilibrio-flat-edifier-r1280t.jpg" alt="Equilíbrio Flat Edifier R1280T" data-midia-id="35829" style="border: 0px; margin: 0px; padding: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; max-width: 400px; width: 399.828px; max-height: 400px; height: auto !important;"></div></div><div class="row spaced left" style="margin: 0px; padding: 0px 2em 50px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-shadow: rgb(160, 160, 160) 0px 10px 15px -15px;"><div class="col1 img-container" style="margin: 0px 76.4375px 0px 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 399.828px; text-align: center;"><img class="lozad" data-src="https://29028l.ha.azioncdn.net/img/2016/09/produto/35290/caixa-edifier-42w-r1280t.jpg" alt="Caixa Edifier 42W R1280T" data-midia-id="35290" style="border: 0px; margin: 0px; padding: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; max-width: 400px; width: 399.828px; max-height: 400px; height: auto !important;"></div><div class="col2" style="margin: 50px 0px 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 699.719px;"><h3 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 1.4375em; vertical-align: baseline; color: rgb(228, 105, 148);">Amplificador e alto-falantes</h3><h4 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline;">(Qualidade máxima)</h4><p style="margin: 0.9375em 0px 1em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 22.4px; font-family: inherit; font-size: 0.875em; vertical-align: baseline;">O que faz deste produto uma das melhores escolhas quando o assunto é áudio de alta definição são seus materiais e recursos, como amplificador e alto-falantes, os quais possuem altíssima qualidade. Traduzindo, isso significa menos distorção de cross-over e resposta rápida a transientes. O som fica mais ‘claro’ e as próprias frequências ficam mais distantes pois o amplificador não gera harmônicos desnecessários no sinal. Vivencie a verdadeira música ao lado do Edifier R1280T.</p></div></div><div class="row spaced right" style="margin: 0px; padding: 0px 2em 50px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; text-align: right; box-shadow: rgb(160, 160, 160) 0px 10px 15px -15px;"><div class="col1" style="margin: 50px 76.4375px 0px 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 699.719px;"><h3 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 1.4375em; vertical-align: baseline; color: rgb(228, 105, 148);">Regulador de intensidade</h3><h4 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline;">(Deixando o som do seu jeito)</h4><p style="margin: 0.9375em 0px 1em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 22.4px; font-family: inherit; font-size: 0.875em; vertical-align: baseline;">Pelo fato de possuir suas frequências equilibradas, o Monitor de Áudio Edifier R1280T conta com reguladores para graves e agudos, podendo regulá-los da forma que mais combinar com o estilo musical. Na hora do filme de ação, aumente os graves a fim de dar maior atmosfera ao ambiente, intensificando as emoções e deixando o que é bom, ainda melhor.</p></div><div class="col2 img-container" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 399.828px; text-align: center;"><img class="lozad" data-src="https://29028l.ha.azioncdn.net/img/2016/10/templateproduto/35830/regulagem-edifier-r1280t.jpg" alt="Regulagem Edifier R1280T" data-midia-id="35830" style="border: 0px; margin: 0px; padding: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; max-width: 400px; width: 399.828px; max-height: 400px; height: auto !important;"></div></div><div class="row spaced left" style="margin: 0px; padding: 0px 2em 50px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; box-shadow: none;"><div class="col1 img-container" style="margin: 0px 76.4375px 0px 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 399.828px; text-align: center;"><img class="lozad" data-src="https://29028l.ha.azioncdn.net/img/2016/10/templateproduto/35831/caixa-som-edifier-r1280t.jpg" alt="Caixa de Som Edifier R1280T" data-midia-id="35831" style="border: 0px; margin: 0px; padding: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; max-width: 400px; width: 399.828px; max-height: 400px; height: auto !important;"></div><div class="col2" style="margin: 50px 0px 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: middle; float: left; width: 699.719px;"><h3 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 1.4375em; vertical-align: baseline; color: rgb(228, 105, 148);">Dedicados a você</h3><h4 style="margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 16px; vertical-align: baseline;">(Jogos, músicas, filmes e tudo!)</h4><p style="margin: 0.9375em 0px 1em; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: 22.4px; font-family: inherit; font-size: 0.875em; vertical-align: baseline;">O que faz deste produto uma das melhores escolhas quando o assunto é áudio de alta definição são seus materiais e recursos, como amplificador e alto-falantes, os quais possuem altíssima qualidade. Traduzindo, isso significa menos distorção de cross-over e resposta rápida a transientes. O som fica mais ‘claro’ e as próprias frequências ficam mais distantes pois o amplificador não gera harmônicos desnecessários no sinal. Vivencie a verdadeira música ao lado do Edifier R1280T.</p></div></div></div></div></div><div class="produto-acompanha-caixa container" id="acompanha" style="margin-top: 0px; margin-bottom: 0px; padding: 15px 20px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family: "Open Sans", sans-serif; font-size: 16px; vertical-align: baseline; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; max-width: 1280px; color: rgb(112, 112, 112);"><div class="title-ctn" style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; position: relative;"><h2 class="bg-title" style="margin-right: 0px; margin-bottom: 20px; margin-left: 0px; padding: 0px; border-width: 0px 0px 0px 3px; border-top-style: initial; border-right-style: initial; border-bottom-style: initial; border-left-style: solid; border-top-color: initial; border-right-color: initial; border-bottom-color: initial; border-left-color: rgb(239, 117, 152); border-image: initial; font-style: inherit; font-variant: inherit; font-weight: bold; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 1em; vertical-align: baseline; color: rgb(37, 37, 37); position: relative; z-index: 99;"><span style="margin: 0px; padding: 0px 13px 0px 8px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial;">O que vem na caixa?</span></h2></div><ul class="content" style="margin-right: 0px; margin-bottom: 0px; margin-left: 16px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; vertical-align: baseline; list-style: none;"><li style="margin: 0px 0px 4px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.875em; vertical-align: baseline; color: rgb(102, 102, 102); list-style-type: disc;">1 Coluna Passiva</li><li style="margin: 0px 0px 4px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.875em; vertical-align: baseline; color: rgb(102, 102, 102); list-style-type: disc;">1 Coluna Ativa</li><li style="margin: 0px 0px 4px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.875em; vertical-align: baseline; color: rgb(102, 102, 102); list-style-type: disc;">1 Controle Remoto</li><li style="margin: 0px 0px 4px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.875em; vertical-align: baseline; color: rgb(102, 102, 102); list-style-type: disc;">1 Cabo P2 3.5mm - RCA</li><li style="margin: 0px 0px 4px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.875em; vertical-align: baseline; color: rgb(102, 102, 102); list-style-type: disc;">1 Cabo Dual RCA</li><li style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.875em; vertical-align: baseline; color: rgb(102, 102, 102); list-style-type: disc;">1 Manual de Instruções</li></ul><p style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.875em; vertical-align: baseline; color: rgb(102, 102, 102); list-style-type: disc;"><br></p><p style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-size: 0.875em; vertical-align: baseline; color: rgb(102, 102, 102); list-style-type: disc;">Veja mais <a href="http:///caixas-de-som">Aqui!</a></p></div></div></div></div></section><section id="product-specs" class="product-specs my-4 my-lg-5"><div class="container"><p class="lead"><a href="#specs" name="specs">#</a> Especificações do produto</p><table class="table table-striped"><tbody><tr><td class="text-muted">potencia</td><td>59w</td></tr><tr><td class="text-muted">Cor primária</td><td>madeira</td></tr></tbody></table></div></section></div></article><footer class="footer py-3 py-lg-4 py-xl-5"><div class="container"><div class="row"><div class="col-12 col-lg-auto order-lg-last pl-xl-4"><div class="footer__contacts"><div class="footer__title">Contacts</div><ul class="list-unstyled"><li><span class="footer__list-icon"><i class="fab fa-whatsapp"></i> </span><a href="javascript:;" target="_blank" rel="noopener" class="whatsapp-link" data-tel="31982721558">(31) 9 8272-1558</a></li><li><span class="footer__list-icon"><i class="fas fa-phone"></i> </span><a href="tel:+31982721558" target="_blank" rel="noopener">(31) 9 8272-1558</a></li><li><a href="mailto:vitor@e-com.club" target="_blank" rel="noopener">vitor@e-com.club</a></li><li><address>Endereço</address></li></ul><p class="footer__social"><a href="https://www.facebook.com/ecom.clubpage/" target="_blank" rel="noopener" aria-label="facebook" style="color: #3b5998"><i class="fab fa-facebook"></i> </a><a href="https://www.youtube.com/channel/UCBlIxK5JAub0E1EX_qHdzmA" target="_blank" rel="noopener" aria-label="youtube" style="color: #ff0000"><i class="fab fa-youtube"></i> </a><a href="https://www.instagram.com/ecomclub/" target="_blank" rel="noopener" aria-label="instagram" style="color: #e1306c"><i class="fab fa-instagram"></i></a></p></div></div><div class="col-12 col-sm-6 col-lg col-xl-auto px-xl-4"><a class="footer__title" data-toggle="collapse" href="#footer-pages" role="button" aria-expanded="false" aria-controls="footer-pages">Pages</a><div class="collapse" id="footer-pages"><ul class="footer__links"><li><i class="fas fa-angle-right"></i> <a href="/pages/contato">Contato</a></li><li><i class="fas fa-angle-right"></i> <a href="/pages/entrega">Condições de entrega</a></li><li><i class="fas fa-angle-right"></i> <a href="/pages/faq">Dúvidas frequentes</a></li><li><i class="fas fa-angle-right"></i> <a href="/pages/pagamentos">Formas de pagamento</a></li><li><i class="fas fa-angle-right"></i> <a href="/pages/privacidade">Política de privacidade</a></li><li><i class="fas fa-angle-right"></i> <a href="/pages/sobre-nos">Sobre nós</a></li><li><i class="fas fa-angle-right"></i> <a href="/pages/termos">Termos de serviço</a></li><li><i class="fas fa-angle-right"></i> <a href="/pages/trocas">Trocas e devoluções</a></li></ul></div></div><div class="col-12 col-sm-6 col-lg col-xl-auto px-xl-4"><a class="footer__title" data-toggle="collapse" href="#footer-categories" role="button" aria-expanded="false" aria-controls="footer-categories">Categories</a><div class="collapse" id="footer-categories"><ul class="footer__links"><li><i class="fas fa-angle-right"></i> <a href="/monitores">Monitores</a></li><li><i class="fas fa-angle-right"></i> <a href="/notebooks">Notebooks</a></li><li><i class="fas fa-angle-right"></i> <a href="/smartphones">Smartphones</a></li><li><i class="fas fa-angle-right"></i> <a href="/jogos/">Jogo</a></li><li><i class="fas fa-angle-right"></i> <a href="/promocoes">Promoções</a></li><li><i class="fas fa-angle-right"></i> <a href="/">Brasileiro</a></li><li><i class="fas fa-angle-right"></i> <a href="/">smartwatch</a></li><li><i class="fas fa-angle-right"></i> <a href="/sao-paulo">São Páulò</a></li></ul></div></div><div class="col-12 col-xl order-lg-first"><h2 class="footer__title footer__store">My Shop</h2><p>My PWA Shop</p><div class="mt-4 mb-3"><p class="footer__payment-methods"><i class="pay-icon pay-icon--bb"></i> <i class="pay-icon pay-icon--visa"></i> <i class="pay-icon pay-icon--boleto"></i> <i class="pay-icon pay-icon--elo"></i> <i class="pay-icon pay-icon--bradesco"></i> <i class="pay-icon pay-icon--mastercard"></i> <i class="pay-icon pay-icon--itau"></i></p><div class="footer__stamps"><ul class="stamps"><li><img src="/img/uploads/ssl-safe.png" alt="Secure connection" class="lozad fade" data-preload></li></ul></div></div></div></div><div class="footer__credits"><span>© Loja Modelo / Endereço / 123 </span><button id="go-to-top" class="btn btn-primary ml-3" type="button" aria-label="Ir pata o topo"><i class="fas fa-chevron-up"></i></button></div></div></footer><div class="ecom-credits"><a href="https://www.conferecartoes.com.br/confere-shop" target="_blank" rel="noopener">Crie sua loja online agora <img src="https://www.conferecartoes.com.br/hubfs/logo-209.png" alt="Confere Shop" width="92" height="23"></a></div></main><script>/*<!--*/window._settings={"repository":"","domain":"storefront-demo.e-com.plus","currency_symbol":"R$","primary_color":"#e83e8c","theme":{"bootswatch":"_","custom":"_"},"bg_color":"#ffffff","logo":"/img/uploads/logo.webp","name":"My Shop","short_name":"MyShop","lang":"pt_br","currency":"BRL","mini_logo":"","favicon":"/img/uploads/favicon.png","country_code":"BR","secondary_color":"#333333","icon":"/img/icon.png","store_id":1011,"description":"My PWA Shop","large_icon":"/img/large-icon.png"};window._info={"shipping":{"show":true,"text":"Entregamos para todo o Brasil"},"installments":{"show":true,"text":"Parcele sem juros"},"exchange":{"show":true,"text":"Não gostou? A primeira troca é gratuita"},"promo":{"show":true,"text":"Diferentes promoções ao longo do ano!"}};window._widgets={"@ecomplus/widget-minicart":{"active":true,"desktopOnly":false,"options":{}},"@ecomplus/widget-offers-notification":{"active":true,"desktopOnly":false,"options":{"enableOutOfStock":true,"enablePriceChange":true,"popupOptions":"location=yes,height=400,width=320,status=yes"},"productSlots":"src/append/product-slots"},"@ecomplus/widget-product-card":{"active":true,"desktopOnly":false,"options":{"buyText":"","buy":"","footer":""}},"@ecomplus/widget-product":{"active":true,"desktopOnly":false,"options":{"buyText":"","buy":""}},"@ecomplus/widget-search-engine":{"active":true,"desktopOnly":false,"options":{}},"@ecomplus/widget-search":{"active":true,"desktopOnly":false,"options":{}},"@ecomplus/widget-user":{"active":true,"desktopOnly":true}};window._context={"resource":"products","body":{"_id":"5c701976c626be23430d4fdf","visible":true,"available":true,"manage_stock":true,"price":569.05,"base_price":599,"pictures":[{"zoom":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/@1550850144930-caixa-de-som-edifier-42w-r1280t.jpg"},"small":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/100px/@1550850144930-caixa-de-som-edifier-42w-r1280t.jpg"},"normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550850144930-caixa-de-som-edifier-42w-r1280t.jpg"},"big":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/700px/@1550850144930-caixa-de-som-edifier-42w-r1280t.jpg"},"_id":"582980155085016021900000"}],"sku":"cx-ed-23456","quantity":0,"cost_price":650,"body_html":"","keywords":["caixa"],"brands":[{"_id":"5c701536c626be23430d4fd2","name":"Edifier"}],"categories":[{"_id":"5c700a37c626be23430d4f86","name":"Caixas de Som","slug":"caixas-de-som"},{"_id":"5c6ffa8cc626be23430d4f58","name":"Notebooks gamers","slug":"notebooks-gamers"},{"_id":"5c701cb1c626be23430d4fe9","name":"Físicos","slug":"fisicos"}],"specifications":{"potencia":[{"text":"59w","value":"59w"}],"colors":[{"text":"madeira"}]},"weight":{"value":4900,"unit":"g"},"dimensions":{"width":{"value":14.6,"unit":"cm"},"height":{"value":23.4,"unit":"cm"},"length":{"value":19.6,"unit":"cm"}},"name":"Caixa de Som Edifier 2.0 Bivolt (42W) R1280T Madeira","slug":"caixa-de-som-edifier-2.0-bivolt-42w-r1280t-madeira","commodity_type":"physical","ad_relevance":0,"currency_id":"BRL","currency_symbol":"R$","condition":"new","adult":true,"auto_fill_related_products":true,"views":0,"sales":11,"total_sold":11329.45,"price_change_records":[{"date_of_change":"2020-05-01T19:29:52.204Z","price":597.8,"currency_id":"BRL","currency_symbol":"R$","_id":"5eac78b65ac4060578b6c856"},{"date_of_change":"2020-09-04T00:44:10.026Z","price":569.05,"currency_id":"BRL","currency_symbol":"R$","_id":"5f518def7430f92180ebcb31"}],"inventory_records":[],"price_effective_date":{"start":"2020-09-01T00:00:00.000Z","end":"2020-09-21T00:00:00.000Z"},"updated_at":"2021-03-24T20:22:01.845Z","store_id":1011,"created_at":"2020-11-27T04:42:26.673Z","body_text":""}};window._data={"categories":[{"_id":"5c6ffa18c626be23430d4f4e","name":"Monitores","slug":"monitores","icon":{"url":"https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007322374-rect836.png"},"updated_at":"2019-08-28T15:51:06.863Z","created_at":"2019-08-28T15:51:06.863Z"},{"_id":"5c6ffa6ec626be23430d4f56","name":"Notebooks","slug":"notebooks","icon":{"url":"https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007351112-comp.png"},"updated_at":"2019-08-28T15:51:51.039Z","created_at":"2019-08-28T15:51:51.039Z"},{"_id":"5c700a9cc626be23430d4f8c","name":"Smartphones","slug":"smartphones","icon":{"url":"https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007321218-smartphone.png"},"updated_at":"2019-08-28T15:52:17.995Z","created_at":"2019-08-28T15:52:17.995Z"},{"_id":"5c701c9ec626be23430d4fe7","name":"Jogo","slug":"jogos/","icon":{"url":"https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007332353-game.png"},"updated_at":"2020-07-24T19:14:01.592Z","created_at":"2020-07-24T19:14:01.592Z"},{"_id":"5ceecb3f887ef430f1f70c88","name":"Promoções","slug":"promocoes","icon":{"url":"https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/@1567007326827-mony.png"},"updated_at":"2019-08-28T15:52:41.385Z","created_at":"2019-08-28T15:52:41.385Z"},{"_id":"5f70f1417430f92180f5ba66","name":"Brasileiro","created_at":"2020-09-27T20:08:33.202Z"},{"_id":"5fb2b13b69274c73fcd6a051","name":"smartwatch","created_at":"2020-11-16T17:04:59.320Z"},{"_id":"60199592d6981740b4a030f4","name":"São Páulò","slug":"sao-paulo","created_at":"2021-02-02T18:10:26.119Z"}],"grids":[{"grid_id":"metragem_do_cabo","title":"Metragem do cabo"},{"grid_id":"conector","title":"Conector"},{"grid_id":"canais","title":"Canais"},{"grid_id":"cores","title":"Cores"},{"grid_id":"colecao","title":"Coleção"},{"grid_id":"size","title":"Tamanho"},{"grid_id":"modelo","title":"modelo"},{"grid_id":"polegadas","title":"polegadas"},{"grid_id":"arte","title":"arte"},{"grid_id":"protecao","title":"protecao"},{"grid_id":"idade","title":"Idade"},{"grid_id":"gender","title":"Gênero"},{"grid_id":"material","title":"Material"},{"grid_id":"aparelho","title":"aparelho"},{"grid_id":"case","title":"Case"},{"grid_id":"nome_personalizado","title":"Nome personalizado"},{"grid_id":"brilho","title":"brilho"},{"grid_id":"resolucao","title":"resolucao"},{"grid_id":"hd","title":"HD"},{"grid_id":"tensao","title":"Tensão"},{"grid_id":"cor","title":"Cor"},{"grid_id":"colors","title":"Cor primária"},{"grid_id":"numero_da_roupa","title":"Número da roupa"},{"grid_id":"ano","title":"Ano"},{"grid_id":"potencia","title":"potencia"},{"grid_id":"dpi","title":"dpi"},{"grid_id":"modelo_de_celular","title":"Modelo de celular"},{"grid_id":"cabo","title":"Cabo"},{"grid_id":"nome_gratis","title":"Nome (grátis)"},{"grid_id":"numero_gratis","title":"Número (GRÁTIS)"}],"items":[{"_id":"5c701c8ac626be23430d4fe5","sku":"hd-csr-303","name":"Headset Gamer Corsair HS40 Raptor CA-9011122-NA(AP)","slug":"headset-gamer-corsair-hs40-raptor-ca-9011122-naap-vinho","pictures":[{"_id":"418070155085083747200000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550850821727-embalagem-headset-gamer-corsair-raptor-hs40.jpg"}}]},{"_id":"5c701f1ec626be23430d4ff2","sku":"hd-lgt-6652","name":"Headset Stereo Logitech H110 Cinza","slug":"headset-stereo-logitech-h110-cinza","pictures":[{"_id":"147670155085164215400000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550851599586-headset-stereo-logitech-h110.gif"}}]},{"_id":"5c70168cc626be23430d4fd9","sku":"cx-ed-1052","name":"Caixa de Som 2.0 Bivolt (24W) R1000T4","slug":"caixa-de-som--2.0-bivolt-24w-r1000t4","pictures":[{"_id":"193780155084959235100000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550849536126-caixa-de-som-edifier-20-r1000t4-preta.jpg"}}]},{"_id":"5c7015e5c626be23430d4fd4","sku":"cx-ed-021","name":"Caixa de Som Edifier 2.1 Amplificada (15W) X100B Preto","slug":"caixa-de-som-edifier-2.1-amplificada-15w-x100b-preto","pictures":[{"_id":"526090155084931712700000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550849307836-satelite-edifier-para-pc-15w-x100b.jpg"}}]},{"_id":"5d81378df11b5b64ea01cf42","sku":"NNX7520","name":"Notebook Gaming Dell I5577-7152 15.6\" I7 2.8GHZ 4GB 1TB Preto","slug":"notebook-gaming-dell-i5577-7152-15.6-i7-2.8ghz-4gb-1tb-preto","pictures":[{"_id":"196920158121546752200000","normal":{"url":"https://ecom-jvxboxzk.sfo2.digitaloceanspaces.com/imgs/normal/@v2-1581215452641-notebook-d-ell-i5577-7152.jpg.webp"}}]},{"_id":"5c702e1cc626be23430d500e","sku":"cd-acl-9965","name":"Cadeira Gamer Aerocool Profissional AC60C Vermelho","slug":"cadeira-gamer-aerocool-profissional-ac60c-vermelho","pictures":[{"_id":"225660155085542812200000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550855319331-cadeira-gamer-aerocool-air-ac60c-vermelho.jpg"}}]},{"_id":"5c703700c626be23430d501e","sku":"nb-lnv-9197","name":"Notebook Lenovo IdeaPad 330 15.6\" Celeron N4000 RAM 4GB HD 500GB","slug":"notebook-lenovo-ideapad-330-15.6-celeron-n4000-ram-4gb-hd-500gb","pictures":[{"_id":"332010155085684329000000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550856815592-tela-notebook-lenovo-ideapad-330.jpg"}}]},{"_id":"5c70290cc626be23430d5001","sku":"cd-pcy-1256","name":"Cadeira Gamer PcYes Mad Racer V8 MADV8","slug":"cadeira-gamer-pcyes-mad-racer-v8-madv8-azul","pictures":[{"_id":"519060155085427162200000","normal":{"url":"https://ecom-ptqgjveg.nyc3.digitaloceanspaces.com/imgs/400px/@1550854259186-borda-cadeira-gamer-pcyes-mad-racer-v8-azul.jpg"}}]}]};/*-->*/</script><script type="application/ld+json">{"@context":"http://schema.org","@type":"Organization","name":"My Shop","url":"https://storefront-demo.e-com.plus/","logo":"https://storefront-demo.e-com.plus/img/uploads/logo.webp"}</script><script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha256-4+XzXVhsDmqanXGHaHvgh1gMQKX40OUvDEBTu8JcmNs=" crossorigin="anonymous"></script><script>if (!window.jQuery) {
document.write('<script src="https://unpkg.com/jquery@3.5.1/dist/jquery.min.js"><\/script>')
}</script><script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script><script>if (!window.Popper) {
document.write('<script src="https://unpkg.com/popper.js@1.16.1/dist/umd/popper.min.js"><\/script>')
}</script><script src="/storefront.5aebe1ac1cf1d6b7e261.js"></script></body></html> | 6,120.866667 | 74,962 | 0.7391 |
e8701caae2c645012e8b9a0199eae4ec652531c9 | 229 | cpp | C++ | 1002.cpp | barroslipe/urionlinejudge | a20d8199d9a92b30ea394a6c949967d2fc51aa34 | [
"MIT"
] | null | null | null | 1002.cpp | barroslipe/urionlinejudge | a20d8199d9a92b30ea394a6c949967d2fc51aa34 | [
"MIT"
] | null | null | null | 1002.cpp | barroslipe/urionlinejudge | a20d8199d9a92b30ea394a6c949967d2fc51aa34 | [
"MIT"
] | null | null | null | #include <iostream>
#include <iomanip>
using namespace std;
int main() {
double raio, area, pi = 3.14159;
cin >> raio;
area = pi * raio * raio;
cout << fixed << setprecision(4) << "A="<< area << "\n";
return 0;
}
| 12.722222 | 58 | 0.572052 |
ae83665460ac7b40208a8c93eb4e23f77bebef83 | 2,587 | swift | Swift | MonsterCards/Views/ImportMonster.swift | headhunter45/MonsterCards-iOS | 938f0fb75860d3637b998bdd0c27dcffd9fc9451 | [
"MIT"
] | null | null | null | MonsterCards/Views/ImportMonster.swift | headhunter45/MonsterCards-iOS | 938f0fb75860d3637b998bdd0c27dcffd9fc9451 | [
"MIT"
] | null | null | null | MonsterCards/Views/ImportMonster.swift | headhunter45/MonsterCards-iOS | 938f0fb75860d3637b998bdd0c27dcffd9fc9451 | [
"MIT"
] | null | null | null | //
// ImportMonster.swift
// MonsterCards
//
// Created by Tom Hicks on 4/1/21.
//
import SwiftUI
struct ImportMonster: View {
@Binding var monster: MonsterViewModel
@Environment(\.managedObjectContext) private var viewContext
@Binding var isOpen: Bool
var body: some View {
VStack{
HStack {
Button("Cancel", action: cancelImport)
Spacer()
Button("Add to Library", action: saveNewMonster)
}
MonsterDetailView(viewModel: monster)
}
.padding()
}
func cancelImport() {
isOpen = false
}
func saveNewMonster() {
print("Saving monster: \(monster.name)")
withAnimation {
let newMonster = Monster(context: viewContext)
monster.copyToMonster(monster: newMonster)
do {
try viewContext.save()
isOpen = false
} catch {
// Replace this implementation with code to handle the error appropriately.
// fatalError() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
let nsError = error as NSError
fatalError("Unresolved error \(nsError), \(nsError.userInfo)")
}
}
}
}
struct ImportMonster_Previews: PreviewProvider {
static var previews: some View {
let monster = MonsterViewModel()
monster.name = "Steve"
monster.size = "Medium"
monster.type = "dwarf"
monster.alignment = "chaotic good"
monster.armorType = .none
monster.hasShield = true
monster.hitDice = 4
monster.strengthScore = 20
monster.dexterityScore = 14
monster.constitutionScore = 18
monster.intelligenceScore = 8
monster.wisdomScore = 8
monster.charismaScore = 15
monster.walkSpeed = 40
monster.challengeRating = .four
monster.languages = [LanguageViewModel("Common", true), LanguageViewModel("Giant", true)]
monster.actions = [AbilityViewModel("Greataxe, +3", "__Badass Attack:___ Hits the other dude on a _3_ or above and does a ton of damage")]
return
VStack{
Text("Hello, World!")
}
.sheet(isPresented: .constant(true)) {
ImportMonster(monster: .constant(monster), isOpen: .constant(true))
}
}
}
| 31.938272 | 199 | 0.579822 |
8bd89a226707d8371503e3c752734100d9c60b75 | 8,283 | swift | Swift | Tests/KakaJSONTests/Other/Coding.swift | zhuangxq/KakaJSON | 88d8587a90b8efaac9228baee3a759c25f8a6dd3 | [
"MIT"
] | 1,086 | 2019-08-13T09:51:30.000Z | 2022-03-31T08:38:19.000Z | Tests/KakaJSONTests/Other/Coding.swift | zhuangxq/KakaJSON | 88d8587a90b8efaac9228baee3a759c25f8a6dd3 | [
"MIT"
] | 54 | 2019-08-14T02:42:14.000Z | 2021-09-18T09:07:01.000Z | Tests/KakaJSONTests/Other/Coding.swift | zhuangxq/KakaJSON | 88d8587a90b8efaac9228baee3a759c25f8a6dd3 | [
"MIT"
] | 118 | 2019-08-13T13:07:31.000Z | 2022-03-31T06:10:56.000Z | //
// Coding.swift
// KakaJSONTests
//
// Created by MJ Lee on 2019/8/22.
// Copyright © 2019 MJ Lee. All rights reserved.
//
import XCTest
@testable import KakaJSON
class TestCoding: XCTestCase {
// Please input your file path
var file: String = {
var str = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0]
str.append("/kj_test.json")
return str
}()
func testModel() {
// Equatable is only for test cases, is not necessary for Coding.
struct Car: Convertible, Equatable {
var name: String = "Bently"
var new: Bool = true
var age: Int = 10
var area: Float = longFloat
var weight: Double = longDouble
var height: Decimal = longDecimal
var price: NSDecimalNumber = longDecimalNumber
var minSpeed: Double = 66.66
var maxSpeed: NSNumber = 77.77
var capacity: CGFloat = 88.88
var birthday: Date = time
var url: URL? = URL(string: "http://520suanfa.com")
}
checkCoding(Car.self)
}
func testOptional() {
// Equatable is only for test cases, is not necessary for Coding.
struct Student: Convertible, Equatable {
var op1: Int? = 10
var op2: Double?? = 66.66
var op3: Float??? = 77.77
var op4: String???? = "Jack"
var op5: Bool????? = true
// NSArray\Set<CGFloat>\NSSet
// NSMutableArray\NSMutableSet
var op6: [CGFloat]?????? = [44.44, 55.55]
}
checkCoding(Student.self)
}
func testNested() {
// Equatable is only for test cases, is not necessary for Coding.
struct Book: Convertible, Equatable {
var name: String = ""
var price: Double = 0.0
}
// Equatable is only for test cases, is not necessary for Coding.
struct Car: Convertible, Equatable {
var name: String = ""
var price: Double = 0.0
}
// Equatable is only for test cases, is not necessary for Coding.
struct Dog: Convertible, Equatable {
var name: String = ""
var age: Int = 0
}
// Equatable is only for test cases, is not necessary for Coding.
struct Person: Convertible, Equatable {
var name: String = "Jack"
var car: Car? = Car(name: "Bently", price: 106.666)
var books: [Book]? = [
Book(name: "Fast C++", price: 666.6),
Book(name: "Data Structure And Algorithm", price: 666.6),
]
var dogs: [String: Dog]? = [
"dog0": Dog(name: "Wang", age: 5),
"dog1": Dog(name: "ErHa", age: 3),
]
}
checkCoding(Person.self)
write(Person(), to: file)
let person = read(Person.self, from: file)
XCTAssert(person?.name == "Jack")
XCTAssert(person?.car?.name == "Bently")
XCTAssert(person?.car?.price == 106.666)
XCTAssert(person?.books?.count == 2)
XCTAssert(person?.dogs?.count == 2)
}
func testAny() {
struct Book: Convertible {
var name: String = ""
var price: Double = 0.0
}
struct Dog: Convertible {
var name: String = ""
var age: Int = 0
}
struct Person: Convertible {
// NSArray\NSMutableArray
var books: [Any]? = [
Book(name: "Fast C++", price: 666.6),
Book(name: "Data Structure And Algorithm", price: 1666.6),
]
// NSDictionary\NSMutableDictionary
var dogs: [String: Any]? = [
"dog0": Dog(name: "Wang", age: 5),
"dog1": Dog(name: "ErHa", age: 3),
]
}
write(Person(), to: file)
let person = read(Person.self, from: file)
XCTAssert(person?.books?.count == 2)
XCTAssert(person?.dogs?.count == 2)
let personString = "\(person as Any)"
XCTAssert(personString.contains("Fast C++"))
XCTAssert(personString.contains("Data Structure And Algorithm"))
XCTAssert(personString.contains("666.6"))
XCTAssert(personString.contains("1666.6"))
// prevent from 66.6499999999999998
XCTAssert(!personString.contains("99999"))
// prevent from 66.6600000000000001
XCTAssert(!personString.contains("00000"))
}
func testDate() {
let date1 = Date(timeIntervalSince1970: timeInteval)
write(date1, to: file)
let date2 = read(Date.self, from: file)
XCTAssert(date2 == date1)
XCTAssert(read(Double.self, from: file) == timeInteval)
}
func testString() {
let string1 = "123"
write(string1, to: file)
let string2 = read(String.self, from: file)
XCTAssert(string2 == string1)
XCTAssert(read(Int.self, from: file) == 123)
}
func testArray() {
let array1 = ["Jack", "Rose"]
write(array1, to: file)
let array2 = read([String].self, from: file)
XCTAssert(array2 == array1)
}
func testModelArray() {
struct Car: Convertible {
var name: String = ""
var price: Double = 0.0
}
let models1 = [
Car(name: "BMW", price: 100.0),
Car(name: "Audi", price: 70.0)
]
write(models1, to: file)
let models2 = read([Car].self, from: file)
XCTAssert(models2?.count == models1.count)
XCTAssert(models2?[0].name == "BMW")
XCTAssert(models2?[0].price == 100.0)
XCTAssert(models2?[1].name == "Audi")
XCTAssert(models2?[1].price == 70.0)
}
func testModelSet() {
struct Car: Convertible, Hashable {
var name: String = ""
var price: Double = 0.0
}
let models1: Set<Car> = [
Car(name: "BMW", price: 100.0),
Car(name: "Audi", price: 70.0)
]
write(models1, to: file)
let models2 = read(Set<Car>.self, from: file)!
XCTAssert(models2.count == models1.count)
for car in models2 {
XCTAssert(["BMW", "Audi"].contains(car.name))
XCTAssert([100.0, 70.0].contains(car.price))
}
}
func testModelDictionary() {
struct Car: Convertible {
var name: String = ""
var price: Double = 0.0
}
let models1 = [
"car0": Car(name: "BMW", price: 100.0),
"car1": Car(name: "Audi", price: 70.0)
]
write(models1, to: file)
let models2 = read([String: Car].self, from: file)
XCTAssert(models2?.count == models1.count)
let car0 = models2?["car0"]
XCTAssert(car0?.name == "BMW")
XCTAssert(car0?.price == 100.0)
let car1 = models2?["car1"]
XCTAssert(car1?.name == "Audi")
XCTAssert(car1?.price == 70.0)
}
func checkCoding<M: Convertible & Equatable>(_ type: M.Type) {
let obj1 = type.init()
// write to file
write(obj1, to: file)
// read from file
let obj2 = read(type, from: file)
XCTAssert(obj1 == obj2)
let objString = "\(obj2 as Any)"
// prevent from 66.6499999999999998
XCTAssert(!objString.contains("99999"))
// prevent from 66.6600000000000001
XCTAssert(!objString.contains("00000"))
}
static var allTests = [
"testModel": testModel,
"testOptional": testOptional,
"testNested": testNested,
"testAny": testAny,
"testDate": testDate,
"testString": testString,
"testArray": testArray,
"testModelArray": testModelArray,
"testModelSet": testModelSet,
"testModelDictionary": testModelDictionary
]
}
| 31.139098 | 97 | 0.514789 |
9ad85d5f433f3cb475765f1b4aab481809466743 | 6,558 | sql | SQL | MS_LIBRARY/schema/ms2DatabaseSummaryTablesSQL.sql | yeastrc/msdapl | 0239d2dc34a41702eec39ee4cf1de95593044777 | [
"Apache-2.0"
] | 4 | 2017-04-13T21:04:57.000Z | 2021-07-16T19:42:16.000Z | MSDaPl_install/schema/msData_summary_tables.sql | yeastrc/msdapl | 0239d2dc34a41702eec39ee4cf1de95593044777 | [
"Apache-2.0"
] | null | null | null | MSDaPl_install/schema/msData_summary_tables.sql | yeastrc/msdapl | 0239d2dc34a41702eec39ee4cf1de95593044777 | [
"Apache-2.0"
] | 2 | 2016-06-16T17:16:40.000Z | 2017-07-27T18:48:45.000Z |
# ######################################################
# !!!!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!!!!!!!!!!!
# The contents of this file reside in TWO files
# MS_LIBRARY/trunk/schema/ms2DatabaseSummaryTablesSQL.sql
# AND
# MSDaPl_install/trunk/schema/msData_summary_tables.sql
# If you update the file in one place, update the other to keep them in sync
# ##############################################################################################
# Percolator result stats
# ##############################################################################################
CREATE TABLE PeptideTerminiStats (
analysisID INT UNSIGNED NOT NULL PRIMARY KEY,
scoreCutoff DOUBLE UNSIGNED NOT NULL,
scoreType VARCHAR(20) NOT NULL,
totalResultCount INT UNSIGNED NOT NULL,
numResultsWithEnzTerm_0 INT UNSIGNED NOT NULL,
numResultsWithEnzTerm_1 INT UNSIGNED NOT NULL,
numResultsWithEnzTerm_2 INT UNSIGNED NOT NULL,
ntermMinusOneAminoAcidCount VARCHAR(255),
ntermAminoAcidCount VARCHAR(255),
ctermAminoAcidCount VARCHAR(255),
ctermPlusOneAminoAcidCount VARCHAR(255),
enzymeID INT UNSIGNED,
enzyme VARCHAR(20)
);
CREATE TABLE PercolatorFilteredPsmResult (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
runSearchAnalysisID INT UNSIGNED NOT NULL,
qvalue DOUBLE UNSIGNED NOT NULL,
total INT UNSIGNED NOT NULL,
filtered INT UNSIGNED NOT NULL
);
ALTER TABLE PercolatorFilteredPsmResult ADD INDEX (runSearchAnalysisID);
ALTER TABLE PercolatorFilteredPsmResult ADD UNIQUE INDEX (runSearchAnalysisID, qvalue);
CREATE TABLE PercolatorFilteredBinnedPsmResult (
percPsmResultID INT UNSIGNED NOT NULL,
binStart INT UNSIGNED NOT NULL,
binEnd INT UNSIGNED NOT NULL,
total INT UNSIGNED NOT NULL,
filtered INT UNSIGNED NOT NULL
);
ALTER TABLE PercolatorFilteredBinnedPsmResult ADD INDEX (percPsmResultID);
CREATE TABLE PercolatorFilteredSpectraResult (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
runSearchAnalysisID INT UNSIGNED NOT NULL,
qvalue DOUBLE UNSIGNED NOT NULL,
total INT UNSIGNED NOT NULL,
filtered INT UNSIGNED NOT NULL
);
ALTER TABLE PercolatorFilteredSpectraResult ADD INDEX (runSearchAnalysisID);
ALTER TABLE PercolatorFilteredSpectraResult ADD UNIQUE INDEX (runSearchAnalysisID, qvalue);
CREATE TABLE PercolatorFilteredBinnedSpectraResult (
percScanResultID INT UNSIGNED NOT NULL,
binStart INT UNSIGNED NOT NULL,
binEnd INT UNSIGNED NOT NULL,
total INT UNSIGNED NOT NULL,
filtered INT UNSIGNED NOT NULL
);
ALTER TABLE PercolatorFilteredBinnedSpectraResult ADD INDEX (percScanResultID);
# ##############################################################################################
# ProteinProphet result stats
# ##############################################################################################
CREATE TABLE ProphetFilteredBinnedPsmResult (
prophetPsmResultID INT UNSIGNED NOT NULL,
binStart INT UNSIGNED NOT NULL,
binEnd INT UNSIGNED NOT NULL,
total INT UNSIGNED NOT NULL,
filtered INT UNSIGNED NOT NULL
);
ALTER TABLE ProphetFilteredBinnedPsmResult ADD INDEX (prophetPsmResultID);
CREATE TABLE ProphetFilteredPsmResult (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
runSearchAnalysisID INT UNSIGNED NOT NULL,
probability DOUBLE UNSIGNED NOT NULL,
total INT UNSIGNED NOT NULL,
filtered INT UNSIGNED NOT NULL
);
ALTER TABLE ProphetFilteredPsmResult ADD INDEX (runSearchAnalysisID);
ALTER TABLE ProphetFilteredPsmResult ADD UNIQUE INDEX (runSearchAnalysisID, probability);
CREATE TABLE ProphetFilteredSpectraResult (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
runSearchAnalysisID INT UNSIGNED NOT NULL,
probability DOUBLE UNSIGNED NOT NULL,
total INT UNSIGNED NOT NULL,
filtered INT UNSIGNED NOT NULL
);
ALTER TABLE ProphetFilteredSpectraResult ADD INDEX (runSearchAnalysisID);
ALTER TABLE ProphetFilteredSpectraResult ADD UNIQUE INDEX (runSearchAnalysisID, probability);
CREATE TABLE ProphetFilteredBinnedSpectraResult (
prophetScanResultID INT UNSIGNED NOT NULL,
binStart INT UNSIGNED NOT NULL,
binEnd INT UNSIGNED NOT NULL,
total INT UNSIGNED NOT NULL,
filtered INT UNSIGNED NOT NULL
);
ALTER TABLE ProphetFilteredBinnedSpectraResult ADD INDEX (prophetScanResultID);
# ##############################################################################################
# Protein Inference results stats
# ##############################################################################################
CREATE TABLE proteinInferRunSummary (
piRunID INT unsigned NOT NULL PRIMARY KEY,
groupCount INT unsigned NOT NULL,
proteinCount INT unsigned NOT NULL,
peptSeqCount INT unsigned NOT NULL,
ionCount INT unsigned NOT NULL,
spectrumCount INT unsigned NOT NULL,
minSpectrumCount INT unsigned NOT NULL,
maxSpectrumCount INT unsigned NOT NULL
);
CREATE TABLE proteinProphetRunSummary (
piRunID int(10) unsigned NOT NULL PRIMARY KEY,
prophetGroupCount int(10) unsigned NOT NULL,
groupCount int(10) unsigned NOT NULL,
proteinCount int(10) unsigned NOT NULL,
peptSeqCount int(10) unsigned NOT NULL,
ionCount int(10) unsigned NOT NULL,
spectrumCount int(10) unsigned NOT NULL,
minSpectrumCount INT unsigned NOT NULL,
maxSpectrumCount INT unsigned NOT NULL
);
CREATE TABLE proteinInferProteinSummary (
piRunID INT unsigned NOT NULL,
piProteinID INT UNSIGNED NOT NULL PRIMARY KEY,
nrseqProteinID INT UNSIGNED NOT NULL PRIMARY KEY,
peptideCount INT UNSIGNED NOT NULL,
uniqPeptideCount INT UNSIGNED NOT NULL,
ionCount INT UNSIGNED NOT NULL,
uniqueIonCount INT UNSIGNED NOT NULL,
psmCount INT UNSIGNED NOT NULL,
spectrumCount INT UNSIGNED NOT NULL,
peptDef_peptideCount INT UNSIGNED NOT NULL,
peptDef_uniqPeptideCount INT UNSIGNED NOT NULL
);
ALTER TABLE proteinInferProteinSummary ADD INDEX (piRunID);
ALTER TABLE proteinInferProteinSummary ADD INDEX (nrseqProteinID, piRunID);
# --------------------------------------------------------------------------------------------
# ADD TRIGGERS
# --------------------------------------------------------------------------------------------
DELIMITER |
CREATE TRIGGER PercolatorFilteredPsmResult_bdelete BEFORE DELETE ON PercolatorFilteredPsmResult
FOR EACH ROW
BEGIN
DELETE FROM PercolatorFilteredBinnedPsmResult WHERE percPsmResultID = OLD.id;
END;
|
DELIMITER ;
DELIMITER |
CREATE TRIGGER PercolatorFilteredSpectraResult_bdelete BEFORE DELETE ON PercolatorFilteredSpectraResult
FOR EACH ROW
BEGIN
DELETE FROM PercolatorFilteredBinnedSpectraResult WHERE percScanResultID = OLD.id;
END;
|
DELIMITER ;
| 35.258065 | 103 | 0.704636 |
0a4817dc650fd85e35e27647ffcd3ccef447b07f | 1,505 | ts | TypeScript | src/infrastructure/client/adapter/repository/client-repository.postgres.ts | 0xmendezCeiba/trainsadnceiba | 75ddd87eb8e2afb8dffd0b45ca02db0a6925daea | [
"Apache-2.0"
] | null | null | null | src/infrastructure/client/adapter/repository/client-repository.postgres.ts | 0xmendezCeiba/trainsadnceiba | 75ddd87eb8e2afb8dffd0b45ca02db0a6925daea | [
"Apache-2.0"
] | null | null | null | src/infrastructure/client/adapter/repository/client-repository.postgres.ts | 0xmendezCeiba/trainsadnceiba | 75ddd87eb8e2afb8dffd0b45ca02db0a6925daea | [
"Apache-2.0"
] | null | null | null | import { Repository } from 'typeorm';
import { InjectRepository } from '@nestjs/typeorm';
import { Injectable } from '@nestjs/common';
import { Client } from 'src/domain/client/model/client';
import { ClientRepository } from 'src/domain/client/port/repository/client.repository';
import { ClientEntity } from '../../entity/client.entity';
@Injectable()
export class ClientRepositoryPostgres implements ClientRepository {
constructor(
@InjectRepository(ClientEntity)
private readonly repository: Repository<ClientEntity>,
) {}
public async existsIdentityCode(identityCode: string): Promise<boolean> {
return (await this.repository.count({ identityCode })) > 0;
}
public async create(client: Client) {
const entity = new ClientEntity();
entity.fullName = client.getFullName;
entity.balance = client.getBalance;
entity.identityCode = client.getIdentityCode;
entity.createdAt = new Date();
return this.repository.save(entity);
}
public async update(id: number, client: Client) {
const entity = await this.repository.findOne(id);
entity.fullName = client.getFullName;
entity.balance = client.getBalance;
entity.identityCode = client.getIdentityCode;
return this.repository.save(entity);
}
public async getById(id: number):Promise<Client | null> {
const record = await this.repository.findOne(id);
if (record) {
return new Client(record.fullName, record.identityCode, +record.balance);
}
return null;
}
}
| 32.021277 | 87 | 0.719601 |
1cf8ad5e37495a95a6059d9a42a5e343e681c979 | 287 | sql | SQL | server/db/17122019_AlterExceptionLog.sql | sktanwar2014/fme_system | 610fe4267f075a15d13ac9633809b574504855e6 | [
"MIT"
] | null | null | null | server/db/17122019_AlterExceptionLog.sql | sktanwar2014/fme_system | 610fe4267f075a15d13ac9633809b574504855e6 | [
"MIT"
] | null | null | null | server/db/17122019_AlterExceptionLog.sql | sktanwar2014/fme_system | 610fe4267f075a15d13ac9633809b574504855e6 | [
"MIT"
] | null | null | null | SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
ALTER TABLE `exception_log`
CHANGE `message` `message` longtext COLLATE 'latin1_swedish_ci' NULL AFTER `code`;
ALTER TABLE `exception_log`
CHANGE `created_by` `created_by` varchar(500) NOT NULL AFTER `created_at`; | 57.4 | 82 | 0.783972 |
7acd0aa023d91e473a62b2f097ddd59fe96a24fd | 592 | ps1 | PowerShell | POYA/UpdateEFDatabase.ps1 | Larry-Wei/POYA | 471d67b45888dc448125aee991a57cf64741029f | [
"MIT"
] | 7 | 2019-02-14T05:09:57.000Z | 2019-05-01T06:27:20.000Z | POYA/UpdateEFDatabase.ps1 | Larry-Wei/POYA | 471d67b45888dc448125aee991a57cf64741029f | [
"MIT"
] | null | null | null | POYA/UpdateEFDatabase.ps1 | Larry-Wei/POYA | 471d67b45888dc448125aee991a57cf64741029f | [
"MIT"
] | 5 | 2019-02-12T18:53:44.000Z | 2019-02-21T09:20:14.000Z | #!/bin/pwsh
$_L="L>_ "
$_ScriptRoot=$PSScriptRoot
$_datetime= (Get-Date -Format lMMddyyyyHHmmss).ToString()
$_SetLocation="Set-Location "+$_ScriptRoot
$_dotnet_ef_migrations_add="dotnet ef migrations add "+$_datetime
$_dotnet_ef_database_update="dotnet ef database update"
$_ok=">>>>\\(^_^)//\\(^_^)//\\(^_^)//\\(^_^)//<<<<"
Write-Output $_L$_SetLocation
Invoke-Expression $_SetLocation
Write-Output $_L$_dotnet_ef_migrations_add
Invoke-Expression $_dotnet_ef_migrations_add
Write-Output $_L$_dotnet_ef_database_update
Invoke-Expression $_dotnet_ef_database_update
Write-Output $_ok
| 37 | 65 | 0.760135 |
b194908c22c55beaeafed735ad84d311fb5e9b8f | 38,738 | swift | Swift | Tests/DocumentTest.swift | MaxDesiatov/automerge-swift | 4c68f1fd71b6145e370b26eb88208531d8a50355 | [
"MIT"
] | null | null | null | Tests/DocumentTest.swift | MaxDesiatov/automerge-swift | 4c68f1fd71b6145e370b26eb88208531d8a50355 | [
"MIT"
] | null | null | null | Tests/DocumentTest.swift | MaxDesiatov/automerge-swift | 4c68f1fd71b6145e370b26eb88208531d8a50355 | [
"MIT"
] | null | null | null | //
// DocumentTest.swift
// Automerge
//
// Created by Lukas Schmidt on 16.05.20.
//
import Foundation
import XCTest
@testable import Automerge
struct DocumentState: Codable, Equatable {
struct Birds: Codable, Equatable {
let wrens: Int
let magpies: Int
}
var birds: Birds?
}
struct DocumentT2: Codable, Equatable {
var bird: String?
}
// Refers to test/frontend_test.js
class DocumentTest: XCTestCase {
// should allow instantiating from an existing object
func testInitializing1() {
let initialState = DocumentState(birds: .init(wrens: 3, magpies: 4))
let document = Document(initialState)
XCTAssertEqual(document.content, initialState)
}
// should return the unmodified document if nothing changed
func testPerformingChanges1() {
let initialState = DocumentState(birds: .init(wrens: 3, magpies: 4))
var document = Document(initialState)
document.change({ _ in
})
XCTAssertEqual(document.content, initialState)
}
// should set root object properties
func testPerformingChanges2() {
struct Schema: Codable, Equatable {
var bird: String?
}
let actor = Actor()
var doc = Document(Schema(bird: nil), actor: actor)
let req = doc.change { $0.bird.set("magpie") }
XCTAssertEqual(doc.content, Schema(bird: "magpie"))
XCTAssertEqual(req, Request(requestType: .change, message: "", time: req!.time, actor: actor.actorId, seq: 1, version: 0, ops: [
Op(action: .set, obj: ROOT_ID, key: "bird", insert: false, value: .string("magpie"))
], undoable: true))
}
// should create nested maps
func testPerformingChanges3() {
struct Schema: Codable, Equatable {
struct Birds: Codable, Equatable { let wrens: Int }
var birds: Birds?
}
var doc = Document(Schema(birds: nil))
let req = doc.change { $0.birds?.set(.init(wrens: 3)) }
XCTAssertEqual(doc.content, Schema(birds: .init(wrens: 3)))
XCTAssertEqual(req, Request(requestType: .change, message: "", time: req!.time, actor: doc.actor.actorId, seq: 1, version: 0, ops: [
Op(action: .makeMap, obj: ROOT_ID, key: "birds", insert: false, child: req!.ops[1].obj),
Op(action: .set, obj: req!.ops[1].obj, key: "wrens", insert: false, value: .int(3))
], undoable: true))
}
// should apply updates inside nested maps
func testPerformingChanges4() {
struct Schema: Codable, Equatable {
struct Birds: Codable, Equatable { let wrens: Int; var sparrows: Int? }
var birds: Birds?
}
var doc1 = Document(Schema(birds: nil))
doc1.change { $0.birds?.set(.init(wrens: 3, sparrows: nil)) }
var doc2 = doc1
let req = doc2.change { $0.birds?.sparrows?.set(15) }
let birds = doc2.rootProxy().birds?.objectId
XCTAssertEqual(doc1.content, Schema(birds: .init(wrens: 3, sparrows: nil)))
XCTAssertEqual(doc2.content, Schema(birds: .init(wrens: 3, sparrows: 15)))
XCTAssertEqual(req, Request(requestType: .change, message: "", time: req!.time, actor: doc1.actor.actorId, seq: 2, version: 1, ops: [
Op(action: .set, obj: birds!, key: "sparrows", insert: false, value: .int(15))
], undoable: true))
}
// should delete keys in maps
func testPerformingChanges5() {
struct Schema: Codable, Equatable {
var magpies: Int?; let sparrows: Int?
}
let actor = Actor()
let doc1 = Document(Schema(magpies: 2, sparrows: 15), actor: actor)
var doc2 = doc1
let req = doc2.change { $0.magpies.set(nil) }
XCTAssertEqual(doc1.content, Schema(magpies: 2, sparrows: 15))
XCTAssertEqual(doc2.content, Schema(magpies: nil, sparrows: 15))
XCTAssertEqual(req, Request(requestType: .change, message: "", time: req!.time, actor: actor.actorId, seq: 2, version: 1, ops: [
Op(action: .del, obj: ROOT_ID, key: "magpies", insert: false, value: nil)
], undoable: true))
}
// should create lists
func testPerformingChanges6() {
struct Schema: Codable, Equatable {
var birds: [String]?
}
var doc1 = Document(Schema(birds: nil))
let req = doc1.change { $0.birds?.set(["chaffinch"])}
XCTAssertEqual(doc1.content, Schema(birds: ["chaffinch"]))
XCTAssertEqual(req, Request(requestType: .change, message: "", time: req!.time, actor: doc1.actor.actorId, seq: 1, version: 0, ops: [
Op(action: .makeList, obj: ROOT_ID, key: "birds", insert: false, child: req!.ops[1].obj),
Op(action: .set, obj: req!.ops[1].obj, key: 0, insert: true, value: .string("chaffinch"))
], undoable: true))
}
// should apply updates inside lists
func testPerformingChanges7() {
struct Schema: Codable, Equatable {
var birds: [String]?
}
var doc1 = Document(Schema(birds: nil))
doc1.change { $0.birds?.set(["chaffinch"]) }
var doc2 = doc1
let req = doc2.change { $0.birds?[0].set("greenfinch") }
let birds = doc2.rootProxy().birds?.objectId
XCTAssertEqual(doc1.content, Schema(birds: ["chaffinch"]))
XCTAssertEqual(doc2.content, Schema(birds: ["greenfinch"]))
XCTAssertEqual(req, Request(requestType: .change, message: "", time: req!.time, actor: doc1.actor.actorId, seq: 2, version: 1, ops: [
Op(action: .set, obj: birds!, key: 0, value: .string("greenfinch"))
], undoable: true))
}
// should delete list elements
func testPerformingChanges8() {
struct Schema: Codable, Equatable {
var birds: [String]
}
let doc1 = Document(Schema(birds: ["chaffinch", "goldfinch"]))
var doc2 = doc1
let req = doc2.change {
$0.birds.remove(at: 0)
}
let birds = doc2.rootProxy().birds.objectId
XCTAssertEqual(doc1.content, Schema(birds: ["chaffinch", "goldfinch"]))
XCTAssertEqual(doc2.content, Schema(birds: ["goldfinch"]))
XCTAssertEqual(req, Request(requestType: .change, message: "", time: req!.time, actor: doc2.actor.actorId, seq: 2, version: 1, ops: [
Op(action: .del, obj: birds!, key: 0)
], undoable: true))
}
// should store Date objects as timestamps
func testPerformingChanges9() {
struct Schema: Codable, Equatable {
var now: Date?
}
let now = Date(timeIntervalSince1970: 0)
var doc1 = Document(Schema(now: nil))
let req = doc1.change { $0.now?.set(now) }
XCTAssertEqual(doc1.content, Schema(now: now))
XCTAssertEqual(req, Request(requestType: .change, message: "", time: req!.time, actor: doc1.actor.actorId, seq: 1, version: 0, ops: [
Op(action: .set, obj: ROOT_ID, key: "now", insert: false, value: .double(now.timeIntervalSince1970), datatype: .timestamp)
], undoable: true))
}
// should handle counters inside maps
func testCounters1() {
struct Schema: Codable, Equatable {
var wrens: Counter?
}
var doc1 = Document(Schema())
let req1 = doc1.change { $0.wrens?.set(0) }
var doc2 = doc1
let req2 = doc2.change { $0.wrens?.increment() }
let actor = doc2.actor
XCTAssertEqual(doc1.content, Schema(wrens: 0))
XCTAssertEqual(doc2.content, Schema(wrens: 1))
XCTAssertEqual(req1, Request(requestType: .change, message: "", time: req1!.time, actor: actor.actorId, seq: 1, version: 0, ops: [
Op(action: .set, obj: ROOT_ID, key: "wrens", value: .int(0), datatype: .counter)
], undoable: true))
XCTAssertEqual(req2, Request(requestType: .change, message: "", time: req2!.time, actor: actor.actorId, seq: 2, version: 1, ops: [
Op(action: .inc, obj: ROOT_ID, key: "wrens", value: .int(1))
], undoable: true))
}
// should handle counters inside lists
func testCounters2() {
struct Schema: Codable, Equatable {
var counts: [Counter]?
}
var doc1 = Document(Schema())
let req1 = doc1.change {
$0.counts?.set([1])
XCTAssertEqual($0.counts?.get(), [1])
}
var doc2 = doc1
let req2 = doc2.change {
$0.counts?[0].increment(2)
XCTAssertEqual($0.counts?.get(), [3])
}
let actor = doc2.actor
XCTAssertEqual(doc1.content, Schema(counts: [1]))
XCTAssertEqual(doc2.content, Schema(counts: [3]))
XCTAssertEqual(req1, Request(requestType: .change, message: "", time: req1!.time, actor: actor.actorId, seq: 1, version: 0, ops: [
Op(action: .makeList, obj: ROOT_ID, key: "counts", child: req1!.ops[0].child),
Op(action: .set, obj: req1!.ops[1].obj, key: 0, insert: true, value: .int(1), datatype: .counter)
], undoable: true))
XCTAssertEqual(req2, Request(requestType: .change, message: "", time: req2!.time, actor: actor.actorId, seq: 2, version: 1, ops: [
Op(action: .inc, obj: req2!.ops[0].obj, key: 0, value: .int(2))
], undoable: true))
}
// // should use version and sequence number from the backend
// func testBackendConcurrency1() {
// struct Schema: Codable, Equatable {
// var blackbirds: Int?
// var partridges: Int?
// }
// let local = ActorId(), remtote1 = ActorId(), remtote2 = ActorId()
// let patch1 = Patch(
// clock: [local.actorId: 4, remtote1.actorId: 11, remtote2.actorId: 41],
// version: 3,
// canUndo: false,
// canRedo: false,
// diffs: .init(objectId: ROOT_ID, type: .map, props: ["blackbirds": [local.actorId: 24]]))
// var doc1 = Document(Schema(blackbirds: nil, partridges: nil), options: .init(actorId: local))
// doc1.applyPatch(patch: patch1)
// doc1.change { $0[\.partridges, "partridges"] = 1 }
// let requests = doc1.state.requests.map { $0.request }
// XCTAssertEqual(requests, [
// Request(requestType: .change, message: "", time: requests[0].time, actor: doc1.actor.actorId, seq: 5, version: 3, ops: [
// Op(action: .set, obj: ROOT_ID, key: "partridges", insert: false, value: .int(1))
// ], undoable: true)
// ])
// }
// it('should use version and sequence number from the backend', () => {
// const local = uuid(), remote1 = uuid(), remote2 = uuid()
// const patch1 = {
// version: 3, canUndo: false, canRedo: false,
// clock: {[local]: 4, [remote1]: 11, [remote2]: 41},
// diffs: {objectId: ROOT_ID, type: 'map', props: {blackbirds: {[local]: {value: 24}}}}
// }
// let doc1 = Frontend.applyPatch(Frontend.init(local), patch1)
// let [doc2, req] = Frontend.change(doc1, doc => doc.partridges = 1)
// let requests = getRequests(doc2)
// assert.deepStrictEqual(requests, [
// {requestType: 'change', actor: local, seq: 5, time: requests[0].time, message: '', version: 3, ops: [
// {obj: ROOT_ID, action: 'set', key: 'partridges', insert: false, value: 1}
// ]}
// ])
// })
// // should remove pending requests once handled
// func testBackendConcurrency2() {
// struct Schema: Codable, Equatable {
// var blackbirds: Int?
// var partridges: Int?
// }
// let actor = ActorId()
// var doc = Document(Schema(blackbirds: nil, partridges: nil), options: .init(actorId: actor))
// doc.change({ $0[\.blackbirds, "blackbirds"] = 24 })
// doc.change({ $0[\.partridges, "partridges"] = 1 })
// let requests = doc.state.requests.map { $0.request }
// XCTAssertEqual(requests, [
// Request(requestType: .change, message: "", time: requests[0].time, actor: actor.actorId, seq: 1, version: 0, ops: [
// Op(action: .set, obj: ROOT_ID, key: "blackbirds", insert: false, value: .int(24))
// ], undoable: true),
// Request(requestType: .change, message: "", time: requests[1].time, actor: actor.actorId, seq: 2, version: 0, ops: [
// Op(action: .set, obj: ROOT_ID, key: "partridges", insert: false, value: .int(1))
// ], undoable: true)
// ])
// doc.applyPatch(patch: Patch(actor: actor.actorId,
// seq: 1,
// clock: [actor.actorId: 1],
// version: 1,
// canUndo: true,
// canRedo: false,
// diffs: ObjectDiff(objectId: ROOT_ID, type: .map, props: ["blackbirds": [actor.actorId: 24]])
// )
// )
//
// let requests2 = doc.state.requests.map { $0.request }
// XCTAssertEqual(doc.content, Schema(blackbirds: 24, partridges: 1))
// XCTAssertEqual(requests2, [
// Request(requestType: .change, message: "", time: requests2[0].time, actor: actor.actorId, seq: 2, version: 0, ops: [
// Op(action: .set, obj: ROOT_ID, key: "partridges", insert: false, value: .int(1))
// ], undoable: true)
// ])
//
// doc.applyPatch(patch: Patch(actor: actor.actorId,
// seq: 2,
// clock: [actor.actorId: 2],
// version: 2,
// canUndo: true,
// canRedo: false,
// diffs: ObjectDiff(objectId: ROOT_ID, type: .map, props: ["partridges": [actor.actorId: 1]])
// )
// )
//
// XCTAssertEqual(doc.content, Schema(blackbirds: 24, partridges: 1))
// XCTAssertEqual(doc.state.requests.map { $0.request }, [])
// }
// describe('backend concurrency', () => {
// function getRequests(doc) {
// return doc[STATE].requests.map(req => {
// req = Object.assign({}, req)
// delete req['before']
// delete req['diffs']
// return req
// })
// }
//
// it('should use version and sequence number from the backend', () => {
// const local = uuid(), remote1 = uuid(), remote2 = uuid()
// const patch1 = {
// version: 3, canUndo: false, canRedo: false,
// clock: {[local]: 4, [remote1]: 11, [remote2]: 41},
// diffs: {objectId: ROOT_ID, type: 'map', props: {blackbirds: {[local]: {value: 24}}}}
// }
// let doc1 = Frontend.applyPatch(Frontend.init(local), patch1)
// let [doc2, req] = Frontend.change(doc1, doc => doc.partridges = 1)
// let requests = getRequests(doc2)
// assert.deepStrictEqual(requests, [
// {requestType: 'change', actor: local, seq: 5, time: requests[0].time, message: '', version: 3, ops: [
// {obj: ROOT_ID, action: 'set', key: 'partridges', insert: false, value: 1}
// ]}
// ])
// })
//
// it('should remove pending requests once handled', () => {
// const actor = uuid()
// let [doc1, change1] = Frontend.change(Frontend.init(actor), doc => doc.blackbirds = 24)
// let [doc2, change2] = Frontend.change(doc1, doc => doc.partridges = 1)
// let requests = getRequests(doc2)
// assert.deepStrictEqual(requests, [
// {requestType: 'change', actor, seq: 1, time: requests[0].time, message: '', version: 0, ops: [
// {obj: ROOT_ID, action: 'set', key: 'blackbirds', insert: false, value: 24}
// ]},
// {requestType: 'change', actor, seq: 2, time: requests[1].time, message: '', version: 0, ops: [
// {obj: ROOT_ID, action: 'set', key: 'partridges', insert: false, value: 1}
// ]}
// ])
//
// doc2 = Frontend.applyPatch(doc2, {
// actor, seq: 1, version: 1, clock: {[actor]: 1}, canUndo: true, canRedo: false, diffs: {
// objectId: ROOT_ID, type: 'map', props: {blackbirds: {[actor]: {value: 24}}}
// }
// })
// requests = getRequests(doc2)
// assert.deepStrictEqual(doc2, {blackbirds: 24, partridges: 1})
// assert.deepStrictEqual(requests, [
// {requestType: 'change', actor, seq: 2, time: requests[0].time, message: '', version: 0, ops: [
// {obj: ROOT_ID, action: 'set', key: 'partridges', insert: false, value: 1}
// ]}
// ])
//
// doc2 = Frontend.applyPatch(doc2, {
// actor, seq: 2, version: 2, clock: {[actor]: 2}, canUndo: true, canRedo: false, diffs: {
// objectId: ROOT_ID, type: 'map', props: {partridges: {[actor]: {value: 1}}}
// }
// })
// assert.deepStrictEqual(doc2, {blackbirds: 24, partridges: 1})
// assert.deepStrictEqual(getRequests(doc2), [])
// })
//
// it('should leave the request queue unchanged on remote patches', () => {
// const actor = uuid(), other = uuid()
// let [doc, req] = Frontend.change(Frontend.init(actor), doc => doc.blackbirds = 24)
// let requests = getRequests(doc)
// assert.deepStrictEqual(requests, [
// {requestType: 'change', actor, seq: 1, time: requests[0].time, message: '', version: 0, ops: [
// {obj: ROOT_ID, action: 'set', key: 'blackbirds', insert: false, value: 24}
// ]}
// ])
//
// doc = Frontend.applyPatch(doc, {
// version: 1, clock: {[other]: 1}, canUndo: false, canRedo: false, diffs: {
// objectId: ROOT_ID, type: 'map', props: {pheasants: {[other]: {value: 2}}}
// }
// })
// requests = getRequests(doc)
// assert.deepStrictEqual(doc, {blackbirds: 24})
// assert.deepStrictEqual(requests, [
// {requestType: 'change', actor, seq: 1, time: requests[0].time, message: '', version: 0, ops: [
// {obj: ROOT_ID, action: 'set', key: 'blackbirds', insert: false, value: 24}
// ]}
// ])
//
// doc = Frontend.applyPatch(doc, {
// actor, seq: 1, version: 2, clock: {[actor]: 1, [other]: 1}, canUndo: true, canRedo: false, diffs: {
// objectId: ROOT_ID, type: 'map', props: {blackbirds: {[actor]: {value: 24}}}
// }
// })
// assert.deepStrictEqual(doc, {blackbirds: 24, pheasants: 2})
// assert.deepStrictEqual(getRequests(doc), [])
// })
//
// it('should not allow request patches to be applied out of order', () => {
// const [doc1, req1] = Frontend.change(Frontend.init(), doc => doc.blackbirds = 24)
// const [doc2, req2] = Frontend.change(doc1, doc => doc.partridges = 1)
// const actor = Frontend.getActorId(doc2)
// const diffs = {objectId: ROOT_ID, type: 'map', props: {partridges: {[actor]: {value: 1}}}}
// assert.throws(() => {
// Frontend.applyPatch(doc2, {actor, seq: 2, clock: {[actor]: 2}, diffs})
// }, /Mismatched sequence number/)
// })
//
// it('should handle concurrent insertions into lists', () => {
// let [doc1, req1] = Frontend.change(Frontend.init(), doc => doc.birds = ['goldfinch'])
// const birds = Frontend.getObjectId(doc1.birds), actor = Frontend.getActorId(doc1)
// doc1 = Frontend.applyPatch(doc1, {
// actor, seq: 1, version: 1, clock: {[actor]: 1}, canUndo: true, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {
// birds: {[actor]: {objectId: birds, type: 'list',
// edits: [{action: 'insert', index: 0}],
// props: {0: {[actor]: {value: 'goldfinch'}}}
// }}
// }}
// })
// assert.deepStrictEqual(doc1, {birds: ['goldfinch']})
// assert.deepStrictEqual(getRequests(doc1), [])
//
// const [doc2, req2] = Frontend.change(doc1, doc => {
// doc.birds.insertAt(0, 'chaffinch')
// doc.birds.insertAt(2, 'greenfinch')
// })
// assert.deepStrictEqual(doc2, {birds: ['chaffinch', 'goldfinch', 'greenfinch']})
//
// const remoteActor = uuid()
// const doc3 = Frontend.applyPatch(doc2, {
// version: 2, clock: {[actor]: 1, [remoteActor]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {
// birds: {[actor]: {objectId: birds, type: 'list',
// edits: [{action: 'insert', index: 1}],
// props: {1: {[remoteActor]: {value: 'bullfinch'}}}
// }}
// }}
// })
// // The addition of 'bullfinch' does not take effect yet: it is queued up until the pending
// // request has made its round-trip through the backend.
// assert.deepStrictEqual(doc3, {birds: ['chaffinch', 'goldfinch', 'greenfinch']})
//
// const doc4 = Frontend.applyPatch(doc3, {
// actor, seq: 2, version: 3, clock: {[actor]: 2, [remoteActor]: 1}, canUndo: true, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {
// birds: {[actor]: {objectId: birds, type: 'list',
// edits: [{action: 'insert', index: 0}, {action: 'insert', index: 2}],
// props: {0: {[actor]: {value: 'chaffinch'}}, 2: {[actor]: {value: 'greenfinch'}}}
// }}
// }}
// })
// assert.deepStrictEqual(doc4, {birds: ['chaffinch', 'goldfinch', 'greenfinch', 'bullfinch']})
// assert.deepStrictEqual(getRequests(doc4), [])
// })
//
// it('should allow interleaving of patches and changes', () => {
// const actor = uuid()
// const [doc1, req1] = Frontend.change(Frontend.init(actor), doc => doc.number = 1)
// const [doc2, req2] = Frontend.change(doc1, doc => doc.number = 2)
// assert.deepStrictEqual(req1, {
// requestType: 'change', actor, seq: 1, time: req1.time, message: '', version: 0, ops: [
// {obj: ROOT_ID, action: 'set', key: 'number', insert: false, value: 1}
// ]
// })
// assert.deepStrictEqual(req2, {
// requestType: 'change', actor, seq: 2, time: req2.time, message: '', version: 0, ops: [
// {obj: ROOT_ID, action: 'set', key: 'number', insert: false, value: 2}
// ]
// })
// const state0 = Backend.init()
// const [state1, patch1] = Backend.applyLocalChange(state0, req1)
// const doc2a = Frontend.applyPatch(doc2, patch1)
// const [doc3, req3] = Frontend.change(doc2a, doc => doc.number = 3)
// assert.deepStrictEqual(req3, {
// requestType: 'change', actor, seq: 3, time: req3.time, message: '', version: 1, ops: [
// {obj: ROOT_ID, action: 'set', key: 'number', insert: false, value: 3}
// ]
// })
// })
// })
//
// describe('applying patches', () => {
// it('should set root object properties', () => {
// const actor = uuid()
// const patch = {
// version: 1, clock: {[actor]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {bird: {[actor]: {value: 'magpie'}}}}
// }
// const doc = Frontend.applyPatch(Frontend.init(), patch)
// assert.deepStrictEqual(doc, {bird: 'magpie'})
// })
//
// it('should reveal conflicts on root object properties', () => {
// const patch = {
// version: 1, clock: {actor1: 1, actor2: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {
// favoriteBird: {actor1: {value: 'robin'}, actor2: {value: 'wagtail'}}
// }}
// }
// const doc = Frontend.applyPatch(Frontend.init(), patch)
// assert.deepStrictEqual(doc, {favoriteBird: 'wagtail'})
// assert.deepStrictEqual(Frontend.getConflicts(doc, 'favoriteBird'), {actor1: 'robin', actor2: 'wagtail'})
// })
//
// it('should create nested maps', () => {
// const birds = uuid(), actor = uuid()
// const patch = {
// version: 1, clock: {[actor]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {birds: {[actor]: {
// objectId: birds, type: 'map', props: {wrens: {[actor]: {value: 3}}}
// }}}}
// }
// const doc = Frontend.applyPatch(Frontend.init(), patch)
// assert.deepStrictEqual(doc, {birds: {wrens: 3}})
// })
//
// it('should apply updates inside nested maps', () => {
// const birds = uuid(), actor = uuid()
// const patch1 = {
// version: 1, clock: {[actor]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {birds: {[actor]: {
// objectId: birds, type: 'map', props: {wrens: {[actor]: {value: 3}}}
// }}}}
// }
// const patch2 = {
// version: 2, clock: {[actor]: 2}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {birds: {[actor]: {
// objectId: birds, type: 'map', props: {sparrows: {[actor]: {value: 15}}}
// }}}}
// }
// const doc1 = Frontend.applyPatch(Frontend.init(), patch1)
// const doc2 = Frontend.applyPatch(doc1, patch2)
// assert.deepStrictEqual(doc1, {birds: {wrens: 3}})
// assert.deepStrictEqual(doc2, {birds: {wrens: 3, sparrows: 15}})
// })
//
// it('should apply updates inside map key conflicts', () => {
// const birds1 = uuid(), birds2 = uuid()
// const patch1 = {
// version: 1, clock: {[birds1]: 1, [birds2]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {favoriteBirds: {
// actor1: {objectId: birds1, type: 'map', props: {blackbirds: {actor1: {value: 1}}}},
// actor2: {objectId: birds2, type: 'map', props: {wrens: {actor2: {value: 3}}}}
// }}}
// }
// const patch2 = {
// version: 2, clock: {[birds1]: 2, [birds2]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {favoriteBirds: {
// actor1: {objectId: birds1, type: 'map', props: {blackbirds: {actor1: {value: 2}}}},
// actor2: {objectId: birds2, type: 'map'}
// }}}
// }
// const doc1 = Frontend.applyPatch(Frontend.init(), patch1)
// const doc2 = Frontend.applyPatch(doc1, patch2)
// assert.deepStrictEqual(doc1, {favoriteBirds: {wrens: 3}})
// assert.deepStrictEqual(doc2, {favoriteBirds: {wrens: 3}})
// assert.deepStrictEqual(Frontend.getConflicts(doc1, 'favoriteBirds'), {actor1: {blackbirds: 1}, actor2: {wrens: 3}})
// assert.deepStrictEqual(Frontend.getConflicts(doc2, 'favoriteBirds'), {actor1: {blackbirds: 2}, actor2: {wrens: 3}})
// })
//
// it('should structure-share unmodified objects', () => {
// const birds = uuid(), mammals = uuid(), actor = uuid()
// const patch1 = {
// version: 1, clock: {[actor]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {
// birds: {[actor]: {objectId: birds, type: 'map', props: {wrens: {[actor]: {value: 3}}}}},
// mammals: {[actor]: {objectId: mammals, type: 'map', props: {badgers: {[actor]: {value: 1}}}}}
// }}
// }
// const patch2 = {
// version: 2, clock: {[actor]: 2}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {
// birds: {[actor]: {objectId: birds, type: 'map', props: {sparrows: {[actor]: {value: 15}}}}}
// }}
// }
// const doc1 = Frontend.applyPatch(Frontend.init(), patch1)
// const doc2 = Frontend.applyPatch(doc1, patch2)
// assert.deepStrictEqual(doc1, {birds: {wrens: 3}, mammals: {badgers: 1}})
// assert.deepStrictEqual(doc2, {birds: {wrens: 3, sparrows: 15}, mammals: {badgers: 1}})
// assert.strictEqual(doc1.mammals, doc2.mammals)
// })
//
// it('should delete keys in maps', () => {
// const actor = uuid()
// const patch1 = {
// version: 1, clock: {[actor]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {
// magpies: {[actor]: {value: 2}}, sparrows: {[actor]: {value: 15}}
// }}
// }
// const patch2 = {
// version: 2, clock: {[actor]: 2}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {
// magpies: {}
// }}
// }
// const doc1 = Frontend.applyPatch(Frontend.init(), patch1)
// const doc2 = Frontend.applyPatch(doc1, patch2)
// assert.deepStrictEqual(doc1, {magpies: 2, sparrows: 15})
// assert.deepStrictEqual(doc2, {sparrows: 15})
// })
//
// it('should create lists', () => {
// const birds = uuid(), actor = uuid()
// const patch = {
// version: 1, clock: {[actor]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {birds: {[actor]: {
// objectId: birds, type: 'list',
// edits: [{action: 'insert', index: 0}],
// props: {0: {[actor]: {value: 'chaffinch'}}}
// }}}}
// }
// const doc = Frontend.applyPatch(Frontend.init(), patch)
// assert.deepStrictEqual(doc, {birds: ['chaffinch']})
// })
//
// it('should apply updates inside lists', () => {
// const birds = uuid(), actor = uuid()
// const patch1 = {
// version: 1, clock: {[actor]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {birds: {[actor]: {
// objectId: birds, type: 'list',
// edits: [{action: 'insert', index: 0}],
// props: {0: {[actor]: {value: 'chaffinch'}}}
// }}}}
// }
// const patch2 = {
// version: 2, clock: {[actor]: 2}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {birds: {[actor]: {
// objectId: birds, type: 'list', edits: [],
// props: {0: {[actor]: {value: 'greenfinch'}}}
// }}}}
// }
// const doc1 = Frontend.applyPatch(Frontend.init(), patch1)
// const doc2 = Frontend.applyPatch(doc1, patch2)
// assert.deepStrictEqual(doc1, {birds: ['chaffinch']})
// assert.deepStrictEqual(doc2, {birds: ['greenfinch']})
// })
//
// it('should apply updates inside list element conflicts', () => {
// const birds = uuid(), item1 = uuid(), item2 = uuid(), actor = uuid()
// const patch1 = {
// version: 1, clock: {[actor]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {birds: {[actor]: {
// objectId: birds, type: 'list',
// edits: [{action: 'insert', index: 0}],
// props: {0: {
// actor1: {objectId: item1, type: 'map', props: {species: {actor1: {value: 'woodpecker'}}, numSeen: {actor1: {value: 1}}}},
// actor2: {objectId: item2, type: 'map', props: {species: {actor2: {value: 'lapwing' }}, numSeen: {actor2: {value: 2}}}}
// }}
// }}}}
// }
// const patch2 = {
// version: 2, clock: {[actor]: 2}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {birds: {[actor]: {
// objectId: birds, type: 'list', edits: [],
// props: {0: {
// actor1: {objectId: item1, type: 'map', props: {numSeen: {actor1: {value: 2}}}},
// actor2: {objectId: item2, type: 'map'}
// }}
// }}}}
// }
// const doc1 = Frontend.applyPatch(Frontend.init(), patch1)
// const doc2 = Frontend.applyPatch(doc1, patch2)
// assert.deepStrictEqual(doc1, {birds: [{species: 'lapwing', numSeen: 2}]})
// assert.deepStrictEqual(doc2, {birds: [{species: 'lapwing', numSeen: 2}]})
// assert.strictEqual(doc1.birds[0], doc2.birds[0])
// assert.deepStrictEqual(Frontend.getConflicts(doc1.birds, 0), {
// actor1: {species: 'woodpecker', numSeen: 1},
// actor2: {species: 'lapwing', numSeen: 2}
// })
// assert.deepStrictEqual(Frontend.getConflicts(doc2.birds, 0), {
// actor1: {species: 'woodpecker', numSeen: 2},
// actor2: {species: 'lapwing', numSeen: 2}
// })
// })
//
// it('should delete list elements', () => {
// const birds = uuid(), actor = uuid()
// const patch1 = {
// version: 1, clock: {[actor]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {birds: {[actor]: {
// objectId: birds, type: 'list',
// edits: [{action: 'insert', index: 0}, {action: 'insert', index: 1}],
// props: {
// 0: {[actor]: {value: 'chaffinch'}},
// 1: {[actor]: {value: 'goldfinch'}}
// }
// }}}}
// }
// const patch2 = {
// version: 2, clock: {[actor]: 2}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {birds: {[actor]: {
// objectId: birds, type: 'list', props: {},
// edits: [{action: 'remove', index: 0}]
// }}}}
// }
// const doc1 = Frontend.applyPatch(Frontend.init(), patch1)
// const doc2 = Frontend.applyPatch(doc1, patch2)
// assert.deepStrictEqual(doc1, {birds: ['chaffinch', 'goldfinch']})
// assert.deepStrictEqual(doc2, {birds: ['goldfinch']})
// })
//
// it('should apply updates at different levels of the object tree', () => {
// const counts = uuid(), details = uuid(), detail1 = uuid(), actor = uuid()
// const patch1 = {
// version: 1, clock: {[actor]: 1}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {
// counts: {[actor]: {objectId: counts, type: 'map', props: {
// magpies: {[actor]: {value: 2}}
// }}},
// details: {[actor]: {objectId: details, type: 'list',
// edits: [{action: 'insert', index: 0}],
// props: {0: {[actor]: {objectId: detail1, type: 'map', props: {
// species: {[actor]: {value: 'magpie'}},
// family: {[actor]: {value: 'corvidae'}}
// }}}}
// }}
// }}
// }
// const patch2 = {
// version: 2, clock: {[actor]: 2}, canUndo: false, canRedo: false,
// diffs: {objectId: ROOT_ID, type: 'map', props: {
// counts: {[actor]: {objectId: counts, type: 'map', props: {
// magpies: {[actor]: {value: 3}}
// }}},
// details: {[actor]: {objectId: details, type: 'list', edits: [],
// props: {0: {[actor]: {objectId: detail1, type: 'map', props: {
// species: {[actor]: {value: 'Eurasian magpie'}}
// }}}}
// }}
// }}
// }
// const doc1 = Frontend.applyPatch(Frontend.init(), patch1)
// const doc2 = Frontend.applyPatch(doc1, patch2)
// assert.deepStrictEqual(doc1, {counts: {magpies: 2}, details: [{species: 'magpie', family: 'corvidae'}]})
// assert.deepStrictEqual(doc2, {counts: {magpies: 3}, details: [{species: 'Eurasian magpie', family: 'corvidae'}]})
// })
// })
//
// describe('undo and redo', () => {
// it('should allow undo in the frontend', () => {
// const doc0 = Frontend.init(), b0 = Backend.init(), actor = Frontend.getActorId(doc0)
// assert.strictEqual(Frontend.canUndo(doc0), false)
// const [doc1, req1] = Frontend.change(doc0, doc => doc.number = 1)
// const [b1, patch1] = Backend.applyLocalChange(b0, req1)
// const doc1a = Frontend.applyPatch(doc1, patch1)
// assert.strictEqual(Frontend.canUndo(doc1a), true)
// const [doc2, req2] = Frontend.undo(doc1a)
// assert.deepStrictEqual(req2, {actor, requestType: 'undo', seq: 2, time: req2.time, message: '', version: 1})
// const [b2, patch2] = Backend.applyLocalChange(b1, req2)
// const doc2a = Frontend.applyPatch(doc2, patch2)
// assert.deepStrictEqual(doc2a, {})
// })
//
// function apply(backend, change) {
// const [doc, req] = change
// const [newBackend, patch] = Backend.applyLocalChange(backend, req)
// return [newBackend, Frontend.applyPatch(doc, patch)]
// }
//
// it('should perform multiple undos and redos', () => {
// const doc0 = Frontend.init(), b0 = Backend.init()
// const [b1, doc1] = apply(b0, Frontend.change(doc0, doc => doc.number = 1))
// const [b2, doc2] = apply(b1, Frontend.change(doc1, doc => doc.number = 2))
// const [b3, doc3] = apply(b2, Frontend.change(doc2, doc => doc.number = 3))
// const [b4, doc4] = apply(b3, Frontend.undo(doc3))
// const [b5, doc5] = apply(b4, Frontend.undo(doc4))
// const [b6, doc6] = apply(b5, Frontend.redo(doc5))
// const [b7, doc7] = apply(b6, Frontend.redo(doc6))
// assert.deepStrictEqual(doc1, {number: 1})
// assert.deepStrictEqual(doc2, {number: 2})
// assert.deepStrictEqual(doc3, {number: 3})
// assert.deepStrictEqual(doc4, {number: 2})
// assert.deepStrictEqual(doc5, {number: 1})
// assert.deepStrictEqual(doc6, {number: 2})
// assert.deepStrictEqual(doc7, {number: 3})
// })
// })
// })
}
| 48.849937 | 141 | 0.530487 |
746db1d373e0d666281b7a7f8f97064ac81d8d09 | 7,121 | html | HTML | support/templates/contact_list.html | cumanachao/utopia-crm | 6d648971c427ca9f380b15ed0ceaf5767b88e8b9 | [
"BSD-3-Clause"
] | 13 | 2020-12-14T19:56:04.000Z | 2021-11-06T13:24:48.000Z | support/templates/contact_list.html | cumanachao/utopia-crm | 6d648971c427ca9f380b15ed0ceaf5767b88e8b9 | [
"BSD-3-Clause"
] | 5 | 2020-12-14T19:56:30.000Z | 2021-09-22T22:09:39.000Z | support/templates/contact_list.html | cumanachao/utopia-crm | 6d648971c427ca9f380b15ed0ceaf5767b88e8b9 | [
"BSD-3-Clause"
] | 3 | 2021-03-24T03:55:08.000Z | 2022-01-13T15:22:34.000Z | {% extends 'adminlte/base.html' %}
{% load static i18n widget_tweaks core_tags %}
{% block stylesheets %}
{{block.super}}
<link rel="stylesheet" href="{% static '/admin-lte/plugins/datatables-bs4/css/dataTables.bootstrap4.min.css' %}" />
{% endblock %}
{% block extra_js %}
<script type="text/javascript" src="{% static '/admin-lte/plugins/datatables/jquery.dataTables.min.js' %}"></script>
<script src="{% static '/admin-lte/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js' %}"></script>
<script>
$(function() {
$("#table1").DataTable({
"paging": false,
"info": false
});
});
</script>
{% endblock %}
{% block title %}
{% trans "Contacts" %}
{% endblock title %}
{% block no_heading %}
<h1>{% trans 'Contacts' %}</h1>
<p>{% trans 'Manage all contacts in the database.' %}</p>
{% endblock %}
{% block content %}
<div class="row">
<div class="col-md-12">
<div class="card card-outline card-primary">
<div class="card-header">
<h3 class="card-title">{% trans 'Search' %}</h3>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-card-widget="collapse"><i class="fas fa-minus"></i>
</button>
</div>
</div>
<div class="card-body">
<form method="GET" id="form">
<div class="row">
<div class="form-group row col">
<label for="phone" class="col-sm-3 col-form-label">{% trans 'Filter' %}</label>
<div class="col-sm-9">
{% render_field filter.form.filter_multiple class="form-control" %}
</div>
</div>
<div class="form-group row col">
<label for="state" class="col-sm-3 col-form-label">{% trans 'State' %}</label>
<div class="col-sm-9">
{% render_field filter.form.state class="form-control" %}
</div>
</div>
<div class="form-group row col">
<label for="active_subscriptions" class="col-sm-3 col-form-label">{% trans 'Active subscriptions' %}</label>
<div class="col-sm-9">
{% render_field filter.form.active_subscriptions class="form-control" %}
</div>
</div>
</div>
<div class="row">
<div class="form-group row col">
<label for="tags" class="col-sm-3 col-form-label">{% trans 'Tags' %}</label>
<div class="col-sm-9">
{% render_field filter.form.tags class="form-control" %}
</div>
</div>
<div class="form-group col-sm-1">
<input type="submit" class="btn bg-gradient-primary" value="{% trans 'Search' %}" />
</div>
</div>
{% if request.user|in_group:"Managers" %}
<div class="row">
<div class="form-group col-4">
<input type="submit" class="btn bg-gradient-primary" name="export" value="{% trans 'Export to CSV' %}" />
{{count}} {% trans "contacts" %}
</div>
</div>
{% endif %}
</form>
</div>
</div>
</div>
<div class="col-md-12">
<div class="text-right mt-4 mb-3">
<a href="#" class="btn btn-primary"><i class="fas fa-plus-circle"></i> {% trans "Create new contact" %}</a>
</div>
<div class="card">
<div class="card-body">
<h3>{% trans "All contacts" %}</h3>
<table id="table1" class="table table-bordered table-striped">
<thead>
<tr role="row">
<th>{% trans "Id" %}</th>
<th>{% trans "Full name" %}</th>
<th>{% trans "Email" %}</th>
<th>{% trans "Phone" %}</th>
<th>{% trans "Subscription" %}</th>
<th>{% trans "Last activity" %}</th>
</tr>
</thead>
<tbody>
{% for contact in contacts %}
<tr role="row">
<td><a href='{% url "contact_detail" contact.id %}'>{{contact.id}}</a></td>
<td>{{contact.name}}</td>
<td>{{contact.email|default_if_none:""}}</td>
<td>{{contact.phone}}</td>
<td>
{% for sp in contact.get_active_subscriptionproducts %}
{% if sp.has_envelope == 1 %}
<i class="fas fa-envelope" title="{% trans 'Paid envelope' %}" data-toggle="tooltip"></i>
{% elif sp.has_envelope == 2 %}
<i class="far fa-envelope" title="{% trans 'Free envelope' %}" data-toggle="tooltip"></i>
{% endif %} {{sp.product.name}} {% if sp.label_contact %}({{sp.label_contact.name}}){% endif %}<br>
{% endfor %}
</td>
<td>{{contact.last_activity.datetime|date:"SHORT_DATE_FORMAT"}} {% if contact.last_activity.activity_type %}/ {{contact.last_activity.get_type}}{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
{% if contacts.has_other_pages %}
{% load proper_paginate %}
{% load url_replace %}
<ul class="pagination">
{% if contacts.number == 1 %}
<li class="page-item disabled"><span class="page-link">{% trans "first" %}</span></li>
{% else %}
<li><a class="page-link" href="?{% url_replace request 'p' 1 %}">{% trans "first" %}</a></li>
{% endif %}
{% if contacts.has_previous %}
<li><a class="page-link" href="?{% url_replace request 'p' contacts.previous_page_number %}">«</a></li>
{% else %}
<li class="page-item disabled"><span class="page-link">«</span></li>
{% endif %}
{% for i in paginator|proper_paginate:contacts.number %}
{% if contacts.number == i %}
<li class="page-item active"><span class="page-link">{{ i }} <span class="sr-only">(current)</span></span></li>
{% else %}
<li><a class="page-link" href="?{% url_replace request 'p' i %}">{{ i }}</a></li>
{% endif %}
{% endfor %}
{% if contacts.has_next %}
<li><a class="page-link" href="?{% url_replace request 'p' contacts.next_page_number %}">»</a></li>
{% else %}
<li class="page-item disabled"><span class="page-link">»</span></li>
{% endif %}
{% if contacts.number == paginator.num_pages %}
<li class="page-item disabled"><span class="page-link">{% trans "last" %}</span></li>
{% else %}
<li><a class="page-link" href="?{% url_replace request 'p' paginator.num_pages %}">{% trans "last" %}</a></li>
{% endif %}
</ul>
{% endif %}
{% endblock %}
| 42.89759 | 180 | 0.482938 |
9503c1e2f88cdafd5c2ff68e3ef90997fc7e0dcc | 58 | sql | SQL | tests/queries/168-double-is-not-99-2.sql | pydemo/spv_14.4 | ad3b62d6bdbbfc29e56391f512ba0ee17dad4eb7 | [
"Apache-2.0"
] | null | null | null | tests/queries/168-double-is-not-99-2.sql | pydemo/spv_14.4 | ad3b62d6bdbbfc29e56391f512ba0ee17dad4eb7 | [
"Apache-2.0"
] | null | null | null | tests/queries/168-double-is-not-99-2.sql | pydemo/spv_14.4 | ad3b62d6bdbbfc29e56391f512ba0ee17dad4eb7 | [
"Apache-2.0"
] | null | null | null | select count(*) from nulls2 where double_6 is not 99.0
98
| 19.333333 | 54 | 0.758621 |
738510844ea2005291d7c3cd6a236fa85745f395 | 530 | swift | Swift | XCode/SwifterSampleOSX/main.swift | moxionio/swifter | f593bf35534f785b33ab80626cc78e2efeb869cc | [
"BSD-3-Clause"
] | null | null | null | XCode/SwifterSampleOSX/main.swift | moxionio/swifter | f593bf35534f785b33ab80626cc78e2efeb869cc | [
"BSD-3-Clause"
] | 1 | 2017-11-26T22:09:11.000Z | 2017-11-26T22:09:11.000Z | XCode/SwifterSampleOSX/main.swift | moxionio/swifter | f593bf35534f785b33ab80626cc78e2efeb869cc | [
"BSD-3-Clause"
] | 2 | 2017-11-24T15:43:30.000Z | 2018-10-02T01:48:23.000Z | //
// main.swift
// SwifterOSX
// Copyright (c) 2015 Damian Kołakowski. All rights reserved.
//
import Foundation
import Swifter
do {
let server = demoServer(try File.currentWorkingDirectory())
server["/testAfterBaseRoute"] = { request in
return .OK(.Html("ok !"))
}
try server.start(9080, forceIPv4: true)
print("Server has started ( port = \(try server.port()) ). Try to connect now...")
NSRunLoop.mainRunLoop().run()
} catch {
print("Server start error: \(error)")
} | 22.083333 | 86 | 0.624528 |
b4375a89b92eca325b3fd2b3e819ab89ce3ff219 | 4,121 | lua | Lua | lua/sqlite/strfun.lua | muniter/sql.nvim | 468d6d4dc08429efc7eedcf4ef0f38b4bc89e138 | [
"MIT"
] | 137 | 2021-09-01T18:49:58.000Z | 2022-03-30T04:55:09.000Z | lua/sqlite/strfun.lua | muniter/sql.nvim | 468d6d4dc08429efc7eedcf4ef0f38b4bc89e138 | [
"MIT"
] | 63 | 2021-01-08T19:45:53.000Z | 2021-08-28T02:37:56.000Z | lua/sqlite/strfun.lua | muniter/sql.nvim | 468d6d4dc08429efc7eedcf4ef0f38b4bc89e138 | [
"MIT"
] | 7 | 2021-09-02T13:46:03.000Z | 2022-02-19T18:13:11.000Z | local M = {}
local u = require "sqlite.utils"
local customstr
customstr = function(str)
local mt = getmetatable(str)
local wrap = function(_a, _b, sign)
local _str = ("%s %s %s"):format(_a, sign, _b)
if u.is_str(_b) and _b:match "^%a+%(.+%)$" then
_str = "(" .. _str .. ")"
end
return _str
end
mt.__add = function(_a, _b)
return wrap(_a, _b, "+")
end
mt.__sub = function(_a, _b)
return wrap(_a, _b, "-")
end
mt.__mul = function(_a, _b)
return wrap(_a, _b, "*")
end
mt.__div = function(_a, _b)
return wrap(_a, _b, "/")
end
mt.__pow = function(_a, _b)
return wrap(_a, _b, "^")
end
mt.__mod = function(_a, _b)
return wrap(_a, _b, "%")
end
return str
end
local ts = function(ts)
local str
if ts ~= "now" and (type(ts) == "string" and not ts:match "%d") then
str = "%s"
else
str = "'%s'"
end
return str:format(ts or "now")
end
---Format date according {format}
---@param format string the format
--- %d day of month: 00
--- %f fractional seconds: SS.SSS
--- %H hour: 00-24
--- %j day of year: 001-366
--- %J Julian day number
--- %m month: 01-12
--- %M minute: 00-59
--- %s seconds since 1970-01-01
--- %S seconds: 00-59
--- %w day of week 0-6 with Sunday==0
--- %W week of year: 00-53
--- %Y year: 0000-9999
--- %% %
---@param timestring string timestamp to format 'deafult now'
---@return string: string representation or TEXT when evaluated.
---@usage `sqlstrftime('%Y %m %d','now')` -> 2021 8 11
---@usage `sqlstrftime('%H %M %S %s','now')` -> 12 40 18 1414759218
---@usage `sqlstrftime('%s','now') - strftime('%s','2014-10-07 02:34:56')` -> 2110042
M.strftime = function(format, timestring)
local str = [[strftime('%s', %s)]]
return customstr(str:format(format, ts(timestring)))
end
---Return the number of days since noon in Greenwich on November 24, 4714 B.C.
---@param timestring string timestamp to format 'deafult now'
---@return string: string representation or REAL when evaluated.
---@usage `sqljulianday('now')` -> ...
---@usage `sqljulianday('now') - julianday('1947-08-15')` -> 24549.5019360879
M.julianday = function(timestring)
local str = "julianday(%s)"
return customstr(str:format(ts(timestring)))
end
---Returns date as "YYYY-MM-DD HH:MM:SS"
---@param timestring string timestamp to format 'deafult now'
---@return string: string representation or "YYYY-MM-DD HH:MM:SS"
---@usage `sqldatetime('now')` -> 2021-8-11 11:31:52
M.datetime = function(timestring)
local str = [[datetime('%s')]]
return customstr(str:format(timestring or "now"))
end
---Returns time as HH:MM:SS.
---@param timestring string timestamp to format 'deafult now'
---@param modifier string: e.g. +60 seconds, +15 minutes
---@return string: string representation or "HH:MM:SS"
---@usage `sqltime()` -> "12:50:01"
---@usage `sqltime('2014-10-07 15:45:57.005678')` -> 15:45:57
---@usage `sqltime('now','+60 seconds')` 15:45:57 + 60 seconds
M.time = function(timestring, modifier)
local str = [[time('%s')]]
if modifier then
str = [[time('%s', '%s')]]
return customstr(str:format(timestring or "now", modifier))
end
return customstr(str:format(timestring or "now"))
end
---Returns date as YYYY-MM-DD
---@param timestring string timestamp to format 'deafult now'
---@param modifier string: e.g. +2 month, +1 year
---@return string: string representation or "HH:MM:SS"
---@usage `sqldate()` -> 2021-08-31
---@usage `sqldate('2021-08-07')` -> 2021-08-07
---@usage `sqldate('now','+2 month')` -> 2021-10-07
M.date = function(timestring, modifier)
local str = [[date('%s')]]
if modifier then
str = [[date('%s', '%s')]]
return customstr(str:format(timestring or "now", modifier))
end
return customstr(str:format(timestring or "now"))
end
---Cast a value as something
---@param source string: the value.
---@param as string: the type.
---@usage `cast((julianday() - julianday "timestamp") * 24 * 60, "integer")`
---@return string
M.cast = function(source, as)
return string.format("cast(%s as %s)", source, as)
end
return M
| 30.301471 | 85 | 0.628246 |
9decf0da3c01fe1aa0bdcdb786388f9ac1d4fe1a | 4,842 | asm | Assembly | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48.log_21829_2262.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 9 | 2020-08-13T19:41:58.000Z | 2022-03-30T12:22:51.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48.log_21829_2262.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 1 | 2021-04-29T06:29:35.000Z | 2021-05-13T21:02:30.000Z | Transynther/x86/_processed/NONE/_xt_sm_/i7-7700_9_0x48.log_21829_2262.asm | ljhsiun2/medusa | 67d769b8a2fb42c538f10287abaf0e6dbb463f0c | [
"MIT"
] | 3 | 2020-07-14T17:07:07.000Z | 2022-03-21T01:12:22.000Z | .global s_prepare_buffers
s_prepare_buffers:
push %rax
push %rbp
push %rbx
push %rcx
push %rdx
push %rsi
lea addresses_WC_ht+0x1788a, %rax
add $57917, %rdx
vmovups (%rax), %ymm3
vextracti128 $1, %ymm3, %xmm3
vpextrq $0, %xmm3, %rbp
nop
nop
nop
xor $33965, %rsi
lea addresses_WC_ht+0x16d18, %rcx
nop
nop
nop
and %rbx, %rbx
mov (%rcx), %eax
nop
nop
nop
and $19777, %rax
pop %rsi
pop %rdx
pop %rcx
pop %rbx
pop %rbp
pop %rax
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r13
push %r15
push %r8
push %rcx
push %rdx
push %rsi
// Store
lea addresses_D+0x1124a, %r8
nop
nop
nop
nop
and $20470, %r10
movl $0x51525354, (%r8)
nop
nop
and %r15, %r15
// Store
lea addresses_PSE+0xadd6, %rcx
nop
cmp %rdx, %rdx
movw $0x5152, (%rcx)
// Exception!!!
nop
nop
mov (0), %r10
nop
nop
nop
nop
nop
sub %rcx, %rcx
// Faulty Load
lea addresses_D+0x1124a, %rsi
add $25091, %rdx
mov (%rsi), %r15w
lea oracles, %r8
and $0xff, %r15
shlq $12, %r15
mov (%r8,%r15,1), %r15
pop %rsi
pop %rdx
pop %rcx
pop %r8
pop %r15
pop %r13
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': True, 'NT': True}}
{'OP': 'STOR', 'dst': {'type': 'addresses_PSE', 'AVXalign': False, 'congruent': 1, 'size': 2, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_D', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 5, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': True, 'congruent': 1, 'size': 4, 'same': False, 'NT': False}}
{'54': 21829}
54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54 54
*/
| 45.679245 | 2,999 | 0.65634 |
76dca69f5baa4ed72ef542c122adaeb095921da4 | 1,684 | h | C | EWASimpleCoreDataManager/EWASimpleCoreDataManager.h | mattblair/EWASimpleCoreDataManager | 2c96eb60bf8e4d3c59010116e70060ae9fca942e | [
"MIT"
] | null | null | null | EWASimpleCoreDataManager/EWASimpleCoreDataManager.h | mattblair/EWASimpleCoreDataManager | 2c96eb60bf8e4d3c59010116e70060ae9fca942e | [
"MIT"
] | null | null | null | EWASimpleCoreDataManager/EWASimpleCoreDataManager.h | mattblair/EWASimpleCoreDataManager | 2c96eb60bf8e4d3c59010116e70060ae9fca942e | [
"MIT"
] | null | null | null | //
// EWASimpleCoreDataManager.h
//
// Created by Matt Blair on 1/10/14.
// Copyright (c) 2014 Elsewise LLC. MIT License.
//
// Add this into a project that didn't use the Core Data templates, or delete
// all the boilerplate in the app delegate
// inspired by: https://gist.github.com/922496
// via: http://nachbaur.com/blog/smarter-core-data
// NOTE: This is primarily intended for reading at this point, and does not yet
// implement parent/child MOCs.
// TIPS:
// * have app state notifications call save
// *
// TODO: implement parent/child MOCs
// TODO: implement workingMOC to always return a background thread
extern NSString * const EWASimpleCoreDataManagerDidSaveNotification;
extern NSString * const EWASimpleCoreDataManagerDidSaveFailedNotification;
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface EWASimpleCoreDataManager : NSObject
+ (instancetype)sharedInstance;
// looks for the database, and copies from bundle if needed
- (BOOL)confirmDatabaseInstalled;
// save any changes on the mainThreadMOC
// workingMOC's should handle their own saves
- (BOOL)save;
// for UIKit-related use
- (NSManagedObjectContext *)mainThreadMOC;
// May not be on the main thread. Use for background work.
- (NSManagedObjectContext *)workingMOC;
// Data Import Utilities
// a reusable date formatter for importing from JSON with ISO8601 date strings
- (NSDateFormatter *)iso8601DateFormatter;
// load JSON from the bundle
- (NSArray *)arrayFromJSONFileNamed:(NSString *)jsonFilename;
- (NSArray *)extractFeaturesFromGeoJSONFeatureCollection:(NSDictionary *)collection;
- (NSDictionary *)flattenedGeoJSONFeature:(NSDictionary *)feature;
@end
| 28.066667 | 84 | 0.768409 |
2f05e79673d2c9c4d7eb0aa7065a27f1f5083e74 | 7,733 | java | Java | examples/callback-api-group-bot/src/main/java/com/vk/api/examples/group/bot/CallbackApiLongPollHandler.java | KokorinIlya/vk-java-sdk | 8d21f9b32b46db09defa9b9dd2647cd18a5116e7 | [
"MIT"
] | 1 | 2021-04-02T10:11:35.000Z | 2021-04-02T10:11:35.000Z | examples/callback-api-group-bot/src/main/java/com/vk/api/examples/group/bot/CallbackApiLongPollHandler.java | KokorinIlya/vk-java-sdk | 8d21f9b32b46db09defa9b9dd2647cd18a5116e7 | [
"MIT"
] | null | null | null | examples/callback-api-group-bot/src/main/java/com/vk/api/examples/group/bot/CallbackApiLongPollHandler.java | KokorinIlya/vk-java-sdk | 8d21f9b32b46db09defa9b9dd2647cd18a5116e7 | [
"MIT"
] | 1 | 2018-10-01T09:43:32.000Z | 2018-10-01T09:43:32.000Z | package com.vk.api.examples.group.bot;
import com.vk.api.sdk.callback.longpoll.CallbackApiLongPoll;
import com.vk.api.sdk.callback.objects.board.CallbackBoardPostDelete;
import com.vk.api.sdk.callback.objects.group.CallbackGroupChangePhoto;
import com.vk.api.sdk.callback.objects.group.CallbackGroupChangeSettings;
import com.vk.api.sdk.callback.objects.group.CallbackGroupJoin;
import com.vk.api.sdk.callback.objects.group.CallbackGroupLeave;
import com.vk.api.sdk.callback.objects.group.CallbackGroupOfficersEdit;
import com.vk.api.sdk.callback.objects.market.CallbackMarketComment;
import com.vk.api.sdk.callback.objects.market.CallbackMarketCommentDelete;
import com.vk.api.sdk.callback.objects.messages.CallbackMessageAllow;
import com.vk.api.sdk.callback.objects.messages.CallbackMessageDeny;
import com.vk.api.sdk.callback.objects.photo.CallbackPhotoComment;
import com.vk.api.sdk.callback.objects.photo.CallbackPhotoCommentDelete;
import com.vk.api.sdk.callback.objects.poll.CallbackPollVoteNew;
import com.vk.api.sdk.callback.objects.user.CallbackUserBlock;
import com.vk.api.sdk.callback.objects.user.CallbackUserUnblock;
import com.vk.api.sdk.callback.objects.video.CallbackVideoComment;
import com.vk.api.sdk.callback.objects.video.CallbackVideoCommentDelete;
import com.vk.api.sdk.callback.objects.wall.CallbackWallComment;
import com.vk.api.sdk.callback.objects.wall.CallbackWallCommentDelete;
import com.vk.api.sdk.client.VkApiClient;
import com.vk.api.sdk.client.actors.GroupActor;
import com.vk.api.sdk.client.actors.UserActor;
import com.vk.api.sdk.objects.audio.Audio;
import com.vk.api.sdk.objects.board.TopicComment;
import com.vk.api.sdk.objects.messages.Message;
import com.vk.api.sdk.objects.photos.Photo;
import com.vk.api.sdk.objects.video.Video;
import com.vk.api.sdk.objects.wall.WallPost;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class CallbackApiLongPollHandler extends CallbackApiLongPoll {
private static final Logger LOG = LoggerFactory.getLogger(CallbackApiLongPollHandler.class);
public CallbackApiLongPollHandler(VkApiClient client, UserActor actor, Integer groupId) {
super(client, actor, groupId);
}
public CallbackApiLongPollHandler(VkApiClient client, GroupActor actor) {
super(client, actor);
}
public void messageNew(Integer groupId, Message message) {
LOG.info("messageNew: " + message.toString());
}
public void messageReply(Integer groupId, Message message) {
LOG.info("messageReply: " + message.toString());
}
public void messageEdit(Integer groupId, Message message) {
LOG.info("messageReply: " + message.toString());
}
public void messageAllow(Integer groupId, CallbackMessageAllow message) {
LOG.info("messageAllow: " + message.toString());
}
public void messageDeny(Integer groupId, CallbackMessageDeny message) {
LOG.info("messageDeny: " + message.toString());
}
public void photoNew(Integer groupId, Photo message) {
LOG.info("photoNew: " + message.toString());
}
public void photoCommentNew(Integer groupId, CallbackPhotoComment message) {
LOG.info("photoCommentNew: " + message.toString());
}
public void photoCommentEdit(Integer groupId, CallbackPhotoComment message) {
LOG.info("photoCommentEdit: " + message.toString());
}
public void photoCommentRestore(Integer groupId, CallbackPhotoComment message) {
LOG.info("photoCommentRestore: " + message.toString());
}
public void photoCommentDelete(Integer groupId, CallbackPhotoCommentDelete message) {
LOG.info("photoCommentDelete: " + message.toString());
}
public void audioNew(Integer groupId, Audio message) {
LOG.info("audioNew: " + message.toString());
}
public void videoNew(Integer groupId, Video message) {
LOG.info("videoNew: " + message.toString());
}
public void videoCommentNew(Integer groupId, CallbackVideoComment message) {
LOG.info("videoCommentNew: " + message.toString());
}
public void videoCommentEdit(Integer groupId, CallbackVideoComment message) {
LOG.info("videoCommentEdit: " + message.toString());
}
public void videoCommentRestore(Integer groupId, CallbackVideoComment message) {
LOG.info("videoCommentRestore: " + message.toString());
}
public void videoCommentDelete(Integer groupId, CallbackVideoCommentDelete message) {
LOG.info("videoCommentDelete: " + message.toString());
}
public void wallPostNew(Integer groupId, WallPost message) {
LOG.info("wallPostNew: " + message.toString());
}
public void wallRepost(Integer groupId, WallPost message) {
LOG.info("wallRepost: " + message.toString());
}
public void wallReplyNew(Integer groupId, CallbackWallComment message) {
LOG.info("wallReplyNew: " + message.toString());
}
public void wallReplyEdit(Integer groupId, CallbackWallComment message) {
LOG.info("wallReplyEdit: " + message.toString());
}
public void wallReplyRestore(Integer groupId, CallbackWallComment message) {
LOG.info("wallReplyRestore: " + message.toString());
}
public void wallReplyDelete(Integer groupId, CallbackWallCommentDelete message) {
LOG.info("wallReplyDelete: " + message.toString());
}
public void boardPostNew(Integer groupId, TopicComment message) {
LOG.info("boardPostNew: " + message.toString());
}
public void boardPostEdit(Integer groupId, TopicComment message) {
LOG.info("boardPostEdit: " + message.toString());
}
public void boardPostRestore(Integer groupId, TopicComment message) {
LOG.info("boardPostRestore: " + message.toString());
}
public void boardPostDelete(Integer groupId, CallbackBoardPostDelete message) {
LOG.info("boardPostDelete: " + message.toString());
}
public void marketCommentNew(Integer groupId, CallbackMarketComment message) {
LOG.info("marketCommentNew: " + message.toString());
}
public void marketCommentEdit(Integer groupId, CallbackMarketComment message) {
LOG.info("marketCommentEdit: " + message.toString());
}
public void marketCommentRestore(Integer groupId, CallbackMarketComment message) {
LOG.info("marketCommentRestore: " + message.toString());
}
public void marketCommentDelete(Integer groupId, CallbackMarketCommentDelete message) {
LOG.info("marketCommentDelete: " + message.toString());
}
public void groupLeave(Integer groupId, CallbackGroupLeave message) {
LOG.info("groupLeave: " + message.toString());
}
public void groupJoin(Integer groupId, CallbackGroupJoin message) {
LOG.info("groupJoin: " + message.toString());
}
public void groupChangeSettings(Integer groupId, CallbackGroupChangeSettings message) {
LOG.info("groupChangeSettings: " + message.toString());
}
public void groupChangePhoto(Integer groupId, CallbackGroupChangePhoto message) {
LOG.info("groupChangePhoto: " + message.toString());
}
public void groupOfficersEdit(Integer groupId, CallbackGroupOfficersEdit message) {
LOG.info("groupOfficersEdit: " + message.toString());
}
public void pollVoteNew(Integer groupId, CallbackPollVoteNew message) {
LOG.info("pollVoteNew: " + message.toString());
}
public void userBlock(Integer groupId, CallbackUserBlock message) {
LOG.info("userBlock: " + message.toString());
}
public void userUnblock(Integer groupId, CallbackUserUnblock message) {
LOG.info("userUnblock: " + message.toString());
}
}
| 38.859296 | 96 | 0.727014 |
849cd58fc506dbdc05da3e242f1ffa655ee1a8b7 | 1,535 | lua | Lua | src/mod/plot/api/Plot.lua | Ruin0x11/OpenNefia | 548f1a1442eca704bb1c16b1a1591d982a34919f | [
"MIT"
] | 109 | 2020-04-07T16:56:38.000Z | 2022-02-17T04:05:40.000Z | src/mod/plot/api/Plot.lua | Ruin0x11/OpenNefia | 548f1a1442eca704bb1c16b1a1591d982a34919f | [
"MIT"
] | 243 | 2020-04-07T08:25:15.000Z | 2021-10-30T07:22:10.000Z | src/mod/plot/api/Plot.lua | Ruin0x11/OpenNefia | 548f1a1442eca704bb1c16b1a1591d982a34919f | [
"MIT"
] | 15 | 2020-04-25T12:28:55.000Z | 2022-02-23T03:20:43.000Z | local Plot = {}
function Plot.make_datasets_dwim(...)
local x = select(1, ...)
if type(x) ~= "table" then
return {}
end
if type(x[1]) == "table" and x[1].x and x[1].y then
return x
end
local datasets = {}
local max = select("#", ...)
local i = 1
print(max)
while i < max do
local x = select(i, ...)
local y = select(i+1, ...)
local opts = select(i+2, ...)
local xlen = 100
local stop = false
if tostring(x) == "<generator>" then
x = x:take(xlen):to_list()
xlen = #x
print(i, max)
if i == max - 2 then
-- don't look at luafun iterator state/index
stop = true
end
end
if tostring(y) == "<generator>" then
y = y:take(xlen):to_list()
print(i, max)
if i == max - 3 then
-- don't look at luafun iterator state/index
stop = true
end
elseif type(y) == "function" then
y = fun.range(xlen):map(y):to_list()
end
if x and y then
datasets[#datasets+1] = { x = x, y = y }
elseif x and not y then
datasets[#datasets+1] = { x = fun.range(#x):to_list(), y = x }
end
if stop then
break
end
i = i + 3
end
return datasets
end
function Plot.dataset_to_csv(dataset)
local csv = { "x,y\n" }
for i = 1, #dataset.x do
csv[#csv+1] = ("%s,%s\n"):format(dataset.x[i], dataset.y[i])
end
return table.concat(csv)
end
return Plot
| 22.573529 | 71 | 0.500326 |
61c2ab600581c87bcd78aafaa6343d15a2d15c83 | 75 | lua | Lua | conf.lua | mahmoodtahir459/potential-Zombie-Shooter | 11dea91420044b71c2c745028d71520e171ec6a7 | [
"Apache-2.0"
] | 1 | 2021-06-25T02:24:37.000Z | 2021-06-25T02:24:37.000Z | conf.lua | mahmoodtahir459/potential-Zombie-Shooter | 11dea91420044b71c2c745028d71520e171ec6a7 | [
"Apache-2.0"
] | null | null | null | conf.lua | mahmoodtahir459/potential-Zombie-Shooter | 11dea91420044b71c2c745028d71520e171ec6a7 | [
"Apache-2.0"
] | null | null | null | --To allow Printing to Terminal
function love.conf(t)
t.console = true
end | 18.75 | 31 | 0.76 |
0cfee6bc3bf186335b76d2acf497c3df8a8ea5a2 | 1,083 | sql | SQL | plugins/content_client/sql/content_client_install.sql | PapooSoftware/PapooCMS | 0f1c30be2a6ac825cad6dad348a957452e545a8d | [
"MIT"
] | 2 | 2021-04-22T14:03:19.000Z | 2021-04-29T12:12:46.000Z | plugins/content_client/sql/content_client_install.sql | PapooSoftware/PapooCMS | 0f1c30be2a6ac825cad6dad348a957452e545a8d | [
"MIT"
] | 4 | 2021-05-20T12:46:21.000Z | 2021-11-26T16:22:13.000Z | plugins/content_client/sql/content_client_install.sql | PapooSoftware/PapooCMS | 0f1c30be2a6ac825cad6dad348a957452e545a8d | [
"MIT"
] | null | null | null | DROP TABLE IF EXISTS `XXX_plugin_cotent_client`; ##b_dump##
CREATE TABLE `XXX_plugin_cotent_client` (
`plugin_cotent_client_id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_cotent_client_url_der_zentrale` text,
`plugin_cotent_client_token_key_kommt_aus_der_zentrale` text,
`plugin_cotent_client_domain_key` text,
PRIMARY KEY (`plugin_cotent_client_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 ; ##b_dump##
INSERT INTO `XXX_plugin_cotent_client` SET plugin_cotent_client_id='1', plugin_cotent_client_url_der_zentrale='http://localhost/papoo_trunk/plugins/zentrale_inhalte/show_content.php', plugin_cotent_client_token_key_kommt_aus_der_zentrale='fdgw455etzhe5hwreznjw352z6wzrjezrhbw54zh', plugin_cotent_client_domain_key='f46f8fa4c74cab411cdf96c3cf99c9317e5735ed' ; ##b_dump##
DROP TABLE IF EXISTS `XXX_plugin_cotent_client_lookup`; ##b_dump##
CREATE TABLE `XXX_plugin_cotent_client_lookup` (
`lookup_id` int(11) NOT NULL,
`lookup_tab_name` varchar(255) NOT NULL,
`lookup_feld_serial` longtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ; ##b_dump##
| 67.6875 | 370 | 0.831025 |
3408831a3b7598b36dc3f6c298285d89de50cedc | 135 | sql | SQL | src/test/resources/sql/create_text_search/0b41e680.sql | Shuttl-Tech/antlr_psql | fcf83192300abe723f3fd3709aff5b0c8118ad12 | [
"MIT"
] | 66 | 2018-06-15T11:34:03.000Z | 2022-03-16T09:24:49.000Z | src/test/resources/sql/create_text_search/0b41e680.sql | Shuttl-Tech/antlr_psql | fcf83192300abe723f3fd3709aff5b0c8118ad12 | [
"MIT"
] | 13 | 2019-03-19T11:56:28.000Z | 2020-08-05T04:20:50.000Z | src/test/resources/sql/create_text_search/0b41e680.sql | Shuttl-Tech/antlr_psql | fcf83192300abe723f3fd3709aff5b0c8118ad12 | [
"MIT"
] | 28 | 2019-01-05T19:59:02.000Z | 2022-03-24T11:55:50.000Z | -- file:tsdicts.sql ln:100 expect:true
CREATE TEXT SEARCH DICTIONARY synonym (
Template=synonym,
Synonyms=synonym_sample
)
| 22.5 | 39 | 0.733333 |
85be8c1f6e19608f62b75bbe121fcca1c9789804 | 2,738 | h | C | shared/deps/luaplus/IScriptOperation.h | zyb2013/shiny-engine | 4d615975e778522499c1699929867c711456c23a | [
"MIT"
] | 17 | 2018-04-24T03:47:19.000Z | 2022-02-25T15:41:10.000Z | shared/deps/luaplus/IScriptOperation.h | ericyonng/shiny-engine | 96a8eb0fae36471570ae0fc61741bbc8c26c7139 | [
"MIT"
] | null | null | null | shared/deps/luaplus/IScriptOperation.h | ericyonng/shiny-engine | 96a8eb0fae36471570ae0fc61741bbc8c26c7139 | [
"MIT"
] | 7 | 2018-09-10T12:02:15.000Z | 2021-09-13T02:36:24.000Z | /*
* File: IScirptOperation.h
* Author: denghp
*
* Created on 2011年4月20日, 下午1:52
*/
#ifndef ISCRIPTOPERATION_H
#define ISCRIPTOPERATION_H
#include "LuaPlus.h"
using namespace LuaPlus;
#define FILENAME_SIZE 256
class IScriptOperation
{
public:
IScriptOperation();
virtual ~IScriptOperation();
public:
virtual bool LoadData(){};
bool LoadScript(const char* strScriptDir,const char* strScriptFile);
int DoFunction(char* strFunction)
{
LuaObject object = m_luaScript->GetGlobal(strFunction);
if(object.IsFunction())
{
LuaFunction<int> Function(object);
return Function();
}
return -1;
}
//
template<typename T>
int DoFunction(char* strFunction,T p)
{
LuaObject object = m_luaScript->GetGlobal(strFunction);
if(object.IsFunction())
{
LuaFunction<int> Function(object);
return Function(p);
}
return -1;
}
//
template<typename T,typename T1>
int DoFunction(char* strFunction,T p,T1 p1)
{
LuaObject object = m_luaScript->GetGlobal(strFunction);
if(object.IsFunction())
{
LuaFunction<int> Function(object);
return Function(p,p1);
}
return -1;
}
//
template<typename T,typename T1,typename T2>
int DoFunction(char* strFunction,T p,T1 p1,T2 p2)
{
LuaObject object = m_luaScript->GetGlobal(strFunction);
if(object.IsFunction())
{
LuaFunction<int> Function(object);
return Function(p,p1,p2);
}
return -1;
}
//
template<typename T,typename T1,typename T2,typename T3>
int DoFunction(char* strFunction,T p,T1 p1,T2 p2,T3 p3)
{
LuaObject object = m_luaScript->GetGlobal(strFunction);
if(object.IsFunction())
{
LuaFunction<int> Function(object);
return Function(p,p1,p2,p3);
}
return -1;
}
//
template<typename T,typename T1,typename T2,typename T3,typename T4>
int DoFunction(char* strFunction,T p,T1 p1,T2 p2,T3 p3,T4 p4)
{
LuaObject object = m_luaScript->GetGlobal(strFunction);
if(object.IsFunction())
{
LuaFunction<int> Function(object);
return Function(p,p1,p2,p3,p4);
}
return -1;
}
char* GetName(){return m_strFile;}
LuaStateOwner& GetLuaStateOwner(){return m_luaScript;};
protected:
//脚本驱动
LuaStateOwner m_luaScript;
//
char m_strFile[FILENAME_SIZE];
};
#endif /* ISCIRPTOPERATION_H */
| 23.008403 | 82 | 0.575237 |
0bf50b810ba38bcd87c679f2a15566a888960f9c | 126 | js | JavaScript | packages/icon/src/icons/747.js | sarahbethfederman/test-entrypoints | 1d37253762071d581ec3fd918231aa80c45f1513 | [
"MIT"
] | null | null | null | packages/icon/src/icons/747.js | sarahbethfederman/test-entrypoints | 1d37253762071d581ec3fd918231aa80c45f1513 | [
"MIT"
] | 5 | 2020-10-02T08:47:29.000Z | 2020-10-02T08:47:32.000Z | packages/icon/src/icons/747.js | sarahbethfederman/test-entrypoints | 1d37253762071d581ec3fd918231aa80c45f1513 | [
"MIT"
] | null | null | null |
import React from 'react';
const Icon747 = () => <span>Icon747</span>;
export default Icon747;
| 18 | 49 | 0.531746 |
efb28c8b10663e4037dc086322883a439bdca73e | 3,467 | kts | Kotlin | build.gradle.kts | DevoInc/feeds | 7bda462ebe9ef8eb00902f6f69cefabebc41e33c | [
"MIT"
] | 1 | 2020-11-12T07:41:18.000Z | 2020-11-12T07:41:18.000Z | build.gradle.kts | DevoInc/feeds | 7bda462ebe9ef8eb00902f6f69cefabebc41e33c | [
"MIT"
] | 2 | 2020-12-01T21:35:59.000Z | 2021-02-09T20:14:15.000Z | build.gradle.kts | DevoInc/feeds | 7bda462ebe9ef8eb00902f6f69cefabebc41e33c | [
"MIT"
] | 3 | 2020-11-12T21:30:17.000Z | 2020-12-09T19:13:08.000Z | plugins {
jacoco
application
kotlin("jvm") version Versions.kotlinVersion
kotlin("plugin.serialization") version Versions.kotlinVersion
id("org.jetbrains.dokka") version Versions.kotlinVersion
id("io.gitlab.arturbosch.detekt") version "1.14.2"
id("io.wusa.semver-git-plugin") version "2.3.0"
id("com.adarshr.test-logger") version "2.1.1"
}
group = "com.devo"
version = semver.info
val defaultVersionFormatter = Transformer<Any, io.wusa.Info> { info ->
"${info.version.major}.${info.version.minor}.${info.version.patch}+build.${info.count}.sha.${info.shortCommit}"
}
semver {
initialVersion = "0.0.0"
branches {
branch {
regex = "master"
incrementer = "MINOR_VERSION_INCREMENTER"
formatter = Transformer<Any, io.wusa.Info> { info ->
"${info.version.major}.${info.version.minor}.${info.version.patch}"
}
}
branch {
regex = "develop"
incrementer = "PATCH_VERSION_INCREMENTER"
formatter = defaultVersionFormatter
}
branch {
regex = ".+"
incrementer = "NO_VERSION_INCREMENTER"
formatter = defaultVersionFormatter
}
}
}
val javaVersion = JavaVersion.VERSION_1_8.toString()
tasks.compileKotlin {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
kotlinOptions {
jvmTarget = javaVersion
}
}
tasks.compileTestKotlin {
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
kotlinOptions {
jvmTarget = javaVersion
}
}
tasks.detekt {
jvmTarget = javaVersion
}
tasks.test {
finalizedBy(tasks.jacocoTestReport)
}
application {
mainClass.set("com.devo.feeds.FeedsServiceKt")
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation(kotlin("reflect"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.1")
// Logging dependencies
implementation("ch.qos.logback:logback-core:1.2.3")
implementation("ch.qos.logback:logback-classic:1.2.3")
implementation("org.apache.logging.log4j:log4j-to-slf4j:2.13.1")
implementation("org.slf4j:slf4j-api:${Versions.slf4j}")
implementation("org.slf4j:log4j-over-slf4j:${Versions.slf4j}")
implementation("org.slf4j:jcl-over-slf4j:${Versions.slf4j}")
implementation("org.slf4j:jul-to-slf4j:${Versions.slf4j}")
implementation("io.github.microutils:kotlin-logging:1.8.3")
implementation("com.github.ajalt.clikt:clikt:3.0.1")
implementation("com.cloudbees:syslog-java-client:1.1.7")
implementation("io.github.config4k:config4k:0.4.2")
implementation("io.ktor:ktor-client-core:${Versions.ktor}")
implementation("io.ktor:ktor-client-cio:${Versions.ktor}")
implementation("org.mapdb:mapdb:3.0.8")
implementation("com.fasterxml.uuid:java-uuid-generator:4.0.1")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
testImplementation("com.natpryce:hamkrest:1.7.0.3")
testImplementation("io.mockk:mockk:1.10.2")
testImplementation("io.ktor:ktor-server-core:${Versions.ktor}")
testImplementation("io.ktor:ktor-server-netty:${Versions.ktor}")
testImplementation("org.awaitility:awaitility:4.0.2")
}
| 30.955357 | 115 | 0.682146 |
76cbd46e724d3278c3310ab7ee08b00e151d4193 | 1,605 | asm | Assembly | faren2cel.asm | m4hi2/microprocessor-lab-codes | 5cf367214463150d8f1f733a6f36d1084f63885c | [
"MIT"
] | null | null | null | faren2cel.asm | m4hi2/microprocessor-lab-codes | 5cf367214463150d8f1f733a6f36d1084f63885c | [
"MIT"
] | null | null | null | faren2cel.asm | m4hi2/microprocessor-lab-codes | 5cf367214463150d8f1f733a6f36d1084f63885c | [
"MIT"
] | null | null | null | .MODEL SMALL
.STACK 100H
.DATA
MSG1 DB 'ENTER TEMPERATURE IN FARENHEIT: $'
MSG2 DB 0DH, 0AH, 'THE TEMPERATURE YOU ENTERED: $'
COUNTER DB 0
R DW 10
MSG3 DB 0DH, 0AH, 'TEMPERATURE IN CELCIUS: $'
RESULT DB ?, '$'
.CODE
MAIN PROC
MOV AX, @DATA
MOV DS, AX
MOV BX, 0
MOV AH, 09
LEA DX, MSG1
INT 21H
INPUT:
MOV AH, 01
INT 21H
CMP AL, 13D
JNE STORE_IN_REGISTER
JE REGISTER_TO_MEMORY
STORE_IN_REGISTER:
SUB AL, 30H
MOV CX, 0
MOV CL, AL
MOV AX, BX
MUL R
ADD AX, CX
MOV BX, AX
MOV CX, BX
JMP INPUT
REGISTER_TO_MEMORY:
MOV DX, 0
MOV AX, BX
DIV R
INC COUNTER
PUSH DX
MOV BX, AX
CMP AX, 0
JE PRINTING_MESSAGE
JNE REGISTER_TO_MEMORY
PRINTING_MESSAGE:
MOV AH, 09
LEA DX, MSG2
INT 21H
JMP PRINT_TEMP
PRINT_TEMP:
POP DX
ADD DL, 30H
MOV AH, 02
INT 21H
DEC COUNTER
CMP COUNTER, 0
JNE PRINT_TEMP
JE CALCULATE
CALCULATE:
MOV AX, CX
SUB AX, 032
MOV CL, 05
MUL CL
MOV CL, 09
DIV CL
MOV AH, 00
MOV BX, AX
MOV AH, 09
LEA DX, MSG3
INT 21H
MOV COUNTER, 0
REG2MEM:
MOV DX, 0
MOV AX, BX
DIV R
PUSH DX
INC COUNTER
MOV BX, AX
CMP AX, 0
JE PRINT
JNE REG2MEM
PRINT:
POP DX
ADD DL, 30H
MOV AH, 02
INT 21H
DEC COUNTER
CMP COUNTER, 0
JNE PRINT
JE EXIT
EXIT:
MOV AH, 04CH
INT 21H
MAIN ENDP
END MAIN
| 14.330357 | 50 | 0.527726 |
721a021a472916273bf84f66844babc205ac252e | 38,727 | rs | Rust | migration-engine/migration-engine-tests/tests/datamodel_steps_inferrer_tests.rs | timsuchanek/prisma-engines | 83ac782d5d93dcee37efeba8ccbeff596701148a | [
"Apache-2.0"
] | null | null | null | migration-engine/migration-engine-tests/tests/datamodel_steps_inferrer_tests.rs | timsuchanek/prisma-engines | 83ac782d5d93dcee37efeba8ccbeff596701148a | [
"Apache-2.0"
] | null | null | null | migration-engine/migration-engine-tests/tests/datamodel_steps_inferrer_tests.rs | timsuchanek/prisma-engines | 83ac782d5d93dcee37efeba8ccbeff596701148a | [
"Apache-2.0"
] | null | null | null | #![allow(non_snake_case)]
use datamodel::ast::{parser, SchemaAst};
use migration_connector::steps::*;
use migration_core::migration::datamodel_migration_steps_inferrer::*;
use pretty_assertions::assert_eq;
#[test]
fn infer_CreateModel_if_it_does_not_exist_yet() {
let dm1 = SchemaAst::empty();
let dm2 = parse(
r#"
model Test {
id Int @id
}
"#,
);
let steps = infer(&dm1, &dm2);
let expected = &[
MigrationStep::CreateModel(CreateModel {
model: "Test".to_string(),
}),
MigrationStep::CreateField(CreateField {
model: "Test".to_string(),
field: "id".to_string(),
tpe: "Int".to_owned(),
arity: FieldArity::Required,
}),
MigrationStep::CreateDirective(CreateDirective {
location: DirectiveLocation {
path: DirectivePath::Field {
model: "Test".to_owned(),
field: "id".to_owned(),
},
directive: "id".to_owned(),
},
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteModel() {
let dm1 = parse(
r#"
model Test {
id String @id @default(cuid())
}
"#,
);
let dm2 = SchemaAst::empty();
let steps = infer(&dm1, &dm2);
let expected = &[MigrationStep::DeleteModel(DeleteModel {
model: "Test".to_string(),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_UpdateModel() {
let dm1 = parse(
r#"
model Post {
id String @id @default(cuid())
@@unique([id])
@@index([id])
}
"#,
);
assert_eq!(infer(&dm1, &dm1), &[]);
let dm2 = parse(
r#"
model Post{
id String @id @default(cuid())
@@embedded
@@unique([id])
@@index([id])
}
"#,
);
let steps = infer(&dm1, &dm2);
let expected = &[MigrationStep::CreateDirective(CreateDirective {
location: DirectiveLocation {
path: DirectivePath::Model {
model: "Post".to_owned(),
arguments: None,
},
directive: "embedded".to_owned(),
},
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateField_if_it_does_not_exist_yet() {
let dm1 = parse(
r#"
model Test {
id String @id @default(cuid())
}
"#,
);
let dm2 = parse(
r#"
model Test {
id String @id @default(cuid())
field Int?
}
"#,
);
let steps = infer(&dm1, &dm2);
let expected = &[MigrationStep::CreateField(CreateField {
model: "Test".to_string(),
field: "field".to_string(),
tpe: "Int".to_owned(),
arity: FieldArity::Optional,
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateField_with_default() {
let dm1 = parse(
r#"
model Test {
id Int @id
}
"#,
);
let dm2 = parse(
r#"
model Test {
id Int @id
isReady Boolean @default(false)
}
"#,
);
let steps = infer(&dm1, &dm2);
let expected = &[
MigrationStep::CreateField(CreateField {
model: "Test".to_owned(),
field: "isReady".to_owned(),
tpe: "Boolean".to_owned(),
arity: FieldArity::Required,
}),
MigrationStep::CreateDirective(CreateDirective {
location: DirectiveLocation {
path: DirectivePath::Field {
model: "Test".to_owned(),
field: "isReady".to_owned(),
},
directive: "default".to_owned(),
},
}),
MigrationStep::CreateArgument(CreateArgument {
location: ArgumentLocation::Directive(DirectiveLocation {
path: DirectivePath::Field {
model: "Test".to_owned(),
field: "isReady".to_owned(),
},
directive: "default".to_owned(),
}),
argument: "".to_owned(),
value: MigrationExpression("false".to_owned()),
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateField_if_relation_field_does_not_exist_yet() {
let dm1 = parse(
r#"
model Blog {
id String @id @default(cuid())
}
model Post {
id String @id @default(cuid())
}
"#,
);
let dm2 = parse(
r#"
model Blog {
id String @id @default(cuid())
posts Post[]
}
model Post {
id String @id @default(cuid())
blog Blog?
}
"#,
);
let steps = infer(&dm1, &dm2);
let expected = vec![
MigrationStep::CreateField(CreateField {
model: "Blog".to_string(),
field: "posts".to_string(),
tpe: "Post".to_owned(),
arity: FieldArity::List,
}),
MigrationStep::CreateField(CreateField {
model: "Post".to_string(),
field: "blog".to_string(),
tpe: "Blog".to_owned(),
arity: FieldArity::Optional,
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteField() {
let dm1 = parse(
r#"
model Test {
id String @id @default(cuid())
field Int?
}
"#,
);
let dm2 = parse(
r#"
model Test {
id String @id @default(cuid())
}
"#,
);
let steps = infer(&dm1, &dm2);
let expected = vec![MigrationStep::DeleteField(DeleteField {
model: "Test".to_string(),
field: "field".to_string(),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_UpdateField_simple() {
let dm1 = parse(
r#"
model Test {
id String @id @default(cuid())
field Int?
}
"#,
);
assert_eq!(infer(&dm1, &dm1), vec![]);
let dm2 = parse(
r#"
model Test {
id String @id @default(cuid())
field Boolean @default(false) @unique
}
"#,
);
let steps = infer(&dm1, &dm2);
let expected = &[
MigrationStep::UpdateField(UpdateField {
model: "Test".to_string(),
field: "field".to_string(),
new_name: None,
tpe: Some("Boolean".to_owned()),
arity: Some(FieldArity::Required),
}),
MigrationStep::CreateDirective(CreateDirective {
location: DirectiveLocation {
path: DirectivePath::Field {
model: "Test".to_owned(),
field: "field".to_owned(),
},
directive: "default".to_owned(),
},
}),
MigrationStep::CreateArgument(CreateArgument {
location: ArgumentLocation::Directive(DirectiveLocation {
path: DirectivePath::Field {
model: "Test".to_owned(),
field: "field".to_owned(),
},
directive: "default".to_owned(),
}),
argument: "".to_owned(),
value: MigrationExpression("false".to_owned()),
}),
MigrationStep::CreateDirective(CreateDirective {
location: DirectiveLocation {
path: DirectivePath::Field {
model: "Test".to_owned(),
field: "field".to_owned(),
},
directive: "unique".to_owned(),
},
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateEnum() {
let dm1 = SchemaAst::empty();
let dm2 = parse(
r#"
enum Test {
A
B
}
"#,
);
let steps = infer(&dm1, &dm2);
let expected = vec![MigrationStep::CreateEnum(CreateEnum {
r#enum: "Test".to_string(),
values: vec!["A".to_string(), "B".to_string()],
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteEnum() {
let dm1 = parse(
r#"
enum Test {
A
B
}
"#,
);
let dm2 = SchemaAst::empty();
let steps = infer(&dm1, &dm2);
let expected = vec![MigrationStep::DeleteEnum(DeleteEnum {
r#enum: "Test".to_string(),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_UpdateEnum() {
let dm1 = parse(
r#"
enum Color {
RED
GREEN
BLUE
}
"#,
);
assert_eq!(infer(&dm1, &dm1), &[]);
let dm2 = parse(
r#"
enum Color {
GREEN
BEIGE
BLUE
}
"#,
);
let steps = infer(&dm1, &dm2);
let expected = vec![MigrationStep::UpdateEnum(UpdateEnum {
r#enum: "Color".to_owned(),
created_values: vec!["BEIGE".to_owned()],
deleted_values: vec!["RED".to_owned()],
new_name: None,
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateField_on_self_relation() {
let dm1 = parse(
r#"
model User {
id Int @id
}
"#,
);
let dm2 = parse(
r#"
model User {
id Int @id
invitedBy User?
}
"#,
);
let steps = infer(&dm1, &dm2);
let expected = &[MigrationStep::CreateField(CreateField {
model: "User".into(),
field: "invitedBy".into(),
tpe: "User".to_owned(),
arity: FieldArity::Optional,
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateDirective_on_field() {
let dm1 = parse(
r##"
model User {
id Int @id
name String
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String @map("handle")
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Field {
model: "User".to_owned(),
field: "name".to_owned(),
},
directive: "map".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location.clone());
let expected = &[
MigrationStep::CreateDirective(CreateDirective {
location: directive_location,
}),
MigrationStep::CreateArgument(CreateArgument {
location: argument_location,
argument: "".to_owned(),
value: MigrationExpression("\"handle\"".to_owned()),
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateDirective_on_model() {
let dm1 = parse(
r##"
model User {
id Int @id
name String
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String
@@map("customer")
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Model {
model: "User".to_owned(),
arguments: None,
},
directive: "map".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location.clone());
let expected = &[
MigrationStep::CreateDirective(CreateDirective {
location: directive_location,
}),
MigrationStep::CreateArgument(CreateArgument {
location: argument_location,
argument: "".to_owned(),
value: MigrationExpression("\"customer\"".to_owned()),
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateDirective_on_model_repeated_directive() {
let dm1 = parse(
r##"
model User {
id Int @id
name String
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String
@@unique([name])
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Model {
model: "User".to_owned(),
arguments: Some(vec![Argument {
name: "".to_owned(),
value: MigrationExpression("[name]".to_owned()),
}]),
},
directive: "unique".to_owned(),
};
let expected = &[MigrationStep::CreateDirective(CreateDirective {
location: directive_location,
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateDirective_on_enum() {
let dm1 = parse(
r##"
enum Color {
RED
GREEN
BLUE
}
"##,
);
let dm2 = parse(
r##"
enum Color {
RED
GREEN
BLUE
@@map("colour")
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Enum {
r#enum: "Color".to_owned(),
},
directive: "map".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location.clone());
let expected = &[
MigrationStep::CreateDirective(CreateDirective {
location: directive_location.clone(),
}),
MigrationStep::CreateArgument(CreateArgument {
location: argument_location,
argument: "".to_owned(),
value: MigrationExpression("\"colour\"".to_owned()),
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateDirective_on_enum_variant() {
let dm1 = parse(
r##"
enum Color {
RED
GREEN
BLUE
}
"##,
);
let dm2 = parse(
r##"
enum Color {
RED @map("COLOR_RED")
GREEN
BLUE
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::EnumValue {
r#enum: "Color".to_owned(),
value: "RED".to_owned(),
},
directive: "map".to_owned(),
};
let expected = &[
MigrationStep::CreateDirective(CreateDirective {
location: directive_location.clone(),
}),
MigrationStep::CreateArgument(CreateArgument {
location: ArgumentLocation::Directive(directive_location),
argument: "".to_owned(),
value: MigrationExpression("\"COLOR_RED\"".to_owned()),
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateDirective_on_type_alias() {
let dm1 = parse(r#"type BlogPost = String @default("a")"#);
let dm2 = parse(r#"type BlogPost = String @customized @default("a")"#);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::TypeAlias {
type_alias: "BlogPost".to_owned(),
},
directive: "customized".to_owned(),
};
let expected = &[MigrationStep::CreateDirective(CreateDirective {
location: directive_location,
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteDirective_on_field() {
let dm1 = parse(
r##"
model User {
id Int @id
name String @map("handle")
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Field {
model: "User".to_owned(),
field: "name".to_owned(),
},
directive: "map".to_owned(),
};
let expected = &[MigrationStep::DeleteDirective(DeleteDirective {
location: directive_location,
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteDirective_on_model() {
let dm1 = parse(
r##"
model User {
id Int @id
name String
@@map("customer")
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Model {
model: "User".to_owned(),
arguments: None,
},
directive: "map".to_owned(),
};
let expected = &[MigrationStep::DeleteDirective(DeleteDirective {
location: directive_location,
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteDirective_on_model_repeated_directive() {
let dm1 = parse(
r##"
model User {
id Int @id
name String
@@unique([name])
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Model {
model: "User".to_owned(),
arguments: Some(vec![Argument {
name: "".to_owned(),
value: MigrationExpression("[name]".to_owned()),
}]),
},
directive: "unique".to_owned(),
};
let expected = &[MigrationStep::DeleteDirective(DeleteDirective {
location: directive_location,
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteDirective_on_enum() {
let dm1 = parse(
r##"
enum Color {
RED
GREEN
BLUE
@@map("colour")
}
"##,
);
assert_eq!(infer(&dm1, &dm1), &[]);
let dm2 = parse(
r##"
enum Color {
RED
GREEN
BLUE
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Enum {
r#enum: "Color".to_owned(),
},
directive: "map".to_owned(),
};
let expected = &[MigrationStep::DeleteDirective(DeleteDirective {
location: directive_location,
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteDirective_on_enum_variant() {
let dm1 = parse(
r##"
enum Color {
RED @map("COLOR_RED")
GREEN
BLUE
}
"##,
);
let dm2 = parse(
r##"
enum Color {
RED
GREEN
BLUE
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::EnumValue {
r#enum: "Color".to_owned(),
value: "RED".to_owned(),
},
directive: "map".to_owned(),
};
let expected = &[MigrationStep::DeleteDirective(DeleteDirective {
location: directive_location,
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteDirective_on_type_alias() {
let dm1 = parse(r#"type BlogPost = String @default("chimken")"#);
let dm2 = parse(r#"type BlogPost = String"#);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::TypeAlias {
type_alias: "BlogPost".to_owned(),
},
directive: "default".to_owned(),
};
let expected = &[MigrationStep::DeleteDirective(DeleteDirective {
location: directive_location,
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateArgument_on_field() {
let dm1 = parse(
r##"
model User {
id Int @id
name String @translate("German")
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String @translate("German", secondary: "ZH-CN", tertiary: "FR-BE")
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Field {
model: "User".to_owned(),
field: "name".to_owned(),
},
directive: "translate".to_owned(),
};
let arguments_location = ArgumentLocation::Directive(directive_location);
let expected = &[
MigrationStep::CreateArgument(CreateArgument {
location: arguments_location.clone(),
argument: "secondary".to_owned(),
value: MigrationExpression("\"ZH-CN\"".to_owned()),
}),
MigrationStep::CreateArgument(CreateArgument {
location: arguments_location,
argument: "tertiary".to_owned(),
value: MigrationExpression("\"FR-BE\"".to_owned()),
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateArgument_on_model() {
let dm1 = parse(
r##"
model User {
id Int @id
name String
@@randomDirective([name])
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String
@@randomDirective([name], name: "usernameUniqueness")
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Model {
model: "User".to_owned(),
arguments: None,
},
directive: "randomDirective".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location);
let expected = &[MigrationStep::CreateArgument(CreateArgument {
location: argument_location,
argument: "name".to_owned(),
value: MigrationExpression("\"usernameUniqueness\"".to_owned()),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateArgument_on_enum() {
let dm1 = parse(
r##"
enum EyeColor {
BLUE
GREEN
BROWN
@@random(one: "two")
}
"##,
);
assert_eq!(infer(&dm1, &dm1), &[]);
let dm2 = parse(
r##"
enum EyeColor {
BLUE
GREEN
BROWN
@@random(one: "two", three: 4)
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Enum {
r#enum: "EyeColor".to_owned(),
},
directive: "random".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location);
let expected = &[MigrationStep::CreateArgument(CreateArgument {
location: argument_location,
argument: "three".to_owned(),
value: MigrationExpression("4".to_owned()),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateArgument_on_type_alias() {
let dm1 = parse(r#"type BlogPost = String @customDirective(c: "d")"#);
let dm2 = parse(r#"type BlogPost = String @customDirective(a: "b", c: "d")"#);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::TypeAlias {
type_alias: "BlogPost".to_owned(),
},
directive: "customDirective".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location);
let expected = &[MigrationStep::CreateArgument(CreateArgument {
location: argument_location,
argument: "a".to_owned(),
value: MigrationExpression("\"b\"".to_owned()),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteArgument_on_field() {
let dm1 = parse(
r##"
model User {
id Int @id
name String @translate("German", secondary: "ZH-CN", tertiary: "FR-BE")
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String @translate("German")
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Field {
model: "User".to_owned(),
field: "name".to_owned(),
},
directive: "translate".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location);
let expected = &[
MigrationStep::DeleteArgument(DeleteArgument {
location: argument_location.clone(),
argument: "secondary".to_owned(),
}),
MigrationStep::DeleteArgument(DeleteArgument {
location: argument_location,
argument: "tertiary".to_owned(),
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteArgument_on_model() {
let dm1 = parse(
r##"
model User {
id Int @id
name String
@@randomDirective([name], name: "usernameUniqueness")
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String
@@randomDirective([name])
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Model {
model: "User".to_owned(),
arguments: None,
},
directive: "randomDirective".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location);
let expected = &[MigrationStep::DeleteArgument(DeleteArgument {
location: argument_location,
argument: "name".to_owned(),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteArgument_on_enum() {
let dm1 = parse(
r##"
enum EyeColor {
BLUE
GREEN
BROWN
@@random(one: "two", three: 4)
}
"##,
);
assert_eq!(infer(&dm1, &dm1), &[]);
let dm2 = parse(
r##"
enum EyeColor {
BLUE
GREEN
BROWN
@@random(one: "two")
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Enum {
r#enum: "EyeColor".to_owned(),
},
directive: "random".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location);
let expected = &[MigrationStep::DeleteArgument(DeleteArgument {
location: argument_location,
argument: "three".to_owned(),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteArgument_on_type_alias() {
let dm1 = parse(r#"type BlogPost = String @customDirective(a: "b", c: "d")"#);
let dm2 = parse(r#"type BlogPost = String @customDirective(c: "d")"#);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::TypeAlias {
type_alias: "BlogPost".to_owned(),
},
directive: "customDirective".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location);
let expected = &[MigrationStep::DeleteArgument(DeleteArgument {
location: argument_location,
argument: "a".to_owned(),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_UpdateArgument_on_field() {
let dm1 = parse(
r##"
model User {
id Int @id
name String @translate("German", secondary: "ZH-CN", tertiary: "FR-BE")
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String @translate("German", secondary: "FR-BE", tertiary: "ZH-CN")
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Field {
model: "User".to_owned(),
field: "name".to_owned(),
},
directive: "translate".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location);
let expected = &[
MigrationStep::UpdateArgument(UpdateArgument {
location: argument_location.clone(),
argument: "secondary".to_owned(),
new_value: MigrationExpression("\"FR-BE\"".to_owned()),
}),
MigrationStep::UpdateArgument(UpdateArgument {
location: argument_location,
argument: "tertiary".to_owned(),
new_value: MigrationExpression("\"ZH-CN\"".to_owned()),
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_UpdateArgument_on_model() {
let dm1 = parse(
r##"
model User {
id Int @id
name String
nickname String
@@map("customers")
}
"##,
);
let dm2 = parse(
r##"
model User {
id Int @id
name String
nickname String
@@map("customers_table")
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Model {
model: "User".to_owned(),
arguments: None,
},
directive: "map".to_owned(),
};
let argument_location = ArgumentLocation::Directive(directive_location);
let expected = &[MigrationStep::UpdateArgument(UpdateArgument {
location: argument_location,
argument: "".to_owned(),
new_value: MigrationExpression("\"customers_table\"".to_owned()),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_UpdateArgument_on_enum() {
let dm1 = parse(
r##"
enum EyeColor {
BLUE
GREEN
BROWN
@@random(one: "two")
}
"##,
);
assert_eq!(infer(&dm1, &dm1), &[]);
let dm2 = parse(
r##"
enum EyeColor {
BLUE
GREEN
BROWN
@@random(one: "three")
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::Enum {
r#enum: "EyeColor".to_owned(),
},
directive: "random".to_owned(),
};
let expected = &[MigrationStep::UpdateArgument(UpdateArgument {
location: directive_location.into_argument_location(),
argument: "one".to_owned(),
new_value: MigrationExpression("\"three\"".to_owned()),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_UpdateArgument_on_enum_value() {
let dm1 = parse(
r##"
enum EyeColor {
BLUE
GREEN
BROWN @map("COLOR_TEA")
}
"##,
);
assert_eq!(infer(&dm1, &dm1), &[]);
let dm2 = parse(
r##"
enum EyeColor {
BLUE
GREEN
BROWN @map("COLOR_BROWN")
}
"##,
);
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::EnumValue {
r#enum: "EyeColor".to_owned(),
value: "BROWN".to_owned(),
},
directive: "map".to_owned(),
};
let expected = &[MigrationStep::UpdateArgument(UpdateArgument {
location: directive_location.into_argument_location(),
argument: "".to_owned(),
new_value: MigrationExpression("\"COLOR_BROWN\"".to_owned()),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_UpdateArgument_on_type_alias() {
let dm1 = parse("type Text = String @default(\"chicken\")");
let dm2 = parse("type Text = String @default(\"\")");
let steps = infer(&dm1, &dm2);
let directive_location = DirectiveLocation {
path: DirectivePath::TypeAlias {
type_alias: "Text".to_owned(),
},
directive: "default".to_owned(),
};
let expected = &[MigrationStep::UpdateArgument(UpdateArgument {
location: directive_location.into_argument_location(),
argument: "".to_owned(),
new_value: MigrationExpression("\"\"".to_owned()),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateTypeAlias() {
let dm1 = parse("");
let dm2 = parse(
r#"
type CUID = String @id @default(cuid())
model User {
id CUID
age Float
}
"#,
);
let steps = infer(&dm1, &dm2);
let directive_path = DirectivePath::TypeAlias {
type_alias: "CUID".to_owned(),
};
let expected = &[
MigrationStep::CreateTypeAlias(CreateTypeAlias {
type_alias: "CUID".to_owned(),
r#type: "String".to_owned(),
arity: FieldArity::Required,
}),
MigrationStep::CreateDirective(CreateDirective {
location: DirectiveLocation {
path: directive_path.clone(),
directive: "id".to_owned(),
},
}),
MigrationStep::CreateDirective(CreateDirective {
location: DirectiveLocation {
path: directive_path.clone(),
directive: "default".to_owned(),
},
}),
MigrationStep::CreateArgument(CreateArgument {
location: DirectiveLocation {
path: directive_path,
directive: "default".to_owned(),
}
.into_argument_location(),
argument: "".to_owned(),
value: MigrationExpression("cuid()".to_owned()),
}),
MigrationStep::CreateModel(CreateModel {
model: "User".to_string(),
}),
MigrationStep::CreateField(CreateField {
model: "User".to_string(),
field: "id".to_owned(),
tpe: "CUID".to_owned(),
arity: FieldArity::Required,
}),
MigrationStep::CreateField(CreateField {
model: "User".to_string(),
field: "age".to_owned(),
tpe: "Float".to_owned(),
arity: FieldArity::Required,
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteTypeAlias() {
let dm1 = parse("type CUID = String @id @default(cuid())");
let dm2 = parse("");
let steps = infer(&dm1, &dm2);
let expected = &[MigrationStep::DeleteTypeAlias(DeleteTypeAlias {
type_alias: "CUID".to_owned(),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_UpdateTypeAlias() {
let dm1 = parse("type Age = Int");
let dm2 = parse("type Age = Float");
let steps = infer(&dm1, &dm2);
let expected = &[MigrationStep::UpdateTypeAlias(UpdateTypeAlias {
type_alias: "Age".to_owned(),
r#type: Some("Float".to_owned()),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_CreateSource() {
let dm1 = parse("");
let dm2 = parse(
r#"
datasource pg {
provider = "postgres"
url = "postgresql://some-host:1234"
}"#,
);
let steps = infer(&dm1, &dm2);
let source_location = SourceLocation {
source: "pg".to_owned(),
};
let expected = &[
MigrationStep::CreateSource(CreateSource {
source: "pg".to_owned(),
}),
MigrationStep::CreateArgument(CreateArgument {
location: source_location.clone().into_argument_location(),
argument: "provider".to_owned(),
value: MigrationExpression("\"postgres\"".to_owned()),
}),
MigrationStep::CreateArgument(CreateArgument {
location: source_location.clone().into_argument_location(),
argument: "url".to_owned(),
value: MigrationExpression("\"***\"".to_owned()),
}),
];
assert_eq!(steps, expected);
}
#[test]
fn infer_DeleteSource() {
let dm1 = parse(
r#"
datasource pg {
provider = "postgres"
url = "postgresql://some-host:1234"
}"#,
);
let dm2 = parse("");
let steps = infer(&dm1, &dm2);
let expected = &[MigrationStep::DeleteSource(DeleteSource {
source: "pg".to_owned(),
})];
assert_eq!(steps, expected);
}
#[test]
fn infer_Arguments_on_Datasources() {
let dm1 = parse(
r#"
datasource pg {
provider = "postgres"
url = "postgresql://some-host:1234"
a = 1
b = "1"
}"#,
);
let dm2 = parse(
r#"
datasource pg {
provider = "postgres"
url = "postgresql://this-got-changed:4567"
a = 2
c = true
}"#,
);
let source_location = SourceLocation {
source: "pg".to_owned(),
};
let argument_location = source_location.into_argument_location();
let steps = infer(&dm1, &dm2);
// although the URL got changed we DO NOT expect an UpdateArgument for it (because of URL masking. Talk to tom)
let expected = &[
MigrationStep::CreateArgument(CreateArgument {
location: argument_location.clone(),
argument: "c".to_owned(),
value: MigrationExpression("true".to_owned()),
}),
MigrationStep::DeleteArgument(DeleteArgument {
location: argument_location.clone(),
argument: "b".to_owned(),
}),
MigrationStep::UpdateArgument(UpdateArgument {
location: argument_location.clone(),
argument: "a".to_owned(),
new_value: MigrationExpression("2".to_owned()),
}),
];
assert_eq!(steps, expected);
}
fn infer(dm1: &SchemaAst, dm2: &SchemaAst) -> Vec<MigrationStep> {
let inferrer = DataModelMigrationStepsInferrerImplWrapper {};
inferrer.infer(&dm1, &dm2)
}
fn parse(input: &str) -> SchemaAst {
parser::parse(input).unwrap()
}
| 23.920321 | 115 | 0.507191 |