Żerkowice-Skała (PLH020077) – dwuczłonowy obszar mający znaczenie dla Wspólnoty (projektowany specjalny obszar ochrony siedlisk) powstały w ramach programu Natura 2000 w południowo-zachodniej Polsce. Obszar szczególnie istotny, gdyż znajduje się w zasięgu referencyjnym włosocienia delikatnego.

Położenie i charakterystyka
Obszar znajduje się w województwie dolnośląskim, regionie jeleniogórskim, w mezoregionie Pogórza Izerskiego, w gminie Lwówek Śląski. W otoczeniu obszaru występują pola uprawne i zabudowania wsi Skała oraz Żerkowice, natomiast na północ od niego intensywne wydobycie piaskowca prowadzą dwa duże kamieniołomy.

Obszar stanowi krawędź piaskowcowej kwesty z licznymi skałami i wychodniami skalnymi o charakterze ostańcowym, otoczone dobrze zachowanymi lasami liściastymi w typie grądów, a w dolinie Bobru łęgów wiązowo-jesionowych. Skały te stanowią jedne z najdalej na północ wysuniętych odsłonięć skalnych piaskowców kredowych związanych z Masywem Czeskim.

Na obszarze odnotowano występowanie m.in.: grądu środkowoeuropejskiego i grądu subkontynentalnego oraz ścian skalnych i urwisk krzemianowych. Obszar szczególnie istotny, z uwagi znajdowania się w zasięgu referencyjnym włosocienia delikatnego, dla którego występują tutaj doskonałe siedliska.

Turystyka
Przez teren obszaru prowadzi szlak turystyczny:

  – zielony szlak prowadzący z Bolesławca, przez Lwówek Śląski i dalej.

Zobacz też
 Huzarski Skok
 Skała z Medalionem
 Szwajcaria Lwówecka
 Skały Kawalerskie
 Panieńskie Skały

Przypisy

Linki zewnętrzne

Obszary Natura 2000 w województwie dolnośląskim
Lwówek Śląski (gmina)
Pogórze Izerskie

{'title': 'Żerkowice-Skała', 'url': 'https://pl.wikipedia.org/wiki/%C5%BBerkowice-Ska%C5%82a', 'language': 'pl', 'timestamp': '20230320'}


In der Mathematik sind halbeinfache algebraische Gruppen ein Begriff aus der algebraischen Geometrie.

Definition
Eine zusammenhängende algebraische Gruppe  über einem Körper  heißt halbeinfach, wenn eine der folgenden äquivalenten Bedingungen erfüllt ist:
 der maximale zusammenhängende auflösbare Normalteiler ist
  hat keinen nichttrivialen zusammenhängenden abelschen Normalteiler.

Beispiele
 Die spezielle lineare Gruppe  ist halbeinfach.
 Die projektive lineare Gruppe  ist halbeinfach.
 Die symplektische Gruppe  ist halbeinfach.
 Nicht halbeinfach sind die allgemeine lineare Gruppe, die multiplikative Gruppe und die Gruppe der invertierbaren oberen Dreiecksmatrizen.

Halbeinfache Lie-Gruppen

Für eine halbeinfache algebraische Gruppe  über  ist  eine halbeinfache Lie-Gruppe.

Nicht jede halbeinfache Lie-Gruppe ist eine halbeinfache algebraische Gruppe. Ein Beispiel hierfür ist die universelle Überlagerung von .

Klassifikation
Die Klassifikation halbeinfacher algebraischer Gruppen über einem algebraisch abgeschlossenen Körper ist analog zur Klassifikation halbeinfacher komplexer Lie-Gruppen durch Dynkin-Diagramme.

Literatur
 J.E. Humphreys, „Linear algebraic groups“, Springer (1975)
 T.A. Springer, „Linear algebraic groups“, Birkhäuser (1981)

Weblinks
 Semi-simple algebraic group (Encyclopedia of Mathematics)

Algebraische Varietät
Gruppe (Mathematik)

{'title': 'Halbeinfache algebraische Gruppe', 'url': 'https://de.wikipedia.org/wiki/Halbeinfache%20algebraische%20Gruppe', 'language': 'de', 'timestamp': '20230320'}


Гнилу́ши — бывшая деревня, существовавшая до середины XX века. С 1963 года в составе города Долгопрудный Московской области. Ныне о её существовании напоминает лишь одноимённая остановка общественного транспорта на Лихачёвском шоссе.

Появилась в XVIII веке, при отделении 28 дворов от села Старбеево. Получила своё название от речки, некогда протекавшей рядом с деревней.

Деревня Гнилуши располагалась южнее села Лихачёво и приписывалась к приходу Лихачёвского Храма Георгия Победоносца.

В 1852 году владельцем села Старбеева и деревни Гнилуши значился князь Александр Дмитриевич Львов, статский советник, потомок Рюриковичей в 30 колене, первым организовавший в России пожарную охрану.

Именно при нем проходила в этой местности крестьянская реформа 1861 года, тогда в Гнилушах числилось 24 крестьянских двора и 85 ревизских душ.

После крестьянской реформы в Гнилушах быстро шло дробление семей разделами. В 1882 году здесь уже числилось 37 домохозяев. Наряду с этим, налог был так велик, а доход от земледелия так низок, что все доходы крестьян уходили на покрытие налогов. Кормиться приходилось за счет промыслов.

С приходом Советской власти разросшееся к тому времени село Старбеево и деревня Гнилуши были объединены в село Старбеево-Гнилуши.

В 1930 году сорок три из шестидесяти двух дворов села объединились в колхоз, который немного позднее, слился с соседними колхозами, образуя одно большое хозяйственное объединение. Население потянулось к знаниям, была открыта школа.

Построенный к 1934 году участок «Глубокая выемка» канала имени Москвы, вновь разделил село. Старбеево и Гнилуши оказались по разные берега канала.

К 1950 годам деревня Гнилуши окончательно пришла в упадок. Оставшиеся дома деревни были отписаны к селу Лихачёво.

В 1963 году территория Гнилуш вошла в состав города Долгопрудного.

В 2010 году вся историческая территория бывшей деревни была застроена таунхаусами.

Ссылки
 О Лихачёво и Гнилушах в энциклопедии Долгопрудного

Населённые пункты по алфавиту
Микрорайоны Долгопрудного
Исчезнувшие населённые пункты Московской области


<?php

namespace common\modules\lead\models;

interface LeadReportInterface {

	public function getLead(): LeadInterface;

	public function getStatus(): LeadStatusInterface;

	public function getOldStatus(): ?LeadStatusInterface;

	public function getOwnerId(): int;

	public function getDetails(): ?string;

	public function getAnswersNames(): array;
}

{'content_hash': 'ad05fb4fd8001f0ceb65a53dadc88246', 'timestamp': '', 'source': 'github', 'line_count': 18, 'max_line_length': 54, 'avg_line_length': 19.666666666666668, 'alnum_prop': 0.7768361581920904, 'repo_name': 'edzima/VestraTele', 'id': '8ca564b8ad567bf0983677ea779d209e2cd074af', 'size': '354', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'common/modules/lead/models/LeadReportInterface.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Batchfile', 'bytes': '970'}, {'name': 'CSS', 'bytes': '6759'}, {'name': 'Dockerfile', 'bytes': '327'}, {'name': 'HTML', 'bytes': '7549'}, {'name': 'JavaScript', 'bytes': '27669'}, {'name': 'PHP', 'bytes': '3099238'}, {'name': 'Shell', 'bytes': '3173'}, {'name': 'TypeScript', 'bytes': '5231'}, {'name': 'Vue', 'bytes': '34794'}]}


title: Peta Risiko Bencana Seluler dan Pusat Informasi dan Mitigasi Bencana (PIMB)
date: 2014-04-02 11:08:00 +07:00
nohibah: 164
nama: Misdarul Ihsan
lokasi: Aceh
organisasi: Aliansi Jurnalis Independen (AJI) Banda Aceh
judul: Peta Risiko Bencana Seluler dan Pusat Informasi dan Mitigasi Bencana (PIMB)
lama: 12 Bulan
target: Masyarakat Provinsi Aceh
keberhasilan: 1. Adanya aplikasi peta risiko bencana Aceh dan pusat informasi mitigasi
  bencana berbasis seluler (Android, iOS, Windows Phone, BlackBerry dan SMS Gateway)
  2. Adanya jurnalis yang menjadi kontributor pusat informasi mitgasi di sembilan
  kabupaten/kota. 3. Adanya 150 info setiap bulan yg disebar melalui SMS, aplikasi
  seluler, dan website. 4. Terbangunnya sistem informasi kebencanaan.
tipe: 1. Aplikasi berbasis telepon seluler pintar yang berisi informasi kebencanaan
  dan mitigasi bencana (edukasi). Aplikasi ini juga dilengkapi dengan peta bencana
  Aceh (Aceh disaster map) tingkat kecamatan. 2. SMS Gateway
strategi: |-
  1. Strategi promosi Promosi aplikasi peta bencana melalui seluler dan PIMB dilakukan dengan cara menyebarkan informasi melalui media masa dan jejaring sosial. 2. Penyebaran Aplikasi disebarkan melalui Google Play Store, BlackBerry World, Apps store, Market Place, serta SMS gateway dan link juga disebarkan melalui jejaring sosial. 3. Keberlanjutan Setelah program peta risiko bencana mencakup sembilan kabupaten/kota dilanjutkan ke sembilan kabupaten kota yang lainnya. Serta mengformalkan PIMB sebagai lembaga yang melibatkan pemerintah, jurnalis/media serta masyarakat. 4. Verifikasi Informasi Informasi yang disebarkan terlebih dahulu diverifikasi ke berbagai pihak termasuk BMKG serta pemerintah setempat oleh jurnalis dari jejaring AJI Kota Banda Aceh.

  Aplikasi Peta Risiko Bencana dan Pusat Informasi dan Mitigasi Bencana menyediakan informasi, materi edukasi, dan peta risiko bencana selama tujuh hari dalam seminggu.
kuantitas: NA
dana: Rp. 706 Juta
deskripsi: Aceh merupakan daerah rawan bencana. Tidak satupun daerah di Aceh yang
  luput dari potensi bencana alam dan sosial. Sehingga diperlukan peta risiko bencana
  yang mudah diakses masyarakat untuk meningkatkan kesadaran pengurangan risiko bencana.
  AJI Banda Aceh akan membuat peta risiko bencana dengan medium seluler yang menampilkan
  risiko kebencanaan hingga tingkat kecamatan di Banda Aceh, Aceh Besar, Aceh Jaya,
  Aceh Barat, Aceh Tengah, Aceh Tenggara, Aceh Singkil, Lhokseumawe, Aceh Tamiang.
  9 daerah itu dipilih sebagai contoh karena paling rawan bencana. Aplikasi peta bencana
  dapat diakses melalui seluler itu, diproduksi oleh Pusat Informasi dan Mitigasi
  Bencana (PIMB). PIMB berfungsi untuk mengumpulkan dan menyebarkan informasi serta
  edukasi mitigasi bencana. PIMB dikelola AJI melibatkan jurnalis dan relawan di 9
  daerah. Informasi potensi kebencanaan bersumber dari BMKG dan masyarakat setempat.
  PIMB juga menyebarkan informasi mengenai pengurangan risiko bencana dan mengedukasi
  kesiapsiagaan masyarakat. Penyebaran arus informasi dan edukasi kebencanaan menggunakan
  aplikasi seluler multiplatform. Ia akan mudah diakses oleh perangkat bergerak berbasis
  Android, iOS, Windows Phone, dan Blackberry, serta melalui SMS Gateway. Aplikasi
  ini disebarkan melalui Play Store, Appstore, Windows Market Place, dan App World
  sehingga masyarakat mudah mengunduh. Untuk SMS Gateway, masyarakat dapat mendaftarkan
  nomor telepon selulernya secara gratis. Alur-pesan dari dan ke PIMB tidak memakan
  biaya.
