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
def mode(k): | |
""" | |
Returns mode of a list of integers passed as argument | |
""" | |
k.sort() | |
mode=sorted(k,key=k.count,reverse=True)[0] | |
return mode | |
integers=[1,2,3,56,83,283,28,232,23,23,23,2,2,2,3,2] | |
print(mode(integers)) |
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
#Method One: Using both Keytool and Openssl | |
keytool -export -keystore <keystore.jks> -alias <aliasName> -file publiccert.cer | |
openssl x509 -inform der -in publiccert.cer -out publiccert.pem | |
#Method Two: Direct conversion with only keytool (thanks to http://stackoverflow.com/a/6076689/552148) | |
keytool -exportcert -alias <selfsigned> -keystore <test-user.jks> -rfc -file <test-user.pem> |
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
/* | |
* Fire.cpp - The Fire Web Server | |
* Copyright (C) 2007 Tom R. Dial <[email protected]> | |
* | |
* Notes: | |
* 1. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
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
<?php | |
define('TP_URL', 'http://enzinna.tpondemand.com/'); | |
define('TP_USER', 'admin'); | |
define('TP_PASS', 'admin'); | |
# GET a story | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, TP_URL."api/v1/UserStories/201?format=json"); |