Friday, May 18, 2007

Aptana JavaScript Editor

I love good IDE's.


One of the reason's I love eclipse is because it is so versatile. You can add any type of addin to Eclipse, and there are many out there. Today I wish to talk a little about APTANA IDE.





The Aptana is an IDE for Javascript (AJAX anyone?) with an excellent bonus.
It allows you to use code-Assist, or as Microsoft users call it "intellisense". You can add your own libraries to the code assist area, and it considers them part of the framework.

It works with CSS, HTML, JS, RUBY, RHTML, RAILS.


It's pretty easy to use with Microsoft's excellent Ajax Framework (formerly known as atlas).
It's still not as god as microsoft's Visual Studio 2005 IDE. check out the free version
Microsoft Web Developer Express

Since VS2005 and the free version as well, do not have good javascript support, i rally my work around both IDE's leaving the hardcore JS to APTANA and the debugging and design to the VS2005.

They work well together, and do not step on each others toes.

give them a try.

Tuesday, May 15, 2007

Bluetooth away

The Bluetooth technology that has hit us is nothing short of incredible. I have always been one for technology, and for protocols that have been standardized.

  • When I sync'd my nokia's, it was always via IR, never via cable (waste of money, each cell phone having its own cable...) .
  • Having an IR keyboard was fun (and I never suffered all the loss-of-connectivity others complained about all the time).
  • Having an Fm wireless keyboard/mouse is also cheap, and fun.
  • I guess having a Bluetooth keyboard/mouse is the same. - I dunno I don't have 'em.

However, most of the BT accessories have been aimed at the cell phone market.Mostly the BT earphones are most popular.

I have a nokia 7370, and a nokia 813i BT earphone. I also own a couple of laptops some with BT embedded devices as well as a BT USB dongle (Motorola). I use BT to sync my phone to my outlook via Nokia's free software.

Yesterday-night I couldn't sleep. I'm an insomniac, but it's irrelevant right now. So I was thinking:

"I have an ear-piece, why can't I connect it to the computer and listen to music (mp3) at the 7m distance I speak with my cell-phone ?"

So I started digging and came up with Wei-Meng Lee's input, he wrote at WindowsDevCenter. In his article he states that you need to use broadcom's stack to change your BT profile.I have to say, It didn't work... and I am still very disapointed.

However... I have come across an excellent little piece of ingenuity.

Use your Cell Phone as a BT remote control

I think it's an ingenious idea.

The guys a www.salling.com have created this awesome program called "Salling Clicker" for PC and MAC.

What it does is by using Java scripts that run via the windows scripting host in your computer you can control anything on your computer from your BT enabled phone.Now I must say for the cost of $23.95 you can have your own BT Remote control from your Laptop is an ok deal.

Besides this being an excellent idea, with tons of supported phones, it also allows ME to add my own JS or VB scripts, and enhance the basic functionalities of the Clicker.I tested the free version and it works (on Bsplayer, my fav app) , and think it's a cool idea.

For anyone who knows me knows 2 things:

  1. I give lectures with PowerPoint slides
  2. I am an avid film buff.

I now have a customizable/scriptable remote control!!

Sunday, May 13, 2007

בדיחות

בחור אחד הגיע לראיון עבודה בכלבו גדול ומפורסם. המראיין ששוחח אתו התלהב ממנו מאוד, אולם דבר אחד הפריע לו מלקבל את הבחור לעבודה: כל הזמן הוא היה ממצמץ בעין אחת. "תראה בחור", הוא הסביר, "כאן זה כלבו מכובד ולא נוכל לקבל איש מכירות שיקרוץ כל הזמן." "אה, זה שום דבר", אמר הבחור, "אני לוקח כדור אספירין וזה עובר. "באמת?" שאל המראיין, "אפשר לראות?" הכניס הבחור את ידו לכיסו כדי להוציא את האספירין. תוך כדי חיפוש הוא הוציא חפיסות קונדומים בצבעים שונים. "תראה בחור", אמר לו המראיין, "אנחנו כלבו מכובד ולא נוכל להעסיק עובדים שכל הזמן מסתובבים עם חפיסות קונדומים ומחפשים בחורות."- מחפשים בחורות? מה פתאום?? אני בחור הגון שנשוי באושר! אני לא מחפש שום בחורות!- באמת? אז מה זה כל הקונדומים הצבעוניים הללו?-אה... זה... אני אסביר לך: ניסית פעם להיכנס לבית מרקחת ולבקש מהרוקח חבילת אספירין תוך כדי קריצה?

Tuesday, May 08, 2007

Kill Kazini

How to kill the Kazini Web Development Server

