Snippets Collections
(function(root){var jstz=function(){"use strict";var HEMISPHERE_SOUTH="s",consts={DAY:864e5,HOUR:36e5,MINUTE:6e4,SECOND:1e3,BASELINE_YEAR:2014,MAX_SCORE:864e6,AMBIGUITIES:{"America/Denver":["America/Mazatlan"],"America/Chicago":["America/Mexico_City"],"America/Asuncion":["America/Campo_Grande","America/Santiago"],"America/Montevideo":["America/Sao_Paulo","America/Santiago"],"Asia/Beirut":["Asia/Amman","Asia/Jerusalem","Europe/Helsinki","Asia/Damascus","Africa/Cairo","Asia/Gaza","Europe/Minsk","Africa/Windhoek"],"Pacific/Auckland":["Pacific/Fiji"],"America/Los_Angeles":["America/Santa_Isabel"],"America/New_York":["America/Havana"],"America/Halifax":["America/Goose_Bay"],"America/Godthab":["America/Miquelon"],"Asia/Dubai":["Asia/Yerevan"],"Asia/Jakarta":["Asia/Krasnoyarsk"],"Asia/Shanghai":["Asia/Irkutsk","Australia/Perth"],"Australia/Sydney":["Australia/Lord_Howe"],"Asia/Tokyo":["Asia/Yakutsk"],"Asia/Dhaka":["Asia/Omsk"],"Asia/Baku":["Asia/Yerevan"],"Australia/Brisbane":["Asia/Vladivostok"],"Pacific/Noumea":["Asia/Vladivostok"],"Pacific/Majuro":["Asia/Kamchatka","Pacific/Fiji"],"Pacific/Tongatapu":["Pacific/Apia"],"Asia/Baghdad":["Europe/Minsk","Europe/Moscow"],"Asia/Karachi":["Asia/Yekaterinburg"],"Africa/Johannesburg":["Asia/Gaza","Africa/Cairo"]}},get_date_offset=function get_date_offset(date){var offset=-date.getTimezoneOffset();return offset!==null?offset:0},get_offsets=function get_offsets(){var offsets=[];for(var month=0;month<=11;month++){for(var date=1;date<=28;date++){var currentOffset=get_date_offset(new Date(consts.BASELINE_YEAR,month,date));if(!offsets){offsets.push()}else if(offsets&&offsets[offsets.length-1]!==currentOffset){offsets.push(currentOffset)}}}return offsets},lookup_key=function lookup_key(){var diff=0;var offsets=get_offsets();if(offsets.length>1){diff=offsets[0]-offsets[1]}if(offsets.length>3){return offsets[0]+",1,weird"}else if(diff<0){return offsets[0]+",1"}else if(diff>0){return offsets[1]+",1,"+HEMISPHERE_SOUTH}return offsets[0]+",0"},get_from_internationalization_api=function get_from_internationalization_api(){var format,timezone;if(!Intl||typeof Intl==="undefined"||typeof Intl.DateTimeFormat==="undefined"){return}format=Intl.DateTimeFormat();if(typeof format==="undefined"||typeof format.resolvedOptions==="undefined"){return}timezone=format.resolvedOptions().timeZone;if(timezone&&(timezone.indexOf("/")>-1||timezone==="UTC")){return timezone}},dst_dates=function dst_dates(year){var yearstart=new Date(year,0,1,0,0,1,0).getTime();var yearend=new Date(year,12,31,23,59,59).getTime();var current=yearstart;var offset=new Date(current).getTimezoneOffset();var dst_start=null;var dst_end=null;while(current<yearend-864e5){var dateToCheck=new Date(current);var dateToCheckOffset=dateToCheck.getTimezoneOffset();if(dateToCheckOffset!==offset){if(dateToCheckOffset<offset){dst_start=dateToCheck}if(dateToCheckOffset>offset){dst_end=dateToCheck}offset=dateToCheckOffset}current+=864e5}if(dst_start&&dst_end){return{s:find_dst_fold(dst_start).getTime(),e:find_dst_fold(dst_end).getTime()}}return false},find_dst_fold=function find_dst_fold(a_date,padding,iterator){if(typeof padding==="undefined"){padding=consts.DAY;iterator=consts.HOUR}var date_start=new Date(a_date.getTime()-padding).getTime();var date_end=a_date.getTime()+padding;var offset=new Date(date_start).getTimezoneOffset();var current=date_start;var dst_change=null;while(current<date_end-iterator){var dateToCheck=new Date(current);var dateToCheckOffset=dateToCheck.getTimezoneOffset();if(dateToCheckOffset!==offset){dst_change=dateToCheck;break}current+=iterator}if(padding===consts.DAY){return find_dst_fold(dst_change,consts.HOUR,consts.MINUTE)}if(padding===consts.HOUR){return find_dst_fold(dst_change,consts.MINUTE,consts.SECOND)}return dst_change},windows7_adaptations=function windows7_adaptions(rule_list,preliminary_timezone,score,sample){if(score!=="N/A"){return score}if(preliminary_timezone==="Asia/Beirut"){if(sample.name==="Africa/Cairo"){if(rule_list[6].s===13983768e5&&rule_list[6].e===14116788e5){return 0}}if(sample.name==="Asia/Jerusalem"){if(rule_list[6].s===13959648e5&&rule_list[6].e===14118588e5){return 0}}}else if(preliminary_timezone==="America/Santiago"){if(sample.name==="America/Asuncion"){if(rule_list[6].s===14124816e5&&rule_list[6].e===1397358e6){return 0}}if(sample.name==="America/Campo_Grande"){if(rule_list[6].s===14136912e5&&rule_list[6].e===13925196e5){return 0}}}else if(preliminary_timezone==="America/Montevideo"){if(sample.name==="America/Sao_Paulo"){if(rule_list[6].s===14136876e5&&rule_list[6].e===1392516e6){return 0}}}else if(preliminary_timezone==="Pacific/Auckland"){if(sample.name==="Pacific/Fiji"){if(rule_list[6].s===14142456e5&&rule_list[6].e===13961016e5){return 0}}}return score},best_dst_match=function best_dst_match(rule_list,preliminary_timezone){var score_sample=function score_sample(sample){var score=0;for(var j=0;j<rule_list.length;j++){if(!!sample.rules[j]&&!!rule_list[j]){if(rule_list[j].s>=sample.rules[j].s&&rule_list[j].e<=sample.rules[j].e){score=0;score+=Math.abs(rule_list[j].s-sample.rules[j].s);score+=Math.abs(sample.rules[j].e-rule_list[j].e)}else{score="N/A";break}if(score>consts.MAX_SCORE){score="N/A";break}}}score=windows7_adaptations(rule_list,preliminary_timezone,score,sample);return score};var scoreboard={};var dst_zones=jstz.olson.dst_rules.zones;var dst_zones_length=dst_zones.length;var ambiguities=consts.AMBIGUITIES[preliminary_timezone];for(var i=0;i<dst_zones_length;i++){var sample=dst_zones[i];var score=score_sample(dst_zones[i]);if(score!=="N/A"){scoreboard[sample.name]=score}}for(var tz in scoreboard){if(scoreboard.hasOwnProperty(tz)){for(var j=0;j<ambiguities.length;j++){if(ambiguities[j]===tz){return tz}}}}return preliminary_timezone},get_by_dst=function get_by_dst(preliminary_timezone){var get_rules=function get_rules(){var rule_list=[];for(var i=0;i<jstz.olson.dst_rules.years.length;i++){var year_rules=dst_dates(jstz.olson.dst_rules.years[i]);rule_list.push(year_rules)}return rule_list};var check_has_dst=function check_has_dst(rules){for(var i=0;i<rules.length;i++){if(rules[i]!==false){return true}}return false};var rules=get_rules();var has_dst=check_has_dst(rules);if(has_dst){return best_dst_match(rules,preliminary_timezone)}return preliminary_timezone},determine=function determine(using_intl){var preliminary_tz=false;var needle=lookup_key();if(using_intl||typeof using_intl==="undefined"){preliminary_tz=get_from_internationalization_api()}if(!preliminary_tz){preliminary_tz=jstz.olson.timezones[needle];if(typeof consts.AMBIGUITIES[preliminary_tz]!=="undefined"){preliminary_tz=get_by_dst(preliminary_tz)}}return{name:function(){return preliminary_tz},using_intl:using_intl||typeof using_intl==="undefined",needle:needle,offsets:get_offsets()}};return{determine:determine}}();jstz.olson=jstz.olson||{};jstz.olson.timezones={"-720,0":"Etc/GMT+12","-660,0":"Pacific/Pago_Pago","-660,1,s":"Pacific/Apia","-600,1":"America/Adak","-600,0":"Pacific/Honolulu","-570,0":"Pacific/Marquesas","-540,0":"Pacific/Gambier","-540,1":"America/Anchorage","-480,1":"America/Los_Angeles","-480,0":"Pacific/Pitcairn","-420,0":"America/Phoenix","-420,1":"America/Denver","-360,0":"America/Guatemala","-360,1":"America/Chicago","-360,1,s":"Pacific/Easter","-300,0":"America/Bogota","-300,1":"America/New_York","-270,0":"America/Caracas","-240,1":"America/Halifax","-240,0":"America/Santo_Domingo","-240,1,s":"America/Asuncion","-210,1":"America/St_Johns","-180,1":"America/Godthab","-180,0":"America/Buenos_Aires","-180,1,s":"America/Montevideo","-120,0":"America/Noronha","-120,1":"America/Noronha","-60,1":"Atlantic/Azores","-60,0":"Atlantic/Cape_Verde","0,0":"UTC","0,1":"Europe/London","0,1,weird":"Africa/Casablanca","60,1":"Europe/Berlin","60,0":"Africa/Lagos","60,1,weird":"Africa/Casablanca","120,1":"Asia/Beirut","120,1,weird":"Africa/Cairo","120,0":"Africa/Johannesburg","180,0":"Asia/Baghdad","180,1":"Europe/Moscow","210,1":"Asia/Tehran","240,0":"Asia/Dubai","240,1":"Asia/Baku","270,0":"Asia/Kabul","300,1":"Asia/Yekaterinburg","300,0":"Asia/Karachi","330,0":"Asia/Calcutta","345,0":"Asia/Katmandu","360,0":"Asia/Dhaka","360,1":"Asia/Omsk","390,0":"Asia/Rangoon","420,1":"Asia/Krasnoyarsk","420,0":"Asia/Jakarta","480,0":"Asia/Shanghai","480,1":"Asia/Irkutsk","525,0":"Australia/Eucla","525,1,s":"Australia/Eucla","540,1":"Asia/Yakutsk","540,0":"Asia/Tokyo","570,0":"Australia/Darwin","570,1,s":"Australia/Adelaide","600,0":"Australia/Brisbane","600,1":"Asia/Vladivostok","600,1,s":"Australia/Sydney","630,1,s":"Australia/Lord_Howe","660,1":"Asia/Kamchatka","660,0":"Pacific/Noumea","690,0":"Pacific/Norfolk","720,1,s":"Pacific/Auckland","720,0":"Pacific/Majuro","765,1,s":"Pacific/Chatham","780,0":"Pacific/Tongatapu","780,1,s":"Pacific/Apia","840,0":"Pacific/Kiritimati"};jstz.olson.dst_rules={years:[2008,2009,2010,2011,2012,2013,2014],zones:[{name:"Africa/Cairo",rules:[{e:12199572e5,s:12090744e5},{e:1250802e6,s:1240524e6},{e:12858804e5,s:12840696e5},false,false,false,{e:14116788e5,s:1406844e6}]},{name:"America/Asuncion",rules:[{e:12050316e5,s:12243888e5},{e:12364812e5,s:12558384e5},{e:12709548e5,s:12860784e5},{e:13024044e5,s:1317528e6},{e:1333854e6,s:13495824e5},{e:1364094e6,s:1381032e6},{e:13955436e5,s:14124816e5}]},{name:"America/Campo_Grande",rules:[{e:12032172e5,s:12243888e5},{e:12346668e5,s:12558384e5},{e:12667212e5,s:1287288e6},{e:12981708e5,s:13187376e5},{e:13302252e5,s:1350792e6},{e:136107e7,s:13822416e5},{e:13925196e5,s:14136912e5}]},{name:"America/Goose_Bay",rules:[{e:122559486e4,s:120503526e4},{e:125704446e4,s:123648486e4},{e:128909886e4,s:126853926e4},{e:13205556e5,s:129998886e4},{e:13520052e5,s:13314456e5},{e:13834548e5,s:13628952e5},{e:14149044e5,s:13943448e5}]},{name:"America/Havana",rules:[{e:12249972e5,s:12056436e5},{e:12564468e5,s:12364884e5},{e:12885012e5,s:12685428e5},{e:13211604e5,s:13005972e5},{e:13520052e5,s:13332564e5},{e:13834548e5,s:13628916e5},{e:14149044e5,s:13943412e5}]},{name:"America/Mazatlan",rules:[{e:1225008e6,s:12074724e5},{e:12564576e5,s:1238922e6},{e:1288512e6,s:12703716e5},{e:13199616e5,s:13018212e5},{e:13514112e5,s:13332708e5},{e:13828608e5,s:13653252e5},{e:14143104e5,s:13967748e5}]},{name:"America/Mexico_City",rules:[{e:12250044e5,s:12074688e5},{e:1256454e6,s:12389184e5},{e:12885084e5,s:1270368e6},{e:1319958e6,s:13018176e5},{e:13514076e5,s:13332672e5},{e:13828572e5,s:13653216e5},{e:14143068e5,s:13967712e5}]},{name:"America/Miquelon",rules:[{e:12255984e5,s:12050388e5},{e:1257048e6,s:12364884e5},{e:12891024e5,s:12685428e5},{e:1320552e6,s:12999924e5},{e:13520016e5,s:1331442e6},{e:13834512e5,s:13628916e5},{e:14149008e5,s:13943412e5}]},{name:"America/Santa_Isabel",rules:[{e:12250116e5,s:1207476e6},{e:12564612e5,s:12389256e5},{e:12891204e5,s:12685608e5},{e:132057e7,s:13000104e5},{e:13520196e5,s:133146e7},{e:13834692e5,s:13629096e5},{e:14149188e5,s:13943592e5}]},{name:"America/Santiago",rules:[{e:1206846e6,s:1223784e6},{e:1237086e6,s:12552336e5},{e:127035e7,s:12866832e5},{e:13048236e5,s:13138992e5},{e:13356684e5,s:13465584e5},{e:1367118e6,s:13786128e5},{e:13985676e5,s:14100624e5}]},{name:"America/Sao_Paulo",rules:[{e:12032136e5,s:12243852e5},{e:12346632e5,s:12558348e5},{e:12667176e5,s:12872844e5},{e:12981672e5,s:1318734e6},{e:13302216e5,s:13507884e5},{e:13610664e5,s:1382238e6},{e:1392516e6,s:14136876e5}]},{name:"Asia/Amman",rules:[{e:1225404e6,s:12066552e5},{e:12568536e5,s:12381048e5},{e:12883032e5,s:12695544e5},{e:13197528e5,s:13016088e5},false,false,{e:14147064e5,s:13959576e5}]},{name:"Asia/Damascus",rules:[{e:12254868e5,s:120726e7},{e:125685e7,s:12381048e5},{e:12882996e5,s:12701592e5},{e:13197492e5,s:13016088e5},{e:13511988e5,s:13330584e5},{e:13826484e5,s:1364508e6},{e:14147028e5,s:13959576e5}]},{name:"Asia/Dubai",rules:[false,false,false,false,false,false,false]},{name:"Asia/Gaza",rules:[{e:12199572e5,s:12066552e5},{e:12520152e5,s:12381048e5},{e:1281474e6,s:126964086e4},{e:1312146e6,s:130160886e4},{e:13481784e5,s:13330584e5},{e:13802292e5,s:1364508e6},{e:1414098e6,s:13959576e5}]},{name:"Asia/Irkutsk",rules:[{e:12249576e5,s:12068136e5},{e:12564072e5,s:12382632e5},{e:12884616e5,s:12697128e5},false,false,false,false]},{name:"Asia/Jerusalem",rules:[{e:12231612e5,s:12066624e5},{e:1254006e6,s:1238112e6},{e:1284246e6,s:12695616e5},{e:131751e7,s:1301616e6},{e:13483548e5,s:13330656e5},{e:13828284e5,s:13645152e5},{e:1414278e6,s:13959648e5}]},{name:"Asia/Kamchatka",rules:[{e:12249432e5,s:12067992e5},{e:12563928e5,s:12382488e5},{e:12884508e5,s:12696984e5},false,false,false,false]},{name:"Asia/Krasnoyarsk",rules:[{e:12249612e5,s:12068172e5},{e:12564108e5,s:12382668e5},{e:12884652e5,s:12697164e5},false,false,false,false]},{name:"Asia/Omsk",rules:[{e:12249648e5,s:12068208e5},{e:12564144e5,s:12382704e5},{e:12884688e5,s:126972e7},false,false,false,false]},{name:"Asia/Vladivostok",rules:[{e:12249504e5,s:12068064e5},{e:12564e8,s:1238256e6},{e:12884544e5,s:12697056e5},false,false,false,false]},{name:"Asia/Yakutsk",rules:[{e:1224954e6,s:120681e7},{e:12564036e5,s:12382596e5},{e:1288458e6,s:12697092e5},false,false,false,false]},{name:"Asia/Yekaterinburg",rules:[{e:12249684e5,s:12068244e5},{e:1256418e6,s:1238274e6},{e:12884724e5,s:12697236e5},false,false,false,false]},{name:"Asia/Yerevan",rules:[{e:1224972e6,s:1206828e6},{e:12564216e5,s:12382776e5},{e:1288476e6,s:12697272e5},{e:13199256e5,s:13011768e5},false,false,false]},{name:"Australia/Lord_Howe",rules:[{e:12074076e5,s:12231342e5},{e:12388572e5,s:12545838e5},{e:12703068e5,s:12860334e5},{e:13017564e5,s:1317483e6},{e:1333206e6,s:13495374e5},{e:13652604e5,s:1380987e6},{e:139671e7,s:14124366e5}]},{name:"Australia/Perth",rules:[{e:12068136e5,s:12249576e5},false,false,false,false,false,false]},{name:"Europe/Helsinki",rules:[{e:12249828e5,s:12068388e5},{e:12564324e5,s:12382884e5},{e:12884868e5,s:1269738e6},{e:13199364e5,s:13011876e5},{e:1351386e6,s:13326372e5},{e:13828356e5,s:13646916e5},{e:14142852e5,s:13961412e5}]},{name:"Europe/Minsk",rules:[{e:12249792e5,s:12068352e5},{e:12564288e5,s:12382848e5},{e:12884832e5,s:12697344e5},false,false,false,false]},{name:"Europe/Moscow",rules:[{e:12249756e5,s:12068316e5},{e:12564252e5,s:12382812e5},{e:12884796e5,s:12697308e5},false,false,false,false]},{name:"Pacific/Apia",rules:[false,false,false,{e:13017528e5,s:13168728e5},{e:13332024e5,s:13489272e5},{e:13652568e5,s:13803768e5},{e:13967064e5,s:14118264e5}]},{name:"Pacific/Fiji",rules:[false,false,{e:12696984e5,s:12878424e5},{e:13271544e5,s:1319292e6},{e:1358604e6,s:13507416e5},{e:139005e7,s:1382796e6},{e:14215032e5,s:14148504e5}]},{name:"Europe/London",rules:[{e:12249828e5,s:12068388e5},{e:12564324e5,s:12382884e5},{e:12884868e5,s:1269738e6},{e:13199364e5,s:13011876e5},{e:1351386e6,s:13326372e5},{e:13828356e5,s:13646916e5},{e:14142852e5,s:13961412e5}]},{name:"Africa/Windhoek",rules:[{e:12207492e5,s:120744e7},{e:12521988e5,s:12388896e5},{e:12836484e5,s:12703392e5},{e:1315098e6,s:13017888e5},{e:13465476e5,s:13332384e5},{e:13779972e5,s:13652928e5},{e:14100516e5,s:13967424e5}]}]};if(typeof module!=="undefined"&&typeof module.exports!=="undefined"){module.exports=jstz}else if(typeof define!=="undefined"&&define!==null&&define.amd!=null){define([],function(){return jstz})}else{if(typeof root==="undefined"){window.jstz=jstz}else{root.jstz=jstz}}})();
var CONTROL_KEY=1,SHIFT_KEY=2,CONTROL_SHIFT_KEY=3;function roundcube_browser(){var e=navigator;this.agent=e.userAgent,this.agent_lc=e.userAgent.toLowerCase(),this.name=e.appName,this.vendor=e.vendor||"",this.vendver=e.vendorSub?parseFloat(e.vendorSub):0,this.product=e.product||"",this.platform=String(e.platform).toLowerCase(),this.lang=e.language?e.language.substring(0,2):e.browserLanguage?e.browserLanguage.substring(0,2):e.systemLanguage?e.systemLanguage.substring(0,2):"en",this.win=0<=this.platform.indexOf("win"),this.mac=0<=this.platform.indexOf("mac"),this.linux=0<=this.platform.indexOf("linux"),this.unix=0<=this.platform.indexOf("unix"),this.dom=!!document.getElementById,this.dom2=document.addEventListener&&document.removeEventListener,this.edge=0<this.agent_lc.indexOf(" edge/")||0<this.agent_lc.indexOf(" edg/"),this.webkit=!this.edge&&0<this.agent_lc.indexOf("applewebkit"),this.ie=document.all&&!window.opera||this.win&&0<this.agent_lc.indexOf("trident/"),window.opera?(this.opera=!0,this.vendver=opera.version()):this.ie||this.edge||(this.chrome=0<this.agent_lc.indexOf("chrome"),this.opera=this.webkit&&0<this.agent.indexOf(" OPR/"),this.safari=!this.chrome&&!this.opera&&(this.webkit||0<this.agent_lc.indexOf("safari")),this.konq=0<this.agent_lc.indexOf("konqueror"),this.mz=this.dom&&!this.chrome&&!this.safari&&!this.konq&&!this.opera&&0<=this.agent.indexOf("Mozilla"),this.iphone=this.safari&&(0<this.agent_lc.indexOf("iphone")||0<this.agent_lc.indexOf("ipod")||"ipod"==this.platform||"iphone"==this.platform),this.ipad=this.safari&&(0<this.agent_lc.indexOf("ipad")||"ipad"==this.platform)),this.vendver||(pattern=this.ie?/(msie|rv)(\s|:)([0-9\.]+)/:this.edge?/(edge?)(\/)([0-9\.]+)/:this.opera?/(opera|opr)(\/)([0-9\.]+)/:this.konq?/(konqueror)(\/)([0-9\.]+)/:this.safari?/(version)(\/)([0-9\.]+)/:this.chrome?/(chrome)(\/)([0-9\.]+)/:this.mz?/(firefox)(\/)([0-9\.]+)/:/(khtml|safari|applewebkit|rv)(\s|\/|:)([0-9\.]+)/,this.vendver=pattern.test(this.agent_lc)?parseFloat(RegExp.$3):0),this.safari&&/;\s+([a-z]{2})-[a-z]{2}\)/.test(this.agent_lc)&&(this.lang=RegExp.$1),this.mobile=/iphone|ipod|blackberry|iemobile|opera mini|opera mobi|mobile/i.test(this.agent_lc),this.tablet=!this.mobile&&/ipad|android|xoom|sch-i800|playbook|tablet|kindle/i.test(this.agent_lc),this.touch=this.mobile||this.tablet,this.pointer="function"==typeof window.PointerEvent,this.cookies=e.cookieEnabled,this.set_html_class=function(){var e=" js";this.ie?e+=" ms ie ie"+parseInt(this.vendver):this.edge&&74<this.vendver?e+=" chrome":this.edge?e+=" ms edge":this.opera?e+=" opera":this.konq?e+=" konqueror":this.safari||this.chrome?e+=" chrome":this.mz&&(e+=" mozilla"),this.iphone?e+=" iphone":this.ipad?e+=" ipad":this.webkit&&(e+=" webkit"),this.mobile&&(e+=" mobile"),this.tablet&&(e+=" tablet"),document.documentElement&&(document.documentElement.className+=e)}}var rcube_event={get_target:function(e){return(e=e||window.event)&&e.target?e.target:e.srcElement||document},get_keycode:function(e){return(e=e||window.event)&&e.keyCode?e.keyCode:e&&e.which?e.which:0},get_button:function(e){return(e=e||window.event)&&void 0!==e.button?e.button:e&&e.which?e.which:0},get_modifier:function(e){var t=0;return e=e||window.event,bw.mac&&e?t+=(e.metaKey&&CONTROL_KEY)+(e.shiftKey&&SHIFT_KEY):e&&(t+=(e.ctrlKey&&CONTROL_KEY)+(e.shiftKey&&SHIFT_KEY)),t},get_mouse_pos:function(e){var t=(e=e||window.event).pageX||e.clientX,n=e.pageY||e.clientY;return document.body&&document.all&&(t+=document.body.scrollLeft,n+=document.body.scrollTop),e._offset&&(t+=e._offset.left,n+=e._offset.top),{x:t,y:n}},add_listener:function(t){var e;t.object&&t.method&&(t.element||(t.element=document),t.object._rc_events||(t.object._rc_events={}),e=t.event+"*"+t.method,t.object._rc_events[e]||(t.object._rc_events[e]=function(e){return t.object[t.method](e)}),t.element.addEventListener?t.element.addEventListener(t.event,t.object._rc_events[e],!1):t.element.attachEvent?(t.element.detachEvent("on"+t.event,t.object._rc_events[e]),t.element.attachEvent("on"+t.event,t.object._rc_events[e])):t.element["on"+t.event]=t.object._rc_events[e])},remove_listener:function(e){e.element||(e.element=document);var t=e.event+"*"+e.method;e.object&&e.object._rc_events&&e.object._rc_events[t]&&(e.element.removeEventListener?e.element.removeEventListener(e.event,e.object._rc_events[t],!1):e.element.detachEvent?e.element.detachEvent("on"+e.event,e.object._rc_events[t]):e.element["on"+e.event]=null)},cancel:function(e){e=e||window.event;return e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),!(e.cancelBubble=!0)},is_keyboard:function(e){return!!e&&(e.type?!!e.type.match(/^key/)||"click"==e.type&&!e.clientX:!e.pageX&&(e.pageY||0)<=0&&!e.clientX&&(e.clientY||0)<=0)},keyboard_only:function(e){return!!rcube_event.is_keyboard(e)||rcube_event.cancel(e)},touchevent:function(e){return{pageX:e.pageX,pageY:e.pageY,offsetX:e.pageX-e.target.offsetLeft,offsetY:e.pageY-e.target.offsetTop,target:e.target,istouch:!0}}};function rcube_event_engine(){this._events={}}function rcube_check_email(e,t,n,i){if(!e)return!!n&&0;n&&(t=!0);var o=i?"([^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+|\\x22([^\\x0d\\x22\\x5c\\x80-\\xff]|\\x5c[\\x00-\\x7f])*\\x22)":"[^\\u0000-\\u0020\\u002e\\u00a0\\u0040\\u007f\\u2028\\u2029]+",i="[,;\\s\\n]",o="(("+(o+"(\\x2e"+o+")*")+"\\x40(((\\[(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])(\\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])){3}\\])|(\\[IPv6:[0-9a-f:.]+\\]))|(([^@\\x2e]+\\x2e)+([^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]{2,}|xn--[a-z0-9]{2,}))))|("+("mailtest\\x40("+["\\u0645\\u062b\\u0627\\u0644\\x2e\\u0625\\u062e\\u062a\\u0628\\u0627\\u0631","\\u4f8b\\u5b50\\x2e\\u6d4b\\u8bd5","\\u4f8b\\u5b50\\x2e\\u6e2c\\u8a66","\\u03c0\\u03b1\\u03c1\\u03ac\\u03b4\\u03b5\\u03b9\\u03b3\\u03bc\\u03b1\\x2e\\u03b4\\u03bf\\u03ba\\u03b9\\u03bc\\u03ae","\\u0909\\u0926\\u093e\\u0939\\u0930\\u0923\\x2e\\u092a\\u0930\\u0940\\u0915\\u094d\\u0937\\u093e","\\u4f8b\\u3048\\x2e\\u30c6\\u30b9\\u30c8","\\uc2e4\\ub840\\x2e\\ud14c\\uc2a4\\ud2b8","\\u0645\\u062b\\u0627\\u0644\\x2e\\u0622\\u0632\\u0645\\u0627\\u06cc\\u0634\\u06cc","\\u043f\\u0440\\u0438\\u043c\\u0435\\u0440\\x2e\\u0438\\u0441\\u043f\\u044b\\u0442\\u0430\\u043d\\u0438\\u0435","\\u0b89\\u0ba4\\u0bbe\\u0bb0\\u0ba3\\u0bae\\u0bcd\\x2e\\u0baa\\u0bb0\\u0bbf\\u0b9f\\u0bcd\\u0b9a\\u0bc8","\\u05d1\\u05f2\\u05b7\\u05e9\\u05e4\\u05bc\\u05d9\\u05dc\\x2e\\u05d8\\u05e2\\u05e1\\u05d8"].join("|")+")")+"))",o=t?new RegExp("(^|<|"+i+")"+o+"($|>|"+i+")",n?"ig":"i"):new RegExp("^"+o+"$","i");return n?e.match(o).length:o.test(e)}function rcube_clone_object(e){var t,n={};for(t in e)e[t]&&"object"==typeof e[t]?n[t]=rcube_clone_object(e[t]):n[t]=e[t];return n}function urlencode(e){return window.encodeURIComponent?encodeURIComponent(e).replace("*","%2A"):escape(e).replace("+","%2B").replace("*","%2A").replace("/","%2F").replace("@","%40")}function rcube_find_object(e,t){var n,i,o,r;if((t=t||document).getElementById&&(o=t.getElementById(e)))return o;if(!(o=!(o=!(o=!o&&t.getElementsByName&&(r=t.getElementsByName(e))?r[0]:o)&&t.all?t.all[e]:o)&&t.images.length?t.images[e]:o)&&t.forms.length)for(i=0;i<t.forms.length;i++)t.forms[i].name==e?o=t.forms[i]:t.forms[i].elements[e]&&(o=t.forms[i].elements[e]);if(!o&&t.layers)for(t.layers[e]&&(o=t.layers[e]),n=0;!o&&n<t.layers.length;n++)o=rcube_find_object(e,t.layers[n].document);return o}function rcube_mouse_is_over(e,t){var n=rcube_event.get_mouse_pos(e),e=$(t).offset();return n.x>=e.left&&n.x<e.left+t.offsetWidth&&n.y>=e.top&&n.y<e.top+t.offsetHeight}function setCookie(e,t,n,i,o,r){r=e+"="+escape(t)+(n?"; expires="+n.toGMTString():"")+(i?"; path="+i:"")+(o?"; domain="+o:"")+(r?"; secure":"")+"; SameSite=Lax";document.cookie=r}function getCookie(e){var t=document.cookie,n=e+"=",i=t.indexOf("; "+n);if(-1==i){if(0!=(i=t.indexOf(n)))return null}else i+=2;e=t.indexOf(";",i);return-1==e&&(e=t.length),unescape(t.substring(i+n.length,e))}rcube_event_engine.prototype={addEventListener:function(e,t,n){return this._events||(this._events={}),this._events[e]||(this._events[e]=[]),this._events[e].push({func:t,obj:n||window}),this},removeEventListener:function(e,t,n){void 0===n&&(n=window);for(var i,o=0;this._events&&this._events[e]&&o<this._events[e].length;o++)(i=this._events[e][o])&&i.func==t&&i.obj==n&&(this._events[e][o]=null)},triggerEvent:function(e,t){function n(e){try{e&&e.event&&delete e.event}catch(e){}}var i,o;if(void 0===t?t=this:"object"==typeof t&&(t.event=e),this._event_exec||(this._event_exec={}),this._events&&this._events[e]&&!this._event_exec[e]){this._event_exec[e]=!0;for(var r=0;r<this._events[e].length&&(!(o=this._events[e][r])||("function"==typeof o.func?i=o.func.call?o.func.call(o.obj,t):o.func(t):"function"==typeof o.obj[o.func]&&(i=o.obj[o.func](t)),void 0===i||i));r++);n(i)}return delete this._event_exec[e],n(t),i}},roundcube_browser.prototype.set_cookie=setCookie,roundcube_browser.prototype.get_cookie=getCookie;var bw=new roundcube_browser;bw.set_html_class(),RegExp.escape=function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},Date.prototype.getStdTimezoneOffset=function(){for(var e=12,t=new Date(null,e,1),n=t.getTimezoneOffset();--e;)if(t.setUTCMonth(e),n!=t.getTimezoneOffset())return Math.max(n,t.getTimezoneOffset());return n},String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return this.slice(t=t||0,e.length)===e}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){var n=this.toString();("number"!=typeof t||!isFinite(t)||Math.floor(t)!==t||t>n.length)&&(t=n.length),t-=e.length;e=n.lastIndexOf(e,t);return-1!==e&&e===t}),jQuery.last=function(e){return e&&e.length?e[e.length-1]:void 0},jQuery.fn.placeholder=function(e){return this.each(function(){$(this).prop({title:e,placeholder:e})})};var rcube_parse_query=function(e){if(!e)return{};function t(e){return decodeURIComponent(e.replace(s," "))}var n,i,o={},r=/([^&=]+)=?([^&]*)/g,s=/\+/g;for(e=e.replace(/\?/,"");i=r.exec(e);)n=t(i[1]),i=t(i[2]),"[]"===n.substring(n.length-2)?(o[n=n.substring(0,n.length-2)]||(o[n]=[])).push(i):o[n]=i;return o},Base64=function(){function h(e){for(var t,n,i=0,o="",r=0;i<e.length;)(t=e.charCodeAt(i))<128?(o+=String.fromCharCode(t),i++):191<t&&t<224?(r=e.charCodeAt(i+1),o+=String.fromCharCode((31&t)<<6|63&r),i+=2):(r=e.charCodeAt(i+1),n=e.charCodeAt(i+2),o+=String.fromCharCode((15&t)<<12|(63&r)<<6|63&n),i+=3);return o}var f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{encode:function(e){if(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var i=e.charCodeAt(n);i<128?t+=String.fromCharCode(i):(127<i&&i<2048?t+=String.fromCharCode(i>>6|192):(t+=String.fromCharCode(i>>12|224),t+=String.fromCharCode(i>>6&63|128)),t+=String.fromCharCode(63&i|128))}return t}(e),"function"==typeof window.btoa)try{return btoa(e)}catch(e){}for(var t,n,i,o,r,s,u=0,a="",c=e.length;u<c;)i=(s=e.charCodeAt(u++))>>2,o=(3&s)<<4|(t=e.charCodeAt(u++))>>4,r=(15&t)<<2|(n=e.charCodeAt(u++))>>6,s=63&n,isNaN(t)?r=s=64:isNaN(n)&&(s=64),a=a+f.charAt(i)+f.charAt(o)+f.charAt(r)+f.charAt(s);return a},decode:function(e){if("function"==typeof window.atob)try{return h(atob(e))}catch(e){}for(var t,n,i,o,r,s,u=0,a="",c=(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length;u<c;)i=f.indexOf(e.charAt(u++)),t=(15&(o=f.indexOf(e.charAt(u++))))<<4|(r=f.indexOf(e.charAt(u++)))>>2,n=(3&r)<<6|(s=f.indexOf(e.charAt(u++))),a+=String.fromCharCode(i<<2|o>>4),64!=r&&(a+=String.fromCharCode(t)),64!=s&&(a+=String.fromCharCode(n));return h(a)}}}();
//# sourceMappingURL=common.min.js.map
SELECT DISTINCT VO.SKU , SUM(VO.SHIPPEDQTY) V2.DESCR AS ItemName,
FROM [SCE].vw_ORDERDETAIL_1 vo 
WHERE vo.ACTUALSHIPDATE BETWEEN '2023-01-01 00:00:00' AND '2024-01-01 00:00:00'
AND vo.STORERKEY = 'CLARINS'
AND vo.STATUS = 95
GROUP BY vo.SKU 
HAVING SUM(V1.SHIPPEDQTY) > 0


