bash – GNU parallel – how to manage the column separator without spaces or new lines?

I know the following scenario.

doit() {
  echo Doing it for $1
  sleep 2
  echo Done with $1
}

export -f doit
parallel --colsep ',' -0 doit ::: 1, 2, 3

Output1 desired:

Do it for 1
Made with 1
Do it for 2
Made with 2
Do it for 3
Made with 3

But in my case, I have no space ' ' between the arguments.
Here is my code.

doit() {
  echo Doing it for $1
  sleep 2
  echo Done with $1
}

export -f doit
parallel --colsep ',' -0 doit ::: 1,2,3

And I get the following output.

output2:

Do it for 1
Made with 1

How can I get the first output I want with the second block of code?

jQuery – Limit selection by column and total

I create a custom product selector, where the user has multiple options in multiple categories.

I wish I could limit the selection to 3 per category, but 7 in total.

The multiple categories are divided into

    with the options listed in.

    When a user clicks on an option, an "active" class is added to

  • .

    I used length to determine in one click how many active classes are defined in total, but how could I configure this so that it alerts on more than 3 per category section and more than 7 in total?

    $('#step-1 li').click(function(){
    
        $(this).addClass('active');
    
        var active_total = $('#step-1 li.active').length;
    
        if(active_total > 7) {
            alert('No more than 7 items in total.');
        }
    
    })
    

optimization – MySQL: Should I keep a cumulative total column in a table instead of summing a second table?

I have 3 named tables users, achievements, and userAchievements. the users The table contains information such as username, password, email, etc … and the achievements the table contains a list of possible achievements and how many points they are worth, and userAchievements lists all the achievements made by all users.

users                        userAchievements           achievements
--------------------------   ------------------------   ------------
username | email             username | achID           achID | points
johnb     john@aol.com       johnb      ach001          ach001  5
daver     dave@yahoo.com     johnb      ach002          ach002  10
miket     mike@hotmail.com   daver      ach001          ach003  15

In my app, once the user is logged in, some information about them in the user table is displayed with their total success points. I do this by using two SELECT queries, one to extract information from the users, the other to add up the points for all the achievements they have accomplished. In order to reduce it to a single SELECT query, I am thinking of adding a column "total accomplishment" to users which is added to the point value each time an entry in userAchievements is made.
Is it possible to get everything I need with a single SELECT query without doing this? Or is there a better way to implement what I am trying to do?

python – Pandas DataFrame – How to get the most recent value for each column when grouped by another column

Alright guys, I'm stumped. To be completely honest, I am very new in handling data frames using pandas.

Suppose I have the data frame below where the most recent entry is at the top, in descending order (I have already completed this part in my program based on data I have).

We will call it & # 39; df_people & # 39; and it contains this data:

username    first   middle      last
jschmoe     joseph  NaN         schmoe
jdoe        jane    marie       doe
jschmoe     joseph  michael     schmoe
jdoe        jane    NaN         doe
tuser       test    NaN         user

I am trying to analyze this to only display the most recent valid data from each column based on the column 'username & # 39; (or of course leave & # 39; NaN & # 39; if & # 39; there are no valid entries)

Expected result:

username    first   middle  last
jschmoe     joseph  michael schmoe
jdoe        jane    marie   doe
tuser       test    NaN     user

In my current data frame, I will have 5 to 100 columns and easily more than 100,000 rows each time I have to run this report. Although I don't expect anything Great quick for what i'm trying to accomplish, i just wanted to give a scale so you can understand how even small optimizations can make a big difference. Reliable results are always more important than finishing the report a few seconds faster! At the moment, I have no results … so everything is better than that …

I have tried a ton of different combinations of things by browsing through this site and the pandas documentation, but I think my lack of knowledge about what all pandas are capable of is very limiting here.

Any recommendation or idea would be appreciated!

readability – Alignment of the layout on a single column

Alignment of a column to the left is related to accessibility.

Left aligned text columns are easier to read for disabled users like dyslexia as the uneven space between the left and right characters can be difficult to understand.

According to WCAG SC # 1.4.8

People with Certain Cognitive Impairments Have Reading Problems
it is both justified on the left and on the right. Uneven spacing between
words in fully justified text can cause "rivers of white" to flow
at the bottom of the page, which makes reading difficult and in some cases impossible.
Text justification can also result in close word spacing,
so it is difficult for them to locate the word boundaries.

How to add a list column to list the content type via SharePoint Online PowerShell?

I am trying to add a custom property to list the content type on the SharePoint Online site by following the script:

