help retrieve a website number.

Hello everyone ,

Can you help me? I would like to scratch telephone numbers on an individual advertising site.

The problem is that each advertisement is followed by a link and that link leads to the individual's advertisement which contains the phone number etc …

So how do you get scrapebox to extract all of these numbers from this site?

I am a beginner thank you.

How to retrieve the "nm_email" property of the structure below with javascript?

How to retrieve the "nm_email" property of the structure below with javascript?

(
        {
            "id": 1,
            "created_at": "2019-11-21T22:25:26.000Z",
            "updated_at": "2019-11-21T22:25:26.000Z",
            "nm_username": "teste",
            "nm_email": "teste@gmail.com"

        }
    )

java – Retrieve password from alert dialog

Mr.
I have a problem with alertDialog. I made an alert window to enter the password and a button. When you press the button, you must store the data entered in a String variable. But I get an error when I click on the line of passwordIngresado = contrasena.getText (). ToString ();
If you can help me. Thank you

public AlertDialog createLoginDialogo (Contextual context) {

    final TextView contrasena = findViewById(R.id.contrasena_input);

    Context mContext = context;
    AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
    LayoutInflater inflater = this.getLayoutInflater();
    View v = inflater.inflate(R.layout.password, null);
    builder.setView(v);

    Button ingreso = (Button) v.findViewById(R.id.entrar_boton);

    ingreso.setOnClickListener(
            new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    Toast t = Toast.makeText(getApplicationContext(),"singin el programa.", Toast.LENGTH_SHORT);
                    t.show();
                    passwordIngresado = contrasena.getText().toString();
                }
            }
    );

    Log.d("EditarConfig", "2:" + passwordIngresado);
    return builder.create();
}

vba – Retrieve the status of a list of FedEx tracking numbers

Context

If you buy something in our establishment, you will receive a box with a shipping label. The two main numbers he will have are a FedEx tracking number and one carton number. For cartons that are not already in a manifested or billed condition in our warehouse management system, it is necessary to check the FedEx website to determine if a carton has left our building. The statuses I would be looking for on the FedEx website are "picked up", "in transit" and "delivered".

The FedEx website classifies tracking numbers in different sections depending on the state. As of June 2019, looking at the html elements, there were 19 sections. To clarify, if you have a list of numbers you are looking for, the website takes the tracking numbers out of order, so that when you compare your list with the website, you scroll up and down by constantly trying to figure out which section the number is in. In most of my uses, there were only 2 or 3 sections used, but it always required a constant from top to bottom when comparing back and forth.
Okay, so you have the status on the website, you match this 10-digit tracking number to the one on your list, then you can highlight the associated carton number. The cardboard number in transit is what we need, so we can process the cardboard number.

Another problem is that the FedEx website only allows you to paste 30 tracking numbers at a time. So if you do this manually for 1000 tracking numbers, you have to sort of split your list into 30 pieces at a time, then paste them into the website, do your research back and forth by comparing the 39; exercise, then do it 33 more times. It will take a long time, and due to the nature of the process and the length of the numbers, it will be very prone to errors. You might even give up because it's so tedious.

Goal

I had a column of FedEx tracking numbers. In another column, I had a list of associated carton numbers. My goal was to have a third column showing FedEx status. On this third column, I applied conditional formatting of the green fill color to highlight the text containing "picked up", "in transit", "delivered". I could then filter on the green color and I would have a list of carton numbers that had left the building. It was the end of my coding. From there, I could take this list and paste it into our warehouse management system to do the necessary processing.

Step-by-step procedure:

Start on shData (1.User Input) by pasting the tracking and cardboard numbers as follows:1. User input

The code will generate links where each link concatenates up to 30 tracking numbers together, like this:2. Links

The code will run through the links, opening Internet Explorer, Ctrl + A (selecting all) and Ctrl + C (copying), then returning to shPastes (3. Pastes) and pasting the results. Some filtering will occur, so as not to recover all the unnecessary text.