Kazini is a very nice development server, and is a great blessing for programmers, however there are times you wish to neuralize all the kazinis at the same time.
It would not be ne
When you wish to get rid of all the webservices together, kill the Application, test a-new, whatever the reason. (This function wouldn't be needed if when you clicked on the [STOP] button. it would kill the kazinis itself, but since it doesn't:

  • run this little snippet from the command line (Start->Run)
    C:\>taskkill /F /FI "IMAGENAME eq WebDev.WebServer.EXE"

Although they stay visible in the taskbar, they are dead (just move the mouse ober them to see)
this happens because the Windows hasn't yet updated the bar, because it does not monitor the commandline (for obvious reasons)



  • another option would be to save it to a batch file
(everything on the same line)
C:\>echo taskkill /F /FI "IMAGENAME eq WebDev.WebServer.EXE" > c:\KillKazini.bat
then you can run (Start->Run->C:\KillKazini)

  • another option would be to add it to the External Tools menu

in Visual Studio 2005

  1. [Tools]->[External Tools..
  2. Click on [Add]
Title: Kill all Kizinis
Command: %WINDIR%\SYSTEM32\taskkill.exe
Arguments: /F /FI "IMAGENAME eq WebDev.WebServer.EXE"

3. Click [OK]

Now to use:

[Tools]->[Kill all Kazinis]

c you next time

Monday, May 07, 2007

Bookmarking..

Bookmarking

I think it's been quite a chase to locate a good bookmarking site.

I have narrowed it down to 2 providers:

Sync2IT
www.sync2it.com - I have used their services for years now.
They are free.
you d/l and use a small resident program that PHYICALLY syncs your bookmarks in IE, Firefox, Opera to the site.. also reads hebrew and other non english and accented bookmarks and titles.

plus side - very fast, reliable, puts your bookmarks on the computer and syncs your office bookmarks and your home bookmarks, your laptop etc.. you can search your bookmarks, search others bookmarks, create collections, recieve updates of others collections etc..


downside - the only way i am able to add a bookmark is via my browser, so if i dont want to install the client for some reason, or i just want to manage my bookmarks i must be on my own machine. - this is a big downside - but maybe i just didn't read the faq.


Del.ico.us
http://del.icio.us

plus side - Everything is on the web, including the management software. you can use Tags to say what the bookmark is about, and you can put a bookmark in many different "virtual" locations, this eliminates the "sophies choice" syndrome of where to keep the bookmark: under programming? under customising, under dot net or under framework ? or maybe under cool stuff? or Object Oriented Ideas? - you get the idea.

downside - Everything is on the web, so you need to have a browser page open at your account.. this is bothersome for me, i hate having lots of windows open (and i usually have at least 7 if not 10 browsers open together) - I use Maxthon.. www.maxthon.com
Solution Folders

This is a great way to orginize projects in your IDE.

by using a visual representation of folders in your IDE which do not change anything real in your projects, you can setup all your business objects under one solution folder:
Business
all your UI stuff under UI
and inside UI you can also have Custom etc..

Sunday, May 06, 2007

KeyWord density, and how to improve your pages visibility to search engines

Search Engine Optimization - Keywords

If you wish to find out what your page is really talking about, take a look through the eyes of a search-engines' spider. How many of the ideas you illustrate are really being considered correctly in the search engine.

http://www.webconfs.com/keyword-density-checker.php

many times you will find out the page you are writing is actually dealing with something completely different.

The way the spiders read a page is by finding what keywords appear in the page. and how many times (what percentage) they appear in the page.

Some spiders also look at things such as, if there is a title and then keywords from the title appear in the text bellow it, this makes sense that the text is really about the keywords described and strengthens the connection between title and context. This makes the keywords in the title even more important.
ASP NET Page EVENTS:

http://aspalliance.com/articleViewer.aspx?aId=134&pId
http://www.15seconds.com/issue/020102.htm

excellent resource
http://john-sheehan.com/blog/wp-content/uploads/aspnet-life-cycles-events.pdf

http://msdn2.microsoft.com/en-us/library/ms178472.aspx

http://www.codeproject.com/useritems/lifecycle.asp


Listing 1: Page Events Summary

MethodPostBackControls

ConstructorAlwaysAll
AddParsedSubObjectAlwaysAll
DeterminePostBackModeAlwaysPage
OnInitAlwaysAll

LoadPageStateFromPersistenceMediumPostBackPage
LoadViewStatePostBackAll
ProcessPostData1PostBackPage
OnLoadAlwaysAll

ProcessPostData2PostBackPage
RaiseChangedEventsPostBackPage
RaisePostBackEventPostBackPage
OnPreRenderAlwaysAll

SaveViewStateAlwaysAll
SavePageStateToPersistenceMediumAlwaysPage
RenderAlwaysAll
OnUnloadAlwaysAll


From time to time the ASPNET worker process just conks out..

This little snippet will tell you why.

http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx


extracted from the site..

Logging ASP.NET Application Shutdown Events


Someone on a listserv recently asked whether there was a way to figure out why and when ASP.NET restarts application domains. Specifically, he was looking for the exact cause of what was triggering them on his application in a production shared hosted environment (was it a web.config file change, a global.asax change, an app_code directory change, a directory delete change, max-num-compilations reached quota, \bin directory change, etc).

Thomas on my team has a cool code-snippet that he wrote that uses some nifty private reflection tricks to capture and log this information. It is pretty easy to re-use and add into any application, and can be used to log the information anywhere you want (the below code use the NT Event Log to save it – but you could just as easily send it to a database or via an email to an admin). The code works with both ASP.NET V1.1 and ASP.NET V2.0.

Simply add the System.Reflection and System.Diagnostics namespaces to your Global.asax class/file, and then add the Application_End event with this code (note: you can also download a .zip file containing the code from here):

public void Application_End() {

HttpRuntime runtime = (HttpRuntime) typeof(System.Web.HttpRuntime).InvokeMember("_theRuntime",

BindingFlags.NonPublic

BindingFlags.Static

BindingFlags.GetField,

null,

null,

null);

if (runtime == null)

return;

string shutDownMessage = (string) runtime.GetType().InvokeMember("_shutDownMessage",

BindingFlags.NonPublic

BindingFlags.Instance

BindingFlags.GetField,

null,

runtime,

null);

string shutDownStack = (string) runtime.GetType().InvokeMember("_shutDownStack",

BindingFlags.NonPublic

BindingFlags.Instance

BindingFlags.GetField,

null,

runtime,

null);

if (!EventLog.SourceExists(".NET Runtime")) {

EventLog.CreateEventSource(".NET Runtime", "Application");

}

EventLog log = new EventLog();

log.Source = ".NET Runtime";

log.WriteEntry(String.Format("\r\n\r\n_shutDownMessage={0}\r\n\r\n_shutDownStack={1}",

shutDownMessage,

shutDownStack),

EventLogEntryType.Error);

}

I tried this out using a simple web-site using ASP.NET 2.0 and the built-in VS Web-Server (aka Cassini). When I changed the web.config file in my running application, the following was logged to my "Application" event viewer:

_shutDownMessage=CONFIG change

HostingEnvironment caused shutdown

CONFIG change

CONFIG change

_shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

at System.Environment.get_StackTrace()

at System.Web.HttpRuntime.ShutdownAppDomain()

at System.Web.Hosting.HostingEnvironment.ShutdownThisAppDomainOnce()

at System.Web.Hosting.HostingEnvironment.InitiateShutdownWorkItemCallback(Object state)

at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state).

When I updated my Global.asax file with some code change, the following was logged:

_shutDownMessage=Change in GLOBAL.ASAX

Change in GLOBAL.ASAX

Change in GLOBAL.ASAX

HostingEnvironment caused shutdown

_shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

at System.Environment.get_StackTrace()

at System.Web.HttpRuntime.ShutdownAppDomain()

at System.Web.HttpApplicationFactory.OnAppFileChange(Object sender, FileChangeEvent e)

at System.Web.DirectoryMonitor.FireNotifications()

at System.Web.Util.WorkItem.CallCallbackWithAssert(WorkItemCallback callback)

at System.Web.Util.WorkItem.OnQueueUserWorkItemCompletion(Object state)

at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state).

