string(12) "experimental" Experimental - Swiss Misfit
swissmisfit

Experimental

LUST by Kendrick Lamar – Pick of the Week


LUST by Kendrick Lamar on the new album DAMN.

LUST by Kendrick Lamar – Pick of the Week

LUST by Kendrick Lamar from Kendrick’s highly anticipated new album DAMN. is my pick of the week. A hypnotic rhythm and beat backed by a psychedelic guitar riff that carries the listener through the journey of LUST. Kendrick Lamar’s entire album has Kendrick’s patent effortless rhymes that eloquently flow over each and every beat.

Summary

Tyrone Biggums


Tyrone Biggums, The Lovable Addict

Chapelle Show - Tyrone BiggumsIllustrated by: Renaldho Pelle

I Smoke Rocks Joe Rogan!

I saw this come through as my Kuvva wallpaper the other day and couldn’t help but giggle to myself. Tyrone Biggums had a number of amazingly funny skits and to this day is definitely one of my favorite characters.

Cheers to Dave Chappelle and the comedic gold he as able to produce on cable television. I’m sure i’m not alone in hoping that we have many more greats like Chappelle appear in the not so distant future and push the comedic bar even higher.

Take Me to Church by Hozier – Pick of the Week


Take Me To Church by Hozier

Take Me to Church by Hozier – Pick of the Week

A somber and deeply overwhelming flood of unapologetic pride brings us this weeks pick of the week. Take Me to Church by Hozier embodies how true love makes us feel regardless of the approval or disapproval of others. An anthem for anyone who has ever fallen in love with anyone or anything that others may disapprove with.

My lovers got humor
She’s the giggle at a funeral
Knows everybody’s disapproval
I should have worshiped her sooner

A slew of intelligent verses paints a portrait Andrew Hozier Byrne from Hozierof true love and the notion that religion, no matter how embedded in our core, has no stake in how our own feelings of love make us feel. Try as we may, feelings are a hell of a thing to cover up despite what others reaction or assumptions may be.

A beautiful bridge infused with a choral singing group instills a classic blues feel. A blues sound that amplifies an already powerful and deep track. Check out Hozier’s own interpretation of the song in his music video. A vivid, sad depiction of how ideals taken to the extreme can have such a negative influence on others and their own happiness.

Hozier

Hozier, Andrew Hozier-Byrne, is the son of a musician who began his music career as a student with a degree in music from Trinity College, Dublin. However, Hozier dropped out midway through his freshman year to begin recording demos with Universal Music.

Hozier released the EP Take Me to Church in 2013 with the title track becoming his breakthrough single after going viral on both Reddit and YouTube. Hozier later released the EP From Eden in 2014 and announced a debut solo album to arrive sometime in September 2014.

Summary
Review Date
Reviewed Item
Take Me to Church by Hozier
Author Rating
51star1star1star1star1star

Javascript Strings, Properties, Special Characters and Escape Sequences


Javascript Escape Sequence Backslash

Javascript Strings, Properties, Special Characters and Escape Sequences

Javascript strings are used for storing sequences of characters. Javascript strings are enclosed within delimiters, most commonly, single quotes, ‘ ‘, or double quotes, “ “. Text within delimiters is commonly referred to as string literals, where literal means that the value is a fixed value within the source code. You can think of literals as the exact opposite of a variable. Variables can take many values depending on the circumstances, while literals are ‘fixed’ on a particular value.

’string literal within single quotes’
“string literal with double quotes"

Length Property

Javascript comes built with a length property for strings. The length property returns the count of characters found within a string. A value of 0 will be returned for all empty strings. In the below example, a value of 6 will be returned.

Length Example

var string = "Hello!"
string.length
> 6

Escape Sequences

In addition to string literals and regular printable characters, Javascript is able to produce special characters using escape notation or escape sequences. Escape sequences begin with a backslash or escape character. The escape character ( \ ) can be used to insert apostrophes, new lines, quotes, and other special characters into a string.

The table below lists other special characters that can be added to a text string with the backslash sign:

CodeOutput
\’ single quote
\” double quote
\\ backslash
\n new line
\r carriage return
\t tab
\b backspace

Escape Sequence Examples

In order to familiarize yourself with these commands take a look at the following examples oh how \”, \\, \n, \t are used to manipulate output with escape sequences.

“I’m kind of a \”big deal\” around here.”
> I’m kind of a “big deal” around here.
“The file can be found on c:\\Desktop\\Files\\Document.txt”
> The file can be found on c:\Desktop\Files\Document.txt
”This is the \n beginning of the next line.”
> This is the
> beginning of the next line.
“My favorite movies include: \n \t Dark Knight Series \n \t Iron Man”
> My favorite movies include:
>     Dark Knight Series
>     Iron Man

That is about it for string properties and escape sequences. Now to take it a step further and call methods on strings to begin manipulating them. Check out my post about JavaScript string search methods to begin exploring how to work with strings.

JavaScript: Learning String Search Methods


Javascript String Search Methods: Inspecting Strings

JavaScript String Search Methods

String search methods are pre-defined methods built into Javascript that help developers find, edit, manipulate, and work with strings more easily. String search methods provide a number of very handy pre-built functions that drastically increase development efficiency while limiting the amount of code needed to perform actions.

If you haven’t had a chance to read my short post on Javascript strings, properties, special characters, and escaped sequences, I highly recommend it, it may help in your understanding of some of the search methods defined below. Additionally, if you are unfamiliar with zero-based numbering [0],[1], etc. check out the wikipedia articlezero-based numbering for more details. Zero-based numbering is a common theme in most development languages, and understanding it is critical to understanding string search methods.

Searching And Locating Strings Within Strings

Often times developers need to search within strings to find values. These values are then either returned to the program to display to the end user or return to the application for additional operations. This post will cover indexOf(), lastIndexOf(), and search() methods. In additional we will review their syntax, parameters, and finally examples of the method.

Finding Strings with indexOf()

The first method, indexOf(), can be called on any string object and returns the zero-based index value of the first occurrence of the searchValue passed. If the searchValue passed is not found, the method will return a -1 value.

indexOf() Method Sytax

string.indexOf(searchValue, fromIndex)

Parameters

The method accepts two parameters, searchValue and fromIndex. searchValue is the value that will be used to search against the string that the method is called upon. The fromIndex value is the zero-based index that the search will begin from, the default value is 0, and obviously passing any value larger than string.length will return a -1 value.

indexOf() Example

var string = “I want to learn more about strings, so I am learning string methods.”; console.log(string.indexOf(“learn”));

Return Value

The console.log statement will return the value 10. Let’s count off the individual characters to see how we arrived at 10. [0]I, [1] (space), [2]w, [3]a, [4]n, [5]t, [6] , [7]t, [8]o [9] ,[10]l. The first occurrence of the word “learn” begins at the tenth index in the string.

Case Sensitive Note

It may also be worth noting that this method along with many other methods in JavaScript are case sensitive. This means that in our above example a searchValue of “Learn” would return a -1 value for the method call. The reason being is that “Learn” does not equal “learn” in respect to the method.

Finding Strings with lastIndexOf()

lastIndexOf() works exactly like its counterpart indexOf(), however it will return the last occurrence of the value passed in searchValue.

lastIndexOf() Method Syntax

string.lastIndexOf(searchValue, fromIndex)

Parameters

Again, this method accepts two parameters, searchValue and fromIndex.

lastIndexOf() Examples

var string = “I want to learn more about strings, so I am learning string methods.”; console.log(string.lastIndexOf(“learn”));

Return Value

The console.log statement will return the value 44. It is grabbing the zero-based character index of “learn” within the word “learning”. The method doesn’t care whether the sequence is its own word or not, it only cares if the string has the exact same character combination as what is passed in the methods searchValue parameter. In this case it found that the exact sequence “learn” was in the forty-fourth position in the word “learning”.

Searching Strings with search() Method

The search() string method is a quick and efficient way to search a string for a specific value passed as a parameter in the search() method. The search() method returns the zero-based index, or position, of the first letter of the first occurrence of the the value.

search() Method Syntax

string.search(regexp)

Parameters

regexp is simply a regular expression object. If a non regular expression object is passed, it is converted to a regular expression. Don’t let this consfuse you if you aren’t familiar with regular expressions. I plan on writing an in depth overview of regular expressions, but for now read more aboutregular expressions on Wikipedia.

search() Examples

var string = “I want to learn more about strings, so I am learning string methods.”; console.log(string.search(“learn”));

Return Value

The console.log statement will return the value 10.

indexOf() and search() Similarities and Differences

You may have noticed that the returned values for both indexOf() and search() are equal. They both accept the same parameters and return the same values. These two methods are very similar, however with the ability to pass regular expressions as parameters within the search() method, developers can make much more powerful search functions. I like to think of indexOf() as a saw used to work with strings, and the search() method paired with regular expressions as a scalpel. They both help us accomplish a task, however one can be used with incredible precision to help us facilitate tasks that wouldn’t have been achievable with just the indexOf() method.

Recent Projects
  • Grub.ly
    Explore and discover new foods!
    Comments

  • Grub.ly
    Explore and discover new foods!
    Comments

About Me Dal Price: SwissMisfit

I’m Dal, an enthusiast for all things technology, design, music, and food. This is a collection of inspirations, misfit thoughts, and random musings that may or may not be interesting to others.

Other Places to find me
  • RSS
    Feed updates from the blog

  • Twitter
    Bits of random 140 characters

  • Flickr
    So many pruty pictures!

  • XBox
    Pwning N00bs

  • Instagram
    Filters make my pictures better