Snippets Collections
private func deviceTokenDataToString(_ deviceToken: Data) -> String {
        let tokenChars = (deviceToken as NSData).bytes.assumingMemoryBound(to: CChar.self)
        var tokenString = ""

        for i in 0..<deviceToken.count {
            tokenString += String(format: "%02.2hhx", arguments: [tokenChars[i]])
        }

        return tokenString
    }

   func updateDeviceToken() {
        guard let deviceToken: Data = dataStorageService.value(for: .pushDeviceToken),
            deviceToken.isEmpty == false else {
                return
        }
        let stringPushToken = deviceTokenDataToString(deviceToken)
        mixpanel?.track(event: "Push Token Updated", properties: ["token": stringPushToken])
        peopleObject?.people.set(properties: ["$ios_devices": [stringPushToken]]
        mixpanel?.flush()
    }
import { Directive, ElementRef, Renderer } from '@angular/core';

@Directive({
    selector: '[appChbgcolor]'
})
export class ChangeBgColorDirective {

    constructor(private el: ElementRef, private renderer: Renderer) {
        this.ChangeBgColor('red');
    }

    ChangeBgColor(color: string) {

        this.renderer.setElementStyle(this.el.nativeElement, 'color', color);
    }
}
SELECT c.name AS 'ColumnName',t.name AS 'TableName'
FROM    sys.columns c
JOIN    sys.tables  t ON c.object_id = t.object_id
WHERE   c.name LIKE '%ReportName%'
ORDER BY  TableName, ColumnName;
=  Table.AddColumn(#"Changed Type4", "Colour", each if [Service result percentage] = null then "#D3D3D3" else if  [Service result percentage] >= [Benchmark] then "#98FB98" else if [Service result percentage] < [Benchmark] and [Service result percentage] >= [Group Average] then "#FFFACD" else if [Service result percentage] < [Benchmark] and [Service result percentage] < [Group Average] and [Benchmark] - [Service result percentage] <= 10 then "#F08080" else if [Service result percentage] < [Benchmark] and [Service result percentage] < [Group Average] and [Benchmark] - [Service result percentage] > 10 then "##FF0000" CB2")
@charset "UTF-8";
*,
*::before,
*::after {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    -webkit-animation-delay: -1ms;
    animation-delay: -1ms;
    -webkit-animation-duration: 1ms;
    animation-duration: 1ms;
    -webkit-animation-iteration-count: 1;
    animation-iteration-count: 1;
    background-attachment: initial;
    scroll-behavior: auto;
    transition-delay: 0s;
    transition-duration: 0s;
  }
}
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  cursor: default;
  -moz-tab-size: 4;
  -o-tab-size: 4;
  tab-size: 4;
  margin: 0;
  padding: 0;
  border: none;
  font: inherit;
  font-size: 100%;
  vertical-align: baseline;
}
html {
  font-family: system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Ubuntu,
    Cantarell,
    "Noto Sans",
    sans-serif,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    "Noto Color Emoji";
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: inherit;
  background-color: inherit;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
[tabindex="-1"]:focus:not(:focus-visible) {
  outline: 0;
}
hr {
  margin: 1rem 0;
  color: inherit;
  background-color: currentColor;
  border: 0;
  opacity: 0.25;
  overflow: visible;
}
hr:not([size]) {
  height: 1px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 500;
  line-height: 1.2;
}
h1 {
  font-size: calc(1.375rem + 1.5vw);
}

@media (min-width: 1200px) {
  h1 {
    font-size: 2.5rem;
  }
}
h2 {
  font-size: calc(1.325rem + 0.9vw);
}

@media (min-width: 1200px) {
  h2 {
    font-size: 2rem;
  }
}
h3 {
  font-size: calc(1.3rem + 0.6vw);
}

@media (min-width: 1200px) {
  h3 {
    font-size: 1.75rem;
  }
}
h4 {
  font-size: calc(1.275rem + 0.3vw);
}

@media (min-width: 1200px) {
  h4 {
    font-size: 1.5rem;
  }
}
h5 {
  font-size: 1.25rem;
}
h6 {
  font-size: 1rem;
}
p {
  margin-top: 0;
  margin-bottom: 1rem;
}
abbr[title],
abbr[data-bs-original-title] {
  -webkit-text-decoration: underline dotted;
  text-decoration: underline dotted;
  cursor: help;
  -webkit-text-decoration-skip-ink: none;
  text-decoration-skip-ink: none;
}
address {
  margin-bottom: 1rem;
  font-style: normal;
  line-height: inherit;
}
ol,
ul {
  padding-left: 2rem;
}
ol,
ul,
dl {
  margin-top: 0;
  margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
  margin-bottom: 0;
}
nav li {
  list-style: none;
  padding: 0;
}
nav li::before {
  content: "​";
}
dt {
  font-weight: 700;
}
dd {
  margin-bottom: 0.5rem;
  margin-left: 0;
}
blockquote {
  margin: 0 0 1rem;
}
b,
strong {
  font-weight: bolder;
}
small {
  font-size: 0.875em;
}
mark {
  padding: 0.2em;
  background-color: currentColor;
}
sub,
sup {
  position: relative;
  font-size: 0.75em;
  line-height: 0;
  vertical-align: baseline;
}
sub {
  bottom: -0.25em;
}
sup {
  top: -0.5em;
}
a {
  cursor: pointer;
  color: rgb(51, 51, 225);
  background-color: transparent;
  text-decoration: none;
}
a:hover {
  color: #3434e0;
  text-decoration: underline;
}
a:focus {
  outline: thin dotted;
}
a:not([href]):not(class),
a:not([href]):not([class]):hover {
  cursor: default;
  color: inherit;
  text-decoration: none;
}
a,
area,
button,
input,
label,
select,
summary,
textarea,
[tabindex] {
  touch-action: manipulation;
}
pre,
code,
kbd,
samp {
  font-family: Menlo,
    Consolas,
    "Roboto Mono",
    "Ubuntu Monospace",
    "Noto Mono",
    "Oxygen Mono",
    "Liberation Mono",
    monospace,
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol",
    "Noto Color Emoji";
  font-size: 1em;
}
pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 0.875em;
  overflow: auto;
  -ms-overflow-style: scrollbar;
}
pre code {
  font-size: inherit;
  color: inherit;
  word-break: normal;
}
code {
  font-size: 0.875em;
  color: inherit;
  word-wrap: break-word;
}
a > * {
  color: inherit;
}
kbd {
  padding: 0.2rem 0.4rem;
  font-size: 0.875em;
  color: inherit;
  background-color: inherit;
  border-radius: 0.2rem;
}
kbd kbd {
  padding: 0;
  font-size: 1em;
  font-weight: 700;
}
figure {
  margin: 0 0 1rem;
}
iframe,
img,
input,
select,
textarea {
  height: auto;
  max-width: 100%;
}
audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}
svg:not([fill]) {
  fill: currentColor;
}
svg:not(:root) {
  overflow: hidden;
}
img {
  border: 0;
  -ms-interpolation-mode: bicubic;
}
table {
  caption-side: bottom;
  border-collapse: collapse;
  text-indent: 0;
}
caption {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  color: inherit;
  text-align: left;
}
th {
  text-align: inherit;
  text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
  border-color: inherit;
  border-style: solid;
  border-width: 0;
}
label {
  display: inline-block;
}
button {
  border-radius: 0;
  text-transform: none;
}
button:focus {
  outline: dotted 1px;
  outline: -webkit-focus-ring-color auto 5px;
}
input,
button {
  overflow: visible;
}
input,
button,
select,
optgroup,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
button,
input,
select,
textarea {
  background-color: transparent;
  border: 1px solid WindowFrame;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  padding: 0.25em 0.375em;
}
button,
select {
  text-transform: none;
}
[role="button"] {
  cursor: pointer;
}
select {
  -moz-appearance: none;
  -webkit-appearance: none;
  text-transform: none;
  word-wrap: normal;
}
select:not([multiple]):not([size]) {
  background-image: "data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='4'%3E%3Cpath d='M4 0h6L7 4'/%3E%3C/svg%3E";
}
::-ms-expand {
  display: none;
}
[list]::-webkit-calendar-picker-indicator {
  display: none;
}
button,
[type="button"],
[type="reset"],
[type="submit"] {
  -webkit-appearance: button;
}
button:not(disabled),
[type="button"]:not(disabled),
[type="reset"]:not(disabled),
[type="submit"]:not(disabled) {
  cursor: pointer;
}
::-webkit-file-upload-button {
  font: inherit;
  -webkit-appearance: button;
}
textarea {
  overflow: auto;
  -ms-overflow-style: scrollbar;
  resize: vertical;
  vertical-align: top;
}
fieldset {
  min-width: 0;
  padding: 0.35em 0.75em 0.625em;
  margin: 0;
  border: 1px solid inherit;
}
legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: calc(1.275rem + 0.3vw);
  line-height: inherit;
  max-width: 100%;
  white-space: normal;
}

