text:
Q: Command line script to create user passwd I'm very new to Linux and PHP so forgive me if this is a dumb question.
I need to create a PHP command line script that will add a user to the system, to be used by the ftp server. I have it set up at this point that it creates the account just fine. The problem I'm facing is that even though I pass through the password when I create the account ie. -p $password, I still have to run the "passwd" command on the account and set the password manually before proftpd will let that account log in.
For the life of me I can't figure out how to run the passwd command from within the php. Obviously I can run it, but I have no idea how to programatically enter the password when prompted.
Just for more info, this is the command I run when creating the account. $username and $ password are passed into the function.
shell_exec("useradd ".$username." -g ftpusers -m -p ".$password." -d
/home/ftp/".$username."/ -s /bin/false);

now im looking to add something along the lines of:
shell_exec("passwd ".$username);
echo $password;
echo $password;

Just for the record, this last example is just for illustration.
Any help appreciated.

A: You need to use the hashed password using useradd, e.g.
$password = escapeshellarg( crypt('password') );
shell_exec("useradd username -p $password");

-p, --password PASSWORD
      The encrypted password, as returned by crypt(3). The default is
  to disable the account.

(man useradd)

A: Can't guarantee it'll work, but on first thoughts, my solution would be:-
<?php
$fp = popen("/usr/bin/passwd " . $user, "w");

fwrite($fp, $password . "\n");
fwrite($fp, $password . "\n");

fclose($fp);

A: $connection = ssh2_connect('localhost', 22);
if (ssh2_auth_password($connection, 'root', '')) {
    $username = '';
    $password = '';
    ssh2_exec($connection, "useradd $username -m -p $password -d /home/$username/ -s /bin/false");
} else {
    die('Authentication Failed...');
}


text:
Q: Wordpress Header Width (Genesis, Foodie Pro) http://www.livingthelighterlife.com/
Having issues getting the header to look the way I want it to. I'd like the section in blue to be full width (as it currently is) but I want the actual header (the logo and navigation) to be the same width as the rest of the content (1040px) - hope this makes sense.
I was told to at a wrap around the "site-header" but I am new to Wordpress and am not sure how to do this.
Not sure what coding I need to provide, but here's some to start:

/*
Site Header
---------------------------------------------------------------------------------------------------- */

.foodie-pro .site-header {
 background-color: #0099CC !important;
 margin-left: auto;
 margin-right: auto;
}

.genesis-header {
 background-color: #000000 !important;
}

.foodie-pro .site-header {

 background-position: left;
 margin-top: 30px;
}

.title-area {
 width: 450px;
}

.header-image .title-area {
 padding: 0;
}

.title-area h1 {
 margin: 0 auto;
}
.title-area p {
 margin: 0;
}

/* Full width header, no widgets */

.header-full-width .title-area,
.header-full-width .site-title {
 width: 100%;
}

.header-image .site-description,
.header-image .site-title a {
 display: block;
 text-indent: -9999px;
}

/* Logo, hide text */

.header-image .site-header {
 background-size: 450px 177px !important;
}

.header-image .site-title a {
 float: none;
 min-height: 177px;
 width: 450px;
}

/*
Site Navigation
----------------------------------------------------------------------------- */

/* Main Navigation
--------------------------------------------- */

.genesis-nav-menu .menu-item {
 display: inline-block;
}

.genesis-nav-menu {
 margin-top: -118px;
}

.genesis-nav-menu:before {
 content: "BROWSE RECIPES:";
 color: #f68364;
 font-size: 11.5px;
 letter-spacing: 1px;
 margin-right: 5px;
}

.genesis-nav-menu {
 text-align: right;
 font-size: 11.5px;
 letter-spacing: 1px;
}

.genesis-nav-menu a {
 display: inline-block;
 position: relative;
 padding-left: 5px;
 padding-right: 8px;
 color: #636367;
 text-decoration: none;
 text-transform: uppercase;
 transition: all 0s ease !important;
}

.genesis-nav-menu a:hover {
 color: #6dbea2;
}

li#menu-item-150 a {
 pointer-events: none;
 cursor: default;
 padding-left: 0px;
 padding-right: 3px;
 color: #f68364;
}

.menu-item:last-child a {
 padding-right: 0px;
}

li#menu-item-119:after, li#menu-item-120:after, li#menu-item-121:after {
 display: inline-block;
 position: absolute;
 top: 0;
 content: "/";
 color: #b9b9b9;
}

/* Sub Navigation
--------------------------------------------- */

.menu-primary li{
 position: relative;
}

.genesis-nav-menu .menu-item:hover > .sub-menu,
.genesis-nav-menu .menu-item:focus > .sub-menu,
.genesis-nav-menu .menu-item.menu-item-hover > .sub-menu  {
 left: 50%;
 transform: translateX(-50%);
}

.genesis-nav-menu .sub-menu:before {
 content: '';
 display: block;
 margin: auto;
 width: 0;
 height: 0;
 border-left: 5px solid transparent;
 border-right: 5px solid transparent;
 border-bottom: 5px solid #7b7c80;
}

.genesis-nav-menu .sub-menu {
 position: absolute;
 display: block;
 z-index: 2000;
 left: -9999px;
 width: 100px;
}

.genesis-nav-menu .sub-menu a {
 width: 100px;
 padding: 10px;
 background-color: #7b7c80;
 color: #ffffff;
 font-size: 10px;
 text-align: center;
}

.genesis-nav-menu .sub-menu a:hover {
 background-color: #f78f73;
}

Living the Lighter Life

Eat Clean. Train Hard. Live Lighter.

Main navigation

Breakfast

Recipes

Lunch

Recipes NEW

Dinner

Coming Soon

Other

Desserts

Snacks

Sides

Beverages

•

Nutrition & Fitness

Philosophy

Workouts

A: All you need to do is wrap your header and nav in a
 with the same styling. Or as another option, I would probably just put your navigation insider your header though, so that the structure is something like this:

Stuff

    Navigation Stuff

and then just have your header styled in the same way as your content container:
.header {
    width: 1040px;
    display: block;
    margin: 0 auto;
 }

A: You will need to define the following to achieve what you want:
.site-header{
 max-width: 1040px;
}

#menu-main{
 max-width: 1040px;
 margin-left: auto;
 margin-right: auto;
 padding-right: 2em;
}

And to fix the hamburger menu on small devices change the top property value to 35px;
@media screen and (max-width: 1039px){
 button#responsive-menu-button {
    width: 55px;
    height: 55px;
    position: absolute;
    top: 35px; /*Changed this*/
    right: 5%;
 }
}

redpajama_set_name: RedPajamaStackExchange


text:
Q: GSON deserialization of a wrapped list of objects I am trying to de-serialize a list of objects from a JSON response. The JSON array has a key, which is causing issues with using GSON to de-serialize it.
I have about 20 objects similar to this.
public class Device extends Entity {
  String device_id;
  String device_type;
  String device_push_id;
}

For most there is an API method which returns a list of objects. The returned JSON looks like this. Because of other clients, changing the format of the JSON is not a reasonable option at this point.
{
   "devices":[
      {
         "id":"Y3mK5Kvy",
         "device_id":"did_e3be5",
         "device_type":"ios"
      },
      {
         "id":"6ZvpDPvX",
         "device_id":"did_84fdd",
         "device_type":"android"
      }
   ]
}

In order to parse this type of response I'm currently using a mix of org.json methods and Gson.
JSONArray jsonResponse = new JSONObject(response).getJSONArray("devices");

Type deviceListType = new TypeToken<List<Device>>() {}.getType();
ArrayList<Device> devices = gson.fromJson(jsonResponse.toString(), deviceListType);

I'm looking for a cleaner method of doing the deserialization as I'd like to use Retrofit. The answer in Get nested JSON object with GSON using retrofit is close to what I need, but doesn't handle Lists. I've copied the generic version of the answer here:
public class RestDeserializer<T> implements JsonDeserializer<T> {
  private Class<T> mClass;
  private String mKey;

  public RestDeserializer(Class<T> targetClass, String key) {
    mClass = targetClass;
    mKey = key;
  }

  @Override
  public T deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext)
    throws JsonParseException {

    JsonElement value = jsonElement.getAsJsonObject().get(mKey);
    if (value != null) {
      return new Gson().fromJson(value, mClass);
    } else {
      return new Gson().fromJson(jsonElement, mClass);
    }
  }
}

My goal is to have this call "just work".
@GET("/api/v1/protected/devices")
public void getDevices(Callback<List<Device>> callback);

A: Use the below class
public class Devices {

@Expose
private List<Device> devices = new ArrayList<Device>();

/**
*
* @return
* The devices
*/
public List<Device> getDevices() {
return devices;
}

/**
*
* @param devices
* The devices
*/
public void setDevices(List<Device> devices) {
this.devices = devices;
}

}

Device class
public class Device extends Entity {
  @Expose
  String id;
   @Expose
  String device_id;
  @Expose
  String device_type;
}

or
public class Device extends Entity {
  @Expose @SerializedName("id")
  String deviceId;
   @Expose @SerializedName("device_id")
  String devicePushId;
  @Expose @SerializedName("device_type")
  String deviceType;
}

update retrofit method to
@GET("/api/v1/protected/devices")
public void getDevices(Callback<Devices> callback);

devices.getDevices() //call inside callback method will give you the list

Also, you wont require the custom deserializer


text:
Q: Checkboxes get disabled by theirself i have a problem in the application that i'm currently trying to make. In checkboxs' properties it says it's Enabled = True but after i debug and open it they all are disabled. Why did this happen? Any helps?

A: I think the problem here may be one of terminology. You're accessing the 'Enabled' property, but I think you may want the 'Checked' property.
The Enabled property is set by you, and controls whether the user can click on the checkbox or not. The Checked property is set either by you or by the user, and it changes whenever the user clicks on the checkbox.
Here's a picture of four checkboxes:

*

*Check Box One is Enabled, and not Checked.

*Check Box Two is Enabled, and Checked.

*Check Box Three is not Enabled, and not Checked.

*Check Box Four is not Enabled, and Checked.


text:
Q: Why does gdal2tiles sometimes produce a tileset where the image does not fill the tiles? I'm using gdal2tiles on a vrt that I've warped from Mercator to QSC. I'm using the 'raster' profile. The resulting tiles look correct but there transparent strips on the upper and right edges of the right-most and top-most tiles:

The above image shows tiles 1,1,0 and 1,1,1
My call to gdal2tiles looks like this:
gdal2tiles.py --profile=raster -z 0-4 face.tif outFilePath

A: This is because gdal2tiles makes tiles of 256x256 pixels. If your original picture isn't a multiple of 256 is width and height, you end up with some empty space on the top and right.


text:
Q: Comparing UTC with local in Snowflake I have a date column called actual_cargo_ready_date_local, it is of type TIMESTAMP_NTZ(9).
Next we're trying to compare a column with UTC values, say the column name is booked_at.
Is it correct to do the comparison as follows;
booked_at > actual_cargo_ready_date_local::timestamp_ntz
Essentially, my question is can we compare a column with values in UTC with timestamp column with values in local timezone.
And is it true that using the command actual_cargo_ready_date_local::timestamp_ntz coverts the actual_cargo_ready_date_local into UTC.
Thanks

A: TLDR: Use CONVERT_TIMEZONE.
If actual_cargo_ready_date_local and booked_at are both of type TIMESTAMP_NTZ, there is no notion of the "origin" timezone here at all, so the system can not automatically make the comparisons right.
Casting actual_cargo_ready_date_local::timestamp_ntz does not have any effect, as the datatype doesn't change.
However, if you know that actual_cargo_ready_date_local is in some timezone, let's say America/New_York, and booked_at is in UTC, you can use CONVERT_TIMEZONE to convert the times into UTC:
booked_at > CONVERT_TIMEZONE(actual_cargo_ready_date_local, 'America/New_York', 'UTC')


text:
Q: Scraping Options Data from Google Finance using R I recently saw a function that will scrape Options Data from Google Finance
It works fine, but I am trying to use the function to call 20 different stocks (although some of them do not have options data) and save them as a list....
I have modified the getOptionQuote function to fit my needs:
Functions provided from the site above:
# installs RCurl and jsonlite packages. will prompt you to select mirror for download
install.packages("RCurl");library("RCurl")
install.packages("jsonlite");library("jsonlite")
# ******************************************************************

getOC2 <- function(symbol){
  output = list()
  url = paste('http://www.google.com/finance/option_chain?q=', symbol, '&output=json', sep = "")
  x = getURL(url)
  fix = fixJSON(x)
  json = fromJSON(fix)
  numExp = dim(json$expirations)[1]
if(length(numExp)!= 0){
    for(i in 1:numExp){
    # download each expirations data
    y = json$expirations[i,]$y
    m = json$expirations[i,]$m
    d = json$expirations[i,]$d
    expName = paste(y, m, d, sep = "_")
    if (i > 1){
      url = paste('http://www.google.com/finance/option_chain?q=', symbol, '&output=json&expy=', y, '&expm=', m, '&expd=', d, sep = "")
      json = fromJSON(fixJSON(getURL(url)))
    }
    output[[paste(expName, "calls", sep = "_")]] = json$calls
    output[[paste(expName, "puts", sep = "_")]] = json$puts
  }}
  assign(paste(symbol),do.call(rbind,output))
}

fixJSON <- function(json_str){
  stuff = c('cid','cp','s','cs','vol','expiry','underlying_id','underlying_price',
            'p','c','oi','e','b','strike','a','name','puts','calls','expirations',
            'y','m','d')

  for(i in 1:length(stuff)){
    replacement1 = paste(',"', stuff[i], '":', sep = "")
    replacement2 = paste('\\{"', stuff[i], '":', sep = "")
    regex1 = paste(',', stuff[i], ':', sep = "")
    regex2 = paste('\\{', stuff[i], ':', sep = "")
    json_str = gsub(regex1, replacement1, json_str)
    json_str = gsub(regex2, replacement2, json_str)
  }
  return(json_str)
}