SELECT TOP 10 * 
FROM [SCE].vw_ORDERDETAIL_1 V1 
INNER JOIN SCE.vw_SKU V2 ON V1.SKU = V2.SKU 
WHERE V1.ACTUALSHIPDATE BETWEEN '2023-01-01 00:00:00' AND '2024-01-01 00:00:00'
AND V1.STORERKEY = 'CLARINS'
AND V1.STATUS = 95
  <!DOCTYPE html>
<html>
<head>
    <title>Formulario con jQuery</title>
    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <style>
        .container {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-top: 50px;
        }
        .form-group {
            margin-bottom: 10px;
        }
        .form-group label {
            display: block;
            font-weight: bold;
        }
        .form-group input {
            width: 200px;
            padding: 5px;
        }
        .submit-btn {
            padding: 10px 20px;
            background-color: #4CAF50;
            color: white;
            border: none;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <div id="myForm" class="container">
        <!-- Formulario generado dinámicamente -->
    </div>

    <script>
        class Formulario {
            constructor() {
                this.formulario = document.createElement("form");
                this.formulario.className = "container";
                this.campos = [];

                this.crearCampo("nombre", "Nombre");
                this.crearCampo("apellido", "Apellido");
                this.crearCampo("email", "Email");
                this.crearCampo("telefono", "Teléfono");

                this.botonEnviar = document.createElement("button");
                this.botonEnviar.innerText = "Enviar";
                this.botonEnviar.className = "submit-btn";
                this.botonEnviar.addEventListener("click", this.enviarFormulario.bind(this));

                this.formulario.appendChild(this.botonEnviar);
                document.body.appendChild(this.formulario);
            }

            crearCampo(nombre, etiqueta) {
                const formGroup = document.createElement("div");
                formGroup.className = "form-group";

                const label = document.createElement("label");
                label.innerText = etiqueta;
                formGroup.appendChild(label);

                const input = document.createElement("input");
                input.type = "text";
                input.name = nombre;
                formGroup.appendChild(input);

                this.campos.push(input);

                this.formulario.appendChild(formGroup);
            }

            enviarFormulario() {
                const datos = {};
                for (const campo of this.campos) {
                    datos[campo.name] = campo.value;
                }
                console.log(datos);
            }
        }

        $(document).ready(function() {
            const formulario = new Formulario();
        });
    </script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
    <title>Formulario con ventana emergente</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css"> <!-- Enlace al archivo de estilos de Bootstrap -->
    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script> <!-- Inclusión de la biblioteca jQuery -->
    <style>
        #dragon-logo {
            position: absolute; /* Posición absoluta para el logo */
            top: 10px; /* Alineación superior a 10px */
            right: 10px; /* Alineación derecha a 10px */
            width: 50px; /* Ancho del logo */
        }
        input[type="text"], input[type="submit"] {
            margin-bottom: 2px; /* Espacio de 2px entre los campos de texto y el botón */
        }
    </style>
    <script>
        $(document).ready(function() {
            // Crear el formulario
            var formulario = document.createElement("form");
            formulario.classList.add("border", "p-3", "rounded", "bg-light"); // Agregar clases para estilos de borde, relleno y fondo
            formulario.style.display = "flex"; // Establecer el estilo de visualización como flex
            formulario.style.flexDirection = "column"; // Establecer la dirección de los elementos como columna
            formulario.style.alignItems = "center"; // Centrar los elementos horizontalmente

            var titulo = document.createElement("h2");
            titulo.textContent = "Formulario de prueba"; // Establecer el texto del título del formulario
            formulario.appendChild(titulo); // Agregar el título al formulario

            var campoTexto1 = document.createElement("input");
            campoTexto1.type = "text"; // Establecer el tipo de campo como texto
            campoTexto1.name = "nombre"; // Establecer el nombre del campo
            campoTexto1.placeholder = "Nombre"; // Establecer el marcador de posición del campo
            formulario.appendChild(campoTexto1); // Agregar el campo al formulario

            var espacio = document.createElement("br"); // Agregar un salto de línea entre los campos de texto
            formulario.appendChild(espacio);

            var campoTexto2 = document.createElement("input");
            campoTexto2.type = "text"; // Establecer el tipo de campo como texto
            campoTexto2.name = "apellido"; // Establecer el nombre del campo
            campoTexto2.placeholder = "Apellido"; // Establecer el marcador de posición del campo
            formulario.appendChild(campoTexto2); // Agregar el campo al formulario

            var botonEnviar = document.createElement("input");
            botonEnviar.type = "submit"; // Establecer el tipo de botón como enviar
            botonEnviar.value = "Enviar Formulario"; // Establecer el texto del botón
            botonEnviar.classList.add("btn", "btn-info"); // Agregar clases de Bootstrap para estilos de botón
            formulario.appendChild(botonEnviar); // Agregar el botón al formulario

            var contenedor = document.getElementById("miContenedor"); // Obtener el contenedor del formulario
            contenedor.style.display = "flex"; // Establecer el estilo de visualización como flex
            contenedor.style.justifyContent = "center"; // Centrar los elementos horizontalmente
            contenedor.appendChild(formulario); // Agregar el formulario al contenedor

            formulario.addEventListener("submit", function(event) {
                event.preventDefault(); // Evitar el envío del formulario por defecto

                var nombre = campoTexto1.value; // Obtener el valor del campo de nombre
                var apellido = campoTexto2.value; // Obtener el valor del campo de apellido

                var popupForm = $("<div class='modal fade' id='popupForm' tabindex='-1' role='dialog'>" + // Crear la ventana emergente con clase fade
                    "<div class='modal-dialog modal-dialog-centered' role='document'>" + // Centrar la ventana emergente
                    "<div class='modal-content bg-danger'>" + // Agregar clase "danger" para el fondo rojo
                    "<div class='modal-header'>" +
                    "<h5 class='modal-title'>Datos enviados</h5>" +
                    "<button type='button' class='close' data-dismiss='modal' aria-label='Close'>" +
                    "<span aria-hidden='true'>×</span>" +
                    "</button>" +
                    "</div>" +
                    "<div class='modal-body' style='color: white'>" + // Establecer el color del texto en blanco
                    "<p>Nombre: " + nombre + "</p>" +
                    "<p>Apellido: " + apellido + "</p>" +
                "</div>" +
                "</div>" +
                "</div>" +
                "</div>");

            $("body").append(popupForm); // Agregar la ventana emergente al cuerpo del documento

            $("#popupForm").modal("show"); // Mostrar la ventana emergente

            setTimeout(function() {
                $("#popupForm").modal("hide"); // Ocultar la ventana emergente después de 2 segundos
            }, 2000);

            setTimeout(function() {
                campoTexto1.value = ""; // Limpiar el campo de nombre
                campoTexto2.value = ""; // Limpiar el campo de apellido
            }, 3000);
        });
    });
    </script>
</head>
<body>
    <div id="miContenedor" class="container">
        <!-- El formulario y el código JavaScript aquí -->
    </div>
    <img id="dragon-logo" src="dragon.png"> <!-- Agregar el logo al documento -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script> <!-- Inclusión del archivo de scripts de Bootstrap -->
</body>
</html>
enum string_code {
    eFred,
    eBarney,
    eWilma,
    eBetty,
    ...
};

string_code hashit (std::string const& inString) {
    if (inString == "Fred") return eFred;
    if (inString == "Barney") return eBarney;
    ...
}

void foo() {
    switch (hashit(stringValue)) {
    case eFred:
        ...
    case eBarney:
        ...
    }
}
<script src="https://unpkg.com/@studio-freight/lenis@1.0.34/dist/lenis.min.js"></script> 
const lenis = new Lenis()

lenis.on('scroll', (e) => {
  console.log(e)
})

function raf(time) {
  lenis.raf(time)
  requestAnimationFrame(raf)
}

requestAnimationFrame(raf)
 //HTML





<div class="custom-mouse"></div>





//CSS


.custom-mouse{
    border: none;
    background-color: #fff;
    transform: translate(-50%, -100%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    position: absolute;
    top: 0;
}



//JS


let customMouse = document.querySelector(".custom-mouse");
window.addEventListener("mousemove", function(details) {
   let xValue = details.clientX;
   let yValue = details.clientY;

   setTimeout(() => {
       customMouse.style.top = `${yValue}px`;
       customMouse.style.left = `${xValue}px`;
         
   }, 100);


});
ln -s /usr/local/bin/k3s /usr/local/bin/kubectl
disabledAutoMailingsForPayment
cronTime: '00 30 04 * * *', // каждую ночь в 04:30
cronTime: '00 */5 * * * *', // каждые 5 минут
def factorial(n):
    result = 1
    for x in range(0,10):
        result = result * x
    return x

for n in range(0,10):
  print(n, n*factorial(n+1))
They would like for you to create the following registry key and let us know whether or not it allows you to launch and log into Box Drive
UseProtectiveFSFilter within HKEY_LOCAL_MACHINE\SOFTWARE\Box\Box
Set this entry as DWORD (REG_DWORD) with a value of 0
Floater image icon
For Laconoa


color:
#278AD7

<style>
.fh-fixed--bottom.fh-button-true-flat-blue::before {
    background-image: url('https://cdn.filestackcontent.com/Sg18cenaSBeLrdb2t2Tr') !important;
    margin: -12px .3em 4px -.6em !important;
    height: 1.4em !important;
    top: 0.5em !important;
    content: '' !important;
    display: inline-block !important;
    width: 1.8em !important;
    position: relative !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: contain !important;
    filter: invert(1) drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.3)) !important;
}
</style> 


<a href="https://fareharbor.com/embeds/book/lacanoa-kanuzentrumkonstanz/?full-items=yes" style="font-weight: bold !important; border: 2px solid white;" class="fh-hide--mobile fh-fixed--bottom fh-button-true-flat-blue fh-font--inherit">Jetzt Buchen</a>
<a href="https://fareharbor.com/embeds/book/lacanoa-kanuzentrumkonstanz/?full-items=yes" style="font-weight: bold !important; border: 2px solid white;" class="fh-size--small fh-hide--desktop fh-fixed--side fh-button-true-flat-blue fh-font--inherit">Jetzt Buchen</a>




Bicycle Icon floater
Bicycle icon on floater

<!-- Fareharbor button -->
<a href="https://fareharbor.com/embeds/book/ebee/?full-items=yes" class="fh-fixed--bottom fh-button-true-flat-color fh-color--white fh-shape--round">Book Your Guided Tour</a>
<style>
	.fh-fixed--bottom::before{
	background-image: url('https://webstockreview.net/images/clipart-bicycle-simple-1.png') !important;
	margin: -12px 0.4em 0 -0.1em !important;
	height: 2em !important;
	width: 2em !important;
	top: 0.5em !important;
	content: '' !important;
      	display: inline-block !important;
	filter: invert(1) !important;
      	position: relative !important;
      	background-position: center center !important;
      	background-repeat: no-repeat !important;
      	background-size: contain !important;
		}
