This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": [ | |
{ | |
"id": "834633353273827328", | |
"referenced_tweets": [ | |
{ | |
"type": "retweeted", | |
"id": "834402292539416576" | |
} | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution { | |
public List<Integer> findSubstring(String str, String[] words) { | |
Map<String, Integer> wordFrequencyMap = new HashMap<>(); | |
for (String word : words) | |
wordFrequencyMap.put(word, wordFrequencyMap.getOrDefault(word, 0) + 1); | |
List<Integer> res = new ArrayList<Integer>(); | |
int wordsCount = words.length; | |
int wordLength = words[0].length(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{/* vim: set filetype=mustache: */}} | |
{{/* | |
Expand the name of the chart. | |
*/}} | |
{{- define "solr.name" -}} | |
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} | |
{{- end -}} | |
{{/* | |
Create a default fully qualified app name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIButton { | |
func alignHorizontal(spacing: CGFloat, imageFirst: Bool) { | |
let edgeOffset = spacing / 2 | |
imageEdgeInsets = UIEdgeInsets(top: 0, | |
left: -edgeOffset, | |
bottom: 0, | |
right: edgeOffset) | |
titleEdgeInsets = UIEdgeInsets(top: 0, | |
left: edgeOffset, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import email | |
from email.header import decode_header | |
# http://imsardine.simplbug.com/note/email/python.html | |
class Email(object): | |
def __init__(self, rfc822): | |
self._rfc822 = rfc822 | |
self._message = email.message_from_string(rfc822) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public class LoadingSpinnerOverlay{ | |
var overlayView = UIView() | |
var activityIndicator = UIActivityIndicatorView() | |
class var shared: LoadingSpinnerOverlay { |