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
CREATE TABLE "OCEAN"."T_DATE_PERSIAN" | |
( | |
"QV_DATE_NUM" NUMBER(6,0), | |
"GREGORIAN_DATE" DATE, | |
"PERSIAN_DATE" VARCHAR2(10 CHAR) | |
) | |
; | |
create or replace | |
PROCEDURE INSERT_T_DATE_PERSIAN IS |
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
ʕ◔ϖ◔ʔ | |
U+0295, U+25D4, U+03D6, U+25D4, U+0294 |
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
//---------------------------------------------- Nice Numberformat simplified --------------------------------------------- | |
// does work with count in KPI object (have seen several versions from Qlik which haven't worked) | |
Set vF_NiceNumberSimple = | |
If(Fabs($1) > 1e9, Num($1/1e9+1e-13, '#$(ThousandSep)##0$(DecimalSep)00') | |
,If(Fabs($1) > 1e8, Num($1/1e6+1e-13, '##0$(DecimalSep)0') | |
,If(Fabs($1) > 1e6, Num($1/1e6+1e-13, '##0$(DecimalSep)00') | |
,If(Fabs($1) > 1e5, Num($1/1e3+1e-13,'##0$(DecimalSep)0') | |
,If(Fabs($1) > 1e3, Num($1/1e3+1e-13, '##0$(DecimalSep)00') | |
, $1, | |
))))) & |
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
// calculation of distance of two geo references (lat/lon): | |
= 12742 * atan2(sqrt(sqr(sin(((lat2-lat1)*PI()/180)/2)) | |
+ (cos(lat1*PI()/180) * cos(lat2*PI()/180)) | |
* pow(sin(((lon2-lon1)*PI()/180)/2),2)), | |
sqrt(1 - (sqr(sin(((lat2-lat1)*PI()/180)/2)) | |
+ (cos(lat1*PI()/180) * cos(lat2*PI()/180)) | |
* pow(sin(((lon2-lon1)*PI()/180)/2),2)))) |
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
// generic load with one consolidated resulting table: | |
InputTable: | |
LOAD * INLINE [ | |
object,attribute,value | |
ball,color,red | |
ball,diameter,10 cm | |
ball,weight,100 g | |
box,color,black | |
box,height,16 cm | |
box,length,20 cm |
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 ( | |
"context" | |
"database/sql" | |
"database/sql/driver" | |
"errors" | |
"reflect" | |
// ... | |
sf "github.com/snowflakedb/gosnowflake" | |
) |
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
var prefix = window.location.pathname.substr(0, window.location.pathname.toLowerCase().lastIndexOf("/extensions") + 1); | |
var config = { | |
host: window.location.hostname, | |
prefix: prefix, | |
port: window.location.port, | |
isSecure: window.location.protocol === "https:" | |
}; | |
require.config({ | |
baseUrl: (config.isSecure ? "https://" : "http://") + config.host + (config.port ? ":" + config.port : "") + config.prefix + "resources" | |
}); |
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 dateFromQlikNumber(n) { | |
var d = new Date(Math.round((n - 25569) * 86400000)); | |
// since date was created in UTC shift it to the local timezone | |
d.setTime(d.getTime() + d.getTimezoneOffset() * 60000); | |
return d; | |
} |
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
//QlikView Script, Load the distribution of first digits, according to Benford's law, as Data Island: | |
Benford: | |
LOAD FirstDigit, log10(FirstDigit+1) - log10(FirstDigit) as OccurancePct; | |
LOAD RecNo() as FirstDigit AutoGenerate(9); | |
//*********************************************************************************** | |
//Chart | |
//Dynamic Dimension; | |
=ValueList(1,2,3,4,5,6,7,8,9) | |
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
// calculates hue for temperature from -30 to +30 °C: | |
hsl((30 + 240 * (30 - max({<Etage={EG}>} Temp)) / 60) / 255, 0.75, 0.9) |
NewerOlder