</style>


****
  
  
  
  
  
Compass floater image
<style>
			a.fh-button-true-flat-orange.fh-icon--cal:before{
			background-image: url('https://getyourtouribiza.com/wp-content/uploads/icons8-compass-96.png') !important;
			height: 25px !important;
			width: 25px !important;
			}
</style>

<!-- FareHarbor book button for flow #388439 -->
<script>  
  jQuery(document).ready(function($){
    var lang = jQuery('html').attr('lang');
    buttonText = 'BOOK NOW';
    if (lang == 'es-ES'){
        buttonText = 'RESERVA AHORA';
    } 
    $('body').append('<a href="https://fareharbor.com/embeds/book/getyourtouribiza/?full-items=yes&flow=388439" class="fh-fixed--side fh-shape--round fh-icon--cal fh-button-true-flat-orange">'+buttonText+'</a>');
  });
</script>
<script>
	jQuery(document).ready(function($){
	if (window.location.pathname.indexOf('/free-tour-sant-antoni-de-pormany/') > -1 || window.location.pathname.indexOf('/kostenlos-tour-sant-antoni-de-pormany/') > -1 || window.location.pathname.indexOf('/tour-gratuit-de-sant-antoni-de-pormany/') > -1 || window.location.pathname.indexOf('/en/free-tour-sant-antoni-de-pormany/') > -1 || window.location.pathname.indexOf('/free-tour-ibiza/') > -1){
      	$('.fh-fixed--side').remove();
	};
});
</script>






import java.util.*;
 class Main{
     public static void main(String[] args) {
         Scanner sc = new Scanner(System.in);
        System.out.print("Enter a website: ");
        String website = sc.next();
        if(website.endsWith(".com")){
            System.out.println("This is a commercial website");

      }else if(website.endsWith(".org")){
             System.out.println("This is an organization website");
       }else if(website.endsWith(".in")){
           System.out.println("This is an indian website");
         }
     }
 }
Query query = new Query();
            QueryBuildDataSource qbds , qbdsCheck;
            SysTableLookup _sysTableLookup = SysTableLookup::newParameters(tableNum(PurchReqTable),This);

            qbds= query.addDataSource(tableNum(PurchReqTable));

            qbds.addRange(fieldNum(PurchReqTable , RequisitionStatus)).value(enum2Str(PurchReqRequisitionStatus::Approved));
            qbds.addRange(fieldNum(PurchReqTable , NW_RequestCategory)).value(enum2Str(NW_RequestCategory::RFP_RFQ));

            qbdsCheck = qbds.addDataSource(tableNum(PurchRFQCaseTable));
            qbdsCheck.addLink(fieldNum(PurchReqTable , PurchReqId) ,fieldNum(PurchRFQCaseTable , PurchReqId));
            qbdsCheck.joinMode(JoinMode::NoExistsJoin);
           

            _sysTableLookup.parmQuery(query);
            _sysTableLookup.addLookupfield(fieldNum(PurchReqTable, PurchReqId));
            _sysTableLookup.addLookupfield(fieldNum(PurchReqTable, PurchReqName ));

            _sysTableLookup.performFormLookup();
#include <iostream>
using namespace std;

int main() {

    cout << "Enter a positive number: ";
    int number;
    cin >> number;

    if (number < 0)
        cout << "Error! Number is not positive";
    else {
        int factorial = 1;
        for (int i = 1; i<=number; i++)
             factorial = factorial * i;  // factorial *= i
        cout << "The factorial of " << number << ": " << factorial;
    }


    return 0;
}
#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef double dl;

#define endl "\n"
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define fraction() cout.unsetf(ios::floatfield); cout.precision(10); cout.setf(ios::fixed,ios::floatfield);

int main()
{
   int n;
   cin>>n;
   int arr[n];int b[n];
   int max=0;
   for(int i=0;i<n;i++){
cin>>arr[i];
if(arr[i]>max)max=arr[i];
   }
int count_arr[max+1];
for(int i=0;i<=max;i++){
count_arr[i]=0;
}
for(int i=0;i<n;i++){
count_arr[arr[i]]++;
}
for(int i=1;i<=max;i++){
count_arr[i]=count_arr[i]+count_arr[i-1];
}
for(int i=n-1;i>=0;i--){
    b[--count_arr[arr[i]]]=arr[i];
}
for(int i=0;i<n;i++){
    cout<<b[i]<<" ";
}
       return 0;
}

function mynew_product_subcategories( $args = array() ) {
	$parentid = get_queried_object_id();
	$args = array(
	    'parent' => $parentid
	);
	$terms = get_terms( 'product_cat', $args );
	if ( $terms ) {   
	    echo '<ul class="product-cats">';
	        foreach ( $terms as $term ) {              
	            echo '<li class="category">';                        
	                woocommerce_subcategory_thumbnail( $term ); 
	                echo '<h2>';
	                    echo '<a href="' .  esc_url( get_term_link( $term ) ) . '" class="' . $term->slug . '">';
	                        echo $term->name;
	                    echo '</a>';
	                echo '</h2>';                                                        
	            echo '</li>';                                                        
	    }
	    echo '</ul>';
	}
}
 
add_action( 'woocommerce_before_shop_loop', 'mynew_product_subcategories', 50 );
Function COUNTConditionColorCells(CellsRange As Range, ColorRng As Range)
'make the worksheet always update
Application.Volatile
'define my variables

Dim Work As Boolean
Dim dbw As String
Dim CFCELL As Range
Dim CF1 As Single
Dim CF2 As Double
Dim CF3 As Long

Work = False
'for the first conditional format to the number of conditions in the range
For CF1 = 1 To CellsRange.FormatConditions.Count
    'if the first condition colour is in the range then start counting
    If CellsRange.FormatConditions(CF1).Interior.ColorIndex = ColorRng.Interior.ColorIndex Then
    Work = True
Exit For
    End If
Next CF1
CF2 = 0
CF3 = 0
If Work = True Then
For Each CFCELL In CellsRange
    'count the colours in the range
    dbw = CFCELL.FormatConditions(CF1).Formula1
    dbw = Application.ConvertFormula(dbw, xlA1, xlR1C1)
    dbw = Application.ConvertFormula(dbw, xlR1C1, xlA1, , ActiveCell.Resize(CellsRange.Rows.Count, CellsRange.Columns.Count).Cells(CF3 + 1))
    If Evaluate(dbw) = True Then CF2 = CF2 + 1
        CF3 = CF3 + 1
Next CFCELL
Else
COUNTConditionColorCells = "NO-COLOR"
Exit Function
    End If
COUNTConditionColorCells = CF2
End Function
Description: Originally a popular extension for Firefox, NoScript allows you to selectively enable and disable JavaScript, Java, Flash, and other executable content.
import React, { useEffect, useState } from 'react';

