Posts

Showing posts from February 3, 2019

Torre Pellice

Image
Torre Pellice — gmina — Państwo   Włochy Region Piemont Prowincja Turyn Kod ISTAT 001275 Powierzchnia 21 km² Populacja  (2004) • liczba ludności 4573 • gęstość 217,8 os./km² Nr kierunkowy 0121 Kod pocztowy 10066 Położenie na mapie Włoch Torre Pellice 44°49′N   7°14′E / 44,816667   7,233333 Torre Pellice – miejscowość i gmina we Włoszech, w regionie Piemont, w prowincji Turyn. W pobliżu miasta w roku 1532 miał miejsce synod waldensów. Według danych na rok 2004 gminę zamieszkiwały 4573 osoby, 217,8 os./km². W Torre Pellice pochowany jest Edwin Jędrkiewicz. Linki zewnętrzne | Źródło danych: Istituto Nazionale di Statistica p   •   d   •   e Gminy prowincji Turyn Agliè Airasca Ala di Stura Albiano d'Ivrea Alice Superiore Almese Alpette Alpignano Andezeno Andrate Angrogna Arignano Avigliana Azeglio Bairo Balangero Baldissero Canavese Baldissero Torinese Ba

Android, app with several checkbox areas. App laging because of heavy xml or code

Image
0 My app is several checkboxes areas. On some event data from all checkboxes will be saved/sended/etc. All worked, but this Activity loading about 7 seconds because my code is bad. So i need help in refactoring and optimize it. How it looks in app: img1 img2 So, i have 10(!) forms with ~ 100 checkboxes summary. To draw it, i'm using 10 recyclers with 10 adaptes. Every adapter initialize with his own list and have own layout manager. How to make this code good? I can't pass all code, it's too large, so i give it apart. To drow one recycler i use it(variable names changed): //toolbar and questform ... <RelativeLayout android:id="@+id/rv_wrapper1" android:layout_width="match_parent" android:layout_height="wrap_content"

Rotation invariant fingerprinting

Image
15 Imagine we have some polyomino and would like to uniquely identify them, however the polyominos can be rotated, so blindly hashing them won't give us the same fingerprint for a piece and a rotation thereof (in general). For example if we have the L-tetromino x x xx we would like it to have the same fingerprint as any of these: xx x x xxx xxx , x or x Note: We only allow rotations on the plane (ie. they are one-sided polyominos) and therefore the following polyomino would be a different one: x x xx Challenge The task for this challenge is to implement a fingerprinting-function/program which takes an $mtimes n$ Boolean/ $0,1$ -valued matrix/list of lists/string/.. encoding a polyomino and returns a string - the fingerprint of a polyomino. The fingerprint must