Search Results

Search found 8286 results on 332 pages for 'defined'.

Page 183/332 | < Previous Page | 179 180 181 182 183 184 185 186 187 188 189 190  | Next Page >

  • Define keyref selector based on element type in XPath

    - by Robert Sirre
    Let's say I have an XML file that will look like this: <a> <b d="value1"/> <c d="value2"/> </a> In the XSD file that defines the structure of this XML file I defined the elements by name 'b' and 'c' to be of the same type (and the type requires attribute 'd'). Let's say that I want to make a keyReference of all elements of the type that both 'b' and 'c' are, is there any way in XPath to do this? At the definition of the type of 'a' I would expect something like this: <xs:keyref name="myReferenceName" refer="keyToReferTo"> <xs:selector xpath="[@type='typenameof elements b and c?']"/> <xs:field xpath="@d"/> </xs:keyref> Is something like this possible, or is XPath, even in the XSD, schema-unaware?

    Read the article

  • Using javascript with DITA

    - by team-ferrari22
    Hi All, How to use javascript with DITA ? •We can give 'javascript:URL' to the 'href' attribute of , and elements and it will execute it properly. ? ¦ e.g.Click here to get alert box •We tried to execute javascript user defined functions from href attribute but build fails. •We added .js files to .dita file resources and tried to refer a function from that file by href attribute.It is also not working. Before converting the DITA files into html using DITA toolkit,if we want to add JAVASCRIPT functionality which can be later used in html files, how it can be done? Please guide us. Regards.

    Read the article

  • HQL make query searching by date (Java+NetBeans)

    - by Zloy Smiertniy
    Hi all I have the following issue. I have a table of reserves in my MySQL DB, the date columns is defined DATETIME. I need to make a query using hibernate to find all reserves in one day no matter the hour, just that its the same year month and date, and I'm doing this public List<Reserve> bringAllResByDate(Date date){ em = emf.createEntityManager(); Query q = em.createQuery("SELECT r FROM Reserve r WHERE r.date=:date "); q.setParameter("date", date); ... I really dont know how to make it compare, and bring me just those from the specified date, any help??

    Read the article

  • how to use @ in python.. and the @property and the @classmethods

    - by zjm1126
    this is my code: def a(): print 'sss' @a() def b(): print 'aaa' b() and the Traceback is: sss Traceback (most recent call last): File "D:\zjm_code\a.py", line 8, in <module> @a() TypeError: 'NoneType' object is not callable so how to use the '@' thanks updated class a: @property def b(x): print 'sss' aa=a() print aa.b it print : sss None how to use @property thanks updated2 and the classmethods: class a: @classmethods def b(x): print 'sss' aa=a() print aa.b the Traceback is : Traceback (most recent call last): File "D:\zjm_code\a.py", line 5, in <module> class a: File "D:\zjm_code\a.py", line 6, in a @classmethods NameError: name 'classmethods' is not defined

    Read the article

  • Kohana v2 - problem with routes

    - by yoda
    Hi, I'm attempting to set some custom routes in Kohana v2. What I'm looking for is some method that allow the system to : follow a pre-defined name to it's related root; redirect the non-matched url's into another controller; To give you a more clear view over the problem, I want the first url parameter to be associated to certain pages (contacts, home, services, about us, etc), and those urls who doesn't match the previous pages would be routed into a controller called products, in order to determine if the first url parameter regards a product name. Here's a sample of what I have : $config['_default'] = 'home'; $config['([a-zA-Z]+)'] = 'products/showcat/$1'; What am I missing here? Thanks in advance!

    Read the article

  • Cycling tabs graphically

    - by abernier
    Mac OS X's window manager is composed of: Applications Windows Tabs By default on OS X, you can cycle over applications with the famous ?? shortcut. In addition to this, I use a little utility called Witch which enables cycling (graphically) over windows too(I've defined it on ??). Unfortunately, it does not currently support tabs cycling... Would you have any suggestion for this? I know I already can ^? for this, but I'm looking for a graphical utility where you are not blind during cycling. Thank you.

    Read the article

  • Correct formulation of the A* algorithm

    - by Eli Bendersky
    Hello, I'm looking at definitions of the A* path-finding algorithm, and it seems to be defined somewhat differently in different places. The difference is in the action performed when going through the successors of a node, and finding that a successor is on the closed list. One approach (suggested by Wikipedia, and this article) says: if the successor is on the closed list, just ignore it Another approach (suggested here and here, for example) says: if the successor is on the closed list, examine its cost. If it's higher than the currently computed score, remove the item from the closed list for future examination. I'm confused - which method is correct ? Intuitively, the first makes more sense to me, but I wonder about the difference in definition. Is one of the definitions wrong, or are they somehow isomorphic ?

    Read the article

  • Diamonds with question marks

    - by hokkaido
    Hi, I'm getting these little diamonds with question marks in them in my HTML attributes when I present data from my database. I'm using EPiServer and a few custom properties. This is the information I've gathered, I save my data as a XML document, since I use custom EPiServer properties which need more than one defined value. This is saved as UTF8. It's only attributes in element tags which have this problem, such as align=left becomes align=?left?. There is no " character there, but I get the diamonds anyway. If I use " outside an element, it works and shows correctly. Any clues?

    Read the article

  • Python Profiling In Windows, How do you ignore Builtin Functions

    - by Tim McJilton
    I have not been capable of finding this anywhere online. I was looking to find out using a profiler how to better optimize my code, and when sorting by which functions use up the most time cumulatively, things like str(), print, and other similar widely used functions eat up much of the profile. What is the best way to profile a python program to get the user-defined functions only to see what areas of their code they can optimize? I hope that makes sense, any light you can shed on this subject would be very appreciated.

    Read the article

  • C++ vtable resolving with virtual inheritance

    - by Tomas Cokis
    I was curious about C++ and virtual inheritance - in particular, the way that vtable conflicts are resolved between bass and child classes. I won't pretend to understand the specifics on how they work, but what I've gleamed so far is that their is a small delay caused by using virtual functions due to that resolution. My question then is if the base class is blank - ie, its virtual functions are defined as: virtual void doStuff() = 0; Does this mean that the resolution is not necessary, because there's only one set of functions to pick from? Forgive me if this is an stupid question - as I said, I don't understand how vtables work so I don't really know any better.

    Read the article

  • Constructor Type Coercion in C++

    - by Robert Mason
    Take the following class: class mytype { double num; public: mytype(int a) { num = sqrt(a); } void print() { cout << num; } } Say there is a method which takes a mytype: void foo(mytype a) { a.print(); } Is it legal c++ (or is there a way to implement this) to call foo(4), which would (in theory) output 2? From what I can glean you can overload type casts from a user defined class, but not to. Can constructor do this in a standards-compliant manner (assuming, of course, the constructor is not explicit). Hopefully there is a way to in the end have this legal: int a; cin >> a; foo(a); Note: this is quite obviously not the actual issue, but just an example for posting purposes. I can't just overload the function because of inheritance and other program-specific issues.

    Read the article

  • Counting Sublist Elements in Prolog

    - by idea_
    How can I count nested list elements in prolog? I have the following predicates defined, which will count a nested list as one element: length([ ], 0). length([H|T],N) :- length(T,M), N is M+1. Usage: ?- length([a,b,c],Out). Out = 3 This works, but I would like to count nested elements as well i.e. length([a,b,[c,d,e],f],Output). ?- length([a,b,[c,d,e],f],Output). Output = 6

    Read the article

  • How to show html template using inline styles only?

    - by aquero
    Hi, I want to display html template in a webpage. The styles of that template is specified inline. But when i try to display it in my webpage, some styles that are defined in my css are adding into it and the template is not displayed properly. This template is used to create mails and when i send this template as mail to my gmail account it is displayed correctly. How its done in gmail? How they show the template using inline styles only?

    Read the article

  • SubSonic isn't generating MySql foreign key tables

    - by keith
    I two tables within a MySql 5.1.34 database. When using SubSonic to generate the DAL, the foreign-key relationship doesn't get scripted, ie; I have no Parent.ChildCollection object. Looking inside the generated DAL Parent class shows the following; //no foreign key tables defined (0) I have tried SubSonic 2.1 and 2.2, and various MySql 5 versions. I must be doing something wrong procedurally - any help would be greatly appreciated. This has always just worked 'out-the-box' when using MS-SQL. TABLE `parent` ( `ParentId` INT(11) NOT NULL AUTO_INCREMENT, `SomeData` VARCHAR(25) DEFAULT NULL, PRIMARY KEY (`ParentId`) ) ENGINE=INNODB DEFAULT CHARSET=latin1; TABLE `child` ( `ChildId` INT(11) NOT NULL AUTO_INCREMENT, `ParentId` INT(11) NOT NULL, `SomeData` VARCHAR(25) DEFAULT NULL, PRIMARY KEY (`ChildId`), KEY `FK_child` (`ParentId`), CONSTRAINT `FK_child` FOREIGN KEY (`ParentId`) REFERENCES `parent` (`ParentId`) ) ENGINE=INNODB DEFAULT CHARSET=latin1;

    Read the article

  • Markdown to text/plain and text/html for multipart email

    - by fphilipe
    I’m looking for a solution to send DRY multipart emails in Rails. With DRY I mean that the content for the mail is only defined once. I’ve thought about some possible solutions but haven’t found any existing implementations. The solutions I’ve thought about are: load the text from I18n and apply Markdown for the html mail and apply Markdown with a special output type for the text mail where links are put in parenthesis after the link text bold, italic and other formatting that doesn't make sense are removed ordered and unordered lists are maintained generate only the html mail and convert that to text according to the above conditions Is there any available solution out there? Which one is probably the better way to do it?

    Read the article

  • consts and other animals

    - by bks
    Hello i have a cpp code wich i'm having trouble reading. a class B is defined now, i understand the first two lines, but the rest isn't clear enough. is the line "B const * pa2 = pa1" defines a const variable of type class B? if so, what does the next line do? B a2(2); B *pa1 = new B(a2); B const * pa2 = pa1; B const * const pa3 = pa2; also, i'm having trouble figuring out the difference between these two: char const *cst = “abc”; const int ci = 15; thank you

    Read the article

  • Converting between unsigned and signed int safely

    - by polemic
    I have an interface between a client and a server where a client sends (1) an unsigned value, and (2) a flag which indicates if value is signed/unsigned. Server would then static cast unsigned value to appropriate type. I later found out that this is implementation defined behavior and I've been reading about it but I couldn't seem to find an appropriate solution that's completely safe? I've read about type punning, pointer conversions, and memcpy. Would simply using a union type work? A UnionType containing signed and unsigned int, along with the signed/unsigned flag. For signed values, client sets the signed part of the union, and server reads the signed part. Same for the unsigned part. Or am I completely misunderstanding something? Side question: how do I know the specific behavior in this case for a specific scenario, e.g. windriver diab on PPC? I'm a bit lost on how to find such documentation.

    Read the article

  • Tableview with sections managed by fetched results controller

    - by Matthes
    Hi, I'm quite new to CoreData and need help with one issue. I have tableview which simply lists cities stored in SQLite db. City is defined by "cityId" and "name" attributes. Data are fetched using NSFetchedResultsController and everything works fine except that I can't figure out how to make FetchedResultsController to group cities by first letter of city names. When I supply "name" for sectionNameKeyPath argument of initWithFetchRequest:managedObjectContext:sectionNameKeyPath:cacheName: method, it creates section for each city, which is obviously something I don't want. I can't figure out how to create an expression which would make it work in way I need. thanks for any tips and/or advices on this Matthes

    Read the article

  • Change of a background image of a button on onclick event

    - by Alpan67
    Why does this not work ? In Firebug, when I click on the button, it always says to me that cambiaBandiera is not defined ... HELP Alex CSS ITA{ float:right; margin : 5px 85px; width:40px; height:40px; background : #FFFFFF url("../ITA_off.png") center center no-repeat; border:0; } JAVASCRIPT (in HEAD) style type="text/javascript" function cambiaBandiera() { test=document.getElementById("ITA"); test.style.backgroundImage="url('../ITA_on.png')"; } /style and this is HTML div id="bandiere" input type="button" id="ITA" onClick="cambiaBandiera()" /input /div

    Read the article

  • How do I prevent WIX CAQuietExec from logging the command line?

    - by Noel Abrahams
    In order to prevent command windows from popping up during installation I am using the WIX built-in custom action CAQuietExec. First I define the command line: <CustomAction Id="A01" Property="QtExecCmdLine" Value="&quot;MyExe.exe&quot; /password [PASSWORD]" /> NB: The PASSWORD property is defined as Hidden. This prevents the Windows installer from writing the property value to the log. Then I call into the embedded WIX extension: <CustomAction Id="A02" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="immediate" Return="ignore" /> This works fine. However, when I go to the temp folder and open up the MSI log I see the following entry: CAQuietExec: "C:\Program Files\MyExe.exe" /password INCLEARTEXT I.e. the password is displayed in clear text and not hidden. How do I prevent the CAQuietExec from logging the password in clear text?

    Read the article

  • Manually Adjusting UI for Rotation

    - by Driss Zouak
    In my view I have some number-pad type buttons that I want to manually adjust their X and Y when the view is rotated. I'm having trouble figuring out how to support this. I have added in my ViewDidLoad NSNotificationCenter.DefaultCenter.AddObserver("UIDeviceOrientationDidChangeNotification", DeviceRotated ); And I defined my DeviceRotated but the breakpoint is never hit. I thought this might be because of the Autorotate, so I overrided the ShouldAutorotateToInterfaceOrientation and set that to false (true didn't work either). I figured there should be some WillRotate (but that's a void return type) or something that would allow me to indicate that I want the View to rotate, and whatever is set to auto adjust I'd like it to do that, but that I would like to be able to manually adjust any other items that I need. If I have to do everything myself, that's fine as well. Any advice would be appreciated, Driss.

    Read the article

  • Read xml file and import only one table from multiple tables from xml file in the dataset at a time.

    - by Harikrishna
    I want to store the data in the xml file and retrieve the data from that. I have defined more than table in that xml file.Now to read the tables I am using dataset ds = new dataset(); ds.ReadXml(xmlfilepath); Now this dataset contains all the tables those are in xml file when we read the xml file into dataset. But I want only one specified table at a time in a dataset by condition. Like there are PersonalInfo,OtherInfo,PropertiesInfo tables in the xml file. But I want only OtherInfo table in dataset what I should do ?

    Read the article

  • How to center drawableTop and text vertically on the Button in Android?

    - by Gaks
    I have the Button defined as follows: <Button android:drawableTop="@drawable/ico" android:gravity="center" android:id="@+id/StartButton2x2" android:text="@string/Widget2x2StartBtnLabel" android:layout_width="0dip" android:layout_height="fill_parent" android:layout_weight="1" android:background="@drawable/widgetbtn_bg" /> The problem is that 'drawableTop' image is aligned to the top border of the Button view. I would like to center it (together with text label) vertically on the button. 'android:gravity' seems to work only on text label. It does not affect 'drawableTop' positioning. I was able to center it vertically using 'android:paddingTop' - but that does not seem to be a good idea. I guess it would not work properly on different screen resolution/size.

    Read the article

  • C: Incompatible types?

    - by Airjoe
    #include <stdlib.h> #include <stdio.h> struct foo{ int id; char *bar; char *baz[6]; }; int main(int argc, char **argv){ struct foo f; f.id=1; char *qux[6]; f.bar=argv[0]; f.baz=qux; // Marked line return 1; } This is just some test code so ignore that qux doesn't actually have anything useful in it. I'm getting an error on the marked line, incompatible types when assigning to type ‘char *[6]’ from type ‘char **’ but both of the variables are defined as char *[6] in the code. Any insight?

    Read the article

  • Usercontrol access javascript from a Content's Page's Master Page

    - by Coda
    Hello all I have a problem. I have a masterpage that all of my Content pages inherit from. Within this masterpage I have a script tag pointing to the javascript file folder "~/Scripts/validation.js" On my content pages I use different usercontrols that require the use of many of the functions within the validation.js file however if I dont put the tag and the javascript functions within a contentholder on the contentpage the usercontrols do not see these functions and I get errors like "OnNameValidation" is not defined. Of course I can copy the javscript code into all of the pages but that's 30+ pages and a maintenance nightmare if I find a bug in one of the javscript functions. So the question (if you haven't already figured out from my long dissertation) is how can I declare the script tag with the path to the validation.js file so that contentpages and their usercontrols etc. can access the functions/code. Thanks in advance.

    Read the article

< Previous Page | 179 180 181 182 183 184 185 186 187 188 189 190  | Next Page >