Posts

Showing posts with the label disable

Solution Disable tooltip in Kubuntu 11 10

Image
Solution Disable tooltip in Kubuntu 11 10 Are you annoyed of tooltip. you can disable it following the given simple steps Right-clicking on an empty area of the task bar Select "Task Manager Settings" Disabling �show tooltips�  Select OK Thats it !!  now  it wont show any more.  download file now

SQL Disable Or Enable a Trigger

SQL Disable Or Enable a Trigger Triggers are enabled by default when they are created. Disabling a trigger does not drop it. The trigger still exists as an object in the current database. However, the trigger does not fire when any Transact-SQL statements on which it was programmed are executed. Triggers can be re-enabled by using ENABLE TRIGGER. DML triggers defined on tables can be also be disabled or enabled by using ALTER TABLE. Purpose of the following Trigger --------------------------------- --AVOIDE TO DROP TABLES FROM DATABASE USE Test_Manoj Go CREATE TRIGGER TRG_DB_SAFTY ON DATABASE FOR DROP_TABLE AS RAISERROR(DROP CANNOT POSSIBLE,PLEASE CONTACT ADMIN..,16,1) ROLLBACK ; After creation of trigger any point of time a trigger can be disable or enable by the user.For Disable a trigger(de-activate) DISABLE keyword is used as follows:- --Disable Trigger on Database USE Test_Manoj Go disable TRIGGER TRG_DB_SAFTY on database For Enable a trigger on Database,any other object we need E...

Speeding up Django tests Disable migrations during tests

Speeding up Django tests Disable migrations during tests Running all migrations before the testrun can take a lot of time. For some reason, they are very slow. Running 50 migrations could easily take more than 1 minute! Fourtunately, disabling migrations is very easy. Just add the following code to the tests settings file: # Disable migrations when running tests MIGRATION_MODULES = { app [ app . rfind ( '.' ) + 1 :]: 'your_app.migrations_not_used_in_tests' for app in INSTALLED_APPS } Some of our migrations add data to the database and tests expect this data to be there. To fix that problem we will need to overwrite test runner. Add to the settings file: TEST_RUNNER = 'your_app.test_runner.CustomDiscoverRunner' Then create test_runner.py in the project root with the following content: from django.test.runner import DiscoverRunner from myapp.management.commands._setup_functions import create_groups class CustomDiscoverRunner ( DiscoverRunner )...