masalah: |-
  Mitigasi bencana sangat penting bagi Aceh. Aceh yang terletak di jalur Patahan Sumatera dan kawasan Samudera Hindia merupakan rawan bencana. Selain gempa dan tsunami, Aceh juga diancam oleh bencana gunung api, longsor, banjir, dll. Pasca tsunami berbagai mekanisme sistem peringatan dini telah dijalankan namun masih belum efektif. Hal ini dikarenakan kurangnya terlibat masyarakat dalam kampanye pengurangan risiko bencana yang dijalankan. Dan belum maksimalnya pemanfaatan teknologi informasi dan komunikasi yang mudah diakses masyarakat luas di daerah rawan bencana.

  Masyarakat perkotaan Aceh yang familiar dengan aplikasi seluler berbasis Android, iOS, Windows Phone, dan Blackberry merupakan potensi yang dapat dimaksimalkan untuk kampanye dan edukasi penggurangan risiko bencana. Sementara di pedesaan, nyaris seluruh masyarakat mampu menggunakan SMS yang merupakan base aplikasi yang tersedia di ponsel, sehingga memudahkan dalam mengirim dan menerima informasi dan edukasi kebencanaan.
solusi: 'Selain membangun aplikasi Pusat Informasi dan Mitigasi Bencana (untuk smartphone),
  program ini juga menyediakan layanan SMS Gateway. Beberapa aktivitas juga dilakukan
  yang bertujuan untuk peningkatan kapasitas SDM dalam pengurangan risiko bencana,
  di antaranya: 1. Memberikan pengetahuan dasar pada wartawan dan tokoh masyarakat
  mengenai kebencanaan dan sistem Pusat Informasi dan Mitigasi Bencana. 2. Mendaftar
  SMS premium ke salah satu jaringan operator 3. Membangun jaringan informasi dengan
  wartawan dan tokoh masyarakat di daerah rawan bencana 4. Membangun website pusat
  informasi dan mitigasi bencana Aceh'
layout: hibah
---

![164](/static/img/hibahcms/164.png){: .img-responsive }{: width="350" }

### {{ page.nohibah }} - {{ page.title }}

{{ page.deskripsi }}

{'content_hash': '12825610ca1eecbd311442ca411afbf0', 'timestamp': '', 'source': 'github', 'line_count': 62, 'max_line_length': 760, 'avg_line_length': 85.7258064516129, 'alnum_prop': 0.8191909689557855, 'repo_name': 'RioSatria/ciptamedia', 'id': 'd65e5bd08c3cbe3c4d35cdfe89e67a5b1a4dd67f', 'size': '5319', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'hibahcms/164.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '370918'}, {'name': 'HTML', 'bytes': '518190'}, {'name': 'JavaScript', 'bytes': '32414'}, {'name': 'Shell', 'bytes': '794'}]}


create table Drinks(drinkID int, drinkName text, ingredientNumber int);
create table Ingredients(ingredientID int, ingredientName text);
create table Recipe(drinkID int, ingredientID int);

{'content_hash': 'f31f9b3b0bac21b58e2ee6f7968af264', 'timestamp': '', 'source': 'github', 'line_count': 3, 'max_line_length': 71, 'avg_line_length': 62.666666666666664, 'alnum_prop': 0.8297872340425532, 'repo_name': 'ranajays/bottomsUp', 'id': '2b22a4b792a31bc86c333a27234551e7d8d2cddc', 'size': '188', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'dbfile/create.sql', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '257886'}, {'name': 'JavaScript', 'bytes': '89904'}, {'name': 'PHP', 'bytes': '19'}]}


On Mon, 12/17/2012 - 6:40pm.
On Mon, 12/17/2012 - 6:26pm.
On Mon, 12/17/2012 - 3:07pm.
On Mon, 12/17/2012 - 3:02pm.
On Mon, 12/17/2012 - 2:57pm.
On Mon, 12/17/2012 - 2:53pm.
On Mon, 12/17/2012 - 2:45pm.
On Mon, 12/17/2012 - 2:44pm.
On Mon, 12/17/2012 - 2:37pm.
On Mon, 12/17/2012 - 2:32pm.


from traits.api import Str, Int, Enum, Property, Bool, Float, HasTraits
from uncertainties import ufloat

from pychron.options.aux_plot import AuxPlot
from pychron.options.options import FigureOptions
from pychron.pychron_constants import FLUX_CONSTANTS, ERROR_TYPES, MAIN, APPEARANCE, FLUX_MODEL_KINDS

class BaseFluxOptions(FigureOptions):
    color_map_name = Str('jet')
    marker_size = Int(5)
    levels = Int(50, auto_set=False, enter_set=True)
    plot_kind = Enum('1D', '2D', 'Grid')
    use_weighted_fit = Bool(False)
    monte_carlo_ntrials = Int(10)
    use_monte_carlo = Bool(False)
    position_error = Float
    predicted_j_error_type = Enum(*ERROR_TYPES)

class MonitorMixin(HasTraits):
    error_kind = Enum(*ERROR_TYPES)

    selected_monitor = Enum(list(FLUX_CONSTANTS.keys()))
    lambda_k = Property(depends_on='selected_monitor')
    monitor_age = Property(depends_on='selected_monitor')
    monitor_name = Property(depends_on='selected_monitor')
    monitor_material = Property(depends_on='selected_monitor')

    def _get_lambda_k(self):
        dc = FLUX_CONSTANTS[self.selected_monitor]
        b = ufloat(*dc['lambda_b'])
        ec = ufloat(*dc['lambda_ec'])
        return b+ec

    def _get_monitor_name(self):
        return FLUX_CONSTANTS[self.selected_monitor].get('monitor_name', '')

    def _get_monitor_age(self):
        return FLUX_CONSTANTS[self.selected_monitor].get('monitor_age', 0)

    def _get_monitor_material(self):
        return FLUX_CONSTANTS[self.selected_monitor].get('monitor_material', '')

class FluxOptions(BaseFluxOptions, MonitorMixin):

    model_kind = Enum(FLUX_MODEL_KINDS)
    flux_scalar = Float(1000)
    n_neighbors = Int(2)

    least_squares_fit = Enum('Linear', 'Parabolic', 'Cubic', 'Quartic')
    one_d_axis = Enum('X', 'Y')

    def initialize(self):
        self.subview_names = [MAIN, APPEARANCE]

    def _get_subview(self, name):
        from pychron.options.views.flux_views import VIEWS
        return VIEWS[name]

class FluxVisualizationOptions(BaseFluxOptions):
    model_kind = Enum('Plane', 'Bowl')

    def initialize(self):
        self.subview_names = [MAIN, APPEARANCE]

    def _get_subview(self, name):
        from pychron.options.views.flux_visualization_views import VIEWS
        return VIEWS[name]

class VerticalFluxAuxPlot(AuxPlot):
    name = 'Height (mm)'

class VerticalFluxOptions(FigureOptions, MonitorMixin):

    use_j = Bool
    use_f_enabled = Bool

    @property
    def x_title(self):
        t = 'J'
        if self.use_f_enabled:
            t = 'J' if self.use_j else '40Ar*/Ar39K'
        return t

    def initialize(self):
        self.subview_names = [MAIN, APPEARANCE]

    def get_plotable_aux_plots(self):
        return [VerticalFluxAuxPlot()]

    def _get_subview(self, name):
        from pychron.options.views.vertical_flux_views import VIEWS
        return VIEWS[name]
# ============= EOF =============================================


Q: Сквозное (транзитное) соединение Socket Вопрос.
Есть сервер. К нему подключается Клиент по порту ХХХ. Второй клиент также подключается по этому же порту.
Есть ли возможность создать сквозное соединение на сервере, чтобы через него оба клиента обменивались данными, как если бы один из них коннектился к статическому ip?
Используя .NET Socket Class, ну и вообще как всю эту тягомотину реализуют серверы коммутаторы?

A: Разумеется, можно. В чем вообще проблема? Читаем из первого сокета, пишем во второй. В другом потоке читаем из второго сокета и пишем в первый.

Роберт, не надо редактировать мой ответ чтобы сказать мне что-нибудь. Надо было выйти из-под аккаунта Натали, зайти под Робертом - и написать нормальный комментарий.

Теперь отвечаю на ваш вопрос. Никакого специального транзитного режима сокетов не существует - просто потому что такая задача стоит очень редко. Приоритет потокам можно поднять - а можно и не менять, это зависит от важности задачи и загруженности сервера.
Если же вам нужны готовые решения - посмотрите в сторону прокси-серверов SOCKS 5 и технологии VPN.

A: Если все же нужен программный подход, я бы, помимо написания простого решения "читай один - пиши в другой и наоборот", обратился бы к протоколу STUN, и уже на его основе искал "велосипеды"

{'language': 'ru', 'url': 'https://ru.stackoverflow.com/questions/454869', 'timestamp': '2023-03-29', 'source': 'stackexchange', 'question_score': '2'}


import operator
from datetime import datetime

import pytest

from numpy import nan
import numpy as np
import pandas as pd

from pandas import Series, DataFrame, bdate_range, isna, compat
from pandas.tseries.offsets import BDay
import pandas.util.testing as tm
from pandas.compat import range
from pandas.core.reshape.util import cartesian_product

import pandas.core.sparse.frame as spf

from pandas._libs.sparse import BlockIndex, IntIndex
from pandas.core.sparse.api import SparseSeries
from pandas.tests.series.test_api import SharedWithSparse

def _test_data1():
    # nan-based
    arr = np.arange(20, dtype=float)
    index = np.arange(20)
    arr[:2] = nan
    arr[5:10] = nan
    arr[-3:] = nan

    return arr, index

def _test_data2():
    # nan-based
    arr = np.arange(15, dtype=float)
    index = np.arange(15)
    arr[7:12] = nan
    arr[-1:] = nan
    return arr, index

def _test_data1_zero():
    # zero-based
    arr, index = _test_data1()
    arr[np.isnan(arr)] = 0
    return arr, index

def _test_data2_zero():
    # zero-based
    arr, index = _test_data2()
    arr[np.isnan(arr)] = 0
    return arr, index

