Search Results

Search found 3147 results on 126 pages for 'drupal alter'.

Page 80/126 | < Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >

  • Require User to be Logged in to Download ZIP Files

    - by Jonathan Wood
    Is it possible to require the user be authenticated (logged in) when downloading ZIP files from my site? Note that I don't have direct control of IIS7. (I'm on a shared hosting account.) I can't simply alter the access for a particular directory because many directories are involved and most contain other files that can be accessed freely. I've Googled this a bit and found similar questions. But I've been unable to find this exact question.

    Read the article

  • Challenging yourself as a programmer?

    - by Kevin
    We used to be a Coldfusion development shop before hopping over to PHP in 2008, now we primarily develop custom Drupal websites. I enjoyed going from CF to PHP, but I feel like I am getting a bit stale. I have been looking at different things like Ruby, Python, Obj C (iPhone). The problem is, there just isn't enough time in the day. What would be a fun new thing to learn that would refresh me a bit and challenge myself to learn more?

    Read the article

  • Transaction within IF THEN ELSE doesn't commit

    - by boris callens
    In my TSQL script I have an IF THEN ELSE structure that checks if a column already exists. If not it creates the column and updates it. IF NOT EXISTS( SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'tableName' AND COLUMN_NAME = 'columnName')) BEGIN BEGIN TRANSACTION ALTER TABLE tableName ADD columnName int NULL COMMIT BEGIN TRANSACTION update tableName set columnName = [something] from [subquery] COMMIT END This doesn't work because the column doesn't exist after the commit. Why doesn't the COMMIT commit?

    Read the article

  • Drop all foreign keys in a table

    - by trnTash
    I had this script which worked in sql server 2005 -- t-sql scriptlet to drop all constraints on a table DECLARE @database nvarchar(50) DECLARE @table nvarchar(50) set @database = 'dotnetnuke' set @table = 'tabs' DECLARE @sql nvarchar(255) WHILE EXISTS(select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where constraint_catalog = @database and table_name = @table) BEGIN select @sql = 'ALTER TABLE ' + @table + ' DROP CONSTRAINT ' + CONSTRAINT_NAME from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where constraint_catalog = @database and table_name = @table exec sp_executesql @sql END It does not work in SQL Server 2008. How can I easily drop all foreign key constraints for a certain table? Does anyone have a better script?

    Read the article

  • Can I write a module/filter that gets fired before the web app get's run in Tomcat?

    - by Blankman
    Can I write a module/filter that gets put into the processing pipleline in Tomcat BEFORE the web application even gets run? Something that I could turn on/off for each web application that tomcat is handling. is this possible? So basically it would be a re-usable filter that hooks into the web pipeline that could alter the requests behavior or perform/modify the requests. One example would be to log all ip's, or redirect based on the url, block the request, etc.

    Read the article

  • execute stored procedure as another user premission

    - by StuffHappens
    Hello. I faced the following problem: there's a user who has to execute a stored porcedure (spTest). In spTest's body sp_trace_generateevent is called. sp_trace_generateevent requires alter trace permissions and I don't want user to have it. So I would like user to be able to execute spTest. How can I do that? Thank you for your help.

    Read the article

  • How can I hide these dots

    - by Patrick
    Hi, How can I hide the small dots nearby each picture in IE7 ? http://www.sanstitre.ch/drupal/portfolio?tid[0]=38 I've tried with text-decoration:none and list-style-type:none but it didn't work. Thanks.

    Read the article

  • Please help! Website isn't displaying correctly in IE7

    - by Castgame
    Hey All, I recently designed a site in Drupal and it is perfect in FireFox and Safari, but wont' display correctly in IE6 or IE7. The site might be NSFW, but it's just a Pickup Artist Website: http://bradp.com. Could someone point me in the right direction of what to fix? I'd be very grateful. Thanks, Nick

    Read the article

  • WPF textbox derived control override drag&drop OnPreviewDrop (C sharp)

    - by Petr Klus
    Hi, I have been working on my custom control derived from the TextBox and I have encountered a problem I can not solve right now. Brief description of the problem: my textbox contains plain text which contains tags which I want to keep consistent - so far I have overriden text selection so they can be selected only as a whole tag etc. Right now I have moved to processing of drag&drop. If any text is dropped on the textfield and it is dropped on the tag, I want the insertion to be moved before or after the tag. The actual problem is with setting of the e.Handled=true. If I set it to true, it almost works - the text is inserted via my routine, but it is not removed from the source. If I set it to false, after executing my method the original textbox's insertion method is run. Is there any way to alter event routing? Or am I approaching this wrong from the start? Code of my method: protected override void OnPreviewDragEnter(DragEventArgs e) { base.OnPreviewDragEnter(e); e.Handled = true; // let us draw our very own caret... } protected override void OnPreviewDrop(DragEventArgs e) { base.OnPreviewDrop(e); fieldsReady = false; int selStart = this.SelectionStart; int selLength = this.SelectionLength; string droppedData = (string)e.Data.GetData(DataFormats.StringFormat); // where to insert Point whereDropped = e.GetPosition(this); int droppedIndex = GetCharacterIndexFromPoint(whereDropped, true); if (droppedIndex == this.Text.Length - 1) { double c = GetRectFromCharacterIndex(droppedIndex).X; if (whereDropped.X > c) droppedIndex++; } // only if the source was us, do this: if (this.SelectionLength > 0) // this means that we are dragging from our textbox! { // was there any selection? if so, remove it! this.Text = this.Text.Substring(0, selStart) + this.Text.Substring(selStart + selLength); e.Handled = true; // 2DO!! alter the indices depending on the removed selection // insertion this.Text = this.Text.Substring(0, droppedIndex) + droppedData + this.Text.Substring(droppedIndex); } }

    Read the article

  • Is a primary key automatically an index?

    - by Lieven Cardoen
    If I run Profiler, then it suggests a lot of indexes like this one CREATE CLUSTERED INDEX [_dta_index_Users_c_9_292912115__K1] ON [dbo].[Users] ( [UserId] ASC )WITH (SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF) ON [PRIMARY] UserId is the primary key of the table Users. Is this index better than the one already in the table: ALTER TABLE [dbo].[Users] ADD CONSTRAINT [PK_Users] PRIMARY KEY NONCLUSTERED ( [UserId] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    Read the article

  • How can I set a default sort for tables in PHPMyAdmin (i.e. always "Primary key - Descending")

    - by jeremyclarke
    Even though its obnoxious in a lot of ways I use PHPMyAdmin all the time to debug database issues while writing PHP. By default it sorts tables by primary key ascending. 99% of the time I would rather have the newest data (my test data) shown at the top by default rather than the useless first few records ever saved. Is there a way to configure PHPMyAdmin to show the newest records by default? To alter similar behavior?

    Read the article

  • How can I change column length using HQL query?

    - by gmugmu
    I tried session.createSQLQuery("ALTER TABLE People MODIFY address VARCHAR(1000);").executeUpdate(); but this throws org.hibernate.exception.SQLGrammarException: could not execute native bulk manipulation query After a lot of googling, the recommendation is to use HQL instead of SQL query to do bulk updates. Not sure how to use HQL to accomplish this. There seems to be no decent HQL documentation for updating column length in a table. Thanks so much for the help.

    Read the article

  • Comments Parent-Child query with indentation

    - by poldoj
    I've been trying to retrieve comments to articles in a pretty common blog fashion way. Here's my sample code: -- ---------------------------- -- Sample Table structure for [dbo].[Comments] -- ---------------------------- CREATE TABLE [dbo].[Comments] ( [CommentID] int NOT NULL , [AddedDate] datetime NOT NULL , [AddedBy] nvarchar(256) NOT NULL , [ArticleID] int NOT NULL , [Body] nvarchar(4000) NOT NULL , [parentCommentID] int NULL ) GO -- ---------------------------- -- Sample Records of Comments -- ---------------------------- INSERT INTO [dbo].[Comments] ([CommentID], [AddedDate], [AddedBy], [ArticleID], [Body], [parentCommentID]) VALUES (N'1', N'2011-11-26 23:18:07.000', N'user', N'1', N'body', null); GO INSERT INTO [dbo].[Comments] ([CommentID], [AddedDate], [AddedBy], [ArticleID], [Body], [parentCommentID]) VALUES (N'2', N'2011-11-26 23:18:50.000', N'user', N'2', N'body', null); GO INSERT INTO [dbo].[Comments] ([CommentID], [AddedDate], [AddedBy], [ArticleID], [Body], [parentCommentID]) VALUES (N'3', N'2011-11-26 23:19:09.000', N'user', N'1', N'body', null); GO INSERT INTO [dbo].[Comments] ([CommentID], [AddedDate], [AddedBy], [ArticleID], [Body], [parentCommentID]) VALUES (N'4', N'2011-11-26 23:19:46.000', N'user', N'3', N'body', null); GO INSERT INTO [dbo].[Comments] ([CommentID], [AddedDate], [AddedBy], [ArticleID], [Body], [parentCommentID]) VALUES (N'5', N'2011-11-26 23:20:16.000', N'user', N'1', N'body', N'1'); GO INSERT INTO [dbo].[Comments] ([CommentID], [AddedDate], [AddedBy], [ArticleID], [Body], [parentCommentID]) VALUES (N'6', N'2011-11-26 23:20:42.000', N'user', N'1', N'body', N'1'); GO INSERT INTO [dbo].[Comments] ([CommentID], [AddedDate], [AddedBy], [ArticleID], [Body], [parentCommentID]) VALUES (N'7', N'2011-11-26 23:21:25.000', N'user', N'1', N'body', N'6'); GO -- ---------------------------- -- Indexes structure for table Comments -- ---------------------------- -- ---------------------------- -- Primary Key structure for table [dbo].[Comments] -- ---------------------------- ALTER TABLE [dbo].[Comments] ADD PRIMARY KEY ([CommentID]) GO -- ---------------------------- -- Foreign Key structure for table [dbo].[Comments] -- ---------------------------- ALTER TABLE [dbo].[Comments] ADD FOREIGN KEY ([parentCommentID]) REFERENCES [dbo]. [Comments] ([CommentID]) ON DELETE NO ACTION ON UPDATE NO ACTION GO I thought I could use a CTE query to do the job like this: WITH CommentsCTE(CommentID, AddedDate, AddedBy, ArticleID, Body, parentCommentID, lvl, sortcol) AS ( SELECT CommentID, AddedDate, AddedBy, ArticleID, Body, parentCommentID, 0, cast(CommentID as varbinary(max)) FROM Comments UNION ALL SELECT P.CommentID, P.AddedDate, P.AddedBy, P.ArticleID, P.Body, P.parentCommentID, PP.lvl+1, CAST(sortcol + CAST(P.CommentID AS BINARY(4)) AS VARBINARY(max)) FROM Comments AS P JOIN CommentsCTE AS PP ON P.parentCommentID = PP.CommentID ) SELECT REPLICATE('--', lvl) + right('>',lvl)+ AddedBy + ' :: ' + Body, CommentID, parentCommentID, lvl FROM CommentsCTE WHERE ArticleID = 1 order by sortcol go but the results have been very disappointing so far, and after days of tweaking I decided to ask for help. I was looking for a method to display hierarchical comments to articles like it happens in blogs. [edit] The problem with this query is that I get duplicates because I couldn't figure out how to properly select the ArticleID which I want comments from to display. I'm also looking for a method that sorts children entries by date within a same level. An example of what I'm trying to accomplish could be something like: (ArticleID[post retrieved]) ------------------------- ------------------------- (Comments[related to the article id above]) first comment[no parent] --[first child to first comment] --[second child to first comment] ----[first child to second child comment to first comment] --[third child to first comment] ----[first child to third child comment to first comment] ------[(recursive child): first child to first child to third child comment to first comment] ------[(recursive child): second child to first child to third child comment to first comment] second comment[no parent] third comment[no parent] --[first child to third comment] I kinda got myself lost in all this mess...I appreciate any help or simpler ways to get this working. Thanks

    Read the article

  • A file's web address is different from the local file structure

    - by allanb
    I'm not sure how best to describe this (as you can clearly tell from the title) so I'll give you an example: I have a multisite Drupal installation. Each of the sites' sitemap.xml files are located on the server at /sites/example.com/files though with a browser (and to search engines) it is accessible at example.com/sitemap.xml I was wondering how this was achieved? Is this called Virtual Directory? Thank you

    Read the article

  • Chrome: Flash Video Player doesn't work

    - by Patrick
    hi, could you explain me why my flash video player doesn't work in Chrome while it perfectly works in other browsers ? (Firefox and IE) This is the link: http://www.sanstitre.ch/drupal/portfolio?tid[0]=66 You'll see it flickering... thanks

    Read the article

  • Default tablespace for indexes in postgres

    - by tom
    Just wondering if its possible to set a default tablespace in postgres to keep indexes. Would like the databases to live on the default tablespace for postgres, however, would like to get the indexes on a different set of disks just to keep the i/o traffic separated. It does not appear to me that it can be done without going in and doing an ALTER index TABLESPACE command, and then the index is moved and will stay there, but the databases and indexes are part of a django app, so non-django intervention can cause some problems.

    Read the article

  • Looking for a simple CMS with WYSIWYG and image gallery

    - by abeger
    I'm building a new site that consists entirely of: 8-10 pages of static content that rarely changes (like once every few months or once every year) An image gallery Since I don't plan to be the primary maintainer of the site, I'd like to use a CMS with some security and a WYSIWYG editor so non-web-savvy people can tweak the site when necessary. I started out using Drupal, but started wondering if it was overkill. So, two questions: 1) is it overkill? 2) What CMS would you recommend for a project this simple?

    Read the article

  • How do I check the Database type in a Rails Migration?

    - by Shaun F
    I have the following migration and I want to be able to check if the current database related to the environment is a mysql database. If it's mysql then I want to execute the SQL that is specific to the database. How do I go about this? class AddUsersFb < ActiveRecord::Migration def self.up add_column :users, :fb_user_id, :integer add_column :users, :email_hash, :string #if mysql #execute("alter table users modify fb_user_id bigint") end def self.down remove_column :users, :fb_user_id remove_column :users, :email_hash end end

    Read the article

< Previous Page | 76 77 78 79 80 81 82 83 84 85 86 87  | Next Page >