@media (max-width: 1200px) {
  legend {
    font-size: 1.5rem;
  }
}
legend + * {
  clear: left;
}
dialog {
  background-color: inherit;
  border: solid;
  color: inherit;
  display: block;
  height: -webkit-fit-content;
  height: -moz-fit-content;
  height: fit-content;
  left: 0;
  margin: auto;
  padding: 1em;
  position: absolute;
  right: 0;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
}
dialog:not([open]) {
  display: none;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
  padding: 0;
}
::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}
::-webkit-input-placeholder {
  color: inherit;
  opacity: 0.54;
}
[type="search"] {
  outline-offset: -2px;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  -moz-appearance: none;
}
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
  direction: ltr;
}
::-webkit-color-swatch-wrapper {
  padding: 0;
}
::-moz-focus-inner {
  padding: 0;
  border-style: none;
}
:-moz-ui-invalid {
  box-shadow: none;
}
:-moz-focusring {
  outline: 1px dotted ButtonText;
}
output {
  display: inline-block;
}
iframe {
  border: none;
}
audio,
canvas,
video {
  display: inline;
  display: inline-block;
  zoom: 1;
  max-width: 100%;
}
audio:not([controls]) {
  display: none;
  height: 0;
}
summary {
  display: list-item;
  cursor: pointer;
}
progress {
  display: inline-block;
  vertical-align: baseline;
}
template {
  display: none;
}
[hidden] {
  display: none;
}
[aria-busy="true"] {
  cursor: progress;
}
[aria-controls] {
  cursor: pointer;
}
[aria-disabled="true"],
[disabled] {
  cursor: not-allowed;
}
[aria-hidden="false"][hidden="false"] {
  display: initial;
}
[aria-hidden="false"][hidden="false"]:not(:focus) {
  clip: rect(0, 0, 0, 0);
  position: absolute;
}
arcpy.management.CopyRaster(in_raster, out_rasterdataset, {config_keyword}, {background_value}, {nodata_value}, {onebit_to_eightbit}, {colormap_to_RGB}, {pixel_type}, {scale_pixel_value}, {RGB_to_Colormap}, {format}, {transform}, {process_as_multidimensional}, {build_multidimensional_transpose})
#your-section-name-here {
  @media screen and (max-width: 640px) {
    .summary-item-list {
      display: -webkit-box;
      display: -webkit-flex;
      display: -ms-flexbox;
      display: flex;
      -webkit-box-orient: vertical;
      -webkit-box-direction: normal;
      -webkit-flex-direction: column;
          -ms-flex-direction: column;
              flex-direction: column;
    }
    .summary-item {
      width: 100%!important;
      margin-bottom: 50px;
    }
    .summary-item:nth-child(n+4) {
      display: none;
    }
    .summary-carousel-pager {
      display: none!important;
    }
  }
  @media screen and (min-width: 641px) {
    .button-block {
      display: none;
    }}}
//Global Variables
@dark-color:#2A282A;
@light-color:#FFFFFF;
@logo-green: #a6d843;
@box-shadow:0px 3px 15px rgba(100, 100, 100, 0.29);


///Global

//button styling
.sqs-block-button-element, .dark-bold .header-actions .btn, {
  background-color:@logo-green !important;
  color:@dark-color !important;
  font-weight: 900;
  text-transform: uppercase;
}

//Mobile Sitewide Queries
/* mobile */
@media screen and (max-width:767px) {
	h1 {
    font-size: calc((3.5 - 1) * 1.2vh + 1rem)!important;
	}
	}

// anchor links offset to deal with fixed menu

@media screen and (min-width: 640px){
  #casestudies, #testimonials, #products{
  margin-top: -90px;
  padding-top: 90px;
  pointer-events: none;
	}
}

/* mobile */
@media screen and (max-width:767px) {
	#casestudies, #testimonials, #products{
  margin-top: -30px;
  padding-top: 30px;
  pointer-events: none;
	}
}




//Styling-------------------------------------------------------------Header
//shadow to the header and reduce padding
.header .header-announcement-bar-wrapper {
 background-color: @dark-color;
  box-shadow: @box-shadow;
  -moz-box-shadow: @box-shadow;
  -webkit-box-shadow: @box-shadow;
  position: relative;
  z-index: 4;
  padding-top: 1.8vw !important;
  padding-bottom: 1.8vw !important;
}


// Center the CODE BLOCK in ------------------------------------------"HERO SECTION"

section[data-section-id="603416b17aacd44d16aec445"] {
  h1{
    margin-top:0;
  }
  #block-yui_3_17_2_1_1614030936450_6608{
    padding-top:0!important;
  }
  p{
    margin-bottom:0;
  }
  #block-yui_3_17_2_1_1614031344386_7315{
    padding-bottom:0 !important;
  }
}


// Center the CODE BLOCK in ------------------------------------------"what we can do for you"
section[data-section-id="6032d3b58e30837700e1846a"], section[data-section-id="6022047755fdbf5e4e4a0e24"] {
  	@media screen and (min-width: 640px) {
      	.sqs-row{
      	display: flex;
      	align-items: center;
      	box-sizing: border-box;
      	justify-content: center;
  	}
 	}	
  
  	.sqs-col-4{
    	background-color:@dark-color;
    	color:white;
  	}
 
  //read the case study color to white
  	.light-bold .sqs-block-html a, .light-bold .read-more-link, .light-bold .entry-excerpt a {
    color: #ffffff !important;
      text-decoration: underline !important;
}
  
  .c-tabs__tab-title{
  		font-size:1.2rem;
    	line-height:2.1rem;
    	font-weight:500;
      	padding:1rem;
  	}
  
  .c-tabs__accordion-tab{
    background-color:#dfdfdb !important;
    border: 1px solid @dark-color !important;
  }
 
  
 }


//Blog Pages Styling------------------------------------ Blog

.blog-item-wrapper .blog-item-title h1.entry-title {
    font-size: calc((3 - 1) * 1.2vw + 1rem);
}

/* mobile */
@media screen and (max-width:767px) {
  .blog-item-wrapper .blog-item-title h1.entry-title {
    font-size: calc((7 - 1) * 1.2vw + 1rem);
}
}
public int[] topKFrequent(int[] nums, int k) {
        ArrayList<LinkedList<Integer>> freqList = new ArrayList<>();
        for (int i = 0; i <= nums.length; i++) {
            freqList.add(new LinkedList<Integer>());
        }
        
        HashMap<Integer, Integer> elementFreq = new HashMap<>();
        for (int i = 0; i < nums.length; i++) {
            if (elementFreq.containsKey(nums[i])){
                elementFreq.put(nums[i], elementFreq.get(nums[i]) + 1);
            }
            else {
                elementFreq.put(nums[i], 1);
            }
        }
        
        Iterator<Integer> elemItr = elementFreq.keySet().iterator();
        while (elemItr.hasNext()) {
            int currKey = elemItr.next();
            freqList.get(elementFreq.get(currKey)).add(currKey);
        }
        
        ArrayList<Integer> intsByFreq = new ArrayList<>();
        for (int i = 0; i < freqList.size(); i++) {            
            LinkedList<Integer> currList = freqList.get(i);
            ListIterator<Integer> currListItr = currList.listIterator(0);
            while (currListItr.hasNext()) {
                intsByFreq.add(currListItr.next());
            }
        }
        
        int[] topK = new int[k];
        int topKIdx = 0;
        for (int i = intsByFreq.size() - 1; i >= intsByFreq.size() - k; i--) {
            topK[topKIdx] = intsByFreq.get(i);
            topKIdx++;
        }
        
        return topK;
    }
<!DOCTYPE html>
<html lang="en">
<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>
    <style>
        
