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 squareFromNumbers(n): | |
return list(map(lambda x: [n] * n, ([n] * n))) | |
print(squareFromNumbers(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
def multipleArray(num, length): | |
return list(map(lambda x: int(x[1]) ** (x[0] + 1), enumerate(str(num) * length))) | |
print(multipleArray(5, 3)) |
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
const sqrt = (a: number, precision = 3) => { | |
let cur: number = a / 2; | |
while (true) { | |
if ((cur ** 2).toFixed(precision) === a.toFixed(precision)) { | |
return cur.toFixed(precision); | |
} | |
const step = 10 ** (-1 * (precision + 1)); | |
if (cur ** 2 > a) { | |
cur -= cur * step; |
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 programowanie_komputerowe; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Hashtable; | |
import java.util.List; | |
public class BinSearch { | |
public static void main(String[] args) | |
{ |
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 React from 'react'; | |
import useTheme from '@material-ui/core/styles/useTheme'; | |
import useMediaQuery from '@material-ui/core/useMediaQuery'; | |
import {CircularProgress} from '@material-ui/core'; | |
/** @jsx jsx */ | |
import {jsx, css} from '@emotion/core'; | |
export const LoadingPage = () => { | |
const styles = { | |
root: css` |
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
# Example of use in urls.py: | |
# from django.urls import path | |
# from .views import | |
# from .views import JSONCatalogWithDomainListTupleSupport | |
# urlpatterns = [ | |
# path('i18n/', views.JSONCatalogWithDomainListTupleSupport.as_view(domain=['django', 'djangojs'])), | |
# ] |
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.util.Random; | |
public class ArraysAndLoops { | |
public static void main(String[] args) { | |
int[] array = new int[10]; | |
int arraySum = 0; | |
System.out.println("Array: "); | |
for(int i = 0; i < array.length; i++) | |
{ | |
array[i] = new Random().nextInt(100); |
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 programowanie_komputerowe; | |
public class SimpleCalculator { | |
//liczby na ktorych beda wykonywane dzialania | |
static double liczba1 = Math.random(); | |
static double liczba2 = Math.random(); | |
//wyniki dzialan na liczbach 1 i 2 | |
static double dodawanie = liczba1 + liczba2; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System; | |
using System.Linq; | |
using UnityEditor; | |
using System.Reflection; | |
public class NumbersSumming : MonoBehaviour | |
{ |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System; | |
using System.Linq; | |
using UnityEditor; | |
using System.Reflection; | |
public class NumbersComparing : MonoBehaviour | |
{ |
NewerOlder