Finally, in shStatus (4. Status), the filtered pasta will form a table and an index match will display the associated box. A green filter on the status column will only display cartons in transit, like this:4. Status

A few notes

This is my first publication. I have been programming in VBA for less than a year. I am a beginner. I don't know how to make tables. Error handling is new to me. I installed RubberDuck. This code is actually a rewrite of my original, which was a horrible code, but it worked and saved me a ton of time at work. I am looking for a review, so I can still improve. Thank you for your time.

Code Explorer:
Code Explorer

Worksheet code name: shData

'@Folder("FedEx_Tracking")
Option Explicit

'@Ignore ProcedureNotUsed
Private Sub StartTrackingButton_Click()
    If DoSimpleChecks = "Not Ready" Then
        Exit Sub
    End If
    ProgressIndicatorForm.Show

End Sub

Private Function DoSimpleChecks() As String

    DoSimpleChecks = vbNullString
    '//Check if data has been pasted
    With shData
        If .Range("A2").Value = vbNullString Or .Range("B2").Value = vbNullString Then
            MsgBox "Please paste in the following data:" & vbNewLine & vbNewLine & "TRACKING number into A2" & vbNewLine & "CARTON number into B2", vbInformation, "Required Data"
            .Activate
            .Range("A2").Select
            DoSimpleChecks = "Not Ready"
        Else
            DoSimpleChecks = "Ready"
        End If
    End With

End Function

'@Ignore ProcedureNotUsed
Private Sub ClearOldDataButton_Click()
    Call ClearSheetDataForNewUse
End Sub

Private Sub ClearSheetDataForNewUse()

    With shData
        .Columns("A:E").ClearContents
        .Range("A1").Value = "Paste Tracking"
        .Range("B1").Value = "Paste Carton"
        '//Move the cursor here for the user to begin pasting here
        .Range("A2").Select
    End With

End Sub

Form: ProgressIndicatorForm

'@Folder("FedEx_Tracking")
Option Explicit

Private Sub UserForm_Activate()
    Call TopMost
End Sub

Module: m_fedex_tracking

Attribute VB_Name = "m_fedex_tracking"
'@Folder("FedEx_Tracking")
Option Explicit

Private Enum DataColumns
    (Paste Tracking) = 1                         'A
    (Paste Carton) = 2                           'B
    (Trimmed Tracking) = 3                       'C
    (Concat Links) = 4                           'D
End Enum

Private Enum READYSTATE
    READYSTATE_UNINITIALIZED = 0
    READYSTATE_LOADING = 1
    READYSTATE_LOADED = 2
    READYSTATE_INTERACTIVE = 3
    READYSTATE_COMPLETE = 4
End Enum

Public Sub TopMost()

    On Error GoTo CleanFail
    Dim beginSeconds As Single
    beginSeconds = Timer()

    Call LudicrousMode(True)
    Call FormatColumnsAthruD
    Call TrimTextofTracking
    Call ConcatenateTrackingIntoLinks
    Call FilterForOnlyLinksAndPasteToSheetLinks
    Call LoopOpenIEandSelectAllCopyPaste
    Call SetEntireRangeOfResultingPastes
    Call CopyFilteredPastesToStatusesSheet
    Call CreateTableofStatuses
    Call CreateTableForTrackingCartonLookup
    Call IndexMatchToGetAssociatedCarton
    Call SetConditionalFormattingStatusColumnofStatusSheet
    Call FormatColumnWidthsOfStatusSheet
    Call FilterResultsOfStatusSheet
    Call TakeUserHereAtTheEnd

CleanExit:
    Call LudicrousMode(False)
    Unload ProgressIndicatorForm
    Dim endSeconds As Single
    endSeconds = Timer()
    MsgBox "Time taken to complete:" & vbNewLine & endSeconds - beginSeconds & " seconds", vbInformation, vbNullString
    Exit Sub
CleanFail:
    MsgBox Err.Number & vbTab & Err.Description, vbCritical, "Error"
    Resume CleanExit

End Sub