.clase {
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid red;
}
.ejemplo1 {
  white-space: nowrap;
}
.ejemplo2 {
  display: -webkit-box;
  display: -moz-box;
  display: box;
  -webkit-box-orient: vertical;
  -moz-box-orient: vertical;
  box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
       
    </style>
</head>
<body>
    <table>
        <tr><th>Nombre</th></tr>
        <tr>
            <td class="clase ejemplo2 "  style='width:50%'>[POLISACARIDO
                MENINGOCOCICO
                CONJUGADO CON
                TOXOIDE DIFTERICO
                SEROGRUPO A
                4µg&POLISACARIDO
                MENINGOCOCICO
                CONJUGADO CON
                TOXOIDE DIFTERICO
                SEROGRUPO C
                4µg&POLISACARIDO
                MENINGOCOCICO
                CONJUGADO CON
                TOXOIDE DIFTERICO
                SEROGRUPO Y
                4µg&POLISACARIDO
                MENINGOCÓCICO
                CONJUGADO CON
                TOXOIDE DIFTERICO
                SEROGRUPO W-135
                4µg&PROTEINA DE
                TOXOIDE DIFTERICO
                48µg] 1Dosis/0,5ml</td>
        </tr>
        
    </table>
</body>
</html>
setlist: AGE_LIST
1. 18-34 {if $Q4 >= 18 and $Q4 < 35}
2. 35-44 {if $Q4 >= 35 and $Q4 < 45}
3. 45-54 {if $Q4 >= 45 and $Q4 < 55}

setlist: GENAGE_LIST
crosslists: GENDER, AGE_LIST

GENAGE. QUOTA | Gender-Age
type: quotas
optsfrom: GENAGE_LIST
4.  What is your age?
type: text
instruct:<b>[ENTER EXACT AGE]</b>
datatype: number
size: 2
maxlen: 2
dta: 98. REFUSED TO ANSWER
termif: $Q4 < 18 {text: Q4 | Under 18} {id: Q4A}
termif: $Q4 >= 55 {text: Q4 | 55+} {id: Q4B}
termif: anyChecked($Q4,99) {text: Q4 | Refused to answer}

AGE_BREAKS. Age Breaks 
type: radio
invisible: y
1. 18-34 {if $Q4 >= 18 and $Q4 < 35}
2. 35-44 {if $Q4 >= 35 and $Q4 < 45}
3. 45-54 {if $Q4 >= 45 and $Q4 < 55}
-- create the databases
CREATE DATABASE IF NOT EXISTS projectone;

-- create the users for each database
CREATE USER 'projectoneuser'@'%' IDENTIFIED BY 'somepassword';
GRANT CREATE, ALTER, INDEX, LOCK TABLES, REFERENCES, UPDATE, DELETE, DROP, SELECT, INSERT ON `projectone`.* TO 'projectoneuser'@'%';

FLUSH PRIVILEGES;
RUN sed -Ei 's/^(bind-address|log)/#&/' /etc/mysql/my.cnf
split_col = pyspark.sql.functions.split(df['my_str_col'], '-')
df = df.withColumn('NAME1', split_col.getItem(0))
df = df.withColumn('NAME2', split_col.getItem(1))
personObj.name.first; //returns John
personObj.age; //returns 28
personObj.hobbies[1]; //returns writing
let personObj = {
  name: {
    first: 'John',
    last: 'Paul'
  },
  age: 28,
  gender: 'male',
  occupation: 'engineer',
  hobbies: ['gaming', 'writing', 'painting']
}

php artisan migrate:generate enrollee_types --connection=mysql2
box-shadow: 0 2px 4px -1px rgb(0 0 0 / 20%), 0 4px 5px 0 rgb(0 0 0 / 14%), 0 1px 10px 0 rgb(0 0 0 / 12%);
https://ohshitgit.com/

git log --grep="homepage"

//search by part of authors name
git log --author=Matt

//GIT searches last commits - version control - How can I get a list of Git //branches, ordered by most recent commit? - Stack Overflow
git for-each-ref --sort=-committerdate refs/heads/
RegistryKey key;
key = Registry.ClassesRoot.CreateSubKey(@"*\shell\UniSendTo");
string MUIVerb = "Universal Send To";
string ExtendedSubCommandsKey = @"*\shell\UniSendTo\MainMenu";         
key.SetValue("MUIVerb", MUIVerb);
key.SetValue("ExtendedSubCommandsKey",ExtendedSubCommandsKey);
RegistryKey  key1 = Registry.ClassesRoot.CreateSubKey(@"*\shell\UniSendTo\MainMenu");
key1 = Registry.ClassesRoot.CreateSubKey(@"*\shell\UniSendTo\MainMenu\shell");
RegistryKey  key2 = Registry.ClassesRoot.CreateSubKey(@"*\shell\UniSendTo\MainMenu\shell\HomePC");
string MUIVerb1 = "Home PC";
key2.SetValue("MUIVerb",MUIVerb1);
string ip = "192.168.1.22";
key2.SetValue("IP",ip);
RegistryKey key3 = Registry.ClassesRoot.CreateSubKey(@"*\shell\UniSendTo\MainMenu\shell\HomePC\command");
key3.SetValue("",@"H:\ERT\FileTransfer.exe");
[* if (anyChecked($QPURCH,1)) {qq|When you last bought soft drinks, where did you shop?|} else {qq|If you were to buy soft drinks, where would you shop?|} *]
import pickle

class ToDoItem:
    def __init__(self, toDo, priority, dueDate):
        self.toDo = toDo
        self.priority = priority
        self.dueDate = dueDate

    def display(self):
        return (self.toDo + ", " + self.priority + " priority by " + self.dueDate)

    def update(self, field, newValue):
        oldRecord = self.display()
        if field == 1:
            self.toDo = newValue
        elif field == 2:
            self.priority = newValue
        elif field == 3:
            self.dueDate = newValue
        newRecord = self.display()

        print("Updated:\n" + oldRecord + "\nto:\n" + newRecord)
        

def create(todolist):
    newToDo = input("What do you need to do? ")
    newPriority = input("What is the priority? ")
    newDueDate = input("When is the due date? ")
    newToDoItem = ToDoItem(newToDo, newPriority, newDueDate)
    todolist.append(newToDoItem)
    
def display(todolist):
    print("Your to do list: ")
    for i in range(len(todolist)):
        print(str(i+1) + ". " + todolist[i].display())

def update(todolist):
    display(todolist)
    errFlag = True
    while errFlag:
        try:
            position = int(input("Which item number do you want to update? "))
            errFlag = False
        except:
            print("Invalid item number")
    
    fieldToUpdate = promptUserForItem("""Which field do you want to update?
1. To do description
2. Priority
3. Due date
>>> """)
    newValue = input("What is the new value?")
    
    todolist[position-1].update(fieldToUpdate, newValue)
    
def promptUserForItem(promptMsg):
    errFlag = True
    while errFlag:
        try:
            itemSelected = int(input(promptMsg))
            errFlag = False
        except:
            print("Please enter a number")
    return itemSelected


def delete(todolist):
    display(todolist)
    try:
        position = int(input("Which item number do you want to delete? "))
        del todolist[position-1]
        display(todolist)
    except:
        print("Invalid item number")

try:
    myFile = open("todolist2.pickle","rb")
    myList = pickle.load(myFile)
    myFile.close()
except:
    myList = []
command = ""
while command != "exit":
    command = input("""What would you like to do
                    C - create new item
                    V - view to do list
                    U - update the to do item
                    D - delete exisiting item
                    E - exit the program
>>> """).upper()
    if command == "C":
        create(myList)
    elif command == "V":
        display(myList)
    elif command == "U":
        update(myList)        
    elif command == "D":
        delete(myList)
    elif command == "E":
        print("Have a nice day")
        myFile = open("todolist2.pickle","wb")
        pickle.dump(myList,myFile)


<style name="CustomTextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox">
        <item name="android:textColor">@color/white</item>
        <item name="boxStrokeColor">@color/login_text_input</item>
        <item name="startIconTint">@color/login_text_input_icon</item>
        <item name="endIconTint">@color/login_text_input_icon</item>
        <item name="passwordToggleTint">@color/login_text_input_icon</item>
        <item name="android:textColorHint">@color/gray_500_light</item>
        <item name="errorIconTint">@color/red_300</item>
        <item name="errorTextColor">@color/red_300</item>
        <item name="boxStrokeErrorColor">@color/red_300</item>
    </style>

    <style name="CustomAutoCompleteTextInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu">
        <item name="android:textColor">@color/white</item>
        <item name="boxStrokeColor">@color/login_text_input</item>
        <item name="startIconTint">@color/login_text_input_icon</item>
        <item name="endIconTint">@color/login_text_input_icon</item>
        <item name="passwordToggleTint">@color/login_text_input_icon</item>
        <item name="android:textColorHint">@color/gray_500_light</item>
        <item name="errorIconTint">@color/red_300</item>
        <item name="errorTextColor">@color/red_300</item>
        <item name="boxStrokeErrorColor">@color/red_300</item>

<!-- login_text_input.xml -->

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@color/accent_color" android:state_focused="true"/>
    <item android:color="@color/accent_color" android:state_hovered="true"/>
    <item android:color="@color/white"/>
</selector>

<!-- login_text_input_icon.xml -->

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:color="@color/accent_color" android:state_focused="true"/>
    <item android:color="@color/accent_color" android:state_hovered="true"/>
    <item android:color="@color/gray_500_light"/>
</selector>
//Write code that asks the user for 7 integer numbers and display the even ones.

 int[] numbers = new int[10];

            for (int i = 0; i < numbers.Length; i++)
            {
                Console.Write("Enter the number: ");
                numbers[i] = int.Parse(Console.ReadLine()); 
            }

            Console.Write("Even numbers:");
            for (int i = 0; i < numbers.Length; i++)
            {
                
                if(numbers[i] % 2 == 0)
                {
                    Console.Write(" " + numbers[i]);
                    
                }    
            }
<meta name="viewport" content="width=device-width, initial-scale=1.0">
// This is a JS example
var test = "Hello";
console.log(test);
starttable: 5
desc: <Unaided Awareness>
intro: What rental property managers are you aware of?
instructions: Please list as many as you can think of (up to 5).
type: text
rowsfrom: system.1to5
template: show_text_rows.tx
dta: y
dta_text: I don't know any.
required: n 
validate: anyChecked($T5_DTA) or $Q5R1 ne ''
message: Please enter at least one rental property manager you are aware of or select "I don't know."
endtable
gdown https://drive.google.com/uc?id=
function AdditivePersistence(num) { 

    var sum, loop = 0;
    var val1 = num.toString(10).split("").map(function(t){return parseInt(t)});
   
    while (val1.length > 1) {
        sum = 0;
        val1.forEach( function(number) {
            sum = sum + number;
        });
        
        val1 = sum.toString(10).split("").map(function(t){return parseInt(t)});
        loop++;
    } 
    
    return loop;
         
}
/* Hide this on Mobile */
@media screen and (max-width:767px) {
	[data-section-id="enter-id-here"] {
		display: none;
	}
}
/* Hide this on Tablet - Desktop */
@media screen and (min-width:768px) {
	[data-section-id="enter-id2-here"] {
		display: none;
	}
}
<script src="scripts/main.js"></script>
<h1>This is my first heading.</h1>
Squarespace sectionID {
  	@media screen and (min-width: 640px) {
      	.sqs-row{
      	display: flex;
      	align-items: center;
      	box-sizing: border-box;
      	justify-content: center;
  	}
 	}	
#jump-here {
  margin-top: -90px;
  padding-top: 90px;
  pointer-events: none;
}
/* tablet */
@media screen and (max-width:991px) and (min-width:768px) {
/* stacations */
div#block-5e874825130e984bfc011395 h3 {
    font-size: 20px;
}
/* recent published */
div#block-yui_3_17_2_1_1585781296243_6471 h3 {
    font-size: 20px;
}
}
/* mobile */
@media screen and (max-width:767px) {
/* stacations */
div#block-5e874825130e984bfc011395 h3 {
    font-size: 25px;
}
/* recent published */
div#block-yui_3_17_2_1_1585781296243_6471 h3 {
    font-size: 22px;
}
}
// setter
localStorage.setItem('myData', data);
 
// getter
localStorage.getItem('myData');
 
// remove
localStorage.removeItem('myData');
 
// remove all
localStorage.clear();
if (strpos($a, 'are') !== false)
{
    echo 'true';
}
ng g module /main/customer --module=app --route=customer --routing=true
 - Upgrade OS - DONE
 - Make sure icloud turned off - DONE
 - Install 365 physical apps - DONE
 - Transfer data from Imac
 - Transfer data from old Macbook
 - Destroy old Macbook
 - Install Logitech App - DONE
 - Programme keys for calculator - DONE
 - Install whatsapp
 - create guest login - DONE
 - Install flow diagram software - DONE
 - Create shortcuts for all development software - DONE
 
 
 
mkvirtualenv venv (bash)
python3 venv -m venv
# Customize the plot
ax.grid(1, ls='--', color='#777777', alpha=0.5, lw=1)
ax.tick_params(labelsize=12, length=0)
ax.set_axis_bgcolor('w')
# add a legend
leg = plt.legend( ['text'], loc=1 )
fr = leg.get_frame()
fr.set_facecolor('w')
fr.set_alpha(.7)
plt.draw()
 
import pylab as plt
import numpy as np

plt.style.use('ggplot')

fig = plt.figure(1)
ax = plt.gca()

# make some testing data
x = np.linspace( 0, np.pi, 1000 )
test_f = lambda x: np.sin(x)*3 + np.cos(2*x)

# plot the test data
ax.plot( x, test_f(x) , lw = 2)

# set the axis labels
ax.set_xlabel(r'$x$', fontsize=14, labelpad=10)
ax.set_ylabel(r'$f(x)$', fontsize=14, labelpad=25, rotation=0)

# set axis limits
ax.set_xlim(0,np.pi)

plt.draw()
 
star

Thu Feb 25 2021 09:56:10 GMT+0000 (UTC)

@argenisferrer #swift

star

Thu Feb 25 2021 06:15:06 GMT+0000 (UTC)

@Jazzy

star

Thu Feb 25 2021 06:09:12 GMT+0000 (UTC)

@Jazzy

star

Thu Feb 25 2021 04:14:22 GMT+0000 (UTC)

@dhanush72

star

Thu Feb 25 2021 02:24:13 GMT+0000 (UTC) https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/copy-raster.htm

@GeeseGoose

star

Thu Feb 25 2021 00:21:36 GMT+0000 (UTC) https://schwartz-edmisten.com/blog/better-carousel-summary-block-layout-on-mobile

@Abhi

star

Wed Feb 24 2021 23:40:54 GMT+0000 (UTC)

@Abhi #html #html,css

star

Wed Feb 24 2021 22:35:52 GMT+0000 (UTC)

@GriffinDZ #java

star

Wed Feb 24 2021 20:50:38 GMT+0000 (UTC)

@fadas #html #css #texto_grandes

star

Wed Feb 24 2021 20:46:20 GMT+0000 (UTC) https://www.npmjs.com/package/ip

@mishka #nodejs #javascript

star

Wed Feb 24 2021 20:19:57 GMT+0000 (UTC)

@jcantrell001

star

Wed Feb 24 2021 20:09:10 GMT+0000 (UTC)

@jcantrell001

star

Wed Feb 24 2021 20:06:09 GMT+0000 (UTC) https://stackoverflow.com/questions/43322033/create-database-on-docker-compose-startup

@faisalhumayun #sql #docker

star

Wed Feb 24 2021 19:37:28 GMT+0000 (UTC) https://stackoverflow.com/questions/34633961/mysql-bind-address-in-a-docker-container

@faisalhumayun #sql

star

Wed Feb 24 2021 17:36:03 GMT+0000 (UTC) https://stackoverflow.com/questions/39235704/split-spark-dataframe-string-column-into-multiple-columns

@lorenzo_xcv #pyspark #spark #python #etl

star

Wed Feb 24 2021 15:10:19 GMT+0000 (UTC)

@veedah

star

Wed Feb 24 2021 14:52:47 GMT+0000 (UTC)

@veedah

star

Wed Feb 24 2021 14:03:53 GMT+0000 (UTC)

@veedah

star

Wed Feb 24 2021 08:04:01 GMT+0000 (UTC) https://github.com/kitloong/laravel-migrations-generator

@stewardjornsen

star

Wed Feb 24 2021 01:10:44 GMT+0000 (UTC) https://stackoverflow.com/questions/29226813/simple-encryption-in-java-no-key-password

@firdauslazim

star

Tue Feb 23 2021 23:25:20 GMT+0000 (UTC)

@birdbrainsolutions #css

star

Tue Feb 23 2021 21:20:06 GMT+0000 (UTC) https://mijingo.com/blog/search-git-commits-with-grep

@MattMoniz

star

Tue Feb 23 2021 18:17:46 GMT+0000 (UTC) https://social.msdn.microsoft.com/Forums/en-US/0397ed6f-ce8f-4bfa-9934-3246d374c128/how-to-fetch-the-value-on-the-click-of-context-menu-item-and-pass-the-same-as-a-parameter-to-the?forum

@Butters1143 #c# #shell #registry #contextmenu

star

Tue Feb 23 2021 18:07:54 GMT+0000 (UTC) https://dashboard.emailjs.com/admin/templates/misodwr

@bifrost

star

Tue Feb 23 2021 15:58:59 GMT+0000 (UTC) https://projects.intellisurvey.com/confluence/display/PMS/Data+Processing

@jcantrell001

star

Tue Feb 23 2021 13:44:55 GMT+0000 (UTC)

@yoon

star

Tue Feb 23 2021 12:20:27 GMT+0000 (UTC)

@vlatko_galev

star

Tue Feb 23 2021 10:15:19 GMT+0000 (UTC)

@Javkhlantugs #c#

star

Tue Feb 23 2021 04:38:56 GMT+0000 (UTC)

@tapalc40

star

Tue Feb 23 2021 03:17:32 GMT+0000 (UTC) https://developer.mozilla.org/en-US/docs/MDN/Structures/Code_examples

@Softpedia

star

Tue Feb 23 2021 03:07:51 GMT+0000 (UTC) Express post company

@0560961996

star

Tue Feb 23 2021 02:55:28 GMT+0000 (UTC) https://projects.intellisurvey.com/confluence/display/ISDOC/declinetoanswer?searchId

@jcantrell001

star

Tue Feb 23 2021 02:43:43 GMT+0000 (UTC)

@thuytramvnu #python #drive #gdown

star

Tue Feb 23 2021 02:06:09 GMT+0000 (UTC)

@ilovveit ##js

star

Tue Feb 23 2021 01:21:03 GMT+0000 (UTC) https://forum.squarespace.com/topic/171095-hide-section-in-desktop/?tab

@Abhi #html

star

Tue Feb 23 2021 00:08:37 GMT+0000 (UTC)

@Jumorkeh

star

Tue Feb 23 2021 00:00:30 GMT+0000 (UTC)

@Jumorkeh

star

Mon Feb 22 2021 22:35:10 GMT+0000 (UTC) https://beatrizcaraballo.com/blog/add-quick-jumps-anchor-points-squarespace

@Abhi

star

Mon Feb 22 2021 21:35:48 GMT+0000 (UTC) https://forum.squarespace.com/topic/160786-media-queries-to-go-to-mobile-view/

@Abhi #html

star

Mon Feb 22 2021 17:21:08 GMT+0000 (UTC)

@bifrost #react.js

star

Mon Feb 22 2021 14:14:21 GMT+0000 (UTC) https://stackoverflow.com/questions/4366730/how-do-i-check-if-a-string-contains-a-specific-word

@kjhanson #php

star

Mon Feb 22 2021 09:26:38 GMT+0000 (UTC)

@ilyasDh #angular

star

Mon Feb 22 2021 05:46:50 GMT+0000 (UTC) https://github.com/libfuse/sshfs

@rdemo

star

Sun Feb 21 2021 21:58:41 GMT+0000 (UTC)

@Dhfjfjnnsd

star

Sun Feb 21 2021 16:43:59 GMT+0000 (UTC)

@mirelspr #bash,python

star

Sun Feb 21 2021 02:49:49 GMT+0000 (UTC) https://stackoverflow.com/questions/42462992/morphia-complex-mongodb-aggregate-substr-project-sort-etc

@firdauslazim #mongo #morphia

star

Sun Feb 21 2021 02:31:11 GMT+0000 (UTC) https://riptutorial.com/matplotlib

@Adorism80 #python

star

Sun Feb 21 2021 02:30:27 GMT+0000 (UTC) https://riptutorial.com/matplotlib

@Adorism80 #python

Save snippets that work with our extensions

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