text:
Q: Azure SQL database Connection issues I'm trying to access the Azure database through SSMS but I get this error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - The wait operation timed out.) (Microsoft SQL Server, Error: 258)

I have allowed my network IP on the database server and it doesn't say anything about a new IP trying to gain access. The connection is sometimes established but most of the time I get that error.
I couldn't find anything related to this error specific to Azure DB. Is there a way to fix it?

A: Here are the recommended best practices for connecting to SQL Azure:
Client Drivers

*

*Recommended to get the latest version

Security and Firewall Rules

*

*Turn on encryption

*Turn off trust server certificate

*Open port #1433 and #1100-114999

Managing Connections

*

*30s Connection timeout (SqlClient uses 15s as the default connection timeout)

*Explicitly specify tcp protocol (SQL DB supports only tcp

*Use connection pool


text:
Q: PHP and HTML issue Good Afternoon Comunity,
Well, the problem is i have a DIV PA on my index.html wich display a login window if you are not connect or a properity window if you are connect
http://imageshack.com/a/img23/3821/m6h0.jpg
The problem is when i use the code, i get this stetic error
http://imageshack.com/a/img812/2720/keg6.jpg
The code works fine except that error

<?php
boolean allowed = false;
if (allowed)
{
echo "

<form name="form1" method="post" action="">

        <input type="text" name="Usuario" id="Usuario" align="absmiddle" size="23" >
      </form>
   <form name="form2" method="post" action="">

       <input type="password" name="clave" id="clave" size="23">
      </form>

<form name="form3" method="post" action="">
  <input type="checkbox" name="casilla" id="casilla">

        Seguir Logeado

      <input type="reset" name="Crear" id="Crear" value="Entrar">
      </form>

Problema

Registrarse

"

}else{

echo "another code";
}
?>

I apogolize in case i wrote something wrong, my english is not as good as i want
Thank in advance. my regards!
EDITED:
Even more i use an echo for each sentences, tried 1 quote, tried  between html code and nothing.
PS: In my design tab from dreamweaver c6 i dont see this problem like on browser
FINAL edited: most of code you posted are working but for some reason (maybe htaccess issue) my pc  cant make it works...tahnk to all for your time!!

A: Your problem is that you're using double quotation marks (") for everything, so you're opening and closing the string countless times. I'm actually surprised that you're getting what you are, but I'm sure your error file is full.
Try this:
div id="apDiv7">

<?php
boolean allowed = false;
if (allowed)
{
echo '

<form name="form1" method="post" action="">

        <input type="text" name="Usuario" id="Usuario" align="absmiddle" size="23" >
      </form>
   <form name="form2" method="post" action="">

       <input type="password" name="clave" id="clave" size="23">
      </form>

<form name="form3" method="post" action="">
  <input type="checkbox" name="casilla" id="casilla">

        Seguir Logeado

      <input type="reset" name="Crear" id="Crear" value="Entrar">
      </form>

Problema

Registrarse

';

}else{

echo 'another code';
}
?>

OR, and this is my preferred method when writing HTML inside a PHP file
div id="apDiv7">

<?php
boolean allowed = false;
if (allowed)
{
?>

<form name="form1" method="post" action="">

        <input type="text" name="Usuario" id="Usuario" align="absmiddle" size="23" >
      </form>
   <form name="form2" method="post" action="">

       <input type="password" name="clave" id="clave" size="23">
      </form>

<form name="form3" method="post" action="">
  <input type="checkbox" name="casilla" id="casilla">

        Seguir Logeado

      <input type="reset" name="Crear" id="Crear" value="Entrar">
      </form>

Problema

Registrarse

<?php
}else{
?>

another code

<?php
}
?>

Notice how the HTML isn't inside PHP tags, but it IS inside a PHP if statement. It still works, and you don't have to worry about crossing your PHP and HTML syntax when you do it that way.

A: This is because you're using double quotes both for echo and for html codes.
Use single quotes on echo, and this will not happen again.

A: You don't need the echo. Close and reopen your php code around the HTML. Also, your php vars need a dollar sign before them. Try this.

<?php
$allowed = false;
if ($allowed){
?>

     <form name="form1" method="post" action="">

       <input type="text" name="Usuario" id="Usuario" align="absmiddle" size="23" >
     </form>
     <form name="form2" method="post" action="">

        <input type="password" name="clave" id="clave" size="23">
     </form>

        <form name="form3" method="post" action="">
        <input type="checkbox" name="casilla" id="casilla">
        Seguir Logeado

        <input type="reset" name="Crear" id="Crear" value="Entrar">
        </form>

Problema

Registrarse

<?php
}
else{
    echo "another code";
}
?>

Here is a screenshot of code with output.  Make sure you have php enabled in .htaccess by adding AddType application/x-httpd-php php php4 php3 html htm. The .htaccess file should be in the root of your server (same as index.php)

A: Some code that shows the different parts correctly.
There is now only one form with a 'submit' button.
As there is so little logic i have used 'alternate syntax' for the logic statements.

<?php
/* debug */ var_dump($_POST); // remove this -- i want to see the input.

$allowed = true; // force the login screen to be shown
?>

<?php if ($allowed): ?>

<form name="form1" method="post" action="">
     Usuario
     <input type="text" name="Usuario" id="Usuario" align="absmiddle" size="23" >

       clave
      <input type="password" name="clave" id="clave" size="23">

  <input type="checkbox" name="casilla" id="casilla">

        Seguir Logeado

      <input type="submit" name="Crear" id="Crear" value="Entrar">
      </form>

Problema

Registrarse

<?php else: ?>

another code

<?php endif; ?>

redpajama_set_name: RedPajamaStackExchange


text:
Q: Link not clickable for no reason at all Hello I have a website that I am making, but after a while I checked if everything was working, nope. One link is now not working. I am hoping you smart people can help me figure my problem out.
The link that is not clickable is the first "Learn More" link on the top.
Here is my code:

@media (min-width:350px) {
    #header {
        position: fixed;
        top: 0px;
        left: 0px;
        z-index: 3;
    }

    #headertxt {
        display: none;
        position: absolute;
    }

    #woblogo {
        float: left;
        left: 0%;
        margin-left: -30px;
        padding-top: 3px;
    }

    #navigation, nav {
        float: right;
        left: 0%;
        right: 0px;
        margin-top: -25px;
    }

    #navigation {
        margin-right: -15px;
    }

    #wobheader {
        margin-top: 77px;
        position: relative;
        z-index: -100;
    }

    #joinwob {
        width: 100%;
        height: auto;
        margin-top: -55px;
    }
}

@media (min-width: 381px) {
    #navigation, nav {
        margin-top: 10px;
    }

    #wobheader {
        margin-top: 77px;
    }
}

@media (min-width: 400px) {
    #navigation, nav {
        margin-top: -24px;
    }

    #wobheader {
        margin-top: 77px;
    }
}

@media (min-width: 401px) {
    #navigation, nav {
        margin-top: 10px;
    }

    #wobheader {
        margin-top: 77px;
    }
}

@media (min-width:500px) {
    #navigation {
        margin-right: 0px;
    }

    #woblogo {
        margin-left: 0px;
    }
}

@media (min-width: 550px) {
    #navigation, nav {
        margin-top: 12px;
    }

    #wobheader {
        margin-top: 77px;
    }

    #navigation {
        margin-right: 35px;
    }

    .seven.columns {width: 100%;}
}

@media (min-width:775px) {
    .seven.columns {
        width: 56.6666666667%;
    }

    #headertxt {
        display: inline;
        transform: translateY(-50%);
        position: relative;
        top: 20px;

    }

    #navigation, nav {
        margin-top: -4px;
    }

    #wobheader {
        margin-top: 77px;
    }

    #woblogo {
        width: 125px;
        height: auto;
        padding-top: 3px;
        position: relative;
        left: 30%;
        margin-top: -33px;
    }
}

@media (min-width:900px) {
    #woblogo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    #navigation {
        margin-right: 10%;
    }
}

/* HEADER Section */
#header {
    background-color: #000000;
    height:  75px;
    border-bottom: solid 2px #56C9FF;
    width: 100%;
    z-index: 1;
}

#headertxt {
    position: relative;
    color: #ffffff;
}

h5 {
    font-size: 16pt;
}

nav a {
    font-size: 10pt;
}

#woblogo {
    width: 125px;
    height: auto;
}

/* NAVIGATION Section */
#navigation {
}

nav {
}

nav li{
    display: inline;
    padding-right: 15px;
}

nav #dropdown {
    display: none;
}

nav a {
    text-decoration: none;
    color: #ffffff;
    font-family: Nimbus;
}

nav a:hover {
    padding-top: 7px;
    color: #56C9FF;
    border-top: 4px solid #56C9FF;
}

nav a:active {
    padding-top: 7px;
    color: 56C9FF;
    border-top: 4px solid #56C9FF;
}

/* WORLDOFBASS Video Section */
#wobheader {
    width: 100%;
    height: 100%;
    padding: 0px;
    z-index: -1;
}

#learnmore {
    background-color: #000000;
    height: 50px;
    z-index: 100;
    position: relative;
    top: -50px;
}

#learnmore a {
    display: block;
    text-decoration: none;
    color: #ffffff;
    text-align: center;
    position: relative;
    top: 25px;
    transform: translateY(-50%);
}

#learnmore a:hover {
    color: #56C9FF;
}

#videoheader {
    position: relative;
    z-index: -5;
}

 /* JOIN WORLDOFBASS TODAY! Section */
#joinasdj a, #joinaslabel a, #joinaspromoter a {
        color: #ffffff;
        text-decoration: none;
        background-color: #000000;
        height: 35px;
    }

#joinasdj a:hover, #joinaslabel a:hover, #joinaspromoter a:hover {
        color: #56C9FF;
    }

#joinasdj a {
        position: relative;
        top: 50%;
        transform:translateY(-50%);
        display: block;
        text-align: center;
        height: 35px;
    }

#joinaslabel a {
        position: relative;
        top: 50%;
        transform:translateY(-50%);
        display: block;
        text-align: center;
        height: 35px;
    }

#joinaspromoter a {
        position: relative;
        top: 50%;
        transform:translateY(-50%);
        display: block;
        text-align: center;
        height: 35px;
    }

@media (min-width: 550px) {
        #joinasdj {
            position: relative;
            left: 5%;
        }

        #joinaslabel {
            position: relative;
            left: 9%;

        }

        #joinaspromoter {
            position: relative;
            left: 12%;
        }

        #joinasdj p, #joinaslabel p, #joinaspromoter p {
            position: relative;
            top: 50%;
            transform:translateY(-50%);
        }

        #joinasdj, #joinaslabel, #joinaspromoter {
            position: relative;
            top: -45px;
        }
    }
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>WorldOfBass</title>
  <meta name="description" content="">
  <meta name="author" content="">

  <meta name="viewport" content="width=device-width, initial-scale=1">

  <link rel="stylesheet" href="css/normalize.css">
  <link rel="stylesheet" href="css/skeleton.css">
  <link rel="stylesheet" href="css/style.css">

  <link rel="icon" type="image/png" href="images/favicon.png" alt="Image failed to load, please refresh the page. If you are the owner of the site please check with the Web developer that created the site.">

A Network For Promoters.

HOME

ABOUT

CONTACT

                            MORE

DJ

DJ

DJ

DJ

DJ

DJ

            <video id="wobheader" autoplay loop>
                <source src="images/headerimg.mp4" type="video/mp4" />
                Your browser does not support video playback in MP4.
            </video>

                LEARN MORE

Learn More

Learn More

Learn More

A: Remove the z-index: -5 for the #videoheader in your CSS.
Your LEARN MORE link is a descendant of that #videoheader div, and because of the z-index: -5 be, that entire div gets moved down in the pile below (in z-index terms) some other part of your layout. So the link isn't "reachable" (for lack of a better term), because your layout has something else piled on top of it.