const MyTable = ({ filterValues }) => {
  const [intradata, setIntradata] = useState(null);
  const [data, setData] = useState(null);
  const [selectedGroup, setSelectedGroup] = useState('summary');
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState(null);
  const [columns, setColumns] = useState([]);
  const [validGroups, setValidGroups] = useState([]);
  


  
 // Updated parseDate function
const parseDate = (dateString) => {
  console.log('Parsing date:', dateString);
  try {
    // Check if the date string is in Persian format (contains non-numeric characters)
    const isPersianFormat = /[^\d]/.test(dateString);

    if (isPersianFormat) {
      // Parse Persian date
      const match = dateString.match(/(\d+)/g);

      if (!match || match.length !== 3) {
        throw new Error(`Invalid date format for end_date: ${dateString}`);
      }

      const [year, month, day] = match.map(Number);

      // Convert Persian date to Gregorian date
      const gregorianYear = year + 621; // Add 621 to convert to Gregorian year
      const gregorianMonth = month - 1; // Months are zero-based
      const gregorianDay = day;

      return new Date(gregorianYear, gregorianMonth, gregorianDay);
    } else {
      // Parse Gregorian date
      const [year, month, day] = dateString.match(/(\d+)/g).map(Number);

      return new Date(year, month - 1, day); // Months are zero-based
    }
  } catch (error) {
    console.error('Error parsing date:', error);
    // Log additional information about the problematic date
    console.log('Problematic date:', dateString);

    // Provide a fallback date (e.g., current date) in case of parsing failure
    return new Date();
  } 
};

  useEffect(() => {
    console.log('Selected Group:', selectedGroup);
    console.log('Filter04 Value:', filterValues.filter04);
    const fetchData = async () => {
      try {
        // Fetch intradatacols
        const intradatacolsResponse = await fetch('http://5.34.198.87:8000/api/options/intradatacols');
        if (!intradatacolsResponse.ok) {
          throw new Error(`HTTP error! Status: ${intradatacolsResponse.status}`);
        }

        const intradatacolsData = await intradatacolsResponse.json();
        console.log('API Response for intradatacols:', intradatacolsData);
        setData(intradatacolsData);

        const groups = Object.keys(intradatacolsData.groups);
        setValidGroups(groups);

        const initialColumns = intradatacolsData.groupscolumn[selectedGroup] || [];
        setColumns(initialColumns);

        if (!groups.includes(selectedGroup)) {
          console.error(`Invalid selectedGroup: ${selectedGroup}`);
          return;
        }

        // Fetch intradata
        const intradataResponse = await fetch('http://5.34.198.87:8000/api/options/intradata');
        if (!intradataResponse.ok) {
          throw new Error(`HTTP error! Status: ${intradataResponse.status}`);
        }

        const intradataData = await intradataResponse.json();
        console.log('API Response for intradata:', intradataData);

        setIntradata(intradataData.data);
      } catch (error) {
        console.error('Error fetching data:', error);
        setError(error.message || 'An error occurred while fetching data.');
      } finally {
        setLoading(false);
      }
    };

    fetchData();
  },  [selectedGroup, filterValues.filter04]);

  useEffect(() => {
    
    console.log('intradata:', intradata);
    console.log('columns:', columns);
    console.log('data:', data);
  }, [intradata, columns, data]);

  if (loading) {
    return <div>Loading...</div>;
  }

  if (error) {
    return <div>Error: {error}</div>;
  }

  if (!intradata || !data || !data.groups || !data.groupscolumn) {
    return <div>No data available</div>;
  }

 // Filter the intradata based on filterValues
const filteredData = intradata.filter((item) => {
  // Check filter01
  if (filterValues.filter01 && item.ua_instrument_id.toString().toLowerCase() !== filterValues.filter01.toString().toLowerCase()) {
    console.log(`ua_instrument_id Filter: ${item.ua_instrument_id} !== ${filterValues.filter01}`);
    return false;
  }

  // Check filter02
  if (filterValues.filter02 && item.option_status.toLowerCase() !== filterValues.filter02.toLowerCase()) {
    console.log(`Filter02: ${item.option_status} !== ${filterValues.filter02}`);
    return false;
  }

// Check option type filter (filter04)
if (filterValues.filter04  && item.option_type.toLowerCase().includes(filterValues.filter04.toLowerCase())) {
  console.log(`Option type Filter: ${item.option_type} does not include ${filterValues.filter04}`);
  console.log('Item Option Type:', item.option_type);
console.log('Filter04 Value:', filterValues.filter04);

  return false;
}

  // Check date range filter
  if (filterValues.startDate && filterValues.endDate) {
    const itemDate = parseDate(item.end_date);

    if (isNaN(itemDate.getTime())) {
      console.error(`Invalid date format for end_date: ${item.end_date}`);
      return false;
    }

    const startDate = parseDate(filterValues.startDate);
    const endDate = parseDate(filterValues.endDate);

    console.log('Item Date:', itemDate);
    console.log('Start Date:', startDate);
    console.log('End Date:', endDate);

    console.log('Column Values:', item[columns[0]]);

    return itemDate >= startDate && itemDate <= endDate;
  }
    return true;
  });

  console.log('Filtered Data:', filteredData);
  console.log('Filtered Data for Rendering:', filteredData);
  

  return (
    <div className="container mt-4">
      <div className="btn-group mb-3">
        {validGroups.map((groupKey) => (
          <button
            key={groupKey}
            type="button"
            className={`btn ${selectedGroup === groupKey ? 'bg-blue-500 text-white' : 'bg-blue-200'}`}
            onClick={() => setSelectedGroup(groupKey)}
          >
            {data.groups[groupKey]}
          </button>
        ))}
      </div>

      <div className="table-container overflow-x-auto" style={{ maxHeight: '400px' }}>
        <table className="table-auto w-full border-collapse border border-gray-800">
          <thead className="bg-gray-800 text-white">
            <tr>
              {columns.map((column, index) => (
                <th key={index} className="py-2 px-4 border border-gray-800">
                  {data.fields[column]}
                </th>
              ))}
            </tr>
          </thead>
          <tbody>
            {filteredData.length > 0 ? (
              filteredData.map((item, itemIndex) => (
                <tr key={itemIndex} className={itemIndex % 2 === 0 ? 'bg-gray-100' : 'bg-white'}>
                  {columns.map((column, columnIndex) => (
                    <td key={columnIndex} className="py-2 px-4 border border-gray-800">
                      {item[column] instanceof Date ? item[column].toLocaleDateString() : item[column]}
                    </td>
                  ))}
                </tr>
              ))
            ) : (
              <tr>
                <td colSpan={columns.length} className="py-2 px-4 border border-gray-800">
                  No matching data
                </td>
              </tr>
            )}
          </tbody>
        </table>
      </div>
    </div>
  );
};

export default MyTable;
class A
{
    static int b =10;// static
    int c=20;//Instance
    public static void main(String[] args)
    {
        int a=30;//Local
        System.out.println(a);//local
        System.out.println(A.b);//static
        A r= new A();
        System.out.println(r.c);//Instace 
        
        
        
    }
}
class A
{
    static int b =10;// static
    int c=20;//Instance
    public static void main(String[] args)
    {
        int a=30;//Local
        System.out.println(a);//local
        System.out.println(A.b);//static
        A r= new A();
        System.out.println(r.c);//Instace 
        
        
        
    }
}
GlideSecurityManager.get().enableElevatedRole('security_admin');
doThingOne(function() {
  doThingTwo(function() {
    doThingThree(function() {
      doThingFour(function() {
        // Oh no
      });
    });
  });
});
<script>
document.addEventListener('DOMContentLoaded', function() {
  // Select all <a> tags with the specified href and class
    var links = document.querySelectorAll('a[href="https://fareharbor.com/embeds/book/vrxtra/?full-items=yes"].wp-block-button__link');
  links.forEach(function(link) {
    link.removeAttribute('onclick');
  });
});
</script>
class B 
{
    public static void main(String[] args)
    {
       int a = 1900;
       Integer b=Integer.valueOf(a);
       System.out.println(a+b);
    }
}
class B 
{
    public static void main(String[] args)
    {
       int a = 1900;
       Integer b=Integer.valueOf(a);
       System.out.println(a+b);
    }
}
class B 
{
    public static void main(String[] args)
    {
       int a = 1900;
       Integer b=Integer.valueOf(a);
       System.out.println(a+b);
    }
}
class F
{
    public static void main(String[] args)
    {
        Integer a = new Integer(100);
        int b=a.intValue();
        System.out.println(a+b);
    }
}
<?php

namespace MIN\MinSitecore\Hooks;

use TYPO3\CMS\Core\Utility\DebugUtility;
use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

class CkeditorConfigHook {

    public function process(array $parameters, \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer) {
        $typo3Version = VersionNumberUtility::getNumericTypo3Version();

        if (version_compare($typo3Version, '11.5', '<')) {
            // Für TYPO3-Versionen vor 11.0
            $configFile = 'EXT:min_sitecore/Configuration/RTE/min.yaml';
        } else {
            // Für TYPO3 11.0 und höher
            $configFile = 'EXT:min_sitecore/Configuration/RTE/main_v5.yaml';
        }

        // Lade die CKEditor-Konfiguration
        $this->loadCkeditorConfig($configFile);
    }

    protected function loadCkeditorConfig($configFile) {
        // Hier die Logik implementieren, um die YAML-Konfigurationsdatei zu laden
        // Möglicherweise müssen Sie die geladene Konfiguration mit der globalen RTE-Konfiguration zusammenführen
    }
}
class CkeditorConfigHook {

    public function process(array $parameters, \TYPO3\CMS\Core\Page\PageRenderer $pageRenderer) {
        $typo3Version = VersionNumberUtility::getNumericTypo3Version();
        // DebugUtility::debug($typo3Version, 'Aktuelle TYPO3-Version');
        if (version_compare($typo3Version, '11.5', '<')) {
            // Load CKEditor 4 configuration
            $this->loadCkeditor4Config($pageRenderer);
        } else {
            // Load CKEditor 5 configuration
            $this->loadCkeditor5Config($pageRenderer);
        }
    }
    static function loadCkeditor4Config($pageRenderer) {
        $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['min'] = 'FILE:EXT:min_sitecore/Configuration/RTE/min.yaml';
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('RTE.default.preset = min');
        // DebugUtility::debug('Lade CKEditor 4 Konfiguration', 'CKEditor Konfiguration');
    }
    static function loadCkeditor5Config($pageRenderer) {
        $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['min'] = 'FILE:EXT:min_sitecore/Configuration/RTE/main_v5.yaml';
        \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('RTE.default.preset = min');
        // DebugUtility::debug('Lade CKEditor 5 Konfiguration', 'CKEditor Konfiguration');
    }
}
 Name _attributeName = 'CostCenter';
DimensionAttributeValueSetStorage dimStorage;
        dimStorage = DimensionAttributeValueSetStorage::find( PurchTable::find('000030').DefaultDimension);
        str dem = dimStorage.getDisplayValueByDimensionAttribute(DimensionAttribute::findByName(_attributeName).RecId);
        
.div{
left: calc(-50vw - -50%);
position: relative;
width: 100vw;
}
.expanding-div {
    width: 200px;
    overflow: hidden;
    max-height: 0; /* Initial max height */
    transition: max-height 0.5s ease; /* Animation transition property */
    border: 1px solid #ccc;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.expanding-div:hover {
    max-height: 500px; /* Adjust the max height as needed */
}
<link rel="preconnect" href="https://fonts.googleapis.com">

<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>

<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap" rel="stylesheet">
# Handle pagination with Selenium
# Scrape Website (www.audible.com)

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException
import pandas as pd
import time

path = r"C:\Drivers\chromedriver-win64\chromedriver.exe"
website = "https://www.audible.com/search"

# Use the Service class to specify the path to chromedriver.exe
service = Service(executable_path=path)