I have basically added the if(length(numExp)!= 0){ to accomodate for stocks that do not have options chains....
Here is what I use to call the 20 stocks:
LIST <- c("AAMC", "AAU", "ACU", "ACY", "ADGE", "ADK", "AE", "AIII", "AINC",
"AIRI", "AKG", "ALN", "ALTV", "AMCO", "AMPE", "AMS", "APP", "APT",
"APTS", "ASM")

library("plyr")

# USE PARALLEL COMPUTING FOR FASTER PROCESS
registerDoParallel(detectCores())

system.time(
  OC <- llply(.data=as.list(LIST), .fun=function(x) {
    tmp <- try(getOC2(x))
    if (!inherits(tmp, 'try-error')) tmp
  }, .parallel = TRUE, .paropts=list(c(.packages=(all.available=T))))
)

#  user  system elapsed
#  0.008   0.001   0.097

I get no errors but OC should have a length of 20, however it only has a length on 1 and produces: list(NULL)
SESSION INFO:
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.10.5 (Yosemite)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
 [1] stringr_1.0.0    plyr_1.8.3       doMC_1.3.3       doParallel_1.0.8 iterators_1.0.7  foreach_1.4.2    pbapply_1.1-1    jsonlite_0.9.17
 [9] RCurl_1.95-4.7   bitops_1.0-6

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.0                   lattice_0.20-33               codetools_0.2-14              zoo_1.7-12
 [5] grid_3.2.2                    magrittr_1.5                  PerformanceAnalytics_1.4.3541 stringi_0.5-5
 [9] PortfolioAnalytics_1.0.3636   xts_0.9-7                     blotter_0.8.19                tools_3.2.2
[13] compiler_3.2.2                quantstrat_0.8.2


text:
Q: TypeError: 'NoneType' object does not support item assignment I am trying to parse a GraphMl file  with the following Code
And i am getting the following error.
Would you please help me in solving this?

A: Note: it's the first time that I encounter pygraphml.
The problem seems to be a logical error in your graph definition file (test.graphml). On top of that pygraphml2.0, doesn't seem to handle well such errors:
As pointed out, the error: TypeError: 'NoneType' object does not support item assignment, comes from graphml_parser.py line 114:
e[attr.getAttribute("key")] = attr.firstChild.data

e is/should be an object of type pygraphml.edge.Edge, and is initialized in the same file at line 110:
e = g.add_edge_by_label(source, dest)

the problem is that e is None, and hence the error. g (that instantiates e) is an object of type pygraphml.graph.Graph. Going to graph.py, add_edge_by_label is defined at line 147:
def add_edge_by_label(self, label1, label2):
    """
    """

    n1 = None
    n2 = None

    for n in self._nodes:
        if n['label'] == label1:
            n1 = n
        if n['label'] == label2:
            n2 = n

    if n1 and n2:
        return self.add_edge(n1, n2)
    else:
        return

So, you're hitting the last return statement, meaning that in test.graphml you have (at least) one edge that has one label (or maybe both), that doesn't belong to any of the graph's nodes.
Obviously there's a problem (I consider it a bug) with pygraphml, if Graph.add_edge_by_label can return None, the None test should be performed GraphMLParser.parse (possibly elsewhere as well).
HTH (if it doesn't, you could send me the graph file to have a look at it).


text:
Q: Which AWS service can I use to put SSL encryption in front of an instance in my VPN? I have instance in VPN on which some external consultants are working on. I need expose the app they are developing to the internet but I don't want them to have access to the private key of our SSL cert.
I am thinking I can put the SSL cert into ACM and then use some AWS component in front of the instance to handle the client connections and TLS encryption. I believe that an application load balancer can do this  - will this work and is the best and cheapest option? I don't actually need load balancing just yet but may do in the future.

A: Yes load balancer is one of the option.
Another choice is using a CDN, CloudFront for the SSL, you simply set the origin to the EC2 instance.
Depending on your use case you need to consider what is the right caching policy (if applicable) though.
CloudFront charge by bandwidth, while Load Balancer charge by hour, so you need to consider the type of workload as well.


text:
Q: How to invoke/start rake task along with rails server Usually, I'll do some rake task to generate some files after starting the rails server. Instead of doing this repeatedly is there any option to patch/hook 'rails s' command to execute/invoke rake task?

A: Instead of patching, just wrap it. Create a new script file that will perform what you have to perform, then starts the rails server.
When you have to start the server, start your file instead of calling the Rails server directly.

A: Writing a script to create the files you need is one way to achieve your desired outcome. Maybe more portable or deployment-friendly way could be
http://guides.rubyonrails.org/configuring.html#running-code-before-rails


text:
Q: Slice array of tuples by its elements For example, I have an array of tuples.
l=[(456,33,1),
   (556,22,1),
   (123,33,2),
   (557,32,2),
   (435,21,2)]

I want make the arrays of lists by the last element in each tuple, so that
l=[[(456,33),
   (556,22)],
  [(123,33),
   (557,32),
   (435,21)]]

How could I do that? Is there any elegant way?

A: l = [(456, 33, 1), (556, 22, 1), (123, 33, 2), (557, 32, 2), (435, 21, 2)]

out = {}
for v in l:
    out.setdefault(v[-1], []).append(v[:-1])

out = list(out.values())
print(out)

Prints:
[[(456, 33), (556, 22)],
 [(123, 33), (557, 32), (435, 21)]]

A: Another way of doing this would be with itertools.groupby.
from itertools import groupby
from operator import itemgetter

res = [[x[:-1] for x in g] for _, g in groupby(sorted(l, key=itemgetter(2)), itemgetter(2))]

which produces the desired:
[[(456, 33), (556, 22)], [(123, 33), (557, 32), (435, 21)]]

Note that if you can guarantee that the original list l is sorted by the 3rd item in the tuples, you can replace sorted(l, key=itemgetter(2)) with just l.

A: An alternative attempt is using this:
l=[(456,33,1),
   (556,22,1),
   (123,33,2),
   (557,32,2),
   (435,21,2)]

dict_ = {}
for v in l:
  val1, val2, id_ = v
  dict_[id_] = [[val1, val2]] if id_ not in dict_ else dict_[id_] + [[val1, val2]]

l = [dict_[x] for x in dict_]


text:
Q: pgfplots: annotating some line segment outside the grid on the right or upper borders I have the following plot for which I would rather prefer to display the marks of the 3 line segments outside the grid:
. the 1 and 3 should be to the right of the right border, close to the intersection of the corresponding grey lines with the vertical rightmost border of the grid.
. the 2 should be on top of the upper border close to the intersection of the corresponding grey line with the horizontal upper border of the grid.
I would eventually prefer a solution that avoids adding something in the preamble.
\documentclass[a4paper]{article}
\usepackage{pgfplots}
\usepackage{tikz}
\usetikzlibrary{plotmarks}
\begin{document}

\begin{tikzpicture}[scale=0.7]
\begin{scope}
\begin{axis}[axis equal image=true,xlabel={x},
ylabel={y},
title={sv=12},
xtick distance=2,
ytick distance=2,
minor tick num=1,
grid=both,grid style={line width=.1pt, draw=gray!10},
major grid style={line width=.2pt,draw=gray!20},
xmin=-1,xmax=4,
ymin=-1,ymax=4]
\addplot[green!20,only marks]
    coordinates {(0, 0)(0, 1)(0, 2)(0, 3)(1, 0)(2, 0)(3, 0)};
\addplot[green!50,only marks]
    coordinates {(1, 1)(1, 2)(2, 1)};
\addplot[green!20]
    coordinates {(0, 0)(3, 0)(0, 3)(0, 0)(0, 0)};
\draw[fill=green,opacity=0.1] (axis cs:-1,1.6666666666666667) -- (axis cs:4,3.3333333333333335) -- (axis cs:4,10) -- (axis cs:-1,10) -- cycle;
\addplot[black!20,thick]
    coordinates { (-1, 1.6666666666666667) (4, 3.3333333333333335)};
\node[below left,circle,draw=black!20,fill=black!10] () at (axis cs:4,3.3333333333333335) {\scriptsize 1};
\addplot[black!20,thick]
    coordinates {(1.6666666666666667, -1) (3.3333333333333335, 4)};
\node[below left,circle,draw=black!20,fill=black!10] () at (axis cs:3.3333333333333335,4) {\scriptsize 2};
\draw[fill=green,opacity=0.1] (axis cs:-1,4.333333333333333) -- (axis cs:4,-0.6666666666666666) -- (axis cs:4,13) -- (axis cs:-1,13) -- cycle;
\addplot[black!20,thick]
    coordinates {(-1, 4.333333333333333)(4, -0.6666666666666666)};
\node[below left,circle,draw=black!20,fill=black!10] () at (axis cs:4,-0.6666666666666666) {\scriptsize 3};
\end{axis}
\end{scope}
\end{tikzpicture}
\end{document}

A: One way to achieve this is to use extra descriptions.
\documentclass[a4paper]{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usetikzlibrary{plotmarks}
\begin{document}

\begin{tikzpicture}[scale=0.7]
\begin{scope}
\begin{axis}[axis equal image=true,xlabel={x},
ylabel={y},
title={sv=12},
xtick distance=2,
ytick distance=2,
minor tick num=1,
grid=both,grid style={line width=.1pt, draw=gray!10},
major grid style={line width=.2pt,draw=gray!20},
xmin=-1,xmax=4,
ymin=-1,ymax=4,
extra description/.code={
\coordinate (tr) at (1.01,1.01);
\node[anchor=west,circle,fill=gray!20] (description1) at (c1-|tr) {$1$};
\node[anchor=south,circle,fill=gray!20] (description2) at (c2|-tr) {$2$};
\node[anchor=west,circle,fill=gray!20] (description3) at (c3-|tr) {$3$};
}]
\addplot[green!20,only marks]
    coordinates {(0, 0)(0, 1)(0, 2)(0, 3)(1, 0)(2, 0)(3, 0)};
\addplot[green!50,only marks]
    coordinates {(1, 1)(1, 2)(2, 1)};
\addplot[green!20]
    coordinates {(0, 0)(3, 0)(0, 3)(0, 0)(0, 0)};
\draw[fill=green,opacity=0.1] (axis cs:-1,1.6666666666666667) -- (axis cs:4,3.3333333333333335) -- (axis cs:4,10) -- (axis cs:-1,10) -- cycle;
\addplot[black!20,thick]
    coordinates { (-1, 1.6666666666666667) (4, 3.3333333333333335)};
%\node[below left,circle,draw=black!20,fill=black!10] () at (axis cs:4,3.3333333333333335) {\scriptsize 1};
\coordinate (c1) at (axis cs:4,3.3333333333333335);
\addplot[black!20,thick]
    coordinates {(1.6666666666666667, -1) (3.3333333333333335, 4)};
%\node[below left,circle,draw=black!20,fill=black!10] () at (axis cs:3.3333333333333335,4) {\scriptsize 2};
\coordinate (c2) at (axis cs:3.3333333333333335,4);
\draw[fill=green,opacity=0.1] (axis cs:-1,4.333333333333333) -- (axis cs:4,-0.6666666666666666) -- (axis cs:4,13) -- (axis cs:-1,13) -- cycle;
\addplot[black!20,thick]
    coordinates {(-1, 4.333333333333333)(4, -0.6666666666666666)};
%\node[below left,circle,draw=black!20,fill=black!10] () at (axis cs:4,-0.6666666666666666) {\scriptsize 3};
\coordinate (c3) at (axis cs:4,-0.6666666666666666);
\end{axis}
\end{scope}
\end{tikzpicture}
\end{document}


text:
Q: Material ui override default styling? I have a react material UI project that uses the AccordionSummary component.  I want to change the default colour of this component.  I've tried to do this like so
import { createTheme } from '@mui/material';

export const theme = createTheme({
  overrides: {
    MuiAccordionSummary: {
        root: {
          backgroundColor: 'rgba(255, 0, 0, 0.4)'
        }
    }
  }
});

And then applying the theme to the root:
import { ThemeProvider } from '@material-ui/core/styles';
import { theme } from '@utils/theme';

function MyApp({ Component, pageProps }) {
  return (
    <>
      <ThemeProvider theme={theme}>
      <Header />
      <Component {...pageProps} />
      </ThemeProvider>
    </>
  );
}

export default MyApp;

I'm also using nextjs.  But I can't seem to change the colour.  Any help appreciated!

A: This is how I would do it:
import { createTheme } from "@mui/material/styles";

let theme = createTheme({
  components: {
    MuiCssBaseline: {
      styleOverrides: {
        root : {
          backgroundColor: 'rgba(255, 0, 0, 0.4)';
        };
      },
    }
}});

I think you are missing the styleOverrides key.

A: import { withStyles } from '@material-ui/core/styles';
import { ExpandMore } from '@material-ui/icons';

import MuiAccordion from '@material-ui/core/Accordion';
import MuiAccordionSummary from '@material-ui/core/AccordionSummary';
import MuiAccordionDetails from '@material-ui/core/AccordionDetails';

import { AccordionActions, Button, Divider } from '@material-ui/core';

const Accordion = withStyles({
  root: {
    border: '1px solid rgba(0, 0, 0, .125)',
    boxShadow: 'none',
    borderRadius: '30px 0px 30px 0',
    '&:not(:last-child)': {
      borderBottom: 0,
    },
    '&:before': {
      display: 'none',
    },
    '&$expanded': {
      margin: 'auto',
    },
  },
  expanded: {},
})(MuiAccordion);

const AccordionSummary = withStyles({
  root: {
    backgroundColor: '#21CFFF',
    borderBottom: '1px solid #12738E',
    marginBottom: -1,
    color: '#666666',
    borderRadius: '30px 0px 30px 0',
    minHeight: 56,
    '&$expanded': {
      minHeight: 56,
    },
  },
  content: {
    '&$expanded': {
      margin: '12px 0',
    },
  },
  expanded: {},
})(MuiAccordionSummary);

const AccordionDetails = withStyles((theme) => ({
  root: {
    padding: theme.spacing(2),
  },
}))(MuiAccordionDetails);

A: file theme.js
import { createTheme } from '@mui/material/styles';

const theme = createTheme({
  palette: {
    primary: {
      main: '#009BDF',
    },
    secondary: {
      main: '#14568D',
    },
    error: {
      main: '#FF0000',
    },
  },
  typography: {
    fontFamily: 'Helvetica, Arial, sans-serif',
  },
  components: {
    MuiAccordion: {
      styleOverrides: {
        root: {
          marginBottom: '5px',
          borderRadius: '0.6rem',
          boxShadow: 'none',
        },
      },
    },
    MuiAccordionSummary: {
      styleOverrides: {
        root: {
          background: '#14568D',
          borderRadius: '4px',
          content: {
            margin: '0px',
          },
        },
      },
    },
    MuiAccordionDetails: {
      styleOverrides: {
        root: {
          background: '#DEF1F9',
          borderBottomLeftRadius: '4px',
          borderBottomRightRadius: '4px',
        },
      },
    },
  },
});

dot forget to wrap your app.js or index.js file
index.js
import React from 'react';
import { render } from 'react-dom';
import { ThemeProvider } from '@mui/material/styles';
import App from './containers/App';
import theme from './style/theme';

render(
  <ThemeProvider theme={theme}>
    <App />
  </ThemeProvider>,
  document.getElementById('root')
);


text:
Q: C#: how to collect service only for certain process name by using ServiceController.GetServices() I am able to get all the process using Process.GetProcesses() under "System.Diagnostics" namespace.
Is there any way to get all the service name within certain process by using "ServiceController.GetServices()"?
foreach (var theProcess in Process.GetProcesses())
            {
                if(theProcess.ProcessName.ToUpper() == "SVCHOST")
                {
                    ServiceController.GetServices().Where(e=>e.)
                }

                //Console.WriteLine("Process: {0} ID: {1}", theProcess.ProcessName, theProcess.Id);
            }

A: No, there is no way because you have no special attributes or properties. But you can do the same thing using ManagementObjectSearcher
foreach (var theProcess in Process.GetProcesses())
{
    if (theProcess.ProcessName.ToUpper() == "SVCHOST")
    {
        ManagementObjectSearcher mos = new ManagementObjectSearcher("root\\CIMV2", string.Format("SELECT * FROM Win32_Service " + "where ProcessId={0}", theProcess.Id));
        foreach (ManagementObject mo in mos.Get())
        {
            Console.WriteLine("Name: " + mo["Name"]);
        }
    }
}


text:
Q: Attempting to create a bar graph in C using information from file i'm trying to create a program using basic c constructs and loops that reads math quiz scores from a file and prints the scores as stars (like a bargraph). The program will attempt read the file and visually portray how the student is performing in different
areas of mathematics (addition, subtraction, multiplication, and
division).
The input file looks something like this:
2
Bobby
6 10
70 80
50 60
4 5
Joel
7 12
20 25
4 5
3 10

The first line represents the number of total students in the file. After this each of the students will have 5 lines of individual data. The first of these lines is the student name, and the next 4 are scores for the individual areas of math
(5 out of 6, 70 out of 80, etc.)
And im attempting to receive an output similar to this example:
Bobby
+: ********
-: ******
*: *****
/: ****
Joel
+: ****
-: ********
*: ***
/: *******

I know I need to use loops and ifp(internal file pointers) to achieve this, but im not quite sure how to implement them to read the individual lines of the program, as this is my first time using an input file in C.
** Fourth Edit- Objective completed!
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

//int main
int main() {

    FILE * ifp;
    ifp = fopen("input.txt", "r");

    FILE * ofp;
    ofp = fopen("output.txt", "w");

    int students = 0, i, j;
    int sum = 0;
    int perc;
    int score1,score2;
    char name [10];

    //read the first line for # of students
    fscanf(ifp, "%d", &students);

    //Loop for both students
    for (i=0; i<students; i++) {

                fscanf(ifp, "%s", &name);
                fprintf(ofp, "%s:", name);

                fscanf(ifp, "%d %d", &score1, &score2);
                perc = (10 * score1/score2);
                fprintf(ofp, "\n +:");
                for(j=0; j<perc; j++){
                    fprintf(ofp, "*");
                }
                fscanf(ifp, "%d %d", &score1, &score2);
                perc = (10 * score1/score2);
                fprintf(ofp, "\n -:");
                for(j=0; j<perc; j++){
                    fprintf(ofp, "*");
                }

                fscanf(ifp, "%d %d", &score1, &score2);
                perc = (10 * score1/score2);
                fprintf(ofp, "\n *:");
                for(j=0; j<perc; j++){
                    fprintf(ofp, "*");
                }
                fscanf(ifp, "%d %d", &score1, &score2);
                perc = (10 * score1/score2);
                fprintf(ofp, "\n /:");
                for(j=0; j<perc; j++){
                    fprintf(ofp, "*");
                }
                    fprintf(ofp, "\n");
    }
    fclose(ifp);
    fclose(ofp);

return 0;
}

It seems my previous graph error was a simple order of operations error on my part. Thanks for all your help guys!

A: Well, What I would do, after finding the average of the score with math, I would make a for loop, and change the loop variable(i or j or whatever) to the average, and print stars in the for loop.
//Here is an example of a for loop that loops 20 times
    for ( n=0; n < 20; n++ )
{
   // whatever here...
}

Does that make sense?

A: If you can count on your input file always being formatted the way you describe, then you don't need to worry much about format checking (although it is always a good idea).  Still check for errors where appropriate (file operations, fgets, etc.)  I don't think you need to use a switch case statement.  A for loop should suffice because you can go through the steps needed to handle one student record, then let the for loop repeat those steps for any remaining students.  I would do the following:
/* declare variables */
int num_students    // the number of students on the first line
char name[50], line[100]    // student name, a line from the input file
int addition_score, addition_max    // student's addition score, max addition score possible
int subtraction_score, subtraction max
/* ints for multiply and divide scores as well */
float percent   // used for _score / _max (re-use for + - * and /)
FILE input_file, output_file

// open input file for reading
// open output file for writing
// fgets line from input file
// sscanf to extract num_students
// for(c=0; c<num_students; ++c) {

    //fgets name

    //fgets the line containing the addition scores
    //sscanf line for addition_score and addition_max
    //same two commands for -, *, and /

    //percent = (float)addition_score / addition_max
    //output the student's name to output file
    //figure out how to represent the float in stars (I'll leave this up to you)
    //output a line containing "+:" and your stars to the output file

    //repeat that procedure for -, *, and /
   } // end for loop
// close input file
// close output file
return 0;

Hope that helps.


text:
Q: IP Client WSO2 Esb I need to get IP address the client, in WSO2 Application Server I can get it by
getProperty('REMOTE_ADDR')

But I need to get the IP by WSO2 ESB (proxy). How do I get the IP by ESB?

A: Try like this within the seuence of the proxy;
<log level="custom">
                <property name="ip address" expression="get-property('axis2','REMOTE_ADDR')"/>
            </log>

Check this blog post;
http://vvratha.blogspot.com/2011/11/retriving-clientiphost-within-sequence.html


text:
Q: Capture camera view is not correct in android? i use surface view custom camera using Media Recorder class to record the video , but when the view appear the camera view is some what stretched then original camera , how can i set proper height and width for camera in android using Media Recorder class in surface view custom camera component.
If any one knows the problem means help me out?
Thanks


text:
Q: how to query specific fields in hibernate criteria I need to fetch only specific feilds instead of all fields. All my tables has audit feilds(4) . i want that to be ommitted on the selection. how to do that from mapping. is there any other way?.
Criteria criteria = session.createCriteria(Property.class, "property")
                .createAlias("property.propertyType", "type").createAlias(
                        "property.propertyConcern", "propertyConcern",
                        CriteriaSpecification.LEFT_JOIN).createAlias(
                        "propertyConcern.concern", "concern",
                        CriteriaSpecification.LEFT_JOIN)
                        .setResultTransformer(
                        CriteriaSpecification.DISTINCT_ROOT_ENTITY);

A: Use a ProjectionList to return only the fields you are after.
Criteria criteria = session.createCriteria(Property.class, "property")
    .setProjection(Projections.projectionList()
        .add(Projections.property("property.field1"))
        .add(Projections.property("concern.field2"))
        /*etc*/)
    /*etc etc etc*/;

The result is an array of arrays.
for (Object result : criteria.list()) {
    final Object[] fields = (Object[]) result;
    log.info("property.field1={}, concern.field2={}", fields[0], fields[1]);
}

By the way, your entity name "Property" could cause confusion/conflict with the existing Hibernate class, especially since you are using Criteria.

A: you have to use Transformers.aliasToBean(Property.class)..
ProjectionList properties = Projections.projectionList();
properties.add(Projections.property("p.id"), "id");//"id" should match with the property name to call setters
properties.add(Projections.property("p.fname"), "fname");
properties.add(Projections.property("s.lname"), "lname");

criteria.setProjection(properties);
criteria.setResultTransformer(Transformers.aliasToBean(Student.class));
List<Student> students = (List<Student>) criteria.list();


text:
Q: SQL idea for a query I have this kind of table
ID-----CategoryID-----Price

1---------1-----------200

2---------1-----------300

3---------2-----------150

4---------2-----------100

I need a SQL query where I can get average of elements by Category ID. The results should be like:
CategoryID----------AVG_Price

1-------------------250

2-------------------175

I have not been able to think it through..

A: Select categoryid, avg(price)
from table
group by categoryid

A: In MySQL backticks aren't required, but are used if your field names contain spaces or reserved words:
SELECT   `CategoryID`, avg(`Price`) as `AVG_Price`
FROM     `tablename`
GROUP BY `CategoryID`;

SQLFiddle

Note: Category 2 averages to 125 not 175 (150+100=250; 250/2=125)


text:
Q: Can JPA Embeddable class contain an object reference? I'm trying to embed a class to another which contains object reference. I always get
org.hibernate.MappingException: Could not determine type for: ...

exception. My question is there any way I can embed a class which contains object references, or embeddable classes only stores primitives.
I'm already tried @Target() annotation but not helps.

A: Yes, this is possible. Look at the documentation.
@Embeddable
public static class Publisher {

    private String name;

    @ManyToOne(fetch = FetchType.LAZY)
    private Country country;

    //Getters and setters, equals and hashCode methods omitted for brevity
}

@Entity(name = "Book")
@AttributeOverrides({
    @AttributeOverride(
        name = "ebookPublisher.name",
        column = @Column(name = "ebook_publisher_name")
    ),
    @AttributeOverride(
        name = "paperBackPublisher.name",
        column = @Column(name = "paper_back_publisher_name")
    )
})
@AssociationOverrides({
    @AssociationOverride(
        name = "ebookPublisher.country",
        joinColumns = @JoinColumn(name = "ebook_publisher_country_id")
    ),
    @AssociationOverride(
        name = "paperBackPublisher.country",
        joinColumns = @JoinColumn(name = "paper_back_publisher_country_id")
    )
})
public static class Book {

    @Id
    @GeneratedValue
    private Long id;

    private Publisher ebookPublisher;

    private Publisher paperBackPublisher;

    //Getters and setters are omitted for brevity
}


text:
Q: gtk : connecting spinbutton signal in cellrenderer I'am making a GUI with a treeview using Gtk.
I want to connect the update signal of a CellRendererSpin to make some actions (update a drawing) at each modification of the spinbutton (before being validated with 'enter').
I tryed to get the widget spinbutton with editingStarted and connect the signal onValueSpinned of the spinbutton to make the update.
on renderspin editingStarted  $ \wid iter -> do
                                 let widcast = castToSpinButton wid
                                 onValueSpinned widcast $ do
                                                          update_the_drawing
                                                          ....

When I click on spinbutton to increase or decrease, the update is done but things are running away ... updatings are made sequentially very fast and doesn't stop.
I tryed to replace onValueSpinned widcast by onValueChanged adj on the adjustement of the spinbutton
on renderspin editingStarted  $ \wid iter -> do
                                 let widcast = castToSpinButton wid
                                 adj <- spinButtonGetAdjustment  widcast
                                 onValueChanged adj $ do
                                                      update_the_drawing
                                                      ....

I tryed to replace onValueSpinned by onValueSpinned and onValueChanged by afterValueChanged and it still running away.
I have several questions :

*

*Is on renderspin editingStarted the correct method to access the spinbutton widget in a treeview? Is there an alternative method?

*Is there a specific signal/function to make the update once?

*Is my method to obtain the expected result globally correct or am I totally wrong?

*Do you have an example in any language (C, Python, Haskell, ...) ?


text:
Q: recursive sequences bounded above and their limits at infinity Define a sequence $\langle a(n)\rangle$ recursively by $a(1)=\sqrt{2}$ and $a(n+1)=\sqrt{2+a(n)}$ $(n>0)$.
a)by induction or otherwise show that the sequence is increasing and bounded above 3. Apply the monotonic sequence theorem to show that the limit as $n$ approaches infinity exists.
b)What is the value of the limit as n approaches infinity of the sequence?
I know that to show that a sequence is bounded above I have to show that there exists a real number $M$ (in this case 3) such that $a(n)\leq M$ for all $n\geq1$.
The theorem states that if it is bounded above and non-decreasing then it is convergent, since it is increasing then by the theorem it will converge. Does this mean it will converge to 3? But I am thinking it could converge to a number less than three possibly, but could not converge to anything greater than 3.

A: Once you have proved that the sequence is convergent, then, making $n \to \infty$ in the recurrence relation defining $a_n$, the limit $\ell$ satisfies
$$
\ell =\sqrt{2+\ell}, \quad \ell>0.
$$ equivalently
$$
\ell^2 =2+\ell, \quad \ell>0.
$$ which may be solved to obtain $\ell$.

A: suppose lim$a_n$=x, Then lim$a_n$+$_1$=x also
now  $x=√(2+x)$ squaring it you will get $x^2$=$x+2$
solving this quadratic equation we get $x$=-1,2
$x$=-1 is absurd as sequence is increasing and starts from $√2$
we have only choice $x=2$, which is the limit of the sequence


text:
Q: T-SQL OPENJSON error when calling stored procedure from Entity Framework It's working fine when I execute this with the json from SQL Server Management Studio. But the issue is when I try to call the stored procedure from C# using Entity Framework's FromSqlRaw method.
Here is my stored procedure code:
CREATE PROCEDURE [dbo].[InsertWithTSQL]
    @json nvarchar(max) = NULL
AS
BEGIN
    INSERT INTO Student (ID, Name, RollNo, Class, Age)
        SELECT
            ID, Name, RollNo, Class, Age
        FROM
            OPENJSON (@json)
        WITH
            (ID int '$.Id',
             Name NVARCHAR(MAX) '$.Name',
             RollNo int'$.RollNo',
             Class NVARCHAR(MAX) '$.Class',
             Age int '$.Age')
END

Here is my C# code:
public IActionResult Create(Student student)
{
        //List<object> obj = new List<object>();
        var json = JsonConvert.SerializeObject(student);
        var stringToSend = json.ToString();
        stringToSend = stringToSend.Insert(0,"'[");
        stringToSend = stringToSend.Insert(stringToSend.Length, "]'");
        var param = new SqlParameter("@json", stringToSend);

        // This line throws the error
        // (Invalid object name 'OPENJSON'.)
        var a = _context.Students.FromSqlRaw("[InsertWithTSQL] @json", param);
        _context.SaveChanges();
        return Ok();
}

Student.cs
public partial class Student
{
  public int? Id { get; set; }
  public string Name { get; set; }
  public string RollNo { get; set; }
  public string Class { get; set; }
  public int? Age { get; set; }
}

JSON which i'm sending to SP
'[{"Id":2,"Name":"Khan","RollNo":"23","Class":"VI","Age":21}]'


text:
Q: What does redirect in Yaws do in a docker stack? Trying to understand Yaws and my docker stack.
I have 3 servers in yaws.conf: domain.tld, my.domain.tld and sm.domain.tld. These correspond to containers www, wmy and wsm. I want Yaws to process data from domain.tld via appmod and pass through the other two.
With nginx as proxy this was not hard to do. How to do it right with Yaws?
Currently I pass the same appmod to all three and let that appmod decide what to do.
out_check_glue(A) ->
    {url, Scheme, Host, _Port , Path, Querypart} = yaws_api:request_url(A),
    case Host of
        "my.domain.tld" ->
            Url = "http://" ++ "wmy" ++ Path ++ get_query(Querypart),
?trace('out_check_glue(A)==++++++++++++++++++++++++++++++++++=========CALL WMY============> Url', [Url]),
            vx_request_url(Url);
        "sm.domain.tld" ->
            Url = "http://" ++ "wsm" ++ Path ++ get_query(Querypart),
?trace('out_check_glue(A)==++++++++++++++++++++++++++++++++++=========CALL WSM============> Url', [Url]),
            vx_request_url(Url);
        _ ->
?trace('out_check_glue(A)==++++++++++++++++++++++++++++++++++=========NO GLUE============> Scheme, Host,Path,Querypart', [io:format("~n~n~n~p~n", ["WE START HERE out_check_glue"]),Scheme, Host,Path,Querypart]),
            out_vx(A)
    end.

vx_request_url just calls httpc:request with some further discrimination like for container adm as discussed elsewhere, so I have a simple pass through here, out_vx starts processing for www.
This works well. As you see, the appmod can call the appropriate containers directly. This is easily reproduced in the yaws container as well. Enter the container and issue curl http://wmy -- voilà.
My idea was to not involve the appmod at all as was the case with nginx and pass this decision on to Yaws via redirect like so:
#        appmods = </, myurl exclude_paths plugins img images styles scripts>
   <redirect>
     / = http://wmy
   </redirect>

This does not work as intended: not the container is called but the browser which has to error out, of course: there is no domain wmy to be found.
Why is that so and is there a better solution?

A: Instead of using a redirect, you can use the Yaws reverse proxy feature, as it will essentially do what your appmod is doing in its "no glue" sections.
For my.domain.tld and sm.domain.tld, add a virtual server to your yaws.conf file, and within each, specify revproxy:
<server my.domain.tld>
    revproxy = / http://wmy
</server>

<server sm.domain.tld>
    revproxy = / http://wsm
</server>


text:
Q: Android Ratingbar has no response I am making a Ratingbar to allow user to rate for something.
Thus,I use this java code
    setContentView(R.layout.restaurant_detail);
    value=(TextView) findViewById(R.id.textView23) ;
    rb=(RatingBar) findViewById(R.id.ratingBar);
    rb.setOnRatingBarChangeListener(new
    RatingBar.OnRatingBarChangeListener(){
    @Override
    public void onRatingChanged(RatingBar ratingBar,float rating,boolean fromUser){
        value.setText("Rated:"+rating)}
    });

and this xml code
<RatingBar
      android:id="@+id/ratingBar"
      style="?android:attr/ratingBarStyleSmall"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:isIndicator="true"
      android:numStars="5"
      android:rating="4.5"
      android:stepSize="0.5" />

<TextView
      android:id="@+id/textView23"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_weight="1"
      android:text="TextView" />

but the Ratingbar does not change when I press on it. I have done many searching in vain,please help me to solve the problem.

A: Try modify to this
 rb.setOnRatingBarChangeListener(new OnRatingBarChangeListener() {
        public void onRatingChanged(RatingBar ratingBar, float rating,
         boolean fromUser) {
         Toast.makeText(getApplicationContext(),"Your Selected Ratings  : " + String.valueOf(rating),Toast.LENGTH_LONG).show();
        }
  });

A: You can do like this.
<RatingBar
    android:id="@+id/ratingBar"
    style="?android:attr/ratingBarStyleSmall"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:isIndicator="false"
    android:numStars="5"
    android:rating="4.5"
    android:stepSize="0.5" />

<TextView
    android:id="@+id/textView23"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_weight="1"
    android:text="TextView" />

Just setting android:isIndicator="false" in the RatingBar
Then use in the Activity .
rb.setOnRatingBarChangeListener(new RatingBar.OnRatingBarChangeListener(){
    @Override
    public void onRatingChanged(RatingBar ratingBar,float rating,boolean fromUser){
        value.setText("Rated:"+rating)}
});


text:
Q: Finding and disabling 'rogue' stylesheet from header: Source Sans Pro I just recently set up a local WordPress development environment and imported the content from the live site into it using WordPress' built-in export and import functionality.
Unfortunately, this showed up in the header, and is making the local site extremely slow when working offline:
<link rel="stylesheet" id="open-sans-css" href="//fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=3.8.1" type="text/css" media="all">

I'm fairly certain I remember adding this reference to a theme several months ago in its dedicated "Theme Settings" section of the admin interface. Said theme is no longer installed, and I can't even recall its name.
I've gone through and searched all the current theme's files just to make sure that I hadn't added this to the current theme and simply forgotten; and, no, I hadn't.
My question: How can I discover what is adding this reference; and, more importantly, remove it?