text:
Q: Set up host file using port I want to setup my host file to
127.0.0.2:5050 domain2.com  => this is a local domain
when a type in my browser domain2.com, this return me : HTTP Error 404. The requested resource is not found.
i use this in apache
<VirtualHost 127.0.0.9:5050>

    ServerAdmin info@domain2.com
    DocumentRoot "C:/Users/My_Dir/LOOP/WebEnginer-2011/domain2_Dir/"
    ServerName domain2.com
    DirectoryIndex index.php index.html index.htm
    ServerAlias www.domain2.com
    ErrorLog "c:/wamp/xxxx/xxxx.log"
    CustomLog "c:/wamp/xxxx/xxxx.log" common
</VirtualHost>

<VirtualHost 127.0.0.9:5050>

    ServerAdmin info@domain2.com
    DocumentRoot "C:/Users/My_Dir/LOOP/WebEnginer-2011/domain2_Dir/admin_Dir/"
    ServerName admin.domain2.com
    DirectoryIndex index.php index.html index.htm
    ServerAlias www.admin.domain2.com
    ErrorLog "c:/wamp/xxxx/xxxx.log"
    CustomLog "c:/wamp/xxxx/xxxx.log" common
</VirtualHost>

but when i type 127.0.0.2:5050 i can see a web page. I want to use subdomain like admin.domain2.com
i can't use port 80 because IIS use that port.
How can i set up my host file to listen domain2.com?

A: That won't work since the hosts file only serves the purpose of mapping a hostname to an IP-address. The port number of a service is a different concept and is not handled by the "hosts" file nor the DNS-System. In Short: you can't supply a port number in the "hosts" file.
If your Webserver works on another port, you have to supply that information in the URL: http://domain2.com:5050.
The only other solution is to configure your Webservers to listen on a specific IP so that they don't interfere with each other. For example the IIS could listen on 127.0.0.1 and the Apache on 127.0.0.2 (the way you have already configured it).
There's a HOWTO for achieving that with the IIS. I'm not sure if that works for 127.0.0.x-IP's but I think it's worth a try.

A: It might be:

*

*Your DNS resolver not resolving that properly

*Some Apache webserver misconfiguration

Try this to get more information about that:

*

*What if you ping domain2.com?

*Also, try what happens if you put something like domain2.local in your hosts file. It might be some windows security c** disallowing you to overwrite the ip of an existing domain.

*Why didn't you use 127.0.0.1? That should be fine, however

*Make sure you have a properly configured VirtualHost that accepts requests to "domain2.com", or you just have a default virtualhost.

EDIT
What did you actually add to hosts file? The correct syntax would be:
127.0.0.2     domain2.com


text:
Q: Iteratively return matches among three data frames using nested criteria I have the following three data frames:
df1<- structure(list(plot = c(1L, 1L, 1L, 2L, 2L, 2L), lepsp = structure(c(1L,
2L, 3L, 3L, 4L, 5L), .Label = c("lepA", "lepB", "lepC", "lepD",
"lepE"), class = "factor"), count = c(1L, 2L, 3L, 4L, 1L, 3L)), class = "data.frame",
row.names = c(NA, -6L))

df2<-structure(list(plot = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L), plantsp = structure(c(12L, 13L, 1L,
2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 12L, 13L, 14L, 11L), .Label = c("H",
"I", "J", "K", "L", "M", "O", "P", "Q", "S", "U", "X", "Y", "Z"
), class = "factor"), leafArea = c(1L, 5L, 5L, 10L, 20L, 11L,
12L, 8L, 1L, 5L, 10L, 15L, 20L, 12L, 13L, 2L)), class = "data.frame", row.names = c(NA,
-16L))

df3<-structure(list(lepsp = structure(c(1L, 1L, 1L, 2L, 2L, 3L, 3L,
3L, 3L, 3L, 3L, 4L, 5L), .Label = c("lepA", "lepB", "lepC", "lepD",
"lepE"), class = "factor"), plantsp = structure(c(6L, 7L, 8L,
6L, 5L, 2L, 3L, 4L, 1L, 6L, 8L, 8L, 1L), .Label = c("S", "T",
"U", "V", "W", "X", "Y", "Z"), class = "factor")), class = "data.frame", row.names = c(NA,
-13L))

Essentially I need to iterate through df1 for unique subsets based on two factor levels. Upon each iteration, I need to find matches between df1 and df2 for a particular column. Among the matches found between df2 and df1, I need to take that subset of rows in df2 and find matches with df3 based on a separate set of criteria and return rows that match for a different factor. To summarize, specific to the data frames posted above:

*

*For each ith df1$plot and jth  df1$lepsp, subset rows in df2  for those entries in  df1$plot and df2$plot that match. Similarly and secondly,   subset rows in df3  for those entries in  df1$lepsp and df3$lepsp that match.

*Among the subsetted df2 and df3 from step 1 above, for those levels of df3$plantsp that are also in df2$plantsp return the matching rows in df2.

*Return a data frame that indexes the associated ith df1$plot and jth df1$lepsp and the associated rows in df2 that matched based on criteria found in step2

*Iterate through all levels of df1$lepsp within each df1$plot.

The result output would be as follows:
result<- structure(list(plot = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L
), lepsp = structure(c(1L, 1L, 2L, 3L, 3L, 3L, 3L, 3L, 4L, 5L
), .Label = c("lepA", "lepB", "lepC", "lepD", "lepE"), class = "factor"),
lepcount = c(1L, 1L, 2L, 3L, 4L, 4L, 4L, 4L, 1L, 3L), plantsp = structure(c(3L,
4L, 3L, 3L, 2L, 1L, 3L, 5L, 5L, 1L), .Label = c("S", "U",
"X", "Y", "Z"), class = "factor"), leafarea = c(1L, 5L, 1L,
1L, 2L, 15L, 20L, 13L, 13L, 15L)), class = "data.frame", row.names = c(NA,
-10L))

Given that this has such nested structure I struggle to think of a method that would work to put all parts together, however I know that the following functions may be useful:
for (i in unique(levels(df1$plot)){
 for( j in  unique(levels(df1$lepsp)){
 sub1<- df2[which(df1$plot %in% df2$plot),]
 sub2<- df3[which(df2$lepsp %in% df3$lepsp),]
 result <- data.frame(plot=unique(df1$plot),lepsp=unique(df1$lepsp),
                   plantsp=df2$plantsp,leafArea=df2$leafArea)}
 return(result)
}

A: We could keep the datasets in a list and use merge with Reduce
out <- Reduce(function(...) merge(...), list(df1, df2, df3))

Or with tidyverse
library(dplyr)
library(purrr)
list(df1, df2, df3) %>%
      reduce(inner_join)


text:
Q: Why is this printing "X" and not the value? How can I print the value?     DECLARE
        a CONSTANT NUMBER := 3;
        b NUMBER NOT NULL := 5;
    BEGIN
        :X := :X + a + b + 3;
    END;
    .
    RUN
    PRINT :X

A: Prints the value for me ...
SQL> var x number
SQL> exec :x := 10

PL/SQL procedure successfully completed.

SQL> DECLARE
  2     a   CONSTANT NUMBER := 3;
  3     b            NUMBER NOT NULL := 5;
  4  BEGIN
  5     :X := :X + a + b + 3;
  6  END;
  7  /

PL/SQL procedure successfully completed.

SQL> print :x

         X
----------
        21

SQL>


text:
Q: R Multiple T-test: Grouping factor must have 2 variables I'm trying to compare a control group with an experimental group on a range of variable to show that they are similar (baseline).
I thus need to do multiple t-test (unpaired/ Welch t-test). My data is in a long format with the first variable called "Group" with either a number 1 or a number 2. There are some missing values in some of my other variables but it's pretty random.
So when I run t-test manually using this line of code:
t.test(variable_1 ~ Group,df)

it works.
I then tried to do it all at once using this line of code:
 sapply(df[,2:71], function(i) t.test(i ~ df$Group)$p.value)

But I get the following error:

grouping factor must have exactly 2 levels

Could anyone help?
Here is what the structure looks like
structure(list(Group = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 2, 2), EM_Accuracy_Time_Airport = c(3, 3, 0,
1, 1, 2, 2, 1, 1, 3, 3, 2, 2, 2, 1, 3, 1, 3, 1, 1), EM_Accuracy_Place_Airport = c(2,
2, 1, 2, 1, 2, 2, 1, 1, 2, 0, 2, 2, 0, 2, 2, 2, 1, 1, 1), EM_Accuracy_Expl_Airport = c(2,
2, 2, 0, 2, 2, 2, 1, 2, 2, 2, 2, 2, 0, 0, 1, 0, 2, 2, 1), EM_Accuracy_Death_Airport = c(0,
2, 0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 3, 0, 0, 0), EM_Accuracy_Time_Metro = c(3,
1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 2, 1, 3, 1, 1, 2, 1, 3, 3), EM_Accuracy_Death_Metro = c(3,
0, 1, 0, 1, 1, 0, 0, 0, 3, 0, 0, 1, 0, 3, 1, 1, 1, 0, 0), EM_Accuracy_PC_Time_Airpot = c(100,
100, 0, 33.3333333333333, 33.3333333333333, 66.6666666666667,
66.6666666666667, 33.3333333333333, 33.3333333333333, 100, 100,
66.6666666666667, 66.6666666666667, 66.6666666666667, 33.3333333333333,
100, 33.3333333333333, 100, 33.3333333333333, 33.3333333333333
), EM_Accuracy_PC_Place_Airport = c(100, 100, 50, 100, 50, 100,
100, 50, 50, 100, 0, 100, 100, 0, 100, 100, 100, 50, 50, 50),
    EM_Accuracy_PC_Expl_Airport = c(100, 100, 100, 0, 100, 100,
    100, 50, 100, 100, 100, 100, 100, 0, 0, 50, 0, 100, 100,
    50), EM_Accuracy_PC_Death_Airport = c(0, 66.6666666666667,
    0, 0, 33.3333333333333, 66.6666666666667, 0, 0, 0, 0, 0,
    0, 66.6666666666667, 0, 0, 0, 100, 0, 0, 0), EM_Accuracy_PC_Time_Metro = c(100,
    33.3333333333333, 0, 0, 33.3333333333333, 33.3333333333333,
    0, 33.3333333333333, 33.3333333333333, 33.3333333333333,
    33.3333333333333, 66.6666666666667, 33.3333333333333, 100,
    33.3333333333333, 33.3333333333333, 66.6666666666667, 33.3333333333333,
    100, 100), EM_Accuracy_PC_Death_Metro = c(100, 0, 33.3333333333333,
    0, 33.3333333333333, 33.3333333333333, 0, 0, 0, 100, 0, 0,
    33.3333333333333, 0, 100, 33.3333333333333, 33.3333333333333,
    33.3333333333333, 0, 0), EM_ACCURACY_PC = c(83.3333333333333,
    66.6666666666667, 30.5555555555556, 22.2222222222222, 47.2222222222222,
    66.6666666666666, 44.4444444444444, 27.7777777777778, 36.1111111111111,
    72.2222222222222, 38.8888888888889, 55.5555555555555, 66.6666666666666,
    27.7777777777778, 44.4444444444444, 52.7777777777778, 55.5555555555556,
    52.7777777777778, 47.2222222222222, 38.8888888888889), EM_Certainty_Time_Airport = c(3,
    1, 1, 1, 2, 2, 1, 1, 2, 3, 3, 2, 2, 2, 4, 2, 3, 3, 2, 2),
    EM_Certainty__Place_Airport = c(3, 4, 2, 2, 2, 2, 4, 1, 3,
    4, 4, 4, 4, 3, 3, 4, 4, 3, 2, 3), EM_Certainty__Expl_Airport = c(4,
    2, 3, 1, 2, 3, 2, 1, 2, 4, 1, 3, 2, 2, 1, 3, 1, 2, 2, 3),
    EM_Certainty__Death_Airport = c(1, 1, NA, 1, 2, 1, 3, 1,
    2, 3, NA, 3, 2, 1, 2, 1, 1, 1, 4, 4), EM_Certainty__Time_Metro = c(3,
    3, 1, 1, 2, 2, 2, 1, 3, 2, 3, 2, 3, 2, 2, 2, 3, 1, 2, 2),
    EM_Certainty__Death_Metro = c(2, 1, 1, NA, 2, 1, 1, 1, 2,
    1, NA, 3, 2, 1, 1, 1, 1, 1, 1, 4), EM_CERTAINTY = c(2.66666666666667,
    2, 1.6, 1.2, 2, 1.83333333333333, 2.16666666666667, 1, 2.33333333333333,
    2.83333333333333, 2.75, 2.83333333333333, 2.5, 1.83333333333333,
    2.16666666666667, 2.16666666666667, 2.16666666666667, 1.83333333333333,
    2.16666666666667, 3), EM_CONFIDENCE = c(5, 5, 1, 2, 2, 4,
    5, 2, 3, 4, 5, 5, 3, 3, 4, 4, 3, 2, 3, 2), FBM_CONFIDENCE = c(4,
    6, 7, 7, 5, 4, 2, 7, 5, 6, 6, 7, 6, 7, 3, 6, 6, 4, 5, 6),
    FBM_Vividness_Time = c(3, 3, 1, 4, 3, 2, 4, 3, 4, 4, 1, 3,
    4, 4, 3, 3, 3, 2, 4, 3), FBM_Vividness_How = c(4, 4, 2, 4,
    4, 3, 4, 4, 4, 4, 3, 4, 3, 4, 4, 4, 4, 4, 4, 4), FBM_Vividness_Where = c(4,
    4, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4),
    FBM_Vividness_WithWhom = c(4, 4, 3, 4, 3, 4, 4, 4, 4, 4,
    4, 4, 4, 4, 4, 4, 4, 4, 4, 4), FBM_Vividness_WereDoing = c(4,
    4, 1, 4, 3, 4, 4, 4, 4, 4, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4),
    FBM_Vividness_Did_After = c(4, 4, 3, 4, 2, 3, 4, 4, 2, 4,
    1, 4, 4, 4, 3, 4, 4, 3, 4, 4), FBM_VIVIDNESS = c(3.83333333333333,
    3.83333333333333, 2, 4, 3.16666666666667, 3.33333333333333,
    4, 3.83333333333333, 3.66666666666667, 4, 2.33333333333333,
    3.83333333333333, 3.83333333333333, 4, 3.66666666666667,
    3.83333333333333, 3.83333333333333, 3.5, 4, 3.83333333333333
    ), FBM_Details_NB_T2 = c(3, 5, 0, 5, 5, 5, 2, 5, 1, 5, 3,
    5, 5, 5, 2, 4, 2, 3, 5, 5), P_Novelty_5 = c(5, 6.2, 6.5,
    5.6, 4.8, 5.4, 4, 4.2, 4.4, 5.8, 3.4, 5.8, 6, 5.8, 3.8, 6.4,
    6.8, 6.6, 7, 3), P_Suprise_emotion = c(6, 6, 6, 6, 4, 5,
    1, 7, 1, 5, 4, 5, 7, 7, 6, 4, 7, 7, 2, 5), P_Surprise_Expected = c(1,
    3, 5, 2, 4, 3, 6, 2, 2, 1, 6, 4, 3, 1, 5, 1, 1, 1, 5, 4),
    P_Surprise_Unbelievable = c(5, 4, 1, 6, 4, 4, 2, 7, 1, 4,
    1, 6, 7, 7, 6, 3, 7, 7, 5, 3), `P_Consequence-Importance_5` = c(5.6,
    4.8, 3.4, 5, 4.8, 4, 5, 5.4, 3, 5.2, 6.8, 5.4, 4, 4.4, 6,
    3.8, 4, 4.8, 5, 5.2), P_Emotional_Intensity_4 = c(5.25, 5.75,
    3, 4.75, 4.75, 6, 4, 5.25, 2.5, 5.5, 7, 6.5, 5.75, 6.75,
    6.75, 6, 6.25, 6, 5, 2.5), P_Social_Sharing_6 = c(3.66666666666667,
    3.83333333333333, 3.4, 3.16666666666667, 3, 3.33333333333333,
    3.8, 3.16666666666667, 2.16666666666667, 4.16666666666667,
    4, 4.5, 4.5, 4.33333333333333, 4, 3.16666666666667, 3.66666666666667,
    4, NA, NA), P_Media_3 = c(4.66666666666667, 4, 3, 2.66666666666667,
    2.66666666666667, 2.33333333333333, 3, 2.33333333333333,
    2.33333333333333, 3.33333333333333, 4.33333333333333, 5,
    4.33333333333333, 5, 4, 2, 3, 3.33333333333333, 2, 1.66666666666667
    ), P_Ruminations = c(3, NA, 3, 2, 4, NA, 4, 2, 1, 4, 4, 4,
    2, 4, 2, 3, 3, 3, 4, 3), P_Novelty_Common_rev = c(6, 7, 7,
    7, 4, 6, 4, 7, 2, 6, 3, 7, 7, 7, 3, 6, 7, 7, 7, 3), P_Novelty_Unusual = c(2,
    5, 7, 7, 3, 5, 3, 3, 5, 6, 1, 4, 7, 1, 4, 6, 6, 6, 7, 2),
    P_Novelty_Special = c(6, 6, NA, 6, 5, 5, 4, 3, 5, 4, 1, 5,
    6, 7, 4, 6, 7, 7, 7, 3), P_Novelty_Singular = c(4, 6, 5,
    1, 5, 5, 4, 1, 3, 6, 5, 6, 4, 7, 3, 7, 7, 6, 7, 2), P_Novelty_Ordinary_rev = c(7,
    7, 7, 7, 7, 6, 5, 7, 7, 7, 7, 7, 6, 7, 5, 7, 7, 7, 7, 5),
    P_Consequence = c(6, 7, 5, 4, 5, 4, 5, 3, 5, 5, 7, 5, 5,
    2, 6, 6, 1, 4, 6, 3), P_Importance_self = c(4, 3, 3, 4, 4,
    3, 5, 6, 1, 5, 7, 5, 3, 3, 5, 2, 2, 4, 5, 3), `P_Importance_friends&family` = c(4,
    4, 3, 4, 4, 4, 4, 6, 1, 5, 6, 5, 3, 3, 5, 2, 6, 4, 5, 10),
    P_Importance_Belgium = c(7, 5, 3, 7, 6, 5, 6, 7, 3, 7, 7,
    7, 5, 7, 7, 5, 6, 7, 6, 6), P_Importance_International = c(7,
    5, 3, 6, 5, 4, 5, 5, 5, 4, 7, 5, 4, 7, 7, 4, 5, 5, 3, 4),
    P_Emotional_Intensity_Upset = c(4, 5, NA, 3, 3, 5, 3, 5,
    2, 5, 7, 5, 5, 6, 7, 6, 6, 5, 5, 3), P_Emotional_Intensity_Indiferent_rev = c(7,
    7, 5, 7, 6, 7, 4, 6, 4, 7, 7, 7, 7, 7, 7, 7, 7, 7, NA, 4),
    P_Emotional_Intensity_Affected = c(6, 6, 3, 5, 5, 6, 5, 6,
    2, 5, 7, 7, 5, 7, 7, 6, 6, 6, NA, 2), P_Emotional_Intensity_Shaken = c(4,
    5, 1, 4, 5, 6, 4, 4, 2, 5, 7, 7, 6, 7, 6, 5, 6, 6, 5, 1),
    P_Rehearsal_Media_TV = c(5, 3, NA, 3, 2, 3, NA, 1, 1, 4,
    3, 5, 5, 5, 2, 3, 2, 2, 2, 2), P_Rehearsal_Media_Internet = c(4,
    4, 1, 3, 2, 2, 2, 4, 3, 2, 5, 5, 3, 5, 5, 1, 5, 4, 2, 1),
    P_Rehearsal_Media_Social_Networks = c(5, 5, 5, 2, 4, 2, 4,
    2, 3, 4, 5, 5, 5, 5, 5, 2, 2, 4, 2, 2), P_Social_Sharing_How_Often = c(4,
    5, 4, 4, 4, 3, 3, 3, 3, 5, 4, 5, 5, 5, 5, 3, 4, 4, 5, NA),
    P_Social_Sharing_With_How_Many_People = c(5, 4, NA, 3, 3,
    3, 3, 3, 2, 5, 3, 5, 5, 3, 5, 3, 3, 4, 3, NA), PK_Shops_YN = c(0,
    1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1),
    PK_Comic = c(0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0,
    0, 0, 0, 1, 0), PK_Hotel = c(0, 0, 0, 0, 1, 0, 0, 0, 0, 1,
    0, 0, 1, 1, 0, 0, 0, 0, 0, 0), PK_Decoration_Maelbeek = c(0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1),
    PK_Stations_before_after_Maelbeek = c(0, 0.5, 0, 0, 0, 0,
    0, 0, 0.5, 1, 0, 0, 0.5, 0.5, 0, 0, 0.5, 0, 0.5, 0), PK_TOTAL_PC = c(0,
    50, 0, 40, 40, 40, 20, 0, 10, 60, 20, 40, 90, 70, 20, 0,
    30, 20, 70, 40), SI_Attachment_BXL = c(6, 4, 1, 4, 2, 5,
    1, 6, 5, 4, 2, 6, 6, 7, 1, 3, 6, 4, 5, 4), SI_Pride_BXL = c(1,
    2, 1, 2, 1, 2, 1, 5, 1, 6, 1, 1, 7, 7, 1, 2, 6, 1, 3, 3),
    SI_Attachment_Belgium = c(7, 3, 5, 5, 4, 6, 7, 6, 5, 6, 7,
    7, 7, 7, 5, 6, 7, 6, 4, 2), SI_Pride_Belgium = c(7, 2, 6,
    4, 2, 6, 4, 5, 1, 5, 1, 6, 7, 7, 5, 7, 7, 6, 2, 2), SI_Attachment_EU = c(6,
    4, 2, 5, 4, 4, 5, 4, 7, 4, 1, 6, 7, 7, 5, 4, 6, 6, 2, 6),
    SI_Pride_EU = c(7, 1, 1, 4, 3, 4, 4, 4, 1, 4, 1, 6, 7, 7,
    4, 3, 6, 6, 2, 4)), .Names = c("Group", "EM_Accuracy_Time_Airport",
"EM_Accuracy_Place_Airport", "EM_Accuracy_Expl_Airport", "EM_Accuracy_Death_Airport",
"EM_Accuracy_Time_Metro", "EM_Accuracy_Death_Metro", "EM_Accuracy_PC_Time_Airpot",
"EM_Accuracy_PC_Place_Airport", "EM_Accuracy_PC_Expl_Airport",
"EM_Accuracy_PC_Death_Airport", "EM_Accuracy_PC_Time_Metro",
"EM_Accuracy_PC_Death_Metro", "EM_ACCURACY_PC", "EM_Certainty_Time_Airport",
"EM_Certainty__Place_Airport", "EM_Certainty__Expl_Airport",
"EM_Certainty__Death_Airport", "EM_Certainty__Time_Metro", "EM_Certainty__Death_Metro",
"EM_CERTAINTY", "EM_CONFIDENCE", "FBM_CONFIDENCE", "FBM_Vividness_Time",
"FBM_Vividness_How", "FBM_Vividness_Where", "FBM_Vividness_WithWhom",
"FBM_Vividness_WereDoing", "FBM_Vividness_Did_After", "FBM_VIVIDNESS",
"FBM_Details_NB_T2", "P_Novelty_5", "P_Suprise_emotion", "P_Surprise_Expected",
"P_Surprise_Unbelievable", "P_Consequence-Importance_5", "P_Emotional_Intensity_4",
"P_Social_Sharing_6", "P_Media_3", "P_Ruminations", "P_Novelty_Common_rev",
"P_Novelty_Unusual", "P_Novelty_Special", "P_Novelty_Singular",
"P_Novelty_Ordinary_rev", "P_Consequence", "P_Importance_self",
"P_Importance_friends&family", "P_Importance_Belgium", "P_Importance_International",
"P_Emotional_Intensity_Upset", "P_Emotional_Intensity_Indiferent_rev",
"P_Emotional_Intensity_Affected", "P_Emotional_Intensity_Shaken",
"P_Rehearsal_Media_TV", "P_Rehearsal_Media_Internet", "P_Rehearsal_Media_Social_Networks",
"P_Social_Sharing_How_Often", "P_Social_Sharing_With_How_Many_People",
"PK_Shops_YN", "PK_Comic", "PK_Hotel", "PK_Decoration_Maelbeek",
"PK_Stations_before_after_Maelbeek", "PK_TOTAL_PC", "SI_Attachment_BXL",
"SI_Pride_BXL", "SI_Attachment_Belgium", "SI_Pride_Belgium",
"SI_Attachment_EU", "SI_Pride_EU"), row.names = c(NA, -20L), class = c("tbl_df",
"tbl", "data.frame"))

A: The error you get means that there's a problem in your dataset, with at least one of your variables.
Here's a process to help you spot problematic variables:
library(tidyverse)

df %>%
  group_by(Group) %>%                   # for each group value
  summarise_all(~sum(!is.na(.))) %>%    # count non NA values for each variable
  gather(var,value,-Group) %>%          # reshape
  spread(Group, value, sep = "_") %>%   # reshape
  filter(Group_2 < 2)                   # get problematic variables

# # A tibble: 5 x 3
#   var                                   Group_1 Group_2
#   <chr>                                   <int>   <int>
# 1 P_Emotional_Intensity_Affected             18       1
# 2 P_Emotional_Intensity_Indiferent_rev       18       1
# 3 P_Social_Sharing_6                         18       0
# 4 P_Social_Sharing_How_Often                 18       1
# 5 P_Social_Sharing_With_How_Many_People      17       1

0 counts will throw an error about needing two levels in your grouping variables.
1 count will throw an error about needing more observations in one of your groups.
After spotting those you have to treat them accordingly and then your original t.test code should work.

A: So my problem was just missing data in one variable.
However, if you are looking at doing multiple T-test in a long format: this line of code works:

sapply(df[,2:71], function(i) t.test(i ~ df$Group)$p.value)


text:
Q: Get URL parameter - sharepoint I am trying to extract an ID from my URL and paste it in the sharepoint List into the ID text box, I have tried it like that:
<script type="text/javascript">
function GetQueryStringParams(sParam)
{
    var sPageURL = window.location.search.substring(1);
    var sURLVariables = sPageURL.split('&');

    for (var i = 0; i < sURLVariables.length; i++)
    {
        var sParameterName = sURLVariables[i].split('=');
        if (sParameterName[0] == sParam)
            {
            return sParameterName[1];
            }
    }
}
   document.forms['aspnetForm'].ctl00_m_g_d9f5e4f9_7e05_4a4d_88b7_a6b1dcdda667_ctl00_ctl01_ctl00_ctl00_ctl00_ctl04_ctl00_ctl00_TextField.value=GetQueryStringParams('ID');
</script>

however it does not work, my URL:
http://Lists/Systems%20Survey/NewForm.aspx?Source=http://Lists/Systems%2520Survey/overview.aspx&ID=14-01234

I have put it as a web part xml on my web.
Do you have any idea what I did wrong? :)
thanks for assistance