And when I changed the contents of my \bin directory I got:

_shutDownMessage=Change Notification for critical directories.

bin dir change or directory rename

HostingEnvironment caused shutdown

Directory rename change notification for 'E:\Unload'.

Unload dir change or directory rename

_shutDownStack= at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)

at System.Environment.get_StackTrace()

at System.Web.HttpRuntime.ShutdownAppDomain()

at System.Web.Hosting.HostingEnvironment.ShutdownThisAppDomainOnce()

at System.Web.Hosting.HostingEnvironment.InitiateShutdownWorkItemCallback(Object state)

at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)

at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)

at System.Threading.

Hopefully this is a useful trick that you can re-use in your own applications to get better visibility into what is going on with them. If you are using ASP.NET 2.0, then you should definitely also investigate the new ASP.NET 2.0 Health Monitoring feature-set. This provides a rich eventing architecture for instrumenting your code, as well as raising notifications of issues to admins when they occur within your application. K. Scott Allen has written a good overview article of how this new feature-set works, and links to the MSDN documentation.

Hope this helps,

Scott




Published
Wednesday, December 14, 2005 11:04 PM
by
ScottGu






Sunday, October 29, 2006

I kept getting this damn Response of

------------------------------------------------------------------------------------------------
Error 1 Access to the path 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ws\04b0d857\7e4dd082\App_Code.compiled' is denied
------------------------------------------------------------------------------------------------

I found the answer here:

http://www.velocityreviews.com/forums/t118701-vs-2005-compilation-error-appcodecompiled.html

Quite simply, it says to allow WRITE access to the USERS group.

It fu*king works!!!

Been looking for this for over a week.