#StackBounty: #search #url #syntax #geolocation #openstreetmap How to search OpenStreetMap for tags?

Bounty: 50

How can I have e.g. all highway speed cameras displayed on the map, i.e. what is the URL syntax to search OpenStreetMap for certain tags? And where is this information (tagged locations, POIs etc.) coming from, is it collected/contributed by OSM community members or does the OSM project also use third-party sources (private/public/proprietary) and do private persons, companies, governments etc. have the power to censor/block/redact such information?


Get this bounty!!!

#StackBounty: #sharepoint-server #search #search-results #enterprise-search #sharepoint-search For SharePoint Search Server Express 201…

Bounty: 100

SharePoint Search Server Express 2010, Why is Rank Returned from Scope() Always Default (100000000)

I need to know what I need to do differently in terms of configuration changes, etc. within Search Server Express to have this rank issue resolved.

I have crawled a very large number of files using Search Server Express 2010 and when I select rank from Scope using QueryText (for a given search term), I always get the same rank for all returned items, 100000000.

Because of this, order by rank makes no difference. I need the rank to reflect the number of occurrences of the particular term in each file. Rank used to vary (and be correct) when SSE 2010 was installed on Windows Server 2008 R2, but with Windows Server 2016 the rank is always 100000000.

For example,
If File A has "oil" 1 time, File B has "oil" 3 times and File C has "oil" 4 times, the current order returned from the select below, with the order by, is:
File A, File B, File C
(because that is the order in which the files were crawled, and each file unfortunately returns the rank of 100000000 for each file).
The order I need to have returned, with the order by, is:
File C, File B, File A
(with File C having a larger rank than B, and B having a larger rank than A, so that the order by rank can order things correctly).

I call method Query of the built in SOAP Service that comes with Search Server Express 2010 (_vti_bin/search.asmx) and pass the following:

<QueryPacket><Query><QueryId /><OriginatorId /><Context>
<QueryText type='MSSQLFT' language='" + language + "'>
   SELECT rank, Filename, path, description FROM SCOPE()
   where (path like 'file://" + RepositoryFiles + "/%.xml')
    and (contains(All, '"oil*"')) 
    order by rank desc
 </QueryText>
 </Context>
 <EnableStemming>true</EnableStemming>
</Query></QueryPacket>;

I very much appreciate insight that can lead to a resolution of this issue.


Get this bounty!!!

#StackBounty: #google-chrome #search #address-bar How do I disable Bookmark Suggestions in my Chrome Search bar in 2020?

Bounty: 50

While searching/navigating the web I often use the address bar to get to where I want to go, but I see that Google Chrome is combing through my bookmarks to make suggestions based on my bookmarks. While I can see this might be a useful feature to some, it is not something I wish to have happen when using the address bar.

So my question is: How do I disable Bookmark Suggestions in my Chrome Search bar in 2020?

  • Using Chrome build: Version 81.0.4044.138 (Official Build) (64-bit)
  • Windows 10 Pro 1909 build 18363.815


Get this bounty!!!

#StackBounty: #swift #ios #search Searching within a data model using an array matching multiple terms

Bounty: 50

I have a standard tableview app that displays information from a data model array that uses a custom class. There is a UISearchController to filter the data.

A simplified version of the custom class is shown. I use a computed property for a string that is checked when searching the data.

class myObject: NSObject {

    // Inherits from NSObject as I use NSCoding for persistence

    var id: String = UUID().uuidString // These are unique for each item

    var name: String = ""
    var type: String = ""
    var batch: String = ""

    var searchableString: String {
        // This is a concatenation of some of the properties
        return self.name + " " + self.type + " " + self.batch
    }

    // etc...
}

Every time the user types a new character into the search bar of the UISearchController, the following method is called, which filters the main data array into a filteredItems array. Initially, I used a very basic form where the entire search text had to match.

func searchItems() {
    if let searchText = searchController.searchBar.text {
        filteredItems = allItems.filter { item in
            return item.searchableString.lowercased().contains(searchText.lowercased())
        }
    }
}

filteredItems is then displayed in the tableview.

I wanted to improve this so that each word typed in the search bar is searched for separately. I tried this, but of course it filters using OR logic (any word can match).

func searchItems() {
    if let searchText = searchController.searchBar.text?.split(separator: " ") {
        // Need to convert substring from split back to string
        let searchArray = searchText.map() { substring in
            String(substring)
        }
        filteredItems = allItems.filter { item in
            return searchArray.contains(where: drug.searchableString.lowercased().contains)
        }
    }
}

In order to get the desired AND logic (every word typed must match), I had to use this.

func searchItems() {
    if let searchText = searchController.searchBar.text?.split(separator: " ") {
        // Need to convert substring from split back to string
        let searchArray = searchText.map() { substring in
            String(substring)
        }
        filteredItems = allItems.filter { item in
            for word in searchArray {
                if !item.searchableString.lowercased().contains(word) {
                    return false
                }
            }
            return true
        }
    }
}

This works as intended, but it does not seem elegant. Is there a better way to filter the array allItems to filteredItems based on matching text in those String properties of the objects in my data model?


Get this bounty!!!

#StackBounty: #android #android-studio #search #retrofit #retrofit2 particular title(fetched from api) using searchview?

Bounty: 50

I want something like this–>
Required

so the thing is ,what I exactly want is when user type particular topic name(if present in app) in searchview it should able give suggestions and if found it should open that topic activity (just like Facebook,instagram,…etc searches)..and those title are coming from api(which I have successfully displayed in other activities)..like this–>
[enter image description here..what will the logic for it???please help.. Thanks

so I have just included searchview in xml like this–>

  <SearchView
    android:id="@+id/searchView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:queryHint="Search Here"
    android:iconifiedByDefault="false"
    android:layout_alignParentTop="true"
    android:background="@drawable/search_bar"
    android:layout_marginLeft="15dp"
    android:layout_marginRight="15dp"
    android:layout_marginTop="20dp"
    android:pointerIcon="crosshair"
    android:theme="@style/Widget.AppCompat.SearchView"
    android:focusedByDefault="true"

    />

Need help..thanks in advance….

here is my json:for [enter image description here

[{"id":"11","title":"TextView"},{"id":"10","title":"Edit Text"},{"id":"9","title":"ImageView"},{"id":"8","title":"Button "},{"id":"7","title":"CheckBox"},{"id":"6","title":"RadioButton & RadioGroup"},{"id":"5","title":"DatePicker"},{"id":"4","title":"TimePicker"},{"id":"3","title":"Switch"},{"id":"1","title":"Simple & Custom Toast"}]

here is my activity: for [enter image description here

public class StartLearning extends AppCompatActivity {
private RecyclerView recyclerView;
private SLAdapter slAdapter;
ProgressDialog progressDialog;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.startlearning_layout);
    progressDialog = new ProgressDialog(StartLearning.this);
    progressDialog.setMessage("Loading....");
    progressDialog.show();
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    if (getSupportActionBar() != null) {
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setDisplayShowHomeEnabled(true);
        /*Create handle for the RetrofitInstance interface*/
        SLApiSevice service = SLApiClient.getRetrofitInstance().create(SLApiSevice.class);
        Call<List<SlModel>> call = service.getMySlmodel();

        call.enqueue(new Callback<List<SlModel>>() {
            @Override
            public void onResponse(Call<List<SlModel>> call, Response<List<SlModel>> response) {
                progressDialog.dismiss();
                generateDataList(response.body());
                Log.e("hello", String.valueOf(response.body()));

            }

            @Override
            public void onFailure(Call<List<SlModel>> call, Throwable t) {
                progressDialog.dismiss();
                Toast.makeText(getApplicationContext(), "Something went wrong...Please try later!", Toast.LENGTH_SHORT).show();


            }
        });
    }
}
private void generateDataList(List<SlModel> employeeList) {
    recyclerView = findViewById(R.id.SLrecycle);
    LinearLayoutManager manager = new LinearLayoutManager(getApplicationContext());
    recyclerView.setLayoutManager(manager);
    recyclerView.setHasFixedSize(true);
    slAdapter = new SLAdapter(getApplicationContext(),employeeList);
    recyclerView.setAdapter(slAdapter);
}

adapter:for [enter image description here

public class SLAdapter extends RecyclerView.Adapter<SLAdapter.CustomViewHolder> {

List<StartLearning.SlModel> Slmdel;
Context context;

public SLAdapter(Context context,List<StartLearning.SlModel> employees) {
    this.Slmdel = employees;
    this.context=context;
}

@Override
public CustomViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View itemView = LayoutInflater.from(parent.getContext())
            .inflate(R.layout.startlearning_item, parent, false);

    return new CustomViewHolder(itemView);
}

@Override
public void onBindViewHolder(CustomViewHolder holder, int position) {
    // TipsModel employee = employees.get(position);
    //// holder.employeeName.setText(employees.get(position).getTips());
    holder.textView.setText(String.valueOf(position+1)+". ");
    holder.employeeName.setText(Slmdel.get(position).getTitle());


}

@Override
public int getItemCount() {
    return Slmdel.size();
    //return (employees == null) ? 0 : employees.size();

}

public class CustomViewHolder extends RecyclerView.ViewHolder {
    public TextView employeeName;
    TextView textView;

    public CustomViewHolder(View view) {
        super(view);
        employeeName = (TextView) view.findViewById(R.id.Sl2);
        textView=view.findViewById(R.id.Sl1);
        view.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent =  new Intent(context, NextSLactivity.class);
                intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                intent.putExtra("title", Slmdel.get(getAdapterPosition()).getTitle());
               intent.putExtra("idSLnext", Slmdel.get(getAdapterPosition()).getId());
                //Log.e("ashwini",WAmdel.get(getAdapterPosition()).getId());
                context.startActivity(intent);

            }
        });


    }
}

onclick of item(example :textview)

activity:one of the items(example :textview)

public class JavaFragment extends Fragment {

private RecyclerView recyclerView;
private NextSLJavaAdapter adapter;
private NextSLModel DescriptList;
ProgressDialog progressDialog;
public JavaFragment() {
    // Required empty public constructor
}


@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    return inflater.inflate(R.layout.nextsl_layout, container, false);

}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);
    Toolbar toolbar = (Toolbar) getView().findViewById(R.id. toolbar );
   // setSupportActionBar( toolbar );
    //if (getSupportActionBar() != null) {
      //  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
       // getSupportActionBar().setDisplayShowHomeEnabled(true);
    //}
    progressDialog = new ProgressDialog(getContext());
    progressDialog.setMessage("Loading....");
    progressDialog.show();
    Intent intent = getActivity().getIntent();
    String title = intent.getStringExtra("title");
    //getSupportActionBar().setTitle(title);
    String id = intent.getStringExtra("idSLnext");
    Log.e("ashwini", String.valueOf(id));


    /*Create handle for the RetrofitInstance interface*/
    SLApiSevice service = SLApiClient.getRetrofitInstance().create(SLApiSevice.class);
    Call<NextSLModel> call = service.getnextslmodel(id);
    call.enqueue(new Callback<NextSLModel>() {
        @Override
        public void onResponse(Call<NextSLModel> call, Response<NextSLModel> response) {
            progressDialog.dismiss();
            DescriptList=response.body();
            generateDataList(DescriptList);

        }

        @Override
        public void onFailure(Call<NextSLModel> call, Throwable t) {
             progressDialog.dismiss();

            Toast.makeText(getContext(), "Something went wrong...Please try later!", Toast.LENGTH_SHORT).show();
        }
    });

}
private void generateDataList(NextSLModel photoList) {
    recyclerView = getView().findViewById(R.id.nextSLrecycle);
    LinearLayoutManager manager = new LinearLayoutManager(getContext());
    recyclerView.setLayoutManager(manager);
    recyclerView.setHasFixedSize(true);
    adapter = new NextSLJavaAdapter(getContext(),photoList);
    recyclerView.setAdapter(adapter);
}

}

