Daily Archives

Articles indexed Monday March 29 2010

Page 22/123 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Sharepoint 2007 - cant find my modifications to web.config in SpWebApplication.WebConfigModification

    - by user303672
    Hi, I cant seem to find the modifications I made to web.config in my FeatureRecievers Activated event. I try to get the modifications from the SpWebApplication.WebConfigModifications collection in the deactivate event, but this is always empty.... And the strangest thing is that my changes are still reverted after deactivating the feature... My question is, should I not be able to view all changes made to the web.config files when accessing the SpWebApplication.WebConfigModifications collection in the Deactivating event? How should I go about to remove my changes explicitly? public class FeatureReciever : SPFeatureReceiver { private const string FEATURE_NAME = "HelloWorld"; private class Modification { public string Name; public string XPath; public string Value; public SPWebConfigModification.SPWebConfigModificationType ModificationType; public bool createOnly; public Modification(string name, string xPath, string value, SPWebConfigModification.SPWebConfigModificationType modificationType, bool createOnly) { Name = name; XPath = xPath; Value = value; ModificationType = modificationType; this.createOnly = createOnly; } } private Modification[] modifications = { new Modification("connectionStrings", "configuration", "<connectionStrings/>", SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode, true), new Modification("add[@name='ConnectionString'][@connectionString='Data Source=serverName;Initial Catalog=DBName;User Id=UserId;Password=Pass']", "configuration/connectionStrings", "<add name='ConnectionString' connectionString='Data Source=serverName;Initial Catalog=DBName;User Id=UserId;Password=Pass'/>", SPWebConfigModification.SPWebConfigModificationType.EnsureChildNode, false) }; public override void FeatureActivated(SPFeatureReceiverProperties properties) { SPSite siteCollection = (properties.Feature.Parent as SPWeb).Site as SPSite; SPWebApplication webApplication = siteCollection.WebApplication; siteCollection.RootWeb.Title = "Set from activating code at " + DateTime.Now.ToString(); foreach (Modification entry in modifications) { SPWebConfigModification webConfigModification = CreateModification(entry); webApplication.WebConfigModifications.Add(webConfigModification); } webApplication.Farm.Services.GetValue<SPWebService>().ApplyWebConfigModifications(); webApplication.WebService.Update(); } public override void FeatureDeactivating(SPFeatureReceiverProperties properties) { SPSite siteCollection = (properties.Feature.Parent as SPWeb).Site as SPSite; SPWebApplication webApplication = siteCollection.WebApplication; siteCollection.RootWeb.Title = "Set from deactivating code at " + DateTime.Now.ToString(); IList<SPWebConfigModification> modifications = webApplication.WebConfigModifications; foreach (SPWebConfigModification modification in modifications) { if (modification.Owner == FEATURE_NAME) { webApplication.WebConfigModifications.Remove(modification); } } webApplication.Farm.Services.GetValue<SPWebService>().ApplyWebConfigModifications(); webApplication.WebService.Update(); } public override void FeatureInstalled(SPFeatureReceiverProperties properties) { } public override void FeatureUninstalling(SPFeatureReceiverProperties properties) { } private SPWebConfigModification CreateModification(Modification entry) { SPWebConfigModification spWebConfigModification = new SPWebConfigModification() { Name = entry.Name, Path = entry.XPath, Owner = FEATURE_NAME, Sequence = 0, Type = entry.ModificationType, Value = entry.Value }; return spWebConfigModification; } } Thanks for your time. /Hans

    Read the article

  • Tools for Maintaining Branches in SVN

    - by Chris Conway
    My team uses SVN for source control. Recently, I've been working on a branch with occasional merges from the trunk and it's been a fairly annoying experience (cf. Joel Spolsky's "Subversion Story #1"), so I've been looking alternative ways to manage branches and merging. Given that a centralized SVN repository is non-negotiable, what I'd like is a set of tools that satisfy the following conditions. Complete revision history should be stored in SVN for both trunk and branches. Merging in either direction (and potentially criss-crossing) should be relatively painless. Merging history should be stored in SVN to the greatest extent possible. I've looked at both git-svn and bzr-svn and neither seems to be up to the job—basically, given the revision history they can export from the SVN repository, they can't seem to do any better a job handling merges than SVN can. For example, after cloning the repository with git, the revision history for my branch shows the original branch off of trunk, but git doesn't "see" any of the interim SVN merges as "native" merges—the revision history is one long line. As a result, any attempts to merge from trunk in git yield just as many conflicts as an SVN merge would. (Besides, the git-svn documentation explicitly warns against using git to merge between branches.) Is there a way to adjust my workflow to make git satisfy the above requirements? Maybe I just need tips or tricks (or a separate merging tool?) to help SVN be better at merging into branches?

    Read the article

  • Range partition skip check

    - by user289429
    We have large amount of data partitioned on year value using range partition in oracle. We have used range partition but each partition contains data only for one year. When we write a query targeting a specific year, oracle fetches the information from that partition but still checks if the year is what we have specified. Since this year column is not part of the index it fetches the year from table and compares it. We have seen that any time the query goes to fetch table data it is getting too slow. Can we somehow avoid oracle comparing the year values since we for sure know that the partition contains information for only one year.

    Read the article

  • Can anyone provide sample source code for xml parsing using photoshop javascript?

    - by panofish
    Here is a sample of a simple xml file I want to parse using photoshop javascript: <Pgen> <renderSettings> <imageWidth>1000</imageWidth> <imageHeight>600</imageHeight> <SAA>16</SAA> <bgColor>E1E1E1</bgColor> <filePrefix></filePrefix> <suffix>.jpg</suffix> </renderSettings> <coverPage> <template>//TEMPLATE/Product.psd</template> <title>2010 Mazda</title> <subtitle>Exterior</subtitle> <date>March 26, 2010</date> </coverPage> <images> <template>/TEMPLATE/Product2.psd</template> <image file="file1.png" title="2010 Mazda" subtitle="LS" note="" exclude="yes"/> <image file="file2.png" title="2010 Mazda" subtitle="1LT" note="Shows SS trim" exclude="no"/> <image file="file3.png" title="2010 Mazda" subtitle="2LT" note="" /> <image file="file4.png" title="2010 Mazda" subtitle="2LT" note="" /> </images> </Pgen> I've found the toolkit documentation, but it doesn't have much sample code and I can't find any sample code by searching google.

    Read the article

  • Good software to take a blog and format it for printing

    - by vaccano
    I have much of my family's doings on a Blogspot blog. I would like to print this out in a nice book. The actual printing I plan to just send to CostCo as Photo Prints. But I need some kind of software to reformat the posts into printable paper size sheets. I would like it if I could retain my blog's background and let me adjust how the pictures fit on the screen. Now I could do all of this with MS Publisher or Word. But I am curious if there is any other software out there that does this nice and easy. Anyone know of some cool software that will do this for me? Free is nice, but I am not above paying a modest fee for cool software. I would prefer to avoid another website that will charge for the printing as well as the converting.

    Read the article

  • Firefox Not responding - Windows 7

    - by Paul
    Have just upgraded from Vista to Win7 (32 bit). On vista Firefox worked great. I am using 3.5.6 version. 2GB RAM. In windows 7 however whenever i click on a link, field or tab within the browser or various other places within firefox 'Not Responding' flashes on the title bar. Most of the time i have to click 2 or 3 times to get any link or whatever to work which is very annoying. Any ideas? Can't find anything obvious on google but notice other people get Not Responding messages a lot with various apps. Chrome Plus seems to be fine.

    Read the article

  • Excel function advanced filter

    - by Adam
    I have a list of sales people and a list of their sale revenues in two separate columns. How do I use an advanced filter or other sorting means to find the max of the sale revenue column and then have the formula output be the corresponding sales person?

    Read the article

  • Get values of textareas generated dynamically

    - by Hulk
    In the below code,the textaraes are generated dynamically ,now how to get these values for validations in valid() function.. <script> function valid() { //get all textarea vales for validation } function add(col_det) { var row = '<tr>'; row += '<td>'; row += '<textarea rows = "8" cols = "8" class = "input" WRAP id="row_details'+r_count+'" name ="row_details'+r_count+'"></textarea>'; row += '</td>'; for (var i=0;i<col_det.length;i++) { row += '<td> <div id = "div_content_bold"> <textarea rows = "2" cols = "8" class = "input" id="c_details'+c_count+'" name="col_details'+l_count+'" WRAP ></textarea> </div> </td>'; } row += '<td></td>'; row += '</tr>'; return row; } $(document).ready(function() { var cnt = '<input type="text" name="title" id="title" ><br><br>'; cnt += '<table cellspacing="0" cellpadding="0" border="1" width="100%" id="l_table">'; cnt += '<tr>'; cnt += '<th width="30%">Category</th>'; cnt += headers(col_data); cnt += '<th width="10%">Grade obtained</th>'; cnt += '</tr>'; for(var i=0;i<criteria;i++) { cnt += add(col_data,i); } cnt += '</table>'; $('#content').append(cnt); }); </script> <form action="create/" method="post" name="aa"> <div id="content"></div> <table> <tr><td> <input type="submit" value="Save" id="Save" onclick="javascript:var ret=validate(row_c,c_count);return ret;"/></td></tr> Thanks....

    Read the article

  • TDD and management

    - by Pierreten
    My manager is starting to get pretty pissed off that I'm devoting time to designing tests (he sees testing as something you do after the software is written.). His do I convince him otherwise?

    Read the article

  • Simple way to create possible case

    - by bugbug
    I have lists of data such as a = [1,2,3,4] b = ["a","b","c","d","e"] c = ["001","002","003"] And I want to create new another list that was mixed from all possible case of a,b,c like this d = ["1a001","1a002","1a003",...,"4e003"] Is there any module or method to generate d without write many for loop?

    Read the article

  • Where is the node.js file in the stack trace located?

    - by user225189
    Obviously, I'm pretty new to node.js. I'm attempting to debug a node.js application and I see node.js in the stack trace. I would like to put some sys.puts calls in there, but I cannot locate the node.js that is being run by my server. Is there a way to tell where node.js is located? Is there an equivalent to Ruby's FILE in node? Thanks, Brian

    Read the article

  • jQuery eval of ajax inline script not throwing errors

    - by Josh
    http://stackoverflow.com/questions/606794/debugging-ajax-code-with-firebug This question is quite similar, though old and without real answers. I'm currently putting together an app that has scripts that get loaded in with an ajax request. An example: var main = _main.get(); main.load( someurl ); Where someurl is a page that contains an inline script element: <script type="text/javascript"> $(document).ready( function(){ var activities = new activities(); activities.init(); }); </script> jQuery will do a line by line eval of js that lives in inline script tags. The problem is, I get no errors or any information whatsoever in firebug when something goes awry. Does anyone have a good solution for this? Or a better practice for loading pages which contain javascript functionality? Edit: A little progress... so at the top of the page that is being loaded in via ajax, I have another script that was being included like this: <script type="text/javascript" src="javascript/pages/activities.js"></script> When I moved the inline $(document).ready() code in the page to the end of this included file, instead, syntax errors were now properly getting thrown. As an aside, I threw a console.log() into the inline script tag, and it was being logged just fine. I also tried removing the $(document).ready() altogether, and also switching it out for a $(window).load() event. No difference. May have something to do with the inline scripts dependency on the included activities.js, I guess. :: shakes head :: javascript can be a nightmare.

    Read the article

  • Standard way of distributing source code?

    - by penyuan
    I am relatively new to programming, and have built a few working C++ commandline programs with Xcode in Mac OS X (no dependencies on Mac-only libraries or APIs). My question is: What is the standard way of packaging and distributing the source code (and possibly compiled binaries)? i.e. Almost all Linux programs seemed to be distributed that a user simply needs to run ./configure && make && make install from the source directory. Thank you.

    Read the article

  • Java Google App Engine inconsistent data lose after restarting dev server

    - by user259349
    Hello everyone, I am using Java GAE. So far, i'm just scafolding my data objects and i'm seeing an interesting issue. The records that i am playing around with are getting updated properly as long as my dev server is running up. The second that the my dev server gets restarted, i lose all of my changes. That would be not alarming if i lost all of my records, but, there was a point of time where my data persisted through the server restart. I'm worried that i would lose production data if i launched without fixing this potential bugs? ANy idea on wher ei should look?

    Read the article

  • Modal dialog blocks wcf callback

    - by Bjarne
    I am working on an application that relies strongly on a wcf request/callback pattern. That is, it uses a service which exposes a number of methods, and for each method there is a callback on which the result is returned. In the client, I wish to open a modal dialog, make a request on the server and then wait for the result on the callback. But I never get a callback since the UI thread is blocked by the modal dialog. Has anyone worked with a similar pattern? I would hate to have more threads in the client, and I also don't like the idea of 'simulating' a modal dialog.

    Read the article

  • Executing codes in viewDidLoad

    - by iSharreth
    In my .m file : (void)viewDidLoad { [super viewDidLoad]; /* Some codes for picker view and slider */ } I used a button to navigate to second view by using the below code: (IBAction)goToPlay{ [self presentModalViewController: secondViewController animated: YES]; } I used another button to go back to first view by using below code: (IBAction)goBack{ [self dismissModalViewControllerAnimated:YES]; } Now the viewDidLoad method is not calling. I had written some codes in viewDidLoad in first view and I want to execute it when pressing goBack button in second view. What should I do? Anyone please help.

    Read the article

  • Android SDK and AVD manager will not run from Eclipse after upgrade to SDK 5 and ADT 0.9.6

    - by user303944
    Using Windows 7, 64 bit system. Prior to upgrade I was able to run "Android SDK and AVD manager" from Eclipse via a tool bar icon and menu option, both of which still exist. However now nothing happens when I try to run the manager. As a result I can't start an emulator from within Eclipse. When I use Eclipse to run an Android app, the first emulator I installed is automatically started. Using Windows Explorer, I can still run the manager from the SDK directory in which the update was applied (the update didn't change the location of the SDK). If I run the manager and start multiple emulators and then Run an app from Eclipse, it sees the emulators and allows me to choose one as before. This is a satisfactory work-around, but it would be nice if the manager were fully integrated into Eclipse as it was before.

    Read the article

  • ruby on rails one-to-many relationship

    - by fenec
    I would like to model a betting system relationship using the power of rails. so lets start with doing something very simple modelling the relationship from a user to a bet.i would like to have a model bet with 2 primary keys. here are my migrations enter code here class CreateBets < ActiveRecord::Migration def self.up create_table :bets do |t| t.integer :user_1_id t.integer :user_2_id t.integer :amount t.timestamps end end def self.down drop_table :bets end end class CreateUsers < ActiveRecord::Migration def self.up create_table :users do |t| t.string :name t.timestamps end end def self.down drop_table :users end end the models enter code here class Bet < ActiveRecord::Base belongs_to :user_1,:class_name=:User belongs_to :user_2,:class_name=:User end class User < ActiveRecord::Base has_many :bets, :foreign_key =:user_1) has_many :bets, :foreign_key =:user_2) end when i test here in the console my relationships I got an error enter code here u1=User.create :name="aa" = # u2=User.create :name="bb" = # b=Bet.create(:user_1=u1,:user_2=u2) *****error***** QUESTIONS: 1 How do I define the relationships between these tables correctly? 2 are there any conventions to name the attributes (ex:user_1_id...) thank you for your help

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >