问:
Footnote reference for xsl fo
I'm facing problem in xsl fo "footnote" footnote refrence not align how to align
I want the footnotes to displaying on left align not indented.
Coding are following:-

body text:-

```<code>"<footnoteref refid="FN0001">1</footnoteref>"any action taken by the Central
Government under the Resolution of the Government of India, Planning Commission
bearing Notification Number A-43011/02/2009-Admin.
</code>```

XSLT:-

```<code><xsl:template match="footnoteref">
<xsl:variable name="fnoteid" select="@refid"/>
<fo:footnote>
<fo:inline font-size="70%" baseline-shift="super">
<xsl:apply-templates/>
</fo:inline>
<fo:footnote-body>
<fo:list-block provisional-label-separation="2.5mm" provisional-distance-between-starts="10mm">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="right"  text-indent="0pt" margin-left="0pt" font-size="8.5" font-style="normal">
<xsl:value-of select="//footnote[@id=$fnoteid]/footnum"/>
<xsl:choose>
<xsl:when test="$fnoteid = 1 to 9000"><xsl:text>.</xsl:text></xsl:when>
</xsl:choose>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block text-align="justify"  text-indent="0pt" margin-left="0pt" font-size="8.5" font-style="normal">
<xsl:apply-templates select="//footnote[@id=$fnoteid]"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:footnote-body>
</fo:footnote>
</xsl:template>
</code>```

my footnote look like

Received the assent of the President on March 25, 2016 and published in the

Received the assent of the President on March 25, 2016 and published

```<code>  3. Received the assent of the President on March
</code>```

But i want to

Received the assent of the President on March 25, 2016 and published in the

Received the assent of the President on March 25, 2016 and published

Received the assent of the President on March

答:
It may seem counter-intuitive but the fo:footnote element inherits properties from its ancestor formatting objects.

So, if a footnote descends from an fo:block element (or another block-level formatting object) with start-indent="1cm", the footnote body too will be indented!

To achieve the expected result, modify your template to add start-indent="0cm" to the fo:list-block element inside the fo:footnote-body. Similarly, you will have to "reset" other properties you don't want the fo:footnote-body to inherit (end-indent, spaces, font-size, ...).

Title: Footnote reference for xsl fo

Body:
I'm facing problem in xsl fo "footnote" footnote refrence not align how to align
I want the footnotes to displaying on left align not indented.
Coding are following:-

body text:-

"<footnoteref refid="FN0001">1</footnoteref>"any action taken by the Central
Government under the Resolution of the Government of India, Planning Commission
bearing Notification Number A-43011/02/2009-Admin.

XSLT:-

<xsl:template match="footnoteref">
<xsl:variable name="fnoteid" select="@refid"/>
<fo:footnote>
<fo:inline font-size="70%" baseline-shift="super">
<xsl:apply-templates/>
</fo:inline>
<fo:footnote-body>
<fo:list-block provisional-label-separation="2.5mm" provisional-distance-between-starts="10mm">
<fo:list-item>
<fo:list-item-label end-indent="label-end()">
<fo:block text-align="right"  text-indent="0pt" margin-left="0pt" font-size="8.5" font-style="normal">
<xsl:value-of select="//footnote[@id=$fnoteid]/footnum"/>
<xsl:choose>
<xsl:when test="$fnoteid = 1 to 9000"><xsl:text>.</xsl:text></xsl:when>
</xsl:choose>
</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block text-align="justify"  text-indent="0pt" margin-left="0pt" font-size="8.5" font-style="normal">
<xsl:apply-templates select="//footnote[@id=$fnoteid]"/>
</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</fo:footnote-body>
</fo:footnote>
</xsl:template>

my footnote look like

Received the assent of the President on March 25, 2016 and published in the

Received the assent of the President on March 25, 2016 and published

  3. Received the assent of the President on March

But i want to

Received the assent of the President on March 25, 2016 and published in the

Received the assent of the President on March 25, 2016 and published

Received the assent of the President on March


来源: stackexchange

问:
Need help in getting the count from table with clob column
Table1 has 2 columns as follows

```<code>a with datatype Number
b with datatype clob
</code>```

Data in Table1

```<code>a        |       b
100      | Rock+Y;Paper+No;Scissor+Yes;Dragon+Y;<br>
101      | Rock+N;Paper+No;Scissor+Yes;Dragon+N;<br>
102      | Rock+Y;Paper+Yes;Scissor+N;Dragon+Y;
</code>```

In the first row of Table1, value of 'Rock' is Y , value of 'Paper' is No ,value of 'Scissor' is Yes and value of 'Dragon' is Y in column b.
I want to consider only Rock,Paper and Scissor with values Y,Yes and Yes respectively in column b for count.

I want the count against column a based on column c's values.

Example:

For a=100,  Count only the attributes with values(Rock=Y, Paper=Yes,Scissor+Yes)
i.e 2 as Rock's value is Y and Scissor's values is Yes.

Similarly,for a=101, count=1 because only Scissor has desired value i.e 'Yes' while Rock has 'N' and Paper has 'No'.

For a=102 , count=2 Rock and Paper has desired values i.e Y and Yes respectively.

How can I achieve this result?

答:
If  you separate out the data into individual "attributes" then the answer can be done with simple SQL. SUBSTR function used here, but should also work with equivalent CLOB functions.

tab has sample data
tab_attributes has the sample data separated out into attributes
tab_nbr converts Y to 1 and N to  0
final select just adds them up:

```<code>with tab as
(select 100 a, 'Rock+Y;Paper+No;Scissor+Yes;Dragon+Y;' b from dual union
select 101 a, 'Rock+N;Paper+No;Scissor+Yes;Dragon+N;' b from dual union
select 102 a, 'Rock+Y;Paper+Yes;Scissor+N;Dragon+Y;' b from dual
)
, tab_attributes as
(
select a
, substr(b, instr(b, 'Rock+')+5,1) rock
, substr(b, instr(b, 'Paper+')+6,1) paper
, substr(b, instr(b, 'Scissor+')+8,1) scissor
from tab
)
, tab_nbr as
(select a
, case when rock = 'Y' then 1 when rock = 'N' then 0 else null end as rock
, case when paper = 'Y' then 1 when paper = 'N' then 0 else null end as paper
, case when scissor = 'Y' then 1 when scissor = 'N' then 0 else null end as scissor
from tab_attributes
)
select a, rock+paper+scissor cnt from tab_nbr
;
</code>```

ContentLicense: CC BY-SA 3.0

Body:
Table1 has 2 columns as follows

a with datatype Number
b with datatype clob

Data in Table1

a        |       b
100      | Rock+Y;Paper+No;Scissor+Yes;Dragon+Y;

101      | Rock+N;Paper+No;Scissor+Yes;Dragon+N;

102      | Rock+Y;Paper+Yes;Scissor+N;Dragon+Y;

In the first row of Table1, value of 'Rock' is Y , value of 'Paper' is No ,value of 'Scissor' is Yes and value of 'Dragon' is Y in column b.
I want to consider only Rock,Paper and Scissor with values Y,Yes and Yes respectively in column b for count.

I want the count against column a based on column c's values.

Example:

For a=100,  Count only the attributes with values(Rock=Y, Paper=Yes,Scissor+Yes)
i.e 2 as Rock's value is Y and Scissor's values is Yes.

Similarly,for a=101, count=1 because only Scissor has desired value i.e 'Yes' while Rock has 'N' and Paper has 'No'.

For a=102 , count=2 Rock and Paper has desired values i.e Y and Yes respectively.

How can I achieve this result?

Body:
If  you separate out the data into individual "attributes" then the answer can be done with simple SQL. SUBSTR function used here, but should also work with equivalent CLOB functions.

tab has sample data
tab_attributes has the sample data separated out into attributes
tab_nbr converts Y to 1 and N to  0
final select just adds them up:

with tab as
(select 100 a, 'Rock+Y;Paper+No;Scissor+Yes;Dragon+Y;' b from dual union
select 101 a, 'Rock+N;Paper+No;Scissor+Yes;Dragon+N;' b from dual union
select 102 a, 'Rock+Y;Paper+Yes;Scissor+N;Dragon+Y;' b from dual
)
, tab_attributes as
(
select a
, substr(b, instr(b, 'Rock+')+5,1) rock
, substr(b, instr(b, 'Paper+')+6,1) paper
, substr(b, instr(b, 'Scissor+')+8,1) scissor
from tab
)
, tab_nbr as
(select a
, case when rock = 'Y' then 1 when rock = 'N' then 0 else null end as rock
, case when paper = 'Y' then 1 when paper = 'N' then 0 else null end as paper
, case when scissor = 'Y' then 1 when scissor = 'N' then 0 else null end as scissor
from tab_attributes
)
select a, rock+paper+scissor cnt from tab_nbr
;


问:
What does this mean: "You do not have to provide an explicit implementation of a required initializer if you can satisfy the requirement"?
I've found this note in the Swift documentation about initializers:

You do not have to provide an explicit implementation of a required initializer if you can satisfy the requirement with an inherited initializer.

What is an "explicit" implementation? What is an "implicit" one then?

What does "satisfy the requirement with an inherited initializer" mean precisely?

Could you give me a code example, in which I don't have to provide an explicit implementation of a required initializer?

答:
Here's an example with an inline explanation:</p>

```<code>protocol JSONInitializable { // Use Encoders, but just for example
    init(fromJSON: String)
}

class Foo: JSONInitializable  {
    let x: Int

    // "required" is necessary because this init is required for the
    // conformance to JSONInitializable
    required init(fromJSON json: String) {
        //...
        x = 123 //some value from the JSON
    }
}

class Baz: Foo {
    // `init(fromJSON json: String)` can be inherited,
    // so it's implicitly defined for Baz, as well as Foo.
}

class Bar: Foo {
    // The presence of this uninitialized constant `y` requires an
    // a value in the declaration, or an initializer that sets it
    let y: Int

    // Since we didn't specify a value for `y` in its declaration,
    // this initializer must be explicitly specified so as to initialize `y`.
    // Doing so blocks the inheritance of `init(fromJSON json: String)` from
    // the super class, and requires us to define it ourselves,
    // in order to preserve conformance to `JSONInitializable`
    required init(fromJSON json: String) {
        //...
        y = 0
        super.init(fromJSON: json)
    }
}
</code>```

Body:
Here's an example with an inline explanation:

protocol JSONInitializable { // Use Encoders, but just for example
    init(fromJSON: String)
}

class Foo: JSONInitializable  {
    let x: Int

    // "required" is necessary because this init is required for the
    // conformance to JSONInitializable
    required init(fromJSON json: String) {
        //...
        x = 123 //some value from the JSON
    }
}

class Baz: Foo {
    // `init(fromJSON json: String)` can be inherited,
    // so it's implicitly defined for Baz, as well as Foo.
}

class Bar: Foo {
    // The presence of this uninitialized constant `y` requires an
    // a value in the declaration, or an initializer that sets it
    let y: Int

    // Since we didn't specify a value for `y` in its declaration,
    // this initializer must be explicitly specified so as to initialize `y`.
    // Doing so blocks the inheritance of `init(fromJSON json: String)` from
    // the super class, and requires us to define it ourselves,
    // in order to preserve conformance to `JSONInitializable`
    required init(fromJSON json: String) {
        //...
        y = 0
        super.init(fromJSON: json)
    }
}


问:
Python two variables one input
I want to save an user input directly into two variables like: </p>

```<code>n,k = input("Geben Sie eine Zahl ein: " )

print(n)
print(k)
</code>```

<p>n and k should print the same value. </p>

答:
Try:</p>

```<code>n = k = input("Geben Sie eine Zahl ein: " )
</code>```

Title: Python two variables one input

Body:
I want to save an user input directly into two variables like:

n,k = input("Geben Sie eine Zahl ein: " )

print(n)
print(k)

n and k should print the same value.

Body:
Try:

n = k = input("Geben Sie eine Zahl ein: " )


问:
Access IIf statement in query
I think this should be straight forward. I have an insert query.
I am modifying a query field that is calling a public function that does a dlookup and it calculates any discounts.
I only want to call this function if an id is below a certain number. If above that number I want to populate it with a field from my form.
This is the original call:

```<code>GetTuition(Forms![createinvoice]!AfterschoolFrame,Forms!
[createinvoice]!BillCycleID,Forms![createinvoice]![1DayAfterschool15],Forms!
[createinvoice]![TuitionToPay]) AS Fee
</code>```

But when I add an IIF, it crashes

```<code>IIf (Forms![createinvoice]!ScholarID <4
(GetTuition(Forms![createinvoice]!AfterschoolFrame,Forms!
[createinvoice]!BillingCycleID,
Forms![createinvoice]![1DayAfterschool15],
Forms![createinvoice]![TuitionToPay]) , Forms![createinvoice]!TuitionCost ))
AS Fee
</code>```

Any ideas would be greatly appreciated.

答:
You've made an error with your parentheses (you should remove the last one, and the 2nd one), and are missing a , after the if condition.

This fixes it:

```<code>IIf (Forms![createinvoice]!ScholarID <4,
GetTuition(Forms![createinvoice]!AfterschoolFrame,Forms!
[createinvoice]!BillingCycleID,
Forms![createinvoice]![1DayAfterschool15],
Forms![createinvoice]![TuitionToPay]) , Forms![createinvoice]!TuitionCost)
AS Fee
</code>```

Title: Access IIf statement in query

Body:
I think this should be straight forward. I have an insert query.
I am modifying a query field that is calling a public function that does a dlookup and it calculates any discounts.
I only want to call this function if an id is below a certain number. If above that number I want to populate it with a field from my form.
This is the original call:

GetTuition(Forms![createinvoice]!AfterschoolFrame,Forms!
[createinvoice]!BillCycleID,Forms![createinvoice]![1DayAfterschool15],Forms!
[createinvoice]![TuitionToPay]) AS Fee

But when I add an IIF, it crashes

IIf (Forms![createinvoice]!ScholarID <4
(GetTuition(Forms![createinvoice]!AfterschoolFrame,Forms!
[createinvoice]!BillingCycleID,
Forms![createinvoice]![1DayAfterschool15],
Forms![createinvoice]![TuitionToPay]) , Forms![createinvoice]!TuitionCost ))
AS Fee

Any ideas would be greatly appreciated.

Body:
You've made an error with your parentheses (you should remove the last one, and the 2nd one), and are missing a , after the if condition.

This fixes it:

IIf (Forms![createinvoice]!ScholarID <4,
GetTuition(Forms![createinvoice]!AfterschoolFrame,Forms!
[createinvoice]!BillingCycleID,
Forms![createinvoice]![1DayAfterschool15],
Forms![createinvoice]![TuitionToPay]) , Forms![createinvoice]!TuitionCost)
AS Fee


问:
UIView Subview Does not autoresize on orientation change
In my iPhone app, I have a view controller with two views (essentially, a front & back view). The front view is the main UIView, and the back view is a secondary UIView which is added as a subview using [self.view addSubview:backView] when showing the back and [backView removeFromSuperview] when hiding it. However, when the orientation changes, I have the following issue: the main UIView (frontView) rotates & all of its elements resize properly, but the secondary/subview UIView (backView) does not rotate & all of its elements do not resize properly. Does anyone have suggestions on how to make the secondary UIView autoresize properly according to the rules I have set in Interface Builder?

答:
I had the same problem, here is how I fixed it based on imaginaryboy's
suggestions (thanks!)

Add the backview to the viewcontroller at viewDidLoad and hide it at the same time. Show it when needed, Hide it again. Set the resizing of the backview to UIViewAutoresizingFlexibleWidth in IB (or code I guess, I used IB)

ContentLicense: CC BY-SA 2.5


问:
php file uploading doesn't work
I am testing a php code of file uploading. Here is the form:

```<code><form action="C:/xampp/htdocs/php/upload.php" method="post" enctype="multipart/form-data">
    <p>Browse File</p>
    <p><input type="file" name="file" id="file" /></p>
    <p><input type="submit" name="submit" value="Submit" /></p>
</form>
</code>```

and here is the upload.php file:

```<code><?php
if($_POST['submit']){
$upload_folder = 'C:/xampp/htdocs/php/uploads/';
move_uploaded_file($_FILES['file']['tmp_name'], $upload_folder.$_FILES['file']['name']);
echo 'File uploaded successfully';
}
?>
</code>```

But this doesn't upload any file. What is the problem here?

答:
Take out the C: path and replace with a relative link to the location of your upload file.

From your original post, if the location of your files on the local hardware is:

```<code>  htdocs/php/uploads/
</code>```

Then htdocs is probably the root, so / will point to the htdocs location, to get to your upload.php, you would specify:

```<code>  /php/uploads/upload.php
</code>```

However if htdocs isn't your root, then just adjust accordingly.

Title: php file uploading doesn't work

Body:
I am testing a php code of file uploading. Here is the form:

<form action="C:/xampp/htdocs/php/upload.php" method="post" enctype="multipart/form-data">

Browse File

<input type="file" name="file" id="file" />

<input type="submit" name="submit" value="Submit" />

</form>

and here is the upload.php file:

<?php
if($_POST['submit']){
$upload_folder = 'C:/xampp/htdocs/php/uploads/';
move_uploaded_file($_FILES['file']['tmp_name'], $upload_folder.$_FILES['file']['name']);
echo 'File uploaded successfully';
}
?>

But this doesn't upload any file. What is the problem here?

Body:
Take out the C: path and replace with a relative link to the location of your upload file.

From your original post, if the location of your files on the local hardware is:

  htdocs/php/uploads/

Then htdocs is probably the root, so / will point to the htdocs location, to get to your upload.php, you would specify:

  /php/uploads/upload.php

However if htdocs isn't your root, then just adjust accordingly.


问:
How to generate totals of fields from related model records
I'm trying to work out how to generate totals of fields from related model records.

Example: I have 2 Google Drive Table models (Projects & Stages) with a relation where 1 Project can have many Stages. The Stages model has a number of fields, one of which is Budget.

I'm trying work out how to display a Total Project Budget, which is the sum of the Budget fields of the Stages related to each Project.

I'm really stuck on getting this to work and wondering if I need to create a client script, server script, or calculated model, or if there's an easy way to do this directly within a binding.

Here is a link to a bunch of screen-grabs of what I'm trying to build, the UI and setup in App Maker:

https://www.dropbox.com/sh/wt00virvn88puyi/AACy7-fPLYFF1H9uFkvEuvgTa?dl=0

答: Datasource has client event onLoad, so you can calculate value in this event, find widget, which shows total, and set text of this widget.</p>


问:
Median If Equation on Excel file
I was trying to use Median with an If to find the median of a column for values greater than 0.
This seems to be what I have seen others use; however, this formula does not seem to be correctly working for me.
Does anyone seem to see the problem?
Thank you!

=MEDIAN(IF(X3:X92 > 0,X3:X92))```

答:
Use this formula

```<code>=MEDIAN(IF($X3:$X92<>0,$X3:$X92))
</code>```

AND also use Shift+Ctrl+Enter when you enter!

That is important, and probably what you forgot.

Title: Median If Equation on Excel file

Body:
Use this formula

=MEDIAN(IF($X3:$X92<>0,$X3:$X92))

AND also use Shift+Ctrl+Enter when you enter!

That is important, and probably what you forgot.


问:
How to modify boolean property value in html in polymer 1.0?
If I assign a boolean property to a component, how can I modify the value of the boolean in html, without creating any function in javascript?

For example, lets say I have the following component:

Polymer({
  is: 'find-retailer-map',
  properties: {
    fixedPosition: {
      type: Boolean,
      notify: true,
    },
  },
});```
<pre class="snippet-code-html lang-html prettyprint-override"><code><dom-module id="osb-retailer-page">
  <template>
    <find-retailer-map fixed-position></find-retailer-map>
  </template>
</dom-module></code>```

How can I make fixed-position true or false within the html?

Thanks

答:
Boolean properties works as normal boolean attrribute in HTML,
example:

```<code><input type="checkbox" checked />
<input type="text" disabled />
</code>```

To swtich ON/OFF you need to do remove or add the attribute, then

Switch on:  <find-retailer-map fixed-position></find-retailer-map>

Swtich off:  <find-retailer-map></find-retailer-map>

To swtich ON/OFF programamtically:

Switch on:  <find-retailer-map fixed-position$="{{_your_toggle(true)}}"></find-retailer-map>

Switch off:  <find-retailer-map fixed-position$="{{_your_toggle(false)}}"></find-retailer-map>

hope that helps

Body:
If I assign a boolean property to a component, how can I modify the value of the boolean in html, without creating any function in javascript?

For example, lets say I have the following component:

Polymer({
  is: 'find-retailer-map',
  properties: {
    fixedPosition: {
      type: Boolean,
      notify: true,
    },
  },
});

<dom-module id="osb-retailer-page">
  <template>
    <find-retailer-map fixed-position></find-retailer-map>
  </template>
</dom-module>

How can I make fixed-position true or false within the html?

Thanks

Body:
Boolean properties works as normal boolean attrribute in HTML,
example:

<input type="checkbox" checked />
<input type="text" disabled />

To swtich ON/OFF you need to do remove or add the attribute, then

Switch on:  <find-retailer-map fixed-position></find-retailer-map>

Swtich off:  <find-retailer-map></find-retailer-map>

To swtich ON/OFF programamtically:

Switch on:  <find-retailer-map fixed-position$="{{_your_toggle(true)}}"></find-retailer-map>

Switch off:  <find-retailer-map fixed-position$="{{_your_toggle(false)}}"></find-retailer-map>

hope that helps


问:
Cascading LOVS - default values
I have two cascading LOVs. After changing value of my first LOV in second LOV appropriate values are populated.

First LOV:
name - P2_DEPTNO

```<code>select dname, deptno
from dept
order by 1;
</code>```

Second LOV:
name - P2_EMPNO

```<code>select ename, empno
from emp
where deptno = :P2_DEPTNO;
</code>```

cascading LOV parent - P2_DEPTNO

What should I add to set default value of second LOV (first row from query) after changing first LOV value?

答:
Finally, I got the correct answer on the Oracle community forum.

This is possible in only one case, because I'm more familiar with this type of issue in my project.
  We need to change the second item type i,e "Empno" item type from Pop-up LOV to Select-List.
  Also make null setting changes as per given below :

On DEMO works proper.

Please note that this will CAN NOT be achieved with item type as POP-UP LOV directly using simple step. To make this work using you need to work on POP-UP LOV we need so much custom changes, like DYnamic Actions , JS Code, Asynchronous calls to DB.

Source - https://community.oracle.com/thread/4048009

Author - EnigmaCoder

Title: Cascading LOVS - default values

Body:
I have two cascading LOVs. After changing value of my first LOV in second LOV appropriate values are populated.

First LOV:
name - P2_DEPTNO

select dname, deptno
from dept
order by 1;

Second LOV:
name - P2_EMPNO

select ename, empno
from emp
where deptno = :P2_DEPTNO;

cascading LOV parent - P2_DEPTNO

What should I add to set default value of second LOV (first row from query) after changing first LOV value?


问:
Ggplot2 doesn't scale Y axis
I'm having a problem regarding scaling Y axis on the ggplot2. I have a dataset (dane_dlugie) consisted of dates (Data) and river flow observations at three different spots (Osielec, Jordanów and Skawica Dolna). My goal is to plot flows from Osielec regarding the proper date.

My plot code looks like this:

```<code>ggplot(dane_dlugie, aes(x=Data, y=Osielec, group=1)) +
  geom_line()+labs(x="Data", y="Flow") +
  ggtitle("Osielec")+
  scale_x_datetime(date_breaks = "1 day", date_labels = "%d-%m")
</code>```

On the Y axis, I would like to have flow scale with the break of 1 m3/s. I've tried using the 'scale_y_discrete' however without any success.

Could anyone help me with that?

Please find below the reproducible example.

```<code>dane_dlugie <- structure(list(Data = structure(list(sec = c(0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), min = c(0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), hour = c(0L, 1L, 2L, 3L, 4L,
5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L,
19L, 20L, 21L, 22L, 23L, 0L), mday = c(1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 2L), mon = c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L),
    year = c(110L, 110L, 110L, 110L, 110L, 110L, 110L, 110L,
    110L, 110L, 110L, 110L, 110L, 110L, 110L, 110L, 110L, 110L,
    110L, 110L, 110L, 110L, 110L, 110L, 110L), wday = c(6L, 6L,
    6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L,
    6L, 6L, 6L, 6L, 6L, 6L, 6L, 0L), yday = c(120L, 120L, 120L,
    120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L,
    120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L,
    120L, 121L), isdst = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
    1L), zone = c("CEST", "CEST", "CEST", "CEST", "CEST", "CEST",
    "CEST", "CEST", "CEST", "CEST", "CEST", "CEST", "CEST", "CEST",
    "CEST", "CEST", "CEST", "CEST", "CEST", "CEST", "CEST", "CEST",
    "CEST", "CEST", "CEST"), gmtoff = c(NA_integer_, NA_integer_,
    NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_,
    NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_,
    NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_,
    NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_,
    NA_integer_, NA_integer_, NA_integer_)), .Names = c("sec",
"min", "hour", "mday", "mon", "year", "wday", "yday", "isdst",
"zone", "gmtoff"), class = c("POSIXlt", "POSIXt")), Osielec = c("1.281",
"1.294", "1.294", "1.281", "1.268", "1.281", "1.294", "1.333",
"1.32", "1.32", "1.333", "1.307", "1.333", "1.346", "1.346",
"1.359", "1.32", "1.32", "1.294", "1.5328", "2.0296", "2.1952",
"2.7541", "4.1775", "4.5983"), Jordanów = structure(c(124L, 124L,
118L, 115L, 108L, 108L, 108L, 115L, 103L, 111L, 127L, 120L, 122L,
120L, 116L, 125L, 122L, 111L, 122L, 206L, 258L, 236L, 234L, 266L,
281L), .Label = c("", "0,1672", "0,1696", "0,172", "0,1744",
"0,1768", "0,1792", "0,1816", "0,184", "0,1864", "0,1888", "0,1912",
"0,1936", "0,196", "0,1984", "0,2008", "0,2032", "0,2056", "0,208",
"0,2104", "0,2128", "0,2152", "0,2176", "0,22", "0,2224", "0,2248",
"0,2272", "0,2296", "0,232", "0,2344", "0,2368", "0,2392", "0,2416",
"0,244", "0,2464", "0,2488", "0,2512", "0,2536", "0,256", "0,2584",
"0,2608", "0,2632", "0,2656", "0,268", "0,2704", "0,2728", "0,2752",
"0,2776", "0,28", "0,2824", "0,2848", "0,2872", "0,2896", "0,2944",
"0,2968", "0,2992", "0,3016", "0,304", "0,3064", "0,3088", "0,3112",
"0,3136", "0,316", "0,3184", "0,3208", "0,3232", "0,3256", "0,3264",
"0,328", "0,3304", "0,3328", "0,333", "0,3352", "0,3354", "0,3362",
"0,3376", "0,34", "0,3424", "0,3448", "0,3472", "0,3496", "0,3497",
"0,352", "0,3544", "0,3568", "0,3588", "0,3592", "0,3616", "0,3623",
"0,364", "0,3664", "0,3688", "0,3712", "0,3736", "0,376", "0,3784",
"0,3808", "0,3832", "0,3856", "0,388", "0,3904", "0,3928", "0,394",
"0,3952", "0,3976", "0,4", "0,4042", "0,4076", "0,4084", "0,4126",
"0,4144", "0,4168", "0,4178", "0,421", "0,4212", "0,4246", "0,4252",
"0,428", "0,4294", "0,4314", "0,4336", "0,4348", "0,4378", "0,4382",
"0,4416", "0,442", "0,445", "0,4462", "0,4484", "0,4504", "0,4518",
"0,4546", "0,4552", "0,4588", "0,463", "0,4672", "0,4714", "0,4756",
"0,4798", "0,484", "0,4882", "0,4924", "0,4966", "0,5008", "0,505",
"0,5092", "0,5134", "0,5176", "0,5218", "0,526", "0,5302", "0,5344",
"0,5386", "0,5428", "0,547", "0,5512", "0,5554", "0,5596", "0,5638",
"0,568", "0,5722", "0,5764", "0,5806", "0,5848", "0,589", "0,5932",
"0,5974", "0,6016", "0,6058", "0,61", "0,6116", "0,6142", "0,6184",
"0,6226", "0,6268", "0,631", "0,6352", "0,6394", "0,6436", "0,6478",
"0,652", "0,6562", "0,6604", "0,6646", "0,6688", "0,673", "0,6772",
"0,6814", "0,6856", "0,6898", "0,694", "0,6982", "0,7024", "0,7066",
"0,7108", "0,715", "0,7192", "0,7234", "0,7276", "0,7318", "0,736",
"0,7402", "0,7444", "0,7486", "0,7528", "0,7556", "0,757", "0,7584",
"0,7612", "0,7654", "0,7696", "0,7738", "0,778", "0,7822", "0,7864",
"0,7906", "0,7948", "0,799", "0,8032", "0,8074", "0,8116", "0,8158",
"0,82", "0,8258", "0,8316", "0,8374", "0,8432", "0,849", "0,8548",
"0,8606", "0,8664", "0,8722", "0,878", "0,8804", "0,8838", "0,8856",
"0,8896", "0,8954", "0,9012", "0,907", "0,9128", "0,9186", "0,9244",
"0,9302", "0,936", "0,9418", "0,9476", "0,9534", "0,9592", "0,965",
"0,9708", "0,9766", "0,9824", "0,9882", "0,9916", "0,994", "0,9998",
"1,0052", "1,0056", "1,0064", "1,0114", "1,0172", "1,023", "1,0288",
"1,0346", "1,0364", "1,0404", "1,0462", "1,052", "1,0578", "1,0636",
"1,0694", "1,0752", "1,081", "1,0868", "1,0926", "1,0984", "1,1042",
"1,11", "1,1158", "1,1196", "1,1216", "1,1248", "1,1274", "1,1332",
"1,139", "1,1448", "1,1506", "1,156", "1,1564", "1,1622", "1,1664",
"1,168", "1,1738", "1,1796", "1,1854", "1,1912", "1,197", "1,2028",
"1,2086", "1,2144", "1,2184", "1,2202", "1,2236", "1,226", "1,2288",
"1,2318", "1,234", "1,2376", "1,2492", "1,2496", "1,2548", "1,255",
"1,26", "1,2608", "1,2666", "1,2724", "1,2754", "1,2782", "1,284",
"1,2898", "1,2908", "1,2956", "1,2985", "1,3014", "1,3072", "1,313",
"1,3139", "1,3188", "1,3246", "1,3293", "1,3304", "1,3362", "1,337",
"1,3415", "1,342", "1,3478", "1,3536", "1,3594", "1,3652", "1,3678",
"1,371", "1,3755", "1,3768", "1,3826", "1,3884", "1,3942", "1,4",
"1,408", "1,414", "1,416", "1,4217", "1,424", "1,432", "1,4371",
"1,44", "1,4448", "1,448", "1,4525", "1,4602", "1,464", "1,4679",
"1,472", "1,4756", "1,48", "1,4833", "1,488", "1,491", "1,496",
"1,4987", "1,5064", "1,512", "1,5141", "1,52", "1,528", "1,536",
"1,5372", "1,544", "1,5449", "1,552", "1,5526", "1,56", "1,5603",
"1,568", "1,5757", "1,576", "1,5834", "1,584", "1,5911", "1,592",
"1,6065", "1,608", "1,616", "1,6219", "1,624", "1,632", "1,64",
"1,648", "1,6527", "1,664", "1,672", "1,68", "1,6835", "1,688",
"1,6912", "1,696", "1,6989", "1,704", "1,7066", "1,712", "1,7143",
"1,7297", "1,736", "1,744", "1,7451", "1,752", "1,7528", "1,76",
"1,768", "1,776", "1,7836", "1,784", "1,792", "1,799", "1,8",
"1,8067", "1,816", "1,8221", "1,824", "1,8298", "1,832", "1,8375",
"1,84", "1,8452", "1,848", "1,8529", "1,856", "1,864", "1,872",
"1,876", "1,888", "1,8914", "1,896", "1,8991", "1,904", "1,9068",
"1,912", "1,92", "1,9222", "1,928", "1,936", "1,9376", "1,944",
"1,9453", "1,952", "1,953", "1,96", "1,968", "1,9684", "1,976",
"1,984", "1,9915", "1,992", "10,0136", "10,014", "10,035", "10,098",
"10,14", "10,203", "10,371", "10,434", "10,455", "10,518", "10,539",
"10,56", "10,833", "10,854", "10,875", "10,938", "10,959", "11,064",
"11,106", "11,169", "11,184", "11,211", "11,232", "11,274", "11,337",
"11,358", "11,444", "11,576", "11,664", "11,686", "11,862", "11,884",
"12,104", "12,214", "12,236", "12,368", "12,434", "12,456", "12,72",
"12,786", "12,918", "12,94", "13,028", "13,05", "13,072", "13,094",
"13,182", "13,27", "13,314", "13,325", "13,424", "13,446", "13,578",
"13,715", "13,991", "14,014", "14,037", "14,083", "14,152", "14,29",
"14,451", "14,497", "14,635", "14,727", "14,819", "14,957", "15,003",
"15,164", "15,21", "15,225", "15,375", "15,417", "15,44", "15,601",
"15,67", "15,805", "15,808", "16,125", "16,15", "16,183", "16,291",
"16,35", "16,399", "16,45", "16,65", "16,725", "16,925", "17,15",
"17,225", "17,475", "17,775", "17,938", "18,1", "18,2", "18,325",
"18,35", "18,562", "18,778", "18,886", "19,021", "19,048", "19,102",
"19,237", "19,453", "19,588", "19,696", "19,885", "19,912", "2",
"2,0069", "2,008", "2,0146", "2,016", "2,024", "2,032", "2,04",
"2,0494", "2,056", "2,064", "2,0688", "2,072", "2,08", "2,088",
"2,0882", "2,096", "2,104", "2,1076", "2,112", "2,12", "2,127",
"2,128", "2,136", "2,1367", "2,144", "2,152", "2,16", "2,1658",
"2,168", "2,176", "2,184", "2,1852", "2,192", "2,2", "2,21",
"2,2143", "2,22", "2,224", "2,23", "2,2337", "2,24", "2,2434",
"2,25", "2,2531", "2,26", "2,27", "2,2725", "2,28", "2,29", "2,3",
"2,3016", "2,31", "2,3113", "2,32", "2,321", "2,33", "2,3404",
"2,35", "2,3598", "2,36", "2,3695", "2,37", "2,3889", "2,39",
"2,3986", "2,4", "2,41", "2,418", "2,4277", "2,43", "2,4374",
"2,44", "2,4471", "2,45", "2,4568", "2,46", "2,47", "2,4762",
"2,48", "2,4859", "2,49", "2,5053", "2,51", "2,515", "2,52",
"2,5247", "2,54", "2,5441", "2,55", "2,56", "2,5635", "2,58",
"2,5829", "2,59", "2,5926", "2,6", "2,61", "2,62", "2,63", "2,64",
"2,6411", "2,65", "2,6508", "2,66", "2,67", "2,6799", "2,68",
"2,69", "2,6993", "2,7", "2,71", "2,7187", "2,72", "2,7284",
"2,73", "2,7381", "2,7478", "2,75", "2,7575", "2,76", "2,7672",
"2,78", "2,7866", "2,79", "2,7963", "2,8", "2,81", "2,82", "2,8254",
"2,83", "2,8351", "2,84", "2,8448", "2,85", "2,8545", "2,86",
"2,8642", "2,87", "2,8739", "2,88", "2,89", "2,8933", "2,9",
"2,91", "2,9127", "2,92", "2,9224", "2,93", "2,94", "2,9418",
"2,95", "2,9515", "2,96", "2,97", "2,98", "2,9806", "2,99", "2,9903",
"20,101", "20,155", "20,182", "20,217", "20,506", "20,695", "21,43",
"21,52", "21,713", "21,94", "22,03", "22,09", "22,27", "22,63",
"22,78", "23,015", "23,046", "23,14", "23,59", "23,65", "23,98",
"24,298", "24,595", "24,727", "24,958", "25,189", "25,42", "26,113",
"26,179", "26,641", "26,74", "26,872", "26,971", "27,616", "27,832",
"28,336", "29,668", "29,956", "3", "3,01", "3,011", "3,02", "3,022",
"3,03", "3,033", "3,04", "3,044", "3,05", "3,055", "3,06", "3,07",
"3,077", "3,08", "3,088", "3,09", "3,099", "3,1", "3,11", "3,13",
"3,14", "3,143", "3,15", "3,154", "3,16", "3,165", "3,17", "3,176",
"3,18", "3,19", "3,198", "3,2", "3,209", "3,212", "3,224", "3,242",
"3,248", "3,253", "3,26", "3,264", "3,272", "3,275", "3,284",
"3,286", "3,296", "3,297", "3,308", "3,319", "3,32", "3,33",
"3,332", "3,341", "3,344", "3,352", "3,363", "3,368", "3,38",
"3,392", "3,396", "3,404", "3,407", "3,416", "3,428", "3,429",
"3,44", "3,451", "3,452", "3,462", "3,473", "3,488", "3,5", "3,506",
"3,512", "3,517", "3,524", "3,536", "3,539", "3,548", "3,56",
"3,561", "3,572", "3,583", "3,594", "3,596", "3,605", "3,608",
"3,616", "3,62", "3,632", "3,638", "3,649", "3,656", "3,668",
"3,68", "3,682", "3,692", "3,693", "3,704", "3,715", "3,716",
"3,728", "3,74", "3,752", "3,759", "3,764", "3,776", "3,788",
"3,792", "3,8", "3,812", "3,814", "3,824", "3,825", "3,836",
"3,847", "3,86", "3,872", "3,884", "3,891", "3,896", "3,908",
"3,932", "3,956", "3,968", "3,98", "3,99", "3,992", "30,028",
"30,532", "30,676", "30,892", "31,533", "31,798", "31,943", "32,189",
"32,763", "32,927", "33,009", "33,173", "33,296", "33,46", "33,583",
"33,73", "33,788", "34,948", "35,241", "35,57", "36,181", "36,369",
"37,027", "37,121", "37,5", "38,202", "38,343", "38,437", "38,484",
"38,531", "39,001", "39,236", "39,659", "39,753", "4,001", "4,004",
"4,028", "4,04", "4,045", "4,056", "4,064", "4,076", "4,088",
"4,089", "4,1", "4,112", "4,121", "4,124", "4,136", "4,139",
"4,16", "4,172", "4,178", "4,191", "4,204", "4,22", "4,232",
"4,243", "4,256", "4,268", "4,28", "4,282", "4,304", "4,308",
"4,316", "4,321", "4,328", "4,34", "4,352", "4,364", "4,388",
"4,4", "4,425", "4,428", "4,442", "4,456", "4,484", "4,498",
"4,526", "4,529", "4,54", "4,554", "4,582", "4,594", "4,596",
"4,607", "4,624", "4,638", "4,652", "4,666", "4,685", "4,694",
"4,708", "4,722", "4,736", "4,75", "4,764", "4,778", "4,792",
"4,806", "4,82", "4,834", "4,841", "4,848", "4,876", "4,904",
"4,918", "4,932", "4,945", "4,958", "4,96", "4,974", "4,984",
"40,06", "40,164", "40,216", "40,528", "40,944", "41,048", "41,152",
"41,412", "41,568", "41,88", "41,932", "42,4", "42,816", "45,29",
"45,812", "46,16", "46,682", "47,088", "47,668", "47,842", "48,132",
"49,872", "49,93", "5,016", "5,023", "5,03", "5,044", "5,058",
"5,072", "5,075", "5,1", "5,114", "5,128", "5,142", "5,153",
"5,184", "5,212", "5,218", "5,226", "5,24", "5,244", "5,254",
"5,268", "5,282", "5,296", "5,324", "5,338", "5,352", "5,366",
"5,374", "5,38", "5,394", "5,422", "5,436", "5,45", "5,475",
"5,478", "5,492", "5,506", "5,52", "5,534", "5,562", "5,576",
"5,59", "5,604", "5,618", "5,632", "5,646", "5,674", "5,685",
"5,716", "5,73", "5,744", "5,8", "5,832", "5,848", "5,864", "5,88",
"5,91", "5,912", "5,925", "5,928", "5,944", "5,96", "5,976",
"50,8", "52,226", "52,474", "53,032", "53,962", "54,024", "54,458",
"54,582", "55,078", "55,45", "55,636", "56,194", "57,068", "58,564",
"59,176", "6,008", "6,024", "6,04", "6,045", "6,056", "6,072",
"6,088", "6,104", "6,12", "6,136", "6,152", "6,232", "6,248",
"6,264", "6,285", "6,296", "6,312", "6,328", "6,33", "6,345",
"6,36", "6,375", "6,376", "6,408", "6,44", "6,45", "6,456", "6,472",
"6,48", "6,488", "6,495", "6,504", "6,51", "6,52", "6,54", "6,552",
"6,555", "6,584", "6,6", "6,632", "6,645", "6,648", "6,66", "6,664",
"6,68", "6,705", "6,735", "6,744", "6,76", "6,776", "6,808",
"6,824", "6,856", "6,872", "6,888", "6,904", "6,92", "6,936",
"6,952", "6,968", "6,984", "60,808", "62,372", "63,664", "64,448",
"65,024", "66,968", "68,336", "68,696", "69,632", "7,016", "7,08",
"7,096", "7,112", "7,128", "7,144", "7,176", "7,192", "7,208",
"7,24", "7,288", "7,304", "7,32", "7,336", "7,352", "7,368",
"7,384", "7,4", "7,419", "7,438", "7,476", "7,533", "7,552",
"7,571", "7,59", "7,609", "7,628", "7,647", "7,666", "7,685",
"7,704", "7,723", "7,742", "7,78", "7,818", "7,837", "7,856",
"7,913", "7,932", "7,97", "7,989", "70,712", "71,539", "74,388",
"74,542", "76,929", "78,623", "8,008", "8,027", "8,084", "8,103",
"8,122", "8,198", "8,217", "8,236", "8,2588", "8,274", "8,293",
"8,331", "8,388", "8,407", "8,426", "8,464", "8,502", "8,54",
"8,635", "8,673", "8,692", "8,711", "8,768", "8,787", "8,806",
"8,882", "8,901", "8,92", "8,939", "8,958", "8,996", "80,212",
"83,74", "86,092", "88,664", "9,034", "9,072", "9,11", "9,129",
"9,205", "9,321", "9,405", "9,447", "9,489", "9,51", "9,552",
"9,741", "9,783", "9,867", "9,888", "9,93", "9,951", "90,32",
"91,608", "92,528", "94,552"), class = "factor"), Skawica.Dolna..Skawica. = structure(c(44L,
35L, 35L, 35L, 35L, 35L, 44L, 58L, 71L, 71L, 71L, 71L, 189L,
174L, 174L, 166L, 71L, 71L, 161L, 166L, 166L, 166L, 182L, 258L,
258L), .Label = c("", "1,023", "1,045", "1,056", "1,067", "1,078",
"1,089", "1,1", "1,118", "1,136", "1,154", "1,172", "1,19", "1,208",
"1,226", "1,244", "1,262", "1,298", "1,316", "1,334", "1,352",
"1,37", "1,388", "1,406", "1,424", "1,43", "1,442", "1,46", "1,478",
"1,496", "1,514", "1,518", "1,532", "1,55", "1,56", "1,568",
"1,586", "1,604", "1,606", "1,622", "1,64", "1,658", "1,676",
"1,686", "1,694", "1,712", "1,73", "1,7359", "1,748", "1,7644",
"1,766", "1,7732", "1,782", "1,784", "1,7908", "1,7996", "1,802",
"1,812", "1,8172", "1,82", "1,826", "1,838", "1,8436", "1,856",
"1,8612", "1,87", "1,874", "1,892", "1,91", "1,928", "1,938",
"1,946", "1,964", "1,982", "10", "10,014", "10,068", "10,08",
"10,245", "10,32", "10,41", "10,44", "10,64", "10,641", "10,74",
"10,812", "10,96", "101,5", "107", "11,07", "11,184", "11,268",
"11,28", "11,4", "11,556", "11,6", "11,76", "11,92", "11,928",
"110,3", "112,5", "116,9", "118", "12,12", "12,192", "12,228",
"12,24", "12,3", "12,48", "12,56", "12,74", "12,84", "12,88",
"122,8", "124", "13,2", "13,54", "13,56", "13,62", "13,88", "13,92",
"130", "14,06", "14,22", "14,28", "14,5", "14,56", "14,64", "14,9",
"14,94", "15", "15,24", "15,39", "15,58", "15,78", "15,82", "15,92",
"16,17", "16,26", "16,56", "16,7", "16,95", "16,96", "17,34",
"17,418", "17,68", "17,73", "18,12", "18,51", "18,66", "18,76",
"18,9", "19,15", "19,32", "19,48", "19,74", "2", "2,029", "2,036",
"2,058", "2,064", "2,087", "2,116", "2,145", "2,174", "2,19",
"2,202", "2,203", "2,232", "2,261", "2,29", "2,348", "2,368",
"2,376", "2,377", "2,406", "2,435", "2,464", "2,522", "2,534",
"2,551", "2,562", "2,58", "2,609", "2,638", "2,696", "2,7", "2,725",
"2,748", "2,783", "2,812", "2,87", "2,899", "2,928", "2,934",
"2,957", "2,98", "2,986", "20,13", "20,16", "20,58", "21", "21,11",
"21,42", "21,6", "21,84", "22,13", "22,26", "22,6", "22,66",
"22,68", "23,1", "23,19", "23,56", "24,02", "24,2", "24,25",
"24,48", "24,78", "24,94", "25,31", "25,354", "25,4", "25,84",
"25,86", "25,96", "26,32", "26,78", "26,9", "27,24", "27,7",
"28,67", "28,72", "28,9556", "29,09", "29,23", "29,58", "29,74",
"29,85", "3,015", "3,044", "3,12", "3,131", "3,16", "3,189",
"3,218", "3,26", "3,276", "3,334", "3,363", "3,392", "3,421",
"3,45", "3,479", "3,508", "3,54", "3,595", "3,61", "3,624", "3,653",
"3,74", "3,798", "3,82", "3,827", "3,856", "3,914", "3,972",
"30,25", "30,76", "31,27", "31,78", "32,03", "32,29", "32,8",
"33,01", "33,304", "33,36", "33,5", "33,92", "34,03", "34,48",
"35,09", "35,6", "36", "36,68", "36,72", "37,28", "37,84", "38,4",
"38,82", "39", "39,2", "39,6", "4,001", "4,03", "4,059", "4,1",
"4,117", "4,146", "4,233", "4,291", "4,32", "4,345", "4,378",
"4,39", "4,407", "4,494", "4,552", "4,59", "4,61", "4,639", "4,68",
"4,697", "4,755", "4,813", "4,835", "4,871", "4,9", "4,97", "4,996",
"40,2", "40,8", "41,4", "42", "42,5", "42,6", "43,2", "44,4",
"45,04", "45,8", "45,808", "46,32", "46,96", "47,6", "48,24",
"48,304", "48,88", "49,2", "49,52", "5,028", "5,06", "5,08",
"5,124", "5,22", "5,26", "5,325", "5,348", "5,38", "5,444", "5,476",
"5,54", "5,55", "5,57", "5,636", "5,796", "5,828", "5,84", "5,86",
"5,871", "5,956", "50,16", "50,8", "52,6", "52,78", "53,308",
"56,05", "56,278", "56,872", "57,4", "57,604", "58,896", "59,44",
"59,5", "59,848", "59,984", "6,084", "6,13", "6,148", "6,172",
"6,18", "6,308", "6,404", "6,42", "6,473", "6,5", "6,628", "6,66",
"6,71", "6,774", "6,82", "6,884", "6,948", "6,98", "60,8", "61,344",
"62,16", "62,976", "63,15", "63,52", "66,8", "67,12", "67,193",
"67,558", "67,85", "68,58", "68,726", "69,456", "7", "7,075",
"7,14", "7,204", "7,236", "7,3", "7,364", "7,376", "7,46", "7,492",
"7,6", "7,677", "7,716", "7,78", "7,844", "7,9", "7,978", "70,04",
"70,77", "71,208", "71,354", "71,4", "71,5", "72,54", "75,42",
"76", "76,14", "76,3", "77,26", "79,5", "8,1", "8,166", "8,2",
"8,232", "8,279", "8,364", "8,43", "8,5", "8,58", "8,628", "8,727",
"8,76", "8,793", "8,8", "8,952", "80,35", "81", "82,05", "83,75",
"86", "86,3", "88,9", "89,8", "9,09", "9,1", "9,189", "9,324",
"9,4", "9,42", "9,486", "9,585", "9,696", "9,7", "9,75", "9,849",
"90,25", "91", "96"), class = "factor")), .Names = c("Data",
"Osielec", "Jordanów", "Skawica.Dolna..Skawica."), row.names = 26:50, class = "data.frame")
</code>```

答:
You need to convert your variable into numeric and you're more or less done. I use scale_y_continuous here.

```<code>library(ggplot2)

