Windows Server 2016 Doesn’t Show on Network of the File Explorer Window

Yesterday suddenly all computers on the company network couldn’t see the server. All the computers are running windows 10, and the server is installed MS Server 2016 standard edition. All computers were able to see the server before yesterday.

Each computers and server could ping each other without problem, which meant the network connection was good.

After several failed attempts to solve the problem, I fixed the issue by using following procedure.

Go to Services and scroll down to locate the service named Function Discovery Resource Publication service. I found that this service was not running. After I  started it, the server appeared on the network of file explorer for all computers.

The reason is that sometimes, the Function Discovery Resource Publication service might be stopped after windows updating. Maybe it is for the security consideration.

Advertisements
Posted in Network, Uncategorized, Windows Server | Tagged , | Leave a comment

The Key to Repeat Last Line In Python Interpreter on Mac

alt+p

Posted in Mac, Python | Tagged , | Leave a comment

How to Access My User Folder From The Terminal on Mac

When you enter the terminal, you are normally under your home directory. If you are in a different folder for some other reasons (for example you switched folder around), you can just do the following:

cd $home

or

cd /users/your_username

(use the absolute path)

Then you will be back to your home folder.

Under your home folder, type:

pwd

You can see:

/Users/your_username

This make sure that you are in the right directory and path.

When you type:

cd..

You will be under Users folder again.

 

The reason for me to write above paragraph

If you type:

cd /

ls

You don’t see Users directory by default (ls –la will do).

Posted in Mac, Mac OS | Tagged , | Leave a comment

Start Using Python on Mac

Start IDLE from the terminal

To open IDLE:

  1. Open a terminal window.
  2. In the terminal window, issue the command idleX.Y (for example: idle2.7) to launch IDLE*.
  3. Click Python-> Preferences… Menu item.
  4. Click General
  5. In startup Preferences part, click Open Edit Window radio button.
  6. Click Ok

Then can see the edit window and edit your Python code in the edit window.

*Note: IDLE (Integrated Development Environment or Integrated Development and Learning Environment) is an integrated development environment for Python.

Create a folder for your own Python program file

To create a folder to save your Python program file:

  1. Go to Macintosh HD (your hard drive name. your hard drive might have a different volume name)
  2. Click Users folder
  3. Create a folder named python_code (you can use a different name for this folder).

The extension name for Python is .py.

Enter Python interpreter

  1. Click the edit window to activate editing window for Python
  2. Click Run-> Python Shell Menu item

Now you can see the windows of Python interpreter, and it is called Python version_nember Shell.

Try Some Simple Python command

You can try some command in the Python Shell window, and have a feeling how Python interpreter works.

For example:

Type:

>>> print (‘Hello’)

And type enter.

You will see:

Hello!

Type:

>>> print(‘Good Morning!’)

and enter.

You will see

Good Morning!

Create a python program file

Click the edit window to activate it. Type the following code:

print(‘Hello, morning!’)

x = 2

print(‘x = 2’)

y = 3

print (‘y = 3’)

z = x+y

print(‘Please tell me the result of s+y’)

print(‘The result of x+y is: ‘)

print(z)

Save the code into a file named mypython1.py into the folder python_code taht you created earlier.

Run a python program inside Python interpreter

Open your python interpreter. Type:

>>> execfile(‘/Users/python_code/mypython1.py’)

Then press enter.

You can see the result of your scripts like this:

>>> execfile(‘/Users/faqing/hello/mypython1.py’)

Hello, morning!

x = 2

y = 3

Please tell me the result of x+y

The result of x+y is:

5

>>>

Now you are able to open Python interpreter, writer a small Python program, run your Python program inside Python interpreter, and you can also run simple command inside Python interpreter.

Posted in Programming, Python | Tagged , | Leave a comment

How to Un-Send Your Email

You might have a moment like this: you wish that you hadn’t sent out the email just after you clicked Send button.

If you are using gmail. You have an opportunity to recall your email by doing this in the Setting of your gmail:

  1. Open Gmail.
  2. In the top right, click Settings Screen Shot 2017-03-31 at 12.23.26 PM.png > Settings.
  3. Find Undo Send and check the check box beside Enable Undo SendScreen Shot 2017-03-31 at 12.24.36 PM.png
  4. Select the time between when you click Send and when the email is actually sent.
  5. Click Save Changes.
  6. Now if you send an email out and regret right away, you can click Undo.Screen Shot 2017-03-31 at 12.33.13 PM.png
  7. Your email will pop up again, so you can edit it or do whatever you want to.

Be aware that right now the maximum time allowing you to take action is 30 seconds.

Posted in Gmail | Tagged | Leave a comment

How to Find Out How Many Days Left When Using Trial Version of Windows Server 2016

After you installed Windows Server’s trial version, at some time point you  might need to find out how many days left for your trial. Here is how to do it.

Just go to command prompt window, and type:

slmgr /dlv

cof

Then you will get this:img1.jpg

 You can see the days left for your trial.

Isn’t it simple?

Posted in Windows Server | Tagged | Leave a comment

Show hidden files in Mac OS X

I saved a word template as my personal template. When I wanted to copy the template file to save in one of my folders for later use, I found that I couldn’t find the folder that the template located from finder. Even though I can see the folder name from the word’s preference settings.

I realized that this folder is a hidden folder, so I need to let the finder to show the hidden folder or files. For Mac, this is not that easy as in PC. I searched online and find the magic words to show and hide the hidden folders and files. In case I need to use it later, I just record the magic words here.

  1. Opne Terminal
  2. Copy and past both lines listed below into Terminal one at a time, with each line follow a enter.

defaults write com.apple.finder AppleShowAllFiles YES

killall Finder

The Terminal window should look like this:

Mac-Pro:~max$ defaults write com.apple.finder AppleShowAllFiles YES

Mac-Pro:~max$ killall Finder

Mac-Pro:~max$

Now you will be able to see the hidden folders and hidden files in your finder window.

If you want to hide the hidden folders and hidden files again, do the same thing except using NO replace YES in the line of “defaults write com.apple.finder AppleShowAllFiles YES

The Terminal window should look like this:

Mac-Pro:~max$ defaults write com.apple.finder AppleShowAllFiles NO

Mac-Pro:~max$ killall Finder

Mac-Pro:~max$

Posted in Uncategorized | Leave a comment