A: It could be a configuration setting stored outside the files, and in the database instead. Using phpMyAdmin from the control panel of your host, Export the database, then open the SQL file in a text editor and search for the string.
https://support.hostgator.com/articles/specialized-help/technical/exporting-a-mysql-database-via-phpmyadmin
I assume you've already checked the header.php file of the theme?

A: Quick steps to identify exactly where it's coming from:
1. comment out wp_head(); in your header.php.  If this removes the Google Fonts call then look through your active plugins and the theme (parent and child) functions.php files
2. deactivate plugins one at a time
3. swith to twentyten or similar theme
Depending on which of these steps removes the line of code, you will be able to locate and permanently edit.
My money is on #1 solving it for you.  Good luck.

A: There needs to be a way to turn this off, because this was terribly slow for me too. I did find this plugin will disable it:
Disable Google Fonts

A: And the answer is found in the file /wp-includes/script-loader.php. Change line 564 from this:
if ( 'off' !== _x( 'on', 'Open Sans font: on or off' ) ) {

to this:
if ( 'off' !== _x( 'off', 'Open Sans font: on or off' ) ) {

That's it.


text:
Q: Advancing Powerpoint Slide Show Animations Automatically Following Timing I have a power point slide show that I am accessing in C#.  It opens and comes up on the screen and I can manually step through it, but it already has timings on it in the animations tab.  How can I just start the show and run according to the settings in Animations in the powerpoint?
Microsoft.Office.Interop.PowerPoint.Application app = null;
Microsoft.Office.Interop.PowerPoint.Presentation pres = null;
app = new Microsoft.Office.Interop.PowerPoint.Application();
app.SlideShowNextSlide += new Microsoft.Office.Interop.PowerPoint.EApplication_SlideShowNextSlideEventHandler(app_SlideShowNextSlide);
pres = app.Presentations.Open(filename,
                Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse);
//I was hoping this line would just run my show with the timings but it does not.
pres.SlideShowSettings.Run();
pres.SlideShowWindow.View.First();

And to manually advance I have been doing
pres.SlideShowWindow.View.Next();

A: It turns out I only needed one more line to activate the animation timing.
pres.SlideShowSettings.ShowWithAnimation = Microsoft.Office.Core.MsoTriState.msoTrue;

The full code
Microsoft.Office.Interop.PowerPoint.Application app = null;
Microsoft.Office.Interop.PowerPoint.Presentation pres = null;
app = new Microsoft.Office.Interop.PowerPoint.Application();
app.SlideShowNextSlide += new Microsoft.Office.Interop.PowerPoint.EApplication_SlideShowNextSlideEventHandler(app_SlideShowNextSlide);
pres = app.Presentations.Open(filename,
            Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse);
pres.SlideShowSettings.ShowWithAnimation = Microsoft.Office.Core.MsoTriState.msoTrue;
pres.SlideShowSettings.Run();
pres.SlideShowWindow.View.First();


text:
Q: Connecting Unity to Local MySQL Database I'm trying to create a server in Unity that at the moment connects to a local database on my computer.
void Start()
    {

        using (SqlConnection dbCon = new SqlConnection("Server=127.0.0.1;" +
                                                        "Database=bomberman;uid=root"))
        {
            //SqlCommand cmd = new SqlCommand(_query, dbCon);
            try
            {
                dbCon.Open();
                Debug.Log("Successfully opened MySQL");
                //string _returnQuery = (string)cmd.ExecuteScalar();
            }
            catch (SqlException _exception)
            {
                Debug.LogWarning(_exception.ToString());
            }
        }
    }

At the moment, I wanted to keep it simple so I left the credentials as barebones as possible so that I can confirm a connection can exist; however, I'm getting a
System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it.

Furthermore, I can confirm that I can connect to MySQL from other sources since I was able to host a game server using this particular connection previously. Any ideas?


text:
Q: How to insert Page numbers in Hindu Numerals in Arabic Context? I have set the Numerals in "Options --> Advanced" to "Context". I changed the language to Arabic in my document. When I type numbers in the document body, the numbers are displayed in Arabic numbers (Hindu) [which is correct], but when I insert Page Numbers, tho I'm still in the Arabic context the numbers are displayed in English numbers (ie 1,2,3). How can I fix this and display the page numbering in Arabic as well?

A: Obviously this is a bug in Office 2016.
You may give this workaround a try:
Go to the Quick Access Toolbar at the top left (if English Word) of your Word document and click the down arrow. From the list, choose "More Commands". Under "Choose commands from:" in the window that opens, choose "All Commands". From the column below look for "Rtl Run" and double-click it to add it to the other column, then click OK. You'll notice that a circle appears in the Quick Access Toolbar. Now click any number in the list to highlight them all, then click that circle in the Quick Access Toolbar. This should make the list numbers Hindi.

A: I have figured out why this problem is happening and managed to solve it. See video
https://youtu.be/egZflseLdRU
Steps:

*

*Ensure the page number is RTL.

*Highlight the page number

*Right click and edit field

*Click Page

*Show field code

*Replace whatever you see with this code PAGE HINDI

*Confirm your code.
That's all.

A: After inserting Page Number change text direction, while you're editing the footer, from left-to-right to right-to-left (or Ctrl and right Shift)
The numbers should be represented in Hindi after you do that, worked for me (MS Word 2013).

A: It is because your paragraph direction is still Left-to-Right which is the "Context" and preferred choice for the English (Arabic numeral) users. To display Hindi numerals in page numbering which is the standard for Arabic text, you need to change the paragraph direction of your page numbering to Right-to-Left direction. To do so, follow one of the two ways as described below:
Way 1
1.  Make sure that you choose "Context" in "Options --> Advanced" to "Context".
2.  Edit your page number in the Header of Footer by double clicking the page number area (any number).
3.  Put your cursor exactly on the page number.
4.  As your cursor is on page number, go to Page Layout on the ribbon of your Microsoft Word (i.e., 2013)
5.  Edit the Paragraph section. Under the General in the Indents and Spacing tab, look for Direction, and tick "Right-to-Left".
That is all. The number will change to Hindi.
If you make this change on an Odd number, you may need to do the same thing on an Even number.
Way 2:
Follow step 1-3 as described above
4. Go to Home on your Ribbon and simply click Right-to-Left Text Direction button while your cursor is on page number.


text:
Q: media queries in Yahoo Pure CSS I am working on creating my site using Yahoo's Pure CSS modules(http://purecss.io/).  I really like it so far.  One thing I don't understand is how the media queries fit into it.  Here is what it says on their grids page:

Default Media Queries
When using Responsive Grids, you can control how the grid behaves at
  specific breakpoints by adding class names. Pure's default responsive
  grids comes with the following class names and media query
  breakpoints.

So I want to add some custom handling at the "xl" breakpoint.  How do I do that?  Also, how do I know which class to put my content into?  I have used media queries before.  I just can't quite wrap my head around how they did it here.

A: Hi i my self use pure because bootstrap is boring and bloated why not try something out of the box...the break point is easy on the xl query place your css class be that pures grid even they all can be broken so lets say .sidebar you want it gone on xl place that clas there..you can costumize the breakpoint on their site as well for different screen size if thats what your looking for. I hope this helps...but I am not sure if you are using WordPress but my purecss wp theme will be out shortly for developers and designers!


text:
Q: Why UIView's setFrame is not same as UILabel's setFrame In order to detect the behavior of refresh UI on background thread,I used the third-part library ODUIThreadGuard.
This lib is based on hook UIView's setNeedsLayout、setNeedsDisplay、setNeedsDisplayInRect selector.
When I tested it, I found that UILabel's setFrame: on background thread can be detected but UIView's can't.Who can tell me why?
code:
// ViewController.m
[self.view addSubview:self.testLabel];
[self.view addSubview:self.testView];

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
    self.testLabel.frame = CGRectMake(20, 20, 100, 100);
});

The above code will be detected but the following will not .
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
    self.testView.frame = CGRectMake(20, 20, 100, 100);
});

hook code :
@implementation UIView (ThreadSafeGuard)

+ (void)load {
    [DBHookUtil swizzlingInClass:[self class] originalSelector:@selector(setNeedsLayout) swizzledSelector:@selector(db_setNeedsLayout)];
    [DBHookUtil swizzlingInClass:[self class] originalSelector:@selector(setNeedsDisplay) swizzledSelector:@selector(db_setNeedsDisplay)];
    [DBHookUtil swizzlingInClass:[self class] originalSelector:@selector(setNeedsDisplayInRect:) swizzledSelector:@selector(db_setNeedsDisplayInRect:)];
}

- (void)db_setNeedsLayout {
    NSAssert([NSThread isMainThread], @"refresh UI on background thread");
    [self db_setNeedsLayout];
}

- (void)db_setNeedsDisplay {
    NSAssert([NSThread isMainThread], @"refresh UI on background thread");
    [self db_setNeedsDisplay];
}

- (void)db_setNeedsDisplayInRect:(CGRect)rect {
    NSAssert([NSThread isMainThread], @"refresh UI on background thread");
    [self db_setNeedsDisplayInRect:rect];
}

@end

crash log:
    2017-05-15 18:17:40.876 ThreadSafeGuardDemo[50800:19659410] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'refresh UI on background thread'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000105181b0b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x0000000104be6141 objc_exception_throw + 48
    2   CoreFoundation                      0x0000000105185cf2 +[NSException raise:format:arguments:] + 98
    3   Foundation                          0x00000001047803b6 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 193
    4   ThreadSafeGuardDemo                 0x0000000104615068 -[UIView(ThreadSafeGuard) db_setNeedsDisplay] + 264
    5   UIKit                               0x00000001058311f6 -[UILabel setNeedsDisplay] + 55
    6   UIKit                               0x00000001058279e6 -[UILabel _invalidateAsNeededForNewSize:oldSize:withLinkCheck:] + 336
    7   UIKit                               0x0000000105827c9f -[UILabel setFrame:] + 76
    8   ThreadSafeGuardDemo                 0x0000000104614a76 __29-[ViewController viewDidLoad]_block_invoke + 278
    9   libdispatch.dylib                   0x0000000107f744a6 _dispatch_call_block_and_release + 12
    10  libdispatch.dylib                   0x0000000107f9d05c _dispatch_client_callout + 8
    11  libdispatch.dylib                   0x0000000107f7f198 _dispatch_root_queue_drain + 1358
    12  libdispatch.dylib                   0x0000000107f7ebef _dispatch_worker_thread3 + 123
    13  libsystem_pthread.dylib             0x00000001083c3746 _pthread_wqthread + 1299
    14  libsystem_pthread.dylib             0x00000001083c3221 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException


text:
Q: MPI Job crash with stack smashing detected I have a very small piece of MPI code in Fortran 90 that I found online to test my cluster with heterogeneous nodes.  The code likes like this
    program MPI
include "mpif.h"
integer :: myrank,size,ierr
integer :: resultlen
character (len=8) :: name

call MPI_Init(ierr)
call MPI_Comm_rank(MPI_COMM_WORLD,myrank,ierr)
call MPI_Comm_size(MPI_COMM_WORLD,size,ierr)
call mpi_get_processor_name(name, resultlen, ierr)

write(*,*) "Processor ",myrank," of ",size,"on ",name,": Hello World!"

call MPI_Finalize(ierr)
end program

It was successfully compiled with the default mpif90 from the mpich package on CentOS 7.
> which mpif90
/usr/lib64/mpich/bin/mpif90

> mpif90 hello_mpi.f90 -o hello_mpi.exe

This code ran perfectly fine on one node.
> mpirun -host node1 -np 2 ./hello_mpi.exe
 Processor            0  of            2 on node1: Hello World!
 Processor            1  of            2 on node1: Hello World!
>

