Showing posts with label Change. Show all posts
Showing posts with label Change. Show all posts

01 January 2022

How to amend older commit messages in git?

How to amend older commit messages in git?


https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History


Changing Multiple Commit Messages

To modify a commit that is farther back in your history, you must move to more complex tools. Git doesn’t have a modify-history tool, but you can use the rebase tool to rebase a series of commits onto the HEAD that they were originally based on instead of moving them to another one. With the interactive rebase tool, you can then stop after each commit you want to modify and change the message, add files, or do whatever you wish. You can run rebase interactively by adding the -i option to git rebase. You must indicate how far back you want to rewrite commits by telling the command which commit to rebase onto.

For example, if you want to change the last three commit messages, or any of the commit messages in that group, you supply as an argument to git rebase -i the parent of the last commit you want to edit, which is HEAD~2^ or HEAD~3. It may be easier to remember the ~3 because you’re trying to edit the last three commits, but keep in mind that you’re actually designating four commits ago, the parent of the last commit you want to edit:

$ git rebase -i HEAD~3

Remember again that this is a rebasing command — every commit in the range HEAD~3..HEAD with a changed message and all of its descendants will be rewritten. Don’t include any commit you’ve already pushed to a central server — doing so will confuse other developers by providing an alternate version of the same change.

Running this command gives you a list of commits in your text editor that looks something like this:

pick f7f3f6d Change my name a bit
pick 310154e Update README formatting and add blame
pick a5f4a0d Add cat-file

# Rebase 710f0f8..a5f4a0d onto 710f0f8
#
# Commands:
# p, pick <commit> = use commit
# r, reword <commit> = use commit, but edit the commit message
# e, edit <commit> = use commit, but stop for amending
# s, squash <commit> = use commit, but meld into previous commit
# f, fixup <commit> = like "squash", but discard this commit's log message
# x, exec <command> = run command (the rest of the line) using shell
# b, break = stop here (continue rebase later with 'git rebase --continue')
# d, drop <commit> = remove commit
# l, label <label> = label current HEAD with a name
# t, reset <label> = reset HEAD to a label
# m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]
# .       create a merge commit using the original merge commit's
# .       message (or the oneline, if no original merge commit was
# .       specified). Use -c <commit> to reword the commit message.
#
# These lines can be re-ordered; they are executed from top to bottom.
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
# However, if you remove everything, the rebase will be aborted.
#
# Note that empty commits are commented out


It’s important to note that these commits are listed in the opposite order than you normally see them using the log command. If you run a log, you see something like this:

$ git log --pretty=format:"%h %s" HEAD~3..HEAD
a5f4a0d Add cat-file
310154e Update README formatting and add blame
f7f3f6d Change my name a bit

Notice the reverse order. The interactive rebase gives you a script that it’s going to run. It will start at the commit you specify on the command line (HEAD~3) and replay the changes introduced in each of these commits from top to bottom. It lists the oldest at the top, rather than the newest, because that’s the first one it will replay.

You need to edit the script so that it stops at the commit you want to edit. To do so, change the word “pick” to the word “edit” for each of the commits you want the script to stop after. For example, to modify only the third commit message, you change the file to look like this:

edit f7f3f6d Change my name a bit
pick 310154e Update README formatting and add blame
pick a5f4a0d Add cat-file


When you save and exit the editor, Git rewinds you back to the last commit in that list and drops you on the command line with the following message:

$ git rebase -i HEAD~3
Stopped at f7f3f6d... Change my name a bit
You can amend the commit now, with

       git commit --amend

Once you're satisfied with your changes, run

       git rebase --continue


These instructions tell you exactly what to do. Type:

$ git commit --amend

Change the commit message, and exit the editor. Then, run:

$ git rebase --continue

This command will apply the other two commits automatically, and then you’re done. If you change pick to edit on more lines, you can repeat these steps for each commit you change to edit. Each time, Git will stop, let you amend the commit, and continue when you’re finished.