# Use ChromeOptions for additional configurations
options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)

# Initialize the WebDriver with the specified service and options
driver = webdriver.Chrome(service=service, options=options)

# Navigate to the specific website
driver.get(website)

# Wait for some time to ensure the page is loaded
time.sleep(5)

try:
    # Wait for the container to be present
    container = WebDriverWait(driver, 10).until(
        EC.presence_of_element_located((By.CLASS_NAME, 'adbl-impression-container'))
    )

    # Wait for the products to be present within the container
    products = WebDriverWait(container, 10).until(
        EC.presence_of_all_elements_located((By.XPATH, './/li[contains(@class, "productListItem")]'))
    )

    book_title = []
    author_name = []
    run_time = []
    release_date = []

    for product in products:
        try:
            # Wait for the book title element to be present within each product
            book_title_elem = WebDriverWait(product, 5).until(
                EC.presence_of_element_located((By.XPATH, './/h3[contains(@class, "bc-heading")]'))
            )

            # Append book title
            book_title.append(book_title_elem.text)
            
            # Append author name
            author_name_elem = product.find_element(By.XPATH, './/li[contains(@class, "authorLabel")]')
            author_name.append(author_name_elem.text)

            # Append run time
            run_time_elem = product.find_element(By.XPATH, './/li[contains(@class, "runtimeLabel")]')
            run_time.append(run_time_elem.text)

            # Append release date
            release_date_elem = product.find_element(By.XPATH, './/li[contains(@class, "releaseDateLabel")]')
            release_date.append(release_date_elem.text)

        except TimeoutException:
            print("Timeout occurred while waiting for element within product.")
            # Handle the timeout situation here (e.g., skip this product or log the issue)

    # Create DataFrame and save to CSV
    df = pd.DataFrame({'book_title': book_title,
                       'author_name': author_name,
                       'run_time': run_time,
                       'release_date': release_date})

    df.to_csv('amazon_audible.csv', index=False)
    print(df)

except TimeoutException:
    print("Timeout occurred while waiting for container element.")
    # Handle the timeout situation here (e.g., retry navigating to the page or log the issue)

finally:
    # Quit the driver
    driver.quit()

# Import necessary libraries
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
import pandas as pd
from selenium.common.exceptions import NoSuchElementException, TimeoutException

# Set the path to chromedriver.exe
path = r"C:\Drivers\chromedriver-win64\chromedriver.exe"
website = "https://www.adamchoi.co.uk/overs/detailed"

# Use the Service class to specify the path to chromedriver.exe
service = Service(executable_path=path)

# Use ChromeOptions for additional configurations
options = webdriver.ChromeOptions()

# Add the --headless option to run Chrome in headless mode (optional)
# options.add_argument("--headless")

# Add the --detach option to keep the browser open after the script finishes
options.add_experimental_option("detach", True)

# Initialize the WebDriver with the specified service and options
driver = webdriver.Chrome(service=service, options=options)

# Navigate to the specified website
driver.get(website)

try:
    # Wait for the "All matches" button to be clickable
    all_matches_button = WebDriverWait(driver, 10).until(
        EC.element_to_be_clickable((By.XPATH, '//label[@analytics-event="All matches"]'))
    )

    # Click on the "All matches" button
    all_matches_button.click()

    # Wait for the matches to load (adjust the timeout as needed)
    WebDriverWait(driver, 10).until(
        EC.presence_of_all_elements_located((By.TAG_NAME, "tr"))
    )

    # Get all match elements
    matches = driver.find_elements(By.TAG_NAME, "tr")

    date = []
    home_team = []
    score = []
    away_team = []

    # Extract data from each match
    for match in matches:
        date.append(match.find_element("xpath", "./td[1]").text)
        home_team.append(match.find_element("xpath", "./td[2]").text)
        score.append(match.find_element("xpath", "./td[3]").text)
        away_team.append(match.find_element("xpath", "./td[4]").text)

except (NoSuchElementException, TimeoutException) as e:
    print(f"Error: {e}")

finally:
    # Close the WebDriver when you're done
    driver.quit()

# Create a DataFrame from the scraped data
df = pd.DataFrame({'date': date,
                   'home_team': home_team,
                   'score': score,
                   'away_team': away_team})

# Save the DataFrame to a CSV file
df.to_csv('football_data.csv', index=False)

# Print the DataFrame
print(df)
# ---------------------------    Chrome   ---------------------------------

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
import pandas as pd
import time

path = r"C:\Drivers\chromedriver-win64\chromedriver.exe"
website = "https://www.adamchoi.co.uk/overs/detailed"

# Use the Service class to specify the path to chromedriver.exe
service = Service(executable_path=path)

# Use ChromeOptions for additional configurations
options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)

# Initialize the WebDriver with the specified service and options
driver = webdriver.Chrome(service=service, options=options)

# Navigate to the specified website
driver.get(website)

all_matches_button = driver.find_element("xpath", '//label[@analytics-event="All matches"]')
all_matches_button.click()

dropdown = Select(driver.find_element(By.ID, "country"))
dropdown.select_by_visible_text('Spain')

time.sleep(3)

matches = driver.find_elements(By.TAG_NAME, "tr")

date = []
home_team = []
score = []
away_team = []

for match in matches:
    date.append(match.find_element("xpath", "./td[1]").text)
    home_team.append(match.find_element("xpath", "./td[2]").text)
    score.append(match.find_element("xpath", "./td[3]").text)
    away_team.append(match.find_element("xpath", "./td[4]").text)

# Close the WebDriver when you're done
driver.quit()

df = pd.DataFrame({'date': date,
                   'home_team': home_team,
                   'score': score,
                   'away_team': away_team})
df.to_csv('football_data.csv', index=False)
print(df)
# ---------------------------    Chrome   ---------------------------------

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By

path = r"C:\Drivers\chromedriver-win64\chromedriver.exe"
website = "https://www.adamchoi.co.uk/overs/detailed"

# Use the Service class to specify the path to chromedriver.exe
service = Service(executable_path=path)

# Use ChromeOptions for additional configurations
options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)

# Initialize the WebDriver with the specified service and options
driver = webdriver.Chrome(service=service, options=options)

# Navigate to the specified website
driver.get(website)

all_matches_button = driver.find_element("xpath", '//label[@analytics-event="All matches"]')
all_matches_button.click()

matches = driver.find_elements(By.TAG_NAME, "tr")

date = []
home_team = []
score = []
away_team = []

for match in matches:
    date.append(match.find_element("xpath", "./td[1]").text)
    home_team.append(match.find_element("xpath", "./td[2]").text)
    home = match.find_element("xpath","./td[2]").text
    print(home)
    score.append(match.find_element("xpath", "./td[3]").text)
    away_team.append(match.find_element("xpath", "./td[4]").text)

# Close the WebDriver when you're done
# driver.quit()

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.support.ui import Select
from selenium.webdriver.common.by import By
import pandas as pd
import time

path = r"C:\Drivers\chromedriver-win64\chromedriver.exe"
website = "https://www.adamchoi.co.uk/overs/detailed"

# Use the Service class to specify the path to chromedriver.exe
service = Service(executable_path=path)

# Use ChromeOptions for additional configurations
options = webdriver.ChromeOptions()
options.add_experimental_option("detach", True)

# Initialize the WebDriver with the specified service and options
driver = webdriver.Chrome(service=service, options=options)

# Navigate to the specified website
driver.get(website)

all_matches_button = driver.find_element("xpath", '//label[@analytics-event="All matches"]')
all_matches_button.click()

dropdown = Select(driver.find_element(By.ID, "country"))
dropdown.select_by_visible_text('Spain')

time.sleep(3)

matches = driver.find_elements(By.TAG_NAME, "tr")

date = []
home_team = []
score = []
away_team = []

for match in matches:
    date.append(match.find_element("xpath", "./td[1]").text)
    home_team.append(match.find_element("xpath", "./td[2]").text)
    score.append(match.find_element("xpath", "./td[3]").text)
    away_team.append(match.find_element("xpath", "./td[4]").text)

# Close the WebDriver when you're done
driver.quit()

df = pd.DataFrame({'date': date,
                   'home_team': home_team,
                   'score': score,
                   'away_team': away_team})
df.to_csv('football_data.csv', index=False)
print(df)
import React, { useState } from 'react';

const DateFilter = ({ onFilterChange }) => {
  const [startDate, setStartDate] = useState('');
  const [endDate, setEndDate] = useState('');

  const handleFilterClick = () => {
    // Convert the selected dates to timestamps or any format that matches your API
    const startTimestamp = startDate ? new Date(startDate).getTime() : null;
    const endTimestamp = endDate ? new Date(endDate).getTime() : null;

    // Call the callback function to pass the filter values to the parent component
    onFilterChange({ startDate: startTimestamp, endDate: endTimestamp });
  };

  return (
    <div>
      <label>Start Date:</label>
      <input type="date" value={startDate} onChange={(e) => setStartDate(e.target.value)} />

      <label>End Date:</label>
      <input type="date" value={endDate} onChange={(e) => setEndDate(e.target.value)} />

      <button onClick={handleFilterClick}>Apply Filter</button>
    </div>
  );
};

export default DateFilter;
import React, { useEffect, useState } from 'react';