But on the other node, it crashed every time. These two nodes are very similar in hardware (both AMD Opteron processors, 64-core vs 48-core, and memory size are different), but identical on the software side (both CentOS7 with exactly the same packages).  Here is what I got when running the code on node2
 > mpirun -host node2 -np 2 ./hello_mpi.exe
  Processor            0  of            2 on node2: Hello World!
  Processor            1  of            2 on node2: Hello World!
 *** stack smashing detected ***: ./hello_mpi.exe terminated
 ======= Backtrace: =========
 *** stack smashing detected ***: ./hello_mpi.exe terminated
 /lib64/libc.so.6(__fortify_fail+0x37)[0x7fc61aee3597]
 /lib64/libc.so.6(__fortify_fail+0x0)[0x7fc61aee3560]
 ./hello_mpi.exe[0x400e66]
 ./hello_mpi.exe[0x400bff]
 ======= Backtrace: =========
 /lib64/libc.so.6(__libc_start_main+0xf5)[0x7fc61adf6b15]
 ./hello_mpi.exe[0x400c31]
 ======= Memory map: ========
 /lib64/libc.so.6(__fortify_fail+0x37)[0x7f394c8c3597]
 00400000-00402000 r-xp 00000000 00:2e 493967                             /home/user/tmp/hello_mpi.exe
 00601000-00602000 r--p 00001000 00:2e 493967                             /home/user/tmp/hello_mpi.exe
 00602000-00603000 rw-p 00002000 00:2e 493967                             /home/user/tmp/hello_mpi.exe
 01e96000-01eb7000 rw-p 00000000 00:00 0                                  [heap]
 7fc61a395000-7fc61a3a1000 r-xp 00000000 fd:00 201382493                  /usr/lib64/libnss_files-2.17.so
 7fc61a3a1000-7fc61a5a0000 ---p 0000c000 fd:00 201382493                  /usr/lib64/libnss_files-2.17.so
 7fc61a5a0000-7fc61a5a1000 r--p 0000b000 fd:00 201382493                  /usr/lib64/libnss_files-2.17.so
 7fc61a5a1000-7fc61a5a2000 rw-p 0000c000 fd:00 201382493                  /usr/lib64/libnss_files-2.17.so
 7fc61a5a2000-7fc61a5a8000 rw-p 00000000 00:00 0
 7fc61add5000-7fc61af8c000 r-xp 00000000 fd:00 201382897                  /usr/lib64/libc-2.17.so
 7fc61af8c000-7fc61b18c000 ---p 001b7000 fd:00 201382897                  /u/lib64/libc.so.6(__fortify_fail+0x0)[0x7f394c8c3560]
 ./hello_mpi.exe[0x400e66]
 ./hello_mpi.exe[0x400bff]
 sr/lib64/libc-2.17.so
 7fc61b18c000-7fc61b190000 r--p 001b7000 fd:00 201382897                  /usr/lib64/libc-2.17.so
 7fc61b190000-7fc61b192000 rw-p 001bb000 fd:00 201382897                  /usr/lib64/libc-2.17.so
 7fc61b192000-7fc61b197000 rw-p 00000000 00:00 0
 7fc61b19d000-7fc61b1d8000 r-xp 00000000 fd:00 202328431                  /usr/lib64/libquadmath.so.0.0.0
 7fc61b1d8000-7fc61b3d7000 ---p 0003b000 fd:00 202328431                  /usr/lib64/libquadmath.so.0.0.0
 7fc61b3d7000-7fc61b3d8000 r--p 0003a000 fd:00 202328431                  /usr/lib64/libquadmath.so.0.0.0
 7fc61b3d8000-7fc61b3d9000 rw-p 0003b000 fd:00 202328431                  /usr/lib64/libquadmath.so.0.0.0
 7fc61b3dd000-7fc61b3f2000 r-xp 00000000 fd:00 201326729                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
 7fc61b3f2000-7fc61b5f1000 ---p 00015000 fd:00 201326729                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
 7fc61b5f1000-7fc61b5f2000 r--p 00014000 fd:00 201326729                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
 7fc61b5f2000-7fc61b5f3000 rw-p 00015000 fd:00 201326729                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
 7fc61b5f5000-7fc61b6f6000 r-xp 00000000 fd:00 201382905                  /usr/lib64/libm-2.17.so
 7fc61b6f6000-7fc61b8f5000 ---p 00101000 fd:00 201382905                  /usr/lib64/libm-2.17.so
 7fc61b8f5000-7fc61b8f6000 r--p 00100000 fd:00 201382905                  /usr/lib64/libm-2.17.so
 7fc61b8f6000-7fc61b8f7000 rw-p 00101000 fd:00 201382905                  /usr/lib64/libm-2.17.so
 7fc61b8fd000-7fc61ba1c000 r-xp 00000000 fd:00 202328443                  /usr/lib64/libgfortran.so.3.0.0
 7fc61ba1c000-7fc61bc1c000 ---p 0011f000 fd:00 202328443                  /usr/lib64/libgfortran.so.3.0.0
 7fc61bc1c000-7fc61bc1d000 r--p 0011f000 fd:00 202328443                  /usr/lib64/libgfortran.so.3.0.0
 7fc61bc1d000-7fc61bc1f000 rw-p 00120000 fd:00 202328443                  /usr/lib64/libgfortran.so.3.0.0
 7fc61bc25000-7fc61bc3b000 r-xp 00000000 fd:00 201382505                  /usr/lib64/libpthread-2.17.so
 /lib64/libc.so.6(__libc_start_main+0xf5)[0x7f394c7d6b15]
 ./hello_mpi.exe[0x400c31]
 ======= Memory map: ========
 7fc61bc3b000-7fc61be3b000 ---p 00016000 fd:00 201382505                  /usr/lib64/libpthread-2.17.so
 7fc61be3b000-7fc61be3c000 r--p 00016000 fd:00 201382505                  /usr/lib64/libpthread-2.17.so
 7fc61be3c000-7fc61be3d000 rw-p 00017000 fd:00 201382505                  /usr/lib64/libpthread-2.17.so
 7fc61be3d000-7fc61be41000 rw-p 00000000 00:00 0
 7fc61be45000-7fc61be4c000 r-xp 00000000 fd:00 201382510                  /usr/lib64/librt-2.17.so
 7fc61be4c000-7fc61c04b000 ---p 00007000 fd:00 201382510                  /usr/lib64/librt-2.17.so
 7fc61c04b000-7fc61c04c000 r--p 00006000 fd:00 201382510                  /usr/lib64/librt-2.17.so
 7fc61c04c000-7fc61c04d000 rw-p 00007000 fd:00 201382510                  /usr/lib64/librt-2.17.so
 7fc61c04d000-7fc61c052000 r-xp 00000000 fd:00 136205960                  /usr/lib64/mpich/lib/libmpl.so.1.0.0
 7fc61c052000-7fc61c251000 ---p 00005000 fd:00 136205960                  /usr/lib64/mpich/lib/libmpl.so.1.0.0
 7fc61c251000-7fc61c252000 r--p 00004000 fd:00 1362059600400000-00402000 r-xp 00000000 00:2e 493967                             /home/user/tmp/hello_mpi.exe
 00601000-00602000 r--p 00001000 00:2e 493967                             /home/user/tmp/hello_mpi.exe
 00602000-00603000 rw-p 00002000 00:2e 493967                             /home/user/tmp/hello_mpi.exe
 01ca0000-01cc1000 rw-p 00000000 00:00 0                                  [heap]
 7f394bd75000-7f394bd81000 r-xp 00000000 fd:00 201382493                  /usr/lib64/libnss_files-2.17.so
 7f394bd81000-7f394bf80000 ---p 0000c000 fd:00 201382493                  /usr/lib64/libnss_files-2.17.so
 7f394bf80000-7f394bf81000 r--p 0000b000 fd:00 201382493                  /usr/lib64/libnss_files-2.17.so
 7f394bf81000-7f394bf82000 rw-p 0000c000 fd:00 201382493                  /usr/lib64/libnss_files-2.17.so
 7f394bf82000-7f394bf88000 rw-p 00000000 00:00 0
 7f394c7b5000-7f394c96c000 r-xp 00000000 fd:00 201382897                  /usr/lib64/libc-2.17.so
 7f394c96c000-7f394cb6c000 ---p 001b7000 fd:00 201382897                  /u0                  /usr/lib64/mpich/lib/libmpl.so.1.0.0
 7fc61c252000-7fc61c253000 rw-p 00005000 fd:00 136205960                  /usr/lib64/mpich/lib/libmpl.so.1.0.0
 7fc61c255000-7fc61c256000 r-xp 00000000 fd:00 136205962                  /usr/lib64/mpich/lib/libopa.so.1.0.0
 7fc61c256000-7fc61c455000 ---p 00001000 fd:00 136205962                  /usr/lib64/mpich/lib/libopa.so.1.0.0
 7fc61c455000-7fc61c456000 r--p 00000000 fd:00 136205962                  /usr/lib64/mpich/lib/libopa.so.1.0.0
 7fc61c456000-7fc61c457000 rw-p 00001000 fd:00 136205962                  /usr/lib64/mpich/lib/libopa.so.1.0.0
 7fc61c45d000-7fc61c67e000 r-xp 00000000 fd:00 136205954                  /usr/lib64/mpich/lib/libmpich.so.10.0.4
 7fc61c67e000-7fc61c87d000 ---p 00221000 fd:00 136205954                  /usr/lib64/mpich/lib/libmpich.so.10.0.4
 7fc61c87d000-7fc61c88a000 r--p 00220000 fd:00 136205954                  /usr/lib64/mpich/lib/libmpich.so.10.0.4
 7fc61c88a000-7fc61c88f000 rw-p 0022d000 fd:00 136205954                  /usr/lib64/mpich/lib/libmpich.so.10.0.4
 7fc61c88f000-7fc61c8c8000 rw-p 00000000 00:00 0
 7fc61c8cd000-7fc61c8cf000 r-xp 00000000 fd:00 136205958                  /usr/lib64/mpich/lib/libmpichf90.so.10.0.4
 7fc61c8cf000-7fc61cace000 ---p 00002000 fd:00 136205958                  /usr/lib64/mpich/lib/libmpichf90.so.10.0.4
 7fc61cace000-7fc61cacf000 r--p 00001000 fd:00 136205958                  /usr/lib64/mpich/lib/libmpichf90.so.10.0.4
 7fc61cacf000-7fc61cad0000 rw-p 00002000 fd:00 136205958                  /usr/lib64/mpich/lib/libmpichf90.so.10.0.4
 7fc61cad5000-7fc61caf6000 r-xp 00000000 fd:00 201382890                  /usr/lib64/ld-2.17.so
 7fc61cce1000-7fc61cce5000 rw-p 00000000 00:00 0
 7fc61ccf5000-7fc61ccf6000 rw-p 00000000 00:00 0
 7fc61ccf6000-7fc61ccf7000 r--p 00021000 fd:00 201382890                  /usr/lib64/ld-2.17.so
 7fc61ccf7000-7fc61ccf8000 rw-p 00022000 fd:00 201382890                  /usr/lib64/ld-2.17.so
 7fc61ccf8000-7fc61ccfa000 rw-p 00000000 00:00 0
 7fc61ccfa000-7fc61ccfd000 rw-p 00000000 00:00sr/lib64/libc-2.17.so
 7f394cb6c000-7f394cb70000 r--p 001b7000 fd:00 201382897                  /usr/lib64/libc-2.17.so
 7f394cb70000-7f394cb72000 rw-p 001bb000 fd:00 201382897                  /usr/lib64/libc-2.17.so
 7f394cb72000-7f394cb77000 rw-p 00000000 00:00 0
 7f394cb7d000-7f394cbb8000 r-xp 00000000 fd:00 202328431                  /usr/lib64/libquadmath.so.0.0.0
 7f394cbb8000-7f394cdb7000 ---p 0003b000 fd:00 202328431                  /usr/lib64/libquadmath.so.0.0.0
 7f394cdb7000-7f394cdb8000 r--p 0003a000 fd:00 202328431                  /usr/lib64/libquadmath.so.0.0.0
 7f394cdb8000-7f394cdb9000 rw-p 0003b000 fd:00 202328431                  /usr/lib64/libquadmath.so.0.0.0
 7f394cdbd000-7f394cdd2000 r-xp 00000000 fd:00 201326729                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
 7f394cdd2000-7f394cfd1000 ---p 00015000 fd:00 201326729                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
 7f394cfd1000-7f394cfd2000 r--p 00014000 fd:00 201326729                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
  0
 7ffcdf655000-7ffcdf676000 rw-p 00000000 00:00 0                          [stack]
 7ffcdf70d000-7ffcdf70f000 r-xp 00000000 00:00 0                          [vdso]
 ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
 7f394cfd2000-7f394cfd3000 rw-p 00015000 fd:00 201326729                  /usr/lib64/libgcc_s-4.8.5-20150702.so.1
 7f394cfd5000-7f394d0d6000 r-xp 00000000 fd:00 201382905                  /usr/lib64/libm-2.17.so
 7f394d0d6000-7f394d2d5000 ---p 00101000 fd:00 201382905                  /usr/lib64/libm-2.17.so
 7f394d2d5000-7f394d2d6000 r--p 00100000 fd:00 201382905                  /usr/lib64/libm-2.17.so
 7f394d2d6000-7f394d2d7000 rw-p 00101000 fd:00 201382905                  /usr/lib64/libm-2.17.so
 7f394d2dd000-7f394d3fc000 r-xp 00000000 fd:00 202328443                  /usr/lib64/libgfortran.so.3.0.0
 7f394d3fc000-7f394d5fc000 ---p 0011f000 fd:00 202328443                  /usr/lib64/libgfortran.so.3.0.0
 7f394d5fc000-7f394d5fd000 r--p 0011f000 fd:00 202328443                  /usr/lib64/libgfortran.so.3.0.0
 7f394d5fd000-7f394d5ff000 rw-p 00120000 fd:00 202328443                  /usr/lib64/libgfortran.so.3.0.0
 7f394d605000-7f394d61b000 r-xp 00000000 fd:00 201382505                  /usr/lib64/libpthread-2.17.so

 Program received signal SIGABRT: Process abort signal.

 Backtrace for this error:
 7f394d61b000-7f394d81b000 ---p 00016000 fd:00 201382505                  /usr/lib64/libpthread-2.17.so
 7f394d81b000-7f394d81c000 r--p 00016000 fd:00 201382505                  /usr/lib64/libpthread-2.17.so
 7f394d81c000-7f394d81d000 rw-p 00017000 fd:00 201382505                  /usr/lib64/libpthread-2.17.so
 7f394d81d000-7f394d821000 rw-p 00000000 00:00 0
 7f394d825000-7f394d82c000 r-xp 00000000 fd:00 201382510                  /usr/lib64/librt-2.17.so
 7f394d82c000-7f394da2b000 ---p 00007000 fd:00 201382510                  /usr/lib64/librt-2.17.so
 7f394da2b000-7f394da2c000 r--p 00006000 fd:00 201382510                  /usr/lib64/librt-2.17.so
 7f394da2c000-7f394da2d000 rw-p 00007000 fd:00 201382510                  /usr/lib64/librt-2.17.so
 7f394da2d000-7f394da32000 r-xp 00000000 fd:00 136205960                  /usr/lib64/mpich/lib/libmpl.so.1.0.0
 7f394da32000-7f394dc31000 ---p 00005000 fd:00 136205960                  /usr/lib64/mpich/lib/libmpl.so.1.0.0
 7f394dc31000-7f394dc32000 r--p 00004000 fd:00 136205960                  /usr/lib64/mpich/lib/libmpl.so.1.0.0
 7f394dc32000-7f394dc33000 rw-p 00005000 fd:00 136205960                  /usr/lib64/mpich/lib/libmpl.so.1.0.0
 7f394dc35000-7f394dc36000 r-xp 00000000 fd:00 136205962                  /usr/lib64/mpich/lib/libopa.so.1.0.0
 7f394dc36000-7f394de35000 ---p 00001000 fd:00 136205962                  /usr/lib64/mpich/lib/libopa.so.1.0.0
 7f394de35000-7f394de36000 r--p 00000000 fd:00 136205962                  /usr/lib64/mpich/lib/libopa.so.1.0.0
 7f394de36000-7f394de37000 rw-p 00001000 fd:00 136205962                  /usr/lib64/mpich/lib/libopa.so.1.0.0
 7f394de3d000-7f394e05e000 r-xp 00000000 fd:00 136205954                  /usr/lib64/mpich/lib/libmpich.so.10.0.4
 7f394e05e000-7f394e25d000 ---p 00221000 fd:00 136205954                  /usr/lib64/mpich/lib/libmpich.so.10.0.4
 7f394e25d000-7f394e26a000 r--p 00220000 fd:00 136205954                  /usr/lib64/mpich/lib/libmpich.so.10.0.4
 7f394e26a000-7f394e26f000 rw-p 0022d000 fd:00 136205954                  /usr/lib64/mpich/lib/libmpich.so.10.0.4
 7f394e26f000-7f394e2a8000 rw-p 00000000 00:00 0
 7f394e2ad000-7f394e2af000 r-xp 00000000 fd:00 136205958                  /usr/lib64/mpich/lib/libmpichf90.so.10.0.4
 7f394e2af000-7f394e4ae000 ---p 00002000 fd:00 136205958                  /usr/lib64/mpich/lib/libmpichf90.so.10.0.4
 7f394e4ae000-7f394e4af000 r--p 00001000 fd:00 136205958                  /usr/lib64/mpich/lib/libmpichf90.so.10.0.4
 7f394e4af000-7f394e4b0000 rw-p 00002000 fd:00 136205958                  /usr/lib64/mpich/lib/libmpichf90.so.10.0.4
 7f394e4b5000-7f394e4d6000 r-xp 00000000 fd:00 201382890                  /usr/lib64/ld-2.17.so
 7f394e6ce000-7f394e6d6000 rw-p 00000000 00:00 0
 7f394e6d6000-7f394e6d7000 r--p 00021000 fd:00 201382890                  /usr/lib64/ld-2.17.so
 7f394e6d7000-7f394e6d8000 rw-p 00022000 fd:00 201382890                  /usr/lib64/ld-2.17.so
 7f394e6d8000-7f394e6da000 rw-p 00000000 00:00 0
 7fffabb37000-7fffabb58000 rw-p 00000000 00:00 0                          [stack]
 7fffabbed000-7fffabbef000 r-xp 00000000 00:00 0                          [vdso]
 ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]

 Program received signal SIGABRT: Process abort signal.

 Backtrace for this error:
 #0  0x7FC61B916467
 #1  0x7FC61B916AAE
 #2  0x7FC61AE0A66F
 #3  0x7FC61AE0A5F7
 #4  0x7FC61AE0BCE7
 #0  0x7F394D2F6467
 #1  0x#5  0x7FC61AE4A326
 #6  0x7FC61AEE3596
 #7  0x7FC61AEE355F
 7F394D2F6AAE
 #2  0x7F394C7EA66F
 #3  0x7F394C7EA5F7
 #4  0x7F394C7EBCE7
 #5  0x7F394C82A326
 #6  0x7F394C8C3596
 #7  0x7F394C8C355F
 #8  0x400E65 in mpi at hello_mpi.f90:16
 #8  0x400E65 in mpi at hello_mpi.f90:16

 ===================================================================================
 =   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
 =   EXIT CODE: 6
 =   CLEANING UP REMAINING PROCESSES
 =   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
 ===================================================================================
 YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Aborted (signal 6)
 This typically refers to a problem with your application.
 Please see the FAQ page for debugging suggestions

