This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.12 | |
import QtQuick.Controls 2.5 | |
import ArcGIS.AppFramework 1.0 | |
Item { | |
Button { | |
text: qsTr("Test Promise chaining") | |
onClicked: { | |
download( "GET", "https://community.esri.com/groups/appstudio" ) | |
.then( (data) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.12 | |
import QtQuick.Controls 2.5 | |
import ArcGIS.AppFramework 1.0 | |
Item { | |
Button { | |
text: qsTr("Test Promise timeout") | |
onClicked: { | |
download( "GET", "https://community.esri.com/groups/appstudio" ) | |
.then( (message) => { console.log(message) } ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.12 | |
import QtQuick.Controls 2.5 | |
import QtQuick.Layouts 1.12 | |
import QtPositioning 5.12 | |
import ArcGIS.AppFramework 1.0 | |
Item { | |
ColumnLayout { | |
anchors.fill: parent | |
anchors.margins: 10 * AppFramework.displayScaleFactor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.12 | |
import QtQuick.Controls 2.5 | |
import QtQuick.Layouts 1.12 | |
import ArcGIS.AppFramework 1.0 | |
Item { | |
Button { | |
text: qsTr("test Promise await") | |
onClicked: testPromiseAwait() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.12 | |
import QtQuick.Controls 2.2 | |
Item { | |
Text { | |
anchors.centerIn: parent | |
text: "\u{1f304}" | |
font.pointSize: 128 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function testPromiseAwait() { | |
_asyncToGenerator(function*() { | |
try { | |
console.log(yield download("https://appstudio.arcgis.com")) | |
console.log(yield download("https://community.esri.com/groups/appstudio")) | |
console.log(yield download("https://community.esri.com/groups/survey123")) | |
} catch (err) { | |
console.log(err) | |
} | |
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.12 | |
import QtQuick.Controls 2.5 | |
import QtQuick.Layouts 1.12 | |
import ArcGIS.AppFramework 1.0 | |
Item { | |
Button { | |
text: qsTr("test Promise await") | |
onClicked: testPromiseAwait() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function head(gen, lines=1) { | |
return function* () { | |
let iterator = gen() | |
while (lines-- > 0) | |
{ | |
let item = iterator.next() | |
if (item.done) return true | |
console.log("head: yield ", item.value) | |
yield item.value | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef FormatMessage_H | |
#define FormatMessage_H | |
class CFormatMessage | |
{ | |
public: | |
CFormatMessage(DWORD dwError) : | |
m_Error(ERROR_SUCCESS), | |
m_ErrorText(NULL) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Const SQLCE30_CLSID = "Microsoft.SQLSERVER.MOBILE.OLEDB.3.0" | |
Const SQLCE35_CLSID = "Microsoft.SQLSERVER.CE.OLEDB.3.5" | |
Const SQLCE40_CLSID = "Microsoft.WINDOWS.SQLLITE.OLEDB.4.0" | |
REM https://docs.microsoft.com/en-us/sql/ado/reference/ado-api/objectstateenum | |
Const adStateClosed = 1 | |
Const adStateOpen = 1 | |
Const adStateConnecting = 2 |