text:
Q: How to get the outbuild build directory in VSTS after a YARN BUILD I created a build definition using yarn custom extensions.

The build works fine:

But, apparently the yarn build task does not generate any output

What am I missing here to be able to generate a build output that I can deploy to azure?
Update 1:
I was able to configure the copy, but its copying the entire folder even with node_modules to the drop.  There should be a build folder only

A: The task "Publish Artifact" publishes the build artifacts that exist on the agent in folder "a".
If you don't copy the output to folder "a", the publish task will not publish anything and you will get the message:

Directory '...\a' is empty. Nothing will be added to build...

Before the Publish Artifact task, you need to add the Copy Files task, in this task you should copy the Yarn output to the folder "a" in the agent, after it the publish will success.


text:
Q: Why the binding fails for layout_marginEnd but not for layout_marginStart? So I'm using binding to let my layout can be changed dynamically. And I bind my view's margin like this
android:layout_marginStart="@{model.showAvatar ? @dimen/default_padding : @dimen/without_avatar_start_margin}" However I can only apply this to margin start, if I apply the same logic to margin end it will gives me compilation error like this Found data binding errors.Cannot find the setter for attribute 'android:layout_marginEnd' with parameter type float on com.xx.ui.widget.TextView.
 Any explanation?

A: maybe with Android studio 3.0 final release, the databinding still doesn't work for the custom views generated by androidannotations
But you can using @BindingAdapter instead
@BindingAdapter(value = { "android:layout_marginEnd", "android:layout_marginStart" })
public static void setLayoutMargin(View view, float marginEnd, float marginStart) {
    RelativeLayout.LayoutParams parameter =
            (RelativeLayout.LayoutParams) view.getLayoutParams();
    parameter.setMargins((int) marginEnd, parameter.topMargin, (int) marginStart,
            parameter.bottomMargin);
    view.setLayoutParams(parameter);
}

Its not better way but hope this helps

redpajama_set_name: RedPajamaStackExchange


text:
Q: How to count the amount of substring occurences? How do I count the amount of times a substring appears in a string? So far I have
static boolean doesAppear(String a, String b){
    boolean appears;

    appears = (b.indexOf(a) != -1) ? true : false;

    return appears;
}

to confirm that it does appear, but I can't figure out how to adjust it to return true for counts >= 2.

A: You can use the fromIndex second argument of String#indexOf to continue looking for the string past the previous occurrence.
public boolean doesAppear(String a, String b, int count){
    int num = 0;
    for(int idx = -1; num < count && (idx = b.indexOf(a, idx + 1)) != -1; num++);
    // You may need to adjust idx + 1 to idx + a.length(),
    // depending on whether or not you allow overlapping occurrences
    return num >= count;
}


text:
Q: Copy member functions as a way of providing an interface Is this good Python practice?
import threading
import Queue

class Poppable(threading.Thread):
    def __init__(self):
        super(Poppable, self).__init__()
        self._q = Queue.Queue()
        # provide a limited subset of the Queue interface to clients
        self.qsize = self._q.qsize
        self.get = self._q.get
    def run(self):
        # <snip> -- do stuff that puts new items onto self._q
        # this is why clients don't need access to put functionality

Does this approach of "promoting" member's functions up to the containing class's interface violate the style, or Zen, of Python?
Mainly I'm trying to contrast this approach with the more standard one that would involve declaring wrapper functions normally:
    def qsize(self):
        return self._q.qsize()
    def get(self, *args):
        return self._q.get(*args)

A: I don't think that is Python specific. In general, this is a good OOP practice. You expose just the functions you need the client to know, hiding the internals of the contained queue. This is a typical approach when wrapping an object, and totally compliant with principle of least knowledge.
If, instead of self.qsize the client had to call self._q.qsize, you cannot easily change _q with a different data type, which does not have a qsize method if that is needed later. So, your approach, makes the object more open to possible future changes.


text:
Q: SQL Server UDF refresh I have altered the column datatype in one of my tables from int to decimal.
I have a UDF referencing the columns of this table.
How can I ensure my UDF returns decimals rather than int without having to re-create it?
(For view, I know we can use sp_refreshview, not sure about UDF).
Thanks,
Rashmi

A: I assume you are talking about an inline TVF in which case you can use
EXEC sp_refreshsqlmodule 'YourTVF'


text:
Q: How to transform $z$ into $\hat z$ Assume that we have vector $a = \begin{bmatrix} a_1 \\ a_2 \\ \vdots \\ a_n \end{bmatrix} \in \mathbb R^n$, $b = \begin{bmatrix} b_1 \\ b_2 \\ \vdots \\ b_n \end{bmatrix} \in \mathbb R^n$, $c = \begin{bmatrix} c_1 \\ c_2 \\ \vdots \\ c_n \end{bmatrix} \in \mathbb R^n$.
Then, the vector $z = \begin{bmatrix} a \\ b \\ c \end{bmatrix}\in \mathbb R^{3n}$.
How to obtain the vector $\hat z = \begin{bmatrix} a \\ a  \\ b \\ b \\ c \\ c \end{bmatrix}\in \mathbb R^{2\times 3n}$ based on $z$?
The Kronecker product is not useful in this case, because it focuses on elements, instead of subvectors.

A: If $a,b,c$ were numbers, you could multiply the original vector $(a,b,c)^T$ by
$$\begin{pmatrix}  1 & 0 & 0 \\ 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 1  \end{pmatrix}$$
Can you think of how to generalize when $a,b,c, \in \mathbb{R}^n$?

A: I believe the Kronecker product can be pretty much useful. You could take.
Approach 1: Take:
$$z_{1} = \begin{pmatrix} 1 \\ 1 \\ 0 \\ 0 \\0  \\ 0\end{pmatrix} \quad z_{2} = \begin{pmatrix} 0 \\ 0 \\ 1 \\ 1 \\ 0 \\ 0 \end{pmatrix} \quad z_{3}=\begin{pmatrix} 0 \\ 0 \\ 0 \\ 0 \\ 1 \\1 \end{pmatrix} $$
so that:
$$\hat{z} = z_{1}\otimes a + z_{2}\otimes b + z_{3}\otimes c$$
Approach 2: Take:
$$z_{1} = \begin{pmatrix} 1 & 0 & 0 \\ 1 & 0 & 0 \end{pmatrix} \quad z_{2} = \begin{pmatrix} 0 & 1 & 0 \\ 0 & 1 & 0 \end{pmatrix} \quad z_{3} = \begin{pmatrix} 0 & 0 & 1 \\ 0 & 0 & 1 \end{pmatrix}$$
so that:
$$z'=\begin{pmatrix}  a & b & c \\ a & b & c \end{pmatrix} = z_{1}\otimes a + z_{2}\otimes b + z_{3}\otimes c$$
and take $\hat{z}$ to be the vectorization of $z'$.


text:
Q: Using a vector of new and old names in tidyverse to select and rename columns I want to select columns and rename them based on the names of the columns which I keep in a separate dataframe.
This is the original dataset:
df <- tribble(
  ~year, ~country, ~series1, ~series2,
  2003, "USA", 8, 5,
  2004, "USA", 9, 6,
  2005, "USA", 11, 7,
  2006, "USA", 10, 8
)

I want to select and rename two columns and I want to specify that like this:
specs <- tribble(
  ~old_name, ~new_name,
  "country", "region",
  "series1", "gdp_growth"
)

I want this result:
expected_df <- tribble(
  ~region, ~gdp_growth,
  "USA", 8,
  "USA", 9,
  "USA", 11,
  "USA", 10
)

This does not work:
df %>%
  select(specs$new_name = specs$old_name)

Error: unexpected '=' in: "df %>%    select(specs$new_name ="

A: df %>%
  select(specs$old_name) %>%
  rename_with(~specs$new_name, specs$old_name)

#> # A tibble: 4 x 2
#>   region gdp_growth
#>   <chr>       <dbl>
#> 1 USA             8
#> 2 USA             9
#> 3 USA            11
#> 4 USA            10

A: How about this?
df %>%
  select(specs$old_name) %>% set_names(specs$new_name)

A: We could do
library(dplyr)
library(tibble)
df %>%
   select(!!! deframe(specs[2:1]))

-output
# A tibble: 4 × 2
  region gdp_growth
  <chr>       <dbl>
1 USA             8
2 USA             9
3 USA            11
4 USA            10

A: How about:
library(tidyverse)

df |>
  rename_with(.cols = specs$old_name, .fn = \(x) specs$new_name) |>
  select(!!!syms(specs$new_name))
#> # A tibble: 4 x 2
#>   region gdp_growth
#>   <chr>       <dbl>
#> 1 USA             8
#> 2 USA             9
#> 3 USA            11
#> 4 USA            10

EDIT:
or another option:
map2_dfc(specs$new_name,
         specs$old_name,
         \(new, old) select(df, !!sym(new) := !!sym(old)))
#> # A tibble: 4 x 2
#>   region gdp_growth
#>   <chr>       <dbl>
#> 1 USA             8
#> 2 USA             9
#> 3 USA            11
#> 4 USA            10

A: Two more similar but slightly different ways to those already proposed.
df %>% select(specs$old_name) %>% setNames(., specs$new_name)

OR
df %>% select(specs$old_name) %>% `colnames<-` (., specs$new_name)

A: A base R option by matching the columns with the values from your dataframe like this:
# Select columns
df = df[,2:3]
# Convert to dataframe isntead of tibble
df = as.data.frame(df)
specs = as.data.frame(specs)

names(df)[match(specs[,"old_name"], names(df))] = specs[,"new_name"]
df
#>   region gdp_growth
#> 1    USA          8
#> 2    USA          9
#> 3    USA         11
#> 4    USA         10

Created on 2022-10-19 with reprex v2.0.2


text:
Q: Collection View,with custom layouts, cells misbehave on scrolling I am trying to create custom tiled layout using UICollectionView.
It renders perfectly as desired in simulator once I run my app.
But the moment I scroll the view and bring it back all the cell's frame changes and the cells get overlapped, leaving spaces, randomly.
I am not able to solve this issue past 2 days.
Here goes the code from my custom layout class.
-(void)prepareLayout{
[self createCellSizeArray];//cellSizeArray holds cell sizes for all the cells(calculated statically)
[self createAttributeArrayOfAll];//attributeArrayOfAll holds attributes for all the cells and also calculates their frames using cellSizeArray
}