A: Use the function below as getQueryVariable('source')
function getQueryVariable(variable) {
    var query = window.location.search.substring(1);
    var vars = query.split('&');
    for (var i = 0; i < vars.length; i++) {
        var pair = vars[i].split('=');
        if (decodeURIComponent(pair[0]) == variable) {
            return decodeURIComponent(pair[1]);
        }
    }
    console.log('Query variable %s not found', variable);
}


text:
Q: How to navigate to specific screen in other react fragment during auth flow? Let's say there is a auth flow as such:
state.userToken == null ? (
  <>
    <Stack.Screen name="Onboarding" component={OnboardingScreen} />
    <Stack.Screen name="SignIn" component={SignInScreen} />
    <Stack.Screen name="SignUp" component={SignUpScreen} />
    <Stack.Screen name="ResetPassword" component={ResetPassword} />
  </>
) : (
  <>
    <Stack.Screen name="Home" component={HomeScreen} />
    <Stack.Screen name="Profile" component={ProfileScreen} />   //User logout action
    <Stack.Screen name="ChangePassword" component={ChangePasswordScreen} /> //Navigation link to ResetPassword
  </>
);

Let's say the during change password in ChangePasswordScreen the user forgets the current password and wants to navigate to the ResetPassword screen which is in other react fragment.
Or let's say upon logout from the ProfileScreen, the user should be navigated to the SignIn screen.
Currently it navigates to the first and foremost screen in the navigation stack that is OnboardingScreen upon logout.

A: You could try the example below:
{state.needsOnoarding === false ? (
          <>
            {state.userToken == null ? (
              <>
                <Stack.Screen name="SignIn" component={SignInScreen} />
                <Stack.Screen name="SignUp" component={SignUpScreen} />
                <Stack.Screen name="ResetPassword" component={ResetPassword} />
                <Stack.Screen name="Onboarding" component={OnboardingScreen} />
              </>
            ) : (
              <>
                <Stack.Screen name="Home" component={HomeScreen} />
                <Stack.Screen name="Profile" component={ProfileScreen} />   //User logout action
                <Stack.Screen name="ChangePassword" component={ChangePasswordScreen} /> //Navigation link to ResetPassword
                <Stack.Screen name="ResetPassword" component={ResetPassword} />
              </>
            )}
          </>
        ) : (
            <>
              <Stack.Screen name="Onboarding" component={OnboardingScreen} />
            </>
          )}

You need to store (use something like SQLite, realm (Does not support Hermes at the moment), RocksDB or anything else you already use to store info) if a user did the onboarding flow. If that is done, the onboarding flow won't be showed by default but the sign in screen will. Onboarding is still possible if you have a route for that on the sign in screen.
For your reset password, I think you could add twice the same screen in the differents stacks. But you should also think about your design, would it be logic when you already logged in, but you forgot your current password to show the same reset password screen that probably has an other design than when you are logged in.


text:
Q: Timeout in HTMLCleaner of AsyncTask I using HTMLCleaner in AsyncTask, for parse site. How to set timeout in HTMLCleaner or timeout AsyncTask? How to make a break?

A: you can user Timer class to set time out period.
https://developer.android.com/reference/java/util/Timer.html


text:
Q: Setting up a new separate navigationcontroller in my app? My app runs using a navigationcontroller, but there's a button on the home screen which will take the user to a preferences viewcontroller. I want the preferences to open and use it's own navigation controller, so there won't be a 'back' style button and it'll slide up from the bottom (like a modalviewcontroller). How do i add a separate navigation controller to my preferences screen for this to work?

A: You should be able to create your navigation controller and present it modally - this post is mostly what you might do first.
Remember to account for dismissing the modal view controller with say a Close or Done button in the navigation bar.


text:
Q: create custom component for javafx scene builder I've searched the entire web (metaphorically) to find an explanation on how to create the jar file that can then be imported by the scene builder to add extra, custom components. Currently, I am trying to create a slider with a textField that displays it's value, with a biDirectional link using a NumberStringConverter. I have the classes all setup, but now I need to bundle them in a jar file, and that's the part that doesn't work for me. These are the classes:
FXML:
<fx:root type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml" fx:controller="main.java.valueSlider">
    <Slider fx:id="slider" HBox.hgrow="ALWAYS"/>
    <Label fx:id="label" text="value"/>
</fx:root>

Now I can just import this FXML file and use it as a shortcut to create a slider with a label, but I want there to be a controller involved for the biDirectional link. This is the controller class:
public class valueSlider extends HBox {

    @FXML
    private TextField value;

    @FXML
    private Slider slider;

    private DoubleProperty sliderPos = new SimpleDoubleProperty();
    private DoubleProperty
            sliderMin = new SimpleDoubleProperty(),
            sliderMax = new SimpleDoubleProperty();

    public valueSlider() {
        try {
            FXMLLoader l = new FXMLLoader(getClass().getResource("valueSlider.fxml"));
            l.setController(this);
            l.setRoot(this);
            l.load();
        }
        catch (IOException e) {
            e.printStackTrace();
        }
    }

    @FXML
    private void initialize() {
        slider.minProperty().bindBidirectional(sliderMin);
        slider.maxProperty().bindBidirectional(sliderMax);
        slider.valueProperty().bindBidirectional(sliderPos);
        value.textProperty().bindBidirectional(sliderPos, new NumberStringConverter());
    }

    public double getSliderPos() {
        return sliderPos.get();
    }

    public DoubleProperty sliderPosProperty() {
        return sliderPos;
    }

    public void setSliderPos(double sliderPos) {
        this.sliderPos.set(sliderPos);
    }
}

So the question now is: how do I export these two classes in a jar file and so that I can load it into the scene builder?
Quick question: I made a new FXML file in the same package and tried to use the component like so:
<AnchorPane xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8.0.121" fx:controller="main.java.controller">
    <children>
        <valueSlider sliderPos="75"/>
    </children>
</AnchorPane>

But when I tried to open the scene builder in the IDE (intelliJ IDEA) it said:

Failed to open the file in the Scene Builder

  java.lang.ClassNotFoundException: Unresolved import

  javafx.fxml.LoadException:
  /G:/GitHub/customParts/src/main/resources/test.fxml

But it doesn't provide any more information, but when I remove the valueSlider component it works perfectly fine.
Please let me know if you know how to solve this problem.
Thanks in advance,
Lenardjee


text:
Q: How are implicits useful inside a Play template Play documentation mentions implicit reusable blocks. Can you expand from the one-liner mentioned there and copied below, to show how such blocks would be used in a Play html template?
@implicitFieldConstructor = @{ MyFieldConstructor() }

A: Actually, this idea is expanded in farther part of the Custom Field Constructors documentation where you can find an example related to form construction.
When you create a form in Play framework you can make use of form helpers to simplify creation of reusable inputs. Play contains several built-in helpers and each of them takes a field constructor as an implicit parameter.
Imagine a following form created in a view.
@implicitFieldConstructor = @{ helper.FieldConstructor(myFieldConstructorTemplate.f) }

@helper.form(action = routes.Application.handlePost()) {
  @helper.inputText(userForm("name"))
  @helper.inputText(userForm("surname"))
  @helper.inputText(userForm("login"))
  @helper.inputText(userForm("password"))
}

The inputText apply method takes FieldConstructor as an implicit parameter. As you can see a template implicit is used to provide a value for the apply method without passing it explicitly to each of inputText call. Thanks to implicit parameter the form definition in the view looks more concise and clearer.


text:
Q: MailChimp API V3 Creating Interest (group) I have a web app written in PHP that uses Mailchimp API v3. It was working ok until two days ago. I can't figure out what is going on. When I try to create new interest, I get 500 error, so in my response I don't get interest ID which I use later on. However, the interest gets created, which is weird.
I use the correct ENDPOINT. It's the same one shown in the API Playground. Even when I try to do this in the PLAYGROUND, I get the same error, but the interest (group) gets created.
Endopoint:
"http://".$dc.".api.mailchimp.com/3.0/lists/".$list_id."/interest-categories/".$subgroup_id."/interests"