dane_dlugie$Osielec <- as.numeric(dane_dlugie$Osielec)
ggplot(dane_dlugie, aes(x=Data, y=Osielec, group=1)) +
  geom_line()+labs(x="Data", y="Flow") +
  ggtitle("Osielec")+
  scale_y_continuous(breaks = 1:5) +
  scale_x_datetime(date_breaks = "1 day", date_labels = "%d-%m")
</code>```

Title: Ggplot2 doesn't scale Y axis

Body:
I'm having a problem regarding scaling Y axis on the ggplot2. I have a dataset (dane_dlugie) consisted of dates (Data) and river flow observations at three different spots (Osielec, Jordanów and Skawica Dolna). My goal is to plot flows from Osielec regarding the proper date.

My plot code looks like this:

ggplot(dane_dlugie, aes(x=Data, y=Osielec, group=1)) +
  geom_line()+labs(x="Data", y="Flow") +
  ggtitle("Osielec")+
  scale_x_datetime(date_breaks = "1 day", date_labels = "%d-%m")

On the Y axis, I would like to have flow scale with the break of 1 m3/s. I've tried using the 'scale_y_discrete' however without any success.

Could anyone help me with that?

Please find below the reproducible example.

dane_dlugie <- structure(list(Data = structure(list(sec = c(0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), min = c(0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,
0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), hour = c(0L, 1L, 2L, 3L, 4L,
5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L,
19L, 20L, 21L, 22L, 23L, 0L), mday = c(1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 2L), mon = c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L),
    year = c(110L, 110L, 110L, 110L, 110L, 110L, 110L, 110L,
    110L, 110L, 110L, 110L, 110L, 110L, 110L, 110L, 110L, 110L,
    110L, 110L, 110L, 110L, 110L, 110L, 110L), wday = c(6L, 6L,
    6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L,
    6L, 6L, 6L, 6L, 6L, 6L, 6L, 0L), yday = c(120L, 120L, 120L,
    120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L,
    120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L, 120L,
    120L, 121L), isdst = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
    1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
    1L), zone = c("CEST", "CEST", "CEST", "CEST", "CEST", "CEST",
    "CEST", "CEST", "CEST", "CEST", "CEST", "CEST", "CEST", "CEST",
    "CEST", "CEST", "CEST", "CEST", "CEST", "CEST", "CEST", "CEST",
    "CEST", "CEST", "CEST"), gmtoff = c(NA_integer_, NA_integer_,
    NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_,
    NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_,
    NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_,
    NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_,
    NA_integer_, NA_integer_, NA_integer_)), .Names = c("sec",
"min", "hour", "mday", "mon", "year", "wday", "yday", "isdst",
"zone", "gmtoff"), class = c("POSIXlt", "POSIXt")), Osielec = c("1.281",
"1.294", "1.294", "1.281", "1.268", "1.281", "1.294", "1.333",
"1.32", "1.32", "1.333", "1.307", "1.333", "1.346", "1.346",
"1.359", "1.32", "1.32", "1.294", "1.5328", "2.0296", "2.1952",
"2.7541", "4.1775", "4.5983"), Jordanów = structure(c(124L, 124L,
118L, 115L, 108L, 108L, 108L, 115L, 103L, 111L, 127L, 120L, 122L,
120L, 116L, 125L, 122L, 111L, 122L, 206L, 258L, 236L, 234L, 266L,
281L), .Label = c("", "0,1672", "0,1696", "0,172", "0,1744",
"0,1768", "0,1792", "0,1816", "0,184", "0,1864", "0,1888", "0,1912",
"0,1936", "0,196", "0,1984", "0,2008", "0,2032", "0,2056", "0,208",
"0,2104", "0,2128", "0,2152", "0,2176", "0,22", "0,2224", "0,2248",
"0,2272", "0,2296", "0,232", "0,2344", "0,2368", "0,2392", "0,2416",
"0,244", "0,2464", "0,2488", "0,2512", "0,2536", "0,256", "0,2584",
"0,2608", "0,2632", "0,2656", "0,268", "0,2704", "0,2728", "0,2752",
"0,2776", "0,28", "0,2824", "0,2848", "0,2872", "0,2896", "0,2944",
"0,2968", "0,2992", "0,3016", "0,304", "0,3064", "0,3088", "0,3112",
"0,3136", "0,316", "0,3184", "0,3208", "0,3232", "0,3256", "0,3264",
"0,328", "0,3304", "0,3328", "0,333", "0,3352", "0,3354", "0,3362",
"0,3376", "0,34", "0,3424", "0,3448", "0,3472", "0,3496", "0,3497",
"0,352", "0,3544", "0,3568", "0,3588", "0,3592", "0,3616", "0,3623",
"0,364", "0,3664", "0,3688", "0,3712", "0,3736", "0,376", "0,3784",
"0,3808", "0,3832", "0,3856", "0,388", "0,3904", "0,3928", "0,394",
"0,3952", "0,3976", "0,4", "0,4042", "0,4076", "0,4084", "0,4126",
"0,4144", "0,4168", "0,4178", "0,421", "0,4212", "0,4246", "0,4252",
"0,428", "0,4294", "0,4314", "0,4336", "0,4348", "0,4378", "0,4382",
"0,4416", "0,442", "0,445", "0,4462", "0,4484", "0,4504", "0,4518",
"0,4546", "0,4552", "0,4588", "0,463", "0,4672", "0,4714", "0,4756",
"0,4798", "0,484", "0,4882", "0,4924", "0,4966", "0,5008", "0,505",
"0,5092", "0,5134", "0,5176", "0,5218", "0,526", "0,5302", "0,5344",
"0,5386", "0,5428", "0,547", "0,5512", "0,5554", "0,5596", "0,5638",
"0,568", "0,5722", "0,5764", "0,5806", "0,5848", "0,589", "0,5932",
"0,5974", "0,6016", "0,6058", "0,61", "0,6116", "0,6142", "0,6184",
"0,6226", "0,6268", "0,631", "0,6352", "0,6394", "0,6436", "0,6478",
"0,652", "0,6562", "0,6604", "0,6646", "0,6688", "0,673", "0,6772",
"0,6814", "0,6856", "0,6898", "0,694", "0,6982", "0,7024", "0,7066",
"0,7108", "0,715", "0,7192", "0,7234", "0,7276", "0,7318", "0,736",
"0,7402", "0,7444", "0,7486", "0,7528", "0,7556", "0,757", "0,7584",
"0,7612", "0,7654", "0,7696", "0,7738", "0,778", "0,7822", "0,7864",
"0,7906", "0,7948", "0,799", "0,8032", "0,8074", "0,8116", "0,8158",
"0,82", "0,8258", "0,8316", "0,8374", "0,8432", "0,849", "0,8548",
"0,8606", "0,8664", "0,8722", "0,878", "0,8804", "0,8838", "0,8856",
"0,8896", "0,8954", "0,9012", "0,907", "0,9128", "0,9186", "0,9244",
"0,9302", "0,936", "0,9418", "0,9476", "0,9534", "0,9592", "0,965",
"0,9708", "0,9766", "0,9824", "0,9882", "0,9916", "0,994", "0,9998",
"1,0052", "1,0056", "1,0064", "1,0114", "1,0172", "1,023", "1,0288",
"1,0346", "1,0364", "1,0404", "1,0462", "1,052", "1,0578", "1,0636",
"1,0694", "1,0752", "1,081", "1,0868", "1,0926", "1,0984", "1,1042",
"1,11", "1,1158", "1,1196", "1,1216", "1,1248", "1,1274", "1,1332",
"1,139", "1,1448", "1,1506", "1,156", "1,1564", "1,1622", "1,1664",
"1,168", "1,1738", "1,1796", "1,1854", "1,1912", "1,197", "1,2028",
"1,2086", "1,2144", "1,2184", "1,2202", "1,2236", "1,226", "1,2288",
"1,2318", "1,234", "1,2376", "1,2492", "1,2496", "1,2548", "1,255",
"1,26", "1,2608", "1,2666", "1,2724", "1,2754", "1,2782", "1,284",
"1,2898", "1,2908", "1,2956", "1,2985", "1,3014", "1,3072", "1,313",
"1,3139", "1,3188", "1,3246", "1,3293", "1,3304", "1,3362", "1,337",
"1,3415", "1,342", "1,3478", "1,3536", "1,3594", "1,3652", "1,3678",
"1,371", "1,3755", "1,3768", "1,3826", "1,3884", "1,3942", "1,4",
"1,408", "1,414", "1,416", "1,4217", "1,424", "1,432", "1,4371",
"1,44", "1,4448", "1,448", "1,4525", "1,4602", "1,464", "1,4679",
"1,472", "1,4756", "1,48", "1,4833", "1,488", "1,491", "1,496",
"1,4987", "1,5064", "1,512", "1,5141", "1,52", "1,528", "1,536",
"1,5372", "1,544", "1,5449", "1,552", "1,5526", "1,56", "1,5603",
"1,568", "1,5757", "1,576", "1,5834", "1,584", "1,5911", "1,592",
"1,6065", "1,608", "1,616", "1,6219", "1,624", "1,632", "1,64",
"1,648", "1,6527", "1,664", "1,672", "1,68", "1,6835", "1,688",
"1,6912", "1,696", "1,6989", "1,704", "1,7066", "1,712", "1,7143",
"1,7297", "1,736", "1,744", "1,7451", "1,752", "1,7528", "1,76",
"1,768", "1,776", "1,7836", "1,784", "1,792", "1,799", "1,8",
"1,8067", "1,816", "1,8221", "1,824", "1,8298", "1,832", "1,8375",
"1,84", "1,8452", "1,848", "1,8529", "1,856", "1,864", "1,872",
"1,876", "1,888", "1,8914", "1,896", "1,8991", "1,904", "1,9068",
"1,912", "1,92", "1,9222", "1,928", "1,936", "1,9376", "1,944",
"1,9453", "1,952", "1,953", "1,96", "1,968", "1,9684", "1,976",
"1,984", "1,9915", "1,992", "10,0136", "10,014", "10,035", "10,098",
"10,14", "10,203", "10,371", "10,434", "10,455", "10,518", "10,539",
"10,56", "10,833", "10,854", "10,875", "10,938", "10,959", "11,064",
"11,106", "11,169", "11,184", "11,211", "11,232", "11,274", "11,337",
"11,358", "11,444", "11,576", "11,664", "11,686", "11,862", "11,884",
"12,104", "12,214", "12,236", "12,368", "12,434", "12,456", "12,72",
"12,786", "12,918", "12,94", "13,028", "13,05", "13,072", "13,094",
"13,182", "13,27", "13,314", "13,325", "13,424", "13,446", "13,578",
"13,715", "13,991", "14,014", "14,037", "14,083", "14,152", "14,29",
"14,451", "14,497", "14,635", "14,727", "14,819", "14,957", "15,003",
"15,164", "15,21", "15,225", "15,375", "15,417", "15,44", "15,601",
"15,67", "15,805", "15,808", "16,125", "16,15", "16,183", "16,291",
"16,35", "16,399", "16,45", "16,65", "16,725", "16,925", "17,15",
"17,225", "17,475", "17,775", "17,938", "18,1", "18,2", "18,325",
"18,35", "18,562", "18,778", "18,886", "19,021", "19,048", "19,102",
"19,237", "19,453", "19,588", "19,696", "19,885", "19,912", "2",
"2,0069", "2,008", "2,0146", "2,016", "2,024", "2,032", "2,04",
"2,0494", "2,056", "2,064", "2,0688", "2,072", "2,08", "2,088",
"2,0882", "2,096", "2,104", "2,1076", "2,112", "2,12", "2,127",
"2,128", "2,136", "2,1367", "2,144", "2,152", "2,16", "2,1658",
"2,168", "2,176", "2,184", "2,1852", "2,192", "2,2", "2,21",
"2,2143", "2,22", "2,224", "2,23", "2,2337", "2,24", "2,2434",
"2,25", "2,2531", "2,26", "2,27", "2,2725", "2,28", "2,29", "2,3",
"2,3016", "2,31", "2,3113", "2,32", "2,321", "2,33", "2,3404",
"2,35", "2,3598", "2,36", "2,3695", "2,37", "2,3889", "2,39",
"2,3986", "2,4", "2,41", "2,418", "2,4277", "2,43", "2,4374",
"2,44", "2,4471", "2,45", "2,4568", "2,46", "2,47", "2,4762",
"2,48", "2,4859", "2,49", "2,5053", "2,51", "2,515", "2,52",
"2,5247", "2,54", "2,5441", "2,55", "2,56", "2,5635", "2,58",
"2,5829", "2,59", "2,5926", "2,6", "2,61", "2,62", "2,63", "2,64",
"2,6411", "2,65", "2,6508", "2,66", "2,67", "2,6799", "2,68",
"2,69", "2,6993", "2,7", "2,71", "2,7187", "2,72", "2,7284",
"2,73", "2,7381", "2,7478", "2,75", "2,7575", "2,76", "2,7672",
"2,78", "2,7866", "2,79", "2,7963", "2,8", "2,81", "2,82", "2,8254",
"2,83", "2,8351", "2,84", "2,8448", "2,85", "2,8545", "2,86",
"2,8642", "2,87", "2,8739", "2,88", "2,89", "2,8933", "2,9",
"2,91", "2,9127", "2,92", "2,9224", "2,93", "2,94", "2,9418",
"2,95", "2,9515", "2,96", "2,97", "2,98", "2,9806", "2,99", "2,9903",
"20,101", "20,155", "20,182", "20,217", "20,506", "20,695", "21,43",
"21,52", "21,713", "21,94", "22,03", "22,09", "22,27", "22,63",
"22,78", "23,015", "23,046", "23,14", "23,59", "23,65", "23,98",
"24,298", "24,595", "24,727", "24,958", "25,189", "25,42", "26,113",
"26,179", "26,641", "26,74", "26,872", "26,971", "27,616", "27,832",
"28,336", "29,668", "29,956", "3", "3,01", "3,011", "3,02", "3,022",
"3,03", "3,033", "3,04", "3,044", "3,05", "3,055", "3,06", "3,07",
"3,077", "3,08", "3,088", "3,09", "3,099", "3,1", "3,11", "3,13",
"3,14", "3,143", "3,15", "3,154", "3,16", "3,165", "3,17", "3,176",
"3,18", "3,19", "3,198", "3,2", "3,209", "3,212", "3,224", "3,242",
"3,248", "3,253", "3,26", "3,264", "3,272", "3,275", "3,284",
"3,286", "3,296", "3,297", "3,308", "3,319", "3,32", "3,33",
"3,332", "3,341", "3,344", "3,352", "3,363", "3,368", "3,38",
"3,392", "3,396", "3,404", "3,407", "3,416", "3,428", "3,429",
"3,44", "3,451", "3,452", "3,462", "3,473", "3,488", "3,5", "3,506",
"3,512", "3,517", "3,524", "3,536", "3,539", "3,548", "3,56",
"3,561", "3,572", "3,583", "3,594", "3,596", "3,605", "3,608",
"3,616", "3,62", "3,632", "3,638", "3,649", "3,656", "3,668",
"3,68", "3,682", "3,692", "3,693", "3,704", "3,715", "3,716",
"3,728", "3,74", "3,752", "3,759", "3,764", "3,776", "3,788",
"3,792", "3,8", "3,812", "3,814", "3,824", "3,825", "3,836",
"3,847", "3,86", "3,872", "3,884", "3,891", "3,896", "3,908",
"3,932", "3,956", "3,968", "3,98", "3,99", "3,992", "30,028",
"30,532", "30,676", "30,892", "31,533", "31,798", "31,943", "32,189",
"32,763", "32,927", "33,009", "33,173", "33,296", "33,46", "33,583",
"33,73", "33,788", "34,948", "35,241", "35,57", "36,181", "36,369",
"37,027", "37,121", "37,5", "38,202", "38,343", "38,437", "38,484",
"38,531", "39,001", "39,236", "39,659", "39,753", "4,001", "4,004",
"4,028", "4,04", "4,045", "4,056", "4,064", "4,076", "4,088",
"4,089", "4,1", "4,112", "4,121", "4,124", "4,136", "4,139",
"4,16", "4,172", "4,178", "4,191", "4,204", "4,22", "4,232",
"4,243", "4,256", "4,268", "4,28", "4,282", "4,304", "4,308",
"4,316", "4,321", "4,328", "4,34", "4,352", "4,364", "4,388",
"4,4", "4,425", "4,428", "4,442", "4,456", "4,484", "4,498",
"4,526", "4,529", "4,54", "4,554", "4,582", "4,594", "4,596",
"4,607", "4,624", "4,638", "4,652", "4,666", "4,685", "4,694",
"4,708", "4,722", "4,736", "4,75", "4,764", "4,778", "4,792",
"4,806", "4,82", "4,834", "4,841", "4,848", "4,876", "4,904",
"4,918", "4,932", "4,945", "4,958", "4,96", "4,974", "4,984",
"40,06", "40,164", "40,216", "40,528", "40,944", "41,048", "41,152",
"41,412", "41,568", "41,88", "41,932", "42,4", "42,816", "45,29",
"45,812", "46,16", "46,682", "47,088", "47,668", "47,842", "48,132",
"49,872", "49,93", "5,016", "5,023", "5,03", "5,044", "5,058",
"5,072", "5,075", "5,1", "5,114", "5,128", "5,142", "5,153",
"5,184", "5,212", "5,218", "5,226", "5,24", "5,244", "5,254",
"5,268", "5,282", "5,296", "5,324", "5,338", "5,352", "5,366",
"5,374", "5,38", "5,394", "5,422", "5,436", "5,45", "5,475",
"5,478", "5,492", "5,506", "5,52", "5,534", "5,562", "5,576",
"5,59", "5,604", "5,618", "5,632", "5,646", "5,674", "5,685",
"5,716", "5,73", "5,744", "5,8", "5,832", "5,848", "5,864", "5,88",
"5,91", "5,912", "5,925", "5,928", "5,944", "5,96", "5,976",
"50,8", "52,226", "52,474", "53,032", "53,962", "54,024", "54,458",
"54,582", "55,078", "55,45", "55,636", "56,194", "57,068", "58,564",
"59,176", "6,008", "6,024", "6,04", "6,045", "6,056", "6,072",
"6,088", "6,104", "6,12", "6,136", "6,152", "6,232", "6,248",
"6,264", "6,285", "6,296", "6,312", "6,328", "6,33", "6,345",
"6,36", "6,375", "6,376", "6,408", "6,44", "6,45", "6,456", "6,472",
"6,48", "6,488", "6,495", "6,504", "6,51", "6,52", "6,54", "6,552",
"6,555", "6,584", "6,6", "6,632", "6,645", "6,648", "6,66", "6,664",
"6,68", "6,705", "6,735", "6,744", "6,76", "6,776", "6,808",
"6,824", "6,856", "6,872", "6,888", "6,904", "6,92", "6,936",
"6,952", "6,968", "6,984", "60,808", "62,372", "63,664", "64,448",
"65,024", "66,968", "68,336", "68,696", "69,632", "7,016", "7,08",
"7,096", "7,112", "7,128", "7,144", "7,176", "7,192", "7,208",
"7,24", "7,288", "7,304", "7,32", "7,336", "7,352", "7,368",
"7,384", "7,4", "7,419", "7,438", "7,476", "7,533", "7,552",
"7,571", "7,59", "7,609", "7,628", "7,647", "7,666", "7,685",
"7,704", "7,723", "7,742", "7,78", "7,818", "7,837", "7,856",
"7,913", "7,932", "7,97", "7,989", "70,712", "71,539", "74,388",
"74,542", "76,929", "78,623", "8,008", "8,027", "8,084", "8,103",
"8,122", "8,198", "8,217", "8,236", "8,2588", "8,274", "8,293",
"8,331", "8,388", "8,407", "8,426", "8,464", "8,502", "8,54",
"8,635", "8,673", "8,692", "8,711", "8,768", "8,787", "8,806",
"8,882", "8,901", "8,92", "8,939", "8,958", "8,996", "80,212",
"83,74", "86,092", "88,664", "9,034", "9,072", "9,11", "9,129",
"9,205", "9,321", "9,405", "9,447", "9,489", "9,51", "9,552",
"9,741", "9,783", "9,867", "9,888", "9,93", "9,951", "90,32",
"91,608", "92,528", "94,552"), class = "factor"), Skawica.Dolna..Skawica. = structure(c(44L,
35L, 35L, 35L, 35L, 35L, 44L, 58L, 71L, 71L, 71L, 71L, 189L,
174L, 174L, 166L, 71L, 71L, 161L, 166L, 166L, 166L, 182L, 258L,
258L), .Label = c("", "1,023", "1,045", "1,056", "1,067", "1,078",
"1,089", "1,1", "1,118", "1,136", "1,154", "1,172", "1,19", "1,208",
"1,226", "1,244", "1,262", "1,298", "1,316", "1,334", "1,352",
"1,37", "1,388", "1,406", "1,424", "1,43", "1,442", "1,46", "1,478",
"1,496", "1,514", "1,518", "1,532", "1,55", "1,56", "1,568",
"1,586", "1,604", "1,606", "1,622", "1,64", "1,658", "1,676",
"1,686", "1,694", "1,712", "1,73", "1,7359", "1,748", "1,7644",
"1,766", "1,7732", "1,782", "1,784", "1,7908", "1,7996", "1,802",
"1,812", "1,8172", "1,82", "1,826", "1,838", "1,8436", "1,856",
"1,8612", "1,87", "1,874", "1,892", "1,91", "1,928", "1,938",
"1,946", "1,964", "1,982", "10", "10,014", "10,068", "10,08",
"10,245", "10,32", "10,41", "10,44", "10,64", "10,641", "10,74",
"10,812", "10,96", "101,5", "107", "11,07", "11,184", "11,268",
"11,28", "11,4", "11,556", "11,6", "11,76", "11,92", "11,928",
"110,3", "112,5", "116,9", "118", "12,12", "12,192", "12,228",
"12,24", "12,3", "12,48", "12,56", "12,74", "12,84", "12,88",
"122,8", "124", "13,2", "13,54", "13,56", "13,62", "13,88", "13,92",
"130", "14,06", "14,22", "14,28", "14,5", "14,56", "14,64", "14,9",
"14,94", "15", "15,24", "15,39", "15,58", "15,78", "15,82", "15,92",
"16,17", "16,26", "16,56", "16,7", "16,95", "16,96", "17,34",
"17,418", "17,68", "17,73", "18,12", "18,51", "18,66", "18,76",
"18,9", "19,15", "19,32", "19,48", "19,74", "2", "2,029", "2,036",
"2,058", "2,064", "2,087", "2,116", "2,145", "2,174", "2,19",
"2,202", "2,203", "2,232", "2,261", "2,29", "2,348", "2,368",
"2,376", "2,377", "2,406", "2,435", "2,464", "2,522", "2,534",
"2,551", "2,562", "2,58", "2,609", "2,638", "2,696", "2,7", "2,725",
"2,748", "2,783", "2,812", "2,87", "2,899", "2,928", "2,934",
"2,957", "2,98", "2,986", "20,13", "20,16", "20,58", "21", "21,11",
"21,42", "21,6", "21,84", "22,13", "22,26", "22,6", "22,66",
"22,68", "23,1", "23,19", "23,56", "24,02", "24,2", "24,25",
"24,48", "24,78", "24,94", "25,31", "25,354", "25,4", "25,84",
"25,86", "25,96", "26,32", "26,78", "26,9", "27,24", "27,7",
"28,67", "28,72", "28,9556", "29,09", "29,23", "29,58", "29,74",
"29,85", "3,015", "3,044", "3,12", "3,131", "3,16", "3,189",
"3,218", "3,26", "3,276", "3,334", "3,363", "3,392", "3,421",
"3,45", "3,479", "3,508", "3,54", "3,595", "3,61", "3,624", "3,653",
"3,74", "3,798", "3,82", "3,827", "3,856", "3,914", "3,972",
"30,25", "30,76", "31,27", "31,78", "32,03", "32,29", "32,8",
"33,01", "33,304", "33,36", "33,5", "33,92", "34,03", "34,48",
"35,09", "35,6", "36", "36,68", "36,72", "37,28", "37,84", "38,4",
"38,82", "39", "39,2", "39,6", "4,001", "4,03", "4,059", "4,1",
"4,117", "4,146", "4,233", "4,291", "4,32", "4,345", "4,378",
"4,39", "4,407", "4,494", "4,552", "4,59", "4,61", "4,639", "4,68",
"4,697", "4,755", "4,813", "4,835", "4,871", "4,9", "4,97", "4,996",
"40,2", "40,8", "41,4", "42", "42,5", "42,6", "43,2", "44,4",
"45,04", "45,8", "45,808", "46,32", "46,96", "47,6", "48,24",
"48,304", "48,88", "49,2", "49,52", "5,028", "5,06", "5,08",
"5,124", "5,22", "5,26", "5,325", "5,348", "5,38", "5,444", "5,476",
"5,54", "5,55", "5,57", "5,636", "5,796", "5,828", "5,84", "5,86",
"5,871", "5,956", "50,16", "50,8", "52,6", "52,78", "53,308",
"56,05", "56,278", "56,872", "57,4", "57,604", "58,896", "59,44",
"59,5", "59,848", "59,984", "6,084", "6,13", "6,148", "6,172",
"6,18", "6,308", "6,404", "6,42", "6,473", "6,5", "6,628", "6,66",
"6,71", "6,774", "6,82", "6,884", "6,948", "6,98", "60,8", "61,344",
"62,16", "62,976", "63,15", "63,52", "66,8", "67,12", "67,193",
"67,558", "67,85", "68,58", "68,726", "69,456", "7", "7,075",
"7,14", "7,204", "7,236", "7,3", "7,364", "7,376", "7,46", "7,492",
"7,6", "7,677", "7,716", "7,78", "7,844", "7,9", "7,978", "70,04",
"70,77", "71,208", "71,354", "71,4", "71,5", "72,54", "75,42",
"76", "76,14", "76,3", "77,26", "79,5", "8,1", "8,166", "8,2",
"8,232", "8,279", "8,364", "8,43", "8,5", "8,58", "8,628", "8,727",
"8,76", "8,793", "8,8", "8,952", "80,35", "81", "82,05", "83,75",
"86", "86,3", "88,9", "89,8", "9,09", "9,1", "9,189", "9,324",
"9,4", "9,42", "9,486", "9,585", "9,696", "9,7", "9,75", "9,849",
"90,25", "91", "96"), class = "factor")), .Names = c("Data",
"Osielec", "Jordanów", "Skawica.Dolna..Skawica."), row.names = 26:50, class = "data.frame")

Body:
You need to convert your variable into numeric and you're more or less done. I use scale_y_continuous here.

library(ggplot2)

dane_dlugie$Osielec <- as.numeric(dane_dlugie$Osielec)
ggplot(dane_dlugie, aes(x=Data, y=Osielec, group=1)) +
  geom_line()+labs(x="Data", y="Flow") +
  ggtitle("Osielec")+
  scale_y_continuous(breaks = 1:5) +
  scale_x_datetime(date_breaks = "1 day", date_labels = "%d-%m")


问:
OpenCV hog features explanation
I am trying to calculate  dense feature trajectories of a video as in https://hal.inria.fr/hal-00725627/document. I am trying to use openCV hog descriptors like this:

```<code>winSize = (32,32)
blockSize = (32,32)
blockStride = (2,2)
cellSize = (2,2)
nbins = 9

hog = cv2.HOGDescriptor(winSize,blockSize,blockStride,cellSize,nbins)
hist = hog.compute(img)
</code>```

However, this returns a very large feature vector of size: (160563456, 1).

What is a window? (winSize)
What is a block?
What is a cell?
The documentation isn't particularly helpful at explaining what each of these parameters is.

From http://www.learnopencv.com/histogram-of-oriented-gradients/
I see that to compute HOGs we create a histogram for each cell of an image patch and then normalise over the patch.

What I want is 4 9bin histograms for each (32, 32) patch of my image which should be calculated from the histograms of the (16,16) cells from this patch. So I would expect a final hog feature of size  40716 for a (480,640) image.

(((32*32)   /     (16*16)) * 9) * (((480-16*640-16)/(32*32)*4)) = 40716

((PatchSize / cell size) * numBins) * numPatches = hogSize

I have also seen people doing stuff like this:

```<code>winStride = (8,8)
padding = (8,8)
locations = ((10,20),)
hist = hog.compute(image,winStride,padding,locations)
</code>```

However, I don't understand what the locations parameter does as I do not wish to only compute the HOG features at a single location but for all (32,32) patches of my image.

答:
We divide the image into cells of mxn pixels. Let's say 8x8.
So a 64x64 image would result in 8x8 cells of 8x8 pixels.

To reduce overall brightness effects we add a normalization stop into the feature calculation. A block contains several cells. Instead of normalizing each cell we normalize across a block. A 32x32 pixel block would contain 4x4 8x8 pixel cells.

A window is the part of the image we calculate the feature descriptor for.
Let's say you want to find something of 64x64 pixels in a large image. You then would slide a 64x64 pixel window across the image and calculate the feature descriptor for each location which you then use to find the location of best match...

It's all in the documents. Just read it and experiment until you understand it.
If you can't follow the documentation, read the source code and see what is going on line by line.

Title: OpenCV hog features explanation

Body:
I am trying to calculate  dense feature trajectories of a video as in https://hal.inria.fr/hal-00725627/document. I am trying to use openCV hog descriptors like this:

winSize = (32,32)
blockSize = (32,32)
blockStride = (2,2)
cellSize = (2,2)
nbins = 9

hog = cv2.HOGDescriptor(winSize,blockSize,blockStride,cellSize,nbins)
hist = hog.compute(img)

However, this returns a very large feature vector of size: (160563456, 1).

What is a window? (winSize)
What is a block?
What is a cell?
The documentation isn't particularly helpful at explaining what each of these parameters is.

From http://www.learnopencv.com/histogram-of-oriented-gradients/
I see that to compute HOGs we create a histogram for each cell of an image patch and then normalise over the patch.

What I want is 4 9bin histograms for each (32, 32) patch of my image which should be calculated from the histograms of the (16,16) cells from this patch. So I would expect a final hog feature of size  40716 for a (480,640) image.

(((32*32)   /     (16*16)) * 9) * (((480-16*640-16)/(32*32)*4)) = 40716

((PatchSize / cell size) * numBins) * numPatches = hogSize

I have also seen people doing stuff like this:

winStride = (8,8)
padding = (8,8)
locations = ((10,20),)
hist = hog.compute(image,winStride,padding,locations)

However, I don't understand what the locations parameter does as I do not wish to only compute the HOG features at a single location but for all (32,32) patches of my image.


问:
Using aws chalice to build a single page application?
Has anyone here ever worked with chalice?  Its an aws tool for creating api's.  I want to use it to create a single page application, but Im not sure how to actually serve html from it.  I've seen videos where its explored, but I can't figure out how they actually built the thing.  Anyone have any advice on where to go, how to start this?</p>

答:
You wouldn't serve HTML from Chalice directly. It is explicitly designed to work in concert with AWS Lambda and API Gateway to serve dynamic, API-centric content. For the static parts of an SPA, you would use a web server (nginx or Apache) or S3 (with or without CloudFront).

Assuming you are interested in a purely "serverless" application model, I suggest looking into using the API Gateway "Proxy" resource type, forwarding to static resources on S3.

Worth noting that it's probably possible to serve HTML from Chalice, but from an architecture perspective, that's not the intent of the framework and you'd be swimming upstream to get all the capabilities and benefits from tools purpose-built for serving static traffic (full HTTP semantics w/ caching, conditional gets, etc)


问:
setting a placeholder attribute with translation in Symfony2 form input
I am using FOSUserBundle for managing my users. In order to register user, I reused the form of the bundle which meets my needs. Nevertheless, I needed to set some attributes of my fields. This is was done easyly by twig like this:

```<code>    {{ form_widget(form.username, { 'attr': {'class': "span12",
        'placeholder': "Username"} }) }}