-(CGSize)collectionViewContentSize{
   return CGSizeMake(768, 1500);//The size is static to check for scrolling, is this creating problems?
}

-(UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath{
      UICollectionViewLayoutAttributes * layoutAttributes = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath];
      return layoutAttributes;
}

-(NSArray *)layoutAttributesForElementsInRect:(CGRect)rect{
    NSMutableArray *attArray =[NSMutableArray array];
    for (NSInteger i =0; i< attributeArrayOfAll.count; i++) {
    UICollectionViewLayoutAttributes * attribute = (UICollectionViewLayoutAttributes*)[attributeArrayOfAll objectAtIndex:i];
    if(CGRectIntersectsRect(rect, attribute.frame)){
        [attArray addObject:attribute];
    }
}
return attArray;
}

-(BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds{
  return YES;
}

Please help, Thanks in advance.
Edit:
In my [self createAttributeArrayOfAll]; I have these lines of code
CGRect frame = CGRectMake(_startNewRowPoint.x, _startNewRowPoint.y, cellSize.width, cellSize.height);
 UICollectionViewLayoutAttributes * attribute = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:[NSIndexPath indexPathForItem:i inSection:0]];
 attribute.alpha = 1.0;
 attribute.frame = frame;
 [attributeArrayOfAll addObject:attribute];

While I modified layoutAttributesForItemAtIndexPath:, to look something like this
-(UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath{
 UICollectionViewLayoutAttributes * layoutAttributes = [UICollectionViewLayoutAttributes layoutAttributesForCellWithIndexPath:indexPath];
 layoutAttributes.frame = ((UICollectionViewLayoutAttributes*)[attributeArrayOfAll objectAtIndex:indexPath.item]).frame;
 return layoutAttributes;
}

Moreover, the method layoutAttributesForItemAtIndexPath: never gets called implicitly. I even tried this:
-(NSArray *)layoutAttributesForElementsInRect:(CGRect)rect{
NSMutableArray *attArray =[NSMutableArray arrayWithCapacity:attributeArrayOfAll.count];
for (NSInteger i =0; i< attributeArrayOfAll.count; i++) {
    UICollectionViewLayoutAttributes * attribute = (UICollectionViewLayoutAttributes*)[attributeArrayOfAll objectAtIndex:i];
    if(CGRectIntersectsRect(rect, attribute.frame)){
        [attArray insertObject:[self layoutAttributesForItemAtIndexPath:[NSIndexPath indexPathForItem:i inSection:0]] atIndex:i];
    }
}
return attArray;
}

But still the result is the same distorted set of cells on scrolling.
I worked with 5 cells, first time it renders correctly, on scrolling away and then bringing it back in visible rect it gets distorted, if i scroll away again and bring it back in visible rect it renders correctly. However, when I do this with around 400 cells, once i scroll it never renders correctly. Even on reloading collection view, The cells gets distort. Please help.

A: Your layoutAttributesForItemAtIndexPath: method is not setting any properties of the layoutAttributes object before returning it.  It needs to set frame (or center and size).

A: So finally managed a workaround!!! dequeue each cell with an unique Cell Identifier in cellForRow:
[self.summaryView registerClass:[BFSSummaryViewCell class] forCellWithReuseIdentifier:[NSString stringWithFormat:@"%@%d",CellIdentifier,indexPath.row]];
UICollectionViewCell *collectionCell = [collectionView dequeueReusableCellWithReuseIdentifier:[NSString stringWithFormat:@"%@%d",CellIdentifier,indexPath.row] forIndexPath:indexPath];

These two lines inside cellForRow worked for me, however with my collection view having around 1000 cells it increases the size of my application considerably. Lets hope apple fixes this bug asap.


text:
Q: How to disable Request Management on a single WFE vs all WFEs 10 server farm with 5 WFEs with F5 load balancer.
We want to disable RM on a single WFE to make it a dedicated crawl target. I have found how to disable RM across the whole farm, and how to disable the server from the RM pool, but that seems to only stop other servers from sending requests to that server, not stopping that server from sending out requests to the other WFEs.
So how do you disable RM on a single server so all traffic to that WFE stays on it?

A: have you tried this powershell, it will disable / unprovision RM service on the server:
$Ser = get-spserviceinstance -Server "your server name"| ? {$_.TypeName -eq "Request Management"}
$ser | Stop-SPServiceInstance

You just need to put your server name their and run it.wait for couple of minute and get the status of the RM (you will see it is online on all except the one you disable).
get-spserviceinstance | ? {$_.TypeName -eq "Request Management"}

Note: this will only work if you have custom minrole, if not then nightly rule will enable it again.
Description of MinRole and associated services in SharePoint Servers 2016


text:
Q: Solace QueueNotFound response code I am trying to handle the QueueNotFound error in some SessionEventArgs when trying to send a Solace message.
Here's how the SessionEventArgs look while debugging:
SessionEventArgs info
The response code comes back as 400 but I'm wary of that code being used for errors other than QueueNotFound.
Apart from checking the info string for "Queue Not Found", is there any other way of asserting that the error is indeed to do with Solace queue not existing?

A: You can invoke the ContextFactory.Instance.GetLastSDKErrorInfo() method from within your session event delegate. This will return an SDKErrorInfo instance, which contains more information on the reported session event.
The SDKErrorInfo instance has a SubCode field that will indicate the exact type of error. If the error is Queue Not Found, the subcode enum will be SDKErrorSubcode.QueueNotFound. You can check in the Solclient.chm help document for a list of all SDKErrorSubcode enumerations, as well as their associated response codes.
There is a clear example of how to utilize the ContextFactory.Instance.GetLastSDKErrorInfo() method in the Replication.cs sample that is packaged with the Solace .NET API.


text:
Q: How to navigate to screen selected by Graphics capture picker in UWP I am developing an UWP application in which i used graphics capture picker to select the window to record, but i want, when some one select window then UWP application should get minimize and that other display should come into focus

A: If the user minimizes a uwp app or switches to another app, this uwp app will be suspended. Besides, GraphicsCapturePicker control must be called from a UI thread, which means it will prevent the GraphicsCapturePicker control from appearing if the uwp app is minimized.
Therefore, I have to say that there is no way could implement your requirement.


text:
Q: Replacing a value in XML file via bash I have an XML file that I am trying edit via xmlstarlet in a bash script but I am unable to find any examples that have an xml formatted the same way as this one.  Below is the xml
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="StringCollections" type="ALINetCoreConsole.Config.StringCollections, ALINetCoreConsole"/>
  </configSections>
  <appSettings>
    <add key="TCPAddress" value="192.168.xx.xx"/>
    <add key="TCPPort" value="2101" />
    <add key="ParsingFilesDirectory" value="/app/aliparsing"/>
    <add key="MessageBossAddress" value="messageboss:9092"/>
    <add key="AliRulesetReloadMinutes" value="30"/>
    <add key="PsapId" value=""/>
    <add key="MessageStarter" value="2"/>
    <add key="MessageEnder" value="3"/>
    <!-- Possible values are: Warn, Info, Debug -->
    <add key="LogLevel" value="Warn"/>
  </appSettings>

  <StringCollections>
    <HeartbeatValues>
      <add message="K"/>
      <add message="H"/>
    </HeartbeatValues>
  </StringCollections>
</configuration>

The specific value I am trying to change via xmlstarlet is value="192.168.xx.xx"
So far I have figured out how to delete the entire line but something isn't clicking with me on the correct syntax to just change the IP address in the Value field.
I currently have the script written to use sed to find and replace the IP but it's ugly and relies on cut/rev so if for some reason that particular line had an extra space at the end or something similar then it would fail.  I am looking for a more elegant and reliable solution with xmlstarlet.

A: Update an attribute with xmlstartlet:
xmlstarlet edit --update '//add[@value="192.168.xx.xx"]/@value' --value '1.2.3.4' file.xml

or
xmlstarlet edit --update '//add[@key="TCPAddress"]/@value' --value '1.2.3.4' file.xml


text:
Q: XCode4: Product->Archive. Do I need to have device to archive the app? I want to archive the app and then transmit it to the app store. I selected menu: run on iOS device, but did not connect my real iPhone. The app archived file and said that it is ok. Do I need to have the device to archive the app ?

A: Yes, that's fine. You don't need to connect your device to archive it. As long as you select iOS Device, the Archive option comes available. This creates an archive in your Organiser, which you can then Validate and Submit to the App Store.
Good luck.


text:
Q: I close my intellij idea, choose [disconnect] I ran a project on Intellij , and then I closed my Intellij by choosing [disconnect] when I closed my Intellij. When I opened the program again to run my project, Intellij reminded me that port 8080 was occupied. I knew I could finish the project by killing port 8080. I wondered if there was any way that Intellij could end it directly.
I'm sorry that my English is not so good. It's translated online.

A: You can't terminate disconnected program from IDEA. You need to find it by port and then terminate it manually.
In Linux you may use something like this:
$ ss -tulpn | grep 8080
tcp     LISTEN   0        100                                         *:8080                        *:*            users:(("java",pid=1290385,fd=287))
$ kill -2 1290385

ss command finds listening ports, grep finds port 8080, pid is number of your process and then you terminate the process with kill.


text:
Q: Don't know how to add o to a plot with R package dbplot I'm trying to add a legend to a boxplot which I created with the R-package dbplot. Unfortunately I'm getting the error:
"Don't know how to add o to a plot"

Here is my sample code: (I've added sample data but I load the data from a spark table!)
cars <- c(27,37,9,11,47,29,39,41,18,30)
cars_s <- c(0,99,10,0,0,0,0,0,10,10)
sample_data <- data.frame(cars, cars_s)

sparkTable %>%
   filter(cars > -1) %>%
   dbplot_boxplot(x = cars_s, var = cars, coef = 1.5) +
   ggtitle("Boxplot Title") +
   labs(x = "status", y = "cars") +
   legend("topright", inset = .05, title = "Status", legend = as.character(c("0", "1", "2"))) +
  theme_bw()

The output of my boxplot looks like this without the legend line

As described, I'm not able to add a legend.

A: This is because dbplot_boxplot() in dbplot doesn't support legends.
If it were an ordinary data.frame you would just add color = x:
  library(tidyverse)
  mtcars %>%
    mutate(cyl = as.factor(cyl)) %>%
ggplot(aes(x = cyl, y = mpg, color = cyl)) +
  geom_boxplot()

Created on 2019-05-07 by the reprex package (v0.2.1.9000)
However, when working with a database you always have to compute in the database and then collect into memory in R. dbplot is a package that does this and the plotting for you. Now, boxplots are a bit special because you have to compute a number of columns such as quartiles, inter range quartiles and so on. So to do it by hand may be a bit hefty, since the legend won't add any necessary information in your case.
However, if you think the package should add this feature you can leave a feature request as an issue on the package's Github: https://github.com/edgararuiz/dbplot/issues

A: As FilipW suggested I left a feature request and got an answer very quickly from the developer of dbplot. His answer solved my problem. He wrote me that I should work with db_compute_boxplot instead of dbplot_boxplot. Because db_compute_boxplot returns a data frame with boxplot calculations. So, it is possible to add manually the boxplot and colours:
sparkTable %>%
   filter(cars > -1) %>%
   db_compute_boxplot(x = cars_s, var = cars, coef = 1.5) +
   ggplot() +
   ggtitle("Boxplot Title") +
   labs(x = "status", y = "cars") +
   theme_bw() +
   geom_boxplot(
    aes(
      x = cars_s,
      ymin = ymin,
      lower = lower,
      middle = middle,
      upper = upper,
      ymax = ymax,
      color = as.factor(cars_s),
    ),
    stat = "identity"
  )

Many thanks!


text:
Q: python.exe - Entry point not found (mkl_dnn_BatchNormalizationCreateBackward_v2_F32) I'm referring to this specific Python library: https://github.com/antoinecarme/pyaf
My machine comprises of Anaconda3-4.4.0 with a separate environment which runs Python 3.5 as the pyAF library requires Python 3.5 to work.
I have installed this library on my laptop using the recommended options
on the above Github page, based on the following commands:
pip install scipy pandas sklearn matplotlib pydot dill pathos sqlalchemy
pip install --upgrade git+git://github.com/antoinecarme/pyaf.git

To execute the above, I change the environment on my Github bash to run it on Python 3.5 and I observe the following installation results:
**Dinesh@DESKTOP-O5O752M MINGW64 ~**
$ source activate python35
(python35)

**Dinesh@DESKTOP-O5O752M MINGW64 ~**
$ pip install scipy pandas sklearn matplotlib pydot dill pathos sqlalchemy
Requirement already satisfied: scipy in c:\toolkits\anaconda3-4.4.0\envs\python3                                                                                5\lib\site-packages
Requirement already satisfied: pandas in c:\toolkits\anaconda3-4.4.0\envs\python                                                                                35\lib\site-packages
Requirement already satisfied: sklearn in c:\toolkits\anaconda3-4.4.0\envs\pytho                                                                                n35\lib\site-packages
Requirement already satisfied: matplotlib in c:\toolkits\anaconda3-4.4.0\envs\py                                                                                thon35\lib\site-packages
Requirement already satisfied: pydot in c:\toolkits\anaconda3-4.4.0\envs\python3                                                                                5\lib\site-packages
Requirement already satisfied: dill in c:\toolkits\anaconda3-4.4.0\envs\python35                                                                                \lib\site-packages
Requirement already satisfied: pathos in c:\toolkits\anaconda3-4.4.0\envs\python                                                                                35\lib\site-packages
Requirement already satisfied: sqlalchemy in c:\toolkits\anaconda3-4.4.0\envs\py                                                                                thon35\lib\site-packages
Requirement already satisfied: numpy>=1.8.2 in c:\toolkits\anaconda3-4.4.0\envs\                                                                                python35\lib\site-packages (from scipy)
Requirement already satisfied: python-dateutil>=2 in c:\toolkits\anaconda3-4.4.0                                                                                \envs\python35\lib\site-packages (from pandas)
Requirement already satisfied: pytz>=2011k in c:\toolkits\anaconda3-4.4.0\envs\p                                                                                ython35\lib\site-packages (from pandas)
Requirement already satisfied: scikit-learn in c:\toolkits\anaconda3-4.4.0\envs\                                                                                python35\lib\site-packages (from sklearn)
Requirement already satisfied: six>=1.10 in c:\toolkits\anaconda3-4.4.0\envs\pyt                                                                                hon35\lib\site-packages (from matplotlib)
Requirement already satisfied: cycler>=0.10 in c:\toolkits\anaconda3-4.4.0\envs\                                                                                python35\lib\site-packages (from matplotlib)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in c:\to                                                                                olkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from matplotlib)
Requirement already satisfied: pyreadline>=1.7.1 in c:\toolkits\anaconda3-4.4.0\                                                                                envs\python35\lib\site-packages (from dill)
Requirement already satisfied: pox>=0.2.3 in c:\toolkits\anaconda3-4.4.0\envs\py                                                                                thon35\lib\site-packages (from pathos)
Requirement already satisfied: ppft>=1.6.4.7 in c:\toolkits\anaconda3-4.4.0\envs                                                                                \python35\lib\site-packages (from pathos)
Requirement already satisfied: multiprocess>=0.70.5 in c:\toolkits\anaconda3-4.4                                                                                .0\envs\python35\lib\site-packages (from pathos)
(python35)

**Dinesh@DESKTOP-O5O752M MINGW64 ~**
$ pip install --upgrade git+git://github.com/antoinecarme/pyaf.git

Collecting git+git://github.com/antoinecarme/pyaf.git
  Cloning git://github.com/antoinecarme/pyaf.git to c:\users\dines\appdata\local\temp\pip-_upr_c25-build
Requirement already up-to-date: scipy in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from pyaf==1.0)
Collecting pandas (from pyaf==1.0)
  Using cached pandas-0.20.3-cp35-cp35m-win_amd64.whl
