Button linkBtn = (Button) findViewById(R.id.button_toast);
linkBtn.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Toast.makeText(GolfcourseDetailActivity.this, "Here's your toast!",
Toast.LENGTH_LONG).show();
}
Туристам - http://www.iamsterdam.com/ Билеты в музеи онлайн - http://tickets.holland.com/ Вообще любой маршрут - http://www.9292.nl Перемещение по ж/д внутри NL - http://www.ns.nl Ж/д в соседние страны - http://www.hispeed.nl Автобусы (EU) - http://www.eurolines.com Где ближ. магазин и до скольки открыт - http://www.opentot.nl/
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
angular.module('myApp', []) | |
/** | |
* concat | |
* transforms array [a,b,c] to a template string list 'a,b,c' | |
* */ | |
.filter('concat', function() { | |
return function(input, property) { | |
var out = ''; | |
for (var i = 0; i < input.length; i++) { | |
out += input[i][property] ? input[i][property] : input[i]; |
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
// see article with examples in JAVA here: https://dzone.com/articles/design-patterns-the-strategy-and-factory-patterns | |
// example for educational purposes shownig close and mature syntax of modern TypeScript | |
enum AccountTypes {CURRENT, SAVINGS, HIGH_ROLLER_MONEY_MARKET, STANDARD_MONEY_MARKET} | |
//////////////////////////////////////// | |
/// the interface that is used by the strategy | |
//////////////////////////////////////// | |
interface InterestCalculationStrategy { |
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
const request = require('request'); | |
const APIKEY = require('./weather_apikey'); //file with '{"key": "XXX"}' | |
const ip = '208.67.222.222'; | |
const getLatLng = (ip) => { | |
const url = `https://ipapi.co/${ip}/latlong/`; | |
request.get(url) | |
.on('response', function (response) { | |
if (response.statusCode == 200) getWeather(response.body); |
- Модульная разработка
- Наименование копонентов vue
- Выражения в компонентах должны быть простыми
- Оставляйте свойства простыми
- Правильно используйте свойства компонента
- Определяйте this как component
- Структура компонента
- Именование событий
- Избегайте this.$parent
- Используйте this.$refs осторожно
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
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
from time import gmtime, strftime | |
import locale | |
import feedparser | |
from gtts import gTTS | |
from time import sleep | |
import os | |
import pyglet |
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
#!/usr/bin/python | |
# -*- coding: UTF-8 -*- | |
from time import gmtime, strftime | |
import locale | |
import feedparser | |
from gtts import gTTS | |
from time import sleep | |
import os | |
import pyglet |
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
function DoneInXSecPlugin() { | |
this.chunkVersions = {}; | |
} | |
DoneInXSecPlugin.prototype.apply = function (compiler) { | |
compiler.plugin("done", (stats) => { | |
console.log("Done in %s sec", (stats.endTime - stats.startTime)/1000); | |
}); | |
}; |