"a bit away" the IT blog of C.
There are times when I need little applications to perform some small tasks. It is always fun to do them. I do not even need big, resource consuming or sophisticates IDEs or VMs, platforms. I normally pick the Delphi 3 when I need to do some small windows tool, either with GUI or just for command line.
During my work at customers I receive a laptop but having only normal user rights. And usually the default setting from the domain policy the screen saver has just a few minutes pause. Since I can’t change the setting I thought to develop a small application to simulate a key stroke at a 30 seconds basis.
From Delphi I chosed the command line application type. Creaing a new application I have taken out the default Form. I only remained with the Program unit. This is basically the command line needed unit.
Firstly the application should not have the command line (the black window) associated with it. So I was sure to take out any directive like:
{$APPTYPE CONSOLE}
Another issue was not to launch more than one, so I used a Windows Mutex object:
Mutex := CreateMutex(nil, True, 'Ssstop666'); if (Mutex = 0) OR (GetLastError = ERROR_ALREADY_EXISTS) then Exit;
I needed to create a timer, I used the Win32 API to create a system timer:
var TimeHandle :UINT; ... TimeHandle := SetTimer(0, 0, msnumber, @TimerProc); ... // callback function for Timer procedure TimerProc(wnd :HWND; // handle of window for timer messages uMsg :UINT; // WM_TIMER message idEvent :UINT; // timer identifier dwTime :DWORD // current system time ); stdcall; // use stdcall when declare callback functions begin SendKeyProc(VK_NUMLOCK, [], False); end;
I also used some command line options for a little customisation:
if Pos('k=', param) = 1 then
begin
if st = 'tab' then SendKey := VK_TAB
else if st = 'shift' then SendKey := VK_SHIFT
else if st = 'ctrl' then SendKey := VK_CONTROL
else if st = 'esc' then SendKey := VK_ESCAPE
else if st = 'space' then SendKey := VK_SPACE
else if st = 'left' then SendKey := VK_LEFT
else if st = 'up' then SendKey := VK_UP
else if st = 'right' then SendKey := VK_RIGHT
else if st = 'down' then SendKey := VK_DOWN
else if st = 'print' then SendKey := VK_SNAPSHOT
else if st = 'num' then SendKey := VK_NUMLOCK
else SendKey := VK_NUMLOCK;
Exit;
end;
By default the application runs with t=30000 k=num so it is exactly what I needed.
The app can be downloaded here: www.essentiamundi.com/media/other/ssstop.zip
Resolving this JDeveloper issue is not about reinstalling it or tweaking and getting more RAM for your PC. The real cause can be found relatively easy!
In jsp edit mode every time I entered some new text just after that (1-2 seconds) the IDE freezes for about 8-12 seconds. I came across this nightmarish dysfunction of JDeveloper lately. It was no way I could go further with the overall project development in JDeveloper because of this issue. Very frustrating I can tell you! But JDeveloper is a nice tool. Love the OC4J layer and MVC structure and the IDE in general. It helps and it is flexible, the grade of choices in projects development are varied. By comparison with Eclipse, you are getting quicker into the business with the JDeveloper when it comes to database based projects development.
The solution found google-ing was to reinstall. But that is of course not possible for me, as many of the configuration setting had to remain. I tried the right way of looking for the cause.
Was not helping looking at the IDEs configuration/options page, I changed a bit the delays at code completion, checked paths, but no success. Luckily I had an archive of a working JDeveloper version and started to look at folder structures and sizes. Of course I have eliminated the folders that had not changed, I also looked at the j2ee jar files, everything seemed ok so far.
I started looking at the actual jdev process with the Process Explorer. Found some threads that were using to parse some xml configuration files but it was not sure which one, actually JDeveloper uses plenty of these files to almost every functional layer of it.
The troubled folder found was the
jdev/system...
in my case the system9.0.5.2.1618 folder. Here most of the xml files are stored. When again looking with Process Explorer I found out that the file being written most often is palette.xml.
palette.xml
this configuration file is big (>300Kb) and it stores project configurations (important!), jsp layouts (could be the real cause), libraries references (jstl, struts, etc.) I deleted it (rename it for safety) and … bingo! The freezing problem seems solved. A new palette.xml was automatically created by JDeveloper after restarting it. The file had the right settings in it with no ’side effects’ so far. The jsp editing works great now.
Of course you can also try looking for the troubling tag. The exact troubling part in the xml can debugged with a diff application. Good luck!
The bigger the world becomes, the bigger the document output.
In a century of fast growth in all domains there is also a demanding need for smarter data management systems. Data that can be updated securely from anywhere, administered easily and smartly predict costs in production processes within production life-cycles. Product Data Management (PDM) (in software industry known as Version Control) represents the whole logically connected documents around a Product Lifecycle Management (PLM) process. PLM represents the logically connected flow of events in a life of a product: from its conception to its realization, delivery and maintenance stages.
The development of such systems are helping the production industries to a whole new level in which the costs for production costs, engineering change requests are better managed and foreseen.
The benefits for companies willing to advance to this advanced level of data management could be:
An implementation project plan could consist in the following solution:
More on this topic soon.
10 PRINT "Hello World!"
I've got to do with programming since 1995, at high-school. It was a time of "computers are the future, I must do this" thing. A time when I played with Z80 and Intel Pentium x86. A time of fun writing small programs in C and Pascal, doing assembly, coupe with viruses...