Private Sub LudicrousMode(ByVal Toggle As Boolean)
    'Adjusts Excel settings for faster VBA processing
    'Code from here: https://www.reddit.com/r/vba/comments/c7nkgo/speed_up_vba_code_with_ludicrousmode/
    Application.ScreenUpdating = Not Toggle
    Application.EnableEvents = Not Toggle
    Application.DisplayAlerts = Not Toggle
    Application.EnableAnimations = Not Toggle
    Application.DisplayStatusBar = Not Toggle
    Application.Calculation = IIf(Toggle, xlCalculationManual, xlCalculationAutomatic)
End Sub

Private Sub FormatColumnsAthruD()

    Const HEADER_ROW_NUM As Long = 1
    '//Format columns A:C as text, not D, because I might want it to be a clickable link in the future
    shData.Columns("A:C").NumberFormat = "@"

    '//If there is old generated data, clear it
    shData.Columns("C:D").ClearContents

    'TODO: Take a look whether using private enum for columns is even necessary for this project scope with such few headers _
    it was mainly done this way because I had never used private enums before.

    '//Re-write the column headers of the cleared columns
    shData.Cells(HEADER_ROW_NUM, DataColumns.(Trimmed Tracking)).Value = "Trimmed Tracking"
    shData.Cells(HEADER_ROW_NUM, DataColumns.(Concat Links)).Value = "Concat Links"

End Sub

Private Function GetLastDataRow(ByVal xlSheet As Worksheet, Optional ByVal columnLetter As String = "A") As Long
    'Function obtained from here: https://codereview.stackexchange.com/questions/43290/importing-data-from-an-external-excel-sheet
    'RubberDuck inspection quacks: "Argument with incompatible object type" every time the function is used, but no errors are present when running the code.

    '//a worksheet's codename is passed to xlSheet;
    GetLastDataRow = xlSheet.Range(columnLetter & xlSheet.Rows.Count).End(xlUp).Row

End Function

Private Sub TrimTextofTracking()

    Dim lastPasteTrackingRow As Long
    lastPasteTrackingRow = GetLastDataRow(shData, "A")

    '//Use trim function to remove leading or trailing spaces, otherwise it will mess up lookups; _
    write to a new column
    Dim i As Long
    For i = 2 To lastPasteTrackingRow
        With shData
            .Cells(i, DataColumns.(Trimmed Tracking)).Value = WorksheetFunction.Trim(.Cells(i, DataColumns.(Paste Tracking)))
        End With
    Next i

    'shData.Columns(DataColumns.(Trimmed Tracking)).EntireColumn.AutoFit

End Sub

Private Sub ConcatenateTrackingIntoLinks()

    'Const OLD_PREFIX_FOR_FEDEX_LINK As String = "https://www.fedex.com/apps/fedextrack/index.html?tracknumbers="
    Const PREFIX_FOR_FEDEX_LINK As String = "https://www.fedex.com/apps/fedextrack/?action=track&trackingnumber="
    Const SUFFIX_FOR_FEDEX_LINK As String = "&cntry_code=us&locale=en_US"

    '//This does not include the 1st tracking number at the start of each range. _
    If included, it would equal 30, which is the max number of tracking numbers that can be concatenated into a link, set by FedEx.com
    Const ADD_TO_FIRST_STRING As Long = 29

    '//First tracking number of link2 is 30 numbers after the first tracking number of link1
    'Link1inD2 = C2:C31
    'Link2inD32 = C32:C61
    Const ROWS_BETWEEN_GENERATED_LINKS = 30

    Dim lastTrimmedRow As Long
    lastTrimmedRow = GetLastDataRow(shData, "C")

    '//Ideally 30 Tracking numbers concatenated to form a link, then for example:& _
    tracking1-30 = link1; tracking 31-60 = link 2; etc.
    Dim i As Long
    For i = 2 To lastTrimmedRow Step ROWS_BETWEEN_GENERATED_LINKS
        shData.Cells(i, DataColumns.(Concat Links)).Value = PREFIX_FOR_FEDEX_LINK & _
                                                            concatRange(shData.Range("C" & i & ":C" & i + ADD_TO_FIRST_STRING), ",") & _
                                                            SUFFIX_FOR_FEDEX_LINK
    Next i

End Sub

Public Function concatRange(ByVal myRange As Range, ByVal mySeperator As String) As String
    'Code came from some website
    Dim cell As Range
    Dim currentRange As String
    Dim r As String

    currentRange = vbNullString

    For Each cell In myRange
        If cell.Value <> vbNullString Then
            r = cell.Value & mySeperator
            currentRange = currentRange & r
        End If
    Next cell

    currentRange = Left$(currentRange, Len(currentRange) - Len(mySeperator))
    concatRange = currentRange

End Function

Private Sub FilterForOnlyLinksAndPasteToSheetLinks()

    shLinks.Cells.ClearContents

    '//Filter column, no blanks
    shData.Range("D1").AutoFilter Field:=4, criteria1:="<>", Operator:=xlFilterValues

    '//Get range & copy
    Dim lastConcatLinksRow As Long
    lastConcatLinksRow = GetLastDataRow(shData, "A")
    shData.Range("D2", "D" & lastConcatLinksRow).Copy

    '//Paste selection to new sheet
    shLinks.Range("C1").PasteSpecial

    '//Remove filter
    shData.Range("D1").AutoFilter

    '//Exit out of cut/copy mode
    Application.CutCopyMode = False

End Sub

Private Sub ClearAndFormatSheetPastesAsText()

    With shPastes
        .Cells.ClearContents
        .Cells.NumberFormat = "@"
    End With

End Sub

Private Sub LoopOpenIEandSelectAllCopyPaste()

    Call ClearAndFormatSheetPastesAsText

    With shPastes
        '//Set the first place to begin pasting; This has to be here for the rest of the sub to work.
        .Activate
        .Range("A1").Select
    End With

    Dim lastLinkRow As Long
    lastLinkRow = GetLastDataRow(shLinks, "C")

    Dim IEbrowser As Object
    Set IEbrowser = CreateObject("InternetExplorer.Application")

    Dim linkRow As Long
    For linkRow = 1 To lastLinkRow

        With IEbrowser
            .Visible = True
            .Navigate (shLinks.Cells(linkRow, "C"))

            '//Wait for page to finish loading
            Do While .busy Or .READYSTATE <> READYSTATE.READYSTATE_COMPLETE
                DoEvents
            Loop

            '//this additional wait is necessary on FedEx website to ensure page is fully loaded
            Application.Wait (Now + TimeValue("00:00:04"))

            '// SelectAll (Ctrl+A)
            .ExecWB 17, 0
            Application.Wait (Now + TimeValue("00:00:01"))
            '// Copy selection (Ctrl+C)
            .ExecWB 12, 2
        End With

        '//Paste as Match destination formatting & _
        FormatHTML, but with no HTMLFormatting is absolutely necessary for pasting from FedEx tracking website & _
        because it keeps necessary table formatting. Tracking no., status, etc. are each kept in same row but separate columns, & _
        which makes it possible to filter the results. Pasting as text or values does not work!

        With shPastes
            .PasteSpecial Format:="HTML", link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True

            '//Set starting point for next paste
            .Cells(.Rows.Count, 1).End(xlUp).Offset(1, 0).Select
        End With

        '//'https://www.excel-easy.com/vba/examples/progress-indicator.html _
        if there are 10 links, it will show 10% complete after the 1st link
        Dim percentComplete As Single
        percentComplete = (linkRow / lastLinkRow) * 100
        progress percentComplete

    Next linkRow

    IEbrowser.Quit
    Set IEbrowser = Nothing
End Sub

Private Sub SetEntireRangeOfResultingPastes()
    '//Find position of last cell
    Dim lastPastesRow As Long
    lastPastesRow = GetLastDataRow(shPastes, "A")
    'TODO: redo this particular lastColumn variable to get rid of ActiveCell
    Dim lastColumn As Long
    lastColumn = ActiveCell.SpecialCells(xlLastCell).column

    '//Set range
    Dim EntireRangeOfPastes As Range
    Set EntireRangeOfPastes = shPastes.Range("A1", shPastes.Cells(lastPastesRow, lastColumn))

    '//Filter range on Column A ascending (A to Z), so the tracking numbers are at the top
    EntireRangeOfPastes.AutoFilter
    EntireRangeOfPastes.Sort key1:=shPastes.Range("A1"), order1:=xlAscending, Header:=xlNo

    '//Remove duplicates on Column A
    shPastes.Range("A1", shPastes.Cells(lastPastesRow, lastColumn)).RemoveDuplicates Columns:=1, Header:=xlNo

End Sub

Private Sub CopyFilteredPastesToStatusesSheet()
    '//Find position of last cell
    Dim lastPastesRow As Long
    lastPastesRow = GetLastDataRow(shPastes, "A")
    'TODO: redo this particular lastColumn variable to get rid of ActiveCell
    Dim lastColumn As Long
    lastColumn = ActiveCell.SpecialCells(xlLastCell).column

    '//Set range
    Dim filteredPastes As Range
    Set filteredPastes = shPastes.Range("A1", shPastes.Cells(lastPastesRow, lastColumn))

    '//Clear entire sheet, where I will be pasting to, along with clearing any conditional formatting
    With shStatus
        .Cells.ClearContents
        .Cells.FormatConditions.Delete
        .Columns.Range("B:B", "B:B").NumberFormat = "@"
    End With

    '//Copy & Paste
    filteredPastes.Copy
    With shStatus
        .Range("B1").PasteSpecial
        .Range("A1").Value = "Carton"
    End With

End Sub

Private Sub CreateTableofStatuses()
    '//Since I have a lookup in column Z (column 26), & _
    Set this first table to have a max of 10 columns ending in column J, so there isn't a possiblity of a table overlap error
    Const FIRST_TABLE_LAST_COLUMN As Long = 10

    '//Get position of lastTrackingRow
    Dim lastTrackingRow As Long
    lastTrackingRow = GetLastDataRow(shStatus, "B")

    '//Create Table
    shStatus.ListObjects.Add(xlSrcRange, shStatus.Range("A1", shStatus.Cells(lastTrackingRow, FIRST_TABLE_LAST_COLUMN)), , xlYes).Name = "tbl_FedEx"

    With shStatus
        '// Write/Overwrite Headers for first few columns in case there are no cartons with status found
        .Range("A1").Value = "Carton"
        .Range("B1").Value = "Tracking No. or Nickname"
        .Range("C1").Value = "Status"
        .Range("D1").Value = "Scheduled Delivery Date"
        .Range("E1").Value = "Ship Date"
    End With

End Sub

Private Sub CreateTableForTrackingCartonLookup()
    'Copying the range from shData to shStatus seems unnecessary, but if I want, I can make a copy of shStatus and rename it or move it to another workbook for historical and sharing purposes. _
    Sharing a single worksheet with all the info on it is easiest.

    '//Set range of first four columns
    Dim trackingCartonLookup As Range
    Set trackingCartonLookup = shData.Range("A1").CurrentRegion

    '//Copy & paste range far enough from the first table
    trackingCartonLookup.Copy
    shStatus.Range("Z1").PasteSpecial

    '//Find position of last cell in range
    Dim lastRow As Long
    lastRow = shStatus.Range("Z1").CurrentRegion.Rows.Count
    Dim lastColumn As Long
    lastColumn = shStatus.Cells(1, shStatus.Columns.Count).End(xlToLeft).column

    '//Create Table
    shStatus.ListObjects.Add(xlSrcRange, shStatus.Range("Z1", shStatus.Cells(lastRow, lastColumn)), , xlYes).Name = "tbl_trackingCarton"

End Sub

Private Sub IndexMatchToGetAssociatedCarton()
    Const MINIMUM_TABLE_ROWS As Long = 2
    Const DOUBLE_QUOTE As String = """"
    '//To display a message upon N/A, replace vbNullString with "text" (including the " " around text)
    Const EXPLANATION_IF_NA As String = DOUBLE_QUOTE & vbNullString & DOUBLE_QUOTE

    On Error GoTo CleanFail

    With shStatus
        '//Index Match
        .Range("A2").Value = "=IFNA(INDEX(tbl_trackingCarton,MATCH((@(Tracking No. or Nickname)),tbl_trackingCarton(Trimmed Tracking),0),2)," & EXPLANATION_IF_NA & ")"

Continue:
        '//To prevent error, Autofill down--only if the table has enough rows
        If .Range("A1").CurrentRegion.Rows.Count > MINIMUM_TABLE_ROWS Then
            .Range("A2").AutoFill Destination:=.Range("tbl_FedEx(Carton)")
        End If

    End With

    '@Ignore LineLabelNotUsed
CleanExit:
    Exit Sub

CleanFail:
    If Err.Number = 1004 Then
        Err.Clear
        '// Win 7 32-bit, Excel 2010 32-bit VBA 6.5 gave this error until I changed the formula to this
        shStatus.Range("A2").Value = "=INDEX(tbl_trackingCarton,MATCH(tbl_FedEx((#This Row),(Tracking No. or Nickname)),tbl_trackingCarton(Trimmed Tracking),0),2)"
    Else
        MsgBox Err.Number & vbTab & Err.Description, vbCritical, "Error"
        Exit Sub
    End If
    GoTo Continue

End Sub

Private Sub SetConditionalFormattingStatusColumnofStatusSheet()
    Const COLOR_GRANNY_APPLE As Long = 13561798  'Same as the Style "Good" fill color

    Dim statusColumn As Range
    Set statusColumn = shStatus.Range("tbl_FedEx(Status)")

    With statusColumn.FormatConditions.Add(xlTextString, TextOperator:=xlContains, String:="Picked Up")
        With .Interior
            .PatternColorIndex = xlColorIndexNone
            .Color = COLOR_GRANNY_APPLE
        End With
    End With

    With statusColumn.FormatConditions.Add(xlTextString, TextOperator:=xlContains, String:="In transit")
        With .Interior
            .PatternColorIndex = xlColorIndexNone
            .Color = COLOR_GRANNY_APPLE
        End With
    End With

    With statusColumn.FormatConditions.Add(xlTextString, TextOperator:=xlContains, String:="Delivered")
        With .Interior
            .PatternColorIndex = xlColorIndexNone
            .Color = COLOR_GRANNY_APPLE
        End With
    End With

End Sub

Private Sub FormatColumnWidthsOfStatusSheet()
    With shStatus
        '//Resize columns 'Carton', 'Tracking', & 'Status'
        .Columns("A:A").ColumnWidth = 26
        .Columns("B:B").ColumnWidth = 26
        .Columns("C:C").ColumnWidth = 26
        '//Autofit 'Paste Tracking', 'Paste Carton', & 'Trimmed Tracking' columns
        .Range("Z:Z", "AB:AB").EntireColumn.AutoFit
    End With
End Sub

Private Sub FilterResultsOfStatusSheet()
    Const COLOR_GRANNY_APPLE As Long = 13561798
    With shStatus
        '//Filter out the blanks in column 1 - disabled for now
        '.ListObjects("tbl_FedEx").Range.AutoFilter Field:=1, Criteria1:="<>"

        '//Filter on the green color
        .ListObjects("tbl_FedEx").Range.AutoFilter Field:=3, criteria1:=COLOR_GRANNY_APPLE, Operator:=xlFilterCellColor
    End With
End Sub

Private Sub TakeUserHereAtTheEnd()

    With shStatus
        '//Navigate the user here to view the results
        .Activate
        .Range("C1").Select
    End With
End Sub

Private Sub progress(ByVal percentComplete As Single)
    'Progress indicator code from here: https://www.excel-easy.com/vba/examples/progress-indicator.html
    ProgressIndicatorForm.Text.Caption = percentComplete & "% Completed"
    ProgressIndicatorForm.Bar.Width = percentComplete * 2

    DoEvents

End Sub

Fixed camlQuery to retrieve the value of the list item via JavaScript and set this value in another list

I have two lists: Catalog and Position.

I want to retrieve the value of a list item in Catalogand use it for the value of a list item in Position.

To get the value of the items in the list Title, I used

// Get values from Catalogue list
function retrieveListItems() {
    var clientContext = new SP.ClientContext.get_current();
    catalogueList = clientContext.get_web().get_lists().getByTitle('Catalog');

    var camlQuery = new SP.CamlQuery(); // initiate the query object
    camlQuery.set_viewXml('' +
        '110');
    itemColl = catalogueList.getItems(camlQuery);
    // returns the item collection based on the query
    context.load(itemColl);
    context.executeQueryAsync(retrieveListItemsSuccess, retrieveListItemsFail);
}

function retrieveListItemsSuccess() {
    var listItemEnumerator = itemColl.getEnumerator();
    while (listItemEnumerator.moveNext()) {
        var oListItem = listItemEnumerator.get_current();
        var listDetails = oListItem.get_item('Title') ;
        console.log("listDetails: " + listDetails);
    }

}
// This function is executed if the above call fails
function retrieveListItemsFail(sender, args) {
    alert('Failed to get list items. Error:' + args.get_message());
}

This will return different title strings, such as "Title1", "Title2", etc.

Using the following code, I want to set the value that I got in the Position listing:

var clientContext = new SP.ClientContext.get_current();
var oList = clientContext.get_web().get_lists().getByTitle('Position');
var item = new SP.ListItemCreationInformation();

var oListItem = oList.addItem(item);
oListItem.set_item('Title', listDetails);

The problem I have is that I don't know what to change camlQuery.set_viewXML, so that it returns the Title if the list item ID has a certain value (eg 4). Right now, it only returns the first 10 items, but I want to get the value of a specific list item. How to do it?

Thank you.

Dynamically retrieve the entire row in Google Sheets for calculation

Goal: I want to retrieve the content of the last line of a Google form and perform a simple calculation with it, then return this value to the user.

Example:
The form contains two questions: "How many apples do you want to buy?" and "How many oranges do you want to buy?"

In a separate sheet I have the prices of apples and oranges and I want to calculate the total amount.

What i have so far:

In the cell for the amount spent, I have:

=arrayformula( mmult( Answers!$A2:$B2 ; Prices!$A$1:$A$2 ) and I can develop it manually for line 3, …, N.

which gives me the same as:

=ARRAYFORMULA( mmult( index(Answers!A:B;row();0);Prices!$A$1:$A$2 ) )

I want to retrieve the content of the last line of my sheet Answers then use mmult on this last line. Prices will not vary.
It is important that I do the calculation for the last line only as this will be returned to the user.

What I do not understand:
The formula with arrayformula and index should work because row() returns the current row and the index range corresponds to the two columns.

How can I modify the formula to get what I want?

mysql – Modify the query with posts_clauses to retrieve NULL values ​​last

I am running a query to classify my articles first by the author of the book, then by the name of the book.
I'm trying to achieve something like this:

Author A: Book A

Author A: Book B

Author B: Book F

Author C: Book C

NULL: Book D

and so on … I'm running this query:

$args = array(
       'post_type' => 'ouvrages',
       'orderby' => 'meta_value auteur titre',
       'meta_query' => array(
            'auteur' => array(
                'key' => 'auteur',
                'compare' => 'EXISTS',
            ),
            'titre' => array(
                'key' => 'titre',
                'compare' => 'EXISTS'
            ),
        ),
        'order' => 'ASC'
);

I am trying to modify the query with posts_clauses, but I don't really know the MySQL syntax.
How can I modify the clause (orderby) in the posts_clauses to get the null values ​​of the meta_key & # 39; author & # 39; last instead of first?

Thank you !

magento2.3 – retrieve the attribute value of the current product

I am trying to get the value of an attribute which I can save as a variable and use in another file as an echo.

I start by creating a function

public function getCurrentProductStyle()
{
    $result = false;
    try {
        $product = $this->coreRegistry->registry('current_product');
        if (isset($product) && $product != '') {
            $result = $product->getData('acu_in_stylegroup');
        }

    } catch (Exception $e) {
        $this->emarsysLogs->addErrorLog(
            $e->getMessage(),
            $this->storeManager->getStore()->getId(),
            'getCurrentProductSku()'
        );
    }

    return $result;
}

I then import an assignment to a variable

$productStyleCheck = $block->getCurrentProductStyle();

I'm trying to echo the variable


I cannot recover the value of the attribute. I've tried just about anything I can think of. I can return static numbers or text. Simply not the value of the dynamic variable.

Google Search Console was unable to retrieve my XML Sitemap

I have an asp.net web form project.
To create a sitemap on this project, I didn't use standard asp.net Web.sitemap file in Visual Studio, like doing:

File menu -> New file -> Web.sitemap of Visual Studio.

Instead, I used the website below to create a sitemap:
https://www.xml-sitemaps.com

Here is my sitemap created:







  https://virtualvisacards.cf/
  2020-01-12T13:38:02+00:00
  1.00


  https://virtualvisacards.cf/Shop.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/Default.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/Activate_Your_Cards.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/Check_Card_Balance.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/How_To_Buy_Bitcoin_With_CoinMama_Worldwide.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/How_To_Buy_Bitcoin_In_Less_Than_5_Minutes.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/What_Is_Escrow_Protection_How_Does_Escrow_Work.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/Our_Team.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/About_VirtualVisaCards_Site.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/Where_To_Use_Virtual_Visa_Cards.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/Privacy_Policy.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/Term_Of_Service.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/FAQs.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/Contact_Us.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/Products/Silver_Virtual_Visa_Card.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/Products/Gold_Virtual_Visa_Card.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/Products/Platinum_Virtual_Visa_Card.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/billionaire_mark_cuban_i_see_gold_and_bitcoin_as_being_the_same_thing.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/what_are_virtual_credit_cards_and_should_you_have_one.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/stay_secure_online_with_virtual_credit_card_numbers.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/credit_not_as_great_as_you_would_like.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/all_you_want_to_know_about_emv_chip_cards.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/want_something_secured.aspx
  2020-01-12T13:38:02+00:00
  0.80


  https://virtualvisacards.cf/CheckOut.aspx
  2020-01-12T13:38:02+00:00
  0.64




And here you can validate my site map:
https://www.xml-sitemaps.com/validate-xml-sitemap.html
Here is my sitemap URL:
https://virtualvisacards.cf/sitemap.xml
You can see that everything is fine on my sitemap.
Now when I submit my sitemap to the Google Search Console, it says:

impossible to recover

Unable to retrieve sitemap - Google Search Console error
Is this a bug from Google?
What have I done wrong and how can I fix this error?
For several sites, I have had this error.


PS:

For another website, I also have this problem.
I waited 1 month – but the error is still there.


Edit

I cleared the IIS logs and here is the log after submitting my sitemap to Google.

Software: Microsoft Internet Information Services 7.5
Version: 1.0
Date: 2020-01-12 15:35:16
Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs (User-Agent) sc-status sc-substatus sc-win32-status
taken on 2020-01-12 15:35:16 176.9.199.136 GET /sitemap.xml – 80 –
172.68.51.35 Mozilla / 5.0 + (Windows + NT + 6.1; + Win64; + x64; + rv: 71.0) + Gecko / 20100101 + Firefox / 71.0
304 0 0 78 2020-01-12 15:35:27 176.9.199.136 GET /sitemap.xml – 80 –
141.101.99.168 Mozilla / 5.0 + (compatible; + XML + Sitemaps + Generator; + www.xml-sitemaps.com) + Gecko + XML-Sitemaps / 1.0
200 0 0 33

As you can see, Google has not made any requests to my machine at all.
I am so confused about this.

how to retrieve all the images of a product using the API?

need a sample code to retrieve magento images. I still see the search results in php but nothing in java.