python – How the basic structure of a simple messaging app works?

How the messaging apps works?
What is the Basic algorithm of it?
I tried the following method to make a messaging app.

  1. I enters message
  2. Message converts to a text file
  3. Text text file uploads to the ftp server
  4. My friend gets the text file from ftp and reads it

Is this method correct?
Do needed to use FTP server?
I found it is very slow and sometimes it gets timeout Error.
What is wrong here? Is my method wrong or the problem is the server?

neutrino – getblockfilter Error: Index is not enabled for filtertype basic

I’m failing to run the getblockfilter example. What am I doing wrong?

$ bitcoin-cli help getblockfilter
getblockfilter "blockhash" ( "filtertype" )

Retrieve a BIP 157 content filter for a particular block.

Arguments:
1. blockhash     (string, required) The hash of the block
2. filtertype    (string, optional, default=basic) The type name of the filter

Result:
{                      (json object)
  "filter" : "hex",    (string) the hex-encoded filter data
  "header" : "hex"     (string) the hex-encoded filter header
}

Examples:
> bitcoin-cli getblockfilter "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09" "basic"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockfilter", "params": ("00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", "basic")}' -H 'content-type: text/plain;' http://127.0.0.1:8332/

$ bitcoin-cli getblockfilter "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09" "basic"
error code: -1
error message:
Index is not enabled for filtertype basic

$ bitcoind --version
Bitcoin Core version v0.20.0.0-ga62f0ed64f8bbbdfe6467ac5ce92ef5b5222d1bd
...

Do I need to build a block filter index or something?

real analysis – Basic properties of the Radon transform

enter image description here

This is a page from Evan’s PDEs where the Radon transform is defined.

I have three brief questions:
(1) It says the integrals
$int_{Pi(s,omega)}nabla ucdot b_{i},dS$ vanish because the vectors $b_{i}$ are parallel to the plane $Pi(s,omega)$ and $u$ has compact support.

I am a little confused because I understand that the vectors $b_{i}$ are parallel to the plane $Pi(s,omega)$; they generate the plane. It is also evident that $nabla ucdot b_{i}$ is the length of the projection of the vector $nabla u$ in the direction $b_{i}$, and $|nabla u|$ compact support (because $u$ is assumed to have compact support). Now, the scalar function $nabla ucdot b_{i}$ can live entirely or partly in the support of $nabla u$. So why must the integral vanish.

(2) why does not $int_{Pi(s,omega)}nabla ucdot A, dS$ vanish for any vector $A$ ? (after all the gradient $nabla u$ is compactly supported)

(3) Finally, it is stated that $tilde{u}_{s}=int_{Pi(s,omega)}nabla ucdot omega, dS$. How come ? I am guessing by a change of variables (precisely a scaling $yrightarrow y/s$) but not sure how to formulate it.

Apologies for the long question, and thanks.

data – Basic Pie Chart linked to SharePoint List

I’m trying to link a Google pie chart with a Sharepoint List consisting of two columns, Title and Count (x6ei). I’m getting nothing in the webpart in Sharepoint. Can anyone help?

Here is the .js file I have it linked to:

    google.charts.load("current", {
    packages: ("corechart")
});

var ProjectArray = ();
getChartData();

function getChartData() {

    var serverRelativeUrl = _spPageContextInfo.webServerRelativeUrl;
    var columns = "Title,x6ei";
    var listName = "agency_cert_status";
    var orderby = "x6ei asc";
    var restURL = serverRelativeUrl.concat("/_api/lists/getbytitle('" + listName + "')/items?$select=" + columns + "&$orderby=" + orderby);

    $.ajax({
        url: restURL,
        type: "GET",
        headers: {
            "accept": "application/json;odata=verbose",
        },
                
        error: function (error) {}
    })
    google.charts.setOnLoadCallback(renderChart);
};

