Search Results

Search found 31794 results on 1272 pages for 'html entities'.

Page 10/1272 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • make my file readable as either Perl or HTML

    - by JoelFan
    In the spirit of the "Perl Preamble" where a script works properly whether executed by a shell script interpreter or the Perl interpreter... I have a Perl script which contains an embedded HTML document (as a "heredoc"), i.e.: #!/usr/bin/perl ... some perl code ... my $html = <<'END' ; <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> ... more HTML ... </html> END ... perl code that processes $html ... I would like to be able to work on the HTML that's inside the Perl script and check it out using a web browser, and only run the script when the HTML is the way I want. To accomplish this, I need the file to be openable both as an HTML file and as a Perl script. I have tried various tricks with Perl comments and HTML comments but can't get it quite perfect. It doesn't have to be "strictly legal" HTML... just displayable in a browser with no (or minimal) Perl garbage visible.

    Read the article

  • LIbrary issue: How do I set up QtWebKit to parse HTML?

    - by user560106
    Nick Presta showed that you can parse HTML with qt here: Library Recommendation: C++ HTML Parser However, when I attempt to build this, I get an access violation on the "QWebFrame* frame = page.mainFrame();" line. What am I doing wrong? #include <QtWebKit\QWebElement> #include <QtWebKit\QWebView> #include <QtWebKit\QWebFrame> #include <QtWebKit\QWebPage> #include <iostream> int main() { QWebPage page; QWebFrame* frame = page.mainFrame(); frame->setHtml( "<html><head></head><body></body></html>" ); QWebElement document = frame->documentElement(); return 0; }

    Read the article

  • How to save Word documents as HTML to be viewed in Firefox

    - by private_meta
    I'm in need for saving a Word document as HTML. It has some background images, other images, texts, ... It opens correctly in Internet Explorer, but how can I save a word doc as HTML so that Firefox and other current browsers render it correctly? All images are missing in the document. I looked through the generated html document, but the paths for the images appear to be correct. Any idea? Things like "Don't save docs as html" won't be helpful here. Edit: To make myself clear, the normal "Save as HTML" doesn't cut it, the result is broken in any browser other than Internet Explorer. Edit 2: What I'm using is Word 2010 and Firefox 4. I also tried rendering it in the latest Chrome version, which failed as well. I used different compatibility settings for saving as html, it did not help

    Read the article

  • Using NHibernate to select entities based on activity of children entities

    - by mannish
    I'm having a case of the Mondays... I need to select blog posts based on recent activity in the post's comments collection (a Post has a List<Comment> property and likewise, a Comment has a Post property, establishing the relationship. I don't want to show the same post twice, and I only need a subset of the entities, not all of the posts. First thought was to grab all posts that have comments, then order those based on the most recent comment. For this to work, I'm pretty sure I'd have to limit the comments for each Post to the first/newest Comment. Last I'd simply take the top 5 (or whatever max results number I want to pass into the method). Second thought would be to grab all of the comments, ordered by CreatedOn, and filter so there's only one Comment per Post. Then return those top (whatever) posts. This seems like the same as the first option, just going through the back door. I've got an ugly, two query option I've got working with some LINQ on the side for filtering, but I know there's a more elegant way to do it in using the NHibernate API. Hoping to see some good ideas here.

    Read the article

  • What's a good entity hierarchy for a 2D game?

    - by futlib
    I'm in the process of building a new 2D game out of some code I wrote a while ago. The object hierarchy for entities is like this: Scene (e.g. MainMenu): Contains multiple entities and delegates update()/draw() to each Entity: Base class for all things in a scene (e.g. MenuItem or Alien) Sprite: Base class for all entities that just draw a texture, i.e. don't have their own drawing logic Does it make sense to split up entities and sprites up like that? I think in a 2D game, the terms entity and sprite are somewhat synonymous, right? But I do believe that I need some base class for entities that just draw a texture, as opposed to drawing themselves, to avoid duplication. Most entities are like that. One weird case is my Text class: It derives from Sprite, which accepts either the path of an image or an already loaded texture in its constructor. Text loads a texture in its constructor and passes that to Sprite. Can you outline a design that makes more sense? Or point me to a good object-oriented reference code base for a 2D game? I could only find 3D engine code bases of decent code quality, e.g. Doom 3 and HPL1Engine.

    Read the article

  • LINQ to Entities for subtracting 2 dates

    - by Michael I
    I am trying to determine the number of days between 2 dates using LINQ with Entity Framework. It is telling me that it does not recognize Subtract on the System.TimeSpan class Here is my where portion of the LINQ query. where ((DateTime.Now.Subtract(vid.CreatedDate).TotalDays < maxAgeInDays)) Here is the error I receive in the VS.NET debugger {"LINQ to Entities does not recognize the method 'System.TimeSpan Subtract(System.DateTime)' method, and this method cannot be translated into a store expression."} Am I doing something wrong or is there a better way to get the number of days between 2 DateTimes in the entity framework? thanks Michael

    Read the article

  • LiNQ to Entities, Include less

    - by Freddy
    Hi, If you are making a LinQ to entities expression for ClassA where A has a relation to ClassB like this: var temp = from p in myEntities.ClassA.Include("ClassB") where ... select p; You will get a set of ClassA:s with the reference to ClassB loaded. The thing in my case is that I dont really need to load ALL the ClassB-references, just a few of them. But I dont want to loop through the list of ClassA:s and load them individually, i want my database operations to be fewer and bigger instead of reading small chunks here and there. Is it possible to put some kind of restrictions on which references to include or do you have to accept this all or nothing style?

    Read the article

  • Linq to Entities : using ToLower() on NText fields

    - by Julien N
    I'm using SQL Server 2005, with a case sensitive database.. In a search function, I need to create a Linq To Entities (L2E) query with a "where" clause that compare several strings with the data in the database with these rules : The comparison is a "Contains" mode, not strict compare : easy as the string's Contains() method is allowed in L2E The comparison must be case insensitive : I use ToLower() on both elements to perform an insensitive comparison. All of this performs really well but I ran into the following Exception : "Argument data type ntext is invalid for argument 1 of lower function" on one of my fields. It seems that the field is a NText field and I can't perform a ToLower() on that. What could I do to be able to perform a case insensitive Contains() on that NText field ?

    Read the article

  • SQL's Rownumber with Linq-to-entities

    - by mariki
    I am converting my project to use EF and also want to covert stored procedures into Linq-to-entities queries. This my SQL query (simple version) that I have trouble to convert: SELECT CategoryID, Title as CategoryTitle,Description, LastProductTitle,LastProductAddedDate FROM ( SELECT C.CategoryID, C.Title,C.Description, C.Section, P.Title as LastProductTitle, P.AddedDate as LastProductAddedDate, ROW_NUMBER() OVER (PARTITION BY P.CategoryID ORDER BY P.AddedDate DESC) AS Num FROM Categories C LEFT JOIN Products P ON P.CategoryID = C.CategoryID ) OuterSelect WHERE OuterSelect.Num = 1 In words: I want to return all Categories (from Categories table) and title and date of addition of the product (from Products table) that was added last to this category. How can I achieve this using Entity frame work query? In most efficient way.

    Read the article

  • Defaultifempty seems to work in linq to entities

    - by Rand
    I'm new to linq and linq to entities so I might have gone wrong in my assumptions, but I've been unknowingly trying to use DefaultIfEmpty in L2E. For some reason if I turn the resultset into a List, the Defaultifempty() works I don't know if I've inadvertantly crossed over into Linq area. The code below works, can anyone tell me why? And if it does work great, then it'll be of help to other people. var results = (from u in rv.tbl_user .Include("tbl_pics") .Include("tbl_area") .Include("tbl_province") .ToList() where u.tbl_province.idtbl_Province == prov select new { u.firstName, u.cellNumber, u.tbl_area.Area, u.ID,u.tbl_province.Province_desc, pic = (from p3 in u.tbl_pics where p3.tbl_user.ID == u.ID select p3.pic_path).DefaultIfEmpty("defaultpic.jpg").First() }).ToList();

    Read the article

  • Linq to Entities and LEFT OUTER JOIN issue with MANY:1 relations

    - by Robert Koritnik
    Can somebody tell me, why does Linq to Entities translate many to 1 relationships to left outer join instead of inner join? Because there's referential constraint on DB itself that ensures there's a record in the right table, so inner join should be used instead (and it would work much faster) If relation was many to 0..1 left outer join would be correct. Question Is it possible to write LINQ in a way so it will translate to inner join rather than left outer join. It would speed query execution a lot... I haven't used eSQL before, but would it be wise to use it in instead of LINQ? Edit I updated my tags to include technology I'm using in the background: Entity Framework V1 Devart dotConnect for Mysql MySql database If someone could test if the same is true on Microsoft SQL server it would also give me some insight if this is Devart's issue or it's a general L2EF functionality... But I suspect EF is the culprit here.

    Read the article

  • Binding Linq To Entities query results to a datagridview

    - by Nickson
    I just started playing with Linq to entities in a windows forms application and am not understanding one behavior that looks so simple though. If i type code below, i get ReadOnly records in my dataGridView Dim x = From n in Table1 _ Select n.FirstName, n.LastName, N.Department DataGridView1.DataSource = x But if i type the following code, i get editable rows in my dataGridView Dim x = From n in Table1 _ Select n DataGridView1.DataSource = x So, basically if i specify the column names to select and databind to my DataGridView1, the rows are readonly but if i do not specify the column names and databind to the DataGridView, the rows are editable and i don't understand why.

    Read the article

  • Linq to Entities - left Outer Join

    - by user255234
    Could you please help me to figure this one out? I need to replace a join with OSLP table with OUTER join. Seems a bit tricky for someone who is not an expert in Linq to entities. How would I do that? var surgeonList = ( from item in context.T1_STM_Surgeon .Include("T1_STM_SurgeonTitle") .Include("OTER") where item.ID == surgeonId join reptable in context.OSLP on item.Rep equals reptable.SlpCode select new { ID = item.ID, First = item.First, Last = item.Last, Rep = reptable.SlpName, Reg = item.OTER.descript, PrimClinic = item.T1_STM_ClinicalCenter.Name, Titles = item.T1_STM_SurgeonTitle, Phone = item.Phone, Email = item.Email, Address1 = item.Address1, Address2 = item.Address2, City = item.City, State = item.State, Zip = item.Zip, Comments = item.Comments, Active = item.Active, DateEntered = item.DateEntered }).ToList(); Thanks in advance!!

    Read the article

  • Linq to Entities performance within ASP.NET Development Server

    - by tster
    I've been evaluating linq to entities and linq to SQL for a project. Obviously each has its own advantages and disadvantages which have been discussed plenty of times here. However, One thing I am seeing with L2E is kind of odd. Using L2S, when using the ASP.NET Development Server, the performance is a little slower for my web service calls. I'm looking at 300ms vs. 250 ms. However, when using L2E, when using ASP.NET Dev Server, the performance is awful. I'm talking 1,250 ms vs. 220 ms. I know I should probably just use local IIS for development, but I'm curious if anyone else has seen this, or knows what is causing it.

    Read the article

  • 7 Web Design Tutorials from PSD to HTML/CSS

    - by Sushaantu
    Some time back when I was looking for some tutorials to create a website from scratch i.e. the process from designing the PSD to slice it and CSS/XHTML it, then not many quality results appeared. But that was like almost an year back and a lot of water has flown down the river Thanes since [...]

    Read the article

  • Translate report data export from RUEI into HTML for import into OpenOffice Calc Spreadsheets

    - by [email protected]
    A common question of users is, How to import the data from the automated data export of Real User Experience Insight (RUEI) into tools for archiving, dashboarding or combination with other sets of data.XML is well-suited for such a translation via the companion Extensible Stylesheet Language Transformations (XSLT). Basically XSLT utilizes XSL, a template on what to read from your input XML data file and where to place it into the target document. The target document can be anything you like, i.e. XHTML, CSV, or even a OpenOffice Spreadsheet, etc. as long as it is a plain text format.XML 2 OpenOffice.org SpreadsheetFor the XSLT to work as an OpenOffice.org Calc Import Filter:How to add an XML Import Filter to OpenOffice CalcStart OpenOffice.org Calc andselect Tools > XML Filter SettingsNew...Fill in the details as follows:Filter name: RUEI Import filterApplication: OpenOffice.org Calc (.ods)Name of file type: Oracle Real User Experience InsightFile extension: xmlSwitch to the transformation tab and enter/select the following leaving the rest untouchedXSLT for import: ruei_report_data_import_filter.xslPlease see at the end of this blog post for a download of the referenced file.Select RUEI Import filter from list and Test XSLTClick on Browse to selectTransform file: export.php.xmlOpenOffice.org Calc will transform and load the XML file you retrieved from RUEI in a human-readable format.You can now select File > Open... and change the filetype to open your RUEI exports directly in OpenOffice.org Calc, just like any other a native Spreadsheet format.Files of type: Oracle Real User Experience Insight (*.xml)File name: export.php.xml XML 2 XHTMLMost XML-powered browsers provides for inherent XSL Transformation capabilities, you only have to reference the XSLT Stylesheet in the head of your XML file. Then open the file in your favourite Web Browser, Firefox, Opera, Safari or Internet Explorer alike.<?xml version="1.0" encoding="ISO-8859-1"?><!-- inserted line below --> <?xml-stylesheet type="text/xsl" href="ruei_report_data_export_2_xhtml.xsl"?><!-- inserted line above --><report>You can find a patched example export from RUEI plus the above referenced XSL-Stylesheets here: export.php.xml - Example report data export from RUEI ruei_report_data_export_2_xhtml.xsl - RUEI to XHTML XSL Transformation Stylesheetruei_report_data_import_filter.xsl - OpenOffice.org XML import filter for RUEI report export data If you would like to do things like this on the command line you can use either Xalan or xsltproc.The basic command syntax for xsltproc is very simple:xsltproc -o output.file stylesheet.xslt inputfile.xmlYou can use this with the above two stylesheets to translate RUEI Data Exports into XHTML and/or OpenOffice.org Calc ODS-Format. Or you could write your own XSLT to transform into Comma separated Value lists.Please let me know what you think or do with this information in the comments below.Kind regards,Stefan ThiemeReferences used:OpenOffice XML Filter - Create XSLT filters for import and export - http://user.services.openoffice.org/en/forum/viewtopic.php?f=45&t=3490SUN OpenOffice.org XML File Format 1.0 - http://xml.openoffice.org/xml_specification.pdf

    Read the article

  • Build tools for php, html, css, js web app development

    - by cs_brandt
    What are some recommendations for a build tool that would allow me to upload changes to a web server or a repository and minify the js and css automatically, and possibly even run Closure compiler on the JavaScript? Im not worried about doing anything with the php code other than update with most recent changes although in the future would like to have phpdoc updated automatically. Just wondering if there is some way to do all this other than an amalgam of scripts that run or have to be invoked every time. Thanks.

    Read the article

  • CSS sprite, what html tag to use

    - by yes123
    Hi guys, I am thinking to switch to CSS Sprite for my images. The main problem is I need something compatible with alt attribute. (Seo-purpouse) What Can I use? The first think I thought was to use a standard <img src="1x1.gif" class="mysprite"> The problem is I can't use that because that would like suspicous by google because of this: <img src="1x1.gif" class="mysprite" alt="my keyword1"> <img src="1x1.gif" class="mysprite" alt="my keyword2"> <img src="1x1.gif" class="mysprite" alt="my keyword3"> (the same image "1x1.gif" with different alt text) How we can solve this?

    Read the article

  • Suggestions for html tag info required for jQuery Plugin

    - by Toby Allen
    I have written a tiny bit of jQuery which simply selects all the Select form elements on the page and sets the selected property to the correct value. Previously I had to write code to generate the Select in php and specify the Selected attribute for the option that was selected or do loads of if statements in my php page or smarty template. Obviosly the information about what option is selected still needs to be specified somewhere in the page so the jQuery code can select it. I decided to create a new attribute on the Select item <Select name="MySelect" SelectedOption="2"> <-- Custom Attr SelectedOption <option value="1">My Option 1 </option> <option value="2">My Option 2 </option> <-- this option will be selected when jquery code runs <option value="3">My Option 3 </option> <option value="4">My Option 4 </option> </Select> Does anyone see a problem with using a custom attribute to do this, is there a more accepted way, or a better jquery way?

    Read the article

  • From .psd to working HTML and CSS - help me suck less

    - by kevinmajor1
    I am not much of a designer. My strength lies in coding. That said, I'm often forced into the role of "The Man," responsible for all aspects of site creation. So, that said I'm wondering if the pros can give me tips/solutions/links to tutorials to my main questions. Resolution. What should I aim for? What are the lower and upper edges I should be aware of? I know that systems like 960 Grid were popular recently. Is that the number I should still aim for? Slicing up a .psd - are there any tricks I should know? I've always found it difficult to get my slices pixel perfect. I'm also really slow at it. I must be looking at it wrong, or missing something fundamental. The same goes for text. Layouts are always filled with the classic "Lorem...", but I can never seem to get real content to fit quite as well on the screen. The advanced (to me, anyway) looking things, like a part of a logo/image overlaying what looks like a content area. How does one do that? How do layouts change/are informed by the decision to go fixed or liquid? Again, any tips/tricks/suggestions/tutorials you can share would be greatly appreciated.

    Read the article

  • displaying multi-section html documents - best practices

    - by ecpepper
    I work at a research organization and we publish a lot of large-ish documents, usually organized in sections. What I want to know is how best to present these multi-section documents on our website. Presently, what I do is load the entire document as a single page, with each section as its own div. Then I show and hide divs as needed via a table of contents and "next" and "prev" buttons. The advantages to this are mainly: 1) that you can move between sections very quickly, 2) it produces consistent analytics (when a page is loaded, I know a report is being read). The disadvantages, however, are real: Readers can't take advantage of browser back/forward buttons to move between sections. It's complicated to create direct links to individual sections (I can do it with javascript but it's not easy for other people to grab and share). For long reports, you have to wait for the full report to load before you can move around (and that can include hordes of images and charts). Do other people have thoughts on better ways to organize this? Here's an example of the current system: http://massbudget.org/825

    Read the article

  • Layouts in HTML

    - by TerNovi
    I am trying to have a div then inside the division have some different places where I can place stuff. For example. <div blah> <table blah> content... </table> <table blah> content... </table> <table blah> content.... </table> </div> I am not really a web developer so I know this question might seem simple but any help is greatly appreciated. Oh and I am using Macromedia Dreamweaver 8. Thanks.

    Read the article

  • Practical considerations for HTML / CSS naming conventions (syntax)

    - by Jeroen
    Question: what are the practical considerations for the syntax in class and id values? Note that I'm not asking about the semantics, i.e. the actual words that are being used, as for example described in this blogpost. There are a lot of resources on that side of naming conventions already, in fact obscuring my search for practical information on the various syntactical bits: casing, use of interpunction (specifically the - dash), specific characters to use or avoid, etc. To sum up the reasons I'm asking this question: The naming restrictions on id and class don't naturally lead to any conventions The abundance of resources on the semantic side of naming conventions obscure searches on the syntactic considerations I couldn't find any authorative source on this There wasn't any question on SE Programmers yet on this topic :) Some of the conventions I've considered using: UpperCamelCase, mainly as a cross-over habit from server side coding lowerCamelCase, for consistency with JavaScript naming conventions css-style-classes, which is consistent with naming of css properties (but can be annoying when Ctrl+Shift+ArrowKey selection of text) with_under_scores, which I personally haven't seen used much alllowercase, simple to remember but can be hard to read for longer names UPPERCASEFTW, as a great way to annoy your fellow programmers (perhaps combined with option 4 for readability) And probably I've left out some important options or combinations as well. So: what considerations are there for naming conventions, and to which convention do they lead?

    Read the article

  • HTML coding style: attribute starts on a new line

    - by Matty
    sublvl's front end developer seems to have a strange coding style that I've never seen before. Every time they begin a new element, immediately after the element name they insert a line break. The first thing that appears on the next line is the first attribute of the element. For example: id="player-container"><div id="player-bar"><div id="player-controls-wrapper"><div id="player-controls"><div id ="player-controls-buttons"> <a The above code was found here. I've never seen this kind of coding style before. What's going on here? Is this just a quirky style or is there some reasoning behind it?

    Read the article

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