21 December 2021

How to change multiple rows into one row in vim?

How to change multiple rows into one row in vim?

Check how many rows are there totally (e.g. 50)

50J

How to change a one-row text into multiple rows in vim?

How to change a one-row text into multiple rows in vim?

:%s/; /\r/g

The above command replaces '; ' with \r (carriage return)

17 September 2021

Password entering dialogue box would not show up in Outlook

Password Entering dialogue box would not show up in Outlook

 

Problem: After changing password, open Outlook, it is not connected the exchange server. 'Missing password' shows up at bottom right corner, but the password entering box would not show up.

Cause: You are sharing screen in Zoom meeting.

Solution: Stop sharing screen, then the password entering box wil l show up.

10 May 2017

Only some of Chinese characters' font have changed

Problem: After applying a Chinese font, only some of the Chinese characters' font have changed

Cause: The Chinese text is Simplified Chinese, but I am applying Traditional Chinese fonts.

Solution: First of all, convert the Chinese text from Simplified Chinese into Traditional one. Apply Traditional fonts to them.

23 April 2017

What updates do i need to do when I change my address?

Housing Connections
http://www.housingconnections.ca

CIBC

TD Canada

Service Ontario

CRA (Canada Revenue Agency)

Car insurance company

OSAP (let Daniel inform OSAP)

My employer (CICS, Great Connections)

Costco

CapitalOne

Doctor



17 June 2015

How do you change white sky into blue in Photoshop (Method 2)?

Method 2 - How To Replace The Sky In A Photo With Photoshop?

http://www.photoshopessentials.com/photo-editing/replace-sky/

Written by Steve Patterson.
In this Photoshop tutorial, we'll learn how to easily replace the sky in a photo! We'll use a basic selection tool and a layer mask to separate the sky from the area below it, then we'll learn how Photoshop's Advanced Blending sliders make it easy to hide the original sky so the new sky can takes its place!
Download our tutorials as printable PDFs! Learning Photoshop has never been easier!
Here's the photo I'll be starting with. I purposely chose this photo because of all the trees, with the sky poking through the leaves and branches. You may be thinking that the Magic Wand or the Color Range Command would be good choices for selecting the sky, but in this tutorial, we're going to learn how to use the Advanced Blending sliders, found in the Layer Style dialog box, to both select the original sky and hide it from view at the same time:
A photo of a house. Image licensed from Fotolia by Photoshop Essentials.com.
The original photo.
Here's the image of the sky I'll be using the replace the original sky in the above photo. One thing I should point out before we continue is that both of these photos have the exact same pixel dimensions (width and height). To keep things simple, you'll want to make sure that both of your photos are the same size as well, which may mean you'll need to resize one of them before moving on:
A photo of a blue sky. Image licensed from Fotolia by Photoshop Essentials.com.
The sky photo.
Here's what the final result will look like with the new sky added in:
Replacing the sky in an image with Photoshop. Image © 2012 Photoshop Essentials.com
The final result.
I'll be using Photoshop CS5 for this tutorial but any recent version of Photoshop will work. Let's get started!

Step 1: Select And Copy The Original Photo

The first thing we need to do is move both of our photos into the same document so we can blend them together. With both your original photo and your replacement sky photo open in Photoshop, make sure the original photo's document is active, then press Ctrl+A (Win) / Command+A (Mac) on your keyboard to select the image. You'll see a selection outline appear around its edges. Once the photo is selected, press Ctrl+C (Win) / Command+C (Mac) on your keyboard to copy the image to the clipboard:
Selecting the original photo. Image © 2012 Photoshop Essentials.com
Press Ctrl+A (Win) / Command+A (Mac), then Ctrl+C (Win) / Command+C (Mac) to select and copy the image.

Step 2: Paste The Original Photo Into The Sky Photo's Document

Switch over to the replacement sky photo's document, then press Ctrl+V (Win) / Command+V (Mac) on your keyboard to paste the original photo into the document. If we look in the Layers panel, we see that Photoshop placed the original photo on its own layer (Layer 1) directly above the sky photo on the Background layer, which is why the original photo is now blocking the sky photo from view in the document window:
The Layers panel in Photoshop. Image © 2012 Photoshop Essentials.com
The original image is placed on a new layer above the sky image.

Step 3: Duplicate Layer 1

Photoshop's Advanced Blending sliders, which we'll be using shortly, can select and hide areas of an image based on their color, which means they should have no problem selecting and hiding the blue sky without affecting the green trees. But when we tell the blending sliders to hide areas of blue, they won't simply look at the sky. They'll look across the entire photo and hide all areas that contain blue. Remember that other colors may also contain blue, especially gray or white which contain every color, which means there's a good chance other areas of the photo will be affected by the sliders unless we first take steps to prevent that from happening, which is what we're about to do.
The first thing we'll do is make a copy of our main photo. Make sure Layer 1 is active in the Layers panel (it should be highlighted in blue), then press Ctrl+J (Win) / Command+J (Mac) on your keyboard to quickly duplicate the layer. Nothing will seem to have happened in the document window, but we can see in the Layers panel that we have now a copy of Layer 1 above the original:
A copy of Layer 1 appears above the original in the Layers panel. Image © 2012 Photoshop Essentials.com
The Layers panel showing a copy of the main photo above the original.

Step 4: Turn The Top Layer Off

We don't need the top layer (Layer 1 copy) for now, so click on its visibility icon (the eyeball) on the far left of the layer to temporarily turn it off and hide it from view in the document:
Clicking the layer visibility icon in the Layers panel. Image © 2012 Photoshop Essentials.com
Clicking the layer visibility icon to turn the top layer off.

Step 5: Select Layer 1

Click on Layer 1 in the Layers panel to once again make it the active layer:
Selecting Layer 1 in the Layers panel. Image © 2012 Photoshop Essentials.com
Clicking on Layer 1 to select it.

Step 6: Select The Area Below The Sky

Next, we'll draw a selection outline around the area of the photo below the sky. In other words, the area we want to protect from the Advanced Blending sliders. You can use Photoshop's standard Lasso Tool for this if you like. I prefer using the Polygonal Lasso Tool which I'll select by clicking on the Lasso Tool icon in the Tools panel and holding my mouse button down until the fly-out menu appears. Then I'll choose the Polygonal Lasso Tool from the menu:
Clicking the layer visibility icon in the Layers panel. Image © 2012 Photoshop Essentials.com
Selecting the Polygonal Lasso Tool.
With the Polygonal Lasso Tool in hand, I'll click around the area I want to protect to select it. For the most part, I can be fairly loose with my selection through the trees as long as I stay below any areas where the blue sky is showing through. The only part where I need to be more precise with my selection is along the top of the house, especially the area around the top of the chimney where it's completely exposed to the sky above it. The chimney and sky are very similar in tone and color which will cause problems with the Advanced Blending sliders, so I'll need to be careful and keep my selection tight around the top of the chimney:
Keeping the selection tight around the top of the chimney. Image © 2012 Photoshop Essentials.com
Making sure to select only the chimney, not the sky above it.
Other than that, the selection is pretty simple. Everything I want to protect from the Advanced Blending sliders is now selected:
Selecting the lower part of the image below the sky. Image © 2012 Photoshop Essentials.com
The lower part of the image below the sky is selected.

Step 7: Add A Layer Mask

Now that we've selected the area we're protecting, let's convert the selection into a layer mask. Click on the Layer Mask icon at the bottom of the Layers panel:
Clicking on the Layer Mask icon in the Layers panel. Image © 2012 Photoshop Essentials.com
Clicking on the Layer Mask icon.
Photoshop adds a new layer mask to Layer 1, and if we look at the mask's preview thumbnail in the Layers panel, we see that the area we selected is filled with white, which means it should still be visible in the document, while the area that was not selected is filled with black and should now be hidden from view:
A layer mask has been added to Layer 1. Image © 2012 Photoshop Essentials.com
The selection has been turned into a layer mask.
And if we look at the image in the document window, sure enough, that's exactly what we see. The area I selected is still visible, while the area above it is now hidden, revealing the sky photo on the Background layer below it. We've replaced the sky in the original photo, but it's not looking terribly professional just yet:
The image after adding a layer mask. Image © 2012 Photoshop Essentials.com
The image after adding the layer mask.

Step 8: Select And Turn On The Top Layer

Click on the top layer (Layer 1 copy) to make it the active layer, then click on its visibility icon to turn the layer back on in the document:
Turning the top layer back on in the document. Image © 2012 Photoshop Essentials.com
Clicking on the top layer's visibility icon after re-selecting the layer.
The entire original photo will re-appear in the document window:
A photo of a house. Image licensed from Fotolia by Photoshop Essentials.com.
The original photo is back, for now.

Step 9: Open The Blending Options And Change The "Blend If" Option To Blue

Double-click directly on the top layer's preview thumbnail in the Layers panel:
Double-clicking on the layer preview thumbnail. Image © 2012 Photoshop Essentials.com
Double-clicking on the layer's thumbnail.
This opens Photoshop's Layer Style dialog box set to the Blending Options in the middle column. What we're looking for are the two slider bars at the bottom of the dialog box, in the Advanced Blending section. Directly above the slider bars is the Blend If option which, by default, is set to Gray. Click on the word Gray and choose Blue from the list that appears:
Changing the Blend If option from Gray to Blue in the Layer Style dialog box. Image © 2012 Photoshop Essentials.com
Change the Blend If option from Gray to Blue.

Step 10: Drag The Top Right Slider Towards The Left

As soon as you change the option to Blue, the two slider bars will change from black-to-white gradients to black-to-blue gradients. You can ignore the slider bar at the bottom. The one we want is the top one (the one that says This Layer above it). Click on the small slider below the far right of the top bar and begin dragging it towards the left:
Dragging the slider towards the left. Image © 2012 Photoshop Essentials.com
Dragging the right slider towards the left.
As you drag the slider, you'll begin to see the original sky in the photo disappearing, revealing the replacement sky underneath. Notice that the area we selected back in Step 6 is not being affected by the slider. Only the sky itself is disappearing. Continue dragging the slider towards the left until most of the original sky is gone:
The original sky is disappearing from the image and being replaced by the new sky in the photo underneath. Image © 2012 Photoshop Essentials.com
Dragging the slider causes the original sky to disappear.

Step 11: Adjust The Transition Between The Photos To Remove Fringing

The only problem now is that we're seeing a lot of harsh edges and fringing around the trees and leaves, which is color that's left over from the original sky. To fix that, we need to soften the transition between the two photos, and to do that, we need to split the slider in half.
Release the slider for a moment, then press and hold your Alt (Win) / Option (Mac) key on your keyboard. With the key held down, click back on the slider and continue dragging it towards the left. This will split the slider into two halves that we can now drag independently of each other (you can release your Alt / Option key at this point). We can adjust the softness of the transition between the original photo and the replacement sky photo by increasing or decreasing the distance between the two halves of the slider.
Keep an eye on your image in the document window as you drag each half of the slider left or right until all of the fringing around the trees and leaves (and anywhere else you happen to notice fringing) disappears:
Dragging each half of the slider to remove fringing around the trees in the image. Image © 2012 Photoshop Essentials.com
Adjust the space between each half of the slider until the fringing around the trees is gone.
When you're done, click OK in the top right corner of the Layer Style dialog box to close out of it. Here's my final result after removing the fringing:
Replacing the sky in an image with Photoshop. Image © 2012 Photoshop Essentials.com
The final result.

