text:
Q: Testing SignalR App in IIS Express Hello everyone I am using visual Studio 2012 and Developed a simple application for vetting purposes only
However I am stuck because when I try to preview the application, I get the Following Error Message
[PlatformNotSupportedException: This operation requires IIS integrated pipeline mode.]
   System.Web.HttpResponse.get_Headers() +9681446
   System.Web.HttpResponseWrapper.get_Headers() +9
   Microsoft.Owin.Host.SystemWeb.OwinCallContext.CreateEnvironment() +309
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.GetInitialEnvironment(HttpApplication application) +246
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContext.PrepareInitialContext(HttpApplication application) +15
   Microsoft.Owin.Host.SystemWeb.IntegratedPipeline.IntegratedPipelineContextStage.BeginEvent(Object sender, EventArgs e, AsyncCallback cb, Object extradata) +288
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +285
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155

Any ideas on what can be done to resolve this

A: Select your web application project, below Solution Explorer there is a Properties window. Select Development Server > ManagedPipelineMode > Integrated

A: I couldn't find that option Visual Studio 2012 (Ultimate) either. Changing the Server to IIS Express on Project Properties->Web tab worked for me though.
Edit: Apparently that option becomes available when switching to IIS Express.

A: If everything else fails, see if your project has a vwd.webinfo file that sets useClassicPipelineMode.
I never looked at this file before.  I did just for fun a few days ago and found the following:
<VisualWebDeveloper>
    <iisExpressSettings windowsAuthentication="enabled" anonymousAuthentication="disabled" useClassicPipelineMode="true" sslPort="44300"/>
</VisualWebDeveloper>

I changed the "useClassicPipelineMode" value and my headaches went away!

A: Your Application Pool is in classic mode but your Application need integrated mode to fire.  change it to Integrated Mode:
Open IIS Manager
Application Pool
select pool that your app are run in it
In right panel select Basic Setting
Manage Pipeline Mode change to Integrated


text:
Q: Populate Datatable with json values I'm making a database search and returns a json. I'm trying display this data using datatable but without success.
This is my code:
HTML

            Id
            Cat
            Name
            Code

JS
var data = dados.responseJSON[2].Value[0];

settings.myTable.DataTable({
    data: dados.responseJSON[2].Value[0],
    columns: [
        { data: 'Id' },
        { data: 'Id' },
        { data: 'Cat' },
        { data: 'Name' },
        { data: 'Code' },
    ]

    /****************
         WHAT MORE??
     *****************\

});

My variable data is the ajax success, when I do console.log in data I can see the values. Have all json objects and is the exactly name inside my th tables.
I think that I need insert something code more to populate the table. When I run this code isn't returned any error.
What wrong I'm doing?

A: Make sure you have data from your json in the format of array of objects,
e.g:
var data=
    [
        {
            "name":    "Tiger shroff",
            "place":   "Mumbai",
            "salary":   "3,00,00,000",
            "age":      "27",
            "office":   "Lower Parel",
            "id":       "120"
        },
        {
            "name":    "Salman Khan",
            "place":   "Central Jail",
            "salary":   "1,00,00,000",
            "age":      "51",
            "office":   "Mumbai",
            "id":       "420"
        }
    ]

Now you can define your columns in datatable function as per keys in the object.
$('#table').DataTable( {
data: data,
columns: [
      { data: 'name' },
      { data: 'place' },
      { data: 'salary' },
      { data: 'id' }
    ]
});

redpajama_set_name: RedPajamaStackExchange


text:
Q: PIC 16f628a succesfully programmed and simulated but not working on circuit I simulated this circuit successfully in proteus but it doesn't work on breadboard.
The motor is unipolar stepper motor
I checked the motor and ULN2003A darlington transistor IC.
They work perfectly. Only problem is with the pic.  I used a 16f628a
edit 1: programming device detects and programs the PIC. but when i put the PIC on the breadboard it doesnt do anything.
edit 2: programming device is "brenner 8" and software is "USburn"
edit 3: fixed circuit and codes after answers and comments
edit 4:  after fixing; only 2 leds are constantly lit and nothing else happened.
edit 5: (May 10th 2019 11:15 hours GMT) it doesnt work no matter what i tried (i tried all answers to this date). Fortunately the teacher gave me a decent grade. I will try with a pickit 3 if i want to try again(currently using a brenner 8).

// CONFIG
#pragma config FOSC = INTOSCIO  // Oscillator Selection bits (INTOSC oscillator: I/O function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN)
#pragma config WDTE = OFF       // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = OFF      // Power-up Timer Enable bit (PWRT disabled)
#pragma config MCLRE = OFF      // RA5/MCLR/VPP Pin Function Select bit (RA5/MCLR/VPP pin function is digital input, MCLR internally tied to VDD)
#pragma config BOREN = OFF      // Brown-out Detect Enable bit (BOD disabled)
#pragma config LVP = OFF        // Low-Voltage Programming Enable bit (RB4/PGM pin has digital I/O function, HV on MCLR must be used for programming)
#pragma config CPD = OFF        // Data EE Memory Code Protection bit (Data memory code protection off)
#pragma config CP = OFF         // Flash Program Memory Code Protection bit (Code protection off)

#include <xc.h>

void wait();

void main(void)
{
    CMCON = 7;
    TRISA = 255;
    TRISB = 0;
    PORTB = 1;
    PORTA = 0;

    int portb_value = 1;
    int minimum_step_count = 3;
    int counter = 0;

    wait();

    while(1)
    {
        if(PORTA == 1)
        {
            while( counter < minimum_step_count )
            {
                counter++;
                if(portb_value != 16)
                    portb_value=2*portb_value;
                if(portb_value == 16)
                    portb_value=1;
                PORTB = portb_value;
                wait();
            }
            counter=0;
        }
        if(PORTA == 2)
        {
            while( counter < minimum_step_count )
            {
                counter++;
                if(portb_value == 1)
                    portb_value=16;
                if(portb_value != 1)
                    portb_value=portb_value/2;
                PORTB = portb_value;
                wait();
            }
            counter=0;
        }

            PORTB = 0;

    }

}

void wait()
{
    int time = 0;
    while( time < 30000 )
    {
        time++;
    }
}

A: You need to set the configuration. See the datasheet 14-1.
In particular, set /MCLR to an input or tie it to Vdd with a 10K resistor and set the clock up to use the internal RC clock and disable the WDT.

While you can typically set this in the IDE, you should insert pragma statements to set it in your code. Here is an example (not suitable for your situation) from this tutorial.

As mentioned in the comments, you should either tie inputs to a known voltage or enable the internal pull-up resistors (see the datasheet for details). If the /MCLR pin is enabled for use as /MCLR function and you decide to add a reset switch, be sure to follow the datasheet recommendation for a series resistor of 50-100\$\Omega\$.

A: Do you have the program configured to use the internal oscillator? (Page 99 of the datasheet) You should also try tying the MCLR pin to Vdd or use one of the circuits described on page 108
EDIT:
Be sure to add a 0.1uF decoupling capacitor near the power input of the microcontroller.
There are some additional problems I noticed with your code. You should increase the time for the wait() function since 30,000 ticks is going to be a short period of time. I would use an unsigned int and take it to 150,000. The other thing is that you need to change the second if statement in your while loops to an else if. Currently when portb_value == 1 then it gets changed to 16, it makes portb_value != 1 for the next if statement, and so it becomes 8 by the time it gets written to PORTB.
Can you also confirm electrically that the switches are working?

A: These pics can be programmed in low voltage mode or high voltage mode. You have chosen low voltage with
    #pragma config LVP = ON
In this mode, pin RB4 is not a programmable I/O and becomes a program mode select input. As it's not connected, the PIC might be in program mode - Unless you have a good reason, always use high voltage programming...... so
#pragma config LVP = OFF
Also, int minimum_step_count = 3; should probably be 4
Also maybe the higher bits set in port A are set. Try just looking at 2 bits
if((PORTA & 3) == 1) ...
if((PORTA & 3) == 2) ...
or better
while((PORTA & 3) == 1) ...
while((PORTA & 3) == 2) ...

A: I am unable to comment because i have less than 50 rep so I am writing here. You are writing code in MPLAB, so one of the thing that could lead to a problem you're having is that when you create a project in MPALB you have to select a hardware tool you are going to use, and your code is configured for that kind of tool i guess. You can check if your tool is present in selection menu.
Did you checked that all wires are connected properly, if not it could create a problem.
Check if your power source is good enough (voltage, amperage).
Last but not to be ignored is your pic functional? Sometimes hardware tool can detect your controller but that doesn't mean it's working propertly.

A: To be honest, I wont suggest you to use simulator software to predict the behaviour of your circuits, esp the ones revolving around microcontrollers. Reason being that, the model of MCU fed into the sim software is too "forgiving" meaning that it overlooks most of the mistakes you make. These mistakes would, however, produce a completely output different in hardware implementation.
Now coming to why your circuit isnt working? Here are a few pointers -

*

*double check the connections - particularly Vcc and Gnd. If ground isnt connected, control signals will have a floating voltage (undefined voltage state), hence the motor wont function as expected.

*Instead of driving a stepper directly, check the circuit (hardware implementation) by controlling a normal dc motor first. Simply send a constant HIGH or a variable voltage signal to ULN2003. If the motor shaft rotates, then be happy there is no issue with your hardware implementation. Simply

*Once hardware is okay, focus on the software. Set the port pins as output. Check the clock pulse, reset pulse and then phase voltage pattern (generated by the uC) on a DSO (you can use the simulator for the last one). Check if the motor phases are powered in the proper sequence.

*It is always nice and convenient to have a LED (or LEDs) connected to the uC. Use this LED to indicate the current status of the code. This can give you a visual indication of the code flow. After every phase change, blink the LED once to check whether the phase signals are generated properly or not.


text:
Q: problema com expressoes regulares em php eu estou com um problema em PHP. Eu criei um sistema de busca com php sem utilizar banco de dados. a busca funciona perfeitamente, o sistem consegue buscar uma palavra nos arquivos, o problema está na exibição  dos resultados da busca, o sistema antes exibia o nome dos arquivos, porém estou utilizando expressões regulares para exibir o title da página, caso exista. o código funciona perfeitamente apenas quando não há quebras de linhas após o . Porém, se eu der um simples enter após o  o código não funciona corretamente. Eis os códigos:

index.php
<form action="busca.php" method="get">
<input type="text" name="s">

<input type="submit">
</form>

busca.php
<?php

//verifica se existe o campo $_POST['pesquisa'] vindo do formulário
$pesq = (isset($_GET['s'])) ? trim($_GET['s']) : '';

        //verifica se o campo está vazio
        if(empty($pesq)){
            echo 'Digite no campo de Busca';
        }else{
            //pasta onde está os arquivos da pesquisa
            $pasta = "arquivos";
            //arquivo atual
            $atual = "$pasta/busca.php";

            //faz a listagem dos arquivos da pasta indicada, e atribui a um array
            $busca = glob("$pasta/*.{php,html}", GLOB_BRACE);

            //percorre o array
            foreach($busca as $item){
                    //verifica se o arquivo não é o atual
                    if($item !== $atual){
                        //abre o arquivo
                        $abrir = fopen($item, "r");
                        //faz um loop até chegar o final do arquivo
                        while(!feof($abrir)){
                             //ler arquivo
                            $lendo = fgets($abrir);
                            //remove os caracteres html e php
                            $conteudo = $lendo;
                            $lendo = strip_tags($lendo);

                            //verifica se tem algum um item da pesquisa
                            if(stristr($lendo, $pesq) == true){
                                //remove a extensão .php
                                $dados = str_replace(".php", "", $item);
                                //retorna o nome apenas do arquivo
                                $dados = basename($dados);
                                preg_match_all('/<title[^>]*>(.*?)<\/title>/',$conteudo,  $matches, PREG_PATTERN_ORDER);
                                $title = isset($matches[1][0]) ? $matches[1][0] : $dados;
                                //coloca o link no array
                                $result[] = ''. $title.'';
                                //apaga a variavel $dados
                                unset($dados);
                            }
                            //apague a variavel lendo
                            unset($lendo);
                        }
                        //fecha o arquivo
                        fclose($abrir);
                    }
            }

            /*IMPRIMIR O RESULTADO*/

            //verifica seo result existe
            if(isset($result) && count($result) > 0){
                //remove os resultado iguais
                $result = array_unique($result);

                echo '
';

                //percorre o array
                foreach($result as $link){
                    echo "
$link
";
                }
                echo '
';
            }else{
                echo 'Nenhum resultado na busca';
            }

}
?>

A: Tente utilizar a flag s ou m. Seria assim: preg_match_all('/expressao/s', ...).
A flag s serve para considerar todos os caracteres ao utilizar o ., incluindo newlines (que não são consideradas por padrão).
Já a flag m serve para considerar todas as linhas na expressão, que por padrão considera apenas uma linha de cada vez.
http://php.net/manual/pt_BR/reference.pcre.pattern.modifiers.php

A: Você estava procurando o título na mesma linha em que buscava seu termo, o que é mais difícil de acontecer, é melhor acumular todo o arquivo para fazer a busca do título, e como o Oeslei disse, faltam as flags que apontam a procura para todo o arquivo e com quebra de linha, no caso usei as duas sm veja:
<?php

//verifica se existe o campo $_POST['pesquisa'] vindo do formulário
$pesq = (isset($_GET['s'])) ? trim($_GET['s']) : '';

//verifica se o campo está vazio
if(empty($pesq)){
    echo 'Digite no campo de Busca';
}else{
    //pasta onde está os arquivos da pesquisa
    $pasta = "arquivos";
    //arquivo atual
    $atual = "$pasta/busca.php";

    //faz a listagem dos arquivos da pasta indicada, e atribui a um array
    $busca = glob("$pasta/*.{php,html}", GLOB_BRACE);

    $lendo = "";
    $conteudo = "";

    //percorre o array
    foreach($busca as $item){
            //verifica se o arquivo não é o atual
            if($item !== $atual){
                //abre o arquivo
                $abrir = fopen($item, "r");
                //faz um loop até chegar o final do arquivo
                while(!feof($abrir)){
                     //ler arquivo
                    $lendo = fgets($abrir);
                    //remove os caracteres html e php
                    $conteudo .= $lendo;
                    $lendo .= strip_tags($lendo);

                }

                //verifica se tem algum um item da pesquisa
                if(stristr($conteudo, $pesq) == true){
                    //remove a extensão .php
                    $dados = str_replace(".php", "", $item);
                    //retorna o nome apenas do arquivo
                    $dados = basename($dados);
                    preg_match_all('/<title[^>]*>(.*?)<\/title>/sm',$conteudo,  $matches);
                    //var_dump($conteudo);
                    //var_dump($matches);
                    $title = isset($matches[1][0]) ? $matches[1][0] : $dados;
                    //coloca o link no array
                    $result[] = ''. $title.'';
                    //apaga a variavel $dados
                    unset($dados);
                }

                //fecha o arquivo
                fclose($abrir);
            }
    }

    /*IMPRIMIR O RESULTADO*/

    //verifica seo result existe
    if(isset($result) && count($result) > 0){
        //remove os resultado iguais
        $result = array_unique($result);

        echo '
';

        //percorre o array
        foreach($result as $link){
            echo "
$link
";
        }
        echo '
';
    }else{
        echo 'Nenhum resultado na busca';
    }

}

Funciona, mas recomendo rever a lógica desse código.


text:
Q: UWP PreLoaded SQLite I am trying to copy a preloaded SQLite db into my UWP app.  On the initial installation it copies the "test.db", but the size is 0 bytes and there are no tables or data.  The original db is 1300 bytes with data and tables.
Another factoid...when I create the app Using Visual Studio 2017 and compile and run/debug the app it works fine, but when I sideload the appx file or download from the Windows Store the db is empty.
Here is the code that I am using:
  Task task = CopyDatabase();

 private async Task CopyDatabase()
    {
        bool isDatabaseExisting = false;

        try
        {
            StorageFile storageFile = await ApplicationData.Current.LocalFolder.GetFileAsync("Express.db");
            isDatabaseExisting = true;
        }
        catch
        {
            isDatabaseExisting = false;
        }

        if (!isDatabaseExisting)
        {
            StorageFile databaseFile = await Package.Current.InstalledLocation.GetFileAsync("Express.db");
            await databaseFile.CopyAsync(ApplicationData.Current.LocalFolder, "Express.db", NameCollisionOption.ReplaceExisting);
        }
    }

I'm not getting any error messages.

A: Does the your database file deployed correctly to the target system?
To confirm it, see your deployed - "Package" - folder. Open command prompt with administrative previleges, and see the directory

c:\Program Files\WindowsApps\your-app-id

If your database file deployed successfully, you can see it in the directory. If not, you may need to change the deploy settings.
To deploy the file to target machine, you should set the property of the one as ...

'BuildAction=Contents'
'Copy to output directory'='Always Copy'

You can set it from solution explorer and right-click the your database file.
If you succeeded the deploying file, your code will copy your database file to app local folder.

c:\Users\YOUR-USER-ID\AppData\Local\Packages\YOUR-APP-ID\LocalState

A: First, you would need to use await for your CopyDatabase method.
Second, I suggest you call this method in MainPage_Loaded event handler instead of MainPage's Constructor.
public MainPage()
{
    this.InitializeComponent();
    this.Loaded += MainPage_Loaded;
}

private async void MainPage_Loaded(object sender, RoutedEventArgs e)
{
    gui = this; InitializeComponent();
    await CopyDatabase();
    DataSetup();
    CreateNewChartButton.Visibility = Visibility.Collapsed;
    SignInButton_Click(null, null);
}


text:
Q: How to enable Microsoft Access Driver (*.mdb, *.accdb) in Microsoft Azure windows server 2012 R2? I have virtual machine(Windows server 2012 R2) in Azure server (Plan as A0).
I cant find ODBC Data source in Administrative Tools.
I want to use below ODBC connection for my application.
 new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb, *.accdb)};charset=UTF-8; DBQ=$destination_file; Uid=$db_username; Pwd=$db_password;") or die("Invalid user credentials for Access file.");

A:
I cant find ODBC Data source in Administrative Tools.

It seems strange, I have created an A0 VM on Azure to have a further check, I could get [ODBC Data Source] from Administrative tool:

Could you please try to search 'Administrative tool' again in Azure VM and double check if it works, or try to set up another VM to see if the issue can be reproduced.


