Friday, January 25, 2013
iPad Mini 2? When?
I can't wait for iPad Mini 2 to come out with Retina Display. I played around with the current iPad Mini, and the display really bothered me. Since I'm using a Retina Display MacPro, a Retina Display iPad and a Retina Display iPhone, I notice the resolution difference right away, and I can't stand it. If you're coming from "Retina Display" (Apple's Marketing Term), you better wait for a next generation of the iPad Mini. If you buy one now, you will be greatly disappointed. Don't know when that will come out though. There have been a lot of rumors around the March time frame.
Read Zip and Look At XML in Zip To Count Elements With A Specific Attribute
import xml.sax
import zipfile
import re
counter = 0
class MyContentHandler(xml.sax.ContentHandler):
def __init__(self):
xml.sax.ContentHandler.__init__(self)
def startElement(self, name, attrs):
if attrs.has_key("color"): # search for the element with the attribute of color
global counter
counter += 1
def count(myZip):
zf = zipfile.ZipFile(myZip) # read in zip
files = zf.namelist() # get the files in zip
for file in files:
if re.search(".*myXML.xml", file) is not None: # using regular exp to find file
f = zf.open(file) # open file
xml.sax.parse(f, MyContentHandler()) # parse the xml
print counter # print counter
break
if __name__ == '__main__':
import sys
if len(sys.argv) == 2:
try:
count(sys.argv[1])
except IOError:
print 'Filename not found.'
else:
import os
print 'usage: %s zip' % os.path.basename(sys.argv[0])
import zipfile
import re
counter = 0
class MyContentHandler(xml.sax.ContentHandler):
def __init__(self):
xml.sax.ContentHandler.__init__(self)
def startElement(self, name, attrs):
if attrs.has_key("color"): # search for the element with the attribute of color
global counter
counter += 1
def count(myZip):
zf = zipfile.ZipFile(myZip) # read in zip
files = zf.namelist() # get the files in zip
for file in files:
if re.search(".*myXML.xml", file) is not None: # using regular exp to find file
f = zf.open(file) # open file
xml.sax.parse(f, MyContentHandler()) # parse the xml
print counter # print counter
break
if __name__ == '__main__':
import sys
if len(sys.argv) == 2:
try:
count(sys.argv[1])
except IOError:
print 'Filename not found.'
else:
import os
print 'usage: %s zip' % os.path.basename(sys.argv[0])
Wednesday, January 23, 2013
Free Online Storage in the Clouds
iPhone Messages App Doesn't Rotate To Landscape
Context:
iPhone 5
iOS 6
Problem:
The Messages app doesn't rotate to landscape when I want to text in landscape mode.
Solution:
Reboot the phone. Power off and power on the phone again using the power button.
iPhone 5
iOS 6
Problem:
The Messages app doesn't rotate to landscape when I want to text in landscape mode.
Solution:
Reboot the phone. Power off and power on the phone again using the power button.
Monday, January 14, 2013
Windows Keeps Rebooting in VirtualBox
Context:
VirtualBox
Windows 2008 Server R2
Problem:
Windows keeps restarting in VirtualBox without giving the chance to log in. You see the screen where it asks you to do CTRL+ALT+DELETE to log in, but it will be restarted over and over again.
Solution:
While it keeps rebooting, do F8. Hopefully, you get the screen where you can choose the last known configuration of Windows.
VirtualBox
Windows 2008 Server R2
Problem:
Windows keeps restarting in VirtualBox without giving the chance to log in. You see the screen where it asks you to do CTRL+ALT+DELETE to log in, but it will be restarted over and over again.
Solution:
While it keeps rebooting, do F8. Hopefully, you get the screen where you can choose the last known configuration of Windows.
The action can't be completed because the file is open in DHCP Client
Context:
Windows 2008 Server
Problem:
Cannot delete an event log
Solution:
Windows 2008 Server
Problem:
Cannot delete an event log
Solution:
- Make sure that your service is not running
- You can uninstall it or force a deletion (sc delete <service name>)
- Remove the log registry entry under [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog]
- Restart the machine
- Delete the log file
Friday, January 4, 2013
Windows Server 2008 R2 Random Shutdowns
Context:
Windows Server 2008 R2
VirtualBox
Problem:
Windows Server randomly shuts itself down every hour.
System log shows:
The process wlms.exe has initiated the power off of computer WIN-P4EMG3VI42J on behalf of user NT AUTHORITY\SYSTEM for the following reason: Other (Unplanned)
Reason Code: 0x0
Shutdown Type: power off
Comment:
Solution:
Windows is unactivated and needs to be activated.
If you look in the Application log, you should see this message "The license period for this installation of Windows has expired. The operating system will shutdown every hour."
Windows Server 2008 R2
VirtualBox
Problem:
Windows Server randomly shuts itself down every hour.
System log shows:
The process wlms.exe has initiated the power off of computer WIN-P4EMG3VI42J on behalf of user NT AUTHORITY\SYSTEM for the following reason: Other (Unplanned)
Reason Code: 0x0
Shutdown Type: power off
Comment:
Solution:
Windows is unactivated and needs to be activated.
If you look in the Application log, you should see this message "The license period for this installation of Windows has expired. The operating system will shutdown every hour."
Subscribe to:
Posts (Atom)