Finite automata: Why DFAs do not have exit arrows for some input symbols?

This is part of the (usual) definition of DFA. It is difficult to argue with a definition.

While it is difficult to argue with a definition, one may wonder why the object was defined in a certain way. Here an answer is that we want our automaton to be always in a particular state, no matter what happens. In other words, we want the transition function to be a function instead of just a partial function. It's a matter of taste.

Some people allow the transition function to be partial, and they still call the resulting model DFA, although this is probably less common than Sipser's definition. The two definitions are almost equivalent: accommodating a partial transition function takes at most an additional state of "subsidence".

seo – How to classify the pages that require user input?

We have a car product page where we describe details about the specific car / bike, such as images, videos, news, reviews, etc.

Now, we are planning to show the price and EMI of these cars as well. Prices and EMI vary from city to city. We are planning to create EMI and a page related to the price for each model city combination.

The only problem is how we create links for these price and EMI pages. Currently, the plan is to show the initial price and the EMI of a popular city and give a link to the user to select their city. Once the user selects the city, he / she will be taken to the price / EMI page based in the city. But the problem is that the crawler will not be able to crawl these pages and users must first select the city. How do we resolve this and make these links traceable?

Remove decimal points to a number that enters through an input

how are you, I hope that well, what I want to do is that the user to enter a numerical value, for example, 10,000, the system knows that it is a decimal value, but that when saving it was saved as an integer, but with the 0 that is to say 10000, by the way, everything would be done from js to save it with php

The Python script takes the input of four elements and generates a 4 x 4 Sudoku grid valid at time O (n), but only when non-repetitive elements are provided


I found a smart and fun thing to do after solving a sudoku puzzle n ^ 2xn ^ 2. I can carry
a grid like this and encodes its indexes as restrictions to generate another 4 x 4 Latin squares in waiting time

enter the description of the image here

Now, I took each successive and coded row as indexes with successive print statements.

Indices of restrictions.


Work code

