Microsoft Excel – Replaces the value of a column

My question is how will I replace the value of a cell base on its header?

here are my sample data, i want to replace all the "x" value so far (well based on their designated column please sample raw data sample

the exit will be like that well see the second photo
example of data output

I do not know how to create a macro for that. I'm just wondering about adding the macro in the sheet itself so that it runs automatically without clicking a button whenever I want to change the value.

pathfinder – Are there any potential problems with this "dueling cloak", a house beer, which replaces a shield?

I play a vanquished warrior, named Vesuvio Monteverdi. He refuses to use a shield because there is no honor to that.

With the authorization of DM, are there any potential mechanical and narrative pitfalls with the introduction of this homebrew concept:

Dueling cloak
Mechanically similar to a standard shield, with the difference that it is made of thick fabric and that it also occupies the shoulder slit.

(we play in a hybrid campaign 3.5 / PF)

pathfinder – Do you have problems with this "dueling cloak", a house beer, that replaces a shield?

I play a vanquished warrior, named Vesuvio Monteverdi. He refuses to use a shield because there is no honor to that.

With the authorization of DM, are there any potential mechanical and narrative pitfalls when introducing this house concept:

Dueling cloak
Mechanically similar to a standard shield, with the difference that it is made of thick fabric and that it also occupies the shoulder slit.

(we play in a hybrid campaign 3.5 / PF)

magento2 – Replaces the SenderBuilder class to add BCC when sending the invoice

I did not find any event when the billing email is sent. I have therefore tried to replace the Magento Sales Model Order Email SenderBuilder class. my localhost by in the development website (which is multistore), it did not work.
I do not know if there is a better solution to appeal to an observer if there is an event sending invoices by email.

so in my module

Vendor / ModuleName / etc / di.xml





In app / code / Vendor / ModuleName / Model / Sales / Order / Email / SenderBuilder.php

Wetag  InvoiceEmail namespace  Template  Sales  Order  Email;

the SenderBuilder class expands  Magento  Sales  Template  Order  Email  SenderBuilder
{



public function send ()
{


$ this-> configureEmailTemplate ();

$ this-> transportBuilder-> addTo (
$ this-> identityContainer-> getCustomerEmail (),
$ this-> identityContainer-> getCustomerName ()
)

$ copyTo = $ this-> identityContainer-> getEmailCopyTo ();

if (! empty ($ copyTo) && $ this-> identityContainer-> getCopyMethod () == & bcc & # 39;) {
foreach ($ copyTo as $ email) {
$ this-> transportBuilder-> addBcc ($ email);
}
}

if ($ this-> identityContainer instanceof  Magento  Sales  Template  Order  Email  Container  InvoiceIdentity) {
// do some stuff

$ objectManager =  Magento  Framework  App  ObjectManager :: getInstance ();
$ CustomerModel = $ objectManager-> create (Magento  Client  Model  Client & # 39;);

$ CustomerModel-> setWebsiteId ($ this-> identityContainer-> getStore () -> getStoreId ());
$ CustomerModel-> loadByEmail ($ this-> identityContainer-> getCustomerEmail ());
$ email = $ CustomerModel-> getData ()['invoice_email'];


if (! empty ($ email)) {

$ this-> transportBuilder-> addBcc ($ email);
}

}
$ transport = $ this-> transportBuilder-> getTransport ();
$ transport-> sendMessage ();
}
}

replacement – Replaces every nth part of the list

I have a list:

b = ConstantArray[1, 50];

And I would like to replace each sentence of the 5th element by 2: I arrived with:

b[[;; ;; 5]]= b[[;; ;; 5]]/. {1 -> 2}

which works, but I do not like it very much because it is very rigid and just ugly (repeat b[[;; ;; 5]]).

I was trying to do this job with Replace part but I do not know how, I tried to manually replace each element in the same way:

Replace part[b, _?Mod[i_, 5]-> 2]

and also

Replace part[b, _?Mod[#, 5]& -> 2]

but they do not work. Any suggestions on this?

forms – druapl 8 ajax replaces the selected options

I have a form:

public function buildForm (array $ form, FormStateInterface $ form_state)
{
// Disable caching on this form.
$ form_state-> setCached (FALSE);

$ scheme_data;
// code for some options to be removed for readability

$ form['scheme'] = [
      '#type' => 'select',
      '#title' => $this->t('Select an organisation'),
      '#options' => $scheme_data,
      '#empty_option' => $this->t('Select an organisation'),
      '#ajax' => [
        'callback' => [$this, 'choseSchemeOption'],
& # 39; event & # 39; => & # 39; change & # 39;
& # 39; wrapper & # 39; => & # 39; scheme-option & # 39 ;,
],
];

$ form['scheme-option']['option-query']    = [
      '#type' => 'container',
      '#attributes' => ['id' => 'option-query'],
];

$ formTrigger = $ form_state-> getTriggeringElement ();
if (is_array ($ formTrigger)) {
switch ($ formTrigger['#name']) {

case "scheme":
$ option_data = $ this-> buildQueryselect ($ form_state, true);
$ form['scheme-option']['option-query']    = [
                '#type' => 'select',
                '#title' => $this->t('Tell us more about your query'),
                '#empty_option' => $this->t('Select an option'),
                '#options' => $option_data,
                '#ajax' => [
                  'callback' => [$this, 'choseQuery'],
& # 39; event & # 39; => & # 39; change & # 39;
& # 39; wrapper & # 39; => & # 39; option-query & # 39 ;,
],
];
}

Pause;

case-option-query:
$ option_data = $ this-> buildQueryselect ($ form_state);
$ form['scheme-option']['option-query']    = [
            '#type' => 'select',
            '#title' => $this->t('Tell us more about your query'),
            '#empty_option' => $this->t('Select an option'),
            '#options' => $option_data,
            '#ajax' => [
              'callback' => [$this, 'choseQuery'],
& # 39; event & # 39; => & # 39; change & # 39;
& # 39; wrapper & # 39; => & # 39; option-query & # 39 ;,
],
];
Pause;
}
}


return $ form;
}

public function choiceSchemeOption (array & $ form, FormStateInterface $ form_state)
{
return form $['scheme-option'];
}

public function choQuery (array & $ form, FormStateInterface $ form_state)
{
return form $['scheme-option']['option-query'];
}
private function buildQueryselect ($ form_state, $ reset = false)
{
// return the selection options
}

When the schema selects changes, the -query option updates the correct options.
When I change the option option selected, I want its options to change depending on the selected value.

If I debug and monitor the variables, $ option_data is updated according to my expectations, but not the front-end options.

I've also tried commenting on the "box" option-query switch: "in buildForm () and updated the ajax callback:

        public function choQuery (array & $ form, FormStateInterface $ form_state)
{
$ option_data = $ this-> buildQueryselect ($ form_state);
$ form['scheme-option']['option-query']['#options']    = $ option_data;
return form $['scheme-option']['option-query'];
}

But that did not achieve the desired result either. It has also started generating "Illegal Choice xx in Learn more about your query item". errors when selecting an option after the first attempt.

What should I do to replace the options of the selection that calls ajax recall? I do not want to replace the options in a different form element, as shown by the examples I have seen so far.

Thank you for your help.

macos – can i make sure that an application keyboard shortcut replaces the global default?

For example, Ctrl-Space is a commonly accepted shortcut for "code completion" in several IDEs (IntelliJ IDEA, etc.), but at the system level, it is a shortcut "change source" of entry (language) ". I do not need any other languages ​​when I am in IDEA, can I give it a preference?
I know I can change the global shortcut to something different, I just prefer this option less.
I am on Sierra for the moment.

mysql – the best query replaces this query and which column would be indexed

my request like that

select id_request, username_request
from darkhast_follower
where darkhast_follower.id_request! = & # 39; 9762952594 & # 39;
AND darkhast_follower.status = 0
AND NOT exists (select null
since log_follow
where log_follow.other_id = darkhast_follower.id_request
AND log_follow.id = & # 39; 9762952594 & # 39; LIMIT 1)
LIMIT 1

log_follow has 30 million rows
and darkhast_follower has 1000 lines

log_follow indexed other_id and id

darkhast_follower indexed request_id and status

it's slow

I have 40k enable the user

soryy for bad english

- Server version: 5.7.23-log
- PHP Version: 5.6.31

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START THE TRANSACTION;
SET time_zone = "+00: 00";


/ *! 40101 SET @OLD_CHARACTER_SET_CLIENT = @@ CHARACTER_SET_CLIENT * /;
/ *! 40101 SET @OLD_CHARACTER_SET_RESULTS = @@ CHARACTER_SET_RESULTS * /;
/ *! 40101 SET @OLD_COLLATION_CONNECTION = @@ COLLATION_CONNECTION * /;
/ *! 40101 SET NAMES utf8mb4 * /;


- ------------------------------------------------- --- --------

-
- Table structure for the `darkhast_follower` table
-

CREATE TABLE `darkhast_follower` (
`IDD` int (11) NOT NULL,
`id` varchar (20) NOT NULL,
`username` varchar (65) NOT NULL,
`id_request` varchar (20) NOT NULL,
`username_request` varchar (65) NOT NULL,
`token_id` text NOT NULL,
`darkhasti` int (5) NOT NULL,
`daryafti` int (5) NOT NULL,
`date` text NOT NULL,
`status` tinyint (1) NOT NULL,
`gsm_sender` tinyint (1) NOT NULL,
`error_report` tinyin (3) NOT NULL,
`bot` tinyint (1) NOT NULL,
`back` tinyint (1) NOT NULL
) ENGINE = InnoDB DEFAULT CHARSET = utf8;

-
- Index for empty tables
-

-
- Index for the `darkhast_follower` table
-
ALTER TABLE `darkhast_follower`
ADD PRIMARY KEY (`IDD`),
ADD KEY `status` (` status`),
ADD KEY `id_request` (` id_request`);

-
- AUTO_INCREMENT for empty tables
-

-
- AUTO_INCREMENT for the `darkhast_follower` table
-
ALTER TABLE `darkhast_follower`
MODIFY `IDD` int (11) NOT NULL AUTO_INCREMENT;
COMMIT;

/ *! 40101 SET CHARACTER_SET_CLIENT = @ OLD_CHARACTER_SET_CLIENT * /;
/ *! 40101 SET CHARACTER_SET_RESULTS = @ OLD_CHARACTER_SET_RESULTS * /;
/ *! 40101 SET COLLATION_CONNECTION = @ OLD_COLLATION_CONNECTION * /;


SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START THE TRANSACTION;
SET time_zone = "+00: 00";


/ *! 40101 SET @OLD_CHARACTER_SET_CLIENT = @@ CHARACTER_SET_CLIENT * /;
/ *! 40101 SET @OLD_CHARACTER_SET_RESULTS = @@ CHARACTER_SET_RESULTS * /;
/ *! 40101 SET @OLD_COLLATION_CONNECTION = @@ COLLATION_CONNECTION * /;
/ *! 40101 SET NAMES utf8mb4 * /;

- ------------------------------------------------- --- --------

-
- Structure of the `log_follow` table
-

CREATE TABLE `log_follow` (
`IDD` int (11) NOT NULL,
`id` varchar (20) NOT NULL,
`username` varchar (65) NOT NULL,
`other_user` varchar (65) NOT NULL,
`other_id` varchar (20) NOT NULL
) ENGINE = InnoDB DEFAULT CHARSET = utf8;

-
- Index for empty tables
-

-
- Index for the `log_follow` table
-
ALTER TABLE `log_follow`
ADD PRIMARY KEY (`IDD`),
ADD KEY `id` (` id`),
ADD KEY `other_id` (` other_id`);

-
- AUTO_INCREMENT for empty tables
-

-
- AUTO_INCREMENT for the `log_follow` table
-
ALTER TABLE `log_follow`
MODIFY `IDD` int (11) NOT NULL AUTO_INCREMENT;
COMMIT;

/ *! 40101 SET CHARACTER_SET_CLIENT = @ OLD_CHARACTER_SET_CLIENT * /;
/ *! 40101 SET CHARACTER_SET_RESULTS = @ OLD_CHARACTER_SET_RESULTS * /;
/ *! 40101 SET COLLATION_CONNECTION = @ OLD_COLLATION_CONNECTION * /;

darkhast_follower
log_follow

python – OPENPYXL For the loop that traverses each cell of a specified column and replaces its value with an uppercase letter.

for i in column_d: # column d is a tuple of cell objects in an Excel worksheet
if type (i.value) == str: #to avoid empty cells
print (i.value) #cell value before
i.value = i.value.upper () # is there a way to shorten this line?
# without having to write i.value each time
print (i.value + ###) # value of the cell after

Without affecting the cell object to a variable, you can edit its contents without calling the 'value', but I do not know how I can do it here if I'll just reassign a string to the variable i.

    = & # 39; text & # 39; is identical to .value = & # 39; text & # 39;

phpBB replaces prosilver | Promotion Forum

about us

Promotion Forum is a webmaster forum that focuses on internet marketing to help webmasters and administrators make their website perform.

On Forum Promotion, you can expand your website by posting ads on our directory, by buying free ads or by trading. You can also ask the help of experienced webmasters in our discussion section.