48
\$\begingroup\$
I've always liked screens full of randomly colored pixels. They're interesting to look at and the programs that draw them are fun to watch.
The challenge
Fill your screen, or a graphical window, with colored pixels.
The rules
 - Your program must have an even chance of picking all colors (i.e in the range #000000 to #FFFFFF), or all colors that can be displayed on your system.
 - Your program must continue to display random pixels until manually stopped (it cannot terminate on its own).
 - Pixels can be any size, as long as your output has at least 40x40 "pixels".
 - Your program must run at such a speed that it can replace every pixel on the screen/window at least once after running for three minutes.
 - Your program must choose truly random colors and points to replace, i.e. random with all points/colors equally likely. It cannot just look random. It must use a pRNG or better, and the output cannot be the same every time.
 - Your program must have an equal chance of picking all colors each iteration.
 - Your program must replace only one pixel at once.
 - Your program cannot use the internet nor your filesystem (/dev/random and /dev/urandom excepted).
Example
Your output could look like this if stopped at a random time:
The winner
The shortest answer in each language wins. Have fun!
\$\endgroup\$
8
 - \$\begingroup\$ By "truly random", I assume pseudorandom is OK (like Math.random() or similar) \$\endgroup\$
 – AAM111
 Jun 2 '17 at 1:29
 - \$\begingroup\$ @OldBunny2800 It must use a pRNG or better \$\endgroup\$ Jun 2 '17 at 13:07
 - \$\begingroup\$ Since the program can't use the internet, I'll just leave this in a comment: babelia.libraryofbabel.info/slideshow.html \$\endgroup\$
 – KSmarts
 Jun 2 '17 at 13:28
 - 1
 \$\begingroup\$ So does the "3 minute limit" apply to setup time, too? Or just once the "program" begins? Asking because I have a Minecraft redstone solution, which runs very quickly once it is going, but takes a while to set up initially (it has to "place" each "pixel" in the 40x40 grid) before it can start changing colors. \$\endgroup\$
 – BradC
 Jun 4 '17 at 2:34
 - 5
 \$\begingroup\$ Truly random by definition exclude pseudo-random, yet doesn't define a distribution. I assume you mean a uniform PRNG, where all events are equiprobable and independent of each other. \$\endgroup\$
 – Dennis
 Jun 4 '17 at 4:44
49 Answers 49
1
2
2
\$\begingroup\$
Commodore 64 (old ROM I think), ~28 tokenized BASIC Bytes used
 0poke646,rnd(.)*16:?"{reverse on} ";:goto
The memory location 646 is used as a colour out in the BASIC kernal (pretty sure this is the old kernal, not the C64c kernal), which is one of the 16 colours available in its palette. Then a reverse space is printed after. goto is used as an infinite loop until the screen is filled.
This is the cheapest in terms of bytes. There is a nicer way to do this, as follows:
Commodore 64 (new and old ROM), ~46 tokenized BASIC bytes
 0 fori=0to999:poke1024+i,160:poke55296+i,rnd(.)*16:next
This will poke firstly a reversed (or inversed) space to the screen RAM (at 0x0400 - 0x07e7), and then alter the colour attribute for each character position (mapped at 0xd800 - 0xdbe7) between 0 and 15 inclusive.
As soon as the for/next loop ends, the ready. prompt is shown. To stop this, add the following line, costing another 7 tokenized BASIC bytes:
 1 go to 1
Commodore C64 random colour generator simulator
\$\endgroup\$
2
\$\begingroup\$
Powershell, 128 126 124 88 bytes
-2 bytes thanks @Veskah
1..($c=[Console])::WindowWidth*$c::WindowHeight|%{Write-Host ' '-b(random 16)-n}
for(){}
Output:
console
VS code output:
VS Code
\$\endgroup\$
6
 - 1
 \$\begingroup\$ Don't need the semi-colon and there's an extra space in the write-host \$\endgroup\$
 – Veskah
 May 8 '19 at 13:22
 - 1
 \$\begingroup\$ not sure this satisfies the condition of overwriting every cell at least once within 3 minutes \$\endgroup\$
 – T3RR0R
 Oct 28 '21 at 19:33
 - \$\begingroup\$ Thanks. Fixed. ¯\_(ツ)_/¯ \$\endgroup\$
 – mazzy
 Oct 28 '21 at 20:01
 - \$\begingroup\$ Your latest edit is not functional for the terms of the challenge. \$\endgroup\$
 – T3RR0R
 Oct 28 '21 at 21:08
 - 1
 \$\begingroup\$ A golf of your last working answer that brings it down to 105 bytes and ensures all cells can be rewritten within 3 minutes as required: mode 40,40;for(){[Console]::SetCursorPosition((random(40)),(random(40)));Write-Host ' '-b(random 16)-n} \$\endgroup\$
 – T3RR0R
 Oct 30 '21 at 12:40
2
\$\begingroup\$
TI-Basic (83/84(+(SE)) only), 33 bytes
For(I,0,62
For(J,0,94
If int(2rand
Pxl-Change(I,J
End
End
prgmC
where C is the name of the program.
Without calling itself (+2 bytes):
While 1
For(I,0,62
For(J,0,94
If int(2rand
Pxl-Change(I,J
End
End
End
The TI-83 family calculators with monochrome screens (TI-83, TI-83+, TI-83+SE, TI-84+, and TI-84+SE) support only black and white as colors. This program goes through all the pixels on the screen (except for the rightmost column and bottommost row) and has a 50% chance of inverting it. This may take more than 3 minutes depending on the calculator; if so, replacing 62 and 94 with 39 each should work.
\$\endgroup\$
1
\$\begingroup\$
R, 143 138 bytes
-4 bytes thanks to user2390246
r=runif
s=sample
g=1600
x=1:40
k=hsv(r(g),r(g),r(g))
while(1){image(x,x,matrix(1:g,40),c=k)
Sys.sleep(99/g)
k[s(g,1)]=hsv(r(1),r(1),r(1))}
image makes the required 40x40 grid of rectangles with a matrix m of values (fixed to be 1:1600 in a 40x40 square), with a randomly selected color for each rectangle, k. It plots the image, waits long enough to actually render the image, then randomly changes one of the colors. Uses hsv encoding since it is a value between 0 and 1, which allows us to use runif to generate random colors.
This generates a new plot each time.
\$\endgroup\$
3
 - \$\begingroup\$ It won't affect the score, but shouldn't image(x,x,m,c=k) be outside the while loop? \$\endgroup\$ Jun 2 '17 at 12:31
 - \$\begingroup\$ I don't think you need to define m, you only use it once. \$\endgroup\$ Jun 2 '17 at 12:34
 - 1
 \$\begingroup\$ @user2390246 for the image question, nah, it has to be re-called every time since it's really drawing a new image each time after changing one of the colors. Good call on the m, though. I originally thought I had to change that matrix and never went back and changed it. \$\endgroup\$
 – Giuseppe
 Jun 2 '17 at 13:17
1
\$\begingroup\$
Java 7 with JavaFX, 686 674 bytes
import javafx.scene.*;import javafx.scene.canvas.*;import javafx.scene.layout.*


text: Without dying and fluorescently labeled markers on tissues, Intrinsic optical signals (IOSs) detection technology is a promising method to detect retinal function without influence on normal activities of organism. Slow IOSs of retina reflect the activities in inner retina and the middle layer of retina. In this paper, an IOSs' detection system was built to detect slow IOSs based clinical instrument, Heidelberg Retina Angiograph 2(HAR2). The retina was illuminated by near infrared light continuously during the experiments. The visible light was presented to stimulate the retina. After image alignment and image processing, the signal-to-noise ratio of the IOSs was improved and the signal changes can be extracted. The experimental results showed that the present detection system is suitable to obtain the slow IOSs in clinic and IOSs detection technology is an effective noninvasive method to study changes of function of retina.

source: m-a-p/FineFineWeb


liquor liabilityUnder dram shop liability laws, a party injured by an intoxicated person can sue establishments contributing to that person's intoxication. The term "dram shop" was derived from 18th century English taverns that sold gin by the spoonful, called a dram. Dram shop laws are established by each state.
Dram shop laws can apply to:
 - bars
 - liquor stores
 - restaurants
 - social clubs and private events where liquor is served
The laws also include prohibitions against selling liquor without a license, selling liquor after hours, and selling liquor to minors. For example, if a person has several alcoholic drinks at a restaurant or bar and is visibly intoxicated, and then gets in a car and kills someone on the way home, the owner of the serving establishment can be sued for damages. A dram shop case is often a component of a larger accident case such as a DWI. The statute of limitations on the dram shop portion of the case differs from those that apply to the other claims made in the case.


Fisheries Infosite
Rough Skate 3, 4, 5 and 6 (Combined) (RSK3)
Maori name
Scientific name
Zearaja nasuta
Physical characteristics
Rough Skates are brown with multiple white spots on top and white undersides. As their name suggests, they have many small prickles covering their top surface that are more prominent on the males. Rough Skate can grow to a body length (not including tail) of 79 cm.
Life cycle
Rough Skate have a maximum age of 9 years. Maturity in females is reached at a length of 59 cm and 6 years of age. Males reach maturity at 52 cm and 4 years old. Rough Skate lay two eggs at a time in spring-summer, but it is not known how often this happens in a year.
Rough Skate are most commonly found around the South Island, but are known all around New Zealand. They are found on sandy or muddy bottom surfaces at depths down to 500 m.
Key statistics
Reported commercial catch1 (tonnes)
Quota value estimate2 (NZ$m)
Exports estimate2 (NZ$m)


text:
Table of Contents
How to Farm Ginger in Nigeria
Ginger is a popular spice used in Nigeria for its medicinal and culinary benefits. It is used to treat various ailments like colds, cough, and sore throat. It also adds flavor to different dishes, making it an essential ingredient in Nigerian cuisine. Ginger farming can be a lucrative venture for farmers in Nigeria, provided they have the right knowledge and skills. In this article, we will explore how to farm ginger in Nigeria, from planting to harvesting and processing.
What is Ginger?
Ginger is a flowering plant that originated in Southeast Asia. Its scientific name is Zingiber officinale, and it belongs to the same family as turmeric and cardamom. Ginger is a rhizome, which is an underground stem that grows horizontally and produces roots and shoots. The ginger root is the part of the plant that is commonly used in cooking and medicine.
The first step in ginger farming is soil preparation. Ginger prefers loose, well-draining soil that is rich in organic matter. The soil should be tilled to a depth of about 15cm and mixed with compost or manure. The soil should be slightly acidic, with a pH of between 5.5 and 6.5. If the soil is too alkaline, add some sulfur to lower the pH.
Ginger is usually planted between March and April in Nigeria. The rhizomes are planted about 5cm deep and 20cm apart in rows that are 30-40cm apart. The planting area should be watered immediately after planting to ensure that the soil is moist. Ginger requires regular watering, especially during the dry season. It is also important to weed the area regularly to prevent competition for nutrients.
Ginger requires adequate nutrients to grow and produce a good yield. The soil should be tested before planting to determine the nutrient requirements. Nitrogen, phosphorus, and potassium are the essential nutrients for ginger. The fertilizer should be applied in two stages – before planting and after emergence. A balanced fertilizer with an NPK ratio of 15:15:15 is recommended for ginger farming.
Ginger is usually harvested between 8-10 months after planting, depending on the variety and growing conditions. The leaves of the ginger plant will begin to turn yellow, indicating that it is time to harvest. The rhizomes are carefully dug up using a spade or fork. The rhizomes should be cleaned, sorted, and dried in the sun for a few days. The dried ginger can then be stored in a cool, dry place until it is ready for processing.
Processed ginger has a longer shelf life and can be sold at a higher price. There are different methods of processing ginger, depending on the intended use. Some of the common processing methods include drying, powdering, and pickling. Drying is the most common method, where the ginger is sliced and dried in the sun or a dehydrator. Powdering involves grinding the dried ginger into a fine powder, which can be used as a spice or flavoring agent. Pickling involves soaking the ginger slices in vinegar or brine, which gives it a tangy flavor and preserves it for a longer period.
Marketing is an essential aspect of ginger farming. Farmers can sell their ginger at local markets or to wholesalers who supply to supermarkets and restaurants. Farmers can also sell their ginger online through e-commerce platforms or social media. It is important to have a good understanding of the market demand and price trends to get the best price for the ginger.
Ginger farming can be a profitable venture for farmers in Nigeria. With the right knowledge and skills, farmers can grow high-quality ginger that is in demand in the local and international markets. Soil preparation, planting, fertilizer application, harvesting, processing, and marketing are the key steps in ginger farming. By following these steps, farmers can maximize their yield and income.
1. What are the common pests and diseases that affect ginger plants?
Ginger plants are susceptible to pests like aphids, thrips, and mealybugs, and diseases like bacterial wilt, fusarium wilt, and root knot nematodes. It is important to monitor the plants regularly and take appropriate measures to control the pests and diseases.
2. Can ginger be grown in containers?
Yes, ginger can be grown in containers, provided the container is large enough to accommodate the rhizomes and has good drainage.
3. Does ginger require a lot of water?
Yes, ginger requires regular watering, especially during the dry season. The soil should be kept moist but not waterlogged.
4. How long does it take for ginger to mature?
Ginger usually takes between 8-10 months to mature, depending on the variety and growing conditions.
5. Can ginger be grown in all parts of Nigeria?
Yes, ginger can be grown in most parts of Nigeria, provided the soil and climatic conditions are suitable.

source: openbmb/Ultra-FineWeb


text:
Eventually we think voice commands and audio streaming will be a part of bikes so we made sure to include Bluetooth Smart (4.0+) with audio streaming (A2DP) Including other Bluetooth profiles for later apps and voice control (HSP - headset profile, HFP - hands free profile).
Articles in this section
- Feature: Droplet Test on Karoo Screen
- What positioning systems does Karoo use?
- What is the temperature limits to use Karoo?
- What cellular connectivity does Karoo have?
- What other bluetooth functions are possible?
- What on-board sensors does the Karoo have?
- How much memory does Karoo have?
- What type of screen protection does Karoo have?
- What are the screen specifications?
- How does the touchscreen work?


text:
Delfino, M; Scheyer, T M; Fritz, U; Sánchez-Villagra, M R (2010). An integrative approach to examining a homology question: shell structures in soft-shell turtles. Biological Journal of the Linnean Society, 99:462-476.
Delfino, M; Fritz, U; Sánchez-Villagra, M R (2010). Evolutionary and developmental aspects of phalangeal formula variation in pig-nose and soft-shelled turtles Carettochelyidae and Trionychidae). Organisms, diversity and evolution, 10:69-79.


Menu
Virtual Geek
Tales from real IT system administrators world and non-production environment
Powershell WPF GUI: ToolBox control Textbox watermark placeholder demo
microsoft powershell, wpf, windows presentation frameworks winforms, textbox control toolbox, visual studio, watermark textbox powershell
In this demo I will be showing how to put PlaceHolder text on textbox control on Powershell WPF (Windows presentation framework) GUI. here I have 3 textboxes. When I launches GUI, all the textboxes shows some default darkgray color watermark text information. When I click on them text will automatically disappear and you can start typing your own text without removing or deleting default text. If there is no text on the box or empty and when you move on to another box, It will show the default help message automatically.
I have created default XAML form with visual studio. Textbox color is Darkgray, I have found 2 events on .NET API Reference documentation by Microsoft. I have given 2 url below, It shows how to achieve watermark textbox.
_URL_
_URL_
There are two main events gotfocus and lostfocus. This defines if there is no text what will happened when I click textbox or click another textbox. Here in the first event gotfocus, When I click on the text box, if it finds text is 'Type valid First Name', Textbox becomes empty and font color is changed to black.
$FirstName.Add_GotFocus({
 if ($FirstName.Text -eq 'Type valid First Name') {
 $FirstName.Foreground = 'Black'
 $FirstName.Text = ''
 }
})
In the next when I click somewhere else on any other control, and if textbox is empty it will change the text to 'Type valid First Name' and color will change to default one Darkgray.
$FirstName.Add_LostFocus({
 if ($FirstName.Text -eq '') {
 $FirstName.Text = 'Type valid First Name'
 $FirstName.Foreground = 'Darkgray'
 }
})
You can download this script here, it is also available on github.com.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#Load required libraries
Add-Type -AssemblyName PresentationFramework, PresentationCore, WindowsBase, System.Windows.Forms, System.Drawing
[xml]$xaml = @"
<Window
 xmlns="_URL_
 xmlns:x="_URL_
 xmlns:d="_URL_
 xmlns:mc="_URL_
 xmlns:local="clr-namespace:WpfApplication2"
 Title="PlaceHolder Text Demo" Height="141" Width="300" Topmost="True">
 <Grid>
 <TextBox x:Name="FirstName" HorizontalAlignment="Left" Height="23" Margin="10,10,0,0" TextWrapping="Wrap" Text="Type valid First Name" VerticalAlignment="Top" Width="200" Foreground="DarkGray" />
 <TextBox x:Name="LastName" HorizontalAlignment="Left" Height="23" Margin="10,38,0,0" TextWrapping="Wrap" Text="Type valid Last Name" VerticalAlignment="Top" Width="200" Foreground="DarkGray"/>
 <TextBox x:Name="Contry" HorizontalAlignment="Left" Height="23" Margin="10,66,0,0" TextWrapping="Wrap" Text="Type valid contry" VerticalAlignment="Top" Width="200" Foreground="DarkGray"/>
 </Grid>
</Window>
"@
#Read the form
$Reader = (New-Object System.Xml.XmlNodeReader $xaml)
$Form = [Windows.Markup.XamlReader]::Load($reader)
#AutoFind all controls
$xaml.SelectNodes("//*[@*[contains(translate(name(.),'n','N'),'Name')]]") | ForEach-Object {
 New-Variable -Name $_.Name -Value $Form.FindName($_.Name) -Force
}
#Textbox placeholder remove default text when textbox clicked
$FirstName.Add_GotFocus({

 if ($FirstName.Text -eq 'Type valid First Name') {
 $FirstName.Foreground = 'Black'
 $FirstName.Text = ''
 }
})
#Textbox placeholder grayed out text when textbox clicked
$FirstName.Add_LostFocus({
 if ($FirstName.Text -eq '') {
 $FirstName.Text = 'Type valid First Name'
 $FirstName.Foreground = 'Darkgray'
 }
})
#Textbox placeholder remove default text when textbox clicked
$LastName.Add_GotFocus({

 if ($LastName.Text -eq 'Type valid Last Name') {
 $LastName.Foreground = 'Black'
 $LastName.Text = ''
 }
})
#Textbox placeholder grayed out text when textbox clicked
$LastName.Add_LostFocus({
 if ($LastName.Text -eq '') {
 $LastName.Text = 'Type valid Last Name'
 $LastName.Foreground = 'Darkgray'
 }
})
#Textbox placeholder remove default text when textbox clicked
$Contry.Add_GotFocus({

 if ($Contry.Text -eq 'Type valid contry') {
 $Contry.Foreground = 'Black'
 $Contry.Text = ''
 }
})
#Textbox placeholder grayed out text when textbox clicked
$Contry.Add_LostFocus({
 if ($Contry.Text -eq '') {
 $Contry.Text = 'Type valid contry'
 $Contry.Foreground = 'Darkgray'
 }
})
#Mandetory last line of every script to load form
$Form.ShowDialog()
Userful Articles
Part 1: Create WPF XAML powershell GUI form with Visual studio
Part 2: Powershell and WPF: Build GUI applications tutorial
Part 3: Create shorter Microsoft Powershell WPF automated clean script
Powershell PoshGUI: Convert user to SID and vice versa using
Microsoft Powershell GUI: Change Internet Options connections Lan settings proxy server grayed out
Go Back
Comment
Blog Search
Page Views
_PHONE_
Follow me on Blogarama


text:
Clemons Family Papers
Scope and Contents
This collection contains materials on the Clemons family of Ottawa County, Ohio. Several members were in the crew assigned to the Marblehead Lighthouse and Life-Saving Station circa _PHONE_;. Items in the collection cover _PHONE_. Correspondence (_PHONE_), genealogy papers (_PHONE_), newspaper clippings (_PHONE_), and photographs (circa _PHONE_) are the main sets of materials present. The letters and postcards describe family subjects. The genealogy files trace the Clemons family back to 1767. Newspaper clippings relate to the Clemons family and Ottawa County at large. The majority of the photographs depict the personnel and activities of the U.S. Life-Saving Station at Marblehead, while a smaller set of photos are of the Clemons family.
.42 Cubic Feet (1 legal manuscript box)
- Clemons Family (Family)
Conditions Governing Access
No known access restrictions.
Conditions Governing Use
Researchers using this collection assume full responsibility for conforming to the laws of libel, privacy, and copyright, and are responsible for securing permissions necessary for publication or reproduction.
Language of Materials
Immediate Source of Acquisition
The collection was originally donated to the Center for Archival Collections (CAC) in 1976. IT was transferred to the Historical Collections of the Great Lakes from the CAC in April 1993.
Collection processed by Archivist Mark Sprang in February 2022.
- Guide to the Clemons Family Papers
- Description rules
- Describing Archives: A Content Standard
- Language of description
- Script of description


Difference between revisions of "Development/Tutorials/Decibel/Handling TextChannels"
Jump to: navigation, search
(add tutorial template)
(add outstanding sections)
Line 11: Line 11:

reading=[[Development/Tutorials/CMake|CMake]]

reading=[[Development/Tutorials/CMake|CMake]]

}}

}}

==Abstract==

==Abstract==

This tutorial will walk you through the process of creating a simple application that uses Decibel's TextChannels to communicate via arbitrary instant messaging networks using telepathy. From the result of this tutorial, only a few more lines of code are needed to produce a functioning text based instant messaging client.

This tutorial will walk you through the process of creating a simple application that uses Decibel's TextChannels to communicate via arbitrary instant messaging networks using telepathy. From the result of this tutorial, only a few more lines of code are needed to produce a functioning text based instant messaging client.
Line 119: Line 118:

}

}

</code>

</code>
 +
 +
==The main.cpp file==
 +
TODO
 +
 +
==The .component File==
 +
TODO
 +
 +
==The .service File==
 +
TODO
 +
 +
==Running our Application==
 +
TODO
Revision as of 06:09, 12 March 2008
Handling TextChannels
Tutorial Series Decibel Tutorial
Previous C++, Qt, KDE4 development environment
What's Next
Further Reading CMake
Contents
Abstract
This tutorial will walk you through the process of creating a simple application that uses Decibel's TextChannels to communicate via arbitrary instant messaging networks using telepathy. From the result of this tutorial, only a few more lines of code are needed to produce a functioning text based instant messaging client.
This tutorial is based on the simpleclient demo included with Decibel. An explanation of using the simpleclient demo can be found here.
In this tutorial, we only pick out the important parts of the source code to discuss. The complete working source code for this example can be found here in KDE's SVN Repository.
ChannelHandler class
The first class we will need to create is an implementation of the Decibel::ChannelHandler interface.
The Class Definition
Here is the class definition for our implementation of the Decibel::ChannelHandler interface. It is explained below.
class MyTextChannelHandler : public Decibel::ChannelHandler {
 Q_OBJECT
public:
 explicit MyTextChannelHandler(QObject * parent = 0);
 ~MyTextChannelHandler();
 bool handleChannel(QtTapioca::Connection *, QtTapioca::Channel *, const bool);
public slots:
 void onMessageReceived();
 void onCloseChannel();
private:
 QtTapioca::Connection * m_connection;
 QtTapioca::TextChannel * m_channel;
};
We must inherit from Decibel::ChannelHandler which is the interface definition for handling incoming Channels. We reimplement the constructor, Destructor and the handleChannel() method as well as adding two slots of our own. We also create the member variables m_connecion and m_channel which will hold the QtTapioca::Connection and QtTapioca::Channel objects that are received by the handleChannel method.
The Class Implementation
Now that we have defined our Decibel::ChannelHandler subclass, we need to implement its methods.
MyTextChannelHandler::MyTextChannelHandler(QObject * parent) :
 ChannelHandler(parent),
 m_connection(0),
 m_channel(0)
{ } The constructor is very simple. We just pass the parent object on to the parent class and initialise our member variables to 0.
MyTextChannelHandler::~MyTextChannelHandler() { } The destructor is even simpler. We don't need to do anything in it because Qt will handle the deletion of child objects automatically.
bool MyTextChannelHandler::handleChannel(QtTapioca::Connection * connection,
 QtTapioca::Channel * channel,
 const bool)
{
 Q_ASSERT(connection != 0);
 Q_ASSERT(channel != 0);
 if (m_connection != 0) { return false; }
 m_channel = dynamic_cast<QtTapioca::TextChannel*>(channel);
 if (m_channel == 0)
 {
 return false;
 }
 m_connection = connection;
 connect(m_channel, SIGNAL(messageReceived(const QtTapioca::TextChannel *, const QtTapioca::TextChannel::Message &)),
 this, SLOT(onMessageReceived()));
 connect(m_channel, SIGNAL(closed()), this, SLOT(onCloseChannel()));
 onMessageReceived();
 return true;
}
void MyTextChannelHandler::onCloseChannel() {
 m_connection = 0;
 m_channel = 0;
}
void MyTextChannelHandler::onMessageReceived() {
 QList<QtTapioca::TextChannel::Message> message_list = m_channel->pendingMessages();
 for (QList<QtTapioca::TextChannel::Message>::const_iterator
 message = message_list.constBegin();
 message != message_list.constEnd(); ++message)
 {
 if (message->type() == QtTapioca::TextChannel::Message::Normal &&
 message->contents() == QString("ping?"))
 { m_channel->sendMessage(QString("pong!")); }
 m_channel->acknowledge(*message);
 }
}
The main.cpp file
TODO
The .component File
TODO
The .service File
TODO
Running our Application
TODO
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V.Legal


Monthly Archives: February 2019
Spirits of Fire and Flood
At 854m in height, Arenig Fawr lays no claim to be amongst the mightiest of peaks in Snowdonia. The late W. A. Poucher ranked the rocky summit of this remote mountain as 24th in an ordinal list of the Welsh Peaks. But a mountain is more than a mere measurement of its ascent above ordnance datum, as obsessive peak-baggers and list tickers may fail to acknowledge. It is a massif of geological history, an eco system of flora and fauna, a facilitator of meteorological phenomenon, a catalyst of story, myth and legend, a home of spirits from an earlier age.
Afon Tryweryn
Afon Tryweryn
I first fell under the spell of this less well known area of the Welsh mountains as a student at Aberystwyth University. As Michaelmas term progressed and the nights began to draw in around the somewhat claustrophobic collegiate town, we looked with increasing anticipation to our weekend forays into the Welsh countryside to find space and light. And so we stumbled across the mountains to the south of Llyn Celyn, since when something has called me back time and time again.
On the autumnal equinox I set off to spend the night at the MBA hut situated rather apprehensively just below the slightly Heath Robinson looking dam at Llyn Arenig Fawr. As the hut is situated less than two miles south of the A4212 Y Bala-Trawsfynydd road I decided to extend the journey by starting at the Llyn Celyn dam, picking my way through the farms and fields around Mynydd Nodol and crossing a rather boggy Nant Aberderfel, where the Ordnance Survey indicated path seems to vanish into purple moor grass, bog myrtle and waist-high heather. After four rather gruelling miles I arrived at the bothy, which was, thankfully, empty. The hut is only just large enough for one person, or perhaps two if they know each other well, and probably dates from 1830 when Llyn Arenig Fawr was first adapted as a reservoir to provide the town of Y Bala with drinking water. The lake gains some shelter from storms as it lies in the lee of the crags of Simdde Ddu, but as an autumnal wind began to get up across the silvery waters, as the light began to fail and the rain began to pitter-pat on the steel chimney cap, I determined the best course of action was to light a fire in the somewhat smoky grate and settle down for the night.
In geological terms Arenig Fawr was born 490 million years ago in a sea of fire and foam in a part of geological time known as the Ordovician. The collision of continental plates gave rise to an arc of fierce volcanic activity. The volcanoes erupted into a shallow sea with explosive force, spuing out pyroclastic flows of white-hot ash and lava, which roared with breathtaking speed into the surrounding waters, making them boil and hiss. These "nuées ardentes" or burning clouds, rapidly cooled in air, in water to form solid rock: ignimbrites, tuffs, breccias, from which the lofty crags of Arenig Fawr were chiselled.
During the last ice age some 14,000 years ago, sheets of ice would have submerged these valleys, with only the mountaintops protruding above, a veritable flood concealing the fertile valleys from hunter gatherers and forcing them south to warmer climes. As the valleys and human imagination began to emerge from beneath the ice, stories were woven by the Celtic people about a race of giants who lived among them. Idris was one such giant, living upon his seat "Cadair Idris" and who would initiate contests between other giants, Yscydion, Offrwm and Ysbryn who also lived amongst these hills and mountains. There is an account in the Welsh Triads of the bursting of Llyn Llion that resulted in the deaths of all living people, with the exception of Dwyfan and Dwyfach, who escaped in a boat without sails, and went on to repopulate the British Isles with their offspring. Arenig Fawr seems a likely place for the grounding of this mythological boat, the Welsh for Ark being Aren or Arene. Similarly, it is believed locally that the ruins of an ancient and legendary city lie beneath the waters of Llyn Tegid, or Bala Lake as it is know in English, once lost in a great flood. The lake, formed by glacial melt waters following the last ice age, is one of the last habitats of the Gwyniad fish, a small salmonid creature. Three rather forlorn looking specimens of this remnant of a post-glacial ecosystem sit pickled in formaldehyde in the White Lion Hotel on the main street of Y Bala. Another local legend tells of a farmer who once found a fairy calf among the rushes of Llyn Arenig Fawr, and reared it as one of his own cattle. For many years it produced many fine offspring, making him a wealthy man, until one day a small man playing a pipe appeared by the lake and by his eerie music, led the animal back into the waters to rejoin the fairy herd. Born from water and returned to water.
I awoke to a cold, wet, grey morning and struggled to raise myself from the warmth of my sleeping bag. After a breakfast of kippers cooked on the old iron pan I found hanging on the bothy wall, I carefully balanced across the rickety old iron ladder spanning the water out-flow of the dam, and began to ascend the limb of Y Castell to the south-west of the lake. As I climbed higher and the expanse of open country to the south gradually began to reveal itself, I could see three sheets of water dominating the landscape: Llyn Celyn to the north, Llyn Arenig Fawr in the corrie below, and across the moorland to the south, Llyn Tegid, cradled in the valley beneath the lofty crags of Aran Fawddwy.
The spirit of Arenig Fawr can be deceptively passive, imbued with an air of amiability, beneath which lies a dark and angry character. On clear spring days, with the song of skylarks lifting high into the azure sky, the climb to the summit is a little more than a strenuous walk. But in winter, when the mountain is draped in snow and ice, reminiscent of that long ago age, when black clouds tear across the summit ridge propelled by winds strong enough to lift walkers from their feet and dash them onto the jagged rocks below, then one might imagine giants battling in these hills.
On a moonless August night in 1943 the deep thrum of aircraft engines could be heard above the wind, echoing along the Dyfrdwy Valley. The aircraft was a United States Air Force B17 Flying Fortress, "Mr Five-by-Five", on night training manoeuvres, many miles off course. It is thought that the crew never saw Arenig Fawr in the darkness. Had the aircraft been just fifty metres higher they would have cleared the summit ridge, secured their location and returned to base for cocoa and a good night's sleep. The summit cairn now bears a slate memorial to the eight American crewmembers, each one originating from a different state of the Union, who were killed that night. The area is even now scattered with fragments of metal, mostly fused, one would suspect at very high temperature, into the volcanic breccias that form the rocky outcrop, such that it is impossible to tell where aluminium ends and the natural rock begins. The bodies of the crewmen were never found.
To the south of the summit, Moel yr Eglwys, Church Hill, lies an area of rare simplicity and beauty where a scatter of crystal-clear pools, encircled by rich, red bog grasses, lie amongst undulating crags and rocky tors. Westward, across the boggy col of Ceunant Coch, I climbed to the summit of Moel Llyfnant and was rewarded with a view across Coed-y-Brenin, the King's Forest, to the Rhinogydd, dark and silent like sleeping giants, beneath a blanket of cold-grey cloud.
To the north of Moel Llyfnant, on the descent towards Amnodd-bwll and Amnodd-wen, there are remains of shielings, or hafod in Welsh, buildings associated with the summer grazing of livestock, probably dating from the 18thCentury. Many are of considerable size and extent, belying the once active agricultural history of this barren landscape, populated now only by walkers, lone forestry workers and the occasional sheep.
In twenty-four hours I saw not one other person until I reached the sleepy hamlet of Arenig, from where I crossed Afon Tryweryn to reach again the A4212, where the cars and lorries race at foolish speed. Circling the lake I was reminded of the latest tale in these chronicles of fire and flood. In 1965, the construction of the reservoir of Llyn Celyn, built to provide water to the city of Liverpool via the river Dee, resulted in the flooding of Capel Celyn, a small village, which was a centre of welsh cultural activity. Local bitter feelings were exacerbated by the insensitivity of the authorities involved and the passing of the legislation for the reservoir in Parliament despite


text:
Central statue of the Leonidas monument at ThermopylaeA monument to Leonidas was erected at Thermopylae by king Paul of Greece
in 1955. It features a bronze statue of Leonidas. A sign, under the statue, reads simply: "ΜΟΛΩΝ ΛΑΒΕ
" ("Come and get them!") which the Spartans said when the Persians asked them to put down their weapons at the start of the Battle of Thermopylae.
Another statue, also with the inscription ΜΟΛΩΝ ΛΑΒΕ, was erected at Sparta
was the name of an Epic poem written by Richard Glover, which originally appeared in 1737. It went on to appear in four other editions, being expanded from 9 books to 12.Frank Miller
's 1998 comic book 300
, presents a fictionalized version of Leonidas and the Battle of Thermopylae, as does the 2007 feature film adapted from it
Helena P. Schrader has produced a three-part biographical novel on Leonidas. Leonidas of Sparta: A Boy of the Agoge
, Wheatmark, Tucson, 2010 ISBN 978-1-60494-474-7 Leonidas of Sparta: A Peerless Peer
, Wheatmark, Tucson, 2011, ISBN 978-1-60494-602-4
and "Leonidas of Sparta: A Heroic King" (scheduled for publication 2012).

source: HuggingFaceFW/fineweb-edu


text:
The Sand Dune Ecosystem Essay Sample
- Word count: 1241
- Category: ecosystem
A limited time offer!
Get a custom sample essay written according to your requirements urgent 3h delivery guaranteedOrder Now
The Sand Dune Ecosystem Essay Sample
Succession is the act or process of following in order or sequence. In sand dune area the succession is the processes that the area goes through in order to change from a sand dune area into a climax community, deciduous woodland, which takes place over hundreds of years.
As a sand dune forms the conditions are extremely harsh; strong wind, high pH and extremely dry conditions are found. These conditions are less than ideal for plant growth and means that plants need to be specially adapted in order for them to live there. The first nutrients enter the soil from rotting sea weed being washed up by a storm onto the dune. As the sea weed breaks down the first humus, dead organic matter, is placed into the soil. Nutrients are vital to plant growth in any area, they are especially important I sand dune areas due to the various other factors that make the area such a difficult place to grow.
There are four different dunes in a sand dune ecosystem that relate to the seres.
Each of the seres shows differences due to their development thorough the succession process, however is can be hard to tell where each of the seres start due to their proximity to each other. The different seres all have individual properties with different types of vegetation, amounts of vegetation, types of wildlife and edaphic factors.
The species that grow here are determined by the abiotic factors which include wind, nutrient content, soil pH, soil salinity, soil humus and water content in the soil. This will vary in the different seasons.
The climatic factors here will be very windy which means sands will be blown away and also fresh sand could be deposited. Also, a lot of water will come off from the sea so the conditions could be quite wet. Also, due to sea water being present it means that the nutrient will be very low. However, even though humus content is very low, if it breaks down it releases nutrients. Also, when it breaks down it lowers the pH as it releases acids. It will also bind the soil together as it holds onto water and acts like a sponge. It means that the soil is very poor as there is very little humus.
An edaphic factor is the pH of the soil. Due to sea shells being made of calcium carbonate it means that the soil will be very alkaline.
Soil particle size has a huge impact due to the fact that the sand particles are quite large so water drains quickly meaning that it will be very dry. It will quite loose and aerated.
The sea spray makes the conditions very salty meaning high salinity levels so the conditions in the small pile of sand are very hostile. This means it is very unfavourable to living organisms and few plants can grow here. The plants have to specially adapted in order for the embryo dune to be its habitat.
The topography of this dune shows that it is very small and isolated. It has raised areas of sand with flat bits in between and alternates between sand and vegetation.
The fore dunes are the second stage of the succession process and found on the leeward side.
The fore dunes have a much more stable environment than the embryo dune meaning that development can happen. The soil is held together much better in the fore dunes because of the amount of roots holding it together, and the increased amount of humus holding the particles. The humus brings added moisture to the dunes which enable plants which have not adapted quite as much to the dry conditions to be able to grow. The humus also allows more nutrients to be held in the soil, for uptake by the plants. These can be replaced much more easily due to the greater amounts of plants, which results in more plants dying to replace the lost nutrients.
The soil is deeper. This can cause leaching of the nutrients away from the plants. This means that the plants cannot develop as they should due to the greater competition found here. This means that there is competition.
The soil is much more stable as more roots are found holding it together due to the increased in denser vegetation coverage. The vegetation found starts to have to be less adapted to specific condition but still has to cope with quite harsh conditions. The pH is still very alkali due to the calcium carbonate found in the sea shells but the soil is made more acidic by the breakdown of plants.
The types of vegetation found on the fore dunes are sea couch, lyme grass, marram grass and variety of other grasses. Grass is adapted to the dry conditions by having leaves which are tightly rolled, protecting the stomata on the base of the leaf from loss of moisture. The leaf, once unrolled, can be seen to have a downy appearance which is the result of having fine hairs. These, and the grooves running lengthways along the leaf inside which the stomata are located, all help to reduce moisture loss through transpiration.
The yellow dunes are the third sere of the succession process. The vegetation is very dense.
A greater amount of humus is found in the soil in the yellow dunes as the amount of dead organic matter is always increasing. As more plants inhabit an area more plants die resulting in humus being replaced, back into the soil, to be absorbed by other vegetation.
The pH of the yellow dunes starts to become acidic at this stage due to the fact there are no sea shells as it is on the leeward side.
The plants found on the yellow dunes are known as xerophytes which includes plants such as marram grass. Some traits of xerophytes are;
* Thick waxy cuticle.
* Stomata closure.
* Increased water storage.
* Reduction in size of transpiration surface (lower leaf only).
* Leaves covered with silvery hairs (creates wind break & light reflective surface).
* Deep taproots or wide spreading fibrous roots near the soil surface.
* Low growth form (reduces H2O loss from wind).
The yellow dunes suffer from problems that can affect plant growth. Rapid deposition of sand, lack of water and lack of nutrients in the soil all attribute to the plants that can survive.
On the grey dunes the humus level is quite high. With the higher amount of humus the conditions are very friendly to plant growth. The vegetation can grow and develop easily without needed to be adapted very much.
There is a lot more shelter and less salt is carried by the wind. With these better conditions the number and range of plants increases covering, in places, the entire sand surface. There is a lot of competition due to the huge amounts of plants and species.
The plants do not need to be specialised. The pH is abit acidic. The conditions are not specific to any particular species; however the most commonly found species are mosses, lichens, annuals and perennials.


text:
- Girl Names
What does the baby name Taneya mean? Learn about what Taneya means, its history & origin, popularity in our random name database, pronunciation, similar names, nicknames & spelling variations.
Taneya - Name Meaning, Origin & Popularity
- Spelling of Taneya
- T-A-N-E-Y-A, is a 6-letter female given name.
- Meaning of Taneya
- Fairy queen.
- Origin of Taneya
- Russian Names
- Similar Names, Nicknames, & Spelling Variations of Taneya
- Popularity of Taneya
- Taneya currently has no likes. Be the first to like this name.


text:
An evaluation of CRM attitudes of Filipino pilots in four Philippine aviation companies
Gokongwei College of Engineering
International Journal of Aviation Psychology
This study evaluated the attitudes and perception of pilots in the Philippine aviation industry. The evaluation was made in terms of understanding crew resource management (CRM) concepts and adoption of CRM attitudes by the pilots. Eighty-eight pilots from different companies participated in this study. Results showed that attitudes of Filipino pilots strongly adhered to CRM principles. This may be attributed to strong management support for CRM practice and national culture. The Filipino culture of pakikisama and pakikibagay reinforced CRM teachings on teamwork and crew coordination. However, the large power gap in the Filipino culture seems to hinder open communication with superiors. The length of CRM training and its latency did not prove to be significant determinants of CRM-related attitudes. Copyright © 2007, Lawrence Erlbaum Associates, Inc.
Digitial Object Identifier (DOI)
Seva, R. R., Gutierrez, A. A., Duh, H. L., & Chong, J. (2007). An evaluation of CRM attitudes of Filipino pilots in four Philippine aviation companies. International Journal of Aviation Psychology, 17 (3), 285-298. _URL_
Human Resources Management | Industrial Engineering | Operations Research, Systems Engineering and Industrial Engineering
Air pilots--Philippines--Psychology; Aircraft industry—Philippines--Employees--Psychology; Corporate culture; Teams in the workplace


text:
- Collaborators : Isager ApS, Grontmij, MASU Planning
- City : Odense
- Country : Denmark
Located in the harbour of Odense, the house of the North Atlantic will embody a significant assembly point for the culture of Greenland, Iceland and Faroe Islands. The house is a hybrid of different functions and becomes a small North Atlantic village including exhibition spaces, design shop, restaurant, cultural administration, conference spaces as well as 25 student apartments.
The project derives from a deep understanding of the 3 North Atlantic countries' culture and identity. The building is designed as an assembly of 3 buildings standing on pillars in a concrete landscape. By connecting the exterior and interior - the landscape creates an open and inviting ground floor with various multi purpose spaces like restaurant, design shop, exhibition space etc. Through a narrative architectural expression and framework the house serves as a generator for the community of the North Atlantic countries.
The building has a strong reference to the wooden houses with saddle roofs from the Nordic countries, and the landscape refers to the three countries' rock formations and dramatic scenery. The building generates a universe where different functions are connected in a natural and creative way with a playful use of unique building materials. The materials used are black zinc, raw concrete, catfish skin and driftwood from the coasts of Iceland.


text:
COLOMBIA - Biocultural heritage valorization and resilience for sustainable territorial development
Expansión de Capacidades
Manizales - From the 27th of November and the 1st of December the training course "Biocultural Heritage valorization and resilience for sustainable territorial development" took place in the central campus of Caldas University in Manizales, Colombia. The event has been organised by the Internacional Training Centre of the Internacional Labour Organization (ITC/ILO), Caldas University and the Latinamerican Centre for Rural Development (Rimisp) through its Biocultural Diversity and Territories Working Group. Forty participants coming from 13 territories of 9 departments of the country and 6 different latinamerican countries (Bolivia, Chile, Costa Rica, Ecuador, México and Peru) attended the course, joining lectures offered by international and national experts and improving their knoledge through dialogue and exchange with a large number of people coming from different academic and professional backgrounds.
« Back to list


Configuring Siebel Business Applications > Configuring the Customer Dashboard > Options to Update the Customer Dashboard >
Configuring a Button to Update the Customer Dashboard
The Customer Dashboard includes application programming interfaces (APIs) to pull information from or push information to the Customer Dashboard through Siebel Visual Basic script or Siebel eScript script. Because the Customer Dashboard resides in a separate frame, it requires a user interface event to update customer dashboard fields. To generate a user event, you must add a button to an applet that uses a script to call the Update Dashboard command.
To configure a button to update the Customer Dashboard
 1. In Siebel Tools, in the Object Explorer, click Applet.
 2. In the Applets list, locate the applet you must modify.
 3. In the Object Explorer, expand the Applet tree, and then click Control.
 4. In the Controls list, add a button as an applet control and set properties using values from the following table.
 Target View Frame
 5. Define the script for the new button.
 Your script must do the following:
 6. Compile and test your changes.
 For more information, see Using Siebel Tools.
Updating the Customer Dashboard With Data from a Virtual Business Component
An update to the Customer Dashboard requires a row ID. However, a virtual business component uses a virtual row ID. Therefore, to display information from a virtual business component in the customer dashboard, you must script the UpdateDashboard function.
Customer Dashboard Allows Only One Update for Each User Interface Event
The Customer Dashboard allows only one user interface update for each user interface event. For example, if you add a button to a view, then one click of that button is one user interface event. For that event, Siebel CRM can execute only one user interface update, such as updating the Customer Dashboard. The code behind a single button cannot include two user interface updates, such as updating the Customer Dashboard, and then displaying a new view in the main frame of the Siebel application.


text:
FRAME INSPECTING AND MEASURING M/C
- Applied scale：frame, suspension frame, parts of frame is option( Buyer should extra order molds.)
- After measuring, monitor will display frame line diagram and center height value.
- Available to print out inspecting result and save data.
- After measuring diamond frame, it available display 9 point inspecting value.
- It available display spindle hole relative dimension and X&Y axis dimension of suspension frame.
- Available to measure leaning seat tube.
- Available display digital to second decimal place (0.01mm), output port link computer so could prompt got data.
- Max. measuring complete cycle size: 29"
- Available measuring head tube length, seat tube length, rear fork end width, center height of seat stay and chain stay.
- It can record measuring data of center height.
- B.B. shell barcode input by QR code scanner.
- Head tube mold X 2 sets
- Seat tube mold x 1set
- B.B. Shell mold x 1 set
- Angle square x 1 set
- Rear fork end gauge x 1 set
- Seat stay gauge x 1 set
- Chain stay gauge x 1set


NoCloud#
The data source NoCloud allows the user to provide user-data and meta-data to the instance without running a network service (or even without having a network at all).
You can provide meta-data and user-data to a local vm boot via files on a vfat or iso9660 filesystem. The filesystem volume label must be cidata or CIDATA.
Alternatively, you can provide meta-data via kernel command line or SMBIOS "serial number" option. The data must be passed in the form of a string:
ds=nocloud[;key=val;key=val]
or
ds=nocloud-net[;key=val;key=val]
The permitted keys are:
 - h or local-hostname
 - i or instance-id
 - s or seedfrom
With ds=nocloud, the seedfrom value must start with / or file://. With ds=nocloud-net, the seedfrom value must start with http:// or https://.
e.g. you can pass this option to QEMU:
-smbios type=1,serial=ds=nocloud-net;s=http://10.10.0.1:8000/
to cause NoCloud to fetch the full meta-data from http://10.10.0.1:8000/meta-data after the network initialization is complete.
These user-data and meta-data files are expected to be in the following format.
/user-data
/meta-data
Both files are required to be present for it to be considered a valid seed ISO.
Basically, user-data is simply user-data and meta-data is a YAML formatted file representing what you'd find in the EC2 metadata service.
You may also optionally provide a vendor-data file in the following format.
/vendor-data
Given a disk ubuntu cloud image in 'disk.img', you can create a sufficient disk by following the example below.
## 1) create user-data and meta-data files that will be used
## to modify image on first boot
$ echo -e "instance-id: iid-local01\nlocal-hostname: cloudimg" > meta-data
$ echo -e "#cloud-config\npassword: passw0rd\nchpasswd: { expire: False }\nssh_pwauth: True\n" > user-data
## 2a) create a disk to attach with some user-data and meta-data
$ genisoimage -output seed.iso -volid cidata -joliet -rock user-data meta-data
## 2b) alternatively, create a vfat filesystem with same files
## $ truncate --size 2M seed.iso
## $ mkfs.vfat -n cidata seed.iso
## 2b) option 1: mount and copy files
## $ sudo mount -t vfat seed.iso /mnt
## $ sudo cp user-data meta-data /mnt
## $ sudo umount /mnt
## 2b) option 2: the mtools package provides mcopy, which can access vfat
## filesystems without mounting them
## $ mcopy -oi seed.iso user-data meta-data
## 3) create a new qcow image to boot, backed by your original image
$ qemu-img create -f qcow2 -b disk.img -F qcow2 boot-disk.img
## 4) boot the image and login as 'ubuntu' with password 'passw0rd'
## note, passw0rd was set as password through the user-data above,
## there is no password set on these images.
$ kvm -m 256 \
 -net nic -net user,hostfwd=tcp::2222-:22 \
 -drive file=boot-disk.img,if=virtio \
 -drive driver=raw,file=seed.iso,if=virtio
Note: that the instance-id provided (iid-local01 above) is what is used to determine if this is "first boot". So if you are making updates to user-data you will also have to change that, or start the disk fresh.
Also, you can inject an /etc/network/interfaces file by providing the content for that file in the network-interfaces field of metadata.
Example metadata:
instance-id: iid-abcdefg
network-interfaces: |
 iface eth0 inet static
 address 192.168.1.10
 network 192.168.1.0
 netmask 255.255.255.0
 broadcast 192.168.1.255
 gateway 192.168.1.254
hostname: myhost
Network configuration can also be provided to cloud-init in either Networking Config Version 1 or Networking Config Version 2 by providing that YAML formatted data in a file named network-config. If found, this file will override a network-interfaces file.
See an example below. Note specifically that this file does not have a top level network key as it is already assumed to be network configuration based on the filename.
version: 1
config:
 - type: physical
 name: interface0
 mac_address: "52:54:00:12:34:00"
 subnets:
 - type: static
 address: 192.168.1.10
 netmask: 255.255.255.0
 gateway: 192.168.1.254
version: 2
ethernets:
 interface0:
 match:
 macaddress: "52:54:00:12:34:00"
 set-name: interface0
 addresses:
 - 192.168.1.10/255.255.255.0
 gateway4: 192.168.1.254


DevTools Tips
Emulate color schemes
Categories: Supported by:
In CSS, you can use the prefers-color-scheme media feature (docs) to detect if the user prefers using a light or a dark theme in their operating system. This is useful to style your website in a way that better blends with the rest of the operating system and respects the user's preference.
However, it can be a pain to test since you have to go in the operating system's settings and change the theme there. This can be slow and you might not actually want to change your entire theme just to test a website.
DevTools to the rescue! With DevTools, you can emulate a different color scheme just for the inspected page. All browsers support it, but it's slightly different in each one of them.
 - In Firefox:
 1. Open the Inspector tool.
 2. In the toolbar of the Rules sidebar tab, use the light and dark color scheme buttons.
 Firefox, with DevTools open, showing the Inspector tool, with the color scheme buttons
 - In Edge or Chrome:
 1. Open the Elements tool.
 2. In the toolbar of the Styles pane, open the Toggle common rendering emulations menu (it looks like a paint brush).
 3. Choose one of the prefers-color-scheme options.
 Edge, with DevTools open, showing the Elements tool, with the emulation button and color-scheme dropdown menu
 - In Safari:
 1. Open the Elements tool.
 2. In the toolbar of the tool, click the emulation button and choose a color scheme.
 Safari, with WebInspector open, showing the Elements tool, with the emulation button and dropdown menu
 - In Polypane:
 1. Next to the pane you want to change, click the emulation icon in the pane header.
 2. Click the Media tab.
 3. Choose a scheme in the prefers-color-scheme toggle.
 Polypane's emulation pane, with the Media tab, showing the prefers-color-scheme toggle


frankdenneman Frank Denneman is a Chief Technologist at VMware, primarily focusing on Machine Learning technology. He is an author of the vSphere host and clustering deep dive series, podcast host for the Unexplored Territory podcast, and you can follow him on Twitter @frankdenneman.
Calculating the bandwidth usage and duration of a vMotion process?
2 min read
Every once in a while I get the question if I have a calculator that can determine the lead-time and the bandwidth consumption of a vMotion process. Unfortunately I haven't got such a calculator, as there isn't an easy way to calculate the consumed bandwidth and the duration of a vMotion process.
CPU
vMotion tries to move the used memory blocks as fast as possible. vMotion uses all the available bandwidth depending on the available CPU speed and bandwidth. Depending on the detected line speed, vMotion reserves an X amount of CPU speed at the start of a vMotion process. vMotion computes its desired host vMotion CPU reservation. For every 1GBe vMotion link speed it detects vMotion in vSphere 5.1 reserved 10% of a CPU core with a minimum desired CPU reservation of 30%. This means that if you use a single 1GBe, vMotion reserves 30% of a core, if you use 4 x 1GBe connections, that means vMotion reserves 40% of a core. A 10GBe link is special as vMotion reserves 100% of a single core.
vMotion creates a (system) resource pool and sets the appropriate CPU reservation on the resource pool. It's important to note that this is being done to the vMotion resource pool, which means that the reservation is shared across all vMotions happening on the host.
vMotion system Resource Pool
Warning: DO NOT CHANGE the default settings of the system vMotion resource pool. This is set dynamically by the kernel depending on its memory state, manually adjusting this setting will likely hurt performance. Please do not attempt to be smarter then the kernel, many have tried, very few have succeeded.
DRS
When DRS is enabled, it can decide to migrate virtual machines as well. It might happen that this occurs at the same time your vMotion process is running. All vMotions will be placed into the vMotion resource pool contesting for the resources acquired by the resource pool of vMotion. If high priority for the manual vMotion is selected (User interface uses the term: Reserve CPU for optimal vMotion performance) then the vMotion process receives a higher priority within the vMotion resource pool. In which case the high priority vMotion will have double the relative CPU shares, and as a result probably complete more quickly than their lower priority counterparts. However it still need to share the resources claimed by the vMotion resource pool. Although it has a higher priority over DRS vMotions, sharing resources still may have an effect on the duration of the vMotion process.
Memory
vMotion copies only the used memory blocks, a virtual machine doesn't always have to use all of its memory. Therefor its not easy to determine the required bandwidth. To make it more complex, as we are migrating a live virtual machine, the virtual machine can dirty (re-use) memory blocks that are already copied over, those blocks have to be sent again. Prolonging the duration of the process and the used bandwidth.
Swap file
If the swap file is located on a non-shared datastore and pages has been stored in the swap file, those pages are copied over to the new swap file on a location accessible by the destination host. This will increase the demand for bandwidth and increases the duration of the vMotion process. For more information about the impact of non-shared swap files, please read the following articles: (Alternative) VM swap file locations Q&A and (Alternative) VM swap file locations Q&A – part 2.
Conclusion
As you can see, it's very difficult to determine the duration of a vMotion process and the actual bandwidth it consumes.
frankdenneman Frank Denneman is a Chief Technologist at VMware, primarily focusing on Machine Learning technology. He is an author of the vSphere host and clustering deep dive series, podcast host for the Unexplored Territory podcast, and you can follow him on Twitter @frankdenneman.
Help Us Make vMotion Even Better
The vMotion product team is looking for input on how to improve vMotion. vMotion has proven to be a paradigm shift of datacenter management....
frankdenneman
21 sec read
Disable vMotion for a single VM
This question pops up regularly on the VMTN forums and reddit. It's a viable question but the admins who request this feature usually don't...
frankdenneman
1 min read
vSphere 5.1 update 1 release fixes Storage vMotion rename…
vSphere 5.1 update 1 is released today which contains several updates and bug fixes for both ESXi and vCenter Server 5.1. This release contains...
frankdenneman
29 sec read


text:
Population Builder will be closing on the 30th of April 2023. Thank you for using the website.
Welcome to Population Builder, a web-app that lets you build a population estimate for a set of small areas in Great Britain. The estimates are for the population in mid-2020.
1. The boundaries appear automatically when the map is zoomed in.
2. Click or tap the areas of interest: the estimated population is shown in the top right.
3. Click or tap "Get data" to see the age-distribution.
4. Turn the boundaries on and off manually using the boundary control in the bottom right.
Don't show this introduction next time.


Test definitions
If you make a configuration change, Swarm will not use it until the configuration cache has been reloaded, this forces Swarm to use the new configuration. You must be an admin or super user to reload the Swarm config cache. Navigate to the User id dropdown menu, select System Information, click the Cache Info tab, and click the Reload Configuration button.
The project_and_branch_separator configurable character is only applied to tests created from the Tests menu, see Tests.
Specifies the character used to separate the {projects} and {branches} IDs in the URL that is passed to your CI system. Some CI systems, such as Jenkins, escape the default colon : character resulting in a failed test request. If your CI system needs a different separator character, the project_and_branch_separator character can be changed to a character that you CI system will accept, for example a dash - or an underscore _.
Be careful when selecting your separator character, some characters can cause issues when calling tests. For example, a # character in a URL call means the branch is treated as an anchor and a % character in a JSON body encoding is escaped. Both of these will result in a failed test request.
Configure the project_and_branch_separator character with the following configuration block in the SWARM_ROOT/data/config.php file:
 'test_definitions' => array(
'project_and_branch_separator' => ':',
The default value for the project_and_branch_separator configurable is a colon :.


text:
Introduction to Log Sequence Numbers
Every record in the SQL Server transaction log is uniquely identified by a log sequence number (LSN). LSNs are ordered such that if LSN2 is greater than LSN1, the change described by the log record referred to by LSN2 occurred after the change described by the log record LSN.
The LSN of a log record at which a significant event occurred can be useful for constructing correct restore sequences. Because LSNs are ordered, they can be compared for equality and inequality (that is, <, >, =, <=, >=). Such comparisons are useful when constructing restore sequences.
LSNs are values of data type numeric(25,0). Arithmetic operations (for example, addition or subtraction) are not meaningful and must not be used with LSNs.
LSNs are used internally during a RESTORE sequence to track the point in time to which data has been restored. When a backup is restored, the data is restored to the LSN corresponding to the point in time at which the backup was taken. Differential and log backups advance the restored database to a later time, which corresponds to a higher LSN.


text:
U.S. Department of Justice: Supporting Male Survivors of ViolenceDeadline: June 17, 2015
The Office for Victims of Crime (OVC) seeks innovative proposals that will create equal access to both system and community-based service providers for male survivors of violence, particularly boys and young men of color, to catalyze a national commitment to better serve these individuals. OVC is particularly interested in proposals that seek to strengthen victim service providers' knowledge and skills, resulting in innovative programs and practices that foster a better understanding among criminal and juvenile justice systems and guide service providers around the needs and rights of these boys and young men. OVC seeks applications that address one of the two purpose areas identified below:
- Purpose Area 1, Demonstration Projects: This solicitation will fund demonstration sites that put in place evidence-based models and practices to provide trauma-informed, comprehensive services for male survivors of violence, particularly boys and young men of color, and their families and supporting policies.
- Purpose Area 2, Technical Assistance Providers: This solicitation will be used to select up to two distinct technical assistance (TA) providers to support the demonstration sites in the following categories: (A) Comprehensive TA: To deliver comprehensive information, training, and technical assistance to support the demonstrations sites, including subject matter expertise, training on identified topics, and peer-to-peer learning exchanges; and (B) Communications TA: To assist the demonstration sites with outreach efforts aimed at educating stakeholders and the broader community on the adverse effects of trauma and violence as well as the importance for community and system-based services to communicate and develop consistent policies, procedures and messaging to enhance efforts to reach and identify victims and survivors.
Eligibility: Varies by purpose area:
- Purpose Area 1: Eligible applicants for the demonstration project are limited to: state and local
agencies; federally recognized tribal governments (as determined by the Secretary of the Interior; private nonprofit organizations (including tribal nonprofit organizations); faith-based and community-based organizations; and colleges or universities (including tribal institutions of higher education) that demonstrate an understanding of the area of victimization and support services described in the solicitation.
- Purpose Area 2: Eligible applicants for funding to provide technical assistance to the demonstration projects are private nonprofit organizations, colleges and universities or public agencies (including tribal nonprofit organizations and tribal institutions of higher learning).
Amount: Varies by purpose area:
- Purpose Area 1: 8-12 awards of up to $1,000,000 each for a 36 month project period.
- Purpose Area 2: Up to 2 awards of up to $1,000,000 each for a 36 month project period.


text:
Hau'ula Community Resilience Model Village
|Project Site:||Hau'ula Community Resilience Model Village|
|Submitted By:||University of Hawai'i at Mānoa, Pacific Business Center Program|
|Contact:||Failautusi Avegalio, Director, _PHONE_|
The Hau'ula Community Resilience Model Village is a modular, scalable model that employs waste conversion in a unique process to produce high income commercial carbon, soil amendments for agriculture and food production, fuel, atmospherically harvested water and carbon credits. It is designed for island communities and integrated in their current economic development picture especially in the event of disaster.


text:
have some tweaking to do in the next section.)
For the Xylotex, the setup and hold times are very short, 200nS each (0.2uS). The longest time is the 2uS high time. If you have 11uS latency, then you can set the BASE_PERIOD as low as 11+2=13uS. Getting rid of the long 20uS hold time really helps! With a period of 13uS, a complete step takes 2x13 = 26uS, and the maximum step rate is 38,461 steps per second!
But you can't start celebrating yet. Note that 13uS is a very short period. If you try to run the step generator every 13uS, there might not be enough time left to run anything else, and your computer will lock up. If you are aiming for periods of less than 25uS, you should start at 25uS or more, run LinuxCNC, and see how things respond. If all is well, you can gradually decrease the period. If the mouse pointer starts getting sluggish, and everything else on the PC slows down, your period is a little too short. Go back to the previous value that let the computer run smoothly.
In this case, sppose you started at 25uS, trying to get to 13uS, but you find that around 16uS is the limit - any less and the computer doesn't respond very well. So you use 16uS. With a 16uS period and 11uS latency, the shortest output time will be 16-11 = 5uS. The drive only needs 2uS, so you have some margin. Margin is good - you don't want to lose steps because you cut the timing too close.
What is the maximum step rate? Remember, two periods to make a step. You settled on 16uS for the period, so a step takes 32uS. That works out to a not bad 31,250 steps per second.
In the last section, we got the Xylotex drive to a 16uS period and a 31,250 step per second maximum speed. But the Gecko was stuck at 31uS and a not-so-nice 16,129 steps per second. The Xylotex example is as good as we can make it. But the Gecko can be improved.
The problem with the G202 is the 20uS hold time requirement. That plus the 11uS latency is what forces us to use a slow 31uS period. But the LinuxCNC software step generator has some parameters that let you increase the various time from one period to several. For example, if steplen is changed from 1 to 2, then it there will be two periods between the beginning and end of the step pulse. Likewise, if dirhold is changed from 1 to 3, there will be at least three periods between the step pulse and a change of the direction pin.
If we can use dirhold to meet the 20uS hold time requirement, then the next longest time is the 4.5uS high time. Add the 11uS latency to the 4.5uS high time, and you get a minimum period of 15.5uS. When you try 15.5uS, you find that the computer is sluggish, so you settle on 16uS. If we leave dirhold at 1 (the default), then the minimum time between step and direction is the 16uS period minus the 11uS latency = 5uS, which is not enough. We need another 15uS. Since the period is 16uS, we need one more period. So we change dirhold from 1 to 2. Now the minimum time from the end of the step pulse to the changing direction pin is 5+16=21uS, and we don't have to worry about the Gecko stepping the wrong direction because of latency.
If the computer has a latency of 11uS, then a combination of a 16uS base period, and a dirhold value of 2 ensures that we will always meet the timing requirements of the Gecko. For normal stepping (no direction change), the increased dirhold value has no effect. It takes two periods totalling 32uS to make each step, and we have the same 31,250 step per second rate that we got with the Xylotex.
The 11uS latency number used in this example is very good. If you work through these examples with larger latency, like 20 or 25uS, the top step rate for both the Xylotex and the Gecko will be lower. But the same formulas apply for calculating the optimum BASE_PERIOD, and for tweaking dirhold or other step generator parameters.
For a fast AND reliable software based stepper system, you cannot just guess at periods and other configuration paremeters. You need to make measurements on your computer, and do the math to ensure that your drives get the signals they need.
To make the math easier, I've created an Open Office spreadsheet (_URL_ You enter your latency test result and your stepper drive timing requirements and the spreadsheet calculates the optimum BASE_PERIOD. Next, you test the period to make sure it won't slow down or lock up your PC. Finally, you enter the actual period, and the spreadsheet will tell you the stepgen parameter settings that are needed to meet your drive's timing requirements. It also calculates the maximum step rate that you will be able to generate.
I've added a few things to the spreadsheet to calculate max speed and stepper electrical calculations. (_URL_
Other stepper info:


text:
Jordan suffers summer of water shortages
Jun 28 2021
Jordanians face the country's worse water shortage in almost a decade due to the combined effect of weak rainfall and water overuse during COVID-19 lockdowns.
The arid country had only 60 per cent of the rainfall it usually gets between October 2020 and May 2021, leaving its four dams only 45 per cent full, official figures show.
At the same time, the ongoing COVID-19 pandemic raised demand for water by between 10 and 40 per cent, amid lockdowns and increased handwashing, a report by the Economic and Social Council of Jordan says.
Jordan's Minister of Water and Irrigation, Muhammad Al-Najjar, blames the mismanagement of water resources in 2020 for the critical situation.
"The kingdom witnessed an excellent rainy season [last year], and a number of dams reached their full storage capacity, but we mishandled what was stored, and we did not anticipate the possibility that the year 2021 would be dry.
"In fact, we wasted water by providing farmers with large additional quantities of irrigation, above their approved quota."
The ministry urged citizens to cut down their water consumption. But many residents have had enough of the strain on resources and disruption to water supplies. Fadi Abu Qura, who lives in the Tla' Al-Ali suburb of the capital, Amman, told SciDev.Net: "We always live in a water crisis, and I don't know where all the rains go.
"We haven't received sufficient quantities of water since last February, and we no longer know what day the water will come."
Fadi Abu Qura, Amman resident


i,name in enumerate(book.sheet_names()) if name == sheet_name]
## check if index[0] has a value, otherwise sheet_name couldn't be found
 sh = book.sheet_by_index(index[0])
except IndexError, Ierr:
 print str(Ierr), 'No sheet named', sheet_name, '!'
db = {}
## get the cellvalues from the second row, these are the (shape-) field names
header = [sh.cell_value(1,i) for i in range(sh.ncols)]
for head in header:
 ## the values gonna be stored in simple lists
 db[head] = []
## loop through all the cells, starting at row three
for c in range(sh.ncols):
 for r in range(2,sh.nrows):
## re-arrange the data: data to put is a list of list and col is a list of the fieldnames
data_to_put, col = zip(*[(db[k],k) for k in db.iterkeys()])
## get a sql statement based on the identifier HYDRO_CODE to select only those rows from the shape
## write the data to the shapefile
update_fields(shape, sql, col, data_to_put)
share|improve this answer
add comment
Your Answer


text:
Most figures are made from the same types of plastics so the following also applies to other dolls such as other types of action figures and Barbie dolls.
Bodyparts made from ABS are not likely to pick up stains as long as the surface of the ABS plastic is undamaged. If ABS is scratched or sanded it will pick up dye from clothing as can be seen on the next picture. The seams on the legs shown on the picture had been sanded smooth, within a years time the sanded areas had picked up dye from black pantyhose.
The stains are only on the surface of the ABS, so these can be removed with some more careful sanding. To prevent sanded ABS from picking up stains it needs to be sealed with a coat of solvent or paint. 'Car Bumper Primer' is a clear colorless paint often sold in spray cans that is suitable for this. ABS parts can also be sealed with a thin coat of liquid plastic cement or a suitable clear varnish (preferably one that is UV resistant).
Soft PVC parts such as headsculpts and hands do pick up stains when put into contact with sources of dyes such as fabrics or PVC clothing. As a rule of thumb: the more flexible the PVC part is, the easier it will pick up stains.
Two main sources of stains are dyes from clothing and pigments from incompatible paints.
|To deal with the stain, first remove the source of the dye.
In case of contact between a piece of clothing and a part of the figure, putting a piece of clear polythene or saran wrap ('cling film') between the clothing and the figure is usually sufficient.
If the stained part is very flexible (a headsculpt for instance) time might be the best cure to get rid of the stain as the following sets of pictures illustrate:
|Using a piece of clear polythene to protect this head from getting stained by the black pleather collar.|
|ZC Eve bodice out of softened PVC with multiple stains from factory clothing|
|Same bodice four years later, only some faint purple stains remain visible|
The plasticisers that cause the material to be flexible also make it easy for dye molecules to migrate through the material.
The dye molecules strive to spread evenly throughout the material, resulting over time in an even color.
In case of a ZC Eve bodice, the PVC is softened but not by as much as a headsculpt so it will take longer for the dye molecules to spread.
Although I'm not keen on using chemicals on plastics, persistent stains can be removed with substances containing small amounts of peroxide such as zit-creams or Remove-zit.
Main drawback is that peroxides will alter the composition of the plastic (it breaks down plasticizers and long molecule chains), making it change color (often more pale) and leaving the plastic more prone to cracking.
PVC hand with stain caused by sleeve cuff, the PVC of the hand is not as soft so dye molecules will not migrate as fast as with softer PVC.
Left on its own a stain on material like this will remain visible for years, to remove it a chemical substance such as a zit-cream is needed.
Note that this particular hand is coated with flat varnish, the varnish will be damaged by the zit-cream as well !
Pleather consists of a very thin layer of PVC applied to a woven fabric material (often polyester).
If there are any metal objects close to deteriorating PVC these will become corroded by the acidic vapours, often even before the PVC starts looking deteriorated.
|Example of corroded brass details caused by acidic vapours of pleather deteriorating. In this case the figure was kept in the box for too long.|
The metal can be carefully polished, further deterioration of the pleather can be slowed down with proper ventilation.
Since pleather contains plasticizers, it needs to be kept away from painted surfaces and types of plastics that are sensitive to plasticizers.
I made this mistake myself by leaving Patty, dressed in black pleather pants, sitting on the seat of a motorbike model for some time. The seat was made out of polystyrene, which is sensitive to plasticizers. The plasticizers from the pleather melted the surface of the seat, now the pleather is firmly stuck to the seat.
Apart from transferring plasticizers, pleather can also transfer dye to other plastics, for example black pleather clothes will stain a pleather covered couch.
So better keep contact between pleather and plastics like polystyrene or softened PVC limited to a few hours.
Putting a piece of saran wrap ('cling film') between the pleather and the other plastics will stop the transfer of dye and plasticizers.
Pleather can also pick up dye from other sources such as clothing, the boots on the picture got stained by dye from the black pantyhose inside. This also can be prevented by wrapping the pantyhose inside the boots in saran wrap.
A lot of the knowledge of preserving plastics and insight in how plastics behave when deteriorating comes from this book:
"Plastics, collecting and conserving", Anita Quye and Colin Williamson, NMS Publishing Ltd., ISBN 1-901663-12-4.


Skip to main content
Automatically generates the cross-references for biographies.
Project description
mathshistory-xrefs
Automatically generates the cross-references for biographies.
On each biography, we want to show a list of the other pages on the site that link to that biography. Currently, we are showing cross-references from the following sections:
 - history topics
 - famous curves
 - honours
 - projects
 - societies
 - 'page's
This plugin is a rather big hack. We can't have each biography depending on every other page in the site, because this would reduce the build time of them to a crawl due to Lektor's slow dependency management.
Instead, what we do is have our own database of crossreferences. At the start of each build, we go through all the changed pages of the type above, seeing if the references to biographies has changed (been added to or removed from), and if they have, then it adds the changed biographies to a list of ones that need to be rebuilt.
Then, using the before-build event, it checks if the record is a biography in the list of ones that needs to be rebuilt, and if it is, it marks it as dirty so that the lektor build system will build it.
Using this same event, it then injects the cross-references into that record, so it is available to the template. We do sort it, so it doesn't keep changing on every build.
Then lastly, using the after-build, we check if the build was successful, and if it was, we update the sqlite3 database so that it is kept up to date with the cross references. We don't do this if the build fails, because we want the db to keep in sync with the working site, not any errors.
We have the special pad_get function here, because we need to be able to get records without adding them as dependencies.
Project details
Release history Release notifications
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Files for lektor-mathshistory-xrefs, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size lektor_mathshistory_xrefs-0.1.0-py3-none-any.whl (5.6 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size lektor-mathshistory-xrefs-0.1.0.tar.gz (5.0 kB) File type Source Python version None Upload date Hashes View hashes
Supported by
Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page


text: When the prestressed concrete pipe piles with hybrid reinforcement (PRC pipe pile) are used as the supporting piles of foundation pits, in order to improve the utilization efficiency of non-prestressed reinforcement, it is proposed to use the pipe pile with non-prestressed reinforcement in the section as the supporting piles. Through the statistical analysis of the moment distribution of the supporting piles in 80 foundation pit projects in Tianjin, the full-scale bending tests and finite element analyses of the prestressed high-strength concrete pipe piles with partial hybrid reinforcement (PR-PHC pipe piles), the feasibility of the sectional reinforcement and the bending resistance of the PR-PHC pipe piles are studied. The research results show that the interval distribution of the bending moment of the pile shaft of single support row piles, inclined piles and cantilever piles has regularity. The non-prestressed reinforcement configured in the section of PR-PHC pipe piles can improve its ultimate bending bearing capacity and bending stiffness, and effectively improve the spread of pile cracks. The proposed numerical model can better reflect the actual situation of the tests. In addition, the adverse working conditions that may be encountered in the practical application of PR-PHC pipe piles are analyzed. It is proved that the PR-PHC pipe piles can be used to replace the PRC ones in foundation pit engineering, which reduces the use of reinforcement and promotes the carbon emission reduction.


Grokbase Groups Pig user March 2009
Thanks for the response... unfortunately the output I get is:
(, 1, 1)
(w, 1, 1)
(x, 3, 3) <--- $2 should be a '2' not a '3'.
(y, 1, 1)
(z, 1, 1)
Desired results:
x,3,2 <--- $2 should be a '2' and not a '3' because the values for 'x' are (a,b,b) and so there are only 2 distinct values.
I was able to get the output of (x,3,3) via another way
A = load 'test.csv' using PigStorage(',') as (a1,a2,a3);
B = group A by $0;
C = distinct B;
D = foreach C generate group, COUNT(A.a2), COUNT(A.a3);
...but to make it work as a distinct count I would like to achieve (x,3,2) not (x,3,3).
Would I need to write a UDF called COUNT_DISTINCT based mostly on the COUNT function? If so how?
Would replacing...
public void exec(Tuple input, DataAtom output) throws IOException {
output.setValue(count(input)); <--- I suppose this should return a count of hash keys or something???
} sufficient?
Thanks in advance,
-----Original Message-----
From: Alan Gates
Sent: Wednesday, March 18, 2009 2:56 PM
Subject: Re: count distinct using pig?
B = group A by $0;
C = foreach B {
D1 = A.a2;
D2 = distinct D1;
E1 = A.a3;
E2 = distinct D2;
generate group, COUNT(D2), COUNT(E2);
store C into 'output';
On Mar 18, 2009, at 1:43 PM, Avram Aelony wrote:
Hello Pig list,
several categorical variables a1-a3 and am seeking to compute
distinct counts of fields a2 and a3 by field a1.
How can I get distinct counts?
For example:
dump A;
(x, X, a)
(y, Y, b)
(x, XX, b)
(z, Z, c)
(w, X, )
(, W, d)
(x,, b)
B = group A by $0;
dump B;
(, {(, W, d)})
(w, {(w, X, )})
(x, {(x, X, a), (x, XX, b), (x,, b)})
(y, {(y, Y, b)})
(z, {(z, Z, c)})
# how do I get distinct counts by $0??
_TAG_ output:
Many thanks,
Search Discussions
Discussion Posts
Follow ups
Related Discussions
Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 5 | next ›
Discussion Overview
groupuser @
categoriespig, hadoop
postedMar 18, '09 at 8:44p
activeMar 18, '09 at 11:30p
site design / logo © 2021 Grokbase


text:
Definitions of puddle:
- noun: a mixture of wet clay and sand that can be used to line a pond and that is impervious to water when dry
- noun: something resembling a pool of liquid
Example: "His chair sat in a puddle of books and magazines"
- noun: a small body of standing water (rainwater) or other liquid
Example: "There were puddles of muddy water in the road after the rain"
- verb: make a puddle by splashing water
- verb: mess around, as in a liquid or paste
- verb: work a wet mixture, such as concrete or mud
- verb: dip into mud before planting
Example: "Puddle young plants"
- verb: subject to puddling or form by puddling
Example: "Puddle iron"
- verb: wade or dabble in a puddle
Example: "The ducks and geese puddled in the backyard"
- verb: make into a puddle
Example: "Puddled mire"
- verb: mix up or confuse
- verb: eliminate urine
Search for puddle at other dictionaries: OneLook, Oxford, American Heritage, Merriam-Webster
Copyright © 2015 Datamuse


text:
The ability to adapt is critical to survival and varies between individuals. Adaptation of one motor system may be related to the ability to adapt another. This study sought to determine whether phoria adaptation was correlated with the ability to modify the dynamics of disparity vergence. Eye movements from ten subjects were recorded during dynamic disparity vergence modification and phoria adaptation experiments. Two different convergent stimuli were presented during the dynamic vergence modification experiment: a test stimulus (4° step) and a conditioning stimulus (4° double step). Dynamic disparity vergence responses were quantified by measuring the peak velocity (°/s). Phoria adaptation experiments measured the changes in phoria over a 5-min period of sustained fixation. The maximum velocity of phoria adaptation was determined from an exponential fit of the phoria data points. Phoria and dynamic disparity vergence peak velocity were both significantly modified (P < 0.001). The maximum velocity of phoria adaptation was significantly correlated with the changes in convergence peak velocity (r > 0.89; P < 0.001). There was a strong correlation between the ability to adaptively adjust two different oculomotor parameters: a tonic and dynamic component. Future studies should investigate additional interactions between these parameters, and the ability to adaptively change other oculomotor systems such as the saccadic or smooth pursuit system. Understanding the ability to modify phoria, dynamic disparity vergence, and other oculomotor parameters can yield insights into the plasticity of short-term adaptation mechanisms.
All Science Journal Classification (ASJC) codes
- Oculomotor adaptation
- Phoria adaptation
- Vergence adaptation


-q+1)$.
Proof:
$(k = r+1) \wedge (k = p+j+i-2) \implies r+1=p+j+i-2$
The system of equations
$$r+1=p+j+i-2$$
$$i \leq q-p+2$$
$$j \leq r-q+1$$
has only one solution for $(i,j)$: $i = q-p+2$ and $j = r-q+1$. If there was another solution for $(i,j)$, then $p+j+i-2 \lt r+1$, which contradicts $r+1=p+j+i-2$.
The above makes proving $Inv \wedge \lnot B \implies Post$ much easier:
$Inv \wedge (k=r+1) \implies Inv \wedge (k=r+1) \wedge (i=q-p+2) \wedge (j=r-q+1) \implies Post$
Merge's proof of terminality
By the invariant we know that $k \leq r + 1$. Also, we know that the exit condition of the loop is $k = r + 1$. Since the $k$ variable is always incremented by one on each iteration, we can be sure that $k$ will eventually reach $r + 1$, causing the loop to exit. This can be reflected via the following bound function:
$\tau(k) = r + 1 - k$
We can verify that $\tau(k)$ holds the following properties:
 - $Inv \wedge B \implies \tau(k) \gt 0$
Proof: $Inv \wedge B \implies B \implies k \leq r \implies r - k \geq 0 \implies r + 1 - k \gt 0$
 - $\tau(k) = V \implies \tau(k + 1) \lt V$
Proof: $\tau(k + 1) = r - k = \tau(k) - 1 = V - 1 \lt V$
The first property ensures that when $\tau(k)$ reaches a value less than or equal to $0$, the loop will exit.
The second property ensures that $\tau(k)$ decreases strictly upon each iteration.
Therefore, the loop will always halt.
$\endgroup$
Your Answer
By clicking "Post Your Answer", you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.


analytic spectrum
The concept of analytic spectrum is a realization of the concept of spectrum (geometry) in the context of non-archimedean analytic geometry. Given an affinoid algebra AA over a non-archimedean field, then the concept of spectrum of a commutative ring whose points are prime ideals/maximal ideals does not produce a sensible space that admits analytic geometry. Rather, instead of regarding points of the spectrum as ring homomorphisms to AA \to \mathbb{R}, the analytic spectrum instead takes points to be multiplicative seminorms ||:A 0{\vert -\vert} \colon A \to \mathbb{R}_{\geq 0} bounded by the norm on the given field.
If Spec an(A)Spec_{an}(A) is the set of all such multiplicative seminorms, then for xSpec an(A)x \in Spec_{an}(A) a point one writes the corresponding seminorm as || x{\vert - \vert}_x and thinks of it as being the norm on the function algebra on Spec(A)Spec(A) which is given by "evaluating functions at xx and then applying the field norm to that".
One turns this Spec an(A)Spec_{an}(A) into a topological space in the usual way by choosing the weakest topology such that under this assignment the original elements of AA become continuous function on Spec an(A)Spec_{an}(A).
Globalizing this analytic spectrum construction leads to the concept of Berkovich analytic space.
For AA a normed ring, its analytic spectrum or Berkovich spectrum Spec anASpec_an A is the set of all non-zero multiplicative seminorms on AA, regarded as a topological space when equipped with the weakest topology such that all functions
Spec anA + Spec_{an} A \to \mathbb{R}_+
of the form
x|x(a)| x \mapsto {\vert x(a)\vert}
for aAa \in A are continuous.
If AA is equipped with the structure of a Banach ring, one takes the bounded multiplicative seminorms.
So a point in the analytic spectrum of AA corresponds to a non-zero function
:A {\Vert -\Vert} : A \to \mathbb{R}
to the real numbers, such that for all x,yAx, y \in A
 1. x0{\Vert x \Vert} \geq 0;
 2. xy=xy{\Vert x y \Vert} = {\Vert x \Vert} {\Vert y \Vert};
 3. x+yx+y{\Vert x + y \Vert} \leq {\Vert x \Vert} + {\Vert y \Vert}
and boundedness means that there exists C>0C \gt 0 such that for all xAx \in A
xC|x| A. {\Vert x\Vert} \leq C {\vert x \vert}_A \,.
(e.g. Berkovich 09, def. 1.2.3)
Affine line
For kk a field and k[T]k[T] the polynomial ring over kk in one generator,
𝔸 k:=Spec ank[T] \mathbb{A}_k := Spec_{an} k[T]
is the analytic affine line over kk.
If k=k = \mathbb{C}, then 𝔸 k=\mathbb{A}_k = \mathbb{C} is the ordinary complex plane.
The notion originates in
 - Vladimir Berkovich, Spectral theory and analytic geometry over non-Archimedean fields, Mathematical Surveys and Monographs, vol. 33, American Mathematical Society, Providence, RI, (1990) 169 pp.
Expositions and Lecture notes
Introductory exposition of the Berkovich analytic spectrum includes
 - Sarah Brodsky, Non-archimedean geometry, brief lecture notes, 2012 (pdf)
 - Scott Carnahan, Berkovich spaces I (web)
 - Jérôme Poineau, Global analytic geometry, pages 20-23 in EMS newsletter September 2007 (pdf)
 - Frédéric Paugam, section 2.1.4 of Global analytic geometry and the functional equation (2010) (pdf)
 - Vladimir Berkovich, section 1 of Non-archimedean analytic spaces, lectures at the Advanced School on pp-adic Analysis and Applications, ICTP, Trieste, 31 August - 11 September 2009 (pdf)
Last revised on May 6, 2016 at 06:28:55. See the history of this page for a list of all contributions to it.


Geometry Skills with 'Pyramid Panic'
Updated 4 months ago by Livia Silvestre
Age 8-14
 - Calculate length in a straight line
 - Measurement in circles - diameter and radius
 - Measurement in rectangles and triangles - length and perimeter
 - Calculate length in rectilinear shapes
Use your measurement skills to correctly calculate the length of the red line, in various shapes including rectangles, triangles, circles and rectilinear shapes.
 1. Calculate the measurement of the red line
 2. Click anywhere on the screen to reveal the number line to input your answer
 3. Drag your mouse to the correct answer, then 'click'
 4. If you correctly calculate the length, then you swing across to safety. Where another measurement puzzle needs to be answered.
You have 3 lives - a life is lost with every incorrect answer.
For each level, beat the target score to earn a medal (Bronze, Silver, Gold)
 - Target score >>> 160-279 points (B), 280-399 points (S), 400+ points (G)
Scoring calculation
The score is calculated as follows:
 - BASE SCORE - 10 points per correct answer
 - DIFFICULTY LEVEL. There are 3 difficulty levels:
 - Easy (x1) - 10 points
 - Medium (x2) - 20 points
 - Hard (x4) - 40 points
 - SPEED BONUS - answer the question in under 3 seconds and receive a bonus 3 points
 - DIFFICULTY BONUS. At the end of the bonuses are awarded for reaching different difficulties.
 - medium difficulty - 50 points
 - hard difficulty - 100 points
 - LIFE BONUS - for not losing any lives in the level - 50 points
Learn how to assign a game activity here.
How Did We Do?