print (& # 39; enter with [1,2,3...] supports & # 39;)
text = entry ()[1:-1].Division (& # 39;, & # 39;)
print (text[0]text[1]text[2]text[3])
print (text[3]text[2]text[1]text[0])
print (text[1]text[0]text[3]text[2])
print (text[2]text[3]text[0]text[1])


Being a beginner in python, I ask: is there a better way to encode the Sudoku pattern with fewer lines of code?

Because it would be discouraging to have to write exponential constraints for larger Latin squares.

I would appreciate keeping it in O (n) time because I want to enter whole numbers in addition to items 1-4. But, 100-104 and so on ..

I would like to know if there is any way that the ngmodel of my input does not change the value of the other inputs with the same ngmodel in angle 7?

I need that the inputs that have the same ngmodel are not modified, layers that there is another option to recover the values ​​of an input.

sql server – how to group by linq base in the input parameter

Hello, I want to use group by in c # and my result should be like this code in sql

MAX (EffectiveDate) AS EffectiveDate, details.PersonnelBaseID
dbo.tkp_PersonnelDetails AS details
where details.EffectiveDate <= @Time
GROUP BY PersonnelBaseID

@Time is an input parameter:
Suppose that tkp_PersonnelDetails is a list of objects in c #.

drivers – Ubuntu 18.04 – IntelHD3000 – "i965 could not send batchbuffer input error output"

I recently installed Linux on an old laptop.

CPU ~ Dual core Intel Core i5-2410M (-MT-MCP-) speed / max ~ 808/2900 MHz Kernel ~ 4.18.0-25-generic x86_64 up ~ 26 min Mem ~ 1360.0 / 3846.7MB HDD ~ 500.1GB (2.7 % used) Procs ~ 246 Client ~ Shell

It also has Win8.1 in dual boot. There are some problems with Intel HD3000 even in Windows. The Windows driver does not support OpenGL> 3.1. But the games in Windows work well, but with FPS much lower than in Linux.

At first I installed MX Linux (based on Debian9). The games (Supertuxkart, Thimbleweed park) are executed, but the experience freezes every 3 minutes in 5 seconds. The image on the screen simply stops, freezes. I changed the core – without effect. I changed the mode configuration to the intel controllers in the MX Linux configuration, without effect. I lowered the MESA rating from 18.2.6 to 13.0.6 and allowed this to freeze much more, but they still exist.

I installed Ubuntu 18.04 with the hope that something would change, but unfortunately not. More of the application even stops. I'm quite new to Linux, I just try to do what I've read with Google Research. In Ubuntu I understood that I should look in Terminal. Sometimes the terminal does not give any errors while it freezes, but sometimes it gives this

    i965: batchbuffer could not be sent: input / output error

or in context

[verbose  ]    RaceManager: Nb of karts = 8, ghost karts: 0 ai: 7 players: 1

[info   ] Track: The total complexity of the scene is estimated at 755
[info   ] ShaderFilesManager: Compiling shader: /home/cat/games/supertuxkart-1.0-linux/data/shaders/sky.vert
[info   ] ShaderFilesManager: Compiling shader: /home/cat/games/supertuxkart-1.0-linux/data/shaders/sky.frag
[warn   ] SFXManager: sfx regulation - queue size 181
[warn   ] SFXManager: sfx regulation - queue size 181
[warn   ] SFXManager: sfx regulation - queue size 181
[warn   ] SFXManager: sfx regulation - queue size 181
[warn   ] SFXManager: sfx regulation - queue size 181
[warn   ] TrackObjectManager: object not found: stklib_fitchBarrel_a_main_proxy.001 :: stklib_fitchBarrel_a_sandExplosion
[warn   ] MusicOgg: Music does not play when it should be. State of Origin: 4116
i965: batchbuffer could not be sent: input / output error
The scripting engine was not erased correctly.
AL lib: (EE) alc_cleanup: 1 device not closed

I also noticed that sometimes, while freezing the level of the CPU in the system monitor falls to zero.

More detailed graphics:

Graphics: Card: 2nd generation Intel Core integrated graphics controller
Server screen: x11 (X.Org 1.20.4) driver: i915
Resolution: 1366x768@60.00hz
OpenGL: processor: DRI Table Intel Sandybridge Mobile
version: 3.3 Table 19.0.2

I'll be happy for any advice. helps to understand the input / output structure of a transaction

Are each of the portfolios mentioned on the left side here always the same person (ie, perhaps change the portfolios)?

Or, is this transaction receiving entries from several people / wallets (unrelated)?

It could be either. A single user's wallet can consume many UTXOs when a transaction is made, but it is also possible for two (or more) people to provide tickets for a transaction, and they can do so without having to trust each other. Therefore, a transaction could have many potential participants, on the input side and on the output side.


Unit tests: how to test business logic in isolation when it depends on the logic of input validation

Hello, I am creating a demonstration project to teach me about clean architecture and unit testing. My configuration is very similar to this github repository

The important parts for this question are the following 2

  • The Core project that must contain the business logic.
  • The Api project that manages to receive the requests and the presentation logic.

In my Api project (and also in all the other APIs with which I have worked) there is a logic of validation in the incoming request.
For example:
The request contains an age field. I have a validation rule to verify that Age> 0 I do not want to go further if the age is not valid.

In my Core project there is a use case that has the following logic. Yes Age <18 then the user is a child.
Now, in this use case, I have not done any checking to ensure that Age <0 returns an error since I know that this has already been verified and I do not want to duplicate the logic.

I'm writing unit tests for this use case and here's the thing.
If I write a unit test with input Age = -1 and wait for an error of the use case, the test will naturally fail.

The reason for this problem is that the validation logic and the business logic are in two separate locations and this raises my question (s).

Is validation logic really a business logic and, if so, is it wrong to have validation logic somewhere outside of the Core project?
This does not seem right because it means that all requests will go to unfiltered use cases (and I've seen validations done as quickly as possible in many web projects)

How do I test the previous scenario if I do not move the validation logic to the Use Case?
It does not feel good just do not write the Age = -1 Try and trust that someone else has done that check before.
Should I try this case with a different "system under test" at a higher level?

javascript – Change input color in HTML page

In the case of a problem, on my page when a die is filled incorrectly, an alert appears and the color of the entry changes to red, when the data is filled correctly the color of the element, input should return to the norm, but this does not happen.

How can i solve this problem?


Contact Registration


Contact record

first name: e-mail: Birthdate: ACB: city: State: address:



var re_name = / ^[A-Za-záàâãéèêíïóôõöúçñÁÀÂÃÉÈÍÏÓÔÕÖÚÇÑ ]+ $ /;
var re_email = / ^[a-zA-Z0-9][a-zA-Z0-9._-]@ + ([a-zA-Z0-9._-]+ )[a-zA-Z-0-9]$ {2,3} /;
var re_nasci = / ^ ([0-9]{4}) - ([0-9]{two}) - ([0-9]{2}) $ /;
var re_cpf = / ^ ([d]{3}) ([d]{3}) ([d]{3}) ([d]{2}) $ /;

(re_name.test (name.value) && re_email.test (email.value) && re_nasci.test (naci.value) && re_cpf.test (cpf.value)) {
var table = document.getElementById ("table");
var = row tabela.insertRow (1);
var cell1 = row.insertCell (0);
var = cell2 row.insertCell (1);
var cell3 = row.insertCell (2);
var cell4 = row.insertCell (3);
var cell5 = row.insertCell (4);
var cell6 = row.insertCell (5);
var cell7 = row.insertCell (6);

row.appendChild (CELL1);
row.appendChild (cell2);
row.appendChild (CELL3);
row.appendChild (Cell4);
row.appendChild (cell5);
row.appendChild (cell6);
row.appendChild (cell7);

cell1.innerHTML = name.value;
cell2.innerHTML = email.value;
cell3.innerHTML = nasci.value.replace (re_nasci, "$ 1 / $ 2 / $ 3");
cell4.innerHTML = cpf.value.replace (re_cpf, "$ 1. $ 2. $ 3- $ 4");
cell5.innerHTML = city.value;
cell6.innerHTML = state.value;
cell7.innerHTML = endereco.value;
// return Delete ();

if (! re_nome.test (nome.value)) {{
alert ("The field NAME is incorrect");
var txtInc =
document.getElementById ("name") style.borderColor = "# FF0000.";

if (! re_email.test (email.value)) {{
alert ("The EMAIL field is incorrect");
var txtInc =
document.getElementById ("e-mail") style.borderColor = "# FF0000.";
} Alert ("slaa");

if (! re_nasci.test (nasci.value)) {
alert ("The NASCI field is incorrect");
var txtInc = document.getElementById ("I was born"). style.borderColor = "# FF0000";

if (! re_cpf.test (cpf.value)) {
alert ("The CPF field is incorrect");
var txtInc = document.getElementById ("cpf"). style.borderColor = "# FF0000";

Delete function () {
document.getElementById ("Form1") reset ().;