Daily Archives

Articles indexed Sunday April 4 2010

Page 8/76 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • Changing One Tag Name in an XML File Using XSLT

    - by AlbertoPL
    Is it possible for me to have a conditional in XSLT such that I find and replace only the FIRST tag of a particular tag name? For example, I have an XML file with many tags. I would like to replace the first of these tags with . The rest should be left alone. How would I do this in my transform? What I currently have is this: <xsl:template match="title"> <PageTitle> <xsl:apply-templates /> </PageTitle> </xsl:template> which finds all tags and replaces them with PageTitle. Any help would be greatly appreciated!

    Read the article

  • Chrome extensions: Content script (jQuery) in Youtube does not work properly

    - by Fabian
    I have this: $(document).ready(function() { $("button.yt-uix-expander-arrow").attr("id", "yt-uix-expander-arrow"); $("#yt-uix-expander-arrow").mouseover(function() { alert("Hello"); }); }); injected into Youtube. Using right click inspect element, the <button class="yt-uix-expander-arrow"> has a id="yt-uix-expander-arrow" attribute successfully added to it. However the mouseover event does not trigger. However if I were to change $("#yt-uix-expander-arrow").mouseover() to $(".yt-uix-expander-arrow").mouseover() it works. That's very unusual, because the #yt-uix-expander-arrow id has already been added to the button element. I tested it out on Facebook, adding a id to a class and doing a mouseover() event on the ID and it works. Any idea?

    Read the article

  • Http Modules are called on every request when using mvc/routing module

    - by MartinF
    I am developing a http module that hooks into the FormsAuthentication Module through the Authenticate event. While debugging i noticed that the module (and all other modules registered) gets hit every single time the client requests a resource (also when it requests images, stylesheets, javascript files (etc.)). This happens both when running on a IIS 7 server in integrated pipeline mode, and debugging through the webdev server (in non- integrated pipeline mode) As i am developing a website with a lot images which usually wont be cached by the client browser it will hit the modules a lot of unnessecary times. I am using MVC and its routing mechanishm (System.Web.Routing.UrlRoutingModule). When creating a new website the runAllManagedModulesForAllRequests attribute for the IIS 7 (system.webServer) section is per default set to true in the web.config, which as the name indicates make it call all modules for every single request. If i set the runAllManagedModulesForAllRequests attribute to false, no modules will get called. It seems that the reason for this is because of the routing module or mvc (dont know excactly why), which causes that the asp.net (aspx) handler never gets called and therefore the events and the modules never gets called (one time only like supposed). I tested this by trying to call "mydomain.com/Default.aspx" instead of just "mydomain.com/" and correctly it calls the modules only once like it is supposed. How do i fix this so it only calls the modules once when the page is requested and not also when all other resources are requested ? Is there some way i can register that all requests should fire the asp.net (aspx) handler, except requests for specific filetype extensions ? Of course that wont fix the problem if i choose to go with urls like /content/images/myimage123 for the images (without the extension). But i cant think of any other way to fix it. Is there a better way to solve this problem ? I have tried to set up an ignoreRoute like this routes.IgnoreRoute("content/{*pathInfo}"); where the content folder contains all the images, javascripts and stylesheets in seperat subfolders, but it doesnt seem to change anything. I can see there a many different possibilites when setting up a handler but I cant seem to figure out how it should be possible to setup one that will make it possible to use the routing module and have urls like /blog/post123 and not call the modules when requesting images, javascripts and stylesheets (etc.). Hope anyone out there can help me ? Martin

    Read the article

  • NetBackup prefers "Scratch" tapes over dedicated tapes

    - by wfaulk
    I have a NetBackup 6.0MP7 installation running on Windows Server 2003. It functions as the only Master Server and Media Server. I swap a full set of tapes in and out every week, but leave a set of tapes with their Volume Pool set to "Scratch" in all the time. The weekly tape sets then get rotated back in after a period of time. Largely, this works fine. I seldom actually need the scratch tapes, but every once in a while, a backup will run over what I have dedicated to the task. However, one week's set of tapes consistently gets declined in favor of the scratch pool. The backup policies are the same for every week, they all have "Policy Volume Pool" set to "NetBackup", and all of the tapes for every week (beside the scratch tapes) have had their pools assigned as "NetBackup", definitely including the week that always gets ignored. That said, it doesn't ignore all of the NetBackup pool tapes for that week. It does usually write to two or three of them, but it writes to like 20 of the scratch tapes. (I haven't thought to look to see if it's always the same two or three tapes.) And this problem never seems to occur for any other week. It doesn't load the tapes and then reject them; it never seems to try to use them at all. They are not flagged as frozen. They are all active and unassigned when I swap them in. The tapes are in a Quantum PX510 tape library. The NetBackup server is attached to the library/robot via fibrechannel going through an HP-branded Brocade switch. I'm not an expert on NetBackup at all. I don't really even know where to look. Any advice on logs to look at or logging to enable or really anything at all would be appreciated. I'll keep an eye on the question and update it if anyone needs any more info to help.

    Read the article

  • DHCP and DNS on none AD 2003 Server PTR is updating but no A records

    - by user29819
    I have a strange issue, I have a DHCP and DNS server running in a non AD environment, on Windows 2003 server. I setup DHCP to update DNS A and PTR records even if the client doesnt request it, but I only see PTR records updated, the A records are not created at all. The domain is "local" forward zone is called "local" and in the option 15 set to "local" (actual name) the PTR records are created with the right name (example: win64_ent.local), What am I missing here ?

    Read the article

  • Why is windows 7 marking all my extra RAM as "hardware reserved"?

    - by pinkmuppet
    I have a new HP Z800 Workstation, running Windows 7 Enterprise 64 bit. The machine has 4GB of RAM -- windows reported 1.99GB available, 2GB was "hardware reserved". I added another 2 GB and windows reports that there is 6GB of physical RAM, but now 4GB is "hardware reserved". The BIOS sees the full RAM amount as well. The video card is an nVida Quadro FX 580, so it shouldn't be using any shared memory at all. whats going on? Z800 Specs are here.

    Read the article

  • Will the following code be Garbage Collected before the class "dies"?

    - by devoured elysium
    Let's say we have the following code in a class: //class code TextBox t = new TextBox(); ListBox l = new ListBox(); We have then two possible situations: In the first, we declare qem1 as a class variable(or attribute, as they call it in the Java World): //class variable QuickEntryMediator qem1 = new QuickEntryMediator(t,l); In the second, we declare it inside a method: //method variable QuickEntryMediator qem2 = new QuickEntryMediator(t,l); So, I'd say qem1 would never be Garbage Collected before the class goes out of scope while in the qem2 might be Garbage Collected at any time after the method in which it resides dies. Is this true? I am looking for answers for both C#(.net) and Java, as am I am not sure both GC's work in the same fashion! Thanks

    Read the article

  • Obj-C combining strings

    - by Brodie4598
    this must be such a simple problem but can someone tell me why this doesnt work: visibilityString1 = @"the"; visibilityString2 = @"end"; visibilityString = (@"This is %@ %@", visibilityString1, visibilityString2); Every time I try to combine strings this way, it will only return the second string so what I get is: end

    Read the article

  • How do I set an Array in one class with another array in another class in Objective-C

    - by Stef
    Hi Guys, I've populated and array with data like this in one class... PowerClass .h NSMutableArray pickerArray; @property (nonatomic, retain) NSMutableArray pickerArray; - PowerClass .m @synthesize pickerArray; @implementation NSMutableArray *array = [[NSArray alloc] initWithObjects:@"stef", @"steve", @"baddamans", @"jonny", nil]; pickerArray = [NSMutableArray arrayWithArray:array]; And I'm trying to set the Array in another class WeekClass .h PowerClass *powerClass; NSMutableArray *pickerData; @property (nonatomic, retain) NSMutableArray pickerData; @property (nonatomic, retain) PowerClass *powerClass; WeekClass .m @implementation pickerData = [NSMutableArray arrayWithArray:powerClass.pickerArray]; I have no errors or warnings. It just crashes. The NSLog says that the powerClass.PickerArray is Null... I don't know why this is... Please help point me in the right direction... Thanx guys Stef :-)

    Read the article

  • Entrepreneur Needs Programmers, Architects, or Engineers?

    - by brand-newbie
    Hi guys (Ladies included). I posted on a related site, but THIS is the place to be. I want to build a specialized website. I am an entrepreneur and refining valuations now for venture capitalsists: i.e., determining how much cash I will need. I need help in understanding what human resources I need (i.e., Software Programmers, Architects, Engineers, etc.)??? Trust me, I have read most--if not all--of the threads here on the subject, and I can tell you I am no closer to the answer than ever. Here's my technology problem: The website will include (2) main components: a search engine (web crawler)...and a very large database. The search engine will not be a competitor to google, obviously; however, it "will" require bots to scour the web. The website will be, basically, a statistical database....where users should be able to pull up any statistic from "numerous" fields. Like any entrepreneur with a web-based vision, I'm "hoping" to get 100+ million registered users eventually. However, practically, we will start as small as feasible. As regards the technology (database architecture, servers, etc.), I do want quality, quality, quality. My priorities are speed, and the capaility to be scalable...so that if I "did" get globally large, we could do it without having to re-engineer anything. In other words, I want the back-end and the "infrastructure" to be scalable and professional....with emphasis on quality. I am not an IT professional. Although I've built several Joomla-based websites, I'm just a rookie who's only used minor javascript coding to modify a few plug-ins and components. The business I'm trying to create requires specialization and experts. I want to define the problem and let a capable team create the final product, and I will stay totally hands off. So who do you guys suggest I hire to run this thing? A software engineer? I was thinking I would need a "database engineer," a "systems security engineer", and maybe 2 or 3 "programmers" for the search engine. Also a web designer...and maybe a part-time graphic designer...everyone working under a single software engineer. What do you guys think? Who should I hire?...I REALLY need help from some people in the industry (YOU guys) on this. Is this project do-able in 6 months? If so, how many people will I need? Who exactly needs to head up this thing?...Senior software engineer, an embedded engineer, a CC++ engineer, a java engineer, a database engineer? And do I build this thing is Ruby or Java?

    Read the article

  • Question about "Link Map" output and "Assume" directive of MASM assembler.

    - by smwikipedia
    I am new to MASM. So the questions may be quite basic. When I am using the MASM assembler, there's an output file called "Link Map". Its content is composed of the starting offset and length of various segments, such as Data segment, Code segment and Stack segment. I am wondering that, where are these information describing? Are they talking about how various segments are located within an EXE file or, how segments are located within memory after the EXE file being loaded into memory by a program loader? BTW: What does the "Assume" directive do? My understanding is that it tell the assembler to emit some information into the exe file header so the program loader could use it to set DS, CS, SS, ES register accordingly. Am I right on this? Thanks in advance.

    Read the article

  • Connect to a network via Command Linke

    - by justasking
    Hi guys, I want to be able to connect to a network via command line in Windows. My goal is to script out remoting into my work computer. I hate having to always manually connect to the VPN connection and then rdping into my work machine. I want to just have a script which will do both of it for me. I know how to rdp via command line, I just need to know how to connect to my VPN via command line. Thanks!

    Read the article

  • A Linker Resolution Problem in a C++ Program

    - by Vlad
    We have two source files, a.cpp and b.cpp and a header file named constructions.h. We define a simple C++ class with the same name (class M, for instance) in each source file, respectively. The file a.cpp looks like this: #include "iostream" #include "constructions.h" class M { int i; public: M(): i( -1 ) { cout << "M() from a.cpp" << endl; } M( int a ) : i( a ) { cout << "M(int) from a.cpp, i: " << i << endl; } M( const M& b ) { i = b.i; cout << "M(M&) from a.cpp, i: " << i << endl; } M& operator = ( M& b ) { i = b.i; cout << "M::operator =(), i: " << i << endl; return *this; } virtual ~M(){ cout << "M::~M() from a.cpp" << endl; } operator int() { cout << "M::operator int() from a.cpp" << endl; return i; } }; void test1() { cout << endl << "Example 1" << endl; M b1; cout << "b1: " << b1 << endl; cout << endl << "Example 2" << endl; M b2 = 5; cout << "b2: " << b2 << endl; cout << endl << "Example 3" << endl; M b3(6); cout << "b3: " << b3 << endl; cout << endl << "Example 4" << endl; M b4 = b1; cout << "b4: " << b4 << endl; cout << endl << "Example 5" << endl; M b5; b5 = b2; cout << "b5: " << b5 << endl; } int main(int argc, char* argv[]) { test1(); test2(); cin.get(); return 0; } The file b.cpp looks like this: #include "iostream" #include "constructions.h" class M { public: M() { cout << "M() from b.cpp" << endl; } ~M() { cout << "M::~M() from b.cpp" << endl; } }; void test2() { M m; } Finally, the file constructions.h contains only the declaration of the function "test2()" (which is defined in "b.cpp"), so that it can be used in "a.cpp": using namespace std; void test2(); We compiled and linked these three files using either VS2005 or the GNU 4.1.0 compiler and the 2.16.91 ld linker under Suse. The results are surprising and different between the two build environments. But in both cases it looks like the linker gets confused about which definition of the class M it should use. If we comment out the definition of test2() from b.cpp and its invocation from a.cpp, then all the C++ objects created in test1() are of the type M defined in a.cpp and the program executes normally under Windows and Suse. Here is the run output under Windows: Example 1 M() from a.cpp M::operator int() from a.cpp b1: -1 Example 2 M(int) from a.cpp, i: 5 M::operator int() from a.cpp b2: 5 Example 3 M(int) from a.cpp, i: 6 M::operator int() from a.cpp b3: 6 Example 4 M(M&) from a.cpp, i: -1 M::operator int() from a.cpp b4: -1 Example 5 M() from a.cpp M::operator =(), i: 5 M::operator int() from a.cpp b5: 5 M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp If we enable the definition of test2() in "b.cpp" but comment out its invocation from main(), then the results are different. Under Suse, the C++ objects created in test1() are still of the type M defined in a.cpp and the program still seems to execute normally. The VS2005 versions behave differently in Debug or Release mode: in Debug mode, the program still seems to execute normally, but in Release mode, b1 and b5 are of the type M defined in b.cpp (as the constructor invocation proves), although the other member functions called (including the destructor), belong to M defined in a.cpp. Here is the run output for the executable built in Release mode: Example 1 M() from b.cpp M::operator int() from a.cpp b1: 4206872 Example 2 M(int) from a.cpp, i: 5 M::operator int() from a.cpp b2: 5 Example 3 M(int) from a.cpp, i: 6 M::operator int() from a.cpp b3: 6 Example 4 M(M&) from a.cpp, i: 4206872 M::operator int() from a.cpp b4: 4206872 Example 5 M() from b.cpp M::operator =(), i: 5 M::operator int() from a.cpp b5: 5 M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp Finally, if we allow the call to test2() from main, the program misbehaves in all circumstances (that is under Suse and under Windows in both Debug and Release modes). The Windows-Debug version finds a memory corruption around the variable m, defined in test2(). Here is the Windows output in Release mode (test2() seems to have created an instance of M defined in b.cpp): Example 1 M() from b.cpp M::operator int() from a.cpp b1: 4206872 Example 2 M(int) from a.cpp, i: 5 M::operator int() from a.cpp b2: 5 Example 3 M(int) from a.cpp, i: 6 M::operator int() from a.cpp b3: 6 Example 4 M(M&) from a.cpp, i: 4206872 M::operator int() from a.cpp b4: 4206872 Example 5 M() from b.cpp M::operator =(), i: 5 M::operator int() from a.cpp b5: 5 M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp M() from b.cpp M::~M() from b.cpp And here is the Suse output. The objects created in test1() are of the type M defined in a.cpp but the object created in test2() is also of the type M defined in a.cpp, unlike the object created under Windows which is of the type M defined in b.cpp. The program crashed in the end: Example 1 M() from a.cpp M::operator int() from a.cpp b1: -1 Example 2 M(int) from a.cpp, i: 5 M::operator int() from a.cpp b2: 5 Example 3 M(int) from a.cpp, i: 6 M::operator int() from a.cpp b3: 6 Example 4 M(M&) from a.cpp, i: -1 M::operator int() from a.cpp b4: -1 Example 5 M() from a.cpp M::operator =(), i: 5 M::operator int() from a.cpp b5: 5 M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp M::~M() from a.cpp M() from a.cpp M::~M() from a.cpp Segmentation fault (core dumped) I couldn't make the angle brackets appear using Markdown, so I used quotes around the header file name iostream. Otherwise, the code could be copied verbatim and tried. It is purely scholastic. The statement cin.get() at the end of main() was included just to facilitate running the program directly from VS2005 (cause it to display the output window until we could analyze the output). We are looking for a software engineer in Sunnyvale, CA and may offer that position to the programmer capable of providing an intelligent and comprehensive explanation of these anomalies. I can be contacted at [email protected].

    Read the article

  • ASP.net MVC - Check status request

    - by vdhant
    Hi guys Just wondering if its possible to get the status of a request from another request? To help provide some context, I want to use ajax to upload some files to the server. When the upload is started I want triggered another ajax request that checks to see how much of the file has been uploaded (or in other words how big was the other request and how far through receiving the request is the server). I was thinking that I could use a guid or something similar to ensure that I am checking the status of the right request. But how do I check the status of another request??? Cheers Anthony

    Read the article

  • Any way in C++ to forward declare a function prototype?

    - by jsyjr
    I make regular use of forward class declarations and pointers to such classes. I now have a need to pass a function pointer through a number of layers. I would prefer to include the header that declares my function pointer's prototype only into the module that dereferences a function pointer rather than into each layer that simply passes along that pointer value. Is this possible?

    Read the article

  • How to preprocess a Django model field value before return?

    - by Satoru.Logic
    Hi, all. I have a Note model class like this: class Note(models.Model): author = models.ForeignKey(User, related_name='notes') content = NoteContentField(max_length=256) NoteContentField is a custom sub-class of CharField that override the to_python method in purpose of doing some twitter-text-conversion processing. class NoteContentField(models.CharField): __metaclass__ = models.SubfieldBase def to_python(self, value): value = super(NoteContentField, self).to_python(value) from ..utils import linkify return mark_safe(linkify(value)) However, this doesn't work. When I save a Note object like this: note = Note(author=request.use, content=form.cleaned_data['content']) The conversed value is saved into the database, which is not what I wanna see. Would you please tell me what's wrong with this? Thanks in advance.

    Read the article

  • Using Fancybox with Google Static Maps

    - by Levi Hackwith
    Setup I have multiple links on a page with the class location_link Each Links rel attribute is equal to a city state combo (i.e.,Omaha, NE) Once the page is loaded, a JavaScript function loops through all of the location_link items and binds a click event to them using jQuery. This click event fires a call to the Fancybox constructor that is supposed to show a Google Map of the location that link is associated with The Problem: Whenever I click on one of the "location links", I get the following error message: The requested content cannot be loaded. Please try again later. Code I've Already Written: function setUpLocationLinks() { locationLinks = $("a.location_link"); locationLinks.click( function() { var me = $(this); console.log(me.attr("href")); $.fancybox( { "showCloseButton" : true, "hideOnContentClick" : true, "titlePosition" : "inside", "title" : me.attr("rel"), "type" : "image" } ) return false; } ); } Research I've Already Done: The Google Static Map API no longer requires an API Key. The following is from the Google Static Maps API Page Note: The Google Static Maps API no longer requires a Maps API key! (Google Maps API Premier customers should instead sign their URLs using a new cryptographic key which will be sent to you. See the Premier documentation for more information.) The The Image URL I'm using does resolve and pulls back the data I need When I put the above mentioned URL into a standard <img> tag, the map shows up just fine. I'd like to pull this off without having to create some sort of dummy <img> tag that I'm constantly switching the src attribute out of. Hopefully, you'll find this information helpful. Please let me know if you have any other questions.

    Read the article

  • iphone tableview multilevel

    - by Anonymous
    Hi, I 'm a iphone programming newbie. I m trying to implement an app with multi-level tableviews. The idea is if someone selects something on the first screen say then a new view opens(tableview) car make> list of models Honda > Acura, S2000,accord ... My challenge is to show the list of models in a new tableview & secondly change the size of hte list depending on the car selected. I have programmed so that when i select 'Honda' a new tableview opens. How do i populate data for the second table?? Any suggestions on how to proceed? thanks

    Read the article

  • Vectors of Pointers, inheritance

    - by user308553
    Hi I am a C++ beginner just encountered a problem I don't know how to fix I have two class, this is the header file: class A { public: int i; A(int a); }; class B: public A { public: string str; B(int a, string b); }; then I want to create a vector in main which store either class A or class B vector<A*> vec; A objectOne(1); B objectTwo(2, "hi"); vec.push_back(&objectOne); vec.push_back(&objectTwo); cout << vec.at(1)->i; //this is fine cout << vec.at(1)->str; //ERROR here I am really confused, I checked sites and stuff but I just don't know how to fix it, please help thanks in advance

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >