Daniel's profileDaniel Benedykt Personal...PhotosBlogLists Tools Help

Blog


    31 May

    Check your trip before you fly...

    Before you fly, you can check your trip, and see all the reservations.

    http://www.checkmytrip.com

    (You need the reservation code and last name of the passanger)

    23 May

    The Webby Awards

    See this year nominees and winners of the Webby Awards

    http://www.webbyawards.com/webbys/current.php

    My favorite .... www.google.com ... winner of the Best Navigation/Structure and the Best Practices awards

    17 May

    Confirm deletes in datagrid

    Introduction

    ASP.NET DataGrid allows you to provide select, edit, cancel and delete buttons. These buttons trigger corresponding events on the server side. These buttons are nothing but button controls (link button or push button) with CommandName property set to select, update, cancel or delete. In this article we will focus on delete command alone. Many times we need to get confirmation from the user about deletion of the record. DataGrid do not provide any inbuilt way to do that. We will see how to prompt the user to confirm the delete using JavaScript.

    The web form

    We will create a simple web form that contains a DataGrid which in turn is bound to the Employee table from Northwind database. The grid has a column Delete that triggers the DeleteCommand event handler. When the user clicks on the Delete button he will be prompted for confirmation. If he clicks on ok the form is posted as usual else the form will not be posted. The task of prompting the user is carried out via client side JavaScript.

    The Delete button

    If you are using VS.NET you can easily add Delete button using the property builder. Note however that this adds a ButtonColumn to the grid. In order to add javascript to a client side event you have to use Attributes collection of the control. The button column do dot have an ID attribute and hence can not be used for this purpose. Hence, we need to use template column as shown below.

    <asp:DataGrid id="DataGrid1" runat="server"> <Columns> <asp:TemplateColumn> <ItemTemplate> <asp:LinkButton id="cmdDel" runat="server" Text="Delete" CommandName="Delete" CausesValidation="false"> </asp:LinkButton> </ItemTemplate> </asp:TemplateColumn> </Columns> </asp:DataGrid>

    Next we need to add the javascript to each and every Delete link button (one per row). We will do that in ItemDataBound event handler.

    Private Sub DataGrid1_ItemDataBound (ByVal sender As Object, ByVal e As DataGridItemEventArgs) Handles DataGrid1.ItemDataBound Dim l As LinkButton If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then l = CType(e.Item.Cells(0).FindControl("cmdDel"), LinkButton) l.Attributes.Add("onclick", "return getconfirm();") End If End Sub

    Here we check whether the item (row) is of type Item or AlternatingItem. We then add DHTML OnClick event handler that calls a client side function getconfirm().

    The Confirmation JavaScript function

    The getconfirm function looks like this:

    function getconfirm() { if (confirm("Do you want to delete record?")==true) return true; else return false; }

    This function displays a javascript confirmation dialog to the user. If user clicks on Ok the function returns true and the form is posted back as usual. If user clicks on cancel it returns false indicating event cancellation. This will cancel the postback of the form.

    I hope it was interesting. See you soon.

    from: http://www.dotnetbips.com/displayarticle.aspx?id=108

    14 May

    Solex - Web application testing with eclipse

    Solex is a Web application testing tool built as a plug-in for the Eclipse IDE. It provides functions to record a client session, adjust it according to various parameters and replay it later typically in order to ensure non regression of the application's behaviour (with stress testing capabilities being added at a later stage). http://sourceforge.net/projects/solex/ http://solex.sourceforge.net/
    10 May

    DeKlarit

     DeKlarit is the data modeling and code generation tool that enables you to concurrently generate and maintain the data model, the data access and business logic layers of your .NET-connected applications.

    The DeKlarit Add-ins provide a complementary toolset to generate from components to complete presentation or web services layers.

    http://www.deklarit.com

    .Net Schedule controls

     These are 2 controls, ScheduleCalendar and ScheduleGeneral, designed to show scheduled events in the form of a table. They are simple versions of the so-called Gantt chart. They don't have advanced features such as dependencies and milestones, but on the other hand, they use templated databinding, so it's up to you, the developer, what you want to show.

     

    http://www.rekenwonder.com/aspnet/schedule.html

    27 April

    SWT code examples

    SWT Standard Widget Toolkit - Development Resources Lots of examples to learn SWT http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/platform-swt-home/dev.html

    Hibernate Synchronizer - code generation

    Hibernate Synchronizer is a free Eclipse plugin code generation tool to be used with the Hibernate persistence framework. The plugin will automatically generate java code when your hibernate mapping files are modified. Objects are created with generated code in an abstract base class and a user-modifiable extension class so user code does not get deleted when the generation is performed. The automaticallly generated objects include: * Value Objects * Proxy Interfaces * Composite Key Objects * Enumeration Objects * Component Objects * Subclasses * DAOs http://hibernatesynch.sourceforge.net/
    24 April

    Setup Nvidia driver on Fedora Core 3

    nVidia: (Use this section only if you have an nVidia GeForce graphics card.) * Log in as root. (If you are already logged in as your default user or a user other than root click "Actions" > "Log Out", click "OK", type "root" in the "Username:" box, hit enter, type your root password in the "Password:" box and hit enter.) * Type: gedit /boot/grub/grub.conf If you have not already done so, remove "rhgb quiet" from the kernel line in grub.conf. Click the "save" button and then exit gedit. This will disable the "Red Hat Graphical Boot" at boot time which would otherwise interfere with the nVidia installation described below. * Open Firefox (the "mouse and world" icon on the bottom left). Go to http://www.nvidia.com/object/linux_display_ia32_1.0-6629.html and download NVIDIA-Linux-x86-1.0-7174-pkg1.run. (Select "save to disk".) This should save the file to the /root directory. If you have already run up2date or yum update the file may have been saved to your desktop instead. If this is the case go to your desktop and drag the file into your "root's Home" folder. (Left mouse click on the file and drag it on top of your "root's Home" folder while holding the left mouse button down. Then release the mouse button.) * Open the terminal and type: gedit /etc/X11/xorg.conf In the "module" section comment out (put a "#" in front of) load "dri" so that it reads # load "dri". In the "device" section change "nv" to "nvidia". Section "Module" Load "dbe" Load "extmod" Load "fbdevhw" Load "glx" Load "record" Load "freetype" Load "type1" # Load "dri" EndSection Section "Device" Identifier "Videocard0" Driver "nvidia" VendorName "Videocard vendor" BoardName "NVIDIA GeForce 4 MX (generic)" EndSection Click the "save" icon and exit gedit. * With the root terminal still open type: gedit /etc/rc.local At the end of the file add the line: /sbin/modprobe nvidia Add a carriage return as well if necessary to insure that there is a blank line at the bottom of the file. Click on the "save" icon and exit gedit. Close the terminal. * Click "Actions" > "Log Out" > "Restart the computer" and click "ok". When Fedora reboots it will try to load the nVidia driver (which has been downloaded but not yet installed). You will see the command line login prompt 3 or 4 times as it continues to try to load the driver and then you will see a text mode screen with the message "...cannot start the x server...". Answer "no" (right arrow and enter) to the question "would you like to view the x server output?". Answer "no" to the question "would you like me to run the x configuration program?". Answer "ok" to "...disable the x server for now...". You will then be presented with a text mode command line login prompt. Log in as root (type "root", hit enter, type your root password, hit enter), type "ls" and hit enter. You should see the nVidia driver file that you downloaded previously. Type: sh *.run Hit enter. You will be presented with a text mode nVidia screen. Left arrow to "accept" and hit enter. Answer "yes" to "download...". Answer "ok" to "no matching kernel...". nVidia will build and install a kernel module for the nVidia driver. When the "...complete" screen appears hit enter on "ok", then type "reboot" and hit enter. You should see the nVidia splash screen when Fedora reboots indicating that the installation was successful. * Now if you wish to get rhgb (Red Hat Graphical Boot) working again open a terminal and type: su - Hit enter, type your root password and hit enter. Type: cp -a /dev/nvidia* /etc/udev/devices Type "y" and hit enter twice. Type: chown root.root /etc/udev/devices/nvidia* Hit enter. Type: gedit /etc/rc.local Remove the "/sbin/modprobe nvidia" line from rc.local, click on the "save" icon, and exit gedit. Type: gedit /boot/grub/grub.conf Add "rhgb quiet" back into the kernel line in grub.conf, click on the "save" icon, and exit gedit. Reboot. (If you upgrade your kernel be sure to remove "rhgb quiet" from grub.conf before you reboot into the new kernel. Then you can re-install the nVidia driver per these instructions again for the new kernel.) From: http://stanton-finley.net/fedora_core_3_installation_notes.html
    21 April

    Linspire

    The World's Easiest Desktop Linux...

    http://www.linspire.com/

    15 April

    MythTV

    Convert your computer into a fully functional TIVO. You can pause, fast forward and rewind live television.

    http://www.mythtv.org/

    14 April

    MaxQ testing tool

    A nice web testing tool to repeat testing automatically

    http://maxq.tigris.org/

    Pringao Howto / The Tech-slacky Howto

    Very funny Howto about the world of computers and how by installing windows to a friend, you become a slave for life.

    Version in English: http://pinsa.escomposlinux.org/sromero/linux/pringao/techslacky.html

    Version in Spanish: http://pinsa.escomposlinux.org/sromero/linux/pringao/Pringao_Howto.html

    Debian net installer

    You can install the last version of Debian directly Internet... very nice

    http://www.debian.org/CD/netinst/

    Fedora

    Fedora Core 3 - very easy to install and use...

    http://fedora.redhat.com/

    13 April

    NAnt

    NAnt is a free .NET build tool. In theory it is kind of like make without make's wrinkles. In practice it's a lot like Ant.

    http://nant.sourceforge.net/

    7Zip

    Supports  7z, ZIP, CAB, RAR, ARJ, GZIP, BZIP2, Z, TAR, CPIO, RPM and DEB to extract...

    http://www.7-zip.org/