Вводная лекция в язык C#, для тех кто знает программирование и в особенности C++. В статье будет уделено внимание наиболее важным отличиям языков, будут обсуждаться вопросы производительности и эффективного кода.
Другие интересные статьи по C# ищите тут: http://itw66.ru/blog/c_sharp/
Написание компактного и эффективного кода в C#: http://itw66.ru/blog/c_sharp/520.html
Лекция 12. Быстрее, Python, ещё быстрее.Roman Brovko
Измерение времени работы кода на Python с помощью модулей timeit, cProfile и line_profiler. Немного о NumPy. JIT и AOT компиляция кода на Python на примере Numba и Cython.
Синтаксис объявления классов. Атрибуты, связанные и несвязанные методы, __dict__, __slots__. Статические методы и методы класса. Свойства, декоратор @property. Наследование, перегрузка методов и функция super. Декораторы классов. Магические методы.
Лекция 5. Встроенные коллекции и модуль collections.Roman Brovko
И снова встроенные коллекции: кортеж, список, множество, словарь - обход в глубину, обзор методов, примеры. Почти всё про модуль collections: именованные кортежи, счётчики, defaultdict, OrderedDict.
Лекция 12. Быстрее, Python, ещё быстрее.Roman Brovko
Измерение времени работы кода на Python с помощью модулей timeit, cProfile и line_profiler. Немного о NumPy. JIT и AOT компиляция кода на Python на примере Numba и Cython.
Синтаксис объявления классов. Атрибуты, связанные и несвязанные методы, __dict__, __slots__. Статические методы и методы класса. Свойства, декоратор @property. Наследование, перегрузка методов и функция super. Декораторы классов. Магические методы.
Лекция 5. Встроенные коллекции и модуль collections.Roman Brovko
И снова встроенные коллекции: кортеж, список, множество, словарь - обход в глубину, обзор методов, примеры. Почти всё про модуль collections: именованные кортежи, счётчики, defaultdict, OrderedDict.
This document summarizes best practices for designing a REST API, including making the API easy to use, read, and extend. It provides real-world examples and discusses tools for documentation, validation, and JSON generation. Key recommendations include using nouns for resources, explicit versioning, token-based or OAuth authentication, and representing resources as complete URLs.
Diapositivas prevención violencia de género (definitivo)(2)anabg16
Este documento trata sobre la violencia de género. Explica conceptos como el sexo, el género y los tipos de violencia (física, psicológica y sexual). Describe cómo se sienten las víctimas de violencia (tristes, asustadas, enfadadas, desprotegidas) y qué pasos deben seguir si son víctimas o conocen un caso, como pedir ayuda médica, denunciar e ir a un refugio si corren peligro. El objetivo final es colaborar para evitar las agres
Este documento describe la filosofía educativa de Ovide Decroly, un pedagogo belga que propuso que la enseñanza en la escuela primaria debería centrarse en actividades significativas y centros de interés organizados por el maestro, ya que el ambiente familiar no siempre podía apoyar adecuadamente el desarrollo del niño. También resume su libro "La vuelta al mundo en nueve meses" que describe su viaje para que los niños puedan conocer otras culturas, incluyendo diferencias en alimentación, vestimenta,
Another version of We is Greater Than Me. How to build a community around your library.
For speaking engagements please contact PC Sweeney at https://pcsweeney.com/speaking-at-your-event/
This document is an interagency statement from 10 United Nations organizations calling for the elimination of female genital mutilation. It provides an overview of female genital mutilation, including that it is practiced in around 28 countries in Africa and Asia, affecting over 100 million girls and women. It discusses the four types of female genital mutilation and why the practice continues due to social and cultural reasons, despite having no health benefits and causing harm. The statement calls on states, organizations and communities to strengthen efforts to end the practice through advocacy, education and legislation.
The document discusses utilizing web archive interoperability with Memento, which provides a framework for integrating and searching across multiple web archives. It describes how Memento acts as a bridge between original web resources and archived versions (mementos) and aggregates data from different archives to allow searching across them. Examples are given of Memento tools and applications that enable time travel functionality and robust links via link decoration.
El documento presenta un organigrama de una institución educativa. En la parte superior se encuentra el Coordinador General y debajo de él están los coordinadores de diferentes áreas como la administrativa, seguridad y pedagógica. Asimismo, se detallan los coordinadores de clases divididos por rangos de edad de los estudiantes como sala cuna hasta noveno grado y un coordinador de zona activa y otro del centro de aprendizaje.
Presentation by Karen Lemke and PC Sweeney on marketing and outreach with a focus on signage, direct mail, email, and Facebook.
For speaking engagements please contact PC Sweeney at http://pcsweeney.com/speaking-at-your-event/
Creating Positive User Experiences Through Technology - Paul KennyMAXfocus
This document discusses key insights and strategies for building value in sales. It outlines three insights: that value exists only in the mind of the buyer, few purchasing decisions are rational, and perceptions of value are driven by many different factors. It then discusses five key battles in sales: first impression, insight and understanding, air time, credibility, and relationship and rapport. Finally, it outlines five sales super powers or habits that can help create value: understanding value, dialogue, sharing stories, asking for commitment, and managing resistance.
O documento apresenta uma coleção de tópicos variados incluindo experiências de compras 3D, tecnologias sustentáveis, mudança climática, sem-teto, entrega de ajuda humanitária na África, autismo, atentados de 11 de setembro e o designer gráfico Milton Glaser. Muitos dos tópicos incluem links para vídeos com mais informações.
Embedded BI Best Practices: Webinar slidesYellowfin
If you haven’t already embedded Business Intelligence (BI) functionality into your application, chances are, your competitors have an advantage.
BI technology is becoming a common component of business applications used across all major job functions, departments and industries.
Gartner predicts that within two years, 25 percent of analytics capabilities will be embedded in business applications, up from only five percent in 2010. If you haven’t already added embedded BI to your software, the time is now.
Watch this Embedded BI Best Practices Webinar recording (https://www.youtube.com/watch?v=8BxPdco9ab8&feature=youtu.be), and view this slide deck, to discover how to successfully add an analytics module to your product suite, and dramatically enhance its salability and market value – minus the development stress you might expect.
Delight your customers and build your brand – all while avoiding the strain of independently developing, maintaining and supporting an in-house BI module.
The document provides observations from an aerial view of the 2011 Mississippi River flood in the areas around Yazoo City and Vicksburg, Mississippi six days before the flood waters crested. Key details include flooded farmland and buildings submerged under flood waters that had overflowed from the Yazoo River into the area around Yazoo City. In Vicksburg, flood waters were nearing the runway of the airport and had overtaken most of the land in the area, though flood walls had so far protected downtown Vicksburg businesses.
Rust: абстракции и безопасность, совершенно бесплатноOpen-IT
Владимир Матвеев: "Rust: абстракции и безопасность, совершенно бесплатно" (Обзор языка Rust: для чего он предназначен, его ключевые особенности, инфраструктура)
SQLAlchemy is a Python SQL toolkit and object relational mapper that allows developers to work with relational databases in Python. It provides a way to generate SQL expressions programmatically and functions as an object relational mapper, allowing Python classes to be mapped to database tables. SQLAlchemy aims to provide a full suite of tools for working with relational databases directly or via an object-relational abstraction layer.
1. Fantom
Cross-VM language
четверг, 24 июня 2010 г.
2. Общие сведения
Объектно-ориентированный
Статически типизированный
Opensource (Academic Free license 3.0)
четверг, 24 июня 2010 г.
3. Почему Fantom?
Мультиплатформенность
Отличный язык
Удобство “из коробки” (built-in tools)
Интеграция с платформой
О@#$%ная IDE от Xored :)
четверг, 24 июня 2010 г.
5. Достоинства языка
Повышение производительности
программиста (по сравнению с Java)
Страховка от ошибок
Мультипарадигменность
Низкий порог вхождения (по сравнению
с Scala, Clojure)
четверг, 24 июня 2010 г.
6. Производительность
Литералы
First-class функции
Замыкания
Вывод типов
Миксины
Множество удобных мелочей
четверг, 24 июня 2010 г.
8. Функции и замыкания
//simple signatures
Функции как объекты |->| voidSig := |->| {}
|->Int| returnsInt := |->Int| { 42 }
Методы содержат |Int a, Int b ->Int| plus := Int#plus.func
функции
|->| mainFunc := #main.func
Функции могут связывать opFunc := |Method m, Int a, Int b| { m.callOn(a, [b]) }
mul := opFunc.bind([Int#mult]) //|Int, Int->Int|
аргументы plus2 := opFunc.bind([Int#plus, 2]) //|Int -> Int|
Замыкания - выражения, Str prefix := ""
возвращающие функции
print := |Obj o->Str| { prefix + o.toStr }
четверг, 24 июня 2010 г.
9. Вывод типов
Вывод локальных mc := MyClass()
s := "this is string"
переменных duration := 1day
Вывод параметров intList := [1,2,4]
типа для коллекций strIntMap := ["a":4, "b":5]
четверг, 24 июня 2010 г.
10. Миксины
mixin FirstLast
{
abstract Str firstName()
Абстрактные поля и abstract Str lastName()
}
методы
mixin Age{ abstract Int age }
Методы с mixin WithImpl : FirstLast
имплементацией {
Str fullName() { "$firstName $lastName" }
}
Перегрузка mixin MultiInh : WithImpl, Age
методов из Obj {
override Str toStr() { "$fullName ($age
years old)" }
}
четверг, 24 июня 2010 г.
11. Мелкие удобства
Неявные upcast’ы Derived derived := base
Safe invoke person?.phones?.first //null if p ==
null
Elvis operator //alias for this == null ? that : this
this ?: that
Не нужны () для методов
cap := "a".capitalize
без параметров
Опциональный return Int negate(Int arg) { arg.negate }
isnot’ keyword alwaysFalse := "a" isnot Str
четверг, 24 июня 2010 г.
12. Безопасность
Nullable типы
Константные классы и члены
No shared mutable state
четверг, 24 июня 2010 г.
13. Nullable types
class Nullable
{
Every type non- Void main()
{
nullable by default Int? nullable := null
Int nonNullable := 0
nonNullable = nullable //runtime err
Obvious errors are nonNullable = null //compile err
caught by compiler do3(null) //compile err
do3(nullable) //runtime err
}
Automatic coercion
Int do1(Int? arg) { null } //compile err
between nullable and
non-nullable with Int do2(Int? arg) { arg } //runtime err
runtime check Int? do3(Int arg) { arg }
}
четверг, 24 июня 2010 г.
14. Const types
class NonConst
{
Const classes contain only const const Int constField
fields Int nonConstField
Void mutate()
Const fields must be set in {
constField = 4 //compile err
constructor nonConstField = 4 //ok
}
}
Const fields can have only const type
class Const
or [List, Map, Func].toImmutable {
new make(Int i, Str[] list)
{
Static fields must be const //implicit call of list.toImmutable
this.list = list
}
List and Maps can be const or const Str[] list
}
mutable
четверг, 24 июня 2010 г.
15. Actor framework
Actors are the only way for multithreading
Actor are const classes extending Actor class
Actors interchange with const or serializable
messages
Actors can have private mutable data
четверг, 24 июня 2010 г.
16. Actor framework
using concurrent
const class Logger : Actor
{
new make(ActorPool pool := ActorPool()) :
super(pool) {}
override Obj? receive(Obj? msg) { echo(msg); return null }
}
class Actors
{
Void main()
{
logger := Logger()
logger.send("Hello")
future := logger.sendLater(1sec, "Later")
logger.send("Now")
future2 := logger.sendWhenDone(future, "After later");
future3 := logger.sendWhenDone(future2, "After after")
future3.cancel
Actor.sleep(2sec)
}
}
четверг, 24 июня 2010 г.
18. Декларативный стиль
a := AddressBook
{
Person
{
first = "Ivan"
last = "Inozemtsev"
phones = [
Phone { num = "+79139494750"; type = PhoneType.cell},
Phone
{
num = "+73833631033"
type = PhoneType.work
}
]
},
}
четверг, 24 июня 2010 г.
19. Динамический стиль
class Dict
Void main()
{
{
Str:Obj? map dict := Dict(["foo":5, "bar":"str"])
new make(Str:Obj? map) { this.map = map } Str a := dict->foo->toStr //"5"
Str b := dict->bar //"str"
override Obj? trap(Str name, Obj?[]? args) Obj o := dict->o //null
{ dict->o = 42
if(args.isEmpty) return map[name]//getter }
return (map[name] = args.first) //setter
}
}
четверг, 24 июня 2010 г.
20. Функциональный
стиль
persons.findAll |Person p->Bool|
{
p.first == "Ivan"
}.map |Person p -> Phone[]|
{
p.phones
}.flatten
.exclude |Phone ph->Bool|
{
ph.type == PhoneType.work
}.map |Phone ph->Str|
{
ph.num
}.each { echo(it) }
четверг, 24 июня 2010 г.
21. Что включено?
Возможность писать build-скрипты на
Фантоме
Компиляция документации API
Встроенные юнит-тесты
Встроенный веб-сервер
Интерактивная консоль (почти REPL)
четверг, 24 июня 2010 г.
22. Билд-скрипты
using build
class Build : build::BuildPod
{
new make()
{
podName = "f4builder"
summary = ""
depends = ["sys 1.0", "compiler 1.0",
"compilerJava 1.0", "javaBytecode 1.0", "f4core 1.0"]
srcDirs = [`fan/`]
outDir = `./`
}
}
четверг, 24 июня 2010 г.
23. Билд-скрипты
class Build : BuildPod
{
@Target { help = "Build native JavaFx files" }
Void javafx()
{
log.info("javafx [$podName]")
log.indent
src := scriptFile.parent + `javafx/`
dist := scriptFile.parent + `res/javafx/`
// start with a clean directory
Delete.make(this, dist).run
CreateDir.make(this, dist).run
// compile and package
cmd := ["javafxpackager", "-src",
src.osPath, "-appClass", "fan.fwt.Canvas", "-d", dist.osPath]
r := Process.make(cmd).run.join
...
четверг, 24 июня 2010 г.
24. документация API
**
** Compare two strings without regard to case and return -1, 0, or 1
** if this string is less than, equal to, or greater than the specified
** string. Only ASCII character case is taken into account.
** See `localeCompare` for localized case insensitive comparisions.
**
** Examples:
** "a".compareIgnoreCase("b") => -1
** "hi".compareIgnoreCase("HI") => 0
** "b".compareIgnoreCase("a") => 1
**
Int compareIgnoreCase(Str s)
четверг, 24 июня 2010 г.
25. документация API
compareIgnoreCase
Int compareIgnoreCase(Str s)
Compare two strings without regard to case and return -1, 0, or 1 if this
string is less than, equal to, or greater than the specified string. Only ASCII
character case is taken into account. See localeCompare for localized case
insensitive comparisions.
Examples:
"a".compareIgnoreCase("b") => -1
"hi".compareIgnoreCase("HI") => 0
"b".compareIgnoreCase("a") => 1
четверг, 24 июня 2010 г.
26. Тесты
class ParseExprTest : Test
{
////////////////////////////////////////////////////////////////
// Literals
////////////////////////////////////////////////////////////////
Void testNullLiteral()
{
verifyExpr(ExprId.nullLiteral, "null", |Literal l|
{
verifyEq(l.val, null)
verifyEq(l.resolvedType.qname, "sys::Obj")
})
}
четверг, 24 июня 2010 г.
27. Веб-сервер
class WebHello : AbstractMain
{
@Opt { help = "http port" }
Int port := 8080
override Int run()
{
wisp := WispService
{
it.port = this.port
it.root = RouteMod
{
routes = [
"hello": HelloMod()
]
}
}
return runServices([wisp])
}
}
const class HelloMod : WebMod
{
override Void onGet()
{
res.headers["Content-Type"] = "text/plain; charset=utf-8"
res.out.print("hello world #4")
}
}
четверг, 24 июня 2010 г.
28. Как поиграться?
komaz-mac:margincon ivaninozemtsev$ fansh
Fantom Shell v1.0.53 ('?' for help)
fansh> a := [1,2,3,4,5]
[1, 2, 3, 4, 5]
fansh> a.map { it * 2 }.map { it.toStr }.sortr
[8, 6, 4, 2, 10]
fansh> [1,2,3,4,5].reduce(0) |Int r, Int i -> Int| { r + i }
15
fansh> mul := |Int op1, Int op2 -> Int| { op1 * op2 }
|sys::Int,sys::Int->sys::Int|
fansh> plusSlot := Int#plus
sys::Int.plus
fansh> plus := |Int op1, Int op2 -> Int| { plusSlot.callOn(op1, [op2]) }
|sys::Int,sys::Int->sys::Int|
fansh> plus(4, 5)
9
четверг, 24 июня 2010 г.
29. Как поиграться?
komaz-mac:margincon ivaninozemtsev$ echo "#! /usr/bin/env fan
class Hello
{
Void main() { echo("Hello, world") }
}
" > hw.fan
komaz-mac:margincon ivaninozemtsev$ chmod +x hw.fan
komaz-mac:margincon ivaninozemtsev$ ./hw.fan
Hello, world
komaz-mac:margincon ivaninozemtsev$
четверг, 24 июня 2010 г.
30. Взаимодействие с платформой
(на примере Java)
using [java]org.eclipse.dltk.internal.ui.text
using [java]org.eclipse.core.runtime
using [java]org.eclipse.dltk.core
using [java]org.eclipse.ui.progress
class ReconcileListener :
IScriptReconcilingListener
{
private AstView view
public new make(AstView view) { this.view = view }
override Void aboutToBeReconciled() {}
override Void reconciled(ISourceModule? module,
Bool forced,
IProgressMonitor? progressMonitor) {
if (module != null) UpdateJob(view, module).schedule
}
}
четверг, 24 июня 2010 г.
31. F4 IDE
Написана на Семантическая
Фантоме подсветка
Компиляция/ Навигация по коду
запуск/отладка
Построение
Ссылки между иерархий
проектами наследования
Продвинутое Показ API-doc’ов
автодополнение
четверг, 24 июня 2010 г.