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
| <HttpAdapter | |
| deviceFormatId="-10000" | |
| deviceFormatType="XmlHttp" | |
| deviceFormatTypeId="-10000" | |
| enabled="true" | |
| factoryClassname="com.ibm.commerce.programadapter.HttpProgramAdapterImpl" name="XML/HTTP"> | |
| <ProgramAdapter> | |
| <SessionContext class="com.ibm.commerce.messaging.programadapter.security.CredentialsSpecifiedProgramAdapterSessionContextImpl"> | |
| <SessionContextConfig/> | |
| </SessionContext> |
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
| <cache-id> | |
| <component id="" type="pathinfo"> | |
| <required>true</required> | |
| <value>/ProductDisplay</value> | |
| </component> | |
| <component id="storeId" type="parameter"> | |
| <value>10151</value> | |
| <required>true</required> | |
| </component> | |
| <component id="catalogId" type="parameter"> |
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
| ## | |
| ## This script uses OLE automation to set the out of office message at a given date | |
| ## | |
| require 'win32ole' | |
| outlook = WIN32OLE.new('MAPI.Session') | |
| outlook.Logon 'Outlook' | |
| puts "Out of Office = #{outlook.OutOfOffice}" | |
| outlook.OutOfOffice = true | |
| outlook.Logoff |
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
| /* | |
| * Question: Create a data structure to represent polynomial addition and substraction | |
| * Run the code online: http://ideone.com/s5qjU | |
| */ | |
| import static org.junit.Assert.*; | |
| import org.junit.Test; | |
| import java.util.*; | |
| public class PolynomialTest | |
| { |
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
| # Add this to your .bashrc after loading RVM | |
| # Example: | |
| # [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
| # source $HOME/rvm_bash_prompt.sh | |
| # Current RVM gemset for bash prompt | |
| function __my_rvm_ruby_version { | |
| local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}') | |
| [ "$gemset" != "" ] && gemset="@$gemset" | |
| local version=$(echo $MY_RUBY_HOME | awk -F'-' '{print $2}') |
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
| @MQC9056 @inventory @invalidation | |
| Feature: Inventory Cache Invalidation | |
| As a SonyStyle user | |
| In order to place an order for a product | |
| SonyStyle must display accurate inventory information. | |
| # This is to make sure an invalidation is only trigged when a product becomes in stock or goes out of stock | |
| # SPEC00090005226 = "Intel Core i7-2630QM quad-core processor (2.0GHz) with Turbo Boost up to 2.90GHz" | |
| Scenario: US CTO component in stock changes quantity and remains in stock | |
| Given we will receive a "GCTO" inventory feed |
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
| Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no |
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
| # first method | |
| def enforce_utf8(from = nil) | |
| begin | |
| self.is_utf8? ? self : Iconv.iconv('utf8', from, self).first | |
| rescue | |
| converter = Iconv.new('UTF-8//IGNORE//TRANSLIT', 'ASCII//IGNORE//TRANSLIT') | |
| converter.iconv(self).unpack('U*').select{ |cp| cp < 127 }.pack('U*') | |
| end | |
| end |
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
| one_million = (1..1e6).to_a | |
| one_million_sum = (1.0e6+1)*1.0e6/2 | |
| missing = one_million.delete(rand(one_million.size)) | |
| one_million_minus_missing_sum = one_million.reduce(0){|sum,current| sum + current} | |
| puts (one_million_sum - one_million_minus_missing_sum) == missing ? "It works" : "Did not work" |
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 | |
| # | |
| # Run this in the background and keep it running when you log out run it like this: | |
| # nohup /tmp/trigger_javadump.sh >/tmp/trigger_javadump.log 2>&1 & | |
| # | |
| FULLGC_PATTERN='^Application time: 0.0000' | |
| VERBOSEGC_PATH='verbosegc.log' | |
| while true; do | |
| FULLGC_FOUND=$(grep "$FULLGC_PATTERN" "$VERBOSEGC_PATH") |