function renderChart() {
    var container = document.getElementById('myChart');
    var chart = new google.visualization.PieChart(container);
       var options = {
        // This line makes the entire category's tooltip active.
        tooltip: { isHtml: true },
    // Use an HTML Legend.
        legend: { isHtml: true },      
       }
      };    
      
    chart.draw(options);
};

Here is the .html file:

<html>
<head>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script src="https://oursite.sharepoint.com/sites/oursite/SitePages/Test/ProjectGraph_2.js"></script>
</head>

<body>
<div>
    <div id="myChart"></div>
</div>
</body>
</html>

Purpose of randomization/derandomization in basic randomized algorithm for MAX SAT

In Sections 5.1 of The Design of Approximation Algorithms by Williamson and Shmoys, they describe a basic randomized algorithm for MAX SAT and how to derandomize it. The algorithm is just to assign each variable 1 (true) with probability 1/2 and 0 (false) with probability 1/2. In other words, sample uniformly at random from the space of all solutions. They show that this is a 1/2-approximation.

Then in Section 5.2, they describe how to derandomize it using the method of conditional expectations. (I won’t describe the process here because it is not very complex and widely known I’m assuming.)

My question is, why bother derandomizing this way? Or even, why bother making the algorithm random in the first place?

It seems to me that an equally good algorithm would be the one-liner which deterministically sets all variables to 1. Given some MAX SAT instance as input, it seems to me that you would also expect this to (i.e., “in expectation it would”) satisfy half of the clauses. To me, the analysis of the random algorithm really seems to say that any fixed guess is “good.” (Rather than showing that our random algorithm is inherently good.) So why go through the process of randomizing and derandomizing in the first place?

Thanks in advance!

blockchain – Basic question about transaction verification

I am fairly new to crypto and had some questions about how transactions are verified by the nodes

Would it be correct to say that the full nodes check to see if the sender(Alice’s) signature is valid. And they check against double spends by seeing if the hash value that is included (of the transaction where Alice received the bitcoin) has ever been used an another transaction?

My question is, if that is the case, why can’t the verification only check against transactions signed by Alice, why does it have to check against the entire blockchain?

Why can’t it just check against Alice’s other transactions since you know she controls that coin.

magento2 – Call 3rd party rest api with basic auth username and password

I am calling 3rd party API in my postman I have choose Authorization as basic auth and passing username and password.

I am using Zend Client in magento 2 to send request now bt I set headers like this as basic auth it is throwing me error as : Authorization error because I havent passed username and password in basic auth

Can anyone tell me how to pass that in magento 2 while calling api

Here is my code:

public function __construct(
        Context $context,
        ZendHttpClient $zendClient
    ) {
        parent::__construct($context);
        $this->zendClient = $zendClient;
    }


$this->zendClient->setHeaders((
                'Authorization' => 'Basic Auth AC687732356d7cc641b4**username a9bfa6d5f473db2e346e1*pwd***',
            ));

java – Erro ao realizar a autenticação Basic Auth em API REST no android

Estou com muita dificuldade em realizar a integração com uma API utilizando a autenticação basic auth.

Criei uma API em Java utilizando spring boot e spring security.

Quando utilizo o Postman a requisição funciona sem nenhum problema, porém quando tento realizar a requisição via o codigo do APP recebo um codigo negado 401.

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

String stringUrl = strings(0);
        InputStream inputStream = null;
        InputStreamReader inputStreamReader = null;
        StringBuffer buffer = null;

        try {

            URL url = new URL(stringUrl);
            HttpURLConnection conexao = (HttpURLConnection) url.openConnection();

            conexao.setRequestProperty ("Authorization", authHeader);
            conexao.setConnectTimeout(20000);
            conexao.setReadTimeout(20000);
            conexao.setDoOutput(true);
            conexao.setRequestMethod("POST");
            conexao.setRequestProperty("grant_type", "password");
            conexao.setRequestProperty("username", "edimilson");
            conexao.setRequestProperty("password", "123");
            conexao.setRequestProperty("scope", "read,write");
            conexao.setRequestProperty("Content-Type", "application/json");
           // conexao.connect();

            int responseCode = conexao.getResponseCode();

            if (responseCode == 200){
                // Recupera os dados em Bytes
                inputStream = conexao.getInputStream();

                //inputStreamReader lê os dados em Bytes e decodifica para caracteres
                inputStreamReader = new InputStreamReader( inputStream );

                //Objeto utilizado para leitura dos caracteres do InpuStreamReader
                BufferedReader reader = new BufferedReader( inputStreamReader );
                buffer = new StringBuffer();
                String linha = "";

                while((linha = reader.readLine()) != null){
                    buffer.append( linha );
                }
            }else {
               // exibirMensagem("Houve um problema no envio da mensagem: " + responseCode);
                return "Houve um problema no envio da mensagem. n" +
                        " " + responseCode;
            }

        } catch (MalformedURLException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

        return buffer.toString();

inserir a descrição da imagem aqui

c# – A basic prototype of “Hello World” EXE maker

This is a basic prototype of my “Hello World” EXE maker to display custom text string compatible with DOS and 32-bit Windows, but the C# code is rather cryptic because of hard-coded hexadecimal code.

Should I encapsulate the hexadecimal codes using proper PE file format definition?

This EXE maker does not generate actual datetimestamp although checksum is displayed but not actually patched into the EXE.

How can I improve this EXE maker to make the code more readable? I am planning to support more commands in the future such as Console.ReadLine. (Currently only one-liner Console.WriteLine is supported)

ASM

It all started with the following Assembly code compiled to EXE using FASM.

format PE console
entry start

include 'includewin32a.inc'

section '.data' data readable writable
    msg         db 'Hello World!',13,10,0
    len = $-msg
    dummy       dd ?

section '.code' readable writable executable

    start:

    push STD_OUTPUT_HANDLE
    call (GetStdHandle)    ;STD_OUTPUT_HANDLE (DWORD)-11

    push 0                 ;LPVOID  lpReserved
    push dummy             ;LPDWORD lpNumberOfCharsWritten
    push len             ;DWORD   nNumberOfCharsToWrite
    push msg             ;VOID    *lpBuffer;
    push eax             ;HANDLE  hConsoleOutput
    call (WriteConsole)

    push 0
    call (ExitProcess)

section '.idata' data import readable writable

    library kernel32, 'KERNEL32.DLL'

include 'includeapikernel32.inc'

C#

I reassemble the EXE by customizing the text string in DOS stub and data section of the PE.

using System;
using System.IO;
using System.Runtime.InteropServices;

namespace L
{
    class Program
    {
        (DllImport("imagehlp.dll"))
        public static extern UInt32 MapFileAndCheckSumA(string fileName, 
            IntPtr HeaderSum,
            IntPtr CheckSum);
        /*
        DWORD IMAGEAPI MapFileAndCheckSumA(
        PCSTR Filename,
        PDWORD HeaderSum,
        PDWORD CheckSum
        */

        static void Main(string() args)
        {
            Console.Write("Custom text string: ");
            string input = Console.ReadLine();
            string inputL = input + "$";

            byte() L0 = new byte() { 0x4D, 0x5A, 0x80, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x10, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0xBA, 0x0E, 0x00, 0xB4, 0x09, 0xCD, 0x21, 0xB8, 0x01, 0x4C, 0xCD, 0x21 };
            byte() L1 = new byte(50);
            byte() L2 = new byte() { 0x50, 0x45, 0x00, 0x00, 0x4C, 0x01, 0x03, 0x00, 0xAE, 0x4B, 0xC5, 0x5E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x00, 0x0F, 0x01, 0x0B, 0x01, 0x01, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x97, 0x37, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2E, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0xC0, 0x2E, 0x63, 0x6F, 0x64, 0x65, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x2E, 0x69, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x86, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
            byte() L3 = new byte(512);
            byte() L4 = new byte() { 0x6A, 0xF5, 0xFF, 0x15, 0x4C, 0x30, 0x40, 0x00, 0x6A, 0x00, 0x68, 0x14, 0x10, 0x40, 0x00, 0x6A, (byte)input.Length, 0x68, 0x00, 0x10, 0x40, 0x00, 0x50, 0xFF, 0x15, 0x50, 0x30, 0x40, 0x00, 0x6A, 0x00, 0xFF, 0x15, 0x48, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x30, 0x00, 0x00, 0x48, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4B, 0x45, 0x52, 0x4E, 0x45, 0x4C, 0x33, 0x32, 0x2E, 0x44, 0x4C, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, 0x00, 0x66, 0x30, 0x00, 0x00, 0x76, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x58, 0x30, 0x00, 0x00, 0x66, 0x30, 0x00, 0x00, 0x76, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x45, 0x78, 0x69, 0x74, 0x50, 0x72, 0x6F, 0x63, 0x65, 0x73, 0x73, 0x00, 0x00, 0x00, 0x47, 0x65, 0x74, 0x53, 0x74, 0x64, 0x48, 0x61, 0x6E, 0x64, 0x6C, 0x65, 0x00, 0x00, 0x00, 0x00, 0x57, 0x72, 0x69, 0x74, 0x65, 0x43, 0x6F, 0x6E, 0x73, 0x6F, 0x6C, 0x65, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
            byte() L = new byte(L0.Length + L1.Length + L2.Length + L3.Length + L4.Length);

            for (int i = 0; i < 50; i++)
                if ((i >= 40) || (i >= inputL.Length))
                    L1(i) = 0x0;
                else
                    L1(i) = (byte)inputL(i);
        
            for (int i = 0; i < 512; i++)
                if (i >= input.Length)
                    L3(i) = 0x0;
                else
                    L3(i) = (byte)input(i);

            Array.Copy(L0, L, L0.Length);
            Array.Copy(L1, 0, L, L0.Length, L1.Length);
            Array.Copy(L2, 0, L, L0.Length + L1.Length, L2.Length);
            Array.Copy(L3, 0, L, L0.Length + L1.Length + L2.Length, L3.Length);
            Array.Copy(L4, 0, L, L0.Length + L1.Length + L2.Length + L3.Length, L4.Length);
            string LL = Directory.GetCurrentDirectory() + "\" + DateTime.Now.ToString("H_mm_ss") + ".EXE";
            File.WriteAllBytes(LL, L);
            Console.WriteLine(LL);
            
            IntPtr ptrHeaderSum = Marshal.AllocHGlobal(sizeof(int));
            IntPtr ptrCheckSum = Marshal.AllocHGlobal(sizeof(int));

            UInt32 status = MapFileAndCheckSumA(LL, ptrHeaderSum, ptrCheckSum);
            Console.WriteLine("MapFileAndCheckSumA = " + status);
            int CheckSum = Marshal.ReadInt32(ptrCheckSum);
            Console.WriteLine("CheckSum : " + CheckSum); 

            Marshal.FreeHGlobal(ptrHeaderSum);
            Marshal.FreeHGlobal(ptrCheckSum);
        }
    }
}

DOS Stub

I make use of the DOS stub in PE to display custom text string in DOS mode.

    push cs
    pop ds
    mov dx, 0eh
    mov ah, 09h
    int 21h
    mov ax, 4c01h
    int 21h

So I will get the same console output no matter it is DOS or modern Windows.

i8086 vs i386

Confidence is the most basic thing – General Forex Questions & Help

Confidence is the most basic thing in forex trading. Most of time trader sees their impulsiveness as confidence. Confidence is something that impact you to loosen up while you are on the trade or off the trade. To get sureness, first thing is to extend knowledge about trading. By then practice, practice and practice. Test your strategy in demo account for 3 to a half year. It will help your conviction an extensive measure. I moreover trade forex at XeroMarkets broker. I for the most part think about their advanced instructive materials. Those are to a great degree useful for me.