text:
Q: iPhone IOS device testing on Newer iOS than SDK When doing preliminary research, minimum requirements for IOS development were limited to an Intel Based Mac, with Snow Leopard.  Since then, I have purchased my new (old) Mac, installed the SDK (4.3), and wrote my first App. Unfortunately, the highest SDK that this Mac will run is for iOS 4.3.  My iPhone that I want to test with is iOS 5.x.  I cannot figure out how to set up the provisioning to allow me to install my App on my iPhone.  I have paid my fee, went through the brief (aimed at a later SDK) helper, but my XCode wants me to install an older iOS on my phone to connect.  Does anyone know a way around this?
Thanks in advance,
Sagan

A: Create an ad hoc build, and load the resulting .ipa file onto the device either via iTunes or a url.  Ad hoc builds will allow you to create a built copy of your app in a single packaged file which may be loaded on your device.
There's a ton of references around the web for how to do this, here's one guide for XCode 4:
http://benscheirman.com/2011/06/creating-proper-ipa-files-in-xcode-4
Here's a guide for XCode 3:
http://www.springtiger.co.uk/2010/12/06/creating-a-ipa-file-for-your-application/


text:
Q: How to install TeXLive on Linux in user directory As per the title, I was wondering how to install texlive-full in a user's home directory on a Linux machine (in my case, running Debian 9).
This would be very useful as a full texlive installation takes quite a lot of space (up to 6GB), and my root partition is pretty limited. Also, since it's a personal computer, I wouldn't need to share the installation with any other users.
I searched but only found what I think is a way to make a user-install of custom packages only (see e.g. [1]).
Thank you very much in advance.
[1] https://wiki.debian.org/Latex

A: In this case, the best way is to install upstream TeX Live, in particular the (default) scheme-full (which corresponds to the Debian package texlive-full). Installation of TeX Live is straight-forward as described here. After that you should install a so called equivs package that tells the Debian packaging manager (apt) that you have a locally installed TeX Live available, see here.


text:
Q: Unespected runtime Error when try to send document I have new Lotus Domino Server 8.5.3 FP1 UP1 (Windows 2008 64bit).
I have created an xpages sample copied from help that send mail.
var doc:NotesDocument = database.createDocument();
doc.replaceItemValue("form", "Memo");
doc.replaceItemValue("sendTo", "daniel.recio@slug.es");
doc.replaceItemValue("subject", "hi there!");
doc.replaceItemValue("body", "content here");
doc.send();

But i have Unespected runtime Error
Error while executing JavaScript action expression
Script interpreter error, line=6, col=5: [TypeError] Exception occurred calling method NotesDocument.send() null
▼ Stack Trace
javax.faces.FacesException: Error while executing JavaScript action expression
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:102)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:210)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:96)
    com.ibm.xsp.controller.FacesControllerImpl.execute(FacesControllerImpl.java:250)
I have full uninstalled this server, and reinstall with same error.
In other testing server works, but in this server my lotus designer was 8.5.2 + Ext Lib and now is 8.5.3 FP1 UP1.
can you help me??
Thanks for all

A: The error is likely because the server is unable to actually send the message. Server side, when the server can not route the message, it causes an exception. Make sure your server can successfully route mail messages on its own, then your error will likely go away.

A: Check the ACL and make sure that you (or anonymous if you are testing as anonymous) have access to create documents. My guess is that this is what causes NotesDocument to be null.
Also, have a look at the /domino/workspace/logs/error-log-0.xml file located in the Domino data directory for additional explanation of the error.

A: I would remove the type cast on the first line and try it again. I've seen issues before where the cast causes problems. So, your code should look like this:
 var doc = database.createDocument();
 doc.replaceItemValue("form", "Memo");
 doc.replaceItemValue("sendTo", "daniel.recio@slug.es");
 doc.replaceItemValue("subject", "hi there!");
 doc.replaceItemValue("body", "content here");
 doc.send();

A: I have the exact same code running in my app except I used appendItemValue instead of replaceItemValue and it works fine. I am on 8.5.3 FP1 UP1 also. Not sure what the difference internally would be but it is something to try.

A: Is the code is working ob your local machine (if you open a local replica in your browser)?
Perhaps the server document is corrupted: Try recreate it. This fixed the same issue for one of my customers. Another idea is to recreate the default view in the Database.
EDIT:
And could you please check the Stacktrace? The last block contains perhaps more informations. There should be some lines like these:
    lotus.domino.local.Document.Nsend(Native Method)
    lotus.domino.local.Document.send(Unknown Source)

Please post the NotesException above these lines.


text:
Q: Do all homogeneous spaces have homogeneous compactifications? Let $X$ be a separable metric space which is homogeneous, i.e. for every two points $x,y\in X$ there is a homeomorphism $h$ of $X$ onto itself such that $h(x)=y$.
A compactification of $X$ is a compact metric space which contains a dense homeomorphic copy of $X$.
Does $X$ have a homogeneous compactification?
Examples of homogeneous compactifications include the circle for the real line, the torus for the plane etc.

A: Since you want a connected example:
A surface of infinite genus has no homogeneous compactification.
Indeed first observe a dense locally compact subset has to be open.
So the surface has to be open, and by homogeneity the compactification is a closed surface. But an open subset of a closed surface has (each component of) finite genus.

A: The countable discrete space $\omega$ is a counterexample.
Suppose $Y$ is a homogeneous compactification of $\omega$, with $X \subset Y$ being homeomorphic to $\omega$.  As $Y$ is infinite, it necessarily contains at least one limit point.  So by homogeneity, every point of $Y$ is a limit point of $Y$, including those that are in $X$.  But since $X$ is dense in $Y$, this implies that each point of $X$ is a limit point of $X$.  Thus $X$ is not discrete, a contradiction.


text:
Q: Why when clicking the button on the second time it's not loop over the array from the start? I have this button click method that I call it from onCreate:
public void addListenerOnButton()
    {

        btnClick = (Button) findViewById(R.id.checkipbutton);

        btnClick.setOnClickListener(new OnClickListener()
        {
            byte[] response = null;
            @Override
            public void onClick(View arg0)
            {

                text = (TextView) findViewById(R.id.textView2);

                Thread t = new Thread(new Runnable()
                {
                    @Override
                    public void run()
                    {
                        for (int i = 0; i < ipaddresses.length; i++)

                        {

                                try
                                {
                                    response = Get(ipaddresses[i]);
                                    if (response == null)
                                    {
                                        text.post(new Runnable()
                                        {
                                            @Override
                                            public void run()
                                            {
                                                counter++;
                                                text.setText("Connection Failed: " + ipaddresses[counter]);
                                            }
                                        });
                                    }
                                }
                                catch (Exception e)
                                {
                                    String err = e.toString();
                                }

                                if (response!=null)
                                {

                                    try
                                    {
                                        final String a = new String(response, "UTF-8");
                                        text.post(new Runnable()
                                        {
                                            @Override
                                            public void run()
                                            {
                                                text.setText(a);
                                            }
                                        });

                                        iptouse = ipaddresses[i].substring(0, 26);
                                        connectedtoipsuccess = true;
                                        Logger.getLogger("MainActivity(inside thread)").info(a);
                                    } catch (UnsupportedEncodingException e)
                                    {
                                        e.printStackTrace();
                                        Logger.getLogger("MainActivity(inside thread)").info("encoding exception");
                                    }

                                    Logger.getLogger("MainActivity(inside thread)").info("test1");
                                    break;

                                }
                                else
                                {

                                }
                        }
                        counter = 0;
                    }
                });
                t.start();
            }
        });

    }

For the testing I did that the string array ipaddresses will contain two items of ips that not exist on my server in fact my server is also not working at all and that's only for the test.
When I click the button first time it's making a loop over the array and in both cases it return that response is null.
But then when it finish I click again on the button this time I see that it's doing once response = Get(ipaddresses[i]); and i = 0 and response is null but then instead getting inside the if (response == null) it's first doing the line response = Get(ipaddresses[i]); again now i == 1 only then it's entering the if (response == null) and then inside I see that now the variable counter = 2.
Then my program crash. I guess it's crashing since counter = 2 and the array size is also 2. But after the loop I did counter = 0; so why on the second time I click the button counter = 2?
Second why on the second time I click the button it's not getting inside to the if (response == null) when i == 0?

A: Try this:
private int counter = 0;

public void addListenerOnButton()
    {

        btnClick = (Button) findViewById(R.id.checkipbutton);

        btnClick.setOnClickListener(new OnClickListener()
        {
            byte[] response = null;
            @Override
            public void onClick(View arg0)
            {

                text = (TextView) findViewById(R.id.textView2);

                Thread t = new Thread(new Runnable()
                {
                    @Override
                    public void run()
                    {
                        for (int i = 0; i < ipaddresses.length; i++)
                          counter = i;
                        {

                                try
                                {
                                    response = Get(ipaddresses[counter]);
                                    if (response == null)
                                    {
                                        text.post(new Runnable()
                                        {
                                            @Override
                                            public void run()
                                            {
                                                counter++;
                                                text.setText("Connection Failed: " + ipaddresses[counter]);
                                            }
                                        });
                                    }
                                }
                                catch (Exception e)
                                {
                                    String err = e.toString();
                                }

                                if (response!=null)
                                {

                                    try
                                    {
                                        final String a = new String(response, "UTF-8");
                                        text.post(new Runnable()
                                        {
                                            @Override
                                            public void run()
                                            {
                                                text.setText(a);
                                            }
                                        });

                                        iptouse = ipaddresses[i].substring(0, 26);
                                        connectedtoipsuccess = true;
                                        Logger.getLogger("MainActivity(inside thread)").info(a);
                                    } catch (UnsupportedEncodingException e)
                                    {
                                        e.printStackTrace();
                                        Logger.getLogger("MainActivity(inside thread)").info("encoding exception");
                                    }

                                    Logger.getLogger("MainActivity(inside thread)").info("test1");
                                    break;

                                }
                                else
                                {

                                }
                        }
                        counter = 0;
                    }
                });
                t.start();
            }
        });

    }


text:
Q: Bootstrap twitter modal is slow to load on iPad I'm using the standard modal popup from twitter bootstrap ui team without the fade property: http://getbootstrap.com/javascript/#modals

  <button type="button" class="close" ng-click="cancel()">×</button>

Modal title

      {{item}}

Selected Item: {{selected.item}}

  <button type="button" class="btn btn-default" ng-click="cancel()">Close</button>
  <button type="button" class="btn btn-primary" ng-click="ok()">Save changes</button>

In chrome and safari (with user-agent = ipad) it loads instantly.
On the iPad it takes more than 2.5 seconds to load. Can anyone point me to how I would start looking into this? I commented out all the css fade elements. Not sure where next to look.
Thanks
Edit: it actually works super fast on a blank page. On a page with about 50 ng-repeat elements it's super slow. My guess is that the ng-repeat elements are being redrawn when this loads? I'll investigate this.
Fixed: The problem was a dropdown in each row which caused it to render slowly. Thanks


text:
Q: How to use an array function with an array in code The below is an extract from some code I have produced to automate some of the processes in my job. One element of the macro I produced is to remove any grades out of scope of my report. Since the out of scope grades are always changing, but the in scope grades are set, I decided to try and use an array. I have never used these before and I found some code online to use as a template, the problem is that the code seems to flag all grades as 'false' whether they are in the array or not. I have checked the range and column by changing delete to setting interior colour and this confirms the column and range is correct. I think the issue is that I have not properly linked the function with the code in the sub. Any advice or suggestions will be appreciated:
Sub SortData()
Dim firstrow As Long
Dim LastRow As Integer
Dim arrGrades As Variant, grd As Variant

arrGrades = Array("Range B", "Range C", "Range D Experienced", "Range D", "Range E", "Range E2", "SCS 1", "SCS 2", "SCS 3", "Student")

With Sheets("Active OoD")
    .Select

    firstrow = .UsedRange.Cells(1).Row
    LastRow = .UsedRange.Rows(.UsedRange.Rows.Count).Row

    Set rng = Range("H2", "H" & LastRow)
    With rng
        For i = .Rows.Count To 1 Step -1
           If IsInArray(.Item(i), arrGrades) = False Then
                .EntireRow.Delete
            End If
        Next i
    End With
