This file contains 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
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
} | |
} | |
class user // класс содержит поля и методы польозвателя | |
// login, email, password, и методы : * newUser (cоздать нового пользователя) | |
// * delUser (удалить пользователя) | |
// * listUser (вывести список пользователей) |
This file contains 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
= simple_form_for(@admin_client) do |f| | |
= f.error_notification | |
.inputs | |
= f.input :code_name, :label => 'Кодовое имя' | |
#pic_icon | |
= image_tag @admin_client.logo.url | |
= f.input :logo, :label => 'Иконка' | |
= f.input :public, :label => 'Публичное?' | |
#lang_panel |
This file contains 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace NullTest | |
{ | |
class SomeClass | |
{ | |
} |
This file contains 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace RefTest | |
{ | |
class SomeClass | |
{ | |
public int SomeProperty { get; set; } |
This file contains 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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.IO; | |
namespace NumericalAnalysis | |
{ | |
class NonlinearEquations | |
{ |
This file contains 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
// for Morozov | |
void RetSignal(int status) { | |
if (WIFEXITED(status)) | |
; | |
else if (WIFSIGNALED(status)) { | |
printf("ERROR: return signal %d\n", WTERMSIG(status)); | |
} | |
else if (WIFSTOPPED(status)) { | |
printf("STOP: return signal %d\n", WSTOPSIG(status)); | |
} |
This file contains 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 det(matrix) | |
# fake implementation | |
0 | |
end | |
def do_det_test(test_case) | |
result = det(test_case[:data]) | |
assert_equal(result, test_case[:expected]) |
This file contains 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
# Пусть магический метод называется defnil | |
# Тогда обычный вариант: | |
def f(x,y) | |
return nil if x == nil | |
x + y | |
end | |
f(1,2) # => 3 | |
f(nil,2) # => nil |
This file contains 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
(defmacro defn-nil | |
[fname args body] | |
`(defn ~fname ~args (if (nil? ~(first args)) nil ~body))) | |
(defn-nil f | |
[x y] | |
(+ x y)) | |
(f 1 2) ;; => 3 | |
(f nil 2) ;; => nil |
This file contains 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> | |
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Welcome to sweethome</title> | |
</head> | |
<body> | |
<!-- navbar --> | |
<div class="navbar navbar-inverse navbar-fixed-top"> | |
<div class="container"> |
OlderNewer