text:
Q: Are FC and SAS DAS devices standard enough? Before I ask my questions, here is some background info that may or may not be useful:
For the first time I find myself needing a DAS solution.  My priority is data through-put in a single direction.  I can write large blocks, and I don't need to read at the same time.  The server (the data producing device) is not really a typical server, its a very powerful single board computer.  As such I have limited options when it comes to the add-in cards I can install since it must use the fairly uncommon interface, XMC.  Currently I believe I am limited PCIex8 gen 1 which means that the likely bottle neck for me will be this 16gbps connection.
XMC Boards I have found so far offer the following connections:
a) Dual 10GBE ethernet controller, total throughput 20gbps
b) Dual Quad SAS 2.0 Connectors (SFF-8XXX) HBA (no raid), total throughput 48 gbps
c) Dual FC 8gb HBA (no raid), total throughput 16gbps
My questions for you guys are:
1)  Are SAS and/or FC, and by extension their HBAs, standard enough that I could purchase a Dell or Aberdeen storage server with a raid controller that has external SAS or FC ports and expect that I can connect it to my SAS or FC HBA, be presented with a single volume (if I so configured the storage server), all without having to check for HBA compatibility?
2)  On a device like a Dell PowerVault (either DAS or NAS) is there an OS on it to concern myself with, or is it meant to be remotely managed?  Is there a local interface in case I cant remotely manage it (i.e. if my single board computer uses an OS not supported by Dell OpenManage).  Would this be true of nearly any device which calls itself a DAS?
3)  If I purchase some sort of Supermicro storage chassis, installed a raid controller with external connections, is there a nice lightweight OS I can run just for management of the controller?  Would I even need an OS since the raid card would be configured pre-boot anyway?
4)  It is much easier to buy XMC based 10gigabit ethernet cards (generally dual port).  In what ways would I be getting into trouble by using iSCSI as a DAS are direct cabling with SFP+ cables?
Thanks in advance

A: ad 1) There are different kinds of storage solutions on the market - you would need to take care what you're buying:

*

*JBOD enclosures with passive backplanes - you will find some of these for SAS. They just provide cut-through connections for multi-lane links and do not have any logics or any kind of management

*JBODs with (SAS or FC) expanders - these are more common for higher-density applications, the expander will fan out 1 or 2 (multi-lane) links to a larger number of drives. Management (mainly for zoning) might be out-of-band (through a separate management controller with IP connectivity) or in-band (SES), depending on the implementation.

*storage appliances with own controllers - might come in any combination of FC, SAS or iSCSI connectivity (in the latter case sometimes with NAS functionality as well), typically extensible with additional JBOD shelves and available with redundant controllers. The controllers are built-in, management is out-of-band. Many solutions are using the same base chassis and a different set of controllers or add-on interfaces depending on the type of host interconnect required

The storage appliances are in general compatible to what is claimed - a SAS interconnect can be hooked up with a SAS HBA and present a single volume (of a configurable RAID level), the same goes for FC and iSCSI. The JBODs are more tricky - especially if they were designed as expansion shelves for a storage appliance, you would have to take special care to make sure they would work with (and be supported on) the chosen controller.
ad 2) of course there is an OS on storage appliances. But as it is provided together with the appliance, you can regard and handle it as "firmware". You certainly do not need to stare at the startup screen and press ctrl+alt+del before using the appliance (although you will find Windows Storage Server based devices on the market). As management typicaally happens out-of-band, you would have the option to use an additional computer for maintenance and monitoring  purposes.
ad 3) If I get you right, you want to set up a RAID controller to connect your disks and to serve as a target to your SBC's HBA. I am not aware of any cards which would support this mode of operation. Expanders work somewhat in this way (you can connect targets and initiators to any given port of an expander), but you still would have to have the RAID logic on the controller of your SBC.
ad 4) you probably would not get into trouble all that much. iSCSI is pretty standard storage interconnect nowadays, performance is decent and multipath and failover options are worked out well. However, as the iSCSI stack is more complex and has more dependencies than, say, SAS you need to know what you're doing. Also you typically are in for a higher latency compared to SAS or FC interconnects:


text:
Q: What is the difference between these codes? <input type='text' id='txt' name='txtName' size='20' value='testing'/>

<script type="text/javascript" language='javascript'>
  var val = document.getElementsByName('txtName');
  alert(val[0].value);
  alert(window.txtName.value);
</script>

In above code we are using
alert(val[0].value);

alert(window.txtName.value);

these two ways for getting value from object. What is the difference between both ways and which way is best.

A: alert(window.txtName.value);

This is the Wrong Way, which only works on IE. IE copies all named and IDd elements into properties of window and hence also global variables, which causes all sorts of problems. Don't rely on this.
The better way of doing it like that is:
alert(document.forms[0].elements.txtName.value);

assuming that the input was in the first <form> on the page. You can also use a form name, if it has one:
alert(document.forms.someform.elements.txtName.value);

and it's also possible to shorten that:
alert(document.someform.txtName.value);

although I wouldn't recommend doing so as you stand a greater chance of clashes between names and properties.
This:
alert(document.getElementsByName('txtName')[0].value);

is OK, but since you already have id='txt' on the input it's going to be simpler and faster to use that instead of relying on the non-unique name attribute:
alert(document.getElementById('txt').value);

A: In the first method, you're finding all the elements that have a value of txtName for their name properties. From the result, you're fetching the first matched item.
In the second method, you rely on the browser to have made the element with the name txtName accessible via a shorthand property, txtName, on the window object.
As you can see, one is superfluous if you know there's always just one element; and the other is problematic if you don't know that there's always just one element. Also, in most browsers, the second method won't even work.
I wouldn't recommend any of those means of accessing an item, but rather access by id - document.getElementById('txt').value - when you know there's just one specific element that you want to access.

A: This line of code find out whole dom  i.e whole html page
var val = document.getElementsByName('txtName');
alert(val[0].value);

Following might be the error because by the following line it's add textName to the window object.
alert(window.txtName.value);

chck more about this : http://snook.ca/archives/javascript/global_variable

redpajama_set_name: RedPajamaStackExchange


text:
Q: Visual studio build task in Azure DevOps Build pipeline I am using Visual studio build task in my Azure DevOps Build pipeline. But my connection string was replaced into unexpected format.
In my Web.release.config, I have below lines
<connectionStrings>
    <add name="MyDB" connectionString="$(MyDB)"
              xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>

After File transform task execution, it changed to expected format as below.
<add name="MyDB" connectionString="$(MyDB)" providerName="System.Data.EntityClient" />

But after Visual studio build task, it was changed as below.
<add name="MyDB"
connectionString="$(ReplacableToken_MyDB-Web.config Connection String_0)"
providerName="System.Data.EntityClient"/>

Do I need to give any specific arguments not to change web.config again?


text:
Q: Nao sei abrir o mapa na minha posicao Depois de muita pesquisa, ainda tenho dificuldades com o java, sou novata e estou tentando aprender. Por favor me desculpe se nao consigo fazer uma pergunta clara, pois talvez eu nem saiba do que estou falando,
BOM, Por exemplo a parte de mapas que já consigo abrir, mas com uma posição de "exemplo"
e para isso estou usando o seguinte código:
package jp.co.e_grid.rakuseki;

import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.Location;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;

//import java.util.concurrent.atomic.DoubleAccumulator;

import io.realm.Realm;
import io.realm.RealmConfiguration;
import jp.co.e_grid.rakuseki.model.Report;

import static jp.co.e_grid.rakuseki.config.Constants.MAP_ZOOM;

/**
 * Created by ootaegd on 2016/12/16.
 */

public class PostPositionActivity extends AppCompatActivity
        implements OnMapReadyCallback, GoogleApiClient.OnConnectionFailedListener{

    private GoogleMap map;
    private Marker marker = null;
    private LatLng locationLatLng;
    //private static final LatLng MATSUE = new LatLng(35.47222, 133.05056); //マーカ初期値
    //private LatLng locationLatLng = instantPosition;
    private float accuracy;
    //private static final LatLng instantPosition = new LatLng(35.3852243, 132.7339911);  //              izumo
    //private static final LatLng instantPosition = new LatLng(35.47222, 133.05056);      //マーカ初期値  matsue
    private String uuId;
    //private LatLng instantPosition;
    protected Realm realm;
    private TextView tvCoordinate;
    private GoogleApiClient mGoogleApiClient;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_post_position);

        //前のactivityから渡されたデータを取得する
        Intent intent = getIntent();
        uuId = intent.getStringExtra("uuId");

        //realm設定
        Realm.init(this);
        RealmConfiguration config = new RealmConfiguration.Builder().build();
        Realm.setDefaultConfiguration(config);

        //toolbarを設定
        Toolbar toolbar = (Toolbar) findViewById(R.id.post_position_toolbar);
        toolbar.setTitle(getString(R.string.headPositionTitle));
        setSupportActionBar(toolbar);

        onBtnGpsClicked();
        nextViewActivity();

        //Fragment を取得
        MapFragment mapFragment = (MapFragment) getFragmentManager()
                .findFragmentById(R.id.map);
        mapFragment.getMapAsync(this);

    }

    /**
     * 次の画面へ遷移する処理
     */
    private void nextViewActivity() {
        //位置情報ボタンを押された時の処理
        Button btnPost = (Button) findViewById(R.id.btnPost);
        btnPost.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                //位置情報を追加する
                addReport();

                // 画面を起動
                Intent intent = new Intent();
                intent.setClassName("jp.co.e_grid.rakuseki", "jp.co.e_grid.rakuseki.PostConfirmationActivity");
                intent.putExtra("uuId",uuId);
                startActivity(intent);
            }
        });
    }

    /**
     * 現在地取得ボタンを押された時、現在地を取得する
     */
    private void onBtnGpsClicked() {
        Button btnPost = (Button) findViewById(R.id.btnLocation);
        btnPost.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                //現在地取得
            }
        });
    }

    /**
     * GoogleMapを読み込む前に、オーバライドして処理を行う
     *
     * @param googleMap
     */
    @Override
    public void onMapReady( GoogleMap googleMap ) {
        map = googleMap;

        Log.e("--------MESSAGE--------"," original get 03");
        // final LatLng instantPosition = new LatLng(35.3852243, 132.7339911); // izumo
        // final LatLng instantPosition = new LatLng(35.47222,   133.05056);   // matsue
        locationLatLng = new LatLng(35.47222,   133.05056);   // matsue  //test
        setMarker(locationLatLng);

        // GoogleMapが押下された時の処理
        googleMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {
            @Override
            public void onMapClick( LatLng latLng ){
                // クリックされるたびにマーカが増えていく
                // 一つ前のマーカは削除する
                marker.remove();
                //Mapが押下されたらその位置にピンを立てる
                //緯度経度を取得
                locationLatLng = latLng;
                //ピンを立てる
                setMarker(locationLatLng);
            }
        });
    }

    /**
     * Markerを立てる関数
     *
     * @param lacation 緯度経度情報
     */
    private void setMarker(LatLng lacation){
        marker = map.addMarker(new MarkerOptions()
                .position(lacation)
                .title("報告場所")
                .draggable(false));
        map.moveCamera(CameraUpdateFactory.newLatLngZoom(lacation, MAP_ZOOM));
    }

    /**
     * 位置情報を追加する
     * @return プライマリキー
     */
    private void addReport(){

        realm = Realm.getDefaultInstance();
        //トランザクション開始
        realm.beginTransaction();

        //uuIdでターゲットを抽出
        Report report = realm.where(Report.class).equalTo("key",uuId).findFirst();
        //保存を行う
        report.setLat(Double.parseDouble(String.valueOf(locationLatLng.latitude)));
        report.setLon(Double.parseDouble(String.valueOf(locationLatLng.longitude)));
        report.setAccuracy(Double.parseDouble(String.valueOf(accuracy)));
        Log.e("--------MESSAGE--------", " Longitude 04 " + String.valueOf(report.getLon()));
        Log.e("--------MESSAGE--------", " Latitude 04 "  + String.valueOf(report.getLat()));
        Log.e("--------MESSAGE--------", " Accuracy 04 "  + String.valueOf(report.getAccuracy()));

        //トランザクション終了
        realm.commitTransaction();
    }

    @Override
    public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {

    }
}

Como eu posso abrir esse mapa já na minha localização?
Acontece que peguei muitos exemplos no Google, mas, simplesmente não consigo fazer nada encaixar...
Obrigada pela ajuda e boa vontade!!

A: Usei esta lib em meu projeto. Facilitou muito.
smart-location-lib
Está em inglês. Se tiver dificuldade, use o tradutor
Tradutor do google
Siga as instruções e retorne aqui com suas dúvidas.
Você também pode usar o Fused Location API do Google, mas é mais trabalhosa.
Tutorial Fused Location API


