text:
Q: MarkLogic: only return exact search results I'm using the MarkLogic Java API. I want a search for a certain String to return ONLY the documents where exactly this String matches with some key within the document. I explicitly want to search for Strings only and I don't want to specify the keys where this String has to match in advance.
Example1:
    DatabaseClient client = DatabaseClientFactory.newClient(Config.host, Config.port, new DigestAuthContext(Config.user, Config.password));
    QueryManager queryMgr = client.newQueryManager();
    queryMgr.setPageLength(100);

    // create a search definition
    StringQueryDefinition query = queryMgr.newStringDefinition();

    // Search for the term
    query.setCriteria("2017");

    SearchHandle resultsHandle = new SearchHandle();

    // run the search
    queryMgr.search(query, resultsHandle);

The search for "2017" in this example also returns documents in the form of:
{"Example1":{"key1":"bla", "key2":"2017-10-12T15:37:53.204Z"}}

It should ONLY return documents like this:
{"Example1":{"key1":"bla", "key2":"2017"}}

I also tried the following. Example2:
    DatabaseClient client = DatabaseClientFactory.newClient(Config.host, Config.port, new DigestAuthContext(Config.user, Config.password));
    QueryManager queryMgr = client.newQueryManager();
    queryMgr.setPageLength(100);

    // create a search definition
    StructuredQueryBuilder qb = new StructuredQueryBuilder();
    StructuredQueryDefinition query = qb.term( "2017");

    SearchHandle resultsHandle = new SearchHandle();

    // run the search
    queryMgr.search(query, resultsHandle);

And I tried to encapsulate the search term in the two examples above with \"\" like "\"2017\"". Also no luck there.

A: I don't know of any way that doesn't require you to specify the keys where this string has to match.  I think the closest you're going to come is creating a field which encapsulates the list of possible element names. It shouldn't be impossible to enumerate them, even if you had to automate the field creation and update it as new content (and new element names) are ingested. Then you could do this:
StructuredQueryBuilder sqb = new StructuredQueryBuilder();
QueryDefinition query = sqb.value(sqb.field("catchall"), "mark");
SearchHandle results = queryMgr.search(query, new SearchHandle());

Also note, this question is a duplicate of MarkLogic Java: Set Query Type to Value in StringQueryDefinition


text:
Q: Installation of outlook addin 2010 I have created a outlook addin 2010 using visual studio 2013 and also created a setup project for the same using windows installer.
I have done the following steps,

*

*Added the project output and added exclude filter for manifest

*published the addin project unser release mode

*Added the manifest from published folder to the setup

*Added the vsto file from release folder of the project

*Added app.config into setup used by the project

*Tried creating registry keys under UserMachine/Hive, but removed later

I have builded the setup as per the above creation and tried to install in other systems, but the addin is not getting loaded into outlook, also no resgitry keys available for the addin
Outlook Version - 32 bit
OS Version - 64 bit

For Msi also do we need to add trusted certificate and resgitry key setup?
Pls help me for this

A: Signing the .exe file is not mandatory and won't affect installation.  Try right-clicking setup.exe and choose "Run as admin" to see if that works.

A: You need to add 4 registry keys to the user/machine hive when installing from MSI as described here: http://msdn.microsoft.com/en-us/library/bb386106.aspx.
User/Machine Hive\Software\Microsoft\Office\application name\Addins\add-in ID

*

*Description - REG_SZ - brief description of your addin

*FriendlyName - REG_SZ - name for your addin visible in Outlook

*LoadBehavior - REG_DWORD - set to 3 to load at Outlook startup

*Manifest - REG_SZ - path to the installed manifest, including file:/// prefix and |vstolocal suffix

When installing on a client machine, make sure it has the Visual Studio 2010 Tools for Office Runtime installed (http://msdn.microsoft.com/en-us/library/ms178739.aspx). It's included by default in Office 2010. You can specify this as a prerequisite to the installer.

redpajama_set_name: RedPajamaStackExchange


text:
Q: How to convert one AAC file to several MKVs through Gstreamer? I have one AAC file, I want to convert it to several MKV files, I'm new hand to Gstreamer
I don't know how to solve it.
I've tried several commands like this:
gst-launch-1.0 filesrc location="D:\\gstreamertest\\long.aac" ! audioconvert ! aacparse ! matroskademux ! splitmuxsink location="D:\\gstreamertest\\output\\mkv%02d.mkv" max-size-time=3000000000 muxer=matroskamux

but the error like


text:
Q: changing 'DEFAULT_FILE_STORAGE' causing high TTFB ( waiting time ) with boto3 My settings
...
AWS_ACCESS_KEY_ID = 'MY_KEY'
AWS_SECRET_ACCESS_KEY = 'MY_SECRET_KEY'
AWS_STORAGE_BUCKET_NAME = 'wallpapers'
AWS_S3_ENDPOINT_URL = 'https://sgp1.digitaloceanspaces.com'
AWS_S3_CUSTOM_DOMAIN = 'wallpapers.sgp1.cdn.digitaloceanspaces.com'

AWS_QUERYSTRING_AUTH = False

AWS_S3_OBJECT_PARAMETERS = {
    'CacheControl': 'max-age=86400',
}
AWS_LOCATION = 'static'
AWS_DEFAULT_ACL = 'public-read'

STATIC_URL = 'https://%s/%s/' % (AWS_S3_CUSTOM_DOMAIN, AWS_LOCATION)
MEDIA_URL = 'https://%s/%s/' % (AWS_S3_CUSTOM_DOMAIN, 'media')
MEDIA_ROOT = 'media/'
STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
...

when I open 'http://127.0.0.1:8000/'
this causes high TTFB...

but when I comment out/ remove this in settings.py...
#DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
then everything works fine

A: I realized the real problem was caused by a template tag.
<p>{{ my_img.width }}</p>

so in order to get the width of the image stored in MySQL, it was downloading the chunks of the image and then calculating the dimensions.
to overcome this I added separate fields in my model.py for image height and width.
it worked!!!
I m new to Django. it might not be the best approach. please let me know for a better solution.


text:
Q: Define generic parameter that should be a Product/Tuple (any size) of String components Something like this
trait SomeTrait {
  def m[A <: (String, ... *)](value: A)
}

Probably, it's achievable using some libraries.
Update: List(String) looks like a straightforward alternative, but I'm curious about ability to express such condition.

A: You can use shapeless.
import shapeless._

trait SomeTrait {
 def m[T <: Product, L <: HList](t : T)
                    (implicit gen: Generic.Aux[T, L],
                              c: LUBConstraint[L, String]) =  println(t)
}

// m(("2","3","7")) // compiles
// m(("2","3",7)) // wont compile
// m(("2","3","7","8")) // compiles


text:
Q: What am I messing up package Testsel3;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Classel3 {

public static void main(String[] args) {
    System.setProperty("webdriver.chrome.driver", "C:\\Users\\xyz's
Laptop\\Chromerdriver\\chromedriver.exe");
    WebDriver driver = new ChromeDriver();

    driver.get("https://www.gmail.com");
    driver.manage().window().maximize();
    driver.findElement(By.id("identifierId")).sendKeys("xyz@gmail.com");

}

}

When I try to run the above script I get an error saying: Multiple markers at this line
- The method sendKeys(CharSequence...) from the type WebElement refers to the missing type CharSequence

*

*The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files

A: If you get the above error message in Eclipse IDE then you must be using Java version 8 java JDK 8. In JDK 8 the CharSequence Class have new default methods as compared to previous JDKs causing this issue.
Quick Fix Try this:

driver1.findElement(By.id("aa")).sendKeys(new String[] {"xx"});

so it does not use CharSequence, seems like you are using a newer JDK version than what Selenium that was compiled against. You could also try the following.

*

*Right click on project go to java compiler settings and lower compliance level to 1.5

*Download newer version of selenium jars.


text:
Q: Unable to download from multiple sites with uGet I've downloaded uGet with aria2 and everything works fine when I only download from one server. When I activate Aria plugin to download from more than one server connections a get this messages and the download never start.

A: It looks like you are downloading the same file multiple times...uGet will not do that...it will recognize that you already have it and immediately say it is done because you already have it.
You need to test this on a new file or delete the existing file to see it working.
Edited on March 7th, 2014:
Now that I've revisited this issue it looks as though you don't actually have aria2 installed. For more information about the aria2 plugin please go to http://ugetdm.com/downloads-aria2


text:
Q: How to detect the last line in awk before END I am trying to add last line to the file which I am creating. How is it possible to detect the last line of a file in awk before END ? I need to do this because the variables don't work in the END block,
so I am trying to avoid using END.
awk ' { do some things..; add a new last line into file;}'

before END, I don't want this:
awk 'END{print "something new" >> "newfile.txt"}'

A: Print the previous line.
  When current line is 2, print line 1,
  when current line is 3, print line 2.
  ....
  till the end
awk '{
    if (NR>1) {
        # process str
        print str;
    }
    str=$0;
}
END {
    # process whatever needed before printing the last line and then print the last line.
    print str;
}'

A: $ cat file
1
2
3
4
5

By reading same file twice ( Recommended )
$ awk 'FNR==NR{last++;next}{print $0, ((last==FNR)?"I am Last":"")}' file file
1
2
3
4
5 I am Last

Using getline
$ awk 'BEGIN{while((getline t < ARGV[1]) > 0)last++;close(ARGV[1])}{print $0, ((last==FNR)?"I am Last":"")}' file
1
2
3
4
5 I am Last

A: You can get the number of lines in a file using "wc -l" | getline filesize in the begin block and use NR == filesize to test the last line in the script body.

A: One option is to use getline function to process the file. It returns 1 on sucess, 0 on end of file and -1 on an error.
awk '
    FNR == 1 {

        ## Process first line.
        print FNR ": " $0;

        while ( getline == 1 ) {
            ## Process from second to last line.
            print FNR ": " $0;
        }

        ## Here all lines have been processed.
        print "After last line";
    }
' infile

Assuming infile with this data:
one
two
three
four
five

Output will be:
1: one
2: two
3: three
4: four
5: five
After last line

A: You can use ENDFILE, it executes before END:
$ awk 'END {print "end"} ENDFILE{print "last line"}'  /dev/null /dev/null
last line
last line
end

ENDFILE exists in latest version of GNU awk (>4.0 I think).

A: I know the answer was accepted, but it is simply wrong.
Because you do want to use awk as a parser and not as a code.
Awk should be used within some unix pipes and it should not be used within any logic.
I had the same problem and I solved it within awk like this:
nlines=wc -l <file>
cat  | awk -v nl=${nlines} '{if (nl != NR) {print $0,",","\";} else {print;}}' >>  ${someout}
There is an important point here: pipes, flush, and RAM.
If you make awk to spit out its output you can pipe it to the next processor.
If you use getline, and in particular within a loop, you might not see the end.
getline should be used only for a line and an eventual dependency on the next line.
I love awk, but we cannot do everything with it!
EDITED:
For whom down-voted the answer, I just want to present this script:
#! /bin/sh
#
# Generate random strings
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 100000 > x.r.100000
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1000000 > x.r.1000000
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 5000000 > x.r.5000000
#
# To save you time in case
#cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 10000000 > x.r.10000000
#
# Generate awk files
cat <<"EOF" > awkGetline.sh
#! /bin/sh
#
awk '
    FNR == 1 {

        ## Process first line.
        print FNR ": " $0;

        while ( getline == 1 ) {
            ## Process from second to last line.
            print FNR ": " $0;
        }
    }
' x.r
#
EOF
#
chmod +x awkGetline.sh
#
cat <<"EOF" > awkPlain.sh
#! /bin/sh
#
awk '
    {print FNR ": " $0;}
' x.r
#
EOF
#
# x.r.100000
#
chmod +x awkPlain.sh
#
# Execute awkGetline.sh 10 times on x.r.100000
rm -f x.t
cp x.r.100000 x.r
for runInstance in 1 2 3 4 5 6 7 8 9 10;
  do
  /usr/bin/time -p -a -o x.t ./awkGetline.sh > x.1.out;
done;
#
cat x.t | grep real | awk 'BEGIN {sum=0.0} {sum=sum+$2; print $2, sum/10;} END {print "SUM Getln", sum;}' | grep SUM
#

#
# Execute awkPlain.sh 10 times on x.r.100000
rm -f x.t
cp x.r.100000 x.r
for runInstance in 1 2 3 4 5 6 7 8 9 10;
  do
  /usr/bin/time -p -a -o x.t ./awkPlain.sh > x.1.out;
done;
#
cat x.t | grep real | awk 'BEGIN {sum=0.0} {sum=sum+$2; print $2, sum/10;} END {print "SUM Plain", sum;}' | grep SUM
#

#
# x.r.1000000
#
chmod +x awkPlain.sh
#
# Execute awkGetline.sh 10 times on x.r.1000000
rm -f x.t
cp x.r.1000000 x.r
for runInstance in 1 2 3 4 5 6 7 8 9 10;
  do
  /usr/bin/time -p -a -o x.t ./awkGetline.sh > x.1.out;
done;
#
cat x.t | grep real | awk 'BEGIN {sum=0.0} {sum=sum+$2; print $2, sum/10;} END {print "SUM Getln", sum;}' | grep SUM
#

#
# Execute awkPlain.sh 10 times on x.r.1000000
rm -f x.t
cp x.r.1000000 x.r
for runInstance in 1 2 3 4 5 6 7 8 9 10;
  do
  /usr/bin/time -p -a -o x.t ./awkPlain.sh > x.1.out;
done;
#
cat x.t | grep real | awk 'BEGIN {sum=0.0} {sum=sum+$2; print $2, sum/10;} END {print "SUM Plain", sum;}' | grep SUM
#

#
# x.r.5000000
#
chmod +x awkPlain.sh
#
# Execute awkGetline.sh 10 times on x.r.5000000
rm -f x.t
cp x.r.5000000 x.r
for runInstance in 1 2 3 4 5 6 7 8 9 10;
  do
  /usr/bin/time -p -a -o x.t ./awkGetline.sh > x.1.out;
done;
#
cat x.t | grep real | awk 'BEGIN {sum=0.0} {sum=sum+$2; print $2, sum/10;} END {print "SUM Getln", sum;}' | grep SUM
#

#
# Execute awkPlain.sh 10 times on x.r.5000000
rm -f x.t
cp x.r.5000000 x.r
for runInstance in 1 2 3 4 5 6 7 8 9 10;
  do
  /usr/bin/time -p -a -o x.t ./awkPlain.sh > x.1.out;
done;
#
cat x.t | grep real | awk 'BEGIN {sum=0.0} {sum=sum+$2; print $2, sum/10;} END {print "SUM Plain", sum;}' | grep SUM
#

exit;
# To save you time in case

#
# x.r.10000000
#
chmod +x awkPlain.sh
#
# Execute awkGetline.sh 10 times on x.r.10000000
rm -f x.t
cp x.r.10000000 x.r
for runInstance in 1 2 3 4 5 6 7 8 9 10;
  do
  /usr/bin/time -p -a -o x.t ./awkGetline.sh > x.1.out;
done;
#
cat x.t | grep real | awk 'BEGIN {sum=0.0} {sum=sum+$2; print $2, sum/10;} END {print "SUM Getln", sum;}' | grep SUM
#

#
# Execute awkPlain.sh 10 times on x.r.10000000
rm -f x.t
cp x.r.10000000 x.r
for runInstance in 1 2 3 4 5 6 7 8 9 10;
  do
  /usr/bin/time -p -a -o x.t ./awkPlain.sh > x.1.out;
done;
#
cat x.t | grep real | awk 'BEGIN {sum=0.0} {sum=sum+$2; print $2, sum/10;} END {print "SUM Plain", sum;}' | grep SUM
#

And of course the first results:
tmp]$ ./awkRun.sh
SUM Getln 0.78
SUM Plain 0.71
SUM Getln 7.2
SUM Plain 6.49
SUM Getln 35.91
SUM Plain 32.92

Where you save about 10% of the time just because of the getline.
Consider this within more complex logic and you might get even a worst picture. In this plain version, memory consideration are not accounted.
And seems they do not play a role for this simple version. But memory might also play a role if you get into more complex logic ...
Of course try it on your machine.
This is why I was suggesting to consider other options, in general.


text:
Q: Как добавить данные из базы в выпадающий список? Возник вопрос. Имеется форма, в ней всего два поля, заголовок и содержание будущей записи.
Захотелось сделать категории к этим записям, хорошо, сущности созданы, в базе таблицы созданы.
Нужно сделать выбор, в какую категорию отнести запись, то есть всё просто по идее - выбрали из выпадающего списка имя категории, создали, получается связь записи, и категории.
Предположим, что в категории существует любой список по названиям. Не важно. Вопрос - как мне в этот выпадающий список закинуть имеющиеся в базе данных элементы категории? Всё, естественно, делается через отдельно созданные типы форм.
<option>
<select></select>
</option>

Видел примеры только с тегами, как это реализовать не могу сообразить.


text:
Q: when column matches text, copy the whole line to new file I'm writing a Perl script. If the text in a specified column (here column 13) matches a certain text namely 'one' or 'two', then the whole line (so all columns) should be copied to another file. My input is a tab-delimited .txt file.
This is what I have so far:
my $table1 = $ARGV[0];
open(my $variants,$table1) || die "$! $table1";
open(my $out,'>',"filtered.txt") || die "Can't write new file: $!";

while(<$variants>){
    chomp;
    my @line=split(/\t/);  #split on tabs
    if (($line[12] =~ m/one/) || ($line[12] =~ m/two/)){
        print $out "$_";
    }
}

Since I'm getting a 'use of uninitialized value' error, I wanted to know what needs to be changed in this code.

A: What is the problem?
perl -F'\t' -ane'print if $F[11]=~/one|two/' input > output

A: This is a great example of a program that should be written using the Unix filter model.
#!/usr/bin/perl

use strict;
use warnings;

while (<>) {
  my @line = split /\t/;

  # Do you mean 12? That's the 13th field
  print if $line[12] =~ /one/ || $line[12] =~ /two/;
}

Simpler to write and easier to understand. Oh, and far more flexible (no hardcoded filenames).
Call it like this:
$ ./my_filter < input_file.txt > output_file.txt


text:
Q: Is it possible to change a ble device's raw(advertising) data on Android I am trying to develop an android application that scan ble(ibeacon) devices and get them advertising data(I am parsing it and get some values like temperature value or beacon name.). But now I need to manipulate this data from android device. Is it possible to manipulate this data from android app? If it is then how? Can anybody help ?

A: Unfortunately there is no standard API to configure beacons (change the values of the fields they advertise).  Some manufacturers provide an API to do this over Bluetooth LE, some to not.  You must check with the manufacturer of your beacon to see if they provide a public API to change the beacon configuration, and then you may be able to code an Android app to do this.   Whether you can do so and how you do so will be different for each beacon make and model.
For the case of the beacons used in the question above, it appears there is no API available to do this.  The sales page below shows that their is an iOS app to configure the beacons, but it does not mention anything about an API that will let you do the same.
http://minew.en.alibaba.com/product/60193606262-220649015/CE_FCC_certified_indoor_location_advertisements_nRF51822_chipset_bluetooth_beacon_ble_ibeacon.html


text:
Q: Highlight places in Python Cartopy maps I am still confused by some aspects of Cartopy. I don't understand why some instructions don't work... For example, if I want to draw a map of Great Britain, I can use the program below, and I get my map.
I understand that the Orthographic projection uses degrees for longitude and latitude, so I set extent = [-6.5, 3.5, 49.5, 59.0] to limit my map, where -6.5 means 6.5° of Eastern longitude and 3.5 means 3.5° of western longitude, etc.
For that, if I want to highlight Greenwich on the map, I think straight away that I have first to define its coordinates: Greenwich_lon, Greenwich_lat = 0.0, 51.0, and then to plot these coordinates: ax.plot(Greenwich_lon, Greenwich_lat, marker='x', markersize=12, color='red').
But this gives me a point on the map that is completely outside the right place!
Why is it so? Does it come from ax.plot which is not appropriate? Does it come from the positioning of parameters Greenwich_lon and Greenwich_lat in ax.plot (I reversed them, but nothing changed)? Does it come from some instruction missing in ax.plot? Does it come from the projection system used?
Where could I find explanations expressed simply, with examples? I know that Cartopy has a huge documentation here, but it's so vast that I am lost more than anything else...
import matplotlib.pyplot as plt
import cartopy
import cartopy.feature as cf
import cartopy.crs as ccrs
import numpy as np

plt.figure(figsize=(8, 8))

extent = [-6.5, 3.5, 49.5, 59.0]
central_lon = np.mean(extent[:2])
central_lat = np.mean(extent[2:])

proj = ccrs.Orthographic(central_lon, central_lat)

ax = plt.axes(projection=proj)
ax.set_extent(extent)
ax.gridlines()

border = cf.NaturalEarthFeature(
    'cultural', 'admin_0_boundary_lines_land', scale='110m')
land = cf.NaturalEarthFeature(
    'physical', 'land', scale='110m',
    edgecolor='black', facecolor=cfeature.COLORS['land'])
ocean = cf.NaturalEarthFeature(
    'physical', 'ocean', scale='110m',
    edgecolor='none', facecolor=cfeature.COLORS['water'])

ax.add_feature(border)
ax.add_feature(land)
ax.add_feature(ocean)

Greenwich_lon, Greenwich_lat = 0.0, 51.0

ax.plot(Greenwich_lon, Greenwich_lat, marker='x', markersize=12, color='red')

plt.show()

A: Cartopy always plot in projection coordinates (same as data coordinates in Matplotlib). In general, it accepts input data in most projection coodinates with options that specifies the coordinate system the data is based on.
It is your responsible to use correct values with accompanying options.
For example, if XXXX() is the map projection coordinates your data is based on,
.set_extent(lon_min, lon_max, lat_min, lat_max, crs=cartopy.crs.XXXX())

.plot(lon, lat, marker'x', transform=cartopy.crs.XXXX())

If you use lat/long in degrees, you can use PlateCarree() in place of XXXX() above.
However, for convenient reasons, .set_extent() has crs=cartopy.crs.PlateCarree() as a default option that you usually omit.
For further information about coordinate system and tranformation:
Cartopy
https://scitools.org.uk/cartopy/docs/latest/tutorials/understanding_transform.html
Since Cartopy is built on top of Matplotlib, you need to look into the related subject in Matplotlib.
Matplotlib
https://matplotlib.org/3.2.1/tutorials/advanced/transforms_tutorial.html


text:
Q: Unity fails to load System.Net.Http script assembly I'm working with Unity 2018.2.1f1 (C# of course) and I tried to use a certain function in Telegram.bot library and it gave me an error indicating that it requires an HttpClient instance as an argument.
So I imported a System.Net.Http package (v4.3.3) from NuGet and put it in the assets folder; The error went away but this other annoying error poped up that says :

"Loading script assembly "Assets/Packages/System.Net.Http.dll" failed!".

And the thing is that unity lets me play the game anyways and the error pretty much doesn't matter, but when I want to get a build file, it comes back and bites me in the a**. So it's pretty annoying.

*

*"Scripting Runtime Version" and "Api Compatibility Level" is set to
.Net 4.x

*"Scripting Backend" is mono.

*"TargetFrameworkVersion" is v4.7.1

*I'm pairing vscode with unity for the record.

This is the script I'm trying to run:
using UnityEngine;
using Telegram.Bot;
using Telegram.Bot.Types;
using Telegram.Bot.Types.Enums;
using System.Net.Http;

public class TelegramSender : MonoBehaviour {

    void Start () {
        TelegramBotClient bot = new TelegramBotClient("<token>", new HttpClient());
        bot.SendTextMessageAsync(new ChatId(<id>), "Hello World!", ParseMode.Html);
    }

}

And this code actually works and sends a "Hello World!" to my telegram channel but the error just stays there and doesn't let you to get an apk.
By the way I don't think there is a Web.config or app.config file in a unity project or at least I can't find it.
Here's an image of the error:
Unity Loading script assembly "System.Net.Http.dll" failed!


text:
Q: Powershell Function String output as input to File based functions I have Powershell v5 running in Windows 10 64Bit OS.
And I also have a nice trick to make the paths with square brackets compatible to be read by Powershell by escaping with tilde signs like $Path.Replace('[','[' ).Replace(']',']'), so intuitively I thought, why not make it a function like below for the same:
Function GetEscapedPath($Path) {
    Return $Path.Replace('[','`[' ).Replace(']','`]')
}

Now I want to use this function return value as input to Remove-Item function or any File-fullpath based functions for that matter, but this doesn't work:
Remove-Item GetEscapedPath $File.Fullname -WhatIf

$File is variable from loop on Get-ChildItem with Fullname selected, but still the above line doesn't print anything.
How can I achieve what I want ?

A: Use (...), the grouping operator to pass the output from a command or expression as an argument to another command:
# Positionally binds to the -Path parameter, which interprets its argument
# as a wildcard pattern.
Remove-Item (GetEscapedPath $File.Fullname) -WhatIf

However, in your particular case, a function is not needed to escape a file-system path in order to treat it literally (verbatim): simply use the -LiteralPath parameter of the various file-related cmdlets instead:
Remove-Item -LiteralPath $file.FullName -WhatIf

See this answer for more information.


text:
Q: How can you ensure an executable is opened via another executable? There's a neat little trick that you can use to never have the OS hold a lock on the .dll's / .exe's an .exe needs to run.
Let's say our directory looks like this:

>opener.exe
>actualProgram.exe
>dependency.dll

As a basic example, we could do this:
namespace Opener
{
    class Program
    {
        static void Main(string[] args)
        {

            AppDomain domain = AppDomain.CurrentDomain;
            AppDomain newDomain = AppDomain.CreateDomain(
                domain.FriendlyName,
                domain.Evidence,
                domain.BaseDirectory,
                domain.RelativeSearchPath,
                true,  // "shadow copy" files: copy rather than lock
                domain.SetupInformation.AppDomainInitializer,
                domain.SetupInformation.AppDomainInitializerArguments
            );
            string assembly =
                System.Reflection.Assembly.GetExecutingAssembly().Location
                + "\\..\\actualProgram.exe";
            newDomain.ExecuteAssembly(assembly, args);
        }
    }
}

We could also put more logic in there, which we could use to actually replace/update actualProgram.exe despite an instance of the process being opened. Try it: you'll be able to delete/modify/replace dependencies and the "actual" program when it's loaded via the "opener". Obviously this has its benefits, namely making updates a lot easier.
But in your "actual.exe", how can you be sure that it was loaded via another executable, and know that it was loaded without having a lock taken on the .exe? If someone is to just load the "actual.exe", i.e. not via the "opener", I want to make sure that the process immediately exits.
Hints?

A: *

*Pass a command line parameter to actualProgram.exe that lets it know it was launched by the launcher. (Also suggested in a comment on the OP by oleksii)

*Set an environment variable in the launcher that can be inherited by the child process.

*Use one of the documented methods for getting the parent process id, and use that to get information about the launching process. (Of course if the parent process terminates, Windows is free to re-assign the PID to a new process.)

*Create a memory-mapped file/named pipe/etc. in the launcher that can be used to pass information to the child.

*Manually load and unload the library references in the child.  If they are .Net assemblies, you can use the AssemblyResolve event, loading the file from disk into a byte array and using the Assembly.Load(byte[], byte[]) overload.

Note: As long as all of your assemblies are loaded manually or by the runtime before you modify/move/delete them, you're probably ok. Also, changing the DLL after it's been loaded will probably have no effect on the running process.  I say probably in both cases, because it's generally a good idea to leave the libraries alone at runtime, especially if you aren't loading them manually.
See Also:

*

*Run-Time Dynamic Linking @ MSDN

*How can a Win32 process get the pid of its parent?

*Assembly.Load Method (Byte[], Byte[])

A: How about sending a custom message to the application after it is launched?  The code to launch would be something like this:
private void LaunchApplication()
{
  ProcessStartInfo start = new ProcessStartInfo();

  //you could pass in arguments here if you wanted
  start.Arguments = string.Empty;

  //your EXE name
  start.FileName = @"c:\your_program.exe";

  start.WindowStyle = ProcessWindowStyle.Normal;
  start.CreateNoWindow = true;

  Process p = Process.Start(start);
  while (0 == (int)p.MainWindowHandle)
  {
    System.Threading.Thread.Sleep(100);
  }
  processHandle = p.MainWindowHandle;
  label1.Text = processHandle.ToString();

  //the launched program will receive this message as a signal that it can continue
  SendNotifyMessage(processHandle, 99999, UIntPtr.Zero, IntPtr.Zero);
}

and the application you are running would need a short custom windows message handler to watch out for the "stay-alive" signal.
private bool allowedToLive = false;
//how long will we wait for the signal?  should arrive in < 1 second
private int TimeoutSeconds = 1;
private DateTime appStartTime = DateTime.Now;

protected override void WndProc(ref Message m)
{
  base.WndProc(ref m);
  //receiving the special message means we are allowed to live.
  if(!allowedToLive)
  {
    allowedToLive = (m.Msg == 99999);
    if (!allowedToLive && (TimeoutSeconds <= DateTime.Now.Subtract(appStartTime).Seconds))
    {
      //times up.  quit.
      Application.Exit();
    }
  }
}

If you don't want to rely on the timing of windows messages, you could alter your target program to launch, but not actually begin doing anything until it receives the custom message.


text:
Q: How to create Data Driven Auto Complete drop down TextBox? I made this code with the help of tutorials now the problem is that I want Data Driven Auto Complete TextBox Using jQuery for ASP.NET Websites but when I run this code it works without any errors but it can not show the dropdown and can not show the data which is in OCRD table:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;
using System.Text;
using System.Data.Sql;
using System.Web.Services;

namespace tutorialPoints
{
    public partial class WebForm1 : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
        }

        [WebMethod]
        public static List<string> GetCardNames(string empName)
        {
            List<string> Emp = new List<string>();
            string query = string.Format("SELECT CardName FROM OCRD WHERE CardName LIKE '%{0}%'", CardName);
            using (SqlConnection con = new SqlConnection("Data Source=1.2.3.4;Initial Catalog=TestData;Persist Security Info=True;User ID=abc;Password=abcd");
            {
                using (SqlCommand cmd = new SqlCommand(query, con))
                {
                    con.Open();
                    SqlDataReader reader = cmd.ExecuteReader();
                    while (reader.Read())
                    {
                        Emp.Add(reader.GetString(0));
                    }
                }
            }
            return Emp;
        }

        public static SqlConnection con { get; set; }

        public static string CardName { get; set; }
    }
}

I want output like this:


text:
Q: What was defined in unicode-math to occur that? Initial code:
\documentclass{book}

\begin{document}
:$\overline {\mathit v}$:
\end{document}

Use unicode-math package:
\documentclass{book}
\usepackage[bold-style=ISO, mathbf=sym]{unicode-math}
\begin{document}
:$\overline {\mathit v}$:
\end{document}

Patch code:
\documentclass{book}
\usepackage[bold-style=ISO, mathbf=sym]{unicode-math}
\setmathfont{TeX Gyre Termes Math}
\begin{document}
:$\overline {v}$:

:$\overline {\mathit{v}}$:
\end{document}


text:
Q: Powershell list of dictionaries or hashtable I want to create a list of dictionaries, in order for me to export it to CSV. As you may know in PowerShell if you want to export an array filled with strings to CSV file, it won't work, so I have to create objects for this.
But the way I'm doing it if evasive, and I don't feel it's the correct way of creating a list of dictionaries/hashtable, nevertheless I didn't create a function for repeated code (sorry for this).
#add the log file.
$savegrp = Get-Content "J:\savegrp.dec.2015.log"
#filtering into a var just Succeeded/Failed data then replace  space with ';' and remove ','
$succeded = ($savegrp -cmatch "Succeeded:") -replace "\s+",";" -replace ",",""
$failed = ($savegrp -cmatch " Failed: ") -replace "\s+",";" -replace ",",""

#creating container where all data will be added
$container = @()
#just a date to save the csv file if this script will be scheduled
$date =  Get-Date -format dd.MMMM.yyyy

#take each line of data with 'Succeeded' match and iterate it
for($i=0;$i -le ($succeded.count-1);$i++) {

    #split each line by ';' to see how many items are per one line
    $s1 = ($succeded[$i]).split(";")

    #if in one 'Succeeded' line are just 6 element then is just one server which is ok
    if ($s1.count -eq 6){

        $PropertyHash = @{}
        $PropertyHash =  @{
            "Date" = $s1[1] + " " + $s1[0]
            "Time" = $s1[2]
            "Client" = $s1[5]
            "Status" = $s1[4].Substring(0,9)
        }
        $container += New-Object -TypeName PSObject -Property $PropertyHash
    }
    #if in one 'Succeeded' line are more servers, then stick all sererers to the same info in the line
    else{
        $count = ($s1.count)

        for($a = $count-1;$a -ge 5){

            $PropertyHash = @{}
            $PropertyHash +=  @{
                "Date" = $s1[1] + " " + $s1[0]
                "Time" = $s1[2]
                "Client" = $s1[$a]
                "Status" = $s1[4].Substring(0,9)
            }
            $container += New-Object -TypeName PSObject -Property $PropertyHash
            $a--
        }
    }
}

A: Something like this should work just fine, provided you have PowerShell v3 or newer:
for ($i = 0; $i -lt $succeded.Count; $i++) {
  $date1, $date2, $time, $null, $status, $clients = $succeded[$i].Split(';')
  $clients | ForEach-Object {
    New-Object -Type PSObject -Property @{
      'Date'   = "$date2 $date1"
      'Time'   = $time
      'Client' = $_
      'Status' = $status.Substring(0,9)
    }
  } | Export-Csv 'C:\path\to\output.csv' -NoType -Append
}

PowerShell allows you to assign arrays to a list of variables, each of which takes a single element from the array, except for the last one, which takes all the remaining array elements. The statement
$date1, $date2, $time, $null, $status, $clients = $succeded[$i].Split(';')

collects date, time and status in the respective variables $date1, $date2, $time and $status. The 4th value is discarded by assigning it to $null. The rest of the array resulting from the split operation (the list of clients) is assigned to the "catch-all" variable $clients. Then you can pipe that variable into a ForEach-Object statement where you create one object for each client and append them to your CSV file (note that you need at least PowerShell v3 to be able to append to a CSV).
Edit: If you're stuck with PowerShell v2 or earlier you could also do the export outside the loop. However, for that to work you need to either run it in a subexpression:
(for ($i = 0; $i -lt $succeded.Count; $i++) {
  $date1, $date2, $time, $null, $status, $clients = $succeded[$i].Split(';')
  $clients | ForEach-Object {
    New-Object -Type PSObject -Property @{
      'Date'   = "$date2 $date1"
      'Time'   = $time
      'Client' = $_
      'Status' = $status.Substring(0,9)
    }
  }
}) | Export-Csv 'C:\path\to\output.csv' -NoType

or collect the results in a variable first:
$container = for ($i = 0; $i -lt $succeded.Count; $i++) {
  $date1, $date2, $time, $null, $status, $clients = $succeded[$i].Split(';')
  $clients | ForEach-Object {
    New-Object -Type PSObject -Property @{
      'Date'   = "$date2 $date1"
      'Time'   = $time
      'Client' = $_
      'Status' = $status.Substring(0,9)
    }
  }
}

$container | Export-Csv 'C:\path\to\output.csv' -NoType


text:
Q: ES6 arrow notation with Jquery filter()? I'm filtering a Jquery collection like so:
$('li').filter(function(i, v) {
  if($(v).is('.selected')) {return v;}
})

Is there any way to shorten this to an arrow notation? Like the following, which does not work:
$('li').filter(x => $(x).is('.selected));

A: Both parameters are still required. The first is the index, and the second is the element:
$('li').filter((index, el) => $(el).is('.selected'));


text:
Q: django modelform clean I've found a few posts that are similar in nature to this but they haven't been 100% clear so here goes:
In my views I have an add_album view that allows a user to upload an album. What I'd like to do is clean the form (AlbumForm) to check if this album is unique for an artist.
My AlbumForm looks like this:
class AlbumForm(ModelForm):
  class Meta:
    model = Album
    exclude = ('slug','artist','created','is_valid', 'url', 'user', 'reported')

  def clean_name(self):
    super(AlbumForm, self).clean()
    cd = self.cleaned_data
    try:
      Album.objects.get(slug=slugify(cd['name']), artist=artist)
      raise forms.ValidationError("Looks like an album by that name already exists for this artist.")
    except Album.DoesNotExist:
      pass

    return cd

So that's something along the lines of what I'd like to do.
My questions is: is there a way to pass the artist object from my view to the form so I can use that artist instance in the clean method?
I think I am looking at overriding the __init__ method of the ModelForm, but I am unsure how to do it.

A: A better way to do this is at the model level, with the built-in Meta option, unique_together.
If you've got a model Album, then you can probably do something like this:
def Album(models.Model):
   ...

   class Meta:
     unique_together = ("artist_id", "title")


text:
Q: What does "deep" mean in the Deep Thinker / Summer Swimming Hole / etc achievements in Tidalis? I'm trying to get the Summer Swimming Hole achievement, following this video's suggestion.
Description: Create a combo at least 6 deep.
Problem is, it doesn't seem to be working and I'm not sure why.  I think part of it is that I don't know what the goal is actually looking for, I can think of several interpretations:

*

*Six+ blocks in a single chain (tried before I resorted to cheating)

*Six or more chains in a single combo (well and truly done following the video)

*Combo including blocks in six plus rows (also done when following the video)

Is there something I'm missing, here?  I don't know what I'm supposed to do.  Is it just glitching or something, maybe?

A: In Tidalis, a chain refers to blocks removed by a single stream, and a combo refers to blocks removed by streams triggered by blocks falling after a chain, specifically how many times this happens in succession. A combo which is "6 deep" means a combo where blocks are removed 6 times based on (and including) the initial stream. (I'm not 100% certain how it treats multiple successful streams caused by the same drop, but I think it counts them seperately.)
The simplest possible 6 combo would be something like this:
***
###
***
###
***
###

where * and # represent two different colors.
To get that 6 combo, you would simply need to align all of the blocks such that you can remove one "row" at a time with a single stream. Using < and > to show arrows pointing left/right, that means you'd arrange them like this:
>>>
<<<
>>>
<<<
>>>
<<<

You can them remove the bottom row, which will cause the tiles above to fall, which will start a new stream on the bottom row, which will cause the tiles above to fall, and so on until all 6 rows are gone.
In practice, you probably won't get that exact scenario, so you'll have to think a bit ahead - start with something near the bottom, figure out how the bricks fall, and set up a combo. Remember that if you're quick enough, you can set these up on the fly, while streams are flying, so you don't necessarily have to map out the entire chain in advance.
If you're having trouble setting it up in a normal game, create a custom game with fewer colors (3-4 is a good choice) and choose Zen mode. It should be fairly easy to set up such a scenario in that case, and once you get it, click the flag to finish the level and get your achievement.
In the video you link to, the player appears to be (ab)using the fact that the game doesn't wait for combos to end when the time limit expires. Because there's only one color, it's nearly guaranteed that some stream can be generated from the falling blocks, so he just sets up one big playing field, and lets it run. When the time limit expires, a 6 combo will almost surely have been reached, and the achievement will be granted at the end of the game.


text:
Q: How to pick the next Datetime for same AgentID in SQL The first column (CALL_START) is time on which somebody of some particular ID (CALLER_ID) made a call. see snippet of data here.
Now I want to pick out the next call of the same ID and store it in a new column named as 'Next_call' and if there is no next call it stores NULL.
So this is the result that I want below.
CALL_START             NEXT_CALL             CALLER_ID
2017-01-14 10:50:38   NULL                  2837061
2017-01-14 10:21:03   2017-01-14 10:50:38   2837061

The CALLER_ID should be same to find the next call, so I have to find a next call according to each ID.
I have tried this so far.
select CALL_START, CALLER_ID
from call_data.records
where CALL_START > (select CALL_START from call_data.records group by CALLER_ID)
;

This query does not work for me and I am not sure how to do it exactly as I am learning sql
records is a temp table which I joined using different table's data.
I am new to learning SQL, so any help would be greatly appreciated.

A: If you are running MySQL 8.0, you can use lead()|:
select
    call_start,
    lead(call_start) over(partition by caller_id order by call_start) next_call,
    caller_id
from call_data.records r

In earlier versions, one alternative is a subquery:
select
    call_start,
    (
        select min(r1.call_start)
        from call_data.records r1
        where r1.caller_id = r.caller_id and r1.call_start > r.call_start
    )  next_call,
    caller_id
from call_data.records r


text:
Q: How should i add RAW IP packet to NDIS type Mobile broadband for support? I'm trying to add support for Windows 7 Mobile Broadband Adapters to a  LWF driver .
So now I need to connect with USB dongle . I have a
dongle with support RAS modem and NDIS . My application can connect with RAS
modem on dongle . I have a interface list which shows the list of active
adapters . But when I set NDIS on dongle , I can't see that adapter (3g network
card ) on that list . After setting ( ip automatically ,DHCP automatically from
adapter properties ) I can see that adapter is active . But I can't connect via
NDIS . But I can Connect RAS modem with dongle .
My application has 2 INF files . In Mux ,I have one INF
file and also in virtual adapter another INF file . So I am confused that which one I should modify ?
I got good documentation from Microsoft regarding INF file changes for mobile broadband .

*

*https://msdn.microsoft.com/en-us/library/windows/hardware/ff557185(v=vs.85).aspx
so in MUX INF files has :
[INSTALL.NDI]

HKR, Ndi, FilterClass, , custom
HKR, Ndi, FilterType, 0x00010001, 0x00000002
HKR, Ndi\Interfaces, UpperRange, , "noupper"
HKR, Ndi\Interfaces, LowerRange, , "nolower"
HKR, Ndi\Interfaces, FilterMediaTypes, , "nolower, ethernet, wan"
HKR, Ndi, FilterRunType, 0x00010001, 1

and i chnaged to
[INSTALL.NDI]

HKR, Ndi, FilterClass, , custom
HKR, Ndi, FilterType, 0x00010001, 0x00000002
HKR, Ndi\Interfaces, UpperRange, , "noupper"
HKR, Ndi\Interfaces, LowerRange, , "nolower"
HKR, Ndi\Interfaces, FilterMediaTypes, , "nolower, ethernet, wan, ppip"
HKR, Ndi, FilterRunType, 0x00010001, 1

ppip is added here ..
in Virtual adpter INF file
HKR, Ndi\Interfaces, UpperRange, , "ndis5"
HKR, Ndi\Interfaces, LowerRange, , "ethernet"

and I got another information about packet (buffer list )
https://msdn.microsoft.com/en-us/library/windows/hardware/ff559110(v=vs.85).aspx
but my problem is where should I put this code ? before send or receive function ?
In filter.cpp file , I added NdisMediumWirelessWan to the function
NDIS_STATUS CFilter::Attach(
    IN NDIS_HANDLE NdisFilterHandle,
    IN PNDIS_FILTER_ATTACH_PARAMETERS AttachParameters
) {

    NDIS_STATUS status = NDIS_STATUS_SUCCESS;
    if (
        (AttachParameters->MiniportMediaType != NdisMedium802_3)
        && (AttachParameters->MiniportMediaType != NdisMediumWan)
        && (AttachParameters->MiniportMediaType != NdisMediumNative802_11)
        && (AttachParameters->MiniportMediaType != NdisMediumWirelessWan)

    ) {
        status = NDIS_STATUS_INVALID_PARAMETER;
        goto myExit;
    }

I have sendbufferlist function :
VOID CFilter::SendNetBufferLists(
    IN PNET_BUFFER_LIST NetBufferLists,
    IN NDIS_PORT_NUMBER PortNumber,
    IN ULONG SendFlags
) {

    PNET_BUFFER_LIST pSendNetBufferList = NULL;
    PNET_BUFFER_LIST pSendNetBufferListComplete = NULL;

    PNET_BUFFER_LIST pNetBufferList = NetBufferLists;
    PNET_BUFFER_LIST pNextNetBufferList = NULL;

     ***  i am doing RAW IP packet here ***

    NdisSetNblFlag(pNetBufferList, NDIS_NBL_FLAGS_IS_IPV4);
    NET_BUFFER_LIST_INFO(pNetBufferList, NetBufferListFrameType) = 0x0008;

    *** END my IP raw Packet code ****

    while (pNetBufferList) {
        pNextNetBufferList = NET_BUFFER_LIST_NEXT_NBL(pNetBufferList);
        NET_BUFFER_LIST_NEXT_NBL(pNetBufferList) = NULL;

        if (pNetBufferList->ChildRefCount != 0) {
            DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, "!!! [%p]
CFilter::SendNetBufferLists(): pNetBufferList->ChildRefCount != 0\n", this);
        }

        PNET_BUFFER pNetBuffer = NET_BUFFER_LIST_FIRST_NB(pNetBufferList);
        PNET_BUFFER pNextNetBuffer = NULL;
        while (pNetBuffer) {
            pNextNetBuffer = NET_BUFFER_NEXT_NB(pNetBuffer);

is this correct way to connect NDIS type mobile broadband ? or How should I modify this code to get support for NDIS type Mobile broadband . because I can connect RAS type on USB dongle .
please help me .
Thanks & regards


text:
Q: How to change data in every item in ObservableCollection? I have a this structure in XAML where every item has checkbox.
□ Fruits
   □ Apple
   □ Banana
   □ Orange

My goal is to have a function that if Fruit's checkbox is checked, it will check all (select all) fruits.
So I am binding my ViewModel's function in my Checkbox's IsChecked.
<TreeView
    ItemsSource="{Binding Foods}">
    <TreeView.Resources>
        <HierarchicalDataTemplate DataType="{x:Type domain:Food}" ItemsSource="{Binding Fruits}">
            <StackPanel Orientation="Horizontal">
                <CheckBox
                    IsChecked="{Binding SelectAll}"
                    />
                <TextBlock Text="   "/>
                <TextBlock Text="{Binding Name}"/>
            </StackPanel>
        </HierarchicalDataTemplate>
        <DataTemplate DataType="{x:Type domain:Fruit}">
            <TextBlock Text="{Binding Name}"/>
        </DataTemplate>
    </TreeView.Resources>
</TreeView>

My ViewModel is:
private bool _selectAll = false;

public bool SelectAll
{
    get
    {
        return _selectAll;
    }
    set
    {
        foreach (var item in Fruits)
        {
            item.isSelected = true;
        }
    }
}

Edit
public class Food
{
    public string Name { get; set; }
    public ObservableCollection<Fruit> Fruits { get; set; } = new ObservableCollection<Fruit>();
}

public class Fruit
{
    public string Name { get; set; }
    public bool IsSelected { get; set; }
}

But nothing's happening.

A: I'm not entirely sure what you were expecting, but with the XAML given in the Question I didn't even have check boxes in front of the individual Fruit names, so I had to edit the XAML a little:
<TreeView
    ItemsSource="{Binding Foods}">
    <TreeView.Resources>
        <HierarchicalDataTemplate DataType="{x:Type domain:Food}" ItemsSource="{Binding Fruits}">
            <StackPanel Orientation="Horizontal">
                <CheckBox
                    IsChecked="{Binding SelectAll}" />
                <TextBlock Text="   " />
                <TextBlock Text="{Binding Name}" />
            </StackPanel>
        </HierarchicalDataTemplate>
        <DataTemplate DataType="{x:Type domain:Fruit}">
            <!-- Here I added the StackPanel and the CheckBox -->
            <StackPanel Orientation="Horizontal">
                <CheckBox IsChecked="{Binding IsSelected}" />
                <TextBlock Text="{Binding Name}" />
            </StackPanel>
        </DataTemplate>
    </TreeView.Resources>
</TreeView>

After that I did some code changes, mainly I just implemented INotifyPropertyChanged. So the Food and Fruit class look like this now:
public class Food
{
    public string Name { get; set; }

    public ObservableCollection<Fruit> Fruits { get; set; }

    private bool _selectAll;

    public bool SelectAll
    {
        get => _selectAll;
        set
        {
            _selectAll = value;
            foreach (var f in Fruits)
                f.IsSelected = value;
        }
    }
}

And Fruit like this
public class Fruit : INotifyPropertyChanged
{
    public string Name { get; set; }

    private bool _isSelected;

    public bool IsSelected
    {
        get => _isSelected;
        set
        {
            _isSelected = value;
            OnPropertyChanged();
        }
    }

    public event PropertyChangedEventHandler PropertyChanged;

    [NotifyPropertyChangedInvocator]
    protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
    {
        PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
    }
}

Edit: INotifyPropertyChanged isn't needed on Food


text:
Q: Does Prometheus' "container_fs_usage_bytes" contain PVCs? I want to measure the local volume usage of POD excluding PVC.
Does the "container_fs_usage_bytes" query include PVC usage?
Also, is there any query to know the maximum value of the local volume?


text:
Q: Pandas rolling average of a columns of dates I'm trying to calculate the rolling average of a column of datetime objects. In my scenario, the input data are the last day below freezing each year for ~100 years.
Ignoring the years, I want to take a rolling average over the month-day rows. The output would be the average last day below freezing over some window of years.
My final plot will be years on the x-axis and the rolling average of the last day below freezing on the y-axis.
Here is a minimal setup of rows I want to average over.
df = pd.Series(['1900-05-04','1901-05-03', ..., '1910-04-30'])
df = pd.to_datetime(df)

>>> df

87   1900-05-04
88   1901-05-03
89   1902-05-06
90   1903-05-01
91   1904-05-03
92   1905-04-29
93   1906-05-03
94   1907-05-03
95   1908-05-04
96   1909-04-30
97   1910-04-30
dtype: datetime64[ns]

Desired output (with or without the years) with a window size of two would be:
1   1901-05-04
2   1902-05-05
3   1903-05-04
4   1904-05-02
5   1905-05-01
6   1906-05-03
7   1907-05-04
8   1908-05-02
9   1909-04-30
10  1910-04-30

A: Here is a hack! It should be taken as inspiration and mostly like there exist a better one as it's not optimal
pd.to_datetime(pd.DataFrame((df.loc[1:].dt.year, df.loc[1:].dt.month,
df.groupby(df.dt.month).transform(lambda d: d.dt.day.rolling(2).mean().round(0)).loc[1:].astype(int))).T.rename(columns={0:'year',1:'month',2:'day'}))

I group by month and took a rolling mean. I rebuilt the date by assembling the year, month and rolled day.
Results:


text:
Q: WebEclipse Javascript debugger not installed error in eclipse I have installed Tern debugger when i try to re-install it then it showing me message - "Debugger Support for Webclipse" is already installed, so an update will be performed instead.
But when i try to debug my protractor test in Eclipse Juno IDE then it showing error- WebEclipse Javascript debugger not installed. Can Anybody help me where i missed??


text:
Q: Calculating the abscissa of convergence for general Dirichlet Series I'm currently interested in proving this theorem which I have been thinking for quite a while:
Define a Dirichlet Series
$$\sum_{k=1}^{\infty}a_k e^{-\lambda_k z}$$
where $\lambda_k$ is a strictly increasing sequence and $z \in \mathbb{C}$.
I'm interested in proving that if the abscissa of convergence $\sigma_c <0$, then
$$\sigma_c = \eta := \limsup_{n \to \infty} \frac{\log |R_n|}{\lambda_n}$$
where $R_n= \sum_{k=n+1}^{\infty}a_k$.
Anyone has any idea on how to start? I'm pretty much stuck after trying to use Abel's transformation like in the proof for when $\sum a_k$ is divergent.

A: I apologize for the delay in writing this up. Here is a proof of the remaining inequality (the one not proved in your answer, ireallydonknow). As I mentioned in a comment, this proof is a simple application of ideas found on page 7 of Hardy & M. Riesz's The General Theory of Dirichlet's Series. Here are a few remarks (mostly paraphrasing that book) to clarify the import of these formulas for other people who stumble across this question and wonder about its motivation. Basically, this formula is an analogue of the root test for the convergence of a power series (in fact, in the case $\lambda_n = n$ the two tests coincide). The situation is much more subtle in the context of Dirichlet series, however—a power series converges absolutely or diverges except possibly on a subset of a single circle, where it may converge conditionally (I think though that that subset can be quite complicated); a Dirichlet series, on the other hand, may converge conditionally (and not absolutely) on a strip or even on the entire plane. Hardy and Riesz, for instance, give as an example on page 9 the series $\Sigma (-1)^n (\log n)^{-s}/\sqrt{n}$.
With that, let me turn to the proof I mentioned in the comments. Right off the bat let me say that your formula is slightly off as written, in that the $\lambda_n$ appearing in the definition of $\eta$ should really be $\lambda_{n+1}$. To be completely precise, assume that $\sigma_c\leq 0$ and put
\begin{align*}
 R_n = \sum_{k = n+1}^\infty a_k, \quad \eta = \limsup_{n\to\infty} {\log |R_n|\over \lambda_{n+1}};\tag{1}
\end{align*}
then $\eta = \sigma_c$. You'll see that the proof given in your own answer, ireallydonknow, carries through perfectly well with $\eta$ defined as in $(1)$, and shows that under these circumstances $\sigma_c\geq \eta$. The purpose of this answer, then, is to prove the reverse inequality $\sigma_c\leq \eta$. This reverse inequality will be proved if it can be shown that the Dirichlet series $\Sigma a_k e^{-\lambda_k s}$ converges whenever $s$ is a real number strictly larger than $\eta$, and that is what we'll show.
Thus, suppose $s>\eta$; we may assume moreover that $s<0$, since by hypothesis $\sigma_c\leq 0$. A tautological implication of the definition $(1)$ of $\eta$ is that $\log{|R_n|} \leq \lambda_{n+1}(\eta + o(1))$ as $n\to\infty$, and so $|R_n| \leq e^{\lambda_{n+1}(\eta + o(1))}$. Now use summation by parts to write (I'm denoting by $A$ the sum $\Sigma a_k$)
\begin{align*}
\sum_{k=1}^n a_k e^{-\lambda_k s} &= \sum_{k = 1}^n (R_{k-1} - R_k) e^{-\lambda_k s} \\
&= Ae^{-\lambda_1 s} - R_n e^{-\lambda_n s} + \sum_{k=2}^{n-1} R_k \left( e^{-\lambda_{k+1} s} - e^{-\lambda_k s}\right).
\end{align*}
First, $R_n e^{-\lambda_n s} \to 0$ as $n\to \infty$:
\begin{align*}
\log{|R_n|} - \lambda_n s < \log{|R_n|} - \lambda_{n+1} s \leq \lambda_{n+1}(\eta + o(1) - s) \to -\infty \quad \text{as $n\to\infty$,}
\end{align*}
using $\eta - s<0$ and $\lambda_{n+1}\to\infty$ for the limit relation at the end. The first inequality relies on $s<0$ and $\lambda_n<\lambda_{n+1}$ to conclude $-\lambda_n s<-\lambda_{n+1} s$.
We're now reduced to showing that $\Sigma R_k (e^{-\lambda_{k+1} s} - e^{-\lambda_k s})$ converges. (This is the part where we actually need my definition $(1)$ of $\eta$ instead of yours.) The sum actually converges absolutely. To see this, we follow the example of Hardy and Riesz and bound the general term as follows:
\begin{align*}
 |R_k| (e^{-\lambda_{k+1} s} - e^{-\lambda_k s}) &\leq e^{\lambda_{k+1}(\eta + o(1))} (e^{-\lambda_{k+1} s} - e^{-\lambda_k s}) \\
 & \leq |s| (\lambda_{k+1} - \lambda_k) e^{\lambda_{k+1}(\eta - s + o(1))}\\
 &\leq |s| \int_{\lambda_k}^{\lambda_{k+1}} e^{x(\eta - s + o(1))}\,dx
\end{align*}
provided $k$ is large enough that $\eta - s + o(1) < 0$. Note that we use my definition $(1)$ of $\eta$ to get the third inequality, because we rely on $\lambda_{k+1}$ in the exponential factor arising in the bound on $|R_k|$; the definition in the question would lead to $\lambda_k$ instead, which isn't enough to make the third inequality hold. Anyway, the integrals are summable, and the proof is finished.

A: @NickStrehlke This is the part for $\sigma_c \geq \eta$.
Let $s\leq 0$ be fixed so that the series converges at $s$. Define $B_n=\sum_{k=1}^{n}a_k e^{-\lambda_k s}$. We have $a_k e^{-\lambda_k s}=B_k - B_{k-1}$. Note that since the series converges at $s$, the partial sums of $B_n$ converge. Hence, the partial sums of $B_n$ are bounded, i.e., there exists some constant $M>0$ such that $|B_n|\leq M$ for all $n$. Now,
\begin{align}
|R_n| \notag &=\left|\sum_{k=n+1}^{\infty} a_k e^{-\lambda_k s} \cdot e^{\lambda_k s} \right| \\ \notag &=\left|\sum_{k=n+1}^{\infty} [B_k - B_{k-1}] e^{\lambda_k s} \right| \\ \notag &= |[B_{n+1}-B_n]e^{\lambda_{n+1} s}+[B_{n+2}-B_{n+1}]e^{\lambda_{n+2} s}+...| \\ \notag &= |-B_n e^{\lambda{n+1} s}+\sum_{k=n+1}^{\infty} B_k (e^{\lambda_k s}-e^{\lambda_{k+1} s})| \\ \notag &\leq |B_n e^{\lambda_{n+1} s}|+\sum_{k=n+1}^{\infty} |B_k|(e^{\lambda_k s}-e^{\lambda_{k+1} s}) \\ \notag &\leq Me^{\lambda_{n+1} s}+M\sum_{k=n+1}^{\infty}(e^{\lambda_k s}-e^{\lambda_{k+1} s})
\end{align}
If $s=0$, then
$$\frac{\log |R_n|}{\lambda_n} \leq \frac{\log M}{\lambda_n}.$$
Taking the limit superior on both sides of the inequality, we get
$$\eta=\limsup_{n \to \infty} \frac{\log |R_n|}{\lambda_n} \leq \limsup_{n \to \infty} \frac{\log M}{\lambda_n}=0=s.$$
If $s<0$, then
$$\sum_{k=n+1}^{\infty}(e^{\lambda_k s}-e^{\lambda_{k+1} s})=e^{\lambda_{n+1}s},$$
and because $(\lambda_n)$ is strictly increasing,
$$|R_n|\leq 2Me^{\lambda_{n+1}s} < 2Me^{\lambda_n s}.$$
Then we have
$$\eta=\limsup_{n \to \infty} \frac{\log |R_n|}{\lambda_n} \leq \limsup_{n \to \infty} \frac{\log 2M}{\lambda_n}+s=s,$$
which implies that $\eta \leq s$.
Since $\sigma_c = \inf s$, $\eta \leq \sigma_c$.


text:
Q: How to clear inputs (reset forms) after submitting I am starting to program angular and I do not understand how I can clear the inputs after clicking a submit button.
Can anyone explain to me a simple procedure of being able to clear / reset the inputs / forms after clicking the submit button? Is there a way to put any validator in one of the fields?
I've seen some topics on the subject, but could not understand the logic.
DEMO
HTML
<form>

    Email address
    <input type="email" class="form-control" id="exampleFormControlInput1">

    Adress
    <input type="text" class="form-control" id="exampleFormControlInput1">

    Name
    <input type="text" class="form-control" id="exampleFormControlInput1">

    Example textarea
    <textarea class="form-control" id="exampleFormControlTextarea1" rows="3"></textarea>

  <button type="submit" (click)="clearforms()">SUBMIT</button>
</form>

A: I'd strongly recommend following the first commenter's advice.
Here is a working example which makes use of Template Driven Forms, which basically represents a declarative way to build your form tree.
If you're dealing with more dynamic stuff, you should consider using Reactive Forms, it will give you much more control on the situation.
You can also provide validators. You can do this either through some directives, or, especially when using Reactive Forms, through the Validators object.
For instance, here's how you'd use an email validator as a directive:
<input ngModel name="email" email>

Here is a file that contains all the validators which are available as directives.


text:
Q: Check class attribute: method, attribute or nonexistent I want my class to check if:

*

*Desired attribute exist

*If it is a method, it should return a result of method

*If it is an attribute, return the value

*If none exist, raise an AttributeException

My solution (not working):
class A:
   def __getattr__(self, item):
       try:
           return self.item()
       except AttributeError:
           try:
               return self.item
           except AttributeError:
               raise AttributeError

   y = 2
   def x(self):
     return 1

My test:
a = A()
print(a.x)

My result:
<bound method A.x of <__main__.A object at 0x7f992de18c50>>

As you can see, it returns a reference to the function, not its result. Where did I go wrong?

Solved
My problem is solved by using
@property

decorator.
All i wanted - to call method as property

A: It's the way Python works. Methods are just attributes of type bound method.
You can make this work better, but only heuristically. E.g. if you want to disallow bound methods, check for the type, and call.
However this would mean you'd get into trouble if that bound method is returned because it's supposed to be a callback provided by a property.
You can also check on the class-Attribute of the object if there is a property-declaration for a given name, etc.
All in all I would question your approach. There is a simple solution to this: instead of assuming what things are, let the user make that decision.

A: __getattr__ is called only when the regular lookup doesn't find the item. When you lookup an item, object's __getattribute__ is run first. If it raises AttributeError (it didn't find it in the object's dict) -- then it calls __getattr__.
The reason your code returned bound method is it never executed the __getattribute__ code since the attribute is found through the regular lookup process. Even if it were executed, it wouldn't work. item is a variable holding the parameter. self.item doesn't exist; the way to do it is using attr = getattr(self, item).
What you need is @property, which let you access methods like they were attributes:
    ... class code ...

    @property
    def x(self):
        return 1

a = A()
print a.x
1

Note you can't call the attribute as a function anymore:
a.x()
Traceback (most recent call last):
  File "C:\Python27\tests\test.py", line 12, in <module>
    print a.x()
TypeError: 'int' object is not callable


text:
Q: ObjC ARC: does a weak property's setter method run when the object is set to nil by ARC? Really quick question (I could test it myself but not on a computer with Xcode):
If ARC sets a weak property to nil, will the property's setter run with the parameter being nil, or is the property setter bypassed in this case?

A: No. ARC doesn't set properties to nil. It will set the backing ivar to nil, but that doesn't run your setter.


text:
Q: Jetpack Compose sheetContent is executed even though Bottom sheet is not expanded How to make sheetContent execute only when the bottom sheet is expanded and decompose when you hide it.

A: That is the default behavior of ModalBottomSheetLayout. Here a workaround. For example, if you don't want to make unnecessary API requests when the bottom sheet is not expanded.
@OptIn(ExperimentalMaterialApi::class)
@Composable
fun RunWhenExpanded(sheetState: ModalBottomSheetState, content: @Composable () -> Unit) {
    if (sheetState.currentValue == ModalBottomSheetValue.Expanded) {
        content()
    } else {
        Box(modifier = Modifier.height(0.5.dp)) {}
    }
}

RunWhenExpanded(sheetState) {
    Content()
}

I'm sure there's a better way.


text:
Q: Прослушка клиентов при многопоточности Пишу небольшую мультиплеерную настольную игру. Каждый "стол" игры планируется в отдельном потоке. Возник вопрос по организации приема данных от клиентов (соединение UDP):
Все потоки слушают 1 порт и каждый ловит из общей массы нужную для стола инфу
или же
назначать порт для каждого отдельного стола избавляя от функции сортировки данных?

A: Не не не, так не делается. Смотрите, порты и потоки – это очень ценный и ограниченный ресурс. Портов всего 65536 (и не все из них можно юзать), а потоков вообще нежелательно иметь больше чем процессорных ядер (упрощенно говоря). Что если к серверу подключится 100 клиентов? А если 1000? Дальше такой вопрос: если для каждой игровой сессии выделять отдельный порт, то откуда клиент будет знать на какой порт ему стучаться? Значит первоначальное соединение всё равно будет происходить через один фиксированный порт? Но тогда получается, что всё равно нужен механизм сортировки пакетов от разных клиентов. То есть его не избежать. Но и бояться этого не надо. Клиент просто должен каждый раз передавать ID сессии, а сервер легко найдет по нему нужную (это одна строчка кода).
Правильный подход будет приблизительно таким. Состояние каждой игровой сессии (стола) должно храниться в некоем объекте. При этом, никакого потока у сессии нет, просто хранится её состояние (ну типа чья очередь ходить, у кого сколько очков, кто где стоит) и всё. И таких вот объектов целый массив, по количеству столов. Один единственный поток слушает один единственный порт. Когда клиент обращается к серверу, он передает ID своей сессии. Сервер принимает пакет, и по ID находит в массиве нужную сессию. Вот тут, он запускает новый поток, и в этом потоке обрабатывает полученные данные. В результате обработки состояние сессии изменяется, клиенту при необходимости отправляется какой-то ответ, а поток обработки сразу после этого завершается. То есть суть в том, что новый поток запускается лишь тогда, когда нужно отреагировать на действия клиента, и не живет дольше чем надо.
Что это дает? Если у нас будет 1000 клиентов, то маловероятно, что все они одновременно сделают ход. Ну максимум 100 из них могут походить. Таким образом, в каждый момент времени у нас не 1000 запущенных потоков, а в 10 раз меньше (на практике будет еще меньше). В случае чего, можно легко добавить механизм, который будет ограничивать максимально допустимое количество потоков (скажем, не более 16), а "лишние" запросы выстраивать в очередь.
Понимаю, что вы делаете любительский проект и там не будет ста клиентов одновременно. Тогда, если вы не хотите усложнять, то можете вообще не создавать новые потоки на каждый клиентский запрос, а обрабатывать всё в одном. Конечно клиентам придется ждать пока сервер ответит им по очереди. Но ИМХО это решение всё равно будет более верным с архитектурной точки зрения, чем держать долгоживущий поток на каждую сессию. Навряд ли время ожидания будет заметно человеку при количестве клиентов 10-20.
PS: Это не совсем моя предметная область, но вижу, что более опытные участники ленятся отвечать на простой вопрос. Надеюсь меня поправят, если я нагнал тут пурги.


text:
Q: Get data from a APIview in django rest framework In my app I am trying to get the User data using a get request and it works in Postman but the problem occurs when I try to send the data from FrontEnd as we cannot send Body in get Request
URL:
           path('user/meta/', UserDetails.as_view()),

Views.py
class UserDetails(APIView):
    """Get basic details of user"""

    def get(self, request):

        username = request.data["username"]
        if User.objects.filter(username = username).exists():

            user = User.objects.get(username = username)
            print(user)

            return Response({
                'verified': user.verified,
            })
        else:
            return Response("User doesn't exists", status=status.HTTP_400_BAD_REQUEST)

How should I modify it such that I can get the data from get request?

A: So, your requesting URL will become /user-info/?username=john
and then, use request.GET
 username = request.GET.get("username","default_value")

A: The good practice is to use query params in such case,
so your url will look like,
/user-info/?username=john
and you modify your code to,
    username= self.request.query_params.get('username')

A: I know this is an old topic and the question is answered, but just to underline that the queried data, you obtained from the user in the API should go through the Serializers (https://www.django-rest-framework.org/tutorial/1-serialization/) to at least somehow protect against unwanted values. This will also avoid you directly querying the database models.


text:
Q: Not able to deliver the mail in canvas lms? What configuration setting i am missing? This is my outgoing_mail.yml files
If click on the forgot password link It is showing in the delayed_job.log
My email is deliver got stuck please help me.
production:
    address: "smtp.gmail.com"
    port: "587"
    user_name: "xxxxxx@gmail.com"
    password: "password"
    authentication: "plain" # plain, login, or cram_md5
    domain: "domain_name.com"
    outgoing_address: "xxxxxx@gmail.com"
    default_name: "Instructure Canvas"

A: My SMTP settings are right but the in site admin settings there is feature option section there is an option "Use remote service for notifications"  is No so is if you use remote service like mailer etc. this option turns into off.
And It's working fine.

A: In config/environments/production.rb
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.default_url_options = { host:'your host', port: 'xxx' }
  config.action_mailer.perform_deliveries = true
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.default :charset => "utf-8"
  config.action_mailer.smtp_settings = {
      :address => "smtp.gmail.com",
      :port => 587,
      :domain => 'abc.com',
      :user_name => "xxxx@mail.com",
      :password => "xxxx",
      :authentication => :plain,
      :enable_starttls_auto => true
  }


text:
Q: How to define a global variable and use its value anywhere? Is this an okay/appropriate way to build a custom style package? The goal is that there can be an easy-to-understand piece of boilerplate code upon which to build a new document.
Boilerplate code so far:
\RequirePackage[l2tabu,orthodox]{nag} % Complains about deprecated packages
\documentclass[12pt,numbers=noenddot]{scrartcl} % Appropriate KOMAScript class

% Required preamble part for any document using the `oilnet' style
\makeatletter
  \include{oilworks/packages} % Defines OWdefaultlanguage
  \OWdefaultlanguage{german}
  \include{oilworks/oilworks}
  \include{oilworks/variables}
  \include{oilworks/titlepage}
  \OWuniversity{Universität Leipzig}
  \OWfaculty{Fakultät für Geschichte, Kunst- und Orientwissenschaften}
  \OWinstitute{Orientalisches Institut}
  \OWtypeofwork{Irgendwasarbeit}
  \title{Blah Blah \dmg{ʾImrūʾu l-Qays b. Ḥuǧr al-Kindī} Wein-, Weib- und Gesangsdichtung Blah Blah}
  \OWassessor{Dr. Montag Dienstag Freitag}
  \author{Peter Student}
  \OWmatriculationnumber{1234567}
  \OWemailaddress{peter.student@posteo.de}
  \OWstreetandhousenumber{Sonnenstraße 123}
  \OWpostcodeandcity{12345 Wintergarten}
\makeatother

\begin{document}
  \OWmaketitle
  \blinddocument
\end{document}

packages.tex:
% Needs to be set *here* for dependency reasons
\def\OWdefaultlanguage#1{\def\@OWdefaultlanguage{#1}}

% Universal Fixes
\usepackage{fixltx2e} % Corrects LaTeX2e bugs and quirks
\usepackage{ifxetex} % Checks if XeTeX/XeLaTeX is the compiler-of-choice
% Unicode, i18n, etc.
\usepackage{polyglossia}
% Layout and Format
% \usepackage{csquotes} % Fixes inline and display quotations - doesn't work atm, reason unknown
\usepackage[absolute]{textpos} % For "\textblock"s, which can be freely  positioned on the page
% Math
\usepackage{amsmath} % Swiss-knife math package
% Graphics
\usepackage{graphicx} % Allows inserting of graphics and images
% Tables and Figures
\usepackage{booktabs} % For drawing nice tables with proper line weights
\usepackage{flafter} % To ensure that figures float only after they are defined/referenced
\usepackage{tabu} % Provides better control for tables and column widths
\usepackage{longtable} % Allows tables to span across pages - integrates with tabu
\usepackage{multicol} % Allows spanning columns in tables
% Referencing
\usepackage[longnamesfirst]{natbib} % Reimplements \cite to work with author-year and numerical citations
% Fonts and Typography
\usepackage{ellipsis} % Fixes space uneveness around ellipses
\usepackage{url} % Allows encapsulated URLs to break across lines
\usepackage[colorlinks,hypertexnames=false,plainpages=false]{hyperref} % Converts \url references to valid hyperlinks in PDF documents
\usepackage{fontspec} % Allows usage of system opentype/truetype fonts
% Things to use during development
\usepackage{blindtext}

oilworks.tex:
\setdefaultlanguage{\@OWdefaultlanguage}

\newcommand{\latin}[1]{{\emph{#1}}} % For easier handling of how latin phrases are formatted
\newcommand{\dmg}[1]{{\emph{#1}}} % The same for DMG transliteration

variables.tex:
\def\OWuniversity#1{\def\@OWuniversity{#1}}
\def\OWfaculty#1{\def\@OWfaculty{#1}}
\def\OWinstitute#1{\def\@OWinstitute{#1}}
% (etc...)

titlepage.tex:
\newcommand*{\OWmaketitle}{
  \begin{titlepage}
    \begin{center}
      \pagestyle{empty}
      \selectlanguage{german} % Must be German according to UL style guide.
      \begingroup
        {\LARGE \@OWuniversity} \\
        {\normalsize \@OWfaculty} \\
        {\Large \@OWinstitute} \\
      \endgroup
      \vspace*{0.5cm}
      \includegraphics[height=150pt,width=150pt]{oilworks/uofl_official_seal}\\
      \vspace*{0.35cm}
      \begingroup
        {\LARGE \@OWtypeofwork} \\
      \endgroup
      \vspace*{1.25cm}
      \begingroup
        \if\relax\detokenize{\@subtitle}\relax
          {\LARGE \@title} \\
          \vspace{0.2cm}
          {\normalsize \textit{\@subtitle}} \\
        \else
          {\normalsize {\@title}} \\
        \fi
      \endgroup
      % (etc...)
      \selectlanguage{\@OWdefaultlanguage} % Back to whatever the document is written in.
    \end{center}
  \end{titlepage}
  \clearpage
}


text:
Q: Does Python have comments that cover only part of a line? In Java, for example, one can say:
public void do(/*when*/time, /*subject*/principal){...}

or, similarly, when refactoring:
public void do(/*when*/time, /*principal*/){...}

Does Python have an equivalent facility whereby one can comment not a whole line, but just a part of it such that interpreter doesn't get confused?
If so, what are the shortcut keys to activate this functionality in PyDev and PyCharm?
Thank you.

A: No, but you can break your code into multiple lines and use it this way:
def foo():
   return {'foo':'bar',
           #'bar':'baz',
           'boo':'faz'}

Same logic applies to function parameters and anywhere u can break code into multiple lines.

A: Valid python comments are:
# this is the first comment
spam = 1  # and this is the second comment
          # ... and now a third!
text = "# This is not a comment because it's inside quotes."
''' multi-line
comment using 3 quotes '''

Comments in Python start with the hash character, #, and extend to the
  end of the physical line. A comment may appear at the start of a line
  or following whitespace or code, but not within a string literal. A
  hash character within a string literal is just a hash character. Since
  comments are to clarify code and are not interpreted by Python.

Src:
An informal introduction to python


text:
Q: WFS from ArcGIS Online download failed or partially failed I've made a WFS service from a Feature Layer in ArcGIS Online. When connecting to the service in QGIS and adding the data to a project it works as expected. But after panning / inspecting the data I'm getting seemingly random log messages that I cannot pinpoint as they happen in different datasets of the WFS service (but same errors).
WFS log message:

2019-11-20T11:28:37     WARNING    Error when parsing GetFeature response : Error: mismatched tag on line 1, column 907

Log Message:

2019-11-20T11:28:37     CRITICAL    Layer ProfielScout_Vast_punt : Download of features for layer MudManagerWFS:ProfielScout_Vast_punt failed or partially failed: Error when parsing GetFeature response : Error: mismatched tag on line 1, column 907. You may attempt reloading the layer with F5

What I tried:

*

*Load WFS in ArcGIS Pro 2.4.2 - works fine

*Request in browser - works fine

*Navigate (in browser) to feature using GetFeatureand typeName and check for mismatched tag on line 1, column 907. But no column 907 on line 1, see result.

Result:
<wfs:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:MudManagerWFS="http://dservices9.arcgis.com/arcgis/services/5s3Rxz5DTD3G8MR4/MudManagerWFS/WFSServer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" timeStamp="2019-11-20T10:43:31Z" numberMatched="unknown" numberReturned="29" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://dservices9.arcgis.com/arcgis/services/5s3Rxz5DTD3G8MR4/MudManagerWFS/WFSServer https://dservices9.arcgis.com/5s3Rxz5DTD3G8MR4/arcgis/services/5s3Rxz5DTD3G8MR4/MudManagerWFS/MapServer/WFSServer?service=wfs%26version=2.0.0%26request=DescribeFeatureType">

Using QGIS 3.8.3-Zanzibar
Anyone have any idea where this error comes from?


text:
Q: Infragistics SSResizer Control to Ressize Child Controls in Winforms Hello There,
            We had bought Infragistics SSResizer control back in 2003 for Vb. I was wondering if I can use it for C#.
My application changes its font size when you change the resolution which ultimately messes up the application. Any other solutions are appreciable.

A: The SSResizer is a COM control built for use in Visual Basic and was never tested in any .NET environment so it isn't known whether this will work or not.  The recommendation is to replace the COM control with a .NET control and use that going forward.


text:
Q: translation file to bring in multiple rows from xml Please can someone assist I cannot for the life of me figure out how to adjust my translation file so that the xml to follow is brought in with multiple lines per supplier and multiple suppliers on one xml. In other words, I need to bring the file into our ERP system so that a new purchase order is created for each supplier in the xml but the order lines are grouped per supplier accordingly (for example Supplier A has multiple lines in the xml and Supplier B has multiple lines. All those that belong to A must be on the same purchase order for A and likewise for B)
Here is a sample of the xml:
<rows>
<row>
<SUPPLIER>LIY0001</SUPPLIER>
<DESTWHS>A4</DESTWHS>
<RELEASE_DATE>2013-02-14</RELEASE_DATE>
<DUE_DATE>2013-05-13</DUE_DATE>
<ITEM>5021616</ITEM>
<QTY>528</QTY>
<LINE_ITEM_NO>1</LINE_ITEM_NO>
<CUST_PO_NO>LIY0001-2013-02-14</CUST_PO_NO>
<PURCHASEPRICE>5.25</PURCHASEPRICE>
</row>
<row>
<SUPPLIER>LIY0001</SUPPLIER>
<DESTWHS>A4</DESTWHS>
<RELEASE_DATE>2013-02-14</RELEASE_DATE>
<DUE_DATE>2013-05-13</DUE_DATE>
<ITEM>5021816</ITEM>
<QTY>222</QTY>
<LINE_ITEM_NO>2</LINE_ITEM_NO>
<CUST_PO_NO>LIY0001-2013-02-14</CUST_PO_NO>
<PURCHASEPRICE>5.90</PURCHASEPRICE>
</row>
<row>
<SUPPLIER>WOR0001</SUPPLIER>
<DESTWHS>A4</DESTWHS>
<RELEASE_DATE>2013-02-14</RELEASE_DATE>
<DUE_DATE>2013-05-13</DUE_DATE>
<ITEM>650616</ITEM>
<QTY>129</QTY>
<LINE_ITEM_NO>9</LINE_ITEM_NO>
<CUST_PO_NO>WOR0001-2013-02-14</CUST_PO_NO>
<PURCHASEPRICE>4.46</PURCHASEPRICE>
</row>
<row>
<row>
<SUPPLIER>WOR0001</SUPPLIER>
<DESTWHS>A4</DESTWHS>
<RELEASE_DATE>2013-02-14</RELEASE_DATE>
<DUE_DATE>2013-05-13</DUE_DATE>
<ITEM>650610</ITEM>
<QTY>129</QTY>
<LINE_ITEM_NO>3</LINE_ITEM_NO>
<CUST_PO_NO>WOR0001-2013-02-14</CUST_PO_NO>
<PURCHASEPRICE>3.5</PURCHASEPRICE>
</row>
<row>
</rows>

Here is the translation file I have created:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" encoding="Windows-1252" omit-xml-declaration="yes" />
<xsl:template match="/">
<PostPurchaseOrders>
    <Orders>
      <OrderHeader>
      <xsl:for-each select = "rows/row">
      <CustomerPoNumber><xsl:value-of select="CUST_PO_NO"/></CustomerPoNumber>
      <Supplier><xsl:value-of select="SUPPLIER"/></Supplier>
          <OrderDate><xsl:value-of select="RELEASE_DATE"/></OrderDate>
          <DueDate><xsl:value-of select="DUE_DATE"/></DueDate>
         <Warehouse><xsl:value-of select="DESTWHS"/></Warehouse>
     </xsl:for-each>
     </OrderHeader>
      <OrderDetails>
     <xsl:for-each select = "rows/row">
       <StockLine>
         <PurchaseOrderLine><xsl:value-of select="LINE_ITEM_NO"/></PurchaseOrderLine>
            <StockCode><xsl:value-of select="ITEM"/></StockCode>
            <Warehouse><xsl:value-of select="DESTWHS"/></Warehouse>
           <OrderQty><xsl:value-of select="QTY"/></OrderQty>
           <Price><xsl:value-of select="PURCHASEPRICE"/></Price>
          </StockLine>
         </xsl:for-each>
       </OrderDetails>
       </Orders>
<PostPurchaseOrders>
</xsl:template>
</xsl:stylesheet>

Any help as to how I can change my translation file to loop or something so that many lines are brought into one purchase order for each supplier would be greatly appreciated.
Thanks
UPDATE
Here is what I need the xml transformed into for our ERP system:
<PostPurchaseOrder>
<Orders>
    <OrderHeader>
        <Supplier>LIY0001</Supplier>
        <CustomerPoNumber>example po</CustomerPoNumber>
        <OrderDate>2013-02-03</OrderDate>
        <Warehouse>A1</Warehouse>
    </OrderHeader>
    <OrderDetails>
        <StockLine>
            <PurchaseOrderLine>1</PurchaseOrderLine>
            <StockCode>12022</StockCode>
            <OrderQty>10</OrderQty>
        </StockLine>
        <StockLine>
            <PurchaseOrderLine>2</PurchaseOrderLine>
            <StockCode>15014</StockCode>
            <OrderQty>15</OrderQty>
        </StockLine>
    </OrderDetails>
</Orders>
</PostPurchaseOrders>

A: Without seeing your expected output, it is a bit tricky knowing exactly what you want, but it does look like you want to group orders by supplier. Grouping items is a common problem in XSLT, and in XSLT1.0 you use a technique called Muenchian Grouping to do this.
If you are grouping row elements by supplier, you would start off by defining the following key:
<xsl:key name="suppliers" match="row" use="SUPPLIER"/>

Then, to get distinct suppliers, you select the row elements which occur first in the group for the key using their given supplier
<xsl:apply-templates
   select="row[generate-id() = generate-id(key('suppliers',SUPPLIER)[1])]"
   mode="header"/>

Note the use of mode here, this is because in the final XSLT there will be two templates matching row elements and you need a way to distinguish between them.
Finally, for each 'header' row element (i.e. the row element with the first occurrence of a given supplier) you can then get the rows that make up the group like so:
<xsl:apply-templates select="key('suppliers', SUPPLIER)"/>

Here is the full XSLT
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output method="xml" indent="yes"/>

   <xsl:key name="suppliers" match="row" use="SUPPLIER"/>

   <xsl:template match="rows">
      <PostPurchaseOrders>
         <xsl:apply-templates select="row[generate-id() = generate-id(key('suppliers',SUPPLIER)[1])]" mode="header"/>
      </PostPurchaseOrders>
   </xsl:template>

   <xsl:template match="row" mode="header">
      <Orders>
         <OrderHeader>
            <CustomerPoNumber>
               <xsl:value-of select="CUST_PO_NO"/>
            </CustomerPoNumber>
            <Supplier>
               <xsl:value-of select="SUPPLIER"/>
            </Supplier>
            <OrderDate>
               <xsl:value-of select="RELEASE_DATE"/>
            </OrderDate>
            <DueDate>
               <xsl:value-of select="DUE_DATE"/>
            </DueDate>
            <Warehouse>
               <xsl:value-of select="DESTWHS"/>
            </Warehouse>
         </OrderHeader>
         <OrderDetails>
            <xsl:apply-templates select="key('suppliers', SUPPLIER)"/>
         </OrderDetails>
      </Orders>
   </xsl:template>

   <xsl:template match="row">
      <StockLine>
         <PurchaseOrderLine>
            <xsl:value-of select="LINE_ITEM_NO"/>
         </PurchaseOrderLine>
         <StockCode>
            <xsl:value-of select="ITEM"/>
         </StockCode>
         <Warehouse>
            <xsl:value-of select="DESTWHS"/>
         </Warehouse>
         <OrderQty>
            <xsl:value-of select="QTY"/>
         </OrderQty>
         <Price>
            <xsl:value-of select="PURCHASEPRICE"/>
         </Price>
      </StockLine>
   </xsl:template>
</xsl:stylesheet>

When applied to your XSLT, the following is output:
<PostPurchaseOrders>
   <Orders>
      <OrderHeader>
         <CustomerPoNumber>LIY0001-2013-02-14</CustomerPoNumber>
         <Supplier>LIY0001</Supplier>
         <OrderDate>2013-02-14</OrderDate>
         <DueDate>2013-05-13</DueDate>
         <Warehouse>A4</Warehouse>
      </OrderHeader>
      <OrderDetails>
         <StockLine>
            <PurchaseOrderLine>1</PurchaseOrderLine>
            <StockCode>5021616</StockCode>
            <Warehouse>A4</Warehouse>
            <OrderQty>528</OrderQty>
            <Price>5.25</Price>
         </StockLine>
         <StockLine>
            <PurchaseOrderLine>2</PurchaseOrderLine>
            <StockCode>5021816</StockCode>
            <Warehouse>A4</Warehouse>
            <OrderQty>222</OrderQty>
            <Price>5.90</Price>
         </StockLine>
      </OrderDetails>
   </Orders>
   <Orders>
      <OrderHeader>
         <CustomerPoNumber>WOR0001-2013-02-14</CustomerPoNumber>
         <Supplier>WOR0001</Supplier>
         <OrderDate>2013-02-14</OrderDate>
         <DueDate>2013-05-13</DueDate>
         <Warehouse>A4</Warehouse>
      </OrderHeader>
      <OrderDetails>
         <StockLine>
            <PurchaseOrderLine>9</PurchaseOrderLine>
            <StockCode>650616</StockCode>
            <Warehouse>A4</Warehouse>
            <OrderQty>129</OrderQty>
            <Price>4.46</Price>
         </StockLine>
         <StockLine>
            <PurchaseOrderLine>3</PurchaseOrderLine>
            <StockCode>650610</StockCode>
            <Warehouse>A4</Warehouse>
            <OrderQty>129</OrderQty>
            <Price>3.5</Price>
         </StockLine>
      </OrderDetails>
   </Orders>
</PostPurchaseOrders>


text:
Q: How to make MediaElement visible when playing audio file mp3? I have XAML as ContentControl:
<ContentControl x:Name = "MyPlayer">
  <StackPanel />
</ContentControl>

Then I add MediaElement in code for this ContentControl:
this.myPlayer.Content = new MediaElement() {
 Source = new Uri(@"http://mysite/myfile.mp3"),
 Visibility = Visibility.Visible
};

Then when I run the app, the player does play the file, but there is no visual player. The screen stays blank.
How to put a visual player element so that user can pause/stop/replay the source?

A: You need to create your own buttons and code behind logic to play/pause/replay etc. You can use this as a reference: http://msdn.microsoft.com/en-us/library/ms748248.aspx
Alternatively, you can use the CodePlex Media Player Framework: http://smf.codeplex.com/
This has created templates for media players.
I believe you also need to specify a height/width for the MediaElement if you want to see something, though what are you expecting to see for an MP3 file?
Also, what is the need for the ContentControl? Why don't you put the MediaElement in the xaml?


text:
Q: JAVAFX creating a JavaDB table I have a form which upon releasing the "submit" button I want to create a table or find the previously created table and then write the form data into the table. Here is the problem, for some reason I cant get the current code to create a new table within my database. Can someone take a look at my current code and tell me where I'm going wrong.
Here is the code for the button from the form controller:
@FXML
private void OnRelease_hazard(MouseEvent event) {
   Connection c ;
    final String HAZARD_TABLE =
    "CREATE TABLE HAZARD ("+
    "ID          INTEGER NOT NULL "+
    "PRIMARY KEY GENERATED ALWAYS AS IDENTITY "+
    "(START WITH 1, INCREMENT BY 1)," +
    "SYNAME           VARCHAR(50)," +
    "CLASSIFICATION         VARCHAR(40)," +
    "ENVIROMENT      VARCHAR(40)," +
    "EVENT    VARCHAR(100)" +
    "DESCRIPTION    VARCHAR(2000)" +
    "JUSTIFICATION    VARCHAR(2000)" +
    "DEFINITION    VARCHAR(2000)" +
    "SCORE         INTEGER )";

    try{
    c = DBConnect.connect();
    Statement sta = c.createStatement();
    int count = sta.executeUpdate(HAZARD_TABLE);
    System.out.println("table created.");
    sta.close();

    c.close();
    }catch(Exception e){
    e.printStackTrace();
    System.out.println("Error on Building Data");
      }
  }

here is the connection class:
package MAAT;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

class DBConnect {

private static Connection conn;
private static String url = "jdbc:derby:testdatabase";
private static String driver = "org.apache.derby.jdbc.EmbeddedDriver";

public static Connection connect() throws SQLException{
    try{
System.setProperty("derby.database.forceDatabaseLock", "true");
        Class.forName(driver).newInstance();
    }catch(ClassNotFoundException cnfe){
        System.err.println("Error: "+cnfe.getMessage());
    }catch(InstantiationException ie){
        System.err.println("Error: "+ie.getMessage());
    }catch(IllegalAccessException iae){
        System.err.println("Error: "+iae.getMessage());
    }
    conn = DriverManager.getConnection(url, "username", "password");
    return conn;
}

public static Connection getConnection() throws SQLException, ClassNotFoundException{
    if(conn !=null && !conn.isClosed())
        return conn;
    connect();
    return conn;
}
}

trace:
Executing C:\Users\Brandon\Documents\NetBeansProjects\MAAT\dist\run1950342611\MAAT.jar using platform C:\Program Files\Java\jdk1.8.0_71\jre/bin/java
java.lang.ClassCastException: javafx.scene.control.MenuItem cannot be cast to javafx.scene.Node
at MAAT.MainScreenController.handleButtonAction_newmenu(MainScreenController.java:251)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769)
at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49)
at javafx.event.Event.fireEvent(Event.java:198)
at javafx.scene.control.MenuItem.fire(MenuItem.java:462)
at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.doSelect(ContextMenuContent.java:1405)
at com.sun.javafx.scene.control.skin.ContextMenuContent$MenuItemContainer.lambda$createChildren$343(ContextMenuContent.java:1358)
at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.event.Event.fireEvent(Event.java:198)
at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:352)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:275)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:388)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:387)
at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
at com.sun.glass.ui.View.notifyMouse(View.java:937)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
Error: org.apache.derby.jdbc.EmbeddedDriver
java.sql.SQLException: No suitable driver found for jdbc:derby:MAAWBdatabase
at java.sql.DriverManager.getConnection(DriverManager.java:689)
Error on Building Data
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at MAAT.DBConnect.connect(DBConnect.java:33)
at MAAT.IdThreat_HazardController.OnRelease_hazard(IdThreat_HazardController.java:162)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275)
at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769)
at javafx.fxml.FXMLLoader$ControllerMethodEventHandler.handle(FXMLLoader.java:1657)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
at javafx.event.Event.fireEvent(Event.java:198)
at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:352)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:275)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:388)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:387)
at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
at com.sun.glass.ui.View.notifyMouse(View.java:937)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)