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 responseXML($url ='',$post_data ='', $parse=false){ | |
| $ch = curl_init(); //initiate the curl session | |
| curl_setopt($ch, CURLOPT_URL, $url); //set to url to post to | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // tell curl to return data ina variable | |
| curl_setopt($ch, CURLOPT_HEADER, 0); | |
| curl_setopt($ch, CURLOPT_POST, 1); | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); // post the xml | |
| curl_setopt($ch, CURLOPT_TIMEOUT, 10); // set timeout in seconds | |
| $xmlResponse = curl_exec ($ch); | |
| if (curl_errno($ch)) { |
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
| <head> | |
| <title>menu mockup</title> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
| <style type="text/css"> | |
| .show {display: none; } | |
| .hide:focus + .show {display: inline; } | |
| .hide:focus { display: none; } | |
| .hide:focus ~ #list { display:none; } | |
| @media print { .hide, .show { display: none; } } | |
| </style> |
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
| BaseFont bf = BaseFont.createFont( | |
| "c:\\windows\\fonts\\ANGSA.ttf", | |
| BaseFont.IDENTITY_H, | |
| BaseFont.EMBEDDED | |
| ); | |
| Font f = new Font(bf, 12); |
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
| BaseFont bf = BaseFont.createFont( | |
| "c:\\windows\\fonts\\ANGSA.ttf", | |
| BaseFont.IDENTITY_H, | |
| BaseFont.EMBEDDED | |
| ); | |
| Font f = new Font(bf, 12); |
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 flatten(t): | |
| result=[] | |
| def remove(t): | |
| for x in t: | |
| if isinstance(x, list): | |
| remove(x) | |
| else: | |
| result.append(x) | |
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
| keytool -list -alias androiddebugkey -keystore "C:\Documents and Settings\User\.android\debug.keystore" -storepass android -keypass android |
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
| public static String renderPageWithSetupsAndTeardowns( | |
| PageData pageData, boolean isSuite | |
| ) throws Exception { | |
| boolean isTestPage = pageData.hasAttribute(“Test”); | |
| if (isTestPage) { | |
| WikiPage testPage = pageData.getWikiPage(); | |
| StringBuffer newPageContent = new StringBuffer(); | |
| includeSetupPages(testPage, newPageContent, isSuite); | |
| newPageContent.append(pageData.getContent()); | |
| includeTeardownPages(testPage, newPageContent, isSuite); |
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
| int x() { | |
| int q = 0; | |
| int z = 0; | |
| for (int kk = 0; kk < 10; kk++) { | |
| if (l[z] == 10) { | |
| q += 10 + (l[z + 1] + l[z + 2]); | |
| z += 1; | |
| } else if (l[z] + l[z + 1] == 10) { | |
| q += 10 + l[z + 2]; | |
| z += 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
| int score() { | |
| int score = 0; | |
| int frame = 0; | |
| for (int frameNumber = 0; frameNumber < 10; frameNumber++) { | |
| if (isStrike(frame)) { | |
| score += 10 + nextTwoBallsForStrike(frame); | |
| frame += 1; | |
| } else if (isSpare(frame)) { | |
| score += 10 + nextBallForSpare(frame); | |
| frame += 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
| import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; | |
| import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; | |
| import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; | |
| import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; | |
| import static org.springframework.test.web.client.match.MockRestRequestMatchers.*; | |
| import static org.springframework.test.web.client.response.MockRestResponseCreators.*; | |
| import static org.junit.Assert.assertTrue; | |
| import org.junit.Before; | |
| import org.junit.Test; |