Snippets Collections
extension SendOfferVC : UITextViewDelegate {
    func textViewDidBeginEditing(_ textView: UITextView) {
        if textView.text == "Add a Description to your Offer" {
            textView.text = ""
            textView.textColor = UIColor.darkGray
        }
    }
    func textViewShouldEndEditing(_ textView: UITextView) -> Bool {
        if textView.text == "" {
            textView.text = "Add a Description to your Offer"
            textView.textColor = UIColor.lightGray
        }
         return true
    }
    
    func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
        if(text == "\n") {
                  textView.resignFirstResponder()
                  return false
              }
              return true
    }
}
Content-Encoding: gzip
Cache-Control: no-store
Accept: text/html
Cookie: Version=1
h1 {
  background: linear-gradient(180deg, rgba(255,255,255,0) 65%, #FFD0AE 65%);
  display: inline; font-weight: normal;
}
// Easy Vertical Text //

@media only screen and (min-width: 640px) { em {
  width: auto !important;
  writing-mode: vertical-rl;
  text-orientation: sideways-right;
  font-style: normal !important;
  transform: rotate(180deg);
}
}

em {
  font-style: normal !important;
}
/* Text change detail */
h1 strong {
  font-family: aktiv-grotesk-extended !important;
  font-size: 3.1rem;
}
/* Text highlight underline. Only works for bolded h1 text */
h1 strong{
  background: linear-gradient(to bottom, #FFF 60%, #FFD84A 40%) !important;
  font-weight: normal !important;
 }
#block-53c818fd6d3f39517aed {
background: #f0f0f0;
padding: 50px;
text-align: center;
}
/**
* Gets parts of speech for a sentence
* @param {String} text The text to get parts of speech for.
* @returns {Promise.<Object>} Resolves into a list of parts of speech. (Or rejects with an error)
* @example 
* var parts_of_speech  = await parts_of_speech("Sometimes I just want to code in JavaScript all day.");
* // ⇒
* // {entities: Array(1), sentiments: Array(1), documentInfo: {…}, wordFreq: Array(4), taggedText: '<span class="tag ADV">Sometimes</span> <span class…>all</span> <span class="tag DURATION">day</span>'}
function parts_of_speech(text) {
*/
function parts_of_speech(text) {
  return new Promise(async (resolve, reject) => {
    fetch("https://showcase-serverless.herokuapp.com/pos-tagger", {
      headers: {
        accept: "application/json",
        "content-type": "application/json",
      },
      body: JSON.stringify({ sentence: text }),
      method: "POST",
    })
      .then((res) => res.json())
      .then(resolve)
      .catch(reject);
  });
}
@mixin text($font-size,$color,$bg-color) {

     // we pass the $font-size to font-size property
    font-size: $font-size;
    
    // we pass the $color to color property
    color: $color;
    
    // we pass the $bg-color to background property
    background: $bg-color;
}



.text1 {
          // ($font-size,$color,$bg-color)
    @include text(3rem,green , black)
}

.text2 {
          // ($font-size,$color,$bg-color)
    @include text(5em,red , transparent)
}
import re

text = 'this is a text'

try:
    found = re.search('is(.+?)text', text).group(1)
except AttributeError:
    # AAA, ZZZ not found in the original string
    found = '0 wtitle' # apply your error handling
found

=> a
/* This will come in the body at XML but the header will be text/plain, which is why  
all this is happening manually to get this read from the stream.  
*/  
var reqHeaders = request.headers;
gs.info("CPSNS: reqHeaders content-type" + reqHeaders['content-type']);
if (reqHeaders['content-type'] == "text/plain; charset=UTF-8") {
    var stream = request.body.dataStream;
    var reader = new GlideTextReader(stream);
    var input = "";
    var ln = "";
    while ((ln = reader.readLine()) != null) {
        input += ln;
    }
    gs.info("CPSNS: SUB" + input);
} else {
    var body = {};
    var data = request.body.data;

    gs.info("CPSNS: req.body data" + data);

}
.truncate {
  width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
star

Mon May 30 2022 12:30:28 GMT+0000 (UTC)

#ios #swift #textview #text
star

Wed May 18 2022 07:20:51 GMT+0000 (UTC) https://web.dev/cross-origin-resource-sharing/?utm_source

#text
star

Wed May 18 2022 07:20:39 GMT+0000 (UTC) https://web.dev/cross-origin-resource-sharing/?utm_source

#text
star

Mon Mar 21 2022 08:10:56 GMT+0000 (UTC) https://www.beatrizcaraballo.com/blog/low-highlight-heading-links-squarespace

#highlight #low #text #header
star

Fri Feb 25 2022 06:13:17 GMT+0000 (UTC) https://www.ghostplugins.com/steps/super-easy-vertical-text-version-2?fbclid=IwAR0yYDYS06kLYLdWZuLzI_QVREVnLMx4lkrqa4YEZtP7uS1aKN5ur7S7Rzg

#text #fonts
star

Thu Feb 17 2022 18:40:49 GMT+0000 (UTC) https://www.golivehq.co/blog/our-5-favorite-css-code-tricks-for-squarespace-71

#text #fonts
star

Thu Feb 17 2022 18:39:51 GMT+0000 (UTC) https://www.golivehq.co/blog/our-5-favorite-css-code-tricks-for-squarespace-71

#text #highlighter
star

Wed Feb 16 2022 13:55:09 GMT+0000 (UTC) https://www.bigcatcreative.com/blog/background-text-block-squarespace

#colour #background #text
star

Mon Jan 10 2022 17:02:49 GMT+0000 (UTC) https://github.com/explosion-scratch/cool_apis

#js #javascript #text #api
star

Sun Jan 09 2022 12:38:19 GMT+0000 (UTC) undefined

#text #chat
star

Sat Jan 08 2022 02:23:05 GMT+0000 (UTC) https://www.freecodecamp.org/news/how-to-pass-arguments-to-mixins/

#mixin #scss #text
star

Mon Feb 01 2021 21:22:08 GMT+0000 (UTC) https://developer.servicenow.com/blog.do?p

#servicenow #content #type #plain #text
star

Sun Jan 05 2020 18:59:56 GMT+0000 (UTC) https://css-tricks.com/snippets/css/truncate-string-with-ellipsis/

#css #webdev #text

Save snippets that work with our extensions

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