This file contains hidden or 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
| function getArrayMaxValue(arr) { | |
| return Math.max.apply(null, arr); | |
| } | |
| function getArrayMinValue(arr) { | |
| return Math.min.apply(null, arr); | |
| } |
This file contains hidden or 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
| function removeSpecialCharacters(str) { | |
| return str.replace(/[`~!@#$%^&*()_|+\-=?;:'",.<>\{\}\[\]\\\/\s]/gi, ""); | |
| } | |
This file contains hidden or 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
| #!/bin/bash | |
| for file in *.docx;do | |
| number=$(unzip -p $file word/document.xml | sed -e 's/<[^>]\{1,\}>//g; s/[^[:print:]]\{1,\}//g'|tr -d ' '|tr -d '\n' |tr -d '\t' | wc -m | tr -d ' ' | tr -d '\t') | |
| echo "File -> $file , symbols count: $number" | |
| done |
This file contains hidden or 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 re | |
| # Passwords will contain at least (1) upper case letter | |
| # Passwords will contain at least (1) lower case letter | |
| # Passwords will contain at least (1) number or special character | |
| # Passwords will contain at least (8) characters in length |
This file contains hidden or 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
| protected boolean fieldWasChanged(String fieldName, IssueEvent issueEvent, String fieldValue) throws GenericEntityException { | |
| boolean result = false; | |
| List<GenericValue> changeItemList = issueEvent.getChangeLog().getRelated("ChildChangeItem"); | |
| Iterator<GenericValue> changeItemListIterator = changeItemList.iterator(); | |
| while (changeItemListIterator.hasNext()) { | |
| GenericValue changeItem = (GenericValue) changeItemListIterator.next(); | |
| String currentFieldName = changeItem.get("field").toString(); | |
| if (currentFieldName.equals(fieldName)) // Name of custom field. |
This file contains hidden or 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
| #!/usr/bin/env python | |
| import urllib | |
| import os.path | |
| import sys | |
| import json | |
| import shutil | |
| import getopt | |
| import argparse | |
| import re |
This file contains hidden or 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
| find . -type f ! -name '*-testcase.json' -delete |
This file contains hidden or 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 org.json.JSONArray; | |
| import org.json.JSONObject; | |
| import java.sql.ResultSet; | |
| /** | |
| * Utility for converting ResultSets into some Output formats | |
| * @author marlonlom | |
| */ | |
| public class Convertor { |
This file contains hidden or 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
| override func touchesBegan(touches: Set<NSObject>, withEvent event: UIEvent) { | |
| self.view.endEditing(true) | |
| } | |
| func textFieldShouldReturn(input: UITextField) -> Bool { | |
| input.resignFirstResponder() | |
| return true | |
| } |