adapter:

public class NextSLJavaAdapter extends RecyclerView.Adapter<NextSLJavaAdapter.CustomViewHolder> {

NextSLModel Slmdel;
Context context;

public NextSLJavaAdapter(Context context, NextSLModel employees) {
    this.Slmdel = employees;
    this.context = context;
}

@Override
public CustomViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
    View itemView = LayoutInflater.from(parent.getContext())
            .inflate(R.layout.nextsl_item, parent, false);

    return new CustomViewHolder(itemView);
}

@Override
public void onBindViewHolder(CustomViewHolder holder, int position) {
    // TipsModel employee = employees.get(position);
    //// holder.employeeName.setText(employees.get(position).getTips());
 /////////   holder.textView.setText(String.valueOf(position + 1) + ". ");
    holder.employeeName.setText(Slmdel.getJava());
    Log.e("sl",Slmdel.getJava());


}

@Override
public int getItemCount() {
    return 1;
    //return (employees == null) ? 0 : employees.size();

}

public class CustomViewHolder extends RecyclerView.ViewHolder {
    public TextView employeeName;
    TextView textView;

    public CustomViewHolder(View view) {
        super(view);
        employeeName = (TextView) view.findViewById(R.id.detailsStartLearning);
        textView = view.findViewById(R.id.Sl1);}}}

see I haven’t done in search activity:

public class Search extends AppCompatActivity {
SearchView searchView;

@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.search);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    searchView=findViewById(R.id.searchView);
    if (getSupportActionBar() != null) {
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        getSupportActionBar().setDisplayShowHomeEnabled(true);
    }

}
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
    if (item.getItemId() ==android.R.id.home) {
        finish();
    }
    return super.onOptionsItemSelected(item);
}
@Override
public void onBackPressed() {
    super.onBackPressed();
}

}

xml of search:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.Toolbar
    android:id="@+id/toolbar"
    android:layout_width="match_parent"
    android:layout_height="?attr/actionBarSize"
    android:background="@color/colorPrimary"
    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" >

</androidx.appcompat.widget.Toolbar>
<SearchView
    android:id="@+id/searchView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:queryHint="Search Here"
    android:iconifiedByDefault="false"
    android:layout_alignParentTop="true"
    android:background="@drawable/search_bar"
    android:layout_marginLeft="15dp"
    android:layout_marginRight="15dp"
    android:layout_marginTop="20dp"
    android:pointerIcon="crosshair"
    android:theme="@style/Widget.AppCompat.SearchView"
    android:focusedByDefault="true"

    />


Get this bounty!!!

#StackBounty: #algorithm #search #tree Principal variation search: how to keep track of the best move

Bounty: 150

I have a Java implementation of the Principal Variation Search algorithm. That algorithm is used for searching a game tree starting from the root node and proceeding downwards until a particular depth reached or a terminal state is reached.
It looks like this:

public final class PrincipalVariationSearchGameEngine 
        <S extends AbstractState<S, P>,
         P extends Enum<P>> 
           extends AbstractGameEngine<S, P> {

    public PrincipalVariationSearchGameEngine(
            EvaluatorFunction<S> evaluatorFunction,
            int depth) {
        super(evaluatorFunction, depth, Integer.MAX_VALUE);
    }

    @Override
    public S makePly(S state, 
                     P minimizingPlayer, 
                     P maximizingPlayer, 
                     P initialPlayer) {
        state.setDepth(depth);

        return makePlyImplTopmost(state,
                                  depth,
                                  Double.NEGATIVE_INFINITY,
                                  Double.POSITIVE_INFINITY,
                                  initialPlayer == minimizingPlayer ? -1 : 1);
    }

    /**
     * Performs the search directly under the root node denoted by 
     * {@code state].
     * 
     * @param state the root state of the game tree to search.
     * @param depth the total depth of the search.
     * @param alpha the alpha cutoff value.
     * @param beta  the beta cutoff value.
     * @param color the color. -1 for minimizing player, +1 for maximizing
     *              player.
     * @return the game board after optimal move from {@code state}.
     */
    private S makePlyImplTopmost(S state,
                                 int depth,
                                 double alpha,
                                 double beta,
                                 int color) {
        boolean firstChild = true;
        S bestState = null;
        double tentativeScore = color == -1 ?
                                Double.POSITIVE_INFINITY :
                                Double.NEGATIVE_INFINITY;

        for (S child : state.children()) {
            double score;

            if (firstChild) {
                firstChild = false;
                score = -makePlyImpl(child, 
                                     depth - 1, 
                                     -beta, 
                                     -alpha,
                                     -color);
                bestState = child;
                tentativeScore = score;
            } else {
                score = -makePlyImpl(child, 
                                     depth - 1, 
                                     -alpha - 1.0, 
                                     -alpha,
                                     -color);

                if (color == -1) {
                    if (tentativeScore > score) {
                        tentativeScore = score;
                        bestState = child;
                    }
                } else {
                    if (tentativeScore < score) {
                        tentativeScore = score;
                        bestState = child;
                    }
                }

                if (alpha < score && score < beta) {
                    score = -makePlyImpl(child, 
                                         depth - 1,
                                         -beta,
                                         -score,
                                         -color);

                    if (color == -1) {
                        if (tentativeScore > score) {
                            tentativeScore = score;
                            bestState = child;
                        }
                    } else {
                        if (tentativeScore < score) {
                            tentativeScore = score;
                            bestState = child;
                        }
                    }
                }
            }

            if (alpha < score) {
                alpha = score;
            }

            if (alpha >= beta) {
                break;
            }
        }

        return bestState;
    }

    private double makePlyImpl(S state,
                               int depth,
                               double alpha,
                               double beta,
                               int color) {
        if (state.getDepth() == 0 
                || state.checkVictory() != null
                || state.isTerminal()) {
            return color * evaluatorFunction.evaluate(state);
        }

        boolean firstChild = true;

        for (S child : state.children()) {
            double score;

            if (firstChild) {
                firstChild = false;
                score = -makePlyImpl(child, 
                                     depth - 1, 
                                     -beta, 
                                     -alpha,
                                     -color);
            } else {
                score = -makePlyImpl(child, 
                                     depth - 1, 
                                     -alpha - 1.0, 
                                     -alpha,
                                     -color);

                if (alpha < score && score < beta) {
                    score = -makePlyImpl(child, 
                                         depth - 1,
                                         -beta,
                                         -score,
                                         -color);
                }
            }

            alpha = Math.max(alpha, score);

            if (alpha >= beta) {
                break;
            }
        }

        return alpha;
    }
}

This, however, does not work since it returns suboptimal (next) moves. I believe that the culprit is this if statement:

if (color == -1) {
    if (tentativeScore > score) {
        tentativeScore = score;
        bestState = child;
    }
} else {
    if (tentativeScore < score) {
        tentativeScore = score;
        bestState = child;
    }
}


Get this bounty!!!

#StackBounty: #powershell #search #api Handling The SharePoint REST API Search Threshold Limit In powershell

Bounty: 50

We are using SharePoint Online. I would like to search in all sitecollections for the word “passport”. I make it working with the REST api in powershell. But I have now only the problem that it returns only the first 500 results. How can I iterate into all the batches of 500 results?

I found some blog posts how to that in spfx:

https://www.c-sharpcorner.com/article/handling-the-sharepoint-rest-api-search-threshold-limit-in-spfx/

This is my powershell code:

    try
{
    $searchKeyWord = "passport"

    $secpasswd = ConvertTo-SecureString "123123!" -AsPlainText -Force
    $mycreds = New-Object System.Management.Automation.PSCredential ("test@mycompany.nl", $secpasswd)

    # Connect to SharePoint Online
    $targetSite = "https://myCompany.sharepoint.com/"
    $targetSiteUri = [System.Uri]$targetSite

    Connect-PnPOnline $targetSite -Credentials $mycreds

    # Retrieve the client credentials and the related Authentication Cookies
    $context = (Get-PnPWeb).Context
    $credentials = $context.Credentials
    $authenticationCookies = $credentials.GetAuthenticationCookie($targetSiteUri, $true)

    # Set the Authentication Cookies and the Accept HTTP Header
    $webSession = New-Object Microsoft.PowerShell.Commands.WebRequestSession
    $webSession.Cookies.SetCookies($targetSiteUri, $authenticationCookies)
    $webSession.Headers.Add("Accept", "application/json;odata=verbose")

    # Set request variables
    $apiUrl = "$targetSite" + "_api/search/query?querytext='$searchKeyWord'&rowlimit=5000"#&rowlimit=$($rowLimit)&startrow=$($startRow)" #&selectproperties='Title,Author,Path'"

    # Make the REST request
    $webRequest = Invoke-WebRequest -Uri $apiUrl -Method Get -WebSession $webSession

    # Consume the JSON result
    $jsonLibrary = $webRequest.Content | ConvertFrom-Json
    $results = $jsonLibrary.d.query.PrimaryQueryResult.RelevantResults.Table.Rows.results

    #MaxRowLimit
    Write-Host $results.Count "Results" -ForegroundColor Green

    $ResultsArray = @()

    for($i=0; $i -le $results.length-1; $i++)
    {
        $row = $results[$i]
        $obj = New-Object PSObject

        for ($j=0; $j -le $row.Cells.results.length-1; $j++)
        {
            if ($row.Cells.results[$j].Key -eq ‘Title’)
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name Title -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘FileExtension’)
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name FileExtension -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘Path’)
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name Path -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘OriginalPath’)
            {
                Add-Member -InputObject $obj -MemberType NoteProperty  -Name OriginalPath -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘Author’) #
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name Author -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘HitHighlightedSummary’)
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name HitHighlightedSummary -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘SiteName’)
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name SiteName -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘SPWebUrl’)
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name SPWebUrl -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘IsDocument’)
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name IsDocument -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘ParentLink’)
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name ParentLink -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘ViewsLifeTime’) # aantal hits, niet unieke hits
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name ViewsLifeTime -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘ViewsRecent’) #
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name ViewsRecent -Value $row.Cells.results[$j].Value
            }

            if ($row.Cells.results[$j].Key -eq ‘Rank’) #
            {
                Add-Member -InputObject $obj -MemberType NoteProperty -Name Rank -Value $row.Cells.results[$j].Value
            }
        }

        $ResultsArray += $obj
    }

    $ResultsArray | Export-Csv -Path "c:outfile.csv" -NoTypeInformation
}
catch
{
    Write-Host $_.Exception.Message -ForegroundColor Red
}

Write-Host "Finished" -ForegroundColor Green


Get this bounty!!!

#StackBounty: #regular-expression #search #highlight Highlighting a search capture group

Bounty: 50

By :set hl, the search result of a / expression is highlighted, for example:

Vim search highlight in action

And if one wants to replace one substring distinguished by its surrounding, one can do so elegantly using regex capture groups:

replace not with and

However, the search highlight does not reflect this capture group. Sometimes, it would be very helpful if it did, so you can feel more confident about your attempted regex. Does Vim have such a feature?


Get this bounty!!!