Posted on in category News

World’s largest ARM supercomputer is headed to a nuclear security lab

The content below is taken from the original ( World’s largest ARM supercomputer is headed to a nuclear security lab), to continue reading please visit the site. Remember to respect the Author & Copyright.

Most supercomputers are focused on pure processing speed. Take the DOE's new Summit system, which is now the world's most powerful supercomputer, with 9,000 22-core IBM Power9 processors and over 27,000 NVIDIA Tesla V100 GPUs. But processing performa…

Posted on in category News

Partner Interconnect now generally available

The content below is taken from the original ( Partner Interconnect now generally available), to continue reading please visit the site. Remember to respect the Author & Copyright.

We are happy to announce that Partner Interconnect, launched in beta in April, is now generally available. Partner Interconnect lets you connect your on-premises resources to Google Cloud Platform (GCP) from the partner location of your choice, at a data rate that meets your needs.

With general availability, you can now receive an SLA for Partner Interconnect connections if you use one of the recommended topologies. If you were a beta user with one of those topologies, you will automatically be covered by the SLA. Charges for the service start with GA (see pricing).

Partner Interconnect is ideal if you want physical connectivity to your GCP resources but cannot connect at one of Googleā€™s peering locations, or if you want to connect with an existing service provider. If you need help understanding the connection options, the information here can help.

In this blog we will walk through how you can start using Partner Interconnect, from choosing a partner that works best for you all the way through how you can deploy and start using your interconnect.

Choosing a partner

If you already have a service provider partner for network connectivity, you can check the list of supported service providers to see if they offer Partner Interconnect service. If not, you can select a partner from the list based on your data center location.

Some critical factors to consider are:

Bandwidth options and pricing

Partner Interconnect provides flexible options for bandwidth between 50 Mbps and 10 Gbps. Google charges on a monthly basis for VLAN attachments depending on capacity and egress traffic (see options and pricing).

Setting up Partner Interconnect VLAN attachments

Once youā€™ve established network connectivity with a partner, and they have set up interconnects with Google, you can set up and activate VLAN attachments using these steps:

  1. Create VLAN attachments.
  2. Request provisioning from the partner.
  3. If you have a Layer 2 partner, complete the BGP configuration and then activate the attachments for traffic to start. If you have a Layer 3 partner, simply activate the attachments, or use the pre-activation option.

With Partner Interconnect, you can connect to GCP where and how you want to. Follow these steps to easily access your GCP compute resources from your on-premises network.

Related content

Posted on in category News

Google may be working on a way to run Windows 10 on a Pixel

The content below is taken from the original ( Google may be working on a way to run Windows 10 on a Pixel), to continue reading please visit the site. Remember to respect the Author & Copyright.

Google's Pixelbook is a high-end laptop that runs Chrome OS. If you're looking to do more with the hardware, like run Windows apps, you may soon be in luck. According to a report at XDA Developers (and picked up by 9to5Google), Google may in fact be…

Posted on in category News

The best webcams

The content below is taken from the original ( The best webcams), to continue reading please visit the site. Remember to respect the Author & Copyright.

By Andrew Cunningham and Kimber Streams

This post was done in partnership with Wirecutter. When readers choose to buy Wirecutter's independently chosen editorial picks, it may earn affiliate commissions that support its work. Read the full article h…

Posted on in category News

Customer Rewards

The content below is taken from the original ( Customer Rewards), to continue reading please visit the site. Remember to respect the Author & Copyright.

We'll pay you $1.47 to post on social media about our products, $2.05 to mention it in any group chats you're in, and 11 cents per passenger each time you drive your office carpool past one of our billboards.

Posted on in category News

Microsoft’s Office UI update includes a simpler, cleaner ribbon

The content below is taken from the original ( Microsoft’s Office UI update includes a simpler, cleaner ribbon), to continue reading please visit the site. Remember to respect the Author & Copyright.

Microsoft has given its infamous Office ribbon a much simpler, much less cluttered look as part of its interface redesign for Office.com and Office 365 applications. The tech giant has updated the element to only show the most basic options — if you…

Posted on in category News

Use a PowerShell Substring to Search Inside a String ā€“ Brad Dickinson
Brad Dickinson

Use a PowerShell Substring to Search Inside a String

The content below is taken from the original ( Use a PowerShell Substring to Search Inside a String), to continue reading please visit the site. Remember to respect the Author & Copyright.

Need to search for a string inside a string? Never fear, PowerShell substring is here! In this article, I guide you through how to ditch objects and search inside strings.

The PowerShell substring

I love being on social media because I always come across something interesting related to PowerShell. Sometimes it is a trick I didnā€™t know about or a question someone is trying to figure out. I especially like the questions because it helps me improve my understanding of how people learn and use PowerShell. Workload permitting, Iā€™m happy to jump in and help out.