text:
Q: Submit Button bypasses Captcha security I have been having spam through my contact form, to cut a long story short my captcha is not working. I have used Sweet Captcha (http://sweetcaptcha.com/) as this offers more user friendly approach. When a user clicks on submit it posts to my email as normal, however it does not require the user to preform the captcha, therefore resulting in spam from Viagra companies etc... Would you be able to have a quick look and see where I'm going wrong. Any help is appreciated as always.
Thanks
Andy
   <?php

// require sweetcaptcha php sdk, don't forget to set up your credentials first
require_once('sweetcaptcha.php');

if (empty($_POST)) {
// print sweetcaptcha in your form
?>

        <input type="text" name="name" id="name" placeholder="Your Name"       required="required" requiredmessage="Name is required."/>

        <input type="text" name="email" id="email" placeholder="mail@example.com" required="required"/>

        <input type="text" name="web" id="web" placeholder="www.example.com   *Not Mandatory*" />

        <textarea name="text" placeholder="How can I help?" required="required"></textarea>

       <?php echo $sweetcaptcha->get_html(); ?>

       <input type="submit" />
       </form>

 <?php
 } else {

// looks like someone has submitted a form, let's validate it
if (isset($_POST['sckey']) and isset($_POST['scvalue']) and $sweetcaptcha-  >check(array('sckey' => $_POST['sckey'], 'scvalue' => $_POST['scvalue'])) == "true") {
// success! your form was validated
// do what you like next ...
echo "Success! carry on if you will";
}
else {
// alas! the validation has failed, the user might be a spam bot or just got the result  wrong
// handle this as you like
echo "Boohoo! captcha validation failed!";
}

}

?>

A: switch to reCaptcha, or some alternative captcha system, it seems..
your code seems to be right (i could nitpick about == vs === and isset/empty vs array_key_exists and _SERVER["REQUEST_METHOD"], but im lazy), so... either the check() call is bugging up, or sweetchaptcha is broken..
as a scary funfact, XRumer/Botmasterlabs have cracked reCaptcha and the PhpBB/Gmail/Yahoo/Hotmail registration captcha over the years REPEATEDLY (at least until ~2010 , i haven't kept updated with their changelogs since..)


text:
Q: How to run Dotnet run in background on windows server from Teamcity build step In a integrationtest running on Teamcity I am trying to

*

*Launch a ASPNET Core app using dotnet run

*Run Integration test

*Stop webserver

Using powershell I am then trying to run the webserver in the background using
start-job -name someName -scriptblock {dotnet run}

But this just gives me

16     someName BackgroundJob   Completed True localhost  dotnet run

But the webserver is not running and no error is outputtet
Is there another way to launch a kestrel server in the background using dotnet command?

A: Found a solution
But swapped to using the compiled version of the webserver instead of dotnet run
Doing this to launch my webserver build step
Start-Process .\someName.exe -NoNewWindow -PassThru

Run tests
And this to end it
Stop-Process -name YourServiceName

Works


text:
Q: Intermittent network problems troubleshooting I have some CAT6 wiring installed in my home with a general topology like following:
Cable modem->router->(dumb netgear hub in the closet)->(Dell smart switch)->WiFi AP.
I noticed that whenever I access the net via WiFi, network sometimes just stops transmitting data. Attempt to access router by IP in this case will just hang until timeout. Yet I can access WiFi AP. Eventually it will recover.  I tried different WiFi access points and symptoms are the same, I don't think it's wifi problem. I suspect that it may be a problem with Dell's hub but since it's intermittent it's really hard to track down.
Dell switch is PowerConnect 2808 or something of the same line that I bought few years ago.
So how do I go about troubleshooting it further?
Is there some good piece of software or some other tool that I can use to troubleshoot the problem. May be something that can ping router regularly and give me a time line of outages?
Any advice?


text:
Q: Connect to MongoDB on Azure (from client) I am trying to setup my MongoDB dev environment using Azure VM.  The VM is up and running MongoDB 2.6.6, and I can SSH to the VM and run MongoDB just fine..
However, I am unable to connect to Mongo from any external client (i.e. cmd shell mongo client, or robomongo).  I'm using the public IP given to me, and using the default port.  I've also tried to edit the /etc/mongodb.conf to specify the port number (port=27017), and have restarted the service.. but that didn't seem to make a difference at all..

A: I'm assuming this will be moved to ServerFault. In the meantime: There are two things required for external access, if you just spun up a new MongoDB instance:

*

*In mongod.conf, the default configuration for bind_ip is 127.0.0.1, which means mongod is bound to the local interface. Comment out this line to listen on all interfaces

*Azure-specifically: Make sure you created an input endpoint to allow external traffic to reach the MongoDB VM. You can use any port for the external-facing side, and just have it map to 27017 internally. From a convention perspective, It makes sense to use 27017 both externally and internally, since that's the default MongoDB port.

A: The port that mongodb uses is not open for external access. One way you can access it from the client is to open ssh tunnel. Default port for mongodb is 27017:
ssh -f  -L 27017::27017
Read more on ssh tunneling here:
http://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html


text:
Q: 500 - Internal server error when publish asp.net web App on network solution plesk I'm uploaded all files of asp.net project to plesk of www.networksolutions.com and when open url in the web browser this message will appear
"500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed."
how i can solve the problem
Note : i'm trying to edit web.config but this is not useful
this is my web.config
<configuration>
<connectionStrings>
<add name="ContestConn" connectionString="****" />
</connectionStrings>

<system.web>
    <compilation debug="true" targetFramework="4.0">
        <assemblies>
            <add assembly="System.Design, Version=4.0.0.0, Culture=neutral,
     PublicKeyToken=B03F5F7F11D50A3A"/>
            <add assembly="System.Web.Extensions.Design, Version=4.0.0.0,
    Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
            <add assembly="System.Windows.Forms, Version=4.0.0.0,
    Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
    </compilation>

    <customErrors mode="Off"/>
    <compilation debug="true"/>

    </system.web>

    <system.webServer>
    <httpErrors errorMode="Detailed" />
    <asp scriptErrorSentToBrowser="true"/>
    <validation validateIntegratedModeConfiguration="false" />
    <defaultDocument>
    <files>
    <add value="index.aspx" />
    </files>
    </defaultDocument>
    </system.webServer>

    </configuration>

A: 2 things that you can do here.

*

*Check event logs during the time of issue. If its an application issue, the exception will be listed here.

*Enable Freb logs for the website and 500 status code. You can follow this article to enable FREB
Please share results from FREB logs here. I can provide more insights based on what FREB captures.


text:
Q: Find system behavior: P or I type? In control theory, how do I find out of which type a system is? P-type or I-type (P = proportional and I = integral)
Consider the following nonlinear system with x as output:
$$
\dot{x} = A(x) + Bu
$$
$$
y = x
$$
Is this system of I-type because of 1/s (integrator)
$$
x = \int\dot{x}
$$
Or is it not that simple to claim of which type the system is?
How is it done?
EDIT
I am using a PI controller. And the complete state space representation using A(x) is (a, b and g are constants > 0)
$$
\dot{x} = -a\sqrt{2gx}+bu
$$

A: For single input , single output linear systems we define 'type' according to the number of integrators (number of free 's' in the denominator) in the open loop transfer function. A type zero system would have zero integrators, a type one, one integrator, and so forth.
The significance of classifying system types gives you an idea of how the system will behave to a specific type of input signal if you apply simple, proportional feedback to the open loop system.
For a type 0 system with step input you would see a finite steady state error, proportional to the loop gain.
For a type 1 system with step input you would see a zero steady state error.
This page provides a more complete summary (table) for type systems (denoted by N) and the expected output.
For nonlinear systems you cannot generally apply the same principles so a 'type' is not defined.
For type you might be confusing the 'type' of control compensator (filter): P, I, PI or PID types which more often refer to the control compensator that's applied in the control loop to control a system. As an open loop transfer function yo determine type (0, 1,2 , etc.) you can consider the compensator together with the plant as the open loop transfer function - to define the type you would get after closing the loop.

A: Several things are wrong here:
(i) if A(x) defines a non-linear system you cannot apply state space analysis without linearising around an operating point via the Jacobian
(ii) x=xdot/s doesn't really make any sense because you're mixing time domain and Laplace domain, but even so, that expression is true for every dynamic system under the sun, and just means that the x is the integral of the derivative of x
(iii) p-type and I-type are meaningless terms when applied to a complete system - they may refer to the controller within the system, as subsets of 'PID' or 'three-term' control.
If you can define A(x) and B and we may be able to advise on the appropriate analysis method.


text:
Q: How to perform input redirection in python like the bash >? I want to feed text files to a C program, with bash I can do ./prog <file, how would you do the same in python ?

A: You can do that via subprocess.check_call:
import subprocess

subprocess.check_call(["prog"], stdin=open("/path/to/file"))


text:
Q: How can I add arbitrary `data-` attributes to a block's `edit()` container? For example:
Before:

After:

A: You can define a getEditWrapperProps function when you register the block, and return an object that sets the props for the wrapper.
The function will be passed the props for the block, in case those are needed.
registerBlockType( 'wpse/example-get-edit-wrapper-props', {
    title : 'getEditWrapperProps() Example',
    // ...

    getEditWrapperProps( props ) {
        return {
            'data-foo': 'bar',
            'data-quix': props.quix || false,
        };
    },
} );

That also lets you change any of other other props that get passed to the container, like id, className, onClick, tabIndex, etc. Obviously, you probably shouldn't mess with those unless you really know what you're doing, and understand the consequences.
Declaration in Gutenberg source: 1, 2.
Examples in Core blocks: 1, 2, 3


text:
Q: How can I replace an item in an array with an object? album.songs = [1234545, 43524];
const replaced = album.songs.map( e => { e = Object.assign({}, { _id : 123 }) } );

Output: undefined
My problem is that I would like to replace my items in 'songs' array with a specific object. It works with strings or numbers but not with objects.

A: Some notes:

*

*With map, you return the object you want the new array to contain. Assigning to the parameter e just changes the value of the parameter, which isn't retained anywhere.

*There's no need for Object.assign there, just create the object directly, so:
const replaced = album.songs.map(e => { return { _id : e }; } );

or the concise form:
const replaced = album.songs.map(e => ({ _id : e }) );

Note that since we want to return an object created with an object initializer, and the { in the initializer would start a function body, we wrap the value we want to return in ().

*We can even take advantage of shorthand property notation if we change the name of the parameter to _id:
const replaced = album.songs.map(_id => ({ _id }) );

Live Example:

const album = {songs: [1234545, 43524]};
const replaced = album.songs.map(_id => ({ _id }) );
console.log(replaced);

A: You don't assign to the function parameter, since it only exists for that function, and it's not like you're dereferencing a pointer.
Just return the object. An arrow function automatically returns its expression if you don't use curly braces to denote the body.

var songs = [1234545, 43524];

const replaced = songs.map(e => ({_id: e}));

console.log(replaced);

A: Map function expects you to return a value for each iteration:

console.log([1, 2].map(n => n * 2))

In your case, it should be:

album.songs.map( e => ({ _id : e }))


text:
Q: Creating multiple pngs with ImageMagick causes slow desktop I am running Linux Mint 17, Cinnamon 2.4.8
Hello, I am using ImageMagick to create large 500+ png images.
This causes Cinnamon to go very slow.
I would understand if Cinnamon is slow WHILE I am rendering many images, however, Cinnamon is really slow even AFTER the renders are complete.
The only way to remedy this is to do a reboot, but I would really like another solution if possible.
Command free BEFORE render
             total       used       free     shared    buffers     cached
Mem:      16384584    1066072   15318512      20212      61948     407592
-/+ buffers/cache:     596532   15788052
Swap:     16727036          0   16727036

Command free DURING render
             total       used       free     shared    buffers     cached
Mem:      16384584    1230524   15154060      21148      69540     457700
-/+ buffers/cache:     703284   15681300
Swap:     16727036          0   16727036

Command free AFTER render
             total       used       free     shared    buffers     cached
Mem:      16384584    1263932   15120652      20760      70416     460352
-/+ buffers/cache:     733164   15651420
Swap:     16727036          0   16727036

A: Memory Issue
This is most probably a memory issue.
One thing to do is to limit the memory usage of imagemagick. As mentioned here: -limit type value, you can limit your usage using these options:
-limit memory 512MiB -limit map 512MiB

Further, as you're saying that it is slow even AFTER imagemagick is run, in that case look for some ghost processes left over by imagemagick which are making it not release the RAM. And kill those processes.
ps aux | grep convert    #assuming you used convert

Another Possibility : Disk full due to temporary files
Check your /tmp directory or some other directory it might be storing its temporary files and see if that corresponding to it has space or not. That might be a probably reason. Reboot usually deletes temp files and relieves space.


text:
Q: Redlock error in node js I am trying to use redlock module but I am facing an error that I can't get through.
Here is what my redlock file looks like :
var redis = require('redis');
var Redlock = require('redlock');
var logger = require('./logger.js');

var client;

module.exports.redisConnection = function(port,host){
    client = redis.createClient(port,host);

    client.on('connect',function(){
        logger.info("Redis default connection open to "+host+":"+port);
    });

    client.on('error',function(err){
        logger.info("Redis default connection error "+err);
        logger.info("Redis Path : "+host+":"+port);
    });

    process.on('SIGINT', function() {
        client.quit();
        logger.info("Redis default connection disconnected");
        process.exit(0);
    });
};

var redlock = new Redlock(
    [client],
    {
        driftFactor : 0.01,
        retryCount : 15,
        retryDelay : 200
    }
);

redlock.on('clientError', function(err) {
    logger.info("A Redis Error Has Occurred : "+err);
});

module.exports.lockRessource = function(ressource_id,callback){
    redlock.lock(ressource_id,2000,function(err,lock){
        if(err){
            callback(err,null);
        }
        else{
            callback(null,lock);
        }
    });
};

module.exports.unlockLock = function(lock,callback){

    lock.unlock(function(err){
        if(err){
            callback(true,null);
        }
        else{
            callback(null,true);
        }
    });
};

When I try calling the lockRessource function from another module, I get an error :
2016-04-14T16:28:55.020 - info:  TypeError: Cannot read property 'set' of undefined
    at request (/usr/app/node_modules/redlock/redlock.js:260:18)
    at /usr/app/node_modules/redlock/redlock.js:314:12
    at Array.forEach (native)
    at attempt (/usr/app/node_modules/redlock/redlock.js:313:24)
    at /usr/app/node_modules/redlock/redlock.js:318:10
    at Promise._execute (/usr/app/node_modules/redlock/node_modules/bluebird/js/release/debuggability.js:272:9)
    at Promise._resolveFromExecutor (/usr/app/node_modules/redlock/node_modules/bluebird/js/release/promise.js:474:18)
    at new Promise (/usr/app/node_modules/redlock/node_modules/bluebird/js/release/promise.js:77:14)
    at Redlock._lock (/usr/app/node_modules/redlock/redlock.js:249:9)
    at Redlock.lock (/usr/app/node_modules/redlock/redlock.js:111:14)
    at Object.module.exports.lockRessource (/usr/app/redisdata.js:42:10)
Do you have any idea where this could come from ? It seems like I am not doing anything crazy with that module.
Thanks a lot !

A: Init redlock after client was assigned.
Your redlock file will look like:
var redis = require('redis');
var Redlock = require('redlock');
var logger = require('./logger.js');

var client;
var redlock;

module.exports.redisConnection = function(port,host){
    client = redis.createClient(port,host);
    redlock = new Redlock(
        [client],
        {
            driftFactor : 0.01,
            retryCount : 15,
            retryDelay : 200
        }
    );

    client.on('connect',function(){
        logger.info("Redis default connection open to "+host+":"+port);
    });

    client.on('error',function(err){
        logger.info("Redis default connection error "+err);
        logger.info("Redis Path : "+host+":"+port);
    });

    redlock.on('clientError', function(err) {
        logger.info("A Redis Error Has Occurred : "+err);
    });

    process.on('SIGINT', function() {
        client.quit();
        logger.info("Redis default connection disconnected");
        process.exit(0);
    });
};

module.exports.lockRessource = function(ressource_id,callback){
    redlock.lock(ressource_id,2000,function(err,lock){
        if(err){
            callback(err,null);
        }
        else{
            callback(null,lock);
        }
    });
};

module.exports.unlockLock = function(lock,callback){

    lock.unlock(function(err){
        if(err){
            callback(true,null);
        }
        else{
            callback(null,true);
        }
    });
};

When you want to use that module, call redisConnection first.
Assume the name of the file above is "redlock.js".
resource = require('./redlock.js')

resource.redisConnection(6379, "127.0.0.1")
resource.lockRessource("your resourceId", function(err, lock) { })


text:
Q: Error:Unable to locate adb within SDK in Android Studio Does anyone know what this means? When I click the "run" button on my simulator I get this message.

Throwable: Unable to locate adb within SDK

I am running the latest version, 0.8.14.

A: Finally after several hours of investigation I think I have another solution for everyone having issues with AVD Manager "Unable to locate adb".
I know we have the setting for the SDK in File -> Settings -> Appearance & Behavior -> System Settings -> Android SDK. This it seems is not enough! It appears that Android Studio (at least the new version 4) does not give projects a default SDK, despite the above setting.
So, you also (for each project) need to go to File -> Project Structure -> Project Settings -> Project, and select the Project SDK, which is set to [No SDK] by default.
If there's nothing in the drop-down box, then select New, select Android SDK, and navigate to your Android SDK location (normally C:\Users[username]\AppData\Local\Android\Sdk on Windows). You will then be able to select the Android API xx Platform. You now should not get this annoying adb error.
HTH

A: Just go your SDK Manager and install Android SDK Tools

A: In my case it was a simple case of incorrect path.
Simply went to Project Structure dialog (alt+ctrl+shift+s) and then to platform->SDK's and fixed Android SDK home path.

A: Detailed instructions with screenshots (works for M1 Mac and Windows 11)
Make sure you have the latest android studio from https://developer.android.com/studio (not from homebrew or some other source)
In android studio, open a project

*

*Install Android SDK Command-line Tools and Android SDK Platform-Tools
Tools - SDK Manager

*Select a project SDK
File - Project Structure

*Add the platform-tools and cmdline-tools to your Classpath
File - Project Structure

A: For anyone who is still running into this issue. I had a similar problem where I could see my device from adb on the command line using adb devices but Android Studio would not recognize when I had a device attached and would throw either:

*

*Unable to locate adb within SDK or

*Unable to obtain result of 'adb version'
I had tried start/stops of adb, uninstalls, of platform-tools, and more. What I found was that inside my C:\Users\<UserName>\AppData\Local\Android folder I had multiple sdk folders. I performed the following:

*

*Unistall Platform-Tools using Android Studio's SDK Manager

*Deleted all platform-tools\ directories within each C:\Users\<UserName>\AppData\Local\Android\sdk* directory

*Reinstalled Platform-Tools using Android Studio's SDK Manager

Hope this helps someone someday with their issue.

A: The ADB is now located in the Android SDK platform-tools.

*

*Check your [sdk directory]/platform-tools directory and if it does not exist, then open the SDK manager in the Android Studio (a button somewhere in the top menu, android logo with a down arrow), switch to SDK tools tab and and select/install the Android SDK Platform-tools.

*Alternatively, you can try the standalone SDK Manager: Open the SDK manager and you should see a "Launch Standalone SDK manager" link somewhere at the bottom of the settings window. Click and open the standalone SDK manager, then install/update the

"Tools > Android SDK platform tools".

*If the above does not solve the problem, try reinstalling the tools: open the "Standalone SDK manager" and uninstall the Android SDK platform-tools, delete the [your sdk directory]/platform-tools directory completely and install it again using the SDK manager.

*Check your antivirus chest. Sometimes the Antivirus program thinks adb.exe is a virus. If you find it there please restore the file and it will start working. You can also put adb.exe as a safe file in you Antivirus program.

A: I deleted and re-installed the Android SDK Platform-Tools 23 23.0.0. This solved the problem.
Yesterday i had done a complete update of the SDK using SDK Manager, deleting some parts that i believed i no longer needed and downloading updates. Perhaps this was the source of the problem.

A: Got the same problem. MacOS, Android Studio 3.6.1, SDK Android 10.0.
This is the directory where Android studio is looking for adb binary:
$ cd ~/Library/Android/sdk/platform-tools/
➜  platform-tools $ ls
package.xml  platform-tools  signing_request_for.3232179dce22d8a6332018729026ed39f5d5cd0b.1585090071041.platform-tools_r29.0.6-darwin.filelist

However, the binary is in the one directory deeper:
➜  platform-tools $ ls platform-tools
adb  dmtracedump  etc1tool  hprof-conv  make_f2fs  mke2fs.conf  sload_f2fs         sqlite3
api  e2fsdroid    fastboot  lib64       mke2fs     NOTICE.txt   source.properties  systrace

Simply make a soft link to current directory:
➜  platform-tools $ ln -s platform-tools/adb ./
➜  platform-tools $ ls
adb          platform-tools
package.xml  signing_request_for.3232179dce22d8a6332018729026ed39f5d5cd0b.1585090071041.platform-tools_r29.0.6-darwin.filelist

This did trick for me.
P.S. Adding it to the PATH does not help, I can of course run it in terminal then, but Android Studio does not pick up PATH variable from .zshrc in MacOS.

A: If you are using Android Studio and have AVG virus protection, the adb.exe file might be in the Virus Vault. This was my problem.
To fix: Open AVG. Select Options (top right), then Virus Vault. If you see the adb.exe file in there, select it and then click Restore.

A: In Android Studio, Click on 'Tools' on the top tab bar of android studio
Tools >> Android >> SDK Manager  >> Launch Standalone Sdk manager
there you can clearly  see which platform tool is missing , then just install that and your adb will start working properly.
Fully install at-least one Api package (Android Api 23 or 24) .

A: In my case I had no SDK selected for my project(not sure why). Simply went to Project Structure dialog (alt+ctrl+shift+s or button 1 on the screen) and then to project-> Project SDK's was selected <no SDK>. Just changed it to the latest

A: try this:
File->project Structure into Project Structure
Left > SDKs
SDK location select Android SDK location (old version use Press +, add another sdk)

A: yeah I have same experience
The ADB is now located in the platform-tools directory.

*

*korsosa said Check your [sdk directory]/platform-tools directory, if it exists. If not, then open the SDK manager in the Android Studio (a button somewhere in the top menu, android logo with a down arrow), and download&install the Tools > Android SDK Platform-tools.

*If you have platform-tools, you have check adb.exe file.
In my case, that file was broken, so download that platform-tools again

A: If you already have Android SDK Platform Tool installed then go to         File > Settings > System Settings > Android SDK > Launch Standalone SDK Manager.
There you will see in Tools Directory that Android SDK Platform-Tools is uninstalled. So deselect all and check that box and simply click on install button.

A: In my case I have tried the above but seems like adb won't get installed so all what I had to do is copy adb.exe to the folder and worked !
I copied adb.exe and pasted on the following paths in my device:
C:\Users\Your-Device-username\AppData\Local\Android\sdk
C:\Users\Your-Device-username\AppData\Local\Android\sdk\platform-tools
Hope this helps somebody in need.

A: While all these answer might have been correct in my scenario it didn't work. It all started when i uninstalled 2.* android studio version after getting 3.0rc1. But that screw up things and started getting this error. After that i did followed majority of these steps and none of them worked. While analyzing SDK directory i noticed that i have two platform tools folder. The .backup had adb.exe where as the other one didn't. I just copied the .backup files in the other platform-tool folder and it fixed my issue.

A: I don't know probably is too late to answer to this question. But if someone is in my situation and struggling with this problem will useful.
Few antivirus programs detect adb.exe as a virus. You should take a look in the place where antivirus is putting your detected threats and restore it from there. For Avast Antivirus is inside of virus chest
Hope it will be useful for someone !

A: If you have an antivirus (such as AVG), you can take the file out of quarantine.

Click Menu > Quarantine > Check box next to the adb.exe file > Arrow next to delete > Restore
But sometimes, the file will keep reappearing in the quarantine. The way to solve this is by clicking Restore and add exception, or by going to Menu > Setting > General > Exceptions > And adding something like this: C:\Users\Johndoe\AppData\Local\Android\Sdk\platform-tools\
Other antiviruses have similar equivalents of a "quarantine" that the APK file may be in.

A: Open Task Manager and find service adb.exe after saw those service just end it, and run again

A: even after downloading specific required file or everything, we could face file execution error.
a file execution fail could be due to following reasons:
1. user permission/s (inheritance manhandled).
2. corrupt file.
3. file being accessed by another application at the same time.
4. file being locked by anti-malware / anti-virus software.
strangely my antivirus detected adb, avd and jndispatch.dll files as unclean files and dumped them to its vault.
i had to restore them from AVG vault.
configure AVG to ignore (add folder to exception list) folder of AndroidStudio and other required folder.
if you are without antivirus and still facing this problem, remember that windows 7 and above have inbuilt 'windows defender'. see whether this fellow is doing the same thing. put your folder in antivirus 'exclusion' list as the vendor is trusted world wide.
this same answer would go to 'Error in launching AVD with AMD processor'. i don't have enough reputation to answer this question there and there.

A: I had this issue with Android Studio 3, the SDK manager somehow didn't include the full tools in platform-tools folder so I had to download it manually from:
https://developer.android.com/studio/releases/platform-tools.html
then extract it to my android/sdk/platform-tools/ folder

A: if you have adb problem go to tools->sdk manager -> install missed sdk tools
my problem was solved using these way

A: You can download from terminal or cmd like this:
$sudo apt update
$sudo apt install android-tools-adb android-tools-fastboot

//check version or test adb is running or not
$adb version

A: I struggled with this for a while. Tried to install/uninstall various packages under the SDK Manager without success. I even deleted Android Studio and reinstall it, it did not help.
I am running Android Studio 3.3 on OS X 10.14.2. At the end I tried the following:
rm -rf Library/Android/sdk

This removed the whole sdk folder. You should run this command on your home directory in terminal. (it is the default location when you open it)
I then started Android Studio and it could not find the sdk. So it prompted me to download it. I downloaded a fresh SDK and everything was working normally.
It might be an overkill but it worked.

A: My Android Studio version 3.6.1
After getting updated the latest version I have been facing this problem for few hours. My steps to solve this:
-> Updated sdk platform-tools   [though it's not fetching my device yet]
-> Change the USB cable, then my 2 devices both are getting connected with Studio and run my app successfully.
I don't know this silly step might help anyone but U can have a look on that.
I just share my experience, Thanks.

A: For me I was switching to zsh as the default shell on your Mac. Switch back and restart fixed it.

A: After trying all of the above (and more), I googled how to reset Android Studio, which eventually worked for this!
On MAC, delete this folder:
~/Library/Application Support/Google/AndroidStudio4.1

I then checked the adb in the terminal by running adb command, and it was showing up as it should.

When I ran my react-native project with yarn start and yarn android, it failed, but running it a second time worked.

A: Search for adb.exe inside Sdk\platform-tools folder. Go to Android emulator Settings (three dots > settings), uncheck "Use detected ADB location" and point to adb.exe path.

A: For me, just need to

*

*Disable and Enable Developer Options.

*Then Enable USB Debugging. No idea why it disabled by itself.

A:
It worked for me in this way

open your android studio First, and go to SDK manager :

and Copy your Android SDK location then open PowerShell on your windows
and go to that folder like :
cd C:\Users\YOURUSERNAME\AppData\Local\Android\Sdk

then go to platform-tools folder:
cd platform-tools

and then start ADB like this:
.\adb.exe

you can also check if there is any adb.exe by ls or dir in windows command line

if there isn't any platform tools you should first install it and then
paste it into that directory that I've mentioned earlier

you can download platform-tool(adb) from here:
https://developer.android.com/studio/releases/platform-tools

A: This fixed my issue finally  !!!!!


text:
Q: Unity, IAP compilations errors Import 4.1.5 Unity IAP to my project, when try to load to google play see error about Google Billing liblary must be version 4 or newer, update my IAP asset to 4.4.1 and see 42 compilation errors in console

mgur.com/tnFbt.png


text:
Q: What is the SHA-256 hash of a single "1" bit? The definition of SHA-256 appears to be such that the input consisting of a single "1" bit has a well-defined hash value, distinct from that of the "01" byte (since the padding is done based on input's length in bits).
However, due to endianness issues and the fact that no implementations that I can find support feeding in single bits, I can't quite figure out what this correct value is.
So, what is the correct hash of the 1-bit long input consisting of the bit "1"? (not the 8-bit long byte[] { 1 } input).

A: Not sure if I understand your question correctly.
SHA-256 operates with block sizes of 64 bytes (=512bits). This means smaller inputs must be padded first. The result of the padding looks like this:
For Bit 1:    1100000000000...00000000001
For Bits 01:  0110000000000...00000000010

As this results are distinct, the results of the following compression functions will be too. And therefore the hash values are. The standard document explains the padding quite descriptive: http://csrc.nist.gov/publications/fips/fips180-2/fips180-2.pdf

A: There is C code available in section 8 of RFC 4634 to compute the hash of data that is not necessarily a multiple of 8 bits. See the methods whose names are SHA*FinalBits(...).

A: OK, according to my own implementation:
1-bit string "1":
B9DEBF7D 52F36E64 68A54817 C1FA0711 66C3A63D 384850E1 575B42F7 02DC5AA1

1-bit string "0":
BD4F9E98 BEB68C6E AD3243B1 B4C7FED7 5FA4FEAA B1F84795 CBD8A986 76A2A375

I have tested this implementation on several standard multiples-of-8-bits inputs, including the 0-bit string, and the results were correct.
(of course the point of this question was to validate the above outputs in the first place, so use with care...)


text:
Q: Is there a way to display db2 data in grafana We use db2 at our company. I would like to find a way to query db2 for data and display that data in grafana. For example to get a number of completed transactions.
I see grafana does support mysql natively but not db2. Is there a way to just add the db2 driver/libraries?
Worst case is writing queries in python and then simply displaying that recorded data with grafana an effective solution?
Thanks

A: Don't know if you found what you need but in case you didn´t you might consider using 'Db2 rest services' and Grafana plugin 'Simple JSON Datasource'.

A: In the meantime, two suitable datasources have been developed

*

*grafana-odbc-datasource

*grafana-db2-datasource
Unfortunately, both require an enterprise license.
We're currently evaluating other approaches like copying the data in a PostgreSQL database with an ETL-like job.
A generic ODBC/JDBC plugin is really needed.


text:
Q: Find asymptotically equivalent function $f\sim g$ I'm trying to find a asymptotically equivalent function $g$ for $f(x)= \sin{(\frac{\pi}{6^x})} - \dfrac{1}{2}$, ie $f \sim g$.
Should I use $\sin{x}$ Taylor expansion or something else?
Here, $x$ approaches to $1$.

A: Since
$$(\sin(\pi/6^x)-1/2)' = -\ln 6 \cdot\frac{\pi \cos(\pi/6^x)}{6^x} $$
Taylor formula gives us
$$\sin(\pi/6^x)-1/2 = -\ln 6 \cdot\frac{\pi\sqrt{3}}{12}(x-1)+o(x-1) $$
so
$$\sin(\pi/6^x)-1/2 \sim -\ln 6 \cdot\frac{\pi\sqrt{3}}{12}(x-1)$$
as $x\to 1$.


text: Q: Quantile regression categorical data I am planning to do an analysis on socio economic determinants of women health status. For health status, being my dependent variables, I have taken anemia as one of the variable. I want to do see whether the anemia status by different quantiles of wealth varies or not ?. If varies, whether the covariates explain the same relation in each quantiles. I have read literature most of the literature concentrated on dependent being the continuous variable. Some of the health related literature suggested to transform the categorical variable into continuous variable (this I hope will be a last option). What will be an appropriate method to follow for this kind of analysis.


text:
Q: Selecting an item in windows form listbox by typing? I have a listbox with country names. I´m using Windows Forms in VS2015 (C#).
While selecting a name in listBox by typing, it only allows one letter. So if I type "A" it will jump to the first item starting with "A" but if I press "As", listbox viewing the items starting with "s".
I found this answer for combobox and textbox:
Selecting an item in comboBox by typing
but look's like listbox doesn't support AutoCompleteMode.
Is there any solution ?

A: Please, consider implementing your own searching method. ListBox doesn't support required functionallity by design. Anyway, you can prepare a method on TextChanged event for TextBox which at the time searches for results in collection.

A: Here's some sample code.  Drop a TextBox above your ListBox.  Wire up the TextChanged event appropriately, and this should mimic the autocomplete behaviour of a ComboBox (for example)...
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();

        listBox1.Items.AddRange(new[] { "Tom", "Dick", "Harry", "Henry" });
    }

    private void textBox1_TextChanged(object sender, EventArgs e)
    {
        var textBox = (TextBox)sender;
        listBox1.SelectedIndex = textBox.TextLength == 0 ?
            -1 : listBox1.FindString(textBox.Text);
    }
}

A: Check this one maybe:
https://social.msdn.microsoft.com/Forums/vstudio/en-US/a8e31841-1ba9-4990-b0e3-bdee489555af/autocomplete-textbox-on-listbox?forum=csharpgeneral
Or this one:
http://vbcity.com/blogs/xtab/archive/2012/09/22/windows-forms-combining-autocomplete-and-listbox-selection.aspx

A: You should use a ComboBox with DropDownStyle.Simple. The ListBox was never intended to have this functionality, and forcing it to do so is usually a waste of time better spent.
You may also want to consider a third party control.  Telerik, for example, has the DropDownList which extends a ComboBox and makes it do exactly what you want to do, with options on how it does it.


text:
Q: Namespaces and Class names with underscores composer.json contains the following
...
"autoload": {
    ...
    "psr-0":{"Acme": "app/lib"}
},

at app/lib/Acme/Models/Product/Display.php I have the following:
<?php
namespace Acme\Models\Product;
use Eloquent;
use Db;
class Product_Display extends Eloquent
{

I'm lost on how to call that class given the underscore in the Class Name inside of a repository class:
<?php
namespace Acme\Repositories;
use Acme\Models\Product\Display as Product_Display;

...

Product_Display::where('page_id','=',$page_id)->first();

This gives me a Class 'Acme\Models\Product\Display' not found error.
I'm guessing the problem lies in the use Acme\Models\Product\Display as Product_Display, but I've tried several variations none of which seemed to cure the problem.

A: Did you composer dump-autoload? Do this by typing composer dump-autoload in the terminal from the root of your project.
Every time you make changes to your composer.json file you need to allow composer to reconstruct the autoload files. In the case of psr-0 this is all you need to do.
In the case of classmap autoloading, every time you add a file to a directory that is being autoloaded, you need to composer dump-autoload.
edit:
To fix: change use Acme\Models\Product\Display as Product_Display; to use Acme\Models\Product\Display. Change the class name from Product_Display to just Display.
I think I spotted the issue. You have use Acme\Models\Product\Display as Product_Display; but you need to use Acme\Models\Product\Product_Display; since the last part of the use statement is the name of the class. In this case your class actually is named Product_Display, not Display (which is the file name). You might also need to change the file name to match the class name (also for conventions sake you should do this).

A: You are using PSR-0 autoloading. This scheme converts every backslash and every underscore into a directory separator when building the path to the file.
So Acme\Whatever_Underscored is searched for in the path prefix/Acme/Whatever/Underscored.php.
With PSR-4, the rules have changed. First, it only works for namespaced classes, not the old Acme_Underscore_Endless_Classnames. Second, you don't have to have a set of otherwise emtpy directories if you don't want to. Third: Underscores are NOT converted to directory separators.
With PSR-4 rules, the Acme\Whatever_Underscored is searched for in the path prefix/Acme/Whatever_Underscored.php - or even prefix/Whatever_Underscored.php if configured so.
You got confused because you connected the class name in the code with the path to the file. PHP only cares about the class name in use imports. Always use the class name as it is defined in your class's file. Then the autoloader kicks in and tries to find a matching file - with the rules of either PSR-0 or PSR-4. If it cannot find the correct file (either the path does not point to the file correctly, or the file does not contain the class being searched for), you get an error.


text:
Q: Get value of input text control on click on href in Jquery I have a function CheckMobile(MobNumber) and it will check all duplicate record of MobNumber which is passed in function. I want to use jquery to implement this.
<input type='text' name='Phone2' class='required' maxlength='10' />
Check Phone

and my jquery function is:
function CheckMobile(MobNumber) {
    debugger;
   var phone = $(MobNumber).val();
   alert(phone);

}

But it does not work. In function i am getting undefined value.Please help how to get value of phone.

A: You can get at the input by doing:
$("input[name='Phone2']")

In jQuery and then use .val() to get the value. (Working JSFiddle: http://jsfiddle.net/PhT94/)
EDIT:
Didn't notice you'd given it an ID, in that case you could just do:
$("#Phone2").val()

So in your original code change:
$(MobNumber).val()

To
$("#" + MobNumber).val()

A: the problem is in your selector there, it's not valid :
      var phone = $(MobNumber).val();

You should access by the attribute name instead like this
  var phone = $("input[name='Phone2']").val();

A: You need to change how you use the selector.
<input type='text' name='Phone2' id='Phone2' class='required' maxlength='10' />
    Check Phone

Not that we append '#' and concatenate with the passed string parameter
 function CheckMobile(MobNumber) {
        debugger;
       var phone = $('#'+MobNumber).val();
       alert(phone);

    }


text:
Q: Knoppix cheat code permanency What do I need to do to make the cheat codes I use to start up Knoppix, which has been installed to an SSD permanent? For example, I want to use "knoppix64 no3d tz=Asia/Shanghai" every single time I boot without needing to type it in. Can this be done, and if so, how?

A: Modify /home/knoppix/Desktop/KNOPPIX/boot/isolinux/isolinux.cfg.  Append the desired options to the line starting with APPEND located in the default boot string.  The default boot string is specified at the beginning of the isolinux.cfg file.  For example, Knoppix 7.2 isolinux.cfg starts with
DEFAULT knoppix
APPEND lang=en apm=power-off initrd=minirt.gz nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1

Look for the line starting with LABEL Knoppix.  Below this line is a line starting with APPEND.  At the end of the APPEND string, add the options that you want to be active when you boot the default options.  Using your question, you would add your options so that the default boot options would be
DEFAULT knoppix
APPEND lang=en apm=power-off initrd=minirt.gz nomce libata.force=noncq hpsa.hpsa_allow_any=1 loglevel=1 no3d tz=Asia/Shanghai


text:
Q: In Git is it possible to treat my uncommitted changes as merge conflicts? I made some changes to a file (uncommitted), and want to revert some changes, but not others.  VSCode provides a very nice set of buttons for resolving merge conflicts, which would be much more efficient than pulling up the diff of the file and copying over the bits I want to keep.  Is there a way to treat a diff file or an applied stash of a file as a set of merge conflicts with HEAD?
git stash -- path/to/my/file
git stash apply
git stash apply

This obviously won't work because the changes to my file are identical to the changes being applied, which presents no merge conflicts.

A: This might be round about way of doing it.

*

*Checkout a new temp branch from current branch.

*Commit all your changes.

*Pull the code from origin to temp brach.

*All the merge conflicts will show up in VS code now.

*Add/Remove changes what you need.

*Commit the final version to the same temp branch.

*Switch to the original branch again.

*Do squash merge of temp branch to original branch (git merge --squash temp)

*Unstage the changes.

Finally, you will end up what you want.
Instead of going through all these steps, you can use VS Code or built-in git gui tool(gitk) for comparison.


text:
Q: Origin null is not allowed by Access Control-Allow-Origin , JSON file from computer I am building a travel website where for the search destinations option I am getting the following error:

Origin null is not allowed by Access-Control-Allow-Origin

My json file is in my folder itself,
the following is my jquery code:
$(document).ready(function() {
            $.getJSON('resort.json', function(data) {
                $("#searchresort").on("click", function() {
                    var userDept = $("input:checked").val();
                    var output = "
";
                    for (var i in resort.resorts) {
                        if( (userDept == resort.resorts[i].destination) || (userDept == "Any") ) {
                            output+="
" + resort.resorts[i].picture + "
 " + resort.resorts[i].name + "
" + resort.resorts[i].short_description + "
 " +"Visit Page
";

                            // " -- " + data.users[i].dept+"Visit Page
";
                        }
                    }
                    output+="
";
                    document.getElementById("placeholder").innerHTML = output;
                });

if anyone could help me out with this, it would be great.

A: Many browsers will not allow you to read files from a file:// origin.  So, if your web page is loaded by the browser directly from the file system with a file:// URL, then you can't read other files with file:// URLs even though it seems like it should be the "same origin".  This is apparently done for security reasons to avoid any possible ways for a web page to read files from your hard drive.
The browser reports file:// as a null origin in that error message.
Though not recommended, some browsers have a command line argument or other preference settings that will allow local files to be accessed, but this comes with the usual security warnings.
The usual solution here is to run a local web server and load your files via the web server rather than directly from the file system.


text:
Q: geostatistics across different projections? What are some best practices for calculating local geostatistics across the boundaries of different projections?
I am thinking of using the State Plane Coordinate System to represent a national-level dataset. However I will be conducting analysis at the local metropolitan area level. I'd like to hear how people have handled analysis of zones that cover multiple projections (like the Kings County state plane in the Seattle region).
EDIT: the following was previously a comment:
We are applying convolutions on rasterized land use data to learn significant land use features. It seems like area will be the most important feature to preserve, but distance is a close second. My hope was that by dividing in the country into 120+ projections, that SPCS would essentially make such distortions insignificant. But that of course introduces inconsistencies when convolving over the boundary between two different projections

A: There is no single, national State Plane coordinate system; there is a different one for each state. What kind of geostatistics are you calculating? If you are doing area-based calculations you'd be best off using an Equal Area projection. Note that State Plane systems use Conformal projections, not equal area.


text:
Q: hammer.js Object doesn't support property or method 'create' I using hammer.js on my web site, it's working great on chrome , but not working on IE11.
I got this error :

Unhandled exception at line 25, column 9 in
  http://localhost:59764/js/hammer.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property
  or method 'create'

It's in this function in the hammer.js file.
function h(a, b, c) {
    var d, e = b.prototype;
    d = a.prototype = Object.create(e),
    d.constructor = a,
    d._super = e,
    c && f(d, c)
}

Is there a way to solve that ?


text:
Q: mysql8 function index not work with reverse() like '%abc' I have a mysql8 database for develop, with a table name xxx, have one comlum name serial_number, varchar(10), with many rows.
column serial_number value like:
'abc1k3',
'dfe324',
'fg23xy',
'hgfdsy',
......

I want search which one row end of 'abc', but
like '%abc'

is very slow,
so I create a function index use reverse function
ALTER TABLE `xxx`
ADD  INDEX `ridx_serial_number` ((reverse(`serial_number`)));

but sql below not work on this index
select * from xxx where reverse(serial_number) like 'cba%';

or
select * from xxx USE INDEX(ridx_serial_number) where reverse(serial_number) like 'cba%';

Execute plan show it still use full table scan.
and I don't want create new redundant column, auto correlation with reverse(serial_number). Although this can also solve the problem, it introduces complexity
can somebody help? thanks


text:
Q: How to find bin edges of given bin number returned by scipy.stats.binned_statistic_dd()? I have a Nx3 array mm. The function call
c,edg,idx = scipy.stats.binned_statistic_dd(mm,[], statistic='count',bins=(30,20,10),rg=((3,5),(2,8),(4,6)))

returns idx, which is a 1d array of ints that represents the bin in which each element of mm falls, and edg is a list of 3 arrays holding the bin edges
What I need is to find the bin edges of a given bin given it's binnumber in idx. For example, given idx=[24,153,...,72] I want to find the edges of say bin 153, i.e. where that bin falls in edg. Of course I can find the elements in bin 153 by mm[153], but not the edges.
I posted this Nx3 case just for clarity. In reality, I am looking for a solution to the NxD case.

A: It helps to first be familiar with np.unravel_index. It converts a "flat index" (i.e. binnumber!) to a tuple of coordinates. You can think of the flat index as the index into arr.ravel(), and the tuple of coordinates as the index into arr.   For example, if in the diagram below we think of the numbers 0,1,2,3,4,5 as bin numbers:
   | 0 | 1 | 2 |
---+---+---+---|
 0 | 0 | 1 | 2 |
 1 | 3 | 4 | 5 |
   +---+---+---|

then np.unravel_index(4, (2,3))
In [65]: np.unravel_index(4, (2,3))
Out[65]: (1, 1)

equals (1,1) because the 4th bin number in an array of shape (2,3) has coordinate (1,1).
Okay then. Next, we need to know that internally scipy.stats.binned_statistic_dd adds two edges to the given bin edges to handle outliers:
bin_edges = [np.r_[-np.inf, edge, np.inf] for edge in bin_edges]

So the edge coordinates corresponding to the bin numbers is given by
edge_index = np.unravel_index(binnumber, [len(edge)-1 for edge in bin_edges])

(We use len(edge)-1 because the shape of the array axis is one less than the
number of edges.)

For example:
import itertools as IT
import numpy as np
import scipy.stats as stats

sample = np.array(list(IT.product(np.arange(5)-0.5,
                                  np.arange(5)*10-5,
                                  np.arange(5)*100-50)))
bins = [np.arange(4),
        np.arange(4)*10,
        np.arange(4)*100]

statistic, bin_edges, binnumber = stats.binned_statistic_dd(
    sample=sample, values=sample, statistic='count',
    bins=bins,
    range=[(0,100)]*3)

bin_edges = [np.r_[-np.inf, edge, np.inf] for edge in bin_edges]
edge_index = np.unravel_index(binnumber, [len(edge)-1 for edge in bin_edges])

for samp, idx in zip(sample, zip(*edge_index)):
    vert = [edge[i] for i, edge in zip(idx, bin_edges)]
    print('{} goes in bin with left-most corner: {}'.format(samp, vert))

yields
[ -0.5  -5.  -50. ] goes in bin with left-most corner: [-inf, -inf, -inf]
[ -0.5  -5.   50. ] goes in bin with left-most corner: [-inf, -inf, 0.0]
[  -0.5   -5.   150. ] goes in bin with left-most corner: [-inf, -inf, 100.0]
[  -0.5   -5.   250. ] goes in bin with left-most corner: [-inf, -inf, 200.0]
...


text:
Q: How does an Animagus transform back into their human form? If I remember correctly in PoA during the scenes at the Shrieking Shack, Wormtail was able to escape but to transform into his Animagus form he needed a wand.  However, we never see another wizard (McGonagall/Sirius) need to do this.
When is a wand needed for Animagus transformations?
Update due to answers and comments:
In the film he shown to touch his wand to his head. Clip

A: I think you remember incorrectly:

Pettigrew had dived for Lupin's dropped wand. Ron, unsteady on his bandaged leg, fell. There was a bang, a burst of light - and Ron lay motionless on the ground. Another bang - Crookshanks flew into the air and back to the earth in a heap.
'Expelliarmus!' Harry yelled, pointing his own wand at Pettigrew; Lupin's wand flew high into the air and out of sight.
'Stay where you are!' Harry shouted, running forwards.
Too late. Pettigrew had transformed.
Harry Potter and the Prisoner of Azkaban - p.279 - Bloomsbury - Chapter 20, The Dementors' Kiss

So I conclude that Pettigrew did not require a wand to perform the transformation.
The film is the film, but even having watched that clip, I don't see any sign of him performing any magic on himself.
To speak to why he wouldn't have just transformed immediately: In the initial stages after Lupin transformed, Lupin was as dangerous to Wormtail as anybody else - Wormtail was actually tied to Lupin. After Sirius had pulled Lupin away, Wormtail had, amidst all the panic and the adrenaline, to make a decision. Crookshanks, in particular, would have been very dangerous to him post transformation. In that moment, he chose to go for the wand and take out Crookshanks and Ron before transforming when he lost the wand. Presumably, had Harry not cast Expelliarmus against him, he would have taken out everybody else, too, before making his escape.
And so I remain of the opinion that your premise is incorrect. We see elsewhere that Sirius is able to transform into a dog in Azkaban without a wand, we see JK Rowling describe Animagi as:

wizards who could transform at will into animals
Harry Potter and the Prisoner of Azkaban - pp.83-4 - Bloomsbury - Chapter 6, Talons and Tea Leaves

What makes the Animagus transformation special is precisely that you can do it at will. Otherwise it's just human transformation which requires skill, but is not a special ability and does not require registration. Moody is able to transform Malfoy into a ferret, Krum (admittedly rather badly) attempts to turn himself into a shark.
And so I think, really, you're asking us to solve a problem that doesn't actually exist. The answer to your question:
When is a wand needed for Animagus transformations?
Is: It isn't. That's what makes the Animagus transformation interesting.

A: Willing transformation as an Animagus does not need a wand. Pettigrew needed a wand in his case because a spell was cast on him to transform him into his human form.

I think the reason that Pettigrew needed a wand in this case was because Sirius and Remus forced him to transform into a human:

Black had already retrieved Severus's wand from the bed. He approached Remus and the struggling rat, and his wet eyes suddenly seemed to be burning in his face.
"Together?" he said quietly.
"I think so," said Remus, holding Scabbers tightly in one hand and his wand in the other. "On the count of three. One – two – THREE!"
A flash of blue-white light erupted from both wands; for a moment, Scabbers was frozen in mid-air, his small black form twisting madly – Ron yelled – the rat fell and hit the floor. There was another blinding flash of light and then –
It was like watching up a speeded-up film of a growing tree. A head was shooting up from the ground; limbs were sprouting; next moment, a man was standing where Scabbers had been, cringing and wringing his hands.
- Harry Potter and the Prisoner of Azkaban

Since an (unknown) spell was cast on him to force him to return to human form, it can be assumed that he would not be able to transform back into animal form without first lifting that spell.


text:
Q: Looking to build a Android App, which syncs to App Engine datastore (python) I am looking into building an android app, which holds some simple data (probably stored in sqlite). I also have a app engine app which I intend to be an online data store for the information (the app engine app is wrote in python).
The question here is, what is the best way to authenticate a user with the app and how to get the data from the android app to the Google data store?
Thanks
Mike

A: You could use Google Account authentication and follow this useful post about Authenticating against App Engine from an Android app
You can also give a look at the SampleSyncAdapter sample from the SDK

A: If you want to authenticate using OAuth, you can do that. The only trick is that you need to launch the flow in an internal WebView, because App Engine's OAuth implementation doesn't allow custom protocols in the redirect. I recommend the Signpost library. If you'd like an example, the 2cloud Android client is licensed under the MIT license (full disclosure, I'm the lead dev for 2cloud). The benefit of this is it allows you to support Android 1.5 and higher. The Accounts API is only supported starting in 2.1.
Another option is the Accounts API. @systempuntoout has good links for that, so I won't reinvent the wheel here.
Finally, it might be worth taking a look at the App Engine-powered Android Eclipse project that was demo'd at I/O this year. It makes keeping code in sync and shared between the two simple. Only downsides are it requires Android 2.2 or higher, and it requires you to write in Java on the App Engine side and GWT for the client side.


text:
Q: How to change the Modern UI Skype to a normal window I've installed Windows 8 and Skype from Windows Store. It now occupies the entire screen and misses a lot of features. I would say that for a normal computer, the previous "regular" Skype was much more desirable.
Should I now install one more Skype? "Metro" and "regular"? Or can I use the Modern UI Skype in a regular way?

A: I believe that you will have to install the "regular", desktop, version of Skype if you would like to run it in desktop mode.
You can download the original installer from here.

A: You can get the regular desktop skype from  this link


text:
Q: Merge filecontents and call data from only one file i have 2 filecontent with different structure: test1.tex and test2.tex.
But i want to call data from only one file (ex:test.tex)
How can i build only one file test.tex that includes data of 2 file test1.tex and test2.tex?
My minimal code:
    \documentclass{article}
    \usepackage{datatool}
    \usepackage{filecontents}
    \usepackage{pgfplots}
    \usepackage{pgf}
    \usepackage{tikz}

    \begin{filecontents*}{test1.tex}
    Acol, Bcol, NoCol
    Ax,Bx,1
    Ay,By,3
    A1,B22,2
    A2,B44,4
    A3,B11,5
    \end{filecontents*}

    \begin{filecontents*}{test2.tex}
    \def\Names{{"ABC","XYZ"}}
    \end{filecontents*}

    \DTLloaddb{mydata}{test1.tex}
    \input{test2.tex}
    \pgfmathsetmacro{\NameNull}{\Names[0]}

    \begin{document}

    \DTLforeach*{mydata}{\A=Acol,\B=Bcol}%
    {%

     \NameNull \hspace{2cm } \A \hspace{2cm } \B \\
     %\newpage
    }%

    \end{document}

i can manual copy all data from test1.tex and test2.tex to one file test.tex.
But please help how i arrange this data?
Ex:
\begin{filecontents*}{test.tex}

Data copy from test1.tex and can call to main.tex

Data copy from test2.tex and can call to main.tex

\end{filecontents*}

Thanks


text:
Q: C# version of Java Runnable? (delegate?) I could not find a direct answer to this question yet in SO. Is there a predefined delegate with void (void) signature?

A: Action has the signature you're looking for. However, it doesn't mean the same thing as Runnable does: Runnable generally indicates that the run() method is intended to be run on a Thread, while Action makes no indication. For that you'd want ThreadStart, which has the same signature, and does make that indication.
If all you need is a delegate with no parameters, Action is what you want. If you're dealing with threads and need to indicate the start method, use ThreadStart.

A: Nope. C# handles threads differently to Java. In Java, the Runnable interface is an alternative to subclassing Thread, but you still have to create a new Thread object, passing the Runnable to a constructor.
Rather than subclassing the Thread class, you simply create a new System.Threading.Thread object and pass it a ThreadStart delegate (this is the function where you do the work). ThreadStart is the exact C# equivalent to Java's Runnable.
However, the Action delegate has the void parameters you speak of.

A: The Action delegate is a void with no parameters.
http://msdn.microsoft.com/en-us/library/system.action.aspx
There are also other signatures with up to 16 parameters.


text:
Q: When using the French word "sans" in an English sentence, should I use italics? In the sentence, below, I am using the French word sans to mean without. Should sans be italicized? Or, should all of "sans human civilization" be italicized?

Planet Earth sans human civilization is imagined, at least by Teasdale, to beautiful, harmonious, and ultimately superior to the human-centred world we live in now.

OR

Planet Earth sans human civilization is imagined, at least by Teasdale, to beautiful, harmonious, and ultimately superior to the human-centred world we live in now.

A: Given that "sans" apparently entered early enough and/or become so much part of the language that it is primarily pronounced /sænz/ and not /sɒ̃/, then it is not required that you italicise. On the other hand, if you do prefer the latter pronunciation (as I do) i.e. you are borrowing from modern French, where you're using phonemes that aren't really used except in loanwords, you probably should italicise.
"human civilization" is plainly English so should not be italicised.

A: As a matter of style, many U.S. publishers follow the general rules given by the Chicago Manual of Style, fifteenth edition (2003) at 7.51, 7.53, and 7.54 under the heading "FOREIGN WORDS":

7.51 Italics. Italics are used for isolated words and phrases in a foreign language if they are likely to be unfamiliar to readers. [Examples omitted.]
...
7.53 Proper nouns. Foreign proper nouns are not italicized in an English context. [Examples omitted.]
7.54 Familiar foreign words. Foreign words and phrases familiar to most readers and listed in Webster are not italicized if used in an English context; they should be spelled as in Webster. ...

Guideline 7.54 is the relevant one for your question about sans—and any other arguably foreign word you might be thinking of using. If the word is in the English dictionary that you normally use (and it doesn't have to be a Merriam-Webster product, Chicago's wording notwithstanding), you may treat it as an adopted English word and thus as not requiring italics to indicate its foreignness. This certainly is the case with sans, which has been in use in English since the fourteenth century (according to MW) and appears in such memorable quotations as Jaques's speech about the seven ages of man, in Shakespeare's As You Like It:

Last scene of all,/That ends this strange eventful history,/Is second childishness and mere oblivion,/Sans teeth, sans eyes, sans taste, sans everything.

So if you're inclined to follow Chicago's lead on this question, have a dictionary handy when you prepare to use what may or may not be viewed as a non-English word.

A: I'd prefer it if you did, please, for two reasons:

*

*I know the word sans in French but not in English ... italicizing it in a sentence warns me that there's something unusual about the word. Normally when I read a sentence I scan the whole sentence, but italicizing a word is a cue for me to scan/read that word individually.

*It's normal to use 'punctuation' or formatting for words which have a different emphasis in a sentence: and because sans is French it has a different pronunciation, and that different pronunciation (pronunciation being like emphasis) is sufficient reason for italicising it.

A: "Sans" is a common enough word in English that I would not bother with italics. But I also think in your sentence that the word "without" scans better, and I'd use that instead of "sans" for esthetics reasons.


text:
Q: What's the meaning of "each CPU instruction can manipulate 32 bits of data"? From: https://www.webopedia.com/TERM/R/register.html

The number of registers that a CPU has and the size of each (number of bits) help determine the power and speed of a CPU. For example a 32-bit CPU is one in which each register is 32 bits wide. Therefore, each CPU instruction can manipulate 32 bits of data.

What's the meaning of "each CPU instruction can manipulate 32 bits of data" w.r.t the C/C++ programs which we write, the text which we write in notepads?

A: First; "each CPU instruction can manipulate 32 bits of data" is a (technically incorrect) generalisation. For example (32-bit 80x86) there are instructions (e.g. cmpxchg8b, pushad, shrd) and entire extensions (MMX, SSE, AVX) where an instruction can manipulate more than 32 bits of data.
For performance; it's best to think of it as either "amount of work that can be done in a fixed amount of time" or "amount of time to do a fixed amount of work". This can be broken into 2 values - how many instructions you need to do an amount of work and how many instructions can be executed in a fixed amount of time (instructions per second).
Now consider something like adding a pair of 128-bit integers. For a 32-bit CPU this has to be broken down into four 32-bit additions, and might look something like this:
    ;Do a = a + b

    mov eax,[b]
    mov ebx,[b+4]
    mov ecx,[b+8]
    mov edx,[b+12]
    add [a],eax
    adc [a+4],ebx
    adc [a+8],ecx
    adc [a+12],edx

In this case "how many instructions you need to do an amount of work" is 8 instructions.
With a 16-bit CPU you need more instructions. For example, it might be more like this:
    mov ax,[b]
    mov bx,[b+2]
    mov cx,[b+4]
    mov dx,[b+6]
    add [a],ax
    mov ax,[b+8]
    adc [a+2],bx
    mov bx,[b+10]
    adc [a+4],cx
    mov cx,[b+12]
    adc [a+6],dx
    mov dx,[b+14]
    add [a+8],ax
    adc [a+10],bx
    adc [a+12],cx
    adc [a+14],dx

In this case "how many instructions you need to do an amount of work" is 16 instructions. With the same "instructions per second" a 16-bit CPU would be half as fast as a 32-bit CPU for this work.
With a 64-bit CPU this work would only need 4 instruction, maybe like this:
    mov eax,[b]
    mov ebx,[b+8]
    add [a],eax
    adc [a+8],ebx

In this case, with the same "instructions per second", a 64-bit CPU would be twice as fast as a 32-bit CPU (and 4 times as fast as a 16-bit CPU).
Of course the high level source code would be the same in all cases - the difference is what the compiler generates.
Note that what I've shown here (128-bit integer addition) is a "happy case" - I chose this specifically because it's easy to show how larger registers can reduce/improve "how many instructions you need to do an amount of work" and therefore improve performance (at the same "instructions per second"). For different work you might not get the same improvement. For example, for a function that works with 8-bit integers (e.g. char) "larger than 8-bit registers" might not help at all (and in some cases might make things worse).

A: Computers, operating systems, or software programs capable of transferring data 32-bits at a time. With computer processors, (e.g. 80386, 80486, and Pentium) they were 32-bit processors, which means the processor were capable of working with 32 bit binary numbers (decimal number up to 4,294,967,295). Anything larger and the computer would need to break up the number into smaller pieces

A: A "word" is the size of the basic unit of change.
This CPU, in addition to being a 32 bit CPU, has a 32 bit sized word.  If it was changing an item, unless extra CPU cycles are used, the largest "single" item it can change is one 32 bit value.
This doesn't mean that any 32 bit can be changed with one instruction.  But if the 32 bits are all part of the same word, they may be able to be changed in one instruction.