class TestSparseSeries(SharedWithSparse):

    series_klass = SparseSeries
    # SharedWithSparse tests use generic, series_klass-agnostic assertion
    _assert_series_equal = staticmethod(tm.assert_sp_series_equal)

    def setup_method(self, method):
        arr, index = _test_data1()

        date_index = bdate_range('1/1/2011', periods=len(index))

        self.bseries = SparseSeries(arr, index=index, kind='block',
                                    name='bseries')
        self.ts = self.bseries

        self.btseries = SparseSeries(arr, index=date_index, kind='block')

        self.iseries = SparseSeries(arr, index=index, kind='integer',
                                    name='iseries')

        arr, index = _test_data2()
        self.bseries2 = SparseSeries(arr, index=index, kind='block')
        self.iseries2 = SparseSeries(arr, index=index, kind='integer')

        arr, index = _test_data1_zero()
        self.zbseries = SparseSeries(arr, index=index, kind='block',
                                     fill_value=0, name='zbseries')
        self.ziseries = SparseSeries(arr, index=index, kind='integer',
                                     fill_value=0)

        arr, index = _test_data2_zero()
        self.zbseries2 = SparseSeries(arr, index=index, kind='block',
                                      fill_value=0)
        self.ziseries2 = SparseSeries(arr, index=index, kind='integer',
                                      fill_value=0)

    def test_constructor_dict_input(self):
        # gh-16905
        constructor_dict = {1: 1.}
        index = [0, 1, 2]

        # Series with index passed in
        series = pd.Series(constructor_dict)
        expected = SparseSeries(series, index=index)

        result = SparseSeries(constructor_dict, index=index)
        tm.assert_sp_series_equal(result, expected)

        # Series with index and dictionary with no index
        expected = SparseSeries(series)

        result = SparseSeries(constructor_dict)
        tm.assert_sp_series_equal(result, expected)

    def test_constructor_dtype(self):
        arr = SparseSeries([np.nan, 1, 2, np.nan])
        assert arr.dtype == np.float64
        assert np.isnan(arr.fill_value)

        arr = SparseSeries([np.nan, 1, 2, np.nan], fill_value=0)
        assert arr.dtype == np.float64
        assert arr.fill_value == 0

        arr = SparseSeries([0, 1, 2, 4], dtype=np.int64, fill_value=np.nan)
        assert arr.dtype == np.int64
        assert np.isnan(arr.fill_value)

        arr = SparseSeries([0, 1, 2, 4], dtype=np.int64)
        assert arr.dtype == np.int64
        assert arr.fill_value == 0

        arr = SparseSeries([0, 1, 2, 4], fill_value=0, dtype=np.int64)
        assert arr.dtype == np.int64
        assert arr.fill_value == 0

    def test_iteration_and_str(self):
        [x for x in self.bseries]
        str(self.bseries)

    def test_construct_DataFrame_with_sp_series(self):
        # it works!
        df = DataFrame({'col': self.bseries})

        # printing & access
        df.iloc[:1]
        df['col']
        df.dtypes
        str(df)

        tm.assert_sp_series_equal(df['col'], self.bseries, check_names=False)

        result = df.iloc[:, 0]
        tm.assert_sp_series_equal(result, self.bseries, check_names=False)

        # blocking
        expected = Series({'col': 'float64:sparse'})
        result = df.ftypes
        tm.assert_series_equal(expected, result)

    def test_constructor_preserve_attr(self):
        arr = pd.SparseArray([1, 0, 3, 0], dtype=np.int64, fill_value=0)
        assert arr.dtype == np.int64
        assert arr.fill_value == 0

        s = pd.SparseSeries(arr, name='x')
        assert s.dtype == np.int64
        assert s.fill_value == 0

    def test_series_density(self):
        # GH2803
        ts = Series(np.random.randn(10))
        ts[2:-2] = nan
        sts = ts.to_sparse()
        density = sts.density  # don't die
        assert density == 4 / 10.0

    def test_sparse_to_dense(self):
        arr, index = _test_data1()
        series = self.bseries.to_dense()
        tm.assert_series_equal(series, Series(arr, name='bseries'))

        # see gh-14647
        with tm.assert_produces_warning(FutureWarning,
                                        check_stacklevel=False):
            series = self.bseries.to_dense(sparse_only=True)

        indexer = np.isfinite(arr)
        exp = Series(arr[indexer], index=index[indexer], name='bseries')
        tm.assert_series_equal(series, exp)

        series = self.iseries.to_dense()
        tm.assert_series_equal(series, Series(arr, name='iseries'))

        arr, index = _test_data1_zero()
        series = self.zbseries.to_dense()
        tm.assert_series_equal(series, Series(arr, name='zbseries'))

        series = self.ziseries.to_dense()
        tm.assert_series_equal(series, Series(arr))

    def test_to_dense_fill_value(self):
        s = pd.Series([1, np.nan, np.nan, 3, np.nan])
        res = SparseSeries(s).to_dense()
        tm.assert_series_equal(res, s)

        res = SparseSeries(s, fill_value=0).to_dense()
        tm.assert_series_equal(res, s)

        s = pd.Series([1, np.nan, 0, 3, 0])
        res = SparseSeries(s, fill_value=0).to_dense()
        tm.assert_series_equal(res, s)

        res = SparseSeries(s, fill_value=0).to_dense()
        tm.assert_series_equal(res, s)

        s = pd.Series([np.nan, np.nan, np.nan, np.nan, np.nan])
        res = SparseSeries(s).to_dense()
        tm.assert_series_equal(res, s)

        s = pd.Series([np.nan, np.nan, np.nan, np.nan, np.nan])
        res = SparseSeries(s, fill_value=0).to_dense()
        tm.assert_series_equal(res, s)

    def test_dense_to_sparse(self):
        series = self.bseries.to_dense()
        bseries = series.to_sparse(kind='block')
        iseries = series.to_sparse(kind='integer')
        tm.assert_sp_series_equal(bseries, self.bseries)
        tm.assert_sp_series_equal(iseries, self.iseries, check_names=False)
        assert iseries.name == self.bseries.name

        assert len(series) == len(bseries)
        assert len(series) == len(iseries)
        assert series.shape == bseries.shape
        assert series.shape == iseries.shape

        # non-NaN fill value
        series = self.zbseries.to_dense()
        zbseries = series.to_sparse(kind='block', fill_value=0)
        ziseries = series.to_sparse(kind='integer', fill_value=0)
        tm.assert_sp_series_equal(zbseries, self.zbseries)
        tm.assert_sp_series_equal(ziseries, self.ziseries, check_names=False)
        assert ziseries.name == self.zbseries.name

        assert len(series) == len(zbseries)
        assert len(series) == len(ziseries)
        assert series.shape == zbseries.shape
        assert series.shape == ziseries.shape

    def test_to_dense_preserve_name(self):
        assert (self.bseries.name is not None)
        result = self.bseries.to_dense()
        assert result.name == self.bseries.name

    def test_constructor(self):
        # test setup guys
        assert np.isnan(self.bseries.fill_value)
        assert isinstance(self.bseries.sp_index, BlockIndex)
        assert np.isnan(self.iseries.fill_value)
        assert isinstance(self.iseries.sp_index, IntIndex)

        assert self.zbseries.fill_value == 0
        tm.assert_numpy_array_equal(self.zbseries.values.values,
                                    self.bseries.to_dense().fillna(0).values)

        # pass SparseSeries
        def _check_const(sparse, name):
            # use passed series name
            result = SparseSeries(sparse)
            tm.assert_sp_series_equal(result, sparse)
            assert sparse.name == name
            assert result.name == name

            # use passed name
            result = SparseSeries(sparse, name='x')
            tm.assert_sp_series_equal(result, sparse, check_names=False)
            assert result.name == 'x'

        _check_const(self.bseries, 'bseries')
        _check_const(self.iseries, 'iseries')
        _check_const(self.zbseries, 'zbseries')

        # Sparse time series works
        date_index = bdate_range('1/1/2000', periods=len(self.bseries))
        s5 = SparseSeries(self.bseries, index=date_index)
        assert isinstance(s5, SparseSeries)

        # pass Series
        bseries2 = SparseSeries(self.bseries.to_dense())
        tm.assert_numpy_array_equal(self.bseries.sp_values, bseries2.sp_values)

        # pass dict?

        # don't copy the data by default
        values = np.ones(self.bseries.npoints)
        sp = SparseSeries(values, sparse_index=self.bseries.sp_index)
        sp.sp_values[:5] = 97
        assert values[0] == 97

        assert len(sp) == 20
        assert sp.shape == (20, )

        # but can make it copy!
        sp = SparseSeries(values, sparse_index=self.bseries.sp_index,
                          copy=True)
        sp.sp_values[:5] = 100
        assert values[0] == 97

        assert len(sp) == 20
        assert sp.shape == (20, )

    def test_constructor_scalar(self):
        data = 5
        sp = SparseSeries(data, np.arange(100))
        sp = sp.reindex(np.arange(200))
        assert (sp.loc[:99] == data).all()
        assert isna(sp.loc[100:]).all()

        data = np.nan
        sp = SparseSeries(data, np.arange(100))
        assert len(sp) == 100
        assert sp.shape == (100, )

    def test_constructor_ndarray(self):
        pass

    def test_constructor_nonnan(self):
        arr = [0, 0, 0, nan, nan]
        sp_series = SparseSeries(arr, fill_value=0)
        tm.assert_numpy_array_equal(sp_series.values.values, np.array(arr))
        assert len(sp_series) == 5
        assert sp_series.shape == (5, )

    def test_constructor_empty(self):
        # see gh-9272
        sp = SparseSeries()
        assert len(sp.index) == 0
        assert sp.shape == (0, )

    def test_copy_astype(self):
        cop = self.bseries.astype(np.float64)
        assert cop is not self.bseries
        assert cop.sp_index is self.bseries.sp_index
        assert cop.dtype == np.float64

        cop2 = self.iseries.copy()

        tm.assert_sp_series_equal(cop, self.bseries)
        tm.assert_sp_series_equal(cop2, self.iseries)

        # test that data is copied
        cop[:5] = 97
        assert cop.sp_values[0] == 97
        assert self.bseries.sp_values[0] != 97

        # correct fill value
        zbcop = self.zbseries.copy()
        zicop = self.ziseries.copy()

        tm.assert_sp_series_equal(zbcop, self.zbseries)
        tm.assert_sp_series_equal(zicop, self.ziseries)

        # no deep copy
        view = self.bseries.copy(deep=False)
        view.sp_values[:5] = 5
        assert (self.bseries.sp_values[:5] == 5).all()

    def test_shape(self):
        # see gh-10452
        assert self.bseries.shape == (20, )
        assert self.btseries.shape == (20, )
        assert self.iseries.shape == (20, )

        assert self.bseries2.shape == (15, )
        assert self.iseries2.shape == (15, )

        assert self.zbseries2.shape == (15, )
        assert self.ziseries2.shape == (15, )

    def test_astype(self):
        with pytest.raises(ValueError):
            self.bseries.astype(np.int64)

    def test_astype_all(self):
        orig = pd.Series(np.array([1, 2, 3]))
        s = SparseSeries(orig)

        types = [np.float64, np.float32, np.int64,
                 np.int32, np.int16, np.int8]
        for typ in types:
            res = s.astype(typ)
            assert res.dtype == typ
            tm.assert_series_equal(res.to_dense(), orig.astype(typ))

    def test_kind(self):
        assert self.bseries.kind == 'block'
        assert self.iseries.kind == 'integer'

    def test_to_frame(self):
        # GH 9850
        s = pd.SparseSeries([1, 2, 0, nan, 4, nan, 0], name='x')
        exp = pd.SparseDataFrame({'x': [1, 2, 0, nan, 4, nan, 0]})
        tm.assert_sp_frame_equal(s.to_frame(), exp)

        exp = pd.SparseDataFrame({'y': [1, 2, 0, nan, 4, nan, 0]})
        tm.assert_sp_frame_equal(s.to_frame(name='y'), exp)

        s = pd.SparseSeries([1, 2, 0, nan, 4, nan, 0], name='x', fill_value=0)
        exp = pd.SparseDataFrame({'x': [1, 2, 0, nan, 4, nan, 0]},
                                 default_fill_value=0)

        tm.assert_sp_frame_equal(s.to_frame(), exp)
        exp = pd.DataFrame({'y': [1, 2, 0, nan, 4, nan, 0]})
        tm.assert_frame_equal(s.to_frame(name='y').to_dense(), exp)

    def test_pickle(self):
        def _test_roundtrip(series):
            unpickled = tm.round_trip_pickle(series)
            tm.assert_sp_series_equal(series, unpickled)
            tm.assert_series_equal(series.to_dense(), unpickled.to_dense())

        self._check_all(_test_roundtrip)

    def _check_all(self, check_func):
        check_func(self.bseries)
        check_func(self.iseries)
        check_func(self.zbseries)
        check_func(self.ziseries)

    def test_getitem(self):
        def _check_getitem(sp, dense):
            for idx, val in compat.iteritems(dense):
                tm.assert_almost_equal(val, sp[idx])

            for i in range(len(dense)):
                tm.assert_almost_equal(sp[i], dense[i])
                # j = np.float64(i)
                # assert_almost_equal(sp[j], dense[j])

                # API change 1/6/2012
                # negative getitem works
                # for i in xrange(len(dense)):
                #     assert_almost_equal(sp[-i], dense[-i])

        _check_getitem(self.bseries, self.bseries.to_dense())
        _check_getitem(self.btseries, self.btseries.to_dense())

        _check_getitem(self.zbseries, self.zbseries.to_dense())
        _check_getitem(self.iseries, self.iseries.to_dense())
        _check_getitem(self.ziseries, self.ziseries.to_dense())

        # exception handling
        pytest.raises(Exception, self.bseries.__getitem__,
                      len(self.bseries) + 1)

        # index not contained
        pytest.raises(Exception, self.btseries.__getitem__,
                      self.btseries.index[-1] + BDay())

    def test_get_get_value(self):
        tm.assert_almost_equal(self.bseries.get(10), self.bseries[10])
        assert self.bseries.get(len(self.bseries) + 1) is None

        dt = self.btseries.index[10]
        result = self.btseries.get(dt)
        expected = self.btseries.to_dense()[dt]
        tm.assert_almost_equal(result, expected)

        tm.assert_almost_equal(self.bseries.get_value(10), self.bseries[10])

    def test_set_value(self):

        idx = self.btseries.index[7]
        self.btseries.set_value(idx, 0)
        assert self.btseries[idx] == 0

        self.iseries.set_value('foobar', 0)
        assert self.iseries.index[-1] == 'foobar'
        assert self.iseries['foobar'] == 0

    def test_getitem_slice(self):
        idx = self.bseries.index
        res = self.bseries[::2]
        assert isinstance(res, SparseSeries)

        expected = self.bseries.reindex(idx[::2])
        tm.assert_sp_series_equal(res, expected)

        res = self.bseries[:5]
        assert isinstance(res, SparseSeries)
        tm.assert_sp_series_equal(res, self.bseries.reindex(idx[:5]))

        res = self.bseries[5:]
        tm.assert_sp_series_equal(res, self.bseries.reindex(idx[5:]))

        # negative indices
        res = self.bseries[:-3]
        tm.assert_sp_series_equal(res, self.bseries.reindex(idx[:-3]))

    def test_take(self):
        def _compare_with_dense(sp):
            dense = sp.to_dense()

            def _compare(idx):
                dense_result = dense.take(idx).values
                sparse_result = sp.take(idx)
                assert isinstance(sparse_result, SparseSeries)
                tm.assert_almost_equal(dense_result,
                                       sparse_result.values.values)

            _compare([1., 2., 3., 4., 5., 0.])
            _compare([7, 2, 9, 0, 4])
            _compare([3, 6, 3, 4, 7])

        self._check_all(_compare_with_dense)

        pytest.raises(Exception, self.bseries.take,
                      [0, len(self.bseries) + 1])

        # Corner case
        sp = SparseSeries(np.ones(10) * nan)
        exp = pd.Series(np.repeat(nan, 5))
        tm.assert_series_equal(sp.take([0, 1, 2, 3, 4]), exp)

    def test_numpy_take(self):
        sp = SparseSeries([1.0, 2.0, 3.0])
        indices = [1, 2]

        tm.assert_series_equal(np.take(sp, indices, axis=0).to_dense(),
                               np.take(sp.to_dense(), indices, axis=0))

        msg = "the 'out' parameter is not supported"
        tm.assert_raises_regex(ValueError, msg, np.take,
                               sp, indices, out=np.empty(sp.shape))

        msg = "the 'mode' parameter is not supported"
        tm.assert_raises_regex(ValueError, msg, np.take,
                               sp, indices, mode='clip')

    def test_setitem(self):
        self.bseries[5] = 7.
        assert self.bseries[5] == 7.

    def test_setslice(self):
        self.bseries[5:10] = 7.
        tm.assert_series_equal(self.bseries[5:10].to_dense(),
                               Series(7., index=range(5, 10),
                                      name=self.bseries.name))

    def test_operators(self):

        def _check_op(a, b, op):
            sp_result = op(a, b)
            adense = a.to_dense() if isinstance(a, SparseSeries) else a
            bdense = b.to_dense() if isinstance(b, SparseSeries) else b
            dense_result = op(adense, bdense)
            tm.assert_almost_equal(sp_result.to_dense(), dense_result)

        def check(a, b):
            _check_op(a, b, operator.add)
            _check_op(a, b, operator.sub)
            _check_op(a, b, operator.truediv)
            _check_op(a, b, operator.floordiv)
            _check_op(a, b, operator.mul)

            _check_op(a, b, lambda x, y: operator.add(y, x))
            _check_op(a, b, lambda x, y: operator.sub(y, x))
            _check_op(a, b, lambda x, y: operator.truediv(y, x))
            _check_op(a, b, lambda x, y: operator.floordiv(y, x))
            _check_op(a, b, lambda x, y: operator.mul(y, x))

            # NaN ** 0 = 1 in C?
            # _check_op(a, b, operator.pow)
            # _check_op(a, b, lambda x, y: operator.pow(y, x))

        check(self.bseries, self.bseries)
        check(self.iseries, self.iseries)
        check(self.bseries, self.iseries)

        check(self.bseries, self.bseries2)
        check(self.bseries, self.iseries2)
        check(self.iseries, self.iseries2)

        # scalar value
        check(self.bseries, 5)

        # zero-based
        check(self.zbseries, self.zbseries * 2)
        check(self.zbseries, self.zbseries2)
        check(self.ziseries, self.ziseries2)

        # with dense
        result = self.bseries + self.bseries.to_dense()
        tm.assert_sp_series_equal(result, self.bseries + self.bseries)

    def test_binary_operators(self):

        # skipping for now #####
        import pytest
        pytest.skip("skipping sparse binary operators test")

        def _check_inplace_op(iop, op):
            tmp = self.bseries.copy()

            expected = op(tmp, self.bseries)
            iop(tmp, self.bseries)
            tm.assert_sp_series_equal(tmp, expected)

        inplace_ops = ['add', 'sub', 'mul', 'truediv', 'floordiv', 'pow']
        for op in inplace_ops:
            _check_inplace_op(getattr(operator, "i%s" % op),
                              getattr(operator, op))

    def test_abs(self):
        s = SparseSeries([1, 2, -3], name='x')
        expected = SparseSeries([1, 2, 3], name='x')
        result = s.abs()
        tm.assert_sp_series_equal(result, expected)
        assert result.name == 'x'

        result = abs(s)
        tm.assert_sp_series_equal(result, expected)
        assert result.name == 'x'

        result = np.abs(s)
        tm.assert_sp_series_equal(result, expected)
        assert result.name == 'x'

        s = SparseSeries([1, -2, 2, -3], fill_value=-2, name='x')
        expected = SparseSeries([1, 2, 3], sparse_index=s.sp_index,
                                fill_value=2, name='x')
        result = s.abs()
        tm.assert_sp_series_equal(result, expected)
        assert result.name == 'x'

        result = abs(s)
        tm.assert_sp_series_equal(result, expected)
        assert result.name == 'x'

        result = np.abs(s)
        tm.assert_sp_series_equal(result, expected)
        assert result.name == 'x'

    def test_reindex(self):
        def _compare_with_series(sps, new_index):
            spsre = sps.reindex(new_index)

            series = sps.to_dense()
            seriesre = series.reindex(new_index)
            seriesre = seriesre.to_sparse(fill_value=sps.fill_value)

            tm.assert_sp_series_equal(spsre, seriesre)
            tm.assert_series_equal(spsre.to_dense(), seriesre.to_dense())

        _compare_with_series(self.bseries, self.bseries.index[::2])
        _compare_with_series(self.bseries, list(self.bseries.index[::2]))
        _compare_with_series(self.bseries, self.bseries.index[:10])
        _compare_with_series(self.bseries, self.bseries.index[5:])

        _compare_with_series(self.zbseries, self.zbseries.index[::2])
        _compare_with_series(self.zbseries, self.zbseries.index[:10])
        _compare_with_series(self.zbseries, self.zbseries.index[5:])

        # special cases
        same_index = self.bseries.reindex(self.bseries.index)
        tm.assert_sp_series_equal(self.bseries, same_index)
        assert same_index is not self.bseries

        # corner cases
        sp = SparseSeries([], index=[])
        # TODO: sp_zero is not used anywhere...remove?
        sp_zero = SparseSeries([], index=[], fill_value=0)  # noqa
        _compare_with_series(sp, np.arange(10))

        # with copy=False
        reindexed = self.bseries.reindex(self.bseries.index, copy=True)
        reindexed.sp_values[:] = 1.
        assert (self.bseries.sp_values != 1.).all()

        reindexed = self.bseries.reindex(self.bseries.index, copy=False)
        reindexed.sp_values[:] = 1.
        tm.assert_numpy_array_equal(self.bseries.sp_values, np.repeat(1., 10))

    def test_sparse_reindex(self):
        length = 10

        def _check(values, index1, index2, fill_value):
            first_series = SparseSeries(values, sparse_index=index1,
                                        fill_value=fill_value)
            reindexed = first_series.sparse_reindex(index2)
            assert reindexed.sp_index is index2

            int_indices1 = index1.to_int_index().indices
            int_indices2 = index2.to_int_index().indices

            expected = Series(values, index=int_indices1)
            expected = expected.reindex(int_indices2).fillna(fill_value)
            tm.assert_almost_equal(expected.values, reindexed.sp_values)

            # make sure level argument asserts
            # TODO: expected is not used anywhere...remove?
            expected = expected.reindex(int_indices2).fillna(fill_value)  # noqa

        def _check_with_fill_value(values, first, second, fill_value=nan):
            i_index1 = IntIndex(length, first)
            i_index2 = IntIndex(length, second)

            b_index1 = i_index1.to_block_index()
            b_index2 = i_index2.to_block_index()

            _check(values, i_index1, i_index2, fill_value)
            _check(values, b_index1, b_index2, fill_value)

        def _check_all(values, first, second):
            _check_with_fill_value(values, first, second, fill_value=nan)
            _check_with_fill_value(values, first, second, fill_value=0)

        index1 = [2, 4, 5, 6, 8, 9]
        values1 = np.arange(6.)

        _check_all(values1, index1, [2, 4, 5])
        _check_all(values1, index1, [2, 3, 4, 5, 6, 7, 8, 9])
        _check_all(values1, index1, [0, 1])
        _check_all(values1, index1, [0, 1, 7, 8, 9])
        _check_all(values1, index1, [])

        first_series = SparseSeries(values1,
                                    sparse_index=IntIndex(length, index1),
                                    fill_value=nan)
        with tm.assert_raises_regex(TypeError,
                                    'new index must be a SparseIndex'):
            reindexed = first_series.sparse_reindex(0)  # noqa

    def test_repr(self):
        # TODO: These aren't used
        bsrepr = repr(self.bseries)  # noqa
        isrepr = repr(self.iseries)  # noqa

    def test_iter(self):
        pass

    def test_truncate(self):
        pass

    def test_fillna(self):
        pass

    def test_groupby(self):
        pass

    def test_reductions(self):
        def _compare_with_dense(obj, op):
            sparse_result = getattr(obj, op)()
            series = obj.to_dense()
            dense_result = getattr(series, op)()
            assert sparse_result == dense_result

        to_compare = ['count', 'sum', 'mean', 'std', 'var', 'skew']

        def _compare_all(obj):
            for op in to_compare:
                _compare_with_dense(obj, op)

        _compare_all(self.bseries)

        self.bseries.sp_values[5:10] = np.NaN
        _compare_all(self.bseries)

        _compare_all(self.zbseries)
        self.zbseries.sp_values[5:10] = np.NaN
        _compare_all(self.zbseries)

        series = self.zbseries.copy()
        series.fill_value = 2
        _compare_all(series)

        nonna = Series(np.random.randn(20)).to_sparse()
        _compare_all(nonna)

        nonna2 = Series(np.random.randn(20)).to_sparse(fill_value=0)
        _compare_all(nonna2)

    def test_dropna(self):
        sp = SparseSeries([0, 0, 0, nan, nan, 5, 6], fill_value=0)

        sp_valid = sp.valid()

        expected = sp.to_dense().valid()
        expected = expected[expected != 0]
        exp_arr = pd.SparseArray(expected.values, fill_value=0, kind='block')
        tm.assert_sp_array_equal(sp_valid.values, exp_arr)
        tm.assert_index_equal(sp_valid.index, expected.index)
        assert len(sp_valid.sp_values) == 2

        result = self.bseries.dropna()
        expected = self.bseries.to_dense().dropna()
        assert not isinstance(result, SparseSeries)
        tm.assert_series_equal(result, expected)

    def test_homogenize(self):
        def _check_matches(indices, expected):
            data = {}
            for i, idx in enumerate(indices):
                data[i] = SparseSeries(idx.to_int_index().indices,
                                       sparse_index=idx, fill_value=np.nan)
            # homogenized is only valid with NaN fill values
            homogenized = spf.homogenize(data)

            for k, v in compat.iteritems(homogenized):
                assert (v.sp_index.equals(expected))

        indices1 = [BlockIndex(10, [2], [7]), BlockIndex(10, [1, 6], [3, 4]),
                    BlockIndex(10, [0], [10])]
        expected1 = BlockIndex(10, [2, 6], [2, 3])
        _check_matches(indices1, expected1)

        indices2 = [BlockIndex(10, [2], [7]), BlockIndex(10, [2], [7])]
        expected2 = indices2[0]
        _check_matches(indices2, expected2)

        # must have NaN fill value
        data = {'a': SparseSeries(np.arange(7), sparse_index=expected2,
                                  fill_value=0)}
        with tm.assert_raises_regex(TypeError, "NaN fill value"):
            spf.homogenize(data)

    def test_fill_value_corner(self):
        cop = self.zbseries.copy()
        cop.fill_value = 0
        result = self.bseries / cop

        assert np.isnan(result.fill_value)

        cop2 = self.zbseries.copy()
        cop2.fill_value = 1
        result = cop2 / cop
        # 1 / 0 is inf
        assert np.isinf(result.fill_value)

    def test_fill_value_when_combine_const(self):
        # GH12723
        s = SparseSeries([0, 1, np.nan, 3, 4, 5], index=np.arange(6))

        exp = s.fillna(0).add(2)
        res = s.add(2, fill_value=0)
        tm.assert_series_equal(res, exp)

    def test_shift(self):
        series = SparseSeries([nan, 1., 2., 3., nan, nan], index=np.arange(6))

        shifted = series.shift(0)
        assert shifted is not series
        tm.assert_sp_series_equal(shifted, series)

        f = lambda s: s.shift(1)
        _dense_series_compare(series, f)

        f = lambda s: s.shift(-2)
        _dense_series_compare(series, f)

        series = SparseSeries([nan, 1., 2., 3., nan, nan],
                              index=bdate_range('1/1/2000', periods=6))
        f = lambda s: s.shift(2, freq='B')
        _dense_series_compare(series, f)

        f = lambda s: s.shift(2, freq=BDay())
        _dense_series_compare(series, f)

    def test_shift_nan(self):
        # GH 12908
        orig = pd.Series([np.nan, 2, np.nan, 4, 0, np.nan, 0])
        sparse = orig.to_sparse()

        tm.assert_sp_series_equal(sparse.shift(0), orig.shift(0).to_sparse())
        tm.assert_sp_series_equal(sparse.shift(1), orig.shift(1).to_sparse())
        tm.assert_sp_series_equal(sparse.shift(2), orig.shift(2).to_sparse())
        tm.assert_sp_series_equal(sparse.shift(3), orig.shift(3).to_sparse())

        tm.assert_sp_series_equal(sparse.shift(-1), orig.shift(-1).to_sparse())
        tm.assert_sp_series_equal(sparse.shift(-2), orig.shift(-2).to_sparse())
        tm.assert_sp_series_equal(sparse.shift(-3), orig.shift(-3).to_sparse())
        tm.assert_sp_series_equal(sparse.shift(-4), orig.shift(-4).to_sparse())

        sparse = orig.to_sparse(fill_value=0)
        tm.assert_sp_series_equal(sparse.shift(0),
                                  orig.shift(0).to_sparse(fill_value=0))
        tm.assert_sp_series_equal(sparse.shift(1),
                                  orig.shift(1).to_sparse(fill_value=0))
        tm.assert_sp_series_equal(sparse.shift(2),
                                  orig.shift(2).to_sparse(fill_value=0))
        tm.assert_sp_series_equal(sparse.shift(3),
                                  orig.shift(3).to_sparse(fill_value=0))

        tm.assert_sp_series_equal(sparse.shift(-1),
                                  orig.shift(-1).to_sparse(fill_value=0))
        tm.assert_sp_series_equal(sparse.shift(-2),
                                  orig.shift(-2).to_sparse(fill_value=0))
        tm.assert_sp_series_equal(sparse.shift(-3),
                                  orig.shift(-3).to_sparse(fill_value=0))
        tm.assert_sp_series_equal(sparse.shift(-4),
                                  orig.shift(-4).to_sparse(fill_value=0))

    def test_shift_dtype(self):
        # GH 12908
        orig = pd.Series([1, 2, 3, 4], dtype=np.int64)

        sparse = orig.to_sparse()
        tm.assert_sp_series_equal(sparse.shift(0), orig.shift(0).to_sparse())

        sparse = orig.to_sparse(fill_value=np.nan)
        tm.assert_sp_series_equal(sparse.shift(0),
                                  orig.shift(0).to_sparse(fill_value=np.nan))
        # shift(1) or more span changes dtype to float64
        tm.assert_sp_series_equal(sparse.shift(1), orig.shift(1).to_sparse())
        tm.assert_sp_series_equal(sparse.shift(2), orig.shift(2).to_sparse())
        tm.assert_sp_series_equal(sparse.shift(3), orig.shift(3).to_sparse())

        tm.assert_sp_series_equal(sparse.shift(-1), orig.shift(-1).to_sparse())
        tm.assert_sp_series_equal(sparse.shift(-2), orig.shift(-2).to_sparse())
        tm.assert_sp_series_equal(sparse.shift(-3), orig.shift(-3).to_sparse())
        tm.assert_sp_series_equal(sparse.shift(-4), orig.shift(-4).to_sparse())

    def test_shift_dtype_fill_value(self):
        # GH 12908
        orig = pd.Series([1, 0, 0, 4], dtype=np.int64)

        for v in [0, 1, np.nan]:
            sparse = orig.to_sparse(fill_value=v)

            tm.assert_sp_series_equal(sparse.shift(0),
                                      orig.shift(0).to_sparse(fill_value=v))
            tm.assert_sp_series_equal(sparse.shift(1),
                                      orig.shift(1).to_sparse(fill_value=v))
            tm.assert_sp_series_equal(sparse.shift(2),
                                      orig.shift(2).to_sparse(fill_value=v))
            tm.assert_sp_series_equal(sparse.shift(3),
                                      orig.shift(3).to_sparse(fill_value=v))

            tm.assert_sp_series_equal(sparse.shift(-1),
                                      orig.shift(-1).to_sparse(fill_value=v))
            tm.assert_sp_series_equal(sparse.shift(-2),
                                      orig.shift(-2).to_sparse(fill_value=v))
            tm.assert_sp_series_equal(sparse.shift(-3),
                                      orig.shift(-3).to_sparse(fill_value=v))
            tm.assert_sp_series_equal(sparse.shift(-4),
                                      orig.shift(-4).to_sparse(fill_value=v))

    def test_combine_first(self):
        s = self.bseries

        result = s[::2].combine_first(s)
        result2 = s[::2].combine_first(s.to_dense())

        expected = s[::2].to_dense().combine_first(s.to_dense())
        expected = expected.to_sparse(fill_value=s.fill_value)

        tm.assert_sp_series_equal(result, result2)
        tm.assert_sp_series_equal(result, expected)

