QGIS 2.4.0 marker line interval does not work properly when line is bending

QGIS 2.4.0 marker line interval does not work properly when line is bending

I am trying to style a line using marker line option. When I am using styling the line in the style window everything looks nice as you can see on the print screen bellow.

I am using three line features (units are mm):

  • simple line: dash pattern 7 2
  • marker line: interval 9
  • marker line: interval 9, offset 5

However the result in QGIS looks horrible as shown on the next picture. Could somebody tell me how to avoid this? It looks like QGIS is not properly listening to the dash pattern and interval settings.

Well, this is not the perfect solution, but I created SVG marker with the required symbology.

Then I set the needed interval and finally it works how I want!

I took the same style values as you, and it looks quite good:

but it looks better with a svg symbol. With the standard>I get this:

The saved style looks as follows:


The input line is too long when starting kafka

This is because of the long length of the path because of the folder name 'kafka_2.11-1.0.0'. Just rename the folder to something small, like just 'kafka'.

The Problem

The kafka-run-class.bat file performs a bunch of CLASSPATH :concat calls that make the CLASSPATH very long.

Depending on your environment, too long: Windows cmd.exe environment has a limit of 8191 characters.

Edit kafka-run-class.bat so that .

  1. make it so that CLASSPATH is not used or set elsewhere
  2. make paths shorter so that concat produces a string smaller than than 8191 characters
  3. make concat use the whole folder instead of every single jar (via libs/* )

Here is an example of an edit to kafka-run-class.bat (source) that uses the 2nd approach:

Just moving the Kafka path to a much smaller root path solved the issue. For e.g. "C:Kafka"

Above both options didn't work for me.

I have just moved an unzipped directory to C:/ drive and started power shell in Administrator mode and tried the desired commands, the zookeeper and broker started smoothly.

I have copied everything to C:/tools/kafka and it works fine. The problem was indeed the too long path to kafka.

For me, it worked only after keeping the Kafka folder right under C directory, so the path looked like C:Kafka. I am sure this will work.

Windows command-line has issues with long command execution. Use Powershell instead.

put all the files in other drive like D: or E: and run the command

Place kafka close to the root of your drive so that the path to it is very short.

When you run those Kafka batch files included in the windows directory, they muck with your environment variables (the classpath one) and can create a very long input line to actually run the command/jar.

Also as some others pointed out, ensure you downloaded the binary (yes even though on the Kafka site it is called the Scala binary and there's no mention of Windows anywhere, which can confuse people), not the source code. Also confusing to the lay-user, the source distribution looks similar to the binary distribution when uncompressed, it has all the batch files for example but they won't run.

pip is run from the command line, not the Python interpreter. It is a program that installs modules, so you can use them from Python. Once you have installed the module, then you can open the Python shell and do import selenium .

The Python shell is not a command line, it is an interactive interpreter. You type Python code into it, not commands.

Use the command line, not the Python shell (DOS, PowerShell in Windows).

If you installed Python into your PATH using the latest installers, you don't need to be in that folder to run pip

As @sinoroc suggested correct way of installing a package via pip is using separate process since pip may cause closing a thread or may require a restart of interpreter to load new installed package so this is the right way of using the API: subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'SomeProject']) but since Python allows to access internal API and you know what you're using the API for you may want to use internal API anyway eg. if you're building own GUI package manager with alternative resourcess like

Following soulution is OUT OF DATE, instead of downvoting suggest updates. see for reference. UPDATE: Since pip version 10.x there is no more get_installed_distributions() or main method under import pip instead use import pip._internal as pip .

UPDATE ca. v.18 get_installed_distributions() has been removed. Instead you may use generator freeze like this:

If you want to use pip inside the Python interpreter, try this:

If you need to update every installed package, use following:

If you want to stop installing other packages if any installation fails, use it in one single pip.main([]) call:

Note: When you install from list in file with -r / --requirement parameter you do NOT need open() function.

Warning: Some parameters as simple --help may cause python interpreter to stop.

Many older tools misbehave if the last line of data in a text file is not terminated with a newline or carriage return / new line combination. They ignore that line as it is terminated with ^Z (eof) instead.

If you try to concatenate two text files together, you will be much happier if the first one ends with a newline character.

Apart from the fact that it is a nicer cursor position when you move to the end of a file in a text editor.

Having a newline at the end of the file provides a simple check that the file has not been truncated.

An argument can also be made for cleaner diffs if you append to the file following the same reasoning as Why are trailing commas allowed in a list?

The following is copied (and trimmed a bit) from the linked resource:

involves only a one-line change in the diff:

This beats the more confusing multi-line diff when the trailing comma was omitted:

The empty line in the end of file appears so that standard reading from the input stream will know when to terminate the read, usually returns EOF to indicate that you have reached the end. The majority of languages can handle the EOF marker. It is there for that reason from the old days, under DOS, the EOF marker was F6 key or Ctrl-Z, for *nix systems, it was Ctrl-D.

Most, if not all, will actually read right up to the EOF marker so that the runtime library's function of reading from input will know when to stop reading any further. When you open the stream for Append mode, it will wipe the EOF marker and write past it, until a close is explicitly called in which it will insert the EOF marker at that point.

Older tools were expecting a empty line followed by EOF marker. Nowadays, tools can handle the empty line and ignore it.

Also when you modify file and appends some code at the end of file - diff (at least git diff in standard coniguration) will show that you changed the last line, while the only thing you've actually done - added a newline symbol. So cvs reports become less convenient.

Some languages define their input file in terms of input lines, where each input line is a series of characters terminated by a carriage return. If their grammar is so defined, then the last valid line of the file must be terminated by a carriage return too.

It's because of the definition of what a text file is. When you create a new text file in any unix environment, the contents of that file is the new line character ' '

Without this, the file isn't really identified as a text file. Now once we add code to this text file, its about not removing this initial new line that defines a text file itself.

The question, and most of the existing answers, seem to be based on a misconception.

The ASCII control character commonly referred to as "newline" (U+000A LINE FEED, in C) does not start a new line of a (Unix-style) text file. It ends the current line of a text file. If the last character of a text file is U+000A, there is not an empty line "in between" the U+000A and the filesystem's EOF marker (however that is implemented). Conversely, if the last character of a (nonempty) text file is not U+000A, the last line of the file has not been ended—it is said to be "incomplete".

This would probably be clearer with some examples:

This file contains two complete lines of text. It does not contain a third empty line.

This file contains a third empty line.

And this file contains only one complete line, plus a second incomplete line.

Sometimes an incomplete final line is what you want—for instance, having a newline in between the final ?> of a PHP script, and EOF, can cause extra whitespace to be emitted into the rendered HTML at a bad location (I would link to concrete examples but I am not having any luck finding one, this morning). Therefore, good text editors will clearly distinguish all three of the above cases in their UI.

However, older text-processing tools often mishandle incomplete final lines. For instance, some implementations of wc won't count an incomplete final line as a line, and some implementations of vi will silently add a newline to a file that doesn't end with one, whether you want it to or not. Therefore, you should only use incomplete final lines when you have a specific reason to need them.

(Note: As far as I know, everything I just said is also true of DOS-style text files, where the two-byte control sequence U+000D U+000A is used to end a line, instead of just U+000A.)

How should I handle inclusive ranges in Python?

I am working in a domain in which ranges are conventionally described inclusively. I have human-readable descriptions such as from A to B , which represent ranges that include both end points - e.g. from 2 to 4 means 2, 3, 4 .

What is the best way to work with these ranges in Python code? The following code works to generate inclusive ranges of integers, but I also need to perform inclusive slice operations:

The only complete solution I see is to explicitly use + 1 (or - 1 ) every time I use range or slice notation (e.g. range(A, B + 1) , l[A:B+1] , range(B, A - 1, -1) ). Is this repetition really the best way to work with inclusive ranges?

Edit: Thanks to L3viathan for answering. Writing an inclusive_slice function to complement inclusive_range is certainly an option, although I would probably write it as follows:

. here represents code to handle negative indices, which are not straightforward when used with slices - note, for example, that L3viathan's function gives incorrect results if slice_to == -1 .

However, it seems that an inclusive_slice function would be awkward to use - is l[inclusive_slice(A, B)] really any better than l[A:B+1] ?

Is there any better way to handle inclusive ranges?

Edit 2: Thank you for the new answers. I agree with Francis and Corley that changing the meaning of slice operations, either globally or for certain classes, would lead to significant confusion. I am therefore now leaning towards writing an inclusive_slice function.

To answer my own question from the previous edit, I have come to the conclusion that using such a function (e.g. l[inclusive_slice(A, B)] ) would be better than manually adding/subtracting 1 (e.g. l[A:B+1] ), since it would allow edge cases (such as B == -1 and B == None ) to be handled in a single place. Can we reduce the awkwardness in using the function?

Edit 3: I have been thinking about how to improve the usage syntax, which currently looks like l[inclusive_slice(1, 5, 2)] . In particular, it would be good if the creation of an inclusive slice resembled standard slice syntax. In order to allow this, instead of inclusive_slice(start, stop, step) , there could be a function inclusive that takes a slice as a parameter. The ideal usage syntax for inclusive would be line 1 :

Unfortunately this is not permitted by Python, which only allows the use of : syntax within [] . inclusive would therefore have to be called using either syntax 2 or 3 (where s_ acts like the version provided by numpy).

Other possibilities are to make inclusive into an object with __getitem__ , permitting syntax 4 , or to apply inclusive only to the stop parameter of the slice, as in syntax 5 . Unfortunately I do not believe the latter can be made to work since inclusive requires knowledge of the step value.

Of the workable syntaxes (the original l[inclusive_slice(1, 5, 2)] , plus 2 , 3 and 4 ), which would be the best to use? Or is there another, better option?

Final Edit: Thank you all for the replies and comments, this has been very interesting. I have always been a fan of Python's "one way to do it" philosophy, but this issue has been caused by a conflict between Python's "one way" and the "one way" proscribed by the problem domain. I have definitely gained some appreciation for TIMTOWTDI in language design.

For giving the first and highest-voted answer, I award the bounty to L3viathan.

A. Purpose of the Regulatory Action

B. Summary of the Major Provisions of the Regulatory Action in Question

B. Pacific Gas and Electric Incident of 2010

C. Advance Notice of Proposed Rulemaking

D. National Transportation Safety Board Recommendations

E. Pipeline Safety, Regulatory Certainty, and Job Creation Act of 2011

F. Notice of Proposed Rulemaking

III. Analysis of Comments, GPAC Recommendations and PHMSA Response

A. Verification of Pipeline Material Properties and Attributes&mdash§&thinsp192.607

v. Legacy Construction Techniques/Legacy Pipe

C. Seismicity and Other Integrity Management Clarifications&mdash§&thinsp192.917

D. 6-Month Grace Period for 7-Calendar-Year Reassessment Intervals&mdash§&thinsp192.939

E. ILI Launcher and Receiver Safety&mdash§&thinsp192.750

F. MAOP Exceedance Reporting&mdash§§&thinsp191.23, 191.25

G. Strengthening Assessment Requirements&mdash§§&thinsp192.150, 192.493, 192.921, 192.937, Appendix F

i. Industry Standards for ILI&mdash§§&thinsp192.150, 192.493

ii. Expand Assessment Methods Allowed for IM&mdash§§&thinsp192.921(a) and 192.937(c)

iii. Guided Wave Ultrasonic Testing&mdashAppendix F

H. Assessing Areas Outside of HCAs&mdash§§&thinsp192.3, 192.710

iii. Cost/Benefit Analysis, Information Collection, and Environmental Impact Issues

V. Section-by-Section Analysis

VI. Standards Incorporated by Reference

A. Summary of New and Revised Standards

B. Availability of Standards Incorporated by Reference

VII. Regulatory Analysis and Notices

Versions 4.2

Version Release date Release type
4.2.27 March 13, 2018 Bug fix release
4.2.26 April 16, 2018 Bug fix release
4.2.25 March 22, 2018 New release
4.2.17 February 26, 2018 Preview
4.2.15 February 6, 2018 Preview

Disclaimer: The preview version contains new features and bug fixes. Documentation and support are not available. We recommend testing the preview version before using it for production work.

For detailed steps about downloading, installing, or updating the software: see article here.

  • (4.2.27) New certificate added to the .msi installation file.
  • (4.2.25) The uncertainties of a list of Automatic Tie Points are exported in a .csv file in the params folder: see article here.
  • (4.2.25) Support for MicaSense RedEdge-M.

Other enhancements and changes

  • (4.2.25) Improved radiometric calibration of Sequoia camera.
  • (4.2.25) Add of tooltips for volume actions (new volume, import volume, export volume) and improved buttons look and alignment.
  • (4.2.25) Pix4Dmapper is used in the EULA dialog, the login dialog and the license selection dialog.
  • (4.2.25) A project is now added to the recent project list when it is loaded, created or saved as.
  • (4.2.15) Pix4Dmapper is used in the EULA dialog, the login dialog and the license selection dialog.
  • (4.2.15) A project is now added to the recent project list when it is loaded, created or saved as.

Bug fixes

  • (4.2.27) Fixed the unit (meter-feet) conversion issue of vertical coordinate systems.
  • (4.2.27) Fixed issue of feature extraction from video taken with iPhone SE.
  • (4.2.27) Fixed project failing when missing certain tags in Sequoia imagery.
  • (4.2.26) Fixed issues of project creation from eMotion.
  • (4.2.26) Fixed issue when creating a project from a video file. Video frame extraction produced more images than desired.
  • (4.2.25) Fixed issues with coordinate systems the Output coordinate system is now correctly converted to the GCP coordinate system.
  • (4.2.25) Fixed issue of having a vertical offset introduced when an old project is opened with any 4.2 Preview version.
  • (4.2.25) Fixed issue importing a template (.tmpl) in the Japanese version.
  • (4.2.25) Fixed crashes when editing the camera model in a project with coregistered images.
  • (4.2.25) Prevent users from being affected by a "Failed to write EXIF" error during the DSM generation step.
  • (4.2.25) Fixed issue of having empty tiles in the orthomosaic in cases of steep terrain.
  • (4.2.25) Zoom and map center are reset to default when changing between map types (Satellite, Maps) in the Map View.
  • (4.2.25) New project name in command line does not get shortened after last "."
  • (4.2.17) Prevent users from being affected by a "Failed to write EXIF" error during the DSM generation step.
  • (4.2.17) Fixed issue of having empty tiles in the orthomosaic in cases of steep terrain.
  • (4.2.15) New project name in command line does not get shortened after last "."
  • (4.2.15) Zoom and map center are reset to default when changing between map types (Satellite, Maps) in the Map View.

Known issues

  • In some cases, the "This app has been blocked for your protection" warning is displayed when installing or uninstalling Pix4Dmapper on Windows 10. Fixed in 4.2.27, 4.3.33 and 4.4.10

6 Answers 6

You can use umount -f -l /mnt/myfolder , and that will fix the problem.

-f – Force unmount (in case of an unreachable NFS system). (Requires kernel 2.1.116 or later.)

-l – Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy anymore. (Requires kernel 2.4.11 or later.)

Source:Linux Complete Command Reference

try sudo umount -l to do a "lazy unmount". Lets you move on with your life without waiting for the plumber to arrive.

In my case where umount -f did not work, umount -fr worked. -r argument remounts as read-only and then unmounts the folder.

In case umount -f -l /mnt/myfolder doesn't work service nfs restart (or it's equivalent on your linux) might.

For me, neither umount, nor service restart will work. Just reboot. Even with a new system, NFS implementation seems to still have that old issue. So, just reboot.

I noticed something when trying to unmount directories for NFS servers that go offline. My first instinct is to unmount lowest subdirectories first and then work my way up to the top of the directory tree. However, unmounting subdirectories by using --force and --lazy failed and resulted in a long timeout. What finally worked for me was when I used --force and --lazy at the top level, as in:

umount --lazy --force /net/machine

Don't first try to unmount the lower directories, such as:

umount --lazy --force /net/machine/subdir

Omnis Prædictio: Estimating the full spectrum of human performance with stroke gestures

Designing effective, usable, and widely adoptable stroke gesture commands for graphical user interfaces is a challenging task that traditionally involves multiple iterative rounds of prototyping, implementation, and follow-up user studies and controlled experiments for evaluation, verification, and validation. An alternative approach is to employ theoretical models of human performance, which can deliver practitioners with insightful information right from the earliest stages of user interface design. However, very few aspects of the large spectrum of human performance with stroke gesture input have been investigated and modeled so far, leaving researchers and practitioners of gesture-based user interface design with a very narrow range of predictable measures of human performance, mostly focused on estimating production time, of which extremely few cases delivered accompanying software tools to assist modeling. We address this problem by introducing “Omnis Prædictio” ( Omnis for short), a generic technique and companion web tool that provides accurate user-independent estimations of any numerical stroke gesture feature, including custom features specified in code. Our experimental results on three public datasets show that our model estimations correlate on average r s > 0.9 with groundtruth data. Omnis also enables researchers and practitioners to understand human performance with stroke gestures on many levels and, consequently, raises the bar for human performance models and estimation techniques for stroke gesture input.

In your first diff output (so called "normall diff") the meaning is as follows

< - denotes lines in file1.txt

> - denotes lines in file2.txt

3d2 and 5a5 denote line numbers affected and which actions were performed. d stands for deletion, a stands for adding (and c stands for changing). the number on the left of the character is the line number in file1.txt, the number on the right is the line number in file2.txt. So 3d2 tells you that the 3rd line in file1.txt was deleted and has the line number 2 in file2.txt (or better to say that after deletion the line counter went back to line number 2). 5a5 tells you that the we started from line number 5 in file1.txt (which was actually empty after we deleted a line in previous action), added the line and this added line is the number 5 in file2.txt.

The output of diff -u command is formatted a bit differently (so called "unified diff" format). Here diff shows us a single piece of the text, instead of two separate texts. In the line @@ -1,5 +1,5 @@ the part -1,5 relates to file1.txt and the part +1,5 to file2.txt. They tell us that diff will show a piece of text, which is 5 lines long starting from line number 1 in file1.txt. And the same about the file2.txt - diff shows us 5 lines starting from line 1.

As I have already said, the lines from both files are shown together

Here - denotes the lines, which were deleted from file1.txt and + denotes the lines, which were added.

Watch the video: QGIS: Georeferencing raster data without coordinates