Hi I have a variables that is declared outsides fucntions. How can I use and change these variables inside function usign Python? thank you

Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Hi I have a variables that is declared outsides fucntions. How can I use and change these variables inside function usign Python? thank you
Hi everyone, I am new in PHP. I have this function which convert all alphabetic characters to uppercase: Read more
Hi, This is the syntax to concatenate strings: $text1 = "hello"; $text2 = "world"; $text = $text1 . ' ' . $text2; For your code, use this: function UppercaseText($text_list) { $GlobalText = ""; $TableSize = sizeof($text_list);; for ($i = 0; $i < $TableSize; $i++) { $BigText[] = strtoupper($text_lRead more
Hi,
This is the syntax to concatenate strings:
[crayon-6855eae386d53254015397/]
For your code, use this:
[crayon-6855eae386d56130590081/]
Have a good day
Hi Could please tell me how to add or update SEO Focus keyphrase programmatically? I used this code but it doesn’t work: Read more
Hi, I think Yoast SEO removed metakeywords. Please see this aricle : Meta keywords Why we don't use them - and neither should you use this key instead : _yoast_wpseo_focuskw You can update it like any post meta. This is the syntax: //the value of the focus key word $myFocusKeyword = "focus keyword eRead more
Hi,
I think Yoast SEO removed metakeywords. Please see this aricle :
Meta keywords Why we don’t use them – and neither should you
use this key instead :
_yoast_wpseo_focuskw
You can update it like any post meta. This is the syntax:
[crayon-6855eae386eba922601286/]
I tested it and it works fine.
regards
See lessHello, I have an excel file that is updated automatically from some websites. This files contains products prices. I want to send automatically an email when the price drop under a value. Is there a way How to send email using VBA Excel?How to Send Email in Excel Using VBA? Thanks for your help
Hello, You need to give access Outlook with VBA, you need to activate the Microsoft Outlook Object Library. To activate it, go to Tools in the VBA editor > References. Activate Microsoft Outlook 16.0 Object Library : Then in a module use this subroutine: Sub sendAnEmail(ByRefRead more
Hello,
You need to give access Outlook with VBA, you need to activate the Microsoft Outlook Object Library.
To activate it, go to Tools in the VBA editor > References.
Activate Microsoft Outlook 16.0 Object Library :
Then in a module use this subroutine:
[crayon-6855eae43a76f369996689/]
To test the code, call this code using a buton:
[crayon-6855eae43a774750250733/]
Test:
I hope this will help you.
Good luck!
See lessPlease use this code: $first_date = new DateTime("2022-01-01"); $second_date = new DateTime("2023-02-02"); $difference = $first_date->diff($second_date); echo "<difference> = " . $difference->y . " years, " . $difference->m." months, ".$difference->d." days " . "<difference in dRead more
Please use this code:
[crayon-6855eae386bdc645616730/]
It works as you expect
Hello this code may help you: def flatten_list(original_List): flat_list = [] for sub_list in original_List: for element in sub_list: flat_list.append(element) return flat_list #test original_List=[['a', 'b', 'c', 'd','e'], ['f', 'g', 'h', 'i'], ['j', 'k', 'l'], ['m', 'n', 'o']] print('original listRead more
I have an excel files which contains many sheets. for evey sheet, the name is equal to name of student. How Sort worksheets by alphabet using vba Excel? thank you
hello, try this code it will help you: Private Sub CommandButton1_Click() Application.ScreenUpdating = False 'disable screen update for performance Dim i, j As Integer Dim SheetsCount As Integer SheetsCount = Sheets.Count For i = 1 To SheetsCount - 1 For j = i + 1 To SheetsCount If Sheets(j).NameRead more
Hello, Is there a solution to check if fanuc robot is in motion? I want to share this inormation with PLC. thanks for help.
Hi, In system variables you can find this variable: $MOR_GRP[1].$ROB_MOVE To share the state of robot is moving you can use a an output in a routine executed in a background logic. For example : DO[100] = $MOR_GRP[1].$ROB_MOVE Run this program in background logic: The output DO[100] will be updatedRead more
Hi,
In system variables you can find this variable:
$MOR_GRP[1].$ROB_MOVE
To share the state of robot is moving you can use a an output in a routine executed in a background logic.
For example :
DO[100] = $MOR_GRP[1].$ROB_MOVE
Run this program in background logic:
The output DO[100] will be updated and will get the robot motion status.
I hope this help you.
See less
You can use Counter if you want to do multiple count of the list from collections import Counter list = ['Jones','Adams','Frank','John','Lopez','Jones','Smith','Ivan','Julian','Carlos','Adams','Frank','Jones','John','Ivan'] print(Counter(list)) Result: Counter({'Jones': 3, 'Adams': 2, 'Frank': 2, 'JRead more
You can use Counter if you want to do multiple count of the list
[crayon-6855eae38641f435942684/]
Result:
[crayon-6855eae386423046321969/]
Hi,I am new to VBScript, I am trying to get all the printers status on a network. Is there a script to do that? thank youRead more
here is the code if you need to check if a printer is connected to nework: Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_Printer WHERE Name = 'HP DeskJet 2720E'") For Each objItem in colItems If objItem.Network = True Then WScripRead more
here is the code if you need to check if a printer is connected to nework:
[crayon-6855eae385f5c016436754/]
This script uses the Windows Management Instrumentation (WMI) service to query for printers with the name “HP DeskJet”. It then checks the value of the Network
property for each printer to determine whether it is connected to the network. If the Network
property is True
, the script outputs a message indicating that the printer is connected to the network. If the Network
property is False
, the script outputs a message indicating that the printer is not connected to the network.
I hope this helps!
See lessThis website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.
Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.
If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.
This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.
Keeping this cookie enabled helps us to improve our website.
Please enable Strictly Necessary Cookies first so that we can save your preferences!
Follow this example to create a variable outside functions, and use it inside the functions: MyVariable = 99 #this is a global variable def changeAndPrint_GlobalVariable(): global MyVariable #use global variable in this function with "global" keyword print('Global variable "MyVariable" before changeRead more
Follow this example to create a variable outside functions, and use it inside the functions:
See less[crayon-6855eae38691d761663121/]
This code will print:
[crayon-6855eae386920188142994/]