Requirement already up-to-date: sklearn in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from pyaf==1.0)
Requirement already up-to-date: matplotlib in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from pyaf==1.0)
Requirement already up-to-date: pydot in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from pyaf==1.0)
Requirement already up-to-date: dill in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from pyaf==1.0)
Requirement already up-to-date: pathos in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from pyaf==1.0)
Collecting sqlalchemy (from pyaf==1.0)
Requirement already up-to-date: numpy>=1.8.2 in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from scipy->pyaf==1.0)
Collecting python-dateutil>=2 (from pandas->pyaf==1.0)
  Using cached python_dateutil-2.6.1-py2.py3-none-any.whl
Requirement already up-to-date: pytz>=2011k in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from pandas->pyaf==1.0)
Collecting scikit-learn (from sklearn->pyaf==1.0)
  Using cached scikit_learn-0.19.0-cp35-cp35m-win_amd64.whl
Requirement already up-to-date: six>=1.10 in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from matplotlib->pyaf==1.0)
Requirement already up-to-date: cycler>=0.10 in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from matplotlib->pyaf==1.0)
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 (from matplotlib->pyaf==1.0)
  Using cached pyparsing-2.2.0-py2.py3-none-any.whl
Requirement already up-to-date: pyreadline>=1.7.1 in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from dill->pyaf==1.0)
Requirement already up-to-date: ppft>=1.6.4.7 in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from pathos->pyaf==1.0)
Requirement already up-to-date: pox>=0.2.3 in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from pathos->pyaf==1.0)
Requirement already up-to-date: multiprocess>=0.70.5 in c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages (from pathos->pyaf==1.0)
Installing collected packages: python-dateutil, pandas, sqlalchemy, pyaf, scikit-learn, pyparsing
  Found existing installation: python-dateutil 2.6.0
    Uninstalling python-dateutil-2.6.0:
      Successfully uninstalled python-dateutil-2.6.0
  Found existing installation: pandas 0.20.1
    Uninstalling pandas-0.20.1:
      Successfully uninstalled pandas-0.20.1
  Found existing installation: SQLAlchemy 1.1.9
    Uninstalling SQLAlchemy-1.1.9:
      Successfully uninstalled SQLAlchemy-1.1.9
  Found existing installation: pyaf 1.0
    Uninstalling pyaf-1.0:
      Successfully uninstalled pyaf-1.0
  Running setup.py install for pyaf: started
    Running setup.py install for pyaf: finished with status 'done'
  Found existing installation: scikit-learn 0.18.1
    DEPRECATION: Uninstalling a distutils installed project (scikit-learn) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling scikit-learn-0.18.1:
      Successfully uninstalled scikit-learn-0.18.1
  Found existing installation: pyparsing 2.1.4
    Uninstalling pyparsing-2.1.4:
      Successfully uninstalled pyparsing-2.1.4
Successfully installed pandas-0.20.3 pyaf-1.0 pyparsing-2.2.0 python-dateutil-2.6.1 scikit-learn-0.19.0 sqlalchemy-1.1.13
Traceback (most recent call last):
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\Scripts\pip-script.py", line 5, in <module>
    sys.exit(pip.main())
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pip\__init__.py", line 249, in main
    return command.main(cmd_args)
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pip\basecommand.py", line 252, in main
    pip_version_check(session)
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pip\utils\outdated.py", line 102, in pip_version_check
    installed_version = get_installed_version("pip")
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pip\utils\__init__.py", line 838, in get_installed_version
    working_set = pkg_resources.WorkingSet()
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 644, in __init__
    self.add_entry(entry)
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 700, in add_entry
    for dist in find_distributions(entry, True):
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1949, in find_eggs_in_zip
    if metadata.has_metadata('PKG-INFO'):
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1463, in has_metadata
    return self.egg_info and self._has(self._fn(self.egg_info, name))
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1823, in _has
    return zip_path in self.zipinfo or zip_path in self._index()
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1703, in zipinfo
    return self._zip_manifests.load(self.loader.archive)
  File "C:\Toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1643, in load
    mtime = os.stat(path).st_mtime
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Toolkits\\anaconda3-4.4.0\\envs\\python35\\lib\\site-packages\\pyaf-1.0-py3.5.egg'
(python35)

With this first method, I can see that there are errors at the end of the output. Hence, I downloaded the entire pyAF package from Github on my desktop and attempted to install the library as follows:
**(python35) C:\Users\dines\Desktop>** cd pyaf-master

**(python35) C:\Users\dines\Desktop\pyaf-master>** python setup.py install

