Tag Archive for for

Nested for loop

void setup() {
  size(400, 400);
  background(0);
  smooth();
  stroke(255, 50);
  //noStroke();
}

void draw() {
  
  for(int i = 0; i < width; i+=50) {
    
    for(int j = 0; j < height; j+=50) {
      fill(100, 0, 150, 100);
      ellipse(25 + i, 25 + j, 50, 50);
      fill(20, 100, 0, 50);
      rect(i, j, 50, 50);
      println("i = " + i + " j = " + j);
    }
    
  }
  
}

source

Javascript – Reverse a String

var aString = "Hotel";
var rString = "";
for(var i = aString.length; i>=0; i--){
        rString += aString.substr(i,1);
}

source

video for iphone

<script type="text/javascript" language="javascript">
<!--
if((navigator.userAgent.match(/iPhone/i)) ||
   (navigator.userAgent.match(/iPod/i)))
{
     document.getElementById("jj").innerHTML = "<a href="VIDEO_URL"><img src="/images/jj.jpg" /></a>";
}
-->
</script>

source

Search Database for string

CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))

	SET NOCOUNT ON

	DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110), @SearchStr nvarchar(100)
	
	SET @SearchStr = 'photochecks.aspx'

	SET  @TableName = ''
	SET @SearchStr2 = QUOTENAME('%' + @SearchStr + '%','''')

	WHILE @TableName IS NOT NULL
	BEGIN
		SET @ColumnName = ''
		SET @TableName = 
		(
			SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))
			FROM 	INFORMATION_SCHEMA.TABLES
			WHERE 		TABLE_TYPE = 'BASE TABLE'
				AND	QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) > @TableName
				AND	OBJECTPROPERTY(
						OBJECT_ID(
							QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
							 ), 'IsMSShipped'
						       ) = 0
		)

		WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)
		BEGIN
			SET @ColumnName =
			(
				SELECT MIN(QUOTENAME(COLUMN_NAME))
				FROM 	INFORMATION_SCHEMA.COLUMNS
				WHERE 		TABLE_SCHEMA	= PARSENAME(@TableName, 2)
					AND	TABLE_NAME	= PARSENAME(@TableName, 1)
					AND	DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')
					AND	QUOTENAME(COLUMN_NAME) > @ColumnName
			)
	
			IF @ColumnName IS NOT NULL
			BEGIN
				INSERT INTO #Results
				EXEC
				(
					'SELECT ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630) 
					FROM ' + @TableName + ' (NOLOCK) ' +
					' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2
				)
			END
		END	
	END

	SELECT ColumnName, ColumnValue FROM #Results

	drop table #Results

source

Names for day

<?php
$names = array(
	"1" => array(
		"1" => "Marii, Mieczysława, Mieszka",
		"2" => "Bazylego, Grzegorza, Izydora, Makarego",
		"3" => "Arlety, Danuty, Genowefy",
		"4" => "Anieli, Eugeniusza, Tytusa",
		"5" => "Edwarda, Emiliana, Hanny, Szymona",
		"6" => "Kacpra, Melchiora, Baltazara",
		"7" => "Juliana, Lucjana, Rajmunda",
		"8" => "Juliusza, Mścisława, Seweryna",
		"9" => "Juliana, Marceliny, Marianny",
		"10" => "Danuty, Dobrosława, Wilhelma",
		"11" => "Feliksa, Honoraty, Matyldy, Teodozjusza",
		"12" => "Arkadiusza, Benedykta, Grety, Rajmunda",
		"13" => "Bogumiły, Weroniki",
		"14" => "Feliksa, Hilarego, Niny",
		"15" => "Arnolda, Domosława, Izydora, Pawła",
		"16" => "Marcelego, Waldemara, Włodzimierza",
		"17" => "Antoniego, Jana, Rościsława",
		"18" => "Małgorzaty, Piotra",
		"19" => "Henryka, Mariusza, Marty",
		"20" => "Fabiana, Sebastiana",
		"21" => "Agnieszki, Jarosława",
		"22" => "Anastazego, Doriana, Wincentego",
		"23" => "Ildefonsa, Marii, Rajmunda",
		"24" => "Felicji, Franciszka, Rafała",
		"25" => "Elwiry, Miłosza, Pawła",
		"26" => "Pauliny, Polikarpa",
		"27" => "Anieli, Jana, Jerzego, Przybysława",
		"28" => "Radomira, Tomasza, Walerego",
		"29" => "Józefa, Franciszka, Zdzisława",
		"30" => "Macieja, Martyny, Teofila",
		"31" => "Jana, Ludwiki, Marceliny"
	),
	"2" => array(
		"1" => "Brygidy, Ignacego, Seweryna",
		"2" => "Marii, Miłosławy",
		"3" => "Błażeja, Hipolita, Oskara",
		"4" => "Andrzeja, Joanny, Weroniki",
		"5" => "Adelajdy, Agaty",
		"6" => "Doroty, Bohdana, Pawła",
		"7" => "Romana, Ryszarda, Romualda, Teodora",
		"8" => "Hieronima, Ireny, Jana, Sebastiana",
		"9" => "Apolonii, Cyryla, Eryki",
		"10" => "Elwiry, Jacka, Scholastyki",
		"11" => "Bernadetty, Marii, Łazarza",
		"12" => "Eulalii, Juliana, Modesta",
		"13" => "Katarzyny, Grzegorza",
		"14" => "Liliany, Walentego, Zenona",
		"15" => "Jowity, Faustyna, Zygfryda",
		"16" => "Daniela, Danuty, Julianny",
		"17" => "Aleksego, Łukasza, Zbigniewa",
		"18" => "Flawiana, Konstancji, Maksyma, Szymona",
		"19" => "Arnolda, Konrada, Marcelgo",
		"20" => "Leontyny, Leona, Ludomira, Zenobiusza",
		"21" => "Eleonory, Fortunata, Roberta",
		"22" => "Marty, Magłorzaty, Piotra, Romy",
		"23" => "Damiana, Izabeli, Polikarpa, Romany",
		"24" => "Bogusza, Macieja, Sergiusza",
		"25" => "Cezarego, Wiktora",
		"26" => "Aleksandra, Mirosława",
		"27" => "Anastazji, Gabriela",
		"28" => "Hilarego, Lecha, Ludomira, Romana",
		"29" => "Dobroniego, Lutosława, Romana"
		
	),
	"3" => array(
		"1" => "Albina, Antoniego, Dawida, Radosława",
		"2" => "Heleny, Halszki, Pawła",
		"3" => "Kunegundy, Maryny, Tycjana",
		"4" => "Eugeniusza, Kazimierza, Łucji",
		"5" => "Adriana, Fryderyka, Oliwii, Teofila",
		"6" => "Agnieszki, Jordana, Róży, Wiktora",
		"7" => "Felicyty, Pawła, Perpetuy, Tomasza",
		"8" => "Beaty, Jana, Wincentego",
		"9" => "Brunona, Franciszki, Katarzyny",
		"10" => "Aleksandra, Cypriana, Marcelego",
		"11" => "Benedykta, Konstantego, Ludosława",
		"12" => "Alojzego, Bernarda, Grzegorza, Justyna",
		"13" => "Bożeny, Krystyny",
		"14" => "Jakuba, Matyldy, Leona, Łazarza",
		"15" => "Klemensa, Longina, Ludwiki",
		"16" => "Hilarego, Izabeli, Oktawii",
		"17" => "Gertrudy, Patryka, Zbigniewa",
		"18" => "Boguchwały, Cyryla, Edwarda",
		"19" => "Józefa, Bogdana",
		"20" => "Aleksandry, Eufemii, Klaudii, Maurycego",
		"21" => "Benedykta, Lubomira",
		"22" => "Bogusława, Katarzyny",
		"23" => "Feliksa, Oktawiana, Pelagii",
		"24" => "Gabriela, Katarzyny, Marka",
		"25" => "Ireneusza, Marii, Marioli, Wieńczysława",
		"26" => "Emanuela, Larysy, Teodora",
		"27" => "Ernesta, Jana, Lidii",
		"28" => "Anieli, Jana, Sykstusa",
		"29" => "Eustachego, Helmuta, Wiktoryny",
		"30" => "Amelii, Dobromira, Kwiryna, Leonarda",
		"31" => "Balbiny, Beniamina, Dobromierza, Kornelii"
	),
	"4" => array(
		"1" => "Grażyny, Hugona, Ireny, Teodora",
		"2" => "Franciszka, Teodozji, Urbana, Wałdysława",
		"3" => "Ingi, Ryszarda, Pankracego",
		"4" => "Benedykta, Izydora, Wacława",
		"5" => "Ireny, Julianny, Wincentego",
		"6" => "Ady, Celestyna, Izoldy, Wilhema",
		"7" => "Donata, Jana, Rufina",
		"8" => "Cezaryny, Dionizego, Januarego, Julii",
		"9" => "Dobrosławy, Dymitra, Mai",
		"10" => "Małgorzaty, Makarego, Michała",
		"11" => "Filipa, Jaromira, Leona",
		"12" => "Damiana, Juliusza, Lubosława",
		"13" => "Hermenegildy, Idy, Marcina, Przemysława",
		"14" => "Bereniki, Justyny, Waleriana",
		"15" => "Anastazji, Bazylego, Ludwiny, Tytusa",
		"16" => "Bernadetty, Cecylii, Julii, Kseni",
		"17" => "Rudolfa, Roberta",
		"18" => "Alicji, Apoloniusza, Bogusławy",
		"19" => "Adolfa, Konrada, Leona, Tymona",
		"20" => "Agnieszki, Czesława, Mariana",
		"21" => "Anzelma, Bartosza, Feliksa",
		"22" => "Kai, Łukasza, Leonii, Sotera",
		"23" => "Jerzego, Wojciecha",
		"24" => "Aleksego, Feliksa, Grzegorza, Horacego",
		"25" => "Jarosława, Marka, Wasyla",
		"26" => "Klaudiusza, Marii, Marzeny, Marceliny",
		"27" => "Anastazego, Felicji, Teofilia, Zyty",
		"28" => "Pawła, Piotra, Walerii, Witalisa",
		"29" => "Bogusława, Hugona, Rity",
		"30" => "Katarzyny, Ludwika, Mariana, Tamary"
		
	),
	"5" => array(
		"1" => "Filipa, Jeremiasza, Józefa",
		"2" => "Anatola, Atanazego, Zygmunta",
		"3" => "Antoniny, Marii, Marioli",
		"4" => "Moniki, Floriana, Sylwana, Władysława",
		"5" => "Ireny, Waldemara",
		"6" => "Dominika, Filipa, Jana, Jakuba, Judyty",
		"7" => "Benedykta, Gizeli, Floriana, Ludmiły",
		"8" => "Lizy, Stanisława, Wiktora",
		"9" => "Bożydara, Grzegorza, Karoliny",
		"10" => "Antoniny, Izdora, Symeona",
		"11" => "Miry, Franciszka, Igi, Ludomira, Władysławy",
		"12" => "Achillesa, Dominika, Pankracego",
		"13" => "Glorii, Roberta, Serwacego",
		"14" => "Bonifacego, Dobiesława, Justyny, Macieja",
		"15" => "Nadziei, Izydora, Jana, Zofii",
		"16" => "Andrzeja, Szymona, Wieńczysława",
		"17" => "Brunona, Weroniki, Sławomira",
		"18" => "Aleksandry, Eryka, Feliksa",
		"19" => "Celestyna, Iwa, Mikołaja, Piotra",
		"20" => "Aleksandra, Bazylego, Bernardyna",
		"21" => "Kryspiana, Tymoteusza, Walentego, Wiktora",
		"22" => "Heleny, Julii, Wiesławy",
		"23" => "Dezyderiusza, Emilii, Iwony",
		"24" => "Joanny, Zuzanny",
		"25" => "Grzegorza, Leona, Magdaleny, Urbana",
		"26" => "Filipa, Pauliny",
		"27" => "Jana, Juliusza",
		"28" => "Augustyna, Jaromira, Justa, Justyny",
		"29" => "Bogumiły, Magdaleny, Teodozji, Urszuli",
		"30" => "Feliksa, Ferdynanda, Jana, Karola",
		"31" => "Anieli, Petroneli"
	),
	"6" => array(
		"1" => "Anieli, Jakuba, Justyna, Konrada",
		"2" => "Erazma, Marcelego, Marianny, Piotra",
		"3" => "Klotyldy, Leszka, Tamary",
		"4" => "Franciszka, Karola, Kwiryny",
		"5" => "Bonifacego, Walerii, Waltera",
		"6" => "Danuty, Dominiki, Laurentego, Norberta",
		"7" => "Roberta, Wiesława",
		"8" => "Maksyma, Medarda, Seweryna",
		"9" => "Dominika, Efrema, Felicjana, Pelagii",
		"10" => "Bogumiła, Diany, Małgorzaty",
		"11" => "Barnaby, Benedykta, Feliksa",
		"12" => "Gwidona, Jana, Leona, Onufrego",
		"13" => "Antoniego, Lucjana",
		"14" => "Elizy, Bazylego, Elwiry, Michała, Walerego",
		"15" => "Jolanty, Wita, Witolda",
		"16" => "Aliny, Anety, Benona, Julity, Justyny",
		"17" => "Adolfa, Alberta, Laury, Marcjana",
		"18" => "Elżbiety, Marka",
		"19" => "Gerwazego, Protazego",
		"20" => "Bogny, Bogumiły, Diany, Florentyny",
		"21" => "Alicji, Alojzego",
		"22" => "Pauliny, Flawiusza, Jana, Tomasza",
		"23" => "Wandy, Zenona",
		"24" => "Jana, Danuty",
		"25" => "Doroty, Łucji, Wilhelma",
		"26" => "Jana, Pawła, Rudolfa",
		"27" => "Cyryla, Marii, Maryli, Władysława",
		"28" => "Ireneusza, Leona",
		"29" => "Piotra, Pawła",
		"30" => "Emilii, Lucyny"
		
	),
	"7" => array(
		"1" => "Haliny, Marcina, Mariana",
		"2" => "Jagody, Marii, Urbana",
		"3" => "Anatola, Jacka, Tomasza",
		"4" => "Innocentego, Malwiny, Odona, Teodora",
		"5" => "Antoniego, Filomeny, Karoliny, Marii",
		"6" => "Dominiki, Gotarda, Łucji",
		"7" => "Cyryla, Estery, Metodego",
		"8" => "Edgara, Elżbiety, Eugeniusza, Prokopa",
		"9" => "Lukrecji, Mikołaja, Sylwii, Weroniki, Zenona",
		"10" => "Amelii, Antoniego, Filipa, Sylwany, Witalisa",
		"11" => "Benedykta, Karoliny, Olgi, Pelagii",
		"12" => "Bonifacego, Brunona, Gwalberta, Weroniki, Jana",
		"13" => "Andrzeja, Ernesta, Henryka, Kingi, Małgorzaty",
		"14" => "Bonawentury, Kamila, Marcelina, Ulryka",
		"15" => "Dawida, Henryka, Włodzimierza",
		"16" => "Benedykta, Benity, Eustachego, Mariki",
		"17" => "Aleksego, Anety, Bogdana, Jadwigi",
		"18" => "Erwina, Kamila, Karoliny, Szymona",
		"19" => "Marcina, Wincentego, Wodzisława",
		"20" => "Frederyka, Czesława, Hieronima, Małgorzaty",
		"21" => "Dalidy, Daniela, Andrzeja, Wawrzyńca",
		"22" => "Bolesławy, Magdaleny, Marii",
		"23" => "Apolinarego, Bogny, Brygidy, Stwosza",
		"24" => "Kingi, Krystyny",
		"25" => "Jakuba, Krzysztofa, Walentyny",
		"26" => "Anny, Grażyny, Mirosławy",
		"27" => "Julii, Lilii, Natalii",
		"28" => "Aidy, Innocentego, Marceli, Wiktora",
		"29" => "Marty, Olafa",
		"30" => "Aldony, Julity, Ludmiły, Piotra",
		"31" => "Ernestyny, Heleny, Ignacego, Lubomira"
	),
	"8" => array(
		"1" => "Juliana, Justyna, Nadii, Piotra",
		"2" => "Alfonsa, Euzebiusza, Gustawa, Kariny, Marii",
		"3" => "Augustyna, Lidii, Nikodema",
		"4" => "Dominika, Jana, Protazego",
		"5" => "Mariana, Marii, Oswalda, Stanisława",
		"6" => "Jakuba, Sławy, Oktawiana",
		"7" => "Doroty, Kajetana, Sykstusa",
		"8" => "Cypriana, Dominika, Emiliana",
		"9" => "Edyty, Klarysy, Juliana, Romana, Romualda",
		"10" => "Blanki, Borysa, Wawrzyńca",
		"11" => "Filomeny, Lecha, Ligii, Zuzanny",
		"12" => "Euzebii, Klary, Innocentego, Juliana",
		"13" => "Diany, Hipolita, Poncjana",
		"14" => "Alfreda, Euzebiusza, Maksymiliana",
		"15" => "Marii, Napoleona, Stelii",
		"16" => "Joachima, Rocha, Stefana",
		"17" => "Julianny, Jacka, Mirona, Żanny",
		"18" => "Bronisławy, Heleny, Ilony, Karoliny",
		"19" => "Bolesława, Juliana, Ludowika",
		"20" => "Bernarda, Samuela, Sobiesława",
		"21" => "Joanny, Franciszki, Kazimiery, Piusa",
		"22" => "Marii, Cezarego, Tymoteusza",
		"23" => "Apolinarego, Filipa, Róży, Wiktora",
		"24" => "Bartłomieja, Bartosza, Haliny, Jerzego",
		"25" => "Józefa, Luizy, Ludwika",
		"26" => "Aleksandra, Marii, Wiktora, Zefiryny",
		"27" => "Józefa, Kalasantego, Moniki, Cezarego",
		"28" => "Patrycji, Augustyna, Wyszomira",
		"29" => "Beaty, Flory, Jana, Racibora, Sabiny",
		"30" => "Feliksa, Róży, Szczęsnego",
		"31" => "Bogdana, Izabeli, Pauliny, Rajmunda, Ramony"
		
	),
	"9" => array(
		"1" => "Bronisława, Idziego",
		"2" => "Juliana, Seweryna, Stefana, Wilhelma",
		"3" => "Grzegorza, Izabeli, Szymona",
		"4" => "Idy, Julianny, Liliany, Rozalii, Róży",
		"5" => "Doroty, Teodora, Wawrzyńca",
		"6" => "Beaty, Eugeniusza",
		"7" => "Domosławy, Reginy, Melchiora",
		"8" => "Adrianny, Marii, Nestora, Radosława, Serafiny",
		"9" => "Jacka, Piotra, Sergiusza, Ścibora",
		"10" => "Aldony, Łukasza, Mikołaja, Mścisława",
		"11" => "Dagny, Hiacynta, Jacka, Prota",
		"12" => "Amadeusza, Gwidona, Marii, Radzimira",
		"13" => "Aureliusza, Eugenii, Filipa, Jana",
		"14" => "Bernarda, Cypriana, Roksany",
		"15" => "Albina, Nikodema, Marii",
		"16" => "Edyty, Kamili, Kornela",
		"17" => "Justyny, Franciszka, Roberta",
		"18" => "Ariadny, Ireny, Irmy, Józefa, Stanisława",
		"19" => "Konstancji, Januarego, Teodora",
		"20" => "Eustachego, Euzebii, Filipiny",
		"21" => "Hipolita, Jonasza, Mateusza",
		"22" => "Joachima, Maurycego, Tomasza",
		"23" => "Bogusława, Linusa, Liwiusza, Tekli",
		"24" => "Gerarda, Teodora, Tomiry, Ruperta",
		"25" => "Aurelii, Kleofasa, Władysława",
		"26" => "Delfiny, Łucji, Justyny, Cypriana",
		"27" => "Kosmy, Damiana, Wincentego, Mirabeli",
		"28" => "Marka, Wacława, Tymona",
		"29" => "Gabriela, Michała, Michaliny, Rafała",
		"30" => "Hieronima, Honoriusza, Wery, Zofii"
		
	),
	"10" => array(
		"1" => "Danuty,Igora, Remigiusza",
		"2" => "Dionizego, Teofilia, Sławomira",
		"3" => "Teresy, Gerarda, Heliodora, Jana",
		"4" => "Edwina, Rozalii, Franciszka",
		"5" => "Apolinerego, Marcelego, Placyda",
		"6" => "Artura, Brunona",
		"7" => "Marii, Marka, Mirelli",
		"8" => "Brygidy, Pelagii, Walerii",
		"9" => "Arnolda, Dionizego, Ludwika, Wincentego",
		"10" => "Daniela, Pauliny, Franciszka, Leona",
		"11" => "Aldony, Aleksandra, Dobromiry, Emila",
		"12" => "Eustachego, Maksymiliana, Edwina",
		"13" => "Edwarda, Geralda, Honorata, Teofila",
		"14" => "Bernarda, Dominika, Kaliksta, Liwii",
		"15" => "Jadwigi, Teresy, Florentyny",
		"16" => "Ambrożego, Gerarda, Gawła",
		"17" => "Małgorzaty, Ignacego, Wiktora, Marity",
		"18" => "Juliana, Łukasza",
		"19" => "Pawła, Piotra, Jana, Ziemowita",
		"20" => "Ireny, Kleopatry",
		"21" => "Urszuli, Hilarego, Jakuba",
		"22" => "Korduli, Filipa, Halki, Salomei",
		"23" => "Marleny, Seweryna, Teodora, Igi",
		"24" => "Marcina, Rafała, Antoniego",
		"25" => "Darii, Ingi, Kingi, Kryspina, Wilhelminy",
		"26" => "Ewarysta, Damiana, Łucjana",
		"27" => "Iwony, Sabiny",
		"28" => "Szymona, Tadeusza",
		"29" => "Wioletty, Jacka, Euzebii, Narcyza, Felicjana",
		"30" => "Edmunda, Przemysława, Zenobii",
		"31" => "Augusta, Krzysztofa, Saturniana, Urbana"
	),
	"11" => array(
		"1" => "Juliana, Łukasza, Wszystkich Świętych",
		"2" => "Bohdana, Bożydara, Tobiasza",
		"3" => "Sylwii, Huberta, Marcina",
		"4" => "Karola, Olgierda",
		"5" => "Elżbiety, Sławomira, Dominika",
		"6" => "Feliksa, Leonarda, Ziemowita",
		"7" => "Kariny, Antoniego, Florentego, Ernesta, Żytomira",
		"8" => "Klaudiusza, Seweryna, Gotfryda, Bogdana",
		"9" => "Aleksandra, Gracji, Teodora, Ursyna, Ludwika",
		"10" => "Andrzeja, Ludomira, Leny, Leona",
		"11" => "Bartołomieja, Marcina, Teodora",
		"12" => "Renaty, Witolda, Józafata",
		"13" => "Mikołaja, Stanisława, Mateusza, Izaaka",
		"14" => "Emila, Judyty, Serafina, Wawrzyńca",
		"15" => "Alberta, Leopolda",
		"16" => "Edmunda, Gertrudy, Marii",
		"17" => "Grzegorza, Salomei, Elżbiety",
		"18" => "Anieli, Romana, Klaudyny, Karoliny",
		"19" => "Elżbiety, Seweryna, Maksyma",
		"20" => "Anatola, Edmunda, Feliksa, Sędzimira, Rafała",
		"21" => "Alberta, Janusza, Konrada",
		"22" => "Cecylii, Marka, Stefana, Wszemiły",
		"23" => "Adeli, Klementyny, Klemensa, Felicyty",
		"24" => "Flory, Jana, Emmy, Chryzogona",
		"25" => "Katarzyny, Erazma",
		"26" => "Konrada, Lechosława, Sylwestra, Delfiny",
		"27" => "Waleriana, Wirgiliusza, Maksymiliana",
		"28" => "Grzegorza, Zdzisława, Stefana, Lesława",
		"29" => "Błażeja, Saturnina",
		"30" => "Andrzeja, Maury, Konstantego, Justyny"		
	),
	"12" => array(
		"1" => "Eligiusza, Edmunda, Natalii",
		"2" => "Balbiny, Bibianny, Piotra, Pauliny",
		"3" => "Franciszka, Ksawerego, Kasjana",
		"4" => "Barbary, Krystiana, Piotra, Jana",
		"5" => "Krystyny, Sabiny, Saby, Edyty",
		"6" => "Emiliana, Mikołaja, Jaremy",
		"7" => "Ambrożego, Marcina, Teodora",
		"8" => "Marii, Wirgiliusza, Makarego, Światozara",
		"9" => "Joanny, Leokadii, Wiesława",
		"10" => "Bogdana, Daniela, Julii",
		"11" => "Damazego, Waldemara",
		"12" => "Adelajdy, Ady, Aleksandra, Dagmary, Konrada",
		"13" => "Łucji, Otylii",
		"14" => "Alfreda, Izydora, Jana",
		"15" => "Celiny, Ireneusza, Niny, Waleriana",
		"16" => "Adelajdy, Albiny, Alicji, Euzebiusza, Zdzisławy",
		"17" => "Floriana, Łukasza, Łazarza, Olimpii",
		"18" => "Bogusława, Gracjana, Laurencji",
		"19" => "Dariusza, Eleonory, Gabrieli, Urbana",
		"20" => "Bogumiły, Dominika",
		"21" => "Piotra, Seweryna, Tomasza, Tomisława",
		"22" => "Franciszki, Honoraty, Zenona",
		"23" => "Jana, Wiktorii, Sławomiry",
		"24" => "Adama, Ewy, Eweliny",
		"25" => "Anastazji, Eugenii",
		"26" => "Dionizego, Szczepana",
		"27" => "Maksyma, Teodora, Jana, Żanety",
		"28" => "Antoniego, Cezarego, Godzisława, Teofili",
		"29" => "Dawida, Dominika, Tomasza",
		"30" => "Eugeniusza, Marcelego, Irmy, Rainera, Sewera",
		"31" => "Sylwestra, Melanii, Mariusza"		
	)
);
?>

source

Klein bottle generator

// Time to sleep between rezzes -- avoids compile errors
float   sleep = 1;
// Number of "slices"
integer m = 120;
// Number of "stripes"
integer n = 8;
// Name of the rezzed object (must exist in inv)
string  edgeprimname = "Cylinder";

// Rezz a segment between 2 given points, assign its color color
// Mod of a routine found here:
//   <a href="http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryBezierCurveDemo" >http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryBezierCurveDemo</a>
// Original credits follow:
//   Bezier Curve Demo 1.0.1
//   Catherine Omega Heavy Industries
//   Modified by Lionel Forager 29-12-2006:
//     Added segment drawing between points. Corrected minor bugs.
drawLineSegment(vector base, vector p1,vector p2, integer order)
{
// Calc the position of the center of the segment
vector center = (p1+p2)/2.;
vector localZ = p2 - p1;
// Get distance between points
float distance= llVecMag(localZ);
// Normalize the vector
localZ = localZ / distance;

vector xAxis;
// Let's choose as x local axis the direction of a vector normal
// to localZ and contained in the plain given by localZ and global X
// or global Y, the one that is less parallel to localZ
if ( localZ.x < localZ.y ) xAxis= <1.,0.,0.>;
else                       xAxis= <0.,1.,0.>;

// localX is the one contain in the plane given by localZ and xAxis
// that is normal to localZ. That is, localX = xAxis - localZ*xaxis*localZ.
// We should normalize the vector to get a unitary one.
vector localX= xAxis - (localZ * xAxis) * localZ;
localX= llVecNorm(localX);

// Now get the rotation to put axis Z oriented pointing
// to the direction between the two given points.
rotation rot = llAxes2Rot(localX,localZ % localX, localZ);

// Rezz the cylinder!
llRezObject(edgeprimname,base + center,ZERO_VECTOR,rot,(integer) (distance*1000)*100+order);

// Avoid clogging the queue and subsequent compile problems
llSleep(sleep);
}


default
{

touch_start(integer total_number)
{

llSay(0, "Generating Klein bottle...");

integer i;
integer j;
float a = 2;
float b = 7;
float c = 2;
float r;
float u;
float v;
float x;
float y;
float z;
list oldcoor = [];
list firstcoor = [];
list coor = [];
vector prevpos;
rotation rot;

for (i = 0; i <= m; i++) {
// llSay(0,"Looping I="+(string)i+" of "+(string)m);

for (j = 0; j < n; j++) {
// llSay(0," Looping J="+(string)j+" of "+(string)n);

u = 2 * PI * i / m;
v = 2 * PI * j / n;

if (n % 2 == 1) v += PI / n * i/m;

r = c * (1 - llCos(u) / 2);

// See PlanetMath,
// <a href="http://planetmath.org/?op=getobj&from=objects&id=4249" >http://planetmath.org/?op=getobj&from=objects&id=4249</a>

if (u < PI) {
x = a * llCos(u) * (1 + llSin(u)) + r * llCos(u) * llCos(v);
y = b * llSin(u) + r * llSin(u) * llCos(v);
} else {
x = a * llCos(u) * (1 + llSin(u)) + r * llCos(v + PI);
y = b * llSin(u);
};

z = r * llSin(v);


// draw "horizontal" lines
if (j > 0) {
prevpos = llList2Vector(coor,j-1);
drawLineSegment(llGetPos(),prevpos,<x,y,z>,j);
};

if (j == n-1) {
prevpos = llList2Vector(coor,0);
drawLineSegment(llGetPos(),prevpos,<x,y,z>,0);
};


// draw "vertical" and diagonal lines
if (i > 0) {

prevpos = llList2Vector(oldcoor,j);
drawLineSegment(llGetPos(),prevpos,<x,y,z>,j);

if (j > 0) prevpos = llList2Vector(oldcoor,j-1);
else prevpos = llList2Vector(oldcoor,n-1);
drawLineSegment(llGetPos(),prevpos,<x,y,z>,j);

};


// if (i < m) llRezObject("Vertex", llGetPos() + <x,y,z>,
// <0.0,0.0,0.0>, <0.0,0.0,0.0,1.0>, 0);

coor = coor + [<x,y,z>];

};

if (i == 0) firstcoor = coor;
oldcoor = coor;
coor = [];

};
llSay(0, "Done!");
}
}

source

Fastest loop iteration

// fastest way to iterate through a loop
// - set var to :int
// - count down from desired loop count to zero
// - on each count we test the Boolean value of j (j<1 makes it false)
// - instead of counting down with j-- we use j += -1 because adding negative
//   numbers is faster than subtracting
//

for(var j:int=10; j; j += -1){}

source

Iterate through years and months

for year in `seq 2006 2010`
do
for month in `seq 1 12`
do
echo $year $month
done
done

source

PHP Smarty for文の代わり

({section name=i start=0 loop=10})
({$smarty.section.i.index})回目
({/section})

source

Array Splitter (random => odd & even)

//get an array and by using it, create two different array which are odd and even
void arraySplitter(int *&array, int size, int &sizeEven, int &sizeOdd, int *&array2)
{
int even = 0;
int odd = 0;

//determine how many member of given array is even and how many of them is odd
for (int i = 0; i < size; i++)
{
if(array[i]%2==0)
{
even++;
}
else
{
odd++;
}
}

//by using even and odd parameter, creates two different array
//which will be used soon
int *arrayOdd= new int[even];
int *arrayEven = new int[odd];

int m = 0;
int n = 0;

//creates arrays which has only even or odd members
for (int i = 0; i < size; i++)
{
if(array[i]%2==0)
{
arrayEven[m] = array[i];
m++;
}
else
{
arrayOdd[n] = array[i];
n++;
}
}

//returns arrays with pass by referance
array = arrayEven;
array2 = arrayOdd;
}

source