End With
End Sub

Function colNumeric(ColAlpha As String)
 ColAlpha = UCase(ColAlpha)
 If Len(ColAlpha) = 3 Then
     Col_no = (Asc(Left(ColAlpha, 1)) - 64) * 26 * 26 + _
              ((Asc(Mid(ColAlpha, 2, 1)) - 64) - 1) * 26 + _
              Asc(Right(ColAlpha, 1)) - 64
 ElseIf Len(ColAlpha) = 2 Then
     Col_no = (Asc(Left(ColAlpha, 1)) - 64) * 26 + _
              (Asc(Right(ColAlpha, 1)) - 64)
 Else
     Col_no = Asc(Right(ColAlpha, 1)) - 64
 End If
End Function

Function IsInArray(valToBeFound As Variant, arr As Variant) As Boolean
'Function IsInArray(grd As Variant, arrGrades As Variant) As Boolean
'INPUT: Pass the function a value to search for and an array of values of any data type.
'OUTPUT: True if is in array, false otherwise
Dim element As Variant
On Error GoTo IsInArrayError: 'array is empty
    For Each element In arr
        If element = valToBeFound Then
            IsInArray = True
            Exit Function
        End If
    Next element
Exit Function
IsInArrayError:
On Error GoTo 0
IsInArray = False
End Function

A: This line...
.EntireRow.Delete

...refers to the entire row for the entire range.  So, for example, if Rng refers to the range H2:H10, EntireRow refers to $2:$10, hence everything gets deleted.  Instead, try referring to the current row as follows...
.Item(i).EntireRow.Delete


text:
Q: Add values to the beginning of an array with mongodb? How would I go about atomically adding a value to the beginning of an array in mongo?
Thanks for any guidance.

A: You can't do it directly as per this ticket.
Your only option is for now is to fetch the array, put the element at the beginning and put it in mongo again.

A: someArray.unshift(someValue);

E.g.
> x = [1,2,3]
[1, 2, 3]
> x.unshift(0)
4
> x
[0, 1, 2, 3]


text:
Q: MYSQL Select Statement results must contain two strings I want to select a title from a database that can contain any amount of words in any order so for example i want to select a title : MY ISLAND George Blonde.
and i want to be able to select this title by searching the words but in not particular order example George blonde MY as a search.
I am aware of the queries such as LIKE '%%' AND MATCH AGAINST, i was wondering if anyone had any better ways?
Thanks
James

A:
SELECT TITLE
  FROM   DATABASE_TABLE
  WHERE TITLE REGEXP '^MY'

:  I meant you can use and dig into Regular expressions to do such kind of queries.


text:
Q: Displaying ITime values as.character in ggplot2 I'm plotting a histogram of an ITime variable, and I want the x-axis ticks to be displayed in the as.character value if the x-variables. By default they are just represented as the number of seconds since 0:00. How can I accomplish this?
make.time <- function(x){
        mins <- sample(1:59, 1)
        if(mins < 10) mins <- paste0('0', mins)
        paste0(sample(1:23, 1), ':', mins)
}

data.table(x = sample(1:100, 50, T),
           time = as.ITime(replicate(50, make.time()))) %>%
      ggplot(aes(time)) + geom_histogram()

A: Well, in the example, the make.time() function isn't vecotrized. Here an alterlative implementation
make.time <- function(n=1){
  mins <- sample(1:59, n, replace=T)
  hrs <- sample(1:23, n, replace=T)
  as.ITime(sprintf("%d:%02f", hrs, mins))
}

Then the sample data is
dd <- data.table(x = sample(1:100, 50, T), time = make.time(50))

Then if you want the more traditional date/time axis labeling, you can explicitly convert to POSIXct
ggplot(dd, aes(as.POSIXct(time))) + geom_histogram()


text:
Q: The response to 'GET_LIST' must be like { data : [...] }, but the received data is not an array I am trying to use the ra-data-simple-rest data provider.
import React from 'react';
import { Admin, fetchUtils, Resource } from 'react-admin';
import simpleRestProvider from 'ra-data-simple-rest';
import { PostList } from './Posts';

const dataProvider = simpleRestProvider('http://localhost:8000');

const App = () => (
    <Admin dataProvider={dataProvider}>
        <Resource name="posts" list={PostList} />
    </Admin>
);

export default App;

The react-admin listens to http://localhost:3000/#/posts
Api is running on : http://localhost:8000/posts which returns response as.
$response = new JsonResponse($output);
$response->headers->set('Content-Range', 'posts 0-0/5');
$response->headers->set('Access-Control-Expose-Headers', 'Content-Range');
$response->headers->set('Access-Control-Allow-Origin', '*');
$response->headers->set("Access-Control-Allow-Headers", "Content-Type, Accept, X-Requested-With");

which retuns something as
{
    "data": [
        {
            "id": "1",
            "title": "Hello world",
            "body": "Hello world"
        },
        {
            "id": "2",
            "title": "Hello world",
            "body": "Hello world"
        }
    ],
    "total": 2
}

I am getting an error as

The response to 'GET_LIST' must be like { data : [...] }, but the received data is not an array. The dataProvider is probably wrong for 'GET_LIST'

If the data key is removed as
[
    {
        "id": "1",
        "title": "Hello world",
        "body": "Hello world"
    },
    {
        "id": "2",
        "title": "Hello world",
        "body": "Hello world"
    }
]

is getting the result.

A: Finally I understood this is working as expected by react-admin.
The problem was in the documentation I noticed

which confused me.
Looking more into the https://github.com/marmelab/react-admin/blob/1b6967f3367b13a6675de7047bd9385dc36a8db5/packages/ra-data-simple-rest/src/index.js#L118  I understood the data is rebuild by the provider.

A: I face same issue , after check my API response,I understand there is one field missing in object:
{ "data": [ { "id": "1", "title": "Hello world", "body": "Hello world" }, { "title": "Hello world", "body": "Hello world" } ], "total": 2 }

id is missing in second obj. that's why i face the issue
Any one who face this issue please check all fields in your API response.


text:
Q: PHP-FPM: don't process multiple requests in one moment I had VPS with CentOS 6.4 64bit. There is running Nginx 1.4.4 and PHP-FPM 5.5.6. I'm trying to make long-polling requests. However, if server is already processing one request, he doesn't respond to other. This mean, that if I have script with:
sleep(60);

PHP doesn't process other request. I must wait for 60 seconds. PHP status page is:
pool:                 www
process manager:      dynamic
start time:           26/Nov/2013:22:02:00 +0100
start since:          148
accepted conn:        170
listen queue:         0
max listen queue:     0
listen queue len:     128
idle processes:       1
active processes:     49
total processes:      50
max active processes: 49
max children reached: 1
slow requests:        0

And je conf.d/www.conf:
[www]

listen.allowed_clients = 127.0.0.1

user = apache
group = apache

pm = dynamic

pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 500

pm.status_path = /status

slowlog = /var/log/php-fpm/www-slow.log

php_admin_value[error_log] = /var/log/php-fpm/www-error.log
php_admin_flag[log_errors] = on

php_value[session.save_handler] = files
php_value[session.save_path]    = /var/lib/php/session
php_value[soap.wsdl_cache_dir]  = /var/lib/php/wsdlcache


text:
Q: Stacked Bar chart fixed width bar chart issue - Chartjs I am using chartjs Version: 2.1.4 to creating Chart in MVC C# application. I am using "barPercentage: 0.2"to control the width of Bar charts for fixed width settings. Its working fine in case of Only bar charts, But in case of "stacked bar chart" i'm unable to fix the width of bars. I am using following code to stacked bar chart as:
scales:
    {
                    yAxes: [{
                        stacked: true,
                        ticks: {
                            beginAtZero: true
                        }
                    }],
                    xAxes: [{
                        stacked: true,
                        // Change here
                        barPercentage: 0.2
                    }]
                }

In this case "barpercentage" property is not working. Please suggest me solution if any in "chartjs Version: 2.1.4".
Thanks in advance

A: Replace barPercentage with categoryPercentage and fiddle with its value until you get what you want. When you have a stacked bar chart, you get one bar per category, so I guess this is the reason barPercentage is ignored, while categoryPercentage works fine.


text:
Q: Show Button only in edit mode odoo I have added a button to existing form of purchase order in Purchase order Line Tree. But i want to show that button only in edit mode. I tried:
<button name="adjust_received_qty" string="⇒ Adjust" type="object" class="oe_edit_only"/>

i tried to put class = oe_read_only, but it does not work  in odoo 8.
Thanks,

UPDATE

My requirement is : i want to show the button when user clicks edit button. if i use the suggested approach, i will able to hide button in create view.but it will be visible in form view even in view mode. I want to show the button only in edit view ( when user clicks the edit button )
Please Help,

A: try class=oe_edit_only
it's working fine for me

A: Standard Odoo work must be using python+xml in general, and it's not recommended to use javascript long codes with it because it may cause performance problems.
I've not done this but I think you can achieve this using javascript and add on click event listener on edit button and use show()-hide() function on the fields/button which you want to hide/show so it may help you to solve this issue.
Maybe digging in deep odoo codes may give you another solutions who knows :D


text:
Q: MATLAB save image from GUI using push button I want to save an image from a designated axes. I keep getting You may not have permission to write error. Here is my code for the save as push button:
axes(handles.axes3);
[FileName, PathName] = uiputfile('*bmp', 'Save As');
Name = fullfile(FileName, PathName);
imwrite(handles.TReg, Name, 'bmp');

Also, handles.TReg is a transformed image defined on another function.
I cannot seem to find my error here, any thoughts would be appreciated.
Edit
If I use the code:
axes(handles.axes3);
[FileName, PathName] = uiputfile('*bmp', 'Save As');
Name = fullfile(FileName, PathName);
imwrite(handles.TReg, 'Name', 'bmp');

The file will save as Name.bmp in the proper directory. However I did notice that when I try saving with the original code, the error also reads (I missed this bit sorry):
Can't open file "Image1\C:\Users\Shinobii\Documents\MATLAB\" for writing.

I think the pathname should read like
"C:\Users\Shinobii\Documents\MATLAB\Image1"

could this be the problem?

A: Small mistake:
[FileName, PathName] = uiputfile('*.bmp', 'Save As'); %# <-- dot
Name = fullfile(PathName,FileName);  %# <--- reverse the order of arguments
imwrite(img, Name, 'bmp');

Also its a good idea to check that the user didn't cancel the dialog box:
[FileName, PathName] = uiputfile('*.bmp', 'Save As');
if PathName==0, return; end    %# or display an error message

A: Check the path and the filename and try to save an image by calling imwrite by hand. This probably has nothing to do with the GUI and the button callback but with either the file permissions and/or the path name.

A: Again, it seems like a silly mistake I should have found earlier.
axes(handles.axes3);
[FileName, PathName] = uiputfile('*bmp', 'Save As');
Name = fullfile(PathName, FileName);
imwrite(handles.TReg, Name, 'bmp');

In Name I needed to flip the FileName and PathName.
Thanks for your help!


text:
Q: The error states that createAppConbtainer is undefined and that it isn't a function everyone, I am trying to create simple drawer navigation but it doesn't seem to recognize createAppContainer displaying this error message on the screen "(0, _reactNavigation.createAppContainer) is not a function.
(In '(0, _reactNavigation.createAppContainer)(navigator)', '(0, _reactNavigation.createAppContainer)' is undefined)

<unknown>
    App.js:46:34
loadModuleImplementation
    require.js:331:6
<unknown>
    index.js:7
loadModuleImplementation
    require.js:331:6
guardedLoadModule
    require.js:197:45
global code
    <unknown file>:0
"

I've tried commenting out some lines and searching on Google but no results
   import * as React from 'react';
    import { Text, View, Image, ScrollView, StyleSheet } from 'react-native';
    import {
      createDrawerNavigator,
      createAppContainer,
      DrawerItems,
      SafeAreaView,
    } from 'react-navigation';

    class Home extends React.Component {
      static navigationOptions = {
        title: 'Home',

      };

      render() {
        return (
          <View style={styles.container}>

          </View>
        );
      }
    }

    const navigator = createDrawerNavigator(
      {
        Home,

      },
      {
        // drawerType: 'back',
        // drawerPosition: 'right',
        // drawerWidth: 200,
        // drawerBackgroundColor: 'orange',

      }
    );

    export default createAppContainer(navigator);

    const styles = StyleSheet.create({
      container: {
        flex: 1,
        justifyContent: 'center',
        backgroundColor: '#ecf0f1',
        padding: 8,
      }
    });


text:
Q: AngularJS custom directive for form validation for date inputs I have an app written in Angular 1.5.3.
Here is what I want to do:
I have a user form with 2 date input types. I need to add some custom validation to my form. I want to show an error message to the user when the "expiry date" on the form is greater than the "effective date" on the form.
I believe that I can do this with a custom directive and with ng-messages.
Here is my code snippet:
 <form name="form.mainForm">

        Effective Date:
        <input required type="date" name="effectiveDate" ng-model="effectiveDate" />

          Expiry Date:
          <input
            type="date"
            name="expiryDate"
            ng-model="expiryDate"
            date-greater-than="{{ effectiveDate }}" />

  </form>