So my question is, what could be causing this problem?  The interesting thing is a similar piece of MPI code in C (shown below, obtained from the internet) worked just fine on both nodes without the above problem.
#include <mpi.h>
#include <stdio.h>

int main(int argc, char** argv) {
// Initialize the MPI environment
MPI_Init(NULL, NULL);

// Get the number of processes
int world_size;
MPI_Comm_size(MPI_COMM_WORLD, &world_size);

// Get the rank of the process
int world_rank;
MPI_Comm_rank(MPI_COMM_WORLD, &world_rank);

// Get the name of the processor
char processor_name[MPI_MAX_PROCESSOR_NAME];
int name_len;
MPI_Get_processor_name(processor_name, &name_len);

// Print off a hello world message
printf("Hello world from processor %s, rank %d"
       " out of %d processors\n",
       processor_name, world_rank, world_size);

// Finalize the MPI environment.
MPI_Finalize();
}

Could this be hardware related?  Or something else?

A: name is too short. The MPI specification states:

The argument name must represent storage that is at least
  MPI_MAX_PROCESSOR_NAME characters long. MPI_GET_PROCESSOR_NAME may write up to this many characters into name.

If that does not fix the problem, then your MPI implementation might be broken.


text:
Q: Please help! unable to add performance counters - 'Add' button is disabled I have created performance counters using Entlib 4.1 as below. When I open up the performon.exe and Add Counters - I can see the Performance Object I created, and the list of counters. However I can't add them becuse the Add button is disabled. Any suggessions?
public class Program
{
    static void Main(string[] args)
    {
        Console.WriteLine("You are about to install the performance counters");
        InstallPerformaceCounters();
        Console.ReadLine();

        for (int i = 0; i < 100000; i++)
        {
            if (i % 3 == 2)
            {
                Thread.Sleep(100);
            }

            if (i % 5 == 2)
            {
                Thread.Sleep(1000);
            }

            PerformSearch(i);
        }

        Console.ReadLine();
    }

    private static void PerformSearch(int i)
    {
        Console.WriteLine(i);
    }

