Search Results

Search found 1858 results on 75 pages for 'declarative markup'.

Page 1/75 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Declarative programming vs. Imperative programming

    - by EpsilonVector
    I feel very comfortable with Imperative programming. I never have trouble expressing algorithmically what I want the computer to do once I figured out what is it that I want it to do. But when it comes to languages like SQL or Relational Algebra I often get stuck because my head is too used to Imperative programming. For example, suppose you have the relations band(bandName, bandCountry), venue(venueName, venueCountry), plays(bandName, venueName), and I want to write a query that says: all venueNames such that for every bandCountry there's a band from that country that plays in venue of that name. In my mind I immediately go "for each venueName iterate over all the bandCountries and for each bandCountry get the list of bands that come from it. If none of them play in venueName, go to next venueName. Else, at the end of the bandCountries iteration add venueName to the set of good venueNames". ...but you can't talk like that in SQL and I actually need to think about how to formulate this, with the intuitive Imperative solution constantly nagging in the back of my head. Did anybody else had this problem? How did you overcome this? Did you figured out a paradigm shift? Made a map from Imperative concepts to SQL concepts to translate Imperative solutions into Declarative ones? Read a good book? PS I'm not looking for a solution to the above query, I did solve it.

    Read the article

  • Suggestions for a CMS markup language for PHP

    - by Yanick Rochon
    As a learning experience, and as project, I am attempting to write a CMS module for ZF2. One of the functionality I would like to have is the possibility of adding dynamic contents in the pages by calling PHP functions in the view scripts. However, I do not want to give the users freedom in writing PHP code directly inside the page content, but rather implement custom view helpers (or widgets) to handle logic. For example: calling partial, partialLoop, url, etc. specifying arguments and all. I liked the idea of extending Markdown but this would get complicated when trying to add custom CSS class to elements, etc. Then I had the idea of simply doing a preg_replace on some patterns. For example, the string : ### partialLoop:['partials/display.phtml',[{id:'p1',price:4.99},{id:'p2',price:12.34}]] ### would be replaced by <?php echo $this->partialLoop('partials/display.phtml', array(array('id'=>'p1','price'=>4.99),array('id'=>'p2','price'=>12.34))) ?> Obviously, there would be some caching done so the page content is not rendered everytime. Does this sound good? If not, what would be a good way of doing this? Or is there a project already being developed for doing this? (I'd like to avoid heavy third party libs and something fairly or fully compatible with ZF2 would be nice.) Thanks.

    Read the article

  • Semantic Form Markup for Yes or No Questions

    - by sholsinger
    I frequently receive mock-ups of HTML forms with the following prototype: Some long winded yes or no question?   (o) Yes   ( ) No The (o) and ( ) in this prototype represent radio buttons. My personal view is that if the question has only a true or false value then it should be a check box. That said, I have seen this sort of "layout" from almost every designer I've ever worked with. If I were not to question their decision, or question the client's decision, I'd probably mark it up like this: <p class="pseudo_label">Some long winded yes or no question?</p> <input type="radio" name="the_question" id="the_question_yes" value="1"> <label for="the_question_yes" class="after_radio">Yes</label> <input type="radio" name="the_question" id="the_question_no" value="0"> <label for="the_question_no" class="after_radio">No</label> I really don't want to do that. I want to push back and convince them that this should really be a check box and not two radio buttons. But my question is, if I can't convince them – you're welcome to help me try – how should I code that original design requirement such that it is semantic and at least understandable for screen reader users? If I were able to convince my tormentors to change their minds, I would likely code it in the following fashion: <label for="the_question">Some long winded yes or no question?</label> <input type="checkbox" name="the_question" id="the_question" value="1"> What do you think about this issue? Should I push back? Possibly more importantly is either way semantically correct? UPDATE: I have posted a related question on the UI SE per your suggestions. You can find it here: http://ui.stackexchange.com/q/3335/3493

    Read the article

  • Using QT to build a WYSIWYG Editor for a Custom Markup Language

    - by Aaron
    I'm new to QT, and am trying to figure out the best means of creating a WYSIWYG editor widget for a custom markup language that displays simple text, images, and links. I need to be able to propagate changes from the WYSIWYG editor to the custom markup representation. As a concrete example of the problem domain, imagine that the custom markup might have a "player" tag which contains a player name and a team name. The markup could look like this: Last week, <player id="1234"><name>Aaron Rodgers</name><team>Packers</team></player> threw a pass. This text would display in the editor as: Last week, Aaron Rodgers of the Packers threw a pass. The player name and the team name would be editable directly within the editor in standard WYSIWYG fashion, so that my users do not have to learn any markup. Also, when the player name is moused-over, a details pop-up will appear about that player, and similarly for the team. With that long introduction, I'm trying to figure out where to start with QT. It seems that the most logical option would be the Rich Text API using a QTextDocument. This approach seems less than ideal given the limitations of a QTextDocument: I can't figure out how to capture navigation events from clicking on links. Following links on click seems to only be enabled when the QTextEdit is readonly. Custom objects that implement QTextObjectInterface are ignored in copy-and-paste operations Any HTML-based markup that is passed to it as Rich Text is retranslated into a series of span tags and lots of other junk, making it extremely difficult to propagate changes from the editor back to the original custom markup. A second option appears to be QWebKit, which allows for live editing of HTML5 markup, so I could specify a two-way translation between the custom markup and HTML5. I'm not clear on how one would propagate changes from the editor back to the original markup in real-time without re-translating the entire document on every text change. The QWebKit solutions looks like awfully bulky to me (Learning WebKit along with QT) to what should be a relatively simple problem. I have also considered implementing the WYSIWYG with a custom class using native QT containers, labels, images, and other widgets manually. This seems like the most flexible approach, and the one most likely not to run into unresolvable problems. However, I'm pretty sure that implementing all the details of a normal text editor (selecting text, font changes, cut-and-paste support, undo/redo, dragging of objects, cursor placement, etc.) will be incredibly time consuming. So, finally, my question: are there any QT gurus out there with some advice on where to start with this sort of project? BTW, I am using QT because the application is a desktop application that needs platform independence.

    Read the article

  • Imperative Programming v/s Declarative Programming v/s Functional Programming

    - by kaleidoscope
    Imperative Programming :: Imperative programming is a programming paradigm that describes computation in terms of statements that change a program state. In much the same way as the imperative mood in natural languages expresses commands to take action, imperative programs define sequences of commands for the computer to perform. The focus is on what steps the computer should take rather than what the computer will do (ex. C, C++, Java). Declarative Programming :: Declarative programming is a programming paradigm that expresses the logic of a computation without describing its control flow. It attempts to minimize or eliminate side effects by describing what the program should accomplish, rather than describing how to go about accomplishing it. The focus is on what the computer should do rather than how it should do it (ex. SQL). A  C# example of declarative v/s. imperative programming is LINQ. With imperative programming, you tell the compiler what you want to happen, step by step. For example, let's start with this collection, and choose the odd numbers: List<int> collection = new List<int> { 1, 2, 3, 4, 5 }; With imperative programming, we'd step through this, and decide what we want: List<int> results = new List<int>(); foreach(var num in collection) {     if (num % 2 != 0)           results.Add(num); } Here’s what we are doing: *Create a result collection *Step through each number in the collection *Check the number, if it's odd, add it to the results With declarative programming, on the other hand, we write the code that describes what you want, but not necessarily how to get it var results = collection.Where( num => num % 2 != 0); Here, we're saying "Give us everything where it's odd", not "Step through the collection. Check this item, if it's odd, add it to a result collection." Functional Programming :: Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions.Functional programming has its roots in the lambda calculus. It is a subset of declarative languages that has heavy focus on recursion. Functional programming can be a mind-bender, which is one reason why Lisp, Scheme, and Haskell have never really surpassed C, C++, Java and COBOL in commercial popularity. But there are benefits to the functional way. For one, if you can get the logic correct, functional programming requires orders of magnitude less code than imperative programming. That means fewer points of failure, less code to test, and a more productive (and, many would say, happier) programming life. As systems get bigger, this has become more and more important. To know more : http://stackoverflow.com/questions/602444/what-is-functional-declarative-and-imperative-programming http://msdn.microsoft.com/en-us/library/bb669144.aspx http://en.wikipedia.org/wiki/Imperative_programming   Technorati Tags: Ranjit,Imperative Programming,Declarative programming,Functional Programming

    Read the article

  • Building Tag Cloud Declarative ADF Component

    - by Arunkumar Ramamoorthy
    When building a website, there could a requirement to add a tag cloud to let the users know the popular tags (or terms) used in the site. In this blog, we would build a simple declarative component to be used as tag cloud in the page. To start with, we would first create the declarative component, which could display the tag cloud. We will do that by creating a new custom application from the new gallery. Give a name for the app and the project and from the new gallery, let us create a new ADF Declarative Component We need to specify the name for the declarative component, attributes in it etc. as follows For displaying the tags as cloud, we need to pass the content to this component. So, we will create an attribute to hold the values for the tag. Let us name it as "value" and make it as java.lang.String  type. Once after this, to hold the component, we need to create a tag library. This can be done by clicking on the Add Tag Library button. Clicking on OK buttons in all the open dialogs would create a declarative component for us. Now, we need to display the tag cloud based on the value passed to the component. To do that, we assume that the value is a Tree Binding and has two attributes in it, say "Name" and "Weight". To make a tag cloud, we would put together the "Name" in a loop and set it's font size based on the "Weight". After putting our logic to work, here is how the source look Attributes added to the declarative components can be retrieved by using #{attrs.<attribute_name>}. Now, we need to deploy this project as ADF Library Jar file, so that this can be distributed to the consuming applications. We'll select ADF Library Jar as type and create the profile. We would be getting the jar file after deployment. To test the functionality, we could create a simple Fusion Web Application. To add our custom component to the consuming application, we can create a file system connection pointing to the location where the jar file is and add it or, add through the project properties of the ViewController project. Now, our custom component has been added to the consuming application. We could test that by creating a VO in the model project with a query like, select 'Faces' as Name,25 as Weight from dual union all select 'ADF', 15 from dual  union all select 'ADFdi', 30 from dual union all select 'BC4J', 20 from dual union all select 'EJB', 40 from dual union all select 'WS', 35 from dual Add this VO to the AppModule, so that it would be exposed to the data control. Then, we could create a jspx page, and add a tree binding to the VO created. We can now see our Tag Cloud declarative component is available in the component palette.  It can be inserted from the component palette to our page and set it's value property to CollectionModel of the tree binding created. Now that we've created the Declarative component and added that to our page successfully, we can run the page to see how it looks. As per the query, the Tags are displayed in different fonts, based on their weight.

    Read the article

  • suggestions for declarative GUI programming in Java

    - by Jason S
    I wonder if there are any suggestions for declarative GUI programming in Java. (I abhor visual-based GUI creator/editor software, but am getting a little tired of manually instantiating JPanels and Boxes and JLabels and JLists etc.) That's my overall question, but I have two specific questions for approaches I'm thinking of taking: JavaFX: is there an example somewhere of a realistic GUI display (e.g. not circles and rectangles, but listboxes and buttons and labels and the like) in JavaFX, which can interface with a Java sourcefile that accesses and updates various elements? Plain Old Swing with something to parse XUL-ish XML: has anyone invented a declarative syntax (like XUL) for XML for use with Java Swing? I suppose it wouldn't be hard to do, to create some code based on STaX which reads an XML file, instantiates a hierarchy of Swing elements, and makes the hierarchy accessible through some kind of object model. But I'd rather use something that's well-known and documented and tested than to try to invent such a thing myself. JGoodies Forms -- not exactly declarative, but kinda close & I've had good luck with JGoodies Binding. But their syntax for Form Layout seems kinda cryptic. edit: lots of great answers here! (& I added #3 above) I'd be especially grateful for hearing any experiences any of you have had with using one of these frameworks for real-world applications. p.s. I did try a few google searches ("java gui declarative"), just didn't quite know what to look for.

    Read the article

  • How to better start learning programming - with imperative or declarative languages?

    - by user712092
    Someone is interested in learning to program. What language paradigm should I recomend him - imperative or declarative? And what programming language should he start with? I think that declarative because it is closer to math. And I would say that Prolog might be the best start because it is based on logic and programs are short. On the other hand at school we started learning from imperative languages and I am not sure whether there is a benefit to start with them instead of declarive ones. Thanks. :)

    Read the article

  • "Page description language" and "markup language"

    - by Tim
    What is the difference and relation between "Page description language"(http://en.wikipedia.org/wiki/Page_description_language), "markup language" (http://en.wikipedia.org/wiki/Markup_language) and "Page description markup language" (http://en.wikipedia.org/wiki/Page_description_markup_language)? Thanks! PostScript is a page description language. Is it a markup language? HTML and Latex are markup language. Are they page description language?

    Read the article

  • Tools to (privately) annotate/markup a website for maintenance

    - by rob
    I've been tasked with updating a website. Rather than proofreading and updating each page (one at a time), I want to make a single pass over the entire website, marking graphics/images/videos that need to be rewritten, removed, or updated. I thought about taking screenshots, marking those up, and putting them in our bug-tracking database, but that seems like an extremely tedious solution. Some of the content is similar on various pages across the website, and the entire site itself is localized into several languages (so any changes made to the English version will have corresponding changes for other languages). I also want all of my markup to remain private (that is, if it's stored online somewhere, I should be the only person who can see my comments). I found an article that lists several website annotation services, but it's not clear whether they allow private annotations, or whether these tools are even appropriate for website maintenance (many of them look more geared toward social networking). I've started making a list of some necessary and desired features below, and may add more as necessary. Annotations/markup/comments remain private (only visible to me) Comment history/tagging (so I can reuse the same comment for shared footers, items requiring similar updates, etc.) Ability to print/export a list or report of all comments for the entire website Ability to produce a categorized list of changes (e.g., to produce a list of images that need updating, which I can send to the graphic designer) What processes and tools do you use to keep track of all the changes that need to be made to a website? What features are painfully absent from the tools you use?

    Read the article

  • E: Sub-process /usr/bin/dpkg returned an error code (1)

    - by Joel
    I cant install or uppdate anything on my system 12.04 I get the error... installArchives() failed: dpkg: error processing libqt4-xmlpatterns (--configure): libqt4-xmlpatterns:amd64 4:4.8.1-0ubuntu4.2 cannot be configured because libqt4-xmlpatterns:i386 is in a different version (4:4.8.1-0ubuntu4.3) dpkg: error processing libqt4-xmlpatterns:i386 (--configure): libqt4-xmlpatterns:i386 4:4.8.1-0ubuntu4.3 cannot be configured because libqt4-xmlpatterns:amd64 is in a different version (4:4.8.1-0ubuntu4.2) dpkg: dependency problems prevent configuration of libqt4-declarative:i386: libqt4-declarative:i386 depends on libqt4-xmlpatterns (= 4:4.8.1-0ubuntu4.3); however: Package libqt4-xmlpatterns:i386 is not configured yet. dpkg: error processing libqt4-declarative:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-declarative: libqt4-declarative depends on libqt4-xmlpatterns (= 4:4.8.1-0ubuntu4.3); however: Version of libqt4-xmlpatterns on system is 4:4.8.1-0ubuntu4.2. dpkg: error processing libqt4-declarative (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqtgui4:i386: libqtgui4:i386 depends on libqt4-declarative (= 4:4.8.1-0ubuntu4.3); however: Package libqt4-declarative:i386 is not configured yet. dpkg: error processing libqtgui4:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqtgui4: No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already No apport report written because MaxReports is reached already libqtgui4 depends on libqt4-declarative (= 4:4.8.1-0ubuntu4.3); however: Package libqt4-declarative is not configured yet. dpkg: error processing libqtgui4 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-designer: libqt4-designer depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4 is not configured yet. dpkg: error processing libqt4-designer (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-designer:i386: libqt4-designer:i386 depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4:i386 is not configured yet. dpkg: error processing libqt4-designer:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-opengl: libqt4-opengl depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4 is not configured yet. dpkg: error processing libqt4-opengl (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-opengl:i386: libqt4-opengl:i386 depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4:i386 is not configured yet. dpkg: error processing libqt4-opengl:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-qt3support: libqt4-qt3support depends on libqt4-designer (= 4:4.8.1-0ubuntu4.3); however: Package libqt4-designer is not configured yet. libqt4-qt3support depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4 is not configured yet. dpkg: error processing libqt4-qt3support (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-qt3support:i386: libqt4-qt3support:i386 depends on libqt4-designer (= 4:4.8.1-0ubuntu4.3); however: Package libqt4-designer:i386 is not configured yet. libqt4-qt3support:i386 depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4:i386 is not configured yet. dpkg: error processing libqt4-qt3support:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-scripttools:i386: libqt4-scripttools:i386 depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4:i386 is not configured yet. dpkg: error processing libqt4-scripttools:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-svg: libqt4-svg depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4 is not configured yet. dpkg: error processing libqt4-svg (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-svg:i386: libqt4-svg:i386 depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4:i386 is not configured yet. dpkg: error processing libqt4-svg:i386 (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: libqt4-xmlpatterns libqt4-xmlpatterns:i386 libqt4-declarative:i386 libqt4-declarative libqtgui4:i386 libqtgui4 libqt4-designer libqt4-designer:i386 libqt4-opengl libqt4-opengl:i386 libqt4-qt3support libqt4-qt3support:i386 libqt4-scripttools:i386 libqt4-svg libqt4-svg:i386 Error in function: dpkg: dependency problems prevent configuration of libqt4-declarative: libqt4-declarative depends on libqt4-xmlpatterns (= 4:4.8.1-0ubuntu4.3); however: Version of libqt4-xmlpatterns on system is 4:4.8.1-0ubuntu4.2. dpkg: error processing libqt4-declarative (--configure): dependency problems - leaving unconfigured dpkg: error processing libqt4-xmlpatterns (--configure): libqt4-xmlpatterns:amd64 4:4.8.1-0ubuntu4.2 cannot be configured because libqt4-xmlpatterns:i386 is in a different version (4:4.8.1-0ubuntu4.3) dpkg: error processing libqt4-xmlpatterns:i386 (--configure): libqt4-xmlpatterns:i386 4:4.8.1-0ubuntu4.3 cannot be configured because libqt4-xmlpatterns:amd64 is in a different version (4:4.8.1-0ubuntu4.2) dpkg: dependency problems prevent configuration of libqtgui4: libqtgui4 depends on libqt4-declarative (= 4:4.8.1-0ubuntu4.3); however: Package libqt4-declarative is not configured yet. dpkg: error processing libqtgui4 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-declarative:i386: libqt4-declarative:i386 depends on libqt4-xmlpatterns (= 4:4.8.1-0ubuntu4.3); however: Package libqt4-xmlpatterns:i386 is not configured yet. dpkg: error processing libqt4-declarative:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-svg: libqt4-svg depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4 is not configured yet. dpkg: error processing libqt4-svg (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-opengl: libqt4-opengl depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4 is not configured yet. dpkg: error processing libqt4-opengl (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-designer: libqt4-designer depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4 is not configured yet. dpkg: error processing libqt4-designer (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-qt3support: libqt4-qt3support depends on libqt4-designer (= 4:4.8.1-0ubuntu4.3); however: Package libqt4-designer is not configured yet. libqt4-qt3support depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4 is not configured yet. dpkg: error processing libqt4-qt3support (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqtgui4:i386: libqtgui4:i386 depends on libqt4-declarative (= 4:4.8.1-0ubuntu4.3); however: Package libqt4-declarative:i386 is not configured yet. dpkg: error processing libqtgui4:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-svg:i386: libqt4-svg:i386 depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4:i386 is not configured yet. dpkg: error processing libqt4-svg:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-opengl:i386: libqt4-opengl:i386 depends on libqtgui4 (= 4:4.8.1-0ubuntu4.3); however: Package libqtgui4:i386 is not configured yet. dpkg: error processing libqt4-opengl:i386 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libqt4-designer:i386: joel@Joel-PC:~$ sudo apt-get install -f [sudo] password for joel: Läser paketlistor... Färdig Bygger beroendeträd Läser tillståndsinformation... Färdig Korrigerar beroenden.... Färdig Följande paket har installerats automatiskt och är inte längre nödvändiga: kde-l10n-sv language-pack-kde-sv-base language-pack-kde-zh-hans-base calligra-l10n-engb calligra-l10n-sv calligra-l10n-zhcn language-pack-kde-en kde-l10n-engb language-pack-kde-sv language-pack-zh-hans-base kde-l10n-zhcn language-pack-zh-hans language-pack-kde-zh-hans language-pack-kde-en-base Använd "apt-get autoremove" för att ta bort dem. Följande ytterligare paket kommer att installeras: libqt4-xmlpatterns Följande paket kommer att uppgraderas: libqt4-xmlpatterns 1 att uppgradera, 0 att nyinstallera, 0 att ta bort och 22 att inte uppgradera. 15 är inte helt installerade eller borttagna. Behöver hämta 0 B/1 033 kB arkiv. Efter denna åtgärd kommer ytterligare 0 B utrymme användas på disken. Vill du fortsätta [J/n]? J dpkg: fel vid hantering av libqt4-xmlpatterns (--configure): libqt4-xmlpatterns:amd64 4:4.8.1-0ubuntu4.2 cannot be configured because libqt4-xmlpatterns:i386 is in a different version (4:4.8.1-0ubuntu4.3) dpkg: fel vid hantering av libqt4-xmlpatterns:i386 (--configure): libqt4-xmlpatterns:i386 4:4.8.1-0ubuntu4.3 cannot be configured because libqt4-xmlpatterns:amd64 is in a different version (4:4.8.1-0ubuntu4.2) dpkg: beroendeproblem förhindrar konfigurering av libqt4-declarative:i386: libqt4-declarative:i386 är beroende av libqt4-xmlpatterns (= 4:4.8.1-0ubuntu4.3), men: Paketet libqt4-xmlpatterns:i386 har inte konfigurerats ännu. dpkg: fel vid hantering av libqt4-declarative:i386 (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar konfigurering av libqt4-declarative: libqt4-declarative är beroende av libqt4-xmlpatterns (= 4:4.8.1-0ubuntu4.3), men: Versionen av libqt4-xmlpatterns på systemet är 4:4.8.1-0ubuntu4.2. dpkg: fel vid hantering av libqt4-declarative (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar konfigurering av libqtgui4:i386: libqtgui4:i386 är beroende av libqt4-declarative (= 4:4.8.1-0ubuntu4.3), men: Paketet libqt4-declarative:i386 har inte konfigurerats ännu. dpkg: fel vid hantering av libqtgui4:i386 (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar koIngen apport-rapport skrevs därför att felmeddelandet indikerar att det är ett efterföljande fel från ett tidigare problem. Ingen apport-rapport skrevs därför att felmeddelandet indikerar att det är ett efterföljande fel från ett tidigare problem. Ingen apport-rapport skrevs därför att felmeddelandet indikerar att det är ett efterföljande fel från ett tidigare problem. Ingen apport-rapport skrevs därför att felmeddelandet indikerar att det är ett efterföljande fel från ett tidigare problem. Ingen apport-rapport skrevs därför att felmeddelandet indikerar att det är ett efterföljande fel från ett tidigare problem. Ingen apport-rapport skrevs därför att felmeddelandet indikerar att det är ett efterföljande fel från ett tidigare problem. nfigurering av libqtgui4: libqtgui4 är beroende av libqt4-declarative (= 4:4.8.1-0ubuntu4.3), men: Paketet libqt4-declarative har inte konfigurerats ännu. dpkg: fel vid hantering av libqtgui4 (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar konfigurering av libqt4-designer: libqt4-designer är beroende av libqtgui4 (= 4:4.8.1-0ubuntu4.3), men: Paketet libqtgui4 har inte konfigurerats ännu. dpkg: fel vid hantering av libqt4-designer (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar konfigurering av libqt4-designer:i386: libqt4-designer:i386 är beroende av libqtgui4 (= 4:4.8.1-0ubuntu4.3), men: Paketet libqtgui4:i386 har inte konfigurerats ännu. dpkg: fel vid hantering av libqt4-designer:i386 (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar konfigurering av libqt4-opengl: libqt4-opengl är beroende av libqtgui4 (= 4:4.8.1-0ubuntu4.3), men: Paketet libqtgui4 har inte konfigurerats ännu. dpkg: fel vid hantering av libqt4-opengl (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar konfigurering av libqt4-opengl:i386: libqt4-opengl:i386 är beroende av libqtgui4 (= 4:4.8.1-0ubuntu4.3), men: Paketet libqtgui4:i386 har inte konfigurerats ännu. dpkg: fel vid hantering av libqt4-opengl:i386 (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar konfigurering av libqt4-qt3support: libqt4-qt3support är beroende av libqt4-designer (= 4:4.8.1-0ubuntu4.3), men: Paketet libqt4-designer har inte konfigurerats ännu. libqt4-qt3support är beroende av libqtgui4 (= 4:4.8.1-0ubuntu4.3), men: Paketet libqtgui4 har inte konfigurerats ännu. dpkg: fel vid hantering av libqt4-qt3support (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar konfigurering av libqt4-qt3support:i386: libqt4-qt3support:i386 är beroende av libqt4-designer (= 4:4.8.1-0ubuntu4.3), men: Paketet libqt4-designer:i386 har inte konfigurerats ännu. libqt4-qt3support:i386 är beroende av libqtgui4 (= 4:4.8.1-0ubuntu4.3), men: Paketet libqtgui4:i386 har inte konfigurerats ännu. dpkg: fel vid hantering av libqt4-qt3support:i386 (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar konfigurering av libqt4-scripttools:i386: libqt4-scripttools:i386 är beroende av libqtgui4 (= 4:4.8.1-0ubuntu4.3), men: Paketet libqtgui4:i386 har inte konfigurerats ännu. dpkg: fel vid hantering av libqt4-scripttools:i386 (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar konfigurering av libqt4-svg: libqt4-svg är beroende av libqtgui4 (= 4:4.8.1-0ubuntu4.3), men: Paketet libqtgui4 har inte konfigurerats ännu. dpkg: fel vid hantering av libqt4-svg (--configure): beroendeproblem - lämnar okonfigurerad dpkg: beroendeproblem förhindrar konfigurering av libqt4-svg:i386: libqt4-svg:i386 är beroende av libqtgui4 (= 4:4.8.1-0ubuntu4.3), men: Paketet libqtgui4:i386 har inte konfigurerats ännu. dpkg: fel vid hantering av libqt4-svg:i386 (--configure): beroendeproblem - lämnar okonfigurerad Fel uppstod vid hantering: libqt4-xmlpatterns libqt4-xmlpatterns:i386 libqt4-declarative:i386 libqt4-declarative libqtgui4:i386 libqtgui4 libqt4-designer libqt4-designer:i386 libqt4-opengl libqt4-opengl:i386 libqt4-qt3support libqt4-qt3support:i386 libqt4-scripttools:i386 libqt4-svg libqt4-svg:i386 E: Sub-process /usr/bin/dpkg returned an error code (1)

    Read the article

  • Declarative authorization and the if_attribute not working...

    - by ro
    I've been having almost the same issues as Victor Martin (you can see the questions asked here). I've got declarative authorization working for just about everything that doesn't involve using conditionals. E.g. has_permission_on :users, :to => [:edit, :update, :destroy] do if_attribute :user => is { current_user } end Are there any common pitfalls with Declarative Authorization? I'm using authlogic and I'm suspicious the 'current_user' method in the application controller might be the source of the problem.

    Read the article

  • SQLAlchemy declarative syntax with autoload in Pylons

    - by Juliusz Gonera
    I would like to use autoload to use an existings database. I know how to do it without declarative syntax (model/_init_.py): def init_model(engine): """Call me before using any of the tables or classes in the model""" t_events = Table('events', Base.metadata, schema='events', autoload=True, autoload_with=engine) orm.mapper(Event, t_events) Session.configure(bind=engine) class Event(object): pass This works fine, but I would like to use declarative syntax: class Event(Base): __tablename__ = 'events' __table_args__ = {'schema': 'events', 'autoload': True} Unfortunately, this way I get: sqlalchemy.exc.UnboundExecutionError: No engine is bound to this Table's MetaData. Pass an engine to the Table via autoload_with=<someengine>, or associate the MetaData with an engine via metadata.bind=<someengine> The problem here is that I don't know where to get the engine from (to use it in autoload_with) at the stage of importing the model (it's available in init_model()). I tried adding meta.Base.metadata.bind(engine) to environment.py but it doesn't work. Anyone has found some elegant solution?

    Read the article

  • Conditional Markup in aspx

    - by Dynde
    Hi... I have a ListView. If I want to base the html markup on a condition in respects to the databound item, what would be the best way to do that? What I mean is, is there any other way then putting <% % if/else blocks directly in the markup? I'm aware that a really ugly way of doing it, is putting html markup in the database field, and just let the Eval() squeeze out the proper markup (I'm not doing that). I would like to avoid putting actual <% % C# blocks in the code as well. Any good ideas?

    Read the article

  • mediawiki markup equivalent of WMD editor?

    - by Justin Grant
    Anyone have a recommendation for an editor like the WMD editor, but using MediaWiki markup instead of Markdown? Our site is already using MediaWiki markup but we want a slicker editor without changing markup completely. Requirements include: live preview of formatted text underneath the markup you're typing a toolbar for common formatting (bold, italic, links, bullets, numbered-list, code, etc) keyboard shortcuts for each toolbar button (e.g. CTRL+B for bold) Undo/redo via keyboard shortcuts (CTRL+Z/CTRL+Y) or toolbar buttons works well in the usual set of popular browsers (including IE6!) open-source would be preferred

    Read the article

  • Fun with Declarative Components

    - by [email protected]
    Use case background I have been asked on a number of occasions if our selectOneChoice component could allow random text to be entered, as well as having a list of selections available. Unfortunately, the selectOneChoice component only allows entry via the dropdown selection list and doesn't allow text entry. I was thinking of possible solutions and thought that this might make a good example for using a declarative component.My initial idea My first thought was to use an af:inputText to allow the text entry, and an af:selectOneChoice with mode="compact" for the selections. To get it to layout horizontally, we would want to use an af:panelGroupLayout with layout="horizontal". To get the label for this to line up correctly, we'll need to wrap the af:panelGroupLayout with an af:panelLabelAndMessage. This is the basic structure: <af:panelLabelAndMessage> <af:panelGroupLayout layout="horizontal"> <af:inputText/> <af:selectOneChoice mode="compact"/> </af:panelgroupLayout></af:panelLabelAndMessage> Make it into a declarative component One of the steps to making a declarative component is deciding what attributes we want to be able to specify. To keep this example simple, let's just have: 'label' (the label of our declarative component)'value' (what we want to bind to the value of the input text)'items' (the select items in our dropdown) Here is the initial declarative component code (saved as file "inputTextWithChoice.jsff"): <?xml version='1.0' encoding='UTF-8'?><!-- Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. --><jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"> <jsp:directive.page contentType="text/html;charset=utf-8"/> <af:componentDef var="attrs" componentVar="comp"> <af:xmlContent> <component xmlns="http://xmlns.oracle.com/adf/faces/rich/component"> <description>Input text with choice component.</description> <attribute> <description>Label</description> <attribute-name>label</attribute-name> <attribute-class>java.lang.String</attribute-class> </attribute> <attribute> <description>Value</description> <attribute-name>value</attribute-name> <attribute-class>java.lang.Object</attribute-class> </attribute> <attribute> <description>Choice Select Items Value</description> <attribute-name>items</attribute-name> <attribute-class>[[Ljavax.faces.model.SelectItem;</attribute-class> </attribute> </component> </af:xmlContent> <af:panelLabelAndMessage id="myPlm" label="#{attrs.label}" for="myIt"> <af:panelGroupLayout id="myPgl" layout="horizontal"> <af:inputText id="myIt" value="#{attrs.value}" partialTriggers="mySoc" label="myIt" simple="true" /> <af:selectOneChoice id="mySoc" label="mySoc" simple="true" mode="compact" value="#{attrs.value}" autoSubmit="true"> <f:selectItems id="mySIs" value="#{attrs.items}" /> </af:selectOneChoice> </af:panelGroupLayout> </af:panelLabelAndMessage> </af:componentDef></jsp:root> By having af:inputText and af:selectOneChoice both have the same value, then (assuming that this passed in as an EL expression) selecting something in the selectOneChoice will update the value in the af:inputText. To use this declarative component in a jspx page: <af:declarativeComponent id="myItwc" viewId="inputTextWithChoice.jsff" label="InputText with Choice" value="#{demoInput.choiceValue}" items="#{demoInput.selectItems}" /> Some problems arise At first glace, this seems to be functioning like we want it to. However, there is a side effect to having the af:inputText and af:selectOneChoice share a value, if one changes, so does the other. The problem here is that when we update the af:inputText to something that doesn't match one of the selections in the af:selectOneChoice, the af:selectOneChoice will set itself to null (since the value doesn't match one of the selections) and the next time the page is submitted, it will submit the null value and the af:inputText will be empty. Oops, we don't want that. Hmm, what to do. Okay, how about if we make sure that the current value is always available in the selection list. But, lets not render it if the value is empty. We also need to add a partialTriggers attribute so that this gets updated when the af:inputText is changed. Plus, we really don't want to select this item so let's disable it. <af:selectOneChoice id="mySoc" partialTriggers="myIt" label="mySoc" simple="true" mode="compact" value="#{attrs.value}" autoSubmit="true"> <af:selectItem id="mySI" label="Selected:#{attrs.value}" value="#{attrs.value}" disabled="true" rendered="#{!empty attrs.value}"/> <af:separator id="mySp" /> <f:selectItems id="mySIs" value="#{attrs.items}" /></af:selectOneChoice> That seems to be working pretty good. One minor issue that we probably can't do anything about is that when you enter something in the inputText and then click on the selectOneChoice, the popup is displayed, but then goes away because it has been replaced via PPR because we told it to with the partialTriggers="myIt". This is not that big a deal, since if you are entering something manually, you probably don't want to select something from the list right afterwards. Making it look like a single component. Now, let's play around a bit with the contentStyle of the af:inputText and the af:selectOneChoice so that the compact icon will layout inside the af:inputText, making it look more like an af:selectManyChoice. We need to add some padding-right to the af;inputText so there is space for the icon. These adjustments were for the Fusion FX skin. <af:inputText id="myIt" partialTriggers="mySoc" autoSubmit="true" contentStyle="padding-right: 15px;" value="#{attrs.value}" label="myIt" simple="true" /><af:selectOneChoice id="mySoc" partialTriggers="myIt" contentStyle="position: relative; top: -2px; left: -19px;" label="mySoc" simple="true" mode="compact" value="#{attrs.value}" autoSubmit="true"> <af:selectItem id="mySI" label="Selected:#{attrs.value}" value="#{attrs.value}" disabled="true" rendered="#{!empty attrs.value}"/> <af:separator id="mySp" /> <f:selectItems id="mySIs" value="#{attrs.items}" /></af:selectOneChoice> There you have it, a declarative component that allows for suggested selections, but also allows arbitrary text to be entered. This could be used for search field, where the 'items' attribute could be populated with popular searches. Lines of java code written: 0

    Read the article

  • Does Altova StyleVision support generation of these specific Word XML Word ML List Numbering Bullet Markup? Extend with custom external XSLT?

    - by Alex S
    Does Altova StyleVision support generation of these specific Word XML Word ML List Numbering Bullet Markup? Extend with custom external XSLT? PS: I know is specific to Altova and their Dev Tools, but just like Eclipse and Visual Studio it is one of the widest used toolkits for XML related development & programming. So, please do not hate, ban or give negative. Linked below is a section of information for Word ML XML and its numbering, list, bullet etc. The markup is pretty extensive. I am wondering if this can be replicated via StyleVision or is this a limitation that needs to extended with an external XSLT? Quote: Key links to the Markup Documentation: http://officeopenxml.com/WPnumbering.php http://officeopenxml.com/WPnumberingAbstractNum.php Also: /WPnumberingLvl.php Short outline of the Documentation there: *Numbering, Levels and Lists* - Overview - Defining a Numbering Scheme - Defining a Particular Level ++ Numbering Level Text ++ Numbering Format ++ Displaying as Numerals Only ++ Restart Numbering ++ Picture or Image as Numbering Symbol ++ Justification ++ Overriding a Numbering Definition If StyleVision supports the above, where and how inside StyleVision can I access or use these properties/ attributes for the markup? From what I've gathered, I think it does not. In the past, I have written XSL-FO and XSL-WordML by hand. So I could write an add-on external XSLT containing Word specific markup for this purpose. *Given the limitation exists, the questions now: * Where and how do I create and linked inside of StyleVision so as to APPLY and EXTEND these capability limitations of StyleVision. AND How could I make it apply only for Word ML / Word XML output styling and be DEACTIVATED/ DISABLED for HTML and PDF output?

    Read the article

  • sqlalchemy relation through another (declarative)

    - by clayg
    Is anyone familiar with ActiveRecord's "has_many :through" relations for models? I'm not really a Rails guy, but that's basically what I'm trying to do. As a contrived example consider Projects, Programmers, and Assignments: from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy import Column, ForeignKey from sqlalchemy.types import Integer, String, Text from sqlalchemy.orm import relation from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class Assignment(Base): __tablename__ = 'assignment' id = Column(Integer, primary_key=True) description = Column(Text) programmer_id = Column(Integer, ForeignKey('programmer.id')) project_id = Column(Integer, ForeignKey('project.id')) def __init__(self, description=description): self.description = description def __repr__(self): return '<Assignment("%s")>' % self.description class Programmer(Base): __tablename__ = 'programmer' id = Column(Integer, primary_key=True) name = Column(String(64)) assignments = relation("Assignment", backref='programmer') def __init__(self, name=name): self.name = name def __repr__(self): return '<Programmer("%s")>' % self.name class Project(Base): __tablename__ = 'project' id = Column(Integer, primary_key=True) name = Column(String(64)) description = Column(Text) assignments = relation("Assignment", backref='project') def __init__(self, name=name, description=description): self.name = name self.description = description def __repr__(self): return '<Project("%s", "%s...")>' % (self.name, self.description[:10]) engine = create_engine('sqlite://') Base.metadata.create_all(engine) Session = sessionmaker(bind=engine) session = Session() Projects have many Assignments. Programmers have many Assignments. (understatement?) But in my office at least, Programmers also have many Projects - I'd like this relationship to be inferred through the Assignments assigned to the Programmer. I'd like the Programmer model to have a attribute "projects" which will return a list of Projects associated to the Programmer through the Assignment model. me = session.query(Programmer).filter_by(name='clay').one() projects = session.query(Project).\ join(Project.assignments).\ join(Assignment.programmer).\ filter(Programmer.id==me.id).all() How can I describe this relationship clearly and simply using the sqlalchemy declarative syntax? Thanks!

    Read the article

  • What are some good practices when trying to teach declarative programming to imperative programmers?

    - by ChaosPandion
    I offered to do a little bit training in F# at my company and they seemed to show some interest. They are generally VB6 and C# programmers who don't follow programming with too much passion. That being said I feel like it is easier to write correct code when you think in a functional matter so they should definitely get some benefit out of it. Can anyone offer up some advice on how I should approach this? Ideas Don't focus on the syntax, instead focus on how this language and the idioms it promotes can be used. Try and think of examples that are a pain to write in an imperative fashion but translates to elegant code when written in a declarative fashion.

    Read the article

  • what is the difference between declarative and imperative programming

    - by Brad
    I have been searching the web looking for a definition for declarative and imperative programming that would shed some light for me. However the language used at some of the resources that I have found is daunting - for instance at wikipedia. Does any one have a real world example that they could show me that might bring some perspective to this subject...perhaps in c# thanks

    Read the article

  • if_attribute on declarative authorization

    - by Victor Martins
    I have a many-to-many relationship like this: A user has_many organizations through affiliations and vice-versa. I'm using declarative organizations and I only want a user to edit a particular organization if he is affiliated and the affiliationtype attribute of affiliation is a particular value. So affiliations has 3 columns , user_id, organization_id and affiliationtype_id I can do: o = Organization.find(:first) o.affiliatons[0].user and get the user now I wish to do this: has_permission_on [:organizations], :to => :edit do if_attribute (...) end That if_attribute should see if the current user is the organization.affiliation[?].user and if the organization.affiliation[?].affiliationtype_id = "3" I hope this is syntax issue ... I really need to get this working.

    Read the article

  • Markup filter wanted for a public website

    - by sibidiba
    Developing a community site where everyone can post text, I'm looking for a markup filter: What is not part of the markup must be escaped (htmlspecialchars()) as it is. Should turn URL-s automatically into links Should support some form of basic markups (bold, image, url, pre, list) Should have a simple parser, that turns user input text into HTML Content on the site is public to everyone, XSS must not allowed to happen. What do you suggest? What markup language in the first place? BBCode? Wiki? Markdown? Are there any complete API-s with good examples? PHP is available on the server side. If there is a WYSIWYG-like texarea in addition (like here on SO) that would be a fantastic bonus!

    Read the article

  • Is there a declarative language for data definitions?

    - by Jekke
    Reading about WPF and thinking about my application's data store at the same time led me to wonder if there are any languages or tools that allow you to define relational data in a declarative way? A shallow Google search suggests no such thing exists. Yet it seems so obviously useful. The kind of tool I have in mind would declaratively describe (at least) entities, relationships and views is a platform-agnostic way that would act as an abstraction layer between data-driven applications and their datastores. Does any such tool exist?

    Read the article

  • declarative authorization and has_and_belongs_to_many

    - by Michael Balsiger
    Hi, I have a little problem with declarative-authorization. I have a User and Role Model with a has_and_belongs_to_many association. I've created a Role named :moderator in my authorization_rules.rb Is it possible that a User with the Role Moderator only gets the Users that have the Moderator Role assigned to it?? -- User.with_permissions_to(:index) I thought it would be possible like that: role :moderator do has_permission_on :users, :to => :index do if_attribute :roles => contains { ????? } end end I also created a named_scope in my User Model because I thought it would help... class User has_and_belongs_to_many :roles named_scope :by_role, lambda { |role| { :include => :roles, :conditions => {"roles.name" => role} } } end Does anyone knows if it's possible to do this with declarative_authorization? Thanks for your help!

    Read the article

  • W3c Markup Validator on Windows 2003 with Apache

    - by rihatum
    Hi All, OS = Windows 2003 (latest sp / hotfixes etc) Perl = Active Perl 5.8.9 Build 825 Apache 2.2.11 Followed the following How-To: http://validator.w3.org/docs/install_win.html Facing the following errors : (had an html error too, but I used Perl Package manager to upgrade the required package. Now, the Package manager isn't showing any update of the following package and some others too : SGML::Parser::OpenSP version 0.991 required--this is only version 0.99 at C:/www/validator/httpd/cgi-bin/check line 61. Q : How can I download the latest package for OpenSP ? Q : Would It be just a matter of click and install the package? If someone can provide a step by step that would be very helpful, I am not fluent with building perl packages. Thanks and Regards

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >