24 March 2021

How to redirect 'print' output to a file using python?

 How to redirect 'print' output to a file using python?




import sys

orig_stdout = sys.stdout
f = open('out.txt', 'w')
sys.stdout = f

for i in range(2):
    print 'i = ', i

sys.stdout = orig_stdout
f.close()

'Turn BitLocker on' missing on usb drive

 'Turn BitLocker on' missing on usb drive

'Turn BitLocker on' appears on all HD partitions, but not on USB drives. 

Solution: Insert the USB stick in question - In Disk Manager right click on the partition and Delete Volume then New Simple Volume. 

After formatting in Disk Management, you need to physically disconnect and reconnect the removable drive. Then the "Turn on Bitlocker" button appears in the Explorer context menu.

How to remove choices in Google Forms?

 How to remove choices in Google Forms? 


https://nathannagele.com/how-to-remove-choices-in-google-forms/

Go to Google Form in Chrome browser -> click Menu (3 dots) -> Add-ons -> install 'Choice Eliminator Lite' -> go back to the Form -> click the drop-down element -> click the Add-ons icon -> click 'Choice Eliminator Lite' -> click 'configure' -> tick 'Eliminate Choices'.

Done.

How can I scale the content of an iFrame?

How can I scale the content of an iFrame?


<iframe src="https://xxx.html" style="border:none; overflow: hidden; position: relative; width: 1044px; height: 1730px; -ms-zoom: 0.5; -moz-transform: scale(0.5); -moz-transform-origin: 0px 0; -o-transform: scale(0.5); -o-transform-origin: 0 0; -webkit-transform: scale(0.5); -webkit-transform-origin: 0 0;" title="xxx"></iframe>

How to extract a section from a video with ffmpeg?

How to extract a section from a video with ffmpeg?

https://superuser.com/questions/377343/cut-part-from-video-file-from-start-position-to-end-position-with-ffmpeg

How to cut a video, without re-encoding

Use this to cut video from [start] for [duration]:

ffmpeg -ss [start] -i in.mp4 -t [duration] -c copy out.mp4

Here, the options mean the following:

  • -ss specifies the start time, e.g. 00:01:23.000 or 83 (in seconds)
  • -t specifies the duration of the clip (same format).
  • Instead of -t you can also supply the end time with -to.
  • -c copy copies the first video, audio, and subtitle bitstream from the input to the output file without re-encoding them. This won't harm the quality and make the command run within seconds.

Note that if you've used -ss, you have to subtract this from the -to timestamp. For example, if you cut with -ss 3 -i in.mp4 -to 5, the output will be five seconds long.

For more info, see https://trac.ffmpeg.org/wiki/Seeking

08 February 2021

Adobe Reader opens and closes immediately

 Adobe Reader opens and closes immediately

Solution: You can try using Windows Explorer to navigate to C:\Program Files\Adobe\Acrobat Reader DC\Reader, then double-click on Eula.exe and accept the license agreement

22 January 2021

the sign-in method you're trying to use isn't allowed for more info, contact your network administrator

 the sign-in method you're trying to use isn't allowed for more info, contact your network administrator


Solution (by : Altaf8Jun2010Dubai Airports):

start \run\gpedit.msc

goto computer configuration>windows settings>security settings>local policies>User rights management> Allow log on locally

here you will not be allowed to add any new users (may be only admins can do) but i added the troubling users into one of the group already available and that solved the problem.