    private static void InstallPerformaceCounters()
    {
        try
        {
            PerformanceCountersInstaller installer = new PerformanceCountersInstaller(new SystemConfigurationSource());
            IDictionary state = new System.Collections.Hashtable();
            installer.Context = new InstallContext();
            installer.Install(state);
            installer.Commit(state);
            Console.WriteLine("Performance counters have been successfully installed.");
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
}

////
App.config
         <?xml version="1.0" encoding="utf-8"?>
         <configuration>
           <configSections>

         </configSections>
         <policyInjection>
            <policies>
              <add name="Search">
                    <handlers>
                       <add categoryName="Search Performance Counters" instanceName="Default"
        useTotalCounter="false" incrementNumberOfCalls="true" incrementCallsPerSecond="true"
        incrementAverageCallDuration="true" incrementTotalExceptions="true"
        incrementExceptionsPerSecond="true" type="Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers.PerformanceCounterCallHandler, Microsoft.Practices.EnterpriseLibrary.PolicyInjection.CallHandlers, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
        name="Performance Counters Handler" />
                     </handlers>
              </add>
           </policies>
         </policyInjection>
     <instrumentationConfiguration performanceCountersEnabled="true"
eventLoggingEnabled="false" wmiEnabled="false" applicationInstanceName="" />
     </configuration>

A: This was my mistake. I need to run the app, particularly the methods that are decorated with those counters, so I could add the counters to the list.


text:
Q: Execution order against authorization filter Using Fluent Security, I have configured website access using DenyAnonymousAccess, DenyAuthenticationAccess and RequireRole. However, since HandleSecurityAttribute is not an authorization filter, all logic to handle DenyAnonymousAccessPolicyViolation only get executed after authorization filter, such as ValidateAntiForgeryToken.
This means that if current user's authentication ticket is timeout, any action decorated with ValidateAntiForgeryToken will throw exception since the token is not created for anonymous user.
So is there a way to work around this? I am currently looking at two solutions:

*

*reate my own authorization filter to perform exact what HandleSecurityAttribute security does.

*Use the global Authorize filer to handle authentication and leave role / other access policy to FluentSecurity.

Update:
I checked in a demo at github, the username and password for this is dev1 and devdev. I set the timeout forms authentication to 1 minute. So if you login, and wait for one minute, then click on logoff, you will get the token is not created for anonymous user. In normal MVC, this won't happen since [Authorize] runs before [ValidateAntiForgeryToken], which redirect user back to login screen.

A: I haven't had any problems with this. Make sure that you put the HandleSecurityAttribute first in the filters list!
GlobalFilters.Filters.Add(new HandleSecurityAttribute(), 0);


text:
Q: Can I include random slope for a fixed effect if I only have 1 sample from a few subject ID's This is my first post here at Cross Validated. Im new to both R-programming and statistics and I have a few questions regarding the statistics of a clinical study I'm currently working on that relate to the use of random slopes in regression modeling. To start things off, I feel like I need to briefly explain our study for my question the make sense later.
I'm currently working on a study where the goal is to research if 2 samples drawn in a series from a patient is affect by repositioning of the patient between the two samples or not.
My data consist of 160 observations over 50 subjects. Each observation consist of 2 samples taken 10 minutes after one another with the patient having been randomised to repositioning (1) or not (0) between the samples. Our goal is then to see if the sample results are different between the first and second sample, and if repositioning affect this difference.
Now, for this part we're looking at the number of white blood cells (WBC) in each sample. The difference (in absolute terms) that is possible to observe between samples should in some way depend on how many WBC's there are in the first sample. It stands to reason that if there are 1000 WBC's in the first sample it allows for a greater difference (again, in absolute terms) compared to if there is 1 WBC in the first sample.
# WBC1 = WBCs in first sample
# WBC2 = WBCs in second sample.

x$diffWBC <- x$WBC2-x$WBC1

mod1 <- lmer(diffWBC ~ WBC1 + Repositioned + (1|PatientID), data=x)
mod2 <- lmer(diffWBC ~ WBC1 + Repositioned + (1+WBC1|PatientID), data=x)

The problem is that the patients in our study that have been randomized to repositioning between samples have higher WBC1 compare to the group that has not been randomized to repositioning.
Since WBC1 is higher in repositioned=1 group, I want to make sure that the correlation diffWBC~Repositioned is just not because WBC1 is higher in Repositioned=1 and that the correlation is in the actual repositioning of the patient.
Now to my problem and question: In mod1 I include WBC1 as a fixed effect and I let the intercept vary for each PatientID. Looking at the data, there consist a lot of variation between patients, thus I want to vary the slope for WBC1 as well (mod2). The problem is that some patients only have 1 observation while others have several. Is it possible to vary the slope of a variable for each patient if some patients only have 1 observation? In my mind, random slope only allows for a varying slope (or estimate) for that variable for each patient if there indeed is one. However, I felt I needed to check with people more versed in this since my supervisor who is rather adept at statistics and R-programming wasn't sure I could do it this way.
The results from our modelling become quite different depending on if a random slope is used or not.
The p-values for the fixed effects vary significantly between mod1 and mod2. Where mod1 suggests that only WBC1 is correlated with diffWBC and mod2 suggests that it's indeed repositioning, not WBC1, that correlates with diffWBC.
Thanks in advance and sorry for a wall of text. It's my first post and I'm not sure exactly how much information I had to include. I thought it would be easier to use the exact examples from my data and our study instead of coming up with metaphors. If there are any additional questions or information that I need to answer or supply I'll gladly do so.
*Edited to make the post more focused on the main point.


text:
Q: How to use source model reuse in custom module custom field Email Sender in Magento 2.3.1 How to use source model reuse in custom module custom field Email Sender in Magento 2.3.1

Magento\Config\Model\Config\Source\Email\Identity

Our custom module custom field like this
 $fieldset->addField(
        'email_sender',
        'select',
        ['name' => 'email_sender', 'label' => __('Email Sender'), 'title' => __('Email Sender'), 'required' => true]
    );


text:
Q: Error changing creation date on my mp4 files I've used this code to from a previous answer to change the creation date on my mp4's but just get errors when I enter a date:
$movFiles = Get-ChildItem "C:\Users\Neil\Pictures\Fishing" -Filter *.MP4

Foreach ($file in $movFiles)
{
   $fileName = $file.Name

   $userDate = Read-Host -Prompt "Date wanted for ${fileName} (format--> 13-02-1970) "
   $newDateObj = Get-Date -Date userDate
   $file.CreationTime = $newDateObj
}

Date wanted for "429V Set up Steps  swim 27th Aug 2011 Red Water.mp4" (format--> 13-02-1970): 27-08-2011.  I enter the date but get this error:
Get-Date : Cannot bind parameter 'Date'. Cannot convert value "userDate" to type "System.DateTime". Error: "The string
was not recognized as a valid DateTime. There is an unknown word starting at index 0."
At line:5 char:30
+ $newDateObj = Get-Date -Date userDate $file.CreationTime = $newDateOb ...
+                              ~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Get-Date], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.GetDateCommand


text:
Q: Microsoft C# .NET YARP 504 Gateway error and Failover I am using Microsoft C# .NET YARP as an API gateway in front of ASP.NET Core Web API (latest version) with Swagger and Kestrel.
YARP is used for intern redirections to many microservices.
Questions:

*

*I am facing 504 http API gateway error for requests that execute more than approx. 2 minutes from swagger UI. How do I set an increased timeout?

Ex: https://URL/swagger/index.html => Execute POST FUNCTION => YARP_API_GATEWAY => SERVICE_API_PORT

*If an internal service destination (endpoint) is down for any reason, how do I configure "Failover" to another destination?

Ex. configuration:
   "ReverseProxy": {
    "Routes": [
      {
        "RouteId": "Service1",
        "ClusterId": "ServiceCluster1",
        "Match": {
          "Path": "/api/Action1/{**rest}"
        },
        "Transforms": [
          { "RequestHeadersCopy": "true" },
          { "RequestHeaderOriginalHost": "true" }
        ]
      },
      {
        "RouteId": "Service2",
        "ClusterId": "ServiceCluster2",
        "Match": {
          "Path": "/api/Action2/{**rest}"
        },
        "Transforms": [
          { "RequestHeadersCopy": "true" },
          { "RequestHeaderOriginalHost": "true" }
        ]
      ],
    "Clusters": {
      "ServiceCluster1": {
        "Destinations": {
          "ServiceCluster1/destination1": {
            "Address": "http://localhost:5001/"
          },
          "ServiceCluster1/destination2": {
            "Address": "http://localhost:5002/"
          }
        }
      },
      "ServiceCluster2": {
        "Destinations": {
          "ServiceCluster2/destination1": {
            "Address": "http://localhost:5003/"
          },
          "ServiceCluster2/destination2": {
            "Address": "http://localhost:5004/"
          }
        }
      },
  }

A: I've not used YARP but going from the docs it looks like:

*

*Default timeout for an outgoing HTTP request is 100 seconds. You can set the timeout per cluster via setting the HttpMessageInvoker timeout, e.g. add the following to the cluster config within each cluster:
     "HttpRequest": {
         "ActivityTimeout": "00:05:00"
     },

*You can use passive health checks to avoid destinations after a failed request (again, set at cluster level):
 "HealthCheck": {
   "Passive": {
     "Enabled": "true",
     "Policy": "TransportFailureRate",
     "ReactivationPeriod": "00:10:00"
   }
 },

For a faster response to the destination being down, you can configure regular active health checks.


text:
Q: Facebook photos.upload crash in Facebook Api I need to upload photo on Facebook. But it seems to be impossible. I always have the same crash in console [UIImage dataUsingEncoding:]
The way I get my Image:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{
[self dismissModalViewControllerAnimated:YES];
if ([mediaType isEqualToString:@"public.image"]){
    _photoImage1 = [[info objectForKey:@"UIImagePickerControllerOriginalImage"] retain];

After all needed permissions:
-(void)uploadPhotoToFacebook {
NSMutableDictionary *args = [[[NSMutableDictionary alloc] init] autorelease];
[args setObject:_photoImage1 forKey:@"image"];
[args setObject:@"hello test picture" forKey:@"caption"];
FBRequest *uploadPhotoRequest = [FBRequest requestWithDelegate:self];
[uploadPhotoRequest call:@"photos.upload" params:args];

It has crash after such a method in FBRequest.m
- (void)utfAppendBody:(NSMutableData*)body data:(NSString*)data {
[body appendData:[data dataUsingEncoding:NSUTF8StringEncoding]];

}
Thanks in advance.

A: Try to add image as dataParam
NSMutableDictionary *params = [[[NSMutableDictionary alloc] init] autorelease];
[params setObject:@"NAME" forKey:@"caption"];
[[FBRequest requestWithDelegate:self] call:@"facebook.photos.upload" params:params dataParam:UIImagePNGRepresentation(_photoImage1)];

A: thats't work right for me
NSMutableDictionary *params = [[[NSMutableDictionary alloc] init] autorelease];
[params setObject:@"NAME" forKey:@"caption"];
[[FBRequest requestWithDelegate:self] call:@"facebook.photos.upload" params:params dataParam:UIImagePNGRepresentation(_photoImage1)];


text:
Q: How to add HTML button without the background "glitching"? I want to implement a button in the center of screen that uses 2 triangles as background. The background on it's own works, but when class="centerButton" is added the output looks horrible(see example). I would like to know why the output is the way it is and how can I fix it. I tried to implement an image as a background, but that also didn't work as planned.
Example: http://jsfiddle.net/0Lgcotjv/

A: Instead of having multiple elements and trying to center using a margin:

*

*Nest the button inside the .box

*Use :before instead of :after (so the background doesn't overlap the button, alternatively you could use z-index)

*You are already using absolute positioning for the background, so make use of that for positioning the button

html,
body {
  margin: 0;
}

.box {
  position: relative;
  width: 100vw;
  height: 100vh;
  background-color: #ebca23;
}

.box:before {
  content: ' ';
  border-top: 100vh solid #d9d9d9;
  border-right: 100vw solid transparent;
  width: 0;
  position: absolute;
}

.box button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

  <button>Center screen button</button>

A: Place your .box as parent of .centerButton. And to make it in center, use display: flex

html, body {
    margin: 0;
}

.box {
    width: 100vw;
    height: 100vh;
    background-color: #ebca23;
}

.box:after {
    content: ' ';
    border-top: 100vh solid #d9d9d9;
    border-right: 100vw solid transparent;
    width: 0;
    position: absolute;
}

.centerButton {
    position: absolute;
    display: flex;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

      <button>Center screen button</button>

A: Margin is out of the div. That is why you are facing this issue. Instead of margin you should add padding to get the desired output :
.centerButton {
    padding-top: 10%;
    padding-left:50%;
}

A: How about using this?

html, body {
    margin: 0;
}

.box {
    width: 100vw;
    height: 100vh;
    background-color: #ebca23;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.box:after {
    content: ' ';
    border-top: 100vh solid #d9d9d9;
    border-right: 100vw solid transparent;
    width: 0;
    position: absolute;
    z-index: 0;
}
button {
    position: relative;
    z-index: 1;
}

  <button>Center screen button</button>


text:
Q: $\frac1z$ integrable on every compact set K I want to show that $\frac1z$ is integrable on every compact set K in $\mathbb{C}$
I know that $\frac 1z$ ist integrable on $\overline{D}=\{z\in \mathbb{C}:\lvert z\rvert \le 1\}$ by
$$\int\int_{\overline{D}} \frac 1{\lvert z\rvert} d(x,y)=\int_0^1\int_0^{2\pi}\frac 1{\lvert re^{it}\rvert}\lvert ire^{it}\rvert dtdr=\int_0^1\int_0^{2\pi}\frac 1r rdtdr=2\pi <\infty$$
Now I am not sure how to go on. I thought of mapping the compact set to $\overline{D}$. But the mapping must be homeomorphic (I think) and I am not sure if this is possible.
Is this even the right approach?


text:
Q: MVC Radio button selected one I have radio button as below for some reason even though the first one is checked, always the last one shows up checked on the form page. Why ? How can i fix this?
@Html.RadioButtonFor(model => model.IsSatisFied, Satisfaction.Not, new { @checked = "true" })
@Html.RadioButtonFor(model => model.IsSatisFied, Satisfaction.Maybe, new { @checked = "false" })
@Html.RadioButtonFor(model => model.IsSatisFied, Satisfaction.Yes, new { @checked = "false" })

A: Do not set the checked attribute. @checked = "true" and @checked = "false" (and checked or checked="checked" or checked="anything") all set the checked attribute. As the DOM is read, the first one is checked, then the second, and finally the last one is checked.
If the value of propery is IsSatisFied is Satisfaction.Maybe then the second radio button will be selected (that's how model binding works)

A: You're using malformed HTML. The proper way to mark something as checked would be
{ @checked = "checked" }

and don't include the checked attribute at all for the unchecked radio buttons.

A: The HTML specification says:

When any of the following phenomena occur, if the element's checkedness state is true after the occurrence, the checkedness state of all the other elements in the same radio button group must be set to false:

*

*The element's checkedness state is set to true (for whatever reason).

*The element's name attribute is set, changed, or removed.

*The element's form owner changes.

So as the HTML is parsed going down the page, if multiple radios are checked then the last one will always be selected. As such, you only want to set one checked attribute by setting checked="checked":
@Html.RadioButtonFor(
    model => model.IsSatisFied,
    Satisfaction.Not,
    new { @checked = "checked" })
@Html.RadioButtonFor(model => model.IsSatisFied, Satisfaction.Maybe)
@Html.RadioButtonFor(model => model.IsSatisFied, Satisfaction.Yes)