running install
running bdist_egg
running egg_info
writing pyaf.egg-info\PKG-INFO
writing dependency_links to pyaf.egg-info\dependency_links.txt
writing requirements to pyaf.egg-info\requires.txt
writing top-level names to pyaf.egg-info\top_level.txt
package init file 'pyaf\__init__.py' not found (or not a regular file)
package init file 'pyaf\TS\__init__.py' not found (or not a regular file)
package init file 'pyaf\CodeGen\__init__.py' not found (or not a regular file)
package init file 'pyaf\Bench\__init__.py' not found (or not a regular file)
reading manifest file 'pyaf.egg-info\SOURCES.txt'
writing manifest file 'pyaf.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
copying pyaf\ForecastEngine.py -> build\lib\pyaf
copying pyaf\HierarchicalForecastEngine.py -> build\lib\pyaf
copying pyaf\TS\Exogenous.py -> build\lib\pyaf\TS
copying pyaf\TS\Keras_Models.py -> build\lib\pyaf\TS
copying pyaf\TS\Options.py -> build\lib\pyaf\TS
copying pyaf\TS\Perf.py -> build\lib\pyaf\TS
copying pyaf\TS\Plots.py -> build\lib\pyaf\TS
copying pyaf\TS\PredictionIntervals.py -> build\lib\pyaf\TS
copying pyaf\TS\Scikit_Models.py -> build\lib\pyaf\TS
copying pyaf\TS\SignalDecomposition.py -> build\lib\pyaf\TS
copying pyaf\TS\SignalDecomposition_AR.py -> build\lib\pyaf\TS
copying pyaf\TS\SignalDecomposition_Cycle.py -> build\lib\pyaf\TS
copying pyaf\TS\SignalDecomposition_Quant.py -> build\lib\pyaf\TS
copying pyaf\TS\SignalDecomposition_Trend.py -> build\lib\pyaf\TS
copying pyaf\TS\SignalHierarchy.py -> build\lib\pyaf\TS
copying pyaf\TS\Signal_Grouping.py -> build\lib\pyaf\TS
copying pyaf\TS\Signal_Transformation.py -> build\lib\pyaf\TS
copying pyaf\TS\Time.py -> build\lib\pyaf\TS
copying pyaf\TS\TimeSeriesModel.py -> build\lib\pyaf\TS
copying pyaf\TS\Utils.py -> build\lib\pyaf\TS
copying pyaf\CodeGen\TS_CodeGenerator.py -> build\lib\pyaf\CodeGen
copying pyaf\CodeGen\TS_CodeGen_Objects.py -> build\lib\pyaf\CodeGen
copying pyaf\Bench\Artificial.py -> build\lib\pyaf\Bench
copying pyaf\Bench\download_all_stock_prices.py -> build\lib\pyaf\Bench
copying pyaf\Bench\GenericBenchmark.py -> build\lib\pyaf\Bench
copying pyaf\Bench\MComp.py -> build\lib\pyaf\Bench
copying pyaf\Bench\NN3.py -> build\lib\pyaf\Bench
copying pyaf\Bench\stocks_symbol_list.py -> build\lib\pyaf\Bench
copying pyaf\Bench\TS_datasets.py -> build\lib\pyaf\Bench
copying pyaf\Bench\YahooStocks.py -> build\lib\pyaf\Bench
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\pyaf
creating build\bdist.win-amd64\egg\pyaf\Bench
copying build\lib\pyaf\Bench\Artificial.py -> build\bdist.win-amd64\egg\pyaf\Bench
copying build\lib\pyaf\Bench\download_all_stock_prices.py -> build\bdist.win-amd64\egg\pyaf\Bench
copying build\lib\pyaf\Bench\GenericBenchmark.py -> build\bdist.win-amd64\egg\pyaf\Bench
copying build\lib\pyaf\Bench\MComp.py -> build\bdist.win-amd64\egg\pyaf\Bench
copying build\lib\pyaf\Bench\NN3.py -> build\bdist.win-amd64\egg\pyaf\Bench
copying build\lib\pyaf\Bench\stocks_symbol_list.py -> build\bdist.win-amd64\egg\pyaf\Bench
copying build\lib\pyaf\Bench\TS_datasets.py -> build\bdist.win-amd64\egg\pyaf\Bench
copying build\lib\pyaf\Bench\YahooStocks.py -> build\bdist.win-amd64\egg\pyaf\Bench
creating build\bdist.win-amd64\egg\pyaf\CodeGen
copying build\lib\pyaf\CodeGen\TS_CodeGenerator.py -> build\bdist.win-amd64\egg\pyaf\CodeGen
copying build\lib\pyaf\CodeGen\TS_CodeGen_Objects.py -> build\bdist.win-amd64\egg\pyaf\CodeGen
copying build\lib\pyaf\ForecastEngine.py -> build\bdist.win-amd64\egg\pyaf
copying build\lib\pyaf\HierarchicalForecastEngine.py -> build\bdist.win-amd64\egg\pyaf
creating build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\Exogenous.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\Keras_Models.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\Options.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\Perf.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\Plots.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\PredictionIntervals.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\Scikit_Models.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\SignalDecomposition.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\SignalDecomposition_AR.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\SignalDecomposition_Cycle.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\SignalDecomposition_Quant.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\SignalDecomposition_Trend.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\SignalHierarchy.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\Signal_Grouping.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\Signal_Transformation.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\Time.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\TimeSeriesModel.py -> build\bdist.win-amd64\egg\pyaf\TS
copying build\lib\pyaf\TS\Utils.py -> build\bdist.win-amd64\egg\pyaf\TS
byte-compiling build\bdist.win-amd64\egg\pyaf\Bench\Artificial.py to Artificial.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\Bench\download_all_stock_prices.py to download_all_stock_prices.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\Bench\GenericBenchmark.py to GenericBenchmark.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\Bench\MComp.py to MComp.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\Bench\NN3.py to NN3.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\Bench\stocks_symbol_list.py to stocks_symbol_list.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\Bench\TS_datasets.py to TS_datasets.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\Bench\YahooStocks.py to YahooStocks.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\CodeGen\TS_CodeGenerator.py to TS_CodeGenerator.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\CodeGen\TS_CodeGen_Objects.py to TS_CodeGen_Objects.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\ForecastEngine.py to ForecastEngine.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\HierarchicalForecastEngine.py to HierarchicalForecastEngine.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\Exogenous.py to Exogenous.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\Keras_Models.py to Keras_Models.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\Options.py to Options.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\Perf.py to Perf.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\Plots.py to Plots.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\PredictionIntervals.py to PredictionIntervals.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\Scikit_Models.py to Scikit_Models.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\SignalDecomposition.py to SignalDecomposition.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\SignalDecomposition_AR.py to SignalDecomposition_AR.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\SignalDecomposition_Cycle.py to SignalDecomposition_Cycle.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\SignalDecomposition_Quant.py to SignalDecomposition_Quant.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\SignalDecomposition_Trend.py to SignalDecomposition_Trend.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\SignalHierarchy.py to SignalHierarchy.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\Signal_Grouping.py to Signal_Grouping.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\Signal_Transformation.py to Signal_Transformation.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\Time.py to Time.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\TimeSeriesModel.py to TimeSeriesModel.cpython-35.pyc
byte-compiling build\bdist.win-amd64\egg\pyaf\TS\Utils.py to Utils.cpython-35.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying pyaf.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying pyaf.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pyaf.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pyaf.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying pyaf.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist\pyaf-1.0-py3.5.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing pyaf-1.0-py3.5.egg
Copying pyaf-1.0-py3.5.egg to c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Adding pyaf 1.0 to easy-install.pth file

Installed c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages\pyaf-1.0-py3.5.egg
Processing dependencies for pyaf==1.0
Searching for SQLAlchemy==1.1.13
Best match: SQLAlchemy 1.1.13
Adding SQLAlchemy 1.1.13 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for pathos==0.2.1
Best match: pathos 0.2.1
Adding pathos 0.2.1 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for dill==0.2.7.1
Best match: dill 0.2.7.1
Adding dill 0.2.7.1 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for pydot==1.2.3
Best match: pydot 1.2.3
Adding pydot 1.2.3 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for matplotlib==2.0.2
Best match: matplotlib 2.0.2
Adding matplotlib 2.0.2 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for sklearn==0.0
Best match: sklearn 0.0
Adding sklearn 0.0 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for pandas==0.20.3
Best match: pandas 0.20.3
Adding pandas 0.20.3 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for scipy==0.19.1
Best match: scipy 0.19.1
Adding scipy 0.19.1 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for ppft==1.6.4.7.1
Best match: ppft 1.6.4.7.1
Adding ppft 1.6.4.7.1 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for pox==0.2.3
Best match: pox 0.2.3
Adding pox 0.2.3 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for multiprocess==0.70.5
Best match: multiprocess 0.70.5
Adding multiprocess 0.70.5 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for pyreadline==2.1
Best match: pyreadline 2.1
Adding pyreadline 2.1 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for pyparsing==2.2.0
Best match: pyparsing 2.2.0
Adding pyparsing 2.2.0 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for cycler==0.10.0
Best match: cycler 0.10.0
Adding cycler 0.10.0 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for pytz==2017.2
Best match: pytz 2017.2
Adding pytz 2017.2 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for python-dateutil==2.6.1
Best match: python-dateutil 2.6.1
Adding python-dateutil 2.6.1 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for six==1.10.0
Best match: six 1.10.0
Adding six 1.10.0 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for numpy==1.13.1+mkl
Best match: numpy 1.13.1+mkl
Adding numpy 1.13.1+mkl to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Searching for scikit-learn==0.19.0
Best match: scikit-learn 0.19.0
Adding scikit-learn 0.19.0 to easy-install.pth file

Using c:\toolkits\anaconda3-4.4.0\envs\python35\lib\site-packages
Finished processing dependencies for pyaf==1.0

(python35) C:\Users\dines\Desktop\pyaf-master>

I think the pyAF library has been installed successfully. Now, I try running by importing it on Jupyter with the following code:
import pandas as pd

csvfile_link = "https://raw.githubusercontent.com/antoinecarme/TimeSeriesData/master/ozone-la.csv"
ozone_dataframe = pd.read_csv(csvfile_link);

import datetime
ozone_dataframe['Month'] = ozone_dataframe['Month'].apply(lambda x : datetime.datetime.strptime(x, "%Y-%m"))
ozone_dataframe.head()

%matplotlib inline
ozone_dataframe.plot.line('Month', ['Ozone'], grid = True, figsize=(12, 8))

Then, when I import the following library:
import pyaf.ForecastEngine as autof
lEngine = autof.cForecastEngine()
lEngine.train(ozone_dataframe , 'Month' , 'Ozone', 12);

I get the error pop up saying:
The procedure entry point mkl_dnn_BatchNormalizationCreateBackward_v2_F32
could not be located in the dynamic link library C:\Toolkits\anaconda3-
4.4.0\envs\python35\lib\site-packages\numpy\core\mkl_intel_thread.dll

This error pop up only dissapears when I keep clicking OK button 3 times.
Could anyone please help me on what I need to do to run this library successfully ? I'm not even aware as to what the root cause of this issue is. Please help.

Executing numpy as np and np.show_config()
(python35) C:\Users\dines>python
Python 3.5.3 |Anaconda custom (64-bit)| (default, May 15 2017, 10:43:23) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> np.show_config()
lapack_mkl_info:
    include_dirs = ['C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    library_dirs = ['C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']
blas_mkl_info:
    include_dirs = ['C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    library_dirs = ['C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']
blas_opt_info:
    include_dirs = ['C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    library_dirs = ['C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']
lapack_opt_info:
    include_dirs = ['C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2017/windows/mkl/include']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    library_dirs = ['C:/Program Files (x86)/IntelSWTools/compilers_and_libraries_2017/windows/mkl/lib/intel64_win']
    libraries = ['mkl_lapack95_lp64', 'mkl_blas95_lp64', 'mkl_rt']
>>>

A: (Post my comments as an answer as it is a confirmed solution.)
The problem is that the locally installed MKL package not compatible with numpy. The solution is install numpy using conda install numpy instead of pip install numpy.
To find out the MKL library numpy is linked against, run the following Python script in the activated conda environment,
import numpy as np
np.show_config()

I have a working conda environment with numpy installed. Notice the results show that the MKL library is part of the conda installation which guarantees compatibility:
blas_mkl_info:
    libraries = ['mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', 'iomp5', 'pthread']
    library_dirs = ['/Users/neurite/Applications/miniconda3/envs/temp/lib']
    define_macros = [('SCIPY_MKL_H', None), ('HAVE_CBLAS', None)]
    include_dirs = ['/Users/neurite/Applications/miniconda3/envs/temp/include']
...


text:
Q: How can I fill an entire Building with transparent points? I am posting the same code found at an earlier question, although the concept here is totally different.
The following code corresponds to a building-shaped structure.
w = 100;
l = 200;
h = 30;
m = 70;
backwall = {{0, l, 0}, {w, l, 0}, {w, l, h}, {0, l, h}};
side1 = {{0, 0, 0}, {0, 0, h}, {0, l, h}, {0, l, 0}};
side2 = {{w, 0, 0}, {w, 0, h}, {w, l, h}, {w, l, 0}};
floor = {{0, 0, 0}, {w, 0, 0}, {w, l, 0}, {0, l, 0}};
top = {{0, 0, h}, {w, 0, h}, {w, l, h}, {0, l, h}};
front = {{0, 0, 0}, {w, 0, 0}, {w, 0, h}, {0, 0, h}};
leftRoof = {{0, 0, h}, {w/2, 0, m}, {w/2, l, m}, {0, l, h}};
rightRoof = {{w, 0, h}, {w/2, 0, m}, {w/2, l, m}, {w, l, h}};
roofBack = {{w, l, h}, {w/2, l, m}, {0, l, h}};
roofFront = {{w, 0, h}, {w/2, 0, m}, {0, 0, h}};
building = {backwall, side1, side2, floor, front, leftRoof, rightRoof,roofBack, roofFront};
figure =Graphics3D[{Opacity[0.5],Style[Polygon[building,VertexColors -> Map[0.5 + #[[3]]/80 &, building, {2}]],Lighting -> {{"Ambient", White}}]}, Boxed -> False,RotationAction -> "Clip"];
data = RandomReal[60, {100, 3}];
data1 = RandomReal[60, {100, 3}];
redPoints = Graphics3D[{Opacity[0.4], PointSize -> Large,Style[Point[#], Blue]} & /@ data, Boxed -> False,RotationAction -> "Clip"];
bluePoints =Graphics3D[{Opacity[0.4], PointSize -> Large,Style[Point[#], Red]} & /@ data1, Boxed -> False,RotationAction -> "Clip"];
Show[{figure, redPoints, bluePoints}]

and upon evaluation it produces:

I have 10000 points that need placing, some with coordinates inside the building while the remaining are outside (like the ones circled above).
I have the following two questions:

*

*How can I omit the points that are not within the building?

*How do I fill the entire building with points?
Having tried a few things this morning, I still couldn't get it to work as I want so any help is appreciated.

A: The building is contained in the $w \times l \times m$ cuboid.
You can generate points inside this and then keep only those in the building.
side[{P_, Q_, R_, ___}, X_] := Det@Differences[{X, P, Q, R}];
getInsidePolyTest[poly_, knownPointInside_] :=
  Module[{known = Positive[side[#, knownPointInside] & /@ poly]},
   Function[pt, (known == Positive[side[#, pt] & /@ poly])]];
inBuildingQ = getInsidePolyTest[building, {1, 1, 1}];

pts = Select[
   RandomVariate[UniformDistribution[{{0, w}, {0, l}, {0, m}}], 1000],
    inBuildingQ];
Graphics3D[{FaceForm[Opacity[0.2]], Polygon@building, Point[pts]}]

Test adapted from this answer to handle polyhedra with non-consistent orientation of the faces.

A: If your building is just as simple as the one you posted above, then use RandomReal for several times will be simple and fast.
Use these definitions of data and data1 instead:
f[x_] := If[x < w/2, (m - h)/w 2 x + h, (m - h)/w 2 (w - x) + h]
getdata := (ll = RandomReal[l, {100}];
            ww = RandomReal[w, {100}];
            hh = RandomReal[f@#] & /@ ww;
            Transpose[{ww, ll, hh}])
data = getdata;
data1 = getdata;

Then you get this:

Update:
If you just need to remove the unwanted points in the data you've already got, you can do the following to your data and data1:
data = RandomReal[60, {100, 3}];
data1 = RandomReal[60, {100, 3}];
f[x_] := If[x < w/2, (m - h)/w 2 x + h, (m - h)/w 2 (w - x) + h]
{data, data1} = Select[#, Last@# < f@First@# &] & /@ {data, data1}


text:
Q: How do i call method from another class with parameter? I'm a beginner Android programming. How do I call method from another class with parameter.
I tried with method()it work. but I don't know how to with parameter
@class b
public class GetUrl {
static Context context;
public GetUrl(Context c) {
    context = c;

}
public String getJSONUrl(String url) {
    StringBuilder str = new StringBuilder();
    HttpClient client = new DefaultHttpClient();
    HttpGet httpGet = new HttpGet(url);
    try {
        HttpResponse response = client.execute(httpGet);
        StatusLine statusLine = response.getStatusLine();
        int statusCode = statusLine.getStatusCode();
        if (statusCode == 200) { // Download OK
            HttpEntity entity = response.getEntity();
            InputStream content = entity.getContent();
            BufferedReader reader = new BufferedReader(new InputStreamReader(content));
            String line;
            while ((line = reader.readLine()) != null) {
                str.append(line);
            }
        } else {
            Log.e("Log", "Failed to download result..");
        }
    } catch (ClientProtocolException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }
    return str.toString();
}
}

I want to call in Class A
In class A how to call it?

A: You can use this site to learn the basics.
public class A(){
        public A(){   //Empty constructor
        }

        public void someMethod(){
        }

        public void someMethodThatTakesString(String string){
        //do something with the string passed
        }

        public static void anotherMethod(){
        }
    }
    //You call this class and it's method
    A.anotherMethod(); //because this method is static
    A classA = new A();
    classA.someMethod();
    String someString = "I am string"
    classA.someMethodThatTakesString(someString)

A: By creating instance of this class
A a = new A();

Or with static methods
A.method(params);`


text:
Q: Azure - Issues With Port 22 Filtering NSG on my local machine IP I am primarily an AWS developer, and testing a few things out in Azure. I have spun up a Linux VM with authentication through user/pw and am having trouble SSHing unless I allow all sources in my NSG.
In AWS, I would simply create an inbound rule on my SG allowing for port 22 traffic on myip/32. I thought perhaps it's because I had IpV6 enabled, however even after I disabled it I am out of luck.
Other debugging steps I've took is to add larger CIDRs in my NSG such as 172.0.0.0/8 which should be covering my local machine.. however still a time-out. I'm allowing all ports and all protocols, only trying to filter the source IP.
Thanks!

A: It is the same process with the NSG, but from experience some ISP and big companies NAT there IP so much that the IP you get from whatmyip site is not the actual communication IP.
Example:


text:
Q: Python infinite loop to check if condition is meet Sorry if this is very newbie question.
I am trying to make a rock, paper, scissor program.
I want to wait for the user to make eather choice r, p, s.
I am not sure why i cant seem to make it work.
When i run my program, it never gets out of the first while loop whatever i type. I dont understand why is it not going on when i enter eather r, p, or s ?
while p1_choice != 'r' or p1_choice != 's' or p1_choice != 'p':
    p1_choice = input('Player one please make your choice. Rock(r), Scissors(s), Paper(p): ')

while p2_choice != 'r' or p1_choice != 's' or p1_choice != 'p':
    p2_choice = input('Player two please make your choice. Rock(r), Scissors(s), Paper(p): ')
    print()

if p1_choice == 'r' and p2_choice == 'p':
    print('Player two wins')
elif p1_choice == 'r' and p2_choice == 's':
    print('Player one wins')
elif p1_choice == 's' and p2_choice == 'r':
    print('Player two wins')
elif p1_choice == 's' and p2_choice == 'p':
    print('Player one wins')
elif p1_choice == 'p' and p2_choice == 'r':
    print('Player one wins')
elif p1_choice == 'p' and p2_choice == 's':
    print('Player two wins')
else:
    print('The game is a tie')

A: The first while loop will only stop if p1_choice is equal to 'r', 'p', and 's', simultaneously, which is impossible.
p1_choice != 'r' or p1_choice != 's' or p1_choice != 'p'
evaluates to True
if p1_choice does not equal 'r' or if p1_choice does not equal 'p' or if p1_choice does not equal 's'.
I believe you meant to use and instead of or.

A: @codewelldev has already nicely pointed out the impossibility to break out of while loop in your code.
Since in the OR condition if any condition is True the loop will keep going. You will input one of the following. 'r','s','p'. So because you are negating, there two True(s) and one False at best. It will never finish.
May be you want to use 'not in' function.
p1_choice, p2_choice = None, None
while p1_choice not in ('r','s','p'):
    p1_choice = input('Player one please make your choice. Rock(r), Scissors(s), Paper(p): ')

while p2_choice not in ('r','s','p'):
    p2_choice = input('Player two please make your choice. Rock(r), Scissors(s), Paper(p): ')
    print()

if p1_choice == 'r' and p2_choice == 'p':
    print('Player two wins')
elif p1_choice == 'r' and p2_choice == 's':
    print('Player one wins')
elif p1_choice == 's' and p2_choice == 'r':
    print('Player two wins')
elif p1_choice == 's' and p2_choice == 'p':
    print('Player one wins')
elif p1_choice == 'p' and p2_choice == 'r':
    print('Player one wins')
elif p1_choice == 'p' and p2_choice == 's':
    print('Player two wins')
else:
    print('The game is a tie')

A: Here is another way, I think the easiest to read:
def getPlayerChoice() -> str:
    choice = '';
    while not (choice == 'r' or choice == 's' or choice == 'p'):
        choice = input('Please make your choice. Rock(r), Scissors(s), Paper(p): ')

p1_choice = getPlayerChoice();
p2_choice = getPlayerChoice();

A: This statement  p1_choice != 'r' or p1_choice != 's' or p1_choice != 'p': is always True, hence won't break from the Loop
I strongly suggest you to run the code as follow:
while True:
    p1_choice = input('Player one please make your choice. Rock(r), Scissors(s), Paper(p): ')
    if p1_choice == 'r' or p1_choice == 's' or p1_choice == 'p':
        break
    else:
        continue

while True:
    p2_choice = input('Player two please make your choice. Rock(r), Scissors(s), Paper(p): ')
    if p2_choice != 'r' or p1_choice != 's' or p1_choice != 'p':
        continue
    else:
        break

Is more readable and less prone to errors.
Another improvement is, to delegate the check of the User input to a function so:
def check_inputs(user_input):
if user_input == 'r' or user_input == 's' or user_input == 'p':
    print('noe')
    return True
else:
    print('fuckl')
    return False

while True:
    p1_choice = input('Player one please make your choice. Rock(r), Scissors(s), Paper(p): ')
    check = check_inputs(p1_choice)
    if check:
        break
    else:
        continue

This follows the DRY Rule


text:
Q: GitHub Copilot Commands not working and showing error I have installed GitHub Copilot just for the sake of testing. However, none of the commands work.
For example if I try CTRL + Enter I get this error message:

command 'github.copilot.generate' not found

I am trying it with JS file.
I have latest Visual Studio Code and Copilot installed.

A: I had already signed up for the Technical preview and also accepted the invite for the same. Even after being signed in to VS Code using the same account, I had this error. This solution worked for me:

*

*Sign out of my account from the Accounts section of the left
sidebar on VS Code

*Sign in again using the same account in which invite was received

A: NOTE: There is a thread on the official Copilot discussion board on this issue here.
I have access to Github Copilot as well but get the error:

command 'github.copilot.generate' not found

Tried reloading and reinstalling it as well through vscodes ui.
Went in and manually went through the process of completely deleting it explained here.
Afterward, I logged out of my Github account attempted to install Copilot then logged back in when the prompt was displayed, again no luck.
Tested running both CTRL+ENTER and Alt+\ , neither of them did anything.
After I tried:

Developer: Reload Window

But that didn't do anything.
Checked the discussion forums and they had a solution for:

command 'github.copilot.toggleCopilot' not found

Which was to simply uninstall then reinstall copilot then run CTRL+R (Developer: Reload Window), this too didn't work out.
There's a good chance that all you'd have to do is retrigger the authentication flow considering that the developer tools console reports that copilot is "missing an auth token" (but no one knows how to retrigger it).
In addition to the above, I tried running CTRL+SHIFT+P then ran "Open Copilot", which resulted in the error

Command 'Open Copilot' resulted in an error (command 'github.copilot.generate' not found)

From this discussion post on another forum with a similar issue, apparently, this is an issue with command registration.
This specific comment seemed most relevant

*

*Uninstall Python extension (if you have pylance uninstall it first).

*Close all instances of VS Code.

*Go to,%USERPROFILE%/.vscode/extensions (on windows) or
~/.vscode/extensions on Linux/Mac.

*Delete any folder with the name starting with ms-python.python*

*Start VS Code, and install Python extension (also pylance if you
uninstalled it in step 1).

Of course, you'd have to apply this to Copilot so...

*

*Uninstall Copilot

*Close all instances of vscode

*Go to, %USERPROFILE%/.vscode/extensions (on windows) or ~/.vscode/extensions on Linux/Mac.

*Delete all instances of Copilot

*Go to, %USERPROFILE%/AppData/Roaming/Code/CachedExtensionVSIXs

*Delete all instances of Copilot

*Start and install Copilot
This too didn't work.
If I were to guess this would be solvable via retriggering the authentication flow.

A: *

*Click on the bell button on bottom right-corner of the Visual Studio Code Editor

*Press 'Agree' button

*Thats it!

A: (1) Go to, %USERPROFILE%/AppData/Roaming/Code/CachedExtensionVSIXs
(2) Delete all files and reopen vsCode.

A: This happens when you have failed to authenticate Copilot with Visual Studio Code.
If you had a missed authentication flow the flow can be re-triggered by clicking the VSCode Notifications icon on the status bar and clicking on the Sign in to Github notification.
If you have lost the authentication flow notification from the notifications panel, re-installing the Copilot helps.
TIP: To make it easier to sign in, make sure you are already authenticated on github.com on the default browser.

A: You can open the extensions tab or press ctrl + shift + x to look at the copilot extension.
you may reload it if you have authenticated with your GitHub account before.

A: Step 1:
First you need to login with same Github account you use for copilot beta signup, in your default browser.
If you mistakenly did something wrong here, just uninstall the extension and reload it, and then repeat step 1.

A: I don't know how this ties in but maybe it will help.
I have several times gotten a page saying that Copilot installed but wasn't done yet, and that I could finish the process by pasting an auth code into the "sign on to Github" link found in the VSCode status bar.
No such sign-on link ever showed up in my status bar but the auth code looked like this:
vscode-insiders://vscode.github-authentication/did-authenticate?windowid=1&code=65....
but I have found no place I can run that where it produces the desired result. At best I end up back at the waitlist sign on page.

A: I found that the reason was because my account never prompted me to allow the access as one of the top answers shows. It may have something to do with a firewall or other permissions (or bugs) on your machine. If you have access to another computer you can try to use Co-Pilot and see what happens. For me, everything worked on the second computer. Then you could compare and see what is different. In my case, it was my work's VPN that didn't allow. Once I disconnected from the VPN or tried another device, it worked fine.

A: Just log out your github account and re-log-in it in VSCode

A: In OSX this worked:
On a previous try, I had logged in to the wrong GitHub account. Be sure to be logged in with the correct GitHub account in the browser. Delete the extension from VSCode. Then open the Keychain Access -app and delete GitHub keys from there. After that install the extension and now it gets the correct authorization.

A: Check if you behind a firewall or proxy

A: Have you got the copilot beta? If not, you cant use it!

A: Updating Github Copilot helped (for NVim + Vundle I did :BundleUpdate).


text:
Q: Errors were encountered while processing: libsimgearcore2017.3.1:amd64 E: Sub-process /usr/bin/dpkg returned an error code (1)
    comp123@comp123-ThinkCentre-M71e:~$

I Tried looking in the package manager but the package was not there.
It Does not let me download,update or upgrade.
Sudo apt-get -f install does not work.
I know it has something to do with flight gear.
when I do  apt-cache policy libsimgearcore2017.3.1
It says
libsimgearcore2017.3.1:
  Installed: 1:2017.3.1-0ubuntu1~ppa1~16.04.1
  Candidate: 1:2017.3.1-0ubuntu1~ppa1~16.04.1
  Version table:
 *** 1:2017.3.1-0ubuntu1~ppa1~16.04.1 500
        500 http://ppa.launchpad.net/saiarcot895/flightgear/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

Before it says
comp123@comp123-ThinkCentre-M71e:~$ sudo apt-get install mono-completeReading package lists... Done
Building dependency tree
Reading state information... Done
mono-complete is already the newest version (4.2.1.102+dfsg2-7ubuntu4).
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up libsimgearcore2017.3.1:amd64 (1:2017.3.1-0ubuntu1~ppa1~16.04.1) ...
ln: failed to create symbolic link '/usr/share/games/flightgear/Timezone': No such file or directory
dpkg: error processing package libsimgearcore2017.3.1:amd64 (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 libsimgearcore2017.3.1:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)


text:
Q: Не загружаются изображения на api 20 и ниже Выбивает ошибку при тесте на устройствах api 20 и ниже.
Вот такая ошибка,когда убрал картинку drawable/man:
E/UncaughtException: android.content.res.Resources$NotFoundException: Resource ID #0x7f0200c5
                                                                            at android.content.res.Resources.getValue(Resources.java:2354)
                                                                            at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:332)
                                                                            at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:197)
                                                                            at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:190)
                                                                            at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
                                                                            at android.support.v7.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:425)
                                                                            at android.support.v7.view.menu.ActionMenuItemView.initialize(ActionMenuItemView.java:129)
                                                                            at android.support.v7.widget.ActionMenuPresenter.bindItemView(ActionMenuPresenter.java:211)
                                                                            at android.support.v7.view.menu.BaseMenuPresenter.getItemView(BaseMenuPresenter.java:186)
                                                                            at android.support.v7.widget.ActionMenuPresenter.getItemView(ActionMenuPresenter.java:197)
                                                                            at android.support.v7.widget.ActionMenuPresenter.flagActionItems(ActionMenuPresenter.java:508)
                                                                            at android.support.v7.view.menu.MenuBuilder.flagActionItems(MenuBuilder.java:1160)
                                                                            at android.support.v7.view.menu.BaseMenuPresenter.updateMenuView(BaseMenuPresenter.java:95)
                                                                            at android.support.v7.widget.ActionMenuPresenter.updateMenuView(ActionMenuPresenter.java:234)
                                                                            at android.support.v7.view.menu.MenuBuilder.dispatchPresenterUpdate(MenuBuilder.java:292)
                                                                            at android.support.v7.view.menu.MenuBuilder.onItemsChanged(MenuBuilder.java:1047)
                                                                            at android.support.v7.view.menu.MenuBuilder.startDispatchingItemsChanged(MenuBuilder.java:1074)
                                                                            at android.support.v7.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:460)
                                                                            at android.support.v7.app.ToolbarActionBar$1.run(ToolbarActionBar.java:61)
                                                                            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:813)
                                                                            at android.view.Choreographer.doCallbacks(Choreographer.java:613)
                                                                            at android.view.Choreographer.doFrame(Choreographer.java:582)
                                                                            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:799)
                                                                            at android.os.Handler.handleCallback(Handler.java:733)
                                                                            at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                            at android.os.Looper.loop(Looper.java:146)
                                                                            at android.app.ActivityThread.main(ActivityThread.java:5593)
                                                                            at java.lang.reflect.Method.invokeNative(Native Method)
                                                                            at java.lang.reflect.Method.invoke(Method.java:515)
                                                                            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
                                                                            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
                                                                            at dalvik.system.NativeStart.main(Native Method)

Код layout:
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"

    tools:context="by.ittech.test_chat.Profile.Profile"
    android:weightSum="1">
<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:layout_width="match_parent"
        android:layout_height="155dp"
        android:background="@drawable/side_nav_bar"
        android:gravity="center"
        android:orientation="horizontal"
        android:theme="@style/ThemeOverlay.AppCompat.Dark">

        <com.mikhaellopez.circularimageview.CircularImageView
            android:id="@id/tvPhoto"
            android:layout_width="129dp"
            android:layout_height="119dp"
            android:src="@drawable/man"
            app:civ_border_color="#EEEEEE"
            app:civ_border_width="1dp" />

    </LinearLayout>

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/n"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:layout_marginTop="21dp"
            android:text="@string/profile_name"
            android:textSize="30dp"
            android:textStyle="bold" />

        <TextView
            android:id="@+id/profile_name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_marginTop="61dp"
            android:gravity="end"
            android:textSize="30dp"
            tools:gravity="end" />
    </RelativeLayout>

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/e"
            android:textStyle="bold"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:layout_marginTop="21dp"
            android:text="@string/profile_email"
            android:textSize="30dp" />

        <TextView
            android:id="@+id/profile_email"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_marginTop="61dp"
            android:gravity="end"
            android:textSize="30dp"
            tools:gravity="end" />

    </RelativeLayout>

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/phone"
            android:textStyle="bold"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:layout_marginTop="21dp"
            android:text="@string/profile_phone"
            android:textSize="30dp" />

        <TextView
            android:id="@+id/profile_phone"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentTop="true"
            android:layout_marginTop="61dp"
            android:gravity="end"
            android:textSize="30dp"
            tools:gravity="end" />

    </RelativeLayout>

</LinearLayout>

</FrameLayout>

Код:
package by.ittech.test_chat.Profile;

import android.net.Uri;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import com.mikhaellopez.circularimageview.CircularImageView;
import com.squareup.picasso.Picasso;

import by.ittech.test_chat.EditProfile;
import by.ittech.test_chat.R;

import static com.facebook.FacebookSdk.getApplicationContext;

public class Profile extends Fragment {

    DatabaseReference myRef;
    private TextView profileName;
    private TextView profileEmail;
    private TextView profilePhone;
    private ImageView photo;
    private final int SPLASH_DISPLAY_LENGTH = 500;
    private static final String TAG = "MyApp";
    public Profile() {
        // Required empty public constructor
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View v = inflater.inflate(R.layout.fragment_profile, container, false);
        profileName = (TextView)v.findViewById(R.id.profile_name);
        profileEmail = (TextView)v.findViewById(R.id.profile_email);
        profilePhone = (TextView)v.findViewById(R.id.profile_phone);
        photo=(ImageView) v.findViewById(R.id.tvPhoto);
        setData();
        Log.i(TAG, "onCreateView-Profile");
        return v;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setHasOptionsMenu(true);
        Log.i(TAG, "onCreate");
    }

    @Override
    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater)
    {
        inflater.inflate(R.menu.edit, menu);
        Log.i(TAG, "onCreateOptionsMenu");
        return;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
            case R.id.menu_edit:
                Fragment fragment=new EditProfile();
                FragmentManager fragmentManager=getFragmentManager();
                fragmentManager.beginTransaction().replace(R.id.frame,fragment).addToBackStack(null).commit();
                Log.i(TAG, "onOptionsItemSelected");
            default:
                // Not one of ours. Perform default menu processing
                return super.onOptionsItemSelected(item);

        }

    }

    public void setData(){

        FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
        profileEmail.setText(user.getEmail());
        myRef = FirebaseDatabase.getInstance().getReference().child("profiles").child(user.getUid());
        StorageReference myRefImage = FirebaseStorage.getInstance().getReference().child(user.getUid()+"/img.jpg");
        myRefImage.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
            @Override
            public void onSuccess(Uri uri) {
                if(uri==null){
                    Picasso.with(getApplicationContext()).load(R.drawable.com_facebook_button_icon).fit().centerCrop().into(photo);
                }else{
                    Picasso.with(getApplicationContext()).load(uri).fit().centerCrop().into(photo);
                }
            }
        });
        myRef.addValueEventListener(new ValueEventListener() {
            @Override
            public void onDataChange(DataSnapshot dataSnapshot) {
                ProfileUserInfo userInfo = dataSnapshot.getValue(ProfileUserInfo.class);
                if (userInfo == null) {
                    profileName.setText("");
                    profilePhone.setText("");
                } else {
                    profileName.setText(userInfo.getName());
                    profilePhone.setText(userInfo.getPhone());
                }

            }

            @Override
            public void onCancelled(DatabaseError databaseError) {

            }
        });
        Log.i(TAG, "setData");
    }

}

Как я понимаю,ругается на данную библиотеку: com.mikhaellopez.circularimageview.CircularImageView, но почему,если на других устройствах всё работает. До этого была такая же ошибка с другой библиотекой,которая скругляет углы.
Протестировал сейчас со стандартным ImageView,выбивает такую же ошибку и ссылается на данную строку:
View v = inflater.inflate(R.layout.fragment_profile, container, false);


text:
Q: Failed to construct 'WebSocket': The URL '{{.}}' is invalid gorilla/websocket example
In this example:
https://github.com/gorilla/websocket/blob/e8629af678b7fe13f35dff5e197de93b4148a909/examples/echo/server.go#L79
The WebSocket is created by:
ws = new WebSocket("{{.}}");

The example works fine.
Problem
But, then I want to use the same code in another JS code like:

var ws;
ws = new WebSocket("{{.}}");
ws.onopen = function(evt) {
    console.log("OPEN SOCKET");
}
ws.onclose = function(evt) {
    console.log("CLOSE SOCKET");
    ws = null;
}
ws.onmessage = function(evt) {
    console.log("RESPONSE SOCKET: RECEIVED");
}
ws.onerror = function(evt) {
    console.log("ERROR: " + evt.data);
}
ws.send(positions);
ws.close();

I'm getting this error:

Uncaught (in promise) DOMException: Failed to construct 'WebSocket': The URL '{{.}}' is invalid.
at AddObjectCommand.execute

I changed WebSocket like this:
ws = new WebSocket("ws://127.0.0.1:8080/echo");

But I'm still getting an error:

WebSocket connection to 'ws://127.0.0.1:8080/echo' failed: Error during WebSocket handshake: Unexpected response code: 403

I cannot figure out what I'm doing wrong. What did I miss?
Fix 403
The 403 error got resolved by this suggestion:
https://github.com/gorilla/websocket/issues/367#issuecomment-375971418
By adding:
upgrader.CheckOrigin = func(r *http.Request) bool { return true }

Before:
c, err := upgrader.Upgrade(w, r, nil)

It's not safe to trust all origins, of course. Just a temporary fix.
Yet another error
But another error is thrown:

Uncaught (in promise) DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.

A: The error of:

Uncaught (in promise) DOMException: Failed to execute 'send' on 'WebSocket': Still in CONNECTING state.

Got resolved by sending data through WebSocket, by its .onopen callback:
var positions = ...

var ws;
ws = new WebSocket("ws://127.0.0.1:8080/echo");
ws.onopen = function(evt) {
    console.log("OPEN SOCKET");
    console.log("SEND: START");
    ws.send(positions);
    ws.close();
}


text:
Q: How to dynamically add quirks mode meta-tags in ASP.NET Web Forms from code behind? I've got an.aspx page like the following:
<!DOCTYPE html>

    <title>My Page</title>

I'm trying to set quirks mode meta tags in code behind of the page i.e. in Page_load using:
HtmlMeta _ContentTypeTag = new HtmlMeta()
{
    HttpEquiv = "Content-Type",
    Content = "text/html; charset=UTF-8"
};

Page.Header.Controls.Add(_ContentTypeTag);

HtmlMeta _QuirksModeTag = new HtmlMeta()
{
    HttpEquiv = "X-UA-Compatible",
    Content = "IE=EmulateIE8"
};

Page.Header.Controls.Add(_QuirksModeTag);

But when I see the page source, it currently outputs this:
<!DOCTYPE html>

    <title>My Page</title>
    <meta http-equiv="Page-Enter" content="blendTrans(Duration=0.0)">
    <meta name="MSThemeCompatible" content="no">

Whereas, I'm expecting the output to be something like this:
<!DOCTYPE html>

    <title>My Page</title>
    <meta http-equiv=Content-Type content="text/html; charset=UTF-8">
    <meta http-equiv=X-UA-Compatible content=IE=EmulateIE8>

What's the cause of this behavior and how I can fix it?
UPDATE
I've fixed this using Response.AddHeader("X-UA-Compatible", "IE=EmulateIE8"); instead. (Taken from here)
But, it'll still be good to know why the initial approach wasn't working.

A: It's Too Simple, USe below code at code behind.
    Page.Title = "Meta title string here..";
    Page.MetaKeywords = "Meta keyword string here..";
    Page.MetaDescription = "Meta description string here..";


text:
Q: Unit test a reactive extension method with delay timer I have the below extension method.
public static IObservable<T> RetryWithCount<T>(this IObservable<T> source,
            int retryCount, int delayMillisecondsToRetry, IScheduler executeScheduler = null,
            IScheduler retryScheduler = null)
        {
            var retryAgain = retryCount + 1;
            return source
                .RetryX(
                    (retry, exception) =>
                        retry == retryAgain
                            ? Observable.Throw<bool>(exception)
                            : Observable.Timer(TimeSpan.FromMilliseconds(delayMillisecondsToRetry))
                                .Select(_ => true));
        }

RetryX is another extension method and I can unit test fine. The problem with the above method is because I return Observable.Timer the assertion is invoked and then the delegate is continuing for the second time.
The Unit Test method.
        [Test]
        public void should_retry_with_count()
        {
            // Arrange
            var tries = 0;
            var scheduler = new TestScheduler();
            IObservable<Unit> source = Observable.Defer(() =>
            {
                ++tries;
                return Observable.Throw<Unit>(new Exception());
            });

            // Act
            var subscription = source.RetryWithCount(1, 100, scheduler, scheduler)
                .Subscribe(
                    _ => { },
                    ex => { });
            scheduler.AdvanceByMinimal(); //How to make sure that it is completed?

            // Assert
            Assert.IsTrue(tries == 2); // Assert is invoked before the source has completed.
        }

The AdvanceByMinimal helper method.
public static void AdvanceMinimal(this TestScheduler @this) => @this.AdvanceBy(TimeSpan.FromMilliseconds(1));

A successful unit test for the RetryX extensions method is below.
        [Test]
        public void should_retry_once()
        {
            // Arrange
            var tries = 0;
            var scheduler = new TestScheduler();
            var source = Observable
                .Defer(
                    () =>
                    {
                        ++tries;
                        return Observable.Throw<Unit>(new Exception());
                    });
            var retryAgain = 2;

            // Act
            source.RetryX(
                (retry, exception) =>
                {
                    var a = retry == retryAgain
                        ? Observable.Return(false)
                        : Observable.Return(true);

                    return a;
                }, scheduler, scheduler)
                .Subscribe(
                    _ => { },
                    ex => { });
            scheduler.AdvanceMinimal();

            // Assert
            Assert.IsTrue(tries == retryAgain);
        }

And for the clarity of overall picture below is the RetryX extension method.
        /// <summary>
        /// Retry the source using a separate Observable to determine whether to retry again or not.
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="source"></param>
        /// <param name="retryObservable">The observable factory used to determine whether to retry again or not. Number of retries & exception provided as parameters</param>
        /// <param name="executeScheduler">The scheduler to be used to observe the source on. If non specified MainThreadScheduler used</param>
        /// <param name="retryScheduler">The scheduler to use for the retry to be observed on. If non specified MainThreadScheduler used.</param>
        /// <returns></returns>
        public static IObservable<T> RetryX<T>(this IObservable<T> source,
            Func<int, Exception, IObservable<bool>> retryObservable, IScheduler executeScheduler = null,
            IScheduler retryScheduler = null)
        {
            if (retryObservable == null)
            {
                throw new ArgumentNullException(nameof(retryObservable));
            }

            if (executeScheduler == null)
            {
                executeScheduler = MainScheduler;
            }

            if (retryScheduler == null)
            {
                retryScheduler = MainScheduler;
            }

            // so, we need to subscribe to the sequence, if we get an error, then we do that again...
            return Observable.Create<T>(o =>
            {
                // whilst we are supposed to be running, we need to execute this
                var trySubject = new Subject<Exception>();

                // record number of times we retry
                var retryCount = 0;

                return trySubject.
                    AsObservable().
                    ObserveOn(retryScheduler).
                    SelectMany(e => Observable.Defer(() => retryObservable(retryCount, e))). // select the retry logic
                    StartWith(true). // prime the pumps to ensure at least one execution
                    TakeWhile(shouldTry => shouldTry). // whilst we should try again
                    ObserveOn(executeScheduler).
                    Select(g => Observable.Defer(source.Materialize)). // get the result of the selector
                    Switch(). // always take the last one
                    Do((v) =>
                    {
                        switch (v.Kind)
                        {
                            case NotificationKind.OnNext:
                                o.OnNext(v.Value);
                                break;

                            case NotificationKind.OnError:
                                ++retryCount;
                                trySubject.OnNext(v.Exception);
                                break;

                            case NotificationKind.OnCompleted:
                                trySubject.OnCompleted();
                                break;
                        }
                    }
                    ).Subscribe(_ => { }, o.OnError, o.OnCompleted);
            });
        }

A: This isn't an answer to your question, but rather something that may help you: I looked at that RetryX for a while, and if you strip out all the scheduler stuff, which you probably should, it can be reduced down this:
public static IObservable<T> RetryX<T>(this IObservable<T> source, Func<int, Exception, IObservable<bool>> retryObservable)
{
    return source.Catch((Exception e) => retryObservable(1, e)
        .Take(1)
        .SelectMany(b => b ? source.RetryX((count, ex) => retryObservable(count + 1, ex)) : Observable.Empty<T>()));
}

All the scheduler calls aren't "best practice". There's a reason most Rx operators don't accept scheduler parameters (Select, Where, Catch, etc.). The ones that do, have something specifically to do with timing/scheduling: Timer, Delay, Join.
Someone who is interested in specifying the scheduler to use with a scheduler-less RetryX could always specify the scheduler on the parameters passed in. You generally want thread-management to be at the top-level calling thread, and specifying thread scheduling isn't where you want to do it.

A: George check out https://github.com/kentcb/Genesis.RetryWithBackoff by Kent for some inspiration.

A: The problem was not passing the IScheduler correctly down to the RetryX extension method and also to Observable.Timer.
public static IObservable<T> RetryWithCount<T>(this IObservable<T> source,
            int retryCount, int delayMillisecondsToRetry, IScheduler executeScheduler = null,
            IScheduler retryScheduler = null)
        {
            if (executeScheduler == null)
            {
                executeScheduler = MainScheduler;
            }
            var retryAgain = retryCount + 1;
            return source
                .RetryX(
                    (retry, exception) =>
                    {
                        return retry == retryAgain
                            ? Observable.Throw<bool>(exception, executeScheduler)
                            : Observable.Timer(TimeSpan.FromMilliseconds(delayMillisecondsToRetry), executeScheduler)
                                .Select(_ => true);
                    },
                    retryScheduler,
                    executeScheduler);
        }


text:
Q: Node.js install socket.io Error ======================================================================
When I try to install install socket.io, I encounter an error. Please see the cmd image and the log file.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'socket.io' ]
2 info using npm@2.14.12
3 info using node@v4.2.6
4 verbose install initial load of C:\inetpub\wwwroot\Test_NodeJSSocketIO\package.json
5 verbose readDependencies loading dependencies from C:\inetpub\wwwroot\Test_NodeJSSocketIO\package.json
6 silly cache add args [ 'socket.io', null ]
7 verbose cache add spec socket.io
8 silly cache add parsed spec Result {
8 silly cache add   raw: 'socket.io',
8 silly cache add   scope: null,
8 silly cache add   name: 'socket.io',
8 silly cache add   rawSpec: '',
8 silly cache add   spec: 'latest',
8 silly cache add   type: 'tag' }
9 silly addNamed socket.io@latest
10 verbose addNamed "latest" is being treated as a dist-tag for socket.io
11 info addNameTag [ 'socket.io', 'latest' ]
12 silly mapToRegistry name socket.io
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/socket.io
16 verbose addNameTag registry:https://registry.npmjs.org/socket.io not in flight; fetching
17 verbose request uri https://registry.npmjs.org/socket.io
18 verbose request no auth needed
19 info attempt registry request try #1 at 16:55:55
20 verbose request id 4772f4039b89ce43
21 http request GET https://registry.npmjs.org/socket.io
22 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
23 info attempt registry request try #2 at 16:56:05
24 http request GET https://registry.npmjs.org/socket.io
25 info retry will retry, error on last attempt: Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
26 info attempt registry request try #3 at 16:57:05
27 http request GET https://registry.npmjs.org/socket.io
28 verbose stack Error: getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
28 verbose stack     at errnoException (dns.js:26:10)
28 verbose stack     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:77:26)
29 verbose cwd C:\inetpub\wwwroot\Test_NodeJSSocketIO
30 error Windows_NT 6.1.7601
31 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "socket.io"
32 error node v4.2.6
33 error npm  v2.14.12
34 error code ENOTFOUND
35 error errno ENOTFOUND
36 error syscall getaddrinfo
37 error network getaddrinfo ENOTFOUND registry.npmjs.org registry.npmjs.org:443
37 error network This is most likely not a problem with npm itself
37 error network and is related to network connectivity.
37 error network In most cases you are behind a proxy or have bad network settings.
37 error network
37 error network If you are behind a proxy, please make sure that the
37 error network 'proxy' config is set properly.  See: 'npm help config'
38 verbose exit [ 1, true ]

I have tired the following ways, but with no luck.
 1. Run as administrator
 2. npm config set registry http://registry.npmjs.org/
 3. npm config set http_proxy=http://address:8080
 4. npm config get proxy -> null
 5. computer restarted.

Many thanks for help!

A: That's a standard DNS error. If ping registry.npmjs.org does not work, then nothing with work including npm.
Check your DNS settings.

A: DNS cannot be resolved, try to point to some public DNS, e.g. Google at 8.8.8.8. If you are on Linux then add this to your /etc/resolv.conf:

nameserver 8.8.8.8

If you are on Mac OS X then go to System Preferences -> Network -> Choose your connection -> Advanced -> DNS add 8.8.8.8 to the collection.
Here is how you do it on Windows: http://www.doxer.org/resolved-resolv-conf-windows-equivalent/
P.S okay you are using Windows just checked your image ;)