</code>```

Now, my goal is to make automatic translation on my placeholder, so I proposed this code:

```<code>    {{ form_widget(form.username, { 'attr': {'class': "span12",
        'placeholder': "{{'security.login.usernameplaceholder'|trans}}"} }) }}
</code>```

This previous code produced an input with placeholder value equal to {{'security.login.usernameplaceholder'|trans}}

To get rid of this problem, I tried to set variable for that but symfony generated an error!!!

```<code>    {% set usernameplaceholder = {{'security.login.usernameplaceholder'|trans}} %}
    {{ form_widget(form.username, { 'attr': {'class': "span12",
        'placeholder': usernameplaceholder} }) }}
</code>```

Is there any proposition to solve this problem?

Thanks,

答:
For Symfony 3.x, 4.x

Another way to add placeholders (or any attributes for that matter) is by passing an options-array to the form $builder containing another Array attr with attributes as key-value pairs.

```<code>// The parameters are column name, form-type and options-array respectively.
$builder->add('field', null, array(
            'attr' => array(
                 'placeholder' => 'support.contact.titleplaceholder'
             )
        ));
</code>```

Body:
I am using FOSUserBundle for managing my users. In order to register user, I reused the form of the bundle which meets my needs. Nevertheless, I needed to set some attributes of my fields. This is was done easyly by twig like this:

    {{ form_widget(form.username, { 'attr': {'class': "span12",
        'placeholder': "Username"} }) }}

Now, my goal is to make automatic translation on my placeholder, so I proposed this code:

    {{ form_widget(form.username, { 'attr': {'class': "span12",
        'placeholder': "{{'security.login.usernameplaceholder'|trans}}"} }) }}

This previous code produced an input with placeholder value equal to {{'security.login.usernameplaceholder'|trans}}

To get rid of this problem, I tried to set variable for that but symfony generated an error!!!

    {% set usernameplaceholder = {{'security.login.usernameplaceholder'|trans}} %}
    {{ form_widget(form.username, { 'attr': {'class': "span12",
        'placeholder': usernameplaceholder} }) }}

Is there any proposition to solve this problem?

Thanks,

Body:
For Symfony 3.x, 4.x

Another way to add placeholders (or any attributes for that matter) is by passing an options-array to the form $builder containing another Array attr with attributes as key-value pairs.

// The parameters are column name, form-type and options-array respectively.
$builder->add('field', null, array(
            'attr' => array(
                 'placeholder' => 'support.contact.titleplaceholder'
             )
        ));

ContentLicense: CC BY-SA 4.0


问:
javascript: get url path
```<code>var url = 'http://domain.com/file.php?id=1';
</code>```

or

```<code>var url = 'https://domain.us/file.php?id=1'
</code>```

or

```<code>var url = 'domain.de/file.php?id=1';
</code>```

or

```<code>var url = 'subdomain.domain.com/file.php?id=1'
</code>```

from either one of these urls I want to get only the path, in the case above:

```<code>var path = '/file.php?id=1';
</code>```

答: Use string.lastIndexOf(searchstring, start) instead of a regex. Then check if the index is within bounds and get substring from last slash to end of the string.</p>

Title: javascript: get url path

Body:
var url = 'http://domain.com/file.php?id=1';

or

var url = 'https://domain.us/file.php?id=1'

or

var url = 'domain.de/file.php?id=1';

or

var url = 'subdomain.domain.com/file.php?id=1'

from either one of these urls I want to get only the path, in the case above:

var path = '/file.php?id=1';


问:
changing the URL structure of lektor for blog posts to be in the parent directory
the problem:
we are porting a wordpress blog to lektor. The slugs in wordpress of the post are directly under the main domain e.g. www.mypage.com/my-blogpost-about-food/ not www.mypage.com/blog/my-blogpost-about-food/.

Now the owner is not ready to accept any broken links. Broken links from the outside, e.g. some random internet page links to www.mypage.com/my-blogpost-about-food/. This link will not work in lektor. This will decrease the page rank of the redesign of the page with lektor. What can I do to avoid this?

Again, in our current wordpress website

the main blog page sits under:

```<code>www.mypage.com/blog/
</code>```

each blog post has a unique slug, NOT under /blog/ but directly in the main.
e.g.

```<code>www.mypage.com/my-blogpost-about-food/
</code>```

What can I do, to make these URLs be valid for lektor as well? that e.g. mypage.com/my-blogpost-about-food is a blog post.

EDIT: this is what lektor does not support. Blog posts in lektor must sit in www.mypage.com/blog/SINGLE-BLOG-POSTS-MUSTBEHERE but I want the blog posts to be here www.mypage.com/SINGLE-BLOG-POSTS-MUSTBEHERE

reading here
https://www.getlektor.com/docs/content/urls/

if I go to the system fields and enter my-blogpost-about-food it will still appear in /blog/my-blogpost-about-food/

reading here it becomes clear that I cannot change the slug in the parent model neither:

With the above settings the blog will live at blog/ and the posts at
  blog/. But what if you want to put the date of the blog
  post into the URL? That's thankfully very easy. All you need to do is
  to set up a new URL format for the children. Just edit blog.ini and
  add this to the [children] section:

```<code>slug_format = {{ (this.pub_date|dateformat('YYYY/M/') if this.pub_date) ~ this._id }}
</code>```

What this does is that it will prepend the year (YYYY) and month (M)
  to the ID of the page if the publication date is configured. Otherwise
  it will just use the ID of the page. With this change our blog post
  will move from for instance blog/hello/ to blog/2015/12/hello/.

now how would I achieve a behaviour similar to this?

this is the formal of the perma links of our wordpress installation:

答:
I'm not certain I understand exactly what you want to achieve. If I understand correctly you can possibly solve this using the replaced_with for children functionality:

https://www.getlektor.com/docs/guides/categories/

Body:
the problem:
we are porting a wordpress blog to lektor. The slugs in wordpress of the post are directly under the main domain e.g. www.mypage.com/my-blogpost-about-food/ not www.mypage.com/blog/my-blogpost-about-food/.

Now the owner is not ready to accept any broken links. Broken links from the outside, e.g. some random internet page links to www.mypage.com/my-blogpost-about-food/. This link will not work in lektor. This will decrease the page rank of the redesign of the page with lektor. What can I do to avoid this?

Again, in our current wordpress website

the main blog page sits under:

www.mypage.com/blog/

each blog post has a unique slug, NOT under /blog/ but directly in the main.
e.g.

www.mypage.com/my-blogpost-about-food/

What can I do, to make these URLs be valid for lektor as well? that e.g. mypage.com/my-blogpost-about-food is a blog post.

EDIT: this is what lektor does not support. Blog posts in lektor must sit in www.mypage.com/blog/SINGLE-BLOG-POSTS-MUSTBEHERE but I want the blog posts to be here www.mypage.com/SINGLE-BLOG-POSTS-MUSTBEHERE

reading here
https://www.getlektor.com/docs/content/urls/

if I go to the system fields and enter my-blogpost-about-food it will still appear in /blog/my-blogpost-about-food/

reading here it becomes clear that I cannot change the slug in the parent model neither:

With the above settings the blog will live at blog/ and the posts at
  blog/. But what if you want to put the date of the blog
  post into the URL? That's thankfully very easy. All you need to do is
  to set up a new URL format for the children. Just edit blog.ini and
  add this to the [children] section:

slug_format = {{ (this.pub_date|dateformat('YYYY/M/') if this.pub_date) ~ this._id }}

What this does is that it will prepend the year (YYYY) and month (M)
  to the ID of the page if the publication date is configured. Otherwise
  it will just use the ID of the page. With this change our blog post
  will move from for instance blog/hello/ to blog/2015/12/hello/.

now how would I achieve a behaviour similar to this?

this is the formal of the perma links of our wordpress installation:


问:
Symfony2.0 Login ,The presented password is invalid
i not understand why return to me always "The presented password is invalid."
i endecoder in sha512</p>

```<code>security:
    encoders:
        Acme\ProgettoBundle\Entity\User: sha512
