How to drop all tables from a database with one SQL query?

Use the INFORMATION_SCHEMA.TABLES view to get the list of tables. Generate Drop scripts in the select statement and drop it using Dynamic SQL: Sys.Tables Version Note: If you have any foreign Keys defined between tables then first run the below query to disable all foreign keys present in your database. For more information, check here.

How to use iMonkey in an iOS app

iMonkey looks like an interesting way of embedding a JS runtime in an iOS app, but I can’t find any examples on how to actually run some JS code. I can build/link the lib, include the jsapi.h header (from the src directory), but it trips over various linker errors (‘undefined symbol for architecture…’) when I try … Read more

What does aspnet_regiis.exe do

From MSDN reference: When multiple versions of the .NET Framework are executing side-by-side on a single computer, the ASP.NET ISAPI version mapped to an ASP.NET application determines which version of the common language runtime (CLR) is used for the application. The ASP.NET IIS Registration Tool (Aspnet_regiis.exe) allows an administrator or installation program to easily update the … Read more

spring @sqlgroup with multiple datasource

From the Transaction management for @Sql section of the Spring Reference Manual: If the algorithms used by SqlScriptsTestExecutionListener to detect a DataSource and PlatformTransactionManager and infer the transaction semantics do not suit your needs, you may specify explicit names via the dataSource and transactionManager attributes of @SqlConfig. For example: Regards, Sam (author of the Spring TestContext Framework)

The Definitive C Book Guide and List[

This question attempts to collect a community-maintained list of quality books on the c programming language, targeted at various skill levels. C is a complex programming language that is difficult to pick up on-the-go by reading online tutorials. A comprehensive book is often the best way to learn the language, and finding a good book is the first step. … Read more

Categories C Tags

Android – setOnClickListener vs OnClickListener vs View.OnClickListener

The logic is simple. setOnClickListener belongs to step 2. You create the button You create an instance of OnClickListener* like it’s done in that example and override the onClick-method. You assign that OnClickListener to that button using btn.setOnClickListener(myOnClickListener); in your fragments/activities onCreate-method. When the user clicks the button, the onClick function of the assigned OnClickListener is called. *If you import android.view.View; you use View.OnClickListener. If you import android.view.View.*; or import android.view.View.OnClickListener; you use OnClickListener as far as … Read more