app.directive('dateGreaterThan', function () {
      return {
                restrict: 'A',
        require: 'ngModel',
        scope: false,
        link: function (scope, elm, attrs, ctrl) {
            console.log(' here we are ');

            function isValidDateRange(expiryDate, effectiveDate) {

                console.log(expiryDate, effectiveDate);

                if (effectiveDate == null || expiryDate == null ) {
                    return true;
                }

                return effectiveDate > expiryDate;
            }

            function validateDateRange(inputValue) {
                var expiryDate = inputValue;
                var effectiveDate = scope.effectiveDate;
                var isValid = isValidDateRange(expiryDate, effectiveDate);
                console.log("isValid: ", isValid);
                ctrl.$setValidity('dateGreaterThan', isValid);
                return inputValue;
            }

            ctrl.$parsers.unshift(validateDateRange);
            ctrl.$formatters.push(validateDateRange);
            attrs.$observe('dateGreaterThan', function () {
                validateDateRange(ctrl.$viewValue);
            });
      }
      };

I have attempted to solve the problem here but I can't get my directive to work properly. It doesn't seem to calculate the dates when they change and it doesn't integrate with ng-messages.
Here's my attempt:
http://jsfiddle.net/aubz88/q7n3abre/

A: The ngMessages module should be loaded from a cdn. Or installed with a package manager.
The ngMessages module is not included in AngularJS. https://code.angularjs.org/1.4.14/docs/api/ngMessages
var app = angular.module("hello", ['ngMessages']);

Some other points. Use the $validators from the ngModel.
ctrl.$validators.dateGreaterThan = validateDateRange;

Pass the other date with a scope property
 scope: {dateGreaterThan: '='},

There is still a lot to improve I think. I did forgot some AngularJS stuff too.
f.e.: you could trigger the validation again when the first date changes. Check the $validate function of https://code.angularjs.org/1.4.14/docs/api/ng/type/ngModel.NgModelController .
You can check this fiddle for a basic setup: http://jsfiddle.net/hcjLkuzt/


text:
Q: Amd driver (fglrx) for ubuntu 12.04.5LTS Begginer here.
I recently downgraded my Ubuntu to 12.04.5LTS because I wanted dual monitor support but my hd4870 cant support AMD drivers and stuff.
Once I downgraded it and tried to install the drivers something like "one or more tools required for installation are not on this system" or something.
I looked online and tried a few solutions but none of them work like.
I don't remember all that I did but these are among them.
Install headers, 32bit lib.
Log
Check if system has the tools required for installation.
fglrx installation requires that the system have kernel headers.  /lib/modules/3.13.0-61-generic/build/include/linux/version.h cannot be found on this system.
One or more tools required for installation cannot be found on the system. Install the required tools before installing the fglrx driver.
Optionally, run the installer with --force option to install without the tools.
Forcing install will disable AMD hardware acceleration and may make your     system unstable. Not recommended.

A: You can not install fglrx-legacy drivers, because Ubuntu 12.04.5 has too new Xorg stack.
You can downgrade Xorg by running
sudo apt-get install xserver-xorg libgl1-mesa-glx xserver-xorg-input-all

You also need to downgrade kernel too. This can be done with
sudo apt-get install linux-generic

Then you will need to boot with kernel 3.2 using grub menu. After that remove all 3.13 kernels using Synaptic.
Then legacy drivers may be installed by
sudo add-apt-repository ppa:makson96/fglrx
sudo apt-get update
sudo apt-get install fglrx-legacy

After that you will be able to install legacy AMD drivers that support your video card.


text:
Q: ValueError when attempting to parse JSON I use Python 3.4 and have to parse JSON like this
[['A', 'B', 1.3750], ['X', 'Y', 0.7097]]

and I try to use json module, json.loads function to parse it into python object, but I get
ValueError: Expecting value: line 1 column 3 (char 2)

So, what can I do to parse this JSON?

A: Strings in JSON require double quotes, not single quotes.
Changing the input to look like this parses using Python 2.7:
[["A", "B", 1.3750], ["X", "Y", 0.7097]]

Edit: After seeing your comment, you'll need to do some string manipulation (e.g., replacing all single-quotes with double-quotes) on the data received from the web API in order to make it into valid JSON.

A: it is not valid json but valid literal python you can parse it by using ast.literal_eval
import ast
ast.literal_eval("[['A', 'B', 1.3750], ['X', 'Y', 0.7097]]")

A: You have two main problems:

*

*The root item isn't an object

*Strings are delimited with single, rather than double quotes.

If you really want to parse that as JSON, you'll have to do some cleaning first. For example:
import json

json_input = "[['A', 'B', 1.3750], ['X', 'Y', 0.7097]]"

print json.loads('{"value": %s}' % json_input.replace("'", '"') )['value']

The problem with this is it's very fragile, as the source could send something like "'" and it would be converted to ''' which would cause problems. If you go too far down the route of trying to fix this, you are basically writing a parser again.


text:
Q: Creating files in NTFS root folder Introduction:
I'm attempting (and in part succeding) in replacing a number of folders with mounted VHDs in Windows Server 2008 R2, in an attempt to emulate UNIX' bahaviour with bind- or loop-mounts. This has proven to reduce a number of problems related to extreme fragmentation due to a mix of large and small files and the occasional and unpredictable rewriting thereof. (A third party app is doing what it wants, and I don't have the power to stop it.) It also makes it possible to snapshot in a reasonable way without duplicating everything.
The images are obviously regenerated as needed after the app breaks everything. (cp -aT oldmount newmount)
Problem:
If the VHD image contains a NTFS filesystem, Windows requires administrator perms in order to create files (but not folders) in the filesystem root directory. This breaks the app when it attempts to make such files. (No, it is not an option to make the image root one folder up in the hierarchy). Thus far, I've solved this by using vFAT filesystems, which don't do any perm checking, but it would be very nice to have a few of the NTFS features like sparse files and per-file compression.
I have tried fiddling with the perms I could think of, but "Full control" does not entail creating files, as far as I can tell.
TL;DR:
How can I goad Windows Server 2008 R2 into letting users create and write files in the top-level directory of a mounted NTFS file system?
Addition:
The app runs as my normal user ttbomk. I gave my both "Everyone" and my user "Full control" permissions, and set my user as the owner of the mount point (the root folder of the mount). I can create folders and edit existing files with no problems, but when creating a file (right click, new, text document) I get a UAC confirmation dialogue with title "Destination Folder Access Denied", text "You need to confirm this operation.; [name(not path) of mount]; Date created: [Creation date of mount]" and options to Continue, Skip or Cancel. When creating a file manually like this it's just an annoyance. The app just fails, silently for a while then with great spectacle when the unwritten data is needed.

A: Let me subsume what you are doing:
You create VHD files and mount them into empty folders on your system. The problem is that an app tries to write to the root-directory of the mounted VHD file - which fails.
In general you should be able to modify the permissions of the NTFS files structure inside the VHD file. May be the Windows explorer has a problem to distinguish between the NTFS permissions of the empty folder you have mounted the VHD in and the permissions of the NTFS root entry inside the VHD.
I would suggest to mount the VHD as a drive (just for testing) and verify that the permissions inside the VHD are correct. Also check the NTFS permissions on the empty folder when the VHD is not mounted.


text:
Q: Как выделить ключевые понятия из множества описаний на естественном языке? Добрый день.
Подскажите, какие подходы и библиотеки(python) можно использовать для решения такой задачи:
Есть множество спарсеных описаний вакансий. Для каждой вакансии я могу выделить блок с требованиями к соискателям на эту вакансию. Получается по 5-15 строк примерно такого вида:

*

*уверенное знание Python;

*знакомство с Django, Tornado, Twisted;

*понимание и умение применять паттерны проектирования;

*опыт настройки, оптизимации и работы с MySQL, PostgreSQL, MongoDB;

*умение работать не только с ORM, но и с "голым" SQL;

*опыт разработки высоконагруженных проектов;

*любовь к тестированию кода;

*неистовое желание постоянно учиться новому и познавать;

*опыт работы от 2 лет;

*чтение документации и литературы на английском языке;

*коммуникабельность, ответственность, умение работать в команде.

Хочется проанализировать весь этот массив вакансий и получить:

*

*Представление о том, какие знания, навыки, технологии наиболее востребованы

*Какие из них наиболее часто встречаются вместе. Например, Tornado и Twisted часто встречаются в одной строчке. Какие-то слова могут встречаться часто в пределах одной вакансии, но в разных строчках.

Пока единственный подход, который мне приходит в голову - разбить всё на отдельные слова и как-то анализировать, как часто встречаются отдельные слова и их сочетания.
Как именно оценить общую частоту встречаемости, чтобы учитывалось, насколько близко или далеко в тексте расположены слова?
Какие ещё есть подходы?
Как мне решить следующие проблемы:

*

*Отфильтровать союзы, предлоги и общие слова. Почти в каждой вакансии встречаются слова "понимание" чего-то, "опыт" чего-то, "умение" делать что-то. В итоге у таких слов высокая частота встречаемости, но ценности для анализа они не представляют.

*Учитывать, что одно и то же понятие может быть выражено разными словами. Например "тестирование", "написание тестов", "юнит-тесты", "unit testing"

A: Когда я только учился кодить на пайтон, я написал такой скрипт для поиска наиболее встречаемых слов в текстовом файле:
import re

normal_dict = {} # normal dictionary

def readfilelines(filename, dictionary):
    with open (filename, "r") as file:
        lines = file.readlines()
        for line in lines:
            line = line.strip()
            result = re.findall(r'(\b[a-z]+\b)', line, re.IGNORECASE)

            for word in result:
                if word in dictionary.keys():
                    cur_value = dictionary[word] + 1
                    dictionary[word] = cur_value
                else:
                    dictionary[word] = 1

def writefile(filename, dictionary):
    with open (filename, "w") as file:
        for k, v in dictionary:
            s = str(k) + " - " + str(v) + "\n"
            file.write(s)

def sort_dictionary_by_value(dictionary):
    sorted_dict = [(k, dictionary[k]) for k in sorted(dictionary, key=dictionary.get, reverse=True)]
    return sorted_dict

readfilelines("input.txt", normal_dict)
sorted_dict = sort_dictionary_by_value(normal_dict)
writefile("output.txt", sorted_dict)

На вход вы подаёте текстовый файл, на выходе получаете файл с градацией встречаемости слов от большего к меньшему в таком формате:

Слово - N (где N - сколько раз это слово встретилось)

P.S. Каждое слово будет расположено на новой строке
Думаю, можно попробовать изменить регулярку с \w+ на [a-z]+, re.IGNORECASE, чтобы поискать именно фреймворки и технологии, потому что они, обычно, названы латинскими буквами (кроме 1С, хотя может и она латиницей написана).
В любом случае, как вариант записать все требования в один файл, а потом к нему применить этот скрипт с изменённой регуляркой, и в файле с выходом будут фреймворки и технологии от самых популярных до самых невостребованных.
Для теста я скопировал описание нескольких вакансий в файл и прогнал их с помощью скрипта и регулярки r'\b[a-z]+\b', re.IGNORECASE
Вот ссылка на входные и выходные данные


text:
Q: App targeting Fall Creators Update: Installation/run on Windows phone My UWP app uses NavigationView XAML control. It was introduced IMHO in Fall Creators Update. My phone is 1709, build: 10.0.15254.369. So, this app should be installable and runnable on this phone. I set minimal targeting version in Visual Studio to 10.0.16299 (this is the only available version for Fall Creators Update there). But bundled application seems to be not installable (after installation I don't see it in list of installed apps in the phone). When I decrease minimal targeting version - it's installing on the phone but fails on run (I suppose due to used NavigationView control). So, question is: why app is not installing on this phone and how to create "humburder-like menu" in this situation (I have NavigationView control only in my Visual studio).

A: If your app has minversion=16299 it means it can only be installed on operating systems with version 16299 and above. Your device is on OS version 15254, so it can't run apps that target 16299.
Another way to put it: All APIs that have been introduced in SDK 16299 are not supported/available on the latest build for Windows Phone.


text:
Q: Storing Char and using it in if-statements I just wanna know how to save or store a symbol such as +, -, / and * so that i could use it in if-statements to perform whatever symbol the user inputs. I know that my code is wrong so any kind of help will be appreciated.
#include<stdio.h>
#include<stdlib.h>

int main()
{
    int int1, int2, sum;
    char oper;
    printf("Enter Value Here: ");
    scanf("%d", &int1);
    printf("Enter Operation Here: ");
    scanf("%s", &oper);
    printf("Enter Value Here: ");
    scanf("%d", &int2);
    if (oper == "+")
        sum = int1 + int2;
    printf("The sum is %d", sum);

    return 0;
}

A: You could do something like this:
#include<stdio.h>

int main(void){
    int int1, int2, sum=0;
    char op;

    printf("Please enter one of the following Operators [*] [/] [+] [-]   ");
    if((scanf("%c",&op)) != 1){
        printf("Error\n");
    }

    printf("Enter Value Here: ");
    if((scanf("%d", &int1)) != 1){
        printf("Error\n");
    }

    printf("Enter Value Here: ");
    if((scanf("%d", &int2)) != 1){
        printf("Error\n");
    }

    if (op == '/'){
        sum = int1 / int2;
    }else if(op == '*'){
        sum = int1 * int2;
    }else if(op == '+'){
        sum = int1 + int2;
    }else if(op == '*'){
        sum = int1 - int2;
    }

    printf("The sum is %d\n", sum);

    return 0;
}

Edit:
For a better precision you can use float or double, Use double if you are not sure.
#include<stdio.h>

int main(void){
    float int1, int2, sum=0;
    char op;

    printf("Please enter one of the following Operators [*] [/] [+] [-]   ");
    if((scanf("%c",&op)) != 1){
        printf("Error\n");
    }

    printf("Enter Value Here: ");
    if((scanf("%f", &int1)) != 1){
        printf("Error\n");
    }

    printf("Enter Value Here: ");
    if((scanf("%f", &int2)) != 1){
        printf("Error\n");
    }

    if (op == '/'){
        sum = int1 / int2;
    }else if(op == '*'){
        sum = int1 * int2;
    }else if(op == '+'){
        sum = int1 + int2;
    }else if(op == '*'){
        sum = int1 - int2;
    }

    printf("The sum is %.1f\n", sum);

    return 0;
}

A: why don't you use switch case in C:
    char oper;
    float num1,num2;
    printf("Enter operator either + or - or * or / : ");
    scanf("%c",&oper);
    printf("Enter two operands: ");
    scanf("%f%f",&num1,&num2);
    switch(oper) {
        case '+':
            printf("%.1f + %.1f = %.1f",num1, num2, num1+num2);
            break;
        case '-':
            printf("%.1f - %.1f = %.1f",num1, num2, num1-num2);
            break;
        case '*':
            printf("%.1f * %.1f = %.1f",num1, num2, num1*num2);
            break;
        case '/':
            printf("%.1f / %.1f = %.1f",num1, num2, num1/num2);
            break;
        default:
            /* If operator is other than +, -, * or /, error message is shown */
            printf("Error! operator is not correct");
            break;
    }

now using if-else:
 //same code
 scanf("%f%f",&num1,&num2);
            if(oper=='+')
                printf("%.1f + %.1f = %.1f",num1, num2, num1+num2);
            else if(oper=='-')
                printf("%.1f - %.1f = %.1f",num1, num2, num1-num2);
            else if(oper=='*')
                printf("%.1f * %.1f = %.1f",num1, num2, num1*num2);
            else if(oper=='/')
                printf("%.1f / %.1f = %.1f",num1, num2, num1/num2);
            else
                /* If operator is other than +, -, * or /, error message is shown */
                printf("Error! operator is not correct");

A: Most likely you are looking for a function pointers that will let you do some object oriented programming:
// type of functions being binary operations
typedef int (binary_operation*)(int, int);

// now you can define any binary operation on ints

int add_op(int a, int b) { // definition };

int mul_op(int a, int b) { // definition };

// main...
    binary_operation f;
    if (oper == "+")
        f = add_op;
        sum = f(in1,int2);

This way you can store your functions in container, you can pass them to other functions and so on.


text:
Q: Syntax error in sql query for laravel I'm looking for the distance around a particular point.
I have these items in my db with a lat and long.
I want to get all the results around it for a specified radius.
This is how i get it:
    $lat = '51,3';
    $long = '4,3';
    $radius = '5';

    $hamsters = Hamster::select(
           DB::raw("*,
                         ( 6371 * acos( cos( radians(?) ) *
                           cos( radians( lat ) )
                           * cos( radians( long ) - radians(?)
                           ) + sin( radians(?) ) *
                           sin( radians( lat ) ) )
                         ) AS distance"))
           ->having("distance", "<", "?")
           ->orderBy("distance")
           ->setBindings([$lat, $long, $lat,  $radius])
           ->get();

Now it gives me an error:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an
  error in your SQL syntax; check the manual that corresponds to your
  MySQL server version for the right syntax to use near 'long ) -
  radians(?) ) + sin( radians(?) ) * ' at line 4 (SQL: select *, ( 6371
  * acos( cos( radians(51,3) ) * cos( radians( lat ) ) * cos( radians( long ) - radians(4,3) ) + sin( radians(51,3) ) * sin( radians( lat ) )
  ) ) AS distance from hamsters having distance < 5 order by
  distance asc)

Anybody a way to fix this?

A: Long is a reserved keyword in mysql source
You'd have to use backticks (`) around any labels that share the same name as a workaround.


text:
Q: Tab bar for all activity if we navigte to one more activity in (Android) I wrote a simple Android program with 2 tabs. Tab 1 has a button which will open a new window. But I realized that when opening this new window, the Android tab bar will be hidden.
I'd like to always show the Android tab bar when new activity starts ie show tab bar for all activity

A: Are you using the Android Tab Layout? If so, then your activities become children of the TabHost and you have no problem.
If you are displaying your own custom buttons as tabs, then you'll need to display that on both activities. Using an include is a good way to do this. See Creating Reusable UI Components.


text:
Q: How to send an e-mail with inheriting classes in python? import time
class mesagerie(object):
    """mesage for e-mail"""
    def __init__(self, s="Error!"):
        global m
        localtime = time.asctime( time.localtime(time.time()) )

        mesage = localtime, m.group(0)
        try:
            print mesage
        except(),e:
            print s
class email(mesagerie):
    """e-mail"""
    def pas5(self):
        expeditor = 'allex.alexa11@gmail.com'
        receiver = 'nita_alexa11@yahoo.ro'
        username = 'root'
        password = 'skgaming'

        try:
                ob1 = smtplib.SMTP('srv1.cutesouthchat.com:9267')
                ob1.starttls()
                ob1.login(username, password)
                ob1.sendmail(expeditor, receiver, mesage)
                print "Message has been sent"
        except(),e:
                print "Message has not been sent"
                print e

x=mesagerie()
y=email()
y.pas5()

I want to make in the first class a mesage and to send it in the second in a mail to a receiver.
I'm getting this error:
ob1.sendmail(expeditor, receiver, mesage)

NameError: global name 'mesage' is not defined

Class email isn't inheriting class mesagerie with all its attributes?

A: You seem to be confusing functions/methods, attributes, and globals.
Each class has attributes, which are inhertied by subclases. If these attributes are functions, they are called methods.
However, the variable message is not an attribute of the class at all. It is an ordinary local variable in the mesagerie class constructor. Local variables in one function cannot be referenced in another, as you are trying to do. You need to assign message to an attribute.
Corrected code:
class mesagerie(object):
    """message for e-mail"""
    def __init__(self, s="Error!"):
        global m
        localtime = time.asctime( time.localtime(time.time()) )

        message = self.message = localtime, m.group(0)
        try:
            print mesasge
        except(),e:
            print s
class email(mesagerie):
    """e-mail"""
    def pas5(self):
        expeditor = 'allex.alexa11@gmail.com'
        receiver = 'nita_alexa11@yahoo.ro'
        username = 'root'
        password = 'skgaming'
        try:
            ob1 = smtplib.SMTP('srv1.cutesouthchat.com:9267')
            ob1.starttls()
            ob1.login(username, password)
            ob1.sendmail(expeditor, receiver, self.message)
            print "Message has been sent"
    except(),e:
            print "Message has not been sent"
            print e


text:
Q: Prove G is a group given properties of G Let $G$ be a set with the operation $*$ such that:

*

*$G$ is closed with respect to $*$

*$*$ is asociative

*There exists an element $e \in G$ such that $e*x=x$ for all $x\in G$

*Given $x \in G$, there exists $y\in G$ such that $y*x=e$
The axioms of closure and asociativity are satisfied by the hypotesis 1 and 2.
Now it is left to prove that $x*e=x$ and $x*y=e$ to conclude $G$ is a group. I've made some sustitutions to try to get the commutative property on those produts but I don't get a way to achieve it. These set of suppositions are then stronger than the group definition as they can be deduced from these ones right?
What shoud I compute to prove $G$ is a group?

A: To prove $x*e = x$:
From 4 we have there is a $y$ such that $y*x = e$. We also have from 4 there is a $z$ such that $z*y = e$. Thus $z*e = z*(y*x) = (z*y)*x = e*x = x$. Thus $x = z*e$. We then see that $x*e = (z*e)*e = z*(e*e) = z*e = x$.
To prove $x*y = e$:
By the above we have $x = z*e$ where $z*y = e$. Thus $x*y = (z*e)*y = z*(e*y) = z*y = e$.


text:
Q: How to use curl command with data from a variable I'm trying to make a script that execute a curl command to create a Rabbit Exchange with Rest API.
If I use --data with the definition like the follow:
HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -u $USR:$PWD --header "Content-Type: application/json" --request PUT  --data '{"type": "topic","auto_delete": false,"durable": true,"internal": false,"arguments": {}}'  $URL_GENERATE_EXCHANGE)

It runs
But I want to pass the data from a variable like this
EXCHANGE_DEFINITION='{"type": "topic","auto_delete": false,"durable": true,"internal": false,"arguments": {}}'

HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -u $USR:$PWD --header "Content-Type: application/json" --request PUT  --data  $EXCHANGE_DEFINITION $URL_GENERATE_EXCHANGE)

but It doesn't work...and I don't understand why....Can anyone help me please?
Thank you