How do you change white sky into blue in Photoshop (Method 1)?

Method 1 - Adding a little bit of colour to a white sky

http://www.damiensymonds.com.au/tut_sky.html

A blown-out sky is annoying, but sometimes unavoidable. Here's a way to take the edge off it, without going to too much trouble.

Notes:

  • This is only for Photoshop - it won't work in Elements, sorry. If you have Elements, use this method instead.
  • If you wish to fix a white sky by putting a different sky photo into it, go here.

1. Add some subtle colour

This beautiful photo is exposed well for the subjects, but the sky has gone.

Thanks to Michelle Moser for permission to use this image. See Michelle's lovely photos at www.michellemoserphotography.shutterfly.com
Make a new Selective Color adjustment layer.

Make sure the adjustment method is set to "Absolute" ...

... then choose "Whites" from the drop-down menu.

Add 10% cyan and 4% magenta to the whites (you can change these settings later, of course).

Now you've added a small amount of colour to the sky. Trouble is, you've added it to other whites in the photo as well! Time for masking.


2. Masking

Make sure the layer mask of your Selective Color layer is selected. Presently, the mask is all white, meaning that the adjustment is affecting the entire image.

Choose the Gradient Tool, and make sure your foreground colour is black.

Draw a gradient from just below the horizon, to near the top of the image. Hold down the Shift key to constrain the gradient to vertical.

This masks out the foreground, as well as lightening the sky near the horizon, which is quite natural.
If there are any other whites in the photo (eg a white hat on your subject) which remain affected by the adjustment, simply use your Brush Tool to mask out those items.
Finally, evaluate the strength of your sky. If you'd like it stronger, simply re-open the Selective Color layer and add more cyan and magenta to whites.

3. Add noise

There's a small problem with this method - fake sky colour tends to get banding in it. To prevent this, add a noise layer.
This is very important. Please don't skip this step.

The finished product:

Roll mouse over to compare original to adjusted:


Conclusion:

This method works best when used subtly. Don't overdo it!

07 October 2014

How to change colour in Illustrator CS5?

Select the layer. Select the object.
Edit | Edit Colour | Re-colour artwork.
Enter the 3 numbers for H, S, B. OK.
Save it as .ai. Save it as .eps.

29 January 2014

How to change physical path of a website in IIS?

In IIS Manager,
Sites | Default Website, right-click, choose Manage Website | Advanced Settings... | Physical Path.

21 August 2012

Microsoft Exchange/change email address

http://en.allexperts.com/q/Microsoft-Exchange-2094/2008/6/change-email-address.htm


Question
How do I change my email address in exchange. I need to change from my oldemail@gmail.com to a newemail@gmail.com. I simply am not able to find this setting in my outlook exchange options

Thanks

AnswerThere are several ways to skin this cat.

1. Change the alias of your account (not recommended unless you are changing the entire name of the account)
2. Add new SMTP address and make it your primary (recommended)
3. Create new account and merge all the Outlook info to the new account (really not recommended)



1. this option has some consequences to note, so read about them here:
http://www.amset.info/exchange/usernamechange.asp

Open Active Directory Users and Computers mmc
Locate your AD account and right click-->Properties
Click on the Mailbox Store tab
Change the alias
Wait for Recipient Update Services to refresh your email address, check the Email Addresses tab in 15 minutes


2.
Right click on user again, and choose Properties.
Click on the "Email Addresses" tab.
Add the new email address in the same format as your existing email addresses. Leave the old address in place.
Change the default (set as primary) address to the new one.
By doing this, any email sent in on the old address will still be delivered, but all new email will go out with the new address.
uncheck auto update email addresses based on recipient policy, or your primary will be switched back to the alias generated address

3.
LOTS of work, but you can do it, if you really want to.