class TestSparseHandlingMultiIndexes(object):

    def setup_method(self, method):
        miindex = pd.MultiIndex.from_product(
            [["x", "y"], ["10", "20"]], names=['row-foo', 'row-bar'])
        micol = pd.MultiIndex.from_product(
            [['a', 'b', 'c'], ["1", "2"]], names=['col-foo', 'col-bar'])
        dense_multiindex_frame = pd.DataFrame(
            index=miindex, columns=micol).sort_index().sort_index(axis=1)
        self.dense_multiindex_frame = dense_multiindex_frame.fillna(value=3.14)

    def test_to_sparse_preserve_multiindex_names_columns(self):
        sparse_multiindex_frame = self.dense_multiindex_frame.to_sparse()
        sparse_multiindex_frame = sparse_multiindex_frame.copy()
        tm.assert_index_equal(sparse_multiindex_frame.columns,
                              self.dense_multiindex_frame.columns)

    def test_round_trip_preserve_multiindex_names(self):
        sparse_multiindex_frame = self.dense_multiindex_frame.to_sparse()
        round_trip_multiindex_frame = sparse_multiindex_frame.to_dense()
        tm.assert_frame_equal(self.dense_multiindex_frame,
                              round_trip_multiindex_frame,
                              check_column_type=True,
                              check_names=True)