text:
Q: Job result is the Post Script result I'm building a pipeline and I have two post-build scripts in case of success and unsuccess.
pipeline {
agent any
stages {
    stage('Build') {
        steps {
            script {
                echo 'Building...'

            }
        }
    }
    ...
}
post {
    unsuccessful {
        script {
                build job: '../declinePullRequests'
            }
        }
    }
    success {
        script {
               build job: '../createPR_mergePR'
            }
        }
    }
}
}

However, I want my job to return immediatly after it finishes, and not to get blocked by the post-build step. Basically, if the post-script fails, the main job console shows:

Error when executing success post condition:
  hudson.AbortException: createPR_mergePR #40 completed with status FAILURE (propagate: false to ignore)
      at org.jenkinsci.plugins.workflow.support.steps.build.BuildTriggerListener.onCompleted(BuildTriggerListener.java:52)
      at hudson.model.listeners.RunListener.fireCompleted(RunListener.java:211)
      at hudson.model.Run.execute(Run.java:1861)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)

And the main job fails due to failure in post-script job, though it was successful before it. I've researched in the docs and cannot find a solution for it.
How can my main job return immediately after being finished, independently from the post-script job result?
I don't only want to keep the original job state but also not to wait for the child job to get the main job finished.

A: Try setting the properties propagate and wait explicitly to false.
build job: '../declinePullRequests', propagate: false, wait: false

A: Hi looks like you what to spawn processes which run even when the original build is finished. If its possible to pack your scripts into shell/batch, take a look at this two sites:
https://wiki.jenkins.io/display/JENKINS/Spawning+processes+from+build
https://support.cloudbees.com/hc/en-us/articles/218517228-How-to-Ignore-Failures-in-a-Shell-Step-


text:
Q: error: object xml is not a member of package com.databricks.spark I am trying to read XML file using SBT but i am facing issue when i compile it.
build.sbt
name:= "First Spark"
version:= "1.0"
organization := "in.goai"
scalaVersion := "2.11.8"
libraryDependencies += "org.apache.spark" %% "spark-core" % "2.0.0"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "2.0.0"
libraryDependencies += "com.databricks" % "spark-avro_2.10" % "2.0.1"
libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "1.0.2"
resolvers += Resolver.mavenLocal

.scala file
package in.goai.spark

import scala.xml._
import com.databricks.spark.xml
import org.apache.spark.sql.SQLContext
import org.apache.spark.{SparkContext, SparkConf}

object SparkMeApp {
  def main(args: Array[String]) {
    val conf = new SparkConf().setAppName("First Spark")
    val sc = new SparkContext(conf)
    val sqlContext = new SQLContext(sc)
    val fileName = args(0)
    val df = sqlContext.read.format("com.databricks.spark.xml").option("rowTag", "book").load("fileName")
    val selectedData = df.select("title", "price")
    val d = selectedData.show
    println(s"$d")

  }
}

when i compile it by giving "sbt package" it shows bellow error
[error] /home/hadoop/dev/first/src/main/scala/SparkMeApp.scala:4: object xml is not a member of package com.databricks.spark
[error] import com.databricks.spark.xml
[error]        ^
[error] one error found
[error] (compile:compileIncremental) Compilation failed
[error] Total time: 9 s, completed Sep 22, 2017 4:11:19 PM

Do i need to add any other jar files related to xml? please suggest and please provide me any link which gives information about jar files for different file formats

A: Because you're using Scala 2.11 and Spark 2.0, in build.sbt, change your dependencies to the following:
libraryDependencies += "org.apache.spark" %% "spark-core" % "2.0.0"
libraryDependencies += "org.apache.spark" %% "spark-sql" % "2.0.0"
libraryDependencies += "com.databricks" %% "spark-avro" % "3.2.0"
libraryDependencies += "com.databricks" %% "spark-xml" % "0.4.1"
libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "1.0.6"

*

*Change the spark-avro version to 3.2.0: https://github.com/databricks/spark-avro#requirements

*Add "com.databricks" %% "spark-xml" % "0.4.1": https://github.com/databricks/spark-xml#scala-211

*Change the scala-xml version to 1.0.6, the current version for Scala 2.11: http://mvnrepository.com/artifact/org.scala-lang.modules/scala-xml_2.11
In your code, delete the following import statement:
import com.databricks.spark.xml

Note that your code doesn't actually use the spark-avro or scala-xml libraries. Remove those dependencies from your build.sbt (and the import scala.xml._ statement from your code) if you're not going to use them.