Automatically log everybody out from GP

One of my gripes about Microsoft Dynamics GP deployed on citrix is that it’s very easy for users to leave their GP session running when they leave citrix.

Users often think they have exited GP when they close the citrix window.

gp log outThe problem with this is that the GP sessions take up license seats and if somebody takes a long vacation without exiting properly, his session takes up a seat until the I, the administrator kills his session.

Yesterday, I created a SQL Server job to ‘delete from activity’ in the DYNAMICS database at 3:00 am everyday.

The activity table is the table where all users’ sessions are kept. Delete the rows there and all the sessions are killed.

This morning, when I checked in GP, all sessions were new, ie they started today instead of the the usual mess I see where some users have been logged on since the day before.

Technorati tags: , ,

After upgrade Wordpress, get xmlrpc invalid response error

 

If anything has gone wrong the first thing to do is go through all the steps in our extended upgrade instructions. That page also has information about some of the most common problems we see.

Upgrading WordPress « WordPress Codex

I recently upgraded Wordpress manually following the instructions at Upgrading WordPress « WordPress Codex. Soon after, when I tried to post using Windows Live Writer, I received the xmlrpc.php invalid response error. This does not happen if I upgrade using Fantastico.

Wordpress support forum led me to think that the problem was with my blog client, Windows Live Writer.

It seems I am not alone, Joe Cheng at Microsoft received a lot of complaints about Live Writer not working after upgrading  Wordpress.

Actually, the problem is not with Windows Live Writer, it’s with the Wordpress upgrade instructions.

Briefly, Upgrading WordPress « WordPress Codex  says:

copy contents of downloaded zip file to:

1. wp-admin directory

2. wp-includes directory

3. wp-contents directory

upgrade wordpressBut it neglects to tell you to also overwrite the contents of the root directory with the files from the zip file.

This screen capture shows some of the files at the root directory.

As it turned out, one of the files in the root is xmlrpc.php.

After I overwrote the root files, Windows Live Writer posts fine to my blog.

 

Technorati tags: , , ,

Guido’s Google App Engine application

 

..Guido van Rossum announced today that he open sourced the code for Code Review, a Google AppEngine app he released last week

Agile Testing: Guido open sources Code Review app running on GAPE

Technorati tags: , , , ,

Free Django hosting

Google App Engine comes bundled with the popular Django python framework.

For an idea of Django hosting prices, visit http://www.webfaction.com/services/hosting.

Python hosting is rare and pricey (compared to PHP hosting).

Before  Google App Engine, if you wanted to run Django on Bluehost, you have to be ready to do quite a bit of work and bluehost tells you it is not supported.

Google App Engine gives a free start-up pack that comes with 500M disk space.

So, before you fork out $ for Django hosting,  give Google App Engine a spin first.

Technorati tags: ,

Introducing Google App Engine - hosted web applications on Python

Most hosting companies support PHP web applications but few support Python web applications.

Google just launched Google App Engine - a hosted environment that uses Python and YAML and it even offers a no-risk free start-up pack.

During this preview period, applications are limited to 500MB of storage, 200M megacycles of CPU per day, and 10GB bandwidth per day. We expect most applications will be able to serve around 5 million pageviews per month. In the future, these limited quotas will remain free, and developers will be able to purchase additional resources as needed.

Yahoo !!

Google App Engine Blog: Introducing Google App Engine + our new blog

Technorati tags: ,

How to get explain plan output with rows in trace files

  1. alter session set sql_trace=true
  2. Run the sql(s)
  3. disconnect

 

Note step 3, disconnect, not turn trace off.

Read more here:

Hi Tom, sometimes when I run the TKPROF (ALTER SESSION SET SQL_TRACE=TRUE), the explain plan don’t appear in the output file. Why this can happen? 
Thanks.

and we said…

The explain plan should never appear in the tkprof. In order to get the explain plan, you would have to use explain=u/p but you don’t want to do that.

http://tkyte.blogspot.com/2007/04/when-explanation-doesn-sound-quite.html

You want the row source operation, and that will be in the tkprof when you CLOSE the cursor (before ending trace)
eg: the most assured way - turn on trace, do stuff and DISCONNECT. That way we know the cursor is closed (not cached by pro*c, plsql, jdbc statement caching, whatever) and the row source operation will be there.

Reviews

5 stars   April 30, 2007 - 12pm US/Eastern

 

Reviewer: A reader

You mean that I should do this… ??
SQL> ALTER SESSION SET SQL_TRACE = TRUE ;
< .. do stuff .. >
SQL> DISCONNECT

Ask Tom “tkprof and explain plan”

Technorati tags: , , ,

related posts gotcha when changing wordpress theme

For those who are using the related posts Wordpress plugin, when you switch to a new Wordpress theme, you might find that the related posts have gone.

When you switch to a new theme in Wordpress, remember to include these lines in single.php

   1: <?php if (function_exists(‘related_posts’)) { ?> <div class=“related”> <h3>Related Posts</h3> <ul><?php related_posts(); ?></ul></div> 
   2: <?php } ?> 

 

Without these lines, the related posts will not appear.

Technorati tags: , ,

datemode meaning in xldate_as_tuple(xldate, datemode)

excel 1904 To decide which datemode to use, first check this (refer picture) in the Excel workbook that you are extracting data from with python.

If 1904 date system is checked, use datemode 1, otherwise, use datemode 0.

Background:

To extract data easily from Excel workbooks, use pyExcelerator.

Excel stores date as floating numbers. To convert the number to Gregorian (year, month, day, hour, minute, nearest_second), use xlrd’s xldate_as_tuple function. (source: xlrd home page)

Though you can use xlrd to extract Excel data, it’s far more complex,

compare xlrd’s

   1: open_workbook(filename=None, logfile=sys.stdout, verbosity=0, pickleable=True, use_mmap=USE_MMAP, file_contents=None, encoding_override=None, formatting_info=False, )

to pyExcelerator’s

   1: pyExcelerator.parse_xls(fname, encoding)

 

Technorati tags: , ,

easy_install is a great tool to install python packages

Today, while reading a magazine, I came across a package I wanted to check out - pyExcelerator.

I found the package at sourceforge, version 0.6.3a.

I downloaded the zip file and just before I installed it, I tried out easy_install.

   1: c:\1\sql\nfx>easy_install pyexcelerator
   2: Searching for pyexcelerator
   3: Reading http://cheeseshop.python.org/pypi/pyexcelerator/
   4: Couldn‘t find index page for ‘pyexcelerator’ (maybe misspelled?)
   5: Scanning index of all packages (this may take a while)
   6: Reading http://cheeseshop.python.org/pypi/
   7: Reading http://cheeseshop.python.org/pypi/pyExcelerator/0.6.0a
   8: Reading http://www.sourceforge.net/projects/pyexcelerator
   9: Reading http://cheeseshop.python.org/pypi/pyExcelerator/0.5.3a
  10: Reading http://sourceforge.net/projects/pyexcelerator/
  11: Best match: pyexcelerator 0.6.0a
  12: Downloading http://pypi.python.org/packages/source/p/pyExcelerator/pyexcelerator
  13: -0.6.0a.zip#md5=df116f024919e129487366729e619928
  14: Processing pyexcelerator-0.6.0a.zip
  15: Running pyExcelerator-0.6.0a\setup.py -q bdist_egg –dist-dir c:\docume~1\siewka
  16: ~1\locals~1\temp\easy_install-gglema\pyExcelerator-0.6.0a\egg-dist-tmp-di0eir
  17: zip_safe flag not set; analyzing archive contents…
  18: Adding pyexcelerator 0.6.0a to easy-install.pth file 
  19:  
  20: Installed c:\1programs\python\lib\site-packages\pyexcelerator-0.6.0a-py2.5.egg
  21: Processing dependencies for pyexcelerator

and it was installed.

But it got version 0.6.0 instead of 0.6.3a.

I then tried installing with the zip file :

   1: c:\1\sql\nfx>easy_install e:\download\pyexcelerator-0.6.3a.zip
   2: Processing pyexcelerator-0.6.3a.zip
   3: Running pyExcelerator-0.6.3a\setup.py -q bdist_egg –dist-dir c:\docume~1\siewka
   4: ~1\locals~1\temp\easy_install-atezny\pyExcelerator-0.6.3a\egg-dist-tmp-qdyivy
   5: zip_safe flag not set; analyzing archive contents…
   6: Removing pyexcelerator 0.6.0a from easy-install.pth file
   7: Adding pyexcelerator 0.6.3a to easy-install.pth file
   8:  
   9: Installed c:\1programs\python\lib\site-packages\pyexcelerator-0.6.3a-py2.5.egg
  10: Processing dependencies for pyexcelerator==0.6.3a

and it  also installed !!

Wow !! easy_install can install just by my typing

1. easy_install <package name> - and it will search the internet for the package.

2. easy_install <downloaded zip file>

Technorati tags: , ,

Yahoo! Web Hosting offers Unlimited storage, bandwidth but..

Yahoo offers unlimited storage, bandwidth in this eat-all-you-can-web-hosting-offering but the following features are outdated:

  • PHP version 4.3.11 and support for hundreds of PHP functions
  • MySQL 4.1, with unlimited databases
  • The current PHP4 version is 4.4.8 and support for PHP4 will discontinue after August 2008. PHP5 has been out since 2004.

    The latest MySQL version is 5.0 was released in 2003.

    Aside from the outdated software, the unlimited storage, bandwidth actually do not impress at $11.95 per month.

    Most of the sites I have hosted do not run out of storage or bandwidth. They run out of CPU and Yahoo prevents you from building your super-site because your site will be hosted on a shared server and should not impact the performance of other servers.

    It offers no SSH access, no python support.

    All in, not a very compelling package.

    Yahoo! Web Hosting: Reliable and Secure Web Site Hosting

    Technorati tags: , , ,