One such recent challenge centered on string parsing. Although youā€™ll hear me go on and on about object in the pipeline, thereā€™s nothing wrong with parsing strings if thatā€™s what you need. There are plenty of log files out there that need parsing, and PowerShell can help.

Search for a string in a string

In this case, Iā€™m assuming some sort of log file is in play. I donā€™t know what the entire log looks like or what the overall goal is. Thatā€™s OK. We can learn a lot from the immediate task. Letā€™s say you have a string that looks like this:

Mailbox:9WJKDFH-FS349-1DSDS-OIFODJFDO-7F21-FC1BF02EFE26 (O'Hicks, Jeffery(X.))

Iā€™ve changed the values a little bit and modified my name to make it more challenging. The goal is to grab the name from the string. I want to end up with:

O'Hicks, Jeffery(X.)

There are several different ways you can accomplish this. The right way probably depends on your level of PowerShell experience and what else you might want to accomplish. Iā€™ll start by assigning this string to variable $s.

Using the PowerShell split operator

When I am faced with string parsing, sometimes it helps to break the string down into more manageable components. To do that I can use the split operator. There is also a split method for the string class. I am going to assume you will take some time later to read more about PowerShell split.

$s -split "\s",2

The ā€œ\sā€ is a regular-expression pattern that means a space. The 2 parameter value indicates that I only want two substrings. In other words, split on the first space found.

Using the split operator in Windows PowerShell. (Image Credit: Jeff Hicks)

I end up with an array of two elements. All I need is the second one.

$t = ($s -split "\s",2)[1]

Using the substring method

Now for the parsing fun, letā€™s use the string objectā€™s SubString() method.

$t.Substring(1,$t.length-2)

I am telling PowerShell to get part of the string in $t, starting at character position 1 and then getting the next X number of characters. In this case, X is equal to the length of the string, $t, minus 2. This has the net effect of stripping off the outer parentheses.

Using the PowerShell substring method (Image Credit: Jeff Hicks)

Hereā€™s a variation, where I split on the ā€œ(ā€ character.

($s -split "\(",2)
$t = ($s -split "\(",2)[1]
$t.Substring(0,$t.length-1)

Using the split operator on a character in Windows PowerShell. (Image Credit: Jeff Hicks)

The difference that this gets rid of the leading parenthesis. So, all I need to do is get everything up to the last character. By the way, if you look at a string object with Get-Member, you will see some Trim methods. These are for removing leading and/or training white space. Those methods donā€™t apply here.

Split a string using array index numbers

Thereā€™s one more way to split a string that you might find useful. You can treat all strings as an array of characters. This means you can use array index numbers to reference specific array elements.

Counting elements in an array starts at 0. If you run $t[0] youā€™ll get the first element of the array, in this case ā€˜Oā€™. You can also use the range operator.

$t[0..5]

An alternative to splitting a string in Windows PowerShell. (Image Credit: Jeff Hicks)

Right now, $t has an extra ) at the end that I donā€™t want. I need to get everything up to the second-to-last element.

$t[0..($t.length-2)]

This will give me an array displayed vertically, which you can see in the screenshot above. With that said, itā€™s easy to join the spliced string back together.

-join $t[0..($t.length-2)]

It might look a bit funny to lead with an operator, but if you read about_join, then youā€™ll see this is a valid approach that works.

Using the -join operator to put our string back together. (Image Credit: Jeff Hicks)

Simple function for string parsing

Iā€™m assuming you want an easy way to do this type of parsing, so I wrote a simple function.

Function Optimize-String {
[cmdletbinding()]
Param(
[Parameter(Position=0,Mandatory,HelpMessage="Enter a string of text")]
[ValidateNotNullorEmpty()]
[string]$Text,
[int]$Start=0,
[int]$End=0
)
#trim off spaces
$string = $Text.Trim()
#get length value when starting at 0
$l = $string.Length-1
#get array elements and join them back into a string
-join $string[$Start..($l-$end)]
} #end function

The function takes a string of text and returns the substring minus X number of characters from the start and X number of characters from the end. Now I have a easy command to parse strings.

Using the optimize-string function in Windows PowerShell. (Image Credit: Jeff Hicks)

If you look through the code, then youā€™ll see I am using the Trim() method. I am using it because I donā€™t want any extra spaces at the beginning or end of the string to be included.

Going back to my original string variable, I can now parse it with a one-line command:

optimize-string ($s -split("\s",2))[1] -Start 1 -end 1

Using the optimize-string function to search inside a string (Image Credit: Jeff Hicks)

If it makes more sense to you to break this into separate steps, thatā€™s OK.

$arr = $s -split("\s",2)
$text =  $arr[1]
optimize-string $text -Start 1 -end 1

Next time weā€™ll look at string parsing using regular expressions, and it wonā€™t be scary, I promise.

Exit mobile version