derivatives – Confusion in the understanding of continuous function

Okay so I started studying derivatives and there is this idea of ​​continuity. The book says "a real evaluated function is considered continuous at a point if the graph of a function has no break at the point of consideration, which is the case if the values ​​of the function at the neighboring points are sufficiently close to the value of the function at the given point "

So, what I do not understand is that the reason why the values ​​of the function at the neighboring points must be sufficiently close to the value of the function at the given point, is not enough if they are defined, why should they be close enough the value of the function at the given point?

python – How to use the replace function to replace a string with a string variable?

I am an absolute beginner in Python. I'm creating a crazy game that uses the replace function to replace the words in my template. The following code does not give a correct output because the template is not modified according to the user's input.

#! / usr / bin / env python
print ("lets you play a crazy libs game")
print ("you will be asked for a word such as noun, adjective, etc. enter the specified word")

template = "" "I can not believe it's already word1! I can not wait to
put my word 2 and visit every word3 of my neighborhood.
This year, I'm going to dress in word4 with word5 word6.
Before word7, I'm sure to grab my word8 word9 to hold all
of my word10.
Happy word11! ""

word1 = input ("enter a holiday")
word2 = input ("enter a name")
word3 = input ("enter a place")
word4 = input ("enter a person")
word5 = input ("enter an adjective")
word6 = input ("enter a part of the body (plural)")
word7 = input ("enter a verb")
word8 = input ("enter an adjective")
word9 = input ("enter a name")
word10 = input ("enter food")
word11 = input ("enter a holiday")
template.replace ("word1", word1)
template.replace ("word2", word2)
template.replace ("word3", word3)
template.replace ("word4", word4)
template.replace ("word5", word5)
template.replace ("word6", word6)
template.replace ("word7", word7)
template.replace ("word8", word8)
template.replace ("word9", word9)
template.replace ("word10", word10)
template.replace ("word11", word11)
print (model)

I know that I can use the flow control loop, but I only understand string manipulation. So please forgive my messy coding.

What is the problem with the Piecewise function?

I do not understand why the Piecewise function works differently in the following examples:

F[x_] : = By pieces[{ {1, x > 0}}, 0]

Here, everything is going well.

But when I define a function for two variables, the error occurs:

F[x_, y_] : = By pieces[{{x y (1 - x - y), x >= 0 && y >= 0 && (1 - x - y) >= 0}}, 0]

SetDelayed :: write: Tag Piecewise in ([Piecewise] x (1-x-y) y x> = 0 && y> = 0 && 1-x-y> = 0
0 true)[x_,y_] is protected.

construct the function – Generate all connected graphs from a set of vertices to n values?

I would like to have a function générerConnecté[list_] a set of predefined valence vertices (number of outgoing edges) generates all possible connected diagrams.

For example, choose the following names for valence vertices 1 through 6:

vertexNames = {x, u, y, z, q, w};

which means a top of the label X can only have one edge attached, you can only have 2 edges, there can only have three edges, etc.

Then, a set of vertices can be chosen, for example. as follows, so that the output is

set = flatten[{Array[x, 5], y, z}]générerConnecté[set,vertexNames]

{X[1] , X[2] , X[3] , X[4] , X[5] , y, z}

enter the description of the image here

Is there an effective way to do this in Mathematica?

No corresponding signature for the SI function

When I try to run the following query with the help of the large query tool,