class TestSparseSeriesScipyInteraction(object):
    # Issue 8048: add SparseSeries coo methods

    def setup_method(self, method):
        tm._skip_if_no_scipy()
        import scipy.sparse
        # SparseSeries inputs used in tests, the tests rely on the order
        self.sparse_series = []
        s = pd.Series([3.0, nan, 1.0, 2.0, nan, nan])
        s.index = pd.MultiIndex.from_tuples([(1, 2, 'a', 0),
                                             (1, 2, 'a', 1),
                                             (1, 1, 'b', 0),
                                             (1, 1, 'b', 1),
                                             (2, 1, 'b', 0),
                                             (2, 1, 'b', 1)],
                                            names=['A', 'B', 'C', 'D'])
        self.sparse_series.append(s.to_sparse())

        ss = self.sparse_series[0].copy()
        ss.index.names = [3, 0, 1, 2]
        self.sparse_series.append(ss)

        ss = pd.Series([
            nan
        ] * 12, index=cartesian_product((range(3), range(4)))).to_sparse()
        for k, v in zip([(0, 0), (1, 2), (1, 3)], [3.0, 1.0, 2.0]):
            ss[k] = v
        self.sparse_series.append(ss)

        # results used in tests
        self.coo_matrices = []
        self.coo_matrices.append(scipy.sparse.coo_matrix(
            ([3.0, 1.0, 2.0], ([0, 1, 1], [0, 2, 3])), shape=(3, 4)))
        self.coo_matrices.append(scipy.sparse.coo_matrix(
            ([3.0, 1.0, 2.0], ([1, 0, 0], [0, 2, 3])), shape=(3, 4)))
        self.coo_matrices.append(scipy.sparse.coo_matrix(
            ([3.0, 1.0, 2.0], ([0, 1, 1], [0, 0, 1])), shape=(3, 2)))
        self.ils = [[(1, 2), (1, 1), (2, 1)], [(1, 1), (1, 2), (2, 1)],
                    [(1, 2, 'a'), (1, 1, 'b'), (2, 1, 'b')]]
        self.jls = [[('a', 0), ('a', 1), ('b', 0), ('b', 1)], [0, 1]]

    def test_to_coo_text_names_integer_row_levels_nosort(self):
        ss = self.sparse_series[0]
        kwargs = {'row_levels': [0, 1], 'column_levels': [2, 3]}
        result = (self.coo_matrices[0], self.ils[0], self.jls[0])
        self._run_test(ss, kwargs, result)

    def test_to_coo_text_names_integer_row_levels_sort(self):
        ss = self.sparse_series[0]
        kwargs = {'row_levels': [0, 1],
                  'column_levels': [2, 3],
                  'sort_labels': True}
        result = (self.coo_matrices[1], self.ils[1], self.jls[0])
        self._run_test(ss, kwargs, result)

    def test_to_coo_text_names_text_row_levels_nosort_col_level_single(self):
        ss = self.sparse_series[0]
        kwargs = {'row_levels': ['A', 'B', 'C'],
                  'column_levels': ['D'],
                  'sort_labels': False}
        result = (self.coo_matrices[2], self.ils[2], self.jls[1])
        self._run_test(ss, kwargs, result)

    def test_to_coo_integer_names_integer_row_levels_nosort(self):
        ss = self.sparse_series[1]
        kwargs = {'row_levels': [3, 0], 'column_levels': [1, 2]}
        result = (self.coo_matrices[0], self.ils[0], self.jls[0])
        self._run_test(ss, kwargs, result)

    def test_to_coo_text_names_text_row_levels_nosort(self):
        ss = self.sparse_series[0]
        kwargs = {'row_levels': ['A', 'B'], 'column_levels': ['C', 'D']}
        result = (self.coo_matrices[0], self.ils[0], self.jls[0])
        self._run_test(ss, kwargs, result)

    def test_to_coo_bad_partition_nonnull_intersection(self):
        ss = self.sparse_series[0]
        pytest.raises(ValueError, ss.to_coo, ['A', 'B', 'C'], ['C', 'D'])

    def test_to_coo_bad_partition_small_union(self):
        ss = self.sparse_series[0]
        pytest.raises(ValueError, ss.to_coo, ['A'], ['C', 'D'])

    def test_to_coo_nlevels_less_than_two(self):
        ss = self.sparse_series[0]
        ss.index = np.arange(len(ss.index))
        pytest.raises(ValueError, ss.to_coo)

    def test_to_coo_bad_ilevel(self):
        ss = self.sparse_series[0]
        pytest.raises(KeyError, ss.to_coo, ['A', 'B'], ['C', 'D', 'E'])

    def test_to_coo_duplicate_index_entries(self):
        ss = pd.concat([self.sparse_series[0],
                        self.sparse_series[0]]).to_sparse()
        pytest.raises(ValueError, ss.to_coo, ['A', 'B'], ['C', 'D'])

    def test_from_coo_dense_index(self):
        ss = SparseSeries.from_coo(self.coo_matrices[0], dense_index=True)
        check = self.sparse_series[2]
        tm.assert_sp_series_equal(ss, check)

    def test_from_coo_nodense_index(self):
        ss = SparseSeries.from_coo(self.coo_matrices[0], dense_index=False)
        check = self.sparse_series[2]
        check = check.dropna().to_sparse()
        tm.assert_sp_series_equal(ss, check)

    def test_from_coo_long_repr(self):
        # GH 13114
        # test it doesn't raise error. Formatting is tested in test_format
        tm._skip_if_no_scipy()
        import scipy.sparse

        sparse = SparseSeries.from_coo(scipy.sparse.rand(350, 18))
        repr(sparse)

    def _run_test(self, ss, kwargs, check):
        results = ss.to_coo(**kwargs)
        self._check_results_to_coo(results, check)
        # for every test, also test symmetry property (transpose), switch
        # row_levels and column_levels
        d = kwargs.copy()
        d['row_levels'] = kwargs['column_levels']
        d['column_levels'] = kwargs['row_levels']
        results = ss.to_coo(**d)
        results = (results[0].T, results[2], results[1])
        self._check_results_to_coo(results, check)

    def _check_results_to_coo(self, results, check):
        (A, il, jl) = results
        (A_result, il_result, jl_result) = check
        # convert to dense and compare
        tm.assert_numpy_array_equal(A.todense(), A_result.todense())
        # or compare directly as difference of sparse
        # assert(abs(A - A_result).max() < 1e-12) # max is failing in python
        # 2.6
        assert il == il_result
        assert jl == jl_result

    def test_concat(self):
        val1 = np.array([1, 2, np.nan, np.nan, 0, np.nan])
        val2 = np.array([3, np.nan, 4, 0, 0])

        for kind in ['integer', 'block']:
            sparse1 = pd.SparseSeries(val1, name='x', kind=kind)
            sparse2 = pd.SparseSeries(val2, name='y', kind=kind)

            res = pd.concat([sparse1, sparse2])
            exp = pd.concat([pd.Series(val1), pd.Series(val2)])
            exp = pd.SparseSeries(exp, kind=kind)
            tm.assert_sp_series_equal(res, exp)

            sparse1 = pd.SparseSeries(val1, fill_value=0, name='x', kind=kind)
            sparse2 = pd.SparseSeries(val2, fill_value=0, name='y', kind=kind)

            res = pd.concat([sparse1, sparse2])
            exp = pd.concat([pd.Series(val1), pd.Series(val2)])
            exp = pd.SparseSeries(exp, fill_value=0, kind=kind)
            tm.assert_sp_series_equal(res, exp)

    def test_concat_axis1(self):
        val1 = np.array([1, 2, np.nan, np.nan, 0, np.nan])
        val2 = np.array([3, np.nan, 4, 0, 0])

        sparse1 = pd.SparseSeries(val1, name='x')
        sparse2 = pd.SparseSeries(val2, name='y')

        res = pd.concat([sparse1, sparse2], axis=1)
        exp = pd.concat([pd.Series(val1, name='x'),
                         pd.Series(val2, name='y')], axis=1)
        exp = pd.SparseDataFrame(exp)
        tm.assert_sp_frame_equal(res, exp)

    def test_concat_different_fill(self):
        val1 = np.array([1, 2, np.nan, np.nan, 0, np.nan])
        val2 = np.array([3, np.nan, 4, 0, 0])

        for kind in ['integer', 'block']:
            sparse1 = pd.SparseSeries(val1, name='x', kind=kind)
            sparse2 = pd.SparseSeries(val2, name='y', kind=kind, fill_value=0)

            res = pd.concat([sparse1, sparse2])
            exp = pd.concat([pd.Series(val1), pd.Series(val2)])
            exp = pd.SparseSeries(exp, kind=kind)
            tm.assert_sp_series_equal(res, exp)

            res = pd.concat([sparse2, sparse1])
            exp = pd.concat([pd.Series(val2), pd.Series(val1)])
            exp = pd.SparseSeries(exp, kind=kind, fill_value=0)
            tm.assert_sp_series_equal(res, exp)

    def test_concat_axis1_different_fill(self):
        val1 = np.array([1, 2, np.nan, np.nan, 0, np.nan])
        val2 = np.array([3, np.nan, 4, 0, 0])

        sparse1 = pd.SparseSeries(val1, name='x')
        sparse2 = pd.SparseSeries(val2, name='y', fill_value=0)

        res = pd.concat([sparse1, sparse2], axis=1)
        exp = pd.concat([pd.Series(val1, name='x'),
                         pd.Series(val2, name='y')], axis=1)
        assert isinstance(res, pd.SparseDataFrame)
        tm.assert_frame_equal(res.to_dense(), exp)

    def test_concat_different_kind(self):
        val1 = np.array([1, 2, np.nan, np.nan, 0, np.nan])
        val2 = np.array([3, np.nan, 4, 0, 0])

        sparse1 = pd.SparseSeries(val1, name='x', kind='integer')
        sparse2 = pd.SparseSeries(val2, name='y', kind='block', fill_value=0)

        res = pd.concat([sparse1, sparse2])
        exp = pd.concat([pd.Series(val1), pd.Series(val2)])
        exp = pd.SparseSeries(exp, kind='integer')
        tm.assert_sp_series_equal(res, exp)

        res = pd.concat([sparse2, sparse1])
        exp = pd.concat([pd.Series(val2), pd.Series(val1)])
        exp = pd.SparseSeries(exp, kind='block', fill_value=0)
        tm.assert_sp_series_equal(res, exp)

    def test_concat_sparse_dense(self):
        # use first input's fill_value
        val1 = np.array([1, 2, np.nan, np.nan, 0, np.nan])
        val2 = np.array([3, np.nan, 4, 0, 0])

        for kind in ['integer', 'block']:
            sparse = pd.SparseSeries(val1, name='x', kind=kind)
            dense = pd.Series(val2, name='y')

            res = pd.concat([sparse, dense])
            exp = pd.concat([pd.Series(val1), dense])
            exp = pd.SparseSeries(exp, kind=kind)
            tm.assert_sp_series_equal(res, exp)

            res = pd.concat([dense, sparse, dense])
            exp = pd.concat([dense, pd.Series(val1), dense])
            exp = pd.SparseSeries(exp, kind=kind)
            tm.assert_sp_series_equal(res, exp)

            sparse = pd.SparseSeries(val1, name='x', kind=kind, fill_value=0)
            dense = pd.Series(val2, name='y')

            res = pd.concat([sparse, dense])
            exp = pd.concat([pd.Series(val1), dense])
            exp = pd.SparseSeries(exp, kind=kind, fill_value=0)
            tm.assert_sp_series_equal(res, exp)

            res = pd.concat([dense, sparse, dense])
            exp = pd.concat([dense, pd.Series(val1), dense])
            exp = pd.SparseSeries(exp, kind=kind, fill_value=0)
            tm.assert_sp_series_equal(res, exp)

    def test_value_counts(self):
        vals = [1, 2, nan, 0, nan, 1, 2, nan, nan, 1, 2, 0, 1, 1]
        dense = pd.Series(vals, name='xx')

        sparse = pd.SparseSeries(vals, name='xx')
        tm.assert_series_equal(sparse.value_counts(),
                               dense.value_counts())
        tm.assert_series_equal(sparse.value_counts(dropna=False),
                               dense.value_counts(dropna=False))

        sparse = pd.SparseSeries(vals, name='xx', fill_value=0)
        tm.assert_series_equal(sparse.value_counts(),
                               dense.value_counts())
        tm.assert_series_equal(sparse.value_counts(dropna=False),
                               dense.value_counts(dropna=False))

    def test_value_counts_dup(self):
        vals = [1, 2, nan, 0, nan, 1, 2, nan, nan, 1, 2, 0, 1, 1]

        # numeric op may cause sp_values to include the same value as
        # fill_value
        dense = pd.Series(vals, name='xx') / 0.
        sparse = pd.SparseSeries(vals, name='xx') / 0.
        tm.assert_series_equal(sparse.value_counts(),
                               dense.value_counts())
        tm.assert_series_equal(sparse.value_counts(dropna=False),
                               dense.value_counts(dropna=False))

        vals = [1, 2, 0, 0, 0, 1, 2, 0, 0, 1, 2, 0, 1, 1]

        dense = pd.Series(vals, name='xx') * 0.
        sparse = pd.SparseSeries(vals, name='xx') * 0.
        tm.assert_series_equal(sparse.value_counts(),
                               dense.value_counts())
        tm.assert_series_equal(sparse.value_counts(dropna=False),
                               dense.value_counts(dropna=False))

    def test_value_counts_int(self):
        vals = [1, 2, 0, 1, 2, 1, 2, 0, 1, 1]
        dense = pd.Series(vals, name='xx')

        # fill_value is np.nan, but should not be included in the result
        sparse = pd.SparseSeries(vals, name='xx')
        tm.assert_series_equal(sparse.value_counts(),
                               dense.value_counts())
        tm.assert_series_equal(sparse.value_counts(dropna=False),
                               dense.value_counts(dropna=False))

        sparse = pd.SparseSeries(vals, name='xx', fill_value=0)
        tm.assert_series_equal(sparse.value_counts(),
                               dense.value_counts())
        tm.assert_series_equal(sparse.value_counts(dropna=False),
                               dense.value_counts(dropna=False))

    def test_isna(self):
        # GH 8276
        s = pd.SparseSeries([np.nan, np.nan, 1, 2, np.nan], name='xxx')

        res = s.isna()
        exp = pd.SparseSeries([True, True, False, False, True], name='xxx',
                              fill_value=True)
        tm.assert_sp_series_equal(res, exp)

        # if fill_value is not nan, True can be included in sp_values
        s = pd.SparseSeries([np.nan, 0., 1., 2., 0.], name='xxx',
                            fill_value=0.)
        res = s.isna()
        assert isinstance(res, pd.SparseSeries)
        exp = pd.Series([True, False, False, False, False], name='xxx')
        tm.assert_series_equal(res.to_dense(), exp)

    def test_notna(self):
        # GH 8276
        s = pd.SparseSeries([np.nan, np.nan, 1, 2, np.nan], name='xxx')

        res = s.notna()
        exp = pd.SparseSeries([False, False, True, True, False], name='xxx',
                              fill_value=False)
        tm.assert_sp_series_equal(res, exp)

        # if fill_value is not nan, True can be included in sp_values
        s = pd.SparseSeries([np.nan, 0., 1., 2., 0.], name='xxx',
                            fill_value=0.)
        res = s.notna()
        assert isinstance(res, pd.SparseSeries)
        exp = pd.Series([False, True, True, True, True], name='xxx')
        tm.assert_series_equal(res.to_dense(), exp)