$context=New-Object Microsoft.SharePoint.Client.ClientContext($URL)
$context.Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $AdminPassword)
$context.ExecuteQuery()

$web = $context.Web
$context.Load($web)
$context.ExecuteQuery()

$lib = $web.Lists.GetByTitle("Document Library")

$context.Load($lib)
$context.ExecuteQuery()

$cts = $lib.ContentTypes
$context.Load($cts)
$context.ExecuteQuery()

ForEach ($c in $cts) {
     if($c.Name -eq "Document") {
        $ct = $c
    }
}

$fields = $lib.Fields
$context.Load($fields)
$context.ExecuteQuery()

ForEach ($fl in $fields) {
    if($fl.Title -eq "Keyword") {
        $keyword = $fl
        $context.Load($keyword)
        $context.ExecuteQuery()
    }
}

$link=new-object Microsoft.SharePoint.Client.FieldLinkCreationInformation
$link.Field=$keyword

$ct.FieldLinks.Add($link)
$ct.Update($false)
$context.ExecuteQuery()

But I had the exception below when running.

Exception setting "Field": "Cannot convert the
"Microsoft.SharePoint.Client.FieldText" value of type
"Microsoft.SharePoint.Client.FieldTe xt" to type
"Microsoft.SharePoint.Client.Field"." At D:tmpAddContentType.ps1:47
char:44
+ (cultureinfo)::CurrentUICulture = 'en-US'; $link.Field=$keyword
+                                            ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) (), SetValueInvocationException
    + FullyQualifiedErrorId : ExceptionWhenSetting   Cannot convert argument "parameters", with value:
"Microsoft.SharePoint.Client.FieldLinkCreationInformation", for "Add"
to type "Microsof t.SharePoint.Client.FieldLinkCreationInformation":
"Cannot convert the
"Microsoft.SharePoint.Client.FieldLinkCreationInformation" value o f
type "Microsoft.SharePoint.Client.FieldLinkCreationInformation" to
type "Microsoft.SharePoint.Client.FieldLinkCreationInformation"." At
D:tmpAddContentType.ps1:51 char:1
+ $ct.FieldLinks.Add($link)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) (), MethodException
    + FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

The examples I have found so far all relate to adding site columns to the content type, not the list column.
Is there a way to add a list column to the list content type via PowerShell?

Thanks in advance.

query – Get 2 meta values ​​from the meta key column

I want to select & # 39; name & # 39 ;, & # 39; SKU & # 39; and & # 39; price & # 39; among 2 WP tables: wp_posts and wp_postmeta.
I don't know how to get the data from the & # 39; meta_value & # 39; column twice for & # 39; meta_key & # 39; = & # 39; _ price & # 39; and & # 39; meta_key & # 39; = & # 39; _ sku & # 39;, ex.
enter description of image here

My current request:

                    "SELECT a.post_title, m1.meta_value, m2.meta_value FROM wp_posts a, wp_postmeta m1, wp_postmeta m2
                WHERE a.post_type='product' AND m1.post_id = a.ID
                AND m1.meta_key='_sku'
                AND m2.meta_key='_price'"

c # – How to add a column with text in the grid by code behind?

I do a SELECT in the bank and I install my grid, then I do another SELECT and
necessary to add an additional column with the values ​​provided.

I have a ForEach to run through all the rows in the second SELECT, and another ForEach to run through all the rows in the grid. If the name of the course exists in the grid, you will have to add this new column, with the value (R $) of the course.

I try that way, it doesn't give an error, but it also didn't show the new column.

List list2 = dal.ValorCurso(candidato);

          list2.ForEach(delegate (Informacoes dom)
          {
            string local = list2(dom.INDEX).CURSO;

            foreach (GridViewRow row in this.gvInscricoesCurso.Rows)
            {
              if (local.Contains(row.Cells(0).Text))
              {
                TemplateField template = new TemplateField();
                template.HeaderStyle.HorizontalAlign = HorizontalAlign.Center;
                template.HeaderText = "Valor do curso";

                gvInscricoesCurso.Columns.Add(template);
              }
            }
          });

Anyone have a tip on how to do it or otherwise?

IF statement Verification of the entire column

I would like my if statement to check all lines and produce "checking hints" if even one line qualifies. Does this make sense?

= if (G3: I3 = 0, "verification tips")enter description of image here

Microsoft Excel – Search for a word in a different column range and return all cells containing that word

Can someone help me with a formula or VBA that searches for the word in column C in column A and returns all cells containing that word in column A to a new column next to the word searched. Example "Zello" is found twice in column A and the new data is now in
column D "Zello rocks, zello ninja.

enter description of image here