## Phone number entries from 1 string to 3 entries. Help me!

My team must edit a phone number object in a form in 3 input fields instead of a string. Our team on the technical side is potentially a bit tricky. So I wondered if anyone had ever encountered this problem or if a phone number widget had been used instead of 3 separate entries to manage the country code, the region. code and number? This is clearly not a new problem but it is for my team :]

## php – Why, when I explode to turn a string into an array, it splits into multiple arrays and not one?

``````\$horas = \$arrayDatas(1).' às '.\$arrayDatas(3)."https://pt.stackoverflow.com/";

\$nova = explode("https://pt.stackoverflow.com/",\$novo);

print_r(\$nova);

//saida: Array ( (0) => 14:00:00 às 14:59:59 ) Array ( (0) => 14:00:00 às 14:59:59 ) Array ( (0) => 14:00:00 às 14:59:59 ) Array ( (0) => 14:00:00 às 14:59:59 ) Array ( (0) => 14:00:00 às 14:59:59 ) Array ( (0) => 14:00:00 às 14:59:59 ) Array ( (0) => 14:00:00 às 14:59:59 ) Array ( (0) => 14:00:00 às 14:59:59 ) Array ( (0) => 14:00:00 às 14:59:59 ) Array ( (0) => 14:00:00 às 14:59:59 )``````

## windows – Support functions in String in NASM Win16 Assembly

Environment

`NASM` is needed to build this program, and `DosBox` is necessary to run it. I recommend you install them using the Scoop Package Manager. Do not hesitate to ignore the installation instructions for any programs you have already installed.

``````iwr -useb get.scoop.sh | iex
scoop install git
scoop install dosbox
scoop install nasm
``````

Building

``````nasm -f bin -o helper.com helper.asm
``````

Operation

Charge `DosBox`then go up the path where `helper.com` resides on any drive available. For those who are not familiar, this can be any reader `A-Z` interval.

``````mount H: C:UsersT145Desktop
H:
dir
helper.com
``````

helper.asm

``````bits 16
org 0x100

section .text

_main:
lea     di, [prompt]
call    putstring

lea     di, [string]
call    getstring

lea     di, [hello]
call    putstring

lea     di, [string]
call    putstring

mov     ah, 0x4c     ; standard exit code
mov     al, 0
int     0x21

; no parameters
; returns a char in ax
getchar:
mov     ah, 0        ; call interrupt x16 sub interrupt 0
int     0x16
mov     ah, 0
ret

; takes a char to print in dx
; no return value
putchar:
mov     ax, dx       ; call interrupt x10 sub interrupt xE
mov     ah, 0x0E
mov     cx, 1
int     0x10
ret

; takes an address to write to in di
; writes to address until a newline is encountered
; returns nothing
getstring:
call    getchar      ; read a character
cmp     ax, 13       ; dos has two ascii characters for new lines 13 then 10
je      .done        ; its not a 13, whew...
cmp     ax, 10       ; check for 10 now
je      .done        ; its not a 10, whew...
mov     [di], al     ; write the character to the current byte
inc     di           ; move to the next address
mov     dx, ax       ; dos doesn't print as it reads like windows, let's fix that
call    putchar
jmp     getstring
.done:
mov     dx, 13       ; write a newline for sanity
call    putchar
mov     dx, 10
call    putchar
ret

; takes an address to write to in di
; writes to address until a newline is encountered
; returns nothing
putstring:
cmp     byte [di], 0 ; see if the current byte is a null terminator
je      .done        ; nope keep printing
.continue:
mov     dl, [di]     ; grab the next character of the string
mov     dh, 0        ; print it
call    putchar
inc     di           ; move to the next character
jmp     putstring
.done:
ret

section .data

string: times 20 db 0
hello: db "Hello, ", 0
``````

Exit

Criticism about optimizations using unused instructions is particularly encouraged, but it is welcome!

## c # – Error: the value can not be null. Parameter name: String

I come from a Visual Basic 6 application trying to consume a dll (created in .net) that calls a service.
When I consume this dll in another .net program, I do not get an error, and it returns me the values. However, when I want to consume it in Visual Basic, I get this error.
"Error: value can not be null Parameter name: String"

The DLL code in .net is like this:

``````public class ConsultaClienteCaller
{

public string BuscarClientePorProducto(ulong CodigoSubsistema, String IdProducto)
{

String IdPersona = string.Empty;

ConsultaCliente.ConsultaCliente ConCliente = new
ConsultaCliente.ConsultaCliente();

try
{

ConsultaCliente.BuscarClientePorProductoRequest Request = new ConsultaCliente.BuscarClientePorProductoRequest();
List ListClientes = new List();

#endregion

#region Datos
#endregion

#region Respuesta
return IdPersona;
#endregion

}
catch (Exception errors)
{
throw errors;

}

}
}
``````

The code in the VBA 6 application is:

``````Dim ConsultaCliente As TCRM_TCO_NV.ConsultaClienteCaller
Set ConsultaCliente = CreateObject("TCRM_TCO_NV.ConsultaClienteCaller")
Dim IdPersona As String
Dim IdProducto As String
Dim Codigo As Long
IdProducto = "0000000000002"
Codigo = 85

IdPersona = ConsultaCliente.BuscarClientePorProducto(Codigo, IdProducto)
``````

This last line is where the error appears.
I do not know why this may be due.
PD: I want to clarify that the DLL is registered for COM interoperability.

## Generate a 6-character random string in Python 3.6.2

I'm learning python, so forgive me if it's a very rude approach.
I'm trying to generate a random string using alphanumeric characters.
Here is my code:

``````#Generating random 6 character string from list 'range'.
def code():
# List of characters (a-zA-Z0-9)
chars = ('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5','6','7','8','9')
code = ''
for i in range(6):
n = random.randint(0,61)    # random index to select element.
code = code + chars(n)      # 6-character string.
return code
``````

What I'm trying to do is to choose 6 random elements in the list of characters and add them.

Is there a better approach?

## The error "namespace" std "has no member" string "& # 39; in a C ++ / SFML project (Visual Studio 2019):

I've recently learned how to create a 2D SFML game with the help of a series of youtube tutorials from Suraj Sharma (currently in video 57):

After 10:14, I realized that the variables & # 39; std :: map & # 39; from my class' State & # 39; had the following error:

État.h:

``````    #pragma once

#ifndef STATE_H
#define STATE_H

#include "Player.h"
#include "GrphSettings.h"

class Player;
class GrphSettings;
class State;

class StData {
public:
StData() {};

//Vars
float GridSize;
sf::RenderWindow* Window;
GrphSettings* GSettings;
std::map* SupportedKeys;//namespace "std" has no member "string"
std::stack* states;
};

class State
{
private:

protected:
StData* Stdata;
std::stack* states;
sf::RenderWindow* window;
std::map* SupportedKeys ;//namespace "std" has no member "string"
std::map Keybinds;//namespace "std" has no member "string"
bool quit;
bool pause;
float keyTime;
float keyTimeMax;
float GridSize;

sf::Vector2i MousePosScr;
sf::Vector2i MousePosWind;
sf::Vector2f MousePosView;
//Resources
std::map texture;//namespace "std" has no member "string"
//Funcs
virtual void InitKeybinds() = 0;
public:
State(StData* Stdata);
virtual~State();
//Access
const bool getKeytime();
const bool& getquit()const;
//Funcs
void Endstate();
void PauseSt();
void UnPauseSt();

virtual void UpdateInput(const float& dt) = 0;
virtual void UpdateMousePos();
virtual void UpdateKeyTime(const float& dt);
virtual void Update(const float& dt) = 0;
virtual void Render(sf::RenderTarget* target = nullptr) = 0;
};

#endif // !1
``````

I have tried & # 39; #include & # 39; in the file and it does not work. The project is working well before I know what's wrong.

Can any one help me?

## string disabling non-working style characters Harlowe

http://twinery.org/wiki/twine2:how_to_format_text

Boom! == “Boom!

What is $$`$$ ? Is it? Because if it is & # 39;Boom!& # 39; & # 39; does not work and does not work "Boom!"in fact" text "seems to be equivalent to ** text ** even though it does not say that on the documentation pages the program binds me.

## How to extract numbers from a python string? [on hold]

``````input: userVariable = "someTextWithNumbers432andTextwith331"
output: odd = [331]
even = [432]
``````

Can someone help me? I have this string and I want to extract the numbers like this.

## How to disable a header when a certain query string is present in the Apache 2.2 URL

I'm trying to recreate the following if statement in my htaccess file to remove a header if a query string is present in the requested URL. Any help writing this so that it works in Apache 2.2 would be greatly appreciated.

``````