def _dense_series_compare(s, f):
    result = f(s)
    assert (isinstance(result, SparseSeries))
    dense_result = f(s.to_dense())
    tm.assert_series_equal(result.to_dense(), dense_result)

class TestSparseSeriesAnalytics(object):

    def setup_method(self, method):
        arr, index = _test_data1()
        self.bseries = SparseSeries(arr, index=index, kind='block',
                                    name='bseries')

        arr, index = _test_data1_zero()
        self.zbseries = SparseSeries(arr, index=index, kind='block',
                                     fill_value=0, name='zbseries')

    def test_cumsum(self):
        result = self.bseries.cumsum()
        expected = SparseSeries(self.bseries.to_dense().cumsum())
        tm.assert_sp_series_equal(result, expected)

        result = self.zbseries.cumsum()
        expected = self.zbseries.to_dense().cumsum()
        tm.assert_series_equal(result, expected)

        axis = 1  # Series is 1-D, so only axis = 0 is valid.
        msg = "No axis named {axis}".format(axis=axis)
        with tm.assert_raises_regex(ValueError, msg):
            self.bseries.cumsum(axis=axis)

    def test_numpy_cumsum(self):
        result = np.cumsum(self.bseries)
        expected = SparseSeries(self.bseries.to_dense().cumsum())
        tm.assert_sp_series_equal(result, expected)

        result = np.cumsum(self.zbseries)
        expected = self.zbseries.to_dense().cumsum()
        tm.assert_series_equal(result, expected)

        msg = "the 'dtype' parameter is not supported"
        tm.assert_raises_regex(ValueError, msg, np.cumsum,
                               self.bseries, dtype=np.int64)

        msg = "the 'out' parameter is not supported"
        tm.assert_raises_regex(ValueError, msg, np.cumsum,
                               self.zbseries, out=result)

    def test_numpy_func_call(self):
        # no exception should be raised even though
        # numpy passes in 'axis=None' or `axis=-1'
        funcs = ['sum', 'cumsum', 'var', 'mean',
                 'prod', 'cumprod', 'std', 'argsort',
                 'argmin', 'argmax', 'min', 'max']
        for func in funcs:
            for series in ('bseries', 'zbseries'):
                getattr(np, func)(getattr(self, series))

