How to Create a Folder in CMS using BO Java SDK

public static void createFolder( IInfoStore infoStore, String name, String description, String parentCUID) throws SDKException { IPluginMgr pluginMgr = infoStore.getPluginMgr(); IPluginInfo plugin = pluginMgr.getPluginInfo(CeKind.FOLDER); IInfoObjects newInfoObjects = infoStore.newInfoObjectCollection(); newInfoObjects.add(plugin); IInfoObject infoObject = (IInfoObject)newInfoObjects.get(0); infoObject.setTitle(name); infoObject.setDescription(description); infoObject.properties().setProperty(CePropertyID.SI_PARENT_CUID, parentCUID); infoStore.commit(newInfoObjects); }

Handling Ctrl+C in a C# console tool (Designer SDK)

Handling exceptions is not enough to make clean up (quit Designer). The following code handles Ctrl+C. using System; using Designer; namespace ConsoleApplication1 { class Program { delegate void CleanUpMethod(); static void Main(string[] args) { Application application = new Application(); CleanUpMethod cleanUp = delegate { application.Quit(); }; Console.CancelKeyPress += delegate { cleanUp(); }; try { application.LogonDialog(); […]

Mouse pointer disappearing in Windows 7

I had a problem – my mouse pointer was disappearing after waking up computer on occasion. Nothing helped except System Restore which was not actually very neat solution as restoration also removed important system changes or software. I spend few hours searching internet for the solution but have not found anything that solved my problem. […]

Personal File Sharing

If you need easy accessible personal file store, there are a lot of them on the web. Another solution is to use google blobstore service – a geek's choise :) import urllib from google.appengine.ext import blobstore from google.appengine.ext import webapp from google.appengine.ext.webapp import blobstore_handlers from google.appengine.ext.webapp.util import run_wsgi_app class MainHandler(webapp.RequestHandler): def get(self): upload_url = blobstore.create_upload_url('/upload') […]

How to fix "Session timed out" (Tomcat)

Resolution Stop Tomcat Edit "web.xml" files in the following folders (do not forget to make a copy before editing): "[Tomcat55 Directory]\webapps\InfoViewApp\WEB-INF", "[Tomcat55 Directory]\webapps\InfoViewAppActions\WEB-INF" , "[Tomcat55 Directory]\webapps\AnalyticalReporting\WEB-INF", "[Tomcat55 Directory]\webapps\PlatformServices\WEB-INF", "[Tomcat55 Directory]\Conf" Set the session timeout to 60 minutes <session-timeout>60</session-timeout> Save and close the "web.xml" file. Clean the "Work" directory. Go into "[Tomcat55 Directory]\Work\Catalina\localhost" and delete the […]

Configuring Eclipse on Windows to Use With Google App Engine

The post "Configuring Eclipse on Windows to Use With Google App Engine" on Google has not been updated since 2008. Here is the updated version for Eclipse 3.7 (Indigo). Before you start, download and install the following components: Python – e.g. Python 2.7.2 Windows Installer for Windows Eclipse – e.g. Eclipse Classic 3.7 Google App […]

Python Google App Engine Calculator

Couple of months ago, accidentally I found myself on a conference for Python developers. I thought "what the hell am I doing here". Ok, now I got into an interesting project and have to learn Python… :) My first program – Calculator:) import webapp2 class MainPage(webapp2.RequestHandler): def get(self): # build a list of operations f […]