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 outer(a) | |
| b = 6 | |
| l = lambda do |a, b| | |
| print a + b | |
| end | |
| l.call(a, b) | |
| end | |
| outer(5) |
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 java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| public class Solution { | |
| public static void main(String args[]) throws IOException { | |
| BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
| long n = 0; |
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> | |
| #define NUM 2000 | |
| int main(int argc, char* argv[]) | |
| { | |
| signed long pow[NUM],val[NUM],x,num,ten; | |
| int i,j,count; | |
| for(num=2; num<NUM; num++) | |
| { | |
| for(i=0; i<NUM; pow[i++]=0); |
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 java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.math.BigDecimal; | |
| import java.math.BigInteger; | |
| import java.util.ArrayList; | |
| public class n_multiple_Min_N_Zeros_Ones | |
| { | |
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
| NUM = 2000 | |
| pow, val = [], [] | |
| 2.upto NUM-1 do |num| | |
| 0.upto(NUM-1) {|i| pow[i] = 0 } | |
| count, ten, x = 0, 1, 1 | |
| while (x < NUM) do | |
| val[x] = ten | |
| 0.upto NUM-1 do |j| |
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/python | |
| # | |
| # Created by Albert Au Yeung (2010) | |
| # | |
| # An implementation of matrix factorization | |
| # | |
| try: | |
| import numpy | |
| except: | |
| print "This implementation requires the numpy module." |
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
| require 'nmatrix' | |
| require 'pp' | |
| ############################################################################### | |
| =begin | |
| @INPUT: | |
| r : a matrix to be factorized, dimension n x m | |
| p : an initial matrix of dimension n x k | |
| q : an initial matrix of dimension m x k |
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
| <persons xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:noNamespaceSchemaLocation="family.xsd"> | |
| <person> | |
| <full_name>Hege Refsnes</full_name> | |
| <child_name>Cecilie</child_name> | |
| </person> | |
| <person> | |
| <full_name>Tove Refsnes</full_name> |
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
| <xs:element name="persons"> | |
| <xs:complexType> | |
| <xs:sequence> | |
| <xs:element name="person" maxOccurs="unbounded"> | |
| <xs:complexType> | |
| <xs:sequence> | |
| <xs:element name="full_name" type="xs:string"/> | |
| <xs:element name="child_name" type="xs:string" | |
| minOccurs="0" maxOccurs="5"/> | |
| </xs:sequence> |
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
| <shoesize country="france">35</shoesize> |