</code>```

答: This response is correct: https://stackoverflow.com/a/10452621/2400373 but only is necessary length:60 for bcrypt

Body:
i not understand why return to me always "The presented password is invalid."
i endecoder in sha512

security:
    encoders:
        Acme\ProgettoBundle\Entity\User: sha512


问:
Edit existing excel workbooks and sheets with xlrd and xlwt
In the documentation for xlrd and xlwt I have learned the following:

How to read from existing work-books/sheets:

```<code>from xlrd import open_workbook
wb = open_workbook("ex.xls")
s = wb.sheet_by_index(0)
print s.cell(0,0).value
#Prints contents of cell at location a1 in the first sheet in the document called ex.xls
</code>```

How to create new work-books/sheets:

```<code>from xlwt import Workbook
wb = Workbook()
Sheet1 = wb.add_sheet('Sheet1')
Sheet1.write(0,0,'Hello')
wb.save('ex.xls')
#Creates a document called ex.xls with a worksheet called "Sheet1" and writes "Hello" to the cell located at a1
</code>```

What I want to do now is to open an existing worksheet, in an existing workbook and write to that sheet.

I have tried something like:

```<code>from xlwt import open_workbook
wb = open_workbook("ex.xls")
s = wb.sheet_by_index(0)
print s.cell(0,0).value
</code>```

but open_workbook is only part of the xlrd module, not xlwt.

Any ideas?

Edit1:
After Olivers suggestion I looked into xlutils and tried the following:

```<code>from xlrd import open_workbook
from xlwt import Workbook
from xlutils.copy import copy

wb = open_workbook("names.xls")
s = wb.get_sheet(0)
s.write(0,0,'A1')
wb.save('names.xls')
</code>```

This however, gives me the following error message:

```<code>File "C:\Python27\lib\site-packages\xlrd\book.py", line 655, in get_sheet
raise XLRDError("Can't load sheets after releasing resources.")
xlrd.biffh.XLRDError: Can't load sheets after releasing resources.
</code>```

Edit 2:
The error message was due to improper use of the get_sheet function.
Finally found out how to use it:

```<code>from xlrd import open_workbook
from xlwt import Workbook
from xlutils.copy import copy

rb = open_workbook("names.xls")
wb = copy(rb)