const MyTable = ({ filterValues }) => {
  const [intradata, setIntradata] = useState(null);
  const [data, setData] = useState(null);
  const [selectedGroup, setSelectedGroup] = useState('summary');
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState(null);
  const [columns, setColumns] = useState([]);
  const [validGroups, setValidGroups] = useState([]);

  useEffect(() => {
    const fetchData = async () => {
      try {
        // Fetch intradatacols
        const intradatacolsResponse = await fetch('http://5.34.198.87:8000/api/options/intradatacols');
        if (!intradatacolsResponse.ok) {
          throw new Error(`HTTP error! Status: ${intradatacolsResponse.status}`);
        }

        const intradatacolsData = await intradatacolsResponse.json();
        console.log('API Response for intradatacols:', intradatacolsData);
        setData(intradatacolsData);

        const groups = Object.keys(intradatacolsData.groups);
        setValidGroups(groups);

        const initialColumns = intradatacolsData.groupscolumn[selectedGroup] || [];
        setColumns(initialColumns);

        if (!groups.includes(selectedGroup)) {
          console.error(`Invalid selectedGroup: ${selectedGroup}`);
          return;
        }

        // Fetch intradata
        const intradataResponse = await fetch('http://5.34.198.87:8000/api/options/intradata');
        if (!intradataResponse.ok) {
          throw new Error(`HTTP error! Status: ${intradataResponse.status}`);
        }

        const intradataData = await intradataResponse.json();
        console.log('API Response for intradata:', intradataData);

        setIntradata(intradataData.data);
      } catch (error) {
        console.error('Error fetching data:', error);
        setError(error.message || 'An error occurred while fetching data.');
      } finally {
        setLoading(false);
      }
    };

    fetchData();
  }, [selectedGroup]);

  useEffect(() => {
    console.log('intradata:', intradata);
    console.log('columns:', columns);
    console.log('data:', data);
  }, [intradata, columns, data]);

  if (loading) {
    return <div>Loading...</div>;
  }

  if (error) {
    return <div>Error: {error}</div>;
  }

  if (!intradata || !data || !data.groups || !data.groupscolumn) {
    return <div>No data available</div>;
  }

  // Filter the intradata based on filterValues
  const filteredData = intradata.filter((item) => {
    // Check filter01
    if (filterValues.filter01 && item.ua_instrument_id.toString().toLowerCase() !== filterValues.filter01.toString().toLowerCase()) {
      console.log(`ua_instrument_id Filter: ${item.ua_instrument_id} !== ${filterValues.filter01}`);
      return false;
    }

    // Custom function to parse date in the format "yyyyMMdd"
const parseCustomDate = (dateString) => {
  const year = dateString.substr(0, 4);
  const month = dateString.substr(4, 2) - 1; // Months are zero-based
  const day = dateString.substr(6, 2);

  return new Date(year, month, day);
};

// Check date range filter
if (filterValues.startDate && filterValues.endDate) {
  const itemDate = parseCustomDate(item.end_date); // Parse using custom function

  if (isNaN(itemDate.getTime())) {
    console.error(`Invalid date format for end_date: ${item.end_date}`);
    return false;
  }

  const startDate = parseInt(filterValues.startDate, 10);
  const endDate = parseInt(filterValues.endDate, 10);

  console.log('Item Date:', itemDate);
  console.log('Start Date:', startDate);
  console.log('End Date:', endDate);

  console.log('Column Values:', item[columns[0]]);

  return itemDate >= startDate && itemDate <= endDate;
}
return true;
});

console.log('Filtered Data:', filteredData);
  console.log('Filtered Data for Rendering:', filteredData);

return (
<div className="container mt-4">
  <div className="btn-group mb-3">
    {validGroups.map((groupKey) => (
      <button
        key={groupKey}
        type="button"
        className={`btn ${selectedGroup === groupKey ? 'bg-blue-500 text-white' : 'bg-blue-200'}`}
        onClick={() => setSelectedGroup(groupKey)}
      >
        {data.groups[groupKey]}
      </button>
    ))}
  </div>

  <div className="table-container overflow-x-auto" style={{ maxHeight: '400px' }}>
    <table className="table-auto w-full border-collapse border border-gray-800">
      <thead className="bg-gray-800 text-white">
        <tr>
          {columns.map((column, index) => (
            <th key={index} className="py-2 px-4 border border-gray-800">
              {data.fields[column]}
            </th>
          ))}
        </tr>
      </thead>
      <tbody>
        {filteredData.length > 0 ? (
          filteredData.map((item, itemIndex) => (
            <tr key={itemIndex} className={itemIndex % 2 === 0 ? 'bg-gray-100' : 'bg-white'}>
              {columns.map((column, columnIndex) => (
                <td key={columnIndex} className="py-2 px-4 border border-gray-800">
                  {item[column] instanceof Date ? item[column].toLocaleDateString() : item[column]}
                </td>
              ))}
            </tr>
          ))
        ) : (
          <tr>
            <td colSpan={columns.length} className="py-2 px-4 border border-gray-800">
              No matching data
            </td>
          </tr>
        )}
      </tbody>
    </table>
  </div>
</div>
);
};

export default MyTable;
SELECT
SubscriberKey, EmailAddress, Consent_Level_Summary__c, Region, LanguageCode

FROM (
SELECT
DISTINCT LOWER(Email__c) AS EmailAddress, c.Id AS SubscriberKey, c.Consent_Level_Summary__c, 
CASE WHEN i.Region__c IS NOT NULL THEN i.Region__c ELSE lkup.Region END AS Region,
CASE WHEN c.Language__c IS NOT NULL THEN c.Language__c END AS LanguageCode, 

ROW_NUMBER() OVER(PARTITION BY c.ID ORDER BY i.LastModifiedDate DESC) as RowNum

FROM ep_mr_en_us_w170049_MASTER mstr 
JOIN ent.Interaction__c_Salesforce i ON LOWER(mstr.EmailAddress) = LOWER(i.Email__c)
JOIN ent.Contact_Salesforce_1 c ON LOWER(c.Email) = LOWER(i.Email__c)
INNER JOIN ENT.CountryCode_Language_Lookup lkup ON mstr.Mailing_Country__c = lkup.CountryCode

WHERE
    mstr.EmailAddress IS NOT NULL
)t2

WHERE RowNum = 1
star

Tue Feb 06 2024 21:07:43 GMT+0000 (Coordinated Universal Time) https://bs2site.gl/roundcube/program/js/jstz.min.js?s

@fathulla666

star

Tue Feb 06 2024 21:06:09 GMT+0000 (Coordinated Universal Time) https://bs2site.gl/roundcube/program/js/common.min.js?s

@fathulla666

star

Tue Feb 06 2024 19:08:08 GMT+0000 (Coordinated Universal Time)

@darshcode #excel

star

Tue Feb 06 2024 17:56:38 GMT+0000 (Coordinated Universal Time)

@jrg_300i #undefined

star

Tue Feb 06 2024 16:56:01 GMT+0000 (Coordinated Universal Time) https://www.w3schools.com/html/tryit.asp?filename

@jrg_300i #undefined

star

Tue Feb 06 2024 13:03:33 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/650162/why-cant-the-switch-statement-be-applied-to-strings

@tarangit #cpp #switch_alternative_for #string

star

Tue Feb 06 2024 11:00:15 GMT+0000 (Coordinated Universal Time) https://likeedownloader.com/

@Love_Code

star

Tue Feb 06 2024 10:51:04 GMT+0000 (Coordinated Universal Time) https://github.com/studio-freight/lenis

@Zohaib77

star

Tue Feb 06 2024 10:30:36 GMT+0000 (Coordinated Universal Time) https://github.com/studio-freight/lenis

@Zohaib77

star

Tue Feb 06 2024 10:27:45 GMT+0000 (Coordinated Universal Time)

@Zohaib77 #html #css #javascript

star

Tue Feb 06 2024 09:50:35 GMT+0000 (Coordinated Universal Time)

@oce1907

star

Tue Feb 06 2024 09:40:22 GMT+0000 (Coordinated Universal Time)

@ff1892

star

Tue Feb 06 2024 06:22:51 GMT+0000 (Coordinated Universal Time) https://stackoverflow.com/questions/60689743/factorial-code-does-not-return-product-of-integer-and-all-integers-before-it

@Mad_Hatter #python #forloops

star

Mon Feb 05 2024 18:33:37 GMT+0000 (Coordinated Universal Time) https://support.box.com/hc/en-us/requests/3027163?page

@bcjacob

star

Mon Feb 05 2024 16:35:13 GMT+0000 (Coordinated Universal Time)

@Shira

star

Sun Feb 04 2024 13:28:39 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Sat Feb 03 2024 23:06:57 GMT+0000 (Coordinated Universal Time)

@sinasina1368 #c++

star

Sat Feb 03 2024 17:59:21 GMT+0000 (Coordinated Universal Time)

@Masruk #c++

star

Sat Feb 03 2024 15:10:39 GMT+0000 (Coordinated Universal Time) https://wpinsideblog.com/woocommerce/podkategorii-arxiv/comment-page-2/#comments

@markyuri

star

Fri Feb 02 2024 17:46:16 GMT+0000 (Coordinated Universal Time) https://www.youtube.com/watch?v=NflzVqndxW4&t=172s

@darshcode #excel

star

Fri Feb 02 2024 14:07:43 GMT+0000 (Coordinated Universal Time) https://codepen.io/pen/

@hyperlinc #undefined

star

Fri Feb 02 2024 14:04:32 GMT+0000 (Coordinated Universal Time) https://codepen.io/pen/

@hyperlinc #undefined

star

Fri Feb 02 2024 13:15:11 GMT+0000 (Coordinated Universal Time) https://filetransfer.io/data-package/FoEYUA55#link

@Jevin2090

star

Fri Feb 02 2024 12:44:18 GMT+0000 (Coordinated Universal Time) https://chat.openai.com/c/67442e8f-2540-469e-a8fa-9fdb4a1e2ee3

@Ashutosh56

star

Fri Feb 02 2024 10:44:47 GMT+0000 (Coordinated Universal Time)

@taharjt

star

Fri Feb 02 2024 08:48:02 GMT+0000 (Coordinated Universal Time) https://www.objgen.com/json/local/design

@Kamalesh_Code

star

Fri Feb 02 2024 05:47:08 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Fri Feb 02 2024 05:47:08 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Thu Feb 01 2024 22:43:53 GMT+0000 (Coordinated Universal Time)

@RahmanM

star

Thu Feb 01 2024 17:35:58 GMT+0000 (Coordinated Universal Time) https://stasonmars.ru/javascript/polnoe-ponimanie-syncronnogo-i-asyncronnogo-javascript-s-async-await/

@kaipaeff

star

Thu Feb 01 2024 14:52:16 GMT+0000 (Coordinated Universal Time)

@Shira

star

Thu Feb 01 2024 13:54:58 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Thu Feb 01 2024 13:54:28 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Thu Feb 01 2024 13:54:27 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Thu Feb 01 2024 13:36:24 GMT+0000 (Coordinated Universal Time)

@E23CSEU1151

star

Thu Feb 01 2024 12:12:18 GMT+0000 (Coordinated Universal Time)

@madeinnature

star

Thu Feb 01 2024 12:02:30 GMT+0000 (Coordinated Universal Time)

@MinaTimo

star

Wed Jan 31 2024 22:54:45 GMT+0000 (Coordinated Universal Time)

@davidmchale #css #full-width #breakout

star

Wed Jan 31 2024 22:53:51 GMT+0000 (Coordinated Universal Time)

@davidmchale #css #height #animate

star

Wed Jan 31 2024 20:02:32 GMT+0000 (Coordinated Universal Time) https://app.unbounce.com/5593455/global_scripts/046bfc8e-1b1d-415c-ad4d-36da4799d284

@JimmyM #undefined

star

Wed Jan 31 2024 19:54:47 GMT+0000 (Coordinated Universal Time)

@mnis00014 #python #selenium #scraping

star

Wed Jan 31 2024 19:50:47 GMT+0000 (Coordinated Universal Time)

@mnis00014 #python #selenium #scraping

star

Wed Jan 31 2024 19:50:21 GMT+0000 (Coordinated Universal Time)

@mnis00014 #python #selenium #scraping

star

Wed Jan 31 2024 19:49:52 GMT+0000 (Coordinated Universal Time)

@mnis00014 #python #selenium #scraping

star

Wed Jan 31 2024 19:43:56 GMT+0000 (Coordinated Universal Time)

@mnis00014 #python #selenium #scraping

star

Wed Jan 31 2024 19:29:42 GMT+0000 (Coordinated Universal Time)

@taharjt

star

Wed Jan 31 2024 19:27:42 GMT+0000 (Coordinated Universal Time)

@taharjt

star

Wed Jan 31 2024 18:12:27 GMT+0000 (Coordinated Universal Time)

@shirnunn

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension