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
#include <stdio.h> | |
main () { printf("Hello World\n"); } |
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
component { | |
this.name = "MyApp"; | |
this.sessionManagement = true; | |
this.sessionTimeout = createTimeSpan(30,0,0,0); | |
boolean function onApplicationStart() { | |
echo("<h1>Start Application</h1>"); | |
return true; | |
} |
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 oneMinus() { | |
return (~1 + 1); | |
} | |
function isNegative(x) { | |
return (x < 0); | |
} | |
function plus(x,y) { | |
return x+y; |
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 | |
class FizzBuzz { | |
function toString($number) { | |
$fizz[true] = "Fizz"; | |
$buzz[true] = "Buzz"; | |
$stillNumber[true] = $number;. | |
$fizz[false] = $buzz[false] = $stillNumber[false] = ''; | |
$result = '';. |
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
-module (fizzbuzz). | |
-export ([solve/1]). | |
% %%Decision Tree%% | |
% | |
% fizzbuzz | |
% "fizzbuzz" fizz | |
% "fizz" buzz | |
% "buzz" Number |
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
@RenderMapping | |
public String main(RenderRequest request, RenderResponse response, Model model) throws SystemException, PortalException { | |
model.addAttribute("messages", messageToMDService.listMessageToMD()); | |
if (request.getRemoteUser() != null) { | |
User user = UserLocalServiceUtil.getUserById(Long.parseLong(request.getRemoteUser())); | |
ThemeDisplay themeDisplay= (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); | |
ServiceContext serviceContext = new ServiceContext(); |
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
#set ($url = $request.get('render-url')) | |
#set ($namespace = $request.get('portlet-namespace')) | |
#set($currentUrl = $request.attributes.CURRENT_URL) | |
#set($paramName = $httpUtil.getParameter($currentUrl, "question", false)) | |
#set ($friendlyUrl = $request.get('attributes').get('FRIENDLY_URL')) | |
<!-- BEGIN OUTPUT --> | |
##$question.getData() | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Slide</title> | |
<script type="text/javascript" src="http://code.jquery.com/jquery-1.2.6.js"></script> | |
<style type="text/css"> | |
#slide-wrapper { | |
width: 200px; | |
height: 200px; | |
position: relative; |
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
package com.t2decode.java.eight; | |
import org.junit.Test; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import static junit.framework.Assert.assertEquals; |
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 Data.Char | |
import Data.List | |
groupWord:: [(String,Integer)] -> [[(String,Integer)]] | |
sortLT:: (String, Integer) -> (String, Integer) -> Ordering | |
filterWord = filter (all isAlphaNum) . words | |
mapWordCounter = map (\w -> (w,1)) | |
sortLT (w1,_) (w2,_) |