s = wb.get_sheet(0)
s.write(0,0,'A1')
wb.save('names.xls')
</code>```

答:
Here's another way of doing the code above using the openpyxl module that's compatible with xlsx. From what I've seen so far, it also keeps formatting.

```<code>from openpyxl import load_workbook
wb = load_workbook('names.xlsx')
ws = wb['SheetName']
ws['A1'] = 'A1'
wb.save('names.xlsx')
</code>```

Body:
In the documentation for xlrd and xlwt I have learned the following:

How to read from existing work-books/sheets:

from xlrd import open_workbook
wb = open_workbook("ex.xls")
s = wb.sheet_by_index(0)
print s.cell(0,0).value
#Prints contents of cell at location a1 in the first sheet in the document called ex.xls

How to create new work-books/sheets:

from xlwt import Workbook
wb = Workbook()
Sheet1 = wb.add_sheet('Sheet1')
Sheet1.write(0,0,'Hello')
wb.save('ex.xls')
#Creates a document called ex.xls with a worksheet called "Sheet1" and writes "Hello" to the cell located at a1

What I want to do now is to open an existing worksheet, in an existing workbook and write to that sheet.

I have tried something like:

from xlwt import open_workbook
wb = open_workbook("ex.xls")
s = wb.sheet_by_index(0)
print s.cell(0,0).value

but open_workbook is only part of the xlrd module, not xlwt.

Any ideas?

Edit1:
After Olivers suggestion I looked into xlutils and tried the following:

from xlrd import open_workbook
from xlwt import Workbook
from xlutils.copy import copy

wb = open_workbook("names.xls")
s = wb.get_sheet(0)
s.write(0,0,'A1')
wb.save('names.xls')

This however, gives me the following error message:

File "C:\Python27\lib\site-packages\xlrd\book.py", line 655, in get_sheet
raise XLRDError("Can't load sheets after releasing resources.")
xlrd.biffh.XLRDError: Can't load sheets after releasing resources.

Edit 2:
The error message was due to improper use of the get_sheet function.
Finally found out how to use it:

from xlrd import open_workbook
from xlwt import Workbook
from xlutils.copy import copy

rb = open_workbook("names.xls")
wb = copy(rb)

s = wb.get_sheet(0)
s.write(0,0,'A1')
wb.save('names.xls')

Body:
Here's another way of doing the code above using the openpyxl module that's compatible with xlsx. From what I've seen so far, it also keeps formatting.

from openpyxl import load_workbook
wb = load_workbook('names.xlsx')
ws = wb['SheetName']
ws['A1'] = 'A1'
wb.save('names.xlsx')


问:
Ajax get the error or success message from PHP function
I'm post data to a php function using JSON post. I want to receive two different type of responses, success and error.
For example, the following function:

```<code>function some_function(){

    if ($error){
        echo "some error";
        exit;
    } else {
        echo "everything is ok"
        exit;
    }

}
</code>```

In this case, both messages will be returned as success. How can I make the error message return to the error function in the ajax?
Here's the ajax code:

```<code>jQuery.ajax({

    url: '<?php echo $url; ?>',
    data: response,
    dataType: 'JSON',
    type: 'POST',
    success:function(data){
        console.log(data);
    },
    error: function(data, errorThrown){
        console.log(errorThrown);
    }

});
</code>```

答:
I don't have enough reputation to comment, but as of JQuery 1.5 you'll need to use

```<code>error: function(data) {
    console.log(data['responseText']);
}
</code>```

to get the json_encoded array your PHP is returning.

Body:
I'm post data to a php function using JSON post. I want to receive two different type of responses, success and error.
For example, the following function:

function some_function(){

    if ($error){
        echo "some error";
        exit;
    } else {
        echo "everything is ok"
        exit;
    }

}

In this case, both messages will be returned as success. How can I make the error message return to the error function in the ajax?
Here's the ajax code:

jQuery.ajax({

    url: '<?php echo $url; ?>',
    data: response,
    dataType: 'JSON',
    type: 'POST',
    success:function(data){
        console.log(data);
    },
    error: function(data, errorThrown){
        console.log(errorThrown);
    }

});

Body:
I don't have enough reputation to comment, but as of JQuery 1.5 you'll need to use

error: function(data) {
    console.log(data['responseText']);
}

to get the json_encoded array your PHP is returning.


问:
How to subclass a widget
I was to subclass a button like this

```<code>import android.widget.Button;
public class MyButton extends Button {
    // ...
}
</code>```

However, any widget I try to subclass results in a compiler error

There is no default constructor available in [widget]

Any help? Thanks.

答:
The error you're encountering is caused by the widgets having only constructors that take at least one parameter.

if you have a class A like this:

```<code>public class A {
    public A(String parameter) { // ... }
}
</code>```

and you define a class B which extends A, then you must call the constructor of A in B like so:

```<code>public class B extends A {
    public B(){
        super("some string"); // you have to have this!
    }
}
</code>```

In the case of your button, use this constructor

```<code>public MyButton(Context context, AttributeSet attrs) {
    super(context, attrs);
    this.setOnClickListener(this);
}
</code>```

Title: How to subclass a widget

Body:
I was to subclass a button like this

import android.widget.Button;
public class MyButton extends Button {
    // ...
}

However, any widget I try to subclass results in a compiler error

There is no default constructor available in [widget]

Any help? Thanks.

Body:
The error you're encountering is caused by the widgets having only constructors that take at least one parameter.

if you have a class A like this:

public class A {
    public A(String parameter) { // ... }
}

and you define a class B which extends A, then you must call the constructor of A in B like so:

public class B extends A {
    public B(){
        super("some string"); // you have to have this!
    }
}

In the case of your button, use this constructor

public MyButton(Context context, AttributeSet attrs) {
    super(context, attrs);
    this.setOnClickListener(this);
}


问:
WPF - Binding problem
Why after clicking the button the text in the textblock doesn't change ?

XAML:

```<code> <Grid>
    <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
    </Grid.RowDefinitions>

    <TextBlock Text="{Binding Name}"/>
    <Button Click="Button_Click" Grid.Row="1" Margin="20">Click Me</Button>
</Grid>
</code>```

Code behind:

```<code>  public partial class Window1 : Window, INotifyPropertyChanged
{
    private Person _myPerson;
    public Person MyPerson
    {
        get { return _myPerson; }
        set
        {
            _myPerson = value;
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs("MyPerson"));
            }
        }
    }

    public Window1()
    {
        MyPerson = new Person { Name = "A" };
        DataContext = MyPerson;
        InitializeComponent();
    }

    private void Button_Click(object sender, RoutedEventArgs e)
    {
        MyPerson = new Person { Name = "B" };
    }

    #region INotifyPropertyChanged Members

    public event PropertyChangedEventHandler PropertyChanged;

    #endregion
}
</code>```

答:
Change

```<code><TextBlock Text="{Binding Name}"/>
</code>```

to

```<code><TextBlock Text="{Binding MyPerson, Path=Name}"/>
</code>```

Since you are binding to Name, NotifyPropertyChanged wont be fired on Name when you change MyPerson and the view wont be updated.

Title: WPF - Binding problem

Body:
Why after clicking the button the text in the textblock doesn't change ?

XAML:

 <Grid>
    <Grid.RowDefinitions>
        <RowDefinition/>
        <RowDefinition/>
    </Grid.RowDefinitions>

    <TextBlock Text="{Binding Name}"/>
    <Button Click="Button_Click" Grid.Row="1" Margin="20">Click Me</Button>
</Grid>

Code behind:

  public partial class Window1 : Window, INotifyPropertyChanged
{
    private Person _myPerson;
    public Person MyPerson
    {
        get { return _myPerson; }
        set
        {
            _myPerson = value;
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs("MyPerson"));
            }
        }
    }

    public Window1()
    {
        MyPerson = new Person { Name = "A" };
        DataContext = MyPerson;
        InitializeComponent();
    }

    private void Button_Click(object sender, RoutedEventArgs e)
    {
        MyPerson = new Person { Name = "B" };
    }

    #region INotifyPropertyChanged Members

    public event PropertyChangedEventHandler PropertyChanged;

    #endregion
}

Body:
Change

<TextBlock Text="{Binding Name}"/>

to

<TextBlock Text="{Binding MyPerson, Path=Name}"/>

Since you are binding to Name, NotifyPropertyChanged wont be fired on Name when you change MyPerson and the view wont be updated.


问:
Is there any advantage to using gsutil or the google cloud storage API in production transfers?
Which is better to use with production transfers, gsutil, or the google cloud storage API?</p>

答:
gsutil uses a Google Cloud Storage API to transfer data, specifically the JSON API (by default, you can change it). Its main advantage over using the API directly is that it has been tuned to transfer data quickly. For example, it can open up multiple simultaneous connections to GCS, each of which is uploading or downloading part of the file concurrently, which in many cases can provide a significant boost to total throughput.

There's no reason that programming against the API directly could not also provide the same or even better performance, but I would expect gsutil to be at least a little bit faster on average if you implement things in the simplest possible manner.


问:
COS is running out of inodes for /var/lib/docker volume
I'm trying to us cos to run some services on GCP.

One of the issues I'm seeing currently is that the VMs I've started very quickly seem to run out of inodes for the /var/lib/docker filesystem. I'd have expected this to be one of the things tuned in a container optimized os?

wouter@nbwm-cron ~ $ df -hi
Filesystem            Inodes IUsed IFree IUse% Mounted on
/dev/root                78K   13K   65K   17% /
devtmpfs                463K   204  463K    1% /dev
tmpfs                   464K     1  464K    1% /dev/shm
tmpfs                   464K   500  463K    1% /run
tmpfs                   464K    13  464K    1% /sys/fs/cgroup
tmpfs                   464K     9  464K    1% /mnt/disks
tmpfs                   464K   16K  448K    4% /tmp
/dev/sda8               4.0K    11  4.0K    1% /usr/share/oem
/dev/sda1              1013K  998K   15K   99% /var
tmpfs                   464K    45  464K    1% /var/lib/cloud
overlayfs               464K    39  464K    1% /etc

wouter@nbwm-cron ~ $ docker images
REPOSITORY                                TAG                 IMAGE ID            CREATED             SIZE
<name>/stackdriver-agent                latest              0c4b075e7550        3 days ago          1.423 GB
<none>                                    <none>              96d027d3feea        4 days ago          905.2 MB
gcr.io/<project>/nbwm-ops/docker-php5   latest              5d2c59c7dd7a        2 weeks ago         1.788 GB

nbwm-cron wouter # tune2fs -l /dev/sda1
tune2fs 1.43.3 (04-Sep-2016)
Filesystem volume name:   STATE
Last mounted on:          /var
Filesystem UUID:          ca44779b-ffd5-405a-bd3e-528071b45f73
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent 64bit flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Remount read-only
Filesystem OS type:       Linux
Inode count:              1036320
Block count:              4158971
Reserved block count:     0
Free blocks:              4062454
Free inodes:              1030756
First block:              0
Block size:               4096
Fragment size:            4096
Group descriptor size:    64
Reserved GDT blocks:      747
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8160
Inode blocks per group:   510
Flex block group size:    16
Filesystem created:       Thu Jun 15 22:39:33 2017
Last mount time:          Wed Jun 28 13:51:31 2017
Last write time:          Wed Jun 28 13:51:31 2017
Mount count:              5
Maximum mount count:      -1
Last checked:             Thu Nov 19 19:00:00 2009
Check interval:           0 (<none>)
Lifetime writes:          67 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:           256
Required extra isize:     32
Desired extra isize:      32
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      66aa0e7f-57da-41d0-86f7-d93270e53030
Journal backup:           inode blocks

How do I tune the filesystem to have more inodes available?

答:
This is a known issue with the overlay storage driver in docker and is addressed by the overlay2 driver.
The new cos-61 releases use docker 17.03 with overlay2 storage driver. Could you please give it a try and see if the issue happens again?

Thanks!


问:
1004 error for range argument
I have another simple syntax question that I can't quite figure out. I want to change all the cells in a column so they have a bottom border and have a variable to figure out the last night with data on it.

My code is below and I believe the error is how I am trying to define the last cell.

```<code>wsSheet.Range("F11:wsSheet.Cells(LastRowForSig, 6)").Borders(xlEdgeBottom).LineStyle = xlContinuous
</code>```

答:
Try this:</p>

```<code>With wsSheet.Range("F11", wsSheet.Cells(LastRowForSig, 6)).Borders
    .value = 1
    .item(xlEdgeLeft).LineStyle = xlNone
    .item(xlEdgeRight).LineStyle = xlNone
    .item(xlEdgeTop).LineStyle = xlNone
End With
</code>```

Title: 1004 error for range argument

Body:
I have another simple syntax question that I can't quite figure out. I want to change all the cells in a column so they have a bottom border and have a variable to figure out the last night with data on it.

My code is below and I believe the error is how I am trying to define the last cell.

wsSheet.Range("F11:wsSheet.Cells(LastRowForSig, 6)").Borders(xlEdgeBottom).LineStyle = xlContinuous

Body:
Try this:

With wsSheet.Range("F11", wsSheet.Cells(LastRowForSig, 6)).Borders
    .value = 1
    .item(xlEdgeLeft).LineStyle = xlNone
    .item(xlEdgeRight).LineStyle = xlNone
    .item(xlEdgeTop).LineStyle = xlNone
End With


问:
reveal.js produces blank page
I'm having some problems with getting reveal.js to work. Since the instructions don't really say where to put the files or what to name them (is that obvious?), I'm having problems even getting the example code on the instruction page to work:

```<code><html>
    <head>
        <link rel="stylesheet" href="css/reveal.css">
        <link rel="stylesheet" href="css/theme/white.css">
    </head>
    <body>
        <div class="reveal">
            <div class="slides">
                <section>Slide 1</section>
                <section>Slide 2</section>
            </div>
        </div>
        <script src="js/reveal.js"></script>
        <script>
            Reveal.initialize();
        </script>
    </body>
</html>
</code>```

I've put this code into a file called test.html, and copies the css folder in the reveal.js repository into the same folder as test.html.

When I open test.html in Firefox or IE, I just get a completely white web page without anything on it, and nothing happens when I press the arrow keys. If I change "css/theme/white.css" to some other theme, I manage to change the background color of the page but I still don't get any content on it.

What am I doing wrong?

答:
I realized that except from referring to files in the css folder, the code also refers to a file in the js folder. Therefore, I also needed to copy the js folder in the reveal.js repository into the same folder as test.html.

Alternatively, I can change the references, so that I instead have

```<code>        <link rel="stylesheet" href="<path-to-reveal.js>/css/reveal.css">
        <link rel="stylesheet" href="<path-to-reveal.js>/css/theme/white.css">
</code>```

and

```<code>        <script src="<path-to-reveal.js>/js/reveal.js"></script>
</code>```

in test.html.

Title: reveal.js produces blank page

Body:
I'm having some problems with getting reveal.js to work. Since the instructions don't really say where to put the files or what to name them (is that obvious?), I'm having problems even getting the example code on the instruction page to work:

        <link rel="stylesheet" href="css/reveal.css">
        <link rel="stylesheet" href="css/theme/white.css">

Slide 1

Slide 2

I've put this code into a file called test.html, and copies the css folder in the reveal.js repository into the same folder as test.html.

When I open test.html in Firefox or IE, I just get a completely white web page without anything on it, and nothing happens when I press the arrow keys. If I change "css/theme/white.css" to some other theme, I manage to change the background color of the page but I still don't get any content on it.

What am I doing wrong?

Body:
I realized that except from referring to files in the css folder, the code also refers to a file in the js folder. Therefore, I also needed to copy the js folder in the reveal.js repository into the same folder as test.html.

Alternatively, I can change the references, so that I instead have

        <link rel="stylesheet" href="<path-to-reveal.js>/css/reveal.css">
        <link rel="stylesheet" href="<path-to-reveal.js>/css/theme/white.css">

and

        <script src="<path-to-reveal.js>/js/reveal.js"></script>

in test.html.


答: Subclasses in Java do not inherit the parent constructor, you will need to re-implement the 4 constructors belonging to Button. Just call the super constructor in each.</p>

Title: How to subclass a widget