UITableView example for Swift

The example below is an adaptation and simplification of a longer post from We ❤ Swift. This is what it will look like: Create a New Project It can be just the usual Single View Application. Add the Code Replace the ViewController.swift code with the following: Read the in-code comments to see what is happening. The highlights are The … Read more

HTML Element Array, name=”something[]” or name=”something”?

PHP uses the square bracket syntax to convert form inputs into an array, so when you use name=”education[]” you will get an array when you do this: So for example: Will give you all entered values inside of the $_POST[‘education’] array. In JavaScript, it is more efficient to get the element by id… The id doesn’t have to match … Read more

OLE DB Provider for ODBC Drivers Error “80004005′

That error is nearly always caused by a bad connection string when an ADODB.connection object has its .open() method called. For example, take the following code: Note how the connection string includes a driver identifier, in this example that is SQL Server. Somewhere in your application you’ll have an adodb.connection.open() method being called with a connection string, you need to find … Read more

html tables: thead vs th

The <thead> tag is used to group the header content in an HTML table. The thead element should be used in conjunction with the tbody and tfoot elements. More : thead You use <thead> to encapsulate an entire row (or rows) to designate them as the Table Header. According to the spec, “This division enables user agents to support scrolling of table bodies independently of the … Read more

How to update Notification with RemoteViews?

Here’s a detail example for you to update the notification using RemoteViews: Layout for the Notification, i.e. res/layout/custom_notification_small.xml: Hope this example helps you a lot! NOTE: You can’t update the custom NotificationCompat on pre-Honeycomb, so I added an alternative way to update it on pre-Honeycomb, i.e. checking the API level first and use the deprecated Notification instead.