IF (DATA = "9999-12-31",


I receive the following error:

No corresponding signature for the IF function for argument types: BOOL, DATE, INT64. Signature supported: IF (BOOL, ANY, ANY)

google apps script – the onEdit function does not work below

I have problems with my GAS below:

The problem is that the sendSms () function does not work after editing the sheet.

// Datownik

function onEdit (e) {
var ss = SpreadsheetApp.getActiveSpreadsheet ();
var sheet = e.source.getActiveSheet (). getName ();
var ededColumn = e.range.getSheet (). getActiveCell (). getColumn ();
if (e.value == "ZAKONCZONO" && editedColumn == 12 && e.range.offset (0,5) .isBlank () &&! e.range.offset (0,3) .isBlank () &&! e. range.offset (0,4) .isBlank ()) {
e.range.offset (0,5) .setValue (new Date ()). setNumberFormat ("yyyy-MM-dd");
send a text message();

// Wysyłanie powiadomień SMS

function sendSms () {
key var = "key = ***************";
var password = "password = ********";
var from = "from = TEST";
var to = "to = **********";
var msg = "msg = mytext";
var url = "" + key + "&" + password + "&" + de + "&" + to + "&" + msg;
UrlFetchApp.fetch (url);

Fatal error: Uncaught error: call to member function getProductOptions ()

Can someone help? I have this error in namespace / sales / order / view / order_id / 4 /:
enter the description of the image here

Thank you so much!

Is it possible to put a python function in matlab.engine?

I'm using the matlab.engine package to run matlab codes in python.
For example, my function matlab

function res = my_fn (f)
res = f (1/2)

returns the value of a function & # 39; f & # 39; at x = 0.
Plus, I have a python function

def test_fn (x):
res = x ** 2
return res

Now, how can I run my_fn (test_fn) to return 1/4? This is possible?

Programming Practices – What's a Macro? Difference between macro and function

The macro and the function represent a standalone code unit. They are both tools that facilitate the modular design of a program. From the point of view of the programmer who writes the source code, they seem pretty similar. However, their treatment is different during the life cycle of program execution.

A macro is defined once and used in many places in a program. The macro is developed online during the pre-processing phase. Thus, technically, it does not remain a separate entity once the source code compiled. The instructions for defining macros are part of the program's instructions, just like the other instructions.

The reason for writing a macro is to facilitate the writing and management of the source code for the programmer. Macros are usually desired for simpler tasks where writing a full function would be a penalty for overhead / execution. Examples of situations in which a macro is preferable to a function:

  • Use of constant values ​​(such as mathematical or scientific values) or certain program-specific parameters.

  • Print log messages or manage assertions.

  • Perform simple calculations or condition checks.

When using a macro, it is easy to make changes / corrections to a location that are immediately available wherever the macro is used in the program. A simple recompilation of the program is necessary for the changes to take effect.

The function code, on the other hand, is compiled as a separate unit in the program and loaded into memory during program execution only if necessary. The function code retains its identity independent of the rest of the program. The loaded code is reused if the function is called multiple times. When the function call is encountered in the program being executed, the control is passed to it by the execution subsystem and the context of the current program (statement address back) is kept.

However, when calling a function, the performance should be slightly reduced (context switching, retaining the return address of the main program instructions, transmitting parameters, and processing the values ​​of return, etc.). Therefore, the use of the function is only desired for complex code blocks (compared to macros that handle simpler cases).

With experience, a programmer makes a wise decision to determine whether a piece of code is a perfect fit for a macro or a function of the overall program architecture.

Turing machines – Is the TM number function that ends on an empty word computable?

Let f: N → N be a function where f (n) = number of Turing machines on the entered alphabet {0, 1}, indicates: {0, 1, ..., n} and the {_ (empty) work alphabet, 0, 1, ... n}, which ends on an empty word.

is F calculable?

Let's call a TM that solves this problem K.

It is felt that this problem is not calculable. If we can not even determine if a particular MT is stopping on an empty word (stopping problem reducing the problem of stopping the blank tape), then intuitively finding an MT number with this property should be even more difficult. But I can not think of any reduction since this problem does not use any particular MT input, its input is only a number (in the question I linked above – BLANKHALT, TM takes a machine as input so that we can provide a specific machine – everything we want – for example, machine from an instance of the HALT problem, but this is not the case in this problem).

At first I wanted to reduce the problem of BLANKHALT: I wanted to measure its number of states, alphabet, launch the K TM with the number of states that the BLANKHALT instance has and while counting the number of TMs completed on an empty word, check whether it is the BLANKHALT machine that I just request. BUT I can not do that because I can not assume K even lists TMs, right? Yes K existed, it could have a magic way to solve the issue, without checking all possible TMs one by one, right?