Search Results

Search found 4347 results on 174 pages for 'devils child'.

Page 119/174 | < Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >

  • How define several elements with same name, but different type in xsd:choice element?

    - by Nikolay Ponomarenko
    Is it possible in some way, to define an xsd scheme which could validate such xml: <item_list> <item ItemType="SimpleMessage" Caption="Simplest message"/> <item ItemType="ComplexMessage" SomeAttr="value"> <item_data>some text</item_data> </item> </item_list> Problem is that i havn't find any possibility to define smth like: <xsd:element name="Items"> <xsd:complexType> <xsd:choice> <xsd:element name="item" type="SimpleMessType"/> <xsd:element name="item" type="ComplexMessType"/> </xsd:choice> </xsd:complexType> </xsd:element> But i need to check, that SimpleMessage has no child elements or additional attrs :(

    Read the article

  • Handling messages for window from other process

    - by MK
    I'm developing a C# WPF application that reparents the main window of another application using a call to Win32 SetParent(). The handle to this out-of-process child window is wrapped by a class named FormHost which is derived from HwndHost. All is working well except for one thing: messages for the reparented window are not delivered to FormHost. MSDN documentation clearly states that the HwndHost window procedure WndProc() cannot be used with out-of-process windows. The alternative, MessageHook doesn't work either. I also tried calling AttachThreadInput() to combine the input processing of the two windows. No luck. Any suggestions?

    Read the article

  • How to organized page specific CSS link tags with spark view pages and application.spark

    - by dbr
    I'm currently using ASP.NET MVC 2 and the spark view engine. The main master page (application.spark) contains all of the CSS link tags that need to be present for all pages (global stuff). However, I have some content pages that have page specific CSS tags and currently I'm just sticking the link tag in the body as something like: <content name="MainContent"> <!-- page specific csss --> <link rel="stylesheet" href="/Content/css/page_specific.css" /> My problem is that when the page renders, this tag ends up in the which is not where it needs to be. Is there a solution for this? One idea I had was to check the controller in the Application.spark page and write out which page specific css file is required for that particular controller, however, that solution doesn't seem to scale well and I would imagine there is some way of creating the link in the child page and having it render where it's supposed to by the browser.

    Read the article

  • How can I pre-authorize authopen?

    - by Georg
    I'm using authopen inside one of my programs to modify files owned by root. As can be seen in the screenshot below authopen asks for a admin password. What I'd like to achieve is that the dialog shows my app's name and then passes the authorization to authopen. Code Launching authopen which returns an authorized file descriptor. int pipe[2]; socketpair(AF_UNIX, SOCK_STREAM, 0, pipe); if (fork() == 0) { // child // close parent's pipe close(pipe[0]); dup2(pipe[1], STDOUT_FILENO); const char *authopenPath = "/usr/libexec/authopen"; execl(authopenPath, authopenPath, "-stdoutpipe", [self.device.devicePath fileSystemRepresentation], NULL); NSLog(@"Fatal error, quitting."); exit(-1); } // parent // close childs's pipe close(pipe[1]); // get file descriptor through sockets I'd really like not to use AuthorizationExecuteWithPrivileges because then I'd have to get more rights than I want to.

    Read the article

  • Validate cyclic organization unit

    - by abmv
    I have a object Organization Unit and I have a self reference to it in the same object public class OrganizationUnit: IOrganizationUnit { private string fName; public string Name { get { return fName; } set { SetPropertyValue("Name", ref fName, (string) value); } } private OrganizationUnit fManagedBy; public IOrganizationUnit ManagedBy { get { return fManagedBy; } set { SetPropertyValue("ManagedBy", ref fManagedBy, (OrganizationUnit)value); } } } I need a method that will throw an exception if it finds a child organization unit in the third level is referencing a parent Organization unit, or to say cyclic parent organization. A is main B managed by A C

    Read the article

  • Ruby types of collections in ActiveRecord

    - by kmorris511
    If I have an object with a collection of child objects in ActiveRecord, i.e. class Foo < ActiveRecord::Base has_many :bars, ... end and I attempt to run Array's find method against that collection: foo_instance.bars.find { ... } I receive: ActiveRecord::RecordNotFound: Couldn't find Bar without an ID I assume this is because ActiveRecord has hijacked the find method for its own purposes. Now, I can use detect and everything is fine. However to satisfy my own curiousity, I attempted to use metaprogramming to explicitly steal the find method back for one run: unbound_method = [].method('find').unbind unbound_method.bind(foo_instance.bars).call { ... } and I receive this error: TypeError: bind argument must be an instance of Array so clearly Ruby doesn't think foo_instance.bars is an Array and yet: foo_instance.bars.instance_of?(Array) -> true Can anybody help me with an explanation of this and of a way to get around it with metaprogramming?

    Read the article

  • How to add class to selective <li> in a generated menu

    - by Vikram
    Hi I am looking for a solution to add a class to every list item <li> which has a child item with a class of <span class="separator"> and a different class to <li> with an anchor link. I use Joomla and the menu is being generated somewhat like this: <ul class="menu"> <li class="item1"><a href="<!-- link goes here -->"><span>Home</span></a></li> <li class="parent item59"><span class="separator"><span>Demo</span></span></li> <li class="item62"><a href="<!-- link goes here -->"><span>Article</span></a></li> <li id="current" class="parent active item27"><a href="<!-- link goes here -->"><span>CMS</span></a> <ul> <li class="item50"><a href="<!-- link goes here -->"><span>The News</span></a></li> <li class="item48"><a href="<!-- link goes here -->"><span>Web Links</span></a></li> <li class="item65"><span class="separator"><span /></span></li> <li class="item49"><a href="<!-- link goes here -->"><span>News Feeds</span></a></li> <li class="item66"><span class="separator"><span /></span></li> <li class="item67"><span class="separator"><span /></span></li> <li class="item68"><span class="separator"><span /></span></li> </ul> </li> <li class="item71"><span class="separator"><span>Help</span></span></li> </ul> What I want is to add class "anclink" or "seplink" to the <li> depending on their child item so that the final output looks like below. <ul class="menu"> <li class="item1 anclink"><a href="<!-- link goes here -->"><span>Home</span></a></li> <li class="parent item59 seplink"><span class="separator"><span>Demo</span></span></li> <li class="item62 anclink"><a href="<!-- link goes here -->"><span>Article</span></a></li> <li id="current" class="parent active item27" anclink><a href="<!-- link goes here -->"><span>CMS</span></a> <ul> <li class="item50 anclink"><a href="<!-- link goes here -->"><span>The News</span></a></li> <li class="item48 anclink"><a href="<!-- link goes here -->"><span>Web Links</span></a></li> <li class="item65 seplink"><span class="separator"><span /></span></li> <li class="item49 anclink"><a href="<!-- link goes here -->"><span>News Feeds</span></a></li> <li class="item66 seplink"><span class="separator"><span /></span></li> <li class="item67 seplink"><span class="separator"><span /></span></li> <li class="item68 seplink"><span class="separator"><span /></span></li> </ul> </li> <li class="item71 seplink"><span class="separator"><span>Help</span></span></li> </ul> How can I achieve this using PHP or even a jQuery solution will be fine. Kindly help.

    Read the article

  • What's the thought behind Children and Controls properties in WPF?

    - by Mathias Lykkegaard Lorenzen
    I don't know if this should go on Programmers, but I thought it was relevant here. Being a skilled WPF programmer myself, I often wonder what people were thinking when they designed WPF in terms of naming conventions. Why would you sometimes have a property called Children for accessing the children of the control, and then sometimes have an equivalent property, just called Controls instead? What were they thinking here? Another example is the Popup control. Instead of a Content property, it has a Child property. Why would you do that? To me that's just confusing. So I'm wondering if there's a logical reason for it, which would probably also help me understand what the properties are called next time I need to do some speed-programming. If there's no reason behind it, then all I can say is WAT.

    Read the article

  • XML::LibXML Line Ending (whitespace) Problem.

    - by Gilbeg
    HI, I am parsing an XML file using LibXML in Perl. The problem that I have is the ending characters (whitespace) is treated as a text node. For instance, given an input like the following abc 123 The parser thinks that the number of child of node "books" is 3, they are: - text node (containing the char between and - element node of "book" - text node (containing the char between and Question is how do I tell LibXML to ignore whitespaces? I tried with no_blanks (that is $parser = XML::LibXML-new(no_blanks = 1) when construction the parser) but it seems that it has no effect. Thanks in advance

    Read the article

  • Should we seal Singletons? Should we try to inherit from Singletons in the first place?

    - by devoured elysium
    Should a Singleton class be allowed to have children? Should we seal it? What are the pro's and con's? For being able to inherit from a Singleton class, we would have to make the constructor protected instead of private. Now, that will be fine in c#, but the protected word in java gives both child-classes and package-classes access to the constructor. Which means not only classes that inherit from our Singleton can access the constructor but other classes in the same package can do it. I'm a bit confused about all this facts. Maybe I am making a big fuss about nothing to worry about too much? Until now, I never had any necessity of trying to inherit from a Singleton, so maybe this is just an academic question! Thanks

    Read the article

  • 640 enterprise library caching threads - how?

    - by JohnW
    We have an application that is undergoing performance testing. Today, I decided to take a dump of w3wp & load it in windbg to see what is going on underneath the covers. Imagine my surprise when I ran !threads and saw that there are 640 background threads, almost all of which seem to say the following: OS Thread Id: 0x1c38 (651) Child-SP RetAddr Call Site 0000000023a9d290 000007ff002320e2 Microsoft.Practices.EnterpriseLibrary.Caching.ProducerConsumerQueue.WaitUntilInterrupted() 0000000023a9d2d0 000007ff00231f7e Microsoft.Practices.EnterpriseLibrary.Caching.ProducerConsumerQueue.Dequeue() 0000000023a9d330 000007fef727c978 Microsoft.Practices.EnterpriseLibrary.Caching.BackgroundScheduler.QueueReader() 0000000023a9d380 000007fef9001552 System.Threading.ExecutionContext.runTryCode(System.Object) 0000000023a9dc30 000007fef72f95fd System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) 0000000023a9dc80 000007fef9001552 System.Threading.ThreadHelper.ThreadStart() If i had to give a guess, I'm thinkign that one of these threads are getting spawned for each run of our app - we have 2 app servers, 20 concurrent users, and ran the test approximately 30 times...it's in the neighborhood. Is this 'expected behavior', or perhaps have we implemented something improperly? The test ran hours ago, so i would have expected any timeouts to have occurred already.

    Read the article

  • Nesting Levels in Custom Section Handlers in .NET Configuration Files

    - by Water Cooler v2
    I know I can have 1 parent element and 1 child element in my own custom app.config section like so: <sectionGroup> <section> <element /> </section> </sectionGroup> My question is, can I have one or more levels of nesting more than this? Like so: <biggestSectionGroup> <biggerSectionGroup> <sectionGroup> <section> <element /> </section> </sectionGroup> </biggerSectionGroup> </biggestSectionGroup>

    Read the article

  • How can I run Octave under Emacs on Windows (Vista)?

    - by Arlie Capps
    Hello, I installed Emacs 23.1.1 and Octave 3.2.3 on my computer running Vista. To make Emacs find Octave, and to make Octave's prompt what Emacs expects, I added the following to the end of my .emacs file: (setq inferior-octave-program "C:/Octave/3.2.3_gcc-4.4.0/bin/octave-3.2.3.exe") (setq inferior-octave-startup-args (list "--eval" "PS1('octave:\# ');" "--persist")) When I do M-x run-octave, I get the "wait" cursor. I can see (using procexp) that Octave starts up as a child process to Emacs, but Emacs and Octave do not talk. Any insight would be much appreciated.

    Read the article

  • Strange behaviour of code inside TransactionScope?

    - by Krishna
    We are facing a very complex issue in our production application. We have a WCF method which creates a complex Entity in the database with all its relation. public void InsertEntity(Entity entity) { using(TransactionScope scope = new TransactionScope()) { EntityDao.Create(entity); } } EntityDao.Create(entity) method is very complex and has huge pieces of logic. During the entire process of creation it creates several child entities and also have several queries to database. During the entire WCF request of entity creation usually Connection is maintained in a ThreadStatic variable and reused by the DAOs. Although some of the queries in DAO described in step 2 uses a new connection and closes it after use. Overall we have seen that the above process behaviour is erratic. Some of the queries in the inner DAO does not even return actual data from the database? The same query when run to the actaul data store gives correct result. What can be possible reason of this behaviour?

    Read the article

  • Cocoa NSOutlineView bug - [NSCFTimer copyWithZone:]: unrecognized selector sent to instance

    - by Circle
    I'm using an NSOutlineView with the function - (BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem:(id)item defined so it gives the group row GUI look. When I add a root item, it works fine. When I add an item to root's child array and expand it, it works fine. If I contract the item though, the following error is logged: [NSCFTimer copyWithZone:]: unrecognized selector sent to instance I also get an EXC_BAD_ACCESS error if the app window is deactivated by switching to another app. I used the debugger to try to find where I might have made an error in one of my functions, but the stack trace only shows functions I did not create (RunCurrentEventLoopInMode, CFRunLoopRunSpecific, handleWindowNeedsDisplay, etc.) Does anyone have any idea where my error(s) might be?

    Read the article

  • 3D World to Local transformation

    - by Bill Kotsias
    Hello. I am having a real headache trying to set a node's local position to match a given world position. I was given a solution but, AFAICS, it only takes into account orientation and position but NOT scaling : node_new_local_position = node_parent.derivedOrientation().Inverse() * ( world_position_to_match - node_parent.derivedPosition() ); The node in question is a child of node_parent; node_parent local and derived properties (orientation, position and scaling) are known, as well as its full matrix transform. All the positions are 3d vectors; the orientation is a quaternion; the full transform is a 4x4 matrix. Could someone please help me to modify the solution to support scaling in the node hierarchy? Many thanks in advance, Bill

    Read the article

  • Get window handle from window class name

    - by Einar Egilsson
    I'm trying to get a window handle on a child window in my process and the only information I have is the window class name. Are there any win32 functions I can use for that? I'm doing this from C#. A bit more detail: This is a Visual Studio plugin, written in C#. So my process is visual studio, which has lots of windows. One of them has a window class "VsTipWindow". I don't know the immediate parent window of that window, all I have is the class name. Is there any way for me to get the window handle from just that?

    Read the article

  • Linq to SQL Error with Many-to-Many table

    - by Matt Connolly
    I am getting the following error with linq-to-sql when I try to access a many-to-many collection: Members 'Int32 XXX' and 'Int32 YYY' both marked as IsPrimaryKey and IsDbGenerated. The statement is true, in that both of those columns are primary key integers with identity insert. The table I am trying to access has a foreign key to both YYY and ZZZ, and then ZZZ has a foreign key to XXX. There doesn't appear to be anything wrong with my data structure. I tried setting "Child Property" to false on the ZZZ-YYY relationship, but it didn't change anything.

    Read the article

  • Why don't the .net 4.0 charting controls work in Visual Studio 2010?

    - by kc
    The .net charting controls are advertised as being built into .net 4.0. However, they do not work in Visual Studio 2010 Pro or Visual Web Developer 2010 Express. I get the error, System.Web.HttpException: Error executing child request for ChartImg.axd. That sounds like the message from .net 3.5 if charting wasn't set up correctly. But the bottom of the same page says, "Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1" Does anyone know why this doesn't work?

    Read the article

  • How to reinforce pseudo css rules

    - by danwoods
    Is there anyway to reinforce pseudo css rules? ie: I have a listing of divs (playlist) which I color with the following rules: #playlist .playlist_item { background: #d6d6d6; } #playlist .playlist_item:nth-child(odd) { background: #b3b3b3; } Now, when a song is playing, I use setInterval and JQuery's .animate function to pulse the background color. When the song is finished I clear the interval, but of course the song's background remains the last color set in the interval. Is there a way to re-set the song's color based on the CSS rule? Otherwise I'll have to keep track of the previous song (which may have changed position, and thus color) or setup distinct background color classes and reset the classes of all the songs in the playlist anytime someone adds, removes, or moves a song in the playlist or a song ends. I'd much rather use a CSS only approach. Thanks in advance, Dan

    Read the article

  • elegant way to make directory recursively in Python?

    - by user248237
    I would like to make a directory in a "recursive" way, i.e. have a function make_directory() that behaves as follows: make_directory("a/b/c/d/") should create directory a, then child b, then c, then d. If any of the parent directories exist it should not make them. E.g. if "a" exists, then b should be a subdir of that, and then c should be made inside b, etc. how can I do this in python? os.mkdir does not have this behavior.

    Read the article

  • offsetWidth or CSS expression problem for IE6

    - by Bipul
    I need to set the width of textboxes as 80% of it's parent. So first I used td input[type="text"] { width: 80%; } But it was not rendering properly if the input is the child of td. So, I used Css expressions td input[type="text"] { width: expression(this.parentNode.offsetWidth*0.8); } It is working as I wanted in every browser except IE 6. Can anybody help me, where I am going wrong? I know that expressions are allowed in IE 6. So, is it the problem of using css expression or something to do offsetWidth. Thanks in advance.

    Read the article

  • htaccess redirect to subfolder and mask the url?

    - by KiwiCoder
    Hello all, Two things: Firstly - I have version 2 of a website located in a folder named v2, and I want to redirect any traffic that is NOT a child of the v2 folder, to www.example.com/v2 The old site located in the root was created in iWeb and has a LOT of subfolders and sub-subfolders. So: www.example.com/v2 = New site www.example.com/Page.html www.example.com/category/Page.html ww.example.com/category/subcategory/Page.html = All generic examples of what I need to redirect. Secondly, and I don't know if this is possible, I want to hide /v2/ in the URL, so that visitors will just see www.example.com/page even though they are actually on www.example.com/v2/page Links are hardcoded to the v2 folder, like so <a href="v2/contact.html" Any help is MOST appreciated. I've spent hours trying to figure this out, but I'm only just learning about htaccess and regular expressions, and am totally confused. Thanks so much!

    Read the article

  • Add a thousands separator to a total with Javascript or jQuery?

    - by Matt
    I have a function that sums a column of data in an html table. It does so admirably only I would like to have it put the commas in there that are needed to separate the thousands. Initially, you'll note, there are commas in the numbers being added. So that the function will add them, they are removed. How do I add the commas back in there? <script type="text/javascript"> function sumOfColumns(tableID, columnIndex, hasHeader) { var tot = 0; $("#" + tableID + " tr" + (hasHeader ? ":gt(0)" : "")) .children("td:nth-child(" + columnIndex + ")") .each(function() { tot += parseInt($(this).html().replace(',', '')); }); return "Total Pounds Entered : " + tot; } </script>

    Read the article

  • Problem with HTML Parser in IE

    - by Luis Armando
    I am trying to create a dialog box that will appear only if the browser selected is IE (any version) however I get this error: Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917) That's all in "Line/Char/Code" 0 so I do not know where is the error. The code I'm using is this: <script type="text/javascript"> <!-- if(BrowserDetect.browser.contains("Explorer")) { var Nachricht = 'Hemos detectado que está utilizando ' + BrowserDetect.browser + ' ' + BrowserDetect.version + '. Puede que algunas funciones no estén habilitadas. <p></p> Si desea experimentar todo el potencial del portal, por favor intente desde otro navegador (browser). <p></p>Gracias showDialog('¡Aviso Importante!',Nachricht,'warning',10); } </script> I've noticed if I remove the "BrowserDetect.browser" and .version it removes the error, but I need those to check =/...any ideas will be appreciated =).

    Read the article

< Previous Page | 115 116 117 118 119 120 121 122 123 124 125 126  | Next Page >