@pytest.mark.parametrize(
    'datetime_type', (np.datetime64,
                      pd.Timestamp,
                      lambda x: datetime.strptime(x, '%Y-%m-%d')))
def test_constructor_dict_datetime64_index(datetime_type):
    # GH 9456
    dates = ['1984-02-19', '1988-11-06', '1989-12-03', '1990-03-15']
    values = [42544017.198965244, 1234565, 40512335.181958228, -1]

    result = SparseSeries(dict(zip(map(datetime_type, dates), values)))
    expected = SparseSeries(values, map(pd.Timestamp, dates))

    tm.assert_sp_series_equal(result, expected)


Danmarksmesterskabsturneringen 1928-29 var den 16. sæson om Danmarksmesterskabet i fodbold for herrer organiseret af DBU. Turneringen blev for tredje gang, og for anden gang i træk, vundet af B 93.

Resume
De forsvarende mestre B 93 indledte turneringen med et choknederlag på 0-2 til B 1913 i Odense, men i de sidste syv kampe spillede klubben en uafgjort og vandt seks kampe. B 93 sikrede sig mesterskabet på sidste spilledag d. 2. juni med en overbevisende sejr på 7-0 over Frem.

B 1903, som den foregående sæson var sluttet på en delt førsteplads, skuffede ved ikke at komme i slutrunden efter nederlag i de første to kampe mod AGF og OB.
Aalborg Freja var den store overraskelse og før deres sidste kamp i kreds 2 et point foran storklubben KB. Aalborg Freja tabte dog til KB 6-3 i Idrætsparken, så det blev KB, der kvalificerede sig til slutrunden.

28. oktober vandt Frem på klubbens bane ved Enghavevej i København hele 19-0 over Horsens fS. Det er til dato den hidtil største sejr i landets bedste række. Sofus Johansen og Svend Hansen noteredes for seks scoringer - hver.

Baggrund
Danmarksturneringen blev udvidet fra 20 til 25 hold, fordelt i fem kredse med hver fem hold, der mødte hinanden indbyrdes én gang. De fem vindere kvalificerede sig til Slutrunden, hvor de mødtes indbyrdes én gang. I forhold til sæsonen 1927-28 gik Københavns Boldspil Union fra syv til ni deltagere, og Jydsk Boldspil Union fra fire til seks hold, mens Sjællands Boldspil Union fik fire i stedet for tre hold med.

Kvalificerede til Danmarksturneringen var de bedst placerede hold i lokalunionernes mesterskaber. Det betød, at HB, der var sluttet nummer fem i i sæsonen 1927-28 gled ud, da holdet kun var sluttet på en sjetteplads samme sæson i den næstbedste række under Københavns Boldspil Union. HIK, BK Viktoria og ØB blev de nye hold i den bedste række. Fra Jylland kvalificerede Viborg FF sig ikke igen, så de tre nye jyske deltagere blev de jyske mestre AaB, samt Aalborg Freja og Esbjerg fB. FIF Hillerød var ny deltager for Sjællands Boldspil Union, mens Viking erstattede Rønne BK som bornholmsk mester.

For at mindske rejseudgifterne for klubberne i provinsen, der havde færre økonomiske midler, blev det besluttet, at de københavnske hold kun havde en hjemmekamp i den indledende runde. Da man nåede til kampene i slutrunden i maj 1929 var de københavnske klubber dog stærkt utilfredse med, at turneringen pådrog dem store underskud pga. rejseudgifter, at DBU besluttede, at ændre turneringen den efterfølgende sæson.

Indledende runde

Kreds 1

Kampe:
26/8 1928: AGF - B 1903 3-2
9/9 1928: OB - ØB 9-3
16/9 1928: ØB - Esbjerg fB 2-3
23/9 1928: OB - B 1903 5-2
30/9 1928: AGF - OB 3-0
14/10 1928: Esbjerg fB - AGF 1-1
25/11 1928: B 1903 - ØB 6-1 (Spillet på neutral bane i Københavns Idrætspark)
28/3 1929: OB - Esbjerg fB 0-2
14/4 1929: AGF - ØB 7-0
26/4 1929: Esbjerg fB - B 1903 1-1

Kreds 2

Kampe:
26/8 1928: B 1909 - Skovshoved IF 2-1
9/9 1928: Fredericia - KB 0-1
30/9 1928: B 1909 - KB 0-2
30/9 1928: Aalborg Freja - Fredericia 6-2
14/10 1928: Fredericia - B 1909 2-1
14/10 1928: Aalborg Freja - Skovshoved IF 2-2
18/11 1928: Skovshoved - KB 1-0
7/4 1929: Aalborg Freja - B 1909 3-1
7/4 1929: Skovshoved - Fredericia 2-1
26/4 1929: KB - Aalborg Freja 6-3

Kreds 3

Kampe:
Kampe:
2/9 1928: FIF Hillerød - Fremad Amager 3-3
2/9 1928: AaB - Frem 2-4
16/9 1928: Horsens - AaB 2-6
30/9 1928: FIF Hillerød - Horsens 1-3
28/10 1928: Fremad Amager - Frem 1-6
28/10 1928: AaB - Fremad Amager 4-3
7/4 1929: Aalborg Freja - B 1909 3-1
21/4 1929: FIF Hillerød - Frem 1-1
26/4 1929: AaB - FIF Hillerød 2-1
26/4 1929: Horsens - Fremad Amager 9-0

Kreds 4

Kampe:
2/9 1928: B 1901 - Korsør 2-2
2/9 1928: B 1913 - B 93 2-0
16/9 1928: B 1913 - HIK 0-4
23/9 1928: B 1901 - B 1913 2-3
30/9 1928: B 93 - B 1901 5-0
7/10 1928: Korsør - HIK 2-2
1/11 1928: HIK - B 93 1-6
31/3 1929: B 1913 - Korsør 2-5
14/4 1929: Korsør - B 93 1-4
21/4 1929: B 1901 - HIK 1-4

Kreds 5

Kampe:
26/8 1928: Frem Sakskøbing - Haslev 4-3
26/8 1928: Viking - AB 0-8
9/9 1928: Viking - Frem Sakskøbing 1-2
23/9 1928: Haslev - AB 1-2
7/10 1928: Viktoria - Frem Sakskøbing 4-1
21/10 1928: Haslev - Viktoria 4-1
18/11 1928: AB - Viktoria 6-0
28/3 1929: Viking - Viktoria 4-4
31/3 1929: Frem Sakskøbing - AB 0-8
21/4 1929: Haslev - Viking 2-0

Slutrunden

Slutstilling

Resultater

Noter

Kilder/henvisninger
 Denmark - List of final tables (RSSSF)
 Danmarksturneringen 1928/29 hos Haslund.info
 Danmarksturneringen 1928/29, Slutrunden, Resultater hos Danskfodbold.com

Se også
 Provinsmesterskabsturneringen
 Københavnsserien
 Jyske mesterskab

Mesterskabsturneringen 1928-29
DBU

{'title': 'Danmarksmesterskabsturneringen 1928-29', 'url': 'https://da.wikipedia.org/wiki/Danmarksmesterskabsturneringen%201928-29', 'language': 'da', 'timestamp': '20230320'}


"What Kind of Fool (Heard All That Before)" pop-dance je pjesma australske pjevačice Kylie Minogue. Objavljena je kao debitantski singl s njenog prvog kompilacijskog albuma Greatest Hits 10. kolovoza 1992. godine u izdanju diskografske kuće PWL.

O pjesmi
"What Kind of Fool (Heard All That Before)"  je pop-dance pjesma koju su napisali Kylie Minogue, Mike Stock i Pete Waterman, a producirali Stock i Waterman. Primila je uglavnom pozitivne recenzije glazbenih kritičara i postigla prilično dobar uspjeh u Ujedinjenom Kraljevstvu i Australiji. To je Minoguein devetnaesti hit na jednom od prvih 20 mjesta u Ujedinjenom Kraljevstvu i petnaesti takav u Australiji. Pjesma ima nervozan ritam. Uočena je njena sličnost s Minogueinom prethodnim singlovima poput "I Should Be So Lucky" i "Better the Devil You Know", ali zato nije dobila manji interes javnosti. Iako je jedna od najmanje dragih pjesama za Minogue, njeni remiksevi bili su hit među obožavateljima, tako da je ovo prvi Minoguein singl na kojem je više nego jedan službeni remiks. Na singlu je također uključen remiks pjesme "Things Can Only Get Better" s albuma Rhythm of Love track.

Omot singla s fotografijom koja prikazuje Minogue potpuno mokru obrubljenom ružičastom bojom drugačije je nijanse za Ujedinjeno Kraljevstvo nego za ostatak Europe.Australska inačica CD-a bila je slikovni disk koji je trenutno rasprodan.

Minogue je u jednom intervjuu za Sunday Telegraph u listopadu 2008. godine izjavila da joj se više ne sviđa ta pjesma.

Ipak, izvodila ju je na turnejama:
 Showgirl: The Greatest Hits Tour (dio pjesme tijekom medleya "Smiley Kylie Medley")
 Showgirl: The Homecoming Tour (dio pjesme tijekom medleya "Everything Taboo Medley")
 For You, For Me Tour (dio pjesme tijekom medleya "Everything Taboo Medley")

Popis pjesama
CD Singl
"What Kind Of Fool (Heard All That Before)"
"What Kind Of Fool (Heard All That Before) [No Tech No Logical Remix]"
"What Kind Of Fool (Heard All That Before) [Tech No Logical Remix]"
"Things Can Only Get Better"

7" vinilni singl
"What Kind Of Fool (Heard All That Before)"
"Things Can Only Get Better"

12" vinlni singl
"What Kind Of Fool (Heard All That Before) [No Tech No Logical Remix]"
"What Kind Of Fool (Heard All That Before) [Tech No Logical Remix]"
"Things Can Only Get Better"

Singl na kaseti
"What Kind Of Fool (Heard All That Before)"
"Things Can Only Get Better"

Videospot
Videospot za pjesmu oživio je scene poznate Brigitte Bardot iz njenog filma iz 1956. godine I Bog stvori ženu. Prikazuje Minogue u odjeći iz 1950-tih kako odbacuje dečka govoreći mu da više "nije budala".

Top ljestvice

Singlovi iz 1992.
Skladbe Kylie Minogue

{'title': 'What Kind of Fool (Heard All That Before)', 'url': 'https://hr.wikipedia.org/wiki/What%20Kind%20of%20Fool%20%28Heard%20All%20That%20Before%29', 'language': 'hr', 'timestamp': '20230320'}


.. _Maps:

Maps
====

.. py:currentmodule:: cassiopeia

.. automethod:: cassiopeia.get_maps

.. autoclass:: Maps
    :members:
    :undoc-members:
    :show-inheritance:
    :inherited-members:

.. autoclass:: Map
    :members:
    :undoc-members:
    :show-inheritance:

{'content_hash': '4d5ebf8703185ff39f7665b24b9410ec', 'timestamp': '', 'source': 'github', 'line_count': 22, 'max_line_length': 35, 'avg_line_length': 12.454545454545455, 'alnum_prop': 0.6167883211678832, 'repo_name': 'robrua/cassiopeia', 'id': '7ad90f1b1e3b225065be1752caa6dc17a76079e4', 'size': '274', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'doc/cassiopeia/map.rst', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Python', 'bytes': '609825'}]}


package com.sastix.cms.common.services.hazelcast.config;

import java.util.List;

public class HazelcastProperties {

    public String configurationName;

    public String groupName;

    public String groupPass;

    public int networkPort;

    public boolean portAutoIncrement;

    public boolean multicastEnabled;

    public boolean managementEnabled;

    public String managementUrl;

    public String multicastGroup;

    public int multicastPort;

    public int multicastTimeout;

    public int multicastTTL;

    public boolean tcpIpEnabled;

    public List<String> tcpIpMembers;

    public String mapName;

    public int backupCount;

    public int maxIdleSeconds;

    public int timeToLiveSeconds;

    public int maxSize;

    public int evictionPercentage;

    public boolean readBackupData;

    public String evictionPolicy;

    public String mergePolicy;

    public int customTimeToLiveSeconds;

    public HazelcastProperties() {
    }

    public HazelcastProperties(String configurationName, String groupName, String groupPass, int networkPort,
                               boolean portAutoIncrement, boolean multicastEnabled, boolean managementEnabled, String managementUrl,
                               String multicastGroup, int multicastPort, int multicastTimeout, int multicastTTL, boolean tcpIpEnabled,
                               List<String> tcpIpMembers, String mapName, int backupCount, int maxIdleSeconds, int timeToLiveSeconds,
                               int maxSize, int evictionPercentage, boolean readBackupData, String evictionPolicy, String mergePolicy,
                               int customTimeToLiveSeconds) {
        this.configurationName = configurationName;
        this.groupName = groupName;
        this.groupPass = groupPass;
        this.networkPort = networkPort;
        this.portAutoIncrement = portAutoIncrement;
        this.multicastEnabled = multicastEnabled;
        this.managementEnabled = managementEnabled;
        this.managementUrl = managementUrl;
        this.multicastGroup = multicastGroup;
        this.multicastPort = multicastPort;
        this.multicastTimeout = multicastTimeout;
        this.multicastTTL = multicastTTL;
        this.tcpIpEnabled = tcpIpEnabled;
        this.tcpIpMembers = tcpIpMembers;
        this.mapName = mapName;
        this.backupCount = backupCount;
        this.maxIdleSeconds = maxIdleSeconds;
        this.timeToLiveSeconds = timeToLiveSeconds;
        this.maxSize = maxSize;
        this.evictionPercentage = evictionPercentage;
        this.readBackupData = readBackupData;
        this.evictionPolicy = evictionPolicy;
        this.mergePolicy = mergePolicy;
        this.customTimeToLiveSeconds = customTimeToLiveSeconds;
    }

    public String getConfigurationName() {
        return configurationName;
    }

    public void setConfigurationName(String configurationName) {
        this.configurationName = configurationName;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getGroupPass() {
        return groupPass;
    }

    public void setGroupPass(String groupPass) {
        this.groupPass = groupPass;
    }

    public int getNetworkPort() {
        return networkPort;
    }

    public void setNetworkPort(int networkPort) {
        this.networkPort = networkPort;
    }

    public boolean isPortAutoIncrement() {
        return portAutoIncrement;
    }

    public void setPortAutoIncrement(boolean portAutoIncrement) {
        this.portAutoIncrement = portAutoIncrement;
    }

    public boolean isMulticastEnabled() {
        return multicastEnabled;
    }

    public void setMulticastEnabled(boolean multicastEnabled) {
        this.multicastEnabled = multicastEnabled;
    }

    public boolean isManagementEnabled() {
        return managementEnabled;
    }

    public void setManagementEnabled(boolean managementEnabled) {
        this.managementEnabled = managementEnabled;
    }

    public String getManagementUrl() {
        return managementUrl;
    }

    public void setManagementUrl(String managementUrl) {
        this.managementUrl = managementUrl;
    }

    public String getMulticastGroup() {
        return multicastGroup;
    }

    public void setMulticastGroup(String multicastGroup) {
        this.multicastGroup = multicastGroup;
    }

    public int getMulticastPort() {
        return multicastPort;
    }

    public void setMulticastPort(int multicastPort) {
        this.multicastPort = multicastPort;
    }

    public int getMulticastTimeout() {
        return multicastTimeout;
    }

    public void setMulticastTimeout(int multicastTimeout) {
        this.multicastTimeout = multicastTimeout;
    }

    public int getMulticastTTL() {
        return multicastTTL;
    }

    public void setMulticastTTL(int multicastTTL) {
        this.multicastTTL = multicastTTL;
    }

    public boolean isTcpIpEnabled() {
        return tcpIpEnabled;
    }

    public void setTcpIpEnabled(boolean tcpIpEnabled) {
        this.tcpIpEnabled = tcpIpEnabled;
    }

    public List<String> getTcpIpMembers() {
        return tcpIpMembers;
    }

    public void setTcpIpMembers(List<String> tcpIpMembers) {
        this.tcpIpMembers = tcpIpMembers;
    }

    public String getMapName() {
        return mapName;
    }

    public void setMapName(String mapName) {
        this.mapName = mapName;
    }

    public int getBackupCount() {
        return backupCount;
    }

    public void setBackupCount(int backupCount) {
        this.backupCount = backupCount;
    }

    public int getMaxIdleSeconds() {
        return maxIdleSeconds;
    }

    public void setMaxIdleSeconds(int maxIdleSeconds) {
        this.maxIdleSeconds = maxIdleSeconds;
    }

    public int getTimeToLiveSeconds() {
        return timeToLiveSeconds;
    }

    public void setTimeToLiveSeconds(int timeToLiveSeconds) {
        this.timeToLiveSeconds = timeToLiveSeconds;
    }

    public int getMaxSize() {
        return maxSize;
    }

    public void setMaxSize(int maxSize) {
        this.maxSize = maxSize;
    }

    public int getEvictionPercentage() {
        return evictionPercentage;
    }

    public void setEvictionPercentage(int evictionPercentage) {
        this.evictionPercentage = evictionPercentage;
    }

    public boolean isReadBackupData() {
        return readBackupData;
    }

    public void setReadBackupData(boolean readBackupData) {
        this.readBackupData = readBackupData;
    }

    public String getEvictionPolicy() {
        return evictionPolicy;
    }

    public void setEvictionPolicy(String evictionPolicy) {
        this.evictionPolicy = evictionPolicy;
    }

    public String getMergePolicy() {
        return mergePolicy;
    }

    public void setMergePolicy(String mergePolicy) {
        this.mergePolicy = mergePolicy;
    }

    public int getCustomTimeToLiveSeconds() {
        return customTimeToLiveSeconds;
    }

    public void setCustomTimeToLiveSeconds(int customTimeToLiveSeconds) {
        this.customTimeToLiveSeconds = customTimeToLiveSeconds;
    }

}

{'content_hash': 'c7d30b25c45f425ca333b8bbf93fff6e', 'timestamp': '', 'source': 'github', 'line_count': 284, 'max_line_length': 134, 'avg_line_length': 25.401408450704224, 'alnum_prop': 0.6766010535070696, 'repo_name': 'GiorPan/cms-parent-extend', 'id': '9f4d7155f24ebdbb0980db058e708379d0793dcd', 'size': '7832', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'common/services/src/main/java/com/sastix/cms/common/services/hazelcast/config/HazelcastProperties.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '878'}, {'name': 'HTML', 'bytes': '8173'}, {'name': 'Java', 'bytes': '412906'}]}