• Home
  • About
  • Resume

Posts tagged: cool

Plants vs. Zombies 2!

By , 12/10/2011 9:43 PM

Well, not really. But if you’re a fan of the original PvZ and just can’t wait for the sequel – check out this beauty:

“Mini Robot Wars” looks like a straight out clone of Plant vs. Zombies, but as clones go – this one is pretty good, give it a try!

VB for Android

By , 11/29/2011 3:23 PM

Found this gem today:

Basic 4 Android

It’s a Visual Basic IDE environment for developing Android apps. But unlike other similar solutions it does not require bloated runtime running on the device, Basic4Android easily compiles native APK app.

Don’t learn Java, utilize your existing Visual Basic skills instead. And the community of thousands of developers can be a huge help as well.

Also you’re in luck today. Download the trial, play around with it and if you like it - use discount code “bvqbet” to get 50% off any version! Here’s how:

  1. Visit purchase link: http://www.basic4ppc.com/android/purchase.html
  2. Select Plimus as your checkout option
  3. Enter coupon code bvqbet in the coupon code field
  4. Profit! You get a 50% discound off a regular price

Happy coding!

Restore bricked DROID 3 phone

By , 09/28/2011 9:24 PM

If you bricked your Motorola DROID 3 phone while rooting it, installing some custom ROM or doing other fun stuff – don’t despair, there’s light at the end of the tunnel.

(Disclaimer: I am not responsible for anything that happens to your phone. But then again, if you’re reading this, something already has happened to it).

  1. Download the Motorola Stock Image (SBF) v5.6.890 HERE
  2. Download Motorola Flashing Utility (RSDLite) v5.5 HERE
  3. Extract the contents of the SBF file to a folder on your computer
  4. Install RSDLite
  5. Boot your DROID 3 into bootloader by holding both Vol+Vol- at the same time when powering on the phone
  6. Select “AP Fastboot” from boot menu by pressing Vol- repeatedly and then press Vol+ to select it
  7. Open RSDLite and browse for the XML in the folder where you extracted the SBF file
  8. Connect the phone to PC via USB, and when RSDLite  says  ”Connected”, hit “Start
  9. Wait for the phone to finish flashing, and booting (it can reboot several times, let it be)

You’re done! Your phone is resurrected, feel free to root it, install custom ROMs and do other fun stuff again.

NOTE: You phone may require activation after the flash, just follow original Verizon activation steps (if you’re not prompted to activate your phone and still have no connection just dial *228 and follow the instructions).

CREDITS: Thanks chevycam94 for original SBF-ing instructions and files. As a matter of fact these instructions are pretty much exact copy of first 9 steps of his instruction on how to flash his custom ROM Steel Droid – check it out!

TSQL: Filling missing date range

By , 08/29/2011 4:47 PM

Let’s say you have a table with some dates and numeric values e.g.:

2011-08-19	16
2011-08-22	45
2011-08-24	62
2011-08-25	88
2011-08-27	17
2011-08-28	35
2011-09-01	10
2011-09-02	79
2011-09-03	70
2011-09-07	83

As you can see not all dates are in the sequential order, 24th comes after 22nd etc. But in many cases you need this data to be sequential, for example if this data feeds a chart you need to fill it with missing dates and 0 for a value. There is an easy way to achieve this. Continue reading 'TSQL: Filling missing date range'»

Server-side “PageIndexChanging” event in UltraWebGrid

By , 05/19/2011 4:08 PM

When Infragistics UltraWebGrid is not in LoadOnDemand mode, you need to rebind the grid to the data source in PageIndexChanged event for paging to work. What’s neat – before the rebind, grid is still on the old page, effectively giving you “BeforePageIndexChanged” or “PageIndexChanging” event in server-side code:

Protected Sub xuwgGrid_PageIndexChanged(sender As Object, e As UltraWebGrid.PageEventArgs) Handles xuwgGrid.PageIndexChanged

   'Page hasn't changed yet, collect data from the old page
   'Or cancel the rebind and remain on the old page

   'rebinding the grid to the datasource
    BindGrid()

   'New page is in effect

End Sub

Affecting page during WebDataGrid AJAX calls

By , 05/02/2011 5:18 PM

When Infragistics WebDataGrid perform AJAX operations such as sorting and paging – it sends grid data directly to page’s DOM. But it also allows you to send your own custom data via server-side GridResponse object and its client-side counterpart. This feature allows you to establish effective link between server and client to perform custom operations otherwise available only during full postback or partial postback via update panel. There’re multiple cases where this can be used, let’s take a look at 3 most common:

  • Updating a related control with server-side generated data
  • Running a server-side generated JavaScript
  • Handling server-side errors, for example Session timeout

Continue reading 'Affecting page during WebDataGrid AJAX calls'»

Improved Auto-size columns for Infragistics WebHierarchicalDataGrid

By , 02/15/2011 11:04 AM

In the previous post I described a method to automatically resize columns for Infragistics grid control. It works (most of the times) for flat WebDataGrid, but if you try same approach with WebHierarchicalDataGrid – it will fail for child bands.

Lets review what we’re trying to accomplish. A grid column should automatically resize to whichever is wider: either size of widest data in a column cell, or size of column header’s caption.

First is accomplished by not setting column width explicitly and by setting white-space attribute of cell’s style to nowrap. It can be done by either opening grid CSS class file located at ~/ig_res/[Your Style Name]/ig_dataGrid.css, locate tbody.igg_[Your Style Name]Item>tr>td class and add one more line at the end: white-space:nowrap. Here is an example with Office 2007 Style:

tbody.igg_Office2007BlueItem>tr>td
{
	background-color:White;
	border-right:solid 1px #D0D7E5;
	border-bottom:solid 1px #D0D7E5;
	padding:2px 5px 2px 5px;
	height: 18px;
	overflow: hidden;
	text-align:left;
	vertical-align:middle;
	white-space:nowrap;
}

Or (if you don’t want to touch original style) same can be achieved by *CssClass properties exposed by the grid.

Second (resizing column to header’s caption width, if it is wider then cells’ data) is a bit tricker. Continue reading 'Improved Auto-size columns for Infragistics WebHierarchicalDataGrid'»

TSQL: Remove duplicate records. Clean and Simple

By , 02/02/2011 5:20 PM

It’s a common scenario, your table has several records with identical values and you need to leave only one, deleting the rest. Here is a generic TSQL query (SQL Server 2005 and above) that does just that in a few lines:

WITH DUP_TABLE AS
   (SELECT ROW_NUMBER()
    OVER (PARTITION BY FIELD1, FIELD2 ORDER BY FIELD1, FIELD2) As ROW_NO
    FROM ORIGINAL_TABLE)
DELETE FROM DUP_TABLE WHERE ROW_NO > 1

Here ORIGINAL_TABLE is your table with duplicates. FIELD1 and FIELD2 are columns with duplicates value (feel free to add or remove columns to suit your needs). Internal query assigns a row number to each duplicate record and DELETE statements that uses that CTE deletes all the rows except the one with Row Number = 1

WebDataGrid: Custom drag and drop columns when Colum Moving behavior is enabled

By , 10/30/2010 9:16 AM

Infragistics Aikido WebDataGrid offers a nice built-in ColumnMoving behavior. When enabled – it allows user to drag columns to change their order:

WebDataGrid with ColumnMoving behavior enabled

But what if you want to keep this behavior and add your own custom column drag-and-drop? For example to create your own column grouping, since WebHierarchicalDataGrid doesn’t handle grouping well.

In this post I will describe a simple technique how to both keep behavior shown above and implement custom column drag-and-drop:

WebDataGrid with custom column drag-and-drop
Continue reading 'WebDataGrid: Custom drag and drop columns when Colum Moving behavior is enabled'»

Custom grouping in classic Infragistics UltraWebGrid

By , 08/24/2010 3:54 PM

Infragistics UltraWebGrid offers a nice grouping feature: when the grid is in OutlookGroupBy mode, you can group similar data with very little coding required, you can go from this view:
Before Grouping
to this:
After Grouping
by just dragging columns to designated area.

But what if you want to group by first letter of a name or a year of a date? New WebHierarchicalDataGrid control offers this functionality after 10.2 release of Infragistics NetAdvantage, but if you invested years of work in classic UltraWebGrid – it’s not easy to move to a brand new control cold turkey. There’re other methods that offer custom grouping for UltraWebGrid, but the ones I found were pretty convoluted (like create a hidden column, populate it with data to group by etc.) Here is a simpler approach. Continue reading 'Custom grouping in classic Infragistics UltraWebGrid